query
stringlengths
11
3.13k
ru_query
stringlengths
9
3.91k
document
stringlengths
18
71k
metadata
dict
negatives
listlengths
0
100
negative_scores
listlengths
0
100
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
Save Access Token to a text file
Сохраните Access Token в текстовый файл
public function saveAccessToken($accessToken) { file_put_contents($_SERVER['DOCUMENT_ROOT'].$this->tokenFile, serialize($accessToken)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function WriteTokenFile()\n {\n if ($this->getTokenUsePickupFile()) {\n $fname = $this->getTokenPickupFile();\n $fh = fopen($fname, \"w+\");\n fwrite($fh, $this->_props['RequestToken']);\n fclose($fh);\n }\n }", "public function saveAccessToken($accessToken);", "private function saveData() {\n // Create a new object with relevant information\n $data = new stdClass();\n $data->accessToken = $this->accessToken;\n $data->expirationDate = $this->expirationDate;\n $data->refreshToken = $this->refreshToken;\n\n // And save it to disk (will automatically create the file for us)\n file_put_contents(DATA_FILE, json_encode($data));\n }", "public function saveAccessToken($accessToken)\n {\n // This should write more than one byte as such any falsey value is a problem\n if (file_put_contents('./wpOauthToken', serialize($accessToken))) {\n return true;\n }else{\n return false;\n }\n }", "public function saveAccessToken($accessToken)\n {\n session()->put('drive-access-token', $accessToken);\n }", "public function saveAccessTokenToDB($accessToken);", "function write_new_token($tokenId)\n{\n global $tokenFile;\n global $tokenFilePath;\n\n // write new tokenId to tokens file\n $tokenFile->tokenId = $tokenId;\n\n //Format XML to save indented tree rather than one line\n $dom = new DOMDocument('1.0');\n $dom->preserveWhiteSpace = false;\n $dom->formatOutput = true;\n $dom->loadXML($tokenFile->asXML());\n $dom->save($tokenFilePath);\n}", "function getToken(): string {\n //return $this->_c['inseeToken'];\n if ($this->inseeToken)\n return $this->inseeToken;\n if (($contents = @file_get_contents(__DIR__.'/inseetoken.json')) === false) {\n $this->inseeToken = $this->generateToken(); // génération d'un nouveau token\n return $this->inseeToken;\n }\n $contents = json_decode($contents, true);\n \n $mtime = filemtime(__DIR__.'/inseetoken.json');\n //echo \"fichier modifié le \",date(DATE_ATOM, $mtime),\"<br>\\n\";\n //echo \"fichier modififié il y a \",time()-$mtime,\" secondes<br>\\n\";\n if (time() - $mtime < $contents['expires_in'] - 3600) { // vérification que le token est encore valide\n if (!isset($contents['access_token']))\n throw new Exception(\"Erreur access_token absent du fichier inseetoken.json\");\n $this->inseeToken = $contents['access_token'];\n }\n else {\n $this->inseeToken = $this->generateToken(); // génération d'un nouveau token\n }\n return $this->inseeToken;\n }", "protected function store_access_token($token) {\n global $SESSION;\n $SESSION->{self::SESSIONKEY} = $token;\n }", "public function storeAccessToken(AccessToken $token):static;", "private static function storeAccessToken(array $accessToken, string $credentialsPath): void\n {\n // Store the credentials to disk.\n if (!file_exists(dirname($credentialsPath))) {\n mkdir(dirname($credentialsPath), 0700, true);\n }\n file_put_contents($credentialsPath, json_encode($accessToken));\n }", "private function StoreAccessToken($access_token)\n\t{\n\t\t$_SESSION['OAUTH']['OAUTH_ACCESS_TOKEN'][$this->access_token_url] = $access_token;\n\t}", "private function fetchAccessToken()\n\t{\n\t\tif (file_exists($this->refreshToken))\n\t\t{\n\t\t\t$parameters = array(\n\t\t\t\t'refresh_token' => file_get_contents($this->refreshToken),\n\t\t\t\t'client_id' => $this->googleClientId,\n\t\t\t\t'client_secret' => $this->googleClientSecret,\n\t\t\t\t'grant_type' => 'refresh_token'\n\t\t\t);\n\n\t\t\t$response = $this->makeRequest($parameters);\n\n\t\t\tif (isset($response->access_token))\n\t\t\t{\n\n\t\t\t\tfile_put_contents($this->accessToken, $response->access_token);\n\t\t\t}\n\t\t}\n\t}", "function saveToken($token) {\r\n\t\t$_SESSION['token'] = $token;\r\n\t}", "function ReadTokenFile()\n {\n if ($this->getTokenUsePickupFile()) {\n $fname = $this->getTokenPickupFile();\n $fh = fopen($fname, \"r\");\n $this->_props['RequestToken'] = trim(fread($fh, filesize($fname)));\n fclose($fh);\n }\n }", "function fbComments_storeAccessToken() {\n\tfbComments_log('In ' . __FUNCTION__ . '()');\n\tglobal $fbc_options;\n\n\tif (!$fbc_options['accessToken']) {\n\t\t$accessToken = fbComments_getUrl(\"https://graph.facebook.com/oauth/access_token?type=client_cred&client_id={$fbc_options['appId']}&client_secret={$fbc_options['appSecret']}\");\n\t\tfbComments_log(\" got an access token of [$accessToken]\");\n\t\tif (strpos($accessToken,'<div class=\"error\">') == 0) { $accessToken = substr($accessToken, 13); }\n\t\telse { echo '<hr />didnt find accesstoken line 161 comments-core<hr />'; $accessToken = ''; }\n\t\tif ($accessToken != '') {\n\t\t\tfbComments_log(\" Storing an access token of $accessToken\");\n\t\t\t$fbc_options['accessToken'] = $accessToken;\n\t\t\tupdate_option('fbComments', $fbc_options);\n\t\t} else {\n\t\t\tfbComments_log(' FAILED to obtain an access token');\n\t\t}\n\t}\n}", "public function addToTxtFile($auth_code);", "public function save()\n {\n $data = $this->read_file();\n\n if (( ! $data))\n {\n $data = array();\n }\n\n $data[$this->id] = array(\n 'id' => $this->id,\n 'email' => $this->email,\n 'firstname' => $this->firstname,\n 'lastname' => $this->lastname,\n 'password' => $this->password,\n 'token' => $this->token,\n 'logins' => $this->logins,\n );\n\n $this->write_file($data);\n }", "protected function createToken()\n {\n if ($this->client->getRefreshToken()) {\n $this->client->fetchAccessTokenWithRefreshToken($this->client->getRefreshToken());\n } else {\n // Request authorization from the user.\n $authUrl = $this->client->createAuthUrl();\n printf(\"Open the following link in your browser:\\n%s\\n\", $authUrl);\n print 'Enter verification code: ';\n $authCode = trim(fgets(STDIN));\n\n // Exchange authorization code for an access token.\n $accessToken = $this->client->fetchAccessTokenWithAuthCode($authCode);\n $this->client->setAccessToken($accessToken);\n\n // Check to see if there was an error.\n if (array_key_exists('error', $accessToken)) {\n throw new Exception(join(', ', $accessToken));\n }\n }\n // Save the token to a file.\n if (!file_exists(dirname($this->token))) {\n mkdir(dirname($this->token), 0700, true);\n }\n file_put_contents($this->token, json_encode($this->client->getAccessToken()));\n }", "private function getAccessToken(): string\n {\n try {\n $token = Storage::disk('local')->get(self::ALIGO_ACCESS_TOKEN_FILE);\n } catch (\\Exception $exception) {\n $token = null;\n }\n\n if (empty($token)) {\n try {\n $response = $this->call('/akv10/token/create/10/y');\n $data = json_decode((string) $response->getBody(), false);\n } catch (\\Throwable $exception) {\n throw CouldNotSendNotification::serviceRespondedWithAnError($exception);\n }\n Storage::disk('local')->put(self::ALIGO_ACCESS_TOKEN_FILE, $data->token);\n\n return $data->token;\n }\n\n return $token;\n }", "function create_token($filename = '.token')\n{\n try {\n $dir = VAR_FOLDER . DS;\n if (!file_exists($dir)) {\n mkdir($dir, 0755, true);\n }\n $file = fopen($dir . DS . $filename, \"w\");\n fwrite($file, bin2hex(random_bytes(32)) . \"\\n\");\n fclose($file);\n } catch (Exception $e) {\n throw new Exception($e->getMessage(), $e->getCode());\n }\n}", "private function save_refresh_token() {\n global $DB, $USER;\n\n $newdata = new stdClass();\n $newdata->refreshtokenid = $this->client->getRefreshToken();\n $newdata->gmail = $this->get_user_info()->email;\n\n if (!is_null($newdata->refreshtokenid) && !is_null($newdata->gmail)) {\n $rectoken = $DB->get_record('repository_gdrive_tokens', array ('userid' => $USER->id));\n if ($rectoken) {\n $newdata->id = $rectoken->id;\n if ($newdata->gmail === $rectoken->gmail) {\n unset($newdata->gmail);\n }\n $DB->update_record('repository_gdrive_tokens', $newdata);\n } else {\n $newdata->userid = $USER->id;\n $newdata->gmail_active = 1;\n $DB->insert_record('repository_gdrive_tokens', $newdata);\n }\n }\n\n $event = \\repository_googledrive\\event\\repository_gdrive_tokens_created::create_from_userid($USER->id);\n $event->trigger();\n }", "function login_details(){\n $filename = '../logs/logs.txt';\n $format = \"%m/%d/%Y %H:%M \";\n $time = strftime($format, filectime($filename));\n $name = isset($_POST['username'])?$_POST['username']:'null';\n $string = strtolower($name).' Logged in at '.$time. \"\\n\";\n file_put_contents($filename, $string, FILE_APPEND | LOCK_EX);\n}", "abstract public function url_access_token();", "public function generateAccessToken()\n {\n $this->access_token = Yii::$app->security->generateRandomString() . '_' . time();\n }", "public function testBasicTest()\r\n {\r\n $client = new LoginClient();\r\n\r\n $result = $client->getToken('您的帳號', '您的密碼');\r\n\r\n// echo $result['access_token'];\r\n if (!empty($result['access_token'])) {\r\n // save token to local\r\n file_put_contents(\"token.txt\", $result['access_token']);\r\n }\r\n var_dump($result);\r\n }", "protected function access_token() {\r\n\r\n\t\t$this->tmhOAuth->config['user_token'] = $_SESSION['oauth']['oauth_token'];\r\n\t\t$this->tmhOAuth->config['user_secret'] = $_SESSION['oauth']['oauth_token_secret'];\r\n\r\n\t\t$code = $this->tmhOAuth->request(\r\n\t\t\t'POST',\r\n\t\t\t$this->tmhOAuth->url('oauth/access_token', ''),\r\n\t\t\tarray(\r\n\t\t\t\t'oauth_verifier' => $_REQUEST['oauth_verifier']\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\tif ($code == 200) {\r\n\t\t\t$token = $this->tmhOAuth->extract_params($this->tmhOAuth->response['response']);\r\n\t\t\t$this->conf->TwitterOAuthToken = $token['oauth_token'];\r\n\t\t\t$this->conf->TwitterOAuthSecret = $token['oauth_token_secret'];\r\n\t\t\t$this->conf->TwitterUsername = $token['screen_name'];\r\n\t\t\t$this->conf->write();\r\n\t\t\tunset($_SESSION['oauth']);\r\n\t\t\theader('Location: ' . SocialHelper::php_self());\r\n\t\t} else {\r\n\t\t\t$this->addError();\r\n\t\t}\r\n\t}", "public function save_access_token($api_id, $token_name, $hash) {\n\t\t$data = array(\n\t\t\t'api_id' => sanitize_text_field($api_id),\n\t\t\t'token_name' => sanitize_text_field($token_name),\n\t\t\t'hash' => sanitize_text_field($hash),\n\t\t\t);\n\n\t\t// check if token already exists\n\t\t$tokens = $this->get_access_tokens();\n\n\t\t$key = false;\n\t\tif (count($tokens)) {\n\t\t\t$ids = wp_list_pluck($tokens, 'hash');\n\t\t\t$key = array_search($hash, $ids);\n\t\t}\n\n\t\t// this is a new token\n\t\tif ($key === false) {\n\t\t\t$tokens[] = $data;\n\t\t}\n\t\t// this is an existing token\n\t\telse {\n\t\t\t$tokens[$key] = $data;\n\t\t}\n\n\t\t// re-index array and update key in user meta storage\n\t\tupdate_user_meta($this->user->ID, self::META_TYK_ACCESS_TOKENS_KEY, array_values($tokens));\n\t}", "function SaveInfo()\r\n\t{\r\n\t\t//Access is not stored in files, just directories.\r\n\t\tif (is_file($this->path)) unset($this->info['access']);\r\n\t\t$info = $this->dir.'/.'.$this->filename;\r\n\t\t$fp = fopen($info, 'w+');\r\n\t\tfwrite($fp, serialize($this->info));\r\n\t\tfclose($fp);\r\n\t}", "public function setaccess_token($value);", "function saveToken (string $token = '', string $id = 'default') : void {\n\t$user = getUserObject($id);\n\tif(!$user){\n\t\treturn;\n\t}\n\t$tokenProvided = true;\n\tif($token === ''){\n\t\t$token = md5(uniqid());\n\t\tfor($i = 0; $i < getConfig(\"LOGIN_TOKEN_32_CHAR_CHUNKS\") - 1; $i++){\n\t\t\t$token .= md5($token.uniqid());\n\t\t}\n\t\t$token .= md5($token);\n\t\t$tokenProvided = false;\n\t}\n\t$expiration = new DateTime('now');\n\t$expiration = $expiration->add(new DateInterval(\"PT\".getConfig(\"LOGIN_TOKEN_EXPIRATION_HOURS\").\"H\"));\n\tif($tokenProvided){\n\t\texecuteQuery(\n\t\t\t_BASE_DB_HOOK,\n\t\t\t'UPDATE user_token SET expiration = DATE_ADD(CURDATE(), INTERVAL '.getConfig(\"LOGIN_TOKEN_EXPIRATION_HOURS\").' HOUR) WHERE token = ?;',\n\t\t\t[['s' => $token]]\n\t\t);\n\t}else{\n\t\texecuteQuery(\n\t\t\t_BASE_DB_HOOK,\n\t\t\t'INSERT INTO user_token VALUES (NULL, ?, ?, ?)',\n\t\t\t[\n\t\t\t\t['i' => $user['id']],\n\t\t\t\t['s' => $token],\n\t\t\t\t['s' => $expiration->format('Y-m-d')]\n\t\t\t]\n\t\t);\n\t}\n\n\tsetcookie(getConfig(\"SITE_TITLE\").'-logintoken', $token, time() + (3600 * getConfig(\"LOGIN_TOKEN_EXPIRATION_HOURS\")), '/');\n}", "public function getAccessToken(): string\n {\n return $this->accessToken;\n }", "public function generateAccessToken()\n\t{\n\t\t$this->access_token = Yii::$app->security->generateRandomString();\n\t}", "public function postToken()\n {\n // include our OAuth2 Server object\n require_once __DIR__.'/server.php';\n\n $request = OAuth2\\Request::createFromGlobals();\n\n // Handle a request for an OAuth2.0 Access Token and send the response to the client\n $server->handleTokenRequest(OAuth2\\Request::createFromGlobals())->send();\n \n }", "public function saveToFile($filePath)\n {\n return KeyFactory::save($this->secret_key, $filePath);\n }", "protected function saveAccessToken(OAuthToken $token)\n\t{\n\t\treturn $this->setState('token', $token);\n\t}", "public function getToken()\n {\n $accessToken = null;\n if (file_exists($_SERVER['DOCUMENT_ROOT'].$this->tokenFile)) {\n $accessToken = unserialize(file_get_contents($_SERVER['DOCUMENT_ROOT'].$this->tokenFile));\n }\n\n return json_decode($accessToken);\n }", "private function saveCredentials($credentials)\n {\n $ttl = (int) $credentials->expires_in - 120;\n\n $this->engine->cache->put(static::AC_TOKEN, $credentials->access_token, $ttl);\n }", "public function retrieveAccessToken() {\n\n $helper = Api::getInstance();\n $helper->retrieveAccessToken();\n\n $this->output()->writeln('Done');\n }", "public function save_user_log($filename) {\r\n\t\tfile_put_contents($this->path_user.$filename, json_encode($this->request));\t\t\t\r\n\t}", "public function createToken();", "public function generateAccessToken()\n {\n return Yii::$app->security->generateRandomString();\n }", "public function setToken()\n {\n if (session()->has('drive-access-token')) {\n $accessToken = session()->get('drive-access-token');\n $this->setAccessToken($accessToken);\n if ($this->isAccessTokenExpired()) {\n $accessToken = $this->fetchAccessTokenWithRefreshToken($this->getRefreshToken());\n session()->put('drive-access-token', $accessToken);\n }\n }\n }", "function writeToFile($handle, $cleanData){\n $username = htmlentities($cleanData['username']);\n $password = htmlentities($cleanData['password']);\n $title = htmlentities($cleanData['title']);\n $firstname = htmlentities($cleanData['firstname']);\n $surname = htmlentities($cleanData['surname']);\n $email = htmlentities($cleanData['email']);\n /* The verification process ensured that none of the inputs can contain commas, so they are an effective delimiter */\n $text = $username.','.$password.','. $title .','. $firstname.','. $surname.','. $email.PHP_EOL;\n fwrite( $handle , $text ) ;\n}", "public function getAccessToken()\n {\n return json_encode($this->accessToken);\n }", "private function writeCookieFileCache()\n {\n $timeLive = Carbon::now()->addMinutes(480);\n Cache::put('AuthApiBpmCookie', $this->cookies, $timeLive);\n Log::info('Получены новые куки'.$this->cookies);\n }", "public function generateAccessToken()\n {\n $this->verification_token = Yii::$app->security->generateRandomString($length = 16);\n }", "public function saveStorage($file){\n\t\t$ser_storage = serialize($this->user);\n\t\tfile_put_contents($file, $ser_storage) or die(\"save: unable to open File\");\t\t\n\t}", "private static function generate_access_token()\n {\n $url = 'https://' . env('MPESA_SUBDOMAIN') . '.safaricom.co.ke/oauth/v1/generate?grant_type=client_credentials';\n\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n $credentials = base64_encode(env('MPESA_CONSUMER_KEY') . ':' . env('MPESA_CONSUMER_SECRET'));\n curl_setopt($curl, CURLOPT_HTTPHEADER, array('Authorization: Basic ' . $credentials)); //setting a custom header\n curl_setopt($curl, CURLOPT_HEADER, false);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);\n\n $curl_response = curl_exec($curl);\n\n return json_decode($curl_response)->access_token;\n }", "public function save()\n {\n $this->readCache();\n\n file_put_contents($this->filePath, json_encode($this->cacheContents));\n }", "private function __get_access_token() {\r\n // Access token exists in a cookie\r\n if($_COOKIE[ACCESS_TOKEN_COOKIE_NAME]) {\r\n parse_str($_COOKIE[ACCESS_TOKEN_COOKIE_NAME], $tok); \r\n return $tok;\r\n }\r\n\r\n // Handling a redirect back from login\r\n else if($_COOKIE[REQUEST_TOKEN_COOKIE_NAME] && $_REQUEST['oauth_verifier'] && $_REQUEST['oauth_token']) {\r\n $tok = YMClient::oauth_token_from_query_string($_COOKIE[REQUEST_TOKEN_COOKIE_NAME]);\r\n\r\n if($tok['oauth_token'] != $_REQUEST['oauth_token']) {\r\n throw new Exception(\"Cookie and URL disagree about request token value\");\r\n }\r\n\r\n $tok['oauth_verifier'] = $_REQUEST['oauth_verifier']; \r\n $newtok = $this->ymc->oauth_get_access_token($tok);\r\n\r\n setcookie(REQUEST_TOKEN_COOKIE_NAME, \"\", time()-3600);\r\n setcookie(ACCESS_TOKEN_COOKIE_NAME, YMClient::oauth_token_to_query_string($newtok));\r\n return $newtok;\r\n }\r\n\r\n // Sending the user to login to grant access to this app\r\n else {\r\n list ($tok, $url) = $this->ymc->oauth_get_request_token($this->callbackURL);\r\n setcookie(REQUEST_TOKEN_COOKIE_NAME, YMClient::oauth_token_to_query_string($tok));\r\n header(\"Location: $url\");\r\n }\r\n }", "public function access_token() {\n\t\ttry {\n\t\t\tif ($this->request->is('post')) {\n\t\t\t\t$this->OAuth2Lib->grantAccessToken();\n\t\t\t}\n\t\t} catch(Exception $e) {\n\t\t\t$this->fail($e);\n\t\t}\n\t}", "public function getAccessToken();", "public function getAccessToken();", "public function getAccessToken();", "public function getAccessToken();", "public function getAccessToken();", "public function savePasswdFile($htpasswd = null)\n {\n if (is_null($htpasswd)) {\n $htpasswd = $this->htpasswdFile;\n }\n $handle = fopen($this->htpasswdFile, \"w\");\n if ($handle) {\n foreach ($this->users as $name => $passwd) {\n if (!empty($name) && !empty($passwd)) {\n fwrite($handle, \"{$name}:{$passwd}\\n\");\n }\n }\n fclose($handle);\n }\n }", "public function save()\n {\n file_put_contents(\"address.json\", json_encode($this->content));\n }", "function save($filePath);", "public function run()\n {\n $accessToken = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIzMjkiLCJqdGkiOiI5NDdjODdlMWI0MTU1N2Q1NzRiMmIzOTgzM2ViZWJjZWY3NjZmZTA3Yjc5NjllYTI3NTc1NTgwNTYzNTBlOGUyMjBlMDhhZTA0ZjhlYzM3MyIsImlhdCI6MTYyNTI0MjM0MywibmJmIjoxNjI1MjQyMzQzLCJleHAiOjE2NTY3NzgzNDMsInN1YiI6IjE0NjEiLCJzY29wZXMiOltdfQ.RjIAPcd6oSptTTKM0HhDIp8vA_xqhI5iccoxw1whZRvCzYHVii-WHiHU3JwRQDtJXKzRheqqcioUKkpoHH2SZQ1biWX0S5mqmunITFLoIHXhi61YYp4ctvlfvxud-9EGeQ4agqLazGDwxgCAwbo5dJRhvSX_SLcq0XLIdHU-_WqYXyb1Cy7vejsfR2Tx26vDqKsneHOiOTji7RT8TRg0Ej222WivgfBfcB-FzKPlFoKp6kYoSeLBvd5hZLERzFjfeWDVd38S4zxTFoSZH6Sg-WqZ5s3472CJ36_zWsh3R3Ebu0S7s-0uriCkdrVlzNY1xZABkVAedd-JyNgmKgA-zVb4AsNUXOqKJ-S7Nn3uVZmdbBWYjMPJBomsjt3xSSP4zq3-aJGJabG-GMvzWSGMxBDQeYlzFy_B3JLK0ZWaWLFN8eLJsHuHhF2zjypcPZkOajuQvrXNSFgm69_x57SSveM0eFkcbcvYzfHDcw6EvBrwPcvGE9RDajqBz3_So57WJRx2P_S7DJm64O_1m53AsmJz34MQxwCcDSUc7ZKwEX8mRRcu2RjWWoCLvOtA3mWx7v8nuREKXweBeHgSoPwXAJLIlsLT0yWVT603mseTVZ1MDSdtr46demlr_FGwqsKHyu5Fz54SBMpUEsqD3qIkFDT4VMc6Ge8v3ll_WVRui3M';\n\n $client = new ClientGuzzle([\n 'headers' => [\n 'Accept' => 'application/json',\n 'Authorization' => 'Bearer '.$accessToken,\n 'Content-Type' => 'application/json'\n ],\n ]);\n\n $response = $client->get('https://www.lioren.cl/api/ciudades');\n $responseBody = json_decode((string) $response->getBody(), true);\n foreach($responseBody as $ciudad){\n Ciudad::create([\n 'nombre' => $ciudad['nombre'],\n 'codigo' => $ciudad['id'],\n ]);\n }\n }", "public function facebookStoreToken() {\n if ( ! empty( $_GET['access_token'] ) ) {\n $this->instagramCode = $_GET['access_token'];\n update_option( self::FACEBOOK_TOKEN, $_GET['access_token'] );\n }\n }", "public function testExportToken()\n {\n $response = $this->actingAsTestingUser()\n ->withEncryptionKey()\n ->get(route('tokens.export', [$this->token->path]));\n\n $response->assertStatus(200);\n $response->assertViewIs('tokens.export');\n }", "private function saveAccessTokenDataToSession($accessTokenData){\n\t\t$tokenDataForSession = array(\n\t\t\t\"twitter_oauth_access_token\"\t=>\t$accessTokenData[\"oauth_token\"],\n\t\t\t\"twitter_oauth_access_token_secret\"\t=>\t$accessTokenData[\"oauth_token_secret\"]\n\t\t);\n\n\t\t$this->CI->session->set_userdata($tokenDataForSession);\n\t}", "public static function createAccessToken(){\r\n\t\t$token = new AccessToken(substr(sha1(microtime()), 0, 30));\r\n\t\treturn $token;\r\n\t}", "public function generateToken();", "public function saveRefreshToken($refreshToken);", "private function getToken($payload) {\n // Gets the acces token following the OAuth workflow\n // https://developer.spotify.com/documentation/general/guides/authorization-guide/#authorization-code-flow\n\n // The header needs to be set to our clientId and clientSecret\n $headers = array('Authorization: Basic ' . base64_encode($this->clientId.':'.$this->clientSecret));\n\n $ch = curl_init('https://accounts.spotify.com/api/token');\n // It's a POST request\n curl_setopt($ch, CURLOPT_POST, 1);\n // The provided payload\n curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);\n // The headers as defined above\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n // If false it would directly output it to the browser, we don't want that.\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n // Grab the data\n $data = curl_exec($ch);\n // Close the CURL request to free up server resources\n curl_close($ch);\n\n // If the data is not false we decode it and save it\n if ($data !== false) {\n $data = json_decode($data);\n\n // If there is an error we throw an exception which we capture to display the error\n if (isset($data->error)) {\n throw new Exception($data->error_description);\n }\n\n // Here we set the three fields.\n $this->accessToken = $data->access_token;\n // The expiration date is the current time + the expire time we got from spotify\n $this->expirationDate = time() + intval($data->expires_in);\n // The refresh_token is only provided on the authorization_code request, not in the refresh_token request\n // so we want to make sure we only set it if it is present.\n if (isset($data->refresh_token)) $this->refreshToken = $data->refresh_token;\n\n // Lastly we save it to disk\n $this->saveData();\n }\n }", "private function saveRobotsTxtAction()\n\t{\n\t\tinclude_once(ISC_BASE_PATH.'/lib/class.file.php');\n\t\t$fc = new FileClass();\n\t\t$content = $_POST['robotstxtFileContent'];\n\t\t$success = 'RobotsSaveSuccess';\n\n\t\tif (isset($_POST['robotstxtRevertButton'])) {\n\t\t\t// Revert button is clicked instead.\n\t\t\t$content = $this->defaultContent;\n\t\t\t$success = 'RobotsRevertSuccess';\n\t\t}\n\n\t\t$res = $fc->writeToFile($content, $this->filePath);\n\t\tif ($res == true) {\n\t\t\tFlashMessage(GetLang($success), MSG_SUCCESS, $this->mainUrl);\n\t\t} else {\n\t\t\tFlashMessage(GetLang('RobotsSaveError'), MSG_ERROR, $this->mainUrl);\n\t\t}\n\t}", "public function token() {\n\t\t$this->autoRender = false;\n\t\t$this->OAuth->setVariable('access_token_lifetime', 60);\n\t\ttry {\n\t\t\t$this->OAuth->grantAccessToken();\n\t\t} catch (OAuth2ServerException $e) {\n\t\t\t$e->sendHttpResponse();\n\t\t}\n\t}", "public function get_access_token()\n\t\t{\n\t\t\tif(isset($_COOKIE['bing_access_token']))\n\t\t\t\treturn $_COOKIE['bing_access_token'];\n\t\t\n\t\t\t// Get a 10-minute access token for Microsoft Translator API.\n\t\t\t$url = 'https://datamarket.accesscontrol.windows.net/v2/OAuth2-13';\n\t\t\t$postParams = 'grant_type=client_credentials&client_id='.urlencode($this->clientID).\n\t\t\t'&client_secret='.urlencode($this->clientSecret).'&scope=http://api.microsofttranslator.com';\n\t\t\t\n\t\t\t$ch = curl_init();\n\t\t\tcurl_setopt($ch, CURLOPT_URL, $url); \n\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $postParams);\n\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); \n\t\t\t$rsp = curl_exec($ch); \n\t\t\t$rsp = json_decode($rsp);\n\t\t\t$access_token = $rsp->access_token;\n\t\t\t\n\t\t\tsetcookie('bing_access_token', $access_token, $rsp->expires_in);\n\t\t\t\n\t\t\treturn $access_token;\n\t\t}", "private function saveMemberToFile($user) {\n $this->users[count($this->users)] = $user;\n $usersJSON = json_encode($this->users);\n if (file_put_contents(self::$storageFile, $usersJSON) == false) {\n throw new \\Exception(\"Could not save user\");\n \n }\n}", "public function token() {\r\n\t\t\r\n\t\t$response = $this->OAuth2->getAccessTokenData();\r\n\t\t\r\n\t\tif (empty($response)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$this->set($response);\r\n\t\t\r\n\t}", "function atkWriteToFile($text, $file=\"\")\n{\n\t$fp = @fopen($file, \"a\");\n\tif ($fp)\n\t{\n\t\tfwrite($fp, $text.\"\\n\");\n\t\tfclose($fp);\n\t}\n}", "public function _getAccessToken()\n {\n $this->setAccessToken($this->_getStoreConfig($this->path_access_token));\n }", "function create_account($uname, $pwd) {\n $account_info = \"{$uname}:{$pwd}\\n\";\n add_item_to_file(\"users.txt\", $account_info);\n }", "private function createAuthFile()\r\n {\r\n $directory = $this->filesystem->getDirectoryWrite(DirectoryList::COMPOSER_HOME);\r\n\r\n if (!$directory->isExist(PackagesAuth::PATH_TO_AUTH_FILE)) {\r\n try {\r\n $directory->writeFile(PackagesAuth::PATH_TO_AUTH_FILE, '{}');\r\n } catch (Exception $e) {\r\n throw new LocalizedException(__(\r\n 'Error in writing Auth file %1. Please check permissions for writing.',\r\n $directory->getAbsolutePath(PackagesAuth::PATH_TO_AUTH_FILE)\r\n ));\r\n }\r\n }\r\n }", "private function _get_access_token() {\n return $this->_http->request( \n 'POST', 'https://oauth.api.189.cn/emp/oauth2/v3/access_token',\n http_build_query( array(\n 'grant_type' => 'client_credentials',\n 'app_id' => C( 'SMS_189_KEY' ),\n 'app_secret' => C( 'SMS_189_SECRET' )\n ) ) );\n\n }", "public function token()\n {\n // echo 'pk';\n try {\n $this->heimdall->createToken();\n } catch (Exception $exception) {\n $this->heimdall->handleException($exception);\n }\n }", "public function actionToken()\n {\n\n $access_token = null;\n\n $message = array();\n\n if (\\Yii::$app->request->post()) {\n\n if (!\\Yii::$app->user->identity || !\\Yii::$app->user->identity || \\Yii::$app->user->isGuest) {\n\n $username = isset(\\Yii::$app->request->post()['username']) && \\Yii::$app->request->post()['username'] ? \\Yii::$app->request->post()['username'] : null;\n\n $password = isset(\\Yii::$app->request->post()['password']) && \\Yii::$app->request->post()['password'] ? \\Yii::$app->request->post()['password'] : null;\n\n if ($username && $password) {\n $user = User::findOne(['username' => $username, 'password_hash' => $password]);\n\n if ($user->validate()) {\n //log this user in if the identity is verified\n \\Yii::$app->user->login($user);\n\n $user->access_token = \\Yii::$app->security->generateRandomString();\n\n $user->auth_key = \"_8jwIF7Os8s_lLXNxYFW24fgfCg1x-2E\";\n\n $user->save();\n\n $message[] = $user;\n\n } else {\n //add error message\n $message[] = \"Wrong login credentials\";\n }\n\n } else {\n $message[] = \"Must provide username and password\";\n }\n } else {\n $message[] = \"you are already logged in\";\n }\n }\n\n\n return $message;\n\n }", "public function getAccessTokenString()\n {\n $request = $this->getRequest();\n $headers = $request->headers->all();\n\n return str_replace(\n 'Bearer ',\n '',\n $headers['authorization']\n );\n }", "private function writeCookieData($cookieHash) {\n $userId=$_SESSION['user_id'];\n $data = [\n \"user_id\" => $userId,\n \"last_activity\" => time(),\n \"bag\" => isset($_SESSION['bag']) ? $_SESSION['bag'] : []\n ];\n $cookieHash = preg_replace(\"/[^A-Za-z0-9]/\", '', $cookieHash);\n $cookieFile = $this->_cookiePath. $cookieHash . \".txt\"; \n file_put_contents($cookieFile, serialize($data));\n }", "function create_token()\n {\n $secretKey = \"B1sm1LLAH1rrohmaan1rroh11m\";\n\n // Generates a random string of ten digits\n $salt = mt_rand();\n\n // Computes the signature by hashing the salt with the secret key as the key\n $signature = hash_hmac('sha256', $salt, $secretKey, false);\n // $signature = hash('md5', $salt.$secretKey);\n\n // return $signature;\n return urlsafeB64Encode($signature);\n }", "function log_in(){\n $filename = '../logs/logs.txt';\n if ($handle = fopen($filename, 'r')){\n if (is_writeable($filename)){\n if ($handle = fopen($filename, 'a+')) {\n $format = $format = \"%m/%d/%Y %H:%M \";\n $time = strftime($format, fileatime($filename));\n $name = isset($_POST['username'])?$_POST['username']:'null';\n $string = $time . $name ;\n fwrite($handle, $string);\n fclose($handle);\n }\n\n }\n}\n}", "public function saveToFile($file)\n {\n \n }", "public function persistSessionToken() {}", "public function persistSessionToken() {}", "public function persistSessionToken() {}", "public function persistSessionToken() {}", "function get_access_token()\r\n {\r\n $script_location = $this->script_location.'Soundcloud_get_token.py';\r\n $params = $this->sc_client_id.\" \".$this->sc_secret.\" \".$this->sc_user.\" \".$this->sc_pass;\r\n //Execute python script and save results\r\n exec(\"python \\\"\".$script_location.\"\\\" \".$params, $result);\r\n return $result;\r\n }", "function assignToken($domain,$accesslevel) {\n\n}", "function accessTokenURL() { return 'https://www.dropbox.com/1/oauth/access_token'; }", "public function getApiResponseFile(){\n\t\treturn fopen(\"output/API Response Status.txt\",\"w\");\n\t}", "public function createNewToken()\n {\n return $this->getBandrek()->generateToken();\n }", "protected function save()\n {\n return file_put_contents($this->outputPath() . '/' . $this->outputFile(), $this->stub); \n }", "function save_response($response){\n $f = fopen('response.html', 'w');\n fwrite($f, $response);\n fclose($f);\n}", "public function coppyAndPasteCredentials($credentialsPath)\n {\n $authUrl = $this->client->createAuthUrl();\n printf(\"Open the following link in your browser:\\n%s\\n\", $authUrl);\n print 'Enter verification code: ';\n $pasteYourVerificationCodeHere = '';\n $authCode = trim($pasteYourVerificationCodeHere);\n $accessToken = $this->client->fetchAccessTokenWithAuthCode($authCode);\n\n // Store the credentials to disk, this credentials will expire in the set time\n if (!file_exists(dirname($credentialsPath))) {\n mkdir(dirname($credentialsPath), 0700, true);\n }\n file_put_contents($credentialsPath, json_encode($accessToken));\n return $accessToken;\n //printf(\"Credentials saved to %s\\n\", $credentialsPath);\n }", "private function getToken() {\n\t // CHECK API and get token\n\t\t$post = [\n\t\t\t'grant_type' => 'password',\n\t\t\t'scope' => 'ost_editor',\n\t\t\t'username' => 'webmapp',\n\t\t\t'password' => 'webmapp',\n\t\t\t'client_id' => 'f49353d7-6c84-41e7-afeb-4ddbd16e8cdf',\n\t\t\t'client_secret' => '123'\n\t\t];\n\n\t\t$ch = curl_init('https://api-intense.stage.sardegnaturismocloud.it/oauth/token');\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $post);\n\t\t$response = curl_exec($ch);\n\t\tcurl_close($ch);\n\n\t\t$j=json_decode($response,TRUE);\n\t\t$this->token=$j['access_token'];\n\t}", "protected function saveToFile($data, $file)\n {\n file_put_contents($file, \"<?php\\nreturn \".var_export($data, true).\";\\n\", LOCK_EX);\n }", "public function save($filename) {\r\n file_put_contents($filename, $this->contents);\r\n }" ]
[ "0.773946", "0.6335817", "0.6212518", "0.6045753", "0.5930729", "0.58840746", "0.58693653", "0.58662856", "0.58635217", "0.5844006", "0.58256173", "0.5773556", "0.5768012", "0.5749106", "0.57348484", "0.5732757", "0.5728807", "0.57190937", "0.5716746", "0.56892526", "0.56399244", "0.5632181", "0.55117357", "0.54210347", "0.53911895", "0.5378303", "0.5375917", "0.5368671", "0.5367459", "0.5324414", "0.53223556", "0.53185016", "0.53146386", "0.53086954", "0.5293514", "0.524026", "0.52363974", "0.52363557", "0.5221035", "0.522064", "0.5210706", "0.519645", "0.51617825", "0.5161522", "0.5138495", "0.51361763", "0.5105762", "0.5104905", "0.5079539", "0.5067498", "0.50557476", "0.50532484", "0.505255", "0.505255", "0.505255", "0.505255", "0.505255", "0.50510657", "0.50436836", "0.50374174", "0.5014907", "0.5007729", "0.50006354", "0.4996306", "0.49946266", "0.49940282", "0.49889594", "0.4987468", "0.49791706", "0.49743044", "0.49734262", "0.49727246", "0.49682575", "0.49660432", "0.49635428", "0.4963042", "0.49580956", "0.49508625", "0.49472073", "0.49437696", "0.4943415", "0.49415123", "0.49374995", "0.49346718", "0.49324748", "0.49260995", "0.49260995", "0.49260995", "0.49260995", "0.4924654", "0.49240047", "0.49228716", "0.4922782", "0.49177125", "0.49169064", "0.4914238", "0.49138242", "0.4913121", "0.49067488", "0.49062812" ]
0.7467016
1
Provides you the available banner links. To obtain specific banner links, you can filter this request using these parameters: MID, Category, Size, Start Date, and End Date.
Предоставляет доступ к имеющимся баннерным ссылкам. Чтобы получить конкретные баннерные ссылки, вы можете отфильтровать этот запрос с помощью следующих параметров: MID, Категория, Размер, Начальная дата и Конечная дата.
public function bannerLinks( $merchantId = -1, $categoryId = -1, $startDate = null, $endDate = null, $size = -1, $campaignId = -1, $page = 1 ) { $startD = (isset($startDate)) ? str_replace('-', '', $startDate) : null; $endD = (isset($endDate)) ? str_replace('-', '', $endDate) : null; $this->setParameter(0, $merchantId); $this->setParameter(1, $categoryId); $this->setParameter(2, $startD); $this->setParameter(3, $endD); $this->setParameter(4, $size); $this->setParameter(5, $campaignId); $this->setParameter(6, $page); $this->setHeader(self::HEADER_TYPE_BEARER); $this->setLink(self::BANNER_LINKS.'/'.$this->getParameter()); $curl = new Curl; $response = $curl->get($this->getLink(), '', $this->getHeader()); $xmlData = new SimpleXMLElement(XMLHelper::tidy($response)); return $xmlData; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLinksList()\n {\n $sql = 'SELECT bwl.*, bwll.`title`, bwll.`url`\n FROM `'._DB_PREFIX_.'bwcatbanner_link` bwl\n LEFT JOIN `'._DB_PREFIX_.'bwcatbanner_link_lang` bwll\n ON (bwl.`id_item` = bwll.`id_item`)\n WHERE bwl.`id_shop` = '.(int)Context::getContext()->shop->id.'\n AND bwll.`id_lang` = '.(int)Context::getContext()->language->id;\n\n return Db::getInstance()->executeS($sql);\n }", "function getbanners()\n\t\t{\n\t\t\t$banners = $this->manage_content->getValue('banner_info','*');\n\t\t\techo '<div id=\"add_space\">';\n\t\t\tforeach($banners as $banner)\n\t\t\t{\n\t\t\t\tif($banner['banner_status'] == 1)\n\t\t\t\t{\n\t\t\t\t\techo '<a href=\"'.$banner['banner_link'].'\">';\n\t\t\t\t\techo '<div class=\"add_section\"><img src=\"images/'.$banner['banner_image'].'\" style=\"height:'.$banner['banner_height'].'px;width:'.$banner['banner_width'].'px;float:left;\"/></div></a>';\n\t\t\t\t}\n\t\t\t}\n\t\t\techo '</div>';\n\t\t}", "public static function GetBanners()\n\t{\n\t\t$output = '';\n\t\t\n\t\t$sql = 'SELECT\n\t\t\t\t\tb.id, b.image_file, b.link_url, b.priority_order,\n\t\t\t\t\tbd.image_text\n\t\t\t\tFROM '.TABLE_BANNERS.' b\n\t\t\t\t\tLEFT OUTER JOIN '.TABLE_BANNERS_DESCRIPTION.' bd ON b.id = bd.banner_id\n\t\t\t\tWHERE b.is_active = 1 AND b.image_file != \\'\\' AND bd.language_id = \\''.encode_text(Application::Get('lang')).'\\' \n\t\t\t\tORDER BY RAND() ASC';\n\t\t$result = database_query($sql, DATA_AND_ROWS, FIRST_ROW_ONLY);\n\t\tif($result[1] > 0){\n\t\t\t$image = '<img src=\"'.APPHP_BASE.'images/banners/'.$result[0]['image_file'].'\" width=\"723px\" height=\"140px\" alt=\"banner\" />';\t\n\t\t\tif($result[0]['link_url'] != '' && $result[0]['link_url'] != 'http://'){\n\t\t\t\t$output .= '<a href=\"'.$result[0]['link_url'].'\" title=\"'.$result[0]['image_text'].'\">'.$image.'</a>';\n\t\t\t}else{\n\t\t\t\t$output .= $image;\n\t\t\t}\t\t\t\n\t\t}\n\t return $output;\n\t}", "public function get_links()\n {\n }", "public function listing($stat='',$start=0)\n\t{\n\t\t\n\t\t\n\n\t\t/*-------------------------------------------------------------\n\t\t \tBreadcrumb Setup Start\n\t\t -------------------------------------------------------------*/\t\t\n\t\t$link = breadcrumb();\t\t\n\t\t$data['breadcrumb'] = $link;\n /*-------------------------------------------------------------\n\t\t \tBanner Based on Campaign Id\n\t\t -------------------------------------------------------------*/\n $data['sel_camp'] = 0;\n $data['sel_stat'] = $stat;\n\t\t/*--------------------------------------------------------------\n\t\t \tPagination Config Setup\n\t\t ---------------------------------------------------------------*/\n\t\t \n\t\t$limit = $this->page_limit;\t\n if($stat=='active')\n {\n $status = 0;\n $where_arr = array('ox_banners.status'=>$status); \n}\n elseif($stat=='inactive')\n {\n $status = 1;\n $where_arr = array('ox_banners.status'=>$status);\n\t\t\t\n }\n else\n {\n $stat = 'all';\n $where_arr = array();\n }\n \n \n\t\t$list_data = $this->mod_banner->get_banners($where_arr);\n\t\t\n\t\t//echo $this->db->last_query();exit;\n\t\t\n\t\t/*--------------------------------------------------------------------------\n \t* Get Reports for each banners based on selected Campaigns and Advertiser\n \t* -------------------------------------------------------------------------*/\n\n\n\t\t$search_arr = array();\n\t\t$search_arr['from_date'] =\t$this->mod_statistics->get_start_date();\n\t\t$search_arr['to_date'] =\tdate(\"Y/m/d\");\n\t\t$search_arr['search_type'] =\t\"all\";\n\t\t\n\t\t$data['stat_data'] = $this->mod_statistics->get_statistics_for_banners($search_arr);\n\t\t\n\t\t/* Total Banners Count */\t\n\t\t/*$data['tot_list'] = $list_data;\n\t\t\t\t\n\t\t$config['per_page'] \t= $limit;\n\t\t$config['base_url'] \t= site_url(\"admin/inventory_banners/listing/\".$stat);\n $config['uri_segment'] \t= 5; \n\t\t$config['total_rows'] \t= count($list_data);\n\t\t$config['next_link'] \t= $this->lang->line(\"pagination_next_link\");\n\t\t$config['prev_link'] \t= $this->lang->line(\"pagination_prev_link\");\t\t\n\t\t$config['last_link'] \t= $this->lang->line(\"pagination_last_link\");\t\t\n\t\t$config['first_link'] \t= $this->lang->line(\"pagination_first_link\");\n\t\t$this->pagination->initialize($config);*/\t\t\n\t\t$page_data = $this->mod_banner->get_banners($where_arr);\n\t\t$data['banner_list']\t=\t$page_data;\n\t\t\t\t\t\n\t\t/*-------------------------------------------------------------\n\t\t \tPage Title showed at the content section of page\n\t\t -------------------------------------------------------------*/\n\t\t$data['page_title'] \t= $this->lang->line('label_inventory_banner_page_title');\t\t\n\t\t\n\t\t/*-------------------------------------------------------------\n\t\t \tTotal Counts for Active and Inactive Banners\n\t\t--------------------------------------------------------------*/ \n\t\t \n $where_tot = array();\n $where_act = array('ox_banners.status'=>0);\n\t\t$where_inact = array('ox_banners.status'=>1);\n\t\t\n\t\t\n\t\t$tot_data = $this->mod_banner->get_banners($where_tot);\n\t\tif($tot_data!=FALSE)\n\t\t{\n\t\t\t$data['tot_data'] = count($tot_data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['tot_data'] = 0;\n\t\t}\n\t\t\n\t\t$active_data = $this->mod_banner->get_banners($where_act);\n\t\tif($active_data!=FALSE)\n\t\t{\n\t\t\t$data['active_data'] = count($active_data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['active_data'] = 0;\n\t\t}\n\t\t\n\t\t$inactive_data = $this->mod_banner->get_banners($where_inact);\n\n\t\tif($inactive_data!=FALSE)\n\t\t{\n\t\t\t$data['inactive_data'] = count($inactive_data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['inactive_data'] = 0;\n\t\t}\n\t\t\n\n\t\t/*-------------------------------------------------------------\n\t\t \tEmbed current page content into template layout\n\t\t -------------------------------------------------------------*/\n\t\t$data['page_content']\t= $this->load->view(\"admin/banners/list\",$data,true);\n\t\t$this->load->view('page_layout',$data);\n\t\n\t}", "public function getLinkInfo()\n {\n return array(\n 'PageURL' => $this->curlInfo['url'],\n 'page_title' => $this->getPageTitle(),\n 'description' => trim((isset($this->collected['metaData']['description'])) ? $this->collected['metaData']['description'] : Standards::$default),\n 'content_language' => $this->getLanguage(),\n 'external_links' => $this->countLinks('external'),\n 'internal_links' => $this->countLinks('internal'),\n 'no_follow_links' => $this->countLinks('no-follow'),\n 'follow_links' => ($this->countLinks('external') + $this->countLinks('internal') - $this->countLinks('no-follow')),\n 'h1' => $this->collected['headingsCount']['h1'],\n 'h2' => $this->collected['headingsCount']['h2'],\n 'h3' => $this->collected['headingsCount']['h3'],\n 'h4' => $this->collected['headingsCount']['h4'],\n 'h5' => $this->collected['headingsCount']['h5'],\n 'h6' => $this->collected['headingsCount']['h6'],\n 'http_code' => $this->curlInfo['http_code'],\n 'charset' => $this->getCharset(),\n 'server_config' => implode(';', $this->getServerConfig()),\n\n // fetched by others:\n # 'load_time' => Standards::$default,\n # 'page_weight' => Standards::$default,\n # 'indexed_bing' => Standards::$default,\n # 'indexed_google' => Standards::$default,\n );\n }", "public function getLinksList(){\n return $this->_get(9);\n }", "public function getLinks()\n\t{\n\t\t$data = $this->curl->curlGetReq($this->baseURL);\n\t\t$query = \"//a/@href\";\n\t\t$links = $this->curl->getDOMData($data,$query);\n\t\t\n\n\t\t//var_dump($links[0]);\n\n\t\tforeach ($links as $link)\n\t\t{\n\t\t\t\n\t\t\tif($link->value == \"/calendar\")\n\t\t\t{\n\t\t\t\t$this->calendarLink = $this->baseURL. str_replace(\"/\", \"\", $link->value).\"/\";\n\t\t\t\t\n\t\t\t}\n\t\t\tif($link->value == \"/cinema\")\n\t\t\t{\n\t\t\t\t$this->cinemaLink = $this->baseURL. str_replace(\"/\", \"\", $link->value).\"/\";\n\t\t\t}\n\t\t\tif($link->value == \"/dinner\")\n\t\t\t{\n\t\t\t\t$this->dinnerLink = $this->baseURL. str_replace(\"/\", \"\", $link->value).\"/\";\n\t\t\t\t$this->dinnerLoginLink = $this->dinnerLink.\"login\";\n\t\t\t}\n\n\t\t\n\t\t\n\t\t}\n\t}", "function get_links($category = -1, $before = '', $after = '<br />', $between = ' ', $show_images = \\true, $orderby = 'name', $show_description = \\true, $show_rating = \\false, $limit = -1, $show_updated = 1, $display = \\true)\n {\n }", "public function get_allBanners($where_banner)\t\n\t{\n\t\t$query = $this->db->get_where('announcement',$where_banner);\n\n\t\t$result = $query->result_array();\n\n\t\tif(!empty($result))\n\t\t{\n\t\t\treturn $result;\n\t\t}\n\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t}", "public function getLinks()\n {\n $url = Yii::$app->getRequest()->getAbsoluteUrl();\n // change $url_cut_point if you have more prefix in the url of restful api\n $url_cut_point = 5;\n $url_slice = array_slice(preg_split(\"#[?/]#\", $url), 0, $url_cut_point);\n $link = implode('/', $url_slice).'/'.$this->id;\n\n return [ Link::REL_SELF => $link ];\n }", "public function index()\n {\n return $this->bannerService->index();\n }", "public function get_banners($offset = 0, $limit = LIST_LIMIT) {\n $this->db->limit($limit, $offset);\n $query = $this->db->get('banners');\n return $query->result_array();\n }", "public function getListBanner()\n {\n\n $BannerModel = new Banner();\n $Banners = $BannerModel->getListBanner();\n $this->data['newss'] = $Banners;\n\n return view('admin.banner_list', $this->data);\n }", "function getAllLinks(){\r\n return $this->link_arry;\r\n }", "public function getBanners($perPage = 20, array $filter = array(), array $sort = array(), $paginate = true);", "protected function getBannerItems()\n {\n $self = $this;\n\n return Cache::remember(\n 'home_banner_items',\n config('kosher.cache_expiration_time'),\n function () use ($self) {\n $recipes = Recipe::banner()->with('categories')->get();\n $articles = Article::banner()->published()->with('category')->get();\n $shows = Show::banner()->get();\n\n $banner = $recipes->merge($articles)\n ->merge($shows)\n ->shuffle()\n ->take(config('kosher.pagination.home_banner_items'));\n\n if (0 == $banner->count()) {\n $recipes = Recipe::featured()->with('categories')->get();\n $articles = Article::featured()->published()->with('category')->get();\n $shows = Show::featured()->get();\n\n $banner = $recipes->merge($articles)\n ->merge($shows)\n ->shuffle()\n ->take(config('kosher.pagination.home_banner_items'));\n }\n\n if (0 == $banner->count()) {\n $banner = Recipe::published()\n ->with('categories')\n ->take(config('kosher.pagination.home_banner_items'))\n ->get();\n $self->mergeReceivedRecipes($banner);\n } else {\n $recipes = collect();\n foreach ($banner as $item) {\n if ($item->isRecipe()) {\n $recipes->push($item);\n }\n }\n $self->mergeReceivedRecipes($recipes);\n }\n\n return $banner;\n }\n );\n }", "public function index()\n {\n \n if(isset( $_GET['search']) && $_GET['search']!='' ){\n $searched= $_GET['search'];\n $banners=Banner::where('content', 'like',\"%{$searched}%\")\n ->latest()->paginate(2);\n \n }else{\n $banners=Banner::latest()->paginate(2);\n\n }\n return BannerResource::collection($banners);\n }", "public function getBannersArhived($searchText = NULL) {\n return $this->where('archive', 1)\n ->orderBy('id', 'DESC')\n ->paginate(10);\n }", "public function gp_qry_all_banner($website_id)\n {\n $sql = \"Select \n B.PK_BANNER\n ,B.C_DEFAULT\n ,B.C_FILE_NAME\n ,BC.FK_CATEGORY\n From t_ps_banner B\n Right Join t_ps_banner_category BC \n On BC.FK_BANNER=B.PK_BANNER\n Where B.FK_WEBSITE=$website_id\n And B.C_STATUS=1\n Order By C_DEFAULT Desc, BC.FK_CATEGORY Asc\";\n \n return $this->db->GetAll($sql);\n }", "public function index()\n {\n $imageNameDB = DB::table('banners')->where('banner_id', 17)->select('link')->get()[0]->link;\n return response()->json($imageNameDB);\n }", "public function banners()\n {\n $banners = DB::table('banners')->latest('created_at')->limit(5)->get();\n\n return response()->json($banners);\n }", "function getDynamicAds()\n\t\t{\n\t\t\t$dynamicBanner_1 = $this->manage_content->getValue_where('banner_info','banner_image','id',5);\n\t\t\t$dynamicBanner_2 = $this->manage_content->getValue_where('banner_info','banner_image','id',6);\n\t\t\t//print_r($dynamicBanner[0]['banner_image']);\n\t\t\t//get dynamic banner 1\n\t\t\tif($dynamicBanner_1[0]['banner_image'] == 'NULL')\n\t\t\t{\n\t\t\t\techo '';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo '<div class=\"dynamic_banner\">'.$dynamicBanner_1[0]['banner_image'].'</div>';\n\t\t\t}\n\t\t\t//get the dynamic banner 2\n\t\t\tif($dynamicBanner_2[0]['banner_image'] == 'NULL')\n\t\t\t{\n\t\t\t\techo '';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo '<div class=\"dynamic_banner\">'.$dynamicBanner_2[0]['banner_image'].'</div>';\n\t\t\t}\n\t\t}", "public function index()\n {\n // Varibales\n $title = '';\n $created_at = '';\n $last_update = '';\n $orderby = '';\n $sort = '';\n\n $list_banners = Banners::leftJoin('banners_trans as trans', 'banners.id', '=', 'trans.tid')\n ->select('banners.*', 'trans.lang', 'trans.title', 'trans.link', 'trans.created_at', 'trans.updated_at')->where('trans.lang', '=', Lang::getlocale());\n\n if(!empty($_GET['title'])){\n $title = $_GET['title'];\n $list_banners->where('trans.title', 'like', '%'.$title.'%'); \n }\n if(!empty($_GET['created_at'])){\n $created_at = $_GET['created_at'];\n $list_banners->where('trans.created_at', '>=', ''.$created_at.' 00:00:00')->where('trans.created_at', '<=', ''.$created_at.' 23:59:59'); \n }\n if(!empty($_GET['last_update'])){\n $last_update = $_GET['last_update'];\n $list_banners->where('trans.updated_at', '>=', ''.$last_update.' 00:00:00')->where('trans.updated_at', '<=', ''.$last_update.' 23:59:59'); \n }\n if(!empty($_GET['orderby']) && !empty($_GET['sort'])){\n $orderby = $_GET['orderby'];\n $sort = $_GET['sort'];\n $list_banners->orderBy($orderby, $sort); \n }\n \n $banners = $list_banners->paginate(10);\n // add to pagination other fields\n $banners->appends(['title' => $title, 'created_at' => $created_at,\n 'last_update' => $last_update, 'orderby' => $orderby, 'sort' => $sort]);\n\n return view('backend.banners.index', compact('banners'));\n }", "public function homepagebanner()\n\t {\n\t\t\n\t\t$objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance(); // Instance of object manager\n\t\t$resource = $objectManager->get('Magento\\Framework\\App\\ResourceConnection');\n\t\t$connection = $resource->getConnection();\n\t\t$sql = \"Select * FROM custom_productbanner where status=1 order by productbanner_id asc\";\n\t\t$result1 = $connection->fetchAll($sql);\t\n\n if(!empty($result1))\n\t\t{\t\t\t\n\t\t\t\n\t\tforeach ($result1 as $data) {\n\t\t$banner_id=$data['productbanner_id'];\n $image_name=$data['name'];\n\t\t$image_background=$data['background'];\n\t\t$image_caption=$data['imagecaption'];\n\t\t$result[]=array('homepagebanner'=>array(array('Id'=>$banner_id,'Image Name'=>$image_name,'img'=>'http://localhost/markateplace/pub/media/Gridpart4/background/image'.$image_background.'','Image Caption'=>$image_caption)));\t\n\t\t\t\n\t\t}\t\t\t\n\t\t}\t\n\t\telse\n\t\t{\n\t\t\t$result[]=array('status'=>array(\"code\"=>\"1\",\"message\"=>\"error\"));\n\t\t\t\n\t\t}\n\n\t\t\t\t\n\t return $result; \n\t\n\t }", "function links() {\n return array(\n\n );\n }", "private function getLinks($limit) {\r\n \r\n /*\r\n * Base links are always returned\r\n */\r\n $links = $this->getBaseLinks();\r\n \r\n /*\r\n * Start page cannot be lower than 1\r\n */\r\n if ($this->paging['startPage'] > 1) {\r\n \r\n /*\r\n * Previous URL is the previous URL from the self URL\r\n * \r\n */\r\n $links[] = $this->getLink('previous', '_previousCollectionLink', array(\r\n 'startPage' => max($this->paging['startPage'] - 1, 1),\r\n 'count' => $limit));\r\n \r\n /*\r\n * First URL is the first search URL i.e. with startPage = 1\r\n */\r\n $links[] = $this->getLink('first', '_firstCollectionLink', array(\r\n 'startPage' => 1,\r\n 'count' => $limit)\r\n );\r\n }\r\n\r\n /*\r\n * Theorically, startPage cannot be greater than the one from lastURL\r\n * ...but since we use a count estimate it is not possible to know the \r\n * real last page. So always set a nextPage !\r\n */\r\n if (count($this->restoFeatures) >= $limit) {\r\n \r\n /*\r\n * Next URL is the next search URL from the self URL\r\n */\r\n $links[] = $this->getLink('next', '_nextCollectionLink', array(\r\n 'startPage' => $this->paging['nextPage'],\r\n 'count' => $limit)\r\n );\r\n\r\n /*\r\n * Last URL has the highest startIndex\r\n */\r\n $links[] = $this->getLink('last', '_lastCollectionLink', array(\r\n 'startPage' => max($this->paging['totalPage'], 1),\r\n 'count' => $limit)\r\n );\r\n }\r\n \r\n return $links;\r\n \r\n }", "public function getBanner($seriesId);", "public function get_links() {\n\t\t$context = $this->context_memoizer->for_current_page();\n\n\t\treturn $context->presentation->breadcrumbs;\n\t}", "function _nbabanner_get_banners($randomise = false)\n{\n $banners = nbacontent_get_vocabulary('nbabanner', true);\n \n $filteredBanners = array_filter($banners, function($ele) {\n return $ele->nbabanner_link_live['und'][0]['value'] == 1;\n });\n \n if ($randomise === true) {\n shuffle($filteredBanners);\n }\n \n return $filteredBanners;\n}", "public function listing_camp($stat='',$campid='',$adv='',$start=0)\n\t{\n\t\t/*-------------------------------------------------------------\n\t\t \tBreadcrumb Setup Start\n\t\t -------------------------------------------------------------*/\n\t\t$link = breadcrumb();\n\t\t$data['breadcrumb'] = $link;\n /*-------------------------------------------------------------\n\t\t \tBanner Based on Campaign Id\n\t\t -------------------------------------------------------------*/\n $data['sel_camp'] = $campid;\n\t\t\t\t$data['sel_adv'] = $adv;\n $data['sel_stat'] = $stat;\n\t\t/*--------------------------------------------------------------\n\t\t \tPagination Config Setup\n\t\t ---------------------------------------------------------------*/\n\t\t$limit = $this->page_limit;\n\t\tif($campid!='')\n {\n if($stat=='active')\n {\n $status = 0;\n $where_arr = array('ox_banners.campaignid'=>$campid,'ox_banners.status'=>$status);\n }\n elseif($stat=='inactive')\n {\n $status = 1;\n $where_arr = array('ox_banners.campaignid'=>$campid,'ox_banners.status'=>$status);\n }\n else\n {\n $stat = 'all';\n $where_arr = array('ox_banners.campaignid'=>$campid);\n }\n }\n else\n {\n if($stat=='active')\n {\n $status = 0;\n $where_arr = array('ox_banners.status'=>$status);\n }\n elseif($stat=='inactive')\n {\n $status = 1;\n $where_arr = array('ox_banners.status'=>$status);\n }\n else\n {\n $stat = 'all';\n $where_arr = array();\n }\n }\n //print_r($where_arr);exit;\n\t\t$list_data = $this->mod_banner->get_banners($where_arr);\n\t\t\n\t\t/*--------------------------------------------------------------------------\n \t* Get Reports for each banners based on selected Campaigns and Advertiser\n \t* -------------------------------------------------------------------------*/\n\n\n\t\t$search_arr = array();\n\t\t$search_arr['from_date'] =\t$this->mod_statistics->get_start_date();\n\t\t$search_arr['to_date'] =\tdate(\"Y/m/d\");\n\t\t$search_arr['search_type'] =\t\"all\";\n\t\t\n\t\t$data['stat_data'] = $this->mod_statistics->get_statistics_for_banners($search_arr);\n\t\t\n\t\t/* Total Banners Count */\n\t\t$data['tot_list'] = $list_data;\n\n\t\t$config['per_page'] \t= $limit;\n\t\tif($campid!='')\n {\n $config['base_url'] \t= site_url(\"admin/inventory_banners/listing_camp/\".$stat.\"/\".$campid);\n $config['uri_segment'] \t= 6;\n }\n else\n {\n $config['base_url'] \t= site_url(\"admin/inventory_banners/listing_camp/\".$stat);\n $config['uri_segment'] \t= 5;\n }\n\t\t$config['total_rows'] \t= count($list_data);\n\t\t$config['next_link'] \t= $this->lang->line(\"pagination_next_link\");\n\t\t$config['prev_link'] \t= $this->lang->line(\"pagination_prev_link\");\n\t\t$config['last_link'] \t= $this->lang->line(\"pagination_last_link\");\n\t\t$config['first_link'] \t= $this->lang->line(\"pagination_first_link\");\n\t\t$this->pagination->initialize($config);\n\t\t$page_data = $this->mod_banner->get_banners($where_arr,$start,$limit);\n\t\t$data['banner_list']\t=\t$page_data;\n\n\t\t/*-------------------------------------------------------------\n\t\t \tPage Title showed at the content section of page\n\t\t -------------------------------------------------------------*/\n\t\t$data['page_title'] \t= $this->lang->line('label_inventory_banner_page_title');\n\n\t\t/*-------------------------------------------------------------\n\t\t \tTotal Counts for Active and Inactive Banners\n\t\t--------------------------------------------------------------*/\n if($campid!='')\n {\n $where_tot = array('ox_banners.campaignid'=>$campid);\n $where_act = array('ox_banners.campaignid'=>$campid,'ox_banners.status'=>0);\n $where_inact = array('ox_banners.campaignid'=>$campid,'ox_banners.status'=>1);\n }\n else\n {\n $where_tot = array();\n $where_act = array('ox_banners.status'=>0);\n $where_inact = array('ox_banners.status'=>1);\n }\n\n\t\t$tot_data = $this->mod_banner->get_banners($where_tot);\n\t\tif($tot_data!=FALSE)\n\t\t{\n\t\t\t$data['tot_data'] = count($tot_data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['tot_data'] = 0;\n\t\t}\n\t\t\n\t\t$active_data = $this->mod_banner->get_banners($where_act);\n\t\tif($active_data!=FALSE)\n\t\t{\n\t\t\t$data['active_data'] = count($active_data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['active_data'] = 0;\n\t\t}\n\t\t\n\t\t$inactive_data = $this->mod_banner->get_banners($where_inact);\n\n\t\tif($inactive_data!=FALSE)\n\t\t{\n\t\t\t$data['inactive_data'] = count($inactive_data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['inactive_data'] = 0;\n\t\t}\n\n\t\t/*-------------------------------------------------------------\n\t\t \tEmbed current page content into template layout\n\t\t -------------------------------------------------------------*/\n\t\t$data['page_content']\t= $this->load->view(\"admin/banners/list\",$data,true);\n\t\t$this->load->view('page_layout',$data);\n\n\t}", "public function getLinks(\n $countAllElements,//count all elements in this category\n $countElementsInThisPage,//count all elements in this page\n $startElements,//beginning number of output elements\n $linkLimit = 5,//count pages in chunk (chunk = array with pages)\n $controllerName,//controller name\n $varName = 'start'//get name of parameter, which is the count of output elements\n ) {\n if ($countElementsInThisPage >= $countAllElements || $countElementsInThisPage == 0) {\n return NULL;\n }\n\n $pages = 0;//count pages in pagination\n $needChunk = 0;//index need chunk in this moment\n $page = array();//array with value and text value page\n $queryVars = array();//GET array\n $pagesArr = array();//array with $startElements\n $link = Url::getUrl().$controllerName;//url address for page\n\n //in $queryVars GET parameters\n parse_str($_SERVER['QUERY_STRING'], $queryVars ); //&$queryVars\n\n if(isset($queryVars[$varName])) {\n\n unset($queryVars[$varName]);//delete GET with parameter $startElements\n }\n unset($queryVars['route']);//delete GET['route'], because route is controllerName\n\n $link = $link.'?'.http_build_query( $queryVars );//site url with router parameters and GET params\n\n $pages = ceil( $countAllElements / $countElementsInThisPage );//count pages\n\n for( $i = 0; $i < $pages; $i++) {\n $pagesArr[$i+1] = $i * $countElementsInThisPage;\n }\n\n $allPages = array_chunk($pagesArr, $linkLimit, true);//divide the array into several arrays by $linkLimit elements\n\n $needChunk = $this->searchPage($allPages, $startElements);//search active chunk\n\n\n /** pages first and previous */\n if ($startElements > 1) {\n\n $page['value']['start'] = $link.'&'.$varName.'=0';\n $page['text']['start'] = $this->startChar;\n $page['value']['previous'] = $link.'&'.$varName.'='.($startElements - $countElementsInThisPage);\n $page['text']['previous'] = $this->prevChar;\n } else {\n\n $page['value']['start'] = '';\n $page['text']['start'] = $this->startChar;\n $page['value']['previous'] = '';\n $page['text']['previous'] = $this->prevChar;\n }\n\n /** 5 pages or less */\n foreach($allPages[$needChunk] AS $pageNum => $start) {\n\n if( $start == $startElements ) {//current page without url\n $page['value']['pages'][] = '';\n $page['text']['pages'][] = $pageNum;\n continue;\n }\n $page['value']['pages'][] = $link.'&'.$varName.'='. $start;\n $page['text']['pages'][] = $pageNum;\n }\n\n /** pages next and last */\n if (($countAllElements - $countElementsInThisPage) > $startElements) {\n\n $page['value']['next'] = $link.'&'.$varName.'='.($startElements + $countElementsInThisPage);\n $page['text']['next'] = $this->nextChar;\n $page['value']['last'] = $link.'&'.$varName.'='.array_pop(array_pop($allPages));\n $page['text']['last'] = $this->lastChar;\n } else {\n\n $page['value']['next'] = '';\n $page['text']['next'] = $this->nextChar;\n $page['value']['last'] = '';\n $page['text']['last'] = $this->lastChar;\n }\n\n return $page;//array with pagination parameters\n }", "public function getBannersByDimensions() {\n\n try {\n $result = Banner::getBannersByDimensions($_GET);\n return $result;\n } catch (Exception $e) {\n throw new RestException($e->getCode(), $e->getMessage());\n }\n }", "public static function getLinks() {\n $links = Yii::$app->cacheManage->links;\n if ($links) {\n return $links;\n }\n\n $links = LinkOption::getAllLinks();\n if ($links) {\n Yii::$app->cacheManage->links = $links;\n }\n return $links;\n }", "public function index()\n {\n $banners = Banner::all();\n return view('admin.banners.list_banner')->withBanners($banners);\n }", "public function getLinks()\n {\n $links = array();\n\t\t\n\t\t$modulevars = ModUtil::getVar('Mediasharex');\n\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'info'),\n \t\t\t\t 'text' => $this->__(' Info'),\n \t\t\t\t 'class' => 'mediasharex-icon-laptop',\n\t\t\t\t\t\t\t 'links' => $this->getInfoLinks());\n }\n\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'info_docs'),\n \t\t\t\t 'text' => $this->__(' Documentation'),\n \t\t\t\t 'class' => 'mediasharex-icon-cabinet');\n }\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'settings_general'),\n \t\t\t\t 'text' => $this->__(' Settings'),\n \t\t\t\t 'class' => 'mediasharex-icon-cogs',\n\t\t\t\t\t\t\t 'links' => $this->getSettingsLinks());\n }\t\t\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manager'),\n \t\t\t\t 'text' => $this->__(' Content manager'),\n \t\t\t\t 'class' => 'mediasharex-icon-folder',\n\t\t\t\t\t\t\t 'links' => $this->getManagerLinks());\n }\t\t\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'sandh'),\n \t\t\t\t 'text' => $this->__(' Sources & Handlers'),\n \t\t\t\t 'class' => 'mediasharex-icon-equalizer',\n\t\t\t\t\t\t\t 'links' => $this->getSandHLinks());\n }\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'media_types'),\n \t\t\t\t 'text' => $this->__(' Media types'),\n \t\t\t\t 'class' => 'mediasharex-icon-star',\n\t\t\t\t\t\t\t 'links' => $this->getMediaTypesLinks());\n }\t\t\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'import'),\n \t\t\t\t 'text' => $this->__(' Import'),\n \t\t\t\t 'class' => 'mediasharex-icon-loop',\n\t\t\t\t\t\t\t 'links' => $this->getImportLinks());\n }\t\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t/*\t\n\t\t\n\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'mainsettings'), 'text' => $this->__('Main settings'), 'class' => 'z-icon-es-config');\n }\n\n\n\n\n\n\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'managealbums'), 'text' => $this->__('Albums'), 'class' => 'z-icon-es-display');\n }\n\t\t\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manageitems'), 'text' => $this->__('Media'), 'class' => 'z-icon-es-display');\n }\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'managemediastore'), 'text' => $this->__('Media store'), 'class' => 'z-icon-es-display');\n }\n\t\t\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'managehandlers'), 'text' => $this->__('Handlers'), 'class' => 'z-icon-es-display');\n }\n\t\t\t\t\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'managesources'), 'text' => $this->__('Sources'), 'class' => 'z-icon-es-display');\n }\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'manageinvitations'), 'text' => $this->__('Invitations'), 'class' => 'z-icon-es-display');\n }\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'import'), 'text' => $this->__('Import'), 'class' => 'z-icon-es-filter');\n }\t\n\t * \n\t * \n\t * \n\t * \n\t * \n\t * \n\t */\t\n \n return $links;\n }", "public function info()\n {\n if (!addon_installed('banners')) {\n return array();\n }\n\n if (get_option('is_on_banner_buy') == '1') {\n $banner_url = build_url(array('page' => '_SELF', 'type' => 'bannerinfo', 'id' => 'banners'), get_module_zone('banners'));\n\n return array(do_template('POINTSTORE_BANNERS_2', array('_GUID' => '0b34fc7675b4a71fd6e530ad43213e70', 'BANNER_URL' => $banner_url)));\n }\n return array();\n }", "public function index(Request $request)\n {\n $banners = Banner::latest()->filter($request->all())->paginate($request->get('per_page', 20));\n\n return BannerResource::collection($banners);\n }", "public function getItems()\n {\n $arrLinks = array();\n\n $intNumberOfLinks = floor($this->intNumberOfLinks / 2);\n $intFirstOffset = ($this->intPage - $intNumberOfLinks - 1);\n\n if ($intFirstOffset > 0) {\n $intFirstOffset = 0;\n }\n\n $intLastOffset = ($this->intPage + $intNumberOfLinks - $this->intTotalPages);\n\n if ($intLastOffset < 0) {\n $intLastOffset = 0;\n }\n\n $intFirstLink = ($this->intPage - $intNumberOfLinks - $intLastOffset);\n\n if ($intFirstLink < 1) {\n $intFirstLink = 1;\n }\n\n $intLastLink = ($this->intPage + $intNumberOfLinks - $intFirstOffset);\n\n if ($intLastLink > $this->intTotalPages) {\n $intLastLink = $this->intTotalPages;\n }\n\n for ($i = $intFirstLink; $i <= $intLastLink; $i++) {\n $arrLinks[] = (object) array(\n 'page' => $i,\n 'current' => $i == $this->intPage,\n 'href' => $this->getItemLink($i)\n );\n }\n\n return $arrLinks;\n }", "public function linksProvider()\n {\n return [[new \\Urbania\\AppleNews\\Api\\Objects\\ArticleLinks()]];\n }", "function get_linksbyname($cat_name = \"noname\", $before = '', $after = '<br />', $between = \" \", $show_images = \\true, $orderby = 'id', $show_description = \\true, $show_rating = \\false, $limit = -1, $show_updated = 0)\n {\n }", "public function indexAction() {\r\n\t\t$page = intval($this->getInput('page'));\r\n\t\t$param = $this->getInput(array('start_time','channel_id', 'ad_type', 'title'));\r\n\r\n\t\t$perpage = $this->perpage;\r\n\t\t\r\n\t\t$search = array();\r\n\t\tif($param['ad_type']) $search['ad_type'] = $param['ad_type'];\r\n\t\t$search['channel_id'] = $param['channel_id'];\r\n if(!empty($param['start_time']))$search['search_time'] = array(\r\n array('>=',strtotime($param['start_time'])),\r\n array('<',strtotime($param['start_time'])+3600*24),\r\n );\r\n if($param['title']) $search['title'] = array('LIKE', trim($param['title']));\r\n\t\tlist($total, $ads) = Gou_Service_Ad::getList($page, $perpage, $search);\r\n\t\t$this->assign('ad_types', $this->ad_types[$param['channel_id']]);\r\n\t\t$this->assign('search', $param);\r\n\t\t$this->assign('ads', $ads);\r\n\t\t$this->cookieParams();\r\n\t\t$url = $this->actions['listUrl'].'/?' . http_build_query($search) . '&';\r\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $url));\r\n\t}", "public static function getLiveBannerCampaigns()\n {\n return self::resultSetToObjArray(\n self::$db->fetchColumn(\n 'SELECT website.banner_campaign.banner_campaign_id FROM website.banner_campaign, website.banner_timeslot\n WHERE website.banner_campaign.banner_campaign_id = website.banner_timeslot.banner_campaign_id\n AND effective_from < now()\n AND (effective_to IS NULL\n OR effective_to > now())\n AND day = EXTRACT(ISODOW FROM now())\n AND start_time < localtime\n AND end_time > localtime\n ORDER BY \"order\" ASC'\n )\n );\n }", "public function getBanner(Request $request)\n {\n $data = [];\n\n $position = $request->get('position', 'top');\n\n if ($request->get('page_id')) {\n $page_id = $request->get('page_id');\n $page_type = $request->get('type', 'page');\n $data = Banner::getByPageId($page_id, $page_type, $position)->betweenDate()->get();\n }\n\n $settingsName = $position . '_sizes';\n $settings = Cache::remember(\n $settingsName,\n now()->addDay(),\n function () use ($settingsName) {\n return BannerSettings::where('name', $settingsName)->first();\n }\n );\n $additional = [];\n if ($settings) {\n $additional = [\n 'carousel_settings' => [\n 'interval' => $settings->data['interval'] ?? 3000,\n 'indicators' => $settings->data['indicators'] ?? true,\n 'nav' => $settings->data['nav'] ?? true,\n ]\n ];\n }\n return BannerResource::collection($data)->additional($additional);\n }", "public function index()\n {\n return Links::all();\n }", "private function get_fiters_links() {\n $showallurl = $this->page->url;\n $showallurl->param('filter', 'showall');\n\n $onlyactivitiesurl = $this->page->url;\n $onlyactivitiesurl->param('filter', 'onlyactivities');\n\n $onlypostsurl = $this->page->url;\n $onlypostsurl->param('filter', 'onlyposts');\n\n if (isset($this->viewoptions['order'])) {\n $showallurl->param('order', $this->viewoptions['order']);\n $onlyactivitiesurl->param('order', $this->viewoptions['order']);\n $onlypostsurl->param('order', $this->viewoptions['order']);\n }\n\n return [\n 'showall' => $showallurl,\n 'onlyactivities' => $onlyactivitiesurl,\n 'onlyposts' => $onlypostsurl\n ];\n }", "public function get_all_links()\r\n {\r\n \tif (empty($this->course_code))\r\n \t\tdie('Error in get_not_created_links() : course code not set');\r\n \t\r\n \t$course_info = api_get_course_info($this->course_code);\r\n \t$tbl_grade_links = Database :: get_main_table(TABLE_MAIN_GRADEBOOK_LINK,$course_info['dbName']);\r\n\r\n\t\t$sql = 'SELECT id,title from '.$this->get_exercise_table();\r\n\t\t$result = api_sql_query($sql, __FILE__, __LINE__);\r\n\r\n\t\t$cats=array();\r\n\t\twhile ($data=mysql_fetch_array($result))\r\n\t\t{\r\n\t\t\t$cats[] = array ($data['id'], $data['title']);\r\n\t\t}\r\n\t\treturn $cats;\r\n }", "public function index()\n {\n return new BannerCollection(Banner::orderBy('created_at', 'desc')->get());\n }", "public function getLinkList($params, $context)\n {\n $this->validateMethodContext($context, [\"role\" => OMV_ROLE_ADMINISTRATOR]);\n // Get the configuration object.\n $db = \\OMV\\Config\\Database::getInstance();\n $objects = $db->get(\"conf.service.webdesk.link\");\n // Add additional link informations.\n $objectsAssoc = [];\n foreach ($objects as $objectk => &$objectv) {\n // Add the new property 'sharedfoldername'.\n /*$objectv->add(\"sharedfoldername\", \"string\", gettext(\"n/a\"));\n // Get the shared folder configuration object.\n $sfObject = $db->get(\"conf.system.sharedfolder\",\n $objectv->get(\"sharedfolderref\"));\n // Update the 'sharedfoldername' property.\n $objectv->set(\"sharedfoldername\", $sfObject->get(\"name\"));*/\n $objectsAssoc[] = $objectv->getAssoc();\n }\n // Filter the result.\n return $this->applyFilter($objectsAssoc, $params['start'], $params['limit'],\n $params['sortfield'], $params['sortdir']);\n }", "function getBanners($page,$position,$image_banner,$BannerDisplayed){\r\n\r\n\t\t\t$sql = \"select * from banner where Status='1' \";\r\n\r\n\t\t\t$sql.= (!empty($page))?(\" and ShowOn like '%\".$page.\"%'\"):(\"\");\r\n\r\n\t\t\t$sql.= (!empty($position))?(\" and position = '\".$position.\"'\"):(\"\");\r\n\r\n\t\t\t$sql.= ($image_banner==1)?(\" and ( Image like '%jpg%' or Image like '%gif%')\"):(\"\");\r\n\r\n\t\t\t$sql.= (!empty($BannerDisplayed))?(\" and BannerID != '\".$BannerDisplayed.\"'\"):(\"\");\r\n\r\n\t\t\t$sql.= \" order by rand() \";\r\n\r\n\t\t\t $sql.= \" limit 0,1 \"; \r\n\t\t\t//$sql.= (!empty($BannerLimit))?(\" limit 0,\".$BannerLimit.\"\"):(\"\");\r\n\r\n\t\t\t//echo $sql;\r\n\t\t\treturn $this->query($sql, 1);\r\n\t\t}", "public function getLinks() {\n return $this->links;\n }", "public function getHeadingLinks(): array;", "public function getlinks()\n {\n $links = array();\n if (UserUtil::isLoggedIn()) {\n $links[] = array(\n 'url' => ModUtil::url('InterCom', 'user', 'inbox'),\n 'text' => $this->__('Inbox'),\n 'class' => 'z-icon-es-inbox'\n );\n $links[] = array(\n 'url' => ModUtil::url('InterCom', 'user', 'outbox'),\n 'text' => $this->__('Outbox'),\n 'class' => 'z-icon-es-outbox'\n );\n $links[] = array(\n 'url' => ModUtil::url('InterCom', 'user', 'archive'),\n 'text' => $this->__('Archive'),\n 'class' => 'z-icon-es-gears'\n );\n if ($this->getVar('messages_allow_emailnotification')|| $this->getVar('messages_allow_autoreply')) {\n $links[] = array(\n 'url' => ModUtil::url('InterCom', 'user', 'settings'),\n 'text' => $this->__('Settings'),\n 'class' => 'z-icon-es-config'\n );\n }\n $links[] = array(\n 'url' => ModUtil::url('InterCom', 'user', 'newpm'),\n 'text' => $this->__('New message'),\n 'class' => 'z-icon-es-new'\n );\n }\n return $links;\n }", "public function index(Request $request)\n {\n $aResult = Util::getDefaultArrayResult();\n \n if ($this->user->hasAccess($this->resource . '.view')) {\n \n $modelName = $this->modelName;\n \n $pageSize = $request->input('iDisplayLength', 10);\n $offset = $request->input('iDisplayStart');\n $currentPage = ($offset / $pageSize) + 1;\n\n if (!$sortCol = $request->input('mDataProp_'.$request->input('iSortCol_0'))) {\n $sortCol = 'id';\n $sortDir = 'desc';\n } else {\n \n $sortDir = $request->input('sSortDir_0');\n }\n\n //Search filter\n $search = \\trim($request->input('sSearch'));\n \n\n Paginator::currentPageResolver(function() use ($currentPage) {\n return $currentPage;\n });\n\n $items = \n $modelName::select(\n 'banners_banners.id',\n 'banners_tipos.nombre as tipo',\n \\DB::raw('CONCAT(banners_clientes.apellido, \", \", banners_clientes.nombre) as cliente'),\n 'banners_posiciones.nombre as posicion',\n 'banners_banners.nombre',\n 'banners_banners.inicio',\n 'banners_banners.fin',\n 'banners_banners.impresiones',\n 'banners_banners.clicks',\n 'banners_banners.habilitado'\n )\n ->join('banners_tipos','banners_tipos.id','=','banners_banners.id_tipo')\n ->join('banners_clientes','banners_clientes.id','=','banners_banners.id_cliente')\n ->join('banners_posiciones','banners_posiciones.id','=','banners_banners.id_posicion')\n ->orderBy($sortCol, $sortDir)\n ;\n\n if ($search) {\n $items->where(function($query) use ($search){\n $query\n ->where('banners_banners.nombre','like',\"%{$search}%\")\n ->orWhere('banners_tipos.nombre','like',\"%{$search}%\")\n ->orWhere('banners_clientes.nombre','like',\"%{$search}%\")\n ->orWhere('banners_clientes.apellido','like',\"%{$search}%\")\n ->orWhere('banners_posiciones.nombre','like',\"%{$search}%\")\n ;\n });\n }\n \n $items = $items\n ->paginate($pageSize)\n ;\n\n $aItems = $items->toArray(); \n \n $total = $aItems['total'];\n $aItems = $aItems['data']; \n \n $aResult['data'] = $aItems;\n $aResult['recordsTotal'] = $total;\n $aResult['recordsFiltered'] = $total;\n \n } else {\n $aResult['status'] = 1;\n $aResult['msg'] = \\config('appCustom.messages.unauthorized');\n }\n\n return response()->json($aResult);\n }", "public function get_banner_item( $id, $aid = '', $force_size = '' )\n\t{\t\n\t\t$banner_type = get_post_meta( $id, 'banner_type', true );\n\t\t$banner_url = get_post_meta( $id, 'banner_url', true );\n\t\t$banner_link = get_post_meta( $id, 'banner_link', true );\n\t\t$banner_target = get_post_meta( $id, 'banner_target', true );\n\t\t$banner_size = get_post_meta( $id, 'banner_size', true );\n\t\t$banner_no_follow = get_post_meta( $id, 'banner_no_follow', true );\n\t\t$banner_start_date = get_post_meta( $id, 'banner_start_date', true );\n\t\t$rel = $banner_no_follow ? 'rel=\"nofollow\"' : '';\n\t\t$banner_is_image = $this->check_if_banner_is_image($banner_type);\n\t\t$click_tag = '';\n\t\t\n\t\t$size = !empty($banner_size) ? explode('x', $banner_size ) : '';\n\t\t$size = !empty($force_size) ? explode('x', $force_size ) : $size;\n\t\t$size_str = !empty($force_size) ? 'width=\"'.$size[0].'\" ' : '';\n\t\t$today = mktime(0, 0, 0, date(\"m\") , date(\"d\"), date(\"Y\"));\n\t\t\n\t\t$html = '';\n\t\t\n\t\tif( $banner_is_image )\n\t\t{\n\t\t\t$img = !empty($banner_url) ? $banner_url : WP_ADS_URL.'images/placeholder.png';\n\t\t\t$html.= '<img src=\"'.$img.'\" alt=\"'.get_the_title($id).'\" border=\"0\" '.$size_str.' />';\n\t\t}\n\t\telseif( $banner_type == 'swf')\n\t\t{\n\t\t\t$html.= '<object width=\"'.$size[0].'\" height=\"'.$size[1].'\" style=\"cursor:pointer;\">';\n\t\t\t\t$html.= $fallback_and_link;\n\t\t\t\t$html.= '<param name=\"movie\" value=\"'.$banner_url.$click_tag.'\"></param>';\n\t\t\t\t$html.= '<param name=\"allowFullScreen\" value=\"true\"></param>';\n\t\t\t\t$html.= '<param name=\"allowscriptaccess\" value=\"always\"></param>';\n\t\t\t\t$html.= '<param name=\"wmode\" value=\"transparent\"></param>';\n\t\t\t\t$html.= '<embed src=\"'.$banner_url.$click_tag.'\" type=\"application/x-shockwave-flash\" width=\"'.$size[0].'\" height=\"'.$size[1].'\" allowscriptaccess=\"always\" allowfullscreen=\"true\"></embed>';\n\t\t\t$html.= '</object>';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$banner_html = get_post_meta( $id, 'banner_html', true );\n\t\t\t$html.= $banner_html;\n\t\t}\n\t\t\n\t\t// Create link\n\t\t$adzone_str = !empty( $aid ) ? '&pasZONE='.base64_encode($aid) : '';\n\t\t$html = !empty( $banner_link ) ? '<a href=\"'.get_bloginfo('url').'?pasID='.base64_encode($id).$adzone_str.'\" target=\"'.$banner_target.'\" '.$rel.'>'.$html.'</a>' : $html;\n\t\t\n\t\treturn $html;\n\t}", "private function getBaseLinks() {\r\n return array(\r\n array(\r\n 'rel' => 'self',\r\n 'type' => RestoUtil::$contentTypes['json'],\r\n 'title' => $this->context->dictionary->translate('_selfCollectionLink'),\r\n 'href' => RestoUtil::updateUrl($this->context->getUrl(false), $this->writeRequestParams($this->context->query))\r\n ),\r\n array(\r\n 'rel' => 'search',\r\n 'type' => 'application/opensearchdescription+xml',\r\n 'title' => $this->context->dictionary->translate('_osddLink'),\r\n 'href' => $this->context->baseUrl . '/api/collections/' . (isset($this->defaultCollection) ? $this->defaultCollection->name . '/' : '') . 'describe.xml'\r\n )\r\n );\r\n }", "public function getAllRecordLinks()\n {\n // Load configurations:\n $fieldsNames = isset($this->mainConfig->Record->marc_links)\n ? explode(',', $this->mainConfig->Record->marc_links) : [];\n $useVisibilityIndicator\n = isset($this->mainConfig->Record->marc_links_use_visibility_indicator)\n ? $this->mainConfig->Record->marc_links_use_visibility_indicator : true;\n\n $retVal = [];\n foreach ($fieldsNames as $value) {\n $value = trim($value);\n $fields = $this->marcRecord->getFields($value);\n if (!empty($fields)) {\n foreach ($fields as $field) {\n // Check to see if we should display at all\n if ($useVisibilityIndicator) {\n $visibilityIndicator = $field->getIndicator('1');\n if ($visibilityIndicator == '1') {\n continue;\n }\n }\n\n // Get data for field\n $tmp = $this->getFieldData($field);\n if (is_array($tmp)) {\n $retVal[] = $tmp;\n }\n }\n }\n }\n return empty($retVal) ? null : $retVal;\n }", "protected abstract function loadAvailableAds();", "public function getLinks()\n {\n return $this->links;\n }", "public function getLinks()\n {\n return $this->links;\n }", "public function getLinks()\n {\n return $this->links;\n }", "public function index()\n {\n $links = Link::query();\n\n return response()->json($links->paginate());\n }", "public function index()\n {\n $items = Banners::paginate('50');\n\n return view('banners.index', compact('items'));\n }", "public function getPageUris();", "public function getBanners()\n {\n $rows = $this->iaDb->all(iaDb::ALL_COLUMNS_SELECTION, \"`status` = 'active'\", null, null, self::getTable());\n\n if (is_array($rows) && $rows) {\n $banners = [];\n foreach ($rows as $entry) {\n $banners[$entry['position']][] = $entry;\n }\n\n return $banners;\n }\n\n return false;\n }", "private function get_filters_links() {\n $links = $this->get_fiters_links();\n $links['orderlink'] = $this->get_link_order();\n\n return $links;\n }", "public function getLinks()\n {\n $controller = \\Yii::app()->getController();\n if (($pagination = $this->getPagination()) !== false) {\n $totalPages = $pagination->getPageCount();\n $currentPage = $pagination->getCurrentPage();\n $links = array(\n 'self' => array(\n 'title' => $this->model->classLabel(true),\n 'href' => $pagination->createPageUrl($controller, 0),\n ),\n 'page' => array(\n 'title' => \\Yii::t('resource', 'Page'),\n 'href' => str_replace('999', '{page}', $pagination->createPageUrl($controller, 998)),\n 'templated' => true,\n ),\n\n );\n if ($currentPage > 0) {\n $links['firstPage'] = array(\n 'title' => \\Yii::t('resource', 'First Page'),\n 'href' => $pagination->createPageUrl($controller, 0),\n );\n }\n if ($currentPage > 0) {\n $links['prevPage'] = array(\n 'title' => \\Yii::t('resource', 'Previous Page'),\n 'href' => $pagination->createPageUrl($controller, $currentPage - 1),\n );\n }\n if ($totalPages > $currentPage + 1) {\n $links['nextPage'] = array(\n 'title' => \\Yii::t('resource', 'Next Page'),\n 'href' => $pagination->createPageUrl($controller, $currentPage + 1),\n );\n }\n if ($totalPages > 1) {\n $links['lastPage'] = array(\n 'title' => \\Yii::t('resource', 'Last Page'),\n 'href' => $pagination->createPageUrl($controller, $totalPages - 1),\n );\n }\n }\n else {\n $links = array(\n 'self' => array(\n 'title' => $this->model->classLabel(true),\n 'href' => $controller->createUrl($controller->getRoute(), $this->getParams()),\n ),\n );\n }\n return $links;\n }", "public function index()\n\t{\n\t\t$data = [];\n\t\t$input = Input::except('page');\n\t\t$input = CommonAdmin::processDataFilter($input);\n\t\t$listData = Banners::where($input)->orderBy('id', 'desc')->paginate(PAGINATE);\n\t\tforeach ($listData as $key => $value) {\n\t\t\t// $data[$value['model_name']][$value['model_id']][$key] = new stdClass();\n\t\t\t// $data[$value['model_name']][$value['model_id']][$key] = $value;\n\t\t\t$data[$value->model_name][$value->model_id][$key] = new stdClass();\n\t\t\t$data[$value->model_name][$value->model_id][$key] = $value;\n\t\t}\n\t\t// dd($data);\n\t\t// $data = Banners::groupBy('model_name')->orderBy('id', 'desc')->paginate(PAGINATE);\n\t\treturn View::make('admin.banner.index')->with(compact('data'));\n\t}", "public function getLinks()\r\n {\r\n return $this->_links;\r\n }", "function getPageBanners($id) {\n $this->db->select(\"*\");\n $this->db->where(\"pageID\", $id);\n $this->db->order_by(\"slideOrder ASC\");\n \t$query = $this->db->get('banner');\n if ($query->num_rows() > 0) {\n return $query->result_array();\n }\n return array();\n }", "public function getBannersByPeriod($dateStart, $dateEnd)\n {\n $parameters = [\n 'dateBegin' => date('Y-m-d H:i:s', (int) $dateStart),\n 'dateEnd' => date('Y-m-d H:i:s', (int) $dateEnd)\n ];\n\n return (array) $this->apiClient->doCall('getBannersByPeriod', $parameters);\n }", "public function index()\n {\n return view('backend.tables.banner', ['banners' => Banner::paginate('5')]);\n }", "public function index()\n {\n $banners = Banner::all();\n if( request()->expectsJson() ){\n return BannerResource::collection( $banners );\n }\n return view('admin.banners.index', ['banners'=>$banners]);\n }", "public function getUriList();", "public function linksProvider()\n {\n return [[[new \\Urbania\\AppleNews\\Format\\LinkedArticle()]]];\n }", "abstract public function links(): JsonApiParser\\Collections\\Links;", "public function getBannerBaseUrl()\n {\n return $this->storeManager->getStore()->getBaseUrl(UrlInterface::URL_TYPE_MEDIA) . 'mage2/banners/';\n }", "public function getLinkInfomation() {\n header('Access-Control-Allow-Origin: *');\n header(\"Access-Control-Allow-Credentials: true\");\n header('Content-Type: application/json; charset=utf-8');\n header(\"Access-Control-Allow-Methods: POST, GET, OPTIONS\");\n header('Access-Control-Allow-Headers \"Origin, X-Requested-With, Content-Type, Accept');\n\n $sLink = $this->input->post('link');\n\n if (!filter_var($sLink, FILTER_VALIDATE_URL)) {\n $sLink = 'http://'.$sLink;\n }\n\n $urlData = parse_url($sLink);\n \n $aMeta = getUrlMeta($sLink);\n \n $aMeta['host'] = str_replace('www.', '', $urlData['host']);\n \n echo json_encode($aMeta);\n die();\n }", "function displayCategoryLinks() {\n\n\t$catquery = \"select distinct ngroup from nassets where type like '0tdn%'\";\n\t$cresults = mysql_query($catquery);\n\t$has_null = false;\n\t$categories = array();\n\twhile ($acRow = mysql_fetch_array($cresults)) {\n\t\t$thisgroup = $acRow['ngroup'];\n\t\t$categories[] = $thisgroup;\n\t}\n\t\n\n\techo \"<ul>View by Category<br>\";\n\t$size = count($categories);\n \tforeach ($categories as $category) {\n \t\techo \"<li><a href=\\\"menu2.php?category=$category\\\" target=\\\"menu2\\\">$category</a><br/></li>\";\n \t}\n\n\techo \"</ul>\";\n}", "public function getLinks($entity)\n {\n }", "public function actionIndex()\n {\n $searchModel = new BannerSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function getHeaderLinks()\r\n {\r\n return $this->_headerLinks;\r\n }", "public function getLinks() {\n\t\treturn $this->links;\n\t}", "function get_links_withrating($category = -1, $before = '', $after = '<br />', $between = \" \", $show_images = \\true, $orderby = 'id', $show_description = \\true, $limit = -1, $show_updated = 0)\n {\n }", "function fossee_site_banner_banners(){\n\n //$dir = \"public://site_banners\"; // The directory in which banner files are kept\n $output = NULL;\n\n setFrontend(); // this function renders the fromtend like rendering javascript and css style\n $recent_time = 1*24*60*60; // D * H * MIN * SEC\n\n $result_recent = db_select('fossee_banner_details','n')\n ->fields('n',array('id','file_name','status'))\n //->range(0,20)\n //->condition(db_or()->condition('n.created_timestamp',time()-$recent_time,'>')->condition('n.last_updated',time()-$recent_time))\n ->condition('n.last_updated',time()-$recent_time,\">\")\n ->execute(); // returns the banners from the fossee_banner_details table\n\n $result_active = db_select('fossee_banner_details','n')\n ->fields('n',array('id','file_name','status'))\n //->range(0,20)\n ->condition('n.status_bool',1,'=')\n //->condition('n.created_timestamp',time()-$recent_time,'<=')\n ->execute(); // returns the banners from the fossee_banner_details table\n\n $result_inactive = db_select('fossee_banner_details','n')\n ->fields('n',array('id','file_name','status'))\n //->range(0,20)\n ->condition('n.status_bool',1,'!=')\n //->condition('n.created_timestamp',time()-$recent_time,'<=')\n ->execute(); // returns the banners from the fossee_banner_details table\n\n $output .= \"<a href='new-banner'>Create New Banner</a><br><br>\";\n $output .= generateTable($result_recent,\"Recent\");\n $output .= generateTable($result_active,\"Active\");\n $output .= generateTable($result_inactive,\"Inactive\");\n\n return $output;\n\n}", "public function getlinks()\n {////\n // Define an empty array to hold the list of admin links\n $links = array();\n\n // Return the links array back to the calling function\n return $links;\n }", "public function index()\n {\n $links = Link::get();\n return new LinksCollection($links);\n }", "public function index()\n {\n \n try {\n $banners = Banner::orderBy('created_at', 'desc');\n $banners = $banners->Paginate(Config::get('app.banner_per_page'));\n return Response::json(array('status' => 'success', 'data' => $banners->toArray(),'page' => $banners->paginateObject()), 200);\n } Catch (Exception $ex) {\n return Response::json(array('status' => 'error', 'error' => $ex->getMessage(), 'line' => $ex->getLine()), 500);\n }\n }", "public function getLink();", "public function getLink();", "public static function getAllBannerCampaigns()\n {\n return self::resultSetToObjArray(\n self::$db->fetchColumn('SELECT banner_campaign_id FROM website.banner_campaign')\n );\n }", "public function index()\n {\n $banners = Banner::orderBy('id', 'DESC')->paginate(10);\n\n return view('backend.banner.index', compact('banners'));\n }", "function getlistlink(){\t\t\t\n\t\tif($this->type=='news'){\n\t\t\t$sql = 'SELECT `a`.`id`,`a`.`name`,`b`.`ctrl` FROM `'.DB_TABLE_PREFIX.'news` as `a` INNER JOIN `'.DB_TABLE_PREFIX.'newslink` as `b` ON `a`.`id`=`b`.`linkid` WHERE `b`.`newsid`='.$this->newsid.' AND `b`.`ctrl`='.$this->ctrl;\n\t\t}elseif($this->type=='product'){\n\t\t\t$sql = 'SELECT `a`.`id`,`a`.`name`,`b`.`ctrl` FROM `'.DB_TABLE_PREFIX.'product` as `a` INNER JOIN `'.DB_TABLE_PREFIX.'productnewslink` as `b` ON `a`.`id`=`b`.`productid` WHERE `b`.`newsid`='.$this->newsid.' AND `b`.`ctrl`='.$this->ctrl.' AND `b`.`from`='.$this->from;\t\t\n\t\t}\n\t\t_trace($sql);\n\t\t$rs = mysql_query($sql);\n\t\t$this->a_link = array();\n\t\twhile($this->a_link[] = mysql_fetch_assoc($rs));\n\t\tarray_pop($this->a_link);\t\t\t\n\t\tmysql_free_result($rs);\t\n\t}", "public function getQueryUrls($limit=NULL) {\n $a = self::getQueryUrl();\n $b = self::getHashes();\n\t$QueryUrls = array();\n\t$limit = (NULL!==$limit && is_numeric($limit)) ? (int)$limit : 0; \n\t$c = 0;\n\t//Foreach hash key value...\n\tforeach ( $b as $k => $v ) { \n\t //...that is a string with length > 0...\n\t\tif ( is_string($v) AND strlen($v) > 0 ) {\n\t\t\t//...format a query string. \n\t\t\t$rs = sprintf(tbr::QUERY_STRING, $v, $a);\n\t\t\t//Then, foreach available toolbar hostname...\n\t\t\tforeach ( $this->GTB_SERVER['host'] as $host ) {\n\t\t\t\t//...append any available top level domain... \n\t\t\t\tforeach ($this->GTB_SERVER['tld'] as $tld) {\n\t\t\t\t\t$tbUri = 'http://'. $host . $tld . tbr::SERVER_PATH . $rs;\n\t\t\t\t\tif ( $c < $limit || $limit == 0 ) {\n\t\t\t\t\t\t$QueryUrls[] = $tbUri;\n\t\t\t\t\t}\n\t\t\t\t\t$c++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} \n\treturn (sizeof($QueryUrls)>0) ? $QueryUrls : FALSE;\n }", "public function index()\n {\n abort_if(Gate::denies('banner_access'), Response::HTTP_FORBIDDEN, '403 Forbidden');\n $banners = Banner::get();\n return view('admin.banner.banner',compact('banners'));\n }", "public function getlinks()\r\n {\r\n $links = array();\r\n\r\n if (SecurityUtil::checkPermission('EZComments::', '::', ACCESS_ADMIN)) {\r\n $links[] = array('url' => ModUtil::url('EZComments', 'admin', 'main'),\r\n 'text' => $this->__('View comments'),\r\n 'class' => 'z-icon-es-view');\r\n $links[] = array('url' => ModUtil::url('EZComments', 'admin', 'stats'),\r\n 'text' => $this->__('Comment statistics'),\r\n 'class' => 'z-icon-es-cubes');\r\n $links[] = array('url' => ModUtil::url('EZComments', 'admin', 'modifyconfig'),\r\n 'text' => $this->__('Settings'),\r\n 'class' => 'z-icon-es-config',\r\n 'links' => array(\r\n array('url' => ModUtil::url('EZComments', 'admin', 'modifyconfig'),\r\n 'text' => $this->__('Settings')),\r\n array('url' => ModUtil::url('EZComments', 'admin', 'cleanup'),\r\n 'text' => $this->__('Delete orphaned comments')),\r\n array('url' => ModUtil::url('EZComments', 'admin', 'migrate'),\r\n 'text' => $this->__('Migrate comments')),\r\n array('url' => ModUtil::url('EZComments', 'admin', 'purge'),\r\n 'text' => $this->__('Purge comments')),\r\n array('url' => ModUtil::url('EZComments', 'admin', 'applyrules'),\r\n 'text' => $this->__('Re-apply moderation rules'))\r\n ));\r\n }\r\n return $links;\r\n }", "public function index()\n {\n $projects = Banner::first()\n ->where('is_active', 1)\n ->get();\n\n return BannerResource::collection($projects);\n }", "public function getSandHLinks()\n {\n $links = array();\n\t\t\n\t\t$modulevars = ModUtil::getVar('Mediasharex');\n\n\t\tif (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'sandh'), 'text' => $this->__('Media handling'), 'class' => 'z-icon-es-confi');\n }\n\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'sandh_sources'), 'text' => $this->__('Media sources'), 'class' => 'z-icon-es-displa');\n }\n\t\t\n if (SecurityUtil::checkPermission('Mediasharex::', '::', ACCESS_ADMIN)) {\n $links[] = array('url' => ModUtil::url($this->name, 'admin', 'sandh_handlers'), 'text' => $this->__('Media handlers'), 'class' => 'z-icon-es-displa');\n }\n \n\t\t\t\n return $links;\n }", "public function getLinks(): array\n {\n return $this->links;\n }", "public function getLinks(): array\n {\n return $this->links;\n }" ]
[ "0.64956653", "0.60217077", "0.5885171", "0.585809", "0.57196116", "0.56638443", "0.56369996", "0.5607769", "0.5594403", "0.5577562", "0.5576287", "0.55581164", "0.5554815", "0.5552081", "0.55503386", "0.5505732", "0.54941005", "0.54884547", "0.5484968", "0.5431221", "0.54280394", "0.54130614", "0.5394517", "0.53802794", "0.535659", "0.5342417", "0.532128", "0.5292062", "0.52868694", "0.52829075", "0.52827656", "0.5273991", "0.5272516", "0.52535963", "0.5253193", "0.5248614", "0.52461517", "0.5246064", "0.5245714", "0.52456015", "0.5220217", "0.52174187", "0.5216148", "0.5204102", "0.51915973", "0.5189697", "0.5186648", "0.516352", "0.5161616", "0.51594627", "0.51582533", "0.5130786", "0.5125728", "0.50993216", "0.5095246", "0.5093541", "0.5078333", "0.506679", "0.50341475", "0.50341475", "0.50341475", "0.5029117", "0.5022026", "0.5014567", "0.50144964", "0.5002593", "0.49920034", "0.4986039", "0.4977961", "0.4975011", "0.49720827", "0.49716797", "0.49502975", "0.49500585", "0.4948322", "0.49358776", "0.49323517", "0.49261537", "0.49207875", "0.4920263", "0.49188787", "0.4916485", "0.49027514", "0.4897154", "0.4892757", "0.48910806", "0.4890221", "0.48869422", "0.4885725", "0.4885725", "0.48850685", "0.48848724", "0.4880671", "0.48772702", "0.48697454", "0.48635456", "0.48620516", "0.48598078", "0.48572758", "0.48572758" ]
0.70739037
0
Provides you the available advanced reports. To obtain specific reports, you can filter this by add $nid & $mid.
Предоставляет доступ к доступным продвинутым отчетам. Чтобы получить конкретные отчеты, вы можете отфильтровать их с помощью $nid & $mid.
public function advancedReports( $reportId, $startDate, $endDate, $nid = null, $mid = null ) { $startD = (isset($startDate)) ? str_replace('-', '', $startDate) : null; $endD = (isset($endDate)) ? str_replace('-', '', $endDate) : null; $this->setHeader(self::HEADER_TYPE_BEARER); $this->setParameter(0, 'token='.self::SECURITY_TOKEN); $this->setParameter(1, 'reportid='.$reportId); $this->setParameter(2, 'bdate='.$startD); $this->setParameter(3, 'edate='.$endD); $params = implode('&', $this->params); $this->setLink('?'.$params, self::API_NAME_ADVANCED_REPORT); $curl = new Curl; $response = $curl->get($this->getLink(), '', $this->getHeader()); $xmlData = new SimpleXMLElement(XMLHelper::tidy($response)); return $xmlData; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function get_reports( $args = array() );", "function getReport() ;", "public function getReport() {}", "public function getReport() {}", "public function reportListing()\n {\n\t$strsql = \"SELECT r.*,rs.* FROM \" . TBL_REPORTS . \" r inner join \" . TBL_REPORTS_SUBMISSION . \" rs on r.report_id=rs.report_id where r.site_id='\" . $_SESSION['site_id'] . \"' and r.report_id='\".$_GET['rid'].\"'\";\n\t$objRs = $this->objDatabase->dbQuery($strsql);\n\tparent:: reportListing($objRs);\n }", "public function get_reports() {\n $data['results'] = $this->Report_Model->get_membership_payments();\n // print_r($data['results']);\n $this->render('list', $data);\n }", "public function getReports()\n {\n return RoadDamageReport::where('roaddamage_id', $this->id)->get();\n }", "public function offer_reports_get()\n {\n $this->verify_request(); \n $data = $this->Offer_model->offer_reports();\n $status = parent::HTTP_OK;\n $response = ['status' => $status, 'data' => $data];\n $this->response($response, $status);\n }", "public function analyticreport() {\n\n global $base_url;\n $results = \\Drupal::database()->select('short_links', 's')\n ->fields('s', ['id', 'long_url', 'identifier', 'short_url'])\n ->orderBy('s.id', 'DESC')\n ->execute();\n $header = [\n t('Sr.no'), t('Web URL'), t('Identifier'), t('Short URL'), t('Show Details'),\n ];\n $rows = [];\n $sr_no = 0;\n foreach ($results as $result) {\n $sr_no += 1;\n $id = $result->id;\n $long_url = $result->long_url;\n $identifier = $result->identifier;\n $short_url = $result->short_url;\n $rows[] = [\n $sr_no,\n $long_url,\n $identifier,\n $short_url,\n [\n 'data' => new FormattableMarkup('<a href=\":link\">@name</a>', [':link' => $base_url . '/show-detail/' . $identifier, '@name' => 'Details']),\n ],\n ];\n }\n return [\n '#theme' => 'table',\n '#header' => $header,\n '#rows' => $rows,\n ];\n }", "abstract public function extractReportDatas();", "public function withBasicReport()\n {\n return $this->basicReport();\n }", "public function withBasicReport()\n {\n return $this->basicReport();\n }", "public function getReports()\n {\n return $this->_getChildrenByName('report');\n }", "public function actionIndex()\n {\n\t\t\t\t\t\tif(!PermissionUtils::checkModuleActionPermission(\"Reports\",PermissionUtils::VIEW_ALL)){\n\t\t\t\tthrow new ForbiddenHttpException('You are not allowed to perform this action.');\n }\n $dataProvider = new ActiveDataProvider([\n 'query' => Reports::find(),\n ]);\n $model = new Reports();\n\n //we do pagination her \n\n\t\t if (isset($_REQUEST['Reports']) && !isset($_REQUEST['generateReport'])) {\n\t\t\t\t\t $model->reportID = $_REQUEST['Reports']['reportID'];\n return $this->render('index', [\n 'model' => $model, 'selectedReportID' => $_REQUEST['Reports']['reportID'],\n ]);\n exit;\n }\n\n\n\t\t\t\n\t\t\t\n\n if (isset($_REQUEST['Reports']) && isset($_REQUEST['generateReport'])) {\n //get values\n $reportID = $_REQUEST['Reports']['reportID'];\n if (strcmp($reportID, '') == 0 || $reportID == null) {\n // $response['REASON'] = 'Please select a report.';\n Yii::$app->session->addFlash('error', 'Please select a report.');\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n\t\t\t'model'=>$model\n ]); exit();\n }\t\t\n\t\t\t \n /*\n\t\t Set correct reporttype Filter\n\t\t $admin =1 \n\t\t client = 2\n\t\t \n\t\t */\n\t\t$cond= ['reportID' => (int) $reportID, 'reportTypeID' => 1];\n\t\tif(yii::$app->user->identity->clientID != Yii::$app->params['ADMIN_CLIENT_ID'])\n\t\t\t$cond['reportTypeID']= 2 ;\n\t\t\n\t\t \t$model =Reports::findOne($cond);\n\t\t\t\n\t\t\tif(!$model or $model==null)\n\t\t\t{\n\t\t\t\t $model = new Reports();\n\n\t\t\t\t\n\t Yii::$app->session->addFlash('error', 'Please select a report.');\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n\t\t\t'model'=>$model\n ]); exit();\n }\t\n\t\t\t\n $reportQuery = $model->reportQuery;\n \n $postData = $_REQUEST;\n unset($postData['Reports']);\n\t\t\tunset($postData['_csrf-backend']);\n unset($postData['generateReport']);\n\t\t\t/*IF not Admin, set the clientID to always be defined\n\t\t\t*/\n\t\tif(yii::$app->user->identity->clientID != Yii::$app->params['ADMIN_CLIENT_ID'])\n\t\t\t$postData['clientID'] = yii::$app->user->identity->clientID ;\n\t\t\n $queryStuff = $this->formulateFinalQuery($reportQuery, $postData);\n $formattedQuery = $queryStuff['finalQuery'];\n $params = $queryStuff['finalQueryParams'];\n// $formattedQuery = $this->formulateFinalQuery($reportQuery, $postData);\n // $rows = $this->getRowCount($formattedQuery, $params);\n $reportName = $model->reportName;\n $reportTitle = $model->reportName;\n if (isset($_REQUEST['dateFrom'])) {\n $reportName.=\": From date: \" . $_REQUEST['dateFrom'] . \"\";\n $reportTitle.= \" From date <span class='emTitle'>\" . $_REQUEST['dateFrom'] . \"</span>\";\n }\n\n if (isset($_REQUEST['dateTo'])) {\n $reportName.=\": to date: \" . $_REQUEST['dateTo'] . \"\";\n $reportTitle.= \": to date <span class='emTitle'>\" . $_REQUEST['dateTo'] . \"</span>\";\n }\n\t\t\t\n\t\t\t$connection = \\Yii::$app->db;\n$count = $connection->createCommand( \"select count(*)as x from ($formattedQuery) as n\")\n ->bindValues($params)->queryScalar();\n\n\n\t\t\t\t\n\t\t\t\t$dataProvider = new SqlDataProvider([\n\t\t\t\t'key' => 'id',\n 'sql' =>$formattedQuery,\n 'params' => $params,\n 'totalCount' => $count,\n 'pagination' => [\n 'pageSize' => 100,\n ],\n]);\n \t\t\treturn $this->render('index', [\n \t'model'=>$model,\n\t\t\t 'sql' =>$formattedQuery,\n 'params' => json_encode($params),\n\t\t\t'dataProvider'=>$dataProvider,\n\t\t\t'header' => $reportName,\n 'title' => $reportTitle,\n\t\t\t'id' => 'transactionReport' . $model->reportID,\n\t\t\t'columns'=>explode(\",\", $model->reportOutputColumns)\n ]);\n\t\t\n exit();\n\n\t\t\t\n\t\t\t\n\t\t }\n\n return $this->render('index', [\n \t'model'=>$model\n ]);\n }", "public static function getReports ($m, \n\t\t\t$n, \n\t\t\tShortDate $startDate, \n\t\t\tShortDate $endDate) {\n\t\t$GLOBALS[\"logger\"]->debug('getReports');\n\t\t// Basic where clause; get the head of each chain, signified by a null MASTER_ID\n\t\t$whereClause = \"master_id IS NULL\";\n\t\tif ($startDate) {\n\t\t\t$whereClause .= \" AND date >= timestamp '\" . $startDate->toDateTime('start') . \"'\";\n\t\t}\n\t\tif ($endDate) {\n\t\t\t$whereClause .= \" AND date <= timestamp '\" . $endDate->toDateTime('end') . \"'\";\n\t\t}\n\t\t$selstmt = \"SELECT * \" .\n\t\t\t\"FROM \" .\n\t\t\tself::REPORT_TABLE .\n\t\t\t\" WHERE \" .\n\t\t\t$whereClause .\n\t\t\t\" ORDER BY date DESC\";\n\t\tif ($m >= 0 && $n >= 0)\n\t\t\t$selstmt .= \" LIMIT $m, $n \";\n\t\t$GLOBALS[\"logger\"]->debug('selstmt = ' . $selstmt);\n\t\t$resultSet = ORM::for_table(self::REPORT_TABLE)->\n\t\t\traw_query($selstmt)->\n\t\t\tfind_many();\n\t\treturn self::getReports1 ($resultSet, $m, $n);\n\t}", "public function showHodReport()\n {\n $data = [];\n $query = \"\";\n\n if (!empty($_POST['academic_year'])) {\n $query .= \" academic_id = ? \";\n $this->acd_year = $this->verifyInput($_POST['academic_year']);\n $data[] = $this->acd_year;\n }\n if (!empty($_POST['year'])) {\n $query .= \" AND c.s_class_id = ? \";\n $this->year = $this->verifyInput($_POST['year']);\n $data[] = $this->year;\n }\n if (!empty($_POST['div'])) {\n $query .= \" AND c.div_id = ? \";\n $this->s_div = $this->verifyInput($_POST['div']);\n $data[] = $this->s_div;\n }\n if (!empty($_POST['sem_id']) || !empty($_POST['sem'])) {\n $query .= \" AND c.sem_id = ?\";\n $this->sem = isset($_POST['sem_id']) ? $this->verifyInput($_POST['sem_id']) : $this->verifyInput($_POST['sem']);\n $data[] = $this->sem;\n }\n if (!empty($_POST['class'])) {\n $query .= \" AND c.class_id = ? \";\n $this->class = $this->verifyInput($_POST['class']);\n $data[] = $this->class;\n }\n if ($_SESSION['role_id'] == 0) {\n if (isset($_POST['dept']) && !empty($_POST['dept'])) {\n $query .= \" AND c.dept_id = ? \";\n $this->dept = $this->verifyInput($_POST['dept']);\n $data[] = $this->dept;\n }\n } else if ($_SESSION['role_id'] == 1) {\n if (isset($_SESSION['dept'])) {\n $query .= \" AND c.dept_id = ? \";\n $this->dept = $this->verifyInput($_SESSION['dept']);\n $data[] = $this->dept;\n }\n } else {\n $query .= \" AND c.dept_id = ? \";\n $this->dept = $this->verifyInput($_SESSION['dept']);\n $data[] = $this->dept;\n }\n\n $result = $this->getStudentByDeptDivisionAndYear([$this->dept, $this->year, $this->s_div]);\n if (!$result) return json_encode(array(\"error\" => \"nostudent\"));\n\n if ((!empty($_POST['from-date']) && !empty($_POST['till-date'])) || ($_POST['from-date'] != \"\" && $_POST['till-date'] != \"\")) {\n $query .= \" AND DATE(date_time) >= DATE(?) AND DATE(date_time) <= DATE(?) \";\n $this->from_date = $this->verifyInput($_POST['from-date']);\n $this->till_date = $this->verifyInput($_POST['till-date']);\n $data[] = date('Y-m-d', strtotime($this->from_date));\n $data[] = date('Y-m-d', strtotime($this->till_date));\n\n $result = $this->getAttendanceByDate(\"date_time >= DATE(?) AND date_time <= DATE(?)\", [$this->dept, $this->year, $this->s_div, date('Y-m-d', strtotime($this->from_date)), date('Y-m-d', strtotime($this->till_date))]);\n\n if (!$result) return (array(\"error\" => \"noattend\"));\n } else if (!empty($_POST['from-date']) || $_POST['from-date'] != \"\") {\n $query .= \" AND DATE(date_time) >= DATE(?) \";\n $this->from_date = $this->verifyInput($_POST['from-date']);\n $data[] = date('Y-m-d', strtotime($this->from_date));\n $from_data = $this->getAttendanceByDate(\"DATE(date_time) >= DATE(?)\", [$this->dept, $this->year, $this->s_div, date('Y-m-d', strtotime($this->from_date))]);\n if (!$from_data) return (array(\"error\" => \"noattend\"));\n } else if (!empty($_POST['till-date']) || $_POST['till-date'] != \"\") {\n $query .= \" AND DATE(date_time) <= DATE(?) \";\n $this->till_date = $this->verifyInput($_POST['till-date']);\n $data[] = date('Y-m-d', strtotime($this->till_date));\n\n $till_data = $this->getAttendanceByDate(\"date_time <= DATE(?)\", [$this->dept, $this->year, $this->s_div, $this->sem_id, date('Y-m-d', strtotime($this->till_date))]);\n if (!$till_data) return (array(\"error\" => \"noattend\"));\n }\n\n $result = $this->getClassByYearDivisionAcademicAndDept([$_POST['academic_year'], $this->class, $this->s_div, $this->dept]);\n if (!$result) json_encode(array(\"error\" => \"noclass\"));\n else {\n //var_dump($_POST);\n //var_dump($query);\n $result = $this->getHodReportYearWise($query, $data);\n // if(empty($_POST['class_id'])){\n // $result = $this->getHodReportYearWise($query,$data);\n // }else{\n // $result[\"each_total\"], \"total\" => $result['total'], \"lectures\" =>$result['total_lectures']\n // } \n if (isset($result['e'])) return json_encode(array(\"error\" => \"notfound\"));\n return json_encode(array(\"error\" => \"none\", \"data\" => $result['report'], \"lectures\" => $result['lectures']));\n // if($from == 1 && $till == 1){\n // $query .= \" AND date_time >= DATE(?) AND date_time <= DATE(?) \";\n // $getTotal = $this->getReportTotalClassWise([(int)$this->class,$_POST['form-date'],$_POST['till-date']]);\n // }else if($from == 1 && $till == 0){\n // $query .= \" AND date_time >= DATE(?) \";\n // $getTotal = $this->getReportTotalClassWise([(int)$this->class,$_POST['form-date'], '9999-12-31']);\n // }else if($from = 0 && $till == 1){\n // $query .= \" AND date_time <= DATE(?) \";\n // $getTotal = $this->getReportTotalClassWise([(int)$this->class,'0000-00-00',$_POST['till-date']]);\n // }else{\n // $getTotal = $this->getReportTotalClassWise([(int)$this->class]);\n // }\n\n //return json_encode(array(\"error\" => \"none\",\"data\" => $result,\"total\" => $getTotal));\n }\n }", "public function getReports()\n {\n return $this->reports;\n }", "public function processReports();", "abstract public function buildReport();", "static function get_all_reports($includeDeleted=false)\n {\n global $DB;\n\n static $r;\n\n if(isset($r))\n return $r;\n\n $r = array();\n\n foreach($DB->get_fieldset_select('block_ilp_report','id','1 = 1 ') as $rid)\n {\n $report=static::from_id($rid);\n if(!$report->deleted or $includeDeleted)\n $r[$rid]=$report;\n }\n\n return $r;\n }", "public function show(Reports $reports)\n {\n //\n }", "public function APIreports()\n {\n $processed_fields= Processed_field::with('field','tractor')->paginate(15);\n\n return Processed_fieldResource::collection($processed_fields);\n }", "public function pcAttendance_report() {\n BackendMenu::setContext('Olabs.Oims', 'reports', 'pcattendance_report');\n $this->searchFormWidget = $this->createAttendanceSearchFormWidget();\n $this->pageTitle = 'Petty Contractor Attendance Report';\n $reports = array();\n\n $oimsSetting = \\Olabs\\Oims\\Models\\Settings::instance();\n\n $searchForm = $this->searchFormWidget;\n\n $this->vars['search'] = false;\n $this->vars['msg'] = false;\n $this->vars['searchFormWidget'] = $searchForm;\n $this->vars['reports'] = $reports;\n\n $this->vars['oimsSetting'] = $oimsSetting;\n }", "function getReportsMenu(){\r\n $level=2;\r\n $hr=new HabilitationReport();\r\n $user=getSessionUser();\r\n //$allowedReport=array();\r\n $allowedCategory=array();\r\n $lst=$hr->getSqlElementsFromCriteria(array('idProfile'=>$user->idProfile, 'allowAccess'=>'1'), false);\r\n $res=array();\r\n $listCateg=SqlList::getList('ReportCategory');\r\n $idMenuReport=SqlElement::getSingleSqlElementFromCriteria('Navigation', array('name'=>'navReports'));\r\n $menuReport=SqlElement::getSingleSqlElementFromCriteria('Menu', array('name'=>'menuReports'));\r\n foreach ($lst as $h) {\r\n $report=$h->idReport;\r\n $nameReport=SqlList::getNameFromId('Report', $report, false);\r\n if (! Module::isReportActive($nameReport)) continue;\r\n //$allowedReport[$report]=$report;\r\n $category=SqlList::getFieldFromId('Report', $report, 'idReportCategory',false);\r\n $allowedCategory[$category]=$category;\r\n }\r\n $c=1;\r\n $lstIdCate=array();\r\n $idReportMenu=$idMenuReport->id.$level.$menuReport->id;\r\n $menuReportKey=$level.'-'.numericFixLengthFormatter($idMenuReport->id,5).'-'.numericFixLengthFormatter($c,5);\r\n $object= array('id'=>$idReportMenu,'name'=>$menuReport->name,'idParent'=>$idMenuReport->id,'idMenu'=>$menuReport->id);\r\n $res[$menuReportKey]=array('level'=>$level,'objectType'=>'reportDirect','object'=>$object);\r\n foreach ($listCateg as $id=>$name) {\r\n if (isset($allowedCategory[$id])) {\r\n $c++;\r\n $cat=new ReportCategory($id);\r\n $lstIdCate[]=$id;\r\n $idReport=$idMenuReport->id.$level.$id;\r\n $key=$level.'-'.numericFixLengthFormatter($idMenuReport->id,5).'-'.numericFixLengthFormatter($c,5);\r\n $obj= array('id'=>$idReport,'name'=>$cat->name,'idParent'=>$idMenuReport->id);\r\n $res[$key]=array('level'=>$level,'objectType'=>'report','object'=>$obj);\r\n }\r\n }\r\n //===================\r\n //=================== lis of all report dependant of this categoryies\r\n\r\n $level++;\r\n $reportDirect= new Report();\r\n $lstCatId=(empty($lstIdCate))?\"0\":\"0\".implode(\",\", $lstIdCate);\r\n $where=\" idReportCategory in (\".$lstCatId.\")\";\r\n $reportList= $reportDirect->getSqlElementsFromCriteria(null,false,$where,\"file\");\r\n $nameFile=SqlList::getList('Report','file');\r\n $lstReportName=array();\r\n $lstNewNavMenu=array();\r\n foreach ($nameFile as $idN=>$nameFile){\r\n $lstReportName[]=substr($nameFile, 0,strpos($nameFile, '.php'));\r\n }\r\n $countNameFil=array_count_values($lstReportName);\r\n foreach ($countNameFil as $name=>$val){\r\n if($val==1)unset($countNameFil[$name]);\r\n else $lstNewNavMenu[]=$name;\r\n }\r\n storReports($reportList,$res, $lstNewNavMenu,$idMenuReport, $level);\r\n return $res;\r\n \r\n}", "public function reportListing_default()\n {\n\t$defaultreportnames = $this->reportNames(); $rid = $defaultreportnames->fetch_object();\n\t$strsql = \"SELECT r.*,rs.* FROM \" . TBL_REPORTS . \" r inner join \" . TBL_REPORTS_SUBMISSION . \" rs on r.report_id=rs.report_id where r.site_id='\" . $_SESSION['site_id'] . \"' and r.report_id='\".$rid->report_id.\"'\";\n\t$objRs = $this->objDatabase->dbQuery($strsql);\n\treturn $objRs;\n }", "public function reports(){\n $reports = DB::table('reports')->paginate(25);\n $suggestions = DB::table('category_suggestion')->paginate(25);\n $categories = DB::table('categories')->paginate(25);\n return view('admin.reports')->with('reports', $reports)\n ->with('suggestions', $suggestions)\n ->with('categories', $categories);\n }", "abstract public function getDetailedReportName();", "public function getWorkReports()\n {\n return $this->postRequest('GetWorkReports');\n }", "public function show(Generalreport $generalreport)\n {\n //\n }", "public static function get_form($args, $nid, $response=null) {\n iform_load_helpers(array('report_helper','map_helper'));\n $readAuth = report_helper::get_read_auth($args['website_id'], $args['password']);\n $sharing='reporting';\n $reportOptions = array_merge(\n iform_report_get_report_options($args, $readAuth),\n array(\n 'reportGroup' => 'explore',\n 'rememberParamsReportGroup' => 'explore',\n 'paramsOnly'=>true,\n 'paramsInMapToolbar'=>true,\n 'sharing'=>$sharing,\n 'paramsFormButtonCaption'=>lang::get('Filter'),\n 'rowId' => 'occurrence_id',\n )\n );\n iform_report_apply_explore_user_own_preferences($reportOptions);\n $reportOptions['extraParams']['limit']=3000;\n $r = report_helper::report_grid($reportOptions);\n\n $r .= report_helper::report_map(array(\n 'readAuth' => $readAuth,\n 'dataSource'=>$args['report_name'],\n 'extraParams'=>$reportOptions['extraParams'],\n 'paramDefaults'=>$reportOptions['paramDefaults'],\n 'autoParamsForm'=>false,\n 'reportGroup' => 'explore',\n 'rememberParamsReportGroup' => 'explore',\n 'clickableLayersOutputMode' => 'report',\n 'sharing'=>$sharing,\n 'rowId' => 'occurrence_id',\n 'ajax'=>TRUE\n ));\n $options = array_merge(\n iform_map_get_map_options($args, $readAuth),\n array(\n 'featureIdField' => 'occurrence_id',\n 'clickForSpatialRef'=>false,\n 'reportGroup' => 'explore',\n 'toolbarDiv' => 'top'\n )\n );\n $olOptions = iform_map_get_ol_options($args);\n $r .= map_helper::map_panel($options, $olOptions);\n $downloadOwnDataOnlyInArgs = isset($args['downloadOwnDataOnly']) && $args['downloadOwnDataOnly'];\n $ownDataValueInPost = isset($_POST['explore-ownData']);\n $exploreOwnDataEnabledInPost = $ownDataValueInPost && $_POST['explore-ownData']==='1';\n $reportParamPresetsSetToOwnData = isset($reportOptions['extraParams']['ownData']) && $reportOptions['extraParams']['ownData']==='1';\n $reportParamDefautsSetToOwnData = isset($reportOptions['paramDefaults']['ownData']) && $reportOptions['paramDefaults']['ownData']==='1';\n $allowDownload = !$downloadOwnDataOnlyInArgs\n || $reportParamPresetsSetToOwnData\n || $exploreOwnDataEnabledInPost\n || (!$ownDataValueInPost && $reportParamDefautsSetToOwnData);\n $reportOptions = array_merge(\n $reportOptions,\n array(\n 'id' => 'explore-records',\n 'paramsOnly'=>false,\n 'autoParamsForm'=>false,\n 'downloadLink'=>$allowDownload,\n 'rowClass' => 'certainty{certainty}'\n )\n );\n if (isset($args['includeEditLink']) && $args['includeEditLink'] && !empty($args['includeEditLinkPath']))\n $reportOptions['columns'][] = array(\n 'display' => 'Actions',\n 'actions'=>array(\n array('caption' => 'edit','url'=>url($args['includeEditLinkPath']),'urlParams'=>array('occurrence_id' => '{occurrence_id}'),'visibility_field' => 'belongs_to_user')\n )\n );\n $r .= report_helper::report_grid($reportOptions);\n return $r;\n\n }", "function reports($args){\n $this->view->add('page_title','Reports');\n \n\t\t//Set tool box\n\t\tif( $args['tool'] == null ){\n $tool = 'display';\n } else {\n $tool = $args['tool'];\n }\n\t\t if( $func = $this->reports_toolbox($tool,$this) ) {\n \n // check for success, default to no\n $success = false;\n \n // choose tool and execute\n $success = $func($this);\n }\n \n // add self link\n $this->view->add('self_link',\n $this->app->form_path('admin/reports')\n );\n\t}", "public static function getReports()\n {\n return ReportServices::getReports();\n }", "public function getAllReporteGeneral() {\r\n\t\t$criteria=new CDbCriteria;\r\n\t\t$criteria->select = 't.DES, t.COD, upje.CED AS C, pers.NOM AS N, tipos.DES AS D, SUM( pob.HOM ) + SUM( pob.MUJ ) AS P';\r\n\t\t$criteria->join = 'INNER JOIN pob ON t.COD = pob.COD\r\n\t INNER JOIN upje ON t.COD = upje.COD\r\n\t INNER JOIN pers ON upje.CED = pers.CED\r\n\t INNER JOIN tipos ON upje.CODT = tipos.CODT';\r\n\t\t$criteria->group= \"t.COD\";\r\n\t\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t\t'criteria'=>$criteria,\r\n\t\r\n\t\t));\r\n\t}", "function runReport (){\n\t\tif(!empty($this->params['form']))\n\t\t{\n\t\t\tif($this->params['form']=='allData'){\n\t\t\t\tindex();\n\t\t\t}else {\n\t\t\t\tindex();\n\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t}\n\t}", "function runReport (){\n\t\tif(!empty($this->params['form']))\n\t\t{\n\t\t\tif($this->params['form']=='allData'){\n\t\t\t\tindex();\n\t\t\t}else {\n\t\t\t\tindex();\n\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t}\n\t}", "public static function getReportsForClip($clipid, \n\t\t\t$m, \n\t\t\t$n, \n\t\t\tShortDate $startDate, \n\t\t\tShortDate $endDate) {\n\t\t$GLOBALS[\"logger\"]->debug('getReportsForClip');\n\t\t$selstmt = \"SELECT * \" .\n\t\t\t\"FROM \" .\n\t\t\tself::REPORT_TABLE .\n\t\t\t\" WHERE master_id IS NULL AND clip_id = '$clipid' \" .\n\t\t\t\"ORDER BY date DESC \" .\n\t\t\t\"LIMIT $m, $n \";\n\t\t$GLOBALS[\"logger\"]->debug('selstmt = ' . $selstmt);\n\t\t$resultSet = ORM::for_table(self::REPORT_TABLE)->\n\t\t\traw_query($selstmt)->\n\t\t\tfind_many();\n\t\t$GLOBALS[\"logger\"]->debug('returned from query');\n\t\treturn self::getReports1 ($resultSet, $m, $n);\n\t}", "public function index()\n {\n return Report::all();\n }", "public function overviewAction(){\n \t$analytics = new Pas_Analytics_Gateway($this->_ID, $this->_pword);\n \t$analytics->setProfile(25726058);\n \t$timeframe = new Pas_Analytics_Timespan(); \n $timeframe->setTimespan($this->_getParam('timespan'));\n \t$dates = $timeframe->getDates();\n \t$analytics->setStart($dates['start']);\n \t$analytics->setEnd($dates['end']);\n \t$analytics->setMetrics(\n array(\n Zend_Gdata_Analytics_DataQuery::METRIC_VISITORS,\n Zend_Gdata_Analytics_DataQuery::METRIC_PAGEVIEWS,\n Zend_Gdata_Analytics_DataQuery::METRIC_UNIQUE_PAGEVIEWS,\n Zend_Gdata_Analytics_DataQuery::METRIC_AVG_TIME_ON_PAGE,\n Zend_Gdata_Analytics_DataQuery::METRIC_ENTRANCES,\n Zend_Gdata_Analytics_DataQuery::METRIC_EXITS,\n Zend_Gdata_Analytics_DataQuery::METRIC_BOUNCES\n \t\t));\n \t$analytics->setDimensions(\n array(\n Zend_Gdata_Analytics_DataQuery::DIMENSION_PAGE_TITLE,\n Zend_Gdata_Analytics_DataQuery::DIMENSION_PAGE_PATH,\t\t\n \t\t));\n \tif(is_null($this->_getParam('filter'))){\n \t$analytics->setFilters(\n array(\n Zend_Gdata_Analytics_DataQuery::DIMENSION_PAGE_PATH \n . Zend_Gdata_Analytics_DataQuery::REGULAR_NOT . 'forum'\n\t ));\n\t } else {\n \t$analytics->setFilters(\n array(\n Zend_Gdata_Analytics_DataQuery::DIMENSION_PAGE_PATH \n . Zend_Gdata_Analytics_DataQuery::REGULAR . '/'\n . $this->_getParam('filter')\n\t ));\n\t }\n \t$analytics->setMax(20);\n \t$analytics->setSort(Zend_Gdata_Analytics_DataQuery::METRIC_VISITORS);\n \t$analytics->setSortDirection(true);\n \t$analytics->setStartIndex($this->getStart());\n \t$this->view->results = $analytics->getData();\n $paginator = Zend_Paginator::factory((int)$analytics->getTotal());\n $paginator->setCurrentPageNumber((int)$this->getPage())\n\t\t\t->setItemCountPerPage((int)self::MAX_RESULTS);\n $this->view->paginator = $paginator;\n }", "public function getReports() {\n return $this->model->all()->toArray();\n }", "public function getReports()\n\t{\n\t\t$this->load->model('admin/inceptra_admin_model');\n\t\t$res=$this->inceptra_admin_model->get_report();\n\t\t\n\t\t$this->load->helper('file'); \n\t\t$this->load->helper(array('dompdf', 'file'));\n\t\t$head=\"LIST OF Candidates and there Marks\";\n\t\t$html=\"<center><h3>\".$head.\"</h3></center><br/>\";\n\t\t\t\t\n\t\t$html.='<center><table width=\"600\">';\n\t\t$html.='<tr><th align=\"left\">Username</th><th align=\"left\">Multichoice</th><th align=\"left\">Pickup1</th><th align=\"left\">Pickup2</th><th align=\"left\">Match Catch</th><th align=\"left\">Toal Marks</th></tr>';\n\t\tforeach($res as $r)\n\t\t{\n\t\t$html.='<tr><td>'.$r->r_id.'</td><td>'.$r->username.'</td><td>'.$r->multichoice.'</td><td>'.$r->pickup1marks.'</td><td>'.$r->pickup2marks.'</td><td>'.$r->matchcatch.'</td><td>'.$r->totalmarks.'</td></tr>';\n\t\t\n\t\t}\n\t\t$html.='</table></center>';\n\t\t\t\t\n \tpdf_create($html, 'pdfreport');\n write_file('name', $data);\n\t}", "public function showBetweenReport(){\n $reports = false;\n return view('dashboard.reports',compact('reports'));\n }", "function getArticleReport($journalId) {\n\t\t$primaryLocale = Locale::getPrimaryLocale();\n\t\t$locale = Locale::getLocale();\n\n\t\t$result =& $this->retrieve(\n\t\t\t'SELECT\n\t\t\t\ta.article_id AS article_id,\n\t\t\t\tCOALESCE(asl1.setting_value, aspl1.setting_value) AS title,\n\t\t\t\tCOALESCE(asl2.setting_value, aspl2.setting_value) AS abstract,\n\t\t\t\tu.first_name AS fname,\n\t\t\t\tu.middle_name AS mname,\n\t\t\t\tu.last_name AS lname,\n\t\t\t\tu.email AS email,\n\t\t\t\tu.affiliation AS affiliation,\n\t\t\t\tu.country AS country,\n\t\t\t\tu.phone AS phone,\n\t\t\t\tu.fax AS fax,\n\t\t\t\tu.url AS url,\n\t\t\t\tu.mailing_address AS address,\n\t\t\t\tCOALESCE(usl.setting_value, uspl.setting_value) AS biography,\n\t\t\t\tCOALESCE(sl.setting_value, spl.setting_value) AS section_title,\n\t\t\t\ta.language AS language\n\t\t\tFROM\n\t\t\t\tarticles a\n\t\t\t\t\tLEFT JOIN users u ON a.user_id=u.user_id\n\t\t\t\t\tLEFT JOIN user_settings uspl ON (u.user_id=uspl.user_id AND uspl.setting_name = ? AND uspl.locale = ?)\n\t\t\t\t\tLEFT JOIN user_settings usl ON (u.user_id=usl.user_id AND usl.setting_name = ? AND usl.locale = ?)\n\t\t\t\t\tLEFT JOIN article_settings aspl1 ON (aspl1.article_id=a.article_id AND aspl1.setting_name = ? AND aspl1.locale = ?)\n\t\t\t\t\tLEFT JOIN article_settings asl1 ON (asl1.article_id=a.article_id AND asl1.setting_name = ? AND asl1.locale = ?)\n\t\t\t\t\tLEFT JOIN article_settings aspl2 ON (aspl2.article_id=a.article_id AND aspl2.setting_name = ? AND aspl2.locale = ?)\n\t\t\t\t\tLEFT JOIN article_settings asl2 ON (asl2.article_id=a.article_id AND asl2.setting_name = ? AND asl2.locale = ?)\n\t\t\t\t\tLEFT JOIN section_settings spl ON (spl.section_id=a.section_id AND spl.setting_name = ? AND spl.locale = ?)\n\t\t\t\t\tLEFT JOIN section_settings sl ON (sl.section_id=a.section_id AND sl.setting_name = ? AND sl.locale = ?)\n\t\t\tWHERE\n\t\t\t\ta.journal_id = ?\n\t\t\tORDER BY\n\t\t\t\ttitle',\n\t\t\tarray(\n\t\t\t\t'biography',\n\t\t\t\t$primaryLocale,\n\t\t\t\t'biography',\n\t\t\t\t$locale,\n\t\t\t\t'title',\n\t\t\t\t$primaryLocale,\n\t\t\t\t'title',\n\t\t\t\t$locale,\n\t\t\t\t'abstract',\n\t\t\t\t$primaryLocale,\n\t\t\t\t'abstract',\n\t\t\t\t$locale,\n\t\t\t\t'title',\n\t\t\t\t$primaryLocale,\n\t\t\t\t'title',\n\t\t\t\t$locale,\n\t\t\t\t$journalId\n\t\t\t)\n\t\t);\n\t\t$articlesReturner =& new DBRowIterator($result);\n\n\t\t$result =& $this->retrieve(\n\t\t\t'SELECT\tMAX(ed.date_decided) AS date,\n\t\t\t\ted.article_id AS article_id\n\t\t\tFROM\tedit_decisions ed,\n\t\t\t\tarticles a\n\t\t\tWHERE\ta.journal_id = ? AND\n\t\t\t\ta.article_id = ed.article_id\n\t\t\tGROUP BY ed.article_id',\n\t\t\tarray($journalId)\n\t\t);\n\t\t$decisionDatesIterator =& new DBRowIterator($result);\n\t\t$decisions = array();\n\t\t$decisionsReturner = array();\n\t\twhile ($row =& $decisionDatesIterator->next()) {\n\t\t\t$result =& $this->retrieve(\n\t\t\t\t'SELECT\tdecision AS decision,\n\t\t\t\t\tarticle_id AS article_id\n\t\t\t\tFROM\tedit_decisions\n\t\t\t\tWHERE\tdate_decided = ? AND\n\t\t\t\t\tarticle_id = ?',\n\t\t\t\tarray(\n\t\t\t\t\t$row['date'],\n\t\t\t\t\t$row['article_id']\n\t\t\t\t)\n\t\t\t);\n\t\t\t$decisionsReturner[] =& new DBRowIterator($result);\n\t\t\tunset($result);\n\t\t}\n\n\t\treturn array($articlesReturner, $decisionsReturner);\n\t}", "public function listing_camp($stat='',$campid='',$adv='',$start=0)\n\t{\n\t\t/*-------------------------------------------------------------\n\t\t \tBreadcrumb Setup Start\n\t\t -------------------------------------------------------------*/\n\t\t$link = breadcrumb();\n\t\t$data['breadcrumb'] = $link;\n /*-------------------------------------------------------------\n\t\t \tBanner Based on Campaign Id\n\t\t -------------------------------------------------------------*/\n $data['sel_camp'] = $campid;\n\t\t\t\t$data['sel_adv'] = $adv;\n $data['sel_stat'] = $stat;\n\t\t/*--------------------------------------------------------------\n\t\t \tPagination Config Setup\n\t\t ---------------------------------------------------------------*/\n\t\t$limit = $this->page_limit;\n\t\tif($campid!='')\n {\n if($stat=='active')\n {\n $status = 0;\n $where_arr = array('ox_banners.campaignid'=>$campid,'ox_banners.status'=>$status);\n }\n elseif($stat=='inactive')\n {\n $status = 1;\n $where_arr = array('ox_banners.campaignid'=>$campid,'ox_banners.status'=>$status);\n }\n else\n {\n $stat = 'all';\n $where_arr = array('ox_banners.campaignid'=>$campid);\n }\n }\n else\n {\n if($stat=='active')\n {\n $status = 0;\n $where_arr = array('ox_banners.status'=>$status);\n }\n elseif($stat=='inactive')\n {\n $status = 1;\n $where_arr = array('ox_banners.status'=>$status);\n }\n else\n {\n $stat = 'all';\n $where_arr = array();\n }\n }\n //print_r($where_arr);exit;\n\t\t$list_data = $this->mod_banner->get_banners($where_arr);\n\t\t\n\t\t/*--------------------------------------------------------------------------\n \t* Get Reports for each banners based on selected Campaigns and Advertiser\n \t* -------------------------------------------------------------------------*/\n\n\n\t\t$search_arr = array();\n\t\t$search_arr['from_date'] =\t$this->mod_statistics->get_start_date();\n\t\t$search_arr['to_date'] =\tdate(\"Y/m/d\");\n\t\t$search_arr['search_type'] =\t\"all\";\n\t\t\n\t\t$data['stat_data'] = $this->mod_statistics->get_statistics_for_banners($search_arr);\n\t\t\n\t\t/* Total Banners Count */\n\t\t$data['tot_list'] = $list_data;\n\n\t\t$config['per_page'] \t= $limit;\n\t\tif($campid!='')\n {\n $config['base_url'] \t= site_url(\"admin/inventory_banners/listing_camp/\".$stat.\"/\".$campid);\n $config['uri_segment'] \t= 6;\n }\n else\n {\n $config['base_url'] \t= site_url(\"admin/inventory_banners/listing_camp/\".$stat);\n $config['uri_segment'] \t= 5;\n }\n\t\t$config['total_rows'] \t= count($list_data);\n\t\t$config['next_link'] \t= $this->lang->line(\"pagination_next_link\");\n\t\t$config['prev_link'] \t= $this->lang->line(\"pagination_prev_link\");\n\t\t$config['last_link'] \t= $this->lang->line(\"pagination_last_link\");\n\t\t$config['first_link'] \t= $this->lang->line(\"pagination_first_link\");\n\t\t$this->pagination->initialize($config);\n\t\t$page_data = $this->mod_banner->get_banners($where_arr,$start,$limit);\n\t\t$data['banner_list']\t=\t$page_data;\n\n\t\t/*-------------------------------------------------------------\n\t\t \tPage Title showed at the content section of page\n\t\t -------------------------------------------------------------*/\n\t\t$data['page_title'] \t= $this->lang->line('label_inventory_banner_page_title');\n\n\t\t/*-------------------------------------------------------------\n\t\t \tTotal Counts for Active and Inactive Banners\n\t\t--------------------------------------------------------------*/\n if($campid!='')\n {\n $where_tot = array('ox_banners.campaignid'=>$campid);\n $where_act = array('ox_banners.campaignid'=>$campid,'ox_banners.status'=>0);\n $where_inact = array('ox_banners.campaignid'=>$campid,'ox_banners.status'=>1);\n }\n else\n {\n $where_tot = array();\n $where_act = array('ox_banners.status'=>0);\n $where_inact = array('ox_banners.status'=>1);\n }\n\n\t\t$tot_data = $this->mod_banner->get_banners($where_tot);\n\t\tif($tot_data!=FALSE)\n\t\t{\n\t\t\t$data['tot_data'] = count($tot_data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['tot_data'] = 0;\n\t\t}\n\t\t\n\t\t$active_data = $this->mod_banner->get_banners($where_act);\n\t\tif($active_data!=FALSE)\n\t\t{\n\t\t\t$data['active_data'] = count($active_data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['active_data'] = 0;\n\t\t}\n\t\t\n\t\t$inactive_data = $this->mod_banner->get_banners($where_inact);\n\n\t\tif($inactive_data!=FALSE)\n\t\t{\n\t\t\t$data['inactive_data'] = count($inactive_data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['inactive_data'] = 0;\n\t\t}\n\n\t\t/*-------------------------------------------------------------\n\t\t \tEmbed current page content into template layout\n\t\t -------------------------------------------------------------*/\n\t\t$data['page_content']\t= $this->load->view(\"admin/banners/list\",$data,true);\n\t\t$this->load->view('page_layout',$data);\n\n\t}", "public function index()\n\t{\n\t\t$reports = Report::with('report_type')->orderBy('created_at','desc')->get();\n return $reports;\n\t}", "public function reports()\n {\n return $this->hasMany(MICheckReport::class, 'target', 'gtin_code');\n }", "function archimedes_build_report() {\n global $databases;\n\n $owl = new Archimedes('drupal', variable_get('site_mail', FALSE), archimedes_get_token());\n\n $owl->createField('title', variable_get('site_name', \"Drupal\"));\n $owl->createField('field_drupal_version', VERSION);\n\n // This allows site instances of the same project to be\n // related. For example my.site.com may also have staging.my.site.com\n // and we don't want the reports to clash, but grouping these sites\n // is still useful.\n $owl->createField('field_common_hash', variable_get('archimedes_common_key', ''));\n\n if (variable_get('archimedes_description', '') != '') {\n $nid = arg(1,drupal_get_normal_path(variable_get('archimedes_description', 'node')));\n $node = node_load($nid);\n $body = trim(substr(drupal_html_to_text($node->body,array('b','strong','i','em','p')),0,500));\n $owl->createField('body', $body);\n } else {\n $owl->createField('body', variable_get('site_mission', 'No description has been set.'));\n }\n\n // If Drush (or some other CLI passed method) is used to \n // run cron. You'll need to ensure a correct servername is\n // passed to PHP. With drush, use -l http://mysite.com.\n $owl->createField('field_servername', url('', array('absolute' => 1)));\n\n // The location where Drupal believes it resides.\n $owl->createField('field_webroot', DRUPAL_ROOT);\n\n // Build an understanding of the databases Drupal\n // can connect too. At this stage, Archimedes only\n // reports on the default connections, i.e, master\n // slave databases for Drupal only.\n $values = array();\n $connections = array();\n foreach($databases['default'] as $key => $connection) {\n if ($key == 'slave') {\n foreach ($connection as $slave) {\n $connections[] = $slave;\n }\n }\n else {\n $connections[] = $connection;\n }\n }\n\n foreach ($connections as $url) {\n //format into url like drupal 6\n $db_url = $url['driver'] . '://' . $url['username'] . ':' . $url['password'] . '@' . $url['host'] . '/' . $url['database'];\n $db = parse_url($db_url);\n if (!isset($database_name)) {\n $database_name = substr($db['path'],1);\n $owl->createField('field_dbname', $database_name);\n }\n $dbhost = ($db['host'] == 'localhost' || $db['host'] == '127.0.0.1') ? 'localhost' : $db['host'];\n $values[] = archimedes_value($dbhost,'nodereference')->addNode(array('title' => $dbhost, 'type' => 'host'));\n }\n\n $owl->createField('field_dbhost', $values)\n ->invokeFacet();\n\n $user = array(\n 'type' => 'mail',\n 'mailto' => 'mailto:' . db_query(\"SELECT u.mail FROM {users} u WHERE uid = 1 LIMIT 1\")->fetchField(),\n );\n $value = archimedes_value($user['mailto'],'userreference')\n ->addUser($user);\n $owl->createField('field_users', array($value))\n ->invokeFacet();\n\n // Graphable data.\n $users = archimedes_value(db_query(\"SELECT COUNT(uid) as count FROM {users}\")->fetchField() - 1, 'dataset')->setTitle('Users');\n $nodes = archimedes_value(db_query(\"SELECT COUNT(nid) as count FROM {node}\")->fetchField(), 'dataset')->setTitle('Nodes');\n $revisions = archimedes_value(db_query(\"SELECT COUNT(nid) as count FROM {node_revision}\")->fetchField(), 'dataset')->setTitle('Revisions');\n $owl->createField('field_c_dataset', array($nodes, $revisions, $users));\n\n $modules = $themes = array();\n foreach (module_list() as $module) {\n $info = drupal_parse_info_file(drupal_get_path('module', $module) . '/' . $module . '.info');\n $node = array(\n 'title' => (isset($info['name']) ? $info['name'] : ''),\n 'body' => (isset($info['description']) ? $info['description'] : ''),\n 'field_name' => $module,\n 'field_dru_pkg' => (isset($info['package']) ? $info['package'] : ''),\n 'field_dru_proj' => (isset($info['project']) ? $info['project'] : 'drupal'),\n 'field_mod_version' => (isset($info['version']) ? $info['version'] : ''),\n 'field_mod_url' => (isset($info['project status url']) ? $info['project status url'] : ''),\n 'type' => 'drupal_module',\n );\n if (empty($node['field_dru_proj']) && !empty($node['field_dru_pkg']) && (strpos($node['field_dru_pkg'], 'Core -') !== FALSE)) {\n $node['field_dru_proj'] = 'drupal';\n }\n $value = archimedes_value($node['title'], 'drupalmod')\n ->addNode($node);\n $modules[] = $value;\n }\n\n $owl->createField('field_drupal_mod', $modules)\n ->invokeFacet();\n\n\n $result = db_query(\"SELECT name FROM {system} WHERE status = 1 AND type = 'theme'\");\n while ($theme = $result->fetchField()) {\n $info = drupal_parse_info_file(drupal_get_path('theme', $theme) . '/' . $theme . '.info');\n $node = array(\n 'title' => (isset($info['name']) ? $info['name'] : ''),\n 'body' => (isset($info['description']) ? $info['description'] : ''),\n 'field_name' => $theme,\n 'field_mod_version' => (isset($info['version']) ? $info['version'] : ''),\n 'field_dru_proj' => (isset($info['project']) ? $info['project'] : 'drupal'),\n 'field_mod_url' => (isset($info['project status url']) ? $info['project status url'] : ''),\n 'type' => 'drupal_theme',\n );\n if (empty($node['field_dru_proj']) && in_array($theme, array('bluemarine', 'chameleon', 'garland', 'marvin', 'minnelli', 'pushbutton'))) {\n // Unfortunately, there's no way to tell if a theme is part of core,\n // so we must hard-code a list here.\n $node['field_dru_proj'] = 'drupal';\n }\n\n $value = archimedes_value($node['title'], 'drupalmod')\n ->addNode($node);\n\n $themes[] = $value;\n }\n\n $owl->createField('field_drupal_theme', $themes)\n ->invokeFacet();\n\n $environment = array_shift(environment_current(NULL,NULL,TRUE));\n\n $owl->createField('field_site_env', $environment['label']);\n\n $ignore = array('#(\\w*/)*sites/\\w*/files#', '#.*\\.(git|svn|bzr|cvs)/.*#');\n \n // The point of the directory hash is to record the state of the deployed code base.\n // If the code base changes, then the site could have been redeployed or hacked! However,\n // in development scenarios, the code changes very frequently so we don't care to change\n // it.\n $dir_hash = archimedes_directory_hash(DRUPAL_ROOT, $ignore);\n $owl->createField('field_directory_hash', $dir_hash);\n\n if (variable_get('archimedes_use_unsafe_collection', FALSE)) {\n $collect = new ArchimedesDrupalUnsafeCollection($owl);\n $collect->servername()\n ->database_size()\n ->storage_usage();\n }\n\n // Allow other modules to add data via hook_archimedes.\n drupal_alter('archimedes', $owl);\n \n return $owl;\n}", "public function reports()\n\t{\n\t\treturn new Engine_ProxyObject($this, Engine_Api::_() -> getDbtable('reports', 'core'));\n\t}", "function get_all_reports()\r\n {\r\n return $this->db->get('reports')->result_array();\r\n }", "public function actionInquiryReport()\n {\n $s_date='';\n $e_date='';\n $export = Yii::$app->request->get('export');\n $search = Yii::$app->request->get('search');\n if(isset($export) && !isset($search)) {\n $this->InquiryExport();\n }\n else{\n if (isset(Yii::$app->request->queryParams['BookingSearch']['start_date']))\n $s_date = Yii::$app->request->queryParams['BookingSearch']['start_date'];\n if (isset(Yii::$app->request->queryParams['BookingSearch']['end_date']))\n $e_date = Yii::$app->request->queryParams['BookingSearch']['end_date'];\n if($s_date=='')\n $s_date = date(\"M-d-Y\");\n if($e_date=='')\n $e_date = date(\"M-d-Y\");\n $searchModel = new RecordInquirySearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('inquiry_index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 's_date' => $s_date,\n 'e_date' => $e_date,\n ]);\n }\n\n }", "function woocommerce_admin_reports( $reports ) {\n $reports[ 'customers' ][ 'reports' ][ 'customer-serial-numbers' ] = array(\n 'title' => __( 'Customer Serial Numbers', 'serial-numbers' ),\n 'description' => '',\n 'hide_title' => true,\n 'callback' => array( 'WC_Admin_Reports', 'get_report' )\n );\n $reports[ 'orders' ][ 'reports' ][ 'product-serial-numbers' ] = array(\n 'title' => __( 'Product Serial Numbers', 'serial-numbers' ),\n 'description' => '',\n 'hide_title' => true,\n 'callback' => array( 'WC_Admin_Reports', 'get_report' )\n );\n $reports[ 'stock' ][ 'reports' ][ 'serial-numbers' ] = array(\n 'title' => __( 'Serial Numbers', 'serial-numbers' ),\n 'description' => '',\n 'hide_title' => true,\n 'callback' => array( 'WC_Admin_Reports', 'get_report' )\n );\n return $reports;\n }", "public static function getReportHome()\n {\n$data = User::findBySql(\"SELECT COUNT(ei.ei_id) as totalstudent, i.*,ei.ei_graduation_year FROM university u \".\n \"JOIN institution i on u.uni_id = i.uni_id \".\n \"JOIN education_information ei on i.inst_id = ei.inst_id \".\n \"WHERE ei.ei_graduation_year BETWEEN '2010' AND '2014' AND u.uni_status = '1' \".\n \"AND i.inst_status = '1' GROUP BY ei.inst_id,ei.ei_graduation_year\")\n ->asArray()\n ->all();\n\n return $data;\n }", "abstract protected function grabReport( $report_id );", "public function index()\n {\n if (!Auth::user()->provider) return $this->errorUnauthorized();\n $Ad = Ads::Location('upNewsReports')->first();\n return $this->respondWithItem([\n 'provider' => new ProviderLargeResource(Auth::user()->provider),\n 'Ad' => $Ad\n ]);\n }", "public function getPageDetails()\n\t{\n\t\t$v = new View(0);\n\t\treturn $v->getAllRecords( FALSE );\n\t\t\n\t}", "public function getList()\n {\n if ($_SERVER[\"REQUEST_METHOD\"] != \"GET\")\n {\n echo $this->encodeJson(\"Wrong resource call\", 0xDEAD, NULL);\n\n return;\n }\n\n $report_arr = $this->inspection->readAllReport();\n\n if (count($report_arr) > 0)\n {\n echo $this->encodeJson(\"Inspections found.\", 0x00, $report_arr);\n }\n else\n {\n echo $this->encodeJson(\"No inspections found.\", 0xD1ED, NULL);\n }\n }", "function getSiteReport($siteID)\r\n\t{\r\n\t}", "public function index()\n {\n $members = Members::whereHas('programs', function ($query) {\n $query->whereIn('ed_level', ['Basic Education']);\n })->get();\n\n $formula = Formula::where('formula_id','Basic Education')->first();\n $bedpieces = explode(\" \", $formula->formula);\n $variabled = Variable::whereIn('code',$bedpieces)->where('ed_type', 'Basic Education')->get();\n return view('main.membershipenroll.bed.index')->with('members',$members)->with('formula',$formula)->with('bedpieces',$bedpieces)->with('variabled',$variabled);\n }", "private function basicReport()\n {\n return $this->report->count();\n }", "public function reports()\n\t{\n\t\treturn $this->belongsToMany('App\\Report');\n\t}", "protected function _getAvailableReports()\n {\n $factory = $this->getContainer()->get('orkestra.report_factory');\n\n return $factory->getReports();\n }", "public function index()\n {\n $processed_fields= Processed_field::with('field','tractor')->get();\n\n return view('reports', compact('processed_fields'));\n\n\n }", "protected function get_reports( $args = array() ) {\n\t\t$defaults = array(\n\t\t\t'post_id'\t\t=> $this->post_id,\n\t\t\t//'post_status' => 'completed'\n\t\t);\n\t\t$args = wp_parse_args( $args, $defaults );\n\n\t\treturn APP_Report_Factory::get_reports( $args );\n\t}", "public function getOverview();", "function getOverview() ;", "public function index()\n {\n $reports = Report::active()->newest()->relation()->get();\n\n return response()->json([\n 'code' => 200,\n 'message' => 'OK',\n 'data' => $reports\n ]);\n }", "public function advancedSearchDataProvider()\n {\n return $this->getApiRequestsData(\n __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'advanced_requests'\n );\n }", "function getViewableReports($conn){\n\t$sql = \"SELECT PlanId, plan.Name AS PlanName, CompanyName FROM plan JOIN client ON plan.ClientId = client.ClientId WHERE plan.UserId = :userID\";\n\n\n\t$userID = getLoggedInID();\n\n\t\n\t$sth = $conn->prepare($sql);\n\t$sth->bindParam(':userID', $userID, PDO::PARAM_INT, 11);\n\t$sth->execute();\n\t\n\t$rows = array();\n\t\n\twhile($r = $sth->fetch(PDO::FETCH_ASSOC)) {\n\t\t$rows[] = $r;\n\t}\n\treturn $rows;\n}", "public function index()\n {\n //$results = DB::table('individual_report_cicl')->select('id', 'section', 'key_indicators_of_performance', 'total', 'cr', 'cv', 'adm1', 'adm2', 'adm3')->where('user_id', auth('api')->user()->id)->get();\n //return $results;\n }", "public function overview()\n {\n \n $data['title']= 'My created cases';\n $data['status'] = 1;\n $data['myreports']= $this->Report_model->get_myreports($data['status']);\n $running_cases = $this->Report_model->get_myreports('2');\n $data['myreports'] = array_merge($data['myreports'], $running_cases);\n //print_r($running_cases);\n /*\n $running['title']= 'My not closed Reports';\n $running['status'] = 2;\n $running['myreports']= $this->Report_model->get_myreports($running['status']);\n */\n $closed['title']= 'My closed cases';\n $closed['status'] = 3;\n $closed['myreports']= $this->Report_model->get_myreports($closed['status']);\n //print_r($data['users']);\n //$this->load->helper('url'); \n $this->load->view('templates/header');\n //php block\n //just created reports\n $this->load->view('reports/myreports',$data);\n //not closed still running reports\n //$this->load->view('reports/myreports',$running);\n //My closed Reports\n $this->load->view('reports/myreports',$closed);\n \n $this->load->view('templates/footer');\n\n }", "public function getOverview() {}", "public function getOverview() {}", "public function index()\n {\n $inc_reports = Report::paginate(15);\n return view('report.index')->with('inc_reports', $inc_reports);\n }", "function action() {\n\t\t// to use. In this case, that's below.\n\t\t$this->setSubview('example.reportDashboard');\n\t\t$this->setTitle('Dashboard');\n\t\t\n\t\t// the getParam method is used to get things from the $_GET and $POST objects\n\t\t// note that, if you ask for currentUser, it will look for owa_currentUser\n\t\t// Existing OWA code mainly uses the $_GET variable more than $_POST\n\t\t// by default, you will have the following parameters in any new module you create:\n\t\t// siteId, period (e.g.: last_seven_days), startDate, endDate, action (your reportName)\n\t\t$currentUser = $this->getParam('currentUser');\n\t\t$startDate = $this->getParam('startDate');\n\t\t$endDate = $this->getParam('endDate');\n\t\t\n\t\t// Getting Data\n\t\t// There are a couple ways to get data from the database\n\t\t\n\t\t// First: you can use OWA's Data Access API (controlled by owa_coreAP.php)\n\t\t// Documentation: http://wiki.openwebanalytics.com/index.php?title=Data_Access_API\n\t\t// List of all metrics and dimensions: http://wiki.openwebanalytics.com/index.php?title=Metrics_%26_Dimensions\n\t\t// The following API request gets the list of all actions performed within the specified date range\n\t\t$params = array('do'\t\t => 'getResultSet',\n\t\t\t\t\t\t'period' \t => $this->get('period'),\n\t\t\t\t\t\t'startDate'\t => $startDate,\n\t\t\t\t\t\t'endDate'\t => $endDate,\n\t\t\t\t\t\t'metrics' \t => 'actions,uniqueActions',\n\t\t\t\t\t\t'dimensions' => 'actionGroup',\n\t\t\t\t\t\t'siteId' \t => $this->getParam('siteId'),\n\t\t\t\t\t\t'resultsPerPage' => 10,\n\t\t\t\t\t\t'sort' => 'actionGroup-'\n\t\t\t\t\t\t);\n\t\t$actions = owa_coreAPI::executeApiCommand($params);\n\n\t\t// But the Data Access API is limited. E.g.: you can't filter actions by user name, since that's not a dimension\n\t\t// To do more normal sql queries, you can do the following (for more info, you can see owa_db.php)\n\t\t// The follow DB request gets the list of all actions performed by a particular user (if one is selected)\n\t\tif ($currentUser){\n\t\t\t$db = owa_coreAPI::dbSingleton();\n\t\t\t$db->selectFrom('owa_action_fact');\n\t\t\t$db->selectColumn('timestamp,action_group,action_name,action_label');\n\t\t\t$db->where('user_name', $user);\n\t\t\t$actionsByUser = $db->getAllRows();\n\t\t}\n\t\t// If you expect to do a lot of similar sql commands like above, you can put that functionality into a class\n\t\t// Should have path example/classes/className.php \n\t\t// Use the supportClassFactory method to include your class\n\t\t// This code gets the list of all visitor names that have performed actions on the site(s) you are tracking\n\t\t$p = owa_coreAPI::supportClassFactory('example', 'exampleClass');\n\t\t$users = $p->getAllUserNames();\n\t\t\n\t\t// To make the data compiled here accessible to the view controller class (below), use the set method\n\t\t// It's good practice to keep the variable names the same when you do this\n\t\t$this->set('actions', $actions);\n\t\tif ($currentUser)\n\t\t\t$this->set('actionsByUser', $actionsByUser);\n\t\t$this->set('users', $users);\n\t\t$this->set('currentUser', $currentUser);\n\t\t\n\t\t$this->set('actionsByUser',$actionsByUser);\n\t\t\n\t}", "public function show(Report $report)\n {\n //\n }", "public function show(Report $report)\n {\n //\n }", "public function show(Report $report)\n {\n //\n }", "public function show(Report $report)\n {\n //\n }", "private function getDashboardNews(){\n $this->dashboard->findDashboardNewsData();\n }", "function can_view_report() {\n\n //no default restrictions, implement restrictions in report instance class\n return true;\n }", "protected function getDetailedQuery() {\n \n return $this->createQueryBuilder('n')\n ->select('n, ng, ngi, ntg, ntgi, ru, rug, rugi, u, r')\n ->join('n.gallery', 'ng')\n ->leftJoin('ng.images', 'ngi')\n ->leftJoin('ng.tmp', 'ntg')\n ->leftJoin('ntg.images', 'ntgi')\n ->join('n.user', 'u')\n ->join('u.user_regular', 'ru')\n ->join('ru.gallery', 'rug')\n ->leftJoin('rug.images', 'rugi')\n ->leftJoin('n.reviews', 'r');\n }", "public function index()\n {\n $reports = Report::whereType('post')\n ->with('type', 'member', 'reportable', 'reportable.media')\n ->orderBy('created_at', 'DESC')\n ->paginate(20);\n\n return view('dashboard.report.index', compact('reports'));\n }", "function getAdminDetails($nws_id)\n {\n $stmt = \"SELECT\n *\n FROM\n \" . APP_DEFAULT_DB . \".\" . APP_TABLE_PREFIX . \"news\n WHERE\n nws_id=\" . Misc::escapeInteger($nws_id);\n $res = DB_Helper::getInstance()->getRow($stmt, DB_FETCHMODE_ASSOC);\n if (PEAR::isError($res)) {\n Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);\n return \"\";\n } else {\n // get all of the project associations here as well\n $res['projects'] = array_keys(self::getAssociatedProjects($res['nws_id']));\n return $res;\n }\n }", "function nycc_rides_report_leaders() {\r\n $sql = array();\r\n $sql['query'] = \"SELECT np.title AS name, np.nid, count(*) AS cnt FROM node np, content_type_rides r, content_field_ride_leaders l, node nr WHERE l.field_ride_leaders_nid = np.nid AND np.type='profile' AND l.nid = r.nid AND l.vid = r.vid AND np.status <> 0 AND nr.nid = r.nid AND nr.vid = r.vid AND nr.status <> 0 \";\r\n\r\n $sql['count'] = \"SELECT COUNT(DISTINCT np.title) AS cnt FROM node np, content_type_rides r, content_field_ride_leaders l, node nr WHERE l.field_ride_leaders_nid = np.nid AND np.type='profile' AND l.nid = r.nid AND l.vid = r.vid AND np.status <> 0 AND nr.nid = r.nid AND nr.vid = r.vid AND nr.status <> 0 \";\r\n\r\n return nycc_rides_report(\"Ride Reports: Leaders\", $sql, nycc_rides_report_rides_header_1(), 'nycc_rides_report_rides_process_row_1', 1);\r\n}", "public function actionIndex() {\n\n $criteria = new CDbCriteria;\n $criteria->join = 'inner join content ON content.object_id = t.object_id and t.object_model = content.object_model and content.space_id is null';\n \n $reportedContent = ReportContent::model()->findAll($criteria);\n $dataProvider = new CArrayDataProvider($reportedContent, array(\n 'id' => 'id',\n 'pagination' => array(\n 'pageSize' => 20\n )\n ));\n \n $this->render('index', array('reportedContent' => $dataProvider));\n }", "function onShowDetail(&$pr, &$ds) {\n\t$hotel = $this->dTable->detailed($this->entryId)->execute()->getFirst();\n\n\t$this->dsDb->add(\"Hotel\",$hotel->toArray(true));\n\n\t$fn = $this->name() . \"/show.xml\";\n\t$pr->loadPage( $fn );\n }", "public function mortality_reports_show()\n {\n if(Auth::user()->access != 1 )\n {\n abort(403);\n }\n }", "public function reporting(): array\n {\n ConfigHelper::mustAllow('production');\n\n $route = '/invoices/reporting/single';\n\n return $this->report($route, DocumentType::SIMPILIFIED);\n }", "function exeGetreport($payid) {\n if($this->uri->segment(5) != '') {\n $and = \" AND b.user_id = \".$this->db->escape($this->uri->segment(5)).\" \";\n } else {\n if($_SESSION['userLevel'] != 1 ) {\n $and = \" AND b.user_id = \".$this->db->escape($_SESSION['userId']).\" \";\n } else {\n $and = \"\"; \n }\n }\n $exeGetreport = $this->db->query(\"SELECT *\n FROM report a\n LEFT JOIN employees b\n ON a.user_id = b.user_id \n LEFT JOIN employee_details c\n ON c.user_id = b.user_id\n LEFT JOIN payperiod d\n ON d.id = a.payperiod\n WHERE a.payperiod = \".$this->db->escape($payid).\"\n $and \");\n\n if($exeGetreport->num_rows() > 0) {\n return $exeGetreport->result_array();\n } else {\n return false;\n } \n }", "abstract public function showFieldSets();", "public function get_open_home_report( $open_home_report_id ) {\n\t\t\t\n\t\t}", "public function getDashboardPanelRecords() {\n\t\t$isql=\"select i.item_name as prod_name, i.quantity as prod_qty from inventory i limit 5\";\t\t\n\t\t$iresult=$this->runQuery('getAll',$isql);\n\t\t\n\t\t$sosql=\"SELECT p.item_name as inv_name,so.customer_name,date(so.sell_date) as sell_date FROM sales_order so, inventory p where p.id = so.product_id limit 5\";\t\t\n\t\t$soresult=$this->runQuery('getAll',$sosql);\n\t\t\n\t\t$drsql=\"select count(prod_qty) as qty, date(sell_date) as date from sales_order group by sell_date\";\t\t\n\t\t$drresult=$this->runQuery('getAll',$drsql);\n\t\t\n\t\techo '[{\"topFiveInvList\":'.json_encode($iresult).',\"topFiveSalesList\":'.json_encode($soresult).',\"dailySalesGraph\":'.json_encode($drresult).'}]';\n\t}", "public function index()\n {\n $module = Module::get('Ledgerreports');\n \n $acc_items = Acc_account::where('acc_or_group','account')->get();\n return View('la.ledgerreports.index', [\n 'show_actions' => $this->show_action,\n 'listing_cols' => $this->listing_cols,\n 'acc_items' => $acc_items, \n 'module' => $module\n ]);\n }", "public function reports()\n {\n $registeredReports = new ReportFullCollection([\n 'console' => new PrintableReport(new LogOutputReport()),\n 'teamcity' => new PrintableReport(\n new TeamcityBuiltImageVersionReport(\n new TeamcityVariableCollection()\n )\n ),\n 'index' => new SavableReport(\n new HTMLReport(new Engine(HTMLReport::REPORT_TEMPLATE_PATH))\n )\n ]);\n\n return $registeredReports;\n }", "protected function ShowExporterReport()\n\t{\n\t\t$this->_LoadExportSession();\n\n\t\tif(!isset($_GET['module'])) {\n\t\t\texit;\n\t\t}\n\n\t\tif(!isset($this->_exportSession[$_GET['module']])) {\n\t\t\texit;\n\t\t}\n\n\t\t$GLOBALS['Report'] = $this->BuildExporterReport($_GET['module'], $this->_exportSession[$_GET['module']]);\n\n\t\t$GLOBALS['ReportTitle'] = GetLang('ReportTitle' . $_GET['module']);\n\t\t$GLOBALS['ReportDesc'] = GetLang('ReportDesc' . $_GET['module']);\n\t\t$GLOBALS['Module'] = $_GET['module'];\n\n\t\t$GLOBALS['ISC_CLASS_TEMPLATE']->SetTemplate(\"pageheader.popup\");\n\t\t$GLOBALS['ISC_CLASS_TEMPLATE']->ParseTemplate();\n\t\t$this->ParseTemplate(\"exporters.report\");\n\t\t$GLOBALS['ISC_CLASS_TEMPLATE']->SetTemplate(\"pagefooter.popup\");\n\t\t$GLOBALS['ISC_CLASS_TEMPLATE']->ParseTemplate();\n\t}", "private function report(array $params): array {\n\n // Drupal's entity query API isn't up to the task of creating this report.\n $query = \\Drupal::database()->select('ebms_review', 'review');\n $query->join('ebms_packet_article__reviews', 'reviews', 'reviews.reviews_target_id = review.id');\n $query->join('ebms_packet_article', 'packet_article', 'packet_article.id = reviews.entity_id');\n $query->join('ebms_packet__articles', 'articles', 'articles.articles_target_id = packet_article.id');\n $query->join('ebms_packet', 'packet', 'packet.id = articles.entity_id');\n $query->join('ebms_article', 'article', 'article.id = packet_article.article');\n $query->join('ebms_article__topics', 'topics', 'topics.entity_id = article.id');\n $query->join('ebms_article_topic', 'article_topic', 'article_topic.id = topics.topics_target_id AND article_topic.topic = packet.topic');\n $query->join('ebms_topic', 'topic', 'topic.id = packet.topic');\n $query->leftJoin('ebms_article__authors', 'authors', 'authors.entity_id = article.id AND authors.delta = 0');\n\n // Add the conditions to the query.\n if (!empty($params['topic'])) {\n $query->condition('packet.topic', $params['topic']);\n }\n else {\n $query->condition('topic.board', $params['board']);\n }\n if (!empty($params['reviewer'])) {\n $query->condition('review.reviewer', $params['reviewer']);\n }\n if (!empty($params['cycle'])) {\n $query->condition('article_topic.cycle', $params['cycle']);\n }\n if (!empty($params['packet'])) {\n $query->condition('packet.id', $params['packet']);\n }\n if (!empty($params['submission-start'])) {\n $query->condition('review.posted', $params['submission-start'], '>=');\n }\n if (!empty($params['submission-end'])) {\n $end = $params['submission-end'];\n if (strlen($end) === 10) {\n $end .= ' 23:59:59';\n }\n $query->condition('review.posted', $end, '<=');\n }\n if (!empty($params['creation-start'])) {\n $query->condition('packet.created', $params['creation-start'], '>=');\n }\n if (!empty($params['creation-end'])) {\n $end = $params['creation-end'];\n if (strlen($end) === 10) {\n $end .= ' 23:59:59';\n }\n $query->condition('packet.created', $end, '<=');\n }\n\n // Select the fields to be returned with the results set.\n $query->addField('article', 'id', 'article_id');\n $query->addField('article', 'search_title', 'title');\n $query->addField('article_topic', 'id', 'article_topic_id');\n $query->addField('article_topic', 'cycle', 'cycle');\n $query->addField('authors', 'authors_search_name', 'author');\n $query->addField('packet', 'title', 'packet');\n $query->addField('packet', 'created', 'packet_created');\n $query->addField('packet', 'id', 'packet_id');\n $query->addField('review', 'id', 'review_id');\n $query->addField('review', 'posted', 'review_posted');\n $query->addField('topic', 'id', 'topic_id');\n $query->addField('topic', 'name', 'topic');\n $query->distinct();\n\n // Provide a ressonable sort order for the results.\n $query->orderBy('author');\n $query->orderBy('title');\n $query->orderBy('topic');\n $query->orderBy('packet_created');\n $query->orderBy('review_posted');\n\n // Create the render arrays for the articles with their reviews.\n $articles = [];\n $packets = [];\n $review_count = 0;\n foreach ($query->execute() as $row) {\n $review_count++;\n $article_id = $row->article_id;\n $topic_id = $row->topic_id;\n $packet_id = $row->packet_id;\n $packets[$packet_id] = $packet_id;\n $review = Review::load($row->review_id);\n if (!array_key_exists($article_id, $articles)) {\n $article = Article::load($article_id);\n $article_topic = ArticleTopic::load($row->article_topic_id);\n $high_priority = FALSE;\n foreach ($article_topic->tags as $article_tag) {\n if ($article_tag->entity->tag->entity->field_text_id->value === 'high_priority') {\n $high_priority = TRUE;\n break;\n }\n }\n $articles[$article_id] = [\n 'id' => $article->id(),\n 'url' => Url::fromRoute('ebms_article.article', ['article' => $article->id()]),\n 'authors' => implode(', ', $article->getAuthors(3)) ?: '[No authors named]',\n 'title' => $article->title->value,\n 'publication' => $article->getLabel(),\n 'pmid' => $article->source_id->value,\n 'high_priority' => $high_priority,\n 'topics' => [],\n ];\n }\n if (!array_key_exists($topic_id, $articles[$article_id]['topics'])) {\n $articles[$article_id]['topics'][$topic_id] = [\n 'name' => $row->topic,\n 'cycle' => Batch::cycleString($row->cycle),\n 'packets' => [],\n ];\n }\n if (!array_key_exists($packet_id, $articles[$article_id]['topics'][$topic_id]['packets'])) {\n $articles[$article_id]['topics'][$topic_id]['packets'][$packet_id] = [\n 'name' => $row->packet,\n 'created' => $row->packet_created,\n 'reviews' => [],\n ];\n }\n $symbol = '✅';\n $dispositions = [];\n foreach ($review->dispositions as $disposition) {\n $dispositions[] = $disposition->entity->name->value;\n if ($disposition->entity->name->value === Review::NO_CHANGES) {\n $symbol = '❌';\n }\n }\n $comments = [];\n foreach ($review->comments as $comment) {\n if (!empty($comment->value)) {\n $comments[] = $comment->value;\n }\n }\n $reasons = [];\n foreach ($review->reasons as $reason) {\n $reasons[] = $reason->entity->name->value;\n }\n $articles[$article_id]['topics'][$topic_id]['packets'][$packet_id]['reviews'][] = [\n 'posted' => $row->review_posted,\n 'reviewer' => $review->reviewer->entity->name->value,\n 'dispositions' => $dispositions,\n 'comments' => $comments,\n 'reasons' => $reasons,\n 'symbol' => $symbol,\n ];\n }\n\n // Assemble and return the render array for the report.\n $article_count = count($articles);\n $packet_count = count($packets);\n $article_s = $article_count === 1 ? '' : 's';\n $review_s = $review_count === 1 ? '' : 's';\n $packet_s = $packet_count === 1 ? '' : 's';\n return [\n '#theme' => 'literature_reviews',\n '#title' => \"Literature Reviews ($article_count Article$article_s with $review_count Review$review_s in $packet_count Packet$packet_s)\",\n '#articles' => $articles,\n ];\n }", "public function getDevReports ()\n { \n return $this->hasMany('App\\DevReport','task_id', 'id'); \n }", "function view_report($reportID)\r\n\t{\r\n\t\t// load view : report_detail avec en parametre ce que la fonction getSiteReport ou getTargetReport a retourne\r\n\t\t// la vue loadee est dupliquee par les controlleurs \"website\" et \"target\" (raison: loader la vue depuis le controlleur eponyme pour conserver une URL coherente pour le user)\r\n\t}", "public function show(HRReports $hRReports)\n {\n //\n }", "function report_search()\n\n {\n $this->load->model( 'main_model');\n $data['get_node_type'] = $this->main_model->get_node_type();\n $data['get_circle'] = $this->main_model->get_circle();\n\t $data['get_site'] = $this->main_model->get_site();\n\t $data['get_node_device'] = $this->main_model->get_node_in_device();\n $this->load->view('report_search',$data);\n\n }", "public function loadReportView()\n {\n //retrieve this month revenue data to generate the description\n $thisMonthRevenue = $this->main_model->retrieveRevenueThisMonth();\n\n //get the average revenue per month to generate the description\n $avgRevenue = $this->main_model->retrieveRevenueAverage();\n\n //to send those data to the view\n $data['thisMonthTotal'] = $thisMonthRevenue['thisMonthTotal'];\n $data['avgRevenue'] = $avgRevenue['avgRevenue'];\n\n\n //retrieve data needed for the bottom part\n $bottomData = $this->main_model-> totalAverageVisitors();\n\n //to send those data to the view\n $data['totalVisitors'] = $bottomData['totalVisitors'];\n $data['avgVisitors'] = $bottomData['avgVisitors'];\n\n \n $this->view(\"adminReportMod\", $data);\n }" ]
[ "0.57960796", "0.56453884", "0.55919605", "0.55919605", "0.55478764", "0.546281", "0.54500854", "0.5443246", "0.54071546", "0.5309802", "0.53067887", "0.53067887", "0.5281823", "0.5250932", "0.52440524", "0.521269", "0.5179699", "0.5157947", "0.51575637", "0.51534766", "0.5152844", "0.5145432", "0.5130875", "0.5122369", "0.5094343", "0.5089202", "0.5078691", "0.5078008", "0.50739866", "0.5065703", "0.5058463", "0.5054411", "0.5035286", "0.5028398", "0.5028398", "0.5017586", "0.50050527", "0.4991231", "0.49902797", "0.49851105", "0.49831024", "0.498057", "0.49699143", "0.4960276", "0.49578315", "0.4944949", "0.4934103", "0.49138498", "0.4913642", "0.4899626", "0.4899495", "0.48964188", "0.48913753", "0.48867476", "0.48855272", "0.48763594", "0.48754627", "0.486614", "0.48564023", "0.48445228", "0.48277178", "0.4827234", "0.48208964", "0.48202547", "0.48175642", "0.4812637", "0.48107713", "0.48011774", "0.47926927", "0.47904608", "0.47900078", "0.47806966", "0.47802573", "0.4780143", "0.4780143", "0.4780143", "0.4780143", "0.47728494", "0.47689772", "0.476405", "0.47617853", "0.476154", "0.4758086", "0.47482157", "0.47463638", "0.47338203", "0.47326764", "0.4731822", "0.4729762", "0.47282356", "0.47260925", "0.4723879", "0.4718019", "0.47127533", "0.46993402", "0.46978927", "0.46971363", "0.46861205", "0.4686054", "0.46851978" ]
0.7193118
0
Create instance of Headers object from instance of Environment object
Создать экземпляр объекта Headers из экземпляра объекта Environment
public function create(Environment $environment) { return new Headers($this->resolveHeaders($environment->getServer())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _initHeaders()\n {\n $headers = new DataHolder();\n\n foreach ($_SERVER as $key => $value)\n {\n if (strpos($key, 'HTTP_') === 0)\n {\n $headers->set(substr($key, 5), $value);\n }\n elseif (in_array($key, array('CONTENT_LENGTH', 'CONTENT_TYPE')))\n {\n $headers->set($key, $value);\n }\n }\n\n $this->set('_headers', $headers);\n }", "public function populate_headers() {\n // If header is already defined, return it immediately\n if (!empty($this->headers)) {\n return;\n }\n\n // In Apache, you can simply call apache_request_headers()\n if (function_exists('apache_request_headers')) {\n $this->headers = apache_request_headers();\n } else {\n isset($_SERVER['CONTENT_TYPE']) && $this->headers['Content-Type'] = $_SERVER['CONTENT_TYPE'];\n\n foreach ($_SERVER as $key => $val) {\n if (sscanf($key, 'HTTP_%s', $header) === 1) {\n // take SOME_HEADER and turn it into Some-Header\n $header = str_replace('_', ' ', strtolower($header));\n $header = str_replace(' ', '-', ucwords($header));\n\n $this->headers[$header] = $val;\n $this->header_map[strtolower($header)] = $header;\n }\n }\n }\n\n }", "public static function getRequestHeaders() {}", "public function setRequestHeaders($requestHeaders);", "public static function set_headers()\n {\n }", "abstract public function SetHeaders();", "public function getRequestHeaders();", "protected function createHeaderDriver()\n {\n $determiner = new Determiners\\Header(\n $this->app['config']['localize-middleware']['header']\n );\n\n $determiner->setFallback($this->app['config']['app']['fallback_locale']);\n\n return $determiner;\n }", "protected function readHeaders()\n {\n $ret = [];\n foreach ($this->environment as $key => $value) {\n # Note: the content-type and content-length headers always come\n # after the `CONTENT_TYPE` and `CONTENT_LENGTH` values in the\n # $_SERVER superglobal; if you use the values for the non `HTTP_...`\n # version, they will just be overwritten by the `HTTP_` version.\n if (strpos($key, \"HTTP_\") === 0) {\n $key = substr($key, 5);\n $key = strtolower($key);\n $key = str_replace(\"_\", \"-\", $key);\n $ret[$key] = $value;\n }\n }\n return $ret;\n }", "public function setHeaders()\n {\n }", "public function getHeaders() {}", "protected function makeHeader()\n {\n }", "public function getHttpHeaders()\n {\n if ($this->headers === null) {\n $this->headers = new SimpleHeaders();\n $this->headers->setContentType('application/json', 'utf-8');\n //$this->headers->setContentDispositionType(SimpleHeaders::DIPOSITION_ATTACHEMENT);\n }\n\n return $this->headers;\n }", "protected function setRequestHeaders() \n {\n $headers = [];\n\n foreach ($this->headerManager->get() as $key => $value) {\n $headers[] = $key . ': ' . $value;\n }\n\n $this->optionManager->set('HTTPHEADER', $headers);\n\n return $this;\n }", "private function __construct(private readonly array $headers)\n {\n // ..\n }", "private function setHeaderInformation()\n {\n $this->header = new \\stdClass();\n $request \t= \\Yii::$app->request;\n $requestHeaders = $request->getHeaders();\n foreach ($this->headerKey as $key => $value) {\n if ($requestHeaders->offsetExists($value)) {\n $this->header->$value = $requestHeaders->get($value);\n $this->header->status =200;\n } else {\n $this->header->status =500;\n yii::error('Header '.$value.\" is missing\", 'api_request');\n break;\n }\n }\n }", "public function getHeaders()\n {\n }", "public function getHeaders()\n {\n }", "abstract public function getHeaders();", "public function __construct()\n\t{\n\t\t$this->_headers = function_exists('getallheaders') ? getallheaders() : array();\n\t\tif (!count($this->_headers))\n\t\t{\n\t\t\tforeach($_SERVER as $key => $value)\n\t\t\t{\n\t\t\t\tif (strpos($key, 'HTTP_') === 0)\n\t\t\t\t\t$this->_headers[str_replace(' ', '-', ucwords(str_replace('_', ' ', strtolower(substr($key, 5)))))] = $value;\n\t\t\t}\n\t\t}\n\t}", "private function readHeaders() {\n $headers = $this->status->getHeaders();\n\n foreach ($headers as $key => $value) {\n switch ($key) {\n case \"Location\":\n $this->response['location'] = $value[0];\n break;\n\n case \"Content-Type\":\n $this->response['content_type'] = $value[0];\n break;\n\n case \"Content-Length\":\n $this->response['content_length'] = $value[0];\n break;\n\n default:\n break;\n }\n }\n }", "private function _initializeResponseHeaders()\n {\n $this->_headers[ODataConstants::HTTPRESPONSE_HEADER_CONTENTTYPE] = null;\n $this->_headers[ODataConstants::HTTPRESPONSE_HEADER_CONTENTLENGTH] = null;\n $this->_headers[ODataConstants::HTTPRESPONSE_HEADER_ETAG] = null;\n $this->_headers[ODataConstants::HTTPRESPONSE_HEADER_CACHECONTROL] = null;\n $this->_headers[ODataConstants::HTTPRESPONSE_HEADER_LASTMODIFIED] = null;\n $this->_headers[ODataConstants::HTTPRESPONSE_HEADER_LOCATION] = null;\n $this->_headers[ODataConstants::HTTPRESPONSE_HEADER_STATUS] = null;\n $this->_headers[ODataConstants::HTTPRESPONSE_HEADER_STATUS_CODE] = null;\n $this->_headers[ODataConstants::HTTPRESPONSE_HEADER_STATUS_DESC] = null;\n $this->_dataServiceVersion = null;\n }", "protected function set_headers()\n\t{\n\t\tif($this->headers_required) { \n\n\t\t\t$this->headers = [\n\t\t\t \n\t\t\t\t'Authorization: '. $_SESSION['token'] .'',\n\t\t\t];\n\n\t\t}\n\n\t}", "public abstract function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "public function getHeaders();", "protected function createHeaders($data = [])\n {\n return new Headers($data);\n }", "public function defineHeader()\n {\n $this->header = new Header();\n }", "public function sendHttpHeaders() {}", "public function get_headers()\n {\n }", "public function get_headers()\n {\n }", "public function get_headers()\n {\n }", "protected function ResolveHeaders() {\n\n $this->Headers= array();\n foreach($this->GetOption('RequestContext')->SERVER as $Key => $Value) {\n if (strncmp($Key, 'HTTP_', 5) === 0) {\n $Key= substr($Key, 5);\n } elseif (strncmp($Key, 'CONTENT_', 8) !== 0) {\n continue;\n }\n $Key= str_replace('_', '-', $Key);\n $this->Headers[$Key]= $Value;\n }\n }", "public function headers(array $headers) : Http{\n try {\n\n $this->headersToBeUsed = $headers;\n return $this;\n\n } catch (\\Throwable $t) {\n new ErrorTracer($t);\n }\n }", "public function getHeaders ();", "protected static function get_response_headers()\n {\n }", "public function populateHeaders(): void\n\t{\n\t\t$contentType = $_SERVER['CONTENT_TYPE'] ?? getenv('CONTENT_TYPE');\n\t\tif (! empty($contentType))\n\t\t{\n\t\t\t$this->setHeader('Content-Type', $contentType);\n\t\t}\n\t\tunset($contentType);\n\n\t\tforeach ($_SERVER as $key => $val)\n\t\t{\n\t\t\tif (sscanf($key, 'HTTP_%s', $header) === 1)\n\t\t\t{\n\t\t\t\t// take SOME_HEADER and turn it into Some-Header\n\t\t\t\t$header = str_replace('_', ' ', strtolower($header));\n\t\t\t\t$header = str_replace(' ', '-', ucwords($header));\n\n\t\t\t\t$this->setHeader($header, $_SERVER[$key]);\n\n\t\t\t\t// Add us to the header map so we can find them case-insensitively\n\t\t\t\t$this->headerMap[strtolower($header)] = $header;\n\t\t\t}\n\t\t}\n\t}", "public function __construct()\n {\n $this->_headers = array();\n $this->_initializeResponseHeaders();\n }", "public function getHeaders()\n{\n return $this->headers;\n}", "public static function createFromGlobals() {\n throw new Exception(\"Can not generate request from globals in a hprose environment.\");\n }", "public function headers()\n {\n $h = &$this->headers;\n return $h;\n }", "public function setHeaders() {\r\n\t\t$this->resource->setHeaders();\r\n\t}", "public function headers($headers = true)\n {\n $this->headers = $headers;\n $this->load();\n\n return $this;\n }", "public function getHeaders(){\n return $this->headers;\n }", "function pxlz_edgtf_set_header_object() {\n $header_type = pxlz_edgtf_get_meta_field_intersect('header_type', pxlz_edgtf_get_page_id());\n $header_types_option = pxlz_edgtf_get_header_type_options();\n\n $object = Lib\\HeaderFactory::getInstance()->build($header_type, $header_types_option);\n\n if (Lib\\HeaderFactory::getInstance()->validHeaderObject()) {\n $header_connector = new Lib\\PxlzEdgefHeaderConnector($object);\n $header_connector->connect($object->getConnectConfig());\n }\n }", "public function getHttpHeaders()\n {\n return $this->headers;\n }", "public static function get_headers() {\n if (function_exists('apache_request_headers')) {\n // we need this to get the actual Authorization: header\n // because apache tends to tell us it doesn't exist\n $headers = apache_request_headers();\n\n // sanitize the output of apache_request_headers because\n // we always want the keys to be Cased-Like-This and arh()\n // returns the headers in the same case as they are in the\n // request\n $out = array();\n foreach( $headers AS $key => $value ) {\n $key = str_replace(\n \" \",\n \"-\",\n ucwords(strtolower(str_replace(\"-\", \" \", $key)))\n );\n $out[$key] = $value;\n }\n } else {\n // otherwise we don't have apache and are just going to have to hope\n // that $_SERVER actually contains what we need\n $out = array();\n if( isset($_SERVER['CONTENT_TYPE']) )\n $out['Content-Type'] = $_SERVER['CONTENT_TYPE'];\n if( isset($_ENV['CONTENT_TYPE']) )\n $out['Content-Type'] = $_ENV['CONTENT_TYPE'];\n\n foreach ($_SERVER as $key => $value) {\n if (substr($key, 0, 5) == \"HTTP_\") {\n // this is chaos, basically it is just there to capitalize the first\n // letter of every word that is not an initial HTTP and strip HTTP\n // code from przemek\n $key = str_replace(\n \" \",\n \"-\",\n ucwords(strtolower(str_replace(\"_\", \" \", substr($key, 5))))\n );\n $out[$key] = $value;\n }\n }\n }\n return $out;\n }", "public function getResponseHeaders();", "public function testHttpResponseHeadersInstanceOf(UnitTester $I)\n {\n $headers = new Headers();\n\n $I->assertInstanceOf(\n Headers::class,\n $headers\n );\n }", "public function setRequestHeaders($request_headers)\r\n {\r\n $this->request_headers = $request_headers;\r\n\r\n return $this;\r\n }", "public function doMetaHeaders(&$headers)\r\n {\r\n $headers = array(\r\n 'title' => 'Title',\r\n 'description' => 'Description',\r\n 'author' => 'Author',\r\n 'date' => 'Date',\r\n 'robots' => 'Robots',\r\n 'template' => 'Template'\r\n );\r\n }", "public function createFromEnvironment(Environment $environment)\n {\n // Scheme\n $isSecure = $environment->get('HTTPS');\n $scheme = (empty($isSecure) || $isSecure === 'off') ? 'http' : 'https';\n\n // Authority: Username and password\n $username = $environment->get('PHP_AUTH_USER', '');\n $password = $environment->get('PHP_AUTH_PW', '');\n\n // Authority: Host\n if ($environment->has('HTTP_HOST')) {\n $host = $environment->get('HTTP_HOST');\n } else {\n $host = $environment->get('SERVER_NAME');\n }\n\n // Authority: Port\n $port = (int)$environment->get('SERVER_PORT', 80);\n if (preg_match('/^(\\[[a-fA-F0-9:.]+\\])(:\\d+)?\\z/', $host, $matches)) {\n $host = $matches[1];\n\n if ($matches[2]) {\n $port = (int) substr($matches[2], 1);\n }\n } else {\n $pos = strpos($host, ':');\n if ($pos !== false) {\n $port = (int) substr($host, $pos + 1);\n $host = strstr($host, ':', true);\n }\n }\n\n // Path\n// $requestScriptName = parse_url($environment->get('SCRIPT_NAME'), PHP_URL_PATH);\n// $requestScriptDir = dirname($requestScriptName);\n\n // parse_url() requires a full URL. As we don't extract the domain name or scheme,\n // we use a stand-in.\n $rUFromRequestUri = parse_url('http://example.com' . $environment->get('REQUEST_URI'), PHP_URL_PATH);\n $requestUri = $rUFromRequestUri ?? '';// parse_url() pro neexistující komponentu url vrací null, $requestUri musí být string\n// $basePath = '';\n// $virtualPath = $requestUri;\n// if (stripos($requestUri, $requestScriptName) === 0) {\n// $basePath = $requestScriptName;\n// } elseif ($requestScriptDir !== '/' && stripos($requestUri, $requestScriptDir) === 0) {\n// $basePath = $requestScriptDir;\n// }\n//\n// if ($basePath) {\n// $virtualPath = ltrim(substr($requestUri, strlen($basePath)), '/');\n// }\n\n // Query string\n $queryString = $environment->get('QUERY_STRING', '');\n if ($queryString === '') {\n $qSFromRequestUri = parse_url('http://example.com' . $environment->get('REQUEST_URI'), PHP_URL_QUERY);\n $queryString = $qSFromRequestUri ?? '';// parse_url() pro neexistující komponentu url vrací null, $queryString musí být string\n }\n\n // Fragment\n $fragment = '';\n\n // Build Uri\n// $uri = new Uri($scheme, $host, $port, $virtualPath, $queryString, $fragment, $username, $password);\n $uri = new Uri($scheme, $host, $port, $requestUri, $queryString, $fragment, $username, $password);\n// if ($basePath) {\n// $uri = $uri->withBasePath($basePath);\n// }\n\n return $uri;\n }", "public static function provideHeaders(): array\n {\n return [\n 'simple' => [\n ['Content-Type' => 'text/plain', 'Content-Encoding' => 'gzip'],\n ['Content-Type' => 'text/plain', 'Content-Encoding' => 'gzip'],\n ],\n\n 'with authorization as string' => [\n ['Content-Type' => 'application/json', 'Authorization' => 'bearer some-foo-token'],\n ['Content-Type' => 'application/json', 'Authorization' => '***'],\n ],\n\n 'with authorization as array' => [\n ['Content-Type' => 'application/json', 'Authorization' => ['bearer some-foo-token', 'basic foo']],\n ['Content-Type' => 'application/json', 'Authorization' => ['***']],\n ],\n ];\n }", "public function getHeaders(): array\n {\n $result = [];\n\n foreach ($this->env as $key => $value) {\n if (stripos($key, 'HTTP_') === 0 && !Text::strEnds($key, '_RAW')) {\n $headerKey = static::normalizeHeaderName(substr($key, 5));\n $result[$headerKey][] = $value;\n }\n }\n\n return $result;\n }", "private function setHeaders() {\n // Data required for the token request\n $data = array(\n 'client_id' => $this->client_id,\n 'sign' => $this->calcSign($this->client_id, $this->secret, $this->getTime()),\n 't' => $this->getTime(),\n 'sign_method' => 'HMAC-SHA256',\n 'Content-Type' => 'application/json'\n );\n // If we have an access token, include it in the request\n if($this->access_token !== '') {\n $data['access_token'] = $this->access_token;\n }\n // Create a $dataHeaders array and assign it with colon separated key value pairs\n $dataHeaders = array();\n foreach($data as $k => $d) {\n $dataHeaders[] = \"$k:$d\";\n }\n return $dataHeaders;\n }", "public function setHeaders(array $header) {}", "function getHeaders(){ return $this->_Headers; }", "function createHeader($options = array()) {\n $header = new Header( $options );\n $html = $header->html();\n return $html;\n}", "public static function getHeader(&$headers)\n {\n $headers['Authorization'] = 'Bearer '.self::getToken();\n }", "public function sendHeaders()\n {\n if (!$this->canSendHeaders()) {\n Mage::log('HEADERS ALREADY SENT: '.mageDebugBacktrace(true, true, true));\n return $this;\n }\n\n if (in_array(substr(php_sapi_name(), 0, 3), array('cgi', 'fpm'))) {\n // remove duplicate headers\n $remove = array('status', 'content-type');\n\n // already sent headers\n $sent = array();\n foreach (headers_list() as $header) {\n // parse name\n if (!$pos = strpos($header, ':')) {\n continue;\n }\n $sent[strtolower(substr($header, 0, $pos))] = true;\n }\n\n // raw headers\n $headersRaw = array();\n foreach ($this->_headersRaw as $i=>$header) {\n // parse name\n if (!$pos = strpos($header, ':'))\n continue;\n $name = strtolower(substr($header, 0, $pos));\n\n if (in_array($name, $remove)) {\n // check sent headers\n if (isset($sent[$name]) && $sent[$name]) {\n unset($this->_headersRaw[$i]);\n continue;\n }\n\n // check header\n if (isset($headers[$name]) && !is_null($existing = $headers[$name])) {\n $this->_headersRaw[$existing] = $header;\n unset($this->_headersRaw[$i]);\n } else {\n $headersRaw[$name] = $i;\n }\n }\n }\n\n // object headers\n $headers = array();\n foreach ($this->_headers as $i=>$header) {\n $name = strtolower($header['name']);\n if (in_array($name, $remove)) {\n // check sent headers\n if (isset($sent[$name]) && $sent[$name]) {\n unset($this->_headers[$i]);\n continue;\n }\n\n // check header\n if (isset($headers[$name]) && !is_null($existing = $headers[$name])) {\n $this->_headers[$existing] = $header;\n unset($this->_headers[$i]);\n } else {\n $headers[$name] = $i;\n }\n\n // check raw headers\n if (isset($headersRaw[$name]) && !is_null($existing = $headersRaw[$name])) {\n unset($this->_headersRaw[$existing]);\n }\n }\n }\n }\n\n parent::sendHeaders();\n }", "public function getHeaders()\n {\n if ($this->headers === null || is_string($this->headers)) {\n // this is only here for fromString lazy loading\n $this->headers = is_string($this->headers) ? Headers::fromString($this->headers) : new Headers();\n }\n\n return $this->headers;\n }", "private static final function getApacheRequestHeaders () {\r\n \tif (self::$objApacheReqHeaders == NULL) {\r\n \t\t// Determine if we're an APACHE module ...\r\n \t\tif (function_exists ('apache_request_headers')) {\r\n\t\t \t// Get the Apache Client Request HDR ...\r\n\t\t \tself::$objApacheReqHeaders = new A (apache_request_headers ());\r\n\t\t \treturn new B (TRUE);\r\n \t\t} else {\r\n \t\t // Do return ...\r\n \t\t\treturn new B (FALSE);\r\n \t\t}\r\n \t} else {\r\n \t // Do return ...\r\n \t\treturn new B (TRUE);\r\n \t}\r\n }", "public function getHeaders(): array\n {\n $headers = [];\n\n foreach ($this->parameters as $key => $value) {\n\n if (Str::startsWith($key, 'HTTP_')) {\n $headers[Str::cutFromStart($key, 5)] = $value;\n\n } elseif (in_array($key, ['CONTENT_TYPE', 'CONTENT_LENGTH', 'CONTENT_MD5'], true)) {\n $headers[$key] = $value;\n }\n }\n\n // TODO check and refactor\n\n if ($this->has('PHP_AUTH_USER')) {\n $headers['PHP_AUTH_USER'] = $this->get('PHP_AUTH_USER');\n $headers['PHP_AUTH_PW'] = $this->get('PHP_AUTH_PW', '');\n\n } else {\n /*\n * php-cgi under Apache does not pass HTTP Basic user/pass to PHP by default\n * For this workaround to work, add these lines to your .htaccess file:\n * RewriteCond %{HTTP:Authorization} .+\n * RewriteRule ^ - [E=HTTP_AUTHORIZATION:%0]\n *\n * A sample .htaccess file:\n * RewriteEngine On\n * RewriteCond %{HTTP:Authorization} .+\n * RewriteRule ^ - [E=HTTP_AUTHORIZATION:%0]\n * RewriteCond %{REQUEST_FILENAME} !-f\n * RewriteRule ^(.*)$ app.php [QSA,L]\n */\n\n $authorizationHeader = null;\n\n if ($this->has('HTTP_AUTHORIZATION')) {\n $authorizationHeader = $this->get('HTTP_AUTHORIZATION');\n } elseif ($this->has('REDIRECT_HTTP_AUTHORIZATION')) {\n $authorizationHeader = $this->get('REDIRECT_HTTP_AUTHORIZATION');\n }\n\n if ($authorizationHeader !== null) {\n\n if (Str::startsWith($authorizationHeader, 'basic ')) {\n\n // Decode AUTHORIZATION header into PHP_AUTH_USER and PHP_AUTH_PW when authorization header is basic\n $exploded = explode(':', base64_decode(Str::cutFromStart($authorizationHeader, 6)), 2);\n\n if (count($exploded) === 2) {\n [$headers['PHP_AUTH_USER'], $headers['PHP_AUTH_PW']] = $exploded;\n }\n\n } else if (empty($this->parameters['PHP_AUTH_DIGEST']) && (Str::startsWith($authorizationHeader, 'digest '))) {\n // In some circumstances PHP_AUTH_DIGEST needs to be set\n $headers['PHP_AUTH_DIGEST'] = $authorizationHeader;\n $this->parameters['PHP_AUTH_DIGEST'] = $authorizationHeader;\n\n } else if (0 === stripos($authorizationHeader, 'bearer ')) {\n /*\n * XXX: Since there is no PHP_AUTH_BEARER in PHP predefined variables,\n * I'll just set $headers['AUTHORIZATION'] here.\n * https://php.net/reserved.variables.server\n */\n $headers['AUTHORIZATION'] = $authorizationHeader;\n }\n }\n }\n\n if (!isset($headers['AUTHORIZATION'])) {\n // PHP_AUTH_USER/PHP_AUTH_PW\n if (isset($headers['PHP_AUTH_USER'])) {\n $headers['AUTHORIZATION'] = 'Basic ' . base64_encode($headers['PHP_AUTH_USER'] . ':' . $headers['PHP_AUTH_PW']);\n } elseif (isset($headers['PHP_AUTH_DIGEST'])) {\n $headers['AUTHORIZATION'] = $headers['PHP_AUTH_DIGEST'];\n }\n }\n\n return $headers;\n }", "public function getHeader($headerName);", "protected function setHeader(){\n $this->header = [\n 'Auth-id' => $this->username,\n 'Auth-token' => $this->generateToken(),\n 'Timestamp' => time()\n ];\n }", "protected function getHeaders()\n {\n return $this->headers;\n }", "protected function getHeaders()\n {\n return $this->headers;\n }", "private function get_headers() {\r\n\t\treturn array( 'User-Agent' => $this->user_agent );\r\n\t}", "public function setHeaders($headers) {\n $this->headers = [];\n $this->headerNames = [];\n\n $headers = $this->parseHeaders($headers);\n foreach ($headers as $name => $lines) {\n $key = strtolower($name);\n if (isset($this->headers[$key])) {\n $this->headers[$key] = array_merge($this->headers[$key], $lines);\n } else {\n $this->headers[$key] = $lines;\n }\n $this->headerNames[$key] = $name;\n }\n\n return $this;\n }", "public function headers() {\n return $this->headers;\n }", "public function headers()\r\n {\r\n return $this->headers;\r\n }", "public function headers()\r\n {\r\n return $this->headers;\r\n }", "private static function getHeaders( )\n\t{\n\t\tif ( \\function_exists( 'apache_request_headers' ) === true )\n\t\t{\n\t\t\treturn \\apache_request_headers( );\n\t\t}\n\n\t\tforeach ( $_SERVER as $key => $value )\n\t\t{\n\t\t\tif ( substr( $key, 0, 5 ) === 'HTTP_' )\n\t\t\t{\n\t\t\t\t$headers[str_replace( ' ', '-', ucwords( strtolower( str_replace( '_', ' ', substr( $key, 5 ) ) ) ) )] = $value;\n\t\t\t}\n\t\t\telseif ( $key === 'CONTENT_TYPE' || $key === 'CONTENT_LENGTH' )\n\t\t\t{\n\t\t\t\t$headers[str_replace( '_', '-', ucwords( strtolower( $key ) ) )] = $value;\n\t\t\t}\n\t\t}\n\n\t\tif ( isset( $headers ) === true )\n\t\t{\n\t\t\treturn $headers;\n\t\t}\n\n\t\treturn false;\n\t}", "public function __construct(array $headers = array()) {\n\n foreach($headers as $name => $value) {\n $this->addHeader($name, $value);\n }\n\n $this->rewind();\n\n }", "public static function __set_state($data) {\n\n\t\t$headers = new self();\n\n\t\tif(isset($data['_headers'])) {\n\n\t\t\tforeach($data['_headers'] as $key => $value)\n\t\t\t\t$headers->set($key, $value);\n\n\t\t}\n\n\t\treturn $headers;\n\t}", "public function testConstructorSetsTheHeadersArrayIfTheyArePassedCorrectlyAsAString()\n\t{\n $inputHeadersString = 'GET /test/jsonrpc.php HTTP/1.1' . \"\\r\\n\" .\n 'Host: test.mysite.local' . \"\\r\\n\" .\n 'Connection: close' . \"\\r\\n\";\n $expectedHeadersArray = array(\n 'Host' => 'test.mysite.local',\n 'Connection' => 'close'\n );\n $mock = new Headers($inputHeadersString);\n $this->assertEquals($expectedHeadersArray, $mock->getAsArray());\n\t}", "public function headers($key = null, $value = null)\n {\n if ($key instanceof HTTPHeader) {\n // Act a setter, replace all headers\n $this->header = $key;\n\n return $this;\n }\n\n if (is_array($key)) {\n // Act as a setter, replace all headers\n $this->header->exchangeArray($key);\n\n return $this;\n }\n\n if ($this->header->count() === 0 AND $this->isInitial()) {\n // Lazy load the request headers\n $this->header = HTTP::requestHeaders();\n }\n\n if ($key === null) {\n // Act as a getter, return all headers\n return $this->header;\n } elseif ($value === null) {\n // Act as a getter, single header\n return ($this->header->offsetExists($key)) ? $this->header->offsetGet($key) : null;\n }\n\n // Act as a setter for a single header\n $this->header[$key] = $value;\n\n return $this;\n }", "public function testHttpResponseHeadersGetSet(UnitTester $I)\n {\n $headers = new Headers();\n\n $headers->set('Content-Type', 'text/html');\n\n $I->assertSame(\n 'text/html',\n $headers->get('Content-Type')\n );\n }", "#[Pure]\nfunction http_get_request_headers() {}", "public function headers()\n {\n return $this->headers;\n }", "public function getHeaders()\n {\n return apache_request_headers();\n }", "public function setHeaders(Headers $headers)\n {\n $this->headers = $headers;\n return $this;\n }", "public function getHeadersSet()\n {\n return $this->headersSet;\n }", "public static function headers()\n {\n\n return [\n 'APCA-API-KEY-ID' => config('alpaca.live_mode') ? config('alpaca.live_key') : config('alpaca.paper_key'),\n 'APCA-API-SECRET-KEY' => config('alpaca.live_mode') ? config('alpaca.live_secret') : config('alpaca.paper_secret')\n ];\n }", "public function withHeaders(array $headers): RequestInterface;", "public function getHttpHeaders()\n {\n $headers = array(\n 'X-Client-Env: PHP ' . PHP_VERSION\n );\n\n foreach ($this->headers as $name => $value) {\n if (strtolower($name) != 'user-agent') {\n $headers[] = \"$name: $value\";\n }\n }\n\n return $headers;\n }", "public function setHeaders($headers)\n {\n $this->headers = $headers;\n\n return $this;\n }", "public function setHeaders($headers)\n {\n $this->headers = $headers;\n\n return $this;\n }", "public function setHeaders($headers)\n {\n $this->headers = $headers;\n\n return $this;\n }", "public static function getStoreAndHeaders(&$env, $cookies)\n {\n if (isset($env['WOVN_CONFIG'])) {\n $file = $env['WOVN_CONFIG'] ? $env['WOVN_CONFIG'] : DIRNAME(__FILE__) . '/../../../../wovn.json';\n } else {\n $file = DIRNAME(__FILE__) . '/../../../../wovn.ini';\n }\n\n $store = Store::createFromFile($file);\n $cookieLang = new CookieLang($cookies);\n $headers = new Headers($env, $store, $cookieLang);\n return array($store, $headers);\n }", "private static function setHeaders()\n {\n header('X-Powered-By: Intellivoid-API');\n header('X-Server-Version: 2.0');\n header('X-Organization: Intellivoid Technologies');\n header('X-Author: Zi Xing Narrakas');\n header('X-Request-ID: ' . self::$ReferenceCode);\n }", "public function testHostIsSetCorrectlyFromTheHeaders()\n {\n $server = ['HTTP_HOST' => 'joind.in'];\n $request = new Request($this->config, $server);\n\n $this->assertEquals('joind.in', $request->host);\n $this->assertEquals('joind.in', $request->getHost());\n }" ]
[ "0.64663017", "0.61760974", "0.6117139", "0.60135657", "0.5932401", "0.588565", "0.5863152", "0.5843509", "0.57841384", "0.5782216", "0.576597", "0.5727603", "0.57211536", "0.57118666", "0.5711274", "0.5647395", "0.56083405", "0.56083405", "0.56082624", "0.55858845", "0.5578869", "0.5569527", "0.55642235", "0.5556961", "0.5548697", "0.5548697", "0.5548697", "0.5548697", "0.5548697", "0.5548697", "0.5548697", "0.5548697", "0.5548697", "0.5548697", "0.5548619", "0.5547974", "0.5538313", "0.5524642", "0.5524642", "0.5524481", "0.55130756", "0.54974866", "0.549367", "0.54595196", "0.5435929", "0.54298717", "0.5427114", "0.5414668", "0.5408076", "0.54079086", "0.53997874", "0.53979456", "0.53912437", "0.53764105", "0.53741807", "0.53725404", "0.5359695", "0.53449154", "0.5339246", "0.5335309", "0.53303874", "0.53239524", "0.53154206", "0.5311032", "0.53103817", "0.52966964", "0.52913624", "0.5282882", "0.5273096", "0.52672756", "0.52610177", "0.52599525", "0.5256733", "0.5243593", "0.5243593", "0.5238747", "0.5238682", "0.5237873", "0.52360874", "0.52360874", "0.5227973", "0.5227111", "0.5224549", "0.5208194", "0.5206714", "0.5204377", "0.5184711", "0.51752377", "0.5174677", "0.51668644", "0.516501", "0.5162407", "0.5155982", "0.51512116", "0.51492554", "0.51492554", "0.51492554", "0.51482064", "0.51474255", "0.5137698" ]
0.77983695
0
Get columns from table use Zend_Db_Adapter
Получить столбцы из таблицы с использованием Zend_Db_Adapter
public function getColumnsFromTable() { return Zend_Db_Table::getDefaultAdapter()->describeTable($this->_tableName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract function get_columns($table);", "public function get_columns()\n {\n }", "public function get_columns()\n {\n }", "public function get_columns()\n {\n }", "public function get_columns()\n {\n }", "public function get_columns()\n {\n }", "public function get_columns()\n {\n }", "public function getColumns()\n\t{\n\t\t\n $result = $this->fetchingData(array(\n 'query' => \"SHOW FULL COLUMNS FROM `$this->table`\"\n ));\n\n return $result;\n\t}", "private function table_columns(){\n $column = array();\n $query = $this->db->select('column_name')\n ->from('information_schema.columns')\n ->where('table_name', $this::$table_name)\n ->get($this::$table_name)->result_array();\n //return individual table column\n foreach($query as $column_array){\n foreach($column_array as $column_name){\n $column[] = $column_name;\n }\n }\n return $column;\n }", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "public function getColumns();", "function getColumns() {return $this->_columns;}", "public function get_columns() {\n\n\t\treturn array(\n\t\t\t'id' \t\t => '%d',\n\t\t\t'name' \t\t => '%s',\n\t\t\t'date_created' \t=> '%s',\n\t\t\t'date_modified' => '%s',\n\t\t\t'status'\t\t=> '%s',\n\t\t\t'ical_hash'\t\t=> '%s'\n\t\t);\n\n\t}", "function columns($table)\n{\n\treturn $this->drv->columns($table);\n}", "public abstract function getColumns($table);", "public function getColumnsList(){\n return $this->_get(3);\n }", "public function get_columns() {\n\t\treturn array(\n\t\t\t'id' => '%d',\n\t\t\t'user_id' => '%d',\n\t\t\t'username' => '%s',\n\t\t\t'name' => '%s',\n\t\t\t'email' => '%s',\n\t\t\t'product_count' => '%d',\n\t\t\t'sales_count'\t => '%d',\n\t\t\t'sales_value'\t => '%f',\n\t\t\t'status'\t\t => '%s',\n\t\t\t'notes' => '%s',\n\t\t\t'date_created' => '%s',\n\t\t);\n\t}", "public function getColumns(){\n $rows = array();\n return $rows; \n }", "public function getTableColumns() { return $this->table->getColumns(); }", "function lookup_columns()\n {\n // Avoid doing multiple SHOW COLUMNS if we can help it\n $key = C_Photocrati_Transient_Manager::create_key('col_in_' . $this->get_table_name(), 'columns');\n $this->_table_columns = C_Photocrati_Transient_Manager::fetch($key, FALSE);\n if (!$this->_table_columns) {\n $this->object->update_columns_cache();\n }\n return $this->_table_columns;\n }", "public function getColumns(): array;", "public function getTableColumns(){\n\n $show_columns_statement = $this->grammer->compileShowColumns($this);\n return $this->connection->getTableColumns($show_columns_statement);\n\n }", "protected function getColumns() {\n $driver = $this->connection->getAttribute(\\PDO::ATTR_DRIVER_NAME);\n\n // Calculate the driver class. Why don't they do this for us?\n $class = '\\\\Aura\\\\SqlSchema\\\\' . ucfirst($driver) . 'Schema';\n $schema = new $class($this->connection, new ColumnFactory());\n return array_keys($schema->fetchTableCols($this->table));\n }", "public function columns($table_name);", "protected function getTableColumns()\n {\n if (!$this->model->getConnection()->isDoctrineAvailable()) {\n throw new \\Exception(\n 'You need to require doctrine/dbal: ~2.3 in your own composer.json to get database columns. '\n );\n }\n\n $table = $this->model->getConnection()->getTablePrefix().$this->model->getTable();\n /** @var \\Doctrine\\DBAL\\Schema\\MySqlSchemaManager $schema */\n $schema = $this->model->getConnection()->getDoctrineSchemaManager($table);\n\n // custom mapping the types that doctrine/dbal does not support\n $databasePlatform = $schema->getDatabasePlatform();\n\n foreach ($this->doctrineTypeMapping as $doctrineType => $dbTypes) {\n foreach ($dbTypes as $dbType) {\n $databasePlatform->registerDoctrineTypeMapping($dbType, $doctrineType);\n }\n }\n\n $database = null;\n if (strpos($table, '.')) {\n list($database, $table) = explode('.', $table);\n }\n\n return $schema->listTableColumns($table, $database);\n }", "abstract protected function getColumns(): array;", "public function getColumns(){\n $url = $this->urlWrapper() . URLResources::COLUMN;\n return $this->makeRequest($url, \"GET\", 2);\n }", "public function getTableColumns()\n\t{\n\t}", "public function getColumns() {\n\t\treturn( $this->getTable()->getColumns() );\n\t}", "abstract protected function _getColumnNames($rs);", "function readColumns() { return $this->_columns; }", "function listColumns($tablename);", "abstract public function getColNames();", "public function getColumns()\r\n {\r\n }", "function get_columns( ) {\r\n\t\treturn self::mla_manage_columns_filter();\r\n\t}", "private function get_columns(&$result)\n\t{\n\t\t$i = 0; \n\t\twhile ($result->columnName($i)) {\n\t\t\t$columns[] = $result->columnName($i);\n\t\t\t$i++;\n\t\t}\n\t\treturn $columns;\n\t}", "static function columns($instancia = null) {\n if ($instancia) {\n return fields_of($instancia->_tablename());\n } else {\n return fields_of(self::getInstance()->_tablename());\n }\n }", "public function getColumns()\n {\n if (! is_null($this->columns)) {\n return collect($this->columns);\n }\n\n return $this->columns = collect($this->rows->first())\n ->except(['created_at', 'updated_at', 'deleted_at', 'id'])\n ->keys();\n }", "public function getListColumns(){\n\treturn \"id, codice_categoria, codice, descrizione\";\n}", "public function get_columns() {\n\n $instance = Envira_Gallery_Common::get_instance();\n return $instance->get_columns();\n\n }", "public static function getColumns()\n {\n return array('libraryId', 'signature', 'summary', 'status', 'userId');\n }", "public function getColumns() {\n\n\n if (!$this->columns) {\n $this->columns = array();\n for ($i = 0; $i < $this->statement->columnCount(); $i++) {\n try {\n $columnMeta = $this->statement->getColumnMeta($i);\n\n if ($columnMeta) {\n\n // Fall back to varchar\n $columnType = self::NATIVE_SQL_MAPPINGS[$columnMeta[\"native_type\"]] ?? TableColumn::SQL_VARCHAR;\n $lengthDivisor = self::LENGTH_COLUMN_DIVISORS[$columnMeta[\"native_type\"]] ?? null;\n\n if ($columnType == TableColumn::SQL_BLOB && $columnMeta[\"len\"] > 300000)\n $columnType = TableColumn::SQL_LONGBLOB;\n\n // Record decimal types for later\n if ($columnType == TableColumn::SQL_REAL || $columnType == TableColumn::SQL_DOUBLE || $columnType == TableColumn::SQL_DECIMAL || $columnType == TableColumn::SQL_FLOAT) {\n $this->decimalColumns[] = $columnMeta[\"name\"];\n }\n\n\n $this->columns[] = new ResultSetColumn($columnMeta[\"name\"], $columnType,\n $lengthDivisor ? $columnMeta[\"len\"] / $lengthDivisor : null, $lengthDivisor ? $columnMeta[\"precision\"] : null);\n\n } else {\n $this->columns[] = new ResultSetColumn(\"column\" . ($i + 1), TableColumn::SQL_VARCHAR);\n }\n\n } catch (\\PDOException $e) {\n }\n }\n }\n return $this->columns;\n }", "abstract public function listColumns();", "public function getColumns()\n {\n return $this->select_list;\n }", "abstract public function tableColumns();", "protected function getColumn()\n {\n return DB::select(\n 'SELECT\n\t\t\t\t\t\t\t c.COLUMN_NAME\n\t\t\t\t\t\t\t,c.COLUMN_DEFAULT\n\t\t\t\t\t\t\t,c.IS_NULLABLE\n\t\t\t\t\t\t\t,c.DATA_TYPE\n\t\t\t\t\t\t\t,c.CHARACTER_MAXIMUM_LENGTH\n\t\t\t\t\t\t\t,pk.CONSTRAINT_TYPE AS EXTRA\n\t\t\t\t\t\t\tFROM INFORMATION_SCHEMA.COLUMNS AS c\n\t\t\t\t\t\t\tLEFT JOIN (\n\t\t\t\t\t\t\t SELECT ku.TABLE_CATALOG,ku.TABLE_SCHEMA,ku.TABLE_NAME,ku.COLUMN_NAME, tc.CONSTRAINT_TYPE\n\t\t\t\t\t\t\t FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS AS tc\n\t\t\t\t\t\t\t INNER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE AS ku ON tc.CONSTRAINT_NAME = ku.CONSTRAINT_NAME\n\t\t\t\t\t\t\t) AS pk ON c.TABLE_CATALOG = pk.TABLE_CATALOG\n\t\t\t\t\t\t\t AND c.TABLE_SCHEMA = pk.TABLE_SCHEMA\n\t\t\t\t\t\t\t AND c.TABLE_NAME = pk.TABLE_NAME\n\t\t\t\t\t\t\t AND c.COLUMN_NAME = pk.COLUMN_NAME\n\t\t\t\t\t\t\tWHERE c.TABLE_NAME = ? AND c.TABLE_CATALOG = ? ',\n [$this->tableName, $this->databaseName]\n );\n }", "function get_columns(){\n\t\treturn array('id' => 'ID', 'orderinfo' => 'Customer Information', 'company' => 'Company', 'transaction_id' => 'Paypal Transaction ID', 'email' => 'Email Address', 'expiration' => 'Access Expiration', 'accesstourlkey' => 'Order Access URLs', 'webinarpass' => 'Webinars Passkey', 'total' => 'Order Total');\n\t}", "static function getColumns()\n {\n }", "public function getCol() : array\n\t{\n\t\treturn $this->fetchAllFromColumn();\n\t}", "abstract protected function columns();", "public function getAlumns()\n\t{\n $query = $this->db->get('alumns');\n return $query->result();\n\t}", "public function columns()\n {\n return $this->get('columns', []);\n }", "function getAllColumns($table){\n\t\t$types=sqlite_fetch_column_types($table,$this->id,SQLITE_ASSOC);\n\t\t$columns=array();\n\t\tforeach($types as $column=>$type){\n\t\t\t$columns[$column]=array(\n\t\t\t\t\"name\"=>$column,\n\t\t\t\t\"key\"=>&$row['Key'],\n\t\t\t\t\"type\"=>&$types[$column],\n\t\t\t\t\"default\"=>&$row['Default'],\n\t\t\t\t\"comment\"=>&$row['Comment']\n\t\t\t\t);\n\t\t}\n\t\treturn $columns;\n\t}", "public function getColumns() {\n $columns = array();\n foreach($this->mapping as $key => $value) {\n array_push($columns, $value);\n }\n return $columns;\n }", "private function getColumns() : array\n {\n return [\n self::column('id'),\n self::column('order'),\n RoomCategoryTranslationMapper::column('lang_id'),\n RoomCategoryTranslationMapper::column('name'),\n ];\n }", "public function getColumns()\n {\n return $this->_columns;\n }", "public static function getColumns()\n {\n return array('title', 'bindingId', 'minYear', 'maxYear',\n 'preciseDate', 'placePublished', 'publisher', 'printVersion',\n 'firstPage', 'lastPage');\n }", "public function getColumns()\n {\n return $this->columns;\n }", "public function getColumns()\n {\n return $this->columns;\n }", "public function getColumns()\n {\n return $this->columns;\n }", "public function getColumns()\n {\n return $this->columns;\n }", "public function getColumns()\n {\n return $this->columns;\n }", "public function getColumns()\n {\n return $this->columns;\n }", "public function getColumns()\n {\n return $this->columns;\n }", "public function getColumns()\n {\n return $this->columns;\n }", "public function getColumns()\n {\n return $this->columns;\n }", "public function getColumns()\n {\n return $this->columns;\n }", "public function getColumns()\n {\n return $this->columns;\n }", "public function getColumns()\n {\n // code...\n return $this->__COLUMNS__ ?? [];\n }", "function get_movie_table_columns()\n{\n\t$db = open_database_connection();\n\t$stmt = $db->prepare(\"DESCRIBE movie\");\n\t$stmt->execute();\n\t$columns = $stmt->fetchAll(PDO::FETCH_COLUMN);\n close_database_connection($db);\n return $columns;\n}", "public function getColumns(): array\n {\n return $this->columns;\n }", "public function getColumns(): array\n {\n return $this->columns;\n }", "function _get_querable_table_columns()\n {\n return array('name', 'author', 'date', 'title', 'modified', 'menu_order', 'parent', 'ID', 'rand', 'comment_count');\n }", "public function table_attributes() {\n return static::find_by_sql(\"SHOW COLUMNS FROM \".static::$table_name);\n }", "public function get_columns($table)\n\t{\n\t\treturn $this->driver_query($this->sql->column_list($this->prefix_table($table)), FALSE);\n\t}", "public function getAllColumnsNames()\n {\n switch (DB::connection()->getConfig('driver')) {\n case 'pgsql':\n $query = \"SELECT column_name FROM information_schema.columns WHERE table_name = '\".$this->table.\"'\";\n $column_name = 'column_name';\n $reverse = true;\n break;\n\n case 'mysql':\n $query = 'SHOW COLUMNS FROM '.$this->table;\n $column_name = 'Field';\n $reverse = false;\n break;\n\n case 'sqlsrv':\n $parts = explode('.', $this->table);\n $num = (count($parts) - 1);\n $table = $parts[$num];\n $query = \"SELECT column_name FROM \".DB::connection()->getConfig('database').\".INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = N'\".$table.\"'\";\n $column_name = 'column_name';\n $reverse = false;\n break;\n\n default: \n $error = 'Database driver not supported: '.DB::connection()->getConfig('driver');\n throw new Exception($error);\n break;\n }\n\n $columns = array();\n\n foreach(DB::select($query) as $column)\n {\n $columns[] = $column->$column_name;\n }\n\n if($reverse)\n {\n $columns = array_reverse($columns);\n }\n\n return $columns;\n }", "static function get_columns(): array {\r\n return [\r\n 'title' => 'Title',\r\n self::qcol('link') => 'Link',\r\n self::qcol('date_from') => 'In use from',\r\n self::qcol('date_till') => 'In use till',\r\n self::qcol('main') => 'Main website'\r\n ];\r\n }", "public function getTableColumns() {\n return $this->getConnection()->getSchemaBuilder()->getColumnListing($this->getTable());\n }", "public function getColumns($cache = true);", "abstract public function getColsFields();", "public function getColumns() {\n\t\t$spec = self::$specs[$this->id];\n\t\treturn array_value($spec, \"columns\", []);\n\t}", "private function getColumns() : array\r\n {\r\n return [\r\n self::column('id'),\r\n self::column('type_id'),\r\n self::column('region_id'),\r\n self::column('district_id'),\r\n self::column('phone'),\r\n self::column('fax'),\r\n self::column('zip'),\r\n self::column('rate'),\r\n self::column('discount'),\r\n self::column('website'),\r\n self::column('email'),\r\n self::column('active'),\r\n self::column('closed'),\r\n self::column('legal_address'),\r\n self::column('legal_name'),\r\n self::column('lat'),\r\n self::column('lng'),\r\n self::column('lng'),\r\n self::column('city_tax_include'),\r\n self::column('contact_full_name'),\r\n self::column('contact_position'),\r\n self::column('contact_email'),\r\n self::column('contact_first_phone'),\r\n self::column('contact_second_phone'),\r\n self::column('checkin_from'),\r\n self::column('checkin_to'),\r\n self::column('checkout_from'),\r\n self::column('checkout_to'),\r\n self::column('payment_time'),\r\n self::column('breakfast'),\r\n self::column('has_restaurant'),\r\n self::column('restaurant_opening'),\r\n self::column('restaurant_closing'),\r\n self::column('center_distance'),\r\n self::column('penality_enabled'),\r\n self::column('penality_not_taken_after'),\r\n self::column('penality_not_later_arrival'),\r\n self::column('penality_cancelation_item'),\r\n self::column('penality_cancelation_type'),\r\n self::column('penality_percentage'),\r\n self::column('penality_percentage_type'),\r\n self::column('card_required'),\r\n HotelTranslationMapper::column('lang_id'),\r\n HotelTranslationMapper::column('name'),\r\n HotelTranslationMapper::column('address'),\r\n HotelTranslationMapper::column('description')\r\n ];\r\n }", "abstract protected function columns(): array;", "public function getAllColumnsNames()\n {\n switch (DB::connection()->getConfig('driver')) {\n case 'pgsql':\n $query = \"SELECT column_name FROM information_schema.columns WHERE table_name = '\".$this->getTable().\"'\";\n $column_name = 'column_name';\n $reverse = true;\n break;\n\n case 'mysql':\n $query = 'SHOW COLUMNS FROM '.$this->getTable();\n $column_name = 'Field';\n $reverse = false;\n break;\n\n case 'sqlsrv':\n $parts = explode('.', $this->getTable());\n $num = (count($parts) - 1);\n $table = $parts[$num];\n $query = \"SELECT column_name FROM \".DB::connection()->getConfig('database').\".INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = N'\".$table.\"'\";\n $column_name = 'column_name';\n $reverse = false;\n break;\n\n default:\n $error = 'Database driver not supported: '.DB::connection()->getConfig('driver');\n throw new \\Exception($error);\n break;\n }\n\n $columns = array();\n\n foreach(DB::select($query) as $column)\n {\n array_push($columns, $column->$column_name);\n }\n\n if($reverse)\n {\n $columns = array_reverse($columns);\n }\n\n return $columns;\n }", "private function getSelectTableColumns($model){\n return $this->querySqlFormatter->getModelTableShowColumns($this->subClassoF($model)->table);\n }", "public function getColumns()\n {\n return $this->allColumns ?: $this->defineListColumns();\n }", "public static function getDbFields()\n {\n global $zdb;\n $columns = $zdb->getColumns(self::TABLE);\n $fields = array();\n foreach ( $columns as $col ) {\n $fields[] = $col->getName();\n }\n return $fields;\n }", "protected function getColumnsAttribute()\n {\n return $this->fetchData[self::COLUMNS];\n }", "public function getTemporalColumns();", "abstract public static function columnData();", "private function getTableColumns() : ?array {\n\t\t$query = 'SELECT column_name, data_type, column_type FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = N\\'' . $this->tableNamePrefixed . '\\'';\n\t\t$columns = $this->database->query($query);\n\n\t\t$columnsArr = array();\n\t\tforeach ($columns as $column) {\n\t\t if (property_exists($column, 'COLUMN_NAME')) {\n $columnsArr[$column->COLUMN_NAME] = $column;\n }\n if (property_exists($column, 'column_name')) {\n $column->COLUMN_NAME = $column->column_name;\n $columnsArr[$column->COLUMN_NAME] = $column;\n }\n\t\t}\n\n\t\treturn !empty($columnsArr) ? $columnsArr : null;\n\t}", "function get_columns( $table, $db = null ) {\n\n\t\tif ( !$this->verify_table( $table ) ) {\n\t\t\treturn false;\n\t\t}\n\t\t\t\n\t\t$key = $this->get_db( $db )->name . '.' . $table . '_columns';\n\t\t\n\t\tif ( $cache = $this->cache_get( $key ) ) {\n\t\t\treturn $cache;\n\t\t}\n\t\t\t\n\t\t$dbh = &$this->connect( $db );\n\t\t\n\t\ttry {\n\t\t\t$q = $dbh->prepare( \"DESCRIBE $table\" );\n\t\t\t$q->execute();\n\t\t\t$columns = $q->fetchAll(PDO::FETCH_COLUMN);\n\t\t} catch( PDOException $e ) {\n\t\t\t$this->error( $e );\n\t\t}\n\t\t\n\t\t$this->cache_set( $key, $columns, $this->get_db( $db )->ttl );\n\t\treturn $columns;\n\t}", "public function get_columns() {\n\n\t\treturn $columns = array(\n\t\t\t'title' => __( 'Name' ),\n\t\t\t'client_id' => __( 'Client ID' ),\n\t\t\t//'client_secret' => __( 'Redirect URI' )\n\t\t);\n\t}", "public function get_column_names()\r\n {\r\n if (array_get(static::$tables, $this->from)) {\r\n return static::$tables[$this->from]['columns'];\r\n }\r\n\r\n $database = $this->db->get_connection()->get_database();\r\n\r\n $table = $this->from;\r\n\r\n $query = new Query();\r\n return $query->from('INFORMATION_SCHEMA.COLUMNS')\r\n ->where(array(\r\n 'table_schema' => $database,\r\n 'table_name' => $table\r\n ))\r\n ->pluck('column_name');\r\n }", "public function getColumns() {\n return $this->columns;\n }" ]
[ "0.7227525", "0.7048627", "0.7048627", "0.7048627", "0.7048627", "0.7046267", "0.7046267", "0.6980839", "0.6975782", "0.6954283", "0.6954283", "0.6954283", "0.6954283", "0.6954283", "0.6954283", "0.6954283", "0.6910914", "0.6861104", "0.6846852", "0.6839846", "0.68080914", "0.6791578", "0.6791046", "0.6782598", "0.677738", "0.6769422", "0.67688864", "0.6758892", "0.67438143", "0.6716481", "0.67014647", "0.66768056", "0.66708755", "0.6661836", "0.6622638", "0.66135585", "0.661223", "0.6592898", "0.65879333", "0.6580832", "0.6577741", "0.657642", "0.65457195", "0.6541868", "0.6525837", "0.65216804", "0.6506852", "0.6505853", "0.65046793", "0.65039337", "0.64710206", "0.6458287", "0.64405966", "0.6429041", "0.64191943", "0.6403895", "0.6403743", "0.6400426", "0.6398401", "0.6394812", "0.63866794", "0.6384406", "0.6382975", "0.6382975", "0.6382975", "0.6382975", "0.6382975", "0.6382975", "0.6382975", "0.6382975", "0.6382975", "0.6382975", "0.6382975", "0.6381211", "0.63778716", "0.635557", "0.635557", "0.63554394", "0.63549805", "0.6348703", "0.6348473", "0.6342385", "0.63423365", "0.6335873", "0.63349473", "0.6334922", "0.632408", "0.63019544", "0.6296135", "0.62885255", "0.6286808", "0.62825805", "0.6282101", "0.6275847", "0.62754905", "0.6272854", "0.6270443", "0.62702125", "0.62678605", "0.6260092" ]
0.78532004
0
Compare function NOTE: In theory only $object1 has to implement the Comparable interface but as you cannot know in which order the parameters come i.e. from a sorting algorithm, both are checked. Also it is assumed that $object1>compareTo($object2) == (1) $object2>compareTo($object1) otherwise ComparatorTools may not work properly
Функция сравнения ЗАМЕТКА: По теории только $object1 должна реализовывать интерфейс Comparable, но так как невозможно знать в каком порядке приходят параметры, например, от алгоритма сортировки, проверяются оба объекта. Также предполагается, что $object1>compareTo($object2) == (1) $object2>compareTo($object1), иначе ComparatorTools может работать некорректно.
public function compare($object1, $object2) { if (! $object1 instanceof Comparable) { throw new ComparatorException('$object1 (type: ' . gettype($object1) . ') does not implement the Comparable interface.'); } if (! $object2 instanceof Comparable) { throw new ComparatorException('$object2 (type: ' . gettype($object2) . ') does not implement the Comparable interface.'); } return $object1->compareTo($object2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function comparator($object1, $object2) {\n\t\t\treturn $object1->amount < $object2->amount; \n\t\t}", "public function compareTo($object) : int;", "public /*int*/ function compareTo(/*mixed*/ $object)\n\t{\n\t\tif($this->equals($object))\n\t\t\treturn 0;\n\t\treturn -1;\n\t}", "public function compare(\\morph\\Object $objectA, \\morph\\Object $objectB)\n {\n $compare = null;\n $propertyA = (float)$objectA->{$this->propertyName};\n $propertyB = (float)$objectB->{$this->propertyName};\n if ($propertyA == $propertyB){\n $compare = 0;\n }else{\n $compare = ($propertyA < $propertyB) ? -1 : 1;\n }\n return $compare;\n }", "public static function compare($a,$b);", "public function compareTo($other);", "protected function compareObjects(object $a, object $b): int\n {\n // see https://github.com/php/php-src/issues/10513\n return strcmp(spl_object_hash($a), spl_object_hash($b));\n }", "public function compare();", "function cmp_obj($a, $b)\r\n {\r\n $al = $a->Top;\r\n $bl = $b->Top;\r\n if ($al == $bl) {\r\n return 0;\r\n }\r\n return ($al > $bl) ? +1 : -1;\r\n }", "function compareObjects(&$ob1, &$ob2) {\n\tprint_pre('o1 == o2 : ' . bool2str($ob1 == $ob2));\n\tprint_pre('o1 != o2 : ' . bool2str($ob1 != $ob2));\n\tprint_pre('o1 === o2 : ' . bool2str($ob1 === $ob2));\n\tprint_pre('o1 !== o2 : ' . bool2str($ob1 !== $ob2));\n}", "public function compare($priority1, $priority2)\n {\n }", "function cmp_function($value1, $value2)\n{\n if($value1 == $value2) {\n return 0;\n }\n else if($value1 > $value2) {\n return 1;\n }\n else {\n return -1;\n }\n}", "function comparator($elem1,$elem2) {\n\n\tif ($elem1->getId() == $elem2->getId()) \n\t\treturn 0;\n\telse \n\t\tif ($elem1->getId() > $elem2->getId())\n\t\t\treturn 1;\n\t\telse\n\t\t\treturn -1;\n\n}", "abstract protected function _compare($val1, $val2);", "protected function compare(array $dispatchable1, array $dispatchable2)\n {\n if ($dispatchable1['priority'] === $dispatchable2['priority']) {\n return ($dispatchable1['serial'] > $dispatchable2['serial'] ? -1 : 1);\n }\n\n return ($dispatchable1['priority'] > $dispatchable2['priority'] ? -1 : 1);\n }", "public function compareDataTo($key, BL_CustomGrid_Object $object)\n {\n $value = $this->getData($key);\n $otherValue = $object->getData($key);\n return ($value > $otherValue ? 1: ($value < $otherValue ? -1 : 0));\n }", "function cmp($a, $b) {\n $valueA = getCompareValue($a);\n $valueB = getCompareValue($b);\n return $valueA - $valueB;\n }", "function cmp($a, $b){\n if ((int)$a->date[0] == (int)$b->date[0]) {\n return 0;\n }\n return ((int)$a->date[0] > (int)$b->date[0]) ? -1 : 1;\n}", "function cmp($a, $b){\n if ((int)$a->date[0] == (int)$b->date[0]) {\n return 0;\n }\n return ((int)$a->date[0] > (int)$b->date[0]) ? -1 : 1;\n}", "public function scompare($o = null) {}", "public function compare($o = null, $attrs = array()) {}", "function cmp($a, $b)\n {\n if ($a->points == $b->points) {\n return 0;\n }\n return ($a->points > $b->points) ? -1 : 1;\n }", "function compare($d1, $d2)\r\n {\r\n $d1->convertTZ(new Date_TimeZone('UTC'));\r\n $d2->convertTZ(new Date_TimeZone('UTC'));\r\n $dias1 = Data_Calc::dataParaDias($d1->dia, $d1->mes, $d1->ano);\r\n $dias2 = Data_Calc::dataParaDias($d2->dia, $d2->mes, $d2->ano);\r\n if($dias1 < $dias2) return -1;\r\n if($dias1 > $dias2) return 1;\r\n if($d1->hora < $d2->hora) return -1;\r\n if($d1->hora > $d2->hora) return 1;\r\n if($d1->minuto < $d2->minuto) return -1;\r\n if($d1->minuto > $d2->minuto) return 1;\r\n if($d1->segundo < $d2->segundo) return -1;\r\n if($d1->segundo > $d2->segundo) return 1;\r\n return 0;\r\n }", "private static function compare($a, $b) {\n $ordera = $a->get_order();\n $orderb = $b->get_order();\n if ($ordera > $orderb) {\n return 1;\n }\n if ($ordera < $orderb) {\n return -1;\n }\n $classa = get_class($a);\n $classb = get_class($b);\n if ($classa > $classb) {\n return 1;\n }\n if ($classb < $classa) {\n return -1;\n }\n return 0;\n }", "public function compare($object,$array) {\n\t\tforeach($object as $property=>$value) {\n\t\t\tif (is_array($value)) {\n\t\t\t\t\tforeach($value as $index=>$nestedObject) {\n\t\t\t\t\t\tif ($nestedObject->id) {\n\t\t\t\t\t\t\t$foundMatch = false;\n\t\t\t\t\t\t\t//order might be different\n\t\t\t\t\t\t\tforeach($array[$property] as $k=>$a) {\n\t\t\t\t\t\t\t\tif ($a['id']==$nestedObject->id) {\n\t\t\t\t\t\t\t\t\t$foundMatch = true;\n\t\t\t\t\t\t\t\t\t$index = $k;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!$foundMatch) throw new Exception('failed to find match for object '.$nestedObject->id);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->compare($nestedObject,$array[$property][$index]);\n\t\t\t\t\t}\n\t\t\t}\n\t\t\telseif (!is_object($value)){\n\t\t\t\tasrt(strval($array[$property]),strval($value));\n\t\t\t}\n\t\t}\n\t}", "public function comparator();", "abstract protected function compare($idA, $idB);", "public function sortNavObjects($navObject1, $navObject2)\n {\n if ($navObject1->menu_order == $navObject2->menu_order) {\n return 0;\n }\n return $navObject1->menu_order < $navObject2->menu_order ? -1 : 1;\n }", "public function compareTo($item);", "function comp($a,$b)\r\n{\r\n\treturn ($a[0] < $b[0]);\r\n}", "public function cmp( $a, $b )\n {\n return gmp_cmp( $a, $b );\n }", "public static function compare($variable1, $variable2) {\n if (!is_array($variable1->value) && !(is_array($variable2->value))) {\n return strcmp($variable1->value, $variable2->value);\n }\n if (count($variable1->value) != count($variable2->value)) {\n // This doesn't mean anything\n return count($variable1->value) - count($variable2->value);\n }\n // If it's multiple just do a diff\n if ($variable1->cardinality == 'multiple') {\n return count(array_diff($variable1->value, $variable2->value));\n } else if ($variable1->cardinality == 'ordered') {\n // check them pairwise\n for($i = 0; $i < count($variable1->value); $i++) {\n if ($variable1->value[$i] != $variable2->value[$i]) {\n // This doesn't mean too much either\n return strcmp($variable1->value[$i], $variable2->value[$i]);\n }\n }\n return 0;\n }\n \n // default to not equal\n return -1;\n }", "function compare($a, $b) {\n if ($this->access($a) == $this->access($b)) {\n return 0;\n }\n return ($this->access($a) < $this->access($b)) ? -1 : 1;\n }", "function compareUsers($user1, $user2)\n{\n\tif ($user1->id > $user2->id) return 1;\n\telseif ($user1->id == $user2->id) return 0;\n\telse return -1;\n}", "function compare($x, $y) {\n if($x[0] == \"N\" && $x[0] == $y[0]) return 0;\n if($x[0] == \"N\" && $y[0] == \"Y\") return 1;\n if($x[0] == \"Y\" && $y[0] == \"N\") return -1;\n $type1 = intval($x[3]);\n $type2 = intval($y[3]);\n if($type1 > $type2) return -1;\n if($type1 < $type2) return 1;\n $time1 = (float)$x[1];\n $time2 = (float)$y[1];\n if($time1 > $time2) return 1;\n if($time1 < $time2) return -1;\n $len1 = intval($x[2]);\n $len2 = intval($y[2]);\n if($len1 > $len2) return 1;\n if($len1 < $len2) return -1;\n return 0;\n}", "public function compare($item);", "function cmp($a, $b){\n if($a->score == $b->score){\n return 0;\n }\n\n return ($a->score<$b->score) ? 1:-1;\n }", "function compare($wert_a, $wert_b)\n {\n $a = $wert_a[0];\n $b = $wert_b[0];\n if ($a == $b) {\n return 0;\n }\n return ($a > $b) ? -1 : +1;\n }", "public function compare($priority1, $priority2): int;", "function cmp($a,$b) {\r\rif($a > $b){\r $x=put_string($a,\">\",$b,\"\\n\");\r}\rif ($a >= $b ) {\r $x=put_string($a,\">=\",$b,\"\\n\");\r}\rif ($a === $b ) {\r $x=put_string($a,\"===\",$b,\"\\n\");\r}\rif ($b < $a ) {\r $x=put_string($b,\"<\",$a,\"\\n\");\r}\rif ($b <= $a ) {\r $x=put_string($b,\"<=\",$a,\"\\n\");\r}\rif ($b === $a ) {\r $x=put_string($b,\"===\",$a,\"\\n\");\r}\rif ($a > $a ) {\r $x=put_string($a,\">\",$a,\"\\n\");\r}\rif ($a < $a ) {\r $x=put_string($a,\"<\",$a,\"\\n\");\r}\rif ($a !== $a ) {\r $x=put_string($a,\"!==\",$a,\"\\n\");\r}\rif ($b > $b ) {\r $x=put_string($b,\">\",$b,\"\\n\");\r}\rif ($b < $b ) {\r $x=put_string($b,\"<\",$b,\"\\n\");\r}\rif ($b !== $b ) {\r $x=put_string($b,\"!==\",$b,\"\\n\");\r}\r\r}", "function cmp($a, $b) \n\t{\t\t\t \n\t $a=key($a);\n\t $b=key($b);\t \n\t if ($a==$b) \n\t {\n\t\t return 0;\n\t }\n\t return ($a < $b) ? -1 : 1;\n\t}", "function cmp($stacka,$stackb) {\n\tif ($stacka['stackid'] == $stackb['stackid']) return 0;\n\treturn ($stacka['stackid'] < $stackb['stackid']) ? -1:1;\n}", "public function compareTo($other): int;", "function ObjectSorter(&$array, $props){\n if(!is_array($props)) $props = array($props => true); \n\t\t$function = '$props=unserialize(\\''.trim(serialize($props)).'\\');\n\t\t\t\tforeach($props as $prop => $ascending) { \n\t\t\t\t\tif($a->$prop != $b->$prop) { \n\t\t\t\t\t\tif($ascending==\"ASC\") return ($a->$prop > $b->$prop) ? 1 : -1; \n\t\t\t\t\t\telse return ($b->$prop > $a->$prop) ? 1 : -1; \n\t\t\t\t\t} \n\t\t\t\t} \n\t\t\t\treturn -1;';\n usort($array, create_function('$a,$b', $function) );\n\t}", "function cmp($a, $b) {\n\treturn $a['posi'] - $b['posi'];\n}", "function cmp($a, $b)\n{\n $aID = substr($a->getId(), 1);\n $bID = substr($b->getId(), 1);\n if ($aID == $bID) {\n return 0;\n }\n return $aID < $bID ? -1 : 1;\n}", "public function cmp($a, $b)\n {\n if((int)$a->cardsValue < (int)$b->cardsValue){\n return true;\n }else{\n return false;\n }\n }", "function CompareValeurs($val1, $val2) {\r\n\tif ($val2[1] == $val1[1])\r\n\t\treturn(strcmp($val1[0],$val2[0]));\r\n\telse\r\n\t\treturn($val2[1] - $val1[1]);\r\n }", "public static function cmp($version1, $version2) {\r\n list($N1, $M1, $K1) = explode(self::SEPARATOR, $version1);\r\n list($N2, $M2, $K2) = explode(self::SEPARATOR, $version2);\r\n if($N1 == $N2) {\r\n if($M1 == $M2) {\r\n if($K1 == $K2) {\r\n return 0; \r\n } else if(!is_numeric($K1) || !is_numeric($K2)) {\r\n throw new VersionComparisonException(sprintf(\"Versions %s and %s are not comparable\", $version1, $version2));\r\n } else if($K1 < $K2) {\r\n return -1;\r\n } else if($K1 > $K2) {\r\n return 1;\r\n } \r\n } else if(!is_numeric($M1) || !is_numeric($M2)) {\r\n throw new VersionComparisonException(sprintf(\"Versions %s and %s are not comparable\", $version1, $version2));\r\n } else if($M1 < $M2) {\r\n return -1;\r\n } else if($M1 > $M2) {\r\n return 1;\r\n } \r\n } else if($N1 < $N2) {\r\n return -1;\r\n } else if($N1 > $N2) {\r\n return 1;\r\n } \r\n }", "function sort_compare_type($a, $b) {\n // Order table types by hardcoded values in a local function getTypePriority.\n // Order tables alphabetically.\n //$cmp = $this->getTypePriority($a['Type']) - $this->getTypePriority($b['Type']);\n //if ($cmp != 0) return $cmp;\n //return strnatcmp($a['Name'], $b['Name']);\n\n // New way of sort. 11/27/2015.\n // Order both table types and tables by priority defined in WMD.\n //print $a['Type'] . \" := \" . $this->tableTypePriorityHash[$a['Type']] . \" - \" .\n // $b['Type'] . \" := \" . $this->tableTypePriorityHash[$b['Type']] . \"<br/>\";\n $cmp = $this->tableTypePriorityHash[$a['Type']] - $this->tableTypePriorityHash[$b['Type']];\n if ($cmp != 0) return $cmp;\n return $this->tablePriorityHash[$a['Name']] - $this->tablePriorityHash[$b['Name']];\n }", "private function _cmp($a, $b)\n {\n if ($a[0] != $b[0])\n {\n if ($a[0] == '*') {return 1;}\n else if ($b[0] == '*') {return -1;}\n else {if ($a[0] < $b[0]) {return -1;} else {return 1;}}\n }\n else\n {\n if ($a[1] != $b[1])\n {\n if ($a[1] == '*') {return 1;}\n else if ($b[1] == '*') {return -1;}\n else {if ($a[1] < $b[1]) {return -1;} else {return 1;}} \n }\n else\n {\n if ($a[2] != $b[2])\n {\n if ($a[2] == '*') {return 1;}\n else if ($b[2] == '*') {return -1;}\n else {\n $lga = strlen($a[2]); $lgb = strlen($b[2]);\n if ($lga > $lgb) {return -1;}\n else if ($lga < $lgb) {return 1;}\n else {if ($a[2] < $b[2]) {return -1;} else {return 1;}}\n }\n }\n else\n {\n if ($a[3] == '*') {return 1;}\n else if ($b[3] == '*') {return -1;}\n else if ($a[3] < $b[3]) {return -1;}\n else if ($a[3] > $b[3]) {return 1;}\n else {return 0;}\n }\n }\n }\n \n }", "public function compareTo(Comparable $valueObject) : int;", "function compare($row1, $row2) {\n\t\treturn $this->compare_priv($row1, $row2, 0);\n\t}", "function cmp_by_name($val1, $val2){\n return strcmp($val1->name, $val2->name);\n}", "function dateCompare($a, $b) { \n\tif($a->startTime->getTimestamp() == $b->startTime->getTimestamp()) {\n\t\treturn 0;\n\t}\n\treturn ($a->startTime->getTimestamp() < $b->startTime->getTimestamp()) ? -1 : 1;\n}", "function dateCompare($a, $b) { \n\t\t\tif($a->startTime->getTimestamp() == $b->startTime->getTimestamp()) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\treturn ($a->startTime->getTimestamp() < $b->startTime->getTimestamp()) ? -1 : 1;\n\t\t}", "function dateCompare($a, $b) { \n\t\t\t\t\t\tif(sameDate($a->startDate, $b->startDate)) {\n\t\t\t\t\t\t\treturn 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn ($a->startDate->getTimestamp() < $b->startDate->getTimestamp()) ? -1 : 1;\n\t\t\t\t\t}", "function cmp($a, $b)\n\t{\n\t\tif($a[4] == $b[4]) return 0;\n\t\t\n\t\tif($a[4] < $b[4]) return -1;\n\t\t\n\t\treturn 1;\n\t}", "public function comparison(DynamicOperandInterface $operand1, $operator,\n StaticOperandInterface $operand2);", "public function compareIntDataTo($key, BL_CustomGrid_Object $object)\n {\n $value = (int) $this->getData($key);\n $otherValue = (int) $object->getData($key);\n return ($value > $otherValue ? 1: ($value < $otherValue ? -1 : 0));\n }", "function compararUsuarios($a, $b)\n{\n if ($a->value == $b->value) {\n return 0;\n }\n return ($a->value < $b->value) ? 1 : -1;\n}", "function adodb_cmp($a, $b) {\n\tif ($a[0] == $b[0]) return 0;\n\treturn ($a[0] < $b[0]) ? -1 : 1;\n}", "private function comparaObjetoObjetoUltimaVersao($objeto)\n {\n \t// codificando objeto para comparacao\n \t$objetoCodificado = Basico_OPController_UtilOPController::codificar($objeto);\n \t// recuperando id da relacao de categoria chave estrangeira\n \t$categoriaChaveEstrangeira = $this->_categoriaAssocChaveEstrangeiraOPController->retornaObjetoCategoriaChaveEstrangeiraCVC($objeto);\n \t// recuperando id generico do objeto\n \t$idGenerico = Basico_OPController_PersistenceOPController::bdRetornaValorIdGenericoObjeto($objeto);\n \t\n \t// recuperando objeto CVC contendo a ultima versao do objeto\n \t$objUltimaVersao = self::retornaObjUltimaVersao($categoriaChaveEstrangeira->id, $idGenerico);\n\n \t// retornando resultado da comparacao entre objetos\n \treturn (strcmp($objetoCodificado, $objUltimaVersao->objeto) === 0);\n }", "function cmp2($a, $b) {\n return strcmp($a['age_start'], $b['age_start']);\n\t}", "public static function cmp_items_func($a, $b){\n\n if (intval($a['order']) == intval($b['order']))\n return 0;\n if (intval($a['order']) > intval($b['order']))\n return 1;\n\n return -1;\n }", "function intcmp ($a, $b)\n{\n\treturn (int)$a - (int)$b;\n}", "protected function compare(string $date1, string $date2)\n {\n $date1 = strtotime($date1);\n $date2 = strtotime($date2);\n if (($date1 === false) || ($date2 === false)) {\n return false;\n } elseif ($date1 < $date2) {\n return -1;\n } elseif ($date1 > $date2) {\n return 1;\n } else {\n return 0;\n }\n }", "function cmp($a, $b) {\n return strcmp($a['generation_id'], $b['generation_id']);\n\t}", "public static function compareDates($date1, $date2)\r\n {\r\n if (!is_numeric($date1)) {\r\n $date1 = izDateTime::timeStringToStamp($date1);\r\n }\r\n if (!is_numeric($date2)) {\r\n $date2 = izDateTime::timeStringToStamp($date2);\r\n }\r\n if ($date1 < $date2) {\r\n return -1;\r\n } else if ($date1 > $date2) {\r\n return 1;\r\n } else {\r\n return 0;\r\n }\r\n }", "function alistcmp($a,$b) {\n $abook_sort_order=get_abook_sort();\n\n switch ($abook_sort_order) {\n case 0:\n case 1:\n $abook_sort='nickname';\n break;\n case 4:\n case 5:\n $abook_sort='email';\n break;\n case 6:\n case 7:\n $abook_sort='label';\n break;\n case 2:\n case 3:\n case 8:\n default:\n $abook_sort='name';\n }\n\n if ($a['backend'] > $b['backend']) {\n return 1;\n } else {\n if ($a['backend'] < $b['backend']) {\n return -1;\n }\n }\n\n if( (($abook_sort_order+2) % 2) == 1) {\n return (strtolower($a[$abook_sort]) < strtolower($b[$abook_sort])) ? 1 : -1;\n } else {\n return (strtolower($a[$abook_sort]) > strtolower($b[$abook_sort])) ? 1 : -1;\n }\n}", "function _wp_object_name_sort_cb($a, $b)\n {\n }", "public function testCmpart()\n {\n $oA = new stdClass();\n $oA->cnt = 10;\n\n $oB = new stdClass();\n $oB->cnt = 10;\n\n $this->assertTrue(cmpart($oA, $oB) == 0);\n\n $oA->cnt = 10;\n $oB->cnt = 20;\n\n $this->assertTrue(cmpart($oA, $oB) == -1);\n }", "function cmp($a, $b) {\n $cmp_pattern = \"/_nr_([0-9]*)_([0-9]{4})/\";\n if ((preg_match($cmp_pattern, $a[1], $a_) == 0) || (preg_match($cmp_pattern, $b[1], $b_) == 0)) {\n strcmp($a[1],$b[1]);\n }\n $a = $a_[2].$a_[1];\n $b = $b_[2].$b_[1];\n\n return intval($a) > intval($b);\n}", "public function getComparatorFor($expected, $actual);", "private static function DateCmp($a, $b)\n {\n if ($a[1]<$b[1])\n $r = -1;\n else if ($a[1]>$b[1])\n $r = 1;\n else $r=0;\n return $r;\n }", "function cmp($payments, $invoices){\n\t\t\t\t\t\t$pd = strtotime($payments['date']);\n\t\t\t\t\t\t$id = strtotime($invoices['date']);\n\t\t\t\t\t\treturn ($pd-$id);\n\t\t\t\t\t}", "function _compareActions($a,$b){\n\t\tif ( @$a['order'] < @$b['order'] ) return -1;\n\t\telse return 1;\n\t}", "function cmp($line1, $line2){\n\t$line1elements = explode(\" \", $line1);\n\t$line2elements = explode(\" \", $line2);\n\t$score1 = $line1elements[3];\n\t$score2 = $line2elements[3];\n\tif($score1>$score2)\n\t\treturn -1;\n\telse if($score1<$score2)\n\t\treturn 1;\n\telse\t\n\t\treturn 0;\n}", "function ScoreCmp2( $a, $b ) {\n\t\n\t$c = $a['score'];\n\t$d = $b['score'];\n\tif( $c == $d ) return 0;\n\treturn ($c>$d) ? -1 : 1;\n}", "function excSort($aItem,$bItem){\n\t\tif($aItem['bgcolor']<$bItem['bgcolor']){\n\t\t\treturn 1;\n\t\t}elseif($aItem['bgcolor']>$bItem['bgcolor'])\n\t\t\treturn -1;\n\n\t\tif($aItem['priority']>$bItem['priority']){\n\t\t\treturn 1;\n\t\t}elseif($aItem['priority']<$bItem['priority']){\n\t\t\treturn -1;\n\t\t}\n\n\t\tif($aItem['uid']<$bItem['uid']){\n\t\t\treturn -1;\n\t\t}elseif($aItem['uid']>$bItem['uid'])\n\t\t\treturn 1;\n\t\treturn 0;\n\t}", "function compare(la_time $other) {\n if($this->counter == $other->counter) {\n if( $this->actor_id < $other->actor_id) {\n return -1;\n }\n else if( $this->actor_id > $other->actor_id) {\n return 1;\n }\n else {\n return 0;\n }\n }\n else if ($this->counter > $other->counter) {\n return 1;\n }\n else if ($this->counter < $other->counter) {\n return -1;\n }\n }", "function adodb_cmpr($a, $b) {\n\tif ($a[0] == $b[0]) return 0;\n\treturn ($a[0] > $b[0]) ? -1 : 1;\n}", "function compare_func($a, $b)\n\t\t{\n\t\t\t$t1 = strtotime($a[\"org_date_added\"]);\n\t\t\t$t2 = strtotime($b[\"org_date_added\"]);\n\t\t\n\t\t\treturn ($t2 - $t1);\n\t\t}", "function version_compare($version1, $version2, $operator = NULL)\n{\n}", "public static function sort_objects(array &$objects_array, $sort_by, $sort_order = \"desc\") {\n $sort_order = strtolower($sort_order);\n uasort(\n $objects_array,\n function ($a, $b) use ($sort_by, $sort_order) {\n if($a->$sort_by == $b->$sort_by) {\n return 0;\n } else {\n $comparison = $a->$sort_by > $b->$sort_by;\n if($sort_order == \"desc\") {\n return $comparison ? -1 : 1;\n } else {\n return $comparison ? 1 : -1;\n }\n }\n });\n }", "function date_compare($a, $b) {\n //var_dump($a);\n $t1 = strtotime($a);\n $t2 = strtotime($b);\n // The negative in front the result sorts by the most recent entry\n return -($t1 - $t2);\n }", "function make_comparer() {\n $criteria = func_get_args();\n foreach ($criteria as $index => $criterion) {\n $criteria[$index] = is_array($criterion) ? array_pad($criterion, 3, null) : array($criterion, SORT_ASC, null);\n }\n\n return function($first, $second) use (&$criteria) {\n foreach ($criteria as $criterion) {\n // How will we compare this round?\n list($column, $sortOrder, $projection) = $criterion;\n $sortOrder = $sortOrder === SORT_DESC ? -1 : 1;\n\n // If a projection was defined project the values now\n if ($projection) {\n $lhs = call_user_func($projection, $first[$column]);\n $rhs = call_user_func($projection, $second[$column]);\n } else {\n $lhs = $first[$column];\n $rhs = $second[$column];\n }\n\n // Do the actual comparison; do not return if equal\n if ($lhs < $rhs) {\n return -1 * $sortOrder;\n } else if ($lhs > $rhs) {\n return 1 * $sortOrder;\n }\n }\n\n return 0; // tiebreakers exhausted, so $first == $second\n };\n }", "protected function compare($a, $b) {\n return $a->total > $b->total;\n }", "function comp($a1, $a2) {\n if (is_null($a1) || is_null($a2)) return false;\n sort($a1);\n sort($a2);\n // There is no comparison of arrays, only values.\n // The minimum number of iterations is 1, the maximum is n.\n foreach ($a2 as $key => $value) {\n if($a1[$key] ** 2 !== $value) return false;\n }\n return true;\n}", "function compare_by_area($a, $b)\n{\n $areaA = $a->width * $a->height;\n $areaB = $b->width * $b->height;\n return $areaA <=> $areaB;\n}", "public function compare($t1, $t2)\n {\n // Zwangsabstieg prüfen\n if ($t1['static_position']) {\n return 1;\n }\n if ($t2['static_position']) {\n return -1;\n }\n\n // Zuerst die Punkte\n if ($t1['points'] == $t2['points']) {\n // tx_rnbase_util_Debug::debug($t1,'compare'.__LINE__);\n // Die gewonnenen Spiele prüfen\n if ($t1['winCount'] == $t2['winCount']) {\n // Jetzt den Satzquotient prüfen\n $t1setquot = $t1['sets_quot'];\n $t2setquot = $t2['sets_quot'];\n if ($t1setquot == $t2setquot) {\n // Jetzt der Ballquotient\n $t1balls = $t1['balls_quot'];\n $t2balls = $t2['balls_quot'];\n if ($t1balls == $t2balls) {\n // Und jetzt der direkte Vergleich\n $baseData = Util::prepareH2H($this->_teamData, $t1, $t2);\n $t1vst2 = $baseData['t1vst2'];\n $t2vst1 = $baseData['t2vst1'];\n $t1H2HPoints = $baseData['t1H2HPoints'];\n $t2H2HPoints = $baseData['t2H2HPoints'];\n if ($t1H2HPoints == $t2H2HPoints) {\n // dann eben zuerst die Satzdifferenz der 2 Spiele prüfen (Hin- und Rückspiel)\n $t1H2HDiff = 0 + $t1vst2[0] + $t2vst1[1] - $t1vst2[1] - $t2vst1[0];\n $t2H2HDiff = 0 + $t1vst2[1] + $t2vst1[0] - $t1vst2[0] - $t2vst1[1];\n if ($t1H2HDiff == $t2H2HDiff) {\n return 0; // Gleichstand. Entscheidungsspiel wird nicht beachtet\n }\n\n return $t1H2HDiff > $t2H2HDiff ? -1 : 1;\n }\n\n return $t1H2HPoints > $t2H2HPoints ? -1 : 1;\n }\n\n return $t1balls > $t2balls ? -1 : 1;\n }\n\n return $t1setquot > $t2setquot ? -1 : 1;\n }\n\n return $t1['winCount'] > $t2['winCount'] ? -1 : 1;\n }\n\n return $t1['points'] > $t2['points'] ? -1 : 1;\n }", "public static function compare($f1, $f2, $properties, $flags = 0)\n\t{\n\t\t$i1 = 0;\n\t\t$i2 = 0;\n\t\t$methods = array_map(function ($prop) {\n\t\t\treturn \"get\" . ucfirst($prop);\n\t\t}, $properties);\n\t\twhile (!method_exists($f1, $methods[$i1]) && $i1 < count($methods))\n\t\t\t$i1++;\n\t\twhile (!method_exists($f2, $methods[$i2]) && $i2 < count($methods))\n\t\t\t$i2++;\n\t\t$method1 = $methods[$i1];\n\t\t$method2 = $methods[$i2];\n\t\t$val1 = $f1->$method1();\n\t\t$val2 = $f2->$method2();\n\t\tif (is_string($val1) && $flags & SORT_NATURAL)\n\t\t\treturn strnatcmp($val1, $val2);\n\t\tif ($val1 == $val2)\n\t\t\treturn 0;\n\t\treturn $val1 > $val2 ? 1 : -1;\n\t}", "public function getComparison();", "public static function compareDates( $date1, $date2 )\n\t{\n\t\t$date1 = strtotime( $date1 );\n\t\t$date2 = strtotime( $date2 );\n\n\t\tif ( $date1 < $date2 )\n\t\t{\n\t\t\treturn -1;\n\t\t}\n\t\telseif( $date1 > $date2 )\n\t\t{\n\t\t\treturn 1;\n\t\t}\n\n\t\treturn 0;\n\t}", "public static function cmp($a, $b)\n {\n return $a['name'] > $b['name'];\n }", "static function compare(Transfer $a, Transfer $b) {\n\t\treturn $a->value - $b->value;\n\t}", "function compare_internal($elem1, $elem2)\n{\n\t// assume NULL > everything\n\tif (is_null( $elem1 ) && is_null( $elem2 ))\n\t{\n\t\treturn 0; // assume they are equal\n\t}\n\tif (is_null( $elem1 ))\n\t{\n\t\treturn 1;\n\t}\n\telse if (is_null( $elem2 ))\n\t{\n\t\treturn -1;\n\t}\n\t\n\t// check to see if both sort index values are numbers, in which case, perform a natsort\n\tif (strlen( $elem1 ) && strlen( $elem2 ) &&\n\t\tctype_digit( $elem1 ) && ctype_digit( $elem2 ))\n\t{\n\t\treturn strnatcmp( $elem1, $elem2 );\n\t}\n\t\n\t// try to compare Persian strings\t\n\t$sort_order = //'آاأإؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهی۱۲۳۴۵۶۷۸۹۰';\n\t\tarray( 'آ', 'ا', 'أ', 'إ', 'ؤ', 'ئ', 'ب', 'پ', 'ت', 'ث', 'ج', 'چ', 'ح', 'خ', 'د',\n\t\t\t'ذ', 'ر', 'ز', 'ژ', 'س', 'ش', 'ص', 'ض', 'ط', 'ظ', 'ع', 'غ', 'ف', 'ق', 'ک', 'گ',\n\t\t\t'ل', 'م', 'ن', 'و', 'ه', 'ی', '۱', '۲', '۳', '۴', '۵', '۶', '۷', '۸', '۹', '۰' );\n\t$sort_array = array();\n\t$index = 1;\n\tforeach ($sort_order as $item)\n\t{\n\t\t$sort_array[ $item ] = $index ++;\n\t}\n\t$len1 = strlen( $elem1 );\n\t$len2 = strlen( $elem2 );\n\t$failed = false;\n\tfor ($i = 0, $j = 0; $i < $len1 && $j < $len2;)\n\t{\n\t\t$c1 = extract_utf8_char( $elem1, $i );\n\t\t$c2 = extract_utf8_char( $elem2, $j );\n\t\t\n\t\tif (array_key_exists( $c1, $sort_array ) &&\n\t\t\tarray_key_exists( $c2, $sort_array ))\n\t\t{\n\t\t\tif ($sort_array[ $c1 ] == $sort_array[ $c2 ])\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn $sort_array[ $c1 ] - $sort_array[ $c2 ];\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$failed = true;\n\t\t\tbreak;\n\t\t}\n\t}\n\t\n\tif ($failed == false)\n\t{\n\t\treturn 0; // equal strings\n\t}\n\t\n\treturn strcmp( $elem1, $elem2 );\n}", "function recognizer_node_cmp($a, $b)\r\n{\r\n if($a->score == $b->score) return 0;\r\n return ($a->score < $b->score) ? -1 : 1; //从小到大排序\r\n}", "public function compareTo($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function compareTo($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }" ]
[ "0.7869542", "0.73873293", "0.6969621", "0.6778731", "0.6716064", "0.65809304", "0.6570545", "0.6551522", "0.64861166", "0.6469694", "0.639923", "0.6388334", "0.6379284", "0.62946475", "0.6271855", "0.6217345", "0.62134933", "0.62018955", "0.62018955", "0.61652607", "0.611706", "0.60866374", "0.6052081", "0.59897816", "0.5980906", "0.5966543", "0.5927214", "0.5919623", "0.5907169", "0.5782079", "0.5751814", "0.57164085", "0.57108724", "0.5693371", "0.5689738", "0.56722283", "0.56648505", "0.5651389", "0.56472504", "0.56448704", "0.56340396", "0.5590431", "0.5584414", "0.55322075", "0.5524866", "0.55167216", "0.55150145", "0.55077976", "0.55031085", "0.5497708", "0.5462766", "0.54545516", "0.54519033", "0.544978", "0.5419982", "0.53937966", "0.53934497", "0.5387279", "0.5381419", "0.5379812", "0.53560686", "0.5348549", "0.53359115", "0.5334769", "0.5329892", "0.53225183", "0.5321483", "0.5318297", "0.53154486", "0.53094757", "0.53090054", "0.530892", "0.52992934", "0.5250874", "0.5233447", "0.5231052", "0.5215344", "0.5214653", "0.51827955", "0.51804686", "0.51681685", "0.5166678", "0.51641655", "0.5162422", "0.5156709", "0.5145976", "0.5141117", "0.5139684", "0.5138977", "0.51351357", "0.5128995", "0.51286536", "0.5127234", "0.5122369", "0.5118923", "0.51165235", "0.51164603", "0.5113552", "0.51005113", "0.51005113" ]
0.78664535
1
views the tax edit page
просматривает страницу редактирования налога
public function postEdit(){ $tax = Tax::find(Input::get('id') ); return View::make('tax.edit') ->with('id', $tax->id) ->with('name', $tax->name) ->with('rate', $tax->rate); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function taxupdate() {\n $arr['page'] = 'taxdetail';\n\t\t$arr['active'] = 'other';\n\t\t$arr['productTax'] = $this->setting->getTax('product');\n\t\t$arr['shippingTax'] = $this->setting->getTax('shipping');\n\t\t$this->load->view('vwSettingTax',$arr);\n\t}", "function tax()\n {\n if (($data['logedUser'] = $this->_admin_pages()))\n { \n \n $manufacturer['content'] = Modules::run('tax/_index'); \n \n $data['header'] = '';\n $data['titelHeader'] = $this->lang->line('tax');\n $data['content'] = Modules::run('ajaxme/ajaxmeAdmintax',$manufacturer);\n \n \n $this->load->view('general',$data);\n \n }\n }", "public function edit($id)\n {\n $tax = $this->taxRepository->findWithoutFail($id);\n\n\n if (empty($tax)) {\n Flash::error(__('lang.not_found', ['operator' => __('lang.tax')]));\n\n return redirect(route('taxes.index'));\n }\n $customFieldsValues = $tax->customFieldsValues()->with('customField')->get();\n $customFields = $this->customFieldRepository->findByField('custom_field_model', $this->taxRepository->model());\n $hasCustomField = in_array($this->taxRepository->model(), setting('custom_field_models', []));\n if ($hasCustomField) {\n $html = generateCustomField($customFields, $customFieldsValues);\n }\n\n return view('settings.taxes.edit')->with('tax', $tax)->with(\"customFields\", isset($html) ? $html : false);\n }", "public function edit(IceTax $iceTax)\n {\n //\n }", "public function edit($id)\n {\n return view('admin::settings.taxes.edit', [\n 'tax' => Tax::find($id),\n 'types' => $this->types\n ]);\n }", "public function show(Tax $tax)\n {\n\n }", "function edit()\r\n\t{\r\n\t\tJRequest::setVar('view', 'transactions');\r\n\t\tJRequest::setVar('layout', 'edit');\r\n\t\tparent::display();\r\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function editar_tip($codigo_tip){\n $data['tip_editar'] = $this->model_admin->form_tip($codigo_tip);\n \n $this->load->view('view_librerias');\n $this->load->view('view_form_tips',$data);\n }", "public function addTax(){\n $data['title'] = \"Add Tax\";\n $this->admin_load('taxes/add_tax',$data); \n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('billing::edit');\n }", "public function edit()\n {\n return view('billing::edit');\n }", "public function index(){\n $data['title'] = \"Taxes\";\n $data['records']= $this->TaxModel->get_list('tbltaxes');\n\n $this->admin_load('taxes/tax_list',$data); \n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function postEdit(){\n return view(\"admin.product.edit\" );\n }", "public function edit() {\n\t\t\t\n\t\t}", "public function getEdit(){\n return view(\"admin.product.edit\" );\n }", "function editInfo()\n {\n $this->view->load('frontend/user/editInfo');\n }", "public function edit()\n {\n $this->model->load('TacGia');\n $tacgia = $this->model->TacGia->findById($_GET['id']);\n $data = array(\n 'title' => 'edit',\n 'tacgia' => $tacgia\n );\n\n // Load view\n $this->view->load('tacgias/edit', $data);\n }", "public function edit(Tax $tax)\n {\n return view('tax.edit')->with('tax', $tax);\n }", "public function edit()\n {\n return view(\"web_admin.books.edit\");\n }", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit_book_resault()\n\t{\n\t\t$this->edit_book_model->editBook();\n\t\t$this->load->view('edit_book_resault');\n\t}", "public function edit($id, Request $request)\n {\n $receipt = Receipt::findOrFail($id);\n $receiptTaxes = ReceiptTax::where('receipt_id', '=', $id)->get();\n\n $periods = \\App\\Models\\Period::where('person_id', '=',\n session('current_person_id'))\n ->orderBy('year', 'asc')->orderBy('period_number', 'asc')->get();\n $receiptTypes = \\App\\Models\\ReceiptType::orderBy('name', 'asc')->get();\n $activities = \\App\\Models\\Activity::orderBy('name', 'asc')->get();\n $zones = \\App\\Models\\Zone::orderBy('name', 'asc')->get();\n $person = \\App\\Models\\Person::find(session('current_person_id'));\n $systemTaxes = \\App\\Models\\SystemTax::orderBy('taxable_iva', 'desc')\n ->orderBy('percent_iva', 'desc')\n ->select('*'\n , \\DB::raw(\"case when apply_to='iva' then 1 else 2 end as iva\"))->get();\n $otherTaxes = \\App\\Models\\OtherTax::orderBy('section', 'asc')\n ->orderBy('name', 'asc')\n ->select('*'\n , \\DB::raw(\"case when section='iva' then 1\n when section='iibb' then 2\n when section='gas' then 3 end as iva\"))->get();\n $tabsOtherTaxes = $otherTaxes;\n $retentionTypes = \\App\\Models\\RetentionType::orderBy('apply_to', 'asc')\n ->orderBy('name', 'asc')->get();\n /*$statesForeigns = \\App\\Models\\State::where('idCountry', 5)->get();\n $immigrationSituations = ImmigrationSituation::all();\n $bloodTypes = \\App\\Traits\\ConstantPeople::getBloodTypes();*/\n $type_id = $receipt->type_id;\n $receiptTaxes = $receiptTaxes->keyBy('tax_id');\n //dd($receiptTaxes);\n //dd($receiptTaxes[3]);\n return view('receipt.form'.$type_id, compact([ 'periods', 'receiptTypes',\n 'activities', 'zones', 'type_id', 'person', 'systemTaxes', 'otherTaxes',\n 'receipt', 'receiptTaxes', 'tabsOtherTaxes', 'retentionTypes'\n ]));\n\n }", "public function edit($typology) //110\n {\n $this->authorize('edit.typologies');\n\n return view('admin.typologies.edit', compact('typology','supervisions'));\n }", "public function edit()\n\t{\n\t\t//\n\t}", "function index()\n {\n $this->_view_edit('view');\n }", "public function edit($id)\n {\n\n $info=Terms::where('type',10)->where('auth_id',Auth::id())->find($id);\n return view('plugin::coupon.edit',compact('info'));\n \n }", "public function annimalEditAction()\n {\n }", "function invoice_edit_view($param1 = '')\n {\n if ($this->session->userdata('admin_login') != 1)\n redirect(base_url(), 'refresh');\n\n $page_data['code'] = $param1;\n $page_data['page_name'] = 'invoice_edit';\n $page_data['page_title'] = get_phrase('edit_invoice');\n $this->load->view('backend/index', $page_data);\n }", "public function edit(Town $town)\n {\n //\n }", "public function edit($id)\n {\n //\n return view('users.accounting.transaction.edit');\n }", "public function showEdit()\n {\n\n }", "public function edit(accidentsTravail $accidentsTravail)\n {\n //\n }", "public function show(IceTax $iceTax)\n {\n //\n }", "abstract protected function renderEdit();", "function expense_edit_view($param1 = '')\n {\n if ($this->session->userdata('admin_login') != 1)\n redirect(base_url(), 'refresh');\n\n $page_data['code'] = $param1;\n $page_data['page_name'] = 'expense_edit';\n $page_data['page_title'] = get_phrase('edit_expense');\n $this->load->view('backend/index', $page_data);\n }", "public function editAction() {}", "public function edit(Territory $territory)\n {\n //\n }", "public function edit($id)\n {\n $taxonomy = Taxonomy::findOrFail($id);\n\n return view('backend.taxonomy.edit', compact('taxonomy'));\n }", "public function edit($id)\n {\n $transaction = IncomeExpense::find($id);\n return view('pages.edit',compact('transaction'));\n }", "function lb_show_edit_page_action() {\n\tlb_show_templates(\n\t\tarray(\n\t\t\t'name' => 'edit',\n\t\t\t'this_cafe' => lb_get_this_cafe_from_cafe( $_GET['edit-id'] ),\n\t\t)\n\t);\n}", "public function edit()\n {\n return view('stores::edit');\n }", "public function edit($fno)\n {\n $payment = \\App\\Payment::find($fno);\n $data[\"payment\"] = $payment;\n \n return view('payment.edit',$data);//\n }", "function transport_edit_view($param1 = '')\n {\n if ($this->session->userdata('admin_login') != 1)\n redirect(base_url(), 'refresh');\n\n $page_data['code'] = $param1;\n $page_data['page_name'] = 'transport_edit';\n $page_data['page_title'] = get_phrase('edit_transport');\n $this->load->view('backend/index', $page_data);\n }", "public function edit( )\r\n {\r\n //\r\n }", "public function edit()\n\t{\n\t\t\n\t}", "public function edit(){\n $factura = parent::find($_GET['id']);\n require_once 'views/employee/layouts/header.php';\n require_once 'views/employee/factura/edit.php';\n require_once 'views/employee/layouts/footer.php';\n\n }", "public function editAction()\n {\n $tiles = [];\n // Reuse the parameters from $_REQUEST\n // If we are going to render a full page for edit form, we shall also render the _form_controls\n $tiles[] = Region::create($this->getEditRegionPath(), array_merge($_REQUEST, [\n '_form_controls' => true,\n ]));\n return $this->render($this->findTemplatePath('page.html') , array( 'tiles' => $tiles ));\n }", "public function editView() {\n $this->template()->addTplFile('edit.phtml');\n $this->setTinyMCE($this->formEdit->text, 'advanced');\n $this->setTinyMCE($this->formEdit->textPanel, 'advanced', array('height' => 300));\n if(isset($this->formEdit->textFooter)){\n $this->setTinyMCE($this->formEdit->textFooter, 'advanced', array('height' => 300));\n }\n Template_Module::setEdit(true);\n }", "public function edit() {\n\t\t$data['pagetitle'] = 'Dashboard - Edit Posts';\n\n\t\t$data['postid'] = $viewmodel->getPostById($postid['id'] );\n\t\tView::renderAdminTemplate($data, \"App/Views/admin/edit/index.php\") ;\n\t}", "public function edit() {\n $data['individual'] = $this->individual();\n $data['menus'] = $this->allmenus();\n $data['pages'] = $this->allpages();\n $this->load->view('Dashboard/header');\n $this->load->view('Menu/edit', $data);\n $this->load->view('Dashboard/footer');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "function edit() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultViewForm();\n\n\t\tif (!$view) {\n\t\t\tthrow new Exception('Edit task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t// Hint the view that it's not a listing, but a form (KenedoView::display() uses it to set the right template file)\n\t\t$view->listing = false;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function edit($id)\n {\n //\n $incoterm = Incoterm::find($id);\n return view('admin.incoterm.edit',compact('incoterm'));\n }", "public function index()\n {\n\n $taxes =Tax::all();\n\n return view('admin.tax.tax',compact('taxes'));\n }", "public function editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Browser_Service_Recsite::getRecsite(intval($id));\t\t\n\t\t$this->assign('info', $info);\n\t\t$this->assign('models', $this->models);\n\t\t$this->assign('types', $this->types);\n\t}", "public function edit($id)\n {\n $type = transaction_types::findOrFail($id);\n return view('admin.transactionType.edit',compact('type'));\n }", "public function edit($id)\n {\n $advance=AdvanceSettlementCustomer::find($id);\n $customer = Customer::all();\n return view('admin.advance_settlement_customer.edit',compact('advance','customer'));\n }", "public function edit()\n {\n // get resources for display \n $website = Website::where('name','flooflix')->first();\n if (!is_null($website) && !empty($website)) {\n $page = Page::where('website_id', $website->id)->where('name','modifier_carte')->first();\n if(!is_null($page) && !empty($page)){\n $datas = $page->getResourcesToDisplayPage($page);\n } \n }else{\n return view('errors.404');\n }\n return view('Flooflix.forms.editBankCard', compact('datas'));\n }", "public function edit()\n {\n \n \n }", "public function edit($id) {\n\n //page settings\n $page = $this->pageSettings('edit');\n\n //client leadsources\n $taxrates = $this->taxraterepo->search($id);\n\n //not found\n if (!$taxrate = $taxrates->first()) {\n abort(409, __('lang.error_loading_item'));\n }\n\n //reponse payload\n $payload = [\n 'page' => $page,\n 'taxrate' => $taxrate,\n ];\n\n //response\n return new EditResponse($payload);\n }", "public function editAction()\n {\n $traineedocId = $this->getRequest()->getParam('id');\n $traineedoc = $this->_initTraineedoc();\n if ($traineedocId && !$traineedoc->getId()) {\n $this->_getSession()->addError(\n Mage::helper('bs_traineedoc')->__('This trainee document no longer exists.')\n );\n $this->_redirect('*/*/');\n return;\n }\n $data = Mage::getSingleton('adminhtml/session')->getTraineedocData(true);\n if (!empty($data)) {\n $traineedoc->setData($data);\n }\n Mage::register('traineedoc_data', $traineedoc);\n $this->loadLayout();\n $this->_title(Mage::helper('bs_traineedoc')->__('Trainee Document'))\n ->_title(Mage::helper('bs_traineedoc')->__('Trainee Document'));\n if ($traineedoc->getId()) {\n $this->_title($traineedoc->getTraineeDocName());\n } else {\n $this->_title(Mage::helper('bs_traineedoc')->__('Add trainee document'));\n }\n if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {\n $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);\n }\n $this->renderLayout();\n }", "public function edit()\r\n {\r\n //\r\n }", "public function edit()\r\n {\r\n //\r\n }", "public function edit() {\n\t\t$userId = $this->uri->segment(3);\n\t\t$name = 'Juan Saluminag';\n\n\t\t$this->breadcrumbs->set(['Edit: ' . $name => 'members/edit/' . $userId]);\n\n\t\t$this->render('register');\n\t}", "public function editView() {\n Template_Module::setFullWidth(true);\n $this->edit = true;\n $this->addView();\n // cestak obrázků\n $this->imagePath = $this->category()->getModule()->getDataDir(true);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit($id)\n {\n $data = TD::where('id',$id)->get();\n $banks = MasterBank::all();\n $tipeDeps = M_Tipe_Deposito::all();\n return view('registrasi-td-form-edit',compact('data','banks','tipeDeps'));\n }", "public function edit($id)\n {\n $countries = Country::find($id);\n // Redirect to taxon list if updating taxon wasn't existed\n if ($countries == null || count($countries) == 0) {\n return redirect()->intended('/country');\n }\n\n return view('countries/edit', ['countries' => $countries]);\n }", "public function editQuotationInvoice($id){\n $invoice = WlgCorporationInvoice::find($id);\n\n $invoiceForms = WlgCorporationInvoice::where('if_id', $id)->get()->toArray();\n return view('edit-wlg-corportaion-invoice', compact('invoice', 'invoiceForms'));\n }", "public function edit(BaseTestCenter $baseTC)\n {\n //$cities = \\App\\Entity\\City::all('id', 'name', 'countryId');\n $testProviders = \\App\\Entity\\TestProvider::all('name', 'id');\n //$clickoutURLs = \\App\\Entity\\ClickoutURL::all('trackingLinkName', 'id');\n \n\n return view('baseTCFolder/baseTCEdit')->with(compact('baseTC', 'testProviders'));\n\n }", "public function edit() {\n }", "function edit() {\n\t\t\t\n\t\t// Require a validated association \n\t\tProfileAssociationValidRequired::check();\r\n\t\n\t\t// Get annonce\r\n\t\t$this->fetchAnnonce();\n\t\t\n\t\t// We should have write access to this annonce\n\t\t$this->checkWriteAccess();\r\n\t\r\n\t\t// Redirect to the annonce\r\n\t\t$this->renderView(\"editAnnonce\");\r\n\t\r\n\t}", "function showApprentice() {\n\t\t\t\t\t$apprentice = Apprentice::find_by_name(params(0));\n\t\t\t\t\t\n\t\t\t\t\t$editForm = new h2o('views/editApprentice.html');\n\t\t\t\t\techo $editForm->render(compact('apprentice'));\n\t\t\t\t}", "function pa_edit() {\n\t\t\t\t$edit_pid = (int)UTIL::get_post('edit_pid');\n\t\t\t\t\n\t\t\t\t//-- haben wir keine edit-id, gibts eine seiten-tabelle zur auswahl\n\t\t\t\tif (!$edit_pid) {\n\t\t\t\t\techo 'error: no pid';\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$form = MC::create('form');\n\t\t\t\t$form->init('page', 'mod_page');\n\t\t\t\t$form->add_hidden('edit_pid', $edit_pid);\n\t\t\t\t\n\t\t\t\t// hatten wir fehler\n\t\t\t\tif ($this->get_var('error')) {\n\t\t\t\t\t$form->set_values($this->get_var('data'));\n\t\t\t\t\t$form->set_error_fields($this->get_var('error'));\n\t\t\t\t}\t\n\t\t\t\telse {\n\t\t\t\t\t// frisch aus db lesen\n\t\t\t\t\t$sql = 'SELECT * FROM '.$this->mod_tbl.' WHERE id='.$edit_pid;\n\t\t\t\t\t$res = $this->DB->query($sql);\n\t\t\t\t\t$data = $res->r();\n\t\t\t\t\t$form->set_values($data);\n\t\t\t\t}\n\n\t\t\t\t$this->set_var('path', $this->_get_path_print($edit_pid));\n\t\t\t\t$this->set_var('form', $form);\n\t\t\t\t\n\t\t\t\t$this->OPC->generate_view($this->tpl_dir.'pa_edit.php');\n\n\t\t\t}", "public function edit()\n {\n return view('inventory::edit');\n }", "function edit(){\n $data['title'] = 'Edit Obat';\n $kode_barcode = $this->input->get('kode_barcode'); //\n\n $where = array('kode_barcode'=>$kode_barcode); //\n\n $data['row'] = $this->m_barang->get_bydata($where); //\n $data['query'] = $this->m_barang->tampil_satuan(); //query dari model\n\n //utk form edit nya, saya tambahkan sebuah view bernama feupload.php\n $this->template->load('static','barang/editbarang',$data);\n }", "public function edit($id)\n\t{\n\t\t$tlb = Tlbpayment::find($id);\n $equities = Account::where('category','EQUITY')->get();\n $asset = Account::where('category','ASSET')->get();\n\n $vehicles = Vehicle::all();\n\t\treturn View::make('tlbs.edit', compact('tlb','equities','asset','vehicles'));\n\t}", "public function edit_toko(){\n\t}", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit()\n {\n // $setting = Setting::findOrFail($id);\n\n // return view('invoice.edit');\n }", "public function editAction()\r\n {\r\n }", "public function edit()\n {\n \n }", "public function edit()\n {\n \n }", "public function edit()\n {\n \n }", "public function edit()\n {\n return view('panel.order-management.payment.form-edit');\n }", "public function companyedit() {\r\n $company = $this->model->getCompany($_GET['id']);\r\n $contragentTypes = $this->model->getContragentTypes();\r\n\r\n return $this->view('company/companyedit', array('company' => $company, 'contragentType' => $contragentTypes));\r\n }", "public function edit($id)\n { \n $pageTitle='System Information Edit';\n return view('setups::systemInformation.edit',compact('pageTitle'));\n }", "public function edit(tip $tip)\n {\n $page_title = 'Update Tips';\n $this->authorize('view', $tip);\n return view('admin.tip.edit',compact('page_title','tip'));\n }", "public function edit($id)\n {\n // include view file\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id){\n\t\t$transaction = Expense::find($id); // getting the speific user to edit\n\t\treturn view('driver.expense.edit')->with([\n 'transaction' => $transaction\n\t\t]);\n }", "public function Edit()\n\t{\n\t\t\n\t}", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }", "public function edit()\n {\n //\n }" ]
[ "0.76382494", "0.7034002", "0.70160884", "0.69389576", "0.67746663", "0.66096514", "0.64846355", "0.6437889", "0.6419488", "0.641871", "0.63995886", "0.63995886", "0.6371156", "0.6371156", "0.63658327", "0.63194865", "0.6287405", "0.6282806", "0.62676173", "0.62562585", "0.625274", "0.6243929", "0.62396556", "0.62256217", "0.62097853", "0.620635", "0.6201926", "0.6178843", "0.6176467", "0.6176454", "0.6169546", "0.61648655", "0.6161191", "0.6159401", "0.61566854", "0.6154968", "0.6143833", "0.61385643", "0.61341053", "0.61322135", "0.6130676", "0.6122227", "0.61082524", "0.61011356", "0.6096261", "0.6095764", "0.6089273", "0.60881174", "0.6086675", "0.6085832", "0.60768235", "0.606771", "0.60623133", "0.6059601", "0.6045644", "0.6042516", "0.60423386", "0.60417944", "0.6035602", "0.6027692", "0.602159", "0.602084", "0.6019688", "0.6019102", "0.60096854", "0.599581", "0.599581", "0.5994784", "0.5991889", "0.5987489", "0.5982109", "0.59817266", "0.5976034", "0.59712553", "0.59658134", "0.595974", "0.59572417", "0.59526795", "0.59507984", "0.5948046", "0.59464806", "0.59450024", "0.5941493", "0.593919", "0.59329337", "0.5926961", "0.592133", "0.592133", "0.592133", "0.59186214", "0.5913573", "0.5913228", "0.5912436", "0.59121335", "0.5912072", "0.59092885", "0.5909053", "0.5902125", "0.5902125", "0.5902125" ]
0.77472943
0
Get all bundles defined by this model bundle
Получить все пакеты, определенные этим модельным пакетом
public static function allBundles(): Collection;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBundles()\n {\n return $this->bundles;\n }", "public function getBundles() {\n return $this->getConfig(\"bundles\");\n }", "public function getBundles()\n {\n return array();\n }", "public function registerBundles()\n {\n return $this->getBundleInstances(\n $this,\n $this->bundlesToLoad\n );\n }", "public function bundles() {\n $bundles = $this->user->find(Auth::user()->id)->bundles()->get();\n return view('frontend.bundle.list_bundle', compact('bundles'));\n }", "private function initializeBundles(): array\n {\n // as this method is not called when the container is loaded from the cache.\n $kernel = $this->getApplication()->getKernel();\n $container = $this->getContainerBuilder($kernel);\n $bundles = $kernel->getBundles();\n foreach ($bundles as $bundle) {\n if ($extension = $bundle->getContainerExtension()) {\n $container->registerExtension($extension);\n }\n }\n\n foreach ($bundles as $bundle) {\n $bundle->build($container);\n }\n\n return $bundles;\n }", "public function getAvailableBundles() {\n $options = [];\n $entityTypes = $this->getSupportedEntityTypes();\n\n foreach ($entityTypes as $entityType => $entityLabel) {\n $options[$entityLabel][$entityType] = \"$entityLabel (Default)\";\n\n $bundles = $this->entityTypeBundleInfo->getBundleInfo($entityType);\n\n foreach ($bundles as $bundleId => $bundleData) {\n $defaultsId = $entityType . '__' . $bundleId;\n $options[$entityLabel][$defaultsId] = $bundleData['label'];\n }\n }\n\n return $options;\n }", "protected static function loadFixturesBundles()\n {\n return [\n 'ElcodiCartBundle',\n 'ElcodiCouponBundle',\n 'ElcodiProductBundle',\n 'ElcodiCurrencyBundle',\n ];\n }", "protected static function loadFixturesBundles()\n {\n return [\n 'ProductBundle',\n ];\n }", "public function getBundles(ParserInterface $parser): array\n {\n return [\n BundleConfig::create(ApiPlatformBundle::class),\n BundleConfig::create(RichardhjContaoApiBundle::class)\n ->setLoadAfter([ApiPlatformBundle::class, ContaoCoreBundle::class]),\n ];\n }", "protected function loadFixturesBundles()\n {\n return [\n 'ElcodiUserBundle',\n 'ElcodiCurrencyBundle',\n 'ElcodiAttributeBundle',\n 'ElcodiProductBundle',\n 'ElcodiCurrencyBundle',\n 'ElcodiCartBundle',\n 'ElcodiCouponBundle',\n 'ElcodiRuleBundle',\n ];\n }", "public function registerBundles(): iterable\n {\n $contents = require $this->getProjectDir().'/config/bundles.php';\n foreach ($contents as $class => $envs) {\n if ($envs[$this->environment] ?? $envs['all'] ?? false) {\n yield new $class();\n }\n }\n }", "public function isAllBundles() {\n return $this->getConfig(\"all_bundles\");\n }", "private function _callBundlesConfig(): array\n {\n $contents = require $this->getProjectDir().'/config/bundles.php';\n /**\n * Load the current micro-service extra bundle\n */\n $extra_bundle_file = sprintf('%s/extra.bundles.php' , APPLICATION_LIB_PATH ) ;\n\n ##\n if(file_exists($extra_bundle_file)) {\n ##\n $contents = array_merge($contents , require $extra_bundle_file) ;\n }\n ##\n return $contents;\n }", "public function discover(): array\n {\n $schemas = $this->loadModelsFromBundles();\n\n return $schemas;\n }", "protected function loadBundles()\n {\n /**\n * @var $bundle BundleInterface\n */\n foreach (static::$bundles as $bundle) {\n $bundle->init($this);\n }\n }", "public function products()\n {\n return $this->morphedByMany(Product::class, 'bundleable');\n }", "public static function getAll(){\n\t\treturn self::$components;\n\t}", "public function get_assets_all()\n {\n return $this->assets;\n }", "function _hps_courses_bundles() {\n $bundles = array(\n 'taxonomy_term' => array(\n 'hps_participant_role' => array(\n 'name' => t(\"HPS Courses Participant Role\"),\n 'description' => t(\"Contains roles of course participants.\"),\n 'machine_name' => 'hps_participant_role',\n ),\n 'hps_person_authority' => array(\n 'name' => t(\"HPS Person Authority\"),\n 'description' => t(\"Contains authority records for people names.\"),\n 'machine_name' => 'hps_person_authority',\n ),\n 'hps_course_item_type' => array(\n 'name' => t(\"HPS Course Item Type\"),\n 'description' => t('Terms describe the type of item associated with '.\n 'a course e.g. official course photo, syllabus etc.'),\n 'machine_name' => 'hps_course_item_type',\n ),\n ),\n );\n return $bundles;\n}", "protected function getEntities() {\n $query = $this->getStorage()->getQuery();\n $keys = $this->entityType->getKeys();\n\n $query->condition($keys['bundle'], $this->bundle)\n ->sort($keys['id']);\n\n $bundle = $this->entityManager->getStorage($this->entityType->getBundleEntityType())\n ->load($this->bundle);\n\n $pager_settings = $bundle->getPagerSettings();\n if (!empty($pager_settings['page_parameter']) && !empty($pager_settings['page_size_parameter'])) {\n $query->pager($pager_settings['default_limit']);\n }\n\n return $this->getStorage()->getResultEntities($query->execute());\n }", "public function tags()\n {\n return $this->morphedByMany(Tag::class, 'bundleable');\n }", "public function getAll()\n {\n return DB::table('product_models')->get()->all();\n }", "private function getAllModels()\n {\n return (object)ModelRegistry::getAllObjects();\n }", "public function getCatalogues()\n {\n return Catalogue::all();\n }", "public function registerBundles()\n {\n $bundles = [\n ];\n\n return $bundles;\n }", "public static function getCustomBundleNameList(Controller $controller, Container $container)\n {\n $srcPath = rtrim(dirname($controller->get('kernel')->getRootDir()), '/') . '/src';\n $allBundles = $container->getParameter('kernel.bundles');\n $bundles = array();\n\n // find all bundles in src folder\n foreach ($allBundles as $bundle=>$path)\n {\n $dir = dirname(str_replace('\\\\', '/', $srcPath . '/' . $path));\n\n if (is_dir($dir))\n {\n $bundles[] = $bundle;\n }\n }\n\n asort($bundles);\n\n return $bundles;\n }", "public function getModels();", "public function getModels();", "public static function getBrandsAll()\n {\n $pdo = Database::getPDO();\n $sql = \"SELECT * FROM `\". static::$table .\"` \n WHERE `order` > 0\n ORDER BY `order` ASC \";\n \n $statement = $pdo->query( $sql );\n $modelListFromDatabase = $statement->fetchAll( PDO::FETCH_ASSOC );\n\n // Etape 2 : On vérifie qu'on a des résultats\n if( $modelListFromDatabase === false ) :\n exit( static::$table.\" not found !\" );\n endif;\n \n // Etape 3 : On prépare un tableau d'objets\n $modelsArray = [];\n\n // Etape 4 : On parcours nos résultats pour créer les objets\n // à partir des données récupérées en BDD\n foreach( $modelListFromDatabase as $modelDataFromDatabase ) :\n $model = new static( $modelDataFromDatabase );\n $modelsArray[] = $model;\n endforeach;\n\n // Etape 5 : On renvoi notre tableau d'objets (ici de type Brand)\n return $modelsArray;\n }", "public function getAll()\n {\n return $this->database->getAll('Extension', 'slicerpackages');\n }", "protected function loadBundleConfiguration(): array\n {\n if($arrFiles = $this->getBundleConfigurationFiles())\n {\n return ImportController::importFiles($arrFiles, false);\n }\n\n return [[],[]];\n }", "public function registerBundles()\n {\n return [\n new FrameworkBundle(),\n new TwigBundle(),\n new DoctrineBundle(),\n new SymfonyAnalyticsBundle(),\n ];\n }", "public function bundle()\n {\n return $this->hasOne(ProductBundle::class, 'id','bundle_id');\n }", "protected function get($bundles)\n\t{\n\t\t$responses = array();\n\n\t\t$repository = IoC::resolve('bundle.repository');\n\n\t\tforeach ($bundles as $bundle)\n\t\t{\n\t\t\t// First we'll call the bundle repository to gather the bundle data\n\t\t\t// array, which contains all of the information needed to install\n\t\t\t// the bundle into the application. We'll verify that the bundle\n\t\t\t// exists and the API is responding for each bundle.\n\t\t\t$response = $repository->get($bundle);\n\n\t\t\tif ( ! $response)\n\t\t\t{\n\t\t\t\tthrow new \\Exception(\"The bundle API is not responding.\");\n\t\t\t}\n\n\t\t\tif ($response['status'] == 'not-found')\n\t\t\t{\n\t\t\t\tthrow new \\Exception(\"There is not a bundle named [$bundle].\");\n\t\t\t}\n\n\t\t\t// If the bundle was retrieved successfully, we will add it to\n\t\t\t// our array of bundles, as well as merge all of the bundle's\n\t\t\t// dependencies into the array of responses so that they are\n\t\t\t// installed along with the consuming dependency.\n\t\t\t$bundle = $response['bundle'];\n\n\t\t\t$responses[] = $bundle;\n\n\t\t\t$responses = array_merge($responses, $this->get($bundle['dependencies']));\n\t\t}\n\n\t\treturn $responses;\n\t}", "protected function loadBundles($bundles)\n {\n $am = $this->getAssetManager();\n $result = [];\n foreach ($bundles as $name) {\n $this->stdout(\"Loading bundle '{$name}' with dependencies...\\n\");\n $result[$name] = $am->getBundle($name);\n }\n foreach ($result as $bundle) {\n $this->loadDependency($bundle, $result);\n }\n\n return $result;\n }", "public function getAllObjectConfigurations(): array\n {\n return $this->objects;\n }", "public function all()\n {\n return $this->modules;\n }", "public function getBundle($name);", "public function bundle();", "protected function parseComposer()\r\n {\r\n $bundles = parent::parseComposer();\r\n foreach ($this->getPackages() as $package) {\r\n if (!strncmp($package['name'], 'superrb/', strlen('superrb/'))) {\r\n $bundles[] = array(\r\n 'name' => $package['name'],\r\n 'version' => $package['version'],\r\n 'reference' => $package['source']['reference'],\r\n );\r\n }\r\n }\r\n\r\n return $bundles;\r\n }", "public static function getAll() : array {\n return self::$objects;\n }", "public function registerBundles($environment) {\n $bundles = array(\n //new AsseticBundle(),\n new \\Symfony\\Bundle\\AsseticBundle\\AsseticBundle(),\n new \\Lexik\\Bundle\\TranslationBundle\\LexikTranslationBundle(),\n );\n\n if (in_array($environment, array('dev', 'test'))) {\n ;\n }\n\n $newBundles = array();\n foreach ($bundles as $bundle) {\n if (method_exists($bundle, 'registerBundles')) {\n $newBundles = array_merge($newBundles, $bundle->registerBundles($environment));\n }\n }\n $bundles = array_merge($bundles, $newBundles);\n\n return $bundles;\n }", "public function getAllBooks() {\n \n $allBooks = Libro::all();\n\n return $allBooks;\n }", "public function getMappingEntityBundle();", "public function getArrayOfBrands();", "public function getEnviesLib(){\n $dataEnvies = \\app\\modules\\libraries\\models\\Category::findOne(['slug' => 'envies'])->children()->with('items')->asArray()->all();\n $enviesLib = [];\n foreach ($dataEnvies as $key => $value) {\n $enviesLib[$value['slug']] = ArrayHelper::map($value['items'], 'item_id', function ($element) {\n return ['slug'=>$element['slug'], 'title' => $element['title']];\n });\n }\n return $enviesLib;\n }", "public function getModels()\n {\n return $this->_models;\n }", "public function getAll()\n {\n $this->_modules['core'][] = array (\n 'module' => 'Magento',\n 'codePool' => 'core',\n 'active' => 'true',\n 'version' => Mage::getVersion()\n );\n\n foreach (Mage::getConfig()->getModuleConfig() as $node) {\n foreach ($node as $module => $data) {\n if (!isset($data->codePool)) {\n continue;\n }\n $codePool = $data->codePool->asArray();\n if (empty($codePool)) {\n continue;\n }\n if (is_array($codePool)) {\n $codePool = implode('.', $codePool);\n }\n\n $this->_modules[$codePool][] = array (\n 'module' => $module,\n 'codePool' => $codePool,\n 'active' => $data->active,\n 'version' => $data->version\n );\n }\n }\n\n return $this->_modules;\n }", "public function get_all()\n {\n $plugins = $this->get_plugins();\n\n $pluginControllers = array();\n\n foreach($plugins as $plugin){\n foreach($plugin as $controller => $actions){\n $pluginControllers[$controller] = $plugin[$controller];\n }\n }\n\n return array_merge($this->get(), $pluginControllers);\n }", "public function getComponents(): array\n {\n return $this->components;\n }", "public function load() {\n foreach ($this->bundles as $bundle) {\n \n $class = new \\Wingu\\OctopusCore\\Reflection\\ReflectionClass($bundle);\n \n $prefix = '';\n $this->location[$class->getShortName()] = \\Raptor\\Util\\ClassLocation::getLocation($bundle);\n $this->specif[$class->getShortName()] = array('location' => \\Raptor\\Util\\ClassLocation::getLocation($bundle), 'namespace' => $class->getNamespaceName(), 'name' => $class->getName());\n if (!$class->getReflectionDocComment()->isEmpty() and $class->getReflectionDocComment()->getAnnotationsCollection()->hasAnnotationTag('Route')) {\n $doc = $class->getReflectionDocComment();\n $obj = $doc->getAnnotationsCollection()->getAnnotation('Route');\n $prefix = $obj[0]->getDescription();\n }\n \n $controllerDir = \\Raptor\\Util\\ClassLocation::getLocation($bundle) . '/Controller';\n $listfiles= \\Raptor\\Util\\Files::find($controllerDir, \"*Controller.php\");\n \n foreach ($listfiles as $nombre_fichero) {\n $prefixController = $prefix;\n $namespaceSrc = explode('src', $nombre_fichero);\n $real = array();\n if (count($namespaceSrc) > 1)\n $real = $namespaceSrc[1];\n else {\n $namespaceSrc = explode('libs', $nombre_fichero);\n $real = $namespaceSrc[1];\n }\n $namespaceClass = str_replace('.php', '', $real);\n $namespace = str_replace('/', '\\\\', $namespaceClass);\n \n $controller = new \\Wingu\\OctopusCore\\Reflection\\ReflectionClass($namespace);\n if (!$controller->getReflectionDocComment()->isEmpty() and $controller->getReflectionDocComment()->getAnnotationsCollection()->hasAnnotationTag('Route')) {\n $doc = $controller->getReflectionDocComment();\n $obj = $doc->getAnnotationsCollection()->getAnnotation('Route');\n $prefixController = $prefixController . $obj[0]->getDescription();\n }\n\n foreach ($controller->getMethods() as $method) {\n /**\n * Searching the API in any method of controller classes\n */\n $api = new \\stdClass();\n $api->hasApi = false;\n $api->version = '0.0.0';\n $api->text = '';\n $doc = $method->getReflectionDocComment();\n if ($method->getReflectionDocComment()->getAnnotationsCollection()->hasAnnotationTag('api')) {\n $api->text = $method->getReflectionDocComment()->getFullDescription();\n $collectionDescrip = $doc->getAnnotationsCollection()->getAnnotation('api');\n $api->category = $collectionDescrip[0]->getDescription();\n $api->class = $method->getDeclaringClass()->getName();\n $api->bundle = $class->getName();\n $api->method = $method->getName();\n $api->hasApi = true;\n if($method->getReflectionDocComment()->getAnnotationsCollection()->hasAnnotationTag('Route')){\n $doc = $method->getReflectionDocComment();\n $collectionRouteObj = $doc->getAnnotationsCollection()->getAnnotation('Route');\n $collectionRoute = $collectionRouteObj[0];\n $api->route=$prefixController . $collectionRoute->getDescription();\n }else{\n $api->route=false;\n }\n \n if($method->getReflectionDocComment()->getAnnotationsCollection()->hasAnnotationTag('version')){\n $doc = $method->getReflectionDocComment();\n $collectionRouteObj = $doc->getAnnotationsCollection()->getAnnotation('version');\n $collectionRoute = $collectionRouteObj[0];\n $api->version=$collectionRoute->getDescription();\n }\n }\n if ($api->hasApi) {\n if (!isset($this->api[$api->category]))\n $this->api[$api->category] = array();\n $this->api[$api->category][] = $api;\n }\n \n if (!$method->getReflectionDocComment()->isEmpty() and $method->getReflectionDocComment()->getAnnotationsCollection()->hasAnnotationTag('Route')) {\n \n if ($method->getReflectionDocComment()->getAnnotationsCollection()->hasAnnotationTag('RouteName')) {\n $collectionNameObj = $doc->getAnnotationsCollection()->getAnnotation('RouteName');\n $collectionName = $collectionNameObj[0]->getDescription();\n } else {\n $routeArray = $doc->getAnnotationsCollection()->getAnnotation('Route');\n $Route = $routeArray[0];\n $collectionName = str_replace('/', '_', $prefixController . $Route->getDescription());\n }\n\n \n $collectionRouteObj = $doc->getAnnotationsCollection()->getAnnotation('Route');\n \n $collectionRoute = $collectionRouteObj[0];\n $descrip=\"\";\n \n if ($method->getReflectionDocComment()->getAnnotationsCollection()->hasAnnotationTag('Description')) {\n $collectionDescrip = $doc->getAnnotationsCollection()->getAnnotation('Description');\n $descrip = $collectionDescrip[0]->getDescription();\n }\n $methodName='ANY';\n if ($method->getReflectionDocComment()->getAnnotationsCollection()->hasAnnotationTag('Method')) {\n $collectionMethod = $doc->getAnnotationsCollection()->getAnnotation('Method');\n $methodName = $collectionMethod[0]->getDescription();\n }\n \n $this->definitions[$collectionName]=$api;\n $this->definitions[$collectionName] = array($prefixController . $collectionRoute->getDescription(), $method->getDeclaringClass()->getName(), $method->getName(), $class->getName(),'method'=>$methodName);\n $this->description[$prefixController . $collectionRoute->getDescription()]=array($descrip,$method->getReflectionDocComment()->getFullDescription());\n \n }\n }\n }\n }\n \n }", "public function getComponents () : array\n {\n return $this->components;\n }", "public function getDeployedModels()\n {\n return $this->deployed_models;\n }", "public function indexAction()\n {\n $entities = $this->get('mqm_brand.brand_manager')->findBrands();\n\n return array('entities' => $entities);\n }", "public function getComponents()\n {\n return $this->result->getComponents();\n }", "public function getAssets()\n {\n return $this->getService('assets');\n }", "public function fetchBundleTickets($eventType) : array\n\t\t{\n\t\t\t$Bundletickets = [];\n\t\t\ttry {\n\t\t\t\t\tforeach($this->fetchTickets($eventType) as $row) {\n\t\t\t\t\t\t$Bundletickets[] = new BundleTicket($row['ID'], $row['price'], $row['title'], $row['description']);\n\t\t\t\t\t}\n\t\t\t\t} catch (Excetpion $error) {\n\t\t\t\t\tthrow $error;\n\t\t\t\t}\n\n\t\t\treturn $Bundletickets;\n\t\t}", "public function getReferencedModels(): array\n {\n return [];\n }", "public function registerBundles()\n {\n return [\n new \\Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle(),\n new \\Sensio\\Bundle\\FrameworkExtraBundle\\SensioFrameworkExtraBundle(),\n new \\Symfony\\Bundle\\TwigBundle\\TwigBundle(),\n new \\Doctrine\\Bundle\\DoctrineBundle\\DoctrineBundle(),\n new \\AdminPanel\\Symfony\\AdminBundle\\AdminPanelBundle(),\n new \\Symfony\\Bundle\\MonologBundle\\MonologBundle()\n ];\n }", "public function getModules(){\n $qb = $this->createQueryBuilder();\n $qb->module('system')->query('modulelist');\n return $this->execute($qb);\n }", "private function getBundleProduct(array $items): array\n {\n foreach ($items as $item) {\n if ($item['product_type'] == 'bundle') {\n return $item;\n }\n }\n\n return [];\n }", "public function findAll()\n {\n return $this->newService(ServiceKeys::APPLICATION)->findAll();\n }", "public function retrieveAll(): array\n {\n return self::flatten($this->versionsDefinition);\n }", "public function getModels()\n\t{\n\t\t$scope = $this->scopeName;\n\t\treturn CActiveRecord::model($this->baseModel)->$scope()->findAll();\n\t}", "public function splitJsBundles()\n {\n return $this->splitBundles(\n 'js',\n $this->createPath('public/js'),\n $this->filters['js']\n );\n }", "public function getModules();", "public function getModules();", "public function findAll() {\n\t\treturn $this->getCatalog();\n\t}", "public function getAssets(): array {\n\t\treturn $this->assets;\n\t}", "public function ran($bundle)\n\t{\n\t\treturn $this->table()->where_bundle($bundle)->lists('name');\n\t}", "private function retrieveLatestBundleMeta(): array\n {\n $filesystem = Storage::disk($this->lasso_disk);\n $base_path = $this->lasso_path;\n\n // Firstly, let's check if the local filesystem has a \"lasso-bundle.json\"\n // file in it's root directory.\n\n if ($this->local_filesystem->exists(base_path('lasso-bundle.json'))) {\n $this->use_git = true;\n $file = $this->local_filesystem->get(base_path('lasso-bundle.json'));\n return json_decode($file, true);\n }\n\n // If there isn't a \"lasso-bundle.json\" file in the root directory,\n // that's okay - this means that the commit is in \"non-git\" mode. So\n // let's just grab that file.If we don't have a file on the server\n // however; we need to throw an exception.\n\n if (!$filesystem->has($base_path . '/lasso-bundle.json')) {\n $this->rollBack(\n FetchCommandFailed::because('A valid \"lasso-bundle.json\" file could not be found for the current environment.')\n );\n }\n\n $file = $filesystem->get($base_path . '/lasso-bundle.json');\n return json_decode($file, true);\n }", "public function all()\n {\n return $this->model->get();\n }", "public function all()\r\n {\r\n return $this->themes;\r\n }", "public function getLocales(){\n $qb = $this->createQueryBuilder();\n $qb->module('system')->query('localelist');\n return $this->execute($qb);\n }", "public function index()\n {\n return [\n 'categories' => Category::getRepository()->allWithBrands(),\n 'brands' => Brand::getRepository()->findAll(),\n 'types' => Type::getRepository()->findAll()\n ];\n }", "public function getBuiltItems() {\n return $this->objects;\n }", "public function getModulesList();", "public function all(){\r\n\treturn $this->getRepository()->findAll();\r\n }", "abstract public function bundle();", "private function loadAll() {\n\n return $this->search->getProducts();\n\n }", "public function getBrands()\n {\n return $this->brands;\n }", "public static function getList(){\n return self::all();\n }", "public function getAllOptions()\n {\n $collection = Mage::getModel('ak_brands/brand')->getResourceCollection();\n $options = $collection->toOptionArray();\n\n return $options;\n }", "public function all()\n {\n return $this->getModel()->all();\n }", "public function dependencies()\n {\n return $this->bundle['dependencies'] ?? [];\n }", "private function _getAllModels(): array {\n\t\t$models = Array();\n\t\t$folder = Environment::$dirs->models;\n\t\t$files = array_diff(scandir($folder), array('.', '..'));\n\t\tforeach ($files as $fileName) {\n\t\t\tinclude_once($folder.DIRECTORY_SEPARATOR.$fileName);\n\t\t\t$className = basename($fileName, \".php\");\n\t\t\t$classNameNamespaced = \"\\\\Jeff\\\\Api\\\\Models\\\\\" . ucfirst($className);\n\t\t\t$model = new $classNameNamespaced($this->db, $this->account);\n\t\t\t$models[$model->modelNamePlural] = $model;\n\t\t}\n\t\treturn $models;\n\t}", "public function all() : array\n {\n return $this->container();\n }", "public function registerBundles()\n {\n return array(\n new \\Symfony\\Bundle\\FrameworkBundle\\FrameworkBundle(),\n new \\Doctrine\\Bundle\\DoctrineBundle\\DoctrineBundle(),\n new \\Symfony\\Bundle\\TwigBundle\\TwigBundle(),\n new \\JMS\\SerializerBundle\\JMSSerializerBundle(),\n new \\FOS\\RestBundle\\FOSRestBundle(),\n new \\Lesson\\Bundle\\MainBundle\\LessonMainBundle(),\n new \\Lesson\\Bundle\\BackendBundle\\LessonBackendBundle(),\n new Lesson\\Bundle\\FrontendBundle\\LessonFrontendBundle(),\n );\n }", "public function findAllSkeleton()\n {\n return $this->findAllActive();\n }", "public function getModuleList(){\n $qb = $this->createQueryBuilder();\n $qb->module('system')->query('modulelistnames');\n return $this->execute($qb);\n }", "public function GetAll()\n {\n return $this->model->all();\n }", "public function setBundles($bundles) {\n $this->bundles = $bundles;\n }", "public function getAll()\n {\n return $this->all;\n }", "public function getComponents() {\n return $this->components;\n }", "public function get_skin_list()\n {\n $table = 'themes';\n $codename = 'name';\n\n $rows = $this->connection->query_select($table, array($codename));\n return collapse_1d_complexity($codename, $rows);\n }", "static function getAll()\n\t\t{\n\t\t\t$returned_brands = $GLOBALS['DB']->query(\"SELECT * FROM brands;\");\n\t\t\t$all_brands = [];\n\t\t\tforeach($returned_brands as $brand){\n\t\t\t\t$name = $brand['name'];\n\t\t\t\t$id = $brand['id'];\n\t\t\t\t$new_brand = new Brand($name, $id);\n\t\t\t\tarray_push($all_brands, $new_brand);\n\t\t\t}\n\t\t\treturn $all_brands;\n\t\t}", "public function bundleOptions($entity_type) {\n $options = [];\n\n // @todo Remove hack.\n $bundle_info = \\Drupal::service('entity_type.bundle.info');\n foreach ($bundle_info ->getBundleInfo($entity_type->id()) as $bundle => $info) {\n if (!empty($info['label'])) {\n $options[$bundle] = $info['label'];\n }\n else {\n $options[$bundle] = $bundle;\n }\n }\n\n return $options;\n }", "public function getAll()\n {\n return $this->model->all();\n }", "public function getAll()\n {\n return $this->model->all();\n }" ]
[ "0.7814292", "0.7424124", "0.72127044", "0.70319444", "0.6873059", "0.67700356", "0.65892583", "0.615498", "0.6125429", "0.605545", "0.60269505", "0.6019808", "0.5954503", "0.5900245", "0.5826973", "0.58258647", "0.5781311", "0.57634705", "0.56828266", "0.5678196", "0.5676123", "0.56576926", "0.5585354", "0.557491", "0.55655336", "0.55433446", "0.55387163", "0.5531004", "0.5531004", "0.5518116", "0.5478784", "0.5472778", "0.5457657", "0.5447966", "0.54367423", "0.54314333", "0.5405847", "0.5401239", "0.5381699", "0.5368296", "0.53476876", "0.5335732", "0.530514", "0.5286087", "0.52751136", "0.52622634", "0.5246358", "0.5243646", "0.52352357", "0.5231815", "0.52196825", "0.5213492", "0.5212314", "0.52067435", "0.51985556", "0.51871294", "0.5177317", "0.51720667", "0.51683474", "0.51682615", "0.516788", "0.5161599", "0.51560944", "0.5136998", "0.5129841", "0.5114596", "0.5099929", "0.5099929", "0.5092669", "0.5090388", "0.5086732", "0.50824994", "0.5082241", "0.50777966", "0.50719583", "0.506025", "0.5055168", "0.5053518", "0.50490665", "0.5047628", "0.5045386", "0.5043671", "0.5041803", "0.50361997", "0.50317454", "0.50299144", "0.5029104", "0.5023433", "0.502243", "0.5018265", "0.5009999", "0.5005808", "0.49918723", "0.49856004", "0.49815327", "0.49793792", "0.49770808", "0.4971409", "0.49708655", "0.49708655" ]
0.7471644
1
Retrieve the currencyName property
Получить свойство currencyName
public function getCurrencyName() { return $this->currencyName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function currencyName()\n {\n \treturn $this->currencyName = Currency::getCurrencyCode($this->sellPrices->CurrencyNo)->CurrencyName;\n }", "public function getCurrency() : string\n {\n return $this->currency;\n }", "public function getCurrency() : string\n {\n return $this->currency;\n }", "public function getCurrency(): string;", "public function getCurrency(): string;", "public function getCurrency(){\n return $this->currency;\n }", "public static function currency() {\n\t\treturn self::$currency;\n\t}", "public function getCurrency();", "public function getCurrency();", "protected function get_currency() {\n\t\treturn $this->currency;\n\t}", "public function getCurrency() {\n\t\treturn $this->currency;\n\t}", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return $this->getData(self::CURRENCY);\n }", "public static function getCurrency(): string\n {\n return static::$currency ?: Config::get('bazar.currencies.default', 'usd');\n }", "public function getCurrency()\n {\n return \"/V1/directory/currency\";\n }", "public function getCurrency(): ?string\n {\n return $this->currency;\n }", "public function getCurrency(): ?string\n {\n return $this->currency;\n }", "public function getCurrency(): ?string\n {\n return $this->currency;\n }", "public function getCurrency()\n {\n return isset($this->Currency) ? $this->Currency : null;\n }", "public function getCurrencyCode();", "public function getCurrencyCode();", "public function getCurrencyCode();", "public function getCurrencyAttribute()\n\t{\n\t\t\n\t\treturn self::getCurrencies()[$this->currency_id] ?? \"-\";\n\t\t\n\t}", "public function getCurrencyCode()\n {\n return isset($this->currency_code) ? $this->currency_code : '';\n }", "protected function getCurrency() : ?string\n {\n return $this->currencySymbol;\n }", "static function fetchLocaleCurrencyCode()\n {\n $locale = eZLocale::instance();\n $currencyCode = $locale->currencyShortName();\n return $currencyCode;\n }", "public function getCurrencyID()\n {\n return $this->currencyID;\n }", "function getCurrency()\r\n\t{\r\n\t\treturn $this->call_API('getCurrency');\r\n\t}", "public function getCurrencyId()\n {\n return $this->currency_id;\n }", "public function currencySymbol()\n {\n return $this->_storeManager->getStore()->getCurrentCurrency()->getCurrencySymbol();\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getStoreCurrencyCode();", "public function getCurrency()\n {\n return $this->MoneyCurrency;\n }", "public function getCurrencySymbol()\n {\n return $this->currencySymbol;\n }", "public function getCartName()\n {\n return $this->name;\n }", "public function getSourceCurrency();", "public function getCurrency(): Currency;", "public function getPriceCurrency(): ?string\n {\n return $this->priceCurrency;\n }", "public function getOrderCurrencyCode();", "public function getFromCurrency()\n {\n return $this->fromCurrency;\n }", "public function getCurrencyCode() \n {\n return $this->_fields['CurrencyCode']['FieldValue'];\n }", "public function getNameCard()\n {\n return $this->get(self::_NAME_CARD);\n }", "public function getCurrencyCode()\n {\n return $this->_fields['CurrencyCode']['FieldValue'];\n }", "public function getCurrencyCode()\n {\n return $this->_currencyCode;\n }", "public function getCurrency()\n {\n if (is_null($this->currency)) {\n /** @psalm-var ?string $data */\n $data = $this->raw(self::FIELD_CURRENCY);\n if (is_null($data)) {\n return null;\n }\n $this->currency = (string) $data;\n }\n\n return $this->currency;\n }", "public function getCurrentCurrencyCode()\n {\n if ($this->currentCurrencyCode === null) {\n $this->currentCurrencyCode = strtoupper(\n $this->getStore()->getCurrentCurrencyCode()\n );\n }\n\n return $this->currentCurrencyCode;\n }", "public function getNameOnCard()\n {\n return $this->name_on_card;\n }", "public function currencyCode()\n {\n return $this->_storeManager->getStore()->getCurrentCurrency()->getCurrencyCode();\n }", "public function cardName()\n {\n return $this->bean->card()->name;\n }", "function acadp_get_currency() {\n\n\t$currency_settings = get_option( 'acadp_currency_settings' );\n\t$currency = ! empty( $currency_settings[ 'currency' ] ) ? $currency_settings[ 'currency' ] : 'USD';\n\n\treturn strtoupper( $currency );\n\n}", "public function getMarket_name () {\n\t$preValue = $this->preGetValue(\"market_name\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->market_name;\n\treturn $data;\n}", "public function getGlobalCurrencyCode();", "public function getCurrencySymbolAttribute()\n {\n return Arr::get(Currency::getCurrency($this->currency), 'symbol');\n }", "public function getCurrentCurrencyCode() {\r\n\t\treturn $this->_storeManager->getStore()->getCurrentCurrencyCode();\r\n\t}", "public function getName()\n {\n return $this->quoteItem->getName();\n }", "public function getCurrentCurrencySymbol() {\n $currencyCurrencyCode = $this->objectManager->get ( '\\Magento\\Framework\\Pricing\\PriceCurrencyInterface' );\n\n return $currencyCurrencyCode->getCurrency ()->getCurrencySymbol ();\n }", "protected function getCurrency()\n {\n return $this->checkoutSession->getLastRealOrder()->getOrderCurrencyCode();\n }", "public function getCurrency()\r\n\t{\r\n\t\treturn $this->getTransaction()->getCurrency();\r\n\t}", "public function getBaseCurrencyCode()\n {\n if ($this->baseCurrencyCode === null) {\n $this->baseCurrencyCode = strtoupper(\n $this->getStore()->getBaseCurrencyCode()\n );\n }\n\n return $this->baseCurrencyCode;\n }", "private function getBaseCurrencyCode()\n {\n return $this->scopeConfig->getValue($this->xmlPathBaseCurrency, $this->defaultCurrencyCodeValue);\n }", "public function getName()\n {\n return self::PAYMENT_UPC;\n }", "public function getCurrentCurrencySymbol() {\r\n\t\treturn $this->_currency->getCurrencySymbol();\r\n\t}", "public function getBaseCurrency()\n {\n return $this->base_currency;\n }", "public function getCurrencyCode(){\n if(!$this->currencyCode){\n return $this->currencyCode = Shop_CurrencySettings::get()->code;\n }\n return $this->currencyCode;\n }", "public function getBillingName(){\n return $this->_getData(self::BILLING_NAME);\n }", "private function __getCurrency()\n\t{\n\t\tif($this->currency == null)\n\t\t$this->currency = 1;\n\t\treturn $this->currency;\n\t}", "public static function getSymbol()\n {\n return Currency::get('symbol', '');\n }", "public function getCountryName();", "public function getCurrencyDisplay( $currencyId = 0 ){\r\n\r\n\t\tif(empty($currencyId)){\r\n // $this->_currency_id заполняется в getInstance\r\n $currencyId = $this->_currency_id;\r\n\t\t\tif(empty($currencyId)){\r\n\t\t\t\t$currencyId = $this->_vendorCurrency;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $currencyId;\r\n\t}", "public function obtainCurrency()\r\n {\r\n return $this->performRequest('GET', '/currency');\r\n }", "public function getId() {\r\n\t\treturn($this->_currency_id);\r\n\t}", "public function getCurrencySymbolAttribute()\n {\n $trips= Trips::where('request_id',$this->attributes['id']);\n if($trips->count())\n {\n $code = @$trips->get()->first()->currency_code;\n\n return Currency::where('code',$code)->first()->symbol;\n }\n else\n {\n return \"$\";\n }\n }", "function acadp_get_payment_currency() {\n\n\t$currency_settings = acadp_get_payment_currency_settings();\n\t$currency = ! empty( $currency_settings[ 'currency' ] ) ? $currency_settings[ 'currency' ] : 'USD';\n\n\treturn strtoupper( $currency );\n\n}", "public function getDisplayNameInCheckout()\n {\n return $this->displayNameInCheckout;\n }", "public function getPropertyName() {}", "public function getPropertyName() {}", "public function getPropertyName() {}", "public function getOriginalCurrency()\n {\n return $this->originalCurrency;\n }", "public function getName()\n {\n return 'European Central Bank';\n }", "public function getChargeNameAttribute()\n {\n return $this->laboratory->name;\n }", "public function getNameWithQuantityAttribute()\n {\n return $this->currency->name . ' [Owned: ' . $this->quantity . ']';\n }", "public function getBaseCurrencySymbol(){\n return $this->_storeManager->getStore()->getBaseCurrency()->getCurrencySymbol();\n }", "public function getBaseCurrency()\n {\n return $this->baseCurrency;\n }", "public function getName()\n {\n return $this->getLocales()[$this->getCurrent()]->name;\n }", "public function getCurrencyAttribute(?string $value = null): string;", "public function getTargetCurrency();", "public function getName()\n {\n return Language::_(\"TpayPayments.name\", true);\n }", "public function getBaseCurrencyCode();", "function get_name()\n {\n return $this->get_default_property(self :: PROPERTY_NAME);\n }" ]
[ "0.8412517", "0.7305462", "0.7305462", "0.72835076", "0.72835076", "0.6910954", "0.6910597", "0.69101375", "0.69101375", "0.679487", "0.67792076", "0.67726", "0.67726", "0.67726", "0.67726", "0.67726", "0.67726", "0.67726", "0.67726", "0.67703825", "0.67687756", "0.67664695", "0.6690035", "0.6690035", "0.6690035", "0.66525644", "0.6639715", "0.6639715", "0.6639715", "0.6623813", "0.6588697", "0.65723675", "0.6556207", "0.64810073", "0.64543873", "0.64391035", "0.6424048", "0.64048666", "0.64048666", "0.64048666", "0.64048666", "0.64048666", "0.6403053", "0.6400962", "0.63906556", "0.638744", "0.6380634", "0.6370655", "0.6365355", "0.63412416", "0.63326806", "0.63252354", "0.63154376", "0.6302625", "0.629051", "0.6275183", "0.62709117", "0.62675244", "0.62511355", "0.624798", "0.622527", "0.6191436", "0.61768913", "0.6174175", "0.61470026", "0.6139363", "0.61373943", "0.6134834", "0.61313105", "0.6120155", "0.6100688", "0.6099926", "0.6080558", "0.60734564", "0.60691404", "0.60674137", "0.6055309", "0.6047715", "0.6043707", "0.6042638", "0.60369563", "0.6034745", "0.60338634", "0.601889", "0.6009598", "0.6008498", "0.6008498", "0.6008498", "0.6007861", "0.6006564", "0.60060745", "0.60001343", "0.59991944", "0.5998221", "0.5994122", "0.59906363", "0.5965249", "0.5956849", "0.59509015", "0.5940752" ]
0.8499477
0
Handle the remove issue command.
Обработка команды удаления проблемы.
public function handle(RemoveIssueCommand $command) { $issue = $command->issue; event(new IssueWasRemovedEvent($issue)); $issue->delete(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function deleteIssue($args, $request) {\n\t\t$issueId = (int) $request->getUserVar('issueId');\n\t\t$journal = $request->getJournal();\n\t\t$issueDao = DAORegistry::getDAO('IssueDAO');\n\t\t$issue = $issueDao->getById($issueId, $journal->getId());\n\t\tif (!$issue) fatalError('Invalid issue ID!');\n\n\t\t$isBackIssue = $issue->getPublished() > 0 ? true: false;\n\n\t\t// remove all published articles and return original articles to editing queue\n\t\t$articleDao = DAORegistry::getDAO('ArticleDAO');\n\t\t$publishedArticleDao = DAORegistry::getDAO('PublishedArticleDAO');\n\t\t$publishedArticles = $publishedArticleDao->getPublishedArticles($issueId);\n\t\tif (isset($publishedArticles) && !empty($publishedArticles)) {\n\t\t\t// Insert article tombstone if the issue is published\n\t\t\timport('classes.article.ArticleTombstoneManager');\n\t\t\t$articleTombstoneManager = new ArticleTombstoneManager();\n\t\t\tforeach ($publishedArticles as $article) {\n\t\t\t\tif ($isBackIssue) {\n\t\t\t\t\t$articleTombstoneManager->insertArticleTombstone($article, $journal);\n\t\t\t\t}\n\t\t\t\t$articleDao->changeStatus($article->getId(), STATUS_QUEUED);\n\t\t\t\t$publishedArticleDao->deletePublishedArticleById($article->getPublishedArticleId());\n\t\t\t}\n\t\t}\n\n\t\t$issueDao->deleteObject($issue);\n\t\tif ($issue->getCurrent()) {\n\t\t\t$issues = $issueDao->getPublishedIssues($journal->getId());\n\t\t\tif (!$issues->eof()) {\n\t\t\t\t$issue = $issues->next();\n\t\t\t\t$issue->setCurrent(1);\n\t\t\t\t$issueDao->updateObject($issue);\n\t\t\t}\n\t\t}\n\n\t\treturn DAO::getDataChangedEvent($issueId);\n\t}", "protected function afterRemoving()\n {\n }", "public function remove() {\n\t\tremove_action($this->controller->getHookName(),array($this,'handle'),$this->priority);\n }", "public function remove() {}", "public function remove() {}", "public function processDelete(): void \n {\n if ($this->delete()) { // The tag is deleted in the database storage.\n auth()->user()->logActivity($this, 'Tags', 'Has deleted an issue tag with the name ' . $this->name);\n flash(\"The ticket tag with the name <strong>{$this->name}</strong> has been deleted in the application.\")->info()->important();\n }\n }", "public function onRemove();", "function removeIssueFromAlerts($Issue){\r\n\t\t$user = $_SESSION['userid'];\r\n\t\t$query = \"delete from issuealert where userid='$user' and issueid='$Issue'\";\r\n\t\tmysql_query($query);\r\n\t}", "public function resolveRemove() {\r\n\t\tif($this->status == self::CONFLICT && $this->numFiles == 1) {\r\n\t\t\t$this->status = self::OBSOLETE;\r\n\t\t\tlist($this->from, $this->to) = array($this->to, $this->from);\t// Swaps from and to\r\n\t\t\t$this->direction = 3 - $this->direction;\t// Changes direction: 1 -> 2, 2 -> 1\r\n\t\t}\r\n\t}", "public function remove() {\n }", "protected function beforeRemoving()\n {\n }", "public function doRemove() {\r\n\t\t$host = xn(\"host\");\r\n\t\t\r\n\t\t$ret = $this->_mongo->selectDB(\"admin\")->command(array(\r\n\t\t\t\"removeshard\" => $host\r\n\t\t));\r\n\t\t\r\n\t\t$this->ret = $this->_highlight($ret, \"json\");\r\n\t\t\r\n\t\t$this->display();\r\n\t}", "protected function _postDelete()\n {\n $this->getResource()->delete();\n\n $this->getIssue()->compileHorizontalPdfs();\n }", "abstract public function remove();", "abstract public function remove();", "abstract public function remove();", "public function afterRemove()\n\t{}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "public function hookRemove(): void\n {\n $this->say(\"Executing the Plugin's remove hook...\");\n $this->_exec(\"php ./src/hook_remove.php\");\n }", "public function handleDelete()\n {\n Craft::$app->getDb()->createCommand()\n ->delete(Table::REVISIONS, ['id' => $this->owner->revisionId])\n ->execute();\n }", "public function postRemove($entity);", "function remove($iat_id, $add_history = true)\n {\n $iat_id = Misc::escapeInteger($iat_id);\n $usr_id = Auth::getUserID();\n $stmt = \"SELECT\n iat_iss_id\n FROM\n \" . APP_DEFAULT_DB . \".\" . APP_TABLE_PREFIX . \"issue_attachment\n WHERE\n iat_id=$iat_id\";\n if (Auth::getCurrentRole() < User::getRoleID(\"Manager\")) {\n $stmt .= \" AND\n iat_usr_id=$usr_id\";\n }\n $res = DB_Helper::getInstance()->getOne($stmt);\n if (PEAR::isError($res)) {\n Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);\n return -1;\n }\n\n if (empty($res)) {\n return -2;\n }\n\n $issue_id = $res;\n $files = self::getFileList($iat_id);\n $stmt = \"DELETE FROM\n \" . APP_DEFAULT_DB . \".\" . APP_TABLE_PREFIX . \"issue_attachment\n WHERE\n iat_id=$iat_id AND\n iat_iss_id=$issue_id\";\n $res = DB_Helper::getInstance()->query($stmt);\n if (PEAR::isError($res)) {\n Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);\n return -1;\n }\n foreach ($files as $file) {\n self::removeFile($file['iaf_id']);\n }\n if ($add_history) {\n Issue::markAsUpdated($usr_id);\n // need to save a history entry for this\n History::add($issue_id, $usr_id, History::getTypeID('attachment_removed'), 'Attachment removed by ' . User::getFullName($usr_id));\n }\n return 1;\n }", "function deleteIssue( $sessionID, $issueID ) {\r\n\t\t//@session_start();\r\n\t\tif( $this->userCanDeleteIssue( $sessionID, $issueID ) ) {\r\n\t\t\t\r\n\t\t\t// delete attached files and references to files in db\r\n\t\t\t$contacts = $this->getIssuesContacts($issueID);\r\n\t\t\tfor($i=0; $i<sizeof($contacts); $i++){\r\n\t\t\t\t$contact = $this->viewContact('', $contacts[$i]);\r\n\t\t\t\tif(!$this->deleteAllFiles($contact['ID'])){\r\n\t\t\t\t\techo 'Error deleting files for contact '.$contact['ID'];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\r\n\t\t// Michael Thompson * 12/14/2005 * Also delete contacts, watches, xrefs, etc...\r\n\t\t\t$query = \"DELETE FROM issues WHERE ID='\".$issueID.\"'\";\r\n\t\t\t$result = mysql_query( $query );\r\n\t\t\t$query = \"delete from `issuealert` where IssueID ='\".$issueID.\"'\";\r\n\t\t\t$result = mysql_query( $query );\r\n\t\t\t$query = \"delete from `issuewatch` where IssueID ='\".$issueID.\"'\";\r\n\t\t\t$result = mysql_query( $query );\r\n\t\t\t$query = \"DELETE FROM `contacts-users` WHERE ContactID in (select id from contacts where issue = '\".$issueID.\"' )\";\r\n\t\t\t$result = mysql_query($query);\r\n\t\t\t$query = \"DELETE FROM `contacts-students` WHERE ContactID in (select id from contacts where issue = '\".$issueID.\"' )\";\r\n\t\t\t$result = mysql_query($query);\r\n\t\t\t$query = \"delete from contacts where issue='$issueID'\";\r\n\t\t\t$result = mysql_query($query);\r\n\t\t}\r\n\t}", "public function removeTask()\n\t{\n\t\t// Check for request forgeries\n\t\tRequest::checkToken();\n\n\t\tif (!User::authorise('core.delete', $this->_option))\n\t\t{\n\t\t\tApp::abort(403, Lang::txt('JERROR_ALERTNOAUTHOR'));\n\t\t}\n\n\t\t// Incoming\n\t\t$ids = Request::getArray('rid', array());\n\t\t$ids = (!is_array($ids) ? array($ids) : $ids);\n\n\t\t$removed = 0;\n\n\t\tforeach ($ids as $id)\n\t\t{\n\t\t\t$entry = Respondent::oneOrFail(intval($id));\n\n\t\t\t// Delete the entry\n\t\t\tif (!$entry->destroy())\n\t\t\t{\n\t\t\t\tNotify::error($entry->getError());\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Trigger before delete event\n\t\t\t\\Event::trigger('onEventsAfterDeleteRespondent', array($id));\n\n\t\t\t$removed++;\n\t\t}\n\n\t\tif ($removed)\n\t\t{\n\t\t\tNotify::success(Lang::txt('COM_EVENTS_RESPONDENT_REMOVED'));\n\t\t}\n\n\t\t// Output messsage and redirect\n\t\tApp::redirect(\n\t\t\tRoute::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller . '&id[]=' . Request::getInt('event', 0), false)\n\t\t);\n\t}", "public function remove()\n {\n }", "abstract public function delete__do_process ();", "function edithistory_delete_post($pid)\n{\n\tglobal $db, $mybb;\n\t$db->delete_query(\"edithistory\", \"pid='{$pid}'\");\n}", "public function remove()\n {\n\n }", "public function remove()\n\t{\n\t\t$this->todo = 3 ;\n\t}", "public function adminRemove()\r\n\t{\r\n\t\treturn;\r\n\t}", "public function remove() {\n\t\t$cmdArgs = [];\n\t\t$cmdArgs[] = \"--force\";\n\t\t$cmdArgs[] = escapeshellarg($this->name);\n\t\t$cmdArgs[] = \"remove\";\n\t\t$cmd = new \\OMV\\System\\Process(\"update-rc.d\", $cmdArgs);\n\t\t$cmd->setRedirect2to1();\n\t\t$cmd->execute();\n\t}", "public function remove() {\n\t\t$this->DispositionManager->remove();\n\t\t$this->autoRender = false;\n\t\t$this->redirect($this->refererStack(SYSTEM_CONSUME_REFERER));\n\t}", "static function remove() {\n }", "function stopWatchingIssue( $sessionID, $issueID ) {\r\n\t\t$user = $_SESSION['userid'];\r\n\t\t$query=\"delete from issuewatch where userid='$user' and issueid='$issueID'\";\r\n\t\tmysql_query($query);\r\n\t}", "public function testHandleRemoveNoID()\n {\n $this->withSession($this->adminSession)\n ->call('POST', '/branch/remove');\n \n $this->assertResponseStatus(404);\n }", "public function removeAction()\n {\n }", "#[CLI\\Command(name: self::DELETE, aliases: ['wd-del', 'wd-delete', 'wd', 'watchdog-delete'])]\n #[CLI\\Argument(name: 'substring', description: 'Delete all log records with this text in the messages.')]\n #[CLI\\Option(name: 'severity', description: 'Delete messages of a given severity level.')]\n #[CLI\\Option(name: 'type', description: 'Delete messages of a given type.')]\n #[CLI\\Usage(name: 'drush watchdog:delete', description: 'Delete all messages.')]\n #[CLI\\Usage(name: 'drush watchdog:delete 64', description: 'Delete messages with id 64.')]\n #[CLI\\Usage(name: 'drush watchdog:delete \"cron run succesful\"', description: 'Delete messages containing the string \"cron run succesful\".')]\n #[CLI\\Usage(name: '@usage drush watchdog:delete --severity=Notice', description: 'Delete all messages with a severity of notice.')]\n #[CLI\\Usage(name: 'drush watchdog:delete --type=cron', description: 'Delete all messages of type cron.')]\n #[CLI\\ValidateModulesEnabled(modules: ['dblog'])]\n #[CLI\\Complete(method_name_or_callable: 'watchdogComplete')]\n #[CLI\\Bootstrap(level: DrupalBootLevels::FULL)]\n public function delete($substring = '', $options = ['severity' => self::REQ, 'type' => self::REQ]): void\n {\n if ($substring == 'all') {\n $this->output()->writeln(dt('All watchdog messages will be deleted.'));\n if (!$this->io()->confirm(dt('Do you really want to continue?'))) {\n throw new UserAbortException();\n }\n $ret = $this->connection->truncate('watchdog')->execute();\n $this->logger()->success(dt('All watchdog messages have been deleted.'));\n } elseif (is_numeric($substring)) {\n $this->output()->writeln(dt('Watchdog message #!wid will be deleted.', ['!wid' => $substring]));\n if (!$this->io()->confirm(dt('Do you want to continue?'))) {\n throw new UserAbortException();\n }\n $affected_rows = $this->connection->delete('watchdog')->condition('wid', $substring)->execute();\n if ($affected_rows == 1) {\n $this->logger()->success(dt('Watchdog message #!wid has been deleted.', ['!wid' => $substring]));\n } else {\n throw new \\Exception(dt('Watchdog message #!wid does not exist.', ['!wid' => $substring]));\n }\n } else {\n if ((empty($substring)) && (!isset($options['type'])) && (!isset($options['severity']))) {\n throw new \\Exception(dt('No options provided.'));\n }\n $where = $this->where($options['type'], $options['severity'], $substring, 'OR');\n $this->output()->writeln(dt('All messages with !where will be deleted.', ['!where' => preg_replace(\"/message LIKE %$substring%/\", \"message body containing '$substring'\", strtr($where['where'], $where['args']))]));\n if (!$this->io()->confirm(dt('Do you want to continue?'))) {\n throw new UserAbortException();\n }\n $affected_rows = $this->connection->delete('watchdog')\n ->where($where['where'], $where['args'])\n ->execute();\n $this->logger()->success(dt('!affected_rows watchdog messages have been deleted.', ['!affected_rows' => $affected_rows]));\n }\n }", "public function handleDelete()\n {\n $id = Input::get('requirement');\n $requirement = Requirements::findOrFail($id);\n $requirement->delete();\n return Redirect::action('RequirementsController@index');\n }", "public function remove() {\n\n //GETS TASK RECORD WITH REQUEST TASK ID (ID)\n $task = Tasks::findorfail(request('TaskID'));\n\n //DELETES TASK RECORD FROM DB\n $task->delete();\n\n //REDIRECTS TO TASK VIEW WITH NOTEPADID AS PARAMETER\n return redirect (\"/task/$task->NotepadID\");\n }", "public function removeAction()\n {\n $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tx_frpformanswers_domain_model_formentry');\n\n $queryBuilder->delete('tx_frpformanswers_domain_model_formentry')\n ->where($queryBuilder->expr()->eq('pid', $queryBuilder->createNamedParameter($this->pid, \\PDO::PARAM_INT)))\n ->andWhere($queryBuilder->expr()->eq('deleted', $queryBuilder->createNamedParameter(1, \\PDO::PARAM_INT)))\n ->execute();\n\n $this->addFlashMessage(\n LocalizationUtility::translate('LLL:EXT:frp_form_answers/Resources/Private/Language/de.locallang_be.xlf:flashmessage.removeEntries.body', null, [$this->pid]),\n LocalizationUtility::translate('LLL:EXT:frp_form_answers/Resources/Private/Language/de.locallang_be.xlf:flashmessage.removeEntries.title'),\n \\TYPO3\\CMS\\Core\\Messaging\\FlashMessage::OK,\n true);\n\n $this->redirect('list');\n }", "function delete_ch8bt_bug() {\r\n\t// Check that user has proper security level\r\n\tif ( !current_user_can( 'manage_options' ) ) {\r\n\t\twp_die( 'Not allowed' );\r\n\t}\r\n\r\n\t// Check if nonce field is present\r\n\tcheck_admin_referer( 'ch8bt_deletion' );\r\n\r\n\t// If bugs are present, cycle through array and call SQL\r\n\t// command to delete entries one by one\r\n\tif ( !empty( $_POST['bugs'] ) ) {\r\n\t\t// Retrieve array of bugs IDs to be deleted\r\n\t\t$bugs_to_delete = $_POST['bugs'];\r\n\r\n\t\tglobal $wpdb;\r\n\r\n\t\tforeach ( $bugs_to_delete as $bug_to_delete ) {\r\n\t\t\t$query = 'DELETE from ' . $wpdb->get_blog_prefix() . 'ch8_bug_data ';\r\n\t\t\t$query .= 'WHERE bug_id = %d';\r\n\t\t\t$wpdb->query( $wpdb->prepare( $query, intval( $bug_to_delete ) ) );\r\n\t\t}\r\n\t}\r\n\r\n\t// Redirect the page to the admin form\r\n\twp_redirect( add_query_arg( 'page', 'ch8bt-bug-tracker', admin_url( 'options-general.php' ) ) );\r\n\texit;\r\n}", "public function remove() {\n\t\t$this->setRemoved(TRUE);\n\t}", "public function remove($username, $repository, $issue, $label)\n {\n return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/'.$issue.'/labels/'.rawurlencode($label));\n }", "function deleteCustomTrack ($ref, $userId, $tableName) {\n // Then remove everything from customTrackFiles and customTrackMeta\n $mysqli = connectCPB(CUSTOM_TRACK_DB_NAME);\n $stmt = $mysqli->prepare(\"SELECT * FROM `\" .\n $mysqli->real_escape_string(CUSTOM_TRACK_FILE_TABLE_NAME) .\n \"` WHERE `userId` = ? AND `ref` = ? AND `tableName` = ?\");\n $stmt->bind_param('sss', $userId, $ref, $tableName);\n $stmt->execute();\n $tableEntries = $stmt->get_result();\n if ($tableEntries && $tableEntries->num_rows > 0) {\n // table entry found\n $entry = $tableEntries->fetch_assoc();\n $fileName = $entry['fileName'];\n if (substr(\n $fileName, 0, strlen(CUSTOM_TRACK_TABLE_PREFIX)\n ) === CUSTOM_TRACK_TABLE_PREFIX) {\n // is a table\n $mysqli->query(\"DROP TABLE `\" .\n $mysqli->real_escape_string(CUSTOM_TRACK_DB_NAME) . \"`.`\" .\n $mysqli->real_escape_string($fileName) .\n \"`\");\n } else if (!filter_var($fileName, FILTER_VALIDATE_URL)) {\n // is a local file that needs to be deleted\n unlink($fileName);\n }\n } else {\n $tableEntries->free();\n $mysqli->close();\n throw new Exception('Track not found!');\n }\n $tableEntries->free();\n $stmt = $mysqli->prepare(\"DELETE FROM `\" .\n $mysqli->real_escape_string(CUSTOM_TRACK_FILE_TABLE_NAME) .\n \"` WHERE `userId` = ? AND `ref` = ? AND `tableName` = ?\");\n $stmt->bind_param('sss', $userId, $ref, $tableName);\n $stmt->execute();\n $tableEntries->free();\n $stmt = $mysqli->prepare(\"DELETE FROM `\" .\n $mysqli->real_escape_string(CUSTOM_TRACK_META_TABLE_NAME) .\n \"` WHERE `userId` = ? AND `ref` = ? AND `tableName` = ?\");\n $stmt->bind_param('sss', $userId, $ref, $tableName);\n $stmt->execute();\n $tableEntries->free();\n $mysqli->close();\n}", "public function remove($item);", "function rack_assignment_del($options=\"\") {\n global $conf, $self, $onadb;\n printmsg(\"DEBUG => rack_assignment_del({$options}) called\", 3);\n\n // Version - UPDATE on every edit!\n $version = '1.00';\n\n // Parse incoming options string to an array\n $options = parse_options($options);\n\n // Sanitize options[commit] (default is yes)\n $options['commit'] = sanitize_YN($options['commit'], 'N');\n\n // Return the usage summary if we need to\n if ($options['help'] or !$options['rack_assignment'] ) {\n // NOTE: Help message lines should not exceed 80 characters for proper display on a console\n $self['error'] = 'ERROR => Insufficient parameters';\n return(array(1,\n<<<EOM\n\nrack_assignment_del-v{$version}\nDeletes a rack_assignment from the database\n\n Synopsis: rack_assignment_del [KEY=VALUE] ...\n\n Required:\n rack_assignment=ID ID of the rack_assignment to delete\n\n Optional:\n commit=[Y|N] commit db transaction (no)\n\\n\nEOM\n\n ));\n }\n\n\n // Check if it exists\n list($status, $rows, $entry) = db_get_record($onadb, 'rack_assignments', \"id={$options['rack_assignment']}\");\n\n // Test to see that we were able to find the specified record\n if (!$entry['id']) {\n printmsg(\"DEBUG => Unable to find a rack_assignment record using ID {$options['rack_assignment']}!\",3);\n $self['error'] = \"ERROR => Unable to find the rack_assignment record using ID {$options['rack_assignment']}!\";\n return(array(4, $self['error']. \"\\n\"));\n }\n\n // Debugging\n printmsg(\"DEBUG => rack_assignment_del(): Found entry, {$entry['id']}\", 3);\n\n\n\n\n // If \"commit\" is yes, delete the record\n if ($options['commit'] == 'Y') {\n\n // Check permissions\n if (! (auth('rack_del') or auth('advanced'))){\n $self['error'] = \"Permission denied!\";\n printmsg($self['error'], 0);\n return(array(10, $self['error'] . \"\\n\"));\n }\n\n // Delete actual rack_assignment\n list($status, $rows) = db_delete_records($onadb, 'rack_assignments', array('id' => $entry['id']));\n if ($status) {\n $self['error'] = \"ERROR => rack_assignment_del() SQL Query failed: {$self['error']}\";\n printmsg($self['error'],0);\n return(array(9, $self['error'] . \"\\n\"));\n }\n\n\n\n\n // Return the success notice\n $self['error'] = \"INFO => Rack assignment DELETED: {$entry['id']}\";\n printmsg($self['error'],0);\n return(array(0, $self['error'] . \"\\n\"));\n }\n\n // Otherwise display the record that would have been deleted\n//FIXME: make this better outpud display\n $text = <<<EOL\nRecord(s) NOT DELETED (see \"commit\" option)\nDisplaying record(s) that would have been deleted:\n\nNAME: {$entry['id']}\n\nEOL;\n\n return(array(6, $text));\n\n}", "abstract public function mass_remove();", "abstract protected function handle_unset($name);", "public function postRemove(LifecycleEventArgs $args)\n {\n $entity = $args->getEntity();\n\n if ($entity instanceof Files){\n\n return;\n }\n }", "function onesignin_client_handle_delete_notification($account) {\n watchdog('onesignin', 'Deleting user %name on request of One Signin server.', array('%name' => $account->name), WATCHDOG_INFO);\n user_delete($account->uid);\n}", "public function handle()\n {\n $symbol = $this->argument('symbol');\n\n $pair = Pair::where('symbol_id', strtolower($symbol))->first();\n\n if (!$pair) return $this->line('Symbol not found');\n\n $watchList = WatchList::where('pair_id', $pair->id)->first();\n\n if (!$watchList) return $this->line(\"Symbol isn't in the watch list\");\n\n $watchList->delete();\n\n return $this->line(\"Remove $symbol DONE!\");\n }", "protected function _postDelete() {}", "protected function _postDelete() {}", "public function handle()\n {\n printf(\"Command no longer supported\\n\");\n return;\n $demoUser = User::where('email', 'simpson_demo@demo.demo')->first();\n Project::where('title', 'SIMPSON Demo Study')->where('creator_id', $demoUser->id)->delete();\n\n $users = User::where('email', 'like', '%demo-temp.demo')->get();\n Connection::whereIn('recipient_id', $users->pluck('id'))->delete();\n Connection::whereIn('initiator_id', $users->pluck('id'))->delete();\n Request::whereIn('recipient_id', $users->pluck('id'))->delete();\n Request::whereIn('initiator_id', $users->pluck('id'))->delete();\n Membership::whereIn('user_id', $users->pluck('id'))->delete();\n Answer::whereIn('user_id', $users->pluck('id'))->delete();\n Score::whereIn('user_id', $users->pluck('id'))->delete();\n\n User::where('email', 'like', '%demo-temp.demo')->delete();\n }", "public function delete() {\n\t\t$message = $this->discussion->message(['id' => $this->request->id]);\n\n\t\tif ($this->discussion->pull_message($message)) {\n\t\t\treturn $this->render(['head' => true, 'status' => 204]);\n\t\t}\n\n\t\treturn $this->render(['head' => true, 'status' => 400]);\n\t}", "function delete_item() {\n\n $code = 201;\n\n // Prepare different SQL for each entity type\n switch($_GET[\"type\"]) {\n case 'bucket':\n $sql = $GLOBALS[\"db\"]->prepare('DELETE FROM buckets WHERE user_id=:user_id AND bucket_id=:id');\n $sql->bindParam(':id', $_GET[\"id\"]);\n break;\n case 'category':\n $sql = $GLOBALS[\"db\"]->prepare('DELETE FROM categories WHERE user_id=:user_id AND category_id=:id');\n $sql->bindParam(':id', $_GET[\"id\"]);\n break;\n case 'task':\n $sql = $GLOBALS[\"db\"]->prepare('DELETE FROM tasks WHERE user_id=:user_id AND task_id=:id');\n $sql->bindParam(':id', $_GET[\"id\"]);\n break;\n case 'user':\n $sql = $GLOBALS[\"db\"]->prepare('DELETE FROM user WHERE user_id=:user_id');\n $code = 206;\n break;\n default:\n $_SESSION[\"msg\"][\"danger\"][] = \"Invalid type passed.\";\n return 500;\n }\n\n try {\n $sql->bindParam(':user_id', $_SESSION[\"user\"][\"user_id\"]);\n $sql->execute();\n\n if ($sql->rowCount() > 0) {\n // Deleted account so reset auth token\n if ($code == 206) {\n $_SESSION[\"user\"] = array();\n }\n return $code;\n } else {\n return 500;\n }\n\n\n } catch (\\PDOException $e) {\n $_SESSION[\"msg\"][\"danger\"][] = \"ERROR: PDO Exception on delete\";\n return 500;\n }\n}", "public function handle()\n {\n $assets = Story::where([['state', 'rejected'], ['updated_at', '<', Carbon::now()->subDays(1)->toDateTimeString()]])\n ->orderBy('updated_at', 'DESC')\n ->get();\n\n if(count($assets)>0) {\n\n // Loop through stories\n foreach ($assets as $asset) {\n\n // Output to schedule log\n echo Carbon::now()->toDateTimeString().': Asset Deleted: '.$asset->alpha_id.' : '.$asset->title. PHP_EOL;\n\n $asset->delete(); // Soft delete story\n\n }\n }\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function after_delete() {}", "function remove()\n\t{\n\t\tJSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\n\n\t\t$user = JFactory::getUser();\n\t\tif (!$user->authorise('core.delete', 'com_gmapfp'))\n\t\t{\n\t\t\t$this->setMessage(JText::_('JLIB_APPLICATION_ERROR_DELETE_NOT_PERMITTED'), 'error');\n\t\t} else {\n\t\t\t$model = $this->getModel('gmapfp');\n\t\t\tif(!$model->delete()) {\n\t\t\t\t$msg = JText::_( 'Error: One or more GMapFPs could not be Deleted' );\n\t\t\t} else {\n\t\t\t\t$msg = JText::_( 'GMapFP(s) Deleted' );\n\t\t\t}\n\t\t}\n\n\t\t$this->setRedirect( 'index.php?option=com_gmapfp&controller=gmapfp&task=view', $msg );\n\t}", "function after_delete() {}", "function removeHard()\r\n\t{\r\n\t\t$dbh = $this->dbh;\r\n\r\n\t\t$userid = ($this->user) ? $this->user->id : $this->owner_id;\r\n\r\n\t\tUserFilesRemoveFile($dbh, $this->id, $userid, false, true);\r\n\t}", "public function destroy(Issue $issue)\n {\n $issue->delete();\n\t\treturn back();\n }", "public function handle_changeset_trash_request()\n {\n }", "public function remove() {\n if (!in_array('deleteWorkorder', $this->permission)) {\n redirect('dashboard', 'refresh');\n }\n\n $workorder_id = $this->input->post('workorder_id');\n\n $response = array();\n if ($workorder_id) {\n $delete = $this->model_workorder->remove($workorder_id);\n if ($delete == true) {\n $response['success'] = true;\n $response['messages'] = \"Successfully removed\";\n } else {\n $response['success'] = false;\n $response['messages'] = \"Error in the database while removing the workorder information\";\n }\n } else {\n $response['success'] = false;\n $response['messages'] = \"Refersh the page again!!\";\n }\n\n echo json_encode($response);\n }", "public function removeTask()\n\t{\n\t\t// Check for request forgeries\n\t\tRequest::checkToken(['get', 'post']);\n\n\t\t// Incoming\n\t\t$ids = Request::getArray('id', array());\n\n\t\tif (count($ids) > 0)\n\t\t{\n\t\t\t// Loop through each ID\n\t\t\tforeach ($ids as $id)\n\t\t\t{\n\t\t\t\t$row = new Middleware\\Location(intval($id));\n\n\t\t\t\tif (!$row->delete())\n\t\t\t\t{\n\t\t\t\t\tthrow new \\Exception($row->getError(), 500);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tApp::redirect(\n\t\t\tRoute::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller, false),\n\t\t\tLang::txt('COM_TOOLS_ITEM_DELETED'),\n\t\t\t'message'\n\t\t);\n\t}", "public function removeTask()\n\t{\n\t\t// Check for request forgeries\n\t\tRequest::checkToken();\n\n\t\tif (!User::authorise('core.delete', $this->_option))\n\t\t{\n\t\t\tApp::abort(403, Lang::txt('JERROR_CORE_DELETE_NOT_PERMITTED'));\n\t\t}\n\n\t\t$ids = Request::getArray('cid', array());\n\t\t\\Hubzero\\Utility\\Arr::toInteger($ids, array());\n\n\t\t$success = 0;\n\n\t\tforeach ($ids as $id)\n\t\t{\n\t\t\t$model = Extension::oneOrFail($id);\n\n\t\t\tif (!$model->remove())\n\t\t\t{\n\t\t\t\tNotify::error($model->getError());\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$success++;\n\t\t}\n\n\t\tif ($success)\n\t\t{\n\t\t\tNotify::success(Lang::txt('COM_INSTALLER_UNINSTALL_SUCCESS', $success));\n\t\t}\n\n\t\t$this->cancelTask();\n\t}", "function edithistory_delete()\n{\n\tglobal $db, $mybb, $user;\n\t$db->update_query(\"edithistory\", array('uid' => 0), \"uid='{$user['uid']}'\");\n}", "public function afterDeleteCommit(): void\n {\n }", "public function preRemove(LifecycleEventArgs $args)\n {\n $follow = $args->getDocument();\n $dm = $this->container->get('doctrine_mongodb.odm.document_manager');\n $activity_manager = $this->container->get('pw_activity.activity_manager');\n $notification_manager = $this->container->get('pw_activity.notification_manager');\n \n if ($follow instanceOf Follow) {\n $activity_manager\n ->getRepository()\n ->createQueryBuilder()\n ->remove()\n //->field('target')->references($follow)\n ->field('target.$id')->equals(new \\MongoId($follow->getId()))\n ->field('target.$ref')->equals('follows')\n ->getQuery()\n ->execute();\n \n\n $notification_manager\n ->getRepository()\n ->createQueryBuilder()\n ->remove()\n //->field('target')->references($follow)\n ->field('target.$id')->equals(new \\MongoId($follow->getId()))\n ->field('target.$ref')->equals('follows')\n ->getQuery()\n ->execute(); \n \n $target = $follow->getTarget();\n if ($target instanceof User) {\n // also remove follows for collections of target User\n $follower = $follow->getFollower();\n $this->getFollowManager()->getRepository()\n ->createQueryBuilder()\n ->remove()\n ->field('follower')->references($follower)\n ->field('user')->references($target)\n ->field('target.$ref')->equals('boards')\n ->getQuery()\n ->execute();\n }\n } \n }", "public function handle()\n {\n $id = $this->argument('id');\n\n $submission = Submission::withTrashed()->findOrFail($id);\n event(new SubmissionWasDeleted($submission,true));\n $data = $submission->data;\n Redis::connection()->hdel('voten:submission:url',$data['url']);\n $submission->forceDelete();\n }", "public function remove()\n\t{\n\t\t$data_id = $this->input->post('remove_menu_id');\n\t\t\n\t\t$this->load->model('promo_model');\n\t\t$result = $this->promo_model->remove($data_id);\n\t\t\n\t\tif($result)\n\t\t\techo \"Data remove was successful!\";\n\t\telse\n\t\t\techo \"Data remove not successful!\";\n\t}", "function remove(){//called when user click uninstall\n\t\tswitch($this->act){\n\t\tcase ACT_SAVE:\n\t\t\tparent::cleanup();\n\t\t\tredirect($this->makeUrl(ACT_DONE,NULL,'remove'));\n\t\tcase ACT_DONE:\n\t\t\tshowloadscreen(URL_UP,5,'Tool uninstalled...');\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$this->startPage('Uninstall system file editor tool');\n\t\t\t$this->startForm(ACT_SAVE,NULL,'remove');\n\t\t\techo 'please click OK to remove tool, CANCEL to continue to use tool';\n\t\t\techo '<input type=\"submit\" value=\"OK\" class=\"button\"/>';\n\t\t\techo '<input type=\"button\" value=\"CANCEL\" onclick=\"window.alert(&quot;thank you&quot;);window.history.back();\" class=\"button\" />';\n\t\t\t$this->endForm();\n\t\t\t$this->endPage();\n\t\t}\n\t}", "function uninstall()\n {\n SQLExec('DROP TABLE IF EXISTS apiai_actions');\n SQLExec('DROP TABLE IF EXISTS apiai_entities');\n unsubscribeFromEvent($this->name, 'COMMAND');\n parent::uninstall();\n }", "public function handle()\n {\n $curl = curl_init();\n $collection= config('solarium.endpoint.localhost.core'); \n\n curl_setopt_array($curl, array(\n CURLOPT_PORT => \"8983\",\n CURLOPT_URL => \"http://localhost:8983/solr/admin/cores?action=UNLOAD&deleteInstanceDir=true&core=\".$collection.\"\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"POST\",\n CURLOPT_HTTPHEADER => array(\n \"cache-control: no-cache\",\n ),\n ));\n\n $response = curl_exec($curl);\n $err = curl_error($curl);\n\n curl_close($curl);\n\n if ($err) {\n echo \"cURL Error #:\" . $err;\n $this->info(\"\\Error Created Collection \" .$err);\n\n\n } else {\n echo $response;\n $this->info(\"\\nDeleted Collection \" .$collection . $response);\n\n }\n\n }", "function runDelete($repo)\n{\n $delBar = new ChocolateBar();\n $delBar->chocoID= 15;\n $repo->delete($delBar);\n}", "function remove() {\n\t\t$option = JRequest::getCmd('option');\n\t\t// Se obtienen los ids de los registros a borrar\n\t\t$cids = JRequest::getVar('cid', array(0), 'post', 'array');\n $product_type_code = JRequest::getVar('product_type_code');\n\n\t\t// Lanzar error si no se ha seleccionado al menos un registro a borrar\n if (count($cids) < 1 || !$product_type_code) {\n\t\t\tJError::raiseError(500, JText::_('CP.SELECT_AN_ITEM_TO_DELETE'));\n\t\t}\n\n\t\t// Se obtiene el modelo\n\t\t$model = $this->getModel('comments');\n\t\t// Se intenta el borrado\n\t\tif ($model->delete($cids, $product_type_code)) {\n\t\t\t$msg = JText::_('CP.DATA_DELETED');\n\t\t\t$type = 'message';\n\t\t} else {\n\t\t\t// Si hay algún error se ajusta el mensaje\n\t\t\t$msg = $model->getError();\n\t\t\tif (!$msg) {\n\t\t\t\t$msg = JText::_('CP.ERROR_ONE_OR_MORE_DATA_COULD_NOT_BE_DELETED');\n\t\t\t}\n\t\t\t$type = 'error';\n\t\t}\n\n\t\t$this->setRedirect('index.php?option=' . $option . '&view=comments', $msg, $type);\n\t}", "public function getCommand() {\n return 'remove';\n }", "function remove()\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 delete' ) );\n\t\t}\n\n\t\t$model = $this->getModel('weblink');\n\t\tif(!$model->delete($cid)) {\n\t\t\techo \"<script> alert('\".$model->getError(true).\"'); window.history.go(-1); </script>\\n\";\n\t\t}\n\n\t\t$this->setRedirect( 'index.php?option=com_weblinks' );\n\t}", "public function remove($id) {\r\n $this->db->where('id', $id);\r\n\t\t$this->db->where('school_id', $this->school_id);\r\n $this->db->delete('book_issues');\r\n }", "function delGroupHandler() {\n global $inputs;\n\n $sql = \"delete from `group` where id = \" . $inputs['id'];\n execSql($sql);\n\n formatOutput(true, 'delete success');\n}", "function delMemberGroupHandle() {\n global $inputs;\n\n $sql = \"DELETE FROM `member_group` WHERE id = \" . $inputs['id'];\n execSql($sql);\n\n formatOutput(true, 'delete success');\n}", "public function handle()\n {\n //\n $logs = LogListMagento::all();\n\n if(!$logs->isEmpty()) {\n foreach($logs as $log) {\n echo $log->product_id.\" Started to delete \\n\";\n $product = ProductPushErrorLog::where(\"product_id\",$log->product_id)->get();\n if(!$product->isEmpty()){\n foreach($product as $p) {\n $p->delete();\n }\n }\n $log->delete();\n }\n }\n\n }", "public function deleteWorklog(){\n\n }", "public function clear($username, $repository, $issue)\n {\n return $this->delete('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/issues/'.$issue.'/labels');\n }", "public function removeUserFromGroup(){\n //Gets the id frim the input\n $removeId = $_GET[\"input\"];\n //This model removes the connection record from the table\n $this->individualGroupModel->removeUserFromTheGroup($removeId);\n }", "protected function afterDelete()\r\n {\r\n }", "function deleteSubmission(&$args, &$request) {\n\t\t//FIXME: Implement\n\n\t\treturn false;\n\t}", "public function handle()\n {\n\n\n\n PushRequest::where('mode','qr')->whereNull('device_id')->delete();\n\n\n $this->comment(PHP_EOL.'ok!'.PHP_EOL);\n }", "function delEmailHandler1() {\n global $inputs;\n\n $sql = \"DELETE FROM mail WHERE id = \" . $inputs['id'];\n execSql($sql);\n\n formatOutput(true, 'delete success');\n}", "public function handle()\n {\n $branchName = $this->getBranchName();\n $this->removeItemFromFile($branchName);\n }", "public function postRemove() {\n if(Request::ajax()) {\n $status = false; // Start status check\n $image_src = Input::get('src');\n $task_id = Input::get('id');\n $type = Input::get('type');\n $tasks = Task::find($task_id);\n $imagePath = public_path($image_src);\n switch($type){\n case 'new_image':\n @unlink($imagePath);\n return Response::json(['success'=>true]);\n\n break;\n\n default: // Old images already saved in DB\n\n if(isset($tasks->image_src)) {\n $new_image_src = json_decode($tasks->image_src,true);\n foreach($new_image_src as $key => $value) {\n\n if($value['path'] == $image_src) { // Matches in db so remove from the set\n unset($new_image_src[$key]); // removes image from array\n // remove image from folder\n @unlink($imagePath);\n // update the db with a new \n $tasks->image_src = json_encode($new_image_src);\n if($tasks->save()){\n return Response::json(['success'=>true]);\n }\n }\n }\n }\n break;\n }\n return Response::json(['success'=>false]);\n }\n }", "function threadRemove(){\n\n\t$threadId\t\t\t \t= strip_tags($_GET['ThreadId']);\t\t\t\t #int - primaryKey\n\n\t$db = pdo(); # pdo() creates and returns a PDO object\n\t#dumpDie($_POST);\n\n\t$sql = \"DELETE FROM ma_Threads WHERE `ThreadID` = :ThreadID\";\n\n\t$stmt = $db->prepare($sql);\n\t//INTEGER EXAMPLE $stmt->bindValue(1, $id, PDO::PARAM_INT);\n\t$stmt->bindValue(':ThreadID', $threadId, PDO::PARAM_INT);\n\n\ttry {$stmt->execute();} catch(PDOException $ex) {trigger_error($ex->getMessage(), E_USER_ERROR);}\n\t#feedback success or failure of update\n\n\tif ($stmt->rowCount() > 0)\n\t{//success! provide feedback, chance to change another!\n\t\tfeedback(\"Thread Removed Successfully From Timeline!\",\"success\");\n\t}else{//Problem! Provide feedback!\n\t\tfeedback(\"Thread Not Removed!\",\"warning\");\n\t}\n\tmyRedirect(THIS_PAGE);\n}", "function delCondoHandler() {\n global $inputs;\n\n $sql = \"delete from condo where id = \" . $inputs['id'];\n execSql($sql);\n\n formatOutput(true, 'delete success');\n}", "public function cleanupTagsCommand() {\n\t\t/** @var Tag $tag */\n\t\tforeach ($this->tagRepository->findAll() as $tag) {\n\t\t\tif ($this->assetRepository->countByTag($tag) == 0) {\n\t\t\t\t$this->outputLine('Tag \"%s\" deleted.', [$tag->getLabel()]);\n\t\t\t\t$this->tagRepository->remove($tag);\n\t\t\t}\n\t\t}\n\t}", "public function preRemove($entity);", "function deleteItem(&$errorMsg, $userInput)\n {\n $query='DELETE FROM todos WHERE id=:id';\n $stmt = $this->dbConnection->prepare($query);\n $stmt->bindValue(':id', $userInput, PDO::PARAM_INT);\n $stmt->execute();\n }" ]
[ "0.63412756", "0.6070603", "0.60372996", "0.5984083", "0.5983521", "0.59507513", "0.59356076", "0.59081984", "0.5843781", "0.5820493", "0.58113396", "0.58065546", "0.57392687", "0.57363456", "0.57363456", "0.57363456", "0.5726919", "0.56949914", "0.56949914", "0.56949914", "0.56949914", "0.56914264", "0.56604445", "0.5651862", "0.56240034", "0.5610945", "0.5594373", "0.55840015", "0.5561436", "0.55551165", "0.5500168", "0.5495157", "0.54871655", "0.5465", "0.5446327", "0.5444532", "0.5429065", "0.5421792", "0.5411234", "0.54109114", "0.53847194", "0.53701705", "0.5361661", "0.53527224", "0.5344025", "0.5314481", "0.53083336", "0.5245266", "0.52416056", "0.5233788", "0.52208334", "0.52195305", "0.52159184", "0.52064896", "0.51941174", "0.5193849", "0.5193576", "0.5192111", "0.51866823", "0.5183858", "0.51731235", "0.5158997", "0.5156934", "0.5153317", "0.51505184", "0.5143443", "0.51411164", "0.5126096", "0.51202947", "0.5119166", "0.5118293", "0.5117909", "0.5108654", "0.5100711", "0.5094722", "0.5093802", "0.5085515", "0.5077878", "0.50651807", "0.50636894", "0.50635886", "0.50601006", "0.50590557", "0.5055933", "0.5052406", "0.50494736", "0.5039651", "0.50386053", "0.5038289", "0.50295657", "0.502491", "0.50205153", "0.501619", "0.5012021", "0.50001264", "0.49997425", "0.49969617", "0.49954852", "0.49939832", "0.4992756" ]
0.7258914
0
Returns whether $code appears in the OrigCurrency element of the XML.
Возвращает значение, указывающее, появляется ли $code в элементе OrigCurrency XML.
public function isOriginalCurrency($code) { return $this->getOriginalCurrency() === strtoupper($code); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isInISO($code) {\n $xml = simplexml_load_file('http://www.currency-iso.org/dam/downloads/lists/list_one.xml');\n $result = $xml -> xpath(\"//CcyNtry[Ccy='{$code}']\");\n if($result != null) {\n return true;\n } else {\n return false;\n }\n }", "public function has($code) {\n\t\treturn array_key_exists(strtoupper($code), $this->currencies);\n\t}", "private function findElByCode($code) {\n\t $result = false;\n\n\t foreach ($this->currencies as $el) {\n\t\t if ((string) $el->code === strtoupper($code)) {\n\t\t\t $result = $el;\n\t\t }\n\t }\n\n return $result;\n }", "function tep_currency_exists($code) {\n $code = tep_db_prepare_input($code);\n\n $currency_code = tep_db_query(\"select currencies_id from \" . TABLE_CURRENCIES . \" where code = '\" . tep_db_input($code) . \"'\");\n if (tep_db_num_rows($currency_code)) {\n return $code;\n } else {\n return false;\n }\n }", "public static function isValidCode($code): bool\n {\n if (array_key_exists($code, self::getInfoForCurrencies())) {\n return true;\n }\n\n if (array_key_exists($code, self::getInfoForCurrenciesWithoutCurrencyCode())) {\n return true;\n }\n\n if (array_key_exists($code, self::getInfoForCurrenciesWithUnofficialCode())) {\n return true;\n }\n\n if (array_key_exists($code, self::getInfoForCurrenciesWithHistoricalCode())) {\n return true;\n }\n\n if (array_key_exists($code, self::getInfoForCurrenciesIncomplete())) {\n return true;\n }\n\n return false;\n }", "public function checkCountryCode($code)\n {\n $allCountries = Mage::getModel('adminhtml/system_config_source_country')->toOptionArray(true);\n $code = $this->prepareCode($code);\n\n $isValid = false;\n foreach ($allCountries as $country) {\n if ($country['value'] == $code) {\n $isValid = true;\n break;\n }\n }\n\n return $isValid;\n }", "public function checkCountryCode($code)\n {\n $allCountries = Mage::getModel('adminhtml/system_config_source_country')->toOptionArray(true);\n $code = $this->prepareCode($code);\n\n $isValid = false;\n foreach ($allCountries as $country) {\n if ($country['value'] == $code) {\n $isValid = true;\n break;\n }\n }\n\n return $isValid;\n }", "static function codeExists($code)\n {\n global $objDatabase;\n\n $query = \"\n SELECT 1\n FROM `\".DBPREFIX.\"module_shop\".MODULE_INDEX.\"_discount_coupon`\n WHERE `code`='\".addslashes($code).\"'\";\n $objResult = $objDatabase->Execute($query);\n // Failure or none found\n if (!$objResult) {\n // Failure! Assume that the code exists.\n return true;\n }\n if ($objResult->EOF) {\n return false;\n }\n return true;\n }", "function has_discount( $code ) {\n\t\t\tif (in_array($code, $this->applied_coupons)) return true;\n\t\t\treturn false;\n\t\t}", "static function get_country($code) {\n $countries = self::get_countries();\n foreach($countries as $c) {\n if($c->code == $code || $c->code2l == $code) {\n return $c;\n }\n }\n return FALSE;\n }", "public function getNamespaceFromSource($code)\n {\n if (preg_match('/namespace\\s*([^;]+);/', $code, $m)==1) {\n return trim($m[1]);\n }\n\n return false;\n }", "public function isSetCurrencyCode()\n {\n return !is_null($this->_fields['CurrencyCode']['FieldValue']);\n }", "public function isSetCurrencyCode()\n {\n return !is_null($this->_fields['CurrencyCode']['FieldValue']);\n }", "public function getCurrencyIdByCode($code) {\n $this->sError = FALSE;\n\n if ($this->_currencyCode2Id === FALSE) {\n $this->_loadCurrencyCodes();\n }\n\n if (!isset($this->_currencyCode2Id[$code])) {\n $this->sError = 'Incorect currency code: ' . $code;\n return FALSE;\n }\n\n return $this->_currencyCode2Id[$code];\n }", "public static function isCertificateCode($code)\n\t{\n\t\treturn preg_match('#^[A-Z0-9]{3}\\-[A-Z0-9]{3}\\-[A-Z0-9]{3}\\-[A-Z0-9]{3}$#', $code) && gzte11(ISC_LARGEPRINT);\n\t}", "public static function isValid( $code )\n {\n return in_array(\n strtoupper( $code ),\n [\n self::AFRICA,\n self::ASIA,\n self::EUROPE,\n self::NORTH_AMERICA,\n self::OCEANIA,\n self::SOUTH_AMERICA,\n self::ANTARCTICA,\n ]\n );\n }", "public function codeExists($code) {\n $res = $this->createQuery(\"c\")\n ->select(\"c.*\")\n ->where(\"c.code_num = ?\", array($code))\n ->limit(1)\n ->execute(array(), Doctrine_Core::HYDRATE_SCALAR);\n\n return (bool) $res;\n }", "protected function getCountryByCode(string $code)\n {\n global $db;\n require_once DOL_DOCUMENT_ROOT.'/core/class/ccountry.class.php';\n $pays = new \\Ccountry($db);\n if ($pays->fetch(0, $code) > 0) {\n return $pays->id;\n }\n\n return false;\n }", "public function hasCodeType(){\n return $this->_has(3);\n }", "function CheckIfCurrencyExists($currency_code) {\n $query = \"SELECT * FROM conversion_rates WHERE currency='$currency_code';\";\n $result = mysqli_num_rows($GLOBALS['conn']->query($query));\n\n return ($result != 0) ? true : false;\n }", "public function couponExists($code)\n\t{\n\t\t$sql = \"SELECT cnId FROM `#__storefront_coupons` WHERE `cnCode` = \" . $this->_db->quote($code);\n\n\t\t$this->_db->setQuery($sql);\n\t\t$cnId = $this->_db->loadResult();\n\n\t\treturn $cnId;\n\t}", "private function code_exists($code) {\n\t\t$code = $this->db->escape_str($code);\n\t\t$query = $this->db->query(\"SELECT COUNT(id) as num_rows FROM exp_shortee_urls WHERE BINARY code = '$code'\");\n\n\t\t$row = $query->row_array();\n\n\t\treturn ($row['num_rows'] > 0) ? true : false;\n\t}", "public function isCode(int $code): bool\n {\n return $this->code === $code;\n }", "public function hasCodeType(){\n return $this->_has(4);\n }", "public function hasCodeType(){\n return $this->_has(4);\n }", "public function hasCreditProduct(){\n foreach($this->cart->getQuote()->getAllItems() as $item){\n if($item->getProductType() == \\Vnecoms\\Credit\\Model\\Product\\Type\\Credit::TYPE_CODE)\n return true;\n }\n \n return false;\n }", "public function isCredit()\r\n\t{\r\n\t\treturn $this->root->getAttribute('credit') == 'oui';\r\n\t}", "public function code_check($code)\n {\n if( $this->MItems->get_by_code($code))\n {\n $this->form_validation->set_message('code_check', 'Item code can\\'t be duplicate. Please choose different item code.');\n return false;\n }\n else\n {\n return true;\n }\n }", "function codeUsed($a_cp_id, $a_code)\n\t{\n\t\tglobal $ilDB;\n\n\t\t$set = $ilDB->query(\"SELECT id\".\n\t\t\t\" FROM adn_ep_assignment\".\n\t\t\t\" WHERE cp_professional_id = \".$ilDB->quote($a_cp_id, \"integer\").\n\t\t\t\" AND access_code = \".$ilDB->quote($a_code, \"text\")\n\t\t\t);\n\t\tif ($rec = $ilDB->fetchAssoc($set))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private function get_coupon( $code ) {\n\t\t$this->code = apply_filters( 'woocommerce_coupon_code', $code );\n\n\t\t// Coupon data lets developers create coupons through code\n\t\tif ( $coupon = apply_filters( 'woocommerce_get_shop_coupon_data', false, $this->code ) ) {\n\t\t\t$this->populate( $coupon );\n\t\t\treturn true;\n\t\t}\n\n\t\t// Otherwise get ID from the code\n\t\t$this->id = $this->get_coupon_id_from_code( $this->code );\n\n\t\tif ( $this->code === apply_filters( 'woocommerce_coupon_code', get_the_title( $this->id ) ) ) {\n\t\t\t$this->populate();\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "public static function isKnown($code)\n\t{\n\t\treturn !empty(self::getClass($code));\n\t}", "public function hasCode(){\n return $this->_has(3);\n }", "public function hasCode(int $code): bool\n {\n try {\n $code = $this->filterCode($code);\n } catch (InvalidArgumentException $e) {\n return false;\n }\n\n return isset($this->values[$code]);\n }", "public function equals(Currency $currency): bool\n {\n return $currency->getCode() === $this->code;\n }", "function checkIfCodeExists() {\n $voucher = new Voucher();\n $voucher->where('code', $this->getCode());\n return $voucher->count() > 0;\n }", "function getCheese($code)\n {\n foreach( $this->xml->cheeses->cheese as $cheese )\n {\n if( $cheese['code'] == $code )\n {\n $result['code'] = (string) $cheese['code'];\n $result['price'] = (string) $cheese['price'];\n $result['name'] = (string) $cheese;\n\n return $result;\n }\n }\n\n return 1;\n }", "public function current($code = null)\n {\n if (!$code) {\n if (!$this->current) {\n if (!$this->current(Cookie::get('currency') ?? $this->getDefault())) {\n if (($cookie = Cookie::get('currency')) && !$this->findByCode($cookie)) {\n $this->current($this->getDefault());\n } else {\n $this->setDefault(null)->current();\n }\n }\n }\n return $this->current;\n }\n\n if (($currency = $this->findByCode($code)) && data_get($this->current, 'code') != $currency->code) {\n $this->current = $currency;\n if (Cookie::get('currency') != data_get($this->current, 'code')) {\n Cookie::queue(Cookie::forever('currency', $code));\n $this->events->fire('currency.changed');\n }\n return true;\n }\n\n return false;\n }", "public function isPostcodeIncluded(int $postcode): bool;", "public static function pre_use_voucher($voucher_code)\n {\n if($voucher_code) Session::instance()->set(\"vchc\", $voucher_code); \n \n $voucher=static::get_voucher();\n \n return (is_object($voucher) && $voucher->id)?true:false;\n }", "function getSauce( $code )\n {\n foreach( $this->xml->sauces->sauce as $sauce )\n {\n if( $sauce['code'] == $code )\n {\n $result['code'] = (string) $sauce['code'];\n $result['price'] = (string) $sauce['price'];\n $result['name'] = (string) $sauce;\n\n return $result;\n }\n }\n\n return 1;\n }", "public function checkPinterestCode($code) {\r\n if ($code <> '') {\r\n if (strpos($code, 'content') !== false) {\r\n preg_match('/content\\\\s*=\\\\s*[\\'\\\"]([^\\'\\\"]+)[\\'\\\"]/i', $code, $result);\r\n if (isset($result[1]) && !empty($result[1]))\r\n $code = $result[1];\r\n }\r\n\r\n if (strpos($code, '\"') !== false) {\r\n preg_match('/[\\'\\\"]([^\\'\\\"]+)[\\'\\\"]/i', $code, $result);\r\n if (isset($result[1]) && !empty($result[1]))\r\n $code = $result[1];\r\n }\r\n\r\n if ($code == '')\r\n SQ_Error::setError(__(\"The code for Pinterest is incorrect.\", _SQ_PLUGIN_NAME_));\r\n }\r\n return $code;\r\n }", "public function includesCountryCode($vatNumber)\n {\n $countryCode = substr(str_replace(' ', '', trim($vatNumber)), 0, 2);\n if (array_key_exists(strtoupper($countryCode), Mage::helper('multibyte_vatfix/countries')->getCountries())) {\n return true;\n }\n\n return;\n }", "public function GetRate($code)\n\t{\n\t\tif (is_string($code))\n\t\t{\n\t\t\t$code = strtoupper(trim($code));\n\t\t\treturn (isset($this->rates['byChCode'][$code])) ? $this->rates['byChCode'][$code] : false;\n\t\t\n\t\t}\n\t\telseif (is_numeric($code))\n\t\t{\n\t\t\treturn (isset($this->rates['byCode'][$code])) ? $this->rates['byCode'][$code] : false;\n\t\t}\n\t\telse \n\t\t{\n\t\t\treturn false;\t\t\n\t\t}\n\t}", "function check_category_code($category_code){\n\t\t\tif($this->db->get_where('category',array('code'=>$category_code))->num_rows()>0 ){\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "private function verify_purchase_code($code)\n { \n if( !empty($this->get_option('integrationsEnvatoAPIKey')) && (!empty($this->get_option('integrationsEnvatoUsername'))) ) {\n $token = $this->get_option('integrationsEnvatoAPIKey');\n $username = $this->get_option('integrationsEnvatoUsername');\n } else {\n return false;\n }\n\n $envato = new DB_Envato($token);\n\n $purchase_data = $envato->call('/market/author/sale?code=' . $code);\n \n if(isset($purchase_data->error)) {\n return false;\n }\n\n return $purchase_data;\n }", "public function isWithoutCurrencyCode(): bool\n {\n return self::ISO_STATUS_WITHOUT_CURRENCY_CODE === $this->isoStatus;\n }", "function isCNRQuote($quote){\n\n\tif(strtolower($quote->quoteType) == \"cnr\"){\n\t\treturn true;\n\t}\n\treturn false;\n}", "function isCNPQuote($quote){\n\t\n\tif(strtolower($quote->quoteType) == \"cnp\"){\n\t\treturn true;\n\t}\n\treturn false;\n}", "public function canDisplayCustomValue()\n {\n $carrierCode = $this->getShipment()->getCarrierCode();\n\n if (!$carrierCode) {\n return false;\n }\n\n return in_array($carrierCode, $this->carrierCodeList);\n }", "private function getCurrencyExchangeRates(){\n\t\t\n\t\t//function needs ini to allow_url_fopen\n\t\tif(!ini_get('allow_url_fopen')){\n\t\t\t$this->error = \"ERROR - PHP.ini needs allow_url_fopen set to on\";\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(!$XML = $this->returnCurrencyXML()){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(!$this->createCurrencyArray($XML)){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif(!isSet($this->currencyRates) || empty($this->currencyRates)){\n\t\t\t$this->error = \"ERROR - there was an error converting the XML data\";\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t\t\n\t}", "private function hasInvitationCode()\n {\n if (isset($this->data['invitation_code']) && !empty($this->data['invitation_code'])) {\n return true;\n }\n\n return false;\n }", "private function searchCodeThreeLevels($code){\n\t \t$codigosTresNiveles = array('020.010.010','020.010.020','020.010.030','050.020.010','050.020.020',\n\t\t\t\t\t\t\t\t\t'050.020.030','050.030.010','050.030.020','060.010.010','060.010.020',\n\t\t\t\t\t\t\t\t\t'060.010.030','060.010.040','060.010.050','060.020.010','060.020.020',\n\t\t\t\t\t\t\t\t\t'060.020.030','060.020.040','060.020.050','060.020.060','060.030.010',\n\t\t\t\t\t\t\t\t\t'060.030.020');\n\t\treturn in_array($code, $codigosTresNiveles);\n\t}", "function check_code($str)\n\t{\n\t\t$code = $this->Coupon_model->check_code($str, $this->coupon_id);\n if ($code)\n \t{\n\t\t\t$this->form_validation->set_message('check_code', lang('error_already_used'));\n\t\t\treturn FALSE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t}", "public function isExcludedWith($adjustmentCode);", "public function getClassnameFromSource($code)\n {\n if (preg_match('/\\bclass[\\s\\r\\n]*([a-zA-Z0-9_]+)\\b/', $code, $m)==1) {\n return $m[1];\n }\n\n return false;\n }", "function is_competency_node($key) {\n\tif (strpos($key,\"http://asn.desire2learn.com/resources/\") !== false && strpos($key, \".xml\") === false)\n\t\treturn true;\n\telse return false;\t\n}", "public function hasScoreCode(){\n return $this->_has(3);\n }", "public function checkCurrency()\n {\n $idCurrency = $this->context->cart->id_currency;\n\n $currency = new Currency($idCurrency);\n $moduleCurrencies = $this->getCurrency($idCurrency);\n\n if (is_array($moduleCurrencies)) {\n foreach ($moduleCurrencies as $moduleCurrency) {\n if ($currency->id == $moduleCurrency['id_currency']) {\n return true;\n }\n }\n }\n\n return false;\n }", "private function isCurrencyValid($str)\n {\n if ($str === 'XTS' || strlen($str) !==3 || empty($this->repository->supplemental['codeMappings'][$str])) {\n return false;\n }\n\n return true;\n }", "public function issetProductCode(): bool\n {\n return isset($this->productCode);\n }", "public function issetProductCode(): bool\n {\n return isset($this->productCode);\n }", "function isCNSQuote($quote){\n\n\tif(strtolower($quote->quoteType) == \"cns\"){\n\t\treturn true;\n\t}\n\treturn false;\n}", "public function displayCustomsValue()\n {\n $storeId = $this->getRma()->getStoreId();\n $order = $this->getRma()->getOrder();\n $carrierCode = $this->getShipment()->getCarrierCode();\n if (!$carrierCode) {\n return false;\n }\n $address = $order->getShippingAddress();\n $shipperAddressCountryCode = $address->getCountryId();\n $recipientAddressCountryCode = $this->_rmaData->getReturnAddressModel($storeId)->getCountryId();\n\n return $shipperAddressCountryCode != $recipientAddressCountryCode && $this->canDisplayCustomValue();\n }", "public function setStoreCurrencyCode($code);", "function check_coupon($code, $blog_id = false, $level = false) {\r\n $coupon_code = preg_replace('/[^A-Z0-9_-]/', '', strtoupper($code));\r\n\r\n //empty code\r\n if (!$coupon_code)\r\n return false;\r\n\r\n $coupons = (array)get_site_option('psts_coupons');\r\n\t\t\r\n\t\t//allow plugins to override coupon check by returning a boolean value\r\n\t\tif ( is_bool( $override = apply_filters('psts_check_coupon', null, $coupon_code, $blog_id, $level, $coupons) ) )\r\n\t\t\treturn $override;\r\n\t\t\r\n //no record for code\r\n if (!isset($coupons[$coupon_code]) || !is_array($coupons[$coupon_code]))\r\n return false;\r\n\r\n //if specific level and not proper level\r\n if ($level && $coupons[$coupon_code]['level'] != 0 && $coupons[$coupon_code]['level'] != $level)\r\n return false;\r\n\r\n //start date not valid yet\r\n if (time() < $coupons[$coupon_code]['start'])\r\n return false;\r\n\r\n //if end date and expired\r\n if (isset($coupons[$coupon_code]['end']) && $coupons[$coupon_code]['end'] && time() > $coupons[$coupon_code]['end'])\r\n return false;\r\n\r\n //check remaining uses\r\n if (isset($coupons[$coupon_code]['uses']) && $coupons[$coupon_code]['uses'] && (intval($coupons[$coupon_code]['uses']) - intval(@$coupons[$coupon_code]['used'])) <= 0)\r\n return false;\r\n\t\t\r\n\t\t//check if the blog has used the coupon before\r\n\t\tif ($blog_id) {\r\n\t\t\t$used = get_blog_option($blog_id, 'psts_used_coupons');\r\n\t\t\tif (is_array($used) && in_array($coupon_code, $used))\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n //everything passed so it's valid\r\n return true;\r\n }", "private function returnCurrencyXML(){\n\t\t\n\t\t// ****************** POSSIBLE SECURITY RISK!!!! *********************\n\t // Get xml of currency exchange rates\n\t $XML=simplexml_load_file(\"http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml\");\n\t //the file is updated daily between 2.15 p.m. and 3.00 p.m. CET\n\t\t\n\t\t// check it is XML\n\t\tif($XML === false){\n\t\t\t$this->error = \"ERROR - there was an error parsing the XML from the provider\";\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn $XML;\n\t}", "public function isInstalled($code) {\n\t\t$extension_data = array();\n\t\t$query = $this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"extension WHERE `code` = '\" . $this->db->escape($code) . \"'\");\n\t\tif($query->row) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\t\n\t}", "public function codeIsValid(string $code): bool\n {\n return $this->constantValueExists($code);\n }", "public function checkSalesCenterCode($code) {\n $count = Salescenter::where('code', $code)->count();\n return $count;\n }", "public function getCouponByCode($code)\n {\n CI::db()->where('code', $code);\n $return = CI::db()->get('coupons')->row();\n \n if(!$return)\n {\n return false;\n }\n $return->product_list = $this->getProductIds($return->id);\n return $return;\n }", "public function hasExceptionOfCode($code)\n {\n $code = (int) $code;\n foreach ($this->_exceptions as $e) {\n if ($code == $e->getCode()) {\n return true;\n }\n }\n\n return false;\n }", "protected function IsValidCode($code)\n\t\t{\n\t\t\tif (preg_match('/^[a-z]{3}$/i', $code)) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "public function isSameCurrency(Money $money): bool;", "private function checkCurrency()\n {\n $currency_order = new Currency($this->context->cart->id_currency);\n $currencies_module = $this->module->getCurrency($this->context->cart->id_currency);\n // Check if cart currency is one of the enabled currencies\n if (is_array($currencies_module)) {\n foreach ($currencies_module as $currency_module) {\n if ($currency_order->id == $currency_module['id_currency']) {\n return true;\n }\n }\n }\n // Return false otherwise\n return false;\n }", "public static function getCurrencyForCode($code)\r\n {\r\n\treturn self::getCurrencySource()->getCurrencyForCode($code);\r\n }", "public function isUsedInForm($attributeCode, $formCode = 'customer_register_address', $entityType = \\Magento\\Customer\\Api\\AddressMetadataInterface::ENTITY_TYPE_ADDRESS)\n {\n $attributeId = $this->eavAttribute->getIdByCode( $entityType, $attributeCode);\n $bind = ['attribute_id' => $attributeId, 'form_code' => $formCode];\n $select = $this->resource->getConnection()->select()->from(\n $this->resource->getTableName('customer_form_attribute'),\n 'attribute_id'\n )->where(\n 'attribute_id = :attribute_id AND form_code = :form_code'\n );\n return $this->resource->getConnection()->fetchRow($select, $bind);\n }", "public function removeCODCharge()\n {\n return (1 == $this->getConfig('packages/remove_cod_charge'));\n }", "public function isDifferentCurrency(Money $money): bool;", "public function exists(string $code, array $codes = []): bool\n {\n return \\in_array($code, $codes) || $this->vouchers()->code($code)->exists();\n }", "public function hasActivateCode(){\n return $this->_has(10);\n }", "public function hasActivateCode(){\n return $this->_has(10);\n }", "public function isCurrencyEuro()\n {\n $currency = Shopware()->Shop()->getCurrency()->getCurrency();\n\n if ($currency != 'EUR') {\n return false;\n }\n return true;\n }", "public function checkCodeExist($id, $code) {\n\t\t$query = $this->db->get_where ( \"languages\", array (\n\t\t\t\t\"code\" => $code\n\t\t) );\n\t\t$lang1 = $this->getLangById ( $id );\n\t\tif ($query->num_rows () > 0) {\n\t\t\t$lang = $query->row ();\n\t\t\tif ($lang->code == $lang1->code)\n\t\t\t\treturn true;\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function issetProductNumberCode(): bool\n {\n return isset($this->productNumberCode);\n }", "function is_include_operator($code) {\n return $code === \"include\";\n }", "public function checkEnabledByCode($urlCode) {\r\n\t\t$sql = \"Select Count(*) As cnt From `#languages` Where `url_code` = '$url_code' And is_enabled = 1\"; \r\n\t\t$rs = $this->_get($sql); \r\n\t\tif ($rs !== false){\r\n\t\t\tif ($rs->cnt != 0) return true; \r\n\t\t}\r\n\t\treturn false; \r\n\t}", "function isCNSPQuote($quote){\n\n\tif(strtolower($quote->quoteType) == \"cnsp\"){\n\t\treturn true;\n\t}\n\treturn false;\n}", "public function has_discount( $coupon_code = '' ) {\n\t\treturn $coupon_code ? in_array( wc_format_coupon_code( $coupon_code ), $this->applied_coupons, true ) : count( $this->applied_coupons ) > 0;\n\t}", "public function hasActivateCode(){\n return $this->_has(3);\n }", "function getNumericCountryCode($iso2Code){\r\n\t\t$resource = \"countries\";\r\n\t\t$countriesArray = $this->getResource($resource, null, 'All');\r\n\t\tif($countriesArray){\r\n\t\t\tforeach ($countriesArray as $country) {\r\n\t\t\t\tif($country->Alpha2Code == $iso2Code){\r\n\t\t\t\t\treturn $country->NumericCode;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public function hasEthnicOrigin() {\n return $this->_has(7);\n }", "public function hasField($fieldCode)\n {\n if($this->getFieldValue($fieldCode)){\n \treturn true;\n }\n return false;\n }", "public function setOrderCurrencyCode($code);", "public static function isEuCountry($countryCode)\n {\n return in_array(strtoupper($countryCode), self::$euCountries) ? true : false;\n }", "public function is_exists($code)\n {\n $ext = $this->receive_po_request_model->is_exists($code);\n if($ext)\n {\n echo 'เลขที่เอกสารซ้ำ';\n }\n else\n {\n echo 'not_exists';\n }\n }", "public function checkgiftcardcode() {\n global $loguser;\n $curr_email = $loguser['email'];\n $code = $_GET['gfcode_value'];\n $getgfcardval = TableRegistry::get('Giftcards')->find()->where(['giftcard_key' => $code])->first();\n if (!empty($getgfcardval)) {\n $recEmail = $getgfcardval->reciptent_email;\n $gfcardId = $getgfcardval->id;\n $gfcardAmt = $getgfcardval->avail_amount;\n if ($gfcardAmt <= 0) {\n echo \"2\";\n die;\n } else if ($recEmail == $curr_email) {\n echo '1' . '*|*' . $gfcardId;\n die;\n } else {\n echo '0';\n die;\n }\n } else {\n echo '0';\n die;\n }\n }", "private function IsProperty($code) {\n\t\t$parent = '/^' . $this->bxPrefix . '[A-z\\d\\[\\]]+$/';\n\n\t\treturn preg_match($parent, $code);\n\t}", "public function find_in_cache( $code_id ) {\n\n\t\tforeach ( $this->found_codes as $code ) {\n\t\t\tif ( absint( $code->get_prop( 'ID' ) ) === absint( $code_id ) ) {\n\t\t\t\treturn $code;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public function equalsTo(Currency $currency)\n {\n return $this->getCode() == $currency->getCode();\n }", "static public function isZipCodeFormat($zip_code)\n {\n if (!empty($zip_code))\n return preg_match('/^[NLCnlc -]+$/', $zip_code);\n return true;\n }" ]
[ "0.7249582", "0.6548625", "0.63530695", "0.616148", "0.613512", "0.581938", "0.581938", "0.5816914", "0.5813855", "0.580396", "0.5651243", "0.56309867", "0.56309867", "0.55289704", "0.55249566", "0.55030996", "0.5494372", "0.5493275", "0.5476785", "0.54743254", "0.5421173", "0.53593016", "0.53410965", "0.53358907", "0.53358907", "0.5327403", "0.5276778", "0.52452785", "0.5212519", "0.51665616", "0.5145369", "0.5132615", "0.51034427", "0.50688255", "0.5059489", "0.5002158", "0.50004417", "0.49936053", "0.49936047", "0.49920782", "0.4987976", "0.49869812", "0.49748823", "0.49639738", "0.49556944", "0.49544984", "0.49459773", "0.49345464", "0.4926477", "0.48925892", "0.48721272", "0.4867257", "0.48643196", "0.4860798", "0.4834508", "0.48330918", "0.48279017", "0.48274142", "0.48146188", "0.480855", "0.480855", "0.47859934", "0.47747508", "0.47740763", "0.47586995", "0.47547558", "0.47528723", "0.47518817", "0.4748419", "0.47364792", "0.4725948", "0.4713148", "0.4711702", "0.47063234", "0.46997255", "0.46963298", "0.4682448", "0.46819064", "0.46803835", "0.46718812", "0.46718812", "0.46679264", "0.46674", "0.46577123", "0.4656831", "0.46508774", "0.46502966", "0.46394816", "0.46375707", "0.4633802", "0.4611633", "0.4609543", "0.46047756", "0.4603", "0.4601181", "0.45975003", "0.45973706", "0.45967266", "0.4594998", "0.45935538" ]
0.7188052
1
Get the console command options.
Получить параметры командной строки.
protected function getOptions() { return [ ['command', null, InputOption::VALUE_OPTIONAL, 'The terminal command that should be assigned', 'command:name'], ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getOptions() {\n return [\n ['env', null, InputOption::VALUE_OPTIONAL, 'The environment the command should run under.', null],\n ];\n }", "protected function getOptions()\n\t{\n\t\treturn [\n\t\t\t['testMode', null, InputOption::VALUE_OPTIONAL, 'Runs the command in Test Mode.', false],\n\t\t];\n\t}", "protected function getOptions()\n {\n $options = [];\n\n // Here we will gather all of the command line options that have been specified with\n // the double hyphens in front of their name. We will make these available to the\n // Blade task file so they can be used in echo statements and other structures.\n foreach ($_SERVER['argv'] as $argument) {\n if (! Str::startsWith($argument, '--') || in_array($argument, $this->ignoreOptions)) {\n continue;\n }\n\n $option = explode('=', substr($argument, 2), 2);\n\n if (count($option) == 1) {\n $option[1] = true;\n }\n\n $optionKey = $option[0];\n\n $options[Str::camel($optionKey)] = $option[1];\n $options[Str::snake($optionKey)] = $option[1];\n }\n\n return $options;\n }", "protected function getOptions()\n {\n return [\n ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'],\n ['force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production.'],\n ['path', null, InputOption::VALUE_OPTIONAL, 'The path of migrations files to be executed.'],\n ['pretend', null, InputOption::VALUE_NONE, 'Dump the SQL queries that would be run.'],\n\n ];\n }", "protected function getOptions()\n {\n return [\n ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'],\n ];\n }", "protected function getOptions()\n {\n return [\n ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use'],\n ];\n }", "protected function getOptions()\n {\n return [\n ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'],\n ['native-import', null, InputOption::VALUE_NONE, 'Use the native importer'],\n ];\n }", "protected function getOptions()\n {\n return array(\n array('database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'),\n array('pretend', null, InputOption::VALUE_NONE, 'Dump the SQL queries that would be run.'),\n array('seed', null, InputOption::VALUE_NONE, 'Indicates if the seed task should be re-run.'),\n array('force', null, InputOption::VALUE_NONE, 'Force the operation to run while in production.'),\n );\n }", "protected function getOptions()\n {\n return [\n ['port', null, InputOption::VALUE_OPTIONAL, 'The server port to use.', \\config('minions-server.port', 8085)],\n ];\n }", "protected function getOptions()\n {\n return [\n ['facade', '', InputOption::VALUE_NONE, 'Generate facade for current repository'],\n\n ['model', 'm', InputOption::VALUE_REQUIRED, 'Generate a resource repository for the given model'],\n ];\n }", "protected function getOptions()\n\t{\n\t\treturn [\n\t\t\t['attach', '-a', InputOption::VALUE_OPTIONAL, 'The pipes to attach to the workflow.', null],\n\t\t\t['unguard', '-u', InputOption::VALUE_NONE, 'Do not make this workflow validate data.', null],\n\t\t];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [\n\t\t];\n\t}", "public final function getOptions()\n {\n return $this->_getOptions();\n }", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions() {}", "public function getOptions() {}", "public function getOptions() {}", "public function options()\n\t{\n\t\treturn [];\n\t}", "protected static abstract function getOptions();", "public function options()\n {\n return $this->options ?: [];\n }", "protected function getOptions() {\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n {\n\n return [\n ['dry-run' , 'd', InputOption::VALUE_NONE, 'Dry Run'],\n ['payment' , 'p', InputOption::VALUE_NONE, 'Payment Address Only'],\n ['public' , 'u', InputOption::VALUE_NONE, 'Public Address Only'],\n ];\n }", "public function options()\n {\n return $this->options;\n }", "public function options()\n {\n return $this->options;\n }", "public function options()\n {\n return $this->options;\n }", "protected function getOptions()\r\n\t{\r\n\t\treturn isset($this->options) ? $this->options : array();\r\n\t}", "function get_options()\n{\n return php_sapi_name() == 'cli' ? get_options_cli() : get_options_url();\n}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n {\n return [\n ['format', 'f', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'The names of formats you would like to generate.', null],\n ['regenerate', 'r', InputOption::VALUE_NONE, 'Whether all files must be regenerated even if exist.', null],\n ['temp', 't', InputOption::VALUE_NONE, 'Whether the temporary storage must be processed.', null],\n ];\n }", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\tarray('dry-run', null, InputOption::VALUE_NONE, 'Displays the new cron without making any changes.', null),\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function _getCliOptions()\n {\n $cliOptions = array();\n\n foreach ($_SERVER['argv'] as $arg) {\n if (substr($arg, 0, 2) == '--' && strpos($arg, '=') !== false) {\n $option = substr($arg, 2);\n $option = explode('=', $option);\n\n $cliOptions[$option[0]] = $option[1];\n }\n }\n\n return $cliOptions;\n }", "protected function getOptions() {\n\t\treturn array();\n\t}", "public function getOpts(): array\n {\n return $this->opts;\n }", "public function getOpts(): array\n {\n return $this->opts;\n }", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n {\n return [\n ['model', 'm', InputOption::VALUE_OPTIONAL, 'Generate a repository for the given model.'],\n ];\n }", "public function getOptions()\n {\n return $this->options->getOptions();\n }", "protected function getOptions()\r\n\t{\r\n\t\treturn array();\r\n\t}", "protected function getOptions()\n {\n return [\n ['model', 'm', InputOption::VALUE_OPTIONAL, 'Inject a model to the controller.'],\n ['repository', 'r', InputOption::VALUE_OPTIONAL, 'Inject a repository to the controller.'],\n ['view', '', InputOption::VALUE_OPTIONAL, 'Generate a view controller class.'],\n ];\n }", "protected function getOptions()\n {\n return [\n ['show', null, InputOption::VALUE_NONE, 'Simply display the key instead of modifying files.'],\n ];\n }", "protected function getOptions()\n {\n return array(\n array('dry-run', null, InputOption::VALUE_NONE, 'Only shows which files would have been modified.'),\n array('force', 'f', InputOption::VALUE_NONE, 'Do not confirm before editing files.'),\n array('path', null, InputOption::VALUE_OPTIONAL, 'Path containing the files to be fixed.', 'app')\n );\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }", "public function getOptions()\n {\n return $this->options;\n }" ]
[ "0.7800682", "0.751765", "0.7345173", "0.73404354", "0.7306238", "0.72790045", "0.7268271", "0.7237944", "0.71917665", "0.715652", "0.7155546", "0.7137", "0.71122515", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.70998144", "0.70998144", "0.7099153", "0.7092979", "0.7084178", "0.70818704", "0.70631355", "0.7055609", "0.7040382", "0.7040382", "0.7040382", "0.7036282", "0.70356953", "0.70315164", "0.70315164", "0.70315164", "0.70315164", "0.70315164", "0.70315164", "0.70315164", "0.70315164", "0.70315164", "0.70281166", "0.70248216", "0.70230496", "0.70230496", "0.70230496", "0.70230496", "0.70230496", "0.70230496", "0.70230496", "0.70230496", "0.70230496", "0.70230496", "0.70230496", "0.70230496", "0.70230496", "0.7022473", "0.70166355", "0.70108926", "0.70108926", "0.70083207", "0.70083207", "0.70083207", "0.70083207", "0.70083207", "0.70083207", "0.70083207", "0.6996981", "0.6996434", "0.6994164", "0.6993292", "0.6984455", "0.69844353", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616", "0.69752616" ]
0.77591324
1
Get popup background url
Получить URL фона всплывающего окна
public function getBgImage(){ return $this->scopeConfigInterface->getValue(self::XML_PATH_POPUP_BG_IMAGE,ScopeInterface::SCOPE_WEBSITE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_url_background_pion(){ return $this->_url_background_pion;}", "public function get_url_background_card(){ return $this->_url_background_card;}", "function get_background_image()\n {\n }", "public function getPopup() {}", "function getBackground() {return $this->readBackground();}", "public function getPopupContent();", "function getPopup($id, $attr, $url)\n{\n\t\tif ($attr == '1') $attr = '800x600';\n\t\t@list($size,$attr) = explode(' ', $attr);\n\t\tswitch ($attr) {\n\t\tcase 'full': $poppar='toolbar=1,location=1,menubar=1,scrollbars=1,resizable=1';\n\t\tbreak;\n\t\tcase 'min': $poppar = 'resizable=1';\n\t\tbreak;\n\t\tcase 'none': $poppar = '';\n\t\tbreak;\n\t\tcase 'max': default: $poppar = 'scrollbars=1,resizable=1';\n\t\tbreak;\n\t\t}\n\n\t\tif ($size) {\n\t\t\tlist($w, $h, $l, $t) = sscanf($size, \"%dx%d+%d+%d\");\n\t\t\tif (!$l) $l = \"'+((window.screen.width-$w)/2)+'\";\n\t\t\tif (!$t) $t = \"'+((window.screen.height-$h)/2)+'\";\n\t\t\t$poppar .= ($poppar?',':'') . \"left=$l,top=$t,width=$w,height=$h\";\n\t\t}\n\n\t\treturn \"javascript:void(win_$id=window.open('$url','win_$id','$poppar'));win_$id.focus()\";\n}", "function get_custom_bg_for_user_profile() \r\n\t{\r\n\t\tglobal $xoouserultra;\r\n\t\t\r\n\t\t$site_url = site_url().\"/\";\r\n\t\t\r\n\t\t$html = '';\r\n\t\t$img = get_option('uultra_default_profile_bg');\r\n\t\t\r\n\t\t$path_f = $xoouserultra->get_option('media_uploading_folder');\t\t\t\t\t\t\r\n\t\t$target_path = $site_url.$path_f.'/custom_profile_bg/'.$img;\r\n\t\t\t\t\r\n\t\tif ($img!=\"\") \r\n\t\t{\t\t\t\r\n\t\t\t\r\n\t\t\t$html .= $target_path;\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn $html;\r\n\t\r\n\t}", "private function getURLLightbox() {\n\t\treturn (!$this->isSandbox ? $this->urlLightBox : $this->urlLighboxSandbox);\n\t}", "function readBackground() {return $this->_background;}", "public function getPreviewUrlFront()\n {\n return $this->previewUrlFront;\n }", "public function getPopupHtml() { return $this->popHtml; }", "function getBackgroundPosition() {return $this->readBackgroundPosition();}", "function get_background() {\r\n return $this->db->get($this->table);\r\n\t}", "public function get_preview_url()\n {\n }", "function get_custom_bg_for_user_profile_admin() \r\n\t{\r\n\t\tglobal $xoouserultra;\r\n\t\t\r\n\t\t$site_url = site_url().\"/\";\r\n\t\t\r\n\t\t$html = '';\r\n\t\t$img = get_option('uultra_default_profile_bg');\r\n\t\t\r\n\t\t$path_f = $xoouserultra->get_option('media_uploading_folder');\t\t\t\t\t\t\r\n\t\t$target_path = $site_url.$path_f.'/custom_profile_bg/'.$img;\r\n\t\t\t\t\r\n\t\tif ($img!=\"\") \r\n\t\t{\t\t\t\r\n\t\t\t\r\n\t\t\t$html .= '<img src=\"'.$target_path.'\" style=\"max-width:98% !important;\">';\t\r\n\t\t\t$html .= '<input type=\"button\" name=\"submit\" class=\"button button-secondary \" id=\"uultradmin-remove-custom-user-bg-image\" value=\"'.__('Remove','xoousers').'\" />';\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn $html;\r\n\t\r\n\t}", "function background_img($link){\n\t\t\t\techo \"<style> body{background: url(\". $link. \");\n\t\t\t\t\t\t\t\t\tbackground-repeat: no-repeat;\n\t\t\t\t\t\t\t\t\tbackground-size: cover;\n\t\t\t\t\t\t\t\t\t} </style>\";\n\t\t\t}", "function get_background($page_id){\n\n\t$custom_meta = get_post_custom($page_id);\n\t\n\tif(isset($custom_meta['lumen_page_background']) && isset($custom_meta['lumen_page_background'][0]) && $page_id != \"default\"){\n\t\t$background = unserialize($custom_meta['lumen_page_background'][0]);\t\n\t\tif($background['background-color'] == \"\" && $background['background-image'] == \"\") {\n\t\t\t$background = ot_get_option('lumen_site_default_background');\n\t\t}\n\t}\telse {\n\t\t$background = ot_get_option('lumen_site_default_background');\n\t}\n\t\n\t$background_image = \"\";\n\tif(isset($background['background-image'])){\n\t\t$background_image = $background['background-image'];\n\t\tif(strlen($background_image) > 0) {\n\t\t\t$background_image = 'url('.$background_image.')';\n\t\t}\n\t}\n\t\n\t$output = \"\";\n\t$background_repeat = false;\n\t\n\tif(isset($background['background-color'])){ $output .= $background['background-color'].\" \"; }\n\t$output .= $background_image.\" \";\n\tif(isset($background['background-repeat'])){ \n\t\t$output .= $background['background-repeat'].\" \"; \n\t\tif($background['background-repeat'] == \"repeat\"){\n\t\t\t$background_repeat = true;\t\t\n\t\t} \n\t}\n\tif(isset($background['background-attachment'])){ $output .= $background['background-attachment'].\" \"; }\n\tif(isset($background['background-position'])){ $output .= $background['background-position'].\" \"; }\n\t\n\tif(strlen(trim($output)) > 0 && $background_repeat) { \n\t\treturn 'background: '.$output.'; background-size: inherit!important;'; \n\t}else{\n\t\treturn 'background: '.$output; \n\t}\n\t\n\treturn \"\";\n}", "function cjpopups_wp_avatar_url($user_id_or_email, $size = 150){\n\t$user_id = cjpopups_user_info($user_id_or_email, 'ID');\n\t$get_avatar = get_avatar( $user_id, $size );\n preg_match(\"/src='(.*?)'/i\", $get_avatar, $matches);\n return ( $matches[1] );\n}", "function featuredBG($size = 'full', $pos_x = 'center', $pos_y = 'center', $repeat = 'no-repeat'){\n $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), $size );\n $url = $thumb['0'];\n echo 'style=\"background: url('. $url .')'. $pos_x .' '. $pos_y .' ' . $repeat .'\"';\n}", "function _custom_background_cb()\n {\n }", "public function getPictureUrl()\n {\n return $this->getImageurl();\n }", "function background_image()\n {\n }", "public function getBackgroundMode() {\n return $backgroundMode;\n }", "public function getAbsoluteSrc();", "public function getFrontPageUrl();", "function getPicUrl()\n\t\t{\n\t\t\treturn $this->picurl;\n\t\t}", "function wprt_background_css( $bg ) {\n\t// Define vars\n\t$css = '';\n\t$bg_style = $bg .'_style';\n\n\tif ( $bg_img = wprt_get_mod( $bg, null ) ) {\n\t\t$css .= 'background-image: url('. esc_url( $bg_img ). ');';\n\t}\n\n\tif ( $bg_style = wprt_get_mod( $bg_style ) ) {\n\t\tif ( 'fixed' == $bg_style ) {\n\t\t\t$css .= ' background-position: center center; background-repeat: no-repeat; background-attachment: fixed; background-size: cover;';\n\t\t} elseif ( 'fixed-top' == $bg_style ) {\n\t\t\t$css .= ' background-position: center top; background-repeat: no-repeat; background-attachment: fixed; background-size: cover;';\n\t\t} elseif ( 'fixed-bottom' == $bg_style ) {\n\t\t\t$css .= ' background-position: center bottom; background-repeat: no-repeat; background-attachment: fixed; background-size: cover;';\n\t\t} elseif ( 'cover' == $bg_style ) {\n\t\t\t$css .= ' background-repeat: no-repeat; background-position: center center; background-size: cover;';\n\t\t} elseif ( 'center-top' == $bg_style ) {\n\t\t\t$css .= ' background-repeat: no-repeat; background-position: center top;';\n\t\t} elseif ( 'repeat' == $bg_style ) {\n\t\t\t$css .= ' background-repeat: repeat;';\n\t\t} elseif ( 'repeat-x' == $bg_style ) {\n\t\t\t$css .= ' background-repeat: repeat-x;';\n\t\t} elseif ( 'repeat-y' == $bg_style ) {\n\t\t\t$css .= ' background-repeat: repeat-y;';\n\t\t}\n\t}\n\n\treturn esc_attr( $css );\n}", "function hyde_custom_background_cb() {\n\t$background = set_url_scheme( get_background_image() );\n\n\t// $color is the saved custom color.\n\t// A default has to be specified in style.css. It will not be printed here.\n\t$color = get_background_color();\n\n\tif ( $color === get_theme_support( 'custom-background', 'default-color' ) ) {\n\t\t$color = false;\n\t}\n\n\tif ( ! $background && ! $color )\n\t\treturn;\n\n\t$style = $color ? \"background-color: #$color;\" : '';\n\n\tif ( $background ) {\n\t\t$image = \" background-image: url('$background');\";\n\n\t\t$repeat = get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', 'default-repeat' ) );\n\t\tif ( ! in_array( $repeat, array( 'no-repeat', 'repeat-x', 'repeat-y', 'repeat' ) ) )\n\t\t\t$repeat = 'repeat';\n\t\t$repeat = \" background-repeat: $repeat;\";\n\n\t\t$position = get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) );\n\t\tif ( ! in_array( $position, array( 'center', 'right', 'left' ) ) )\n\t\t\t$position = 'left';\n\t\t$position = \" background-position: top $position;\";\n\n\t\t$attachment = get_theme_mod( 'background_attachment', get_theme_support( 'custom-background', 'default-attachment' ) );\n\t\tif ( ! in_array( $attachment, array( 'fixed', 'scroll' ) ) )\n\t\t\t$attachment = 'scroll';\n\t\t$attachment = \" background-attachment: $attachment;\";\n\n\t\t$style .= $image . $repeat . $position . $attachment;\n\t}\n?>\n<style type=\"text/css\" id=\"custom-background-css\">\n.sidebar { <?php echo trim( $style ); ?> }\n</style>\n<?php\n}", "function cjpopups_get_image_url($image){\n\tif(strpos($image, 'img') > 0){\n\t\t$xpath = new DOMXPath(@DOMDocument::loadHTML($image));\n\t\t$src = $xpath->evaluate(\"string(//img/@src)\");\n\t\treturn $src;\n\t}else{\n\t\treturn $image;\n\t}\n}", "public function get_url()\r\n\t{\r\n\t\treturn $this->dropin_url;\r\n\t}", "public static function getThemeUrl()\n {\n return (isset(self::$data['_url'])) ? self::$data['_url'] : '';\n }", "function getUrlPromo() {\n\t$connection = connectDB();\n\t$tabla = 'options';\n\t$option_name = 'urlPopup';\n\n\t$query = \"SELECT * FROM \" .$tabla. \" WHERE options_name = '{$option_name}' LIMIT 1\";\n\t$result = mysqli_query($connection, $query);\n\t\n\tcloseDataBase($connection);\n\n\tif ($result->num_rows == 0) {\n\t\treturn '#';\n\t}\n\t\n\t$data = mysqli_fetch_array($result);\n\t\n\tif ($data[2] == '') {\n\t\treturn '#';\n\t} else {\n\t\treturn $data[2];\n\t}\n\n\tcloseDataBase($connection);\n}", "protected abstract function getButtonCallbackURL();", "function get_background_color()\n {\n }", "public function GetPreferencesUrl();", "public static function getURI() {\n\n return self::loadUrl();\n }", "function client_url() {\n\tglobal $post;\n\t$url = get_post_meta($post->ID, 'client_url', true);\n\tif ($url) {\n\t\t?>\n\t\t<a href=\"<?php echo $url; ?>\" target=\"_blank\">Live Preview →</a>\n <?php\n\t}\n}", "public function getPhotoUrl()\n\t{\n\t\treturn $this->photo_url;\n\t}", "function background_function($url) {\n\t\t$query = $this->dobj->db_query(\"DELETE FROM backgrounds WHERE url=$$\".$url.\"$$\");\n\t\t$query = $this->dobj->db_query(\"INSERT INTO backgrounds (url) VALUES ($$\".$url.\"$$);\");\n\t\treturn $url;\n\t}", "public function getScreenshotUrl()\n {\n return $this->screenshotUrl;\n }", "function draw_modal_outer_background() { ?>\n <div id=\"modal-outer-background\" class=\"no-display\">\n </div>\n \n<?php }", "public function setBackgroundImage($url);", "public function getUrl()\n {\n return $this->createUrl();\n }", "protected function getUrl() {\r\n\t\treturn $this->url;\r\n\t}", "function readBackgroundPosition() {return $this->_backgroundposition;}", "function bethel_get_default_background_args() {\n\treturn array ('default-color' => '#f5f5f5',\n\t\t\t\t 'default-image' => get_stylesheet_directory_uri().'/images/background.jpg',\n\t\t\t\t 'default-repeat' => 'repeat'\n\t );\n}", "public function get_url () {\r\n\t\treturn $this->url;\r\n\t}", "public function getPreviewImageUrl(): string\n {\n $previewPath = $this->getConfigValue('previewImage', 'assets/img/skin-preview.png');\n if (File::exists($this->getPath() . '/' . $previewPath)) {\n return Url::asset('plugins/summer/login/skins/' . $this->getDirName() . '/' . $previewPath);\n }\n return Url::asset('modules/cms/assets/images/default-theme-preview.png');\n }", "public function set_url_background_pion(String $_url_background_pion){\n $this->_url_background_pion = $_url_background_pion;\n\n return $this;\n }", "public function getPreviewUrl()\n {\n return $this->getUrl('*/*/preview');\n }", "function getBackgroundRepeat() {return $this->readBackgroundRepeat();}", "function vibe_custom_background_cb(){\n $background = set_url_scheme( get_background_image() );\n\n // $color is the saved custom color.\n // A default has to be specified in style.css. It will not be printed here.\n $color = get_theme_mod( 'background_color' );\n\n if ( ! $background && ! $color )\n return;\n\n $style = $color ? \"background-color: #$color;\" : '';\n\n if ( $background ) {\n $image = \" background-image: url('$background');\";\n\n $repeat = get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', 'default-repeat' ) );\n if ( ! in_array( $repeat, array( 'no-repeat', 'repeat-x', 'repeat-y', 'repeat' ) ) )\n $repeat = 'repeat';\n $repeat = \" background-repeat: $repeat;\";\n\n $position = get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) );\n if ( ! in_array( $position, array( 'center', 'right', 'left' ) ) )\n $position = 'left';\n $position = \" background-position: top $position;\";\n\n $attachment = get_theme_mod( 'background_attachment', get_theme_support( 'custom-background', 'default-attachment' ) );\n if ( ! in_array( $attachment, array( 'fixed', 'scroll' ) ) )\n $attachment = 'scroll';\n $attachment = \" background-attachment: $attachment;\";\n\n $style .= $image . $repeat . $position . $attachment;\n\n echo '\n <div id=\"background_fixed\">\n <img src=\"'.$background.'\" />\n </div>\n <style type=\"text/css\">\n #background_fixed{position: fixed;top:0;left:0;width:200%;height:200%;}\n </style>\n ';\n }\n\n}", "public function getUrl() {\n return $this->getProfileUri();\n }", "public function get_callback_url(){\n\t\treturn $this->callback_url;\n\t}", "public function getUrl()\n {\n return $this->_urlBuilder->getUrl();\n }", "public function getBackgroundImage()\r\n {\r\n $orientation = $this->getOrientation();\r\n $backgroundImage = '';\r\n /** @var $helperImage Mage_XmlConnect_Helper_Image */\r\n $helperImage = Mage::helper('xmlconnect/image');\r\n\r\n switch ($orientation) {\r\n case Mage_XmlConnect_Helper_Ipad::ORIENTATION_LANDSCAPE:\r\n $configPath = 'conf/body/backgroundIpadLandscapeImage';\r\n $imageUrlOrig = $this->getData($configPath);\r\n if ($imageUrlOrig) {\r\n $width = Mage_XmlConnect_Helper_Ipad::PREVIEW_LANDSCAPE_BACKGROUND_WIDTH;\r\n $height = Mage_XmlConnect_Helper_Ipad::PREVIEW_LANDSCAPE_BACKGROUND_HEIGHT;\r\n $backgroundImage = $helperImage->getCustomSizeImageUrl($imageUrlOrig, $width, $height);\r\n } else {\r\n $backgroundImage = $this->getPreviewImagesUrl('ipad/background_home_landscape.jpg');\r\n }\r\n break;\r\n case Mage_XmlConnect_Helper_Ipad::ORIENTATION_PORTRAIT:\r\n $configPath = 'conf/body/backgroundIpadPortraitImage';\r\n $imageUrlOrig = $this->getData($configPath);\r\n if ($imageUrlOrig) {\r\n $width = Mage_XmlConnect_Helper_Ipad::PREVIEW_PORTRAIT_BACKGROUND_WIDTH;\r\n $height = Mage_XmlConnect_Helper_Ipad::PREVIEW_PORTRAIT_BACKGROUND_HEIGHT;\r\n $backgroundImage = $helperImage->getCustomSizeImageUrl($imageUrlOrig, $width, $height);\r\n } else {\r\n $backgroundImage = $this->getPreviewImagesUrl('ipad/background_portrait.jpg');\r\n }\r\n break;\r\n default:\r\n Mage::throwException(\r\n Mage::helper('xmlconnect')->__('Wrong Ipad background image orientation has been specified: \"%s\".', $orientation)\r\n );\r\n break;\r\n }\r\n return $backgroundImage;\r\n }", "public function get_url() {\n\t\treturn $this->url;\n\t}", "public function get_url() {\n\t\treturn $this->url;\n\t}", "function cjpopups_current_url($only_url = null, $port = null){\n\t$pageURL = (is_ssl()) ? \"https://\" : \"http://\";\n\tif ($_SERVER[\"SERVER_PORT\"] != \"80\") {\n\t\tif(is_null($port)){\n\t\t\t$pageURL .= $_SERVER[\"SERVER_NAME\"] . \":\" . $_SERVER[\"SERVER_PORT\"] . $_SERVER[\"REQUEST_URI\"];\n\t\t}else{\n\t\t\t$pageURL .= $_SERVER[\"SERVER_NAME\"] . $_SERVER[\"REQUEST_URI\"];\n\t\t}\n\t} else {\n\t\t$pageURL .= $_SERVER[\"SERVER_NAME\"] . $_SERVER[\"REQUEST_URI\"];\n\t}\n\tif(is_null($only_url)){\n\t\treturn $pageURL;\n\t}else{\n\t\t$url = explode('?', $pageURL);\n\t\treturn $url[0];\n\t}\n}", "public function url()\n {\n return $this->factory->getUrl($this->handle);\n }", "public function getUrl()\n {\n return $this->getProperty()->url;\n }", "protected function getUrl()\n {\n if (!empty($this->info['url'])) {\n return $this->info['url'];\n }\n }", "public function _theme_url() {\n\t\treturn $this->EE->elements->_theme_url();\n\t}", "function get_url()\n {\n }", "function getScriptUrl() ;", "function featuredURL($size = 'full'){\n $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), $size );\n $url = $thumb['0'];\n echo $url;\n}", "function featuredURL($size = 'full'){\n $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), $size );\n $url = $thumb['0'];\n echo $url;\n}", "public function getExternalUpdateProfileUrl();", "function extra_custom_background_cb() {\n\t$background = set_url_scheme( get_background_image() );\n\n\t// $color is the saved custom color.\n\t// A default has to be specified in style.css. It will not be printed here.\n\t$color = get_background_color();\n\n\tif ( $color === get_theme_support( 'custom-background', 'default-color' ) ) {\n\t\t$color = false;\n\t}\n\n\tif ( ! $background && ! $color ) {\n\t\treturn;\n\t}\n\n\t$style = $color ? \"background-color: #$color;\" : '';\n\n\tif ( $background ) {\n\t\t$image = \" background-image: url('$background');\";\n\n\t\t$_repeat = get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', 'default-repeat' ) );\n\t\tif ( ! in_array( $_repeat, array( 'no-repeat', 'repeat-x', 'repeat-y', 'repeat' ) ) ) {\n\t\t\t$_repeat = 'repeat';\n\t\t}\n\n\t\t$repeat = \" background-repeat: $_repeat;\";\n\n\t\tif ( 'no-repeat' == $_repeat ) {\n\t\t\t$repeat .= \" background-size: cover;\";\n\t\t}\n\n\t\t$position = get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) );\n\n\t\tif ( ! in_array( $position, array( 'center', 'right', 'left' ) ) ) {\n\t\t\t$position = 'left';\n\t\t}\n\n\t\t$position = \" background-position: top $position;\";\n\n\t\t$attachment = get_theme_mod( 'background_attachment', get_theme_support( 'custom-background', 'default-attachment' ) );\n\n\t\tif ( ! in_array( $attachment, array( 'fixed', 'scroll' ) ) ) {\n\t\t\t$attachment = 'scroll';\n\t\t}\n\n\t\t$attachment = \" background-attachment: $attachment;\";\n\n\t\t$style .= $image . $repeat . $position . $attachment;\n\t}\n?>\n<style type=\"text/css\" id=\"extra-custom-background-css\">\nbody.custom-background { <?php echo trim( $style ); ?> }\n</style>\n<?php\n}", "public function getUrl()\n {\n if (array_key_exists(\"url\", $this->_propDict)) {\n return $this->_propDict[\"url\"];\n } else {\n return null;\n }\n }", "function cjpopups_callback_url($callback = null){\n\t$text_domain = cjpopups_item_info('text_domain');\n\t$callback = (isset($_GET['callback']) && is_null($callback)) ? $_GET['callback'] : $callback;\n\tif(!is_null($callback)){\n\t\treturn admin_url('admin.php?page=').cjpopups_item_info('page_slug').'&callback='.$callback;\n\t}else{\n\t\treturn admin_url('admin.php?page=').cjpopups_item_info('page_slug');\n\t}\n}", "function image_src($id, $size = 'full', $background_image = false, $height = false) {\n if ($image = wp_get_attachment_image_src($id, $size, true)) {\n return $background_image ? 'background-image: url('.$image[0].');' . ($height?'height:'.$image[2].'px':'') : $image[0];\n }\n}", "function bgimg($img){\n\treturn \"background: url('\".$img.\"'); background-size: cover; background-position: 0 50%;\";\n}", "public function get_url();", "function timeless_backstretch_js() {\n\t//* or if it is the homepage and background video is enabled in customizer\n\tif ( ! is_home() && equity_get_custom_field( '_equity_disable_single_post_background' ) == true )\n\t\treturn;\n\n\t$background_url = equity_get_custom_field( '_equity_single_post_background' );\n\n\t// use default if no background image set\n\tif ( ! $background_url || is_home() && 'image' === get_theme_mod( 'homepage_background_option', 'image' ) ) {\n\t\t$background_url = get_theme_mod( 'default_background_image', get_stylesheet_directory_uri() . '/images/bkg-default.jpg' );\n\t}\n\t?>\n\t\n\t<script>jQuery.backstretch(\"<?php echo $background_url; ?>\");</script>\n\t<?php\n}", "static public function getImageURL() {\n\t\treturn self::$image_url;\n\t}", "protected function _getLogoUrl() {\n return ($this->_getFromConfig('pop_up_logo')) ? $this->getSkinUrl(Mage::getStoreConfig('design/header/logo_src'), array(\"_area\" => \"frontend\")) : \"\";\n }", "function myUrl($atts, $content = null) {\n extract(shortcode_atts(array(\n \"gallery\" => 'http://'\n ), $atts));\n return '<a href=\"'.$gallery.'\" class=\"popup_mediacenter\" target=\"popup_mediacenter\"><img src=\"http://seattletimes.nwsource.com/art/ui/Photograph_link.gif\" width=\"15\" height=\"11\" class=\"icon\">'.$content.'</a>';\n}", "public function getJavascriptUrl()\n {\n return $this->_getField(self::$JAVASCRIPT_URL);\n }", "protected function url()\n\t{\n\t\treturn Phpfox::getLib('url');\t\n\t}", "protected function getPluginUrl()\n {\n $filename = 'jquery.colorbox.js';\n \n if ($this->isProduction()) {\n $filename = 'jquery.colorbox-min.js';\n }\n\n return $this->getLocationUrl() . '/jquery-colorbox/' . $filename;\n }", "function getPreviewUrl () {\n return link::preview($this->dir, $this->file);\n }", "function getDeleteAvatarUrl() {\n \treturn assemble_url('people_company_user_delete_avatar', array(\n \t 'company_id' => $this->getCompanyId(),\n \t 'user_id' => $this->getId(),\n \t));\n }", "public function backdropPath()\n {\n \treturn $this->defaultBackdropPath;\n }", "public function getUrl()\r\n\t{\r\n\t\treturn $this->url;\r\n\t}", "public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}", "public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}", "public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}", "public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}", "public function getUrl()\n\t{\n\t\treturn $this->url;\n\t}", "static public function getCurrentImageURL() {\n\t\tif (self::checkSSL()) {\n\t\t\treturn self::getSecureImageURL();\n\t\t} else {\n\t\t\treturn self::getImageURL();\n\t\t}\n\t}", "public function getUrl() {\n\t\treturn $this->url;\n\t}", "public function getUrl() {\n\t\treturn $this->url;\n\t}", "public function getUrl() {\n\t\treturn $this->url;\n\t}", "function image_src($id, $size = 'full', $background_image = false, $height = false) {\n if ($image = wp_get_attachment_image_src($id, $size, true)) {\n return $background_image ? 'background-image: url('.$image[0].');' . ($height?'min-height:'.$image[2].'px':'') : $image[0];\n }\n}", "public function get_attached_page_url() {\n\t\t$required_pages_creator = new Required_Pages();\n\t\t\n\t\treturn get_permalink( $required_pages_creator->get_page_id_by_shortcode( $this->get_shortcode_name() ) );\n\t}", "public function getURL() {\n\t\treturn $this->selectedEndpoint['url'];\t\n\t}", "public function get_embed_url() {\n\t\treturn $this->get_meta( 'embed_url' );\n\t}", "public function getPreviewImageUrlUnwrapped()\n {\n return $this->readWrapperValue(\"preview_image_url\");\n }" ]
[ "0.7662499", "0.65181", "0.63692915", "0.62914294", "0.60900795", "0.5884704", "0.58233964", "0.57780117", "0.5726911", "0.5686214", "0.5676823", "0.5669619", "0.56365454", "0.55923164", "0.5589073", "0.55470103", "0.55421066", "0.54672974", "0.5455209", "0.5407353", "0.53895384", "0.5376368", "0.5364553", "0.53601545", "0.53571844", "0.5354042", "0.5348791", "0.534041", "0.5323523", "0.5314655", "0.530087", "0.52994496", "0.5291672", "0.5290685", "0.5289806", "0.5289636", "0.52816164", "0.5274154", "0.52494997", "0.5244466", "0.5241641", "0.5240757", "0.52363205", "0.52358335", "0.5235478", "0.52268565", "0.5219123", "0.5205172", "0.52048665", "0.52027893", "0.51948595", "0.5192195", "0.5191251", "0.51878697", "0.5187739", "0.51854944", "0.5185298", "0.5180109", "0.5180109", "0.51754105", "0.51723653", "0.51715815", "0.51690483", "0.5167792", "0.51599973", "0.51555926", "0.51502013", "0.51502013", "0.5148454", "0.5147878", "0.5145222", "0.51444477", "0.5141232", "0.51401824", "0.51392496", "0.513296", "0.5131629", "0.5111392", "0.51080406", "0.51062334", "0.51037353", "0.509966", "0.50833344", "0.50819963", "0.5078642", "0.50769335", "0.5074222", "0.5074222", "0.5074222", "0.5074222", "0.5074222", "0.50734526", "0.50702065", "0.50702065", "0.50702065", "0.5068441", "0.5066183", "0.5065901", "0.5055332", "0.50514466" ]
0.72030306
1
Get popup static block id
Получить идентификатор статического блока попапа
public function getStaticBlockId(){ return $this->scopeConfigInterface->getValue(self::XML_PATH_POPUP_STATIC_BLOCK,ScopeInterface::SCOPE_WEBSITE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_ID()\n {\n return $this->blockId;\n }", "public function getBlockId($name='')\n\t{\n\t\tif (!$name)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t$this->_db->setQuery( \"SELECT id FROM $this->_tbl WHERE block=\" . $this->_db->quote($name) . \" LIMIT 1\" );\n\t\treturn $this->_db->loadResult();\n\t}", "function fetchId($name)\n {\n //return $this->_parent->_name.'-'.\"popup-$name[1]\";\n return $this->_parent->getName().'-'.\"popup-$name[1]\";\n }", "protected function actionGetPrimaryKey()\n {\n return $this->_static_block->getPrimaryKey();\n }", "public function getIblockId()\n {\n return $this->iblockId;\n }", "protected function blockPluginId() {\n return '';\n }", "function getHtmlId(){\n\t\t//this to have unique ID attribute of the main containing div in case there is more \n\t\t//than 1 of the same action box. Cache key is composed of $_htmlUniqueId prefix and \n\t\t//ID of the action box.\n\t\t$actionBoxId = $this->getId();\n\t\t\n\t\t$htmlUniqueId = wp_cache_get( $this->_html_UniqueId . $actionBoxId );\n\t\tif( false === $htmlUniqueId ){\n\t\t\t//this is the first\n\t\t\t$htmlUniqueId = 1;\n\t\t\twp_cache_set( $this->_html_UniqueId . $actionBoxId, $htmlUniqueId );\n\t\t} else {\n\t\t\t//another box is already displayed\n\t\t\t$htmlUniqueId++;\n\t\t\twp_cache_replace( $this->_html_UniqueId . $actionBoxId, $htmlUniqueId );\n\t\t}\n\t\t\n\t\treturn $actionBoxId.$htmlUniqueId;\n\t}", "public function getPopup() { \n if($this->blocks) {\n return $this->desc . \"<BR />&nbsp;<BR />\" . \n \"<b>Blocks\" . \n ($this->charges > 0 ? \" \" . $this->charges . \" more\" : \"\") .\n ($this->blockActionTypes != \"all\" ? $this->blockActionTypes : \"\") . \" actions\" . \n ($this->blockChance < 1 ? \" with a chance of \" . floor($this->blockChance * 100) . \"%\" : \"\") . \n ($this->turns > 0 ? \" within the next \" . $this->turns . \" rounds\" : \"\") .\n \".\";\n }\n return $this->desc;\n }", "public static function getMaximumId()\n\t{\n\t\treturn (int) BackendModel::getDB()->getVar('SELECT MAX(i.id) FROM content_blocks AS i LIMIT 1');\n\t}", "public function edite_static_block(){\r\n\t\tif($this->has_admin_panel()) return $this->module_edite_static_block();\r\n return $this->module_no_permission();\r\n\t}", "public function getPopup() {}", "static function id()\n\t{\n\t\treturn self::data('id');\n\t}", "public function get_site_id()\n {\n }", "public function get_site_id()\n {\n }", "function get_block_template($id, $template_type = 'wp_template')\n {\n }", "public function getAjaxID() {}", "function get_block_id ($gid1, $gid2) {\n $values_gid1 = array(\n 'subject_id' => $gid1,\n 'type_id' => array (\n 'cv_id' => array (\n 'name' => 'sequence',\n ),\n 'name' => 'member_of',\n 'is_obsolete' => 0\n ),\n );\n\n $blk_region_gid1 = chado_select_record(\n 'feature_relationship', \n array('object_id'),\n $values_gid1\n );\n\n $values_gid2 = array(\n 'subject_id' => $gid2,\n 'type_id' => array ( \n 'cv_id' => array (\n 'name' => 'sequence',\n ),\n 'name' => 'member_of',\n 'is_obsolete' => 0\n ),\n );\n\n $blk_region_gid2 = chado_select_record(\n 'feature_relationship', \n array('object_id'), \n $values_gid2\n );\n\n // locate the block id shard by gid1 and gid2 \n $blk_html = '';\n foreach ($blk_region_gid1 as $blk1) {\n foreach ($blk_region_gid2 as $blk2) { \n // search block id shared by gid 1 and gid2\n $bid = db_query('SELECT blockid FROM {synblock} WHERE (b2=:blk1 AND b1=:blk2) OR (b1=:blk1 AND b2=:blk2)', \n\t\t\t array(\n ':blk1' => $blk1->object_id,\n ':blk2' => $blk2->object_id,\n\t\t\t )\n\t\t )->fetchField();\n $blk_html.= l($bid, \"synview/block/\" . $bid, array('attributes' => array('target' => \"_blank\")));\n }\n }\n\n if (empty($blk_html)) {\n $blk_html = 'NA';\n }\n\n\n return $blk_html; \n}", "public static function getSiteId(){\n return 1;\n\n }", "public function getFormId() {\n return 'sayhello_block_form';\n }", "public static function getTemplateBlock()\n {\n return self::$templateBlock;\n }", "function vcex_get_block_editor_script_src( $block = '' ) {\n\treturn TTC_PLUGIN_DIR_URL . 'inc/vcex/blocks/' . $block . '/vcex-' . $block . '-block.js';\n}", "public function getAutoBlockTitle()\n\t{\n\t\tglobal $lng;\n\n\t\treturn $lng->txt(\"survey_auto_block_title\");\n\t}", "function get_id() {\n\t\treturn $this->get_data( 'id' );\n\t}", "public function getSiteId();", "public function getPublicBlock() {\n return '';\n }", "function getSiteId() {\n\t\treturn $this->getData('siteId');\n\t}", "public function getOriginalBlock()\n {\n $data = $this->_coreRegistry->registry('magictoolbox');\n return is_null($data) ? null : $data['blocks']['product.info.media.image'];\n }", "function get_block_file_template($id, $template_type = 'wp_template')\n {\n }", "public function getGuestTemplateId()\n {\n return $this->getTemplateId();\n }", "function get_the_block_template_html()\n {\n }", "public static function getActualId()\n {\n if (self::$context->getName() == 'citation'\n && self::getCitationItem()!== false) {\n return self::getCitationItem()->get('id');\n }\n\n return self::getData()->getVariable('id');\n }", "public static function id(){\n return self::info('id');\n }", "private function getCurrentWebsiteId()\n {\n return $this->storeManager->getWebsite()->getId();\n }", "public function getTaskIdBlock()\n {\n return $this->task_id_block;\n }", "public function getPopupContent();", "public function onclick_btn_delete_static_block($e){\r\n\t\tif($this->has_admin_panel()) return $this->module_onclick_btn_delete_static_block($e);\r\n\t\treturn $this->msg->modal_no_permission($e);\r\n\t}", "function the_ID()\n {\n }", "public function getVisualId()\n {\n return $this->getId();\n }", "public function main() {\n return $this->id;\n }", "public function main() {\n return $this->id;\n }", "public function Admin_Action_ShowBlockForm() {\n $ssf = new SendStudio_Functions ( );\n $action = 'new';\n $GLOBALS ['blockid'] = (isset ( $_GET ['id'] ) && $_GET ['id'] > 0) ? $_GET ['id'] : md5(rand ( 1, 100000000 ));\n $GLOBALS ['tagid'] = (isset ( $_GET ['tagId'] ) && $_GET ['tagId'] > 0) ? $_GET ['tagId'] : 0;\n $GLOBALS ['blockaction'] = (isset ( $_GET ['id'] ) && $_GET ['id'] > 0) ? 'edit' : 'new';\n $GLOBALS ['BlockEditor'] = $ssf->GetHTMLEditor ( '', false, 'blockcontent', 'exact', 260, 630 );\n $GLOBALS ['CustomDatepickerUI'] = $this->template_system->ParseTemplate('UI.DatePicker.Custom_IEM', true);\n $this->template_system->ParseTemplate ( 'dynamiccontentblocks_form' );\n }", "private function getContentBlockName()\n\t{\n\t\tif ($this->test->getKioskMode())\n\t\t{\n\t\t\t$this->tpl->setBodyClass(\"kiosk\");\n\t\t\t$this->tpl->setAddFooter(FALSE);\n\t\t\treturn \"CONTENT\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn \"ADM_CONTENT\";\n\t\t}\n\t}", "protected function getToggleId()\n {\n $unique = md5(uniqid());\n return \"sidenav_$unique\";\n }", "protected function getCurrentPageIdFromRootTemplate() {}", "public static function getCurLocationID()\n {\n return Yii::app()->getsetSession->getLocationId();\n }", "function get_dynamic_block_names()\n {\n }", "public static function getID() {\r\n return 1;\r\n }", "public function getId()\n\t{\n\t\treturn $this->get('templateid');\n\t}", "public static function getID()\n {\n return self::getInstance()->_getID();\n }", "public function get_id() {\n\t\treturn self::MODULE_ID;\n\t}", "function getUniqueID(){\n\t\treturn $this->module.'_'.$this->ID;\n\t}", "protected function currentTemplateHandle(){\n if( $this->_currentTemplateHandle === null ){\n $blockObj = $this->getBlockObject();\n $this->_currentTemplateHandle = ( is_object($blockObj) ) ? (string) $blockObj->getBlockFilename() : null;\n }\n return $this->_currentTemplateHandle;\n }", "public function getId()\n\t{\n\t\treturn $this->_themeExtras['id'];\n\t}", "public static function id()\n {\n return 1;\n }", "function get_the_ID()\n {\n }", "public function fetch_the_id() {}", "public function pId()\n {\n static $id = null;\n\n if (!is_null($id)) {\n return $id;\n }\n\n $id = $this->property('id');\n\n if (strpos($id, 'http') === 0) {\n $path = explode('/', parse_url($id, PHP_URL_PATH));\n\n if ($path[1] == 'gallery') {\n $id = $path[2];\n }\n elseif ($path[1] == 'a') {\n $id = 'a/'.$path[2];\n }\n else {\n $id = $path[1];\n }\n }\n\n return $id;\n }", "public function getGathercontentTemplateId();", "function get_header_image_id( $block ) {\n\n\tif ( 'acf/header' !== $block['blockName'] ) {\n\t\treturn null;\n\t}\n\n\tif ( ! empty( $block['attrs']['data']['image'] ) && isset( $block['attrs']['data']['image'] ) ) {\n\t\treturn $block['attrs']['data']['image'];\n\t}\n\n\treturn null;\n}", "function ID($id)\n {\n if (false !== $ctrl = \\ClickBlocks\\MVC\\Page::$current->view->get($id)) return $ctrl->attr('id');\n }", "public function getHtmlId() {\n return Html::getId('draggableviews-table-' . $this->view->id() . '-' . $this->view->current_display);\n }", "public static function getHolderID();", "public function getTemplateId()\n\t{\n\t\treturn $this->template_id;\n\t}", "public function getIdentifier()\n {\n $configID = $this->get_config() ? $this->get_config()->ID : 1;\n return ucfirst($this->get_mode()) . \"Site\" . $configID;\n }", "public function get_id() {\n return 'remote';\n }", "public function get_theme_custom_block_dir()\n {\n return get_stylesheet_directory() .\n \"/\" .\n $this->get_config()->get(\"componentBlocksLocation\") .\n \"layout/\" .\n $this->get_ID();\n }", "public function get_site_id()\n {\n if ( ! $this->_site_id)\n {\n $this->_site_id = intval($this->EE->config->item('site_id'));\n }\n\n return $this->_site_id;\n }", "function getBlock()\n {\n\t\t$args = new safe_args();\n\t\t$args->set('app_name', \t$_SESSION['customization']['applications']['app_name'], 'sqlsafe');\n\t\t$args->set('block_id', \tNOTSET, 'sqlsafe');\n\t\t$args = $args->get(func_get_args());\n\t\t$GLOBALS['appshore_data']['server']['xml_render'] = true;\t\n\t\t\n\t\tif( $args['block_id'] )\n\t\t\t$result['customization'] = getManyAssocArrays('select * from db_blocks where app_name = \"'.$args['app_name'].\n\t\t\t\t'\" and block_id = \"'.$args['block_id'].'\"');\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t$result['return'] = 'success';\n\t\t$result['message'] = '';\n \t\treturn $result;\n }", "public static function id()\n {\n return self::$id;\n }", "protected function getWidgetId()\n {\n return !empty($_GET['wid']) ? $_GET['wid'] : 'rrf';\n }", "public function getLiveId() {}", "public function getId() {\n return ($this->isInit()) ? $this->id : null;\n }", "public function id()\n\t{\n\t\treturn $this->SqueezePlyrID ;\n\t}", "public function get_module_id()\n {\n return C__MODULE__DIALOG_ADMIN;\n }", "public function se_get_id() {\n\t\treturn version_compare( WC_VERSION, '3.0', '>=' ) ? $this->get_id() : $this->id;\n\t}", "public function se_get_id() {\n\t\treturn version_compare( WC_VERSION, '3.0', '>=' ) ? $this->get_id() : $this->id;\n\t}", "function wp_get_first_block($blocks, $block_name)\n {\n }", "public function getHashtag()\n {\n return $this->partials['fragment'];\n }", "function initPageId()\n {\n $global=Frd::getGlobal();\n\n if(isset($_REQUEST['signed_request']))\n {\n $global->page_id=get_page_id();\n return $global->page_id;\n }\n\n return false;\n }", "public function getClickwrapId() {\n return @$this->attributes['clickwrap_id'];\n }", "public function getElementId() {\n $id = $this->getDivId();\n return $id;\n }", "public function getTriggerId(): string\n {\n return $this->attributes->get('trigger_id', '');\n }", "public function add_static_block(){\r\n\t\tif($this->has_admin_panel()) return $this->module_add_static_block();\r\n return $this->module_no_permission();\r\n\t}", "public function getBlock()\n {\n return $this->block;\n }", "public function getSocialUniqueClick()\n\t{\n\t\tif (isset($this->socialUniqueClick)) {\n\n\t\t\treturn $this->socialUniqueClick;\n\t\t}\n\n\t\treturn 0;\n\t}", "protected static function getRebuildBlockMarkContent()\n {\n return static::getKey() ?: '_';\n }", "public function getIdentifier()\n {\n return $this->getParam('flowIdentifier');\n }", "public function getCurStageId()\n {\n return $this->get(self::_CUR_STAGE_ID);\n }", "function getSiteId()\n {\n return $this->_props['SiteId'];\n }", "public function edite_block(){\r\n\t\tif($this->has_admin_panel()){\r\n if(isset($_GET['id'])) return $this->module_edite_block($_GET['id']);\r\n //access denied\r\n return $this->module_no_permission();\r\n }\r\n\t\treturn core\\router::jump_page(404);\t\r\n\t}", "public static function id ()\n {\n return self::user()->getId();\n }", "function getFirstMessageBlock(){\n global $mysqli;\n $results = $mysqli->query(\"SELECT block_index FROM messages ORDER BY message_index ASC LIMIT 1\");\n if($results){\n $row = $results->fetch_assoc();\n return $row['block_index'];\n }\n}", "public function getTemplateId() : string {\n return $this->templateId;\n }", "public function get_id();", "public function get_id();", "public function getWebhookId()\n {\n return Mage::getStoreConfig('trello_api/webhook/id');\n }", "public static function id()\n {\n if (!ServerHelper::coroutineIsEnabled()) {\n return 0;\n }\n\n return SwCoroutine::getuid();\n }", "public function getPluginId();", "protected static function getAjaxId()\n\t{\n\t\treturn preg_replace('/.*_([0-9a-zA-Z]+)$/', '$1', self::getPost('id'));\n\t}", "function getID();" ]
[ "0.6915995", "0.6216904", "0.6204871", "0.60660446", "0.6021487", "0.60035217", "0.5912662", "0.58703965", "0.5808187", "0.5794352", "0.57913446", "0.57251763", "0.5600986", "0.5600986", "0.5586825", "0.5564948", "0.5546049", "0.55442536", "0.554154", "0.5524439", "0.5505612", "0.550064", "0.5496692", "0.54647845", "0.5453472", "0.54461634", "0.54446536", "0.5436763", "0.5402306", "0.54000247", "0.5396142", "0.5387699", "0.5369013", "0.5354517", "0.53528094", "0.53494084", "0.53447825", "0.53431505", "0.5341349", "0.5341349", "0.53389746", "0.5328388", "0.5327231", "0.5312801", "0.5310423", "0.52971196", "0.52966493", "0.5290196", "0.5282252", "0.5280351", "0.5277847", "0.52622014", "0.5257661", "0.52506304", "0.5245631", "0.52350694", "0.5230583", "0.5230394", "0.52303016", "0.52154344", "0.52066135", "0.52037597", "0.5200268", "0.5200215", "0.51959157", "0.5187122", "0.5183605", "0.51808035", "0.5179967", "0.5179756", "0.5174495", "0.51743287", "0.51732266", "0.51677346", "0.5165108", "0.5165108", "0.51638836", "0.5158267", "0.51415914", "0.5138824", "0.5133614", "0.5112973", "0.51109314", "0.5109424", "0.51078296", "0.5093026", "0.509297", "0.50915575", "0.5089429", "0.50879484", "0.5086729", "0.5080655", "0.5076217", "0.5074563", "0.5074563", "0.5069678", "0.5065974", "0.50638765", "0.5055942", "0.5052582" ]
0.8631903
0
Get popup cookie time
Получить время попап-куки
public function getCookieTime(){ return $this->scopeConfigInterface->getValue(self::XML_PATH_POPUP_COOKIE_TIME,ScopeInterface::SCOPE_WEBSITE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLastTime(){\n\t \t if (!empty($_COOKIE['lastVisit'])) {\n\t\techo \"你上次登陆的时间是:\".$_COOKIE['lastVisit'];\n\t}else{\n\t\techo \"你是第一次登陆\";\n\t}\n\t\tsetCookie(\"lastVisit\",date(\"Y-m-d : H:i:s\"),time()+24*3600*30);\n }", "private static function cookieLifetime()\n {\n return time() + (self::ACCESS_TOKEN_EXPIRES_DAYS * 24 * 60 * 60);\n }", "public function get_cookie_life() {\n\n\t\t\t$life = get_option( 'wc_sc_coupon_cookie_life', 180 );\n\n\t\t\treturn apply_filters( 'wc_sc_coupon_cookie_life', time() + ( 60 * 60 * 24 * $life ) );\n\n\t\t}", "public function getSessionTime(){\n return $this->_session->get('time');\n }", "function _tsuiseki_tracking_get_expiration_time() {\n return (time() + TSUISEKI_TRACKER_COOKIE_TIMEOUT);\n}", "public function getCookiesTimeOut() \n {\n $cookiesTimeout = Mage::getStoreConfig(self::XML_PATH_COOKIES_TIMEOUT);\n return $cookiesTimeout;\n }", "private function get_cookie_expiration_time()\n {\n $session = $this->getSession();\n if( !is_array($session) ) \n { \n return false;\n }\n else\n {\n return $session['expires'];\n }\n }", "public static function getCookiePersistentSecs () {\n \n $days = conf::getMainIni('cookie_time'); \n if ($days == -1) {\n // ten years\n $cookie_time = 3600 * 24 * 365 * 10;\n }\n \n else if ($days >= 1) {\n $cookie_time = 3600 * 24 * $days;\n }\n \n else {\n $cookie_time = 0;\n }\n \n return $cookie_time;\n }", "private function getSessionTimestamp()\n {\n if ($this->_phpsession && isset($_SESSION[$this->_sessionName]->SessionID))\n $timestamp = $_SESSION[$this->_sessionName]->SessionID;\n\n\n if ($this->_cookie && isset($_COOKIE[$this->_sessionName . \"_Timestamp\"]))\n $timestamp = $_COOKIE[$this->_sessionName . \"_Timestamp\"];\n\n return $timestamp;\n }", "public function lastLogoutTime();", "public function isRefreshTimeBasedCookie() {}", "public function isRefreshTimeBasedCookie() {}", "function logged_in_since() {\n if (isset($_COOKIE[\"login_time\"])) {\n ?>\n\n <em>(logged in since <?= $_COOKIE[\"login_time\"] ?>)</em>\n\n <?php\n }\n }", "public function currentCookieInfo() {\n if ($this->isLoggedIn()) {\n $auth_cookie = Cookie::get(\"auth_cookie\"); //get hash from browser\n return $this->cookieInfo($auth_cookie);\n }\n }", "public function getShowTime()\n\t{\n\t\treturn $this->showtime;\n\t}", "public function getExpireTime()\n {\n return $this->get(self::_EXPIRE_TIME);\n }", "public function getExpireTime()\n {\n return $this->get(self::_EXPIRE_TIME);\n }", "public function getExpireTime()\n {\n return $this->get(self::_EXPIRE_TIME);\n }", "public function getExpireTime()\n {\n return $this->get(self::_EXPIRE_TIME);\n }", "static public function getSessionTime(){\n if (!isset($_SESSION['start_time'])){\n return 0;\n } else {\n return time() - $_SESSION['start_time'];\n }\n }", "function cjpopups_time_ago($ptime){\n $etime = time() - $ptime;\n if ($etime < 1){\n return __('Just now', 'cjpopups');\n }\n $a = array(\n \t12 * 30 * 24 * 60 * 60 => 'year',\n\t\t30 * 24 * 60 * 60 => 'month',\n\t\t24 * 60 * 60 => 'day',\n\t\t60 * 60 => 'hour',\n\t\t60 => 'minute',\n\t\t1 => 'second',\n );\n $singular = array(\n \t'year' => __('year', 'cjpopups'),\n\t\t'month' => __('month', 'cjpopups'),\n\t\t'day' => __('day', 'cjpopups'),\n\t\t'hour' => __('hour', 'cjpopups'),\n\t\t'minute' => __('minute', 'cjpopups'),\n\t\t'second' => __('second', 'cjpopups'),\n );\n $plurals = array(\n \t'year' => __('years', 'cjpopups'),\n\t\t'month' => __('months', 'cjpopups'),\n\t\t'day' => __('days', 'cjpopups'),\n\t\t'hour' => __('hours', 'cjpopups'),\n\t\t'minute' => __('minutes', 'cjpopups'),\n\t\t'second' => __('seconds', 'cjpopups'),\n );\n foreach ($a as $secs => $str){\n $d = $etime / $secs;\n if ($d >= 1){\n $r = round($d);\n return $r . ' ' . ($r > 1 ? $plurals[$str] : $singular[$str]) .' '. __('ago', 'cjpopups');\n }\n }\n}", "public function getExpirationTime() {\n return $this->sessionData[\"expire\"];\n }", "public function getExpirationTime() {\n return $this->shareData[\"expire\"];\n }", "public function store()\n {\n return response('200')->cookie(\n 'cookie-popup',\n 'checked',\n time() + (365 * 24 * 60 * 60)\n );\n }", "public function lastLoginTime();", "public static function getCookiePersistentDays () {\n \n $days = conf::getMainIni('cookie_time'); \n if ($days == -1) {\n $cookie_time = 365 * 10;\n }\n \n else if ($days >= 1) {\n $cookie_time = $days;\n }\n \n else {\n $cookie_time = 0;\n }\n \n return $cookie_time;\n }", "function gmt_time() {\r\n\t\t$now = time ();\r\n\t\t$tz = $this->gmt_timezone ();\r\n\t\t$seconds = 3600 * $tz;\r\n\t\treturn $now - $seconds;\r\n\t}", "public function getshowTime()\n {\n return $this->showtime;\n }", "public static function get_expire_time_otp()\n {\n return apply_filters('wordpress_acl_otp_time_expire', (MINUTE_IN_SECONDS * 5));\n }", "public function getExpireTime()\n {\n return $this->expire_time;\n }", "function getHtmlTime(){\r\n\treturn('P&aacute;gina generada en <b>'.(time() - $_SERVER['REQUEST_TIME']) .'</b> segundos');\r\n}", "public function getCookTime()\r\n {\r\n return $this->_cook_time;\r\n }", "function getLifeTime();", "public function redirecttime() {\n return $this->info['redirect_time'];\n }", "public function toCookieString()\n {\n return $this->format(\\DateTime::COOKIE);\n }", "function get_cookie_days()\n{\n global $SITE_INFO;\n return array_key_exists('cookie_days', $SITE_INFO) ? intval($SITE_INFO['cookie_days']) : 120;\n}", "protected function getTimeLastSaved()\n {\n return SiteConfig::current_site_config()->VimeoFeed_LastSaved;\n }", "public function getExpireTime()\n {\n return $this->expireTime;\n }", "public function getExpireTime()\r\n {\r\n return $this->expireTime;\r\n }", "public function getCredentialsExpireAt()\r\n {\r\n return $this->credentials_expire_at;\r\n }", "public function getCookie()\n {\n return $this->cookie;\n }", "public function getExpiresIn();", "public function getCookie() {\n return $this->cookie;\n }", "public function get_expires() {\n\t\treturn $this->expires;\n\t}", "public function getCookie()\n {\n return $this->getHeaders()->get('Cookie');\n }", "function wpgplus_get_cookie($name) {\n\t$my_cookie = get_transient('wpgplus_cookie_'. $name);\n\t// wpgplus_debug(\"\\nCookie is \" . print_r($my_cookie,true) . \"\\n\");\n\t// Cookies which have an expiration date and it is passed should not be returned\n\tif(!$my_cookie || ((!empty($my_cookie->expires)) && ($my_cookie->expires < time()))) {\n\t\t//wpgplus_debug(\"\\nNo cookies found for \". $name . \"\\n\");\n\t\treturn false;\n\t} else {\n\t\t//wpgplus_debug(\"\\nGetting cookie for \". $my_cookie->name . \"\\n\");\n\t\treturn $my_cookie;\n\t}\n}", "static function viaRemember()\n\t{\n\t\treturn self::$cookie;\n\t}", "function get_now_hour(){\n if($this->nowHour == \"nc\");\n $this->nowHour = $this->_getNowValues( \"1 hours\");\n return round($this->nowHour * 0.001,3);\n }", "public function getAuthTime()\n {\n return $this->authTime;\n }", "public function cookieValue() {\n return $this->cookie;\n }", "public function cookieValue() {\n\t\treturn $this->cookie;\n\t}", "function getCookieData() {\n\t\t$oEncrypt = utilityEncrypt::factory(file_get_contents(system::getConfig()->getPathData().'/dash.session.key'));\n\t\treturn utilityEncrypt::toUriString(\n\t\t\t$oEncrypt->encrypt(\n\t\t\t\tserialize(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => $this->getUser()->getID(),\n\t\t\t\t\t\t'email' => $this->getUser()->getEmail(),\n\t\t\t\t\t\t'expiry' => strtotime('+72 hours'),\n\t\t\t\t\t)\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t}", "function getCurrentTime()\n\t\t{\n\t\t\t$time = date('h:i:s a');\n\t\t\treturn $time;\n\t\t}", "public function getPopup() {}", "public function GetSessionExpirationSeconds ();", "function getsystime() {\n\n return date('Y-m-d H:i:s');\n\n}", "public function getCredentialsExpireAt()\n {\n return $this->credentialsExpireAt;\n }", "public function get_time() {\r\n\t\t\t$date = $this->get_date( 'U' );\r\n\t\t\treturn is_numeric( $date ) ? $date : time(); //time wrong? use now\r\n\t\t}", "public function getTimeExpiry()\n {\n return $this->timeExpiry;\n }", "public function getLastCheckedtime()\n {\n\t\treturn $this->_getSess('checktime');\n }", "public function getExpirationTime()\n {\n return $this->_expiration_time;\n }", "public function GetCurrentTime(){\n\t\treturn date('y-m-d H:i:s', time());\n\t}", "function reply_time() {\n\tglobal $reply;\n\treturn $reply['time'];\n}", "public static function popMessage() {\n if (isset($_COOKIE[self::$_name])) {\n $message = unserialize($_COOKIE[self::$_name]);\n setcookie(self::$_name, \"\", time() - self::$_time, self::$_path);\n } else {\n $message = NULL;\n }\n return $message;\n }", "public function get_time_created(){\n\t\treturn $this->time_created;\n\t}", "function wp_get_cookie_login()\n {\n }", "public function getExpire()\r\n {\r\n return $this->expire;\r\n }", "public static function now(){\n\t\treturn date('Y-m-d H:i:s', time());\n\t}", "function get_timecreated() {\n return $this->timecreated;\n }", "public function getExpire()\n {\n return $this->_expire;\n }", "protected function getTime()\n {\n return time();\n }", "public static function getSystemCookie (){\n if (isset($_COOKIE['system_cookie'])){\n return $_COOKIE['system_cookie'];\n } else {\n return false;\n }\n }", "public static function GMNow()\n {\n return gmdate('Y-m-d H:i:s');\n }", "protected function _getCacheLifetime()\n\t{\n\t\treturn Mage::helper('bcp')->getAdvancedConfig('html_page_cache_time');\n\t}", "public function getExpire()\n {\n return $this->expire;\n }", "public function getExpire()\n {\n return $this->expire;\n }", "public function getExpire()\n {\n return $this->expire;\n }", "public function getLifetime()\n {\n\t\treturn $this->_getSess('lifetime');\n }", "public function cached_timestamp()\n\t{\n\t\t$query = $this->_EE->db->get_where('dd_settings', array('key' => 'last_saved'));\n\t\treturn ($query->num_rows() > 0) ? $query->row()->value : 0 ;\n\t}", "public function getExpirationTime()\n {\n return $this->expiration_time;\n }", "public function getExpirationTime()\n {\n return $this->expiration_time;\n }", "private function get_nonce () {\n return @$_COOKIE['sso_nonce'];\n }", "public function connecttime() {\n return $this->info['connect_time'];\n }", "public function getSpotifyExpiresIn()\n {\n return $this->spotifyExpiresIn;\n }", "function getjsOnTimer() {return $this->_jsontimer;}", "public function getCurrentTime() {\n $timestamp = $this->getInfo();\n $http_code = $timestamp->code;\n $current_time = 'Time not set yet';\n if ($http_code == 200) {\n $current_time = date('H:i', $timestamp->data->date->timestamp);\n }\n return $current_time;\n }", "public function getExpiresIn()\n {\n return $this->expiresIn;\n }", "public static function getCookieName() {}", "public static function getCookieName() {}", "function time_session(){\n $_SESSION['time'] = time();\n }", "public function getAuthCaptureTimestamp()\n {\n return $this->auth_capture_timestamp;\n }", "function time_now() {\n return date(\"H:i:s\");\n}", "public function getExpiresAt()\r\n {\r\n return $this->expires_at;\r\n }", "function getAuthTimestamp()\n {\n \treturn $this->_authTimestamp;\n }", "public function setUpCookie() {\n\t\t if (ini_get(\"session.use_cookies\")) {\n\t\t \t$this->time=time()+$this->prp['lifetime'];\n\t\t\t$t=new DateTime();\n\t\t\t$t->setTimestamp($this->time);\n\t\t\t$f=$t->format('c');\n\t\t\t$this->trz[]=\"Expire at {$f}\";\n\t\t\t$params= session_get_cookie_params();\n\t\t\tforeach($this->prp['params'] as $p=>$v) $params[$p]=$v;\n\t\t\tif(0) singleton::show($params,\"Cookie params before set:\");\n\t\t\t // This set the cookie for the next call\n setcookie(session_name(), session_id(),\n \t\t$this->time,\n $params[\"path\"], $params[\"domain\"],\n $params[\"secure\"], $params[\"httponly\"]\n );\n }\n\t\telse die( 'session cookies disabled');\n\t}", "function my_custom_popup_scripts() { ?>\n <script type=\"text/javascript\">\n (function ($, document, undefined) {\n\n $('#pum-123')\n .on('pumAfterOpen', function () {\n var $popup = $(this);\n setTimeout(function () {\n $popup.popmake('close');\n }, 10000); // 10 Seconds\n });\n\n }(jQuery, document))\n </script><?php\n}", "public function get_time() {\n return $this->_time;\n }", "public function getCookieName()\n {\n return Mage::helper('fastlycdn')->generateCookieName(\n Fastly_CDN_Model_Esi_Tag_Reports_Product_Viewed::COOKIE_NAME\n );\n }", "public function getCookieVariables();", "public static function logout() {\n\t\tif (isset($_COOKIE['sm_constitid'])) {\n\t\t\tsetrawcookie('sm_constitid', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\n\t\tif (isset($_COOKIE['ERIGHTS'])) {\n\t\t\tsetrawcookie('ERIGHTS', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\n\t\tif (isset($_COOKIE['JSESSIONID'])) {\n\t\t\tsetrawcookie('JSESSIONID', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\n\t\tif (isset($_COOKIE['emeta_id'])) {\n\t\t\tsetrawcookie('emeta_id', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\n\t\tif (isset($_COOKIE['first_name'])) {\n\t\t\tsetrawcookie('first_name', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\n\t\tif (isset($_COOKIE['last_name'])) {\n\t\t\tsetrawcookie('last_name', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\n\t\tif (isset($_COOKIE['is_org'])) {\n\t\t\tsetrawcookie('is_org', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\n\t\tif (isset($_COOKIE['email'])) {\n\t\t\tsetrawcookie('email', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\n\t\tif (isset($_COOKIE['status'])) {\n\t\t\tsetrawcookie('status', \"\", time() - 3600, COOKIE_PATH, COOKIE_DOMAIN);\n\t\t}\n\t\texit;\n\t}" ]
[ "0.6724043", "0.6605812", "0.6433711", "0.64166373", "0.6311801", "0.6257696", "0.6249962", "0.622519", "0.6133038", "0.6073651", "0.6008927", "0.6008927", "0.60028315", "0.5937981", "0.5823877", "0.58137786", "0.58137786", "0.58137786", "0.58137786", "0.5795732", "0.5792176", "0.5748114", "0.57443696", "0.5732915", "0.5731286", "0.57308114", "0.5711119", "0.5681686", "0.56664735", "0.5642632", "0.5603911", "0.5603833", "0.56023186", "0.55927694", "0.55823493", "0.55636525", "0.55346566", "0.5521868", "0.5520136", "0.5505887", "0.546045", "0.54535455", "0.54478395", "0.5440128", "0.54399526", "0.5438816", "0.54286313", "0.54283506", "0.542716", "0.54219395", "0.5414872", "0.5405967", "0.54050654", "0.5398966", "0.5353271", "0.532632", "0.5325565", "0.53197056", "0.5315315", "0.5313346", "0.5304459", "0.53027064", "0.53021675", "0.5301284", "0.52968395", "0.5296707", "0.5286029", "0.5285049", "0.52849287", "0.5283613", "0.5280407", "0.5272578", "0.5269594", "0.5263928", "0.52605283", "0.52605283", "0.52605283", "0.52552706", "0.52521086", "0.52466166", "0.52466166", "0.52447104", "0.5236571", "0.5236174", "0.5231468", "0.52283317", "0.5222958", "0.52226055", "0.522175", "0.52178514", "0.52104545", "0.5210102", "0.52041423", "0.5199807", "0.5197523", "0.51966304", "0.5190281", "0.51875234", "0.5183525", "0.5182825" ]
0.8568498
0
Publishes the Configuration File.
Публикует файл конфигурации.
protected function publishConfigurationFile() { // Determine the Local Configuration Path $source = $this->getLocalConfigurationPath(); // Determine the Application Configuration Path $destination = $this->getApplicationConfigPath(); // Publish the Configuration File $this->publishes([$source => $destination], 'config'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function publishConfig()\n {\n $this->publishes([\n $this->basePath('config/flare/config.php') => config_path('flare/config.php'),\n ]);\n }", "private function publishConfig()\n\t{\n\t\t$config = __DIR__ . '/config/workflow.php';\n\n\t\t$this->publishes([$config => config_path('workflow.php')]);\n\n\t\t$this->mergeConfigFrom($config, 'workflow');\n\t}", "protected function publishConfig()\n {\n $this->publishes([\n __DIR__ . '/../config/acl.php' => config_path('acl.php'),\n ], 'config');\n }", "protected function publishConfig()\n {\n $this->publishes([\n $this->packagePath('config/config.php') => config_path($this->package . '.php')\n ], 'config');\n }", "private function publishesConfig(): void\n {\n $this->publishes([\n __DIR__.'/../config/invite-codes.php' => config_path('invite-codes.php'),\n ], 'invite-codes-config');\n }", "protected function publishConfig()\n {\n $path = __DIR__.'/../config/disqus.php';\n $this->mergeConfigFrom($path, 'disqus');\n $this->publishes([\n $path => config_path('disqus.php'),\n ], 'disqus');\n }", "public function publish()\n {\n $this->move('config/auth.php', config_path(), 'auth.php');\n $this->move('config/services.php', config_path(), 'services.php');\n\n $this->notify('Publishing: Config Files');\n }", "protected function offerPublishing()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__ . '/../config/documentation.php' => config_path('documentation.php'),\n ], 'documentation-config');\n }\n }", "private function setPublishFiles()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__.'/../config/config.php' => config_path('setting.php'),\n ], 'setting');\n }\n }", "protected function publishFiles()\n {\n $this->publishes([\n __DIR__.'/Config/installer.php' => config_path('installer.php'),\n ], 'nickelcms');\n\n // $this->publishes([\n // __DIR__.'/assets' => resource_path('nicklecms/admin'),\n // ], 'nickelcms_assets');\n\n }", "private function publishConfig()\n {\n if ($this->app->environment('testing')) {\n return;\n }\n\n $this->publishes(\n [__DIR__ . '/..' . Settings::LARAVEL_PUBLISHABLE_CONFIG => LaravelConfig::configPublishPath()],\n 'config'\n );\n }", "protected function configHandle()\n {\n $packageConfigPath = __DIR__.'/config/config.php';\n $appConfigPath = config_path('task-management.php');\n\n $this->mergeConfigFrom($packageConfigPath, 'task-management');\n\n $this->publishes([\n $packageConfigPath => $appConfigPath,\n ], 'config');\n }", "protected function registerPublishableFiles()\n {\n $this->publishes([\n __DIR__.\"/../config/{$this->name}.php\" => config_path(\"{$this->name}.php\"),\n ], 'config');\n }", "private function registerPublishing(): void\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__ . '/../config/ethereum.php' => config_path('ethereum.php'),\n ], 'ethereum-config');\n }\n }", "protected function setPackageConfigurationFile()\n {\n $config = __DIR__ . '/Config/recaptcha.php';\n $path = config_path('recaptcha.php');\n \n $this->publishes([$config => $path], 'config'); \n $this->mergeConfigFrom( $config, 'recaptcha');\n }", "protected function registerPublishing() : void\n {\n $this->publishes([\n __DIR__ . '/../config/dejavu.php' => config_path('dejavu.php')\n ], 'dejavu-config');\n }", "private function registerConfiguration()\n {\n $configPath = __DIR__ . '/../config/themify.php';\n $this->mergeConfigFrom($configPath, 'themify');\n $this->publishes([$configPath => config_path('themify.php')]);\n }", "private function setupConfig()\n {\n $this->publishes([\n __DIR__ . '/config' => config_path(),\n ], 'config');\n\n $this->mergeConfigFrom(__DIR__ . '/../config/package-blueprint.php', 'package-blueprint');\n }", "protected function configurePublishing()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__.'/../stubs/fortify.php' => config_path('fortify.php'),\n ], 'fortify-config');\n\n $this->publishes([\n __DIR__.'/../stubs/CreateNewUser.php' => app_path('Actions/Fortify/CreateNewUser.php'),\n __DIR__.'/../stubs/FortifyServiceProvider.php' => app_path('Providers/FortifyServiceProvider.php'),\n __DIR__.'/../stubs/PasswordValidationRules.php' => app_path('Actions/Fortify/PasswordValidationRules.php'),\n __DIR__.'/../stubs/ResetUserPassword.php' => app_path('Actions/Fortify/ResetUserPassword.php'),\n __DIR__.'/../stubs/UpdateUserProfileInformation.php' => app_path('Actions/Fortify/UpdateUserProfileInformation.php'),\n __DIR__.'/../stubs/UpdateUserPassword.php' => app_path('Actions/Fortify/UpdateUserPassword.php'),\n ], 'fortify-support');\n\n $this->publishes([\n __DIR__.'/../database/migrations' => database_path('migrations'),\n ], 'fortify-migrations');\n }\n }", "private function bootConfig(): void\n {\n $baseDir = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR;\n $configDir = $baseDir . 'config' . DIRECTORY_SEPARATOR;\n\n $this->publishes([\n $configDir . 'laravel-database-emails.php' => config_path('laravel-database-emails.php'),\n ], 'laravel-database-emails-config');\n }", "protected function registerPublishing()\n {\n $this->publishes([\n __DIR__.'/../config/ziggeo.php' => config_path('ziggeo.php'),\n ], 'ziggeo-config');\n }", "protected function publishConfig($configPath)\n {\n $this->publishes([$configPath => config_path('ads.php')], 'config');\n }", "protected function defineAssetPublishing()\n {\n $this->publishes([\n __DIR__.'/../config/firefly.php' => config_path('firefly.php'),\n ], 'firefly-config');\n\n $this->publishes([\n __DIR__.'/../database/migrations/' => database_path('migrations'),\n ], 'firefly-migrations');\n\n $this->publishes([\n __DIR__.'/../public/' => public_path('vendor/firefly'),\n ], 'firefly-assets');\n }", "protected function publishConfig($configPath)\n {\n $this->publishes([$configPath => $this->getConfigPath()], 'config');\n }", "protected function publishFiles()\r\n {\r\n $this->publishes([\r\n __DIR__.'/../Config/installer.php' => base_path('config/installer.php'),\r\n ], 'laravelinstaller');\r\n\r\n $this->publishes([\r\n __DIR__.'/../assets' => public_path('installer'),\r\n ], 'laravelinstaller');\r\n\r\n $this->publishes([\r\n __DIR__.'/../Views' => base_path('resources/views/vendor/installer'),\r\n ], 'laravelinstaller');\r\n\r\n $this->publishes([\r\n __DIR__.'/../Lang' => base_path('resources/lang'),\r\n ], 'laravelinstaller');\r\n }", "protected function publishConfig( $configPath ) {\n\t\t$this->publishes([$configPath => config_path('cachetags.php')], 'config');\n\t}", "protected function offerPublishing()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__ . '/../config/dashkit.php' => config_path('dashkit.php'),\n ], 'dashkit-config');\n\n $this->publishes([\n __DIR__ . '/../resources/views/dashkit.blade.php' => resource_path('views/' . config('dashkit.view') . '.blade.php'),\n ], 'dashkit-view');\n }\n }", "public function publishFiles()\n {\n\n $dir = __DIR__;\n\n // config\n $this->publishes([\n $dir . '/../config/permissions.php' => config_path('permissions.php'),\n ], 'config-role');\n\n /**\n * Database\n */\n $migration_path = database_path('migrations/');\n $seeds_path = database_path('seeds/');\n\n // migrations\n $this->publishes([\n $dir . '/../database/migrations/create_roles_table.php.stub' => $migration_path . date('Y_m_d_His', time()) . '_create_roles_table.php',\n $dir . '/../database/migrations/create_role_user_table.php.stub' => $migration_path . date('Y_m_d_His', time()) . '_create_role_user_table.php',\n ], 'migrations-role');\n\n // seeds\n $this->publishes([\n $dir . '/../database/seeds/RoleTableSeeder.php.stub' => $seeds_path . 'RoleTableSeeder.php',\n ], 'seeder-role');\n }", "protected function registerConfigurations()\n {\n $this->mergeConfigFrom(\n $this->packagePath('config/config.php'), 'password'\n );\n $this->publishes([\n $this->packagePath('config/config.php') => config_path('password.php'),\n ], 'config');\n }", "protected function registerPublishing(): void\n {\n $this->publishes([\n __DIR__.'/config/permissions_makr.php' => config_path('permissions_makr.php'),\n ]);\n\n $this->publishes([\n __DIR__ . '/database/migrations/' => database_path('migrations')\n ], 'migrations');\n }", "protected function configure()\n {\n $this->publishes([\n __DIR__ . '/../config/laravel-calendar.php' => config_path('laravel-calendar.php'),\n ], 'config');\n\n $this->mergeConfigFrom(\n __DIR__ . '/../config/laravel-calendar.php',\n 'laravel-calender'\n );\n }", "protected function bootPublishedFiles()\n {\n $this->publishes(\n [\n __DIR__ . '/../config/tailwindnotifications.php' => config_path(\n 'tailwindnotifications.php'\n ),\n __DIR__ . '/../views' => resource_path(\n 'views/vendor/tailwindnotifications'\n ),\n ]\n );\n }", "public function publishFiles()\n {\n $this->publishes(\n [ __DIR__ . '/../resources/views' => base_path('themes/avored/default/views/vendor')],\n 'avored-module-views'\n );\n $this->publishes(\n [ __DIR__ . '/../dist/js/front' => base_path('public/js')],\n 'avored-front-js'\n );\n $this->publishes(\n [ __DIR__ . '/../dist/js/admin' => base_path('public/avored-admin/js')],\n 'avored-admin-js'\n );\n\n $this->publishes([\n __DIR__ . '/../database/migrations' => database_path('avored-migrations'),\n ]);\n }", "protected function registerConfigurations()\n {\n $this->mergeConfigFrom($this->packagePath('config/tarpit.php'), 'tarpit');\n $this->publishes([$this->packagePath('config/config.php') => config_path('tarpit.php')], 'tarpit');\n }", "public function publishAllFiles()\n {\n $this->publishes([\n $this->package_path('Controllers') => app_path(config('starter.controller.path')),\n $this->package_path('Data/Models') => app_path(config('starter.model.path')),\n $this->package_path('Templates/init-middleware.php') => app_path('Http/Kernel.php'),\n $this->package_path('config/view.php') => base_path('config/view.php'),\n ]);\n }", "protected function offerPublishing()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__.'/../config/laratrust.php' => config_path('laratrust.php'),\n ], 'laratrust');\n\n $this->publishes([\n __DIR__. '/../config/laratrust_seeder.php' => config_path('laratrust_seeder.php'),\n ], 'laratrust-seeder');\n \n $this->publishes([\n __DIR__. '/../resources/views/panel' => resource_path('views/vendor/laratrust/panel'),\n ], 'laratrust-views');\n }\n }", "private function registerPublishing()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__.'/../config/telescope-error-service-client.php' => config_path('telescope-error-service-client.php'),\n ], 'telescope-error-service-client-config');\n }\n }", "protected function registerPublishing()\n {\n $this->publishes([\n __DIR__ . '/../config/shop.php' => config_path('shop.php')\n ], 'shop-config');\n /* Views File Publish */\n $this->publishes([\n __DIR__ . '/../resources/views' => resource_path('views/vendor/shop'),\n ], 'shop-views');\n /* Migration File Publish */\n $this->publishes([\n __DIR__ . '/../database/migartions' => database_path('migrations')\n ], 'shop-migrations');\n /* Seed File Publish */\n $this->publishes([\n __DIR__ . '/../database/seeds' => database_path('seeds')\n ], 'shop-seeds');\n }", "private function registerPublishing()\n {\n $this->publishes([\n __DIR__ . '/../resources/views' => resource_path('views/vendor/sweetalert')\n ], 'sweetalert-view');\n\n $this->publishes([\n __DIR__ . '/config/sweetalert.php' => config_path('sweetalert.php')\n ], 'sweetalert-config');\n\n $this->publishes([\n __DIR__ . '/../resources/js' => public_path('vendor/sweetalert')\n ], 'sweetalert-asset');\n }", "protected function registerConfigurations()\n {\n $this->mergeConfigFrom(\n $this->packagePath('config/line.php'), 'ferdhika31.linebot'\n );\n $this->publishes([\n $this->packagePath('config/line.php') => config_path('ferdhika31/linebot.php'),\n ], 'config');\n }", "public function writeConfig() {\n $mergedTemplate = $this->mergeTemplate();\n file_put_contents(\"{$this->settings['paths']['hostConfigDir']}/{$this->params['name']}.cfg\", $mergedTemplate);\n file_put_contents(\"{$this->settings['paths']['hostTrackDir']}/{$this->params['type']}.inf\", \"{$this->params['name']}:{$this->params['instanceId']}\" . PHP_EOL, FILE_APPEND);\n $this->logChange();\n }", "protected function registerConfigurations()\n {\n $this->mergeConfigFrom(\n $this->packagePath('config/laravel-deploy-helper.php'), 'laravel-deploy-helper'\n );\n $this->publishes([\n $this->packagePath('config/laravel-deploy-helper.php') => config_path('laravel-deploy-helper.php'),\n ], 'ldh-config');\n }", "protected function publishFiles()\n {\n $this->publishes([\n __DIR__ . '/librerie/sweetalert.css' => base_path('resources/assets/css/sweetalert.css'),\n __DIR__ . '/librerie/sweetalert.js' => base_path('resources/assets/js/sweetalert.js'),\n __DIR__ . '/views/dsalerts.blade.php' => base_path('resources/views/vendor/dsalerts/dsalerts.blade.php'),\n ], 'dsalerts');\n }", "protected function publishResources()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__.'/../config/rbac.php' => config_path('rbac.php'),\n ], 'rbac-config');\n\n $this->publishes([\n __DIR__.'/../database/migrations' => database_path('migrations'),\n ], 'rbac-config');\n\n $this->loadFactoriesFrom(__DIR__.'/../database/factories');\n }\n }", "protected function publishFlashedResources()\n {\n $this->publishes([\n __DIR__ . '/../config/' => config_path()\n ], 'flashed');\n\n $this->publishes([\n __DIR__.'/../resources/views' => resource_path('views/vendor/flashed'),\n ], 'flashed');\n }", "protected function registerConfigPublisher()\n {\n $this->app->singleton('config.publisher', function ($app) {\n $path = $app->make('path.config');\n\n $publisher = new ConfigPublisher($app->make('files'), $path);\n\n $publisher->setPackagePath($app->make('path.base') . '/src');\n\n return $publisher;\n });\n }", "protected function offerPublishing(): void\n {\n if ($this->app->runningInConsole()) {\n $providerName = 'RabbitEventsServiceProvider';\n\n $this->publishes([\n __DIR__ . \"/../stubs/{$providerName}.stub\" => $this->app->path(\"Providers/{$providerName}.php\"),\n ], 'rabbitevents-provider');\n $this->publishes([\n __DIR__ . '/../config/rabbitevents.php' => $this->app->configPath('rabbitevents.php'),\n ], 'rabbitevents-config');\n }\n }", "protected function registerPublishables()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__.'/config/algorand.php' => config_path('algorand.php'),\n ], 'config');\n }\n }", "protected function registerPublishing()\n {\n $this->publishes([\n __DIR__ . '/../config/kustomer.php' => config_path('kustomer.php'),\n ], 'kustomer-config');\n\n $this->publishes([\n __DIR__ . '/../public' => public_path('vendor/kustomer'),\n ], 'kustomer-assets');\n\n $this->publishes([\n __DIR__ . '/../resources/js/components' => resource_path('js/components/Kustomer'),\n ], 'kustomer-vue-component');\n\n $this->publishes([\n __DIR__ . '/../resources/sass' => resource_path('sass'),\n ], 'kustomer-sass-component');\n\n $this->publishes([\n __DIR__ . '/../resources/lang' => resource_path('lang/vendor/kustomer'),\n ], 'kustomer-locales');\n\n $this->publishes(\n [__DIR__ . '/../resources/views' => resource_path('views/vendor/kustomer')],\n 'kustomer-views'\n );\n }", "public function defineAssetPublishing()\n {\n $this->publishes([\n DOCS_PATH . '/public' => public_path('vendor/documentation'),\n ], 'documentation-assets');\n }", "public function publishFiles()\n {\n $this->call('vendor:publish', [\n '--provider' => OxyNovaServiceProvider::class,\n '--tag' => ['config', 'translations', 'views', 'database'],\n ]);\n }", "public function registerDirectories()\n {\n // Publish config files\n $this->publishes(\n [\n // Paths\n $this->getPublishesPath('config'.DIRECTORY_SEPARATOR.'porteiro.php') => config_path('porteiro.php'),\n ],\n ['config', 'sitec', 'sitec-config']\n );\n\n // // Publish porteiro css and js to public directory\n // $this->publishes([\n // $this->getDistPath('porteiro') => public_path('assets/porteiro')\n // ], ['public', 'sitec', 'sitec-public']);\n\n $this->loadViews();\n $this->loadTranslations();\n }", "protected function defineAssetPublishing()\n {\n if (!$this->app['config']->get('laratrust.panel.register')) {\n return;\n }\n\n $this->publishes([\n __DIR__.'/../public' => public_path('vendor/laratrust'),\n ], 'laratrust-assets');\n }", "protected function registerPublishing(): void\n {\n $this->publishes([\n __DIR__.'/../config/url_rewrite.php' => config_path('url_rewrite.php'),\n ], 'nova-url-rewrite-config');\n\n $this->publishes([\n __DIR__.'/../database/migrations' => database_path('migrations'),\n ], 'nova-url-rewrite-migrations');\n\n $this->publishes([\n __DIR__.'/../resources/lang/' => resource_path('lang/vendor/nova_url_rewrite'),\n ], 'nova-url-rewrite-translations');\n }", "public function boot()\r\n {\r\n $this->publishes([\r\n __DIR__ . '/config.php' => config_path('gopay.php'),\r\n ]);\r\n }", "protected function registerPublishing()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__ . '/../../config/knet.php' => $this->app->configPath('knet.php'),\n ], 'knet-config');\n\n $this->publishes([\n __DIR__ . '/../../database/migrations' => $this->app->databasePath('migrations'),\n ], 'knet-migrations');\n\n $this->publishes([\n __DIR__ . '/../../resources/views' => $this->app->resourcePath('views/vendor/knet'),\n ], 'knet-views');\n\n $this->publishes([\n __DIR__ . '/../../public' => public_path('vendor/knet'),\n ], 'knet-assets');\n\n $this->publishes([\n __DIR__ . '/../../stubs/KnetServiceProvider.stub' => app_path('Providers/KnetServiceProvider.php'),\n ], 'knet-provider');\n }\n }", "public function boot()\n {\n $configPath = __DIR__ . '/../config/' . $this->configName . '.php';\n\n $this->publishes([$configPath => config_path($this->configName . '.php')], 'impersonate');\n }", "protected function publishMigrations()\n {\n $this->publishes([\n $this->basePath('Flare/Database/Migrations') => base_path('database/migrations'),\n ]);\n }", "public function boot(): void\n {\n $this->publishes([$this->configPath() => config_path('amfl.php')], 'config');\n }", "protected function registerPublishing()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__.'/../config/twilio-verify.php' => $this->app->configPath('twilio-verify.php'),\n ], 'config');\n\n $this->publishes([\n __DIR__.'/../database/migrations' => $this->app->databasePath('migrations'),\n ], 'migrations');\n\n $this->publishes([\n __DIR__ . '/../resources/lang' => resource_path('lang/vendor/twilio-verify'),\n ], 'translations');\n }\n }", "protected function registerPublishing(): void\n {\n $this->publishes([\n __DIR__.'/../database/migrations' => \\database_path('migrations'),\n ], 'satifest-migrations');\n }", "public function boot()\n {\n $configPath = __DIR__ . '/../config/cmq.php';\n\n if (function_exists('config_path')) {\n $publishPath = config_path('cmq.php');\n } else {\n $publishPath = base_path('config/cmq.php');\n }\n\n $this->publishes([$configPath => $publishPath], 'config');\n }", "public function boot()\n {\n $this->publishes([$this->configLocation => config_path('culpa.php')]);\n }", "protected function prepareResources()\n {\n // Publish config\n $config = realpath(__DIR__.'/../config/config.php');\n\n $this->mergeConfigFrom($config, 'cartalyst.extensions');\n\n $this->publishes([\n $config => config_path('cartalyst.extensions.php'),\n ], 'config');\n }", "public function boot()\n\t{\n\t\t$this->publishes([\n\t\t\t__DIR__ . '/../../config/config.php' => config_path('lock.php')\n\t\t]);\n\t}", "public function boot()\n {\n $this->publishes([\n __DIR__.'/../config/config-file.php' => config_path('config-file.php'),\n ]);\n }", "public function boot()\n {\n $this->publishes(\n [\n //file source => file destination below\n __DIR__ . '/../Config/dlq.php' => config_path('dlq.php'),\n //you can also add more configs here\n ], 'dlq-config'\n );\n }", "public function boot()\n {\n $config = realpath(__DIR__.'/../resources/config/payant.php');\n\n $this->publishes([\n $config => config_path('payant.php')\n ]);\n }", "protected function publishMigrations()\n {\n $this->publishes([\n __DIR__ . '/../migrations/' => database_path('migrations'),\n ], 'migrations');\n }", "public function boot()\n {\n $this->publishes([\n __DIR__ . '/../../config/civic.php' => config_path('civic.php')\n ]);\n }", "public function boot()\n {\n $this->publishes([\n __DIR__ . '/../config/shopify.php' => config_path('shopify.php'),\n ], 'config');\n }", "protected function publishEmailsFiles(): void\n {\n $this->call('vendor:publish', [\n '--tag' => 'migrations',\n '--provider' => \"Nesiasoft\\Core\\Emails\\EmailsServiceProvider\",\n ]);\n\n $this->call('vendor:publish', [\n '--tag' => 'config',\n '--provider' => \"Nesiasoft\\Core\\Emails\\EmailsServiceProvider\",\n ]);\n }", "public function boot() : void\n {\n $this->publishes([\n __DIR__ . '/../../config/euterrorist.php' => config_path('euterrorist.php'),\n ]);\n }", "public function boot()\n {\n $configPath = $this->configPath();\n\n $this->publishes([\n $configPath => config_path('workflow.php')\n ], 'config');\n }", "public function boot()\n {\n $this->publishes([\n __DIR__.'/../poolport-sample.php' => config_path('poolport.php')\n ],'config');\n\n }", "public function boot()\n {\n $this->publishes([\n __DIR__ . \"/../config/config.php\" => config_path(\"instances.php\")\n ]);\n }", "public function boot()\n {\n $this->publishes([\n __DIR__.'/../config/seniorx.php' => config_path('seniorx.php'),\n ]);\n }", "public function boot()\n {\n $this->publishes([\n dirname(__DIR__).'/config/cities.php' => config_path('cities.php'),\n ]);\n }", "public function boot(): void\n {\n $this->publishes([\n __DIR__.'/../../config/aws_sns.php' => config_path('aws_sns.php'),\n ]);\n }", "protected function publishFaxesFiles(): void\n {\n $this->call('vendor:publish', [\n '--tag' => 'migrations',\n '--provider' => \"Nesiasoft\\Core\\Faxes\\FaxesServiceProvider\",\n ]);\n\n $this->call('vendor:publish', [\n '--tag' => 'config',\n '--provider' => \"Nesiasoft\\Core\\Faxes\\FaxesServiceProvider\",\n ]);\n }", "protected function publishApprovalsFiles(): void\n {\n $this->call('vendor:publish', [\n '--tag' => 'migrations',\n '--provider' => \"Nesiasoft\\Core\\Approvals\\ApprovalsServiceProvider\",\n ]);\n\n $this->call('vendor:publish', [\n '--tag' => 'config',\n '--provider' => \"Nesiasoft\\Core\\Approvals\\ApprovalsServiceProvider\",\n ]);\n }", "public function boot()\n {\n $this->publishes([__DIR__ . \"/config/pagseguro.php\" => config_path('pagseguro.php')]);\n }", "public function boot()\n {\n $this->publishes([\n __DIR__ . '/config' => config_path('knowitfirst'),\n ]);\n \n }", "private function copyConfigFile()\n {\n $path = $this->getConfigPath();\n\n // if generatords config already exist\n if ($this->files->exists($path) && $this->option('force') === false) {\n $this->error(\"{$path} already exists! Run 'generate:publish-stubs --force' to override the config file.\");\n die;\n }\n\n File::copy(__DIR__ . '/../config/config.php', $path);\n }", "protected function registerPublishes()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__ . '/../../database/migrations' => database_path('migrations'),\n ], 'migrations');\n }\n }", "protected function exportConfig()\n {\n if ($this->option('interactive')) {\n if (! $this->confirm('Install the package config file?')) {\n return;\n }\n }\n if (file_exists(config_path('laravel-mentor.php')) && ! $this->option('force')) {\n if (! $this->confirm('The Laravel Mentor configuration file already exists. Do you want to replace it?')) {\n return;\n }\n }\n copy(\n $this->packagePath('config/laravel-mentor.php'),\n config_path('laravel-mentor.php')\n );\n\n $this->comment('Configuration Files installed successfully.');\n }", "public function writewebconfig()\n {\n //<add fileExtension=\"supersake\" allowed=\"false\"/>\n }", "public function boot()\n {\n $this->publishes([realpath(__DIR__.'/../config/watchdog.php') => config_path('watchdog.php')]);\n }", "public function boot()\n {\n $this->publishes([\n __DIR__.'/../../config/proximage.php' => config_path('proximage.php'),\n ], 'proximage-config');\n }", "protected function publishDescriptionsFiles(): void\n {\n $this->call('vendor:publish', [\n '--tag' => 'migrations',\n '--provider' => \"Nesiasoft\\Core\\Descriptions\\DescriptionsServiceProvider\",\n ]);\n\n $this->call('vendor:publish', [\n '--tag' => 'config',\n '--provider' => \"Nesiasoft\\Core\\Descriptions\\DescriptionsServiceProvider\",\n ]);\n }", "protected function loadConfiguration()\n {\n $config_path = __DIR__ . '/../../config/tintin.php';\n\n if (!$this->isLumen()) {\n $this->publishes([\n $config_path => config_path('view.php')\n ], 'config');\n }\n\n $this->mergeConfigFrom($config_path, 'view');\n }", "public function boot()\n {\n $this->publishes([\n __DIR__ . '/config/tingtalk_robot.php' => config_path('tingtalk_robot.php')\n ]);\n }", "public function boot()\n {\n $this->publishes([__DIR__.'/../config/kuainiu.php' => config_path('kuainiu.php')]);\n }", "public function boot()\n {\n $this->publishes( [ __DIR__ . '/config/queuemanager.php' => config_path( 'queuemanager.php' ) ] );\n }", "public function writeAndPush()\n {\n $this->gitConfig();\n $this->writeFullConfFile();\n $this->writeUsers();\n if($this->commitConfig()) $this->pushConfig();\n }", "public function boot()\n {\n $this->publishes([\n __DIR__ . '/../config/aws.php' => config_path('aws.php')\n ], 'config');\n }", "public function boot()\n {\n $this->publishes([\n __DIR__.'/config/atomic.php' => config_path('atomic.php'),\n ]);\n }", "public function boot()\n {\n $this->publishes([\n __DIR__.'/config.php' => config_path('uvs.php'),\n ]);\n }", "public function boot()\n {\n $this->publishes([\n __DIR__ . '/../config/sso.php' => config_path('sso.php'),\n ]);\n }", "protected function publishURLsFiles(): void\n {\n $this->call('vendor:publish', [\n '--tag' => 'migrations',\n '--provider' => \"Nesiasoft\\Core\\URLs\\URLsServiceProvider\",\n ]);\n\n $this->call('vendor:publish', [\n '--tag' => 'config',\n '--provider' => \"Nesiasoft\\Core\\URLs\\URLsServiceProvider\",\n ]);\n }" ]
[ "0.82678056", "0.8150707", "0.8066025", "0.80007505", "0.77923054", "0.7743851", "0.75718474", "0.74415666", "0.73615843", "0.72795933", "0.72750515", "0.72675", "0.71052104", "0.7055335", "0.69835", "0.6956444", "0.68562484", "0.681237", "0.6802941", "0.6791647", "0.6775968", "0.67493147", "0.66528916", "0.66301566", "0.66097236", "0.66081184", "0.65979964", "0.6597559", "0.65746665", "0.6517184", "0.64689714", "0.6458563", "0.644564", "0.6421475", "0.64150494", "0.64106673", "0.63986117", "0.6395196", "0.63707364", "0.6337922", "0.6310011", "0.61928236", "0.618732", "0.6156295", "0.61525166", "0.6111814", "0.6101097", "0.60879403", "0.607924", "0.60715765", "0.6056668", "0.5956554", "0.59476966", "0.5915092", "0.5886949", "0.58845615", "0.5882782", "0.5867656", "0.58461183", "0.582357", "0.58196145", "0.5801235", "0.57947904", "0.57936764", "0.5746555", "0.5734643", "0.5730658", "0.5718475", "0.57132083", "0.57096004", "0.5691089", "0.5690851", "0.5682917", "0.56744474", "0.56698143", "0.5649058", "0.5635337", "0.5614365", "0.5613172", "0.5605439", "0.559532", "0.5589351", "0.55667835", "0.55516905", "0.554748", "0.55448896", "0.5541835", "0.55410975", "0.5518377", "0.55149037", "0.55086434", "0.5499765", "0.54956543", "0.5492192", "0.5485175", "0.54839694", "0.547648", "0.547534", "0.5470354", "0.54677373" ]
0.8816268
0
Get the calendar from this event.
Получите календарь из этого события.
public function getCalendar() { return $this->calendar; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCalendar()\r\n {\r\n if (!$this->_calendar && $this->getCalendarId()) {\r\n $this->_calendar = Mage::getModel('google/calendar')->load($this->getCalendarId());\r\n }\r\n\r\n return $this->_calendar;\r\n }", "public function getCalendar()\n {\n return IntlCalendar::fromDateTime($this);\n }", "protected function get_calendar()\n\t{\n\t\treturn $this->calendars['gregorian'];\n\t}", "public function getCalendar()\n {\n $result = new stdClass;\n $all_calendars = $GLOBALS['calendar_manager']->get(Kronolith::ALL_CALENDARS);\n if (!isset($all_calendars[$this->vars->cal]) && !$GLOBALS['conf']['share']['hidden']) {\n $GLOBALS['notification']->push(_(\"You are not allowed to view this calendar.\"), 'horde.error');\n return $result;\n } elseif (!isset($all_calendars[$this->vars->cal])) {\n // Subscribing to a \"hidden\" share, check perms.\n $kronolith_shares = $GLOBALS['injector']->getInstance('Kronolith_Shares');\n $share = $kronolith_shares->getShare($this->vars->cal);\n if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ)) {\n $GLOBALS['notification']->push(_(\"You are not allowed to view this calendar.\"), 'horde.error');\n return $result;\n }\n $calendar = new Kronolith_Calendar_Internal(array('share' => $share));\n } else {\n $calendar = $all_calendars[$this->vars->cal];\n }\n\n $result->calendar = $calendar->toHash();\n return $result;\n }", "public function calendar(): Calendar\n {\n return new Calendar($this);\n }", "public static function Get(){\n static $inst = NULL;\n if( $inst == NULL )\n $inst = new Calendar();\n return( $inst );\n }", "public function getCalendarId()\n {\n return $this->get('CalendarId');\n }", "public function get_calender_data()\n\t{\n\treturn $this->cal['VCALENDAR'];\n\t}", "public function getServiceCalendar()\n {\n $scopes = array('https://www.googleapis.com/auth/calendar');\n $credential = new Google_Auth_AssertionCredentials($this->auth_email, $scopes, $this->p12_key);\n\n $client = new Google_Client();\n $client->setAssertionCredentials($credential);\n if ($client->getAuth()->isAccessTokenExpired()) {\n $client->getAuth()->refreshTokenWithAssertion($credential);\n }\n\n return new Google_Service_Calendar($client);\n }", "public function get_calendar_id() {\n return $this->get_option( 'calendar-id', '' );\n }", "protected function _getRecurEvent()\n {\n return new Calendar_Model_Event(array(\n 'summary' => 'Breakfast',\n 'dtstart' => '2010-05-20 06:00:00',\n 'dtend' => '2010-05-20 06:15:00',\n 'description' => 'Breakfast',\n 'rrule' => 'FREQ=DAILY;INTERVAL=1', \n 'container_id' => $this->_testCalendar->getId(),\n Tinebase_Model_Grants::GRANT_EDIT => true,\n ));\n }", "protected function _getRecurEvent()\n {\n return new Calendar_Model_Event(array(\n 'summary' => 'Breakfast',\n 'dtstart' => '2010-05-20 06:00:00',\n 'dtend' => '2010-05-20 06:15:00',\n 'description' => 'Breakfast',\n 'rrule' => 'FREQ=DAILY;INTERVAL=1', \n 'container_id' => $this->_testCalendar->getId(),\n Tinebase_Model_Grants::GRANT_EDIT => true,\n ));\n }", "public function getCalendarSync()\n {\n return $this->calendarSync;\n }", "public function getCalendarFor($name);", "public function getCalendarId()\r\n {\r\n if (!$this->getData('calendar_id') && $this->_calendar instanceof Mymodules_Google_Model_Calendar) {\r\n return $this->getCalendar()->getId();\r\n }\r\n\r\n return $this->getData('calendar_id');\r\n }", "public static function getCalendarApplication();", "public function getCalendarManager() {\n \tthrow new osid_OperationFailedException('getCalendarManager() is not yet implemented.');\n \t\n \tif (!isset($this->calendarManager)) {\n \t\t$this->calendarManager = $this->impl_getRuntimeManager()->getManager(osid_OSID::CALENDAR(), 'banner_calendar_CalendarManager', '3.0.0');\n \t}\n \t\n \treturn $this->calendarManager;\n }", "private function getCalendarBagFromStore()\n {\n $bag = $this->calendarBag;\n\n return $bag;\n }", "public function getCalle()\n {\n return $this->calle;\n }", "private function getOrCreateCalendarBag()\n {\n $bag = $this->getCalendarBagFromStore();\n if (null === $bag) {\n $newBag = new CalendarBag();\n $nodename = strtolower($newBag->getSemanticNodeType());\n $newBag->setNodename($nodename);\n $this->setCalendarNodes($newBag);\n $bag = $this->getCalendarBagFromStore();\n }\n\n return $bag;\n }", "public function getDiaCalendario(){\n return $this->diaCalendario;\n }", "protected function getCalendarRoot() {\n $request = $this->getRequest();\n $session = $request->getSession();\n if (!$session->has('calendar_id')) {\n $session->set('calendar_id', '1');\n }\n $id_cal = $session->get('calendar_id');\n return $id_cal;\n }", "public static function getInstance() {\n if (!isset(self::$instance)) {\n self::$instance = new CalendarDayManager();\n }\n return self::$instance;\n }", "public function getCalendarPage();", "public function getCalendarUid ()\n {\n return $this->calendar_uid;\n }", "public function getCalendarDescription()\n {\n return $this->get('CalendarDescription');\n }", "public function setCalendarId($id)\n {\n if ($id) {\n $this->calendarId = $id;\n }\n\n return $this;\n }", "public function calendars()\n {\n return $this->hasMany('App\\Models\\Calendar');\n }", "public function getEvent()\n {\n $result = new stdClass;\n\n if (!($kronolith_driver = $this->_getDriver($this->vars->cal)) ||\n !isset($this->vars->id)) {\n return $result;\n }\n\n try {\n $event = $kronolith_driver->getEvent($this->vars->id, $this->vars->date);\n $event->setTimezone(true);\n $result->event = $event->toJson(null, true, $GLOBALS['prefs']->getValue('twentyFour') ? 'H:i' : 'h:i A');\n // If recurring, we need to format the dates of this instance, since\n // Kronolith_Driver#getEvent will return the start/end dates of the\n // original event in the series.\n if ($event->recurs() && $this->vars->rsd) {\n $rs = new Horde_Date($this->vars->rsd);\n $result->event->rsd = $rs->strftime('%x');\n $re = new Horde_Date($this->vars->red);\n $result->event->red = $re->strftime('%x');\n }\n } catch (Horde_Exception_NotFound $e) {\n $GLOBALS['notification']->push(_(\"The requested event was not found.\"), 'horde.error');\n } catch (Exception $e) {\n $GLOBALS['notification']->push($e, 'horde.error');\n }\n\n return $result;\n }", "public function setCalendar(Mymodules_Google_Model_Calendar $calendar)\r\n {\r\n $this->_calendar = $calendar;\r\n\r\n return $this;\r\n }", "public function getCalificacion() {\n return $this->calificacion;\n }", "public function getCalendarSummary()\n {\n return $this->get('CalendarSummary');\n }", "public function getAnioCalendario(){\n return $this->anioCalendario;\n }", "private function createCalendar($method)\n {\n // Create calender.\n $calendar = $this->ics->createCalendar(null, true);\n\n // Set request method.\n $calendar->setMethod(strtoupper($method));\n\n return $calendar;\n }", "private function getCalendar($calendar_obj_list, $cal_id){\n\t\t$main_cal_obj = false;\n\t\tforeach($calendar_obj_list as $cal){\n\t\t\tif($cal->getId() == $cal_id){\n\t\t\t\t$main_cal_obj = $cal;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(!is_object($main_cal_obj) && is_object($calendar_obj_list[0])){\n\t\t\t// they specified an incorrect calendar id\n\t\t\t// just use the first calendar\n\t\t\t$main_cal_obj = $calendar_obj_list[0];\n\t\t}\n\t\treturn $main_cal_obj;\n\t}", "function getHomeCalendar()\n {\n $intYear = (isset($_GET['yearID'])) ? intval($_GET['yearID']) : date('Y', time());\n $intMonth = (isset($_GET['monthID'])) ? intval($_GET['monthID']) : date('m', time());\n $intDay = (isset($_GET['dayID'])) ? intval($_GET['dayID']) : 0;\n return $this->getCalendar($intYear,$intMonth,$intDay);\n }", "public static function initialize_calendar(){\n \n $event_array[] = array();\n $schedules = \\App\\Event::get();\n if(!empty($schedules)){\n foreach($schedules as $schedule){\n $event_array[] = array(\n 'id' => uniqid(),\n 'title' => $schedule->description,\n 'start' => date('Y-m-d', strtotime($schedule->event_date)),\n 'end' => date('Y-m-d', strtotime($schedule->event_date)),\n 'color' => \"lightblue\",\n \"textEscape\"=> 'false' ,\n 'textColor' => 'black',\n );\n }\n return $get_schedule = json_encode($event_array);\n }\n }", "public static function icalendar() {\r\n $ical = \"BEGIN:VCALENDAR\".PHP_EOL;\r\n $ical .= \"VERSION:2.0\".PHP_EOL;\r\n\r\n $show_personal_bak = Calendar_Events::$calsettings->show_personal;\r\n $show_course_bak = Calendar_Events::$calsettings->show_course;\r\n $show_deadline_bak = Calendar_Events::$calsettings->show_deadline;\r\n $show_admin_bak = Calendar_Events::$calsettings->show_admin;\r\n Calendar_Events::set_calendar_settings(1,1,1,1);\r\n Calendar_Events::get_calendar_settings();\r\n $eventlist = Calendar_Events::get_calendar_events();\r\n Calendar_Events::set_calendar_settings($show_personal_bak,$show_course_bak,$show_deadline_bak,$show_admin_bak);\r\n Calendar_Events::get_calendar_settings();\r\n\r\n $events = array();\r\n foreach ($eventlist as $event) {\r\n $ical .= \"BEGIN:VEVENT\".PHP_EOL;\r\n $startdatetime = new DateTime($event->start);\r\n $ical .= \"DTSTART:\".$startdatetime->format(\"Ymd\\THis\").PHP_EOL;\r\n $duration = new DateTime($event->duration);\r\n $ical .= \"DURATION:\".$duration->format(\"\\P\\TH\\Hi\\Ms\\S\").PHP_EOL;\r\n $ical .= \"SUMMARY:[\".strtoupper($event->event_group).\"] \".$event->title.PHP_EOL;\r\n $ical .= \"DESCRIPTION:\".canonicalize_whitespace(strip_tags($event->content)).PHP_EOL;\r\n if ($event->event_group == 'deadline')\r\n {\r\n $ical .= \"BEGIN:VALARM\".PHP_EOL;\r\n $ical .= \"TRIGGER:-PT24H\".PHP_EOL;\r\n $ical .= \"DURATION:PT10H\".PHP_EOL;\r\n $ical .= \"ACTION:DISPLAY\".PHP_EOL;\r\n $ical .= \"DESCRIPTION:DEADLINE REMINDER for \".canonicalize_whitespace(strip_tags($event->title)).PHP_EOL;\r\n $ical .= \"END:VALARM\".PHP_EOL;\r\n }\r\n $ical .= \"END:VEVENT\".PHP_EOL;\r\n }\r\n $ical .= \"END:VCALENDAR\".PHP_EOL;\r\n return $ical;\r\n }", "public static function event() {\n return self::service()->get('events');\n }", "public function getCalendarInCalendarHome(string $principalUri, string $calendarUri): ?ExternalCalendar;", "public function events()\n {\n return $this->hasMany(CalendarEvent::class);\n }", "public function getIdCalendario(){\n return $this->idCalendario;\n }", "function get_calendars() {\n\n\t\t// Get the attached calendars\n\t\t$calendars = wp_get_post_terms( $this->post_id , 'calendar' );\n\t\t$this->calendars = $calendars;\n\t\t\n\t\t// Loop through calendars, checking permissions\n\t\tforeach ( $calendars as $calendar ) {\n\t\t\t\n\t\t\t// Is it a group calendar?\n\t\t\tif ( is_group_calendar( $calendar->term_id ) ) :\n\t\t\t\t$group_id\t= groups_get_id( $calendar->slug );\n\t\t\t\t$can_view \t= groups_is_user_member( get_current_user_id() , $group_id ) ? true : false;\n\t\t\telse :\n\t\t\t\t$can_view = true;\n\t\t\tendif;\n\t\t\t\n\t\t\t// If we find a calendar for which the user is authorized, go ahead and display it\n\t\t\tif( $can_view ) :\n\t\t\t\t$this->calendar = $calendar;\n\t\t\t\t$this->can_view = true;\n\t\t\t\tbreak;\n\t\t\tendif;\n\t\t}\n\n\t\t// If the user is not allowed to view any calendar, redirect them to the group\n\t\tif ( !$can_view ) {\n\t\t\t$redirect = SITEURL . '/groups/' . $this->calendar->slug;\n\t\t\tbp_core_add_message( 'You cannot access events on this calendar.' , 'error' );\n\t\t\tbp_core_redirect( $redirect );\n\t\t}\n\t}", "public function getEvent()\n {\n return $this->getProperty(\"Event\",\n new Event($this->getContext(), new ResourcePath(\"Event\", $this->getResourcePath())));\n }", "public function getCalendarInfo()\n\t{\n\t\t\n\t\t//get URL to calendar page\n\t\t$url = $this->calendarLink;\n\t\t//Get the sourcecode\t\t\t\n\t\t$data = $this->curl->curlGetReq($url);\n\t\t//find all links to each person\n\t\t$query = \"//a\";\n\t\t$aTagNodes = $this->curl-> getDOMData($data,$query);\n\t\t\n\t\t$calendarDates = new CalendarDateRepository();\n\t\t//loop through each link, representing a person\n\t\tforeach ($aTagNodes as $at)\n\t\t{\n\t\t\t//get the href to that persons calendar\n\t\t\t$calURL =$at->getAttribute(\"href\");\n\t\t\t//get the sourcecode of that page\n\t\t\t$data = $this->curl->curlGetReq($url.$calURL);\n\t\t\t//get the table header containing name of the days\n\t\t\t$query = \"//th\";\n\t\t\t$days = $this->curl->getDOMData($data,$query);\n\t\t\t//get the table data containing availability\n\t\t\t$query = \"//td\";\n\t\t\t$availibility = $this->curl->getDOMData($data,$query);\t\t\t\n\n\t\t\t$dates = array();\n\t\t\t/*\n\t\t\t* loop table data, if the availability of that day is ok\n\t\t\t* save that data.\n\t\t\t*/\n\t\t\tfor ($i=0; $i < $days->length ; $i++)\n\t\t\t{ \n\t\t\t\t$availibilityStr =$availibility[$i]->nodeValue;\n\t\n\t\t\t\tif(strtolower($availibilityStr) === \"ok\")\n\t\t\t\t{\t\n\t\t\t\t\t//$calendarDates->add($days[$i]->nodeValue);\n\t\t\t\t\t$dates[] = new Day($days[$i]->nodeValue);\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\t$calendarDates->add($dates);\n\t\t\t\n\t\t }\n\t\t\n\t\treturn $calendarDates; \n\t}", "public function getCalendar() {\n\t\t$this->setDate();\n\t\t$this->getLinks();\n\t\t $this->di->logger->stamp(__CLASS__, __METHOD__, '');\n\n\n\t\t// Get new date array\n\t\t$newDate = getdate(mktime(0,0,0,$this->newMonth, 1, $this->newYear));\n\t\t// Calculate rest days in previous and next month\n\t\t$firstDay = $newDate['wday'];\n\t\t$firstDay = ($firstDay == 0) ? 7: $firstDay;\n\t\t$daysInMonth = cal_days_in_month ( CAL_GREGORIAN , $this->newMonth , $this->newYear );\n\t\tif($this->newMonth != 1){\n\t\t\t$daysInPrevMonth = cal_days_in_month ( CAL_GREGORIAN , $this->newMonth-1 , $this->newYear );\n\t\t}\n\t\telse if($this->newMonth == 1) {\n\t\t\t$daysInPrevMonth = cal_days_in_month ( CAL_GREGORIAN , 12 , $this->newYear-1 );\n\t\t}\n\n\t\t$lastDates = $daysInPrevMonth - $firstDay +1;\n\n\t\t// Start building table\n\t\t$table =\"<section class='calendar'><header>\" . $this->prevLink . \"<h3>\" . $newDate['month'] . \" - \" . $newDate['year'] . \"</h3>\" . $this->nextLink;\n\t\t$table .= \"</header><table><thead>\\n\";\n\t\t$table .= \"<th>Mon</th><th>Tue</th><th>Wed</th><th>Thu</th><th>Fri</th><th>Sat</th><th>Sun</th>\\n\";\n\t\t$table .= \"</thead>\\n\";\n\t\t$table .= \"<tr>\";\n\t\t\n\t\tfor ($a=1; $a < $firstDay ; $a++) { \n\t\t\t$lastDates++;\n\t\t\t$table .= \"<td class='lighter'>\" . $lastDates . \"</td>\";\n\t\t}\n\n\t\t$d = 0;\n\t\tfor ($b=0; $b < $daysInMonth ; $b++) { \n\t\t\t\n\t\t\t$d++;\n\t\t\t$DATE = date('N',mktime(0,0,0, $this->newMonth, $d, $this->newYear));\n\t\t\t\n\t\t\tif ($DATE == 1) {\n\t\t\t\t$table .= \"</tr>\\n<tr>\";\n\t\t\t}\n\n\t\t\tif (($this->newMonth == $this->currentMonth && $d == $this->currentDate && $this->newYear == $this->currentYear)) {\n\t\t\t\t$table .= \"<td><strong>\" . $d . \"</strong></td>\";\n\t\t\t}\n\t\t\telse if ($DATE == 7) {\n\t\t\t\t$table .= \"<td class='red'>\" . $d . \"</td>\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$table .= \"<td>\" . $d . \"</td>\";\n\t\t\t}\n\t\t}\n\t\t\tif ($DATE != 7) {\n\t\t\t\t$nextMonthDays = 7 - $DATE;\n\t\t\t\tfor ($c=1; $c <= $nextMonthDays ; $c++) { \n\t\t\t\t\t$table .= \"<td class='lighter'>\" . $c . \"</td>\";\n\t\t\t}\n\t}\n\t\t$table .= \"</tr></table></section>\";\n\n\t\treturn $table;\n\t}", "public function calendars()\n\t{\n\t\t// -------------------------------------\n\t\t// Load 'em up\n\t\t// -------------------------------------\n\n\t\t$this->load_calendar_datetime();\n\t\t$this->load_calendar_parameters();\n\n\t\t// -------------------------------------\n\t\t// Prep the parameters\n\t\t// -------------------------------------\n\n\t\t$params = array(\n\t\t\tarray(\n\t\t\t\t'name' => 'category',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'site_id',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'min_value' => 1,\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'default' => $this->data->get_site_id()\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'calendar_id',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'min_value' => 1,\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'not' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'calendar_name',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'not' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'status',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'default' => 'open'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'date_range_start',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'date'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'date_range_end',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'date'\n\t\t\t)\n\t\t);\n\n\t\t//ee()->TMPL->log_item('Calendar: Processing parameters');\n\n\t\t$this->add_parameters($params);\n\n\t\t// -------------------------------------\n\t\t// Convert calendar_name to calendar_id\n\t\t// -------------------------------------\n\n\t\tif ($this->P->value('calendar_id') == '' AND\n\t\t\t$this->P->value('calendar_name') != '')\n\t\t{\n\t\t\t$ids = $this->data->get_calendar_id_from_name(\n\t\t\t\t$this->P->value('calendar_name'),\n\t\t\t\tNULL,\n\t\t\t\t$this->P->params['calendar_name']['details']['not']\n\t\t\t);\n\n\t\t\tif ( empty( $ids ) )\n\t\t\t{\n\t\t\t\t//ee()->TMPL->log_item('Calendar: No results for\n\t\t\t\t//calendar name provided, bailing');\n\t\t\t\treturn $this->no_results();\n\t\t\t}\n\n\t\t\t$this->P->set('calendar_id', implode('|', $ids));\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Determine which calendars this user has permission to view\n\t\t// and modify the parameters accordingly.\n\t\t// -------------------------------------\n\n\t\t// TODO\n\n\t\t// -------------------------------------\n\t\t// Fetch the basics\n\t\t// -------------------------------------\n\n\t\t$data = $this->data->fetch_calendars_basics(\n\t\t\t$this->P->value('site_id'),\n\t\t\t$this->P->value('calendar_id'),\n\t\t\t$this->P->params['calendar_id']['details']['not']\n\t\t);\n\n\t\t// -------------------------------------\n\t\t// If no data, then give 'em no_results\n\t\t// -------------------------------------\n\n\t\tif (($total_results = count($data)) == 0)\n\t\t{\n\t\t\t//ee()->TMPL->log_item('Calendar: No results, bailing');\n\t\t\treturn $this->no_results();\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Ensure date_range_start <= date_range_end\n\t\t// -------------------------------------\n\n\t\tif ($this->P->value('date_range_start') !== FALSE AND\n\t\t\t$this->P->value('date_range_end') !== FALSE)\n\t\t{\n\t\t\tif ($this->P->value('date_range_start', 'ymd') > $this->P->value('date_range_end', 'ymd'))\n\t\t\t{\n\t\t\t\t$temp = $this->P->params['date_range_start']['value'];\n\t\t\t\t$this->P->set('date_range_start', $this->P->params['date_range_end']['value']);\n\t\t\t\t$this->P->set('date_range_end', $temp);\n\t\t\t\tunset($temp);\n\t\t\t}\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// This will come in handy later\n\t\t// -------------------------------------\n\n\t\t$calendar_array = array();\n\t\tforeach ($data as $k => $arr)\n\t\t{\n\t\t\t$calendar_array[] = $arr['calendar_id'];\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Date range params? Then we need to do a lot more work.\n\t\t// -------------------------------------\n\n\t\tif ($this->P->value('date_range_start') !== FALSE OR\n\t\t\t$this->P->value('date_range_end') !== FALSE)\n\t\t{\n\t\t\t//ee()->TMPL->log_item('Calendar: Calculating date ranges');\n\t\t\t$min = ($this->P->value('date_range_start') !== FALSE) ?\n\t\t\t\t\t\t$this->P->value('date_range_start', 'ymd') :\n\t\t\t\t\t\t0;\n\n\t\t\t$max = ($this->P->value('date_range_end') !== FALSE) ?\n\t\t\t\t$this->P->value('date_range_end', 'ymd') :\n\t\t\t\t0;\n\n\t\t\t$calendar_array = $this->data->fetch_calendars_with_events_in_date_range(\n\t\t\t\t$min,\n\t\t\t\t$max,\n\t\t\t\t$calendar_array,\n\t\t\t\t$this->P->value('status')\n\t\t\t);\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// No calendars? No results.\n\t\t// -------------------------------------\n\n\t\tif (empty($calendar_array))\n\t\t{\n//ee()->TMPL->log_item('Calendar: No calendars, bailing');\n\t\t\treturn $this->no_results();\n\t\t}\n\n\t\t//\t----------------------------------------\n\t\t//\tInvoke Channel class\n\t\t//\t----------------------------------------\n\n\t\tif ( ! class_exists('Channel') )\n\t\t{\n\t\t\trequire PATH_MOD.'/channel/mod.channel.php';\n\t\t}\n\n\t\t$channel = new Channel();\n\n\t\t//need to remove limit here so huge amounts of events work\n\t\t$channel->limit = 1000000;\n\n\t\t// --------------------------------------------\n\t\t// Invoke Pagination for EE 2.4 and Above\n\t\t// --------------------------------------------\n\n\t\t$channel = $this->add_pag_to_channel($channel);\n\n\t\t// -------------------------------------\n\t\t// Prepare parameters\n\t\t// -------------------------------------\n\n\t\tee()->TMPL->tagparams['entry_id'] = implode('|', $calendar_array);\n\t\tee()->TMPL->tagparams['channel'] = CALENDAR_CALENDARS_CHANNEL_NAME;\n\n\t\t// -------------------------------------\n\t\t// Pre-process related data\n\t\t// -------------------------------------\n\n\t\tif (version_compare($this->ee_version, '2.6.0', '<'))\n\t\t{\n\n\t\t\tee()->TMPL->tagdata = ee()->TMPL->assign_relationship_data(\n\t\t\t\tee()->TMPL->tagdata\n\t\t\t);\n\t\t\tee()->TMPL->var_single = array_merge(\n\t\t\t\tee()->TMPL->var_single,\n\t\t\t\tee()->TMPL->related_markers\n\t\t\t);\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Execute needed methods\n\t\t// -------------------------------------\n\n\t\t$channel->fetch_custom_channel_fields();\n\n\t\t$channel->fetch_custom_member_fields();\n\n\t\t// --------------------------------------------\n\t\t// Pagination Tags Parsed Out\n\t\t// --------------------------------------------\n\n\t\t$this->fetch_pagination_data($channel);\n\n\t\t// -------------------------------------\n\t\t// Querification\n\t\t// -------------------------------------\n\n\t\t$channel->build_sql_query();\n\n\t\tif ($channel->sql == '')\n\t\t{\n\t\t\treturn $this->no_results();\n\t\t}\n\n\t\t$channel->query = ee()->db->query($channel->sql);\n\n\t\tif ($channel->query->num_rows() == 0)\n\t\t{\n//ee()->TMPL->log_item('Calendar: Channel module says no results, bailing');\n\t\t\treturn $this->no_results();\n\t\t}\n\n\t\t$channel->query->result\t= $channel->query->result_array();\n\n\t\t// -------------------------------------------\n\t\t// 'calendar_calendars_channel_query' hook.\n\t\t// - Do something with the channel query\n\n\t\tif (ee()->extensions->active_hook('calendar_calendars_channel_query') === TRUE)\n\t\t{\n\t\t\t$channel->query = ee()->extensions->call('calendar_calendars_channel_query', $channel->query, $calendar_array);\n\t\t\tif (ee()->extensions->end_script === TRUE) return;\n\t\t}\n\t\t//\n\t\t// -------------------------------------------\n\n\t\t// -------------------------------------\n\t\t// Inject Calendar-specific variables\n\t\t// -------------------------------------\n\n\t\t//ee()->TMPL->log_item('Calendar: Adding Calendar variables');\n\n\t\t$aliases = array(\n\t\t\t'title'\t\t\t=> 'calendar_title',\n\t\t\t'url_title'\t\t=> 'calendar_url_title',\n\t\t\t'entry_id'\t\t=> 'calendar_id',\n\t\t\t'author_id'\t\t=> 'calendar_author_id',\n\t\t\t'author'\t\t=> 'calendar_author',\n\t\t\t'status'\t\t=> 'calendar_status'\n\t\t);\n\n\t\t//custom variables with the letters 'url' are borked in\n\t\t//EE 2.6. Bug reported, but this should fix.\n\t\t//https://support.ellislab.com/bugs/detail/19337\n\t\tif (version_compare($this->ee_version, '2.6.0', '>='))\n\t\t{\n\t\t\t$aliases['url_title'] = 'calendar_borked_title';\n\n\t\t\tee()->TMPL->var_single['calendar_borked_title'] = 'calendar_borked_title';\n\n\t\t\tunset(ee()->TMPL->var_single['calendar_url_title']);\n\n\t\t\tee()->TMPL->tagdata = str_replace(\n\t\t\t\tarray(\n\t\t\t\t\tLD . 'calendar_url_title' . RD,\n\t\t\t\t\t'\"calendar_url_title\"',\n\t\t\t\t\t\"'calendar_url_title'\"\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\tLD . 'calendar_borked_title' . RD,\n\t\t\t\t\t'\"calendar_borked_title\"',\n\t\t\t\t\t\"'calendar_borked_title'\"\n\n\t\t\t\t),\n\t\t\t\tee()->TMPL->tagdata\n\t\t\t);\n\t\t}\n\n\t\tforeach ($channel->query->result as $k => $row)\n\t\t{\n\t\t\t$channel->query->result[$k]['author'] = ($row['screen_name'] != '') ?\n\t\t\t\t\t\t\t\t\t\t$row['screen_name'] : $row['username'];\n\n\t\t\tforeach ($aliases as $old => $new)\n\t\t\t{\n\t\t\t\t$channel->query->result[$k][$new] = $channel->query->result[$k][$old];\n\t\t\t}\n\t\t}\n\n\t\t//\t----------------------------------------\n\t\t//\tRedeclare\n\t\t//\t----------------------------------------\n\t\t//\tWe will reassign the $channel->query->result with our\n\t\t//\treordered array of values.\n\t\t//\t----------------------------------------\n\n\t\t$channel->query->result_array = $channel->query->result;\n\n\t\t// --------------------------------------------\n\t\t// Typography\n\t\t// --------------------------------------------\n\n\t\tee()->load->library('typography');\n\t\tee()->typography->initialize();\n\t\tee()->typography->convert_curly = FALSE;\n\n\t\t$channel->fetch_categories();\n\n\t\t// -------------------------------------\n\t\t// Parse\n\t\t// -------------------------------------\n\n\t\t//ee()->TMPL->log_item('Calendar: Parsing, via channel module');\n\n\n\n\t\t$channel->parse_channel_entries();\n\n\t\t// -------------------------------------\n\t\t// Paginate\n\t\t// -------------------------------------\n\n\t\t$channel = $this->add_pagination_data($channel);\n\n\t\t// -------------------------------------\n\t\t// Related entries\n\t\t// -------------------------------------\n\n\t\t//ee()->TMPL->log_item('Calendar: Parsing related entries, via Weblog module');\n\n\t\tif (version_compare($this->ee_version, '2.6.0', '<'))\n\t\t{\n\t\t\tif (count(ee()->TMPL->related_data) > 0 AND\n\t\t\t\tcount($channel->related_entries) > 0)\n\t\t\t{\n\t\t\t\t$channel->parse_related_entries();\n\t\t\t}\n\n\t\t\tif (count(ee()->TMPL->reverse_related_data) > 0 AND\n\t\t\t\tcount($channel->reverse_related_entries) > 0)\n\t\t\t{\n\t\t\t\t$channel->parse_reverse_related_entries();\n\t\t\t}\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Send 'em home\n\t\t// -------------------------------------\n\n\t\t$tagdata = $channel->return_data;\n\n\t\t//ee()->TMPL->log_item('Calendar: Done!');\n\n\t\t//on the off chance someone just wrote the word\n\t\t//'calendar_url_title', we should fix that before\n\t\t//output. (See above calendar_url_title fix)\n\t\tif (version_compare($this->ee_version, '2.6.0', '>='))\n\t\t{\n\t\t\t$tagdata = str_replace(\n\t\t\t\tarray(\n\t\t\t\t\tLD . 'calendar_borked_title' . RD,\n\t\t\t\t\t'\"calendar_borked_title\"',\n\t\t\t\t\t\"'calendar_borked_title'\"\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\tLD . 'calendar_url_title' . RD,\n\t\t\t\t\t'\"calendar_url_title\"',\n\t\t\t\t\t\"'calendar_url_title'\"\n\t\t\t\t),\n\t\t\t\t$tagdata\n\t\t\t);\n\t\t}\n\n\t\treturn $tagdata;\n\n\t}", "public static function get($type) {\n switch ($type) {\n case 'Fundraiser':\n return new Application_Model_CalendarEntryFundraiser();\n break;\n\n case 'Newsletter':\n return new Application_Model_CalendarEntryNewsletter();\n break;\n\n default:\n throw new Zend_Exception('Calendar entry ' . $type . 'does not exists');\n break;\n }\n }", "public function calendar()\n {\n return view('pages.calendar');\n }", "public function calendar()\n {\n return view('calendar');\n }", "public static function get_event($eventid) {\r\n global $uid;\r\n return Database::get()->querySingle(\"SELECT * FROM personal_calendar WHERE id = ?d AND user_id = ?d\", $eventid, $uid);\r\n }", "public function get_calendar_list() {\n $calendars = array();\n $uri = 'https://www.googleapis.com/calendar/v3/users/me/calendarList';\n $params = array(\n 'sslverify' => false,\n 'timeout' => 60,\n 'headers' => array(\n 'Content-Type' => 'application/json',\n 'Authorization' => 'Bearer ' . $this->get_access_token(),\n ),\n );\n\n $response = wp_remote_get( $uri, $params );\n\n if ( !is_wp_error( $response ) && 200 == $response[ 'response' ][ 'code' ] && 'OK' == $response[ 'response' ][ 'message' ] ) {\n $body = json_decode( $response[ 'body' ] );\n $calendars = $body->items;\n\n $this->debug( 'Calendar List retrieved successfully', $body );\n } else {\n $this->error( 'Error while retrieving Calendar List: ', $response );\n }\n\n return $calendars;\n }", "public function getEvent()\n {\n return isset($this->event) ? $this->event : null;\n }", "public function getCalendarTimezone()\n {\n return $this->get('CalendarTimezone');\n }", "public function getEvent()\n {\n return $this->event;\n }", "public function getEvent()\n {\n return $this->event;\n }", "public function getEvent()\n {\n return $this->event;\n }", "private function get_current_agenda(): AgendaInterface\n {\n return array_key_exists($this->agenda_index, $this->agendas)\n ? $this->agendas[$this->agenda_index]\n : $this->agendas[] = new Weekly();\n }", "public function getEvent()\n {\n return $this->getData('event');\n }", "public function getEventsCreatedHere()\n {\n $options = array(\n 'calendar' => $this->shortname,\n 'created_only' => true\n );\n\n # create new events class. On constructor it will get the stuff\n $events = new Events($options);\n return $events;\n }", "protected function getEvent()\n {\n if (null === $this->event) {\n $this->event = $event = new EntityEvent;\n\n $event->setTarget($this);\n }\n\n return $this->event;\n }", "public function getEvent()\n {\n $event = array(\n \"eid\" => $this->eid,\n \"name\" => $this->name,\n \"venue\" => $this->venue,\n \"date\" => $this->date,\n \"time\" => $this->time,\n \"type\" => $this->type,\n \"status\" => $this->status\n );\n return $event;\n }", "public function get_all_data()\n\t{\n\treturn $this->cal;\n\t}", "private function _get_calendar_array()\n\t{\n\t $this->all_events = $this->result->xpath(\".//event\");\n\t \n\t foreach($this->all_events as $an_event):\n\t $start_at = $an_event->xpath(\"./start-at\");\n \t $start_at = $start_at[0];\n \t $end_at = $an_event->xpath(\"./end-at\");\n \t $end_at = $end_at[0];\n \t \n \t $start_at = new DateTime($start_at);\n \t $start_at->setTimezone(new DateTimeZone('America/Chicago'));\n \t $start_at->setTime(0, 0, 0);\n \t $end_at = new DateTime($end_at);\n \t $end_at->setTimezone(new DateTimeZone('America/Chicago'));\n \t $end_at->setTime(0, 0, 0);\n \t \n \t $start_timestamp = strtotime($start_at->format('Y-m-d'));\n $end_timestamp = strtotime($end_at->format('Y-m-d'));\n \n $start_year = date(\"Y\", $start_timestamp);\n $end_year = date(\"Y\", $end_timestamp);\n $start_month = date(\"m\", $start_timestamp);\n $end_month = date(\"m\", $end_timestamp);\n $start_day = date(\"d\", $start_timestamp);\n $start_day = $start_day + 1;\n $end_day = date(\"d\", $end_timestamp);\n $end_day = $end_day + 1;\n \n if(($start_year == $this->year && $start_month == $this->month) || ($end_year == $this->year && $end_month == $this->month)):\n if($start_year == $end_year):\n if($start_month == $end_month):\n $this->_calendar_array_one($start_day, $end_day);\n else:\n if($end_month != $this->month):\n $this->_calendar_array_two($start_day);\n else:\n $this->_calendar_array_three($end_day);\n endif;\n endif;\n endif;\n endif;\n endforeach;\n \n\t foreach($this->callinks as $callinks):\n\t foreach($callinks as $key => $value):\n\t $this->combined_callinks[\"$key\"] = $value;\n\t endforeach;\n\t endforeach;\n\t}", "public function getEvent()\r\n {\r\n return $this->Event;\r\n }", "public function getEvent() {\n return $this->event;\n }", "public function getEventManager()\n {\n return $this->events;\n }", "protected function getCalendarView()\n {\n return !empty($_GET['calview']) ? $_GET['calview'] : 'fullcalendar';\n }", "protected function get_calendar_data(){\r\n global $user;\r\n \r\n \r\n if (Go_to::is_on_page(\"edit_room\")){\r\n $this->room_name = $_GET['room'];\r\n $this->owner = $user->username();\r\n $this->facility_name = $_SESSION['active_fac'] ;\r\n// $this->room = $user->username()\";\r\n// var_dump($_SESSION);\r\n// var_dump($this);\r\n }\r\n \r\n \r\n \r\n\r\n }", "public function getCurrentEvent(): CalendarEventsModel|null\n {\n $item = Input::get('auto_item');\n\n if (empty($item)) {\n return null;\n }\n\n return CalendarEventsModel::findByIdOrAlias($item);\n }", "public function getCalendarPeriod()\n {\n return $this->readOneof(8);\n }", "public function getCalendarTimerFactory()\n {\n return $this->calendarTimerFactory;\n }", "public function icalendar()\n\t{\n\t\t$s = 'EJURI3ia8aj#912IKa';\n\t\t$r = '#';\n\t\t$e = 'aAEah38a;a33';\n\n\t\t// -------------------------------------\n\t\t// Some dummy tagdata we'll hand off to events()\n\t\t// -------------------------------------\n\n\t\t$vars = array(\n\t\t\t'event_title'\t\t\t\t\t=> 'title',\n\t\t\t'event_id'\t\t\t\t\t\t=> 'id',\n\t\t\t'event_summary'\t\t\t\t\t=> 'summary',\n\t\t\t'event_location'\t\t\t\t=> 'location',\n\t\t\t'event_start_date format=\"%Y\"'\t=> 'start_year',\n\t\t\t'event_start_date format=\"%m\"'\t=> 'start_month',\n\t\t\t'event_start_date format=\"%d\"'\t=> 'start_day',\n\t\t\t'event_start_date format=\"%H\"'\t=> 'start_hour',\n\t\t\t'event_start_date format=\"%i\"'\t=> 'start_minute',\n\t\t\t'event_end_date format=\"%Y\"'\t=> 'end_year',\n\t\t\t'event_end_date format=\"%m\"'\t=> 'end_month',\n\t\t\t'event_end_date format=\"%d\"'\t=> 'end_day',\n\t\t\t'event_end_date format=\"%H\"'\t=> 'end_hour',\n\t\t\t'event_end_date format=\"%i\"'\t=> 'end_minute',\n\t\t\t'event_calendar_tz_offset'\t\t=> 'tz_offset',\n\t\t\t'event_calendar_timezone'\t\t=> 'timezone'\n\t\t);\n\n\t\t$rvars = array(\n\t\t\t'rule_type',\n\t\t\t'rule_start_date',\n\t\t\t'rule_repeat_years',\n\t\t\t'rule_repeat_months',\n\t\t\t'rule_repeat_days',\n\t\t\t'rule_repeat_weeks',\n\t\t\t'rule_days_of_week',\n\t\t\t'rule_relative_dow',\n\t\t\t'rule_days_of_month',\n\t\t\t'rule_months_of_year',\n\t\t\t'rule_stop_by',\n\t\t\t'rule_stop_after'\n\t\t);\n\n\t\t$evars = array(\n\t\t\t'exception_start_date format=\"%Y%m%dT%H%i00\"'\n\t\t);\n\n\t\t$ovars = array(\n\t\t\t'occurrence_start_date format=\"%Y%m%dT%H%i00\"',\n\t\t\t'occurrence_end_date format=\"%Y%m%dT%H%i00\"'\n\t\t);\n\n\t\t//ee()->TMPL->log_item('Calendar: Preparing tagdata');\n\n\t\t$summary_field = ee()->TMPL->fetch_param('summary_field', 'event_title');\n\n\t\tee()->TMPL->tagdata =\timplode($s, array(\n\t\t\tLD . $summary_field . RD,\n\t\t\tLD . 'event_id' . RD,\n\t\t\tLD . 'if event_summary' . RD .\n\t\t\t\tLD . 'event_summary' . RD .\n\t\t\t\tLD . '/if' . RD,\n\t\t\tLD . 'if event_location' . RD .\n\t\t\t\tLD . 'event_location' . RD .\n\t\t\t\tLD . '/if' . RD,\n\t\t\tLD . 'event_start_date format=\"%Y\"' . RD,\n\t\t\tLD . 'event_start_date format=\"%m\"' . RD,\n\t\t\tLD . 'event_start_date format=\"%d\"' . RD,\n\t\t\tLD . 'event_start_date format=\"%H\"' . RD,\n\t\t\tLD . 'event_start_date format=\"%i\"' . RD,\n\t\t\tLD . 'event_end_date format=\"%Y\"' . RD,\n\t\t\tLD . 'event_end_date format=\"%m\"' . RD,\n\t\t\tLD . 'event_end_date format=\"%d\"' . RD,\n\t\t\tLD . 'event_end_date format=\"%H\"' . RD,\n\t\t\tLD . 'event_end_date format=\"%i\"' . RD,\n\t\t\tLD . 'event_calendar_tz_offset' . RD,\n\t\t\tLD . 'event_calendar_timezone' . RD,\n\t\t\t'RULES' .\n\t\t\t\tLD . 'if event_has_rules' . RD .\n\t\t\t\tLD . 'rules' . RD .\n\t\t\t\tLD . implode(RD . $r . LD, $rvars) . RD . '|' .\n\t\t\t\tLD . T_SLASH . 'rules' . RD .\n\t\t\t\tLD . '/if' . RD,\n\t\t\t'OCCURRENCES'.\n\t\t\t\tLD . 'if event_has_occurrences' . RD .\n\t\t\t\tLD . 'occurrences' . RD .\n\t\t\t\tLD . implode(RD . $r . LD, $ovars) . RD . '|' .\n\t\t\t\tLD . T_SLASH . 'occurrences' . RD .\n\t\t\t\tLD . '/if' . RD,\n\t\t\t'EXCEPTIONS'.\n\t\t\t\tLD . 'if event_has_exceptions' . RD .\n\t\t\t\tLD . 'exceptions' . RD .\n\t\t\t\tLD . implode(RD . $r . LD, $evars) . RD . '|' .\n\t\t\t\tLD . T_SLASH . 'exceptions' . RD .\n\t\t\t\tLD . '/if' . RD,\n\t\t\t$e\n\t\t));\n\n\t\t$tvars \t\t\t\t\t= ee()->functions->assign_variables(\n\t\t\tee()->TMPL->tagdata\n\t\t);\n\t\tee()->TMPL->var_single \t= $tvars['var_single'];\n\t\tee()->TMPL->var_pair \t= $tvars['var_pair'];\n\t\tee()->TMPL->tagdata \t= ee()->functions->prep_conditionals(\n\t\t\tee()->TMPL->tagdata,\n\t\t\tarray_keys($vars)\n\t\t);\n\n\t\t// -------------------------------------\n\t\t// Fire up events()\n\t\t// -------------------------------------\n\n\t\t//ee()->TMPL->log_item('Calendar: Firing up Events()');\n\n\t\t$tagdata = ee()->TMPL->advanced_conditionals($this->events());\n\n\t\t// -------------------------------------\n\t\t// Collect the events\n\t\t// -------------------------------------\n\n\t\t//ee()->TMPL->log_item('Calendar: Collecting events');\n\n\t\t$events = explode($e, $tagdata);\n\n\t\t// -------------------------------------\n\t\t// Fire up iCalCreator\n\t\t// -------------------------------------\n\n\t\t//ee()->TMPL->log_item('Calendar: Starting iCalCreator');\n\n\t\tif ( ! class_exists('vcalendar'))\n\t\t{\n\t\t\trequire_once 'libraries/icalcreator/iCalcreator.class.php';\n\t\t}\n\n\t\t$ICAL = new vcalendar();\n\n\t\t//we are setting this manually because we need individual ones for each event for this to work\n\t\t//$ICAL->setConfig('unique_id', parse_url(ee()->config->item('site_url'), PHP_URL_HOST));\n\t\t$host = parse_url(ee()->config->item('site_url'), PHP_URL_HOST);\n\n\n\t\t$vars = array_values($vars);\n\n\t\t//ee()->TMPL->log_item('Calendar: Iterating through the events');\n\n\t\tforeach ($events as $key => $event)\n\t\t{\n\t\t\tif (trim($event) == '') continue;\n\n\t\t\t$E \t\t\t\t= new vevent();\n\n\t\t\t$event \t\t\t= explode($s, $event);\n\t\t\t$rules \t\t\t= '';\n\t\t\t$occurrences \t= '';\n\t\t\t$exceptions \t= '';\n\n\t\t\tforeach ($event as $k => $v)\n\t\t\t{\n\t\t\t\tif (isset($vars[$k]))\n\t\t\t\t{\n\t\t\t\t\t//--------------------------------------------\n\t\t\t\t\t//\tMakes the local vars from above, if available:\n\t\t\t\t\t// \t$title, $summary, $location,\n\t\t\t\t\t// $start_year, $start_month, $start_day,\n\t\t\t\t\t// $start_hour, $start_minute, $end_year,\n\t\t\t\t\t// $end_month, $end_day, $end_hour,\n\t\t\t\t\t// \t$end_minute, $tz_offset, $timezone\n\t\t\t\t\t//--------------------------------------------\n\n\t\t\t\t\t$$vars[$k] = $v;\n\t\t\t\t}\n\t\t\t\telseif (substr($v, 0, 5) == 'RULES')\n\t\t\t\t{\n\t\t\t\t\t$rules = substr($v, 5);\n\t\t\t\t}\n\t\t\t\telseif (substr($v, 0, 11) == 'OCCURRENCES')\n\t\t\t\t{\n\t\t\t\t\t$occurrences = substr($v, 11);\n\t\t\t\t}\n\t\t\t\telseif (substr($v, 0, 10) == 'EXCEPTIONS')\n\t\t\t\t{\n\t\t\t\t\t$exceptions = substr($v, 10);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// -------------------------------------\n\t\t\t// Set the timezone for this calendar based on the first event's info\n\t\t\t// -------------------------------------\n\n\t\t\tif ($key == 0)\n\t\t\t{\n\t\t\t\t// -------------------------------------\n\t\t\t\t// Convert calendar_name to calendar_id\n\t\t\t\t// -------------------------------------\n\n\t\t\t\tif ($this->P->value('calendar_id') == '' AND\n\t\t\t\t\t$this->P->value('calendar_name') != '')\n\t\t\t\t{\n\t\t\t\t\t$ids = $this->data->get_calendar_id_from_name(\n\t\t\t\t\t\t$this->P->value('calendar_name'),\n\t\t\t\t\t\tNULL,\n\t\t\t\t\t\t$this->P->params['calendar_name']['details']['not']\n\t\t\t\t\t);\n\n\t\t\t\t\t$this->P->set('calendar_id', implode('|', $ids));\n\t\t\t\t}\n\n\t\t\t\t//--------------------------------------------\n\t\t\t\t//\tlets try to get the timezone from the\n\t\t\t\t//\tpassed calendar ID if there is one\n\t\t\t\t//--------------------------------------------\n\n\t\t\t\t$cal_timezone \t= FALSE;\n\t\t\t\t$cal_tz_offset \t= FALSE;\n\n\t\t\t\tif ($this->P->value('calendar_id') != '')\n\t\t\t\t{\n\t\t\t\t\t$sql = \"SELECT \ttz_offset, timezone\n\t\t\t\t\t\t\tFROM\texp_calendar_calendars\n\t\t\t\t\t\t\tWHERE \tcalendar_id\n\t\t\t\t\t\t\tIN \t\t(\" . ee()->db->escape_str(\n\t\t\t\t\t\t\t\t\t\t\timplode(',',\n\t\t\t\t\t\t\t\t\t\t\t\texplode('|',\n\t\t\t\t\t\t\t\t\t\t\t\t\t$this->P->value('calendar_id')\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t) .\n\t\t\t\t\t\t\t\t\t\")\n\t\t\t\t\t\t\tLIMIT\t1\";\n\n\t\t\t\t\t$cal_tz_query = ee()->db->query($sql);\n\n\t\t\t\t\tif ($cal_tz_query->num_rows() > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$cal_timezone \t= $cal_tz_query->row('timezone');\n\t\t\t\t\t\t$cal_tz_offset \t= $cal_tz_query->row('tz_offset');\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t//last resort, we get it from the current event\n\n\t\t\t\t$T = new vtimezone();\n\t\t\t\t$T->setProperty('tzid', ($cal_timezone ? $cal_timezone : $timezone));\n\t\t\t\t$T->setProperty('tzoffsetfrom', '+0000');\n\n\t\t\t\t$tzoffsetto = ($cal_tz_offset ? $cal_tz_offset : $tz_offset);\n\n\t\t\t\tif ($tzoffsetto === '0000')\n\t\t\t\t{\n\t\t\t\t\t$tzoffsetto = '+0000';\n\t\t\t\t}\n\n\t\t\t\t$T->setProperty('tzoffsetto', $tzoffsetto);\n\t\t\t\t$ICAL->setComponent($T);\n\t\t\t}\n\n\t\t\t$title\t\t\t= strip_tags($title);\n\t\t\t$description\t= strip_tags(trim($summary));\n\t\t\t$location\t\t= strip_tags(trim($location));\n\n\t\t\t// -------------------------------------\n\t\t\t// Occurrences?\n\t\t\t// -------------------------------------\n\n\t\t\t$occurrences\t= explode('|', rtrim($occurrences, '|'));\n\t\t\t$odata\t\t\t= array();\n\n\t\t\tforeach ($occurrences as $k => $occ)\n\t\t\t{\n\t\t\t\t$occ = trim($occ);\n\t\t\t\tif ($occ == '') continue;\n\n\t\t\t\t$occ = explode($r, $occ);\n\t\t\t\t$odata[$k][] = $occ[0];\n\t\t\t\t$odata[$k][] = $occ[1];\n\t\t\t}\n\n\t\t\t// -------------------------------------\n\t\t\t// Exceptions?\n\t\t\t// -------------------------------------\n\n\t\t\t$exceptions\t= explode('|', rtrim($exceptions, '|'));\n\t\t\t$exdata\t\t= array();\n\n\t\t\tforeach ($exceptions as $k => $exc)\n\t\t\t{\n\t\t\t\t$exc = trim($exc);\n\n\t\t\t\tif ($exc == '') continue;\n\n\t\t\t\t$exdata[] = $exc;\n\t\t\t}\n\n\t\t\t// -------------------------------------\n\t\t\t// Rules?\n\t\t\t// -------------------------------------\n\n\t\t\t$add_rules \t= FALSE;\n\t\t\t$erules \t= array();\n\t\t\t$rules \t\t= explode('|', rtrim($rules, '|'));\n\n\t\t\tforeach ($rules as $rule)\n\t\t\t{\n\t\t\t\t$temp = explode($r, $rule);\n\t\t\t\t$rule = array();\n\n\t\t\t\tforeach ($temp as $k => $v)\n\t\t\t\t{\n\t\t\t\t\tif ($v != FALSE) $add_rules = TRUE;\n\t\t\t\t\t$rule[substr($rvars[$k], 5)] = $v;\n\t\t\t\t}\n\n\t\t\t\tif ($add_rules === TRUE)\n\t\t\t\t{\n\t\t\t\t\t$temp = array();\n\n\t\t\t\t\tif ($rule['repeat_years'] > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$temp['FREQ'] = 'YEARLY';\n\n\t\t\t\t\t\tif ($rule['repeat_years'] > 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$temp['INTERVAL'] = $rule['repeat_years'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telseif ($rule['repeat_months'] > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$temp['FREQ'] = 'MONTHLY';\n\n\t\t\t\t\t\tif ($rule['repeat_months'] > 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$temp['INTERVAL'] = $rule['repeat_months'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telseif ($rule['repeat_weeks'] > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$temp['FREQ'] = 'WEEKLY';\n\n\t\t\t\t\t\tif ($rule['repeat_weeks'] > 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$temp['INTERVAL'] = $rule['repeat_weeks'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telseif ($rule['repeat_days'] > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$temp['FREQ'] = 'DAILY';\n\n\t\t\t\t\t\tif ($rule['repeat_days'] > 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$temp['INTERVAL'] = $rule['repeat_days'];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($rule['months_of_year'] > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t//this flips keys to make 'c' => 12, etc\n\t\t\t\t\t\t$m = array_flip(array(\n\t\t\t\t\t\t\t1, 2, 3, 4, 5, 6, 7, 8, 9, 'A', 'B', 'C'\n\t\t\t\t\t\t));\n\n\t\t\t\t\t\tif (strlen($rule['months_of_year'] > 1))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$months = str_split($rule['months_of_year']);\n\t\t\t\t\t\t\tforeach ($months as $month)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$temp['BYMONTH'][] = $m[$month] + 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$temp['BYMONTH'] = $m[$month] + 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($rule['days_of_month'] > '')\n\t\t\t\t\t{\n\t\t\t\t\t\t//this flips keys to make 'v' => 30, etc\n\t\t\t\t\t\t$d = array_flip(array(\n\t\t\t\t\t\t\t1, 2, 3, 4, 5, 6, 7, 8, 9,\n\t\t\t\t\t\t\t'A', 'B', 'C', 'D', 'E', 'F',\n\t\t\t\t\t\t\t'G', 'H', 'I', 'J', 'K', 'L',\n\t\t\t\t\t\t\t'M', 'N', 'O', 'P', 'Q', 'R',\n\t\t\t\t\t\t\t'S', 'T', 'U', 'V'\n\t\t\t\t\t\t));\n\n\t\t\t\t\t\tif (strlen($rule['days_of_month']) > 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$days = str_split($rule['days_of_month']);\n\t\t\t\t\t\t\tforeach ($days as $day)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$temp['BYMONTHDAY'][] = $d[$day] + 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$temp['BYMONTHDAY'] = $d[$rule['days_of_month']] + 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($rule['days_of_week'] != '' OR $rule['days_of_week'] > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$d \t\t\t= array('SU','MO','TU','WE','TH','FR','SA');\n\t\t\t\t\t\t$d_letter \t= array('U','M','T','W','R','F','S');\n\n\t\t\t\t\t\t$dows \t\t= str_split($rule['days_of_week']);\n\n\t\t\t\t\t\tif ($rule['relative_dow'] > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$rels = str_split($rule['relative_dow']);\n\t\t\t\t\t\t\tforeach ($dows as $dow)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tforeach ($rels as $rel)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif ($rel == 6) $rel = -1;\n\t\t\t\t\t\t\t\t\t$temp['BYDAY'][] = $rel.$d[array_search($dow, $d_letter)];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach ($dows as $dow)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$temp['BYDAY'][] = $d[array_search($dow, $d_letter)];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ($rule['stop_after'] > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$temp['COUNT'] = $rule['stop_after'];\n\t\t\t\t\t}\n\t\t\t\t\telseif ($rule['stop_by'] > 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO: Add time\n\t\t\t\t\t\t// TODO: The \"+1\" below is because the ical standard treats\n\t\t\t\t\t\t// \tUNTIL as \"less than\", not \"less than or equal to\" (which\n\t\t\t\t\t\t// \tis how Calendar treats stop_by). Double check that a simple\n\t\t\t\t\t\t// \t\"+1\" accurately addresses this difference.\n\t\t\t\t\t\t$temp['UNTIL'] = $rule['stop_by'] + 1;\n\t\t\t\t\t}\n\n\t\t\t\t\t$erules[] = $temp;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// -------------------------------------\n\t\t\t// Put it together\n\t\t\t// -------------------------------------\n\n\t\t\t//if this is all day we need to add the dates as params to the dstart and end items\n\t\t\tif ($this->_is_all_day($start_hour, $start_minute, $end_hour, $end_minute))\n\t\t\t{\n\t\t\t\t$E->setProperty(\n\t\t\t\t\t\"dtstart\" ,\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'year' \t=> $start_year,\n\t\t\t\t\t\t'month' => $start_month,\n\t\t\t\t\t\t'day'\t=> $start_day\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'VALUE' => 'DATE'\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t//--------------------------------------------\n\t\t\t\t//\twe need CDT so we can add a day\n\t\t\t\t//\tgcal, and ical are ok with this being the same day\n\t\t\t\t//\tstupid damned outlook barfs, hence the +1\n\t\t\t\t//\tthe +1 doesnt affect g/ical\n\t\t\t\t//--------------------------------------------\n\n\t\t\t\tif ( ! isset($this->CDT) OR ! is_object($this->CDT) )\n\t\t\t\t{\n\t\t\t\t\t$this->load_calendar_datetime();\n\t\t\t\t}\n\n\t\t\t\t$this->CDT->change_date(\n\t\t\t\t\t$end_year,\n\t\t\t\t\t$end_month,\n\t\t\t\t\t$end_day\n\t\t\t\t);\n\n\t\t\t\t$this->CDT->add_day();\n\n\t\t\t\t$E->setProperty(\n\t\t\t\t\t\"dtend\" ,\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'year' \t=> $this->CDT->year,\n\t\t\t\t\t\t'month' => $this->CDT->month,\n\t\t\t\t\t\t'day'\t=> $this->CDT->day\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'VALUE' => 'DATE'\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$E->setProperty('dtstart', $start_year, $start_month, $start_day, $start_hour, $start_minute, 00);\n\t\t\t\t$E->setProperty('dtend', $end_year, $end_month, $end_day, $end_hour, $end_minute, 00);\n\t\t\t}\n\n\t\t\t$E->setProperty('summary', $title);\n\n\t\t\tif ( ! empty($erules))\n\t\t\t{\n\t\t\t\tforeach ($erules as $rule)\n\t\t\t\t{\n\t\t\t\t\t$E->setProperty('rrule', $rule);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$extras = array();\n\t\t\t$edits\t= array();\n\n\t\t\tif ( ! empty($odata))\n\t\t\t{\n\t\t\t\t$query = ee()->db->query(\n\t\t\t\t\t\"SELECT *\n\t\t\t\t\t FROM\texp_calendar_events_occurrences\n\t\t\t\t\t WHERE\tevent_id = \" . ee()->db->escape_str($id)\n\t\t\t\t);\n\n\t\t\t\tforeach ($query->result_array() as $row)\n\t\t\t\t{\n\t\t\t\t\t//fix blank times\n\t\t\t\t\t$row['start_time'] \t= ($row['start_time'] == 0) ? '0000' \t: $row['start_time'];\n\t\t\t\t\t$row['end_time'] \t= ($row['end_time'] == 0) ? '2400' \t\t: $row['end_time'];\n\n\t\t\t\t\t//looks like an edited occurrence\n\t\t\t\t\t//edits without rules arent really edits.\n\t\t\t\t\tif ($row['event_id'] != $row['entry_id'] AND empty($rules))\n\t\t\t\t\t{\n\t\t\t\t\t\t$edits[] = $row;\n\t\t\t\t\t}\n\t\t\t\t\t//probably entered with the date picker or something\n\t\t\t\t\t//these loose occurences\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$extras[] = $row;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( ! empty($exdata))\n\t\t\t{\n\t\t\t\t$E->setProperty('exdate', $exdata);\n\t\t\t}\n\n\t\t\tif ($description != '') $E->setProperty('description', $description);\n\t\t\tif ($location != '') $E->setProperty('location', $location);\n\n\n\t\t\t$E->setProperty( \"uid\", $this->make_uid() . '@' . $host);\n\t\t\t$ICAL->setComponent($E);\n\n\t\t\t//--------------------------------------------\n\t\t\t//\tremove rules for subsequent items\n\t\t\t//--------------------------------------------\n\n\t\t\twhile( $E->deleteProperty( \"RRULE\" )) continue;\n\n\t\t\t//edits must come right after\n\t\t\tif ( ! empty($edits))\n\t\t\t{\n\t\t\t\tforeach ($edits as $edit)\n\t\t\t\t{\n\t\t\t\t\t$edit_date = array(\n\t\t\t\t\t\t\"year\" \t=> $edit['start_year'],\n\t\t\t\t\t\t\"month\" => $edit['start_month'],\n\t\t\t\t\t\t\"day\" \t=> $edit['start_day'] ,\n\t\t\t\t\t\t\"hour\" \t=> substr($edit['start_time'], 0, 2) ,\n\t\t\t\t\t\t\"min\" \t=> substr($edit['start_time'], 2, 2)\n\t\t\t\t\t);\n\n\t\t\t\t\t//if this is all day we need to add the dates as params to the dstart and end items\n\t\t\t\t\tif ($this->_is_all_day(\n\t\t\t\t\t\tsubstr($edit['start_time'], 0, 2),\n\t\t\t\t\t\tsubstr($edit['start_time'], 2, 2),\n\t\t\t\t\t\tsubstr($edit['end_time'], 0, 2),\n\t\t\t\t\t\tsubstr($edit['end_time'], 2, 2)\n\t\t\t\t\t ))\n\t\t\t\t\t{\n\t\t\t\t\t\t$E->setProperty(\n\t\t\t\t\t\t\t\"dtstart\" ,\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'year' \t=> $edit['start_year'],\n\t\t\t\t\t\t\t\t'month' => $edit['start_month'],\n\t\t\t\t\t\t\t\t'day'\t=> $edit['start_day']\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'VALUE' => 'DATE'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t//--------------------------------------------\n\t\t\t\t\t\t//\twe need CDT so we can add a day\n\t\t\t\t\t\t//\tgcal, and ical are ok with this being the same day\n\t\t\t\t\t\t//\tstupid damned outlook barfs, hence the +1\n\t\t\t\t\t\t//\tthe +1 doesnt affect g/ical\n\t\t\t\t\t\t//--------------------------------------------\n\n\t\t\t\t\t\tif ( ! isset($this->CDT) OR ! is_object($this->CDT) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->load_calendar_datetime();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$this->CDT->change_date(\n\t\t\t\t\t\t\t$edit['end_year'],\n\t\t\t\t\t\t\t$edit['end_month'],\n\t\t\t\t\t\t\t$edit['end_day']\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t$this->CDT->add_day();\n\n\t\t\t\t\t\t$E->setProperty(\n\t\t\t\t\t\t\t\"dtend\" ,\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'year' \t=> $this->CDT->year,\n\t\t\t\t\t\t\t\t'month' => $this->CDT->month,\n\t\t\t\t\t\t\t\t'day'\t=> $this->CDT->day\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'VALUE' => 'DATE'\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\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$E->setProperty(\n\t\t\t\t\t\t\t'dtstart',\n\t\t\t\t\t\t\t$edit_date['year'],\n\t\t\t\t\t\t\t$edit_date['month'],\n\t\t\t\t\t\t\t$edit_date['day'],\n\t\t\t\t\t\t\t$edit_date['hour'],\n\t\t\t\t\t\t\t$edit_date['min'],\n\t\t\t\t\t\t\t00\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t$E->setProperty(\n\t\t\t\t\t\t\t'dtend',\n\t\t\t\t\t\t\t$edit['end_year'],\n\t\t\t\t\t\t\t$edit['end_month'],\n\t\t\t\t\t\t\t$edit['end_day'] ,\n\t\t\t\t\t\t\tsubstr($edit['end_time'], 0, 2),\n\t\t\t\t\t\t\tsubstr($edit['end_time'], 2, 2),\n\t\t\t\t\t\t\t00\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\t$E->setProperty( \"RECURRENCE-ID\", $edit_date);\n\t\t\t\t\t$E->setProperty( \"uid\", $this->make_uid() . '@' . $host);\n\n\t\t\t\t\t$ICAL->setComponent($E);\n\t\t\t\t}\n\n\t\t\t\t//cleanup\n\t\t\t\t$E->deleteProperty(\"RECURRENCE-ID\");\n\n\t\t\t\t$E->setProperty('dtstart', $start_year, $start_month, $start_day, $start_hour, $start_minute, 00);\n\t\t\t\t$E->setProperty('dtend', $end_year, $end_month, $end_day, $end_hour, $end_minute, 00);\n\t\t\t}\n\n\t\t\t// these random ass add-in dates are non-standard to most cal creation\n\t\t\t// and need to be treated seperately as lumping don't work, dog\n\t\t\tif ( ! empty($extras))\n\t\t\t{\n\t\t\t\tforeach ($extras as $extra)\n\t\t\t\t{\n\n\t\t\t\t\t//if this is all day we need to add the dates as params to the dstart and end items\n\t\t\t\t\tif ($this->_is_all_day(\n\t\t\t\t\t\tsubstr($extra['start_time'], 0, 2),\n\t\t\t\t\t\tsubstr($extra['start_time'], 2, 2),\n\t\t\t\t\t\tsubstr($extra['end_time'], 0, 2),\n\t\t\t\t\t\tsubstr($extra['end_time'], 2, 2)\n\t\t\t\t\t ))\n\t\t\t\t\t{\n\t\t\t\t\t\t$E->setProperty(\n\t\t\t\t\t\t\t\"dtstart\" ,\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'year' \t=> $extra['start_year'],\n\t\t\t\t\t\t\t\t'month' => $extra['start_month'],\n\t\t\t\t\t\t\t\t'day'\t=> $extra['start_day']\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'VALUE' => 'DATE'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t//--------------------------------------------\n\t\t\t\t\t\t//\twe need CDT so we can add a day\n\t\t\t\t\t\t//\tgcal, and ical are ok with this being the same day\n\t\t\t\t\t\t//\tstupid damned outlook barfs, hence the +1\n\t\t\t\t\t\t//\tthe +1 doesnt affect g/ical\n\t\t\t\t\t\t//--------------------------------------------\n\n\t\t\t\t\t\tif ( ! isset($this->CDT) OR ! is_object($this->CDT) )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->load_calendar_datetime();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$this->CDT->change_date(\n\t\t\t\t\t\t\t$extra['end_year'],\n\t\t\t\t\t\t\t$extra['end_month'],\n\t\t\t\t\t\t\t$extra['end_day']\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t$this->CDT->add_day();\n\n\t\t\t\t\t\t$E->setProperty(\n\t\t\t\t\t\t\t\"dtend\" ,\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'year' \t=> $this->CDT->year,\n\t\t\t\t\t\t\t\t'month' => $this->CDT->month,\n\t\t\t\t\t\t\t\t'day'\t=> $this->CDT->day\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'VALUE' => 'DATE'\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\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$E->setProperty(\n\t\t\t\t\t\t\t'dtstart',\n\t\t\t\t\t\t\t$extra['start_year'],\n\t\t\t\t\t\t\t$extra['start_month'],\n\t\t\t\t\t\t\t$extra['start_day'] ,\n\t\t\t\t\t\t\tsubstr($extra['start_time'], 0, 2),\n\t\t\t\t\t\t\tsubstr($extra['start_time'], 2, 2),\n\t\t\t\t\t\t\t00\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t$E->setProperty(\n\t\t\t\t\t\t\t'dtend',\n\t\t\t\t\t\t\t$extra['end_year'],\n\t\t\t\t\t\t\t$extra['end_month'],\n\t\t\t\t\t\t\t$extra['end_day'] ,\n\t\t\t\t\t\t\tsubstr($extra['end_time'], 0, 2),\n\t\t\t\t\t\t\tsubstr($extra['end_time'], 2, 2),\n\t\t\t\t\t\t\t00\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\t$E->setProperty( \"uid\", $this->make_uid() . '@' . $host);\n\t\t\t\t\t$ICAL->setComponent($E);\n\t\t\t\t}\n\n\t\t\t\t//clean in case we need to add more later\n\t\t\t\t$E->setProperty('dtstart', $start_year, $start_month, $start_day, $start_hour, $start_minute, 00);\n\t\t\t\t$E->setProperty('dtend', $end_year, $end_month, $end_day, $end_hour, $end_minute, 00);\n\t\t\t}\n\t\t}\n\t\t//return $ICAL->createCalendar();\n\t\treturn $ICAL->returnCalendar();\n\t}", "public function createCalendar(BaseCalendar $calendar): Component\n {\n $components = $this->createCalendarComponents($calendar);\n $properties = iterator_to_array($this->getProperties($calendar), false);\n\n return new Component('VCALENDAR', $properties, $components);\n }", "public function createClient()\n {\n $scopes = implode(' ', [\\Google_Service_Calendar::CALENDAR]);\n\n $client = new \\Google_Client();\n $client->setApplicationName('P4 LMS');\n $client->setScopes($scopes);\n $client->setClientId(env('GOOGLE_API_ID'));\n $client->setClientSecret(env('GOOGLE_API_SECRET'));\n $client->setAccessType('offline');\n\n return $client;\n }", "public function getCalendarNode(string $nodename)\n {\n $bag = $this->getOrCreateCalendarBag();\n\n return $bag->getCalendarNode($nodename);\n }", "public function getEventObject(){\n $eventTimeID = $this->getID();\n\n $prepared = self::adhocQuery(function( \\PDO $connection ) use ($eventTimeID){\n $statement = $connection->prepare(\"\n SELECT sev.id FROM SchedulizerEvent sev\n JOIN SchedulizerEventTime sevTime ON sevTime.eventID = sev.id\n WHERE sevTime.id = :eventTimeID\n \");\n $statement->bindValue(\":eventTimeID\", $eventTimeID);\n return $statement;\n });\n\n return Event::getByID($prepared->fetch(\\PDO::FETCH_COLUMN));\n }", "function get_event(){\n\t\tglobal $EM_Event;\n\t\tif( is_object($EM_Event) && $EM_Event->event_id == $this->event_id ){\n\t\t\treturn $EM_Event;\n\t\t}else{\n\t\t\tif( is_numeric($this->event_id) && $this->event_id > 0 ){\n\t\t\t\treturn em_get_event($this->event_id, 'event_id');\n\t\t\t}elseif( is_array($this->bookings) ){\n\t\t\t\tforeach($this->bookings as $EM_Booking){\n\t\t\t\t\t/* @var $EM_Booking EM_Booking */\n\t\t\t\t\treturn em_get_event($EM_Booking->event_id, 'event_id');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn em_get_event($this->event_id, 'event_id');\n\t}", "public function cal()\n\t{\n\t\t// -------------------------------------\n\t\t// Load 'em up\n\t\t// -------------------------------------\n\n\t\t$this->load_calendar_datetime();\n\t\t$this->load_calendar_parameters();\n\n\t\t// -------------------------------------\n\t\t// Start up\n\t\t// -------------------------------------\n\n\t\t$this->get_first_day_of_week();\n\n\t\t// -------------------------------------\n\t\t// Prep the parameters\n\t\t// -------------------------------------\n\n\t\t$disable = array(\n\t\t\t'categories',\n\t\t\t'category_fields',\n\t\t\t'custom_fields',\n\t\t\t'member_data',\n\t\t\t'pagination',\n\t\t\t'trackbacks'\n\t\t);\n\n\t\t$params = array(\n\t\t\tarray(\n\t\t\t\t'name' => 'category',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'site_id',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'min_value' => 1,\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'default' => $this->data->get_site_id()\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'calendar_id',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'calendar_name',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'event_id',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'event_name',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'status',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'default' => 'open'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'date_range_start',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'date'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'date_range_end',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'date',\n\t\t\t\t//'default' => 'today'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'show_days',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'default' => 1\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'show_weeks',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'show_months',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'show_years',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'time_range_start',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'time',\n\t\t\t\t'default' => '0000'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'time_range_end',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'time',\n\t\t\t\t'default' => '2359'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'day_limit',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'default' => '10'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'event_limit',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'default' => '0'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'first_day_of_week',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'default' => $this->first_day_of_week\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'pad_short_weeks',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'bool',\n\t\t\t\t'default' => 'yes',\n\t\t\t\t'allowed_values' => array('yes', 'no')\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'enable',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'default' => '',\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'allowed_values' => $disable\n\t\t\t)\n\t\t);\n\n\t\t//ee()->TMPL->log_item('Calendar: Processing parameters');\n\n\t\t$this->add_parameters($params);\n\n\t\t// -------------------------------------\n\t\t// Do some voodoo on P\n\t\t// -------------------------------------\n\n\t\t$this->process_events_params();\n\n\t\t// -------------------------------------\n\t\t// Let's go build us a gosh darn calendar!\n\t\t// -------------------------------------\n\n\t\t$this->parent_method = __FUNCTION__;\n\n\t\treturn $this->build_calendar();\n\t}", "public function getEvent()\n {\n if (!isset($this->event)) {\n $this->setEvent(new MvcEvent());\n $this->event->setRouteMatch(new RouteMatch($this->routeParams));\n }\n\n return $this->event;\n }", "public function getMesCalendario(){\n return $this->mesCalendario;\n }", "public function get_calendar() {\n $start = date('Y-m-d H:i:s', strtotime($this->input->post('start_date')));\n $end = date('Y-m-d H:i:s', strtotime($this->input->post('end_date')));\n $filter = $this->input->post('filter');\n if ($start && $end) {\n if (isset($filter) && !empty($filter) && !in_array($filter, config_item('event_types'))) {\n return $this->send_error('INVALID_FILTER');\n }\n $this->load->model('events_model');\n $where = array('start_date >=' => $start, 'end_date <=' => $end);\n if (isset($filter) && !empty($filter)) {\n $where['type'] = $filter;\n }\n if ($events = $this->events_model->get_all($where)) {\n setlocale(LC_TIME, 'nl_NL.UTF-8');\n foreach ($events as &$event) {\n $event['readable_start_date'] = strftime('%A %d %B %G', strtotime($event['start_date']));\n $event['readable_end_date'] = strftime('%A %d %B %G', strtotime($event['end_date']));\n }\n $this->event_log();\n return $this->send_response($events);\n }\n return $this->send_error('NO_RESULTS');\n } else {\n return $this->send_error('ERROR');\n }\n }", "public function listCalendars()\n {\n Kronolith::initialize();\n $all_external_calendars = $GLOBALS['calendar_manager']->get(Kronolith::ALL_EXTERNAL_CALENDARS);\n $result = new stdClass;\n $auth_name = $GLOBALS['registry']->getAuth();\n\n // Calendars. Do some twisting to sort own calendar before shared\n // calendars.\n foreach (array(true, false) as $my) {\n foreach ($GLOBALS['calendar_manager']->get(Kronolith::ALL_CALENDARS) as $id => $calendar) {\n $owner = ($auth_name && ($calendar->owner() == $auth_name));\n if (($my && $owner) || (!$my && !$owner)) {\n $result->calendars['internal'][$id] = $calendar->toHash();\n }\n }\n\n // Tasklists\n if (Kronolith::hasApiPermission('tasks')) {\n foreach ($GLOBALS['registry']->tasks->listTasklists($my, Horde_Perms::SHOW, false) as $id => $tasklist) {\n if (isset($all_external_calendars['tasks/' . $id])) {\n $owner = ($auth_name &&\n ($tasklist->get('owner') == $auth_name));\n if (($my && $owner) || (!$my && !$owner)) {\n $result->calendars['tasklists']['tasks/' . $id] =\n $all_external_calendars['tasks/' . $id]->toHash();\n }\n }\n }\n }\n }\n\n // Resources\n if (!empty($GLOBALS['conf']['resource']['driver'])) {\n foreach (Kronolith::getDriver('Resource')->listResources() as $resource) {\n if ($resource->get('type') != Kronolith_Resource::TYPE_GROUP) {\n $rcal = new Kronolith_Calendar_Resource(array(\n 'resource' => $resource\n ));\n $result->calendars['resource'][$resource->get('calendar')] = $rcal->toHash();\n } else {\n $rcal = new Kronolith_Calendar_ResourceGroup(array(\n 'resource' => $resource\n ));\n $result->calendars['resourcegroup'][$resource->getId()] = $rcal->toHash();\n }\n }\n }\n\n // Timeobjects\n foreach ($all_external_calendars as $id => $calendar) {\n if ($calendar->api() != 'tasks' && $calendar->display()) {\n $result->calendars['external'][$id] = $calendar->toHash();\n }\n }\n\n // Remote calendars\n foreach ($GLOBALS['calendar_manager']->get(Kronolith::ALL_REMOTE_CALENDARS) as $url => $calendar) {\n $result->calendars['remote'][$url] = $calendar->toHash();\n }\n\n // Holidays\n foreach ($GLOBALS['calendar_manager']->get(Kronolith::ALL_HOLIDAYS) as $id => $calendar) {\n $result->calendars['holiday'][$id] = $calendar->toHash();\n }\n\n return $result;\n }", "function addCalendar($calendar) {\n return $this->databaseInsertRecord(\n $this->tableCalendars,\n 'calendar_id',\n $calendar\n );\n }", "public function calendar(){\n\n /**\n * Hago una consulta a la tabla eventos para que me traiga los eventos\n * que esten activos y le pido que me lo convierta a array\n */\n $events = Event::query()->where('state','Activo')->get()->toArray();\n\n /**\n * Creo un array vacio\n */\n $eventos = array();\n\n /**\n * Recorro cada uno de los elementos de la consulta que hice antes con un foreach\n * y los guardo en un array, en la posicion title guardo el titulo y la descripcion\n * y la fecha la guardo en la posicion start, ya que asi me la pide el fullcalendar\n */\n foreach($events as $event){\n $evento = [\n 'title' => $event['title'].\" | \".$event['description'],\n 'start' => $event['date'],\n ];\n /**\n * Guardo el array anterior en el array vacio que cree antes\n */\n array_push($eventos,$evento);\n }\n return view('calendar' , compact('eventos'));\n }", "public static function ObtenerCalendario()\n {\n // Consulta de la meta\n $consulta = \"SELECT * FROM calendario\";\n\n try {\n // Preparar sentencia\n $comando = Database::getInstance()->getDb()->prepare($consulta);\n // Ejecutar sentencia preparada\n $comando->execute();\n // Capturar primera fila del resultado\n //$row = $comando->fetch(PDO::FETCH_ASSOC);\n //return $row;\n\n\n return $comando->fetchAll(PDO::FETCH_ASSOC);\n\n } catch (PDOException $e) {\n // Aquí puedes clasificar el error dependiendo de la excepción\n // para presentarlo en la respuesta Json\n return -1;\n }\n }", "public function calendarioacedemico()\n {\n return $this->hasMany(CalendarioAcad::class, 'iCalAcadId');\n }", "public function getEvent()\n {\n return $this->hasOne(Event::class, ['id' => 'event_id']);\n }", "function __construct() {\n $this->client = new \\Google_Client();\n $this->client->setApplicationName(\"AIQ-CRM\");\n $this->client->setClientId(Config::get('google.calendar.client_id'));\n $this->client->setClientSecret(Config::get('google.calendar.client_secret'));\n $this->client->setRedirectUri(Config::get('google.calendar.redirect_uri'));\n $this->client->setAccessType('offline');\n $this->client->addScope(\"https://www.googleapis.com/auth/calendar\");\n //\n //\n $this->service = new \\Google_Service_Calendar($this->client);\n }", "public function show(InternCalendar $internCalendar ,$id)\n {\n $calendar = InternCalendar::find($id);\n return $calendar ;\n }", "public function setCalendarID($value)\n {\n return $this->set('CalendarID', $value);\n }", "public function setCalendarID($value)\n {\n return $this->set('CalendarID', $value);\n }", "public function setCalendarID($value)\n {\n return $this->set('CalendarID', $value);\n }", "public function setCalendarID($value)\n {\n return $this->set('CalendarID', $value);\n }", "public function setCalendarID($value)\n {\n return $this->set('CalendarID', $value);\n }", "public function setCalendarID($value)\n {\n return $this->set('CalendarID', $value);\n }", "public function setCalendarID($value)\n {\n return $this->set('CalendarID', $value);\n }", "public function setCalendarID($value)\n {\n return $this->set('CalendarID', $value);\n }", "public function setCalendarID($value)\n {\n return $this->set('CalendarID', $value);\n }", "public function setCalendar(CultureFeed_Cdb_Data_Calendar $calendar) {\n $this->calendar = $calendar;\n }" ]
[ "0.7920089", "0.7573589", "0.73638797", "0.72971344", "0.7145896", "0.7012212", "0.6862772", "0.6771605", "0.6688989", "0.64592737", "0.64512366", "0.64512366", "0.6415997", "0.64020973", "0.6395439", "0.63549966", "0.6231698", "0.6060423", "0.59474295", "0.5864934", "0.58567375", "0.58348215", "0.583184", "0.5818935", "0.58146787", "0.57426673", "0.5706372", "0.5691334", "0.56823736", "0.56365085", "0.56348205", "0.56043464", "0.56022346", "0.56015503", "0.55893826", "0.5586007", "0.5579772", "0.5542012", "0.5490432", "0.5472506", "0.5466528", "0.5458818", "0.5430044", "0.54077846", "0.5379824", "0.53606665", "0.53531694", "0.5331099", "0.52975845", "0.52815014", "0.5217712", "0.5195203", "0.5186464", "0.51841134", "0.5148782", "0.5148782", "0.5148782", "0.5137866", "0.5132297", "0.5114835", "0.5093528", "0.50832057", "0.5063034", "0.50618607", "0.5061105", "0.5056139", "0.5040082", "0.5034195", "0.5033879", "0.50330776", "0.5031796", "0.50254786", "0.5024706", "0.5018856", "0.5017388", "0.5012955", "0.50093925", "0.50088847", "0.5008333", "0.50029707", "0.49897933", "0.49833578", "0.49702746", "0.49618798", "0.49488905", "0.4940268", "0.49365032", "0.49320388", "0.49278837", "0.49150974", "0.4896923", "0.4896923", "0.4896038", "0.48938727", "0.4893506", "0.4893506", "0.4893506", "0.4893506", "0.48932967", "0.48867145" ]
0.80141985
0
Get the organiser from this event.
Получите организатора этого события.
public function getOrganiser() { return $this->organiser; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOrganisation()\n {\n return $this->organisation;\n }", "public function organizer()\n {\n return $this->belongsTo(User::class, 'organizer_id');\n }", "public function getOrganisation()\n\t{\n\t\treturn $this->_organisation;\n\t}", "public function getOrganization()\n {\n return $this->organization;\n }", "public function getOrganization()\n {\n return $this->organization;\n }", "public function getOrganization()\n {\n return $this->organization;\n }", "public function getOrganismeAssedic() {\n return $this->organismeAssedic;\n }", "function organiser($key = null)\n {\n if(!current_route_is('organiser.*'))\n return null;\n\n $organiser = request()->route('organiser');\n\n if ($key)\n return $organiser->$key;\n\n return $organiser;\n }", "public function isOrganizer() {\n\t\treturn $this->organizer;\n\t}", "public function getOrganization()\n {\n if (array_key_exists(\"organization\", $this->_propDict)) {\n return $this->_propDict[\"organization\"];\n } else {\n return null;\n }\n }", "public function getEventPublisher()\n {\n return $this->eventPublisher;\n }", "public function getOrganisateurSpectacle() {\n return $this->organisateurSpectacle;\n }", "public function organization()\n {\n return Organization::i();\n }", "public function getOrganizationUser()\n {\n return $this->organizationUser;\n }", "public function getOrganism() {\n\t\treturn (string)$this->gpml[\"Organism\"];\n\t}", "public function getPublisher() {\n return $this->publisher;\n }", "public function getEnterer()\n {\n return $this->enterer;\n }", "function getOrganisers(&$organisers, $event)\n{\n\tif( $event->has( \"event:agent\" ) )\n\t{\n\t\tforeach( $event->all( \"event:agent\" ) as $agent )\n\t\t{\n\t\t\tif(!$agent->isType(\"http://www.w3.org/ns/org#Organization\"))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$organisers[sid((string)$agent)] = $agent->label();\n\t\t\twhile($agent->has(\"-http://www.w3.org/ns/org#hasSubOrganization\"))\n\t\t\t{\n\t\t\t\t$agent = $agent->get(\"-http://www.w3.org/ns/org#hasSubOrganization\");\n\t\t\t\t$organisers[sid((string)$agent)] = $agent->label();\n\t\t\t}\n\t\t}\n\t}\n}", "public function getCodeOrganisme(): ?string {\n return $this->codeOrganisme;\n }", "public function getOrgName()\n {\n return $this->orgName;\n }", "public function get_organizer_by_id( $organizer_id ) {\r\n\t\t$existing_organizer = get_posts( array(\r\n\t\t\t'posts_per_page' => 1,\r\n\t\t\t'post_type' => $this->oraganizer_posttype,\r\n\t\t\t'meta_key' => 'ime_event_organizer_id',\r\n\t\t\t'meta_value' => $organizer_id,\r\n\t\t\t'suppress_filters' => false,\r\n\t\t) );\r\n\r\n\t\tif ( is_array( $existing_organizer ) && ! empty( $existing_organizer ) ) {\r\n\t\t\treturn $existing_organizer[0]->ID;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public function getOrgId()\n {\n return $this->org_id;\n }", "public function getCurrentOrganization()\n {\n return $this->userLoader->getOrganization($this->getCurrentOrganizationId());\n }", "public function getOwner()\n {\n if(!($domainId = $this->getData('domainId'))) {\n return null;\n }\n \n return Core_Model_DiFactory::getClientManager()->getClientByDomain($domainId);\n }", "public function getPublisher()\n {\n if (array_key_exists(\"publisher\", $this->_propDict)) {\n return $this->_propDict[\"publisher\"];\n } else {\n return null;\n }\n }", "public function getEmployer()\n {\n return $this->employer;\n }", "public function getOwner()\n {\n return isset($this->owner) ? $this->owner : null;\n }", "public function getOrganizationId()\n {\n return $this->organization_id;\n }", "public function getOrganizationId()\n {\n return $this->organizationId;\n }", "function getOwner() \n {\n return $this->instance->getOwner();\n }", "public function organizers()\n {\n return $this->belongsToMany('DavideCasiraghi\\LaravelEventsCalendar\\Models\\Organizer', 'event_has_organizers', 'event_id', 'organizer_id');\n }", "public function getOwner()\n {\n return $this->owner;\n }", "public function getOwner()\n {\n return $this->owner;\n }", "public function getOwner()\n {\n return $this->owner;\n }", "public function getOrganization()\n {\n $node = $this->response->getFirst('contact:org', $this->node);\n if ($node === null) {\n return null;\n }\n\n return $node->nodeValue;\n }", "public function getOrgId() {\n\treturn ($this->orgId);\n}", "public function getOwner()\n {\n return $this->get(self::_OWNER);\n }", "public function getRegistrant()\n {\n return $this->registrant;\n }", "public function getOrganismeRetraite() {\n return $this->organismeRetraite;\n }", "public function getOwner() {\n\t\treturn $this->owner;\n\t}", "public function getOwner()\n {\n return $this->data['owner'];\n }", "public function getAgency()\n {\n return isset($this->agency) ? $this->agency : null;\n }", "public function getOrgId() {\n\t\treturn ($this->orgId);\n\t}", "public function getOwner() {\r\n return $this->owner;\r\n }", "public function getOrganizationEmail(): string {\n\t\treturn $this->organizationEmail;\n\t}", "public function getOwner()\n {\n return $this->_owner;\n }", "public function getOrganizationalUnit()\n {\n return $this->organizational_unit;\n }", "public function getCalendar() {\n return $this->calendar;\n }", "public function getLoggedEnterprise()\n {\n return $this->defaultEnterprise;\n }", "public function getEnterprise()\n {\n return $this->getValue('nb_icontact_prospect_enterprise');\n }", "public function getOrganiserData() {\n\n $domain = parse_url(Director::absoluteBaseURL(), PHP_URL_HOST);\n\n $data = array(\n \"Name\" => \"SilverStripe Event Management Module\",\n \"Email\" => \"postmaster@\" . $domain,\n \"Domain\" => $domain\n );\n\n $sitename = SiteConfig::current_site_config()->Title;\n if(!empty($sitename)) {\n $data['Name'] = trim($sitename);\n }\n\n $adminEmail = Config::inst()->get('Email', 'admin_email');\n if(!empty($adminEmail)) {\n $data['Email'] = trim($adminEmail);\n }\n\n return new ArrayData($data);\n\n }", "public function getOwner()\n {\n if (array_key_exists(\"owner\", $this->_propDict)) {\n return $this->_propDict[\"owner\"];\n } else {\n return null;\n }\n }", "protected function getEvent()\n {\n if (null === $this->event) {\n $this->event = $event = new EntityEvent;\n\n $event->setTarget($this);\n }\n\n return $this->event;\n }", "public function getEventManager()\n {\n return $this->events;\n }", "public function getOwner()\n\t{\n\t\treturn $this->getObject('owner', null, 'user');\n\t}", "public function getOwner() {\n\t\telgg_deprecated_notice(\"ElggExtender::getOwner deprecated for ElggExtender::getOwnerGUID\", 1.8);\n\t\treturn $this->getOwnerGUID();\n\t}", "public function getAutor()\n {\n return $this->autor;\n }", "public function getAutor()\n {\n return $this->autor;\n }", "public function getAutor()\n {\n return $this->autor;\n }", "public function organization()\n {\n return $this->belongsTo('F3\\Models\\Organization', 'party_id', 'party_id');\n }", "public function getProposerEndowment()\n {\n return $this->getAttribute(self::$PROPOSER_ENDOWMENT_KEY);\n }", "public function getEndorserParty()\n {\n return $this->endorserParty;\n }", "public function team()\n {\n return $this->user();\n }", "public function getCalendar()\r\n {\r\n if (!$this->_calendar && $this->getCalendarId()) {\r\n $this->_calendar = Mage::getModel('google/calendar')->load($this->getCalendarId());\r\n }\r\n\r\n return $this->_calendar;\r\n }", "public function getEvent()\n {\n return $this->event;\n }", "public function getEvent()\n {\n return $this->event;\n }", "public function getEvent()\n {\n return $this->event;\n }", "public function getMentoringOrganisationDetails()\n {\n return $this->hasOne(MentoringOrganisation::class, 'user_id', 'id');\n }", "public function getAttendee()\n {\n return $this->attendee;\n }", "public function getAttendee()\n {\n return $this->attendee;\n }", "public function getEvent()\n {\n return isset($this->event) ? $this->event : null;\n }", "function getOwnerIdentifier()\n {\n return $this->ownerIdentifier;\n }", "public function getEncounter()\n {\n return $this->encounter;\n }", "public function getInvitor()\n {\n return $this->invitor;\n }", "function getOwner() {\n \n return $this->principalInfo['uri'];\n \n }", "public function getCreator()\n {\n return $this->creator;\n }", "public function getCreator()\n {\n return $this->creator;\n }", "public function getCreator()\n {\n return $this->creator;\n }", "public function getCreator()\n {\n return $this->creator;\n }", "public function getCreator()\n {\n return $this->creator;\n }", "public function getCreator()\n {\n return $this->creator;\n }", "public function getCreator()\n {\n return $this->creator;\n }", "public function getCreator()\n {\n return $this->creator;\n }", "public function getEvent() {\n return $this->event;\n }", "public function transporter() {\n if(is_null($this->transporter)){\n $this->transporter = Transporter::getByIdentifier($this->transporter_id);\n }\n return $this->transporter;\n }", "public function getOrganizationName(): string {\n\t\treturn ($this->organizationName);\n\t}", "public function getAssignor()\n {\n $config = $this->scopeConfig->getValue(\n 'payment/az2009_cielo_bank_slip/assignor',\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n );\n\n return $config;\n }", "public function getAudience()\n {\n return $this->audience;\n }", "public function getAudience()\n {\n return $this->audience;\n }", "protected function get_calendar()\n\t{\n\t\treturn $this->calendars['gregorian'];\n\t}", "public function getEvent()\r\n {\r\n return $this->Event;\r\n }", "public function client()\n {\n if ( ! $this->bean->fetchAs('person')->client) $this->bean->client = R::dispense('person');\n return $this->bean->fetchAs('person')->client;\n }", "function getApprover() {\n return user_load($this->approver_uid);\n }", "public function getOrganization()\n {\n $token = $this->securityContext->getToken();\n if ($token instanceof OrganizationContextTokenInterface) {\n return $token->getOrganizationContext();\n }\n\n return false;\n }", "public function getAffiliation()\n {\n return $this->affiliation;\n }", "public static function event() {\n return self::service()->get('events');\n }", "public function getEsAConductor()\n {\n return $this->esAConductor;\n }", "public function getOwnerEntity() {\n\t\treturn get_entity($this->owner_guid);\n\t}", "public function getAffiliation() {\n return $this->affiliation;\n }", "public function getEventManager()\n {\n return $this->eventManager;\n }" ]
[ "0.6697686", "0.6507971", "0.64969254", "0.648617", "0.648617", "0.648617", "0.6372064", "0.61768335", "0.6144404", "0.6089184", "0.60589164", "0.60294944", "0.5977343", "0.59507185", "0.5903315", "0.5806831", "0.5783075", "0.5752315", "0.57308006", "0.57056224", "0.56900215", "0.5660749", "0.5641454", "0.5633055", "0.5617995", "0.5585752", "0.5574358", "0.5565014", "0.5558102", "0.55451304", "0.5539179", "0.55284894", "0.55284894", "0.55284894", "0.552561", "0.5523665", "0.5501045", "0.5501035", "0.55005985", "0.5494118", "0.5489357", "0.547965", "0.54720736", "0.5471639", "0.54701513", "0.54669875", "0.54454017", "0.544498", "0.5438723", "0.540698", "0.538032", "0.5378044", "0.5367512", "0.5351497", "0.53457254", "0.5343708", "0.53417313", "0.53417313", "0.53417313", "0.5335687", "0.5316571", "0.5316476", "0.5312059", "0.530707", "0.53066766", "0.53066766", "0.53066766", "0.52833337", "0.52796894", "0.52796894", "0.5274856", "0.5267118", "0.5252473", "0.5250432", "0.524422", "0.5238046", "0.5238046", "0.5238046", "0.5238046", "0.5238046", "0.5238046", "0.5238046", "0.5238046", "0.52341187", "0.5232256", "0.5222597", "0.52138174", "0.5213723", "0.5213723", "0.5213335", "0.52112675", "0.5208824", "0.5204729", "0.5202484", "0.52024424", "0.5185552", "0.51843005", "0.5184204", "0.5181427", "0.5181393" ]
0.79483306
0
Get the contact info from this event.
Получите информацию о контакте из этого события.
public function getContactInfo() { return $this->contactInfo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getContact()\n\t{\n\t\treturn $this->Info['Contact'];\n\t}", "public function getContact()\n {\n return $this->contact;\n }", "public function getContact()\n {\n return $this->contact;\n }", "public function getContact()\n {\n return $this->contact;\n }", "public function getContactInfo()\n {\n return array_filter([\n 'email' => $this->getEmail(),\n 'phoneNumber' => $this->getPhoneNumber(),\n ]);\n }", "public function getContact()\n {\n return $this->contact;\n }", "public function getContactInfo()\n {\n $phoneNumbers = [];\n if (isset($this->properties['contact_mobile_phone'])) {\n $phoneNumbers[] = $this->properties['contact_mobile_phone']->value;\n }\n if (isset($this->properties['contact_home_phone'])) {\n $phoneNumbers[] = $this->properties['contact_home_phone']->value;\n }\n $emailAddresses = [];\n if (isset($this->properties['email'])) {\n $emailAddresses[] = $this->properties['email']->value;\n }\n if (isset($this->properties['contact_alt_email'])) {\n $emailAddresses[] = $this->properties['contact_alt_email']->value;\n }\n return new Model\\ContactInfo(\n $phoneNumbers,\n $emailAddresses\n );\n }", "public function getContact()\n {\n return isset($this->contact) ? $this->contact : null;\n }", "public function getContact()\n {\n $userId = Yii::$app->user->id;\n\n if ($userId == $this->author_id) {\n return $this->recipient;\n } elseif ($userId == $this->recipient_id) {\n return $this->author;\n }\n\n }", "public function getContact(): string\n {\n return $this->_contact;\n }", "public function getContactDetailAttribute()\n {\n return $this->contact()->first();\n }", "public function getInfosContact() {\n $listeInfos = $this->getInfos(\"contact\");\n return $listeInfos;\n }", "public function getContact(): ?array\n\t{\n\t\treturn $this->contact;\n\t}", "public function get_contact(){\n $this->relative = array_shift(Relative::find_all(\" WHERE dead_no = '{$this->id}' LIMIT 1\"));\n if ($this->relative) {\n return $this->relative->contact();\n } else {\n return \"Not Specified\";\n }\n }", "public function getReadableContact()\n {\n return Extra::getBeautifulPhone($this->contact);\n }", "function getInfo()\n\t{\n\t\treturn array_merge($this->getDeveloperInfo(), $this->getContact()->getInfo());\n\t}", "public function getContact(){\n return $this->getParameter('contact');\n }", "public function getEventAddress() \n {\n return $this->_fields['EventAddress']['FieldValue'];\n }", "public function returnContact(){\n return $this->contact->getContact(); //Chama a função getContact do objeto contact\n }", "public function getIdContact()\n {\n return $this->id_contact;\n }", "public function getContactID()\n {\n return $this->get('ContactID');\n }", "public function getContactID()\n {\n return $this->get('ContactID');\n }", "public function getContactID()\n {\n return $this->get('ContactID');\n }", "public function getContactName()\n {\n return $this->contactName;\n }", "public function getContact() {\n try {\n return new Yourdelivery_Model_Contact($this->getContactId());\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n return null;\n }\n }", "public function getContactID()\n {\n return $this->ContactID;\n }", "protected function _getContactOwner()\n {\n return $this->params['name'];\n }", "public function getMainContact()\n {\n return $this->mainContact;\n }", "public function getContacts()\n {\n if (array_key_exists(\"contacts\", $this->_propDict)) {\n return $this->_propDict[\"contacts\"];\n } else {\n return null;\n }\n }", "public function getTelContact() {\n return $this->telContact;\n }", "public function getContactId()\n\t{\n\t\treturn $this->_contactId;\n\t}", "public function getContactEmail()\n {\n return $this->contactEmail;\n }", "public function getAllContactMetadata()\n {\n $response = $this->get(Resources::$Contactmetadata);\n if (!$response->success()) {\n $this->throwError('MailjetService:getAllContactMetadata() failed', $response);\n }\n return $response->getData();\n }", "public function getContactInfo()\n {\n $info = DB::table('oc_setting')->whereIn(\n 'key',\n [\n 'config_telephone',\n 'config_email',\n 'config_address',\n 'config_name'\n ]\n )->get();\n\n $data = [];\n $info->each(\n function ($item, $key) use (&$data) {\n $data[$item->key] = $item->value;\n }\n );\n\n return $data;\n\n\n }", "public function existingContactInfo($id) \n {\n //return the result for later use\n return $this->getExistingContactInfo($id);\n }", "function InfGetContactDetails($inf_contact_id) {\n $object_type = \"Contact\";\n $class_name = \"Infusionsoft_\" . $object_type;\n $object = new $class_name();\n $objects = Infusionsoft_DataService::query(new $class_name(), array('Id' => $inf_contact_id));\n\n $contact_array = array();\n foreach ($objects as $i => $object) {\n $contact_array[$i] = $object->toArray();\n }\n\treturn $contact_array[0];\n}", "public function getContact(): ?string;", "public function getContacts(): stdClass {\n\n\t\treturn $this->greenApi->request( 'GET',\n\t\t\t'{{host}}/waInstance{{idInstance}}/GetContacts/{{apiTokenInstance}}' );\n\t}", "public function getContact()\n {\n return dd(22222);\n }", "public function getContactPhone()\n {\n return isset($this->contactPhone) ? $this->contactPhone : null;\n }", "public function getContact()\n {\n return view('frontend.info.contact');\n }", "public function getContactDate() {\n return $this->date;\n }", "public function getSellerContact()\n {\n return $this->sellerContact;\n }", "public function contactDetails()\n {\n return $this->hasMany(ContactDetail::class);\n }", "public function contact()\n {\n return $this->hasOne(OrderContact::class);\n }", "public function contactInfo($id)\n\t{\n\t\t$sql = \"SELECT * FROM contact_us WHERE id = '\". $id . \"'\";\n\t\t//return $this->fetch($sql);\n $rows = $this->fetch($sql);\n $c=0;\n foreach($rows AS $row){\n $contactinfo[$c] = $row;\n $c++;\n }\n return $contactinfo;\n\t}", "public function getContactInfo( string $chatId ): stdClass {\n\n\t\t$requestBody = [\n\t\t\t'chatId' => $chatId,\n\t\t];\n\n\t\treturn $this->greenApi->request( 'POST',\n\t\t\t'{{host}}/waInstance{{idInstance}}/GetContactInfo/{{apiTokenInstance}}', $requestBody );\n\t}", "public function getContacts() {\n return $this->contacts;\n }", "public function getContactDataFields();", "public function contact()\n {\n return new Contact($this);\n }", "public function getFieldContactID()\n\t{\n\t\treturn $this->GetDAL()->GetField(DotCoreContactMemberDAL::CONTACT_MEMBER_ID);\n\t}", "public function getContacts()\r\n {\r\n return $this->_contacts;\r\n }", "public function getContacts()\n\t{\n\t\treturn $this->contacts; \n\n\t}", "protected function buildContactObject()\n {\n return new Contact();\n }", "public function getToInfo() {\r\n\t\treturn $this->toInfo;\r\n\t}", "public function getCorrespondentAddress() {\n\t\treturn self::$_correspondentAddress;\n\t}", "public function getReceiverInfo(array $request)\n {\n if (isset($request['estimate_id']))\n {\n return EstimateRepository::with('contacts')->findOrFail($request['estimate_id'])->get()->pluck('contacts')->first()->toArray();\n }\n if (isset($request['lead_id']))\n {\n return Leads::with('contacts')->findOrFail($request['lead_id'])->get()->pluck('contacts')->first()->toArray();\n\n }\n if (isset($request['request_id']))\n {\n return Request::with('contacts')->findOrFail($request['request_id'])->get()->pluck('contacts')->first()->toArray();\n }\n }", "public function getPortalContact()\n {\n return BeanFactory::getBean('Contacts', $_SESSION['contact_id']);\n }", "public function getRecipient() {\n\t\treturn $this -> data['recipient'];\n\t}", "public function fromContact()\n {\n return $this->hasOne(User::class, 'id', 'from');\n }", "public function getContactsForAdding()\n {\n return $this->contactsForAdding;\n }", "function getContactDetails($prj_id, $contact_id)\n {\n $backend =& self::_getBackend($prj_id);\n return $backend->getContactDetails($contact_id);\n }", "public function getContact(){\n return $this->db->get('contact')->result();\n }", "public function get() {\n\t\t$request = $this->send(\"GET\", \"contacts/\" . $this->contactId, [\n\t\t\t'headers' => [\n\t\t\t\t'Accept' => 'application/json, */*',\n\t\t\t]\n\t\t]);\n\t\treturn $request;\n\t}", "public function getDetails()\n {\n return [\n 'phone' => $this->user->phone\n ];\n }", "public function getEventAdditionalInfo() {\n\t\treturn ($this->eventAdditionalInfo);\n\t}", "public function getEvent()\n {\n return $this->getData('event');\n }", "public function getConnectorContactId()\n {\n return $this->contactId;\n }", "public function fetchContacts()\n {\n return $this->contacts;\n }", "public function getEvent()\n {\n $event = array(\n \"eid\" => $this->eid,\n \"name\" => $this->name,\n \"venue\" => $this->venue,\n \"date\" => $this->date,\n \"time\" => $this->time,\n \"type\" => $this->type,\n \"status\" => $this->status\n );\n return $event;\n }", "public function getAddress()\n\t{\n\t\treturn $this->data['address'];\n\t}", "public function getEventDetails($eventId) {\n $sql = 'SELECT cmr.*, cmroom.room_name FROM ces_meeting_requests cmr '\n . 'LEFT JOIN ces_meeting_rooms cmroom ON cmroom.id = cmr.room_id '\n . 'WHERE cmr.id = :id';\n \n $stmt = $this->conn->prepare($sql);\n $stmt->execute([':id' => $eventId]);\n \n return $stmt->fetch();\n }", "public function getInfo()\n {\n if (!empty($this->info)) {\n return $this->info;\n }\n\n // fallback to seat information\n if (!empty($this->seat)) {\n return $this->seat->getDisplayname();\n }\n\n return null;\n }", "function get_primary_contact_details() : array {\n\n\treturn array(\n\t\tarray(\n\t\t\t'icon' => 'map-marker-alt',\n\t\t\t'title' => 'OFFICE',\n\t\t\t'value' => get_theme_mod( 'address_primary' ),\n\t\t),\n\t\tarray(\n\t\t\t'icon' => 'phone',\n\t\t\t'title' => 'PHONE',\n\t\t\t'value' => get_theme_mod( 'phone_primary' ),\n\t\t),\n\t\tarray(\n\t\t\t'icon' => 'envelope',\n\t\t\t'title' => 'EMAIL ADDRESS',\n\t\t\t'value' => get_theme_mod( 'email_primary' ),\n\t\t),\n\t\tarray(\n\t\t\t'icon' => 'business-time',\n\t\t\t'title' => 'OPENING HOURS',\n\t\t\t'value' => get_theme_mod( 'working_hrs_primary' ),\n\t\t),\n\t);\n\n}", "public function contact(): \\Illuminate\\Database\\Eloquent\\Relations\\HasOne\n {\n return $this->hasOne('App\\Models\\UserContactDetail');\n }", "public function getFTOContactDetailsArr()\n\t{\n\t\t$FTOContactDetailsArr[\"FLAG\"] = $this->getFTOFlag();\n\t\t$FTOContactDetailsArr[\"INBOUND_LIMIT\"] = $this->getInBoundLimit();\n\t\t$FTOContactDetailsArr[\"OUTBOUND_LIMIT\"] = $this->getOutBoundLimit();\n\t\t$FTOContactDetailsArr[\"TOTAL_LIMIT\"] = $this->getTotalAcceptanceLimit();\n\t\t\n\t\treturn $FTOContactDetailsArr;\n\t}", "public function getContactList()\r\n {\r\n return $this->exec('contact_list');\r\n }", "public function getContactNotes()\n\t{\n\t\treturn $this->contact_notes;\n\t}", "public function getContact()\n\t{\n\t\treturn view('contact');\n\t}", "public function contact()\n {\n return $this->BelongsTo(User::class, 'parent_contact_id');\n }", "public function getContactsList() {\n return $this->_get(7);\n }", "function get_contact($uid) {\n //make sure the uid is set\n if (!isset($uid) || empty($uid)) {\n throw new Zim_Exception_UIDNotSet();\n }\n $q = Doctrine_Query::create()\n ->from('Zim_Model_User user')\n ->where('user.uid = ?', $uid)\n ->limit(1);\n $contact = $q->fetchOne();\n if (empty($contact)) {\n throw new Zim_Exception_ContactNotFound();\n }\n $contact = $contact->toArray();\n if (!isset($contact['uname']) || trim($contact['uname']) == ''){\n $contact['uname'] = $this->update_username(array('uid' => $contact['uid']));\n }\n\n //return the contact\n return $contact;\n }", "public function getOneInformation(){\n\t\tuser_login_required();\n\n\t\t//Get conversation ID\n\t\t$conversationID = $this->getSafePostConversationID(\"conversationID\");\n\t\t\n\t\t//Try to get informations about the conversation\n\t\t$conversationsList = CS::get()->components->conversations->getList(userID, $conversationID);\n\n\t\t//Check for errors\n\t\tif($conversationsList === false)\n\t\t\tRest_fatal_error(500, \"An internal error occured\");\n\n\t\t//Check if a conversation was found\n\t\tif(count($conversationsList) < 1)\n\t\t\tRest_fatal_error(401, \"Users doesn't belong to the specified conversation,\".\n\t\t\t\" or the conversation doesn't exists !\");\n\n\t\t//Return conversation informations\n\t\treturn self::ConvInfoToAPI($conversationsList[0]);\n\t}", "function buildContactDetail() {\n return url(\"thong-tin-lien-he\");\n }", "public function hasContactInformation() {\n\t\treturn $this->hasContactEmail() || $this->hasContactUrl();\n\t}", "public function contact()\n {\n return $this->hasMany(contact::class);\n }", "public function getContacts(){\n $contacts = [];\n if ($this->data instanceof IPPCustomer){\n $newContact = $this->parseData($this->data);\n $contacts[] = $newContact;\n }\n else {\n foreach ($this->data as $contact) {\n $newContact = $this->parseData($contact);\n $contacts[] = $newContact;\n }\n }\n\n return $contacts;\n }", "public function getCustomInfo() {\n\t\treturn $this->custom_info;\n\t}", "public function getSource()\n {\n return 'contacts';\n }", "public function getInfo ()\n {\n return $this->info;\n }", "public function getContactsList() {\n return $this->_get(6);\n }", "public function contacts()\n {\n return $this->hasOne(Contact::class);\n }", "public function getContact()\n {\n return \\View::make(\"ishu.contact\");\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }", "public function getInfo()\n {\n return $this->info;\n }" ]
[ "0.77773935", "0.729121", "0.729121", "0.729121", "0.72665775", "0.7256344", "0.7149975", "0.71452886", "0.6844479", "0.6794244", "0.658297", "0.65391105", "0.6429791", "0.64087987", "0.6387042", "0.630271", "0.62434536", "0.62045443", "0.6178928", "0.6142353", "0.61272514", "0.61272514", "0.61270726", "0.6115195", "0.61095613", "0.60818934", "0.60487974", "0.6027327", "0.6014215", "0.60121226", "0.5938872", "0.58992463", "0.58444846", "0.57321703", "0.57263106", "0.5708956", "0.57085943", "0.56739724", "0.5662602", "0.5638552", "0.56058455", "0.5591887", "0.55872107", "0.55863386", "0.5584089", "0.5558975", "0.55570596", "0.55518925", "0.5540838", "0.55339175", "0.5508676", "0.55029345", "0.5500238", "0.54969096", "0.5474316", "0.54631245", "0.54556084", "0.5452485", "0.54497933", "0.5448079", "0.544285", "0.542502", "0.54044455", "0.5401957", "0.53988236", "0.5380373", "0.5362757", "0.534905", "0.5332925", "0.53300524", "0.5326034", "0.53229606", "0.53189015", "0.5317489", "0.53070223", "0.5303565", "0.5301232", "0.5299749", "0.52946687", "0.52678984", "0.5225668", "0.521655", "0.52137524", "0.5211776", "0.52070975", "0.5203911", "0.5203808", "0.5201751", "0.51908404", "0.51821905", "0.5178374", "0.5176462", "0.51764333", "0.51757556", "0.51757556", "0.51757556", "0.51757556", "0.51757556", "0.51757556", "0.51757556" ]
0.7819706
0
Get the maximum amount of participants.
Получить максимальное количество участников.
public function getMaxParticipants() { return $this->maxParticipants; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMaxParticipants()\n {\n return $this->max_participants;\n }", "public function limitPerParticipant()\n {\n if ($this->acceptsGuestEntries()) {\n return;\n }\n\n $limit = $this->settings['limit-per-participant'] ?? 1;\n\n return $limit !== -1 ? $limit : null;\n }", "public function getMaximumAttempts();", "public function getMaxPlayers(): int;", "public function getMaxPlayers() : int {\r\n\r\n return (int) $this->getMain()->getDatabase()->get(\"max_players\", [\"table\" => \"Games\", \"name\" => $this->getName()])->fetchArray()[0];\r\n\r\n }", "public function getMaxChatters()\n {\n return $this->maxChatters;\n }", "public function getNbParticipants()\n {\n return $this->nbParticipants;\n }", "public function getMaximumAttendees()\n {\n $query = 'select count(attendeeID) from attendees';\n if ($this->connectedModel->runQuery($query)) //query\n {\n if ($row = $this->connectedModel->getResultsRow())\n return $row[0]; //count()\n }\n else\n {\n return -1;\n }\n }", "public function getMaxcount()\n {\n return $this->maxCount;\n }", "public function getMaxLimit()\n {\n return $this->max_limit;\n }", "public function getCountMax(): int\n {\n return $this->countMax;\n }", "public function getMaximumAttendeesCount()\n {\n if (array_key_exists(\"maximumAttendeesCount\", $this->_propDict)) {\n return $this->_propDict[\"maximumAttendeesCount\"];\n } else {\n return null;\n }\n }", "public function getLimit() : int\n {\n return $this->limit;\n }", "public function maxAttempts()\n {\n return property_exists($this, 'maxAttempts') ? $this->maxAttempts : 5;\n }", "protected function getMaxItemsCount()\n {\n return $this->getParam(self::PARAM_MAX_ITEMS_TO_DISPLAY) ?: $this->getMaxCountInBlock();\n }", "public function limit(): int\n {\n return $this->limit;\n }", "public function getMaximumItemCount()\n {\n return $this->maximumItemCount;\n }", "public function getMaxPerUserId()\n {\n return $this->maxPerUserId;\n }", "public function get_maximum_tries() {\n $max = 1;\n foreach ($this->get_response_class_ids() as $responseclassid) {\n $max = max($max, $this->get_response_class($responseclassid)->get_maximum_tries());\n }\n return $max;\n }", "public function getMaxResults()\n {\n return $this->max_results;\n }", "public function getMaxNumber()\n {\n return $this->maxNumber;\n }", "public function GetMaxCount ();", "public function getMaxMessage()\n {\n return $this->getOption('max_message', 'Please add not more than %max% '\n .'number of objects.');\n }", "public function getLimit();", "public function getLimit();", "public function getLimit();", "public function getLimit();", "public function getLimit();", "public function getMaxItems()\n {\n return isset($this->max_items) ? $this->max_items : 0;\n }", "public function getMaxItemsCount() {\n\t\t\treturn $this->maxItemsCount;\n\t\t}", "public function getMax() {\n return $this->max;\n }", "public function setMaxParticipants($maxParticipants) {\n $this->maxParticipants = $maxParticipants;\n }", "public function getLimit ()\r\n\t{\r\n\t\treturn $this->limit;\r\n\t}", "public function getMaximum()\n {\n return $this->max;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "public function getLimit()\n {\n return $this->limit;\n }", "protected function getLimit()\n {\n return (int)$this->getSettingsValue('limit');\n }", "public function getLimit() {}", "public function setMaxParticipants($max_participants)\n {\n $this->max_participants = $max_participants;\n }", "public function getMaximum()\n {\n return $this->maximum;\n }", "final public static function HpsMaximumNumberOfRetryTransactionWasBreached()\n {\n return self::get(822);\n }", "protected function get_max_length(): int\n\t{\n\t\treturn $this->end < $this->total ? $this->length : -1;\n\t}", "public function setMaxParticipants(int $maxParticipants): self\n {\n $this->options['maxParticipants'] = $maxParticipants;\n return $this;\n }", "public function getLimit() {\n\t\treturn $this->limit;\n\t}", "public function getMaxPower() {\r\n return $this->getMemberCount() * $this->factionsLevel->getSettings()->maxPowerPerUser;\r\n }", "public function getMax()\n {\n return $this->_maxValue;\n }", "public function getMaxFindings()\n {\n return $this->max_findings;\n }", "public function max_connections()\n {\n $channel = ChannelRepository::getPublic($this);\n\n return $channel->max_connections;\n }", "public function getMaxCount(): ?int\n {\n return $this->maxCount;\n }", "public function getMaxItems() {\n\t\t$q = $this->bdd->prepare('SELECT count(1) FROM items');\n\t\t$q->execute();\n\t\treturn intval($q->fetch(PDO::FETCH_COLUMN));\n\t}", "public function getLimit()\n {\n return $this->number_of_items_per_page;\n }", "public static function getApproxMaxTour()\n\t{\n\t\t$playersCount = Yii::app()->db->createCommand()\n\t\t\t->select('count(*)')\n\t\t\t->from(Player::tableName())\n\t\t\t->queryScalar();\n\t\t$tourCount=ceil(log($playersCount,2)) + ceil(log(Yii::app()->params['accuracyCount'],2));\n\t\treturn (int)$tourCount;\n\t}", "public function getItemsMax() {\n\t\treturn \\Services::get('submission')->getMax($this->_getItemsParams());\n\t}", "public function getMaxRetries()\n {\n return $this->_maxRetries;\n }", "public function maxTries();", "public function maxAttempts(): int\n {\n return 5;\n }", "public function getLimit()\n {\n return $this->_limit;\n }", "function max() { return $this->max; }", "public function getSlotMaxAttribute()\n {\n return ($this->trainer_slot_id ? $this->trainer_count * $this->slot_max_potential : $this->slot_max_potential);\n }", "public function getMaxValue()\n {\n return $this->get('MaxValue');\n }", "public function getMaximum() {\r\n return $this->maximumvalue;\r\n }", "public function getMax(): int;", "public function getMaxCount(): ?int\n {\n if ($this->fallback_params) {\n return null;\n }\n $prop_max_count = 0;\n foreach ($this->properties as $property) {\n if (!$property->isNever()) {\n $prop_max_count++;\n }\n }\n assert($prop_max_count !== 0);\n return $prop_max_count;\n }", "public function getMaxValue();", "public function getMaxValue();", "function getMax() { return $this->readMaxValue(); }", "public function getNotificationCounterMax()\n {\n return self::NOTIFICATIONS_COUNTER_MAX;\n }", "public function getLimit()\n {\n return isset($this->limit) ? $this->limit : 0.0;\n }", "public function getMaxClients()\n {\n return $this->_maxClients;\n }", "public static function getMaxUsedNumber()\n {\n $query = new Query;\n\n $query->select('recepient_num, count(recepient_num) as quan')\n ->from('call')\n ->groupBy('recepient_num')\n ->orderBy('quan desc')\n ->limit(1);\n\n $rows = $query->all();\n\n return $rows[0]['recepient_num'];\n }", "function getMaxValue() { return $this->readMaxValue(); }", "public function limit(): int\n {\n return $this->per_page;\n }", "public function getMaxNbChilds()\n {\n return $this->getOption('max', 0);\n }", "public function getMaxConnections() {\n return @$this->attributes['max_connections'];\n }", "public function getProgressLimit()\n {\n if ($this->progressLimit === null) {\n $this->setProgressLimit($this->config->get('concrete.i18n.community_translation.progress_limit', 90));\n }\n\n return $this->progressLimit;\n }", "public function getMaxRounds() {\n\t\treturn $this->maxRounds;\n\t}", "public function maxCount($var = null): int\n {\n return $this->loadHeaderProperty(\n 'max_count',\n $var,\n static function ($value) {\n return (int)($value ?? Grav::instance()['config']->get('system.pages.list.count'));\n }\n );\n }", "function getNota_max()\n {\n if (!isset($this->inota_max) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->inota_max;\n }", "function getNota_max()\n {\n if (!isset($this->inota_max) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->inota_max;\n }", "public function getLimit() {\n return $this->limit;\n }", "public function mutualFriendCount(): int\n {\n return $this->pluck('mutualFriendsCount');\n }", "public function mutualFriendCount(): int\n {\n return $this->pluck('mutualFriendsCount');\n }", "public function getLimit()\n {\n return $this->getParameter('limit');\n }", "abstract public function maxMax(): int;", "public function getMessageLimit() {\n if (isset($this->_quotausage['MESSAGE']['limit'])) {\n return $this->_quotausage['MESSAGE']['limit'];\n }\n return 0;\n }", "public function getMaximumQuantity()\n {\n return $this->maximumQuantity;\n }", "public function getMaximumAmount()\n\t{\n\t\treturn ['amount' => 5000.00, 'currency' => 'EUR'];\n\t}", "public function getPlayersNbr ()\r\n {\r\n return $this->playersNbr;\r\n }", "public function getLimit()\n {\n return self::LIMIT;\n }", "public function getMaxSize(): int\n {\n return $this->maxSize;\n }" ]
[ "0.83796704", "0.73337865", "0.7174557", "0.71393937", "0.7088084", "0.6965768", "0.6949374", "0.6934905", "0.6926936", "0.6925162", "0.68878186", "0.6872525", "0.67364603", "0.67028195", "0.66730255", "0.665985", "0.66541666", "0.6636262", "0.66084987", "0.6601371", "0.66003674", "0.65445954", "0.6509324", "0.648952", "0.648952", "0.648952", "0.648952", "0.648952", "0.6482105", "0.6469523", "0.6441155", "0.64118123", "0.6411434", "0.6408419", "0.640243", "0.640243", "0.640243", "0.640243", "0.640243", "0.640243", "0.640243", "0.640243", "0.640243", "0.640243", "0.640243", "0.640243", "0.63949734", "0.6394011", "0.63876444", "0.63722646", "0.6361009", "0.6356118", "0.63560706", "0.6355748", "0.6350027", "0.6347493", "0.63425237", "0.6338139", "0.6327275", "0.6323975", "0.63080317", "0.62914693", "0.627396", "0.6269625", "0.6258641", "0.6239832", "0.6202036", "0.6178453", "0.6177626", "0.6168914", "0.61659616", "0.61549205", "0.6147683", "0.61448693", "0.61448693", "0.6132627", "0.6131756", "0.6128615", "0.612306", "0.6119415", "0.60971874", "0.60862416", "0.6080886", "0.60790133", "0.607101", "0.60703874", "0.6068117", "0.6064642", "0.6064642", "0.6051118", "0.60480094", "0.60480094", "0.6041882", "0.6040869", "0.60363", "0.6029582", "0.6028328", "0.6027256", "0.6027016", "0.60241556" ]
0.8278022
1
Get the booking period.
Получить период бронирования.
public function getBookingPeriod() { return $this->bookingPeriod; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPeriod() {}", "public function getPeriod();", "public function getPeriod()\n {\n return $this->period;\n }", "public function getPeriod()\n {\n return $this->period;\n }", "public function getPeriod()\n {\n return $this->period;\n }", "public function getPeriod()\n {\n return $this->period;\n }", "public function getPeriod()\n\t{\n\t\treturn $this->period;\n\t}", "public function period()\n {\n return $this->hasOne(Period::class, 'id', 'id');\n }", "public function getBookingPeriodPricing(Period $period)\n {\n $bookingPeriod = $this->getBookingPeriod($period);\n\n return $bookingPeriod->purchasedAt;\n }", "public function getActivatedPeriod()\n {\n if ($this->isDeactivatedPermanently() === false)\n throw new LogicException('The record is not deactivated permanently, and therefore has no finite, active period.');\n \n $invoker = $this->getInvoker();\n $until = $invoker->{$this->_options['until']['name']} === null?\n 'today' : $invoker->{$this->_options['until']['name']};\n \n return new DatePeriod(\n new DateTime($until),\n new DateInterval('P1D'),\n new DateTime($invoker->{$this->_options['from']['name']})\n );\n }", "public function getTabsBooking()\n {\n\n // Get the booking object\n $bookingCheck = \\tabs\\api\\client\\ApiClient::getApi()->get(\n \"/booking/{$this->getBookingId()}/tabsbooking\"\n );\n if ($bookingCheck\n && $bookingCheck->status == 200\n && $bookingCheck->response != ''\n ) {\n return \\tabs\\api\\booking\\TabsBooking::createFromNode(\n $bookingCheck->response\n );\n } else {\n throw new \\tabs\\api\\client\\ApiException(\n $bookingCheck,\n \"Booking not found\"\n );\n }\n }", "public function getCalendarPeriod()\n {\n return $this->readOneof(8);\n }", "public function getReminderPeriod()\n {\n return $this->reminderPeriod;\n }", "public function getInvoicePeriod()\n {\n return $this->invoicePeriod;\n }", "public function getPeriodo()\n {\n return $this->periodo;\n }", "public function getPeriod() : int\n {\n return $this->period;\n }", "public function getDeactivatedPeriod()\n {\n if ($this->isDeactivatedTemporarily() === false)\n throw new LogicException('The record is not deactivated temporarily, and therefore has no finite, deactivated period.');\n \n $invoker = $this->getInvoker();\n \n return new DatePeriod(\n new DateTime($invoker->{$this->_options['from']['name']}),\n new DateInterval('P1D'),\n new DateTime($invoker->{$this->_options['until']['name']})\n );\n }", "public function getEffectivePeriod()\n {\n return $this->effectivePeriod;\n }", "public function getPeriodto()\n {\n return $this->periodto;\n }", "public function getPeriodfrom()\n {\n return $this->periodfrom;\n }", "public function getEntity(): Booking\n {\n return (new Booking())\n ->setBeginsAt(new \\DateTime('2050/11/20'))\n ->setEndsAt(new \\DateTime('2050/11/25'))\n ->setTotalOccupiers(3);\n }", "public function get_recurring_period(){\n\t\treturn $this->payment['recurring_period'];\n\t}", "public function getPeriod(){\n\t\tif($this->_year>1970&&$this->_year<2038){\n\t\t\treturn date('Ym', $this->_timestamp);\n\t\t} else {\n\t\t\t$dateParts = self::_getDateParts($this->_timestamp, false);\n\t\t\treturn $dateParts['year'].$dateParts['mon'];\n\t\t}\n\t}", "public function getPeriodSinceActive()\n {\n return $this->calculatePeriodDifference($this->last_active);\n }", "public function getPeriodDatesProperty()\n {\n $now = Carbon::now()->timezone(\"America/Bogota\");\n $min = $now->copy();\n $max = $now->copy();\n\n switch ($this->period) {\n case 'today':\n break;\n case 'yesterday':\n $min->subDay();\n $max->subDay();\n break;\n case 'thisWeek':\n $min->startOfWeek();\n $max->endOfWeek();\n break;\n case 'lastWeek':\n $min->subWeek()->startOfWeek();\n $max->subWeek()->endOfWeek();\n break;\n case 'thisFortnight':\n if ($min->day > 15) {\n $min->day(16);\n $max->endOfMonth();\n } else {\n $min->startOfMonth();\n $max->startOfMonth()->addDays(14);\n }\n break;\n case 'lastFortnight':\n if ($min->day > 15) {\n $min->startOfMonth();\n $max->startOfMonth()->addDays(14);\n } else {\n $min->subMonth()->day(16);\n $max->subMonth()->endOfMonth();\n }\n break;\n case 'thisMonth':\n $min->startOfMonth();\n $max->endOfMonth();\n break;\n case 'lastMonth':\n $min->subMonth()->startOfMonth();\n $max->subMonth()->endOfMonth();\n break;\n\n default:\n # code...\n break;\n }\n\n $min->startOfDay();\n $max->endOfDay();\n $format = 'd-m-y H:i:s';\n\n return [\n 'min' => $min,\n 'minView' => $min->format($format),\n 'max' => $max,\n 'maxView' => $max->format($format),\n ];\n }", "protected function getPeriodHash()\n {\n if($this->periodTo === null && $this->periodFrom === null) {\n return false;\n }\n\n $period = array(\n 'from' => static::PERIOD_DATE_ZERO,\n 'to' => ''\n );\n\n if($this->periodFrom) {\n $period['from'] = $this->periodFrom->format(static::PERIOD_DATE_FORMAT);\n }\n\n // If no 'to' date is set, assume the current date.\n if($this->periodTo) {\n $period['to'] = $this->periodTo->format(static::PERIOD_DATE_FORMAT);\n } else {\n $period['to'] = date(static::PERIOD_DATE_FORMAT);\n }\n\n return $period;\n }", "public function getForecastPeriod()\n {\n return $this->forecast_period;\n }", "public function period()\n {\n return $this->belongsTo('App\\Period');\n }", "public function definePeriod($period)\n {\n return $period;\n }", "public function getForecastPeriod()\n {\n return $this->forecastPeriod;\n }", "private static function get_limit_period_dates( $period ) {\n\t\tif ( empty( $period ) ) {\n\t\t\treturn array( 'start_date' => null, 'end_date' => null );\n\t\t}\n\n\t\tswitch ( $period ) {\n\t\t\tcase 'day':\n\t\t\t\treturn array(\n\t\t\t\t\t'start_date' => current_time( 'Y-m-d' ),\n\t\t\t\t\t'end_date' => current_time( 'Y-m-d 23:59:59' ),\n\t\t\t\t);\n\t\t\t\tbreak;\n\n\t\t\tcase 'week':\n\t\t\t\treturn array(\n\t\t\t\t\t'start_date' => gmdate( 'Y-m-d', strtotime( 'Monday this week' ) ),\n\t\t\t\t\t'end_date' => gmdate( 'Y-m-d 23:59:59', strtotime( 'next Sunday' ) ),\n\t\t\t\t);\n\t\t\t\tbreak;\n\n\t\t\tcase 'month':\n\t\t\t\t$month_start = gmdate( 'Y-m-1');\n\t\t\t\treturn array(\n\t\t\t\t\t'start_date' => $month_start,\n\t\t\t\t\t'end_date' => gmdate( 'Y-m-d H:i:s', strtotime( \"{$month_start} +1 month -1 second\" ) ),\n\t\t\t\t);\n\t\t\t\tbreak;\n\n\t\t\tcase 'year':\n\t\t\t\treturn array(\n\t\t\t\t\t'start_date' => gmdate( 'Y-1-1' ),\n\t\t\t\t\t'end_date' => gmdate( 'Y-12-31 23:59:59' ),\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t}\n\t}", "private function getParamPeriodEnd()\n {\n $periodEnd = JFactory::getApplication()->input->get('periodEnd', '', 'string');\n return $periodEnd === '' ? null : new DateTime( $periodEnd );\n }", "static function getLifetime()\n {\n return new Am_Period(self::MAX_SQL_DATE);\n }", "public function getRatePeriod()\n {\n return $this->ratePeriod;\n }", "function get_booking(){\r\n\t\tglobal $EM_Booking;\r\n\t\tif( is_object($this->booking) && get_class($this->booking)=='EM_Booking' && ($this->booking->id == $this->booking_id || (empty($this->id) && empty($this->booking_id))) ){\r\n\t\t\treturn $this->booking;\r\n\t\t}elseif( is_object($EM_Booking) && $EM_Booking->id == $this->booking_id ){\r\n\t\t\t$this->booking = $EM_Booking;\r\n\t\t}else{\r\n\t\t\tif(is_numeric($this->booking_id)){\r\n\t\t\t\t$this->booking = new EM_Booking($this->booking_id);\r\n\t\t\t}else{\r\n\t\t\t\t$this->booking = new EM_Booking();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn apply_filters('em_ticket_booking_get_booking', $this->booking, $this);;\r\n\t}", "public function getActivationPeriodAttribute()\n {\n return [$this->{$this->starts_at_field}, $this->{$this->ends_at_field}];\n }", "public function getSuspendPeriodUntil(): ?DateTime {\n return $this->suspendPeriodUntil;\n }", "public function getEndDate();", "public function getEndDate();", "public function getAdvanceBookingRequirement() {\n\t\treturn $this->advanceBookingRequirement;\n\t}", "public function periods()\n {\n return $this->hasMany(Period::class);\n }", "public function plan_period(){\n return $this->belongsTo(config('subscriptions.models.period'), 'period_id')->withoutGlobalScope('publics');\n }", "private function getLastPayPeriodEnd(){ $myq = getCurrentPayPeriod();\r\n $result = getQueryResult($this->config, $myq, $debug = false);\r\n $ppArray = $result->fetch_assoc();\r\n $startDate = $ppArray['PPBEG'];\r\n $this->lastPayStart = date('Y-m-d', strtotime('-14 days', strtotime($startDate)));\r\n $endDate = $ppArray['PPEND'];\r\n $this->lastPayEnd = date('Y-m-d', strtotime('-14 days', strtotime($endDate)));\r\n\r\n return $endDate;\r\n }", "public function getBookingStatus()\n {\n return isset($this->BookingStatus) ? $this->BookingStatus : null;\n }", "public function booking()\n {\n return $this->hasOne('App\\Booking','id_stato_prenotazione','id_stato_prenotazione');\n }", "public function getRequestedDeliveryPeriod()\n {\n return $this->requestedDeliveryPeriod;\n }", "public function periodoActual()\n\t{\n\t\t$sql = \"SELECT semesterId FROM course_module LEFT JOIN subject_module ON subject_module.subjectModuleId = course_module.subjectModuleId WHERE courseId = '{$this->courseId}' ORDER BY semesterId DESC LIMIT 1\"; \n\t\t$this->Util()->DB()->setQuery($sql);\n\t\t$periodo = $this->Util()->DB()->GetSingle();\n\t\treturn $periodo;\n\t}", "private function getLastPeriod(): Period\n {\n $count = \\count($this->getPeriods());\n\n // We don't use end() to not modify the internal pointer of the array\n return $this->getPeriods()[$count - 1];\n }", "public function getValidityPeriod()\n {\n return $this->validityPeriod;\n }", "public function getInGracePeriodUntilDateTime()\n {\n if (array_key_exists(\"inGracePeriodUntilDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"inGracePeriodUntilDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"inGracePeriodUntilDateTime\"])) {\n return $this->_propDict[\"inGracePeriodUntilDateTime\"];\n } else {\n $this->_propDict[\"inGracePeriodUntilDateTime\"] = new \\DateTime($this->_propDict[\"inGracePeriodUntilDateTime\"]);\n return $this->_propDict[\"inGracePeriodUntilDateTime\"];\n }\n }\n return null;\n }", "public function getSuspendPeriodFrom(): ?DateTime {\n return $this->suspendPeriodFrom;\n }", "public static function getResourceURI()\n {\n return 'LeavePeriod';\n }", "public function get(int $offset): Period\n {\n return $this->periods[$this->getOffset($offset)];\n }", "public function getRelatedRecord(): IActivityPeriodRelated\n {\n return $this->card;\n }", "public function periodRanges(): Collection\n {\n return Period::makeRanges($this->getConfig('strategy.keep-backups', []));\n }", "public function getNotificationPeriod() {\n\t\treturn $this->notificationPeriod;\n\t}", "function wpbs_get_booking($booking)\n{\n\n return wp_booking_system()->db['bookings']->get_object($booking);\n\n}", "public function getCustomPeriod()\n {\n return $this->readOneof(9);\n }", "public function getBookingsByDate(Request $request)\n {\n $booking_obj = new Booking();\n return $booking_obj->getFutureBookingsByServiceAndDate($request->sv_id, $request->start, $request->end);\n }", "public function getMonitoringPeriod()\n {\n return $this->monitoringPeriod;\n }", "function get_pending_bookings(){\n\t\tif( get_option('dbem_bookings_approval') == 0 ){\n\t\t\treturn new EM_Bookings();\n\t\t}\n\t\t$pending = array();\n\t\tforeach ( $this->load() as $EM_Booking ){\n\t\t\tif($EM_Booking->booking_status == 0){\n\t\t\t\t$pending[] = $EM_Booking;\n\t\t\t}\n\t\t}\n\t\t$EM_Bookings = new EM_Bookings($pending);\n\t\treturn $EM_Bookings;\t\n\t}", "public function findLatest(): Booking\n {\n return $this->bookingRepository->getLatest();\n }", "public function periodAction() {\n\tif($this->_getParam('id',false)){\n\t$this->view->periods = $this->_periods->getPeriodDetails($this->_getParam('id'));\n\t} else {\n\t\tthrow new Exception($this->_missingParameter);\n\t}\n\t}", "public function index()\n {\n $p = Period::latest()->get();\n return new PeriodCollection($p);\n }", "public function booking()\n {\n return $this->hasMany(Booking::class);\n }", "public function getDebouncePeriod()\n {\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_DEBOUNCE_PERIOD, $payload);\n\n $payload = unpack('V1debounce', $data);\n\n return IPConnection::fixUnpackedUInt32($payload['debounce']);\n }", "protected function _getBookingOptions(){\n\t\t$product = $this->getProduct();\n if(!is_object($product->getCustomOption(AW_Booking_Model_Product_Type_Bookable::FROM_DATE_OPTION_NAME))){\n $source = unserialize($product->getCustomOption('info_buyRequest')->getValue());\n $from_date = $source['aw_booking_from'];\n $to_date = $source['aw_booking_to'];\n\n $data = array(\n new Zend_Date($from_date, Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT)),\n new Zend_Date($to_date, Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT))\n );\n }\n else{\n $data = array(\n //new Zend_Date($product->getCustomOption('aw_booking_from')->getValue().\" \". $product->getCustomOption('aw_booking_time_from')->getValue(), Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_FULL)),\n new Zend_Date($product->getCustomOption('aw_booking_from')->getValue().\" \". $product->getCustomOption('aw_booking_time_from')->getValue(), AW_Core_Model_Abstract::DB_DATETIME_FORMAT),\n //new Zend_Date($product->getCustomOption('aw_booking_to')->getValue().\" \". $product->getCustomOption('aw_booking_time_to')->getValue(), Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_FULL))\n new Zend_Date($product->getCustomOption('aw_booking_to')->getValue().\" \". $product->getCustomOption('aw_booking_time_to')->getValue(), AW_Core_Model_Abstract::DB_DATETIME_FORMAT),\n );\n }\n\t\t\n\t\treturn array(\n\t\t\tarray('label' => $this->__('From'), 'value' => $this->formatDate($data[0], 'short', $this->getProduct()->getAwBookingRangeType() != 'date_fromto')),\n\t\t\tarray('label' => $this->__('To'), 'value' => $this->formatDate($data[1], 'short', $this->getProduct()->getAwBookingRangeType() != 'date_fromto'))\n\t\t);\n\t}", "public function getEndDateAndTime() {}", "public function getPeriodoPagoActivo()\n {\n $periodo_activo = $this->em->getRepository('PlanillasNomencladorBundle:NPeriodoPago')\n ->findOneBy(array(\n 'activo' => true\n ));\n\n if (!$periodo_activo) {\n throw new \\Exception('No se existe un periodo de pago activo en el sistema, debe registrar al menos uno.');\n }\n\n return $periodo_activo;\n }", "public function reportingPeriod()\n {\n return $this->belongsTo(ReportingPeriod::class);\n }", "public function getAngularVelocityPeriod()\n {\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_ANGULAR_VELOCITY_PERIOD, $payload);\n\n $payload = unpack('V1period', $data);\n\n return IPConnection::fixUnpackedUInt32($payload['period']);\n }", "protected function getLeaveAssignDateLimit() {\n // If no leave period, don't allow apply/assign beyond next calender year\n $todayNextYear = new DateTime();\n $todayNextYear->add(new DateInterval('P1Y'));\n \n if ($this->getConfigService()->isLeavePeriodDefined()) {\n $period = $this->getLeavePeriodService()->getCurrentLeavePeriodByDate($todayNextYear->format('Y-m-d'));\n $maxDate = $period[1];\n } else {\n $nextYear = $todayNextYear->format('Y');\n $maxDate = $nextYear . '-12-31';\n } \n \n return $maxDate;\n }", "public function store(PeriodRequest $request)\n {\n $period = new Period();\n $period->begining_date = $request->begining_date;\n $period->ending_date = $request->ending_date;\n $period->is_current = $request->is_current;\n $period->pay_month = $request->pay_month;\n $period->pay_year = $request->pay_year;\n $period->save();\n \n return new PeriodResource($period);\n }", "public function getAvailableTill()\n {\n if ($this->AvailableTillDate) {\n return $this->dbObject('AvailableTillDate');\n } elseif ($startDate = $this->getEventStartDate()) {\n $till = strtotime(self::config()->get('sale_end_threshold'), strtotime($startDate->getValue()));\n $date = DBDatetime::create();\n $date->setValue(date('Y-m-d H:i:s', $till));\n return $date;\n }\n\n\n return null;\n }", "public function getBillableActivityDateRange()\n {\n return isset($this->billable_activity_date_range) ? $this->billable_activity_date_range : null;\n }", "public function getEnd()\n {\n return $this->getLatestPeriod()->getEnd();\n }", "public static function getScheduleService($servicId, $timestamp) {\n $bookedArr = array();\n $availabilityArr = array();\n $date = date('Y-m-d',$timestamp);\n \n //get already booked spot\n $booking = Booking::select('bd.start_time','bd.end_time')\n ->join('bookings_details as bd','bookings.id','=','bd.booking_id')\n ->where('service_id',$servicId)\n ->where(DB::raw(\"date(start_time)\"),'=',$date)->get()->toArray();\n \n if($booking){\n foreach ($booking as $key => $value) {\n $bookedArr[] = date(\"H:i\", strtotime($value['start_time']));\n }\n }\n //end code\n \n $service = Service::find($servicId);\n $closeTime = $service->close_booking_before_time != \"\" ? $service->close_booking_before_time : 30;\n $int = $service->duration;\n \n if ($service->service_type != 'weekly') {\n $n = 0;\n $start_time = explode(':', $service['start_time']);\n $startMinutes = ($start_time[0]*60) + ($start_time[1]) + ($start_time[2]/60);\n\n $end_time = explode(':', $service['end_time']);\n $endMinutes = ($end_time[0]*60) + ($end_time[1]) + ($end_time[2]/60);\n\n $st = date(\"Y-m-d H:i\", strtotime($date . \" +\" . $startMinutes . \" minutes\"));\n $et = date(\"Y-m-d H:i\", strtotime($date . \" +\" . $endMinutes . \" minutes\"));\n \n $a = $st;\n $b = date(\"Y-m-d H:i\", strtotime($a . \" +\" . $int . \" minutes\")); //default value for B is start time.\n\n for ($a = $st; $b <= $et; $b = date(\"Y-m-d H:i\", strtotime($a . \" +\" . $int . \" minutes\"))) {\n //echo \"a: \".$a.\" // \".\"b: \".$b.\"<br />\";\n\n //$availabilityArr[date(\"Y-m-d\", strtotime($a))][] = date(\"H:i\", strtotime($a));\n if(strtotime($a) > strtotime('+'.$closeTime.' minutes', time())){\n $availabilityArr[] = date(\"H:i\", strtotime($a));\n }\n $a = $b;\n $n++;\n }\n }\n \n if ($service->service_type == 'weekly') {\n $dayOfWeek = date(\"w\", strtotime($date));\n $schedule = Schedule::where('service_id', $servicId)->where('week_number',$dayOfWeek)->get()->toArray();\n $n = 0;\n for ($i = 0; $i < count($schedule); $i++) {\n $start_time = explode(':', $schedule[$i]['start_time']);\n $startMinutes = ($start_time[0]*60) + ($start_time[1]) + ($start_time[2]/60);\n \n $end_time = explode(':', $schedule[$i]['end_time']);\n $endMinutes = ($end_time[0]*60) + ($end_time[1]) + ($end_time[2]/60);\n \n $st = date(\"Y-m-d H:i\", strtotime($date . \" +\" . $startMinutes . \" minutes\"));\n $et = date(\"Y-m-d H:i\", strtotime($date . \" +\" . $endMinutes . \" minutes\"));\n \n $a = $st;\n $b = date(\"Y-m-d H:i\", strtotime($a . \" +\" . $int . \" minutes\")); //default value for B is start time.\n\n for ($a = $st; $b <= $et; $b = date(\"Y-m-d H:i\", strtotime($a . \" +\" . $int . \" minutes\"))) {\n //echo \"a: \".$a.\" // \".\"b: \".$b.\"<br />\";\n \n //$availabilityArr[date(\"Y-m-d\", strtotime($a))][] = date(\"H:i\", strtotime($a));\n if(strtotime($a) > strtotime('+'.$closeTime.' minutes', time())){\n $availabilityArr[] = date(\"H:i\", strtotime($a));\n }\n $a = $b;\n $n++;\n }\n }\n }\n return array(\"availability\" => $availabilityArr, \"booked\" => $bookedArr, \"duration\" => $int,\"total_spots\" => $n);\n }", "public function calculate_package_period($period)\n {\n // $date = strtotime(date(\"Y-m-d\", strtotime($date)) . \" +1 day\");\n // $date = strtotime(date(\"Y-m-d\", strtotime($date)) . \" +1 week\");\n // $date = strtotime(date(\"Y-m-d\", strtotime($date)) . \" +2 week\");\n // $date = strtotime(date(\"Y-m-d\", strtotime($date)) . \" +1 month\");\n // $date = strtotime(date(\"Y-m-d\", strtotime($date)) . \" +30 days\");\n $today=Date('Y-m-d');\n if($period==1){\n $date = strtotime(date(\"Y-m-d\", strtotime($today)) . \" +3 month\");\n $membership_end = date(\"Y-m-d\", $date);\n }else if($period==0){\n $membership_end='';\n }\n return array('membership_end'=>$membership_end);\n }", "public function length(): Period|null\n {\n $period = reset($this->periods);\n if (false === $period) {\n return null;\n }\n\n return $period->merge(...$this->periods);\n }", "public function getDateRange()\n {\n return $this->date_range;\n }", "public function getEndDate() {\n return $this->endDate;\n }", "public function getDatePeriod($interval, $option = 0)\n {\n return new DatePeriod($this->startDate, static::filterDateInterval($interval), $this->endDate, $option);\n }", "public function getValidUntil()\n {\n if (is_null($this->validUntil)) {\n /** @psalm-var ?string $data */\n $data = $this->raw(self::FIELD_VALID_UNTIL);\n if (is_null($data)) {\n return null;\n }\n $data = DateTimeImmutable::createFromFormat(MapperFactory::DATETIME_FORMAT, $data);\n if (false === $data) {\n return null;\n }\n $this->validUntil = $data;\n }\n\n return $this->validUntil;\n }", "public function get_endDate()\n {\n return $this->_endDate;\n }", "public function getRepeatPropertyBookerDate()\n {\n if ($this->repeatPropertyBookerDate) {\n return new \\DateTime($this->repeatPropertyBookerDate);\n } else {\n return;\n }\n }", "public function getEndDate(){\n\t\treturn $this->endDate;\n\t}", "protected function getTimePeriods() {\n return array(\n '604800', //7 days \n '2678400', //31 days\n '15552000' //180 dats\n );\n }", "public function getEndDate()\n {\n return $this->endDate;\n }", "public function getEndDate()\n {\n return $this->endDate;\n }", "public function getEndDate()\n {\n return $this->endDate;\n }", "public function getEndDate()\n {\n return $this->endDate;\n }", "public function getEndDate()\n {\n return $this->endDate;\n }", "public function getEndDate()\n {\n return $this->endDate;\n }", "public function getBookings(): ?array\n {\n return $this->bookings;\n }", "public function getAllDataPeriod()\n {\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_ALL_DATA_PERIOD, $payload);\n\n $payload = unpack('V1period', $data);\n\n return IPConnection::fixUnpackedUInt32($payload['period']);\n }", "public function booking()\n {\n return $this->hasMany('App\\Models\\Booking');\n }", "public function getPeriod($data,$date2 = null){\n\n if($date2 != null){\n\n $firstDay = $data;\n $lastDay = $date2;\n $periodos[0] = \"$data,$date2\";\n $dataMax = strtotime($date2);\n }else{\n # Get first day of month\n $firstDay = date(\"j-n-Y\",strtotime($data));\n # Get last day of month\n $lastDay = date(\"t-n-Y\",strtotime($data));\n # First period\n $periodos[0] = $firstDay.','.$lastDay;\n #Define the last date\n $dataMax = strtotime($lastDay);\n }\n\n $z = 1;\n\n $current=0;\n # Get first month\n $month = date(\"n\",strtotime($data));\n # Get first year\n $year = date(\"Y\", strtotime($data));\n # While the current date is less than max date, then continue\n while($current <= $dataMax){\n # Get next month\n $month = $month+1;\n # First date's period\n $p1 = \"1-$month-$year\"; //2014-02-01\n # Last day of date's period\n $p2D = date(\"t\",strtotime($p1)); // 28\n # Get second date's period\n $p2 = \"$p2D-$month-$year\";\n #\n $limit1 = strtotime($p1);\n # Check if first date of this period is bigger than max date\n if( $limit1 >= $dataMax){\n break;\n }\n $periodos[$z] = \"$p1,$p2\";\n if($month >= 12)\n {\n $month = 0;\n $year = $year+1;\n }\n\n $current = strtotime($p2);\n if($current >= $dataMax)\n {\n $p2 = date(\"j-n-Y\",$dataMax);\n $periodos[$z] = \"$p1,$p2\";\n break;\n }\n ++$z;\n\n }\n\n return $periodos;\n // $x = 0;\n\n // # Get current month\n // $mon = date(\"m\",strtotime($data));\n // # Get current year\n // $year = date(\"Y\",strtotime($data));\n // # Get periods previous\n // for($i=1;$i < 7;$i++){\n // # Changes of year\n // if($mon-1 == 0){$mon = 12;$year -= 1;}\n // else{--$mon;}\n\n // # Get first day of month\n // $ini = \"1-$mon-$year\";\n // # Get last day of month\n // $end = date(\"t-n-Y\",strtotime($ini));\n // # Get Period\n // $periodos[$i] = \"$ini,$end\";\n // }\n // # Set period\n // $this->periodos = $periodos;\n // # Return period\n // return $periodos;\n }", "private function getParamPeriodStart()\n {\n $periodStart = JFactory::getApplication()->input->get('periodStart', '', 'string');\n return $periodStart === '' ? null : new DateTime( $periodStart );\n }", "public function getBounceRate(Period $period);", "function getBookings($uid, $interval) {\n\n\t\t$bookingsRaw = array();\n\t\t$storagePid = $this->lConf['PIDstorage'];\n\n\t\tif (!isset($uid))\n\t\t\t$uid = $this->lConf['ProductID'];\n\n\t\tif (!isset($interval['startList']) && !isset($interval['endList'])) {\n\t\t\t$interval['startList'] = $interval['startDate'];\n\t\t\t$interval['endList'] = $interval['endDate'];\n\t\t}\n\n\t\tif ($storagePid != '' && $uid != '') {\n\t\t\t// SELECT\n\t\t\t// 1. get for bookings for these uids/pids\n\t\t\t$query = 'pid IN ('. $storagePid .') AND uid_foreign IN ('.$uid.')';\n\t\t\t$query .= ' AND deleted=0 AND hidden=0 AND uid=uid_local';\n\t\t\t$query .= ' AND ( enddate >=('.$interval['startList'].') AND startdate <=('.$interval['endList'].'))';\n\n\t\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('DISTINCT uid_foreign as uid, startdate, enddate, title','tx_abbooking_booking, tx_abbooking_booking_productid_mm',$query,'','startdate','');\n\n\t\t\t// one array for start and end dates. one for each pid\n\t\t\twhile (($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))) {\n\t\t\t\t$bookingsRaw[] = $row;\n\t\t\t};\n\n\t\t}\n\n\t\t$localbookings['bookings'] = $bookingsRaw;\n\n \t\treturn $localbookings;\n\n\t}" ]
[ "0.7230923", "0.71676385", "0.6909265", "0.6909265", "0.6909265", "0.6909265", "0.67613584", "0.65692484", "0.6470812", "0.64168024", "0.63482606", "0.6346187", "0.6337608", "0.6302562", "0.6266849", "0.62030804", "0.6163268", "0.6121682", "0.61178577", "0.6074483", "0.605462", "0.60427153", "0.5926231", "0.58546764", "0.58341354", "0.58319277", "0.5800109", "0.57643634", "0.571134", "0.5699192", "0.5680349", "0.5657198", "0.56380796", "0.55754864", "0.55708987", "0.5555832", "0.55468786", "0.5520602", "0.5520602", "0.5513982", "0.5513064", "0.54583704", "0.54128104", "0.54000306", "0.5398719", "0.5395864", "0.5378872", "0.5365358", "0.5361638", "0.5338636", "0.5319199", "0.53182536", "0.5315853", "0.5314297", "0.52952415", "0.52911735", "0.527456", "0.5269797", "0.52695054", "0.52499336", "0.52464914", "0.52198106", "0.51821643", "0.51814115", "0.5173881", "0.51627463", "0.5154701", "0.5151584", "0.51368916", "0.5136495", "0.5127861", "0.51238304", "0.51229495", "0.51087815", "0.50981015", "0.5092109", "0.5077159", "0.50693065", "0.50586367", "0.5054345", "0.50469327", "0.50268346", "0.4995916", "0.49921563", "0.49804735", "0.49734193", "0.49726626", "0.4970088", "0.4970088", "0.4970088", "0.4970088", "0.4970088", "0.4970088", "0.49676353", "0.49670047", "0.4965753", "0.49632382", "0.4952044", "0.49491495", "0.49475634" ]
0.85103947
0
Set the calendar data for the event.
Задайте данные календаря для события.
public function setCalendar(CultureFeed_Cdb_Data_Calendar $calendar) { $this->calendar = $calendar; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setData($data)\n {\n $this->date=$data;\n }", "function setEvent($year,$month,$day,$id=false,$url=false){\n$eventTime=$this->mkActiveTime(0,0,1,$month,$day,$year);\n\tif (!$id) $id=$this->cssEvent;\n$this->calEvents[$eventTime]=$id;\n$this->calEventsUrl[$eventTime]=$url;\n}", "public function setDates($calendarDate) {\r\n $year=substr($calendarDate,0,4);\r\n $month=substr($calendarDate,5,2);\r\n $day=substr($calendarDate,8,2);\r\n $this->calendarDate=$calendarDate;\r\n $this->day=$year . $month . $day;\r\n $this->month=$year . $month; \r\n $this->year=$year;\r\n $this->week=$year . weekNumber($calendarDate);\r\n }", "protected function setMessage(\\Google_Service_Calendar_Event $message)\n\t{\n\t\t$this->id = $message->getId();\n\t\t$this->summary = $message->getSummary();\n\t\t$this->description = $message->getDescription();\n\t}", "function setEventContent($year,$month,$day,$content,$url=false,$id=false){\n$eventTime=$this->mkActiveTime(0,0,1,$month,$day,$year);\n$eventContent[$eventTime]=$content;\n$this->calEventContent[]=$eventContent;\n\tif (!$id) $id=$this->cssEventContent;\n$this->calEventContentId[]=$id;\n\tif ($url) $this->calEventContentUrl[]=$url;\n\telse $this->calEventContentUrl[]=$this->calInit++;\n}", "public function setCalendarID($value)\n {\n return $this->set('CalendarID', $value);\n }", "public function setCalendarID($value)\n {\n return $this->set('CalendarID', $value);\n }", "public function setCalendarID($value)\n {\n return $this->set('CalendarID', $value);\n }", "public function setCalendarID($value)\n {\n return $this->set('CalendarID', $value);\n }", "public function setCalendarID($value)\n {\n return $this->set('CalendarID', $value);\n }", "public function setCalendarID($value)\n {\n return $this->set('CalendarID', $value);\n }", "public function setCalendarID($value)\n {\n return $this->set('CalendarID', $value);\n }", "public function setCalendarID($value)\n {\n return $this->set('CalendarID', $value);\n }", "public function setCalendarID($value)\n {\n return $this->set('CalendarID', $value);\n }", "private function getData()\n {\n $data = array();\n\n $data = array_merge($data,\n $this->services->CalendarData->currentUserData(),\n $this->services->Common->subPageName( $this->timber->translator->trans('Calendar') . \" | \" ),\n $this->services->Common->runtimeScripts( 'calendar' ),\n $this->services->Common->injectScripts(array(\n 'projectsEvents' => $this->services->CalendarData->projectsEvents(),\n 'tasksEvents' => $this->services->CalendarData->tasksEvents(),\n 'projectsEventsColor' => '#ecf0f1',\n 'projectsEventsTextColor' => '#2c3e50',\n 'tasksEventsColor' => '#bdc3c7',\n 'tasksEventsTextColor' => '#2980b9',\n 'calEvent_id' => $this->timber->translator->trans('ID'),\n 'calEvent_iden' => $this->timber->translator->trans('Identifier'),\n 'calEvent_type' => $this->timber->translator->trans('Type'),\n 'calEvent_mi_id' => $this->timber->translator->trans('Milestone ID'),\n 'calEvent_mi_title' => $this->timber->translator->trans('Milestone Title'),\n 'calEvent_pr_id' => $this->timber->translator->trans('Project ID'),\n 'calEvent_owner_id' => $this->timber->translator->trans('Owner ID'),\n 'calEvent_assign_to' => $this->timber->translator->trans('Assignee ID'),\n 'calEvent_assign_to_name' => $this->timber->translator->trans('Assignee Name'),\n 'calEvent_assign_to_email' => $this->timber->translator->trans('Assignee Email'),\n 'calEvent_title' => $this->timber->translator->trans('Title'),\n 'calEvent_description' => $this->timber->translator->trans('Description'),\n 'calEvent_status' => $this->timber->translator->trans('Status'),\n 'calEvent_progress' => $this->timber->translator->trans('Progress'),\n 'calEvent_priority' => $this->timber->translator->trans('Priority'),\n 'calEvent_start_at' => $this->timber->translator->trans('Start at'),\n 'calEvent_end_at' => $this->timber->translator->trans('End at'),\n 'calEvent_created_at' => $this->timber->translator->trans('Created at'),\n 'calEvent_updated_at' => $this->timber->translator->trans('Updated at'),\n 'calEvent_currency' => $this->timber->translator->trans('Currency'),\n 'calEvent_reference' => $this->timber->translator->trans('Reference'),\n 'calEvent_ref_id' => $this->timber->translator->trans('Reference ID'),\n 'calEvent_version' => $this->timber->translator->trans('Version'),\n 'calEvent_budget' => $this->timber->translator->trans('Budget'),\n 'calEvent_tax_value' => $this->timber->translator->trans('Tax Value'),\n 'calEvent_tax_type' => $this->timber->translator->trans('Tax Type'),\n 'calEvent_discount_value' => $this->timber->translator->trans('Discount Value'),\n 'calEvent_discount_type' => $this->timber->translator->trans('Discount Type'),\n 'calEvent_attach' => $this->timber->translator->trans('Attachments'),\n 'calEvent_owners' => $this->timber->translator->trans('Owners'),\n 'calEvent_staff' => $this->timber->translator->trans('Staff'),\n 'calEvent_clients' => $this->timber->translator->trans('Clients'),\n 'calEvent_staff_ids' => $this->timber->translator->trans('Staff IDs'),\n 'calEvent_clients_ids' => $this->timber->translator->trans('Clients IDs'),\n ))\n );\n\n return $data;\n }", "public function get_calender_data()\n\t{\n\treturn $this->cal['VCALENDAR'];\n\t}", "public function setDocumentData($data)\n {\n $this->id = $data['_id'];\n\n if (isset($data['channel_code'])) {\n $this->data['fields']['channel_code'] = (string) $data['channel_code'];\n }\n if (isset($data['time'])) {\n $date = new \\DateTime(); $date->setTimestamp($data['time']->sec); $this->data['fields']['time'] = $date;\n }\n\n\n \n }", "public static function initialize_calendar(){\n \n $event_array[] = array();\n $schedules = \\App\\Event::get();\n if(!empty($schedules)){\n foreach($schedules as $schedule){\n $event_array[] = array(\n 'id' => uniqid(),\n 'title' => $schedule->description,\n 'start' => date('Y-m-d', strtotime($schedule->event_date)),\n 'end' => date('Y-m-d', strtotime($schedule->event_date)),\n 'color' => \"lightblue\",\n \"textEscape\"=> 'false' ,\n 'textColor' => 'black',\n );\n }\n return $get_schedule = json_encode($event_array);\n }\n }", "protected function saveCalendarEvent(Request $request, CalendarEvent $calendar_event): void\n {\n $calendar_event->title = $request->input(\"title\");\n $calendar_event->start = Carbon::parse($request->input(\"start\"));\n $calendar_event->end = Carbon::parse($request->input(\"start\"))->addMinutes(30);\n $calendar_event->user_id = Auth::guard('admin')->check() ? $request->input(\"user_id\") : Auth::user()->getAuthIdentifier();\n $calendar_event->admin_id = $request->input('selectAdmin');\n\n $calendar_event->save();\n }", "public function setDataCalculo($dtDataCalculo) {\n $this->dtDataCalculo = $dtDataCalculo;\n }", "public function initEvent()\n {\n $this->owner->{$this->createdAtField} = date($this->format);\n $this->owner->{$this->updatedAtField} = date($this->format);\n }", "public function update() {\n $hasduedate = isset($this->mumie->duedate) && $this->mumie->duedate > 0;\n if (!$this->event && $hasduedate) {\n $this->create_calendar_event(\n self::EVENT_TYPE,\n $this->mumie->duedate\n );\n } else if ($this->event && $hasduedate) {\n $update = new \\stdClass();\n $update->name = $this->title;\n $update->timestart = $this->mumie->duedate;\n $this->event->update($update, false);\n } else if ($this->event && !$hasduedate) {\n $this->event->delete();\n }\n }", "public function eventsSetData($data) {\r\n\t\t$this->data = $data;\r\n\t\treturn( true );\r\n\t}", "public function setData(array $data)\n\t{\n\t\t$this->date_data = $data;\n\t\treturn $this;\n\t}", "public function setData( ) {\r\n\t\t\tself::callEvent('response.setData', $this, func_get_args());\r\n\t\t}", "public function set($id, CalendarEventInterface $event)\n {\n $this->events[$id] = $event;\n return $this->events;\n }", "protected function set_up()\n {\n $eventFeedText = file_get_contents(\n 'Zend/Gdata/Calendar/_files/EventFeedCompositeSample1.xml',\n true\n );\n $this->eventFeed = new Zend_Gdata_Calendar_EventFeed($eventFeedText);\n }", "public function add_event($data)\n {\n $datafields = array\n ('start' => array('req' => true)\n ,'end' => array('req' => true)\n ,'gid' => array('req' => true)\n ,'title' => array('req' => false, 'def' => '')\n ,'description' => array('req' => false, 'def' => '')\n ,'location' => array('req' => false, 'def' => '')\n ,'type' => array('req' => false, 'def' => 0)\n ,'status' => array('req' => false, 'def' => 0)\n ,'opaque' => array('req' => false, 'def' => 1)\n ,'uuid' => array('req' => false, 'def' => basics::uuid())\n );\n foreach ($datafields as $k => $v) {\n if (!isset($data[$k])) {\n if ($v['req'] === true) {\n return false;\n }\n $data[$k] = $v['def'];\n } else {\n $data[$k] = $this->esc($data[$k]);\n }\n }\n if (empty($data['gid'])) {\n $data['gid'] = 0;\n }\n\n // Am I the owner?\n if (!empty($data['gid']) && $this->getGroupOwner($data['gid']) != $this->uid) {\n // If not, I should have write permissions through a share\n if (!empty($GLOBALS['DB']->features['groups'])) {\n $perms = $GLOBALS['DB']->getUserSharedFolderPermissions($this->uid, 'calendar', $data['gid']);\n }\n if (empty($perms) || empty($perms['write'])) {\n // No, I haven't\n return false;\n }\n }\n\n $query = 'INSERT '.$this->Tbl['cal_event']\n .' (`uid`,`gid`,`starts`,`ends`,`title`,`description`,`location`,`type`,`status`,`opaque`,`uuid`,`lastmod`) VALUES ('\n .$this->uid.', \"'.$data['gid'].'\" ,\"'.$data['start'].'\",\"'.$data['end'].'\",\"'.$data['title'].'\",\"'.$data['description'].'\"'\n .',\"'.$data['location'].'\",'.doubleval($data['type']).','.doubleval($data['status']).',\"'.doubleval($data['opaque']).'\", \"'.$data['uuid'].'\",NOW())';\n if (!$this->query($query)) {\n return false;\n }\n $newId = $this->insertid();\n // Make sure, the end of an event is NOT before its beginning\n $this->query('UPDATE '.$this->Tbl['cal_event'].' SET `ends`=`starts` WHERE `ends`<`starts` AND id='.$newId);\n\n if (isset($data['attendees']) && !empty($data['attendees'])) {\n $query = 'INSERT INTO '.$this->Tbl['cal_attendee'].' (`eid`,`ref`,`name`,`email`,`role`,`type`,`status`,`mailhash`) VALUES ';\n $k = 0;\n foreach ($data['attendees'] as $v) {\n if ($k) {\n $query .= ',';\n }\n $query .= '('.doubleval($newId).',\"evt\",\"'.$this->esc($v['name']).'\",\"'.$this->esc($v['email']).'\"'\n .',\"'.$this->esc($v['role']).'\",\"'.$this->esc($v['type']).'\",'.doubleval($v['status'])\n .',\"'.$this->esc(basics::uuid()).'\")';\n $k++;\n }\n $this->query($query);\n }\n\n if (isset($data['reminders']) && !empty($data['reminders'])) {\n $query = 'INSERT INTO '.$this->Tbl['cal_reminder'].' (`eid`,`ref`,`uid`,`mode`,`time`,`text`,`smsto`,`mailto`) VALUES ';\n $k = 0;\n foreach ($data['reminders'] as $v) {\n if ($k) {\n $query .= ',';\n }\n if ($v['mode'] == '-') {\n continue;\n }\n $query .= '('.doubleval($newId).',\"evt\",'.$this->uid.',\"'.$this->esc($v['mode']).'\",'.doubleval($v['time'])\n .',\"'.$this->esc($v['text']).'\"'\n .',\"'.(!empty($v['smsto']) ? $this->esc($v['smsto']) : '').'\"'\n .',\"'.(!empty($v['mailto']) ? $this->esc($v['mailto']) : '').'\")';\n $k++;\n }\n if ($k > 0) {\n $this->query($query);\n }\n }\n if (isset($data['repetitions']) && !empty($data['repetitions'])) {\n $query = 'INSERT INTO '.$this->Tbl['cal_repetition'].' (`eid`,`ref`,`type`,`repeat`,`extra`,`until`) VALUES ';\n $k = 0;\n foreach ($data['repetitions'] as $v) {\n if ($k) {\n $query .= ',';\n }\n $query .= '('.doubleval($newId).',\"evt\",\"'.$this->esc($v['type']).'\",'.doubleval($v['repeat'])\n .','.(isset($v['extra']) && !is_null($v['extra']) ? '\"'.$this->esc($v['extra']).'\"' : '\"\"')\n .','.(isset($v['until']) && !is_null($v['until']) ? '\"'.$this->esc($v['until']).'\"' : 'NULL').')';\n $k++;\n }\n if ($k > 0) {\n $this->query($query);\n }\n } else {\n $query = 'INSERT INTO '.$this->Tbl['cal_repetition'].' (`eid`,`ref`,`type`,`repeat`,`extra`,`until`) VALUES '\n .'('.doubleval($newId).',\"evt\",\"-\",0,\"\",NULL)';\n $this->query($query);\n }\n return $newId;\n }", "private function setData($data){\n\t\n\t\t$this->setIdusuario($data['idusuario']);\n\t\t$this->setDeslogin($data['deslogin']);\n\t\t$this->setDessenha($data['dessenha']);\n\t\t$this->setDtcadastro(new DateTime($data['dtcadastro']));\t\t\n\t}", "public function setData($data)\n {\n $this->_data = $data;\n }", "public static function setData($data) {}", "public function __construct($data)\n {\n $this->event = $data;\n }", "function setData($data)\n\t{\n\t\t$this->data = $data;\n\t}", "function setData($data)\n\t{\n\t\t$this->data = $data;\n\t}", "function setData($data)\n\t{\n\t\t$this->data = $data;\n\t}", "function setData($data)\n {\n $this->data = $data;\n }", "public function setData()\n {\n $this->data=new \\DateTime('now');\n\n }", "public function setCalendarProperties($date, $recur = false) {\n if(!empty($recur)) {\n $startField = \"InstanceStartDateTime\";\n $finishField = \"InstanceFinishDateTime\";\n } else {\n $startField = \"StartDateTime\";\n $finishField = \"FinishDateTime\";\n }\n\n if(date('Y-m-d', strtotime($this->getField($startField))) != date('Y-m-d', strtotime($this->getField($finishField)))) {\n // If this is a multi-day event\n $this->Span = 'ongoing';\n }\n\n if(date('Y-m-d', strtotime($this->getField($startField))) == $date) {\n // If the specified calendar date is the events start date\n $this->Position = 'first';\n } elseif (date('Y-m-d', strtotime($this->getField($finishField))) == $date) {\n // If the specified calendar date is the events finsh date\n $this->Position = 'last';\n }\n\n return $this;\n\n }", "public function setData() {\n\t\t$this->import($this->get());\n\t}", "private function _setUpEvent(\n CalendarEvent $event,\n \\SimpleXMLElement $xmlElement\n ) {\n switch ($xmlElement->getName())\n {\n case 'href':\n $event->setUrl((string) $xmlElement);\n break;\n case 'dtstart':\n $event->from((string) $xmlElement);\n break;\n case 'dtend':\n $event->to((string) $xmlElement);\n break;\n case 'location':\n $event->at((string) $xmlElement);\n break;\n case 'subject':\n $event->withSubject((string) $xmlElement);\n break;\n case 'htmldescription':\n $event->withDescription((string) $xmlElement);\n break;\n }\n\n }", "function _getCalendarData( $year, $month, $day){\t\t\t\t\n\t\t$rows = $this->_listIcalEventsByMonth( $year, $month);\n \t\t\n\t\t$rowcount = count( $rows );\t\t\n\t\t$data = array();\n\t\t$data['year'] = $year;\n\t\t$data['month'] = $month;\n\t\t$month = intval($month);\n\t\tif( $month <= '9' ) {\n\t\t\t$month = '0' . $month;\n\t\t}\n\t\t$data['startday'] = $startday = (int) EventBookingHelper::getConfigValue('calendar_start_date');\t\t\n\t\t// get days in week\n\t\t$data[\"daynames\"] = array();\n\t\tfor( $i = 0; $i < 7; $i++ ) {\n\t\t\t$data[\"daynames\"][$i] = $this->_getDayName(($i+$startday)%7, true );\n\t\t}\t\t\n\t\t$data[\"dates\"]=array();\t\t\n\t\t//Start days\n\t\t$start = (( date( 'w', mktime( 0, 0, 0, $month, 1, $year )) - $startday + 7 ) % 7 );\t\t\n\t\t// previous month\n\t\t$priorMonth = $month-1;\n\t\t$priorYear = $year;\t\t\n\t\tif ($priorMonth <= 0) {\n\t\t\t$priorMonth += 12;\n\t\t\t$priorYear -= 1;\n\t\t}\t\t\t\n\t\t$dayCount=0;\n\t\tfor( $a = $start; $a > 0; $a-- ){\n\t\t\t$data[\"dates\"][$dayCount] = array();\n\t\t\t$data[\"dates\"][$dayCount][\"monthType\"] = \"prior\";\n\t\t\t$data[\"dates\"][$dayCount][\"month\"] = $priorMonth;\n\t\t\t$data[\"dates\"][$dayCount][\"year\"] = $priorYear;\n\t\t\t$data[\"dates\"][$dayCount]['countDisplay'] = 0;\n\t\t\t$dayCount++;\n\t\t}\n\t\tsort($data[\"dates\"]);\n\t\t//Current month\n\t\t$end = date( 't', mktime( 0, 0, 0,( $month + 1 ), 0, $year ));\n\t\tfor( $d = 1; $d <= $end; $d++ ){\n\t\t\t$data[\"dates\"][$dayCount]=array();\n\t\t\t// utility field used to keep track of events displayed in a day!\n\t\t\t$data[\"dates\"][$dayCount]['countDisplay']=0;\n\t\t\t$data[\"dates\"][$dayCount][\"monthType\"]=\"current\";\n\t\t\t$data[\"dates\"][$dayCount][\"month\"]=$month;\n\t\t\t$data[\"dates\"][$dayCount][\"year\"]=$year;\t\t\n\t\t\t\t\t\t\n\t\t\t$t_datenow = $this->_getNow();\n\t\t\t$now_adjusted = $t_datenow->toUnix(true);\n\t\t\tif( $month == strftime( '%m', $now_adjusted)\n\t\t\t&& $year == strftime( '%Y', $now_adjusted)\n\t\t\t&& $d == strftime( '%d', $now_adjusted)) {\n\t\t\t\t$data[\"dates\"][$dayCount][\"today\"]=true;\n\t\t\t}else{\n\t\t\t\t$data[\"dates\"][$dayCount][\"today\"]=false;\n\t\t\t}\n\t\t\t$data[\"dates\"][$dayCount]['d']=$d;\t\t\t\t\t\t\n\t\t\t$data[\"dates\"][$dayCount]['events'] = array();\n\t\t\tif( $rowcount > 0 ){\n\t\t\t\tforeach ($rows as $row) {\n\t\t\t\t\t\t$date_of_event = explode('-',$row->event_date);\n\t\t\t\t\t\t$date_of_event = (int)$date_of_event[2];\t\t\t\t\t\t\n\t\t\t\t\t\tif ($d == $date_of_event ){\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$i=count($data[\"dates\"][$dayCount]['events']);\n\t\t\t\t\t\t\t$data[\"dates\"][$dayCount]['events'][$i] = $row;\n\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t$dayCount++;\n\t\t}\t\n \t\n\t\t// followmonth\n\t\t$days \t= ( 7 - date( 'w', mktime( 0, 0, 0, $month + 1, 1, $year )) + $startday ) %7;\n\t\t$d\t\t= 1;\n\t\t$followMonth = $month+1;\n\t\t$followYear = $year;\n\t\tif ($followMonth>12) {\n\t\t\t$followMonth-=12;\n\t\t\t$followYear+=1;\n\t\t}\n\t\t$data[\"followingMonth\"]=array();\n\t\tfor( $d = 1; $d <= $days; $d++ ) {\n\t\t\t$data[\"dates\"][$dayCount]=array();\n\t\t\t$data[\"dates\"][$dayCount][\"monthType\"]=\"following\";\n\t\t\t$data[\"dates\"][$dayCount][\"month\"]=$followMonth;\n\t\t\t$data[\"dates\"][$dayCount][\"year\"]=$followYear;\n\t\t\t$data[\"dates\"][$dayCount]['countDisplay']=0;\n\t\t\t$dayCount++;\n\t\t}\n\t\treturn $data;\t\t\n\t}", "public function set_all_data($data)\n\t{\n\t\t$this->_data = $data;\n\t}", "public function set_data($data)\n {\n }", "public function set_data($data)\n {\n }", "final public function setData($data) {\n $this->data = $data;\n }", "public function setData($data) {\n $this->data = $data;\n }", "public function calendars()\n\t{\n\t\t// -------------------------------------\n\t\t// Load 'em up\n\t\t// -------------------------------------\n\n\t\t$this->load_calendar_datetime();\n\t\t$this->load_calendar_parameters();\n\n\t\t// -------------------------------------\n\t\t// Prep the parameters\n\t\t// -------------------------------------\n\n\t\t$params = array(\n\t\t\tarray(\n\t\t\t\t'name' => 'category',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'site_id',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'min_value' => 1,\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'default' => $this->data->get_site_id()\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'calendar_id',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'min_value' => 1,\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'not' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'calendar_name',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'not' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'status',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'default' => 'open'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'date_range_start',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'date'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'date_range_end',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'date'\n\t\t\t)\n\t\t);\n\n\t\t//ee()->TMPL->log_item('Calendar: Processing parameters');\n\n\t\t$this->add_parameters($params);\n\n\t\t// -------------------------------------\n\t\t// Convert calendar_name to calendar_id\n\t\t// -------------------------------------\n\n\t\tif ($this->P->value('calendar_id') == '' AND\n\t\t\t$this->P->value('calendar_name') != '')\n\t\t{\n\t\t\t$ids = $this->data->get_calendar_id_from_name(\n\t\t\t\t$this->P->value('calendar_name'),\n\t\t\t\tNULL,\n\t\t\t\t$this->P->params['calendar_name']['details']['not']\n\t\t\t);\n\n\t\t\tif ( empty( $ids ) )\n\t\t\t{\n\t\t\t\t//ee()->TMPL->log_item('Calendar: No results for\n\t\t\t\t//calendar name provided, bailing');\n\t\t\t\treturn $this->no_results();\n\t\t\t}\n\n\t\t\t$this->P->set('calendar_id', implode('|', $ids));\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Determine which calendars this user has permission to view\n\t\t// and modify the parameters accordingly.\n\t\t// -------------------------------------\n\n\t\t// TODO\n\n\t\t// -------------------------------------\n\t\t// Fetch the basics\n\t\t// -------------------------------------\n\n\t\t$data = $this->data->fetch_calendars_basics(\n\t\t\t$this->P->value('site_id'),\n\t\t\t$this->P->value('calendar_id'),\n\t\t\t$this->P->params['calendar_id']['details']['not']\n\t\t);\n\n\t\t// -------------------------------------\n\t\t// If no data, then give 'em no_results\n\t\t// -------------------------------------\n\n\t\tif (($total_results = count($data)) == 0)\n\t\t{\n\t\t\t//ee()->TMPL->log_item('Calendar: No results, bailing');\n\t\t\treturn $this->no_results();\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Ensure date_range_start <= date_range_end\n\t\t// -------------------------------------\n\n\t\tif ($this->P->value('date_range_start') !== FALSE AND\n\t\t\t$this->P->value('date_range_end') !== FALSE)\n\t\t{\n\t\t\tif ($this->P->value('date_range_start', 'ymd') > $this->P->value('date_range_end', 'ymd'))\n\t\t\t{\n\t\t\t\t$temp = $this->P->params['date_range_start']['value'];\n\t\t\t\t$this->P->set('date_range_start', $this->P->params['date_range_end']['value']);\n\t\t\t\t$this->P->set('date_range_end', $temp);\n\t\t\t\tunset($temp);\n\t\t\t}\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// This will come in handy later\n\t\t// -------------------------------------\n\n\t\t$calendar_array = array();\n\t\tforeach ($data as $k => $arr)\n\t\t{\n\t\t\t$calendar_array[] = $arr['calendar_id'];\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Date range params? Then we need to do a lot more work.\n\t\t// -------------------------------------\n\n\t\tif ($this->P->value('date_range_start') !== FALSE OR\n\t\t\t$this->P->value('date_range_end') !== FALSE)\n\t\t{\n\t\t\t//ee()->TMPL->log_item('Calendar: Calculating date ranges');\n\t\t\t$min = ($this->P->value('date_range_start') !== FALSE) ?\n\t\t\t\t\t\t$this->P->value('date_range_start', 'ymd') :\n\t\t\t\t\t\t0;\n\n\t\t\t$max = ($this->P->value('date_range_end') !== FALSE) ?\n\t\t\t\t$this->P->value('date_range_end', 'ymd') :\n\t\t\t\t0;\n\n\t\t\t$calendar_array = $this->data->fetch_calendars_with_events_in_date_range(\n\t\t\t\t$min,\n\t\t\t\t$max,\n\t\t\t\t$calendar_array,\n\t\t\t\t$this->P->value('status')\n\t\t\t);\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// No calendars? No results.\n\t\t// -------------------------------------\n\n\t\tif (empty($calendar_array))\n\t\t{\n//ee()->TMPL->log_item('Calendar: No calendars, bailing');\n\t\t\treturn $this->no_results();\n\t\t}\n\n\t\t//\t----------------------------------------\n\t\t//\tInvoke Channel class\n\t\t//\t----------------------------------------\n\n\t\tif ( ! class_exists('Channel') )\n\t\t{\n\t\t\trequire PATH_MOD.'/channel/mod.channel.php';\n\t\t}\n\n\t\t$channel = new Channel();\n\n\t\t//need to remove limit here so huge amounts of events work\n\t\t$channel->limit = 1000000;\n\n\t\t// --------------------------------------------\n\t\t// Invoke Pagination for EE 2.4 and Above\n\t\t// --------------------------------------------\n\n\t\t$channel = $this->add_pag_to_channel($channel);\n\n\t\t// -------------------------------------\n\t\t// Prepare parameters\n\t\t// -------------------------------------\n\n\t\tee()->TMPL->tagparams['entry_id'] = implode('|', $calendar_array);\n\t\tee()->TMPL->tagparams['channel'] = CALENDAR_CALENDARS_CHANNEL_NAME;\n\n\t\t// -------------------------------------\n\t\t// Pre-process related data\n\t\t// -------------------------------------\n\n\t\tif (version_compare($this->ee_version, '2.6.0', '<'))\n\t\t{\n\n\t\t\tee()->TMPL->tagdata = ee()->TMPL->assign_relationship_data(\n\t\t\t\tee()->TMPL->tagdata\n\t\t\t);\n\t\t\tee()->TMPL->var_single = array_merge(\n\t\t\t\tee()->TMPL->var_single,\n\t\t\t\tee()->TMPL->related_markers\n\t\t\t);\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Execute needed methods\n\t\t// -------------------------------------\n\n\t\t$channel->fetch_custom_channel_fields();\n\n\t\t$channel->fetch_custom_member_fields();\n\n\t\t// --------------------------------------------\n\t\t// Pagination Tags Parsed Out\n\t\t// --------------------------------------------\n\n\t\t$this->fetch_pagination_data($channel);\n\n\t\t// -------------------------------------\n\t\t// Querification\n\t\t// -------------------------------------\n\n\t\t$channel->build_sql_query();\n\n\t\tif ($channel->sql == '')\n\t\t{\n\t\t\treturn $this->no_results();\n\t\t}\n\n\t\t$channel->query = ee()->db->query($channel->sql);\n\n\t\tif ($channel->query->num_rows() == 0)\n\t\t{\n//ee()->TMPL->log_item('Calendar: Channel module says no results, bailing');\n\t\t\treturn $this->no_results();\n\t\t}\n\n\t\t$channel->query->result\t= $channel->query->result_array();\n\n\t\t// -------------------------------------------\n\t\t// 'calendar_calendars_channel_query' hook.\n\t\t// - Do something with the channel query\n\n\t\tif (ee()->extensions->active_hook('calendar_calendars_channel_query') === TRUE)\n\t\t{\n\t\t\t$channel->query = ee()->extensions->call('calendar_calendars_channel_query', $channel->query, $calendar_array);\n\t\t\tif (ee()->extensions->end_script === TRUE) return;\n\t\t}\n\t\t//\n\t\t// -------------------------------------------\n\n\t\t// -------------------------------------\n\t\t// Inject Calendar-specific variables\n\t\t// -------------------------------------\n\n\t\t//ee()->TMPL->log_item('Calendar: Adding Calendar variables');\n\n\t\t$aliases = array(\n\t\t\t'title'\t\t\t=> 'calendar_title',\n\t\t\t'url_title'\t\t=> 'calendar_url_title',\n\t\t\t'entry_id'\t\t=> 'calendar_id',\n\t\t\t'author_id'\t\t=> 'calendar_author_id',\n\t\t\t'author'\t\t=> 'calendar_author',\n\t\t\t'status'\t\t=> 'calendar_status'\n\t\t);\n\n\t\t//custom variables with the letters 'url' are borked in\n\t\t//EE 2.6. Bug reported, but this should fix.\n\t\t//https://support.ellislab.com/bugs/detail/19337\n\t\tif (version_compare($this->ee_version, '2.6.0', '>='))\n\t\t{\n\t\t\t$aliases['url_title'] = 'calendar_borked_title';\n\n\t\t\tee()->TMPL->var_single['calendar_borked_title'] = 'calendar_borked_title';\n\n\t\t\tunset(ee()->TMPL->var_single['calendar_url_title']);\n\n\t\t\tee()->TMPL->tagdata = str_replace(\n\t\t\t\tarray(\n\t\t\t\t\tLD . 'calendar_url_title' . RD,\n\t\t\t\t\t'\"calendar_url_title\"',\n\t\t\t\t\t\"'calendar_url_title'\"\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\tLD . 'calendar_borked_title' . RD,\n\t\t\t\t\t'\"calendar_borked_title\"',\n\t\t\t\t\t\"'calendar_borked_title'\"\n\n\t\t\t\t),\n\t\t\t\tee()->TMPL->tagdata\n\t\t\t);\n\t\t}\n\n\t\tforeach ($channel->query->result as $k => $row)\n\t\t{\n\t\t\t$channel->query->result[$k]['author'] = ($row['screen_name'] != '') ?\n\t\t\t\t\t\t\t\t\t\t$row['screen_name'] : $row['username'];\n\n\t\t\tforeach ($aliases as $old => $new)\n\t\t\t{\n\t\t\t\t$channel->query->result[$k][$new] = $channel->query->result[$k][$old];\n\t\t\t}\n\t\t}\n\n\t\t//\t----------------------------------------\n\t\t//\tRedeclare\n\t\t//\t----------------------------------------\n\t\t//\tWe will reassign the $channel->query->result with our\n\t\t//\treordered array of values.\n\t\t//\t----------------------------------------\n\n\t\t$channel->query->result_array = $channel->query->result;\n\n\t\t// --------------------------------------------\n\t\t// Typography\n\t\t// --------------------------------------------\n\n\t\tee()->load->library('typography');\n\t\tee()->typography->initialize();\n\t\tee()->typography->convert_curly = FALSE;\n\n\t\t$channel->fetch_categories();\n\n\t\t// -------------------------------------\n\t\t// Parse\n\t\t// -------------------------------------\n\n\t\t//ee()->TMPL->log_item('Calendar: Parsing, via channel module');\n\n\n\n\t\t$channel->parse_channel_entries();\n\n\t\t// -------------------------------------\n\t\t// Paginate\n\t\t// -------------------------------------\n\n\t\t$channel = $this->add_pagination_data($channel);\n\n\t\t// -------------------------------------\n\t\t// Related entries\n\t\t// -------------------------------------\n\n\t\t//ee()->TMPL->log_item('Calendar: Parsing related entries, via Weblog module');\n\n\t\tif (version_compare($this->ee_version, '2.6.0', '<'))\n\t\t{\n\t\t\tif (count(ee()->TMPL->related_data) > 0 AND\n\t\t\t\tcount($channel->related_entries) > 0)\n\t\t\t{\n\t\t\t\t$channel->parse_related_entries();\n\t\t\t}\n\n\t\t\tif (count(ee()->TMPL->reverse_related_data) > 0 AND\n\t\t\t\tcount($channel->reverse_related_entries) > 0)\n\t\t\t{\n\t\t\t\t$channel->parse_reverse_related_entries();\n\t\t\t}\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Send 'em home\n\t\t// -------------------------------------\n\n\t\t$tagdata = $channel->return_data;\n\n\t\t//ee()->TMPL->log_item('Calendar: Done!');\n\n\t\t//on the off chance someone just wrote the word\n\t\t//'calendar_url_title', we should fix that before\n\t\t//output. (See above calendar_url_title fix)\n\t\tif (version_compare($this->ee_version, '2.6.0', '>='))\n\t\t{\n\t\t\t$tagdata = str_replace(\n\t\t\t\tarray(\n\t\t\t\t\tLD . 'calendar_borked_title' . RD,\n\t\t\t\t\t'\"calendar_borked_title\"',\n\t\t\t\t\t\"'calendar_borked_title'\"\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\tLD . 'calendar_url_title' . RD,\n\t\t\t\t\t'\"calendar_url_title\"',\n\t\t\t\t\t\"'calendar_url_title'\"\n\t\t\t\t),\n\t\t\t\t$tagdata\n\t\t\t);\n\t\t}\n\n\t\treturn $tagdata;\n\n\t}", "public function initialize_from_google_calendar_event($google_calendar_event)\n\t{\n\t\tif (isset($google_calendar_event[c_google_calendar::k_key_location]))\n\t\t{\n\t\t\t$this->m_data[self::k_key_address][self::k_key_address_street1]= $google_calendar_event[c_google_calendar::k_key_location];\n\t\t}\n\t\tif (isset($google_calendar_event[c_google_calendar::k_key_start_time]) &&\n\t\t\tisset($google_calendar_event[c_google_calendar::k_key_start_time][c_google_calendar::k_key_start_date_time]))\n\t\t{\n\t\t\t//$bbbs_event['datebegin']= strtotime($google_event['start']['dateTime']) * 1000;\n\t\t\t$time_zone= isset($google_calendar_event[c_google_calendar::k_key_start_time][c_google_calendar::k_key_time_zone]) ?\n\t\t\t\tnew DateTimeZone($google_calendar_event[c_google_calendar::k_key_start_time][c_google_calendar::k_key_time_zone]) :\n\t\t\t\tnew DateTimeZone(\"UTC\");\n\t\t\t$this->m_data[self::k_key_start_time]= new DateTime(\n\t\t\t\t$google_calendar_event[c_google_calendar::k_key_start_time][c_google_calendar::k_key_start_date_time],\n\t\t\t\t$time_zone);\n\t\t}\n\t\tif (isset($google_calendar_event[c_google_calendar::k_key_title]))\n\t\t{\n\t\t\t$this->m_data[self::k_key_title]= $google_calendar_event[c_google_calendar::k_key_title];\n\t\t}\n\t\tif (isset($google_calendar_event[c_google_calendar::k_key_url]))\n\t\t{\n\t\t\t$this->m_data[self::k_key_url]= $google_calendar_event[c_google_calendar::k_key_url];\n\t\t}\n\t\t\n\t\t// handle description last, since parsing this field may (re)set other event parameters\n\t\tif (isset($google_calendar_event[c_google_calendar::k_key_description]))\n\t\t{\n\t\t\t$this->m_data[self::k_key_description]= $google_calendar_event[c_google_calendar::k_key_description];\n\t\t\tif (PARSE_GCAL_EVENT_DESCRIPTION)\n\t\t\t{\n\t\t\t\t// attempt to extract additional event details from the provided event description field\n\t\t\t\t$this->parse_google_calendar_event_description_field_parameters($google_calendar_event[c_google_calendar::k_key_description]);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn;\n\t}", "public function setData($data)\r\n\t{\r\n\t\t$this->data = $data;\r\n\t}", "public function setData( $data )\n {\n $this->data = $data;\n }", "public function setClient($clientObject) {\n\t\t$this->service = new Google_Service_Calendar($clientObject); \n\t}", "public function saveCalendar($appointment = null){\n $client = Yii::$app->calendarService;\n return $client->save(['sid'=>$this->sid,'appointment'=>$appointment]);\n }", "function bindEventObject()\r\n\t{\r\n JTable::addIncludePath( JPATH_ADMINISTRATOR . '/components/com_calendar/tables' );\r\n\t\t$table = JTable::getInstance( 'Events', 'CalendarTable' );\r\n\t\t\r\n\t if (!empty($this->event_id))\r\n\t {\r\n\t $table->load( $this->event_id );\r\n\t }\r\n\t \r\n\t\t$table->trimProperties();\r\n\t\t\r\n\t\t$properties = $this->getProperties();\r\n\t\t$table_properties = $table->getProperties();\r\n\r\n\t\tforeach ($table_properties as $prop=>$value)\r\n\t\t{\r\n\t\t if (!array_key_exists($prop, $properties))\r\n\t\t {\r\n\t\t $this->$prop = $table->$prop;\r\n\t\t }\r\n\t\t}\r\n\t}", "public function setData($data)\n\t{\n\t\t$this->data = $data;\n\t}", "public function set_data($data)\n {\n $this->data = $data;\n }", "public function setData($data)\n {\n $this->data = $data;\n }", "public function setData($data)\n {\n $this->data = $data;\n }", "protected function get_calendar_data(){\r\n global $user;\r\n \r\n \r\n if (Go_to::is_on_page(\"edit_room\")){\r\n $this->room_name = $_GET['room'];\r\n $this->owner = $user->username();\r\n $this->facility_name = $_SESSION['active_fac'] ;\r\n// $this->room = $user->username()\";\r\n// var_dump($_SESSION);\r\n// var_dump($this);\r\n }\r\n \r\n \r\n \r\n\r\n }", "public function setData($data) \n\t{\n $this->data = $data;\n }", "public function set($data);", "public function setCalendar(Mymodules_Google_Model_Calendar $calendar)\r\n {\r\n $this->_calendar = $calendar;\r\n\r\n return $this;\r\n }", "public function setData($data) { \n $this->data = $data; \n }", "private function setData($data)\n {\n \t$this->data = $data;\n }", "public function setData($data)\r\n {\r\n }", "private function set_date()\r\n\t{\r\n\t\tif ($this->month > 12)\r\n\t\t{\r\n\t\t\t$this->month=1;\r\n\t\t\t$this->year++;\r\n\t\t}\r\n\r\n\t\tif ($this->month < 1)\r\n\t\t{\r\n\t\t\t$this->month=12;\r\n\t\t\t$this->year--;\r\n\t\t}\r\n\r\n\t\tif ($this->year > 2037) $this->year = 2037;\r\n\t\tif ($this->year < 1971) $this->year = 1971;\r\n\t}", "public function ics_update()\n\t{\n\t\t// -------------------------------------\n\t\t// Load 'em up\n\t\t// -------------------------------------\n\n\t\t$this->load_calendar_datetime();\n\t\t$this->load_calendar_parameters();\n\n\t\t// -------------------------------------\n\t\t// Prep the parameters\n\t\t// -------------------------------------\n\n\t\t$params = array(\n\t\t\tarray(\t'name' => 'category',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'multi' => TRUE\n\t\t\t\t\t),\n\t\t\tarray(\t'name' => 'site_id',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t'min_value' => 1,\n\t\t\t\t\t'multi' => TRUE,\n\t\t\t\t\t'default' => $this->data->get_site_id()\n\t\t\t\t\t),\n\t\t\tarray(\t'name' => 'calendar_id',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t'min_value' => 1,\n\t\t\t\t\t'multi' => TRUE\n\t\t\t\t\t),\n\t\t\tarray(\t'name' => 'calendar_name',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'multi' => TRUE\n\t\t\t\t\t),\n\t\t\tarray(\t'name' => 'time_range_start',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'time'\n\t\t\t\t\t),\n\t\t\tarray(\t'name' => 'time_range_end',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'time'\n\t\t\t\t\t),\n\t\t\tarray(\t'name' => 'minute_interval',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t'default' => 60\n\t\t\t\t\t),\n\t\t\tarray(\t'name' => 'status',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'multi' => TRUE,\n\t\t\t\t\t'default' => 'open'\n\t\t\t\t\t)\n\t\t\t);\n\n\t\t//ee()->TMPL->log_item('Calendar: Processing parameters');\n\n\t\t$this->add_parameters($params);\n\n\t\t// -------------------------------------\n\t\t// If we are not currently in the time range, scram\n\t\t// -------------------------------------\n\n\t\t$time = date('Hi', time());\n\n\t\tif ($this->P->value('time_range_start', 'time') !== FALSE AND\n\t\t\t$this->P->value('time_range_start', 'time') > $time)\n\t\t{\n\t\t\t//ee()->TMPL->log_item('Calendar: It is not time to update icalendar data yet.');\n\t\t\treturn;\n\t\t}\n\t\telse if ($this->P->value('time_range_end', 'time') !== FALSE AND\n\t\t\t\t$this->P->value('time_range_end', 'time') < $time)\n\t\t{\n\t\t\t//ee()->TMPL->log_item('Calendar: The time to update icalendar data has passed.');\n\t\t\treturn;\n\t\t}\n\n\t\tif ($this->P->value('calendar_id') == '')\n\t\t{\n\t\t\t// -------------------------------------\n\t\t\t// For those who prefer names over numbers\n\t\t\t// -------------------------------------\n\n\t\t\tif ($this->P->value('calendar_name') != '')\n\t\t\t{\n\t\t\t\t$ids = $this->data->get_calendar_id_from_name($this->P->value('calendar_name'));\n\t\t\t}\n\n\t\t\t// -------------------------------------\n\t\t\t// Just a site ID -- get all calendars\n\t\t\t// -------------------------------------\n\n\t\t\telse\n\t\t\t{\n\t\t\t\t$ids = $this->data->get_calendars_by_site_id($this->P->value('site_id'));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$ids = explode('|', $this->P->value('calendar_id'));\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Only look at calendars that are due for an update\n\t\t// -------------------------------------\n\n\t\tif ( ! empty($ids) AND $this->P->value('minute_interval') !== FALSE)\n\t\t{\n\t\t\t$ids = $this->data->get_calendars_needing_update(\n\t\t\t\t$ids,\n\t\t\t\t$this->P->value('minute_interval')\n\t\t\t);\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Leave if empty\n\t\t// -------------------------------------\n\n\t\tif (empty($ids))\n\t\t{\n\t\t\t//ee()->TMPL->log_item('Calendar: Nobody is due for an update');\n\t\t\treturn;\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Go get those data!\n\t\t// -------------------------------------\n\n\t\t$this->actions();\n\n//ee()->TMPL->log_item('Calendar: Fetching data');\n\n\t\tforeach ($ids as $id)\n\t\t{\n\t\t\t$this->actions->import_ics_data($id);\n\t\t}\n\t}", "public function init() {\n\n //AUTHORIZATION CHECK\n if (!$this->_helper->requireAuth()->setAuthParams('siteevent_event', null, \"view\")->isValid())\n $this->respondWithError('unauthorized');\n\n //RETURN IF SUBJECT IS ALREADY SET\n if (Engine_Api::_()->core()->hasSubject())\n $this->respondWithError('unauthorized');\n\n //SET TOPIC OR EVENT SUBJECT\n if (0 != ($organizer_id = (int) $this->_getParam('organizer_id')) &&\n null != ($organizer = Engine_Api::_()->getItem('siteevent_organizer', $organizer_id))) {\n Engine_Api::_()->core()->setSubject($organizer);\n }\n }", "private function setData()\n {\n if ($this->config->has('auth.external_concrete')) {\n $data = $this->config->get('auth.external_concrete', '');\n } else {\n // legacy support\n $data = $this->config->get('auth.external_concrete5', '');\n }\n $authUrl = $this->urlResolver->resolve(['/ccm/system/authentication/oauth2/external_concrete/attempt_auth']);\n $attachUrl = $this->urlResolver->resolve(['/ccm/system/authentication/oauth2/external_concrete/attempt_attach']);\n $baseUrl = $this->urlResolver->resolve(['/']);\n $path = $baseUrl->getPath();\n $path->remove('index.php');\n $name = trim((string) array_get($data, 'name', t('External concrete')));\n\n $this->set('data', $data);\n $this->set('authUrl', $authUrl);\n $this->set('attachUrl', $attachUrl);\n $this->set('baseUrl', $baseUrl);\n $this->set('assetBase', $baseUrl->setPath($path));\n $this->set('name', $name);\n $this->set('user', $this->app->make(User::class));\n }", "public function cal()\n\t{\n\t\t// -------------------------------------\n\t\t// Load 'em up\n\t\t// -------------------------------------\n\n\t\t$this->load_calendar_datetime();\n\t\t$this->load_calendar_parameters();\n\n\t\t// -------------------------------------\n\t\t// Start up\n\t\t// -------------------------------------\n\n\t\t$this->get_first_day_of_week();\n\n\t\t// -------------------------------------\n\t\t// Prep the parameters\n\t\t// -------------------------------------\n\n\t\t$disable = array(\n\t\t\t'categories',\n\t\t\t'category_fields',\n\t\t\t'custom_fields',\n\t\t\t'member_data',\n\t\t\t'pagination',\n\t\t\t'trackbacks'\n\t\t);\n\n\t\t$params = array(\n\t\t\tarray(\n\t\t\t\t'name' => 'category',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'site_id',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'min_value' => 1,\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'default' => $this->data->get_site_id()\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'calendar_id',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'calendar_name',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'event_id',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'event_name',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'status',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'default' => 'open'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'date_range_start',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'date'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'date_range_end',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'date',\n\t\t\t\t//'default' => 'today'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'show_days',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'default' => 1\n\t\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'show_weeks',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'show_months',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'show_years',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'time_range_start',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'time',\n\t\t\t\t'default' => '0000'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'time_range_end',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'time',\n\t\t\t\t'default' => '2359'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'day_limit',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'default' => '10'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'event_limit',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'default' => '0'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'first_day_of_week',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'default' => $this->first_day_of_week\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'pad_short_weeks',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'bool',\n\t\t\t\t'default' => 'yes',\n\t\t\t\t'allowed_values' => array('yes', 'no')\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'enable',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'default' => '',\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'allowed_values' => $disable\n\t\t\t)\n\t\t);\n\n\t\t//ee()->TMPL->log_item('Calendar: Processing parameters');\n\n\t\t$this->add_parameters($params);\n\n\t\t// -------------------------------------\n\t\t// Do some voodoo on P\n\t\t// -------------------------------------\n\n\t\t$this->process_events_params();\n\n\t\t// -------------------------------------\n\t\t// Let's go build us a gosh darn calendar!\n\t\t// -------------------------------------\n\n\t\t$this->parent_method = __FUNCTION__;\n\n\t\treturn $this->build_calendar();\n\t}", "public function setData($dtData) {\n $this->dtData = $dtData;\n }", "public function setEventDate($value) \n {\n $this->_fields['EventDate']['FieldValue'] = $value;\n return $this;\n }", "protected function setData($data) {\n $this->data = collect($data);\n }", "public function eventTypesSetData($data) {\r\n\t\t$this->data = $data;\r\n\t\treturn( true );\r\n\t}", "public function open($calendar)\n {\n $this->calendar = $calendar;\n }", "protected function initPdCalendarIds()\n {\n $this->pd_calendar_ids = array(\n 'A' => '2pig0qflik15708oe983ma08v4@group.calendar.google.com',\n 'B' => 'm6o3rgmm58rq9461qcb27sbtl8@group.calendar.google.com',\n 'C' => 'q1435u36geer0aq4nlhsdo1pog@group.calendar.google.com',\n 'D' => 'tsant1g9vi7ra9tfmlgmhr8l1c@group.calendar.google.com',\n 'E' => 'q840245lkh41jdtha1au1ml6no@group.calendar.google.com',\n );\n }", "public function setData($data)\n {\n// -- `idVeiculo` INT(11) NOT NULL,\n// -- `idMotorista` INT(11) NOT NULL,\n// -- `idTiposFretes` INT(11) NOT NULL,\n// -- `Observacoes` VARCHAR(255) NULL DEFAULT NULL,\n// -- `ValorPedagios` DECIMAL(10,2) NOT NULL,\n// -- `Distancia` DECIMAL(10,3) NOT NULL,\n// -- `DataEntrega` DATE NULL DEFAULT NULL,\n// -- `ValorFrete` DECIMAL(10,2) NOT NULL,\n $this->SetIdNotaTransporte($data['IdNotaTransporte']);\n $this->SetIdVeiculo($data['idVeiculo']);\n $this->SetIdMotoriste($data['idMotorista']);\n $this->SetIdTipoFrete($data['idTipoFretes']);\n $this->SetDistancia($data['Distancia']); \n $this->SetValorFrete($data['ValorFrete']);\n $this->SetDataEmissao($data['DataEntrega']);\n }", "private function setDate($data, $key, $currentDate, callable $setCallback)\n {\n if (($date = $this->getProperty($data, $key, $currentDate)) !== null) {\n if (is_string($date)) {\n $date = new \\DateTime($data[$key]);\n }\n } else {\n $date = null;\n }\n\n call_user_func($setCallback, $date);\n }", "public function setCalendarId($id)\n {\n if ($id) {\n $this->calendarId = $id;\n }\n\n return $this;\n }", "public function setDate($date){\n\t\t$this->date = $date;\n\t}", "public function setData(array $data) {\n\t\t$this->_data = $data;\n\t}", "abstract public function calendar($value, $name, $id = null, $format = null, array $attributes = array());", "public function getCalendar() {\n return $this->calendar;\n }", "function _initData()\r\n\t{\r\n\t\t// Lets load the content if it doesn't already exist\r\n\t\tif (empty($this->_data))\r\n\t\t{\r\n\t\t\t$event = new stdClass();\r\n\t\t\t$event->id\t\t\t\t\t= 0;\r\n\t\t\t$event->locid\t\t\t\t= 0;\r\n\t\t\t$event->catsid\t\t\t\t= 0;\r\n\t\t\t$event->dates\t\t\t\t= null;\r\n\t\t\t$event->enddates\t\t\t= null;\r\n\t\t\t$event->times\t\t\t\t= null;\r\n\t\t\t$event->endtimes\t\t\t= null;\r\n\t\t\t$event->title\t\t\t\t= null;\r\n\t\t\t$event->alias\t\t\t\t= null;\r\n\t\t\t$event->created\t\t\t\t= null;\r\n\t\t\t$event->author_ip\t\t\t= null;\r\n\t\t\t$event->created_by\t\t\t= null;\r\n\t\t\t$event->published\t\t\t= 1;\r\n\t\t\t$event->registra\t\t\t= 0;\r\n\t\t\t$event->unregistra\t\t\t= 0;\r\n\t\t\t$event->datdescription\t\t= null;\r\n\t\t\t$event->meta_keywords\t\t= null;\r\n\t\t\t$event->meta_description\t= null;\r\n\t\t\t$event->recurrence_number\t= 0;\r\n\t\t\t$event->recurrence_type\t\t= 0;\r\n\t\t\t$event->recurrence_counter\t= '0000-00-00';\r\n\t\t\t$event->datimage\t\t\t= JText::_('SELECTIMAGE');\r\n\t\t\t$event->venue\t\t\t\t= JText::_('SELECTVENUE');\r\n\t\t\t$this->_data\t\t\t\t= $event;\r\n\t\t\treturn (boolean) $this->_data;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "function setEvent() {\n \n if($_POST['am'] == 1){\n $star_time = $_POST['stime_a'] + 12 . \":\". $_POST['stime_b'];\n }else{\n $star_time = $_POST['stime_a'] . \":\". $_POST['stime_b'];\n }\n \n if($_POST['am1'] == 1){\n $end_time = $_POST['stime_c'] + 12 . \":\". $_POST['stime_d'];\n }else{\n $end_time = $_POST['stime_c'] . \":\". $_POST['stime_d'];\n }\n\n $values = array('event_id' => uniqid(),\n 'web_id' => WEB_ID,\n 'title' => $_POST['title'],\n 's_time' => $star_time,\n 'e_time' => $end_time,\n 'date' => date('Y-m-d H:i:s', strtotime($_POST['sDate'])),\n 'location' => $_POST['location'],\n 'description' => $_POST['disc'],\n 'end_date' => date('Y-m-d H:i:s', strtotime($_POST['eDate'])),\n 'visible' => \"on\"\n );\n\n $this->db->insert('events', $values);\n }", "public function setData($data);", "public function setData($data);", "public function setData($data);", "public function setData($data);", "public function setData($data);", "public function setDate($value) {\n\t\t$this->_date = $value;\n\t}", "public function setCalendarName($value)\n {\n return $this->set('CalendarName', $value);\n }", "public function setData( $data ) {\n\t\t$this->data = $data;\n\t\t$this->addField( new ACHRecordField([4,83], $data) );\n\t}", "private function setData($data) {\r\n\t\t$this->set_cd_jogo($data[\"cd_jogo\"]);\r\n\t\t$this->set_nm_jogo($data[\"nm_jogo\"]);\r\n\t\t$this->set_vl_jogo($data[\"vl_jogo\"]);\r\n\t\t$this->set_ds_sinopse(utf8_decode($data[\"ds_sinopse\"]));\r\n\t\t$this->set_dt_lancamento($data[\"dt_lancamento_jogo\"]);\r\n\t\t$this->set_ds_requisito_minimo($data[\"ds_requesito_minimo\"]);\r\n\t\t$this->set_ds_requisito_sugerido($data[\"ds_requesito_sugerido\"]);\r\n\t}", "function setAllData(&$data) {\n\t\t$this->_data =& $data;\n\t}", "function update() {\n\t\t$vars = $this->params['url'];\n\t\t$this->Event->id = $vars['id'];\n\t\t$this->Event->saveField('start', $vars['start']);\n\t\t$this->Event->saveField('end', $vars['end']);\n\t\t$this->Event->saveField('all_day', $vars['allday']);\n\t}", "public function setValues($data)\n {\n $this->name = $data['name'];\n $this->author_name = $data['author_name'];\n $this->author_surname = $data['author_surname'];\n $this->release_year = $data['release_year'];\n $this->request_date = $data['request_date'];\n $this->reserve_day = $data['reserve_day'];\n $this->return_day = $data['return_day'];\n $this->picture = $data['picture'];\n }", "private function _ParseASToVCalendar($data, $folderid, $id) {\n $ical = new iCalComponent();\n $ical->SetType(\"VCALENDAR\");\n $ical->AddProperty(\"VERSION\", \"2.0\");\n $ical->AddProperty(\"PRODID\", \"-//z-push-contrib//NONSGML Z-Push-contrib Calendar//EN\");\n $ical->AddProperty(\"CALSCALE\", \"GREGORIAN\");\n\n if ($folderid[0] == \"C\") {\n $vevent = $this->_ParseASEventToVEvent($data, $id);\n $vevent->AddProperty(\"UID\", $id);\n $ical->AddComponent($vevent);\n if (isset($data->exceptions) && is_array($data->exceptions)) {\n foreach ($data->exceptions as $ex) {\n if (isset($ex->deleted) && $ex->deleted == \"1\") {\n if ($exdate = $vevent->GetPValue(\"EXDATE\")) {\n $vevent->SetPValue(\"EXDATE\", $exdate.\",\".gmdate(\"Ymd\\THis\\Z\", $ex->exceptionstarttime));\n }\n else {\n $vevent->AddProperty(\"EXDATE\", gmdate(\"Ymd\\THis\\Z\", $ex->exceptionstarttime));\n }\n continue;\n }\n\n $exception = $this->_ParseASEventToVEvent($ex, $id);\n if ($data->alldayevent == 1) {\n $exception->AddProperty(\"RECURRENCE-ID\", $this->_GetDateFromUTC(\"Ymd\", $ex->exceptionstarttime, $data->timezone), array(\"VALUE\" => \"DATE\"));\n }\n else {\n $exception->AddProperty(\"RECURRENCE-ID\", gmdate(\"Ymd\\THis\\Z\", $ex->exceptionstarttime));\n }\n $exception->AddProperty(\"UID\", $id);\n $ical->AddComponent($exception);\n }\n }\n }\n if ($folderid[0] == \"T\") {\n $vtodo = $this->_ParseASTaskToVTodo($data, $id);\n $vtodo->AddProperty(\"UID\", $id);\n $vtodo->AddProperty(\"DTSTAMP\", gmdate(\"Ymd\\THis\\Z\"));\n $ical->AddComponent($vtodo);\n }\n\n return $ical->Render();\n }", "public function setData($_data)\n {\n $this->_data = $_data;\n }", "function target_load_calendar_event($event)\n{\n\tif ($GLOBALS['VERBOSE']) pf('...'. $event['descr']);\n\n\tq('INSERT INTO '. $GLOBALS['DBHOST_TBL_PREFIX'] .'calendar (event_day, event_month, event_year, link, descr)\n\tVALUES(\n\t\t'. _esc($poll['day']) .',\n\t\t'. _esc($poll['month']) .',\n\t\t'. _esc($poll['year']) .',\n\t\t'. _esc($poll['link']) .',\n\t\t'. _esc($poll['descr']) .')'\n\t);\n}", "public static function icalendar() {\r\n $ical = \"BEGIN:VCALENDAR\".PHP_EOL;\r\n $ical .= \"VERSION:2.0\".PHP_EOL;\r\n\r\n $show_personal_bak = Calendar_Events::$calsettings->show_personal;\r\n $show_course_bak = Calendar_Events::$calsettings->show_course;\r\n $show_deadline_bak = Calendar_Events::$calsettings->show_deadline;\r\n $show_admin_bak = Calendar_Events::$calsettings->show_admin;\r\n Calendar_Events::set_calendar_settings(1,1,1,1);\r\n Calendar_Events::get_calendar_settings();\r\n $eventlist = Calendar_Events::get_calendar_events();\r\n Calendar_Events::set_calendar_settings($show_personal_bak,$show_course_bak,$show_deadline_bak,$show_admin_bak);\r\n Calendar_Events::get_calendar_settings();\r\n\r\n $events = array();\r\n foreach ($eventlist as $event) {\r\n $ical .= \"BEGIN:VEVENT\".PHP_EOL;\r\n $startdatetime = new DateTime($event->start);\r\n $ical .= \"DTSTART:\".$startdatetime->format(\"Ymd\\THis\").PHP_EOL;\r\n $duration = new DateTime($event->duration);\r\n $ical .= \"DURATION:\".$duration->format(\"\\P\\TH\\Hi\\Ms\\S\").PHP_EOL;\r\n $ical .= \"SUMMARY:[\".strtoupper($event->event_group).\"] \".$event->title.PHP_EOL;\r\n $ical .= \"DESCRIPTION:\".canonicalize_whitespace(strip_tags($event->content)).PHP_EOL;\r\n if ($event->event_group == 'deadline')\r\n {\r\n $ical .= \"BEGIN:VALARM\".PHP_EOL;\r\n $ical .= \"TRIGGER:-PT24H\".PHP_EOL;\r\n $ical .= \"DURATION:PT10H\".PHP_EOL;\r\n $ical .= \"ACTION:DISPLAY\".PHP_EOL;\r\n $ical .= \"DESCRIPTION:DEADLINE REMINDER for \".canonicalize_whitespace(strip_tags($event->title)).PHP_EOL;\r\n $ical .= \"END:VALARM\".PHP_EOL;\r\n }\r\n $ical .= \"END:VEVENT\".PHP_EOL;\r\n }\r\n $ical .= \"END:VCALENDAR\".PHP_EOL;\r\n return $ical;\r\n }" ]
[ "0.6326102", "0.62080693", "0.59551716", "0.5905344", "0.58078855", "0.5721358", "0.5721358", "0.57208437", "0.57203865", "0.57196915", "0.5718755", "0.5718755", "0.5718755", "0.5718755", "0.56782216", "0.5675194", "0.5636373", "0.5578467", "0.55449253", "0.55270684", "0.5507202", "0.5485339", "0.5480922", "0.5461625", "0.5436925", "0.542966", "0.539585", "0.53921574", "0.5391958", "0.53855145", "0.53690124", "0.536639", "0.53512615", "0.53512615", "0.53512615", "0.53462803", "0.53348947", "0.530605", "0.5304249", "0.53011113", "0.5290192", "0.52770644", "0.52705544", "0.5270065", "0.5268709", "0.526455", "0.52549434", "0.52519006", "0.5250052", "0.5223491", "0.5220587", "0.52170736", "0.5215599", "0.5203013", "0.5199165", "0.5198237", "0.5198237", "0.5197168", "0.5193531", "0.5193017", "0.5190553", "0.51903903", "0.51838994", "0.5179061", "0.5177352", "0.51729435", "0.51559895", "0.51557475", "0.51473594", "0.5146873", "0.5146215", "0.5141746", "0.5133605", "0.5119624", "0.5118579", "0.5117204", "0.5116977", "0.51131535", "0.51030236", "0.5101682", "0.5100868", "0.50961685", "0.50737005", "0.50618905", "0.5052834", "0.5052834", "0.5052834", "0.5052834", "0.5052834", "0.5052608", "0.50486296", "0.5044445", "0.50422287", "0.504209", "0.50319", "0.5025209", "0.50219893", "0.50040406", "0.49971342", "0.4991336" ]
0.70743966
0
Set the organiser from this event.
Установите организатора этого события.
public function setOrganiser(CultureFeed_Cdb_Data_Organiser $organiser) { $this->organiser = $organiser; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOrganiser() {\n return $this->organiser;\n }", "protected function setOrganization() {}", "public function set_organizer_key($organizer_key) {\n\t\t$_SESSION['citrix_organizer_key'] = $organizer_key;\n\t\t$this->organizer_key = $organizer_key;\n\t}", "public function organizer()\n {\n return $this->belongsTo(User::class, 'organizer_id');\n }", "public function setOrganisation($organisation)\n\t{\n\t\t$this->_organisation = $organisation;\n\t}", "public function deleteOrganiser() {\n $this->organiser = NULL;\n }", "public function isOrganizer() {\n\t\treturn $this->organizer;\n\t}", "function getOrganisers(&$organisers, $event)\n{\n\tif( $event->has( \"event:agent\" ) )\n\t{\n\t\tforeach( $event->all( \"event:agent\" ) as $agent )\n\t\t{\n\t\t\tif(!$agent->isType(\"http://www.w3.org/ns/org#Organization\"))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$organisers[sid((string)$agent)] = $agent->label();\n\t\t\twhile($agent->has(\"-http://www.w3.org/ns/org#hasSubOrganization\"))\n\t\t\t{\n\t\t\t\t$agent = $agent->get(\"-http://www.w3.org/ns/org#hasSubOrganization\");\n\t\t\t\t$organisers[sid((string)$agent)] = $agent->label();\n\t\t\t}\n\t\t}\n\t}\n}", "function setOrg( $org )\n {\n $org = trim( $org );\n $this->properties['ORG'] = $org;\n }", "public function organizers()\n {\n return $this->belongsToMany('DavideCasiraghi\\LaravelEventsCalendar\\Models\\Organizer', 'event_has_organizers', 'event_id', 'organizer_id');\n }", "public function getOrganismeAssedic() {\n return $this->organismeAssedic;\n }", "protected function setUp()\n {\n $this->object = new Organizer;\n }", "public function setAutor($autor)\n {\n $this->autor = $autor;\n }", "public function setEventManager(EventManagerInterface $eventManager)\n {\n $eventManager->setIdentifiers(array(__CLASS__, get_class($this)));\n\n $this->eventManager = $eventManager;\n }", "public function setEventManager(EventManagerInterface $eventManager)\n {\n $eventManager->setIdentifiers(array(__CLASS__, get_class($this)));\n\n $this->eventManager = $eventManager;\n }", "public function setEventManager(EventManagerInterface $eventManager)\n {\n $eventManager->setIdentifiers(array(__CLASS__, get_class($this)));\n\n $this->eventManager = $eventManager;\n }", "public function edit(Organizator $organizator)\n {\n //\n }", "public function setInspector($inspector) {\n $this->_inspector = $inspector;\n }", "function organiser($key = null)\n {\n if(!current_route_is('organiser.*'))\n return null;\n\n $organiser = request()->route('organiser');\n\n if ($key)\n return $organiser->$key;\n\n return $organiser;\n }", "public function setCodeOrganisme(?string $codeOrganisme): RetraitesEmp {\n $this->codeOrganisme = $codeOrganisme;\n return $this;\n }", "public function testSetAnnulationClient() {\n\n $obj = new Collaborateurs();\n\n $obj->setAnnulationClient(true);\n $this->assertEquals(true, $obj->getAnnulationClient());\n }", "private function set_community( $community ) {\n\t\t$this->community = $community;\n\t}", "public function setAuthor(UserInterface $author);", "public function setAuthor(UserInterface $author);", "public function setAuthor(UserInterface $author)\n {\n $this->author = $author;\n }", "public function setEventManager(EventManagerInterface $eventManager)\n {\n if ($this->eventManager === $eventManager || $eventManager === null) {\n return;\n }\n\n if ($this->eventManager !== null) {\n $this->detach($this->eventManager);\n }\n\n $this->eventManager = $eventManager;\n $this->eventManager->addIdentifiers([\n 'EntityService',\n 'PolderKnowledge\\EntityService\\Service\\EntityService',\n $this->getEntityServiceName(),\n trim($this->getEntityServiceName(), '\\\\'),\n ]);\n\n $this->attach($this->eventManager);\n }", "public function setEventManager(EventManagerInterface $eventManager)\n {\n $this->eventManager = $eventManager;\n }", "public function getOrganisation()\n {\n return $this->organisation;\n }", "public function setPresenter($presenter)\n\t{\n\t\t$this->presenter = $presenter;\n\t}", "function Organization( $org )\r\n\t\t{\r\n\t\tif( trim( $org != \"\" ) )\r\n\t\t\t$this->organization= $org;\r\n\t\t}", "public function setEditorial($editorial)\n {\n $this->editorial = $editorial;\n }", "public function set_reporter($reporter){\r\n\t\t\t$this->_reporter = $reporter;\r\n\t\t}", "public function getOrganization()\n {\n return $this->organization;\n }", "public function getOrganization()\n {\n return $this->organization;\n }", "public function getOrganization()\n {\n return $this->organization;\n }", "public function init() {\n\n //AUTHORIZATION CHECK\n if (!$this->_helper->requireAuth()->setAuthParams('siteevent_event', null, \"view\")->isValid())\n $this->respondWithError('unauthorized');\n\n //RETURN IF SUBJECT IS ALREADY SET\n if (Engine_Api::_()->core()->hasSubject())\n $this->respondWithError('unauthorized');\n\n //SET TOPIC OR EVENT SUBJECT\n if (0 != ($organizer_id = (int) $this->_getParam('organizer_id')) &&\n null != ($organizer = Engine_Api::_()->getItem('siteevent_organizer', $organizer_id))) {\n Engine_Api::_()->core()->setSubject($organizer);\n }\n }", "function organization ($org) {\n if(!empty($org)) $this->xheaders['Organization'] = $org;\n }", "public function setEventManager(EventManager $eventManager)\n {\n $this->eventManager = $eventManager;\n }", "public function show(Organizator $organizator)\n {\n //\n }", "public function testSetOrganismeCacm() {\n\n $obj = new AttestationCacm();\n\n $obj->setOrganismeCacm(\"organismeCacm\");\n $this->assertEquals(\"organismeCacm\", $obj->getOrganismeCacm());\n }", "public function setEventManager(EventManager $eventManager): void\n {\n $this->eventManager = $eventManager;\n }", "Public Function setPublisherLogin($PublisherLogin) {\n\t\t$this->publisherLogin = $PublisherLogin;\n\t\n\t}", "function setDistributor($inDistributor){\n\t\treturn $this->setParam(self::PARAM_DISTRIBUTOR, $inDistributor);\n\t}", "function setEnvelopeSender($envelopeSender) {\n\t\t$this->setData('envelopeSender', $envelopeSender);\n\t}", "public function getOrganisation()\n\t{\n\t\treturn $this->_organisation;\n\t}", "public function setter() {\n return $this->belongsTo('App\\User', 'marketer');\n }", "public function getOrganisateurSpectacle() {\n return $this->organisateurSpectacle;\n }", "public function setArtist($artist) {\r\n $this->_artist = $artist;\r\n }", "public function setOwner($owner) {\n\t\t$this->owner = $owner;\n\t}", "public function setOwner($owner) {\n\t\t$this->owner = $owner;\n\t}", "public function setAssignedToAttribute($value)\n {\n $this->attributes['assigned_to'] = $value['id'];\n }", "public function set_autor($_autor)\n {\n $this->_autor = $_autor;\n\n return $this;\n }", "function set_owner($owner)\n {\n $this->set_default_property(self :: PROPERTY_OWNER, $owner);\n }", "function setEstanteria($_codigoEstanteria){\r\n $this->estanteria=$_codigoEstanteria;\r\n }", "public function __construct($organization)\n {\n $this->organization = $organization;\n }", "public function setOrganization($val)\n {\n $this->_propDict[\"organization\"] = $val;\n return $this;\n }", "public function organization() {\n return $this->belongsTo('App\\Models\\Organization');\n }", "public function setCreatedByAttribute(){\n $this->attributes['created_by'] = Auth::user()->id;\n }", "public function organization()\n {\n return $this->belongsTo('App\\Organization');\n }", "public function setRegistrant($value) {\n\t\tself::$_registrant = $value;\n\t}", "public function setPublisher($val)\n {\n $this->_propDict[\"publisher\"] = $val;\n return $this;\n }", "public function setEventManager(EventManagerInterface $events)\n {\n\n $entityManager = $this->entityManager;\n $role_id = $this->auth_user_role;\n // echo \" the fuck? ... not sure why this runs twice\";\n $events->attach('load-person', function (EventInterface $e) use ($entityManager, $role_id) {\n $person = $e->getParam('person');\n $hat = $person->getHat();\n $form = $e->getParam('form');\n $hat_options = $form->get('user')->get('person')->get('hat')\n ->getValueOptions();\n $hats_allowed = array_column($hat_options, 'value');\n if (! in_array($hat->getId(), $hats_allowed)) {\n $message = sprintf(\n 'The person identified by id %d, %s %s, wears the hat %s, '\n . 'but people in that category do not have user accounts '\n . 'in this system.',\n $person->getId(),\n $person->getFirstName(),\n $person->getLastname(),\n $hat\n );\n $controller = $e->getTarget();\n $controller->flashMessenger()->addErrorMessage($message);\n return $controller->redirect()->toRoute('users');\n }\n\n /**\n * this needs work. there are rare cases where one and the same\n * person may legitimately have to have more than one user account,\n * only one of which can be active at any one time, and each having\n * a different role from the other: 'submitter' vs any of the other\n * roles.\n */\n $user = $entityManager->getRepository('InterpretersOffice\\Entity\\User')\n ->findOneBy(['person' => $person]);\n //->getUser(['entity'=>'person','id' => $person->getId()]);\n if ($user) {\n $container = $e->getTarget()->getEvent()->getApplication()\n ->getServiceManager();\n\n $message = sprintf(\n 'We can\\'t create a new user account because this person '\n . ' (%s %s, id %d) already has one. ',\n $person->getFirstname(),\n $person->getLastname(),\n $person->getId()\n );\n $acl = $e->getTarget()->getEvent()->getApplication()\n ->getServiceManager()->get('acl');\n if ($acl->isAllowed($role_id, $user->getResourceId())) {\n $helper = $container->get('ViewHelperManager')->get('url');\n $url = $helper('users/edit', ['id' => $user->getId()]);\n $message .= sprintf(\n 'You can <a href=\"%s\">edit it</a> if you want to.',\n $url\n );\n }\n $controller = $e->getTarget();\n $controller->flashMessenger()->addErrorMessage($message);\n return $controller->redirect()->toRoute('users');\n }\n });\n // are they authorized to edit this user account?\n $events->attach('load-user', function (EventInterface $e) use ($role_id) {\n $resource_id = $e->getParam('user')->getResourceId();\n $acl = $e->getTarget()->getEvent()->getApplication()\n ->getServiceManager()->get('acl');\n if (! $acl->isAllowed($role_id, $resource_id)) {\n $controller = $e->getTarget();\n $message = \"Access denied to {$resource_id}'s user account\";\n $controller->flashMessenger()->addErrorMessage($message);\n return $controller->redirect()->toRoute('users');\n } else {\n $services = $e->getTarget()->getEvent()->getApplication()\n ->getServiceManager();\n $services->get(Entity\\Listener\\UpdateListener::class)\n ->setAuth($this->auth);\n }\n });\n\n return parent::setEventManager($events);\n }", "public function setEmployer($employer)\n {\n $this->employer = $employer;\n }", "public function organization()\n {\n return $this->belongsTo('F3\\Models\\Organization', 'party_id', 'party_id');\n }", "protected function setOwner($owner) {\r\n $this->owner = $this->create($owner);\r\n }", "public function testCanSetAndGetOrganizationName()\n {\n $mockOrgName = 'GRIIDC';\n\n $this->dataCenter->setOrganizationName($mockOrgName);\n\n $this->assertEquals($mockOrgName, $this->dataCenter->getOrganizationName());\n }", "protected function setTo() {}", "public function setPublisher(?string $value): void {\n $this->getBackingStore()->set('publisher', $value);\n }", "public function setPublisher(?string $value): void {\n $this->getBackingStore()->set('publisher', $value);\n }", "public function setPublisher(?string $value): void {\n $this->getBackingStore()->set('publisher', $value);\n }", "public function setTransportation($transportation)\n {\n $this->_transportation = $transportation;\n }", "public function testSetAnnulationArticle() {\n\n $obj = new Collaborateurs();\n\n $obj->setAnnulationArticle(true);\n $this->assertEquals(true, $obj->getAnnulationArticle());\n }", "public function setCreatedBy(?IdentitySet $value): void {\n $this->getBackingStore()->set('createdBy', $value);\n }", "public function setCreatedBy(?IdentitySet $value): void {\n $this->getBackingStore()->set('createdBy', $value);\n }", "public function __construct(Organisation $organisation)\n {\n $this->organisation = $organisation;\n }", "public function setPublisher($publisher = null): object\n\t{\n\t\tif (null !== $publisher && !($publisher instanceof FHIRString)) {\n\t\t\t$publisher = new FHIRString($publisher);\n\t\t}\n\t\t$this->_trackValueSet($this->publisher, $publisher);\n\t\t$this->publisher = $publisher;\n\t\treturn $this;\n\t}", "public function setInitiator(?IdentitySet $value): void {\n $this->getBackingStore()->set('initiator', $value);\n }", "public function setReportedBy($value)\n {\n $this->setItemValue('reported_by', ['id' => (int)$value]);\n }", "public function setBy($x) { $this->by = $x; }", "public function add_organiser($memberid){\n $sql = \"INSERT INTO tournamentOrganisers(tournamentID, organiserID) VALUES ($this->id, $memberid)\";\n $result = self::$database->query($sql);\n if (!$result){\n $this->errors[] = \"Insertion of organiser failed. Either member id doesnt exist or member is already an organiser.\";\n }\n }", "public function setReceiver($receiver) {\n $this->_receiver = $receiver;\n }", "public function setArtist($artist)\n {\n $this->artist = $artist;\n }", "public function setVenue()\n {\n // Set the font.\n $this->AddFont('MTCORSVA', '', 'MTCORSVA.php');\n $this->SetFont('MTCORSVA', '', 18);\n\n // Line break.\n $this->Ln(11);\n\n $this->Cell(259, 35, 'Given this ' . date('jS \\d\\a\\y \\of F, Y', strtotime($this->aScheduleDetails['toDate'])) . ' at', 0, 0, 'C');\n\n // Line break.\n $this->Ln(10);\n\n $this->Cell(259, 35, $this->aScheduleDetails['address'], 0, 0, 'C');\n }", "public function setEventManager(EventCollection $event_manager)\r\n {\r\n $this->events = $event_manager;\r\n return $this;\r\n }", "public function getEnterer()\n {\n return $this->enterer;\n }", "public function __construct()\n {\n $this->name = 'Organizer';\n $this->typeModule = 'back';\n }", "public function setAgency(\\bunge\\StructType\\RespPlateAuthTransporter $agency = null)\n {\n if (is_null($agency) || (is_array($agency) && empty($agency))) {\n unset($this->agency);\n } else {\n $this->agency = $agency;\n }\n return $this;\n }", "protected function setAuthors() {\r\n\t\t// authors, yes, we can handle more than one per article\r\n\t\t$authorsStg = $this->newsItem->getAuthor();\r\n\t\tif (!empty($authorsStg)) {\r\n\t\t\t$authors = t3lib_div::trimExplode(',', $authorsStg);\r\n\t\t\t$allowedCount = intval($this->settings['news']['semantic']['general']['author']['max']);\r\n\t\t\t$this->authors = (empty($allowedCount)) ? $authors : array_slice($authors, 0, $allowedCount);\r\n\t\t}\r\n\t}", "public function set($identifier, $participation);", "public function __construct(\n EventRepository $local_event_repository,\n EntryAPIImprovedFactory $improved_entry_api,\n EventImporterInterface $event_importer,\n PlaceService $place_service,\n OrganizerService $organizer_service,\n MetadataEnrichingEventStreamDecorator $event_stream_metadata_enricher,\n ConfigFactory $config\n ) {\n $this->localEventRepository = $local_event_repository;\n $this->improvedEntryApi = $improved_entry_api;\n $this->eventImporter = $event_importer;\n $this->organizerService = $organizer_service;\n $this->placeService = $place_service;\n $this->eventStreamMetadataEnricher = $event_stream_metadata_enricher;\n $this->config = $config->get('culturefeed_udb3.settings');\n }", "protected function setSubject() {}", "protected function setEventsManager(EventsManagerInterface $eventsManager) {}", "public function setEventManager(EventManagerInterface $eventManager)\n {\n $eventManager->setIdentifiers(\n array(\n __CLASS__,\n get_class($this),\n )\n );\n $this->_events = $eventManager;\n return $this;\n }", "public function setOrganismeAssedic($organismeAssedic) {\n $this->organismeAssedic = $organismeAssedic;\n return $this;\n }", "public function initEvent()\n {\n $this->owner->{$this->createdAtField} = date($this->format);\n $this->owner->{$this->updatedAtField} = date($this->format);\n }", "public function setAggregateResolver(ResolverInterface $aggregateResolver)\n {\n $this->aggregateResolver = $aggregateResolver;\n }", "public function setAggregateResolver(ResolverInterface $aggregateResolver)\n {\n $this->aggregateResolver = $aggregateResolver;\n }", "public function get_organizer_by_id( $organizer_id ) {\r\n\t\t$existing_organizer = get_posts( array(\r\n\t\t\t'posts_per_page' => 1,\r\n\t\t\t'post_type' => $this->oraganizer_posttype,\r\n\t\t\t'meta_key' => 'ime_event_organizer_id',\r\n\t\t\t'meta_value' => $organizer_id,\r\n\t\t\t'suppress_filters' => false,\r\n\t\t) );\r\n\r\n\t\tif ( is_array( $existing_organizer ) && ! empty( $existing_organizer ) ) {\r\n\t\t\treturn $existing_organizer[0]->ID;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public function setCreator(UserInterface $user)\n {\n $this->entity->setCreator($user);\n }", "public function setOrganizations(?int $value): void {\n $this->getBackingStore()->set('organizations', $value);\n }" ]
[ "0.6622959", "0.61169004", "0.59210384", "0.5665311", "0.5624373", "0.56112605", "0.5436014", "0.5255994", "0.51777697", "0.5140903", "0.5056154", "0.50486976", "0.50321203", "0.5020482", "0.5020482", "0.5020482", "0.5015321", "0.49897176", "0.4970243", "0.49462056", "0.49192056", "0.48956954", "0.4891", "0.4891", "0.488938", "0.48780406", "0.48684648", "0.48647848", "0.48354313", "0.48285642", "0.48282015", "0.48268348", "0.4807297", "0.4807297", "0.4807297", "0.47888383", "0.47869647", "0.4776125", "0.47743756", "0.47591963", "0.47558895", "0.47324154", "0.47153538", "0.47116867", "0.4694656", "0.46830505", "0.46752307", "0.4675051", "0.46737248", "0.46737248", "0.46607974", "0.46567318", "0.46550387", "0.46516624", "0.46397", "0.463175", "0.46288493", "0.4616717", "0.461096", "0.46020114", "0.458921", "0.45878032", "0.4582298", "0.457718", "0.4570258", "0.45675895", "0.45672366", "0.4557325", "0.4557325", "0.4557325", "0.4554845", "0.45529926", "0.45453104", "0.45453104", "0.45377025", "0.4528113", "0.4520987", "0.4514225", "0.45048258", "0.44972256", "0.4492026", "0.4490058", "0.4488262", "0.44866148", "0.44788122", "0.4467601", "0.4464267", "0.44511622", "0.44505897", "0.44486663", "0.4437937", "0.44324592", "0.4431639", "0.44208866", "0.44208342", "0.44179425", "0.44179425", "0.4407028", "0.44052312", "0.44024518" ]
0.72573936
0
Delete the organiser from this event.
Удалить организатора из этого события.
public function deleteOrganiser() { $this->organiser = NULL; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function destroy(Organizator $organizator)\n {\n //\n }", "public function remove_organiser($memberid){\n $sql = \"DELETE FROM tournamentOrganisers WHERE tournamentID=$this->id AND organiserID=$memberid\";\n $result = self::$database->query($sql);\n }", "public function delete()\n {\n if ($this->sportevent) {\n return $this->sportevent->delete();\n }\n }", "public function delete(): void\n {\n $this->record(new AgendaWasDeleted($this->identity));\n }", "public function destroy($event_id,$presenter)\n {\n $event = Event::find($event_id);\n if($event->organiser->id != auth()->user()->id){\n return redirect()->route(\"events.index\");\n }\n if($event->presenters()->where(\"user_id\",$presenter)->count() == 1){\n $event->presenters()->detach($presenter);\n }\n return redirect()->route(\"presenters.create\",['event_id'=>$event_id]);\n\n }", "public function delete($organization);", "public function destroy($id)\n {\n $organisation = Organisation::find($id);\n $organisation->delete();\n }", "public function destroy($distributor_id)\n {\n if(auth()->user()->hasPermissionTo('distributor-delete')){\n $distributor = $this->model->show($distributor_id); \n $details = Distributors::where([\n \"distributor_id\" => $distributor_id, \n ])->first();\n // $email = $details->email;\n // $user = User::where([\n // \"email\" => $email, \n // ])->first();\n // $user_id = $user->user_id;\n \n $details= $distributor->name; \n $log = new ActivityLog([\n \"operations\" => \"Deleted \". \" \". $details. \" \". \" From The Distributors List\",\n \"user_id\" => Auth::user()->user_id,\n ]);\n if (($distributor->delete($distributor_id)) AND ($distributor->trashed())) {\n $user->removeRole(\"Distributor\");\n return redirect()->back()->with([\n 'success' => \"You Have Deleted \". \" \". $details. \" \". \"From The Distributor Details Successfully\",\n ]);\n }\n } else{\n return redirect()->back()->with([\n 'error' => \"You Dont have Access To Delete A Distributor\",\n ]);\n }\n }", "public function delete()\n {\n DB::transaction(function () {\n $this->devedores()->delete();\n parent::delete();\n });\n }", "public function destroy(Designation $designation)\n {\n //\n }", "public function delete()\n {\n $workflow = $this->site->getWorkflows()->create(\n 'remove_site_organization_membership',\n ['params' => ['organization_id' => $this->id,],]\n );\n return $workflow;\n }", "public function deleteEvent($event)\n {\n $this->entityManager->remove($event);\n $this->entityManager->flush();\n }", "public function delete() {\r\n\r\n\t\t// Does the Genre object have an ID?\r\n\t\tif ( is_null( $this->id ) ) trigger_error ( \"Genre::delete(): Attempt to delete an Genre object that does not have its ID property set.\", E_USER_ERROR );\r\n\r\n\t\t// Delete the Article\r\n\t\t$conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\r\n\t\t$st = $conn->prepare ( \"DELETE FROM :table WHERE id = :id LIMIT 1\" );\r\n\t\t$st->bindValue( \":table\", DB_TBL_GENRE, PDO::PARAM_STR );\r\n\t\t$st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\r\n\t\t$st->execute();\r\n\t\t$conn = null;\r\n\t}", "public function destroy(Attendace $attendace)\n {\n //\n }", "public function delete()\n {\n $this->_validateModifiable();\n\n $this->_getDataSource()->delete($this);\n }", "public function destroy($id)\n {\n $Organizer = User::where('role','Organizer')->findOrFail($id);\n\n $Organizer->delete();\n\n if ($Organizer) {\n return ['Success'=>'Organizer Deleted Successfuly.'];\n }else{\n return ['Erorr'=>'Try Agin Later.'];\n }\n }", "public function delete() {\r\n\t\t$this->getMapper()->delete($this);\r\n\t}", "public function destroy(DesignInstitute $designInstitute)\n {\n //\n }", "public function destroy(Employer $employer)\n {\n //\n }", "public function delete(){\n $this->probe_requests()->detach();\n\n // Delete the event itself\n $result = parent::delete();\n\n return $result;\n }", "public function destroy(Agenda $agenda)\n {\n //\n }", "public function destroy(Corporate $corporate)\n {\n dd('delete corporate');\n }", "public function destroy(Event $event)\n {\n $event->delete();\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($group_id,$corporation_id)\n {\n $seatgroup=Seatgroup::find($group_id);\n $name=$seatgroup->corporation()->find($corporation_id)->get();\n $seatgroup->corporation()->detach($corporation_id);\n\n return redirect()->back()->with('success', $name->pluck('name'). ' removed');\n\n }", "public function destroy(Org $org)\n {\n //\n }", "function delete() {\n $this->that->delete($this->id, $this->name);\n $this->put_id();\n }", "public function destroy(Volunteer $volunteer)\n {\n //\n }", "public function delete()\n {\n $this->repository->delete($this->id);\n }", "public function deleteAlbum()\n {\n if (Auth::user()->cannot('delete', Album::class)) {\n redirect()->to('artist.list');\n }\n \n // get album\n $album = Album::find($this->albumId);\n $album->delete();\n\n // reset\n $this->albumId = null;\n $this->album = null;\n $this->modalMessage = null;\n\n // event\n $this->emit('albumDeleted');\n $this->dispatchBrowserEvent('albumDeleted');\n }", "public function delete()\n {\n $this->abilities()->detach();\n parent::delete();\n }", "public final function delete() {\n }", "public function delete() {\n\t\t$this->assignment->delete();\n\t}", "public function delete() \n {\n DomainWatcher::addDeletedObject($this);\n }", "public function destroy(Organization $organization)\n {\n //\n }", "public function destroy(InternCalendar $internCalendar)\n {\n //\n }", "public function destroy(Instructor $instructor)\n {\n //\n }", "public function getOrganiser() {\n return $this->organiser;\n }", "public function destroy(Order $order, Calification $calification)\n {\n //\n }", "public function deleteUserAgendaAction()\n {\n /** @var Object_Agenda $agenda */\n $data = $this->getRequestData();\n if (isset($data['agenda_id'])) {\n $agenda = Object_Agenda::getById($data['agenda_id']);\n if (!$agenda) {\n $this->setErrorResponse('no Agenda with this agenda_id!');\n } elseif ($this->getDeviceSession()->getUserId() == $agenda->getCreator()->getId()) {\n $agenda->setPublished(false);\n if (!$agenda->save()) {\n $this->setErrorResponse('cannot delete Agenda object!');\n }\n } else {\n $this->setErrorResponse('no Agenda for this user with current agenda_id!');\n }\n } else {\n $this->setErrorResponse('agenda_id is mandatory field for this request!');\n }\n $this->_helper->json(array('deleted' => true));\n }", "public function delete()\n {\n $this->staff->delete();\n $this->notify('Staff member was removed', 'hub.staff.index');\n }", "public function destroy(Organization $organization)\n {\n $organization->delete(); \n \n return Redirect::route('organizations.index')->with(['success' => 'Organization Deleted Successful']);\n }", "public function destroy($id)\n {\n\n $event = Event::find($id);\n\n $registra = $event->event_registra;\n \n if(Gate::allows('delete-event',$registra)){\n\n $title = $event->title;\n $event_delete_status = $event->delete();\n\n if($event_delete_status){\n\n $action = \"Deleted an event with the title '\".$title.\"'\";\n LogsController::logger($action, $this->date_of_action); \n\n return redirect('/events')->with('event-success','Event successfully deleted');\n }\n else{\n return redirect('/events')->with('event-fail','Event not deleted!');\n }\n\n }\n\n }", "public function delete(){\r\n\t\t// Check for request forgeries\r\n\t\tJSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\r\n\t\r\n\t\t// Get the model.\r\n\t\t$model = $this->getModel(\"ManageCompanyEvent\");\r\n\t\t$this->deleteEvents($model);\r\n\t\r\n\t\t$this->setRedirect('index.php?option=com_jbusinessdirectory&view='.$this->input->get('view'));\r\n\t}", "public function destroy(ocupation $ocupation)\n {\n //\n }", "public function destroy(Reviewer $reviewer)\n {\n //\n }", "public function purge()\n {\n $this->owner()->where('current_organization_id', $this->id)\n ->update(['current_organization_id' => null]);\n\n $this->users()->where('current_organization_id', $this->id)\n ->update(['current_organization_id' => null]);\n\n $this->users()->detach();\n\n $this->delete();\n }", "public function deletePoster()\r\n\t{\r\n\t\t// Donnees\r\n\t\t$eventId = Bn::getValue('event_id');\r\n\t\t$oEvent = new Oevent($eventId);\r\n\t\t$oEvent->deletePoster();\r\n\t\treturn BPREF_PAGE_PRESENTATION;\r\n\t}", "public function destroy(DonationCentre $donationCentre)\n {\n //\n }", "public function destroy(Estudiante $estudiante)\n {\n //\n }", "public function delete($Enterprise) { ; }", "public function destroy(Saler $saler)\n {\n //\n }", "public function delete()\n {\n // TODO: Implement delete() method.\n }", "public static function destroyEstudiante($idEstu)\n{\n $estudiante = Estudiante::find($idEstu);\n $estudiante->delete();\n}", "public function destroy($event_id)\n { \n $events=new Events;\n $events->find($event_id)->delete();\n }", "public function destroy(Professionnel $professionnel)\n {\n //\n }", "public function destroy($id)\n {\n if (Sentry::check()) {\n // Find active user\n $user = Sentry::getUser();\n $event = Appointment::find($id);\n\n // Check if User belongs to group/school which the appointment is from\n if ($user->hasAccess('school') || ($user->hasAccess('event') && $user->school_id == $event->group->school_id)) {\n $event->delete();\n }\n\n return Redirect::route('calendar.index');\n } else {\n return Redirect::route('landing');\n }\n }", "public function destroy(attendence $attendence)\n\t{\n\t\t//\n\t}", "public function destroy($id)\n {\n $organization = Organization::find($id);\n $organization->delete();\n flash('Organization Deleted!');\n return redirect('/cabinet/organizations');\n }", "public function destroy(Request $request)\n {\n $this->authorize('delete', new Evento());\n $evento = Evento::findOrFail($request->id);\n $evento->delete();\n toast('Evento eliminado correctamente', 'success');\n return redirect()->route('evento.index');\n }", "public function deleted(Investor $investor)\n {\n //\n }", "public function delete() {\n\t\t$this->deleted = true;\n\t}", "public static function destroy()\n {\n if (!Authentication::is_logged_in()) {\n AnswerHandler::create_response_and_kill_page(false, \"unauthorized\", 401);\n } else {\n $tutor = Tutor::get_Tutor(Authentication::$user_email);\n if ($tutor == false) {\n AnswerHandler::create_response_and_kill_page(false, \"No Data\", 400);\n } else {\n $tutor->delete_tutor();\n User::getUser(Authentication::$user_email)->deleteAllSubjects();\n AnswerHandler::create_response_and_kill_page(true, \"Sucessfully deleted\");\n }\n }\n }", "public function destroy($incidencia)\n {\n //\n Incidencies::find($incidencia)->delete();\n }", "public function deleteSportsVenue($venue);", "public function destroy(Distributor $distributor, Request $request)\n {\n $logued_user = Auth::user();\n if($logued_user->usrc_admin || $logued_user->can('delete.dist')){\n if(!$this->controllerUserCanAccess(Auth::user(),$distributor->id)){\n return view('errors.403');\n }\n if (isset($distributor)){\n $fmessage = 'Se ha eliminado el distribuidor: '.$distributor->distrib_nom;\n \\Session::flash('message',$fmessage);\n $this->registeredBinnacle($request->all(), 'destroy', $fmessage, $logued_user ? $logued_user->id : '', $logued_user ? $logued_user->name : '');\n $distributor->delete();\n }\n return redirect()->route('distributor.index');\n }else{\n return view('errors.403');\n }\n }", "public function setOrganiser(CultureFeed_Cdb_Data_Organiser $organiser) {\n $this->organiser = $organiser;\n }", "public function destroy(Announcement $announcement)\n {\n //\n }", "public function destroy(Announcement $announcement)\n {\n //\n }", "public function destroy(fornecedor $fornecedor)\n {\n //\n }", "public function destroy(Event $event)\n {\n $event->delete();\n return redirect('events');\n }", "public function destroy(Dateplanner $dateplanner)\n {\n //\n }", "public function delete()\n {\n $this->throwForbiddenUnless(SecurityUtil::checkPermission('PostCalendar::', '::', ACCESS_ADD), LogUtil::getErrorMsgPermission());\n\n $eid = FormUtil::getPassedValue('eid'); // seems like this should be handled by the eventHandler\n $render = FormUtil::newForm('PostCalendar', $this);\n\n // get the event from the DB\n $event = DBUtil::selectObjectByID('postcalendar_events', $eid, 'eid');\n $event = ModUtil::apiFunc('PostCalendar', 'event', 'formateventarrayfordisplay', $event);\n\n $render->assign('loaded_event', $event);\n return $render->execute('event/deleteeventconfirm.tpl', new PostCalendar_Form_Handler_EditHandler());\n }", "public function delete(Event $event){\r\n $stmt = $this->db->prepare(\"DELETE FROM event WHERE id_event = ?\");\r\n $stmt->execute(array($event->getIdEvent()));\r\n }", "public function destroy(Oficina $oficina)\n {\n //\n }", "public function destroy(Designation $designation)\n {\n $designation->delete();\n return redirect()->route('designation.index')->with('info','Designation Deleted Successfully');\n }", "public function deleted(Invitation $invitation)\n {\n //\n }", "public function deleted(Invitation $invitation)\n {\n //\n }", "public function delete()\n {\n $this->administrador()->delete();\n $this->vendedor()->delete();\n return parent::delete();\n }", "public function deleteEvent() {\n $event = EventDCI::find(Input::get('id'));\n if($event->user_id == Auth::user()->id) {\n /* Sending email to all boss that have relation with the services */\n $departments_sended_mail = array();\n foreach ($event->services()->wherePivot('deleted_at', '=', NULL)->get() as $service) {\n /* Getting the departments associated to the services */\n $department = $service->department()->first();\n\n if(!in_array($department->id, $departments_sended_mail)) {\n /* Getting the users associated to a department that they are bosses */\n $users = $department->users()->where('user_type_id', '=', 3)->where('status', '=', 1)->get();\n\n if($users->isEmpty()) {\n /* Getting the admin users */\n $users = User::where('user_type_id', '=', 4)->where('status', '=', 1)->get();\n }\n\n /* Sending email to bosses or admins (users) */\n foreach ($users as $user) {\n Mail::send('emails.notification.deleteevent',\n array(\n 'event' => $event->name,\n ),\n function($message) use($user) {\n $message->to($user->email)->subject('Evento eliminado - DCI');\n }\n\n );\n }\n\n array_push($departments_sended_mail, $department->id);\n }\n }\n $event->delete();\n return Redirect::to('dashboard')->with('alert', 'Evento eliminado exitosamente ' . $event->id_dci);\n }\n else {\n return Redirect::to('dashboard')->with('alert', 'Usted no tiene permisos para eliminar este evento' . $event->id_dci);\n }\n\n }", "public function deleteOrg($orgUsername)\n {\n $values=array($orgUsername);\n \n //Check If There Is Appointment In The DB That Linked To This Organization\n $check=$this->getInfo(\"SELECT count(*) as nt FROM appointment WHERE username=?\",$values);\n\n if($check[0]['nt'])\n die(\"לא ניתן למחוק ארגון שעבורו נקבע תור\");\n \n //Query To Get All The Branches ID's Of This Organization \n $sqlSelect =\"SELECT branch_id FROM branch WHERE org_username=?\";\n $branches=$this->getInfo($sqlSelect,$values);\n \n foreach($branches as $br)\n {\n $this->deleteBranch($br['branch_id']);\n }\n \n //Delete From org_represent Table All The data That Linked To This Organization\n $sqlDel=\"DELETE FROM org_represent WHERE username=?\";\n $this->execute($sqlDel,$values);\n \n //Delete From org_manager Table All The data That Linked To This Organization\n $sqlDel=\"DELETE FROM org_manager WHERE username=?\";\n $this->execute($sqlDel,$values);\n \n //Delete From organization Table All The data That Linked To This Organization\n $sqlDel=\"DELETE FROM organization WHERE organization_username=?\";\n $this->execute($sqlDel,$values);\n \n die(\"בוצע בהצלחה\");\n }", "public function destroy(scholarshipRegistration $scholarshipRegistration)\n {\n //\n }", "public function deleted(Instructor $instructor)\n {\n //\n }", "public function destroy($id)\n {\n $org = Orgjed::find($id);\n $org->delete();\n // redirect\n Session::flash('message', 'Organizacijska jedinica je uspješno obrisana!');\n return Redirect::to('orgjed');\n }", "public function delete($calendario);", "public function destroy(Event $event)\n {\n //$event = Event::findOrFail($id);\n $event->delete($event);\n flash('Evenement supprimer avec succes','danger');\n return redirect(route('home'));\n }", "public function destroy()\n {\n ConsultantAssignment::where('id','=',Input::get('id'))->delete();\n\n return Response::json(array('msg' => 'Registered consultancy deleted','success'=>true), 200);\n }", "function delete() {\n\t\n\t\t$this->getMapper()->delete($this);\n\t\t\n\t}", "public function deleteOrganisation($id)\n {\n\n $organisation = Organisation::where('org_id','=', $id)->delete();\n if ($organisation) {\n return response()->json([\n \"status\" => \"sussess\",\n \"message\" => \"Organisation deleted successfully\",\n \"code\" => 200\n ], 200);\n\n } else {\n\n return response()->json([\n \"status\" => \"failed\", \n \"message\" => \"Organisation not found\",\n \"code\" => 404\n ], 404);\n\n }\n }", "public function unassignDepartment() {\n if($this->department)\n $this->department()->delete();\n }", "public function destroy($id)\n {\n \t//valida se User tem Autorização\n \t$this->authorize('evento_delete');\n \t\n \t$evento = $this->Evento->find($id);\n \t//Valida Multi-Empresa\n \t$this->authorize('mesma-igreja', $evento->Igrejas_idIgrejas);\n \t\n \t$evento->delete();\n \tflash('Evento Deletado com sucesso!', 'success');\n \treturn redirect()->route('evento.index');\n }", "public function remove_officer()\n {\n if ($this->mgovdb->deleteData('Dept_Officers', get_post('o'))) {\n $return_data = array(\n 'status' => true,\n 'message' => 'Officer has been removed.'\n );\n } else {\n $return_data = array(\n 'status' => false,\n 'message' => 'Removing officer failed.'\n );\n }\n\n response_json($return_data);\n }", "public function destroy(EstabelecimentoSaude $estabelecimentoSaude)\n {\n //\n }", "public function destroy(Attendance $attendance)\n {\n //\n }", "public function destroy(Attendance $attendance)\n {\n //\n }", "public function destroy(Attendance $attendance)\n {\n //\n }", "public function delete(User $user, AcademicYear $academicYear)\n {\n //\n }", "public function destroy(ClientUnification $clientUnification)\n {\n //\n }", "public function delete() {\n\n $id = $this->uri->segment(4);\n $this->events_model->delete_event($id);\n redirect('admin/events');\n\n }" ]
[ "0.69003993", "0.631365", "0.59371656", "0.5741597", "0.57172453", "0.5633651", "0.55949855", "0.5469599", "0.54365337", "0.5415219", "0.5362119", "0.53501904", "0.53059244", "0.53002864", "0.52841663", "0.5278787", "0.5266372", "0.5265326", "0.5262433", "0.5243839", "0.52348393", "0.5230527", "0.52273977", "0.522355", "0.52199006", "0.52091575", "0.51912534", "0.5184566", "0.518366", "0.51755154", "0.5170424", "0.5169815", "0.5166991", "0.5160456", "0.51569253", "0.5153351", "0.5123581", "0.5121467", "0.51188034", "0.51163715", "0.5111572", "0.5105951", "0.5104516", "0.5100742", "0.50699884", "0.50658274", "0.50636053", "0.5062155", "0.5047399", "0.50471747", "0.50463134", "0.5043354", "0.5041537", "0.50385237", "0.50380045", "0.5023305", "0.50213224", "0.5017242", "0.50138867", "0.5011659", "0.50082844", "0.5006771", "0.49931976", "0.49914", "0.49900663", "0.49839133", "0.49815458", "0.49782562", "0.49707934", "0.49707934", "0.49585712", "0.49558258", "0.49489647", "0.49477154", "0.4943582", "0.49405757", "0.4939677", "0.49396363", "0.49396363", "0.49370623", "0.49364665", "0.49361897", "0.49315703", "0.49298936", "0.49270806", "0.49258888", "0.49169943", "0.49130732", "0.4910668", "0.49092105", "0.49081194", "0.4907453", "0.49059618", "0.49057424", "0.4904826", "0.4904826", "0.4904826", "0.49001512", "0.48937824", "0.48926997" ]
0.79746175
0
Set the maximum amount of participants.
Установите максимальное количество участников.
public function setMaxParticipants($maxParticipants) { $this->maxParticipants = $maxParticipants; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setMaxParticipants($max_participants)\n {\n $this->max_participants = $max_participants;\n }", "public function setMaxParticipants(int $maxParticipants): self\n {\n $this->options['maxParticipants'] = $maxParticipants;\n return $this;\n }", "public function set_group_default_max_recipients()\n\t{\n\t\t$sql = 'UPDATE ' . GROUPS_TABLE . ' SET group_max_recipients = 5\n\t\t\tWHERE ' . $this->db->sql_in_set('group_name', array('GUESTS', 'REGISTERED', 'REGISTERED_COPPA', 'BOTS'));\n\t\t$this->sql_query($sql);\n\t}", "public function setMax( int $max ): void {\n\t\t\t$this->maximum = $max;\n\t\t}", "public function setMaximum($value) {\r\n $this->internalSetMaximum($value);\r\n }", "public function SetMaxCount ($maxCount);", "public function setMaximumValue(int $maximumValue): void;", "public function getMaxParticipants() {\n return $this->maxParticipants;\n }", "public function setMaxLength(int $max):void {\r\n\t\t$this->maxLength = $max;\r\n\t}", "public function setLimit ($value)\r\n\t{\r\n\t\t$this->limit = $value;\r\n\t}", "public function getMaxParticipants()\n {\n return $this->max_participants;\n }", "public function setMaxChatters($var)\n {\n GPBUtil::checkInt32($var);\n $this->maxChatters = $var;\n\n return $this;\n }", "public function test_admin_set_max_num_players()\n {\n $this->assertTrue($this->postScriptumServer->adminSetMaxNumPlayers(78));\n }", "public function setMaximumAttendeesCount($val)\n {\n $this->_propDict[\"maximumAttendeesCount\"] = intval($val);\n return $this;\n }", "public function setMaxAttendees($value)\n {\n return $this->set('MaxAttendees', $value);\n }", "public function test_admin_set_max_num_players()\n {\n $this->assertTrue($this->btwServer->adminSetMaxNumPlayers(78));\n }", "public function test_admin_set_max_num_players()\n {\n $this->assertTrue($this->btwServer->adminSetMaxNumPlayers(78));\n }", "public function setMaxValue($maxValue);", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setMaximumAmount($max, bool $inclusive = false, ?string $message = null) : void\n {\n $this->maximumOptions = [\n 'max' => $max,\n 'inclusive' => $inclusive,\n 'message' => $message,\n ];\n }", "public function setMax($value)\n {\n $this->_maxValue = $value;\n return $this;\n }", "function setMax($max) {\n $this->field['max'] = (int) $max;\n\n return $this;\n }", "public function setLimit(int $limit): self;", "public function setLimit($x) { $this->limit = $x; }", "public function limitPerParticipant()\n {\n if ($this->acceptsGuestEntries()) {\n return;\n }\n\n $limit = $this->settings['limit-per-participant'] ?? 1;\n\n return $limit !== -1 ? $limit : null;\n }", "public function setMax($max) {\n $this->max = $max;\n return $this;\n }", "public function setMax($max) {\n $this->max = $max;\n return $this;\n }", "public function setMaxcount($count)\n {\n $this->maxCount = $count;\n }", "public function setMaxLimit($var)\n {\n GPBUtil::checkInt64($var);\n $this->max_limit = $var;\n\n return $this;\n }", "public function setMaxBeds($maxBeds);", "public function setMaxSize($num) {\n if (is_numeric($num) && $num > 0) {\n $this->_max = (int) $num;\n }\n }", "public function setMaximumSessions($maximumSessions)\n {\n $this->maximumSessions = (int) $maximumSessions;\n }", "public function setMaxSize($max){\n $this->maxSize = $max;\n return $this;\n }", "public function setMaxRunTimeInMinutes(?int $value): void {\n $this->getBackingStore()->set('maxRunTimeInMinutes', $value);\n }", "public function setMax($max) {\n\t\t$this->attributes['max'] = $max;\n\t\t$this->max = $max;\n\t\treturn $this;\n\t}", "public function setMax($max)\n {\n $this->max = $max;\n\n return $this;\n }", "public function limit($max)\n {\n $this->limit = intval($max);\n return $this;\n }", "public function setMaxJitter($val)\n {\n $this->_propDict[\"maxJitter\"] = $val;\n return $this;\n }", "public function setProgressMax(int $value)\n {\n $this->update(['progress_max' => $value]);\n }", "public function setMax($value)\n {\n $this->_fields['Max']['FieldValue'] = $value;\n return $this;\n }", "private function setMaximumRecords($maximum){\n\t\t$this->maximumRecords = $maximum;\n\t}", "public function setMaxLength($maxLength) {}", "public function setMaximumNumberOfTokens($maximum)\n {\n return $this->setOption('maximumnumberoftokens', $maximum);\n }", "public function setLimit($value)\n {\n return $this->setParameter('limit', $value);\n }", "public function setMaxPoints($value) {}", "public function setMaxTries($tries)\n {\n $this->maxTries = $tries;\n }", "public function setMaxValue($value)\n {\n $this->set('MaxValue', (int) $value);\n return $this;\n }", "public function setLimit(int $limit): void\n {\n $this->limit = $limit;\n }", "public function setMaxRecords($value)\n {\n return $this->set('MaxRecords', $value);\n }", "public function setMaxRecords($value)\n {\n return $this->set('MaxRecords', $value);\n }", "public function setMaxRecords($value)\n {\n return $this->set('MaxRecords', $value);\n }", "public function setMaxResults($maxResults);", "public function setLimit(?int $limit): void\n {\n $this->limit = $limit;\n }", "public function setLimit(?int $limit): void\n {\n $this->limit = $limit;\n }", "public function setLimit(int $limit): void\n {\n $this->_limit = $limit;\n }", "function setNota_max($inota_max = '')\n {\n $this->inota_max = $inota_max;\n }", "function setNota_max($inota_max = '')\n {\n $this->inota_max = $inota_max;\n }", "public static function setNumberMaxBlocked($nb){\n Configuration::where('id', 1)\n ->update(['nb_max_times_bloked' => $nb]);\n }", "public function limit($value) {\r\n $this->limit = (int)$value;\r\n return $this;\r\n }", "public function setAutomaticMaximum($value) {\r\n $this->automaticMaximum = $this->setAutoMinMax($this->automaticMaximum, $this->automaticMinimum,\r\n $value);\r\n }", "public function maxAutoRetries($value) {\n return $this->setProperty('maxAutoRetries', $value);\n }", "public function setMaxCount($s)\n {\n if (is_int($s) && $s >= 1 && $s <= 100) {\n $this->options['MaxCount'] = $s;\n } else {\n return false;\n }\n }", "public function maxAttempts(): int\n {\n return 5;\n }", "public function set_limit($limit);", "public function setMaximumAllowedRows($maximumAllowedRows)\n {\n $this->maximumAllowedRows = $maximumAllowedRows;\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxPerUserId($maxPerUserId)\n {\n if ($maxPerUserId != $this->maxPerUserId) {\n $this->maxPerUserId = $maxPerUserId;\n }\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }", "public function setMaxResults($value)\n {\n return $this->set('MaxResults', $value);\n }" ]
[ "0.78886503", "0.77239615", "0.6783981", "0.67523926", "0.6752334", "0.67200416", "0.66341704", "0.66165245", "0.6608612", "0.660743", "0.6554045", "0.65503496", "0.6531691", "0.6506651", "0.648476", "0.6442044", "0.6442044", "0.6341335", "0.6337405", "0.6337405", "0.6337405", "0.6337405", "0.6337405", "0.6337405", "0.6337405", "0.6337405", "0.6337405", "0.6337405", "0.6337405", "0.6337405", "0.6337405", "0.6337405", "0.6337405", "0.6337405", "0.6337405", "0.6337405", "0.6337405", "0.6337405", "0.6337405", "0.6337405", "0.6337405", "0.6337405", "0.6337405", "0.6337405", "0.6337405", "0.62770665", "0.6252381", "0.6249814", "0.6243742", "0.6239728", "0.62374425", "0.6227275", "0.6227275", "0.62052435", "0.61806446", "0.6161178", "0.61357087", "0.6119392", "0.6108221", "0.6088388", "0.60782456", "0.60722816", "0.60345227", "0.603114", "0.6000814", "0.59931624", "0.59748834", "0.5958815", "0.59493834", "0.5942802", "0.5942369", "0.5924103", "0.5919781", "0.5907492", "0.58918303", "0.58918303", "0.58918303", "0.58636814", "0.5852371", "0.5852371", "0.5841592", "0.5820379", "0.5820379", "0.5810832", "0.58002037", "0.5788315", "0.5783919", "0.5783636", "0.5774648", "0.5772536", "0.57720906", "0.5764039", "0.5764039", "0.5764039", "0.5764039", "0.5763832", "0.5763648", "0.5763648", "0.5763648", "0.5763648" ]
0.8105075
0
Select Random Question for create random quizz
Выберите случайный вопрос для создания случайного теста
public function randomQuestion() { return $this->createQueryBuilder('qb') ->orderBy('RAND()') ->setMaxResults($this->maxResult) ->getQuery() ->getResult() ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function generateQuestion()\n\t{\n\t\t//get random question type\n\t\t$type = $this->questionTypes[array_rand($this->questionTypes)];\n\n\t\t//get random section\n\t\t$section = $this->getRandomSection();\n\n\t\t//get random function (within the above section)\n\t\t$function = $this->getRandomFunction($section);\n\n\t\t$question = [];\n\t\t$question['type'] = $type;\n\t\t$question['section'] = $section;\n\t\t$question['function'] = $function;\n\t\t$question['text'] = \"{$section} now, {$this->questionTextPerType[$type]}\";\n\t\t$question['choices'] = [];\n\t\t$question['answer_text'] = '';\n\t\t$question['answer_index'] = '';\t//in ['choices'] array\n\n\n\t\treturn $this->fillQuestion($question);\n\t}", "function get_question_random_simple() {\n global $default_terms_array;\n $session = new Session();\n $questions = get_questions($default_terms_array);\n\n for ($i = 0; $i < sizeof($questions); $i++) {\n\n $question = $questions[array_rand($questions) ];\n\n // if the question hasn't already been asked recently OR we're not remembering things in the session, return it\n if ((!$session->get('random_questions_asked') || ($session->get('random_questions_asked') && !in_array($question->get_ID(), $session->get('random_questions_asked'))))) {\n return $question;\n }\n }\n\n return $questions[array_rand($questions) ];\n}", "public function test_quizp_with_random_question_attempt_walkthrough() {\n global $SITE;\n\n $this->resetAfterTest(true);\n question_bank::get_qtype('random')->clear_caches_before_testing();\n\n $this->setAdminUser();\n\n // Make a quizp.\n $quizpgenerator = $this->getDataGenerator()->get_plugin_generator('mod_quizp');\n\n $quizp = $quizpgenerator->create_instance(array('course' => $SITE->id, 'questionsperpage' => 2, 'grade' => 100.0,\n 'sumgrades' => 4));\n\n $questiongenerator = $this->getDataGenerator()->get_plugin_generator('core_question');\n\n // Add two questions to question category.\n $cat = $questiongenerator->create_question_category();\n $saq = $questiongenerator->create_question('shortanswer', null, array('category' => $cat->id));\n $numq = $questiongenerator->create_question('numerical', null, array('category' => $cat->id));\n\n // Add random question to the quizp.\n quizp_add_random_questions($quizp, 0, $cat->id, 1, false);\n\n // Make another category.\n $cat2 = $questiongenerator->create_question_category();\n $match = $questiongenerator->create_question('match', null, array('category' => $cat->id));\n\n quizp_add_quizp_question($match->id, $quizp, 0);\n\n $multichoicemulti = $questiongenerator->create_question('multichoice', 'two_of_four', array('category' => $cat->id));\n\n quizp_add_quizp_question($multichoicemulti->id, $quizp, 0);\n\n $multichoicesingle = $questiongenerator->create_question('multichoice', 'one_of_four', array('category' => $cat->id));\n\n quizp_add_quizp_question($multichoicesingle->id, $quizp, 0);\n\n foreach (array($saq->id => 'frog', $numq->id => '3.14') as $randomqidtoselect => $randqanswer) {\n // Make a new user to do the quizp each loop.\n $user1 = $this->getDataGenerator()->create_user();\n $this->setUser($user1);\n\n $quizpobj = quizp::create($quizp->id, $user1->id);\n\n // Start the attempt.\n $quba = question_engine::make_questions_usage_by_activity('mod_quizp', $quizpobj->get_context());\n $quba->set_preferred_behaviour($quizpobj->get_quizp()->preferredbehaviour);\n\n $timenow = time();\n $attempt = quizp_create_attempt($quizpobj, 1, false, $timenow);\n\n quizp_start_new_attempt($quizpobj, $quba, $attempt, 1, $timenow, array(1 => $randomqidtoselect));\n $this->assertEquals('1,2,0,3,4,0', $attempt->layout);\n\n quizp_attempt_save_started($quizpobj, $quba, $attempt);\n\n // Process some responses from the student.\n $attemptobj = quizp_attempt::create($attempt->id);\n $this->assertFalse($attemptobj->has_response_to_at_least_one_graded_question());\n\n $tosubmit = array();\n $selectedquestionid = $quba->get_question_attempt(1)->get_question()->id;\n $tosubmit[1] = array('answer' => $randqanswer);\n $tosubmit[2] = array(\n 'frog' => 'amphibian',\n 'cat' => 'mammal',\n 'newt' => 'amphibian');\n $tosubmit[3] = array('One' => '1', 'Two' => '0', 'Three' => '1', 'Four' => '0'); // First and third choice.\n $tosubmit[4] = array('answer' => 'One'); // The first choice.\n\n $attemptobj->process_submitted_actions($timenow, false, $tosubmit);\n\n // Finish the attempt.\n $attemptobj = quizp_attempt::create($attempt->id);\n $this->assertTrue($attemptobj->has_response_to_at_least_one_graded_question());\n $attemptobj->process_finish($timenow, false);\n\n // Re-load quizp attempt data.\n $attemptobj = quizp_attempt::create($attempt->id);\n\n // Check that results are stored as expected.\n $this->assertEquals(1, $attemptobj->get_attempt_number());\n $this->assertEquals(4, $attemptobj->get_sum_marks());\n $this->assertEquals(true, $attemptobj->is_finished());\n $this->assertEquals($timenow, $attemptobj->get_submitted_date());\n $this->assertEquals($user1->id, $attemptobj->get_userid());\n $this->assertTrue($attemptobj->has_response_to_at_least_one_graded_question());\n\n // Check quizp grades.\n $grades = quizp_get_user_grades($quizp, $user1->id);\n $grade = array_shift($grades);\n $this->assertEquals(100.0, $grade->rawgrade);\n\n // Check grade book.\n $gradebookgrades = grade_get_grades($SITE->id, 'mod', 'quizp', $quizp->id, $user1->id);\n $gradebookitem = array_shift($gradebookgrades->items);\n $gradebookgrade = array_shift($gradebookitem->grades);\n $this->assertEquals(100, $gradebookgrade->grade);\n }\n }", "public static function generateQuestion()\n {\n $lhOperand = rand(0,10); //randomises left hand operand\n $rhOperand = rand(0,10); //randomises right hand operand\n $operator = rand(0,2); //randomises operator\n switch($operator)\n {\n case 0: self::$answer=($lhOperand+$rhOperand);\n $question = \"$lhOperand+$rhOperand\";\n break;\n case 1: self::$answer=($lhOperand-$rhOperand);\n $question = \"$lhOperand-$rhOperand\";\n break;\n case 2: self::$answer=($lhOperand*$rhOperand);\n $question = \"$lhOperand*$rhOperand\";\n break;\n }\n //var_dump($question);\n var_dump(self::$answer);\n return $question;\n }", "public function newMathQuestion(): void {\n\t\t$this->rndNumber1 = random_int(1, 10);\n\t\t$this->rndNumber2 = random_int(1, 10);\n\t\t$this->rndOperator = random_int(0, 2);\n\t\t$this->calcResult();\n\t}", "public function randomQuestion(): void\n {\n $expectedQuestion = QuestionUserHelper::createScheduledQuestionForUser($this->user)->question()->first();\n $randomQuestions = $this->user->randomUserQuestion();\n\n $this->assertTrue($randomQuestions->contains($expectedQuestion));\n }", "private function generateQuestion(){\n\t\t\t$questions = array(\n\t\t\t\t\tarray('name' => 'chevrolet', 'logo' => 'chevrolet.png'),\n\t\t\t\t\tarray('name' => 'playboy', 'logo' => 'playboy.png'),\n\t\t\t\t\tarray('name' => 'shell', 'logo' => 'shell.png'),\n\t\t\t\t\tarray('name' => 'java', 'logo' => 'java.png'),\n\t\t\t\t\tarray('name' => 'mysql', 'logo' => 'mysql.png'),\n\t\t\t\t\tarray('name' => 'postgresql', 'logo' => 'postgresql.png'),\n\t\t\t\t\tarray('name' => 'chrome', 'logo' => 'chrome.png'),\n\t\t\t\t\tarray('name' => 'firefox', 'logo' => 'firefox.png'),\n\t\t\t\t\tarray('name' => 'bluetooth', 'logo' => 'bluetooth.png'),\n\t\t\t\t\tarray('name' => 'twitter', 'logo' => 'twitter.png')\n\t\t\t\t);\n\t\t\t\t\n\t\t\t$index = rand(0, count($questions) - 1);\n\t\t\t\n\t\t\t$this->session->set('gl_answer', $questions[$index]['name']);\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t\t\t\t'type' => 'image',\n\t\t\t\t\t\t\t'originalContentUrl' => $this->image_url . $questions[$index]['logo'],\n\t\t\t\t\t\t\t'previewImageUrl' => $this->image_url . $questions[$index]['logo']\n\t\t\t\t\t\t);\n\t\t}", "public static function random_victory_quote(){\n $temp_text_options = array('Awesome work!', 'Nice work!', 'Fantastic work!', 'Great work!', 'Super work!', 'Amazing work!', 'Fabulous work!');\n $temp_text = $temp_text_options[array_rand($temp_text_options)];\n return $temp_text;\n }", "private function generateNextQuestion(){\n while(true) {\n $id = rand($this->minId, /*$this->maxId*/20);\n\n if (!in_array($id, $this->answeredQuestions)) {\n array_push($this->answeredQuestions,$id);\n return $id;\n }\n }\n }", "private function generate_question() {\n\n require_once(__DIR__ . '/csv_gd.class.php');\n $csv_filename = $this->configuration['base_data_dir'] . '/csv/' . $this->configuration['csv_input'];\n\n $data_quiz_src_obj = new csv_gd($csv_filename);\n $data_quiz_src_orig = $data_quiz_src_obj->csv_to_array();\n\n\n\n // filter unwanted question (tags, diff level, void )\n $data_quiz_src_filtered = $this->quiz_filter($data_quiz_src_orig, $this->configuration['tags'], $this->configuration['min_diffucult_level'], $this->configuration['max_diffucult_level']);\n\n\n // reverse question with_answer\n if ($this->configuration['reverse_question'] == TRUE) {\n $data_quiz_src_filtered = $this->quiz_switch_question_with_answer($data_quiz_src_filtered);\n }\n\n\n // generate question and answer\n $data_quiz_src = $this->quiz_generate($data_quiz_src_filtered);\n\n\n // randomize quiz \n if ($this->configuration['randomize_question'] == TRUE) {\n shuffle($data_quiz_src);\n }\n\n\n // restrict the maxium number of question\n if ($this->configuration['max_question_total'] > 0) {\n $this->configuration['max_question_total'] = min(count($data_quiz_src), $this->configuration['max_question_total']);\n } else {\n $this->configuration['max_question_total'] = count($data_quiz_src);\n }\n $this->question = array_slice($data_quiz_src, 0, $this->configuration['max_question_total']);\n\n $this->configuration['debug']=$this->debug;\n\n // return $this->quiz_questions;\n }", "public function getRandomQuiz(){\n // dd('here');\n $quiz = Quiz::inRandomOrder()->first();\n return $quiz;\n }", "function generateQuestion(){\n $rangeLow = 1;\n $rangeHigh = 100;\n $incorrectNumberHigh = 10;\n\n $leftAdder = random_int($rangeLow, $rangeHigh);\n $rightAdder = random_int($rangeLow, $rangeHigh);\n $correctAnswer = $leftAdder + $rightAdder;\n //generate init values for envaluation\n $incorrectAnswerFirst = random_int($correctAnswer-$incorrectNumberHigh, $correctAnswer+$incorrectNumberHigh);\n $incorrectAnswerSecond = random_int($correctAnswer-$incorrectNumberHigh , $correctAnswer+$incorrectNumberHigh);\n\n //if the condition not met, keep generated\n while(\n ($incorrectAnswerFirst == $correctAnswer) \n || \n ($incorrectAnswerFirst == $incorrectAnswerSecond)\n ||\n ($incorrectAnswerSecond == $correctAnswer)\n ){\n $incorrectAnswerFirst = random_int($correctAnswer-$incorrectNumberHigh, $correctAnswer+$incorrectNumberHigh);\n $incorrectAnswerSecond = random_int($correctAnswer-$incorrectNumberHigh , $correctAnswer+$incorrectNumberHigh);\n }\n $questions =\n [\n \"leftAdder\" => $leftAdder,\n \"rightAdder\" => $rightAdder,\n \"correctAnswer\" => $correctAnswer,\n \"firstIncorrectAnswer\" => $incorrectAnswerFirst,\n \"secondIncorrectAnswer\" => $incorrectAnswerSecond\n ];\n\n\n return $questions;\n}", "public function random(Request $request)\n {\n // return response($request->all());\n $topic = Topic::whereId($request->topic)->withCount('questions')->first();\n $q = $topic->questions()->inRandomOrder()->where('difficulty', $request->difficulty)->limit(10)->get();\n\n $quiz = Quiz::create([\n 'name' => 'Random '. $topic->name,\n 'time_limit' => null,\n 'desc' =>\n '<ul class=\"list-disc list-inside\">\n <li>\n You should complete this quiz in one session — However you can leaveand start from where you left.\n </li>\n <li>\n This is a random quiz generated with AI.\n </li>\n <li>\n You can find your progress and results in \"My Quizes\" section. \n </li>\n </ul>',\n 'user_id' => Auth::user()->id,\n 'quiz_type' => 'Random',\n 'difficulty' => $request->difficulty\n ]);\n $quiz->questions()->sync($q);\n $quiz->users()->attach(Auth::user()->id);\n return redirect('/quiz/'.$quiz->id);\n }", "public function randomQuestionWithSelfsameBag(): void\n {\n $unexpectedQuestion1 = QuestionUserHelper::createScheduledQuestionForUser($this->user)->question()->first();\n $unexpectedQuestion2 = QuestionUserHelper::createScheduledQuestionForUser($this->user)->question()->first();\n\n $questionsList = $this->user->randomUserQuestion('soft', [$unexpectedQuestion1->id, $unexpectedQuestion2->id]);\n\n $this->assertFalse($questionsList->contains($questionsList));\n $this->assertEmpty($questionsList);\n }", "function set_up_question($question_ID)\r\n{\r\n\tglobal $mydb, $question, $answers, $correct_answer, $is_question, $is_random_question;\r\n\t\r\n\t// set the is question global variable\r\n\t$is_question = true;\r\n\r\n\tif (($question_ID == \"random\") || !$question_ID)\r\n\t{\r\n\t\t$is_random_question = true;\r\n\t\t$question = get_question_random();\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$is_random_question = false;\r\n\t\t$question = get_question_from_ID($question_ID);\r\n\r\n\t}\r\n\t\r\n\t// get random answers\r\n\t$answers = $question->get_Answers();\r\n\t\r\n\t// get the correct answer and remember it\r\n\tforeach ($answers as $answer)\r\n\t{\r\n\t\tif ($answer->is_correct())\r\n\t\t{\r\n\t\t\t$correct_answer = $answer;\r\n\t\t}\r\n\t}\r\n}", "public function generateChoices(array $question)\n\t{\n\t\t[$inputMode, $inputExpectation, $notUseful, $from] = explode('_', $question['type']);\n\n\t\tif($this->config['cross_sections_for_possible_answers'])\n\t\t{\n\t\t\t//TODO\n\t\t}\n\n\t\telse\n\t\t{\n\t\t\t//leave space for the correct answer to be slotted in!\n\t\t\t//(not done in this method BTW)\n\t\t\t//UPDATE: actually, no, we'll just clobber one to put the correct answer in\n\t\t\t//$count = $this->config['choices_per_question'] - 1;\n\t\t\t$count = $this->config['choices_per_question'];\n\n\t\t\t$randomKeys = array_rand($this->functionData[$question['section']], $count);\n\n\t\t\t$choices = [];\n\n\t\t\tforeach($randomKeys as $key)\n\t\t\t{\n\t\t\t\t$choices[] = $this->functionData[$question['section']][$key][$inputExpectation];\n\t\t\t}\n\n\t\t\treturn $choices;\n\n\t\t}\n\t}", "public function showQuestion(){\n $query = \"SELECT * FROM posts ORDER BY rand() limit 12\";\n if ($result = $this->dbobj->dbcon->query($query)) {\n $row = $result->fetch_all(MYSQLI_ASSOC);\n \n }\n else{\n echo \"Error\" .$this->dbobj->dbcon->error;\n }\n return $row;\n }", "function getGeneratedQuestions() {\n $generatedQuestions = [];\n\n // for the generated questions, let's make the total 12\n for ($i = 0; $i < 12; $i++) {\n\n // create the queston attributes\n $leftAdder = mt_rand(0 , 100);\n\n $rightAdder;\n do {\n $rightAdder = mt_rand(0 , 100);\n } while ($rightAdder === $leftAdder);\n\n $correctAnswer = $leftAdder + $rightAdder;\n\n $firstIncorrectAnswer;\n do {\n $firstIncorrectAnswer = mt_rand($correctAnswer - 10, $correctAnswer + 10);\n } while ($firstIncorrectAnswer === $correctAnswer);\n\n $secondIncorrectAnswer;\n do {\n $secondIncorrectAnswer = mt_rand($correctAnswer - 10, $correctAnswer + 10);\n } while (\n $secondIncorrectAnswer === $correctAnswer || \n $secondIncorrectAnswer === $firstIncorrectAnswer\n );\n\n // cast to object to mimic json file\n $generatedQuestions[] = (object)[\n \"leftAdder\" => $leftAdder,\n \"rightAdder\" => $rightAdder,\n \"correctAnswer\" => $correctAnswer,\n \"firstIncorrectAnswer\" => $firstIncorrectAnswer,\n \"secondIncorrectAnswer\" => $secondIncorrectAnswer \n ];\n }\n\n return $generatedQuestions;\n}", "private function _askQuestion()\n {\n // Grab the question\n $question = str_replace(\"!question \", \"\", $this->_data->message);\n\n // Create the yql\n $yql = 'select * from answers.search where query=\"'. $question .'\" and type=\"resolved\"';\n \n $array = $this->grabData($yql);\n \n $stuff = $array['query']['results']['Question'];\n if (is_array($stuff)) {\n $answer = $stuff[array_rand($stuff)]['ChosenAnswer'];\n $link = $stuff[array_rand($stuff)]['Link'];\n }\n $this->_message($this->_data->nick.': You asked: '. $question);\n if (!$answer) {\n $this->_message($this->_data->nick.': Sorry, I cannot answer that one! Try asking a simpler question.'); \n }\n else {\n $this->_message($this->_data->nick.': Yahoo! answers says: '. $answer .' ('. $link .')');\n }\n }", "public static function random_defeat_quote(){\n $temp_text_options = array('Maybe try again?', 'Bad luck maybe?', 'Maybe try another stage?', 'Better luck next time?', 'At least you tried... right?');\n $temp_text = $temp_text_options[array_rand($temp_text_options)];\n return $temp_text;\n }", "function shuffleAnswers($answer1, $answer2, $answer3, $answer4)\n{\n\n\t$i = rand(0,3);\n\n\t//Puts the correct answer on a random position\n\tswitch($i)\n\t{\n\t\tcase 0:\n\t\t\t$antwort1 = $answer1;\n\t\t\t$antwort2 = $answer2;\n\t\t\t$antwort3 = $answer3;\n\t\t\t$antwort4 = $answer4;\n $position1 = 1;\n $position2 = 2;\n $position3 = 3;\n $position4 = 4;\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\t$antwort1 = $answer2;\n\t\t\t$antwort2 = $answer1;\n\t\t\t$antwort3 = $answer3;\n\t\t\t$antwort4 = $answer4;\n\t\t\t$position1 = 2;\n $position2 = 1;\n $position3 = 3;\n $position4 = 4;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\t$antwort1 = $answer2;\n\t\t\t$antwort2 = $answer3;\n\t\t\t$antwort3 = $answer1;\n\t\t\t$antwort4 = $answer4;\n $position1 = 2;\n $position2 = 3;\n $position3 = 1;\n $position4 = 4;\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\t$antwort1 = $answer2;\n\t\t\t$antwort2 = $answer3;\n\t\t\t$antwort3 = $answer4;\n\t\t\t$antwort4 = $answer1;\n $position1 = 2;\n $position2 = 3;\n $position3 = 4;\n $position4 = 1;\n\t\t\tbreak;\n\t}\n\n $res = [\"casename\"=>$questionData['casename'], \"antwort1\"=>$antwort1, \"antwort2\"=>$antwort2, \"antwort3\"=>$antwort3, \"antwort4\"=>$antwort4, \"positionAnswer1\"=>$position1, \"positionAnswer2\"=>$position2 , \"positionAnswer3\"=>$position3, \"positionAnswer4\"=>$position4];\n return $res;\n}", "private static function genNRand($q) {\n\t $i=$rac='';\n\t for ($i=0; $i<$q ;$i++) {\n\t $er=rand(0,2);\n\t switch ($er) {\n\t case 0: $rac.=rand(0,9); break;\n\t case 1: $rac.=chr(rand(65,90)); break;\n\t case 2: $rac.=chr(rand(98,122)); break;\n\t }\n\t }\n\t return ($rac);\n\t}", "public function generateWrongOptions($quiz_id,$question_id=-1){\n\n //for all questions-wrong options with limit\n// SELECT quiz_id, question_id, question, answer_id,answer FROM (SELECT quiz_question.quiz_id, quiz_question.question_id, question.question, answer_id,answer ,@rn := IF(@prev = quiz_question.question_id, @rn + 1, 1) as rn, @prev := quiz_question.question_id FROM quiz INNER JOIN quiz_question ON quiz.quiz_id = quiz_question.quiz_id AND quiz.deleted = 0 AND quiz.quiz_id = 1 INNER JOIN question ON quiz_question.question_id = question.question_id INNER JOIN (SELECT * FROM answer WHERE answer.answer_id NOT IN (SELECT answer_id FROM correct_question_answer) ORDER BY RAND()) as answers ON answers.question_id = quiz_question.question_id JOIN (SELECT @prev := NULL, @rn := 0) AS vars) as final WHERE rn <= 3\n\n\n\n //it means u have to generate wrong options for all questions with limit of NoOfWrongOptionsWithMostFrequency\n if($question_id==-1){\n $resultSet = $this->getNoOfWrongOptionsWithMostFrequency($quiz_id);\n $noOfWrongOptions = ($resultSet->fetchAll());\n//print_r($ans);\n $this->noOfWrongOption = $noOfWrongOptions[0]->no_of_wrong;\n// return Connection::connectToDB()->query(\"SELECT quiz_id, question_id, question, answer_id,answer FROM (SELECT quiz_question.quiz_id, quiz_question.question_id, question.question, answer_id,answer ,@rn := IF(@prev = quiz_question.question_id, @rn + 1, 1) as rn, @prev := quiz_question.question_id FROM quiz INNER JOIN quiz_question ON quiz.quiz_id = quiz_question.quiz_id AND quiz.deleted = 0 AND quiz.quiz_id = $quiz_id and question_id INNER JOIN question ON quiz_question.question_id = question.question_id INNER JOIN (SELECT * FROM answer WHERE answer.answer_id NOT IN (SELECT answer_id FROM correct_question_answer) ORDER BY RAND()) as answers ON answers.question_id = quiz_question.question_id JOIN (SELECT @prev := NULL, @rn := 0) AS vars) as final WHERE rn <= $this->noOfWrongOption\");\n\n return Connection::connectToDB()->query(\"SELECT quiz_id, question_id, question, answer_id,answer FROM (SELECT quiz_question.quiz_id, quiz_question.question_id, question.question, answer_id,answer ,@rn := IF(@prev = quiz_question.question_id, @rn + 1, 1) as rn, @prev := quiz_question.question_id FROM quiz INNER JOIN quiz_question ON quiz.quiz_id = quiz_question.quiz_id AND quiz.deleted = 0 AND quiz.quiz_id = $quiz_id and question_id not in (SELECT question_id FROM (SELECT a.question_id,a.no_of_options,b.no_of_correct,a.no_of_options-b.no_of_correct as no_of_wrong FROM (SELECT no_of_options,question_id FROM quiz_question WHERE quiz_id=$quiz_id GROUP by question_id) as a LEFT OUTER JOIN (SELECT COUNT(*) as no_of_correct,question_id FROM correct_question_answer GROUP by question_id) as b on a.question_id=b.question_id) as t WHERE no_of_wrong!=$this->noOfWrongOption) INNER JOIN question ON quiz_question.question_id = question.question_id INNER JOIN (SELECT * FROM answer WHERE answer.answer_id NOT IN (SELECT answer_id FROM correct_question_answer) ORDER BY RAND()) as answers ON answers.question_id = quiz_question.question_id JOIN (SELECT @prev := NULL, @rn := 0) AS vars) as final WHERE rn <=$this->noOfWrongOption\");\n }\n\n //else u have to generate wrong option for particular question\n $resultSet = $this->getNoOfWrongOptions($quiz_id,$question_id);\n $noOfWrongOptions = ($resultSet->fetchAll());\n//print_r($ans);\n $noOfWrongOption = $noOfWrongOptions[0]->noOfWrongOption;\n return Connection::connectToDB()->query(\"SELECT\n quiz_question.quiz_id,quiz_question.question_id,question,answer.answer_id,answer\nFROM\n answer\nJOIN quiz_question ON quiz_question.question_id = answer.question_id\nJOIN question ON quiz_question.question_id = question.question_id\nWHERE\n quiz_question.quiz_id =$quiz_id AND quiz_question.question_id=$question_id AND answer.answer_id NOT IN(\n SELECT\n answer_id\n FROM\n correct_question_answer\n JOIN quiz_question ON quiz_question.question_id = correct_question_answer.question_id\n WHERE\n quiz_id = $quiz_id\n GROUP BY\n quiz_question.question_id\n\n) ORDER BY RAND() LIMIT $noOfWrongOption\");\n }", "private function generateChallenge()\n {\n //store two random numbers in an array\n $numbers = array(mt_rand(1,4),mt_rand(1,4));\n //store the correct answer in a session\n $_SESSION['challenge'] = $numbers[0] + $numbers[1];\n //convert the numbers to their ASCII\n $converted = array_map('ord', $numbers);\n //generate a math question as HTML markup\n return \"\n <label>&#87;&#104;&#97;&#116;&#32;&#105;&#115;&#32;\n &#$converted[0];&#32;&#43;&#32;&#$converted[1];&#63;\n <input type=\\\"text\\\" name=\\\"s_q\\\" />\n </label>\";\n }", "function getNRandomQuestions($n)\n {\n $user = get_current_user();\n $myCnf = parse_ini_file(\"/home/$user/.my.cnf\");\n\n $host = $myCnf['host'];\n $user = $myCnf['user'];\n $password = $myCnf['password'];\n $database = $myCnf['database'];\n $connection = new mysqli($host, $user, $password, $database);\n\n $statement = $connection->prepare(\"SELECT * FROM questions ORDER BY RAND() LIMIT ?\");\n $statement->bind_param(\"i\", $n);\n $statement->execute();\n $statement->bind_result($id, $question, $answer0, $answer1, $answer2, $solution);\n while ($statement->fetch()){\n $result[] = array(\"question\" => $question,\n array(\n \"answer0\" => $answer0,\n \"answer1\" => $answer1,\n \"answer2\" => $answer2),\n \"solution\" => $solution,\n );\n }\n return $result;\n}", "public function easy()\n {\n $questions = Question::all(); // Returns all question\n $counts = count($questions);\n $id = rand(1,$counts);\n $question = $questions[$id]; // To select second question\n return view('easy', compact('question'));\n }", "public function run()\n {\n $maxrate = 5;\n \n Question::create([\n 'name' => 'Clarity',\n 'label_left' => 'Low clear', \n 'label_right' => 'Very clear',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]);\n \n Question::create([\n 'name' => 'Effervenscence',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate,\n 'correct_answer' => rand(1,$maxrate),\n ]);\n \n Question::create([\n 'name' => 'Fluidity',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]);\n \n Question::create([\n 'name' => 'Balsamic',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]);\n \n Question::create([\n 'name' => 'Fruity',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]);\n \n Question::create([\n 'name' => 'Floral',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]);\n \n Question::create([\n 'name' => 'Woody',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]);\n \n Question::create([\n 'name' => 'Spiced',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]);\n \n Question::create([\n 'name' => 'Sugar content',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]);\n \n Question::create([\n 'name' => 'Alcohol content',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]);\n \n Question::create([\n 'name' => 'Texture',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]);\n \n Question::create([\n 'name' => 'Acidity',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]);\n \n \n Question::create([\n 'name' => 'Structure',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]);\n \n \n Question::create([\n 'name' => 'Persistance',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]);\n \n Question::create([\n 'name' => 'Development',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]);\n \n Question::create([\n 'name' => 'Yellowness',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Frankness',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Harmony',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Intensity',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Quality',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Intensity of color',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Creemy odour',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Buttery',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Salty',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Acid',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Grainy',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Hardness',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Softness',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Springiness',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Padding',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Lining',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Wear',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Melody',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Harmony',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Rhythm',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Stamp',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n }", "function game_question_selectrandom( $game, $table, $select, $id_fields='id', $use_repetitions=true)\n{\n global $DB, $USER; \n\n $count = $DB->get_field_sql( \"SELECT COUNT(*) FROM $table WHERE $select\");\n $min_num = 0;\n $min_id = 0;\n for($i=1; $i <= CONST_GAME_TRIES_REPETITION; $i++){\n $sel = mt_rand(0, $count-1);\n\t \n $sql = \"SELECT $id_fields,$id_fields FROM \".$table.\" WHERE $select\";\n \tif( ($recs = $DB->get_records_sql( $sql, null, $sel, 1)) == false){\n return false;\n }\n\n $id = 0;\n foreach( $recs as $rec){\n $id = $rec->id;\n }\n if( $min_id == 0){\n $min_id = $id;\n }\n \n if( $use_repetitions == false){\n return $id;\n }\n \n if( $count == 1){\n break;\n }\n \n $questionid = $glossaryentryid = 0;\n if( $game->sourcemodule == 'glossary')\n $glossaryentryid = $id;\n else\n $questionid = $id;\n \n $a = array( 'gameid' => $game->id, 'userid' => $USER->id, 'questionid' => $questionid, 'glossaryentryid' => $glossaryentryid);\n if( ($rec = $DB->get_record( 'game_repetitions', $a, 'id,repetitions r')) != false){\n if( ($rec->r < $min_num) or ($min_num == 0)){\n $min_num = $rec->r;\n $min_id = $id;\n }\n }else\n {\n $min_id = $questionid;\n break;\n }\n \n }\n\n if( $game->sourcemodule == 'glossary')\n game_update_repetitions( $game->id, $USER->id, 0, $min_id);\n else\n game_update_repetitions( $game->id, $USER->id, $min_id, 0);\n \n return $min_id;\n}", "public function showRandom()\n {\n $question = Question::inRandomOrder()->first();\n if ($question) {\n return $this->show($question->id);\n } else {\n return redirect(route('questions.index'));\n }\n }", "public function randomQuestionWithUserInStormMode(): void\n {\n QuestionUserHelper::removeAllQuestionsForUser($this->user);\n QuestionHelper::newQuestion();\n\n $questionsList = User::randomQuestions('storm', [], Question_user::DEFAULT_BAG_LIMIT ,$this->user);\n\n $this->assertFalse($this->user->questions()->get()->contains($questionsList));\n }", "public function pick_random_questionid(): int {\n // Get the list of all sharable questions in this category.\n $questionids = utils::get_sharable_question_ids($this->category->id);\n if (empty($questionids)) {\n // Error, there aren't any.\n $this->problem = 'invalidemptycategory';\n $this->problemdetails = [\n 'catname' => format_string($this->category->name),\n 'contextname' => $this->embedlocation->context_name_for_errors(),\n ];\n return 0;\n }\n\n // Count how many times each one has been used. We build an array qustionid => count of times used.\n $timesused = array_fill_keys(array_keys($questionids), 0);\n foreach ($this->quba->get_attempt_iterator() as $qa) {\n $timesused[$qa->get_question()->id] += 1;\n }\n\n // How many times have the least-used questions been used?\n $leastused = min($timesused);\n\n // Find all the questions that have been used that many times.\n $leastusedquestionids = [];\n foreach ($timesused as $questionid => $count) {\n if ($count == $leastused) {\n $leastusedquestionids[$questionid] = 1;\n }\n }\n\n return array_rand($leastusedquestionids);\n }", "public function hard()\n {\n $questions = Question::all(); // Returns all question\n $counts = count($questions);\n $id = rand(0,$count);\n $question = $questions[$id]; // To select second question\n return view('hard', compact('question'));\n }", "function play( $num_quest, $shuffle_answer = false, $id_track = 0, $freeze = false ) {\n\t\t\n\t\t$lang =& DoceboLanguage::createInstance('test');\n\t\t\n\t\tlist($id_quest, $title_quest) = sql_fetch_row(sql_query(\"\n\t\tSELECT idQuest, title_quest \n\t\tFROM \".$GLOBALS['prefix_lms']\t.\"_testquest \n\t\tWHERE idQuest = '\".$this->id.\"'\"));\n\t\t\n\t\t$find_prev = false;\n\t\t$id_answer_do = 0;\n\t\tif($id_track != 0) {\n\t\t\t\n\t\t\t//recover previous information\n\t\t\t$recover_answer = \"\n\t\t\tSELECT more_info \n\t\t\tFROM \".$GLOBALS['prefix_lms']\t.\"_testtrack_answer \n\t\t\tWHERE idQuest = '\".(int)$this->id.\"' AND \n\t\t\t\tidTrack = '\".(int)$id_track.\"'\";\n\t\t\t$re_answer_do = sql_query($recover_answer);\n\t\t\tif(mysql_num_rows($re_answer_do)) {\n\t\t\t\t\n\t\t\t\t//find previous answer\n\t\t\t\t$find_prev = true;\n\t\t\t\tlist($answer_do) = sql_fetch_row($re_answer_do);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn '<div class=\"play_question\">'\n .'<div>'.$lang->def('_QUEST_'.strtoupper($this->getQuestionType())).'</div>'\n\t\t\t.'<div class=\"title_question\"><label for=\"quest_'.$id_quest.'\">'.$num_quest.') '\n\t\t\t.$title_quest.'</label></div>'\n\t\t\t.'<div class=\"answer_question\">'\n\t\t\t.'<textarea cols=\"50\" rows=\"7\" id=\"quest_'.$id_quest.'\" name=\"quest['.$id_quest.']\"'\n\t\t\t.( $find_prev && $freeze ? ' disabled=\"disabled\"' : '' ).'>'\n\t\t\t.( $find_prev ? $answer_do : $lang->def('_QUEST_FREEANSWER') ).'</textarea>'\n\t\t\t.'</div>'\n\t\t\t.'</div>';\n\t}", "function buildQuiz() {\n for ($i = 0; $i <= 9; $i++) {\n $randomNumbers = getRandomNumbers();\n $correctAnswer = getCorrectAnswer($randomNumbers);\n $answers = getRandomAnswers($correctAnswer);\n $quiz[] = [\n \"leftAdder\" => $randomNumbers[0],\n \"rightAdder\" => $randomNumbers[1],\n \"correctAnswer\" => $correctAnswer,\n \"firstIncorrectAnswer\" => $answers[0],\n \"secondIncorrectAnswer\" => $answers[1],\n ];\n }\n return $quiz;\n}", "protected function getQuestion()\n\t{\n\t\t$int1 = rand(1, 9);\n\t\t$int2 = rand(1, 9);\n\n\t\t$question = $GLOBALS['TL_LANG']['SEC']['question' . rand(1, 3)];\n\t\t$question = sprintf($question, $int1, $int2);\n\n\t\t$this->Session->set('captcha_' . $this->strId, array\n\t\t(\n\t\t\t'sum' => $int1 + $int2,\n\t\t\t'key' => $this->strCaptchaKey,\n\t\t\t'time' => time()\n\t\t));\n\n\t\t$strEncoded = '';\n\t\t$arrCharacters = utf8_str_split($question);\n\n\t\tforeach ($arrCharacters as $strCharacter)\n\t\t{\n\t\t\t$strEncoded .= sprintf('&#%s;', utf8_ord($strCharacter));\n\t\t}\n\n\t\treturn $strEncoded;\n\t}", "public function randomQuestionWithNoUser(): void\n {\n QuestionUserHelper::removeAllQuestionsForUser($this->user);\n QuestionHelper::newQuestion();\n\n $questionsList = User::randomQuestions();\n\n $this->assertFalse($this->user->questions()->get()->contains($questionsList));\n }", "private function quiz_generate($data_quiz_src) {\n // extract all possible answer\n $all_possible_answer = array();\n foreach ($data_quiz_src as $single_quiz) {\n $all_correct_answer = explode('|', $single_quiz['correct_answer']);\n $all_possible_answer[] = $all_correct_answer[0];\n }\n\n $out = array();\n $index = 0;\n foreach ($data_quiz_src as $single_quiz) {\n shuffle($all_possible_answer);\n\n $single_quiz['all_correct_answer'] = explode('|', $single_quiz['correct_answer']);\n\n $single_quiz['possible_answer'] = array($single_quiz['all_correct_answer'][0]);\n\n $single_quiz['response_type'] = !empty($single_quiz['response_type']) ? $single_quiz['response_type'] : $this->configuration['default_response_type'];\n\n // add wrong answer to $possible_answer from input data\n if (isset($single_quiz[\"wrong_answer\"])) {\n $possible_wrong_answer = explode('|', $single_quiz[\"wrong_answer\"]);\n\n //remove eventually emtpy element\n $single_quiz['possible_answer'] = array_filter($single_quiz['possible_answer']);\n\n\n $single_quiz['possible_answer'] = array_merge($single_quiz['possible_answer'], $possible_wrong_answer);\n }\n\n // add random wrong answer to $possible_answer\n $single_quiz['possible_answer'] = array_merge($single_quiz['possible_answer'], $all_possible_answer);\n\n // eliminate duplicates\n $single_quiz['possible_answer'] = array_unique($single_quiz['possible_answer']);\n\n //remove eventually emtpy element\n $single_quiz['possible_answer'] = array_filter($single_quiz['possible_answer']);\n\n //get only the correct number of elements:\n $single_quiz['response_type'] = strtolower($single_quiz['response_type']);\n $option_array = explode('_', $single_quiz['response_type']);\n if (isset($option_array[1])) {\n $max_option = $option_array[1];\n $single_quiz['response_type'] = $option_array[0];\n } else {\n $max_option = $this->configuration['num_options'];\n }\n\n $single_quiz['possible_answer'] = array_slice($single_quiz['possible_answer'], 0, $max_option);\n\n // shuffle all data:\n shuffle($single_quiz['possible_answer']);\n\n $single_quiz['all_question'] = explode('|', $single_quiz['question']);\n\n // remove all empty values \n $single_quiz['all_question'] = array_filter($single_quiz['all_question']);\n\n shuffle($single_quiz['all_question']);\n\n $single_quiz['question'] = $single_quiz['all_question'][0];\n\n\n // add id of the correct_answer to correct answer if the answer_type is 'options' \n if ($single_quiz['response_type'] == \"options\") {\n $key = array_search($single_quiz['all_correct_answer'][0], $single_quiz['possible_answer']);\n $single_quiz['all_correct_answer'][] = $key;\n }\n\n\n $output_keys = array(\n 'id',\n 'question',\n 'all_correct_answer',\n 'possible_answer',\n 'response_type',\n 'if_correct',\n 'if_wrong'\n );\n\n\n $out[$index] = array();\n foreach ($output_keys as $single_key) {\n\n $out[$index][$single_key] = isset($single_quiz[$single_key]) ? $single_quiz[$single_key] : \"\";\n }\n\n $index ++;\n }\n return $out;\n }", "public function fillQuestion(array $question)\n\t{\n\t\t[$inputMode, $inputExpectation, $notUseful, $from] = explode('_', $question['type']);\n\n\t\tvar_dump($inputMode, $inputExpectation, $notUseful, $from);\n\t\t//var_dump($question['function']['name']);\n\n\t\tif($inputMode == 'type')\n\t\t{\n\t\t\t$question['text'] .= $question['function'][$from] . ' ?';\n\t\t\t$question['answer_text'] = $question['function'][$inputExpectation];\n\t\t}\n\n\t\telseif($inputMode == 'choose')\n\t\t{\n\t\t\t$question['answer_text'] = $question['function'][$inputExpectation];\n\n\t\t\tif($from == 'name')\n\t\t\t{\n\t\t\t\t$question['text'] .= $question['function']['name'] . '() ?';\n\t\t\t}\n\n\t\t\telse\n\t\t\t{\n\t\t\t\t$question['text'] .= $question['function'][$from] . ' ?';\n\t\t\t}\n\n\t\t\t$question['choices'] = $this->generateChoices($question);\n\n\t\t\t//put correct answer in (by clobbering one of generated choices)\n\t\t\t$randomChoice = array_rand($question['choices']);\n\n\t\t\t$question['choices'][$randomChoice] = $question['answer_text'];\n\t\t\t$question['answer_index'] = $randomChoice;\n\t\t}\n\n\t\t\n\n\t\treturn $question;\n\t}", "protected function calculeQuizzMisEnAvant(){\n $quizzRandom = $this->getDoctrine()->getEntityManager()->getRepository('MetinetFacebookBundle:Quizz')->findOneByIsPromoted(1);\n return $quizzRandom ;\n }", "public function testCreateSurveyQuestionChoice0()\n {\n }", "public function testCreateSurveyQuestionChoice0()\n {\n }", "public function run()\n {\n DB::table('quizzes')->truncate();\n\n Quiz::create(['category_id' => 3, 'question'=> \"What’s 3 times 8?\"]);\n Quiz::create(['category_id' => 2, 'question'=> \"What is the difference between 20 and 8?\"]);\n Quiz::create(['category_id' => 1, 'question'=> \"What is the sum of 4 and 6?\"]);\n Quiz::create(['category_id' => 4, 'question'=> \"What is 20 divided by 4?\"]);\n\n Quiz::create(['category_id' => 1, 'question'=> \"What is sum of 10 and 5\"]);\n Quiz::create(['category_id' => 4, 'question'=> \"What is 30 divided by 5?\"]);\n Quiz::create(['category_id' => 2, 'question'=> \"What is difference between 10 and 2?\"]);\n Quiz::create(['category_id' => 3, 'question'=> \"What’s 2 times 9?\"]);\n\n Quiz::create(['category_id' => 2, 'question'=> \"What’s difference between 40 and 25\"]);\n Quiz::create(['category_id' => 1, 'question'=> \"What’s sum of 12 and 7?\"]);\n Quiz::create(['category_id' => 3, 'question'=> \"What’s 7 times 8?\"]);\n Quiz::create(['category_id' => 4, 'question'=> \"What’s 25 divided by 5?\"]);\n\n Quiz::create(['category_id' => 3, 'question'=> \"What is 10 times 6?\"]);\n Quiz::create(['category_id' => 2, 'question'=> \"What’s difference between 35 and 23?\"]);\n Quiz::create(['category_id' => 1, 'question'=> \"What’s sum of 9 and 12?\"]);\n Quiz::create(['category_id' => 4, 'question'=> \"What’s 28 divided by 7?\"]);\n\n Quiz::create(['category_id' => 3, 'question'=> \"What’s 15 times 3?\"]);\n Quiz::create(['category_id' => 2, 'question'=> \"What’s difference between 34 and 18?\"]);\n Quiz::create(['category_id' => 1, 'question'=> \"What is sum of 6, 2 and 8?\"]);\n Quiz::create(['category_id' => 4, 'question'=> \"What’s result of 40 divided by 4?\"]);\n\n Quiz::create(['category_id' => 3, 'question'=> \"How many 6 are in 48?\"]);\n Quiz::create(['category_id' => 2, 'question'=> \"What’s difference between 56 and 39?\"]);\n Quiz::create(['category_id' => 1, 'question'=> \"What is sum of 12, 3, 7 and 5?\"]);\n Quiz::create(['category_id' => 4, 'question'=> \"What is result of 45 divided by 9?\"]);\n\n Quiz::create(['category_id' => 3, 'question'=> \"What’s 9 times 4?\"]);\n Quiz::create(['category_id' => 2, 'question'=> \"What is difference between 9 and 4?\"]);\n Quiz::create(['category_id' => 1, 'question'=> \"What is sum of 23 and 6 ?\"]);\n Quiz::create(['category_id' => 4, 'question'=> \"What’s 51 divided by 17?\"]);\n\n Quiz::create(['category_id' => 3, 'question'=> \"What’s 12 times 5?\"]);\n Quiz::create(['category_id' => 2, 'question'=> \"What’s difference of 32 and 17?\"]);\n Quiz::create(['category_id' => 1, 'question'=> \"What is sum of 3, 8 and 9?\"]);\n Quiz::create(['category_id' => 4, 'question'=> \"What’s result of 9 divided by 3?\"]);\n\n Quiz::create(['category_id' => 3, 'question'=> \"What’s 13 times 5?\"]);\n Quiz::create(['category_id' => 2, 'question'=> \"What’s result of subtraction between 12 and 3?\"]);\n Quiz::create(['category_id' => 1, 'question'=> \"What’s sum of 5, 7 and 6?\"]);\n Quiz::create(['category_id' => 4, 'question'=> \"What’s result of 56 divided by 7?\"]);\n\n Quiz::create(['category_id' => 3, 'question'=> \"What’s 9 times 6?\"]);\n Quiz::create(['category_id' => 2, 'question'=> \"What is difference between 19 and 4?\"]);\n Quiz::create(['category_id' => 1, 'question'=> \"What is sum of 8 and 3?\"]);\n Quiz::create(['category_id' => 4, 'question'=> \"What’s result of 45 divided by 3?\"]);\n }", "public function display($quiz, $cm, $course) {\n global $DB, $OUTPUT;\n\n list($currentgroup, $students, $groupstudents, $allowed) =\n $this->init('randomsummary', 'quiz_randomsummary_settings_form', $quiz, $cm, $course);\n $options = new quiz_randomsummary_options('randomsummary', $quiz, $cm, $course);\n\n if ($fromform = $this->form->get_data()) {\n $options->process_settings_from_form($fromform);\n\n } else {\n $options->process_settings_from_params();\n }\n\n $this->form->set_data($options->get_initial_form_data());\n\n if ($options->attempts == self::ALL_WITH) {\n // This option is only available to users who can access all groups in\n // groups mode, so setting allowed to empty (which means all quiz attempts\n // are accessible, is not a security porblem.\n $allowed = array();\n }\n\n // Load the required questions.\n // First get all Random questions within this quiz.\n $idfield = $DB->sql_concat('q2.id', 'slot.slot');\n $questionsraw = $DB->get_records_sql(\"\n SELECT $idfield as id, q2.id as q2id, q.id as qid, slot.slot, q2.length, slot.maxmark, q2.name\n FROM {question} q\n JOIN {quiz_slots} slot ON slot.questionid = q.id\n JOIN {question} q2 on q.category = q2.category\n WHERE slot.quizid = ?\n AND q.length > 0\n AND q.qtype = 'random'\n AND q2.qtype <> 'random'\n ORDER BY slot.slot\", array($quiz->id));\n $number = 1;\n $questions = array();\n foreach ($questionsraw as $question) {\n if (!isset($questions[$question->q2id])) {\n $questions[$question->q2id] = $question;\n $questions[$question->q2id]->slots = array();\n }\n $questions[$question->q2id]->slots[] = $question->slot;\n $questions[$question->q2id]->number = $number;\n $number += $questions[$question->q2id]->length;\n }\n\n // Prepare for downloading, if applicable.\n $courseshortname = format_string($course->shortname, true,\n array('context' => context_course::instance($course->id)));\n $table = new quiz_randomsummary_table($quiz, $this->context, $this->qmsubselect,\n $options, $groupstudents, $students, $questions, $options->get_url());\n $filename = quiz_report_download_filename(get_string('randomsummaryfilename', 'quiz_randomsummary'),\n $courseshortname, $quiz->name);\n $table->is_downloading($options->download, $filename,\n $courseshortname . ' ' . format_string($quiz->name, true));\n if ($table->is_downloading()) {\n raise_memory_limit(MEMORY_EXTRA);\n }\n\n $this->course = $course; // Hack to make this available in process_actions.\n $this->process_actions($quiz, $cm, $currentgroup, $groupstudents, $allowed, $options->get_url());\n\n // Start output.\n if (!$table->is_downloading()) {\n // Only print headers if not asked to download data.\n $this->print_header_and_tabs($cm, $course, $quiz, $this->mode);\n }\n\n if ($groupmode = groups_get_activity_groupmode($cm)) {\n // Groups are being used, so output the group selector if we are not downloading.\n if (!$table->is_downloading()) {\n groups_print_activity_menu($cm, $options->get_url());\n }\n }\n\n // Print information on the number of existing attempts.\n if (!$table->is_downloading()) {\n // Do not print notices when downloading.\n if ($strattemptnum = quiz_num_attempt_summary($quiz, $cm, true, $currentgroup)) {\n echo '<div class=\"quizattemptcounts\">' . $strattemptnum . '</div>';\n }\n }\n\n $hasquestions = quiz_has_questions($quiz->id);\n if (!$table->is_downloading()) {\n if (!$hasquestions) {\n echo quiz_no_questions_message($quiz, $cm, $this->context);\n } else if (!$students) {\n echo $OUTPUT->notification(get_string('nostudentsyet'));\n } else if ($currentgroup && !$groupstudents) {\n echo $OUTPUT->notification(get_string('nostudentsingroup'));\n }\n\n // Print the display options.\n $this->form->display();\n }\n\n $hasstudents = $students && (!$currentgroup || $groupstudents);\n if ($hasquestions && ($hasstudents || $options->attempts == self::ALL_WITH)) {\n // Construct the SQL.\n $fields = $DB->sql_concat('u.id', \"'#'\", 'COALESCE(quiza.attempt, 0)') .\n ' AS uniqueid, ';\n\n list($fields, $from, $where, $params) = $table->base_sql($allowed);\n\n $table->set_count_sql(\"SELECT COUNT(1) FROM $from WHERE $where\", $params);\n\n // Test to see if there are any regraded attempts to be listed.\n $fields .= \", COALESCE((\n SELECT MAX(qqr.regraded)\n FROM {quiz_overview_regrades} qqr\n WHERE qqr.questionusageid = quiza.uniqueid\n ), -1) AS regraded\";\n $table->set_sql($fields, $from, $where, $params);\n\n if (!$table->is_downloading()) {\n // Print information on the grading method.\n if ($strattempthighlight = quiz_report_highlighting_grading_method(\n $quiz, $this->qmsubselect, $options->onlygraded)) {\n echo '<div class=\"quizattemptcounts\">' . $strattempthighlight . '</div>';\n }\n }\n\n // Define table columns.\n $columns = array();\n $headers = array();\n\n if (!$table->is_downloading() && $options->checkboxcolumn) {\n $columns[] = 'checkbox';\n $headers[] = null;\n }\n\n $this->add_user_columns($table, $columns, $headers);\n $this->add_state_column($columns, $headers);\n $this->add_time_columns($columns, $headers);\n\n $this->add_grade_columns($quiz, $options->usercanseegrades, $columns, $headers, false);\n\n foreach ($questions as $slot => $question) {\n // Ignore questions of zero length.\n $columns[] = 'qsgrade' . $slot;\n $header = get_string('qbrief', 'quiz', implode($question->slots, ', '));\n if (!$table->is_downloading()) {\n $header .= '<br />';\n } else {\n $header .= ' ';\n }\n $header .= '/' . $question->name;\n $headers[] = $header;\n }\n\n // Check to see if we need to add columns for the student responses.\n $responsecolumnconfig = get_config('quiz_randomsummary', 'showstudentresponse');\n if (!empty($responsecolumnconfig)) {\n $responsecolumns = array_filter(explode(',', $responsecolumnconfig));\n // Get the question names for these columns to display in the header.\n list($sql, $params) = $DB->get_in_or_equal($responsecolumns, SQL_PARAMS_NAMED);\n $params['quizid'] = $quiz->id;\n\n $responseqs = $DB->get_records_sql(\"\n SELECT slot.slot, q.name\n FROM {question} q\n JOIN {quiz_slots} slot ON slot.questionid = q.id\n WHERE slot.quizid = :quizid AND q.length > 0\n AND slot.slot \".$sql.\" ORDER BY slot.slot\", $params);\n\n foreach ($responseqs as $rq) {\n $columns[] = 'qsresponse'.$rq->slot;\n if (!empty($rq->name)) {\n $headers[] = format_string($rq->name);\n } else {\n $headers[] = '';\n }\n }\n }\n\n $this->set_up_table_columns($table, $columns, $headers, $this->get_base_url(), $options, false);\n $table->set_attribute('class', 'generaltable generalbox grades');\n\n $table->out($options->pagesize, true);\n }\n\n return true;\n }", "private function getRandomQuote()\n {\n $quotes = [\n [\n \"quote\" => \"If you don't make mistakes, you're not working on hard enough problems. And that's a big mistake.\",\n \"author\" => \"Frank Wilczek\"\n ],\n [\n \"quote\" => \"I cannot think well of a man who sports with any woman's feelings; and there may often be a great deal more suffered than a stander-by can judge of.\",\n \"author\" => \"Jane Austen\"\n ],\n [\n \"quote\" => \"When life seems chaotic, you don't need people giving you easy answers or cheap promises. There might not be any answers to your problems. What you need is a safe place where you can bounce with people who have taken some bad hops of their own.\",\n \"author\" => \"Real Live Preacher\"\n ]\n ];\n\n return $quotes[array_rand($quotes)];\n }", "public function randomQuestionWithNonEmptyBag(): void\n {\n $expectedQuestion1 = QuestionUserHelper::createScheduledQuestionForUser($this->user)->question()->first();\n $expectedQuestion2 = QuestionUserHelper::createScheduledQuestionForUser($this->user)->question()->first();\n $unexpectedQuestion = QuestionUserHelper::createScheduledQuestionForUser($this->user)->question()->first();\n\n $questionsList = $this->user->randomUserQuestion('soft', [$unexpectedQuestion->id]);\n\n $this->assertTrue($questionsList->contains($expectedQuestion1));\n $this->assertTrue($questionsList->contains($expectedQuestion2));\n\n $this->assertFalse($questionsList->contains($unexpectedQuestion));\n }", "public function orderRandom();", "public function randomQuestionWithEmptyBag(): void\n {\n $expectedQuestion1 = QuestionUserHelper::createScheduledQuestionForUser($this->user)->question()->first();\n $expectedQuestion2 = QuestionUserHelper::createScheduledQuestionForUser($this->user)->question()->first();\n\n $questionsList = $this->user->randomUserQuestion('soft', []);\n\n $this->assertTrue($questionsList->contains($expectedQuestion1));\n $this->assertTrue($questionsList->contains($expectedQuestion2));\n }", "function learn_press_single_quiz_question() {\n\t\tlearn_press_get_template( 'content-quiz/content-question.php' );\n\t}", "function getRandomAnswers($correctAnswer) {\n $answersArray = [];\n do {\n $random = random_int($correctAnswer - 10, $correctAnswer + 10);\n if ($random != $correctAnswer && !in_array($random, $answersArray)) {\n $answersArray[] = $random;\n }\n } while (count($answersArray) <= 2);\n return $answersArray;\n}", "public function generateQuestion()\n\t{\n\t\treturn sprintf('<span class=\"captcha_text%s\">%s</span>',\n\t\t\t\t\t\t(($this->strClass != '') ? ' ' . $this->strClass : ''),\n\t\t\t\t\t\t$this->getQuestion());\n\t}", "function learn_press_single_quiz_questions() {\n\t\tlearn_press_get_template( 'content-quiz/questions.php' );\n\t}", "public function add_question_random(&$restoreids, $question) {\n global $DB;\n\n // set parent field, if necessary\n if ($question->parent==0) {\n $question->parent = $restoreids->get_oldid('question', $question->id);\n }\n\n // set question name depending on whether we include subcategories or not\n // (Note: $question->questiontext is used as \"include subcategories\" flag)\n if (empty($question->questiontext)) {\n $strname = 'randomqname';\n } else {\n $strname = 'randomqplusname';\n }\n $question->name = $DB->get_field('question_categories', 'name', array('id' => $question->category));\n $question->name = get_string($strname, 'qtype_random', shorten_text($question->name, 100));\n\n // update record with new \"parent\" and \"name\"\n $DB->update_record('question', $question);\n }", "public function getPreDefinedQuestions()\n {\n return [\n \"1\" => \"Select a Security Question\",\n \"2\" => \"What was your childhood nickname?\",\n \"3\" => \"What is the name of your favorite childhood friend?\",\n \"4\" => \"What was the name of your first stuffed animal?\",\n \"5\" => \"Where were you when you had your first kiss?\",\n \"6\" => \"What is the name of the company of your first job?\",\n \"7\" => \"What was your favorite place to visit as a child?\",\n \"8\" => \"What was your dream job as a child?\",\n \"9\" => \"What is your preferred musical genre?\",\n \"10\" => \"What is your favorite team?\",\n \"11\" => \"What is your father\\\"s middle name?\"\n ];\n }", "public function run()\n {\n DB::table('questions')->insert([\n \t'quiz_id' => str_random(1),\n \t'question_text' => str_random(10)\n ]);\n }", "function module_specific_controls($totalnumber, $recurse, $category, $cmid, $cmoptions) {\n global $OUTPUT;\n $out = '';\n $catcontext = context::instance_by_id($category->contextid);\n if (has_capability('moodle/question:useall', $catcontext)) {\n $cmoptions->hasattempts = false;\n if ($cmoptions->hasattempts) {// Prior attempts donít matter with IPAL.\n $disabled = ' disabled=\"disabled\"';\n } else {\n $disabled = '';\n }\n $randomusablequestions = question_bank::get_qtype('random')->get_available_questions_from_category(\n $category->id, $recurse);\n $maxrand = count($randomusablequestions);$maxrand = 0;// Adding random questions is not an IPAL option.\n if ($maxrand > 0) {\n for ($i = 1; $i <= min(10, $maxrand); $i++) {\n $randomcount[$i] = $i;\n }\n for ($i = 20; $i <= min(100, $maxrand); $i += 10) {\n $randomcount[$i] = $i;\n }\n } else {\n $randomcount[0] = 0;\n $disabled = ' disabled=\"disabled\"';\n }\n\n $out = '<strong><label for=\"menurandomcount\">'.get_string('addrandomfromcategory', 'quiz').\n '</label></strong><br />';\n $attributes = array();\n $attributes['disabled'] = $disabled ? 'disabled' : null;\n $select = html_writer::select($randomcount, 'randomcount', '1', null, $attributes);\n $out .= get_string('addrandom', 'quiz', $select);\n $out .= '<input type=\"hidden\" name=\"recurse\" value=\"'.$recurse.'\" />';\n $out .= '<input type=\"hidden\" name=\"categoryid\" value=\"' . $category->id . '\" />';\n $out .= ' <input type=\"submit\" name=\"addrandom\" value=\"'.\n get_string('addtoquiz', 'quiz').'\"' . $disabled . ' />';\n $out .= $OUTPUT->help_icon('addarandomquestion', 'quiz');\n }\n return $out;\n}", "public function quizz()\n {\n $question = $this->form_validation->set_rules('add_question', 'Question', 'required');\n $answers = $this->form_validation->set_rules('add_answers', 'Réponse', 'required');\n\n if ($this->form_validation->run() === FALSE) // si formulaire non rempli OU rempli mais incomplet\n {\n $get_quizzQuestions = $this->admin_model->get_quizzQuestions();\n $get_quizzAnswers = $this->admin_model->get_quizzAnswers();\n $get_quizz = $this->admin_model->get_quizz();\n \n $data['get_quizz'] = $get_quizz;\n $data['get_quizzQuestions'] = $get_quizzQuestions;\n $data['get_quizzAnswers'] = $get_quizzAnswers;\n $data['title'] = 'Quizz';\n $this->load->view('layouts/header');\n $this->load->view('admin/quizz', $data);\n $this->load->view('layouts/footer');\n }\n else\n {\n $this->admin_model->insertQuestion();\n $this->admin_model->insertAnswers();\n\n $data['title'] = 'Quizz'; \n\n $this->load->view('layouts/header');\n $this->load->view('admin/quizz', $data);\n $this->load->view('layouts/footer');\n }\n }", "function target_add_poll_question($q)\n{\n\t$qid = db_qid('INSERT INTO '. $GLOBALS['DBHOST_TBL_PREFIX'] .'poll_opt (poll_id, name)\n\t\tVALUES('. (int)$q['id'] .', '. _esc($q['name']) .')');\n\treturn $qid;\n}", "function challangeRandom() {\r\n // random number between 10 and 99\r\n $random = rand(10,99);\r\n $say = \"<Say voice='gcloud.en-GB-Standard-F' loop='2'>Please type the following number, $random, then press pound.</Say>\";\r\n return [$random, $say];\r\n}", "function getRandomQuote($array){ \n return $array[rand(0,4)];\n }", "function generate_test($name, $courseid = null) {\n global $DB;\n list($form, $question) = parent::generate_test($name, $courseid);\n $form->feedback = 1;\n $form->multiplier = array(1, 1);\n $form->shuffleanswers = 1;\n $form->noanswers = 1;\n $form->qtype ='calculated';\n $question->qtype ='calculated';\n $form->answers = array('{a} + {b}');\n $form->fraction = array(1);\n $form->tolerance = array(0.01);\n $form->tolerancetype = array(1);\n $form->correctanswerlength = array(2);\n $form->correctanswerformat = array(1);\n $form->questiontext = \"What is {a} + {b}?\";\n\n if ($courseid) {\n $course = $DB->get_record('course', array('id'=> $courseid));\n }\n\n $new_question = $this->save_question($question, $form, $course);\n\n $dataset_form = new stdClass();\n $dataset_form->nextpageparam[\"forceregeneration\"]= 1;\n $dataset_form->calcmin = array(1 => 1.0, 2 => 1.0);\n $dataset_form->calcmax = array(1 => 10.0, 2 => 10.0);\n $dataset_form->calclength = array(1 => 1, 2 => 1);\n $dataset_form->number = array(1 => 5.4 , 2 => 4.9);\n $dataset_form->itemid = array(1 => '' , 2 => '');\n $dataset_form->calcdistribution = array(1 => 'uniform', 2 => 'uniform');\n $dataset_form->definition = array(1 => \"1-0-a\",\n 2 => \"1-0-b\");\n $dataset_form->nextpageparam = array('forceregeneration' => false);\n $dataset_form->addbutton = 1;\n $dataset_form->selectadd = 1;\n $dataset_form->courseid = $courseid;\n $dataset_form->cmid = 0;\n $dataset_form->id = $new_question->id;\n $this->save_dataset_items($new_question, $dataset_form);\n\n return $new_question;\n }", "public function pick_random_variant(\\question_definition $question): int {\n if (is_numeric($this->quba->get_id())) {\n // Usage already exists, so we need to consider already used variants from it.\n $qubaids = [$this->quba->get_id()];\n } else {\n // Usage just started, so there are previous questions to consider\n // (but trying to pass in the qubaid gives an error).\n $qubaids = [];\n }\n $variantstrategy = new \\core_question\\engine\\variants\\least_used_strategy(\n $this->quba, new \\qubaid_list($qubaids));\n return $variantstrategy->choose_variant($question->get_num_variants(),\n $question->get_variants_selection_seed());\n }", "function multiplechoice($subject) { \n \n\n\n$con = new mysqli(\"localhost\", \"root\", \"\", \"diligent\");\n\n//uncommment the line of code below to see if connection to the database is a success\n\n//echo \"\\nSuccess... \" . mysqli_get_host_info($con) . \"\\n\";\n\nif(mysqli_connect_errno()){\n \n echo 'Failed to connect to database' . mysqli_connect_error();\n}\n\n$query = \"SELECT * FROM questions join diligent.categories on questions.category_id = categories.category_id WHERE categories.category = '$subject' ORDER BY RAND() limit 1\"; //the query to be passed the mysqli_query function\n$result = mysqli_query($con, $query);\n\n////uncommment the line of code below to see if the query worked\n//var_dump($result);\n\n//echo '<table>;\nwhile($row = mysqli_fetch_array($result))\n { //Creates a loop to loop through results\n\t\treturn \"<tr><td>\" . $row['question'] \n . \"</td></tr><tr><td><form action='correct.php'>\" \n .\"<input type='radio' name='answer' value=\" .$row['answer_1'] .\"/>\". $row['answer_1'] .\"<br />\" \n .\"<input type='radio' name='answer' value=\" .$row['answer_2'] .\"/>\". $row['answer_2'] .\"<br />\" \n .\"<input type='radio' name='answer' value=\" .$row['answer_3'] .\"/>\". $row['answer_3'] .\"<br />\" \n .\"<input type='radio' name='answer' value=\" .$row['answer_4'] .\"/>\". $row['answer_4'] .\"<br /><br />\"\n //.\"<input type='submit' value='Submit' />\"\n .\"<small>Answer</small>:\".$row['correct_answer']\n .\"</td></tr></td></tr>\"; //$row['index'] the index here is a field name\n \n }\n \n // echo '</table>'; // end the table\n\n \n mysqli_close($con);// make sure the database connection is closed\n \n\n}", "function rand_option($min,$max,$amount){\r\n\r\n $num = range($min,$max);\r\n shuffle($num);\r\n return array_slice($num,0,$amount);\r\n\r\n}", "private function createAnswers($f, $p) {\n\n // Simulate each qeustion answering\n foreach ($f->questions as $q) {\n if ($q->isAspect()) {\n // If the question is about each aspect, answer like..\n\n // Each aspects has 3 level: normal, high-risk, very-high-risk\n // random to choose between those\n $c = $this->getRandomChoice($q->choices, null, true);\n if ($c->value == 0) {\n // Choose it and continue to next question\n $this->chooseChoice($f, $q, $c, $p);\n\n // next loop\n } else {\n // Choose the choice\n $this->chooseChoice($f, $q, $c, $p);\n $this->chooseRandomSubchoices($f, $q, $c, $p);\n\n // and random again\n // Since high & very-high can be their simultaneously\n $nc = $this->getRandomChoice($q->choices, null, true);\n\n if ($nc->value > 0 && $nc->value != $c->value) {\n // Not the 'normal' and not the same choice, choose it\n $this->chooseChoice($f, $q, $nc, $p);\n $this->chooseRandomSubchoices($f, $q, $nc, $p);\n } else {\n // next loop\n }\n }\n } else if ($q->isAboutTalent()) {\n // If the question is about talent answer like...\n\n // Talent has only 2 choice, random between the two\n $c = $this->getRandomChoice($q->choices, null);\n $a = $this->chooseChoice($f, $q, $c, $p);\n $ci = $c->inputs()->first();\n if ($ci) {\n $this->createRandomTalent($a, $ci, $p);\n }\n\n // next loop\n\n } else if ($q->isAboutDisability()) {\n // If the question is about disability answer like...\n\n // Non uniform random, low rate of having disability\n $probHaveDis = rand(0, 100);\n\n // Only 30% chance that a participant will have disability\n if ($probHaveDis > 70) {\n\n $numDis = $this->randomNumberOfDisabilities();\n\n $choosenChoices = [];\n $numChoice = count($q->choices);\n for ($i=0; $i < $numDis; $i++) { \n $c = $this->getRandomChoice($q->choices, $numChoice);\n \n if (Choice::choiceExistsInAnswers($c, $choosenChoices)) {\n // Allow no duplicates disabilities\n continue;\n } else {\n $a = $this->chooseChoice($f, $q, $c, $p);\n $ci = $c->inputs()->first();\n if ($ci) {\n $this->createRandomDisability($a, $ci);\n }\n }\n\n $choosenChoices[] = $a;\n }\n }\n }\n }\n }", "public static function answer_question(array $question);", "public function getRandomQuestionByCourseId($id = false) {\n\t\t\t// Database Connection\n\t\t\t$db\t\t\t\t= $GLOBALS['db_q'];\n\t\t\t// Query set up\n\t\t\t$return\t\t\t= ($id) ? $db->getRow('tb_question_course', 'id_question', \"id_course = {$id} ORDER BY RAND() LIMIT 1\") : false;\n\t\t\t// Return\n\t\t\treturn $return;\n\t\t}", "public static function random_positive_word(){\n $temp_text_options = array('Awesome!', 'Nice!', 'Fantastic!', 'Yeah!', 'Yay!', 'Yes!', 'Great!', 'Super!', 'Rock on!', 'Amazing!', 'Fabulous!', 'Wild!', 'Sweet!', 'Wow!', 'Oh my!', 'Excellent!', 'Wonderful!');\n $temp_text = $temp_text_options[array_rand($temp_text_options)];\n return $temp_text;\n }", "function addQuestion() {\n //SELECT QuestionNumber FROM BoothQuestions ORDER BY QuestionNumber DESC LIMIT 1\n $dbConnection = new mysqli('student.cs.appstate.edu', 'haithcockce', '900431409', 'QQuizzer');\n $result = mysqli_query($dbConnection, 'SELECT QuestionNumber FROM BoothQuestions \n ORDER BY QuestionNumber DESC LIMIT 1');\n $questionNumber = (mysqli_num_rows($result) == 0 ? 0 : mysqli_fetch_row($result));\n if ($questionNumber != 0) $questionNumber = $questionNumber[0];\n $questionNumber++;\n $result = mysqli_query($dbConnection, 'INSERT INTO BoothQuestions (BoothName, QuestionNumber) \n VALUES (\"'.$_POST['booth'].'\", \"'.$questionNumber.'\")');\n if (!$result) {\n echo 'failed to insert into BoothQuestions';\n exit;\n }\n $fromArray = implode('|$|', $_POST['answers']);\n $result = mysqli_query($dbConnection, 'INSERT INTO Questions \n (QuestionNumber, Question, CorrectAnswer, PossibleAnswers, Shuffle) \n VALUES \n (\"'.$questionNumber.'\", \"'.$_POST['question'].'\", \"'.$_POST['correct'].'\", \"'.$fromArray.'\", \"0\")');\n if (!$result) {\n $questionCheck = mysqli_num_rows(mysqli_query($dbConnection, 'SELECT Question FROM Questions\n WHERE Question=\"'.$_POST['question'].'\"')); \n if ($questionCheck == 1) echo 'found question';\n else echo 'failed to insert into Questions';\n exit;\n }\n echo 'success';\n \n }", "public function startQuiz(){\n if($this->session->get('userId') == null){\n echo \"sorry unauthorized!...\";\n return;\n }\n $this->answeredQuestions =[];\n $this->minId = 1;\n // jel ok da pretpostavim da je sve od 1 do maxa tu - msm da da\n $q = new Question();\n $this->maxId = $q->getMaxId();\n\n return view('quiz.php');\n }", "public function findRandom();", "function tep_random_select($query) {\n $random_product = '';\n $random_query = tep_db_query($query);\n $num_rows = tep_db_num_rows($random_query);\n if ($num_rows > 0) {\n $random_row = tep_rand(0, ($num_rows - 1));\n tep_db_data_seek($random_query, $random_row);\n $random_product = tep_db_fetch_array($random_query);\n }\n\n return $random_product;\n }", "public function run()\n {\n $faker = Faker::create();\n for($i = 0; $i<40; $i++){\n Question::create([\n 'title' =>$faker->name,\n 'desc' => $faker->text,\n 'img' => $faker->name,\n 'visited' => rand(1, 10000),\n 'created' => \\Carbon\\Carbon::now(),\n 'status' => 'open',\n 'cat_id' => rand(1, 5),\n 'user_id' => rand(11, 20)\n ]);\n }\n }", "public function generateChallenge()\n {\n // Easy\n if (Captcha::$config['complexity'] < 4) {\n $numbers[] = mt_rand(1, 5);\n $numbers[] = mt_rand(1, 4);\n }\n // Normal\n elseif (Captcha::$config['complexity'] < 7) {\n $numbers[] = mt_rand(10, 20);\n $numbers[] = mt_rand(1, 10);\n }\n // Difficult, well, not really ;)\n else {\n $numbers[] = mt_rand(100, 200);\n $numbers[] = mt_rand(10, 20);\n $numbers[] = mt_rand(1, 10);\n }\n\n // Store the question for output\n $this->mathExercise = implode(' + ', $numbers) . ' = ';\n\n // Return the answer\n $this->response = array_sum($numbers);\n\n return $this->response;\n }", "function randomQuote() {\n\n$quotes[] = '(Organic) machinery';\n$quotes[] = 'A line has two sides';\n$quotes[] = 'A very small object -Its centre';\n$quotes[] = 'Abandon desire';\n$quotes[] = 'Abandon normal instructions';\n$quotes[] = 'Accept advice';\n$quotes[] = 'Accretion';\n$quotes[] = 'Adding on';\n$quotes[] = 'Allow an easement (an easement is the abandonment of a stricture)';\n$quotes[] = 'Always first steps';\n$quotes[] = 'Always give yourself credit for having more than personality';\n$quotes[] = 'Always the first steps';\n$quotes[] = 'Are there sections? Consider transitions';\n$quotes[] = 'Ask people to work against their better judgement';\n$quotes[] = 'Ask your body';\n$quotes[] = 'Assemble some of the elements in a group and treat the group';\n$quotes[] = 'Back up a few steps. What else could you have done?';\n$quotes[] = 'Balance the consistency principle with the inconsistency principle';\n$quotes[] = 'Be dirty';\n$quotes[] = 'Be extravagant';\n$quotes[] = 'Be less critical more often';\n$quotes[] = 'Breathe more deeply';\n$quotes[] = 'Bridges -build -burn';\n$quotes[] = 'Call your mother and ask her what to do.';\n$quotes[] = 'Cascades';\n$quotes[] = 'Change ambiguities to specifics';\n$quotes[] = 'Change instrument roles';\n$quotes[] = 'Change nothing and continue with immaculate consistency';\n$quotes[] = 'Change specifics to ambiguities';\n$quotes[] = 'Children&#8217;s voices: -speaking -singing';\n$quotes[] = 'Cluster analysis';\n$quotes[] = 'Consider different fading systems';\n$quotes[] = 'Consider transitions';\n$quotes[] = 'Consult other sources -promising -unpromising';\n$quotes[] = 'Convert a melodic element into a rhythmic element';\n$quotes[] = 'Courage!';\n$quotes[] = 'Cut a vital connection';\n$quotes[] = 'Decorate, decorate';\n$quotes[] = 'Define an area as &#8220safe&#8221 and use it as an anchor';\n$quotes[] = 'Describe the landscape in which this belongs. (9 August)';\n$quotes[] = 'Destroy nothing; Destroy the most important thing';\n$quotes[] = 'Discard an axiom';\n$quotes[] = 'Disciplined self-indulgence';\n$quotes[] = 'Disconnect from desire';\n$quotes[] = 'Discover the recipes you are using and abandon them';\n$quotes[] = 'Discover your formulas and abandon them';\n$quotes[] = 'Display your talent';\n$quotes[] = 'Distorting time';\n$quotes[] = 'Do nothing for as long as possible';\n$quotes[] = 'Do something boring';\n$quotes[] = 'Do something sudden, destructive and unpredictable';\n$quotes[] = 'Do the last thing first';\n$quotes[] = 'Do the washing up';\n$quotes[] = 'Do the words need changing?';\n$quotes[] = 'Do we need holes?';\n$quotes[] = 'Don&#8217;t avoid what is easy';\n$quotes[] = 'Don&#8217;t be afraid of things because they&#8217;re easy to do';\n$quotes[] = 'Don&#8217;t be frightened of cliches';\n$quotes[] = 'Don&#8217;t be frightened to display your talents';\n$quotes[] = 'Don&#8217;t break the silence';\n$quotes[] = 'Don&#8217;t stress one thing more than another';\n$quotes[] = 'Emphasize differences';\n$quotes[] = 'Emphasize repetitions';\n$quotes[] = 'Emphasize the flaws';\n$quotes[] = 'Faced with a choice, do both';\n$quotes[] = 'Feed the recording back out of the medium';\n$quotes[] = 'Feedback recordings into an acoustic situation';\n$quotes[] = 'Fill every beat with something';\n$quotes[] = 'Find a safe part and use it as an anchor';\n$quotes[] = 'First work alone, then work in unusual pairs.';\n$quotes[] = 'From nothing to more than nothing';\n$quotes[] = 'Get your neck massaged';\n$quotes[] = 'Ghost echoes';\n$quotes[] = 'Give the game away';\n$quotes[] = 'Give way to your worst impulse';\n$quotes[] = 'Go outside. Shut the door.';\n$quotes[] = 'Go slowly all the way round the outside';\n$quotes[] = 'Go to an extreme, move back to a more comfortable place';\n$quotes[] = 'How would someone else do it?';\n$quotes[] = 'How would you explain this to your parents?';\n$quotes[] = 'How would you have done it?';\n$quotes[] = 'Humanize something that is free of error.';\n$quotes[] = 'Idiot glee (?)';\n$quotes[] = 'Imagine the music as a moving chain or caterpillar';\n$quotes[] = 'Imagine the music as a series of disconnected events';\n$quotes[] = 'In total darkness, or in a very large room, very quietly';\n$quotes[] = 'Infinitesimal gradations';\n$quotes[] = 'Instead of changing the thing, change the world around it.';\n$quotes[] = 'Intentions -credibility of -nobility of -humility of';\n$quotes[] = 'Into the impossible';\n$quotes[] = 'Is it finished?';\n$quotes[] = 'Is something missing?';\n$quotes[] = 'Is the intonation correct?';\n$quotes[] = 'Is the style right?';\n$quotes[] = 'Is the tuning appropriate?';\n$quotes[] = 'Is the tuning intonation correct?';\n$quotes[] = 'Is there something missing?';\n$quotes[] = 'It is quite possible (after all)';\n$quotes[] = 'It is simply a matter or work';\n$quotes[] = 'Just carry on';\n$quotes[] = 'Left channel, right channel, centre channel';\n$quotes[] = 'List the qualities it has. List those you&#8217;d like.';\n$quotes[] = 'Listen in total darkness, or in a very large room, very quietly';\n$quotes[] = 'Listen to the quiet voice';\n$quotes[] = 'Look at a very small object, look at its centre';\n$quotes[] = 'Look at the order in which you do things';\n$quotes[] = 'Look closely at the most embarrassing details and amplify.';\n$quotes[] = 'Lost in useless territory';\n$quotes[] = 'Lowest common denominator check: -single beat -single note -single riff';\n$quotes[] = 'Magnify the most difficult details';\n$quotes[] = 'Make a blank valuable by putting it in an excquisite frame';\n$quotes[] = 'Make a sudden, destructive unpredictable action; incorporate';\n$quotes[] = 'Make an exhaustive list of everything you might do and do the last thing on the list';\n$quotes[] = 'Make it more sensual';\n$quotes[] = 'Make what&#8217;s perfect more human';\n$quotes[] = 'Mechanize something idiosyncratic';\n$quotes[] = 'Move towards the unimportant';\n$quotes[] = 'Mute and continue';\n$quotes[] = 'Not building a wall but making a brick';\n$quotes[] = 'Once the search has begun, something will be found';\n$quotes[] = 'Only a part, not the whole';\n$quotes[] = 'Only one element of each kind';\n$quotes[] = 'Overtly resist change';\n$quotes[] = 'Pae White&#8217;s non-blank graphic metacard';\n$quotes[] = 'Pay attention to distractions';\n$quotes[] = 'Picture of a man spotlighted';\n$quotes[] = 'Put in earplugs';\n$quotes[] = 'Question the heroic approach';\n$quotes[] = 'Remember those quiet evenings';\n$quotes[] = 'Remove a restriction';\n$quotes[] = 'Remove ambiguities and convert to specifics';\n$quotes[] = 'Remove specifics and convert to ambiguities';\n$quotes[] = 'Remove the middle, extend the edges';\n$quotes[] = 'Repetition is a form of change';\n$quotes[] = 'Retrace your steps';\n$quotes[] = 'Revaluation (a warm feeling)';\n$quotes[] = 'Reverse';\n$quotes[] = 'Short circuit (example; a man eating peas with the idea that they will improve his virility shovels them straight into his lap)';\n$quotes[] = 'Shut the door and listen from outside';\n$quotes[] = 'Simple subtraction';\n$quotes[] = 'Simply a matter of work';\n$quotes[] = 'Slow preparation, fast execution';\n$quotes[] = 'Spectrum analysis';\n$quotes[] = 'State the problem in words as simply as possible';\n$quotes[] = 'Steal a solution.';\n$quotes[] = 'Take a break';\n$quotes[] = 'Take away as much mystery as possible. What is left?';\n$quotes[] = 'Take away the elements in order of apparent non-importance';\n$quotes[] = 'Take away the important parts';\n$quotes[] = 'Tape your mouth';\n$quotes[] = 'The inconsistency principle';\n$quotes[] = 'The most important thing is the thing most easily forgotten';\n$quotes[] = 'The tape is now the music';\n$quotes[] = 'Think: -inside the work -outside the work';\n$quotes[] = 'Think of the radio';\n$quotes[] = 'Tidy up';\n$quotes[] = 'Towards the insignificant';\n$quotes[] = 'Trust in the you of now';\n$quotes[] = 'Try faking it';\n$quotes[] = 'Turn it upside down';\n$quotes[] = 'Twist the spine';\n$quotes[] = 'Use &#8220;unqualified&#8221; people.';\n$quotes[] = 'Use an old idea';\n$quotes[] = 'Use an unacceptable color';\n$quotes[] = 'Use cliches';\n$quotes[] = 'Use fewer notes';\n$quotes[] = 'Use filters';\n$quotes[] = 'Use something nearby as a model';\n$quotes[] = 'Use your own ideas';\n$quotes[] = 'Voice your suspicions';\n$quotes[] = 'Water';\n$quotes[] = 'What are the sections sections of? Imagine a caterpillar moving';\n$quotes[] = 'What context would look right?';\n$quotes[] = 'What do you do? Now, what do you do best?';\n$quotes[] = 'What else is this like?';\n$quotes[] = 'What is the reality of the situation?';\n$quotes[] = 'What is the simplest solution?';\n$quotes[] = 'What mistakes did you make last time?';\n$quotes[] = 'What most recently impressed you? How is it similar? What can you learn from it? What could you take from it?';\n$quotes[] = 'What to increase? What to reduce? What to maintain?';\n$quotes[] = 'What were the branch points in the evolution of this entity';\n$quotes[] = 'What were you really thinking about just now? Incorporate';\n$quotes[] = 'What would make this really successful?';\n$quotes[] = 'What would your closest friend do?';\n$quotes[] = 'What wouldn&#8217;t you do?';\n$quotes[] = 'When is it for? Who is it for?';\n$quotes[] = 'Where is the edge?';\n$quotes[] = 'Which parts can be grouped?';\n$quotes[] = 'Who would make this really successful?';\n$quotes[] = 'Work at a different speed';\n$quotes[] = 'Would anyone want it?';\n$quotes[] = 'You are an engineer';\n$quotes[] = 'You can only make one dot at a time';\n$quotes[] = 'You don&#8217;t have to be ashamed of using your own ideas';\n$quotes[] = 'Your mistake was a hidden intention';\n\nsrand ((double) microtime() * 1000000);\n$random_number = rand(0,count($quotes)-1);\n\necho '<p><a href=\"http://oblique.soundmachinedream.com/\">' . ($quotes[$random_number]) . '</a></p>';\n}", "public function test_for_quiz_question()\n {\n $this->withOutExceptionHandling();\n\n $user = $this->actingAs(User::factory()->make());\n\n $session = QuizSession::factory()->create();\n $schedule = ClassSchedule::factory()->create();\n\n $response = $this->post('api/v1/quiz/question',\n array_merge($this->data(), [\n 'quiz_session_id' => $session->id,\n 'class_schedule_id' => $schedule->id,\n ]\n )\n );\n\n $response->assertStatus(200);\n }", "public static function getRandom()\n\t{\n\t\t$randNumPhp = Lottery::getSecureRand( self::getCount() );\n\t\t//$randNumSql = '( SELECT FLOOR( MAX(`id`) * RAND() ) FROM `category_prize` LIMIT 1 )';\n\n\t\treturn self::find()\n ->select(['id', 'name'])\n\t\t ->andWhere(['>=', 'id', $randNumPhp])\n\t\t ->orderBy('id')\n\t\t ->asArray()\n ->one();\n\t}", "function recycle_quizzes()\n\t{\n\t\tif ($this->course->has_resources(RESOURCE_QUIZ))\n\t\t{\n\t\t\t//$table_qui_que = Database :: get_course_table(TABLE_QUIZ_QUESTION);\n\t\t\t//$table_qui_ans = Database :: get_course_table(TABLE_QUIZ_ANSWER);\n\t\t\t$table_qui = Database :: get_course_table(TABLE_QUIZ_TEST);\n\t\t\t$table_rel = Database :: get_course_table(TABLE_QUIZ_TEST_QUESTION);\n\t\t\t$ids = implode(',', (array_keys($this->course->resources[RESOURCE_QUIZ])));\n\t\t\t$sql = \"DELETE FROM \".$table_qui.\" WHERE id IN(\".$ids.\")\";\n\t\t\tapi_sql_query($sql,__FILE__,__LINE__);\n\t\t\t$sql = \"DELETE FROM \".$table_rel.\" WHERE exercice_id IN(\".$ids.\")\";\n\t\t\tapi_sql_query($sql,__FILE__,__LINE__);\n\t\t}\n\t}", "public function run()\n {\n DB::table('votables')->where('votable_type','App\\Question')->delete();\n\n $users=\\App\\User::all();\n $numberOfUsers=$users->count();\n $votes=[-1,1];\n\n foreach (\\App\\Question::all() as $question) {\n for ($i=0; $i< rand(0,$numberOfUsers);$i++){\n $user=$users[$i];\n $user->voteQuestion($question,$votes[rand(0,1)]);\n }\n }\n\n }", "function run()\n\t{\n\t\trequire_code('quiz');\n\n\t\t$questions=array();\n\n\t\t$text=post_param('text');\n\t\t$type=post_param('type');\n\n\t\t$_qs=explode(chr(10).chr(10),$text);\n\t\t$qs=array();\n\t\tforeach ($_qs as $q)\n\t\t{\n\t\t\t$q=trim($q);\n\t\t\tif ($q!='') $qs[]=$q;\n\t\t}\n\t\t$num_q=0;\n\n\t\t$qs2=array();\n\t\tforeach ($qs as $i=>$q)\n\t\t{\n\t\t\t$_as=explode(chr(10),$q);\n\t\t\t$as=array();\n\t\t\tforeach ($_as as $a)\n\t\t\t{\n\t\t\t\tif ($a!='') $as[]=$a;\n\t\t\t}\n\t\t\t$q=array_shift($as);\n\t\t\t$matches=array();\n\t\t\t//if (preg_match('#^(\\d+)\\)?(.*)#',$q,$matches)===false) continue;\n\t\t\tif (preg_match('#^(.*)#',$q,$matches)===false) continue;\n\t\t\tif (count($matches)==0) continue;\n\n\t\t\t$implicit_question_number=$i;//$matches[1];\n\n\t\t\t$qs2[$implicit_question_number]=$q.chr(10).implode(chr(10),$as);\n\t\t}\n\t\tksort($qs2);\n\n\t\tforeach (array_values($qs2) as $i=>$q)\n\t\t{\n\t\t\t$_as=explode(chr(10),$q);\n\t\t\t$as=array();\n\t\t\tforeach ($_as as $a)\n\t\t\t{\n\t\t\t\tif ($a!='') $as[]=$a;\n\t\t\t}\n\t\t\t$q=array_shift($as);\n\t\t\t$matches=array();\n\t\t\t//if (preg_match('#^(\\d+)\\)?(.*)#',$q,$matches)===false) continue;\n\t\t\tif (preg_match('#^(.*)#',$q,$matches)===false) continue;\n\t\t\tif (count($matches)==0) continue;\n\t\t\t$question=trim($matches[count($matches)-1]);\n\t\t\t$long_input_field=(strpos($question,' [LONG]')!==false)?1:0;\n\t\t\t$question=str_replace(' [LONG]','',$question);\n\t\t\t$num_choosable_answers=(strpos($question,' [*]')!==false)?count($as):((count($as)>0)?1:0);\n\t\t\t$question=str_replace(' [*]','',$question);\n\t\t\t$required=(strpos($question,' [REQUIRED]')!==false)?1:0;\n\t\t\t$question=str_replace(' [REQUIRED]','',$question);\n\n\t\t\t// Now we add the answers\n\t\t\t$answers=array();\n\t\t\tforeach ($as as $x=>$a)\n\t\t\t{\n\t\t\t\t$is_correct=((($x==0) && (strpos($qs2[$i],' [*]')===false) && ($type!='SURVEY')) || (strpos($a,' [*]')!==false))?1:0;\n\t\t\t\t$a=str_replace(' [*]','',$a);\n\n\t\t\t\tif (substr($a,0,1)==':') continue;\n\n\t\t\t\t$answers[]=array(\n\t\t\t\t\t'id'=>$x,\n\t\t\t\t\t'q_answer_text'=>$a,\n\t\t\t\t\t'q_is_correct'=>$is_correct,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$questions[]=array(\n\t\t\t\t'id'=>$i,\n\t\t\t\t'q_long_input_field'=>$long_input_field,\n\t\t\t\t'q_num_choosable_answers'=>$num_choosable_answers,\n\t\t\t\t'q_question_text'=>$question,\n\t\t\t\t'answers'=>$answers,\n\t\t\t\t'q_required'=>$required,\n\t\t\t);\n\n\t\t\t$num_q++;\n\t\t}\n\n\t\t$preview=render_quiz($questions);\n\n\t\treturn array(do_template('FORM',array('SUBMIT_NAME'=>'','TEXT'=>'','URL'=>'','HIDDEN'=>'','FIELDS'=>$preview)),NULL);\n\t}", "function getRandomGames() {\n return DBcommand(\"SELECT * FROM games WHERE suggestion = 0 ORDER BY RAND() LIMIT 5\", [])['output'];\n}", "function get_all_quizes(){\n $str_query=\"select * from mwc_quizzine_quiz\";\n if(!$this->query($str_query)){\n return false;\n }\n return $this->fetch();\n }", "protected function GetNewLvlQAs()\n {\n $level = $this->GetLevel();\n $languageID = $this->GetLanguage()->GetId();\n $idsToExclude = $this->GetPreviousQuestionIDs();\n $limit = $this->GetParameters()->GetQuestionCount();\n \n $newQuesIDs = GetRandomQuestionIDs($languageID, $level, $limit, $idsToExclude);\n \n $lvlQAs = array();\n \n foreach ($newQuesIDs as $questionID)\n {\n $lvlQAs[] = new QuestionAnswer($questionID);\n }\n \n $this->SetLvlQAs($lvlQAs);\n }", "public function run()\n {\n // Insertion dans la table CHOICES\n DB::table('questions')->insert([\n\n //QCM 1 : 15 questions : Niveau première\n [ \n 'content' => 'Isaac Newton était un savant anglais.',\n 'answer' => 'yes',\n 'qcm_id' => '1'\n ],\n [ \n 'content' => 'Isaac Newton était un homme politique américain.',\n 'answer' => 'no',\n 'qcm_id' => '1'\n ],\n [ \n 'content' => 'Isaac Newton était un musicien de jazz.',\n 'answer' => 'no',\n 'qcm_id' => '1'\n ],\n [ \n 'content' => 'Isaac Newton était un premier ministre israélien.',\n 'answer' => 'no',\n 'qcm_id' => '1'\n ],\n [ \n 'content' => 'Pendant ses deux septennats, François Mitterrand a nommé 3 premiers ministres.',\n 'answer' => 'no',\n 'qcm_id' => '1'\n ],\n [ \n 'content' => 'Pendant ses deux septennats, François Mitterrand a nommé 5 premiers ministres.',\n 'answer' => 'no',\n 'qcm_id' => '1'\n ],\n [ \n 'content' => 'Pendant ses deux septennats, François Mitterrand a nommé 7 premiers ministres.',\n 'answer' => 'yes',\n 'qcm_id' => '1'\n ],\n [ \n 'content' => 'Le 6 juin 1944 s\\'est produit : L\\'appel du général de Gaulle à ne pas capituler.',\n 'answer' => 'no',\n 'qcm_id' => '1'\n ],\n [ \n 'content' => 'Le 6 juin 1944 s\\'est produit : Le débarquement allié en Normandie.',\n 'answer' => 'yes',\n 'qcm_id' => '1'\n ],\n [ \n 'content' => 'Le 6 juin 1944 s\\'est produit : L\\'armistice de la Seconde Guerre mondiale.',\n 'answer' => 'no',\n 'qcm_id' => '1'\n ],\n [ \n 'content' => '« C\\'est un petit pas pour l\\'homme, mais un bond de géant pour l\\' humanité ». Cette phrase célèbre a été prononcée en 1968 par John Kennedy.',\n 'answer' => 'no',\n 'qcm_id' => '1'\n ],\n [ \n 'content' => '« C\\'est un petit pas pour l\\'homme, mais un bond de géant pour l\\' humanité ». Cette phrase célèbre a été prononcée en 1969 par Neil Amstrong.',\n 'answer' => 'yes',\n 'qcm_id' => '1'\n ],\n [ \n 'content' => '« C\\'est un petit pas pour l\\'homme, mais un bond de géant pour l\\' humanité ». Cette phrase célèbre a été prononcée en 1971 par Martin Luther King.',\n 'answer' => 'no',\n 'qcm_id' => '1'\n ],\n [ \n 'content' => 'Le président des États-Unis John Kennedy a été mêlé à l\\'affaire dite du Watergate.',\n 'answer' => 'no',\n 'qcm_id' => '1'\n ],\n [ \n 'content' => 'Le président des États-Unis Richard Nixon a été mêlé à l\\'affaire dite du Watergate.',\n 'answer' => 'yes',\n 'qcm_id' => '1'\n ],\n //QCM 2 : 12 questions : Niveau première\n [ \n 'content' => 'La première République française a été proclamée en 1792.',\n 'answer' => 'yes',\n 'qcm_id' => '2'\n ],\n [ \n 'content' => 'La première République française a été proclamée en 1789.',\n 'answer' => 'no',\n 'qcm_id' => '2'\n ],\n [ \n 'content' => 'La première République française a été proclamée en 1794.',\n 'answer' => 'no',\n 'qcm_id' => '2'\n ],\n [ \n 'content' => 'Louis XVI s\\'est fait arrêter à Versailles par les sans-culotte.',\n 'answer' => 'no',\n 'qcm_id' => '2'\n ],\n [ \n 'content' => 'Sous la Quatrième République, le chef de l\\'État était élu par les députés et sénateurs.',\n 'answer' => 'yes',\n 'qcm_id' => '2'\n ],\n [ \n 'content' => 'Sous la Quatrième République, le chef de l\\'État était élu au suffrage universel.',\n 'answer' => 'no',\n 'qcm_id' => '2'\n ],\n [ \n 'content' => 'Sous la Quatrième République, le chef de l\\'État était nommé par le Conseil d\\'État.',\n 'answer' => 'no',\n 'qcm_id' => '2'\n ],\n [ \n 'content' => 'L\\'Académie française a été créée sous Louis XIII.',\n 'answer' => 'yes',\n 'qcm_id' => '2'\n ],\n [ \n 'content' => 'L\\'Académie française a été créée sous Louis XIV.',\n 'answer' => 'no',\n 'qcm_id' => '2'\n ],\n [ \n 'content' => 'L\\'Académie française a été créée sous Napoléon 1er.',\n 'answer' => 'no',\n 'qcm_id' => '2'\n ],\n [\n 'content' => 'Christophe Colomb a découvert l\\'Amérique en 1492.',\n 'answer' => 'yes',\n 'qcm_id' => '2'\n ],\n [ \n 'content' => 'Christophe Colomb a découvert l\\'Amérique en 1515.',\n 'answer' => 'no',\n 'qcm_id' => '2'\n ],\n //QCM 3 : 15 questions : Niveau terminale\n [ \n 'content' => 'Le procès de Nuremberg a eu lieu en 1945.',\n 'answer' => 'yes',\n 'qcm_id' => '3'\n ],\n [ \n 'content' => 'Le procès de Nuremberg a eu lieu en 1948.',\n 'answer' => 'no',\n 'qcm_id' => '3'\n ],\n [ \n 'content' => 'La révocation de l\\'Édit de Nantes a instauré le rattachement de la Vendée à la France.',\n 'answer' => 'no',\n 'qcm_id' => '3'\n ],\n [ \n 'content' => 'La révocation de l\\'Édit de Nantes a instauré l\\'interdiction du protestantisme.',\n 'answer' => 'yes',\n 'qcm_id' => '3'\n ],\n [ \n 'content' => 'Le conflit des Malouines a opposé le Royaume-Uni au Chili.',\n 'answer' => 'no',\n 'qcm_id' => '3'\n ],\n [ \n 'content' => 'Le conflit des Malouines a opposé le Royaume-Uni à l\\'Argentine.',\n 'answer' => 'yes',\n 'qcm_id' => '3'\n ],\n [ \n 'content' => 'Alexandrie, la ville fondée par Alexandre le Grand se trouvait en Macédoine.',\n 'answer' => 'no',\n 'qcm_id' => '3'\n ],\n [ \n 'content' => 'Alexandrie, la ville fondée par Alexandre le Grand se trouvait en Egypte.',\n 'answer' => 'yes',\n 'qcm_id' => '3'\n ],\n [ \n 'content' => 'Alexandrie, la ville fondée par Alexandre le Grand se trouvait en Grèce.',\n 'answer' => 'no',\n 'qcm_id' => '3'\n ],\n [ \n 'content' => 'Henri IV était issu de la famille des Bourbons.',\n 'answer' => 'yes',\n 'qcm_id' => '3'\n ],\n [ \n 'content' => 'Henri IV était issu de la famille des Artois.',\n 'answer' => 'no',\n 'qcm_id' => '3'\n ],\n [ \n 'content' => 'Mohandas Gandhi, était surnommé Mahatma. Ce surnom signifie \"L\\'éveillé\".',\n 'answer' => 'no',\n 'qcm_id' => '3'\n ],\n [ \n 'content' => 'Mohandas Gandhi, était surnommé Mahatma. Ce surnom signifie \"Grande âme\".',\n 'answer' => 'yes',\n 'qcm_id' => '3'\n ],\n [ \n 'content' => 'Mohandas Gandhi, était surnommé Mahatma. Ce surnom signifie \"Indépendant\".',\n 'answer' => 'no',\n 'qcm_id' => '3'\n ],\n [ \n 'content' => 'Mohandas Gandhi, était surnommé Mahatma. Ce surnom signifie \"Sage dans ses paroles\".',\n 'answer' => 'no',\n 'qcm_id' => '3'\n ],\n //QCM 4 : 12 questions : Niveau terminale\n [ \n 'content' => 'Louis XVI a été arrêté à Varennes alors qu\\'il tentait de fuir la France en 1791.',\n 'answer' => 'yes',\n 'qcm_id' => '4'\n ],\n [ \n 'content' => 'Louis XVI a été arrêté à Varennes alors qu\\'il tentait de fuir la France en 1789.',\n 'answer' => 'no',\n 'qcm_id' => '4'\n ],\n [ \n 'content' => 'Louis XVI a été arrêté à Varennes alors qu\\'il tentait de fuir la France en 1790.',\n 'answer' => 'no',\n 'qcm_id' => '4'\n ],\n [ \n 'content' => 'L\\'État du Suriname se trouve en Afrique.',\n 'answer' => 'no',\n 'qcm_id' => '4'\n ],\n [ \n 'content' => 'L\\'État du Suriname se trouve en Amérique du Sud.',\n 'answer' => 'yes',\n 'qcm_id' => '4'\n ],\n [ \n 'content' => 'L\\'État du Suriname se trouve en Asie.',\n 'answer' => 'no',\n 'qcm_id' => '4'\n ],\n [ \n 'content' => 'La bataille de Marignan s\\'est déroulé en 1515.',\n 'answer' => 'yes',\n 'qcm_id' => '4'\n ],\n [ \n 'content' => 'La bataille de Marignan s\\'est déroulé en 1615.',\n 'answer' => 'no',\n 'qcm_id' => '4'\n ],\n [ \n 'content' => 'La bataille de Marignan s\\'est déroulé en 1415.',\n 'answer' => 'no',\n 'qcm_id' => '4'\n ],\n [ \n 'content' => 'La couleur du cheval Blanc d\\'henri IV était : Noir et Blanc.',\n 'answer' => 'no',\n 'qcm_id' => '4'\n ],\n [ \n 'content' => 'La couleur du cheval Blanc d\\'henri IV était : Marron.',\n 'answer' => 'no',\n 'qcm_id' => '4'\n ],\n [ \n 'content' => 'La couleur du cheval Blanc d\\'henri IV était : Blanc.',\n 'answer' => 'yes',\n 'qcm_id' => '4'\n ],\n \t]);\n }", "public function make_multianswer_question_fourmc() {\n question_bank::load_question_definition_classes('multianswer');\n $q = new qtype_multianswer_question();\n test_question_maker::initialise_a_question($q);\n $q->name = 'Multianswer four multi-choice';\n $q->questiontext = '<p>Match the following cities with the correct state:</p>\n <ul>\n <li>San Francisco: {#1}</li>\n <li>Tucson: {#2}</li>\n <li>Los Angeles: {#3}</li>\n <li>Phoenix: {#4}</li>\n </ul>';\n $q->questiontextformat = FORMAT_HTML;\n $q->generalfeedback = '';\n $q->qtype = question_bank::get_qtype('multianswer');\n\n $q->textfragments = array('<p>Match the following cities with the correct state:</p>\n <ul>\n <li>San Francisco: ', '</li>\n <li>Tucson: ', '</li>\n <li>Los Angeles: ', '</li>\n <li>Phoenix: ', '</li>\n </ul>');\n $q->places = array('1' => '1', '2' => '2', '3' => '3', '4' => '4');\n\n $subqdata = array(\n 1 => array('qt' => '{1:MULTICHOICE:=California#OK~Arizona#Wrong}', 'California' => 'OK', 'Arizona' => 'Wrong'),\n 2 => array('qt' => '{1:MULTICHOICE:%0%California#Wrong~=Arizona#OK}', 'California' => 'Wrong', 'Arizona' => 'OK'),\n 3 => array('qt' => '{1:MULTICHOICE:=California#OK~Arizona#Wrong}', 'California' => 'OK', 'Arizona' => 'Wrong'),\n 4 => array('qt' => '{1:MULTICHOICE:%0%California#Wrong~=Arizona#OK}', 'California' => 'Wrong', 'Arizona' => 'OK'),\n );\n foreach ($subqdata as $i => $data) {\n // Multiple-choice subquestion.\n question_bank::load_question_definition_classes('multichoice');\n $mc = new qtype_multichoice_single_question();\n test_question_maker::initialise_a_question($mc);\n $mc->name = 'Multianswer four multi-choice';\n $mc->questiontext = $data['qt'];\n $mc->questiontextformat = FORMAT_HTML;\n $mc->generalfeedback = '';\n $mc->generalfeedbackformat = FORMAT_HTML;\n\n $mc->shuffleanswers = 0; // TODO this is a cheat to make the unit tests easier to write.\n // In reality, multianswer questions always shuffle.\n $mc->answernumbering = 'none';\n $mc->layout = qtype_multichoice_base::LAYOUT_DROPDOWN;\n\n $mc->answers = array(\n 10 * $i => new question_answer(13, 'California', (float) ($data['California'] == 'OK'),\n $data['California'], FORMAT_HTML),\n 10 * $i + 1 => new question_answer(14, 'Arizona', (float) ($data['Arizona'] == 'OK'),\n $data['Arizona'], FORMAT_HTML),\n );\n $mc->qtype = question_bank::get_qtype('multichoice');\n $mc->maxmark = 1;\n\n $q->subquestions[$i] = $mc;\n }\n\n return $q;\n }", "function ipal_create_genericq($courseid){\r\n global $DB;\r\n global $USER;\r\n global $COURSE;\r\n $contextid = $DB->get_record('context', array('instanceid'=>\"$courseid\",'contextlevel'=>'50'));\r\n $contextID = $contextid->id;\r\n $categories = $DB->get_records_menu('question_categories',array('contextid'=>\"$contextID\"));\r\n $categoryid = 0;\r\n foreach ($categories as $key => $value){\r\n if(preg_match(\"/Default\\ for/\",$value)){\r\n if(($value == \"Default for \".$COURSE->shortname) or ($categoryid == 0)){$categoryid = $key;}\r\n }\r\n }\r\n if(!($categoryid > 0)){\r\n echo \"\\n<br />Error obtaining categoryid\\n<br />\";\r\n return false;\r\n }\r\n $qmultichoicecheckid = $DB->count_records('question', array('category'=>\"$categoryid\",'name'=>'Generic multichoice question (1-8)'));\r\n $qessaycheckid = $DB->count_records('question', array('category'=>\"$categoryid\",'name'=>'Generic essay question'));\r\n if(($qmultichoicecheckid>0) and ($qessaycheckid > 0)){\r\n return true;\r\n }\r\n $hostname = 'unknownhost';\r\n if (!empty($_SERVER['HTTP_HOST'])) {\r\n $hostname = $_SERVER['HTTP_HOST'];\r\n } else if (!empty($_ENV['HTTP_HOST'])) {\r\n $hostname = $_ENV['HTTP_HOST'];\r\n } else if (!empty($_SERVER['SERVER_NAME'])) {\r\n $hostname = $_SERVER['SERVER_NAME'];\r\n } else if (!empty($_ENV['SERVER_NAME'])) {\r\n $hostname = $_ENV['SERVER_NAME'];\r\n }\r\n $date = gmdate(\"ymdHis\");\r\n $stamp = $hostname .'+'. $date .'+'.ipal_random_string(6);\r\n $version = $hostname .'+'. $date .'+'.ipal_random_string(6);\r\n $questionFieldArray=array('category','parent','name','questiontext','questiontextformat','generalfeedback','generalfeedbackformat','defaultgrade','penalty','qtype','length','stamp','version','hidden','timecreated','timemodified','createdby','modifiedby');\r\n $questionNotNullArray=array('name','questiontext','generalfeedback');\r\n\t$questioninsert = new stdClass();\r\n\t$date = gmdate(\"ymdHis\");\r\n\t$stamp = $hostname .'+'. $date .'+'.ipal_random_string(6);\r\n\t$version = $hostname .'+'. $date .'+'.ipal_random_string(6);\r\n\t$questioninsert -> category = $categoryid;\r\n\t$questioninsert -> parent = 0;\r\n\t$questioninsert ->questiontextformat = 1;\r\n\t$questioninsert ->generalfeedback = ' ';\r\n\t$questioninsert ->generalfeedbackformat = 1;\r\n\t$questioninsert ->defaultgrade = 1;\r\n\t$questioninsert ->penalty = 0;\r\n\t$questioninsert ->length = 1;\r\n\t$questioninsert->stamp = $stamp;\r\n\t$questioninsert->version = $version;\r\n\t$questioninsert ->hidden = 0;\r\n\t$questioninsert->timecreated = time();\r\n\t$questioninsert->timemodified = time();\r\n\t$questioninsert->createdby = $USER -> id;\r\n\t$questioninsert->modifiedby =$USER -> id;\r\n if ($qmultichoicecheckid == 0){\r\n \t$questioninsert ->name = 'Generic multichoice question (1-8)';//$title;\r\n \t$questioninsert ->questiontext = 'Please select an answer.';//.$text;\r\n \t$questioninsert ->qtype = 'multichoice';\r\n \t$lastinsertid = $DB->insert_record('question', $questioninsert);\r\n $answerFieldArray=array('answer','answerformat','fraction','feedback','feedbackformat');\r\n $answerNotNullArray =array('answer','feedback');\r\n if(!($lastinsertid > 0)){\r\n echo \"\\n<br />Error creating Generic multichoice question\\n<br />\";\r\n return false;\r\n }\r\n\t\tfor($n=1;$n<9;$n++){\r\n\t\t\t$answerInsert = new stdClass();\r\n\t\t\t$answerInsert->answer = $n;\r\n\t\t\t$answerInsert->question = $lastinsertid;\r\n\t\t\t$answerInsert ->format = 1;\r\n\t\t\t$answerInsert ->fraction = 1;\r\n\t\t\t$answerInsert ->feedback = ' ';\r\n\t\t\t$answerInsert ->feedbackformat = 1;\r\n\t\t\t$lastAnswerinsertid[$n] = $DB->insert_record('question_answers',$answerInsert);\r\n\t\t\tif(!($lastAnswerinsertid[$n] > 0)){\r\n\t\t\t\techo \"\\n<br />Error inserting answer $n for Generic multichoice question (1-8)\\n<br />\";\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$multichoiceFieldArray = array('question','layout','answers','single','shuffleanswers','correctfeedback','correctfeedbackformat','partiallycorrectfeedback','partiallycorrectfeedbackformat','incorrectfeedback','incorrectfeedbackformat','answernumbering');\r\n\t\t$multichoiceNotNullArray = array('correctfeedback','partiallycorrectfeedback','incorrectfeedback');\r\n\t\t$qtypeInsert = new stdClass();\r\n\t\t$qtypeInsert->answers = join(',',$lastAnswerinsertid);\r\n\t\t$qtypeInsert->single = 1;\r\n\t\t$qtypeInsert->correctfeedbackformat = 1;\r\n\t\t$qtypeInsert->partiallycorrectfeedbackformat = 1;\r\n\t\t$qtypeInsert->incorrectfeedbackformat = 1;\r\n\t\t$qtypeInsert->correctfeedback = ' ';\r\n\t\t$qtypeInsert->partiallycorrectfeedback = ' ';\r\n\t\t$qtypeInsert->incorrectfeedback = ' ';\r\n\t\t$qtypeInsert->answernumbering = '123';\r\n\t\t$qtypeInsert->question = $lastinsertid;\r\n\t\t$qtypeTable = 'question_'.$questioninsert->qtype;\r\n\t\t$qtypeInsert->shuffleanswers = '0';\r\n\t\t$qtypeinsertid = $DB->insert_record($qtypeTable, $qtypeInsert);\r\n\t}\r\n\tif ($qessaycheckid == 0){\r\n \t$questioninsert ->name = 'Generic essay question';//$title;\r\n \t$questioninsert ->questiontext = 'Please answer the question in the space provided.';//.$text;\r\n \t$questioninsert ->qtype = 'essay';\r\n \t$lastinsertid = $DB->insert_record('question', $questioninsert);\r\n\t\t$essayoptions = new stdClass;\r\n\t\t$essayoptions->questionid = $lastinsertid;\r\n\t\t$essayoptions->responsefieldlines = 3;\r\n\t\t$essayoptionsid = $DB->insert_record('qtype_essay_options',$essayoptions);\r\n }\r\n return true; \r\n}", "public function randomQuote()\n {\n $quotes = [\n 'Complexity is your enemy. Any fool can make something complicated. It is hard to make something simple.#Richard Branson',\n 'It takes a lot of effort to make things look effortless.#Mark Pilgrim',\n 'Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.#Antoine de Saint-Exupéry',\n 'Everything should be made as simple as possible, but not simpler.#Albert Einstein',\n 'Three Rules of Work: Out of clutter find simplicity; From discord find harmony; In the middle of difficulty lies opportunity.#Albert Einstein',\n 'There is no greatness where there is not simplicity, goodness, and truth.#Leo Tolstoy',\n 'Think simple as my old master used to say - meaning reduce the whole of its parts into the simplest terms, getting back to first principles.#Frank Lloyd Wright',\n 'Simplicity is indeed often the sign of truth and a criterion of beauty.#Mahlon Hoagland',\n 'Simplicity and repose are the qualities that measure the true value of any work of art.#Frank Lloyd Wright',\n 'Nothing is true, but that which is simple.#Johann Wolfgang von Goethe',\n 'There is a simplicity that exists on the far side of complexity, and there is a communication of sentiment and attitude not to be discovered by careful exegesis of a text.#Patrick Buchanan',\n 'The simplest things are often the truest.#Richard Bach',\n \"If you can't explain it to a six year old, you don't understand it yourself.#Albert Einstein\",\n 'One day I will find the right words, and they will be simple.#Jack Kerouac',\n 'Simplicity is the ultimate sophistication.#Leonardo da Vinci',\n 'Our life is frittered away by detail. Simplify, simplify.#Henry David Thoreau',\n 'The simplest explanation is always the most likely.#Agatha Christie',\n 'Truth is ever to be found in the simplicity, and not in the multiplicity and confusion of things.#Isaac Newton',\n 'Simplicity is a great virtue but it requires hard work to achieve it and education to appreciate it. And to make matters worse: complexity sells better.#Edsger Wybe Dijkstra',\n \"Focus and simplicity. Simple can be harder than complex: You have to work hard to get your thinking clean to make it simple. But it's worth it in the end because once you get there, you can move mountains.#Steve Jobs\",\n 'The ability to simplify means to eliminate the unnecessary so that the necessary may speak.#Hans Hofmann',\n \"I've learned to keep things simple. Look at your choices, pick the best one, then go to work with all your heart.#Pat Riley\",\n 'A little simplification would be the first step toward rational living, I think.#Eleanor Roosevelt',\n \"Making the simple complicated is commonplace; making the complicated simple, awesomely simple, that's creativity.#Charles Mingus\",\n 'Keep it simple, stupid.#Kelly Johnson',\n \"There's a big difference between making a simple product and making a product simple.#Des Traynor\",\n ];\n\n $randomquote = explode('#', $quotes[array_rand($quotes, 1)]);\n\n $quote = sprintf(\"“%s”\\n<cite>— %s</cite>\", $randomquote[0], $randomquote[1]);\n\n return $quote;\n }", "public function run()\n {\n //answers for question1\n DB::table('answers')->insert([\n 'description' => 'Mal',\n 'question_id' => 1\n ]);\n DB::table('answers')->insert([\n 'description' => 'Regular',\n 'question_id' => 1\n ]);\n DB::table('answers')->insert([\n 'description' => 'Muy Bien',\n 'question_id' => 1\n ]);\n //answers for question2\n DB::table('answers')->insert([\n 'description' => 'Mal',\n 'question_id' => 2\n ]);\n DB::table('answers')->insert([\n 'description' => 'Regular',\n 'question_id' => 2\n ]);\n DB::table('answers')->insert([\n 'description' => 'Muy Bien',\n 'question_id' => 2\n ]);\n //answers for question3\n DB::table('answers')->insert([\n 'description' => 'Mal',\n 'question_id' => 3\n ]);\n DB::table('answers')->insert([\n 'description' => 'Regular',\n 'question_id' => 3\n ]);\n DB::table('answers')->insert([\n 'description' => 'Muy Bien',\n 'question_id' => 3\n ]);\n //answers for question4\n DB::table('answers')->insert([\n 'description' => 'Mal',\n 'question_id' => 4\n ]);\n DB::table('answers')->insert([\n 'description' => 'Regular',\n 'question_id' => 4\n ]);\n DB::table('answers')->insert([\n 'description' => 'Muy Bien',\n 'question_id' => 4\n ]);\n //answers for question5\n DB::table('answers')->insert([\n 'description' => 'Mal',\n 'question_id' => 5\n ]);\n DB::table('answers')->insert([\n 'description' => 'Regular',\n 'question_id' => 5\n ]);\n DB::table('answers')->insert([\n 'description' => 'Muy Bien',\n 'question_id' => 5\n ]);\n //answers for question6\n DB::table('answers')->insert([\n 'description' => 'Mal',\n 'question_id' => 6\n ]);\n DB::table('answers')->insert([\n 'description' => 'Regular',\n 'question_id' => 6\n ]);\n DB::table('answers')->insert([\n 'description' => 'Muy Bien',\n 'question_id' => 6\n ]);\n //answers for question7\n DB::table('answers')->insert([\n 'description' => 'Mal',\n 'question_id' => 7\n ]);\n DB::table('answers')->insert([\n 'description' => 'Regular',\n 'question_id' => 7\n ]);\n DB::table('answers')->insert([\n 'description' => 'Muy Bien',\n 'question_id' => 7\n ]);\n //answers for question8\n DB::table('answers')->insert([\n 'description' => 'Mal',\n 'question_id' => 8\n ]);\n DB::table('answers')->insert([\n 'description' => 'Regular',\n 'question_id' => 8\n ]);\n DB::table('answers')->insert([\n 'description' => 'Muy Bien',\n 'question_id' => 8\n ]);\n //answers for question9\n DB::table('answers')->insert([\n 'description' => 'Mal',\n 'question_id' => 9\n ]);\n DB::table('answers')->insert([\n 'description' => 'Regular',\n 'question_id' => 9\n ]);\n DB::table('answers')->insert([\n 'description' => 'Muy Bien',\n 'question_id' => 9\n ]);\n //answers for question10\n DB::table('answers')->insert([\n 'description' => 'Mal',\n 'question_id' => 10\n ]);\n DB::table('answers')->insert([\n 'description' => 'Regular',\n 'question_id' => 10\n ]);\n DB::table('answers')->insert([\n 'description' => 'Muy Bien',\n 'question_id' => 10\n ]);\n //answers for question11\n DB::table('answers')->insert([\n 'description' => 'Mal',\n 'question_id' => 11\n ]);\n DB::table('answers')->insert([\n 'description' => 'Regular',\n 'question_id' => 11\n ]);\n DB::table('answers')->insert([\n 'description' => 'Muy Bien',\n 'question_id' => 11\n ]);\n //answers for question12\n DB::table('answers')->insert([\n 'description' => 'Mal',\n 'question_id' => 12\n ]);\n DB::table('answers')->insert([\n 'description' => 'Regular',\n 'question_id' => 12\n ]);\n DB::table('answers')->insert([\n 'description' => 'Muy Bien',\n 'question_id' => 12\n ]);\n //answers for question13\n DB::table('answers')->insert([\n 'description' => 'Mal',\n 'question_id' => 13\n ]);\n DB::table('answers')->insert([\n 'description' => 'Regular',\n 'question_id' => 13\n ]);\n DB::table('answers')->insert([\n 'description' => 'Muy Bien',\n 'question_id' => 13\n ]);\n //answers for question14\n DB::table('answers')->insert([\n 'description' => 'Mal',\n 'question_id' => 14\n ]);\n DB::table('answers')->insert([\n 'description' => 'Regular',\n 'question_id' => 14\n ]);\n DB::table('answers')->insert([\n 'description' => 'Muy Bien',\n 'question_id' => 14\n ]);\n //answers for question15\n DB::table('answers')->insert([\n 'description' => 'Mal',\n 'question_id' => 15\n ]);\n DB::table('answers')->insert([\n 'description' => 'Regular',\n 'question_id' => 15\n ]);\n DB::table('answers')->insert([\n 'description' => 'Muy Bien',\n 'question_id' => 15\n ]);\n //answers for question16\n DB::table('answers')->insert([\n 'description' => 'Mal',\n 'question_id' => 16\n ]);\n DB::table('answers')->insert([\n 'description' => 'Regular',\n 'question_id' => 16\n ]);\n DB::table('answers')->insert([\n 'description' => 'Muy Bien',\n 'question_id' => 16\n ]);\n //answers for question17\n DB::table('answers')->insert([\n 'description' => 'Mal',\n 'question_id' => 17\n ]);\n DB::table('answers')->insert([\n 'description' => 'Regular',\n 'question_id' => 17\n ]);\n DB::table('answers')->insert([\n 'description' => 'Muy Bien',\n 'question_id' => 17\n ]);\n //answers for question18\n DB::table('answers')->insert([\n 'description' => 'Mal',\n 'question_id' => 18\n ]);\n DB::table('answers')->insert([\n 'description' => 'Regular',\n 'question_id' => 18\n ]);\n DB::table('answers')->insert([\n 'description' => 'Muy Bien',\n 'question_id' => 18\n ]);\n //answers for question19\n DB::table('answers')->insert([\n 'description' => 'Mal',\n 'question_id' => 19\n ]);\n DB::table('answers')->insert([\n 'description' => 'Regular',\n 'question_id' => 19\n ]);\n DB::table('answers')->insert([\n 'description' => 'Muy Bien',\n 'question_id' => 19\n ]);\n //answers for question20\n DB::table('answers')->insert([\n 'description' => 'Mal',\n 'question_id' => 20\n ]);\n DB::table('answers')->insert([\n 'description' => 'Regular',\n 'question_id' => 20\n ]);\n DB::table('answers')->insert([\n 'description' => 'Muy Bien',\n 'question_id' => 20\n ]);\n //answers for question21\n DB::table('answers')->insert([\n 'description' => 'Mal',\n 'question_id' => 21\n ]);\n DB::table('answers')->insert([\n 'description' => 'Regular',\n 'question_id' => 21\n ]);\n DB::table('answers')->insert([\n 'description' => 'Muy Bien',\n 'question_id' => 21\n ]);\n //answers for question22\n DB::table('answers')->insert([\n 'description' => 'Mal',\n 'question_id' => 22\n ]);\n DB::table('answers')->insert([\n 'description' => 'Regular',\n 'question_id' => 22\n ]);\n DB::table('answers')->insert([\n 'description' => 'Muy Bien',\n 'question_id' => 22\n ]);\n //answers for question23\n DB::table('answers')->insert([\n 'description' => 'Mal',\n 'question_id' => 23\n ]);\n DB::table('answers')->insert([\n 'description' => 'Regular',\n 'question_id' => 23\n ]);\n DB::table('answers')->insert([\n 'description' => 'Muy Bien',\n 'question_id' => 23\n ]);\n //answers for question24\n DB::table('answers')->insert([\n 'description' => 'Mal',\n 'question_id' => 24\n ]);\n DB::table('answers')->insert([\n 'description' => 'Regular',\n 'question_id' => 24\n ]);\n DB::table('answers')->insert([\n 'description' => 'Muy Bien',\n 'question_id' => 24\n ]);\n //answers for question25\n DB::table('answers')->insert([\n 'description' => 'Mal',\n 'question_id' => 25\n ]);\n DB::table('answers')->insert([\n 'description' => 'Regular',\n 'question_id' => 25\n ]);\n DB::table('answers')->insert([\n 'description' => 'Muy Bien',\n 'question_id' => 25\n ]);\n //answers for question26\n DB::table('answers')->insert([\n 'description' => 'Mal',\n 'question_id' => 26\n ]);\n DB::table('answers')->insert([\n 'description' => 'Regular',\n 'question_id' => 26\n ]);\n DB::table('answers')->insert([\n 'description' => 'Muy Bien',\n 'question_id' => 26\n ]);\n //answers for question27\n DB::table('answers')->insert([\n 'description' => 'Mal',\n 'question_id' => 27\n ]);\n DB::table('answers')->insert([\n 'description' => 'Regular',\n 'question_id' => 27\n ]);\n DB::table('answers')->insert([\n 'description' => 'Muy Bien',\n 'question_id' => 27\n ]);\n }", "private function question()\n\t{\n\t\t$this->qns['questionnaire']['questionnairecategories_id'] = $this->allinputs['questioncat'];\n\t\t$this->qns['questionnaire']['questionnairesubcategories_id'] = $this->allinputs['questionsubcat'];\n\t\t$this->qns['questionnaire']['label'] = $this->allinputs['question_label'];\n\n\n\t\t$this->qns['questionnaire']['question'] = $this->allinputs['question'];\n\t\t$this->qns['questionnaire']['has_sub_question'] = $this->allinputs['subquestion'];\n\n\t\tif( $this->qns['questionnaire']['has_sub_question'] == 0 )\n\t\t{\n\t\t\t$this->qns['answers']['answer_type'] = $this->allinputs['optiontype'];\n\t\t}\n\n\t\t$this->qns['questionnaire']['active'] = 1;\n\n\t\tif( $this->qns['questionnaire']['has_sub_question'] == 0 ){\n\t\t\t//This code must be skipped if sub_question is 1\n\t\t\t$optionCounter = 0;\n\t\t\tforeach ($this->allinputs as $key => $value) {\n\n\t\t\t\tif( str_is('option_*', $key) ){\n\t\t\t\t\t$optionCounter++;\n\t\t\t\t\t$this->qns['answers'][$optionCounter] = ( $this->qns['answers']['answer_type'] == 'opentext' ) ? 'Offered answer text' : $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function run()\n {\n $fakerQuestion= factory(App\\Question::class)->make([\n 'description' => 'How do you find our service ?'\n ]);\n $fakerQuestion->save();\n\n // $rates=[Quiz::STATUS_GOOD, Quiz::STATUS_FAIR, Quiz::STATUS_NEUTRAL, Quiz::STATUS_BAD];\n\n factory(App\\Quiz::class, 4)->make(['question_id' => $fakerQuestion->first()->id])->each(\n function ($quiz ,$index) {\n $quiz->rate = ++$index;\n $quiz->save();\n });\n }", "public function run(Faker\\Generator $faker)\n\t{\n\t\t$userJSON = File::get(storage_path('data/choices.json'));\n\t\t$datas = json_decode($userJSON);\n\n\t\tfor ($i = 0; $i < 10; $i++)\n\t\t{\n\t\t\t$date = $faker->dateTimeBetween('-1 year');\n\t\t\t$question = App\\Question::create([\n\t\t\t\t'title'\t\t\t=> 'Exo-'.$i,\n\t\t\t\t'content'\t\t=> $faker->realText(50),\n\t\t\t\t'class_level'\t=> array_rand(['first_class' => '0', 'final_class' => '0']),\n\t\t\t\t'published'\t\t=> 1,\n\t\t\t\t'created_at' \t=> $date\n\t\t\t]);\n\n\t\t\tfor ($j=0; $j < rand(3,7); $j++) { \n\t\t\t\t$choice = array_rand($datas);\n\t\t\t\tApp\\Choice::create([\n\t\t\t\t\t'question_id' \t=> $question->id,\n\t\t\t\t\t'content' \t\t=> $datas[$choice]->content,\n\t\t\t\t\t'answer' \t\t=> $datas[$choice]->answer,\n\t\t\t\t\t'created_at' \t=> $date\n\t\t\t\t]);\n\t\t\t}\n\n\t\t\t$students = App\\User::select('id')->where('level', $question->class_level)->get();\n\t\t\tif (count($students) > 0) \n\t\t\t{\n\t\t\t\tforeach ($students as $student)\n\t\t\t\t{ \n\t\t\t\t\t# Insère les données de score pour chaque étudiant\n\t\t\t\t\tApp\\Score::create([\n\t\t\t\t\t\t'user_id' => $student->id,\n\t\t\t\t\t\t'question_id' => $question->id,\n\t\t\t\t\t\t'done' => false,\n\t\t\t\t\t\t'created_at' => $date\n\t\t\t\t\t]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function howAre() {\n return $this->randomItem(\n \"Super, thanks for asking.\",\n 'Pretty good.',\n 'Just fine.',\n 'Never better.',\n 'Great!'\n );\n }", "public function testCreateSurveyQuestion0()\n {\n }", "public function testCreateSurveyQuestion0()\n {\n }", "public function repeat($question = '')\n {\n $conversation = $this->bot->getStoredConversation();\n\n if (! $question instanceof Question && ! $question) {\n $question = unserialize($conversation['question']);\n }\n\n $next = $conversation['next'];\n $additionalParameters = unserialize($conversation['additionalParameters']);\n\n if (is_string($next)) {\n $next = unserialize($next)->getClosure();\n } elseif (is_array($next)) {\n $next = Collection::make($next)->map(function ($callback) {\n if ($this->bot->getDriver()->serializesCallbacks() && ! $this->bot->runsOnSocket()) {\n $callback['callback'] = unserialize($callback['callback'])->getClosure();\n }\n\n return $callback;\n })->toArray();\n }\n $this->ask($question, $next, $additionalParameters);\n }", "public function getRandom() {\n\t\t$quote = $this->get('random', array('limit'=>1));\n\t\treturn $quote[0];\n\t}", "private function chooseQuestionToAnswer() : void\n {\n $questionId = $this->console->choice(__('Please select question to answer:'), $this->options);\n $this->handleAnswer($questionId ? array_search($questionId, $this->options) : null);\n }", "public function run()\n {\n //\n DB::table('quests')->delete();\n $faker = Faker\\Factory::create();\n for($i=0;$i<25;$i++){\n \t$quest = new Quest;\n \t$quest->name = $faker->sentence();\n \t$quest->creator = $faker->name;\n \t$quest->apply_start_at = $faker->date;\n \t$quest->apply_end_at = $faker->date;\n \t$quest->execute_start_at = $faker->date;\n \t$quest->execute_end_at = $faker->date;\n \t$quest->place = $faker->country;\n \t$quest->description = $faker->realText;\n \t$quest->salary = $faker->numberBetween(100,1000);\n \t$quest->salary_type = $faker->numberBetween(0,2);\n \t$quest->point = $faker->numberBetween(10,100);\n \t$quest->verification = $faker->boolean;\n \t$quest->people_require = $faker->numberBetween(10,100);\n \t$quest->max_apply_people = $faker->numberBetween(10,100);\n \t$quest->now_apply_people = 0;\n \t$quest->actual_accepted_people = 0;\n \t$quest->actual_completed_people = 0;\n \t$quest->other_description = $faker->realText;\n \t$quest->status = $faker->numberBetween(0,3);\n \t$quest->save();\n }\n\n }", "public function getQuestions()\n {\n return DB::table('questionbank_quizzes')\n ->where('quize_id','=',$this->id)\n ->orderBy('subject_id')\n ->get();\n }", "function newSeq7($num, $post = false)\n{\n\n $hp = new Http();\n\n\n for ($t_num = 0; $t_num < $num; $t_num++) {\n $a0 = intval(rand(-8, 8));\n while ($a0 == 0) {\n $a0 = intval(rand(-8, 8));\n }\n\n $b = $a0 > 0 ? intval(rand(-50, -30))\n : intval(rand(1, 60));\n\n\n $p = intval(rand(1, 2));\n\n $m = intval(rand(1, 2));\n\n $a = [$a0];\n\n for ($i = 1; $i <= 3; $i++) {\n $a[] = pow($a[$i - 1], $p) + $b;\n }\n\n $title = '';\n //An = (An-1)^p + B\n for ($i = 0; $i < 3; $i++) {//miss 7\n if ($i == 0) {\n $title = \"$a[$i]\";\n continue;\n }\n// 填中间\n// if ($i == $m) {\n// $title = $title . \",?\";\n// continue;\n// }\n\n $title = $title . \",$a[$i]\";\n\n }\n\n// 填末尾\n $title = $title . \",?\";\n $res = $a[3];\n// An = (An-1)^p + B 填中间\n// $res = $a[$m];\n\n $ar = [$res, $res + intval(rand(-5, -3)), $res + intval(rand(-2, -1)), $res + intval(rand(1, 4))];\n shuffle($ar);\n $optionAr = [\n 'a' => $ar[0],\n 'b' => $ar[1],\n 'c' => $ar[2],\n 'd' => $ar[3],\n ];\n //find correct answer\n for ($i = 0; $i < 4; $i++) {\n if ($ar[$i] == $res) {\n break;\n }\n }\n\n $ks = ['a', 'b', 'c', 'd'];\n $answers = [$ks[$i]];\n $language = 'en';\n $classification = 'sequence';\n $pro_type = 'exclusive choice';\n $pro_source = 'new-test-seq';\n\n //An = (An-1)^p + B\n\n $hint = \"A[n]=A[n-1]^$p\";\n\n if ($b > 0) {\n $hint = $hint . \"+$b\";\n } else {\n $hint = $hint . \"$b\";\n }\n\n\n $problem_info = compact('title', 'optionAr', 'answers', 'language', 'classification', 'pro_type', 'pro_source', 'hint');\n\n echo $t_num;\n echo PHP_EOL;\n echo json_encode($problem_info);//insert\n echo PHP_EOL;\n\n if ($post) {\n $hp->post('http://exp.szer.me/parry/testlib/problem', $problem_info, false);\n } else {\n echo \"no post\";\n echo PHP_EOL;\n }\n }\n unset($a);\n curl_close($hp->ch);\n\n\n}", "public function run()\n {\n $questions = [];\n for ($i = 0; $i < 27; $i++) { \n $question = [\n 'name' => Str::random(10),\n 'order' => $i % 3 + 1,\n 'chapter_id' => floor($i / 3) + 1\n ];\n array_push($questions, $question);\n }\n DB::table('questions')->insert($questions);\n }" ]
[ "0.71189064", "0.6902919", "0.68481266", "0.6843635", "0.6796101", "0.67782533", "0.6649818", "0.66162694", "0.656714", "0.6566387", "0.65618706", "0.6390598", "0.63462085", "0.62936205", "0.62838244", "0.6251915", "0.62392616", "0.6157968", "0.6123096", "0.6100483", "0.6096736", "0.60851777", "0.60680896", "0.6034646", "0.601713", "0.60169744", "0.6012343", "0.6006373", "0.5984228", "0.59790105", "0.5954847", "0.59374076", "0.5936577", "0.589128", "0.58437073", "0.5842568", "0.58370024", "0.58313775", "0.58186865", "0.5807636", "0.5807636", "0.57899666", "0.5776974", "0.575045", "0.5732863", "0.57148916", "0.5708996", "0.5708897", "0.56865925", "0.568571", "0.5680856", "0.5678279", "0.56646574", "0.5636373", "0.5607802", "0.55929077", "0.5567606", "0.5556323", "0.5549457", "0.5536455", "0.55289", "0.5508566", "0.55025655", "0.54950553", "0.5491027", "0.5481198", "0.5467414", "0.54552335", "0.54532635", "0.5449776", "0.5447794", "0.5436222", "0.5430803", "0.54251194", "0.5380085", "0.5379107", "0.53722006", "0.5364176", "0.5362201", "0.53485334", "0.53479844", "0.5347713", "0.5342764", "0.53400797", "0.5336904", "0.53353554", "0.5332781", "0.5332192", "0.5312813", "0.53096724", "0.5302956", "0.52879167", "0.52879167", "0.52853644", "0.5284966", "0.528303", "0.5277855", "0.5267426", "0.5267062", "0.5261729" ]
0.71238166
0
INSERT INTO TWO TABLES
ВСТАВКА В ДВЕ ТАБЛИЦЫ
function insertTwoTables($table1, $data1, $table2, $data2) { $this->db->trans_start(); $this->db->insert($table1, $data1); $this->db->insert($table2, $data2); $this->db->trans_complete(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fromOneToTheOther($db1, $table1, $db2, $table2){\n\n\t$firstRecs = dbMassData(\"SELECT * FROM \".$db1.\".\".$table1.\" WHERE Package = 'Local' OR Package IS NULL\");\n\t$secRecs = dbMassData(\"SELECT * FROM \".$db2.\".\".$table2.\" WHERE Package = 'Local' OR Package IS NULL\");\n\t\n\t\n\n\t//print_r($firstRecs);\n\tfor($i=0; $i<count($firstRecs); $i++){\n\t\t$insertString = \"\";\n\t\t$insertString1 = \"\";\n\t\t$insertString2 = \"\";\n\t\t$allKeys = array();\n\t\t$allVals = array();\n\n\t\tforeach ($firstRecs[$i] as $key => $value){\n\n\n\t\t\tif(in_array($key, $allKeys) == false){\n\t\t\t\tarray_push($allKeys, $key);\n\t\t\t}\n\t\t\tarray_push($allVals, $value);\n\n\t\t\t\n\t\t}\n\n\t\t//construct insert string\n\t\tfor($j=0; $j <count($allKeys); $j++){\n\n\t\t\tif($j == 0){\n\t\t\t\t$insertString1 = $insertString1 . \"`\".$allKeys[$j].\"`\";\n\t\t\t\t$insertString2 = $insertString2 . \"'\".str_replace(\"'\", \"\\'\", $allVals[$j]).\"'\";\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$insertString1 = $insertString1 . \", `\". $allKeys[$j].\"`\";\n\t\t\t\t$insertString2 = $insertString2 . \", '\". str_replace(\"'\", \"\\'\", $allVals[$j]).\"'\";\n\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t$insertString = \"INSERT INTO \".$db2.\".\".$table2.\" ($insertString1) VALUES ($insertString2)\";\n\t\n\t\t//echo($insertString);\n\n\t\tdbQuery($insertString);\n\t}\n\n\n\n\t\n\n\n}", "function clonTable1toTable2Inscritos($T_INSCRITOS,$PROVINCIA, $CLAVE, $TOMO, $FOLIO)\n{\n global $mysqli;\n $TINS = $T_INSCRITOS;\n $query = new Query($mysqli, \"INSERT INTO inscritostmp SELECT * FROM \".$TINS.\" WHERE provincia=? and clave=? and tomo=? and folio=?\");\n $parametros = array('ssss', &$PROVINCIA, &$CLAVE, &$TOMO, &$FOLIO);\n $data = $query->getresults($parametros);\n return true;\n}", "public function insert($table);", "public function insert($connection, $table, $rows);", "function clonTable1toTable2Resultados($T_RESULTADOS,$PROVINCIA, $CLAVE, $TOMO, $FOLIO)\n{\n global $mysqli;\n $TRES = $T_RESULTADOS;\n $query = new Query($mysqli, \"INSERT INTO resultadostmp SELECT * FROM \".$TRES.\" WHERE provincia=? and clave=? and tomo=? and folio=?\");\n $parametros = array('ssss', &$PROVINCIA, &$CLAVE, &$TOMO, &$FOLIO);\n $data = $query->getresults($parametros);\n return true;\n}", "public function insert($tables,$data){\n $this->db->insert($tables,$data);\n }", "public function insert($tables,$data){\n $this->db->insert($tables,$data);\n }", "public function insert($tables,$data){\n $this->db->insert($tables,$data);\n }", "public function insert($tableName, $data);", "public function insert($table, array $fields);", "public function insert($table, array $data);", "abstract public function insert_sql($tableName, $new_table = false);", "public function insert($tblUpdate);", "function insert($table, $columns);", "public function insert($table_name, $fields_values = array())\r\n {\r\n }", "public function insertDB(){\n // Query to input into customers table\n $this->qry_insert_customer = \"INSERT INTO customers (company, firstname, lastname, email, phone, description)\n VALUES ('$this->company','$this->firstname', '$this->lastname', '$this->email', '$this->phone', '$this->description')\";\n\n // Query to input into customers table\n $this->qry_insert_address = \"INSERT INTO addresses (address, city, country, postal_code)\n VALUES ('$this->street','$this->place','$this->country','$this->zipcode')\";\n\n //Execute both queries\n mysqli_query($this->db, $this->qry_insert_customer);\n mysqli_query($this->db, $this->qry_insert_address); \n }", "function insertTabelaAssociativa($tabela, $cd_a, $cd_b, $value_a, $value_b){\n\tif(sizeof($value_b) > 1){\n\t\n\t\tforeach($value_b as $valor){\n\t\t\t// Monta a string sql\n\t\t\t$sql = \"insert into $tabela set $cd_a = $value_a, $cd_b = $valor\";\n\t\t\tmysql_query($sql);\n\t\t}\n\t\t\n\t}\n\telseif(sizeof($value_b) == 1){\n\n\t\t// Monta a string sql\n\t\t$sql = \"insert into $tabela set $cd_a = $value_a, $cd_b = $value_b[0]\";\n\t\tmysql_query($sql);\t\n\t\n\t}\n}", "function insert($database,$tables,$values) {\n mad_mysql_connect();\n\n\t\t$pre = $GLOBALS[\"prefix\"];\n\t\t/* Get Database */\n\t\t$intodatabase = str_replace(\"[p]\", $pre, $database);\n\t\t\n\t\t/* Break Table into Chunks */\n\t\t$tablechunks = explode(\"|\", $tables);\n\t\t/* Count the Tables */\n\t\t$totaltables = count($tablechunks);\n\t\t\n\t\t/* Break Values into Chunks */\n\t\t$valuechunks = explode(\"|\", $values);\n\t\t/* Count the Values */\n\t\t$totalvalues = count($tablechunks);\n\t\t\n\t\t/* Check to see that the number of tables equals the number of values */\n\t\tif ($totaltables == $totalvalues) {\n\t\t\t$setcomma = $totaltables - 1;\n\t\t\t$i=0;\n\t\t\twhile ($i < $totaltables) {\n\t\t\t\t/* Set the Table Name */\n\t\t\t\t$table = $tablechunks[$i];\n\t\t\t\t/* Set the Value of the Table */\n\t\t\t\t$value = $valuechunks[$i];\n\t\t\t\t\n\t\t\t\t/* If this is the last entry, remove the comma */\n\t\t\t\tif ($i == $setcomma) {\n\t\t\t\t\t$comma = \"\";\n\t\t\t\t} else {\n\t\t\t\t\t$comma = \",\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$updatetables .= \"`{$table}`{$comma}\";\n\t\t\t\t$updatevalues .= \"'{$value}'{$comma}\";\n\t\t\t\t\n\t\t\t\t++$i;\n\t\t\t}\n\t\t\treturn mysql_query(\"insert into `{$intodatabase}` ({$updatetables}) values ({$updatevalues})\");\n\t\t}\n\t}", "abstract protected function platformInsertStatement($table, array $keys, array $values);", "function insertMulti($table, $fields, $values) {\n\t\t$table = $this->fullTableName($table);\n\t\tif (is_array($fields)) {\n\t\t\t$fields = implode(', ', array_map(array(&$this, 'name'), $fields));\n\t\t}\n\t\t$values = implode(', ', $values);\n\t\t$this->query(\"INSERT INTO {$table} ({$fields}) VALUES {$values}\");\n\t}", "public function insert_update($table, array $values);", "protected function createTables()\n {\n $sql = $this->create_table;\n $this->connection->query($sql);\n\n // create again in schema 2\n $sql = str_replace($this->table, \"{$this->schema2}.{$this->table}\", $sql);\n $this->connection->query($sql);\n }", "function insertRow($table, $names, $values) {\n return mysql_query(sprintf('INSERT INTO %s (`%s`) VALUES (\"%s\")', $table, $names, $values));\n }", "function insert($table, $insertNames, $values) {\n for($i = 0; $i < count($values); $i++) {\n $values[$i] = htmlspecialchars($values[$i]);\n }\n\n \n /**Kontrola stringu */\n if(!is_string($table)) {\n throw new Exception(\"Tabulka musí být string.\");\n }\n /**Kontorla poli */\n else if(!is_array($insertNames) || !is_array($values)) {\n throw new Exception(\"Hodnota musí být ve formátu pole.\");\n }\n /**Kontrola poctu nazvu atribtu s novymi hodnotami */\n else if(count($insertNames) !== count($values)){\n throw new Exception(\"Hodnoty se musí rovnat.\");\n }\n\n /**Pripojeni k databazi */\n $connect = NULL;\n try {\n $connect = require(\"connect.php\");\n }catch(Exception $e) {\n throw $e;\n }\n /**Formatovani a kontrola SQL utoku */\n $insertNames = implode(',', $insertNames);\n $value = '';\n for($i = 0; $i<count($values)-1; $i++) {\n $value .= '?,';\n }\n $value .= '?';\n /**Formatovani metody */\n $statement = $connect->prepare('INSERT INTO ' .$table .'('.$insertNames.') VALUES (' .$value.')');\n\n if(!$statement->execute($values)){\n throw new Exception(\"Chyba při INSERT dotazu\");\n }\n}", "function add($table,$values){\n $conn=connectDB();\n $query=\"INSERT INTO $table VALUES ($values)\";\n //print($query);\n $conn->query($query);\n }", "protected function _insert($table, $keys, $values) {\n\t\treturn $this->query('INSERT INTO '.$table.' ('.implode(', ', $keys).') VALUES ('.implode(', ', $values).')');\n\t}", "public function testInsertSaftRegressionTest2()\n {\n $res = $this->fixture->query('INSERT INTO <http://localhost/Saft/TestGraph/> {<http://foo/1> <http://foo/2> <http://foo/3> . }');\n\n $res1 = $this->fixture->query('SELECT * FROM <http://localhost/Saft/TestGraph/> WHERE {?s ?p ?o.}');\n $this->assertEquals(1, count($res1['result']['rows']));\n\n $res2 = $this->fixture->query('SELECT * WHERE {?s ?p ?o.}');\n $this->assertEquals(1, count($res2['result']['rows']));\n\n $res2 = $this->fixture->query('SELECT ?s ?p ?o WHERE {?s ?p ?o.}');\n $this->assertEquals(1, count($res2['result']['rows']));\n }", "function insert($conn,$table,$data)\n {\n }", "public function insert($insValues) {\n $insValues = (array) $insValues;\n $docsTable = new GenericPVSWTable(\"docstax\");\n if (isset($insValues['ordnbr'])) {\n // Handle adding the salestax for a salesorder\n // HAVE TO HAVE -- Ordtype and bocntr and custid\n $ordnbr = $insValues['ordnbr'];\n $ordtype = $insValues['ordtype'];\n $bocntr = $insValues['bocntr'];\n $custid = $insValues['custid'];\n if ($ordtype == \"\" || $bocntr === \"\" || $custid == \"\") {\n throw new Exception(\"Must include custid, ordnbr, ordtype, and bocntr\\n\".var_export($insValues));\n }\n $deleteDocSql = \"delete from docstax \n where doctype = '$ordtype' and \n refnbr = '$ordnbr' and\n bocntr = $bocntr and\n custvendid = '$custid'\n \";\n $deleteDtlSql = \"delete from dtlstax \n where doctype = '$ordtype' and \n refnbr = '$ordnbr' and\n bocntr = $bocntr and\n custvendid = '$custid'\";\n $ret = $docsTable->directQuery($deleteDocSql, array());\n $ret = $docsTable->directQuery($deleteDtlSql, array());\n \n $insDocSql = \"\n insert into docstax \n ( doctype, refnbr, custvendid, taxtype, taxid1, taxid2, bocntr)\n select\n s.ordtype as doctype,\n s.ordnbr as refnbr,\n s.custid as custvendid,\n 'O' as taxtype,\n c.tax1 as taxid1,\n c.tax2 as taxid2,\n s.bocntr as bocntr\n From salesord s, customer c\n where ordnbr='$ordnbr' and ordtype='$ordtype' and bocntr=$bocntr and s.custid=c.custid\n \";\n $insDtlSql = \"\n insert into dtlstax \n (doctype, refnbr, custvendid, taxtype, tax1, tax2, bocntr, lineid, taxcat)\n select\n s.ordtype as doctype,\n s.ordnbr as refnbr,\n s.custid as custvendid,\n 'O' as taxtype,\n c.tax1 as tax1,\n c.tax2 as tax2,\n s.bocntr as bocntr,\n d.lineid,\n c.tax1 = '' ?? '' :: 'ALL'\n From salesord s, sodet d, customer c\n where s.ordnbr='$ordnbr' and s.ordtype='$ordtype' and s.bocntr=$bocntr and\n s.ordnbr=d.ordnbr and\n s.ordtype=d.ordtype and\n s.bocntr=d.bocntr and\n s.custid=c.custid\n \";\n $ret = $docsTable->directQuery($insDocSql, array());\n $ret = $docsTable->directQuery($insDtlSql, array());\n \n return $this->findWhere(array(\"refnbr\"=>$ordnbr,\"bocntr\"=>$bocntr, \"doctype\"=>$ordtype));\n }\n else {\n throw new Exception(\"Not ready for this yet\");\n }\n }", "protected abstract function insertRow($tableName, $data);", "function InsertM2MCurrOps ($tablename, $MtoM, $M2MValue, $P2P, $P2PValue) {\r\n//get database info\r\nglobal $db;\r\n$db = new mysqli(\"localhost\", \"root\", \"\", \"trading\");\r\n\r\n//Insert row into the M2M table\r\n$query = \"INSERT INTO $tablename ($MtoM, $P2P) VALUES ($M2MValue, $P2PValue)\";\r\n$db->query($query) or die (\"Oh well, we couldn't get yo uthat\");\r\n\t\r\n\t\r\n}", "abstract public function insert();", "public function insert($params){\n\t\t$DB = Registry::getInstance()->DB;\n\t\t$prefix = \"INSERT \";\n\t\t$p = $this->clean($params);\t\n\t\t$statement = $prefix.\" \".$params['tables'][0].\" \".$this->genSet($p['set']);\t\n\t\t$DB->exec($statement);\t\n\t}", "function insert_table( $insert_data, $table ){\t\n\t\t$this->db->insert($table, $insert_data);\n\t}", "function insert() {\n\t\t$sql = \"INSERT INTO \".$this->hr_db.\".hr_person_detail (psd_ps_id, psd_dp_id, psd_tax_no, psd_id_card_no, psd_passport_no, psd_picture, psd_blood_id, psd_reli_id, psd_nation_id, psd_race_id, psd_psst_id, psd_birthdate, psd_birth_pv_id, psd_gd_id, psd_account_no, psd_ba_id, psd_facebook, psd_twitter, psd_website, psd_email, psd_cellphone, psd_phone, psd_ex_phone, psd_work_phone, psd_lodge_id, psd_lodge_no, psd_lodge_phone, psd_addcur_no, psd_addcur_pv_id, psd_addcur_amph_id, psd_addcur_dist_id, psd_addcur_zipcode, psd_addhome_no, psd_addhome_pv_id, psd_addhome_amph_id, psd_addhome_dist_id, psd_addhome_zipcode)\n\t\t\t\tVALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\";\n\t\t$this->hr->query($sql, array($this->psd_ps_id, $this->psd_dp_id, $this->psd_tax_no, $this->psd_id_card_no, $this->psd_passport_no, $this->psd_picture, $this->psd_blood_id, $this->psd_reli_id, $this->psd_nation_id, $this->psd_race_id, $this->psd_psst_id, $this->psd_birthdate, $this->psd_birth_pv_id, $this->psd_gd_id, $this->psd_account_no, $this->psd_ba_id, $this->psd_facebook, $this->psd_twitter, $this->psd_website, $this->psd_email, $this->psd_cellphone, $this->psd_phone, $this->psd_ex_phone, $this->psd_work_phone, $this->psd_lodge_id, $this->psd_lodge_no, $this->psd_lodge_phone, $this->psd_addcur_no, $this->psd_addcur_pv_id, $this->psd_addcur_amph_id, $this->psd_addcur_dist_id, $this->psd_addcur_zipcode, $this->psd_addhome_no, $this->psd_addhome_pv_id, $this->psd_addhome_amph_id, $this->psd_addhome_dist_id, $this->psd_addhome_zipcode));\n\t\t$this->last_insert_id = $this->hr->insert_id();\n\t}", "Function donneefournisseurs()\r\n {\r\n echo \"copie des données de la table fournisseurs\";\r\n $req=\"INSERT INTO `\".Valorisation::$anneenouvelle.\"`.`fournisseurs` SELECT * FROM `\".Valorisation::$anneeancienne.\"`.`fournisseurs`\";\r\n Valorisation::$bddnew->query($req); \r\n }", "public function insert($table, array $values, $ignore);", "function fillTable(): void\n{\n $sql = '\n SET autocommit=0; \n SET unique_checks=0;\n SET foreign_key_checks=0;\n INSERT INTO `products` (name, price, color) VALUES ' . generateTableData(1000001) . ';\n SET unique_checks=1;\n SET foreign_key_checks=1;\n COMMIT;\n ';\n\n DB::getInstance()->query($sql);\n}", "protected function fillTable()\n {\n $names = [\n 'Anna', 'Betty', 'Clara', 'Donna', 'Fiona',\n 'Gertrude', 'Hanna', 'Ione', 'Julia', 'Kara',\n ];\n\n $stm = \"INSERT INTO {$this->table} (name) VALUES (:name)\";\n foreach ($names as $name) {\n $this->connection->perform($stm, ['name' => $name]);\n }\n }", "function copyTable($table, $new_table, $data = TRUE, $link = 0) {\n $this->link = $link ? $link : $this->link;\n $r = $this->query(\"CREATE TABLE `{$new_table}` LIKE `{$table}`;\", $link);\n return ($r && $data) ? $this->query(\"INSERT INTO `{$new_table}` SELECT * FROM `{$table}`;\", $link) : $r;\n }", "public function _connection_table($table_a, $table_b) {\n\t\tif($table_a == $table_b) {\n\t\t\t$fields['$id_a'] = array(\n\t\t\t\t'Type' => 'number',\n\t\t\t\t'Null' => 'NO',\n\t\t\t\t'Key' => 'PRI',\n\t\t\t\t'Default' => NULL,\n\t\t\t\t'Extra' => ''\n\t\t\t);\n\n\t\t\t$fields['$id_b'] = array(\n\t\t\t\t'Type' => 'number',\n\t\t\t\t'Null' => 'NO',\n\t\t\t\t'Key' => 'PRI',\n\t\t\t\t'Default' => NULL,\n\t\t\t\t'Extra' => ''\n\t\t\t);\n\n\t\t\t$fields['$updated_timestamp'] = array(\n\t\t\t\t'Type' => 'timestamp',\n\t\t\t\t'Null' => 'YES',\n\t\t\t\t'Key' => '',\n\t\t\t\t'Default' => NULL,\n\t\t\t\t'Extra' => 'on update CURRENT_TIMESTAMP'\n\t\t\t);\n\t\t\t\n\t\t\t$fields['$flags'] = array(\n\t\t\t\t'Type' => 'bigint(20)',\n\t\t\t\t'Null' => 'NO',\n\t\t\t\t'Key' => '',\n\t\t\t\t'Default' => NULL,\n\t\t\t\t'Extra' => ''\n\t\t\t);\n\t\t\t\n\t\t\t$table = \"\\$connect $table_a\";\n\t\t\t\n\t\t\tif($this->_exists($table)) return false;\n\t\t\t\n\t\t\t$this->_create($table, $fields);\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t/**\n\t\t * Since we are obviously connecting two different tables go here\n\t\t */\n\t\t$fields['$'.$table_a.'_id'] = array(\n\t\t\t'Type' => 'number',\n\t\t\t'Null' => 'NO',\n\t\t\t'Key' => 'PRI',\n\t\t\t'Default' => NULL,\n\t\t\t'Extra' => ''\n\t\t);\n\t\t\n\t\t$fields['$'.$table_b.'_id'] = array(\n\t\t\t'Type' => 'number',\n\t\t\t'Null' => 'NO',\n\t\t\t'Key' => 'PRI',\n\t\t\t'Default' => NULL,\n\t\t\t'Extra' => ''\n\t\t);\n\t\t\t\t\n\t\t$fields['$updated_timestamp'] = array(\n\t\t\t'Type' => 'timestamp',\n\t\t\t'Null' => 'YES',\n\t\t\t'Key' => '',\n\t\t\t'Default' => 'CURRENT_TIMESTAMP',\n\t\t\t'Extra' => 'on update CURRENT_TIMESTAMP'\n\t\t);\n\t\t\n\t\t$fields['$flags'] = array(\n\t\t\t'Type' => 'bigint(20)',\n\t\t\t'Null' => 'NO',\n\t\t\t'Key' => '',\n\t\t\t'Default' => NULL,\n\t\t\t'Extra' => ''\n\t\t);\n\t\t\n\t\t$table1 = \"\\$connect $table_a $table_b\";\n\t\t$table2 = \"\\$connect $table_b $table_a\";\n\t\t\n\t\tif($this->_exists($table1)) return false;\n\t\tif($this->_exists($table2)) return false;\n\t\t\n\t\t$this->_create($table1 ,$fields);\n\t}", "function inserir($tabela,$dados)\n\t{\n\t\t$this->conectar();\n\t\t$this->sql=\"\";\n\t\t\n\t\t// Dividimos o Array dentro de $dados em Chaves e Valores\n\t\t$campos = array_keys($dados);\n\t\t$valores = array_values($dados);\n\t\t\n\t\t//Executamos a Query \n\t\t$this->sql = \"INSERT INTO \".$tabela.\" (\".implode(', ', $campos).\") VALUES ('\" . implode('\\', \\'', $valores) . \"')\";\n\t\t\n\t\t//Verificamos se a Query foi executada corretamente\n\t\n\t\t\n\t\t$this->query = mysqli_query($this->conectar(),$this->sql) or die ($this->erro($this->sql));\n\t}", "abstract public function insertRecord($tableName, $record);", "public function queryInsert($table, $data) : bool;", "public function create()\n {\n if (isset($_POST['add'])) {\n \n // pass bird info in the db\n $comName = $_POST['comName'];\n $sciName = $_POST['sciName'];\n $idbird = $_POST['idbird'];\n $birdRange = $_POST['birdRange'];\n $idlocation = $_POST['idlocation'];\n $locationName = $_POST['locationName'];\n $locationLat = $_POST['locationLat'];\n $locationLat = $_POST['locationLon'];\n\n // insert into two different tables, with 1 common value\n $sql = \"INSERT INTO birds (idbird, comName, sciName, birdRange, idlocation)\n VALUES (\\\"$idbird\\\", \\\"$comName\\\", \\\"$sciName\\\",\\\"$birdRange\\\", \\\"$idlocation\\\")\";\n var_dump($sql);\n\n $result = $this->databaseManager->connection->query($sql);\n // var_dump($result);\n // return $result;\n\n // insert into two different tables, with 1 common value\n $sql1 = \"INSERT INTO locations (idlocation, locationName, locationLat, locationLon)\n VALUES (\\\"$idlocation\\\", \\\"$locationName\\\", \\\"$locationLat\\\",\\\"$locationLon\\\")\";\n var_dump($sql1);\n\n $result = $this->databaseManager->connection->query($sql1);\n echo 'OK';\n \n }\n\n}", "public abstract function insert();", "public function bulkInsert()\n {\n DB::table($this->dbTable)\n ->insert($this->insertUpdateArray);\n }", "function post_visibilite_insert_all($var1,$var2){\r\n \t return DB::GetInstance()->Set(\"INSERT INTO post_visibilite VALUES ($var1,$var2)\");\r\n }", "public function maininsert($con, $name, $sname, $surname, $email, $title, $visible, $nid, $nid1, $sid, $userid){\n $msg = \"Select _nID_ FROM _name_ WHERE _name_ = ?\"; # check if name exists\n $stmnt1 = $con->prepare($msg);\n $stmnt1->bind_param(\"s\",$name);\n $stmnt1->execute();\n $stmnt1->bind_result($nid);\n if($stmnt1->fetch()){ # proceed if name exists\n $stmnt1->close();\n $msg = \"Select _tID_ FROM _title_ WHERE _title_name_ = ?\"; # chech if title exists\n $stmnt2 = $con->prepare($msg);\n $stmnt2 -> bind_param(\"s\", $title);\n $stmnt2 -> execute();\n $stmnt2 -> bind_result($sid);\n if($stmnt2->fetch()){ # proceed if title exists\n $stmnt2->close();\n $this -> insertinto($con, $name, $sname, $surname, $email, $title, $visible, $nid, $nid1, $sid, $userid);\n }else{ # proceed if title not exists\n $stmnt2->close();\n $this -> ifnottitle($con, $name, $sname, $surname, $email, $title, $visible, $nid, $nid1, $sid, $userid);\n }\n }else{ # proceed if name not exists\n $stmnt1->close();\n $this -> ifnotname($con, $name, $sname, $surname, $email, $title, $visible, $nid, $nid1, $sid, $userid);\n }\n }", "function company_insert($table, $data) {\n\n global $devel, $tablas, $I;\n\n if (!$data) {\n print_r(get_defined_vars());\n throw new Exception(\"ERROR: No existen parámetros para INSERT en $table\");\n }\n\n $VALUES = values($data);\n $FIELDS = fields($data);\n\n $query = \"INSERT INTO `$table` ($FIELDS) VALUES ($VALUES)\";\n sql($query, $table, 'INSERT');\n $I++;\n}", "protected function populateTable() {\n\t\t$query = \"\n\t\tINSERT INTO `items` VALUES (1, 'Candy', 'Crush', '1924 Sucka Drive', 'Stripper');\n\t\tINSERT INTO `items` VALUES (2, 'John', 'Smith', '9999 The Way', 'Unemployeed');\n\t\t\";\n\t\t$this->PDO->query($query);\n\t}", "function inserter($cols, $args, $tname, $password){\n\t// inserts arguments into a new record of tname (tablename) at cols (columns)\n\t// Function by Laurens\n\t$username = \"steenplaat\";\n\t$dbnaam = \"steenplaat\";\n\t$servername = \"localhost\";\n\ttry {\n\t\t$conn = new PDO(\"mysql:host=$servername;dbname=$dbname\", $username, $password);\n\t\t// set the PDO error mode to exception\n\t\t$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t}\n\tcatch(PDOException $e){\n\t\techo \"Connection failed: \" . $e->getMessage();\n\t}\n\t$colstr = $cols[0];\n\tfor($i=1; $i<count($cols); $i++){\n\t\t$colstr = $colstr.\", \".$cols[$i];\n\t}\n\t$argstr = $args[0];\n\tfor($i=1; $i<count($args); $i++){\n\t\t$argstr = $argstr.\", \".$args[$i];\n\t}\n\t$sql = 'INSERT INTO '.$tname.'('.$colstr.') VALUES ('.$argstr.')';\n\t$result = $conn->query($sql);\n\t$result = $result->fetchAll();\n}", "public function insert_into_table(){\n // VALUES ('$this->item_id', '$this->user_id', '$this->project_id', '$this->user2_id', '$this->post_id', '$this->type', '$this->activity', '$this->date_time')\";\n $query = \"INSERT INTO $this->table_name (item_id, user_id, project_id, user2_id, post_id, post_type, date_time) \n VALUES ('$this->item_id', '$this->user_id', '$this->project_id', '$this->user2_id', '$this->post_id', '$this->type', '$this->date_time')\";\n $result = mysql_query($query);\n\n $err = mysql_error();\n if($err){\n $file = 'errors.txt';\n file_put_contents($file, $err, FILE_APPEND | LOCK_EX);\n }\n }", "public abstract function getInsertSQL($into, $data, $values);", "public function MultiInsert($table, $data){\n $this->openConnection();\n $queries = $this->prepareForTransaction($table, $data);\n $this->db->beginTransaction();\n\n try{\n foreach ($queries as $item){\n // Attemnt to insert data record\n $q= $this->db->prepare($item);\n $q->execute();\n }\n\n $this->db->commit();\n }catch(Exception $e){\n print_r($e->getMessage());\n //Rollback the transaction.\n $this->db->rollBack(); exit;\n }\n return true;\n }", "public function createTables()\r\n {\r\n $sql = \"\r\n CREATE TABLE IF NOT EXISTS coins\r\n (\r\n id INT NOT NULL AUTO_INCREMENT,\r\n playername VARCHAR(32) NOT NULL,\r\n coins INT NOT NULL,\r\n ip VARCHAR(32) NOT NULL,\r\n cid VARCHAR(64) NOT NULL,\r\n PRIMARY KEY (id)\r\n );\r\n \";\r\n self::update($sql);\r\n }", "public function into(string $table);", "function insert_into_database($journey_times, $dow, $hod) {\n $save_sql = \"INSERT INTO link_times_development (start_stopid,end_stopid,\"\n \t .\"hour,day,link_time) \"\n\t .\"VALUES (:start_stopid, :end_stopid, :hour, :day, :link_time)\";\n\n $save_time = $this->DBH->prepare($save_sql);\n\n foreach($journey_times as $entry) {\n $save_time->bindValue(':start_stopid', $entry['start'],PDO::PARAM_STR);\n $save_time->bindValue(':end_stopid', $entry['end'],PDO::PARAM_STR);\n $save_time->bindValue(':hour', $hod,PDO::PARAM_INT);\n $save_time->bindValue(':day', $dow,PDO::PARAM_INT);\n $save_time->bindValue(':link_time', $entry['average_time']);\n $save_time->execute();\n }\n }", "function insert ($table_into, array $fields = array())\n\t{\t\n\t\tif (empty($table_into))\n\t\t\tthrow new Exception(\"Table not specified in call to 'insert'.\");\n\t\t\n\t\t// $fields might be an empty array,\n\t\t// but the insert will still be attempted.\n\t\t\n\t\t$columns_list = array();\n\t\t$values_list = array();\n\t\tforeach ($fields as $column => $value) {\n\t\t\t$columns_list[] = \"$column\";\n\t\t\tif ($value instanceof Db_Expression)\n\t\t\t\t$values_list[] = \"$value\"; else\n\t\t\t\t$values_list[] = \":$column\";\n\t\t}\n\t\t$columns_string = implode(', ', $columns_list);\n\t\t$values_string = implode(', ', $values_list);\n\t\t\n\t\t$clauses = array(\n\t\t\t'INTO' => \"$table_into ($columns_string)\", 'VALUES' => $values_string\n\t\t);\n\t\t\n\t\treturn new Db_Query_Mysql($this, Db_Query::TYPE_INSERT, $clauses, $fields);\n\t}", "public function maininsert($con, $name, $sname, $surname, $email, $title, $visible, $nid, $nid1, $sid){\n $msg = \"Select _nID_ FROM _name_ WHERE _name_ = ?\"; # check if name exists\n $stmnt1 = $con->prepare($msg);\n $stmnt1->bind_param(\"s\",$name);\n $stmnt1->execute();\n $stmnt1->bind_result($nid);\n if($stmnt1->fetch()){ # proceed if exists\n $stmnt1->close();\n $msg = \"Select _tID_ FROM _title_ WHERE _title_name_ = ?\"; # check if title exists\n $stmnt2 = $con->prepare($msg);\n $stmnt2 -> bind_param(\"s\", $title);\n $stmnt2 -> execute();\n $stmnt2 -> bind_result($sid);\n if($stmnt2->fetch()){ # proceed if title exists\n $stmnt2->close();\n $this -> insertinto($con, $name, $sname, $surname, $email, $title, $visible, $nid, $nid1, $sid);\n }else{ # set new title\n $stmnt2->close();\n $this -> ifnottitle($con, $name, $sname, $surname, $email, $title, $visible, $nid, $nid1, $sid);\n }\n }else{\n $stmnt1->close();\n $this -> ifnotname($con, $name, $sname, $surname, $email, $title, $visible, $nid, $nid1, $sid);\n }\n }", "function insertarPuertos($puerto,$bandera,$refdestinos) {\r\n$sql = \"insert into tbpuertos(idpuerto,puerto,bandera,refdestinos)\r\nvalues ('','\".($puerto).\"','\".($bandera).\"',\".$refdestinos.\")\";\r\n$res = $this->query($sql,1);\r\nreturn $res;\r\n}", "public function fillTablesInDatabase($user_id){\n\t\t\n\t\t$db = static::getDB();\n\t\t\n\t\t$insert_Query2 = $db->exec(\"INSERT INTO expenses_category_assigned_to_users VALUES (null, '$user_id','Jedzenie'),(null, '$user_id', 'Mieszkanie'),(null, '$user_id','Transport'),(null, '$user_id','Telekomunikacja'),(null, '$user_id','Opieka zdrowotna'),(null, '$user_id','Ubranie'),(null, '$user_id','Higiena'),(null, '$user_id','Dzieci'),(null, '$user_id','Rozrywka'),(null, '$user_id','Wycieczka'),(null, '$user_id','Szkolenia'),(null, '$user_id','Książki'),(null, '$user_id','Oszczędności'),(null, '$user_id','Darowizna'),(null, '$user_id','Spłata długów'),(null, '$user_id','Na złotą jesien, czyli emeryturę'),(null, '$user_id','Inne wydatki')\");\n\t\t\t\t\t\n\t\t$insert_Query3 = $db->exec(\"INSERT INTO incomes_category_assigned_to_users VALUES (null, '$user_id','Wynagrodzenie'),(null, '$user_id','Odsetki bankowe'),(null, '$user_id','Sprzedaż na Allegro'),(null, '$user_id','Inne źródło')\");\n\t\t\t\t\t\n\t\t$insert_Query4 = $db->exec(\"INSERT INTO payment_methods_assigned_to_users VALUES (null, '$user_id','Gotówka'),(null, '$user_id','Karta Debetowa'),(null, '$user_id','Karta Kredytowa');\");\n\t}", "protected function insert()\n\t{\n\t\t$query = $this->connection->prepare\n\t\t(\"\n\t\t\tinsert into\n\t\t\t\tBooth (BoothNum)\n\t\t\t\tvalues (?)\n\t\t\");\n\n\t\t$query->execute(array_values($this->fields));\n\n\t}", "public function create_or_upgrade_tables() {\n\t\tif ( is_multisite() ) {\n\t\t\t$this->create_table( $this->ms_table );\n\t\t}\n\n\t\t$this->create_table( $this->table );\n\t}", "function insertarExportacioncontenedores($refexportaciones,$contenedor,$tara,$precinto) {\r\n$sql = \"insert into dbexportacioncontenedores(idexportacioncontenedor,refexportaciones,contenedor,tara,precinto)\r\nvalues ('',\".$refexportaciones.\",'\".($contenedor).\"',\".$tara.\",'\".($precinto).\"')\";\r\n$res = $this->query($sql,1);\r\nreturn $res;\r\n}", "public function insert(array $columns);", "public function insert(array $columns);", "public abstract function Insert();", "function insert($table,$data){\n\t\t$j=0;\n\t\t$c=count($data);\n\t\tforeach($data as $key=>$value){\n\t\t\t$j++;\n\t\t\tif($c==$j){\n\t\t\t\t$line_1.='`'.$key.'`';\n\t\t\t\t$line_2.=\"'\".rce_remove_quotes(mysql_real_escape_string($value)).\"'\";\n\t\t\t} else {\n\t\t\t\t$line_1.='`'.$key.'`, ';\n\t\t\t\t$line_2.=\"'\".rce_remove_quotes(mysql_real_escape_string($value)).\"', \";\n\t\t\t}\n\t\t}\n\t\t$r=mysql_query(\"\n\t\t\tINSERT INTO `$table`\n\t\t\t(\".$line_1.\") VALUES\n\t\t\t(\".$line_2.\")\n\t\t\");\n\t\treturn $r;\n\t}", "function inserir() {\n\t\t$this->sql = mysql_query(\"INSERT INTO suporte (user_cad, data_cad, id_regiao, exibicao, tipo, prioridade, assunto, mensagem, arquivo, status, status_reg,suporte_pagina)\n\t\t\t\t\t VALUES\t('$this->id_user_cad ','$this->data_cad','$this->id_regiao', '$this->exibicao', '$this->tipo','$this->prioridade', '$this->assunto', '$this->menssagem', '$this->tipo_arquivo','1','1','$this->pagina');\") or die(mysql_error());\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\n\t\t}", "private function insert()\n {\n $this->query = $this->pdo->prepare(\n 'INSERT INTO ' . $this->table . ' (' .\n implode(', ', array_keys($this->data)) .\n ' ) VALUES (:' .\n implode(', :', array_keys($this->data)) .\n ')'\n );\n }", "public function testInserting() {\n $this->getConnection()->getConnection()->exec(\"INSERT INTO `owners` (`name`, `email`) VALUES ('Donald Trump', 'idont@know.com');\");\n }", "function test_insert_bulk($urabe, $body)\n{\n $bulk = $body->insert_bulk;\n if ($body->driver == \"PG\")\n $table_name = $body->schema . \".\" . $body->table_name;\n else\n $table_name = $body->table_name;\n return $urabe->insert_bulk($table_name, $bulk->columns, $bulk->values);\n}", "public function addToInsertSQLArray();", "public function insert(...$field_values);", "function insert ($tablename, $newRow) \n\t{\n\t\t$lockfp = $this->getLock($tablename);\t\t\t\n\t\t$this->tables[$tablename][] = $newRow;\n\t\t$this->writeTable($tablename);\n\t\t$this->releaseLock($lockfp);\n\t}", "public function insert() {\n \n $sql = \"INSERT INTO $this->table(\"\n . \"tb_user_id,\"\n . \"tb_user_directors_id,\"\n . \"tb_boleto_venc_boleto,\"\n . \"tb_boleto_hash_boleto,\"\n . \"tb_boleto_hash_nfe,\"\n . \"tb_boleto_hash_sla,\"\n . \"tb_boleto_status_boleto,\"\n . \"tb_boleto_date,\"\n . \"tb_boleto_hour)\"\n . \"VALUES (?,?,?,?,?,?,?,?,?)\";\n \n $stmt = DB::prepare($sql);\n \n $stmt->bindParam(1, $this->tb_user_id);\n $stmt->bindParam(2, $this->tb_user_directors_id);\n $stmt->bindParam(3, $this->tb_boleto_venc_boleto);\n $stmt->bindParam(4, $this->tb_boleto_hash_boleto);\n $stmt->bindParam(5, $this->tb_boleto_hash_nfe);\n $stmt->bindParam(6, $this->tb_boleto_hash_sla);\n $stmt->bindParam(7, $this->tb_boleto_status_boleto);\n $stmt->bindParam(8, $this->tb_boleto_date);\n $stmt->bindParam(9, $this->tb_boleto_hour);\n \n $stmt->execute();\n }", "function insertToIS4C() {\n\n\tglobal $dbConn2;\n\n\tglobal $insertCustdata;\n\tglobal $insertMeminfo;\n\tglobal $insertMemContact;\n\tglobal $insertMemDates;\n\tglobal $insertMemberCards;\n\tglobal $insertStockpurchases;\n\n\tglobal $debug;\n\n//echo \"In insertToIS4C\\n\";\n\n\t$statements = array($insertMeminfo,\n\t\t$insertMemContact,\n\t\t$insertMemDates,\n\t\t$insertMemberCards);\n\t$statement = \"\";\n\n\tif ( count($insertCustdata) > 0 ) {\n\t\tforeach ($insertCustdata as $statement) {\n\t\t\tif ( $debug == 1) \n\t\t\t\techo $statement, \"\\n\";\n//continue;\n\t\t\t$rslt = $dbConn2->query(\"$statement\");\n\t\t\tif ( 1 && $dbConn2->errno ) {\n\t\t\t\treturn(sprintf(\"Error: Insert failed: %s\\n\", $dbConn2->error));\n\t\t\t}\n\t\t}\n\t}\n\telse {\n\t\t//echo \"No custdata to insert.\\n\";\n\t\t1;\n\t}\n\n\tforeach ($statements as $statement) {\n\t\tif ( $statement != \"\" ) {\n\t\t\tif ( $debug == 1) \n\t\t\t\techo $statement, \"\\n\";\n//continue;\n\t\t\t$rslt = $dbConn2->query(\"$statement\");\n\t\t\tif ( 1 && $dbConn2->errno ) {\n\t\t\t\treturn(sprintf(\"Error: Insert failed: %s\\n\", $dbConn2->error));\n\t\t\t}\n\t\t}\n\t}\n\n\t// stockpurchases is in a different db.\n\n\treturn(\"OK\");\n\n// insertToIS4C\n}", "public function inserir()\n {\n }", "function migrateTable( $table ) {\n\n $query = \"SELECT * FROM \" . $table;\n\n $this->_externalDB->setQuery( $query );\n $object = $this->_externalDB->loadObjectList();\n\n\t\t$db =& JFactory::getDBO();\n $count = count($object);\n\n for ($i=0; $i<$count; $i++) {\n $db->insertObject($table, $object[$i]);\n\t\t\t//echo $db->errorMsg();\n }\n\n\t\t$ret = $db->getErrorNum();\n\n return $ret;\n }", "private function create_tables()\n {\n global $wpdb;\n\n /* http://wiip.fr/content/choisir-le-type-de-colonne-de-ses-tables-mysql */\n $sql = '\n CREATE TABLE IF NOT EXISTS '.$this->tables['users'].'(\n id int(11) NOT NULL auto_increment,\n PRIMARY KEY (id),\n nom VARCHAR(255) NOT NULL,\n prenom VARCHAR(255) NOT NULL,\n email VARCHAR(320) NOT NULL,\n password VARCHAR(500) NOT NULL,\n adresse CHAR(255),\n codepostal CHAR(10),\n ville CHAR(60),\n pays CHAR(60),\n telephone_professionnel CHAR(20),\n dateinscription CHAR(20) NOT NULL,\n statut VARCHAR(15),\n evenement VARCHAR(255),\n date_evenement DATE,\n specialite VARCHAR(100),\n categorie VARCHAR(20),\n isUpdate VARCHAR(10),\n organisme_facturation CHAR(100),\n email_facturation CHAR(255),\n adresse_facturation CHAR(255),\n ville_facturation CHAR(60),\n codepostal_facturation CHAR(10),\n pays_facturation CHAR(50),\n contacts TEXT\n \n\n )';\n\n dbDelta($sql);\n\n $sql = '\n CREATE TABLE IF NOT EXISTS '.$this->tables['users_file'].'(\n id int(11) NOT NULL auto_increment,\n PRIMARY KEY (id),\n email VARCHAR(320) NOT NULL,\n fichier VARCHAR(500) NOT NULL,\n chemin VARCHAR(500) NOT NULL,\n date_enregistrement VARCHAR(500) NOT NULL,\n type_doc VARCHAR(100) NOT NULL\n \n )';\n\n dbDelta($sql);\n }", "protected function _insert()\n\t{\n\t\t// INSERT INTO 'table'\n\t\t$this->_query = 'INSERT INTO '.$this->_table.' (';\n\n\t\t// * / row1, row2\n\t\t$first = true;\n\t\t$vals = '';\n\t\tforeach($this->_set as $key => $value) {\n\t\t\t$this->_query .= ($first) ? ('') : (', '); \n\t\t\t$vals .= ($first) ? ('') : (', '); \n\t\t\t$first = false;\n\n\t\t\t$this->_query .= $key;\n\t\t\t$vals .= \"'$value'\";\n\t\t} // foreach\n\n\t\t$this->_query .= \") VALUES ($vals);\";\n\n\t\treturn $this->_query;\n\t}", "function sqlqueryinsert($tableName, $columns, $values, $redirect)\n\t\t{\n\t\t\t$sqlinsert = \"insert into $tableName($columns) values($values)\";\n\t\t\t$sqlinsertquery = mysql_query($sqlinsert);\n\t\t\theader(\"location:\".$redirect);\n\t\t\texit;\n\t\t}", "function insertTable($table, $values){\n\t\n\t$insert = \"INSERT INTO \".$table.\" VALUES (\".$values.\")\";\n\t$insert_query = mysql_query($insert);\n\tif($insert_query){\n\t\t$insert_id = mysql_insert_id();\n\t\treturn $insert_id;\n\t}else{\n\t\treturn false;\n\t}\n}", "public static function insertData($tablesInfo, $jtable)\n {\n foreach ($tablesInfo as $tableInfo) {\n $field = $tableInfo['associationName'];\n if (isset($jtable->$field)) {\n $data = $jtable->$field;\n $values = [];\n for ($k = 0; $k < count($data); $k++) {\n\n $values[] = $jtable->id . ', ' . $data[$k];\n\n }\n\n if (count($values) > 0) {\n $db = JFactory::getDbo();\n $query = $db->getQuery(true)\n ->insert($db->qn('#__' . $tableInfo['componentNameForAssociation'] . '_association_' . $tableInfo['associationName']))\n ->columns($db->qn(['book', 'id']))\n ->values($values);\n $db->setQuery($query);\n $db->execute();\n }\n\n }\n }\n }", "function insert() {\n\t\t$sql = \"INSERT INTO \".$this->hr_db.\".hr_amphur (amph_name, amph_name_en, amph_pv_id, amph_active)\n\t\t\t\tVALUES(?, ?, ?, ?)\";\n\t\t$this->hr->query($sql, array( $this->amph_name, $this->amph_name_en, $this->amph_pv_id, $this->amph_active));\n\t\t$this->last_insert_id = $this->hr->insert_id();\n\t}", "public function fillOutDb()\n {\n /* Fill out the Contacts table. BatchInsert is a good idea for that */\n $this->batchInsert('Contacts', ['name', 'surname', 'description'], self::InitialContacts);\n\n /* Prepare array for batchInsert request at first */\n $list = [];\n foreach(self::InitialPhoneNumbers as $name => $numbers){\n $query = new \\yii\\db\\Query();\n $contact_id = $query->select('id')->from('Contacts')->where(['name' => $name])->one();\n foreach($numbers as $number){\n $list[] = ['number' => $number, 'contact_id' => $contact_id['id']];\n }\n }\n\n /* Fill out the Numbers table */\n $this->batchInsert('Numbers', ['number', 'contact_id'], $list);\n }", "public function Into(string $Table, array $Fields = []): IInsert;", "public function insert($tableName, $data) {\n ksort($data);\n\n $fieldNames = implode('`, `', array_keys($data));\n $fieldValues = ':'.implode(', :', array_keys($data));\n\n $sth = $this->prepare(\"INSERT INTO $tableName (`$fieldNames`) VALUES ($fieldValues)\");\n\n foreach($data as $key => $value) {\n $sth->bindValue(\":$key\", $value);\n }\n\n $sth->execute();\n }", "protected function migrateTables()\n {\n foreach ($this->tables as $table) {\n \\DB::getPdo()->exec(\"INSERT IGNORE INTO {$this->newDbName}.{$table} SELECT * FROM {$this->oldDbName}.{$table}\");\n }\n }", "abstract protected function doInsert($subject, Statement $insertStatement);", "abstract public function insert(string $table, array $row, array $options = []);", "public function insert($perifericos);", "public function insertSpecific($cols, $table) \n {\n $values = array();\n $prepReq = \"INSERT INTO \".$table.\"(\";\n foreach ($cols as $col) \n { \n $prepReq = $prepReq.\" \".$col[0].\",\"; \n }\n $prepReq = substr_replace($prepReq ,\"\",-1) . \")\"; //remove last coma and add contents\n\n $prepReq = $prepReq . \" VALUES(\";\n foreach ($cols as $col) \n { \n $prepReq = $prepReq.\" ?,\"; \n array_push($values, $col[1]);\n }\n $prepReq = substr_replace($prepReq ,\"\",-1) . \")\"; //remove last coma and add contents\n\n $req = $this->db->prepare($prepReq);\n $res = $req->execute($values);\n return $res;\n\n }", "public function join($tables, $overwrite = false);", "public function testInsertStmt()\n {\n $insert = $this->getConnection()\n ->insert()\n ('dummy_posts')\n (['blog_id', 'blog_title'])\n ([':id', ':title']);\n return $this->assertEquals($insert, \"INSERT INTO dummy_posts(blog_id, blog_title) VALUES (:id, :title)\");\n }", "public function insertar($idordencompra, $nrofactura, $idproveedor, $idpersonal, $idsucursal, $idformapago, $idtipodoc, $iddeposito, \n $fecha_hora, $obs, $monto_compra, $idmercaderia, $cantidad, $precio, $total_exenta, $total_iva5, $total_iva10, $liq_iva5, $liq_iva10, $cuota){\n\n $sql = \"INSERT INTO compras (idordencompra, nrofactura, idproveedor, idpersonal, idsucursal, idformapago, idtipodocumento, iddeposito, fecha, obs, monto, cuotas, estado) \n VALUES ('$idordencompra', '$nrofactura', '$idproveedor', '$idpersonal', '$idsucursal', '$idformapago', '$idtipodoc', '$iddeposito', '$fecha_hora', '$obs', '$monto_compra', '$cuota', '1')\";\n \n $idcompranew = ejecutarConsulta_retornarID($sql);\n\n $num_elementos=0;\n $sw=true;\n\n while($num_elementos < count($idmercaderia)){\n\n $sql_detalle = \"INSERT INTO compras_detalle (idcompra, idmercaderia, cantidad, precio) \n VALUES ('$idcompranew', '$idmercaderia[$num_elementos]', '$cantidad[$num_elementos]', '$precio[$num_elementos]')\";\n ejecutarConsulta($sql_detalle) or $sw = false;\n\n $num_elementos =$num_elementos + 1;\n }\n\n //aca realimazamos la insercion en la tabla libro compras\n\n $sql2 = \"INSERT INTO libro_compras (idcompra, idproveedor, fecha, montoexenta, montoiva5, montoiva10, grabiva5, grabiva10, montopagado) \n VALUES ('$idcompranew', '$idproveedor', '$fecha_hora', '$total_exenta', '$total_iva5', '$total_iva10', '$liq_iva5', '$liq_iva10', '$monto_compra')\";\n\n ejecutarConsulta($sql2);\n\n //aca realizamos la insercion en la tabla cuentas a pagar \n\n if($idformapago == 1){\n $formaPago = 'CONTADO';\n }else{\n $formaPago = 'CREDITO';\n }\n\n $monto_cuota = $monto_compra / $cuota;\n\n $fecha = strtotime($fecha_hora);\n $fecha = date('Y-m-d H:i:s', $fecha);\n $cont = 0;\n\n for ($i=1; $i <= $cuota ; $i++) { \n\n if($i >= 2){\n $cont = $cont + 1;\n $fecha = date(\"Y-m-d H:i:s\", strtotime($fecha_hora. \"+ {$cont} month\"));\n }\n\n if($cuota == 1){\n $concepto = \"Cuota Nro. \". $i .\"/\". $cuota .\" \". $formaPago;\n }else{\n $concepto = \"Cuota Nro. \". $i .\"/\". $cuota .\" \". $formaPago .\" \". $cuota .\" MESES\";\n }\n\n $sql3 = \"INSERT INTO cuentas_a_pagar (idcompra, idproveedor, nrofactura, idnotacredidebi, totalcuota, nrocuota, montocuota, fechavto, obs, estado) \n VALUES ('$idcompranew', '$idproveedor', '$nrofactura', '0', '$cuota', '$i', '$monto_cuota', '$fecha','$concepto', '1')\";\n\n ejecutarConsulta($sql3);\n\n }\n\n $sql4 = \"UPDATE orden_compras SET estado = '2' WHERE idordencompra = '$idordencompra'\";\n ejecutarConsulta($sql4);\n\n return $sw;\n\n }", "public function insertIntoFeeReceiptMaster($values){\n \t$query = \"INSERT INTO `fee_receipt_master` \n (feeReceiptId,bankId,instituteBankAccountNo,studentId,currentClassId,feeClassId,feeCycleId,concession,\n \t\t\t\t\t\t\thostelFees,hostelId,hostelRoomId,transportFees,busRouteId,busStopId,\n \t\t\t\t\t\t\tstatus,userId,instituteId,hostelFeeStatus,transportFeeStatus,dated,hostelSecurity,receiptGeneratedDate)\n \t\t\t\tVALUES $values\";\n \t\n \treturn SystemDatabaseManager::getInstance()->executeUpdateInTransaction($query);\n }", "function db_multi_insert($table, $columns=array(),$values){\n if($table==\"\" || $values==\"\")return false;\n $columnstr=\"\";\n if(count($columns)>0){\n //add comma after each value in tghe column array\n $columnstr=implode(\",\", $columns);\n $columnstr=\"(\".$columnstr.\")\";\n }\n $sql = \"INSERT INTO \".$table.\" \".$columnstr.\" VALUES \";\n $valuesArr = array();\n foreach($values as $k=>$vald){\n $valuestr = '';\n foreach($vald as $key=>$val){\n if($valuestr !=\"\"){\n $valuestr.=\", '\".$this->con->real_escape_string($val).\"'\";\n }else{\n $valuestr=\"'\".$this->con->real_escape_string($val).\"'\";\n }\n }\n $valuesArr[] = '('.$valuestr.')';\n }\n $valuesData = implode(',',$valuesArr);\n $sql .= $valuesData;\n\n // print $sql;\n\n // In this line we will get the first inserted id of the last updated table\n if($this->con->query($sql)){\n return $this->con->insert_id;\n }else{\n return false;\n }\n }", "public function testMultipleInserts()\n {\n $statement = $this->getQueryBuilderConnection()\n ->insert()\n ->into('querybuilder_tests')\n ->values(\n [\n [\n 'id' => 10,\n 'languageId' => 1,\n 'field' => 'mult1',\n ],\n [\n 'id' => 11,\n 'languageId' => 1,\n 'field' => 'mult2',\n ],\n ]\n )\n ->execute();\n\n $this->assertInstanceOf(\\PDOStatement::class, $statement);\n $this->assertEquals(2, $statement->rowCount());\n\n $result = $this->getQueryBuilderConnection()\n ->select('count(1) as counter')\n ->from('querybuilder_tests')\n ->getOneField('counter');\n\n $this->assertEquals(12, $result);\n }" ]
[ "0.62865627", "0.6264757", "0.6251418", "0.6082616", "0.6032613", "0.6028603", "0.6028603", "0.6028603", "0.6021217", "0.60015815", "0.59932166", "0.5974147", "0.59570485", "0.59310013", "0.5905858", "0.5857635", "0.58183163", "0.58095086", "0.5785111", "0.57785124", "0.5775509", "0.57555884", "0.5698174", "0.56710577", "0.56658417", "0.5662416", "0.5650112", "0.5648243", "0.5646405", "0.56436", "0.56431925", "0.5638076", "0.56221366", "0.5619893", "0.5591141", "0.5589887", "0.5582366", "0.55727327", "0.55614984", "0.55590177", "0.55484164", "0.5544717", "0.55442667", "0.55350393", "0.55349505", "0.5528611", "0.5520442", "0.55115896", "0.550759", "0.5504001", "0.55004317", "0.55002624", "0.5492186", "0.5486404", "0.54790944", "0.54713553", "0.5471263", "0.5458228", "0.54451966", "0.5434401", "0.5433398", "0.542712", "0.5426788", "0.54189897", "0.5409026", "0.5405445", "0.5405445", "0.53999037", "0.5396974", "0.5391901", "0.53913754", "0.5388902", "0.5385006", "0.53808784", "0.5380263", "0.5378774", "0.5372871", "0.53708947", "0.5366421", "0.5360308", "0.5357271", "0.5352138", "0.5345946", "0.5343233", "0.53347737", "0.5334544", "0.5333828", "0.53293097", "0.53100383", "0.530765", "0.5304402", "0.5291751", "0.5290568", "0.5279268", "0.5278699", "0.5278116", "0.52774614", "0.5276325", "0.52749187", "0.52713233" ]
0.7591835
0
Test case for listPastWebinarFiles List Past Webinar Files.
Тест-кейс для listPastWebinarFiles Список прошлых вебинаров.
public function testListPastWebinarFiles() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_test_file_uploads()\n {\n }", "public function testListPastWebinarPollResults()\n {\n }", "public function testGetFilesList()\n {\n $remoteFolder = \"TestData/In\";\n\n $localName = \"Book1.xlsx\";\n $remoteName = \"Book1.xlsx\";\n\n CellsApiTestBase::ready( $this->instance,$localName ,$remoteFolder . \"/\" . $remoteName , \"\");\n \n $request = new GetFilesListRequest();\n $request->setPath( $remoteFolder);\n $request->setStorageName( \"\");\n $this->instance->getFilesList($request);\n }", "public function testListPastWebinarQA()\n {\n }", "public function getFiles() {}", "public function test_listUnsupportedFileTypes() {\n\n }", "public function getFiles ();", "public function getFiles();", "public function getFiles();", "public function getFiles();", "public function files();", "public function files();", "public function files();", "public function getUploadedFiles() {}", "public function testListAttachments()\n {\n //Wordsets but no origin\n $templating = $this->createMock(\\Twig\\Environment::class);;\n $attacher = new ReportMailerAttacher(\n $this->mockEntityManager(),\n $templating\n );\n $testUser = new User();\n $origin = new Origin();\n $origin->setName(\"aqui\");\n $testUser->addOrigin($origin);\n $fileList = $attacher->listAttachments($testUser, \"2020-01-01\");\n $this->assertEquals([\"wv_2020-01-01_wordsetA_aqui.html\"], $fileList);\n // 2 origins\n $attacher = new ReportMailerAttacher(\n $this->mockEntityManager(),\n $templating\n );\n $testUser = new User();\n $origin = new Origin();\n $origin->setName(\"aqui\");\n $origin2 = new Origin();\n $origin2->setName(\"alla\");\n $testUser->addOrigin($origin);\n $testUser->addOrigin($origin2);\n $fileList = $attacher->listAttachments($testUser, \"2020-01-01\");\n $this->assertEquals(\n [\n \"wv_2020-01-01_wordsetA_aqui.html\",\n \"wv_2020-01-01_wordsetA_alla.html\"\n ],\n $fileList\n );\n }", "public function get_files()\n {\n }", "public function testMediaFilesGet()\n {\n $client = static::createClient();\n\n $path = '/media/files';\n\n $crawler = $client->request('GET', $path);\n }", "public function getUploadedFiles()\n {\n }", "public function files($index){\n $this->httpRequest->files($index);\n }", "private function getTestFileList() {\n\t\treturn [\n\t\t\tself::makeFileInfo('a.txt', 4, 2.3 * \\pow(10, 9)),\n\t\t\tself::makeFileInfo('q.txt', 5, 150),\n\t\t\tself::makeFileInfo('subdir2', 87, 128, true),\n\t\t\tself::makeFileInfo('b.txt', 2.2 * \\pow(10, 9), 800),\n\t\t\tself::makeFileInfo('o.txt', 12, 100),\n\t\t\tself::makeFileInfo('subdir', 88, 125, true),\n\t\t];\n\t}", "public function list_of_fileuploads() {\n $request = $_GET;\n $result = $this->fileupload_model->load_list_of_fileuploads($request, array());\n $result = getUtfData($result);\n echo json_encode($result);\n exit;\n }", "public function files() {\n\t\t$files = $this->ApiFile->fileList($this->path);\n\t\t$this->set('files', $files);\n\t}", "public function testShouldGetFileInfo() {\n\t\t$this->assertEquals(\n\t\t\t$this->_testFilesId[0],\n\t\t\t$this->_Files->run(['ids' => $this->_testFilesId])[0]['id']\n\t\t);\n\t}", "function get_all_video_files($vdetails,$count_only=false,$with_path=false)\r\n{\r\n $details = get_video_file($vdetails,true,$with_path,true,$count_only);\r\n if($count_only)\r\n return count($details);\r\n return $details;\r\n}", "public function testGetFiles()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "function ajaxlistfiles(){\n\n\t\t//Glob all files in uploaddir\n\t\t$files = array();\n\t\tforeach(glob($this->uploaddir.'*') as $file){\n\n\t\t\t//Strip path\n\t\t\t$filename = str_replace($this->uploaddir,'',$file);\n\n\t\t\t$files[$filename]['filename']=$filename;\n\t\t\t$files[$filename]['filesize']=filesize($file) / 1024 / 1024; //Mb\n\t\t\t$files[$filename]['modified']=filemtime($file); //Mb\n\n\t\t\t//Check torrent\n\t\t\tif( file_exists( $this->torrentdir.$filename.'.torrent' )){\n\n\t\t\t\t//Add torrent file\n\t\t\t\t$files[$filename]['torrent']=$filename.'.torrent';\n\n\t\t\t\t//Check database table phptracker_peers for torrent peers:\n\t\t\t\tif($torrent = $this->Torrent->findByName($filename)){\n\t\t\t\t\tif($peers = $this->Peer->findAllByInfoHash($torrent['Torrent']['info_hash'])){\n\t\t\t\t\t\t$files[$filename]['peers']=$peers;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->set('files',$files);\n\n\t\t$this->layout = 'ajax';\n\t}", "public function generate_filelist_preview() : void {\n CrawlQueue::truncate();\n DeployQueue::truncate();\n\n $initial_file_list_count =\n FilesHelper::buildInitialFileList(\n true,\n SiteInfo::getPath( 'uploads' ),\n $this->settings\n );\n\n if ( $initial_file_list_count < 1 ) {\n $err = 'Initial file list unable to be generated';\n http_response_code( 500 );\n echo $err;\n WsLog::l( $err );\n throw new WP2StaticException( $err );\n }\n\n $via_ui = filter_input( INPUT_POST, 'ajax_action' );\n\n if ( is_string( $via_ui ) ) {\n echo $initial_file_list_count;\n }\n }", "abstract function list_files($path = '.');", "public function testPastWebinars()\n {\n }", "public function getOtherFiles(): array;", "public function testListAttachmentsVoid()\n {\n //first when there are no origins in the user.\n $templating = $this->createMock(\\Twig\\Environment::class);;\n $attacher = new ReportMailerAttacher($this->mockEntityManagerVoid(), $templating);\n $testUser = new User();\n $fileList = $attacher->listAttachments($testUser, \"2020-01-01\");\n $this->assertEquals([], $fileList);\n //now we add an origin to the user, but there are no wordsets.\n $attacher = new ReportMailerAttacher($this->mockEntityManagerVoid(), $templating);\n $origin = new Origin();\n $testUser->addOrigin($origin);\n $fileList = $attacher->listAttachments($testUser, \"2020-01-01\");\n $this->assertEquals([], $fileList);\n //Wordsets but no origin\n $attacher = new ReportMailerAttacher(\n $this->mockEntityManager(),\n $templating\n );\n $testUser = new User();\n $fileList = $attacher->listAttachments($testUser, \"2020-01-01\");\n $this->assertEquals([], $fileList);\n }", "function ciniki_lapt_fileList($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 ));\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', 'lapt', 'private', 'checkAccess');\n $rc = ciniki_lapt_checkAccess($ciniki, $args['tnid'], 'ciniki.lapt.fileList');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Get the list of files\n //\n $strsql = \"SELECT ciniki_lapt_files.id, \"\n . \"ciniki_lapt_files.document_id, \"\n . \"ciniki_lapt_files.name, \"\n . \"ciniki_lapt_files.permalink, \"\n . \"ciniki_lapt_files.flags, \"\n . \"ciniki_lapt_files.org_filename, \"\n . \"ciniki_lapt_files.extension \"\n . \"FROM ciniki_lapt_files \"\n . \"WHERE ciniki_lapt_files.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryArrayTree');\n $rc = ciniki_core_dbHashQueryArrayTree($ciniki, $strsql, 'ciniki.lapt', array(\n array('container'=>'files', 'fname'=>'id', \n 'fields'=>array('id', 'document_id', 'name', 'permalink', 'flags', 'org_filename', 'extension')),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['files']) ) {\n $files = $rc['files'];\n $file_ids = array();\n foreach($files as $iid => $file) {\n $file_ids[] = $file['id'];\n }\n } else {\n $files = array();\n $file_ids = array();\n }\n\n return array('stat'=>'ok', 'files'=>$files, 'nplist'=>$file_ids);\n}", "public function testGetReplenishmentFiles()\n {\n }", "function manageVideoPopPlusFiles() {\r\n\t\t// Get List\r\n\t\tif (isset($_GET['get_list'])) {\r\n\t\t\t$start = 0;\r\n\t\t\tif (isset($_GET['start']) && is_numeric($_GET['start']))\r\n\t\t\t\t$start = $_GET['start'];\r\n\r\n\t\t\t// Open file and fill array with unserialized data\r\n\t\t\tif (!is_array($this->vids))\r\n\t\t\t\t$this->vids = $this->_loadDataText();\r\n\r\n\t\t\t$out .= $this->_videoLists($_GET['get_list'], $this->vids, $start, ($_GET['get_list']=='1' ? $this->options['manage_list_max'] : $this->options['post_list_max']));\r\n\t\t\techo $out;\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Check write permissions\r\n\t\tif($this->_checkDir()) {\r\n\r\n\t\t\t// IF Video is uploaded\r\n\t\t\tif ( current_user_can( $this->options['user_lvl'] ) ) {\r\n\t\t\t\tif(isset($_POST['lynkvp_upload']) && $this->_valInput()) {\r\n\t\t\t\t\t// defaults\r\n\t\t\t\t\t$vid_url = '';\r\n\t\t\t\t\t$vid_file = '';\r\n\t\t\t\t\t$vid_id = time(); // use timestamp for unique id\r\n\t\t\t\t\t$vid_image_file = '';\r\n\t\t\t\t\t$vid_image_url = '';\r\n\r\n\t\t\t\t\t// Save file\r\n\t\t\t\t\tif(is_uploaded_file($_FILES['lynkvp_file']['tmp_name'])) {\r\n\t\t\t\t\t\t$vid_file = $vid_id.'.'.$_POST['lynkvp_type']; // filename+extension\r\n\t\t\t\t\t\tif(!move_uploaded_file($_FILES['lynkvp_file']['tmp_name'], $this->data_dir . $vid_file))\r\n\t\t\t\t\t\t\t$this->note .= __(\"The file couldn't be saved on your server\", $this->textdomain_name);\r\n\t\t\t\t\t} elseif(!empty($_POST['lynkvp_url'])) {\r\n\t\t\t\t\t\t$vid_url = ltrim($_POST['lynkvp_url'],'http://');\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Save Thumbnail file\r\n\t\t\t\t\tif(is_uploaded_file($_FILES['lynkvp_image_file']['tmp_name'])) {\r\n\t\t\t\t\t\t$vid_image_file = $vid_id.'.thum.'.preg_replace('/^.*\\.(gif|jpe?g|png|bmp)$/i', '$1', $_FILES['lynkvp_image_file']['name']); // filename+extension\r\n\t\t\t\t\t\tif(file_exists($this->data_dir . $vid_image_file)) @unlink($this->data_dir . $vid_image_file);\r\n\t\t\t\t\t\tif(move_uploaded_file($_FILES['lynkvp_image_file']['tmp_name'], $this->data_dir . $vid_image_file)) {\r\n\t\t\t\t\t\t\t$vid_image_url = ltrim($this->data_url . $vid_image_file, 'http://');\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$this->note .= __(\"The file couldn't be saved on your server\", $this->textdomain_name);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t} elseif(!empty($_POST['lynkvp_image_url'])) {\r\n\t\t\t\t\t\t$vid_image_url = ltrim($_POST['lynkvp_image_url'],'http://');\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Open file and fill array with unserialized data\r\n\t\t\t\t\tif (!is_array($this->vids))\r\n\t\t\t\t\t\t$this->vids = $this->_loadDataText();\r\n\r\n\t\t\t\t\t// Add data to array\r\n\t\t\t\t\t$this->vids[$vid_id]['lynkvp_id'] = $vid_id;\r\n\t\t\t\t\t$this->vids[$vid_id]['lynkvp_filename'] = $vid_file;\r\n\t\t\t\t\t$this->vids[$vid_id]['lynkvp_url'] = $vid_url;\r\n\t\t\t\t\t$this->vids[$vid_id]['lynkvp_type'] = $_POST['lynkvp_type'];\r\n\t\t\t\t\t$this->vids[$vid_id]['lynkvp_size'] = $_POST['lynkvp_size'];\r\n\t\t\t\t\tif (isset($this->videosizes[$_POST['lynkvp_size']])) {\r\n\t\t\t\t\t\t$this->vids[$vid_id]['lynkvp_width'] = $this->videosizes[$_POST['lynkvp_size']]['width'];\r\n\t\t\t\t\t\t$this->vids[$vid_id]['lynkvp_height'] = $this->videosizes[$_POST['lynkvp_size']]['height'];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$this->vids[$vid_id]['lynkvp_width'] = $_POST['lynkvp_width'];\r\n\t\t\t\t\t\t$this->vids[$vid_id]['lynkvp_height'] = $_POST['lynkvp_height'];\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$this->vids[$vid_id]['lynkvp_name'] = $_POST['lynkvp_name'];\r\n\t\t\t\t\t$this->vids[$vid_id]['lynkvp_caption'] = $_POST['lynkvp_caption'];\r\n\t\t\t\t\t$this->vids[$vid_id]['lynkvp_image'] = $vid_image_url;\r\n\t\t\t\t\t$this->vids[$vid_id]['lynkvp_image_filename'] = $vid_image_file;\r\n\r\n\t\t\t\t\t// Save ser. array\r\n\t\t\t\t\t$this->_saveDataText($this->vids);\r\n\r\n\t\t\t\t\t$this->note .= __('<strong>Done!</strong>', $this->textdomain_name);\r\n\t\t\t\t\tunset($_POST);\r\n\r\n\t\t\t\t} elseif(isset($_POST['lynkvp_edit2']) && $this->_valInput2()) {\r\n\t\t\t\t\t// Open file and fill array with unserialized data\r\n\t\t\t\t\tif (!is_array($this->vids)) {$this->vids = $this->_loadDataText();}\r\n\t\t\t\t\t$vid_id = $_POST['lynkvp_editid'];\r\n\t\t\t\t\t$vid_image_file = '';\r\n\t\t\t\t\t$vid_image_url = '';\r\n\r\n\t\t\t\t\t// Save Thumbnail file\r\n\t\t\t\t\tif(is_uploaded_file($_FILES['lynkvp_image_file']['tmp_name'])) {\r\n\t\t\t\t\t\t$vid_image_file = $vid_id.'.thum.'.preg_replace('/^.*\\.(gif|jpe?g|png|bmp)$/i', '$1', $_FILES['lynkvp_image_file']['name']); // filename+extension\r\n\t\t\t\t\t\tif(file_exists($this->data_dir . $vid_image_file)) @unlink($this->data_dir . $vid_image_file);\r\n\t\t\t\t\t\tif(move_uploaded_file($_FILES['lynkvp_image_file']['tmp_name'], $this->data_dir . $vid_image_file))\r\n\t\t\t\t\t\t\t$vid_image_url = ltrim($this->data_url . $vid_image_file, 'http://');\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t$this->note .= __(\"The file couldn't be saved on your server\", $this->textdomain_name);\r\n\r\n\t\t\t\t\t} elseif(!empty($_POST['lynkvp_image_url'])) {\r\n\t\t\t\t\t\t$vid_image_url = ltrim($_POST['lynkvp_image_url'],'http://');\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$vid_image_url = $this->vids[$vid_id]['lynkvp_image'];\r\n\t\t\t\t\t\t$vid_image_file = $this->vids[$vid_id]['lynkvp_image_filename'];\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// Add data to array\r\n\t\t\t\t\t$this->vids[$vid_id]['lynkvp_id'] = $vid_id;\r\n\t\t\t\t\t$this->vids[$vid_id]['lynkvp_filename'] = $_POST['lynkvp_filename'];\r\n\t\t\t\t\t$this->vids[$vid_id]['lynkvp_url'] = $_POST['lynkvp_url'];\r\n\t\t\t\t\t$this->vids[$vid_id]['lynkvp_type'] = $_POST['lynkvp_type'];\r\n\t\t\t\t\t$this->vids[$vid_id]['lynkvp_size'] = $_POST['lynkvp_size'];\r\n\t\t\t\t\tif (isset($this->videosizes[$_POST['lynkvp_size']])) {\r\n\t\t\t\t\t\t$this->vids[$vid_id]['lynkvp_width'] = $this->videosizes[$_POST['lynkvp_size']]['width'];\r\n\t\t\t\t\t\t$this->vids[$vid_id]['lynkvp_height'] = $this->videosizes[$_POST['lynkvp_size']]['height'];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$this->vids[$vid_id]['lynkvp_width'] = $_POST['lynkvp_width'];\r\n\t\t\t\t\t\t$this->vids[$vid_id]['lynkvp_height'] = $_POST['lynkvp_height'];\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$this->vids[$vid_id]['lynkvp_name'] = $_POST['lynkvp_name'];\r\n\t\t\t\t\t$this->vids[$vid_id]['lynkvp_caption'] = $_POST['lynkvp_caption'];\r\n\t\t\t\t\t$this->vids[$vid_id]['lynkvp_image'] = $vid_image_url;\r\n\t\t\t\t\t$this->vids[$vid_id]['lynkvp_image_filename'] = $vid_image_file;\r\n\r\n\t\t\t\t\t// Save ser. array\r\n\t\t\t\t\t$this->_saveDataText($this->vids);\r\n\r\n\t\t\t\t\t$this->note .= __('<strong>Done!</strong>', $this->textdomain_name);\r\n\t\t\t\t\tunset($_POST);\r\n\r\n\t\t\t\t} elseif(isset($_POST['lynkvp_del'])) {\r\n\t\t\t\t\t// Open file and fill array with unserialized data\r\n\t\t\t\t\tif (!is_array($this->vids))\r\n\t\t\t\t\t\t$this->vids = $this->_loadDataText();\r\n\t\t\t\t\t$a_id = array_flip($_POST['lynkvp_del']);\r\n\r\n\t\t\t\t\t// Remove Video\r\n\t\t\t\t\tif(file_exists($this->data_dir . $this->vids[$a_id[__('delete', $this->textdomain_name)]]['lynkvp_filename']))\r\n\t\t\t\t\t\t@unlink($this->data_dir . $this->vids[$a_id[__('delete', $this->textdomain_name)]]['lynkvp_filename']);\r\n\t\t\t\t\tif(file_exists($this->data_dir . $this->vids[$a_id[__('delete', $this->textdomain_name)]]['lynkvp_image_filename']))\r\n\t\t\t\t\t\t@unlink($this->data_dir . $this->vids[$a_id[__('delete', $this->textdomain_name)]]['lynkvp_image_filename']);\r\n\r\n\t\t\t\t\tforeach($this->vids as $key=>$value) {\r\n\t\t\t\t\t\tif($key != $a_id[__('delete', $this->textdomain_name)])\r\n\t\t\t\t\t\t\t$a_vids2[$key] = $value;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$this->vids = $a_vids2;\r\n\t\t\t\t\tunset($a_vids2);\r\n\r\n\t\t\t\t\t// Save ser. images\r\n\t\t\t\t\t$this->_saveDataText($this->vids);\r\n\r\n\t\t\t\t\t$this->note .= __('<strong>Done!</strong>', $this->textdomain_name);\r\n\t\t\t\t\tunset($_POST);\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// IF edit\r\n\t\t\tif ( current_user_can( $this->options['user_lvl'] ) ) {\r\n\t\t\t\tif ( isset($_POST['lynkvp_edit']) ) {\r\n\t\t\t\t\t// Video ID\r\n\t\t\t\t\t$a_id = array_flip($_POST['lynkvp_edit']);\r\n\r\n\t\t\t\t\t// Open file and fill array with unserialized data\r\n\t\t\t\t\tif (!is_array($this->vids))\r\n\t\t\t\t\t\t$this->vids = $this->_loadDataText();\r\n\r\n\t\t\t\t\t// Populate POST & strip slashes array\r\n\t\t\t\t\t$_POST = $this->stripArray($this->vids[$a_id[__('edit', $this->textdomain_name)]]);\r\n\r\n\t\t\t\t\t$out .= \"<div class=\\\"wrap\\\" style=\\\"text-align:left;\\\">\\n\";\r\n\t\t\t\t\t$out .= \"<h2>\".__('Video Edit', $this->textdomain_name).\"</h2>\\n\";\r\n\r\n\t\t\t\t\t$out .= \"<form method=\\\"post\\\" action=\\\"\".$this->admin_manage.\"\\\" enctype=\\\"multipart/form-data\\\">\\n\";\r\n\t\t\t\t\t$out .= \"<input type=\\\"hidden\\\" name=\\\"lynkvp_type\\\" value=\\\"\".$_POST['lynkvp_type'].\"\\\" />\\n\";\r\n\r\n\t\t\t\t\t$out .= \"<table border=\\\"0\\\" cellpadding=\\\"2\\\" cellspacing=\\\"0\\\">\\n\";\r\n\r\n\t\t\t\t\t$out .= \"<tr>\\n\";\r\n\t\t\t\t\t$out .= \"<td>\".__('Name','videopop_plus').\":</td>\\n\";\r\n\t\t\t\t\t$out .= \"<td><input type=\\\"text\\\" name=\\\"lynkvp_name\\\" value=\\\"\".$_POST['lynkvp_name'].\"\\\" /></td>\\n\";\r\n\t\t\t\t\t$out .= \"</tr>\\n\";\r\n\r\n\t\t\t\t\t$out .= \"<tr>\\n\";\r\n\t\t\t\t\t$out .= \"<td>\".__('Caption','videopop_plus').\":</td>\\n\";\r\n\t\t\t\t\t$out .= \"<td><input type=\\\"text\\\" name=\\\"lynkvp_caption\\\" value=\\\"\".$_POST['lynkvp_caption'].\"\\\" /></td>\\n\";\r\n\t\t\t\t\t$out .= \"</tr>\\n\";\r\n\r\n\t\t\t\t\tif(!empty($_POST['lynkvp_url'])) {\r\n\t\t\t\t\t\t$out .= \"<tr>\\n\";\r\n\t\t\t\t\t\t$out .= \"<td>\".__('URL', $this->textdomain_name).\":</td>\\n\";\r\n\t\t\t\t\t\t$out .= \"<td>http://<input type=\\\"text\\\" name=\\\"lynkvp_url\\\" value=\\\"\".$_POST['lynkvp_url'].\"\\\" style=\\\"width:400px;\\\" /></td>\\n\";\r\n\t\t\t\t\t\t$out .= \"</tr>\\n\";\r\n\r\n\t\t\t\t\t\t$out .= $this->_getTypeSelect().\"\\n\";\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$out .= \"<tr>\\n\";\r\n\t\t\t\t\t\t$out .= \"<td>\".__('Video type', $this->textdomain_name).\":</td>\\n\";\r\n\t\t\t\t\t\t$out .= \"<td>\".$_POST['lynkvp_type'].\"</td>\\n\";\r\n\t\t\t\t\t\t$out .= \"</tr>\\n\";\r\n\r\n\t\t\t\t\t\t$out .= \"<tr>\\n\";\r\n\t\t\t\t\t\t$out .= \"<td><span style=\\\"display:\".($_POST['lynkvp_type']!='flv'?'none':'block').\"\\\">\";\r\n\t\t\t\t\t\t$out .= __('Thumbnail', $this->textdomain_name).\":\";\r\n\t\t\t\t\t\t$out .= \"</span></td>\\n\";\r\n\t\t\t\t\t\t$out .= \"<td><span style=\\\"display:\".($_POST['lynkvp_type']!='flv'?'none':'block').\"\\\">\";\r\n\t\t\t\t\t\t$out .= \"<input type=\\\"file\\\" name=\\\"lynkvp_image_file\\\" />&nbsp;&nbsp;&nbsp;\\n\";\r\n\t\t\t\t\t\t$out .= __('<strong>or</strong>', $this->textdomain_name).' &nbsp;&nbsp;';\r\n\t\t\t\t\t\t$out .= __('URL', $this->textdomain_name).\":&nbsp;&nbsp;\";\r\n\t\t\t\t\t\t$out .= \"http:// <input type=\\\"text\\\" name=\\\"lynkvp_image_url\\\" style=\\\"width:400px;\\\" value=\\\"\".$_POST['lynkvp_image'].\"\\\" />\";\r\n\t\t\t\t\t\t$out .= \"</span></td>\\n\";\r\n\t\t\t\t\t\t$out .= \"</tr>\\n\";\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$out .= \"<tr>\\n\";\r\n\t\t\t\t\t$out .= \"<td>\".__('Size', $this->textdomain_name).\":</td>\\n\";\r\n\t\t\t\t\t$out .= \"<td>\\n\";\r\n\t\t\t\t\t$out .= \"<select name=\\\"lynkvp_size\\\" onchange=\\\"javascript:\";\r\n\t\t\t\t\t$out .= \"document.getElementById('input_size').style.display=(this.value==999?'inline':'none');\";\r\n\t\t\t\t\t$out .= \"\\\">\";\r\n\t\t\t\t\t$out .= \"<option value=\\\"0\\\"\".$this->_setOptionSelected($_POST['lynkvp_size'],'0').\">\".__('Select size', $this->textdomain_name).\"</option>\\n\";\r\n\t\t\t\t\t$out .= \"<!-- Video sizes, one each line -->\\n\";\r\n\t\t\t\t\tforeach($this->videosizes as $key=>$value) {\r\n\t\t\t\t\t\t$out .= \"<option value=\\\"\".$key.\"\\\"\".$this->_setOptionSelected($_POST['lynkvp_size'],$key).\">\".$value['width'].\" x \".$value['height'].$value['note'].\"</option>\\n\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$out .= \"<option value=\\\"999\\\"\".$this->_setOptionSelected($_POST['lynkvp_size'], '999').\">\".__('Free Size', $this->textdomain_name).\"</option>\\n\";\r\n\t\t\t\t\t$out .= \"</select>&nbsp;&nbsp;&nbsp;\\n\";\r\n\t\t\t\t\t$out .= \"<span id=\\\"input_size\\\" style=\\\"display:\".($_POST['lynkvp_size']!=999?'none':'inline').\"\\\">\\n\";\r\n\t\t\t\t\t$out .= __('Width').\": <input type=\\\"text\\\" name=\\\"lynkvp_width\\\" value=\\\"\".$_POST['lynkvp_width'].\"\\\" />\\n\";\r\n\t\t\t\t\t$out .= \"&nbsp;x&nbsp;\";\r\n\t\t\t\t\t$out .= __('Height').\": <input type=\\\"text\\\" name=\\\"lynkvp_height\\\" value=\\\"\".$_POST['lynkvp_height'].\"\\\" />\\n\";\r\n\t\t\t\t\t$out .= \"</span>\\n\";\r\n\t\t\t\t\t$out .= \"</td>\\n\";\r\n\t\t\t\t\t$out .= \"</tr>\\n\";\r\n\r\n\t\t\t\t\t$out .= \"</table>\\n\";\r\n\r\n\t\t\t\t\t$out .= \"<br />\\n\";\r\n\t\t\t\t\t$out .= \"<input type=\\\"hidden\\\" name=\\\"lynkvp_editid\\\" value=\\\"\".$_POST['lynkvp_id'].\"\\\" />\\n\";\r\n\t\t\t\t\t$out .= \"<input type=\\\"hidden\\\" name=\\\"lynkvp_filename\\\" value=\\\"\".$_POST['lynkvp_filename'].\"\\\" />\\n\";\r\n\t\t\t\t\t$out .= \"<input type=\\\"submit\\\" name=\\\"lynkvp_edit2\\\" class=\\\"button\\\" value=\\\"\".__('Upload', $this->textdomain_name).\"\\\" />\\n\";\r\n\t\t\t\t\t$out .= \"</form>\\n\";\r\n\t\t\t\t\t$out .= \"</div>\\n\";\r\n\r\n\t\t\t\t\tunset($_POST);\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// strip slashes array\r\n\t\t\t\t\t$_POST = $this->stripArray($_POST);\r\n\r\n\t\t\t\t\t// BLOCK Upload\r\n\t\t\t\t\t$out .= \"<div class=\\\"wrap\\\" style=\\\"text-align:left;\\\">\\n\";\r\n\t\t\t\t\t$out .= \"<h2>\".__('Video Upload', $this->textdomain_name).\"</h2>\\n\";\r\n\r\n\t\t\t\t\t$out .= \"<form method=\\\"post\\\" action=\\\"\".$this->admin_manage.\"\\\" enctype=\\\"multipart/form-data\\\">\\n\";\r\n\r\n\t\t\t\t\t$out .= \"<table border=\\\"0\\\" cellpadding=\\\"2\\\" cellspacing=\\\"0\\\">\\n\";\r\n\r\n\t\t\t\t\t$out .= \"<tr>\\n\";\r\n\t\t\t\t\t$out .= \"<td>\".__('Name', $this->textdomain_name).\":</td>\\n\";\r\n\t\t\t\t\t$out .= \"<td><input type=\\\"text\\\" name=\\\"lynkvp_name\\\" value=\\\"\".$_POST['lynkvp_name'].\"\\\" /></td>\\n\";\r\n\t\t\t\t\t$out .= \"</tr>\\n\";\r\n\r\n\t\t\t\t\t$out .= \"<tr>\\n\";\r\n\t\t\t\t\t$out .= \"<td>\".__('Caption', $this->textdomain_name).\":</td>\\n\";\r\n\t\t\t\t\t$out .= \"<td><input type=\\\"text\\\" name=\\\"lynkvp_caption\\\" value=\\\"\".$_POST['lynkvp_caption'].\"\\\" /></td>\\n\";\r\n\t\t\t\t\t$out .= \"</tr>\\n\";\r\n\r\n\t\t\t\t\t$out .= \"<tr>\\n\";\r\n\t\t\t\t\t$out .= \"<td>\".__('Choose video', $this->textdomain_name).\":</td>\\n\";\r\n\t\t\t\t\t$out .= \"<td>\";\r\n\t\t\t\t\t$out .= \"<input type=\\\"file\\\" name=\\\"lynkvp_file\\\" />&nbsp;&nbsp;&nbsp;\\n\";\r\n\t\t\t\t\t$out .= __('<strong>or</strong>', $this->textdomain_name).\" &nbsp;&nbsp;\";\r\n\t\t\t\t\t$out .= __('URL', $this->textdomain_name).\":&nbsp;&nbsp;http://<input type=\\\"text\\\" name=\\\"lynkvp_url\\\" style=\\\"width:400px;\\\" value=\\\"\".$_POST['lynkvp_url'].\"\\\" />\";\r\n\t\t\t\t\t$out .= \"</td>\\n\";\r\n\t\t\t\t\t$out .= \"</tr>\\n\";\r\n\r\n\t\t\t\t\t$out .= $this->_getTypeSelect().\"\\n\";\r\n\r\n\t\t\t\t\t$out .= \"<tr>\\n\";\r\n\t\t\t\t\t$out .= \"<td>\".__('Size', $this->textdomain_name).\":</td>\\n\";\r\n\t\t\t\t\t$out .= \"<td>\\n\";\r\n\t\t\t\t\t$out .= \"<select name=\\\"lynkvp_size\\\" onchange=\\\"javascript:\";\r\n\t\t\t\t\t$out .= \"document.getElementById('input_size').style.display=(this.value==999?'inline':'none');\";\r\n\t\t\t\t\t$out .= \"\\\">\";\r\n\t\t\t\t\t$out .= \"<option value=\\\"0\\\"\".$this->_setOptionSelected($_POST['lynkvp_size'],'0').\">\".__('Select size', $this->textdomain_name).\"</option>\\n\";\r\n\t\t\t\t\t$out .= \"<!-- Video sizes, one each line -->\\n\";\r\n\t\t\t\t\tforeach($this->videosizes as $key=>$value) {\r\n\t\t\t\t\t\t$out .= \"<option value=\\\"\".$key.\"\\\"\".$this->_setOptionSelected($_POST['lynkvp_size'],$key).\">\".$value['width'].\" x \".$value['height'].$value['note'].\"</option>\\n\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$out .= \"<option value=\\\"999\\\"\".$this->_setOptionSelected($_POST['lynkvp_size'], \"999\").\">\".__('Free Size', $this->textdomain_name).\"</option>\\n\";\r\n\t\t\t\t\t$out .= \"</select>&nbsp;&nbsp;&nbsp;\\n\";\r\n\t\t\t\t\t$out .= \"<span id=\\\"input_size\\\" style=\\\"display:\".(!isset($this->videosizes[$_POST['lynkvp_size']]) ? 'none' : 'inline').\"\\\">\\n\";\r\n\t\t\t\t\t$out .= __('Width').\": <input type=\\\"text\\\" name=\\\"lynkvp_width\\\" value=\\\"\".$_POST['lynkvp_width'].\"\\\" />\\n\";\r\n\t\t\t\t\t$out .= \"&nbsp;x&nbsp;\";\r\n\t\t\t\t\t$out .= __('Height').\": <input type=\\\"text\\\" name=\\\"lynkvp_height\\\" value=\\\"\".$_POST['lynkvp_height'].\"\\\" />\\n\";\r\n\t\t\t\t\t$out .= \"</span>\\n\";\r\n\t\t\t\t\t$out .= \"</td>\\n\";\r\n\t\t\t\t\t$out .= \"</tr>\\n\";\r\n\r\n\t\t\t\t\t$out .= \"</table>\\n\";\r\n\r\n\t\t\t\t\t$out .= \"<br />\\n\";\r\n\t\t\t\t\t$out .= \"<input type=\\\"submit\\\" name=\\\"lynkvp_upload\\\" class=\\\"button\\\" value=\\\"\".__('Upload', $this->textdomain_name).\"\\\" />\\n\";\r\n\t\t\t\t\t$out .= \"</form>\\n\";\r\n\t\t\t\t\t$out .= \"</div>\\n\";\r\n\t\t\t\t\tunset($_POST);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// ---------\r\n\t\t\t// ALWAYS DISPLAYED\r\n\r\n\t\t\t// BLOCK Your Videos\r\n\t\t\t$out .= \"<div class=\\\"wrap\\\" style=\\\"text-align:left;padding-bottom:3em;margin-top:2em;\\\">\\n\";\r\n\t\t\t$out .= \"<h2>\".__('My Videos', $this->textdomain_name).\"</h2>\\n\";\r\n\r\n\t\t\t// Open file and fill array with unserialized data\r\n\t\t\tif (!is_array($this->vids)) {$this->vids = $this->_loadDataText();}\r\n\r\n\t\t\t// If any vids uploaded\r\n\t\t\tif(is_array($this->vids)) {\r\n\t\t\t\t// add JS to manage page;\r\n\t\t\t\t$this->_adminHead();\r\n\t\t\t\t$out .= $this->_videoLists('1', $this->vids, 0, $this->options['manage_list_max']);\r\n\t\t\t}\r\n\r\n\t\t\t$out .= \"</div>\\n\";\r\n\t\t}\r\n\r\n\t\t// Output\r\n\t\techo (!empty($this->note) ? \"<div id=\\\"message\\\" class=\\\"updated fade\\\"><p>{$this->note}</p></div>\\n\" : '' ).\"\\n\";\r\n\t\techo ($this->error > 0 ? '' : $out).\"\\n\";\r\n\t}", "function getFileList() {\n\tglobal $apiBaseURL; // bad practice in production - fine for this example\n\n\t// use the getURL function to call the URL\n\t$response = getURL($apiBaseURL);\n\t// it returned as JSON so lets decode it\n\t$response = json_decode($response);\n\n\t// return the response\n\treturn($response);\n}", "public function _TestMultipleFiles()\n {\n\n }", "public function getFiles(): array;", "public function testWebinarPanelists()\n {\n }", "private function testFiles(array &$list, array &$callback) { \n foreach ($list as $file) {\n $test = call_user_func(array(\"self\", $callback), $file);\n if ($test != FALSE) {\n $keep_list[] = $file;\n }\n }\n return $keep_list;\n }", "public function getEmbeddedFiles() {}", "function get_list_of_published_files() {\n $result = $this->pdo->query('SELECT * FROM files WHERE publishedfile = 1 ORDER BY date DESC');\n return $result;\n }", "public function listFiles($dir);", "protected function _FILES()\n\t{\n\t\t\n\t}", "function _generateFilesList() {\n return array();\n }", "public function getRemoteExtListFile() {}", "function get_video_files($vdetails,$return_default=true,$with_path=true,$multi=false,$count_only=false,$hq=false){\r\n\r\n global $Cbucket;\r\n # checking if there is any other functions\r\n # available\r\n define('VIDEO_VERSION',$vdetails['video_version']);\r\n\r\n if(is_array($Cbucket->custom_video_file_funcs))\r\n foreach($Cbucket->custom_video_file_funcs as $func)\r\n if(function_exists($func))\r\n {\r\n $func_returned = $func($vdetails, $hq);\r\n if($func_returned)\r\n return $func_returned;\r\n }\r\n \r\n \r\n $fileDirectory = \"\";\r\n if(isset($vdetails['file_directory']) && !empty($vdetails['file_directory'])){\r\n $fileDirectory = \"{$vdetails['file_directory']}/\";\r\n }\r\n //dump($vdetails['file_name']);\r\n\r\n \r\n \r\n #Now there is no function so lets continue as\r\n\r\n if(isset($vdetails['file_name'])){\r\n if(VIDEO_VERSION == '2.7'){\r\n $vid_files = glob(VIDEOS_DIR.\"/\".$fileDirectory . $vdetails['file_name'].\"*\");\r\n }\r\n else{\r\n $vid_files = glob(VIDEOS_DIR.\"/\".$vdetails['file_name'].\"*\"); \r\n }\r\n }\r\n // if($hq){\r\n // var_dump(glob(VIDEOS_DIR.\"/\".$fileDirectory . $vdetails['file_name'].\"*\"));\r\n // }\r\n\r\n #replace Dir with URL\r\n if(is_array($vid_files))\r\n foreach($vid_files as $file)\r\n {\r\n // if($hq){\r\n // echo \"filesize = \" . filesize($file); \r\n // }\r\n if(filesize($file) < 100) continue;\r\n $files_part = explode('/',$file);\r\n $video_file = $files_part[count($files_part)-1];\r\n\r\n if($with_path){\r\n if(VIDEO_VERSION == '2.7')\r\n $files[] = VIDEOS_URL.'/' . $fileDirectory. $video_file ;\r\n else if(VIDEO_VERSION == '2.6')\r\n $files[] = VIDEOS_URL.'/' . $video_file ;\r\n }\r\n else\r\n $files[] = $video_file;\r\n }\r\n\r\n if(count($files)==0 && !$multi && !$count_only)\r\n {\r\n if($return_default)\r\n {\r\n\r\n if($with_path)\r\n return VIDEOS_URL.'/no_video.mp4';\r\n else\r\n return 'no_video.mp4';\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n }\r\n else\r\n {\r\n return $files;\r\n }\r\n\r\n\r\n}", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/purrrr.php',\n 'data_custom/images/lolcats/index.html',\n 'data_custom/images/lolcats/thumbs/index.html',\n 'data_custom/images/lolcats/funny-pictures-basement-cat-has-pink-sheets.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-ai-calld-jenny-craig.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-asks-you-for-a-favor.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-asks-you-to-pay-fine.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-can-poop-rainbows.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-comes-to-save-day.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-decides-what-to-do.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-does-math.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-does-not-see-your-point.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-eyes-steak.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-has-a-beatle.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-has-a-close-encounter.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-has-had-fun.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-has-trophy-wife.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-hates-your-tablecloth.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-a-doctor.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-a-hoarder.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-a-people-lady.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-on-steroids.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-stuck-in-drawer.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-is-very-comfortable.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-kermit-was-about.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-looks-like-a-vase.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-looks-like-boots.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-ok-captain-obvious.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-pounces-on-deer.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-sits-in-box.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-sits-on-your-laptop.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-special-delivery.jpg',\n 'data_custom/images/lolcats/funny-pictures-cat-winks-at-you.jpg',\n 'data_custom/images/lolcats/funny-pictures-cats-are-in-a-musical.jpg',\n 'data_custom/images/lolcats/funny-pictures-cats-have-war.jpg',\n 'data_custom/images/lolcats/funny-pictures-fish-and-cat-judge-your-outfit.jpg',\n 'data_custom/images/lolcats/funny-pictures-kitten-drops-a-nickel-under-couch.jpg',\n 'data_custom/images/lolcats/funny-pictures-kitten-ends-meeting2.jpg',\n 'data_custom/images/lolcats/funny-pictures-kitten-fixes-puppy.jpg',\n 'data_custom/images/lolcats/funny-pictures-kitten-tries-to-stay-neutral.jpg',\n 'data_custom/images/lolcats/funny-pictures-kittens-dispose-of-boyfriend.jpg',\n 'data_custom/images/lolcats/funny-pictures-kittens-yell-at-eachother.jpg',\n 'data_custom/images/lolcats/ridiculous_poses_moddles.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-basement-cat-has-pink-sheets.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-ai-calld-jenny-craig.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-asks-you-for-a-favor.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-asks-you-to-pay-fine.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-can-poop-rainbows.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-comes-to-save-day.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-decides-what-to-do.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-does-math.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-does-not-see-your-point.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-eyes-steak.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-has-a-beatle.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-has-a-close-encounter.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-has-had-fun.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-has-trophy-wife.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-hates-your-tablecloth.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-a-doctor.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-a-hoarder.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-a-people-lady.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-on-steroids.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-stuck-in-drawer.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-is-very-comfortable.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-kermit-was-about.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-looks-like-a-vase.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-looks-like-boots.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-ok-captain-obvious.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-pounces-on-deer.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-sits-in-box.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-sits-on-your-laptop.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-special-delivery.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cat-winks-at-you.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cats-are-in-a-musical.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-cats-have-war.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-fish-and-cat-judge-your-outfit.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kitten-drops-a-nickel-under-couch.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kitten-ends-meeting2.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kitten-fixes-puppy.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kitten-tries-to-stay-neutral.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kittens-dispose-of-boyfriend.jpg',\n 'data_custom/images/lolcats/thumbs/funny-pictures-kittens-yell-at-eachother.jpg',\n 'data_custom/images/lolcats/thumbs/ridiculous_poses_moddles.jpg',\n );\n }", "public abstract function getStagedFiles();", "public function testMediaFilesSearchGet()\n {\n $client = static::createClient();\n\n $path = '/media/files/search';\n\n $crawler = $client->request('GET', $path);\n }", "public function getAllFiles()\n {\n }", "abstract protected function getFilesDestination();", "public function loadFilesProduction()\r\n {\r\n $id = Input::get('ID');\r\n $project = Project::find($id);\r\n $files=[];\r\n if($project!=null)\r\n {\r\n $internalFiles = $project->filesByType(array('vendor','university','designer','writer','attorney','2d'));\r\n foreach($internalFiles as $file)\r\n {\r\n $files[]=['id'=>$file->id,'name'=>$file->fileName,'url'=>$file->url,'date'=>$file->created_at];\r\n }\r\n }\r\n return json_encode($files);\r\n }", "function _load_files(&$app, &$c) {\n\t\t$files = $c->param('app.view_http.request.files');\n\t\tif (is_array($files)) {\n\t\t\tforeach($files as $k => $file) {\n\t\t\t\tif (is_array($file['size'])) {\n\t\t\t\t\tfor($i=0;$i<count($file['size']);$i++) {\n\t\t\t\t\t\tif (($file['size'][$i] > 0) && (!empty($file['tmp_name'][$i])))\n\t\t\t\t\t\t\t$this->_http->addFile($file['name'][$i], $file['tmp_name'][$i], $file['type'][$i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tif (($file['size'] > 0) && (!empty($file['tmp_name'])))\n\t\t\t\t\t\t$this->_http->addFile($file['name'], $file['tmp_name'], $file['type']);\n\t\t\t}\n\t\t}\n\t}", "public function getFiles()\n {\n return isset($this->source['files']) && is_array($this->source['files']) ? $this->source['files'] : [];\n }", "public function loadFilesLaunch()\r\n {\r\n $id = Input::get('ID');\r\n $project = Project::find($id);\r\n $files=[];\r\n if($project!=null)\r\n {\r\n $internalAndPublicFiles = $project->filesByType(array('public','clientVendor'));\r\n foreach($internalAndPublicFiles as $file)\r\n {\r\n $files[]=['id'=>$file->id,'name'=>$file->fileName,'url'=>$file->url,'projectId'=>$id];\r\n }\r\n }\r\n return json_encode($files);\r\n }", "public function getLocalExtListFile() {}", "function list_files () {\n\t\t$root = $this->get_root();\n\t\t\n\t\treturn $this->_list_files($root);\n\t}", "public function getUploads($maxResults);", "public function loadFilesAttCS()\r\n {\r\n $id = Input::get('ID');\r\n $project = Project::find($id);\r\n $files=[];\r\n if($project!=null)\r\n {\r\n $internalFiles = $project->filesByType(array('attorney'));\r\n foreach($internalFiles as $file)\r\n {\r\n $created = date('m-d-Y',strtotime(str_replace('-','/',$file->created_at)));\r\n $files[]=['id'=>$file->id,'name'=>$file->fileName,'url'=>$file->url,'created'=>$created];\r\n }\r\n }\r\n return json_encode($files);\r\n }", "public function collectInfoFiles()\r\n {\r\n $files_found = $this->findFiles($this->destination_dir, array('md', '1st', 'txt'));\r\n\r\n if($files_found)\r\n $this->file_list = array_merge($this->file_list, $files_found);\r\n }", "public function listAction() {\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n $photo_id = (int) $this->_getParam('photo_id');\n\n // CHECK AUTHENTICATION\n // CHECK AUTHENTICATION\n if (Engine_Api::_()->core()->hasSubject('sitereview_listing')) {\n $sitereview = $subject = Engine_Api::_()->core()->getSubject('sitereview_listing');\n } else if (Engine_Api::_()->core()->hasSubject('sitereview_photo')) {\n $photo = $subject = Engine_Api::_()->core()->getSubject('sitereview_photo');\n $listing_id = $photo->listing_id;\n $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n }\n $bodyResponse = $tempResponse = array();\n $listing_singular_uc = ucfirst($this->_listingType->title_singular);\n $can_edit = $sitereview->authorization()->isAllowed($viewer, \"edit_listtype_$sitereview->listingtype_id\");\n $listingtype_id = $this->_listingType->listingtype_id;\n //AUTHORIZATION CHECK\n $allowed_upload_photo = Engine_Api::_()->authorization()->isAllowed($sitereview, $viewer, \"photo_listtype_$listingtype_id\");\n if (Engine_Api::_()->sitereview()->hasPackageEnable()) {\n $photoCount = Engine_Api::_()->getItem('sitereviewpaidlisting_package', $sitereview->package_id)->photo_count;\n $paginator = $sitereview->getSingletonAlbum()->getCollectiblesPaginator();\n\n if (Engine_Api::_()->sitereviewpaidlisting()->allowPackageContent($sitereview->package_id, \"photo\")) {\n $allowed_upload_photo = $allowed_upload_photo;\n if (empty($photoCount))\n $allowed_upload_photo = $allowed_upload_photo;\n elseif ($photoCount <= $paginator->getTotalItemCount())\n $allowed_upload_photo = 0;\n } else\n $allowed_upload_photo = 0;\n } else\n $allowed_upload_photo = $allowed_upload_photo;\n\n //GET ALBUM\n $album = $sitereview->getSingletonAlbum();\n\n\n /* RETURN THE LIST OF IMAGES, IF FOLLOWED THE FOLLOWING CASES: \n * - IF THERE ARE GET METHOD AVAILABLE.\n * - iF THERE ARE NO $_FILES AVAILABLE.\n */\n if (empty($_FILES) && $this->getRequest()->isGet()) {\n $requestLimit = $this->getRequestParam(\"limit\", 10);\n $page = $requestPage = $this->getRequestParam(\"page\", 1);\n\n //GET PAGINATOR\n $album = $sitereview->getSingletonAlbum();\n $paginator = $album->getCollectiblesPaginator();\n\n $bodyResponse[' totalPhotoCount'] = $totalItemCount = $bodyResponse['totalItemCount'] = $paginator->getTotalItemCount();\n $paginator->setItemCountPerPage($requestLimit);\n $paginator->setCurrentPageNumber($requestPage);\n // Check the Page Number for pass photo_id.\n if (!empty($photo_id)) {\n for ($page = 1; $page <= ceil($totalItemCount / $requestLimit); $page++) {\n $paginator->setCurrentPageNumber($page);\n $tmpGetPhotoIds = array();\n foreach ($paginator as $photo) {\n $tmpGetPhotoIds[] = $photo->photo_id;\n }\n if (in_array($photo_id, $tmpGetPhotoIds)) {\n $bodyResponse['page'] = $page;\n break;\n }\n }\n }\n\n if ($totalItemCount > 0) {\n foreach ($paginator as $photo) {\n $tempImages = $photo->toArray();\n\n // Add images\n $getContentImages = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($photo);\n $tempImages = array_merge($tempImages, $getContentImages);\n\n $tempImages['user_title'] = $photo->getOwner()->getTitle();\n $tempImages['likes_count'] = $photo->likes()->getLikeCount();\n $tempImages['is_like'] = ($photo->likes()->isLike($viewer)) ? 1 : 0;\n \n //Sitereaction Plugin work start here\n if (Engine_Api::_()->getApi('Siteapi_Feed', 'advancedactivity')->isSitereactionPluginLive()) {\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitereaction') && Engine_Api::_()->getApi('settings', 'core')->getSetting('sitereaction.reaction.active', 1)) {\n $popularity = Engine_Api::_()->getApi('core', 'sitereaction')->getLikesReactionPopularity($photo);\n $feedReactionIcons = Engine_Api::_()->getApi('Siteapi_Core', 'sitereaction')->getLikesReactionIcons($popularity, 1);\n $tempImages['reactions']['feed_reactions'] =$tempImages['feed_reactions'] = $feedReactionIcons;\n\n if (isset($viewer_id) && !empty($viewer_id)) {\n $myReaction = $photo->likes()->getLike($viewer);\n if (isset($myReaction) && !empty($myReaction) && isset($myReaction->reaction) && !empty($myReaction->reaction)) {\n $myReactionIcon = Engine_Api::_()->getApi('Siteapi_Core', 'sitereaction')->getIcons($myReaction->reaction, 1);\n $tempImages['reactions']['my_feed_reaction'] =$tempImages['my_feed_reaction'] = $myReactionIcon;\n }\n }\n }\n }\n //Sitereaction Plugin work end here\n if (!empty($viewer) && ($tempMenu = $this->getRequestParam('menu', 1)) && !empty($tempMenu)) {\n $menu = array();\n\n if ($photo->user_id == $viewer_id) {\n $menu[] = array(\n 'label' => $this->translate('Edit'),\n 'name' => 'edit',\n 'url' => 'listings/photo/edit/' . $sitereview->getIdentity(),\n 'urlParams' => array(\n \"photo_id\" => $photo->getIdentity()\n )\n );\n\n $menu[] = array(\n 'label' => $this->translate('Delete'),\n 'name' => 'delete',\n 'url' => 'listings/photo/delete/' . $sitereview->getIdentity(),\n 'urlParams' => array(\n \"photo_id\" => $photo->getIdentity()\n )\n );\n }\n $menu[] = array(\n 'label' => $this->translate('Share'),\n 'name' => 'share',\n 'url' => 'activity/index/share',\n 'urlParams' => array(\n \"type\" => $photo->getType(),\n \"id\" => $photo->getIdentity()\n )\n );\n\n $menu[] = array(\n 'label' => $this->translate('Report'),\n 'name' => 'report',\n 'url' => 'report/create/subject/' . $photo->getGuid()\n );\n\n $menu[] = array(\n 'label' => $this->translate('Make Profile Photo'),\n 'name' => 'make_profile_photo',\n 'url' => 'members/edit/external-photo',\n 'urlParams' => array(\n \"photo\" => $photo->getGuid()\n )\n );\n\n $tempImages['menu'] = $menu;\n }\n\n if (isset($tempImages) && !empty($tempImages))\n $bodyResponse['images'][] = $tempImages;\n }\n }\n $bodyResponse['canUpload'] = $allowed_upload_photo;\n $this->respondWithSuccess($bodyResponse, true);\n } else if (isset($_FILES) && $this->getRequest()->isPost()) { // UPLOAD IMAGES TO RESPECTIVE EVENT\n if (empty($viewer_id) || empty($allowed_upload_photo))\n $this->respondWithError('unauthorized');\n $tablePhoto = Engine_Api::_()->getDbtable('photos', 'sitereview');\n $db = $tablePhoto->getAdapter();\n $db->beginTransaction();\n\n try {\n $viewer = Engine_Api::_()->user()->getViewer();\n $album = $sitereview->getSingletonAlbum();\n $rows = $tablePhoto->fetchRow($tablePhoto->select()->from($tablePhoto->info('name'), 'order')->order('order DESC')->limit(1));\n $order = 0;\n if (!empty($rows)) {\n $order = $rows->order + 1;\n }\n $params = array(\n 'collection_id' => $album->getIdentity(),\n 'album_id' => $album->getIdentity(),\n 'listing_id' => $sitereview->getIdentity(),\n 'user_id' => $viewer->getIdentity(),\n 'order' => $order\n );\n $photoCount = count($_FILES);\n if (isset($_FILES['photo']) && $photoCount == 1) {\n $photo_id = Engine_Api::_()->getApi('Siteapi_Core', 'sitereview')->createPhoto($params, $_FILES['photo'])->photo_id;\n if (!$sitereview->photo_id) {\n $sitereview->photo_id = $photo_id;\n $sitereview->save();\n }\n } else if (!empty($_FILES) && $photoCount > 1) {\n foreach ($_FILES as $photo) {\n Engine_Api::_()->getApi('Siteapi_Core', 'sitereview')->createPhoto($params, $photo);\n }\n }\n\n $db->commit();\n $this->successResponseNoContent('no_content', true);\n } catch (Exception $e) {\n $db->rollBack();\n }\n }\n }", "public function getFileNames();", "function get_github_file_list($manual_id) {\n $result = array();\n if (MANUAL_LOCAL_FILES_REQUEST) {\n $result = get_local_file_list($manual_id);\n } elseif (!MANUAL_DEBUG_NO_FILELIST_REQUEST) {\n $result = json_decode(get_content_from_github(GITHUB_FILESLIST_URL), true);\n put_cache_json('content_github.json', $result, $manual_id);\n } else {\n $result = get_cache_json('content_github.json', $manual_id);\n }\n // debug('get_github_file_list result', $result);\n return $result;\n}", "public function testGetFilesParams()\n {\n $files = $this->_req->getFilesParams();\n $picture = $files['picture'];\n $this->assertInstanceOf('Mad_Controller_FileUpload', $picture);\n\n $icon = $files['document']['icon'];\n $this->assertInstanceOf('Mad_Controller_FileUpload', $icon);\n\n $photo = $files['document']['photo'];\n $this->assertInstanceOf('Mad_Controller_FileUpload', $photo);\n }", "function get_video_file($vdetails,$return_default=true,$with_path=true,$multi=false,$count_only=false,$hq=false)\r\n{\r\n global $Cbucket;\r\n # checking if there is any other functions\r\n # available\r\n if(is_array($Cbucket->custom_video_file_funcs))\r\n foreach($Cbucket->custom_video_file_funcs as $func)\r\n if(function_exists($func))\r\n {\r\n $func_returned = $func($vdetails, $hq);\r\n if($func_returned)\r\n return $func_returned;\r\n }\r\n\r\n\r\n $fileDirectory = \"\";\r\n if(isset($vdetails['file_directory']) && !empty($vdetails['file_directory'])){\r\n $fileDirectory = \"{$vdetails['file_directory']}/\";\r\n }\r\n //dump($vdetails['file_name']);\r\n\r\n #Now there is no function so lets continue as\r\n if(isset($vdetails['file_name']))\r\n $vid_files = glob(VIDEOS_DIR.\"/\".$fileDirectory . $vdetails['file_name'].\"*\");\r\n // if($hq){\r\n // var_dump(glob(VIDEOS_DIR.\"/\".$fileDirectory . $vdetails['file_name'].\"*\"));\r\n // }\r\n\r\n #replace Dir with URL\r\n if(is_array($vid_files))\r\n foreach($vid_files as $file)\r\n {\r\n // if($hq){\r\n // echo \"filesize = \" . filesize($file); \r\n // }\r\n if(filesize($file) < 100) continue;\r\n $files_part = explode('/',$file);\r\n $video_file = $files_part[count($files_part)-1];\r\n\r\n if($with_path)\r\n $files[] = VIDEOS_URL.'/' . $fileDirectory . $video_file;\r\n else\r\n $files[] = $video_file;\r\n }\r\n\r\n\r\n if(count($files)==0 && !$multi && !$count_only)\r\n {\r\n if($return_default)\r\n {\r\n\r\n if($with_path)\r\n return VIDEOS_URL.'/no_video.flv';\r\n else\r\n return 'no_video.flv';\r\n }else{\r\n return false;\r\n }\r\n }else{\r\n if($multi)\r\n return $files;\r\n if($count_only)\r\n return count($files);\r\n\r\n\r\n foreach($files as $file)\r\n {\r\n if($hq)\r\n {\r\n if(getext($file)=='mp4')\r\n {\r\n return $file;\r\n break;\r\n }\r\n }else{\r\n return $file;\r\n break;\r\n }\r\n }\r\n return $files[0];\r\n }\r\n}", "public function files()\n\t{\n\t\treturn $this->hasMany('Src\\Core\\Entities\\File', 'pasta', 'id');\n\t}", "function list_files($file_paths, $root_path, $student_class_folder, array $code_exts, array $validation_exts) {\n // Prepare header row\n $output = \"<table>\\n<tr>\";\n $output .= \"<th>Permission</th>\";\n //$output .= \"<th>User</th>\";\n //$output .= \"<th>Group</th>\";\n $output .= \"<th>File</th>\";\n $output .= \"<th>Modify Date</th>\";\n $output .= \"<th>Size</th>\";\n $output .= \"<th>Extra</th>\";\n $output .= \"</tr>\\n\";\n\n foreach ($file_paths as $file_path) {\n $relative_path = substr($file_path, strlen($root_path) + 1);\n // $split = split(\"/\", $relative_path);\n $split = explode(\"/\", $relative_path);\n $filename = $split[count($split) - 1];\n $stat = @stat($file_path);\n\n $output .= '<tr>';\n $output .= '<td>' . perms($stat['mode']) . '</td>';\n //$output .= '<td>' . $stat['uid'] . '</td>';\n //$output .= '<td>' . $stat['gid'] . '</td>';\n // Display the correct link to our files\n if (is_dir($file_path))\n $output .= \"<td><a class=\\\"folder\\\" href=\\\"?folder=$relative_path\\\"\";\n elseif (in_array(strtolower(pathinfo($file_path, PATHINFO_EXTENSION)), $code_exts))\n $output .= \"<td><a class=\\\"code\\\" href=\\\"?file=$relative_path\\\"\";\n else\n $output .= \"<td><a class=\\\"show\\\" target=\\\"_blank\\\" href=\\\"/${student_class_folder}/${relative_path}\\\"\";\n $output .= \">\" . $relative_path . \"</a></td>\"; //. $filename \n\n // Show the date. Depending on the due date color the text\n $ctime = date('Y-m-d H:i:s', $stat['ctime']);\n $mtime = date('Y-m-d H:i:s', $stat['mtime']);\n $output .= \"<td\";\n \n $output .= \">$mtime</td>\";\n\n // Add a cell for the size. Ignore directories\n if (is_dir($file_path))\n $output .= \"<td>&nbsp</td>\";\n else\n $output .= '<td class=\"right\">' . $stat['size'] . '</td>';\n\n // Add a cell for a validation link. Only do it for files we're checking.\n if (in_array(strtolower(pathinfo($file_path, PATHINFO_EXTENSION)), $validation_exts)) {\n $server_name = filter_input(INPUT_SERVER, 'SERVER_NAME');\n $url = \"https://${server_name}/${student_class_folder}/${relative_path}\";\n $output .= \"<td><a target=\\\"_blank\\\" href=\\\"http://validator.w3.org/check?uri=$url\\\">Validate</a></td>\";\n } elseif (is_dir($file_path))\n $output .= \"<td><a class=\\\"code\\\" href=\\\"?files=${relative_path}\\\">View Code</a></td>\";\n\n //$output .= \"<td>&nbsp;</td>\";\n\n $output .= \"</tr>\\n\";\n }\n $output .= \"</table>\\n\";\n\n if (count($file_paths) == 0)\n $output .= \"<p class=\\\"error\\\">There are no files to display</p>\";\n\n return $output;\n}", "public function testAddReplenishmentFileByURL()\n {\n }", "public function testFindingFilesPrioritizesStatusCodeOverMethodTemplate()\n {\n $assembly = $this->commonFindingTemplate(array(\n 'resourceName' => $this->resourceName,\n 'options' => array('type' => 'html', 'method' => 'GET', 'status' => 200),\n 'foundFiles' => array('FooResource.200.html.php', 'FooResource.GET.html.php')\n ));\n $this->assertEquals('FooResource.200.html.php', $assembly->getFile());\n }", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/idolisr.php',\n 'sources_custom/hooks/modules/members/idolisr.php',\n 'sources_custom/miniblocks/main_stars.php',\n 'sources_custom/miniblocks/side_recent_points.php',\n 'themes/default/templates_custom/POINTS_GIVE.tpl',\n 'themes/default/templates_custom/BLOCK_MAIN_STARS.tpl',\n 'themes/default/templates_custom/BLOCK_SIDE_RECENT_POINTS.tpl',\n );\n }", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/wiki_sync.php',\n '_tests/tests/unit_tests/wiki_sync.php',\n 'lang_custom/EN/wiki_sync.ini',\n 'sources_custom/wiki_sync.php',\n 'sources_custom/hooks/systems/config/wiki_alt_changes_link_stub.php',\n 'sources_custom/hooks/systems/config/wiki_enable_git_sync.php',\n 'sources_custom/hooks/systems/config/wiki_enable_wysiwyg.php',\n 'sources_custom/hooks/systems/config/wiki_sync_media_directory.php',\n 'sources_custom/hooks/systems/config/wiki_sync_page_directory.php',\n 'sources_custom/hooks/systems/cron/wiki_sync_git.php',\n 'sources_custom/hooks/systems/notifications/wiki_failed_git_pull.php',\n 'sources_custom/wiki.php',\n 'site/pages/modules_custom/wiki.php',\n 'cms/pages/modules_custom/cms_wiki.php',\n );\n }", "public function testGetFiles() : void {\n $expected = 0;\n $this->assertEquals($expected, count($this->dataManager->getFiles([])));\n }", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/trickstr.php',\n 'sources_custom/programe/.htaccess',\n 'sources_custom/programe/aiml/.htaccess',\n 'sources_custom/programe/aiml/index.html',\n 'sources_custom/programe/index.html',\n 'sources_custom/hooks/modules/chat_bots/knowledge.txt',\n 'sources_custom/hooks/modules/chat_bots/trickstr.php',\n 'sources_custom/programe/aiml/readme.txt',\n 'sources_custom/programe/aiml/startup.xml',\n 'sources_custom/programe/aiml/std-65percent.aiml',\n 'sources_custom/programe/aiml/std-pickup.aiml',\n 'sources_custom/programe/botloaderfuncs.php',\n 'sources_custom/programe/customtags.php',\n 'sources_custom/programe/db.sql',\n 'sources_custom/programe/graphnew.php',\n 'sources_custom/programe/respond.php',\n 'sources_custom/programe/util.php',\n );\n }", "private function getUploadedFiles()\n {\n $list = array();\n \n if(isset($_REQUEST['files']))\n {\n $files = explode('::', $_REQUEST['files']);\n foreach($files as $index => $item)\n {\n list($name, $src, $size) = explode(':', $item);\n \n $list[] = array(\n 'name' => $name,\n 'src' => $src,\n 'size' => $size \n );\n }\n }\n \n return $list;\n }", "function get_list_of_new_files() {\n $result = $this->pdo->query('SELECT * FROM files WHERE newfile = 1 ORDER BY date DESC');\n return $result;\n }", "private function getDownloadableFileUrls() {\n if (!$this->wooData->getDownloadableMediaFiles()) return null;\n\n return array_map(function($mediaFile) {\n /** @var MediaFile $mediaFile */\n\n return Utils::view('site-tester.partial.attachment-item')\n ->with(['item' => $mediaFile])\n ->render();\n }, $this->wooData->getDownloadableMediaFiles());\n }", "public function testIfPdfPrinterListWillReturnData(): void\n {\n $response = new PdfPrinterMockResponse(200, [\n [\n 'file' => 'XXX.pdf',\n 'path' => 'test/XXX.pd',\n 'created_at' => '2020-06-27T22:27:09.876Z',\n 'updated_at' => '2020-06-27T22:27:09.876Z',\n ],\n ]);\n\n $pdfPrinter = $this->createApiMock([$response]);\n $result = $pdfPrinter->listFiles();\n\n $this->assertNotNull($result);\n $this->assertEquals(1, $result->count());\n }", "protected function getFilesInDirCreateTestDirectory() {}", "public function getAllowedFiles(){\n return self::$allowed_files;\n }", "public static function filelist()\n\t{\n\t\tglobal $g_relative_file_directory;\t// '../../UPLOADS/';\n\t\tglobal $g_relative_root_directory;\t// 'UPLOADS/';\n\n\t\t$actualdirectory = $_POST['actualdir'];\n\t\tif(!$actualdirectory)\n\t\t\t$actualdirectory='';\n\n\t\t$result = [];\n\t\t$result['directory'] = $g_relative_root_directory;\n\t\t$result['actualdir'] = $actualdirectory;\n\n\t\tif(strlen($actualdirectory)>0)\n\t\t\t$actualdirectory.=\"/\";\n\n\t\t$reldir = $g_relative_file_directory.$actualdirectory;\n\t\t$dirs=[];\n\t\tforeach(glob($reldir.'*', GLOB_ONLYDIR) as $d)\n\t\t{\n\t\t\t$fn=str_replace($reldir,'',$d);\n\t\t\t$dirs[] = $fn;\n\t\t}\n\t\t$result['dirs']=$dirs;\n\t\t//$result['reldir']=$reldir;\n\n\t\t$filenames = [];\n\t\tforeach(array_filter(glob($reldir.'*.*'), 'is_file') as $file)\n\t\t{\n\t\t\t$farray = [];\n\t\t\t$fn=str_replace($reldir,'',$file);\n\n\t\t\t$f=filesize($file);\n\t\t\t$fe=\"bytes\";\n\t\t\tif($f/1024 > 1)\n\t\t\t{\n\t\t\t\t$f/=1024;\n\t\t\t\t$fe=\"kb\";\n\t\t\t\tif($f/1024 > 1)\n\t\t\t\t{\n\t\t\t\t\t$f/=1024;\n\t\t\t\t\t$fe=\"Mb\";\n\t\t\t\t\tif($f/1024 > 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$f/=1024;\n\t\t\t\t\t\t$fe=\"GB\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$farray['Filename'] = $fn;\n\t\t\t$farray['Filesize'] = number_format($f,1);\n\t\t\t$farray['FilesizeDeterminant'] = $fe;\n\n\t\t\t$filenames[] = $farray;\n\t\t}\n\t\t$result['files']=$filenames;\n\n\t\theader('Content-Type: application/json');\n\t\techo(json_encode($result));\n\t}", "public function testGetPhpFiles()\n {\n // Files arrays\n $files = [];\n $phpFiles = [];\n\n // For every specified folder\n foreach ($this->phpFolders as $folder) {\n\n // Get files from directory\n $files = array_merge($files, FileHelper::directoryFiles($folder));\n }\n\n // Select php only files\n foreach ($files as $file) {\n if (substr($file, -4) === '.php') {\n $phpFiles[] = $file;\n }\n }\n\n // Check that we have at least 10 php files across all collected\n $count = count($phpFiles);\n $this->assertTrue($count > 10, json_encode([\n 'count' => $count,\n 'expected' => 'total number of php files must exceed 10 files',\n ], JSON_UNESCAPED_SLASHES));\n\n // Return end point data\n return $phpFiles;\n }", "public function fileclerk__list()\n\t{\n\t\t// Force AJAX, except in dev\n\t\tif ( ! Request::isAjax() && FILECLERK_ENV != 'dev' ) {\n\t\t\techo FILECLERK_AJAX_WARNING;\n\t\t\texit;\n\t\t}\n\n\t\t// Destination config parameter\n\t\t$destination = Request::get('destination');\n\t\t$destination = is_null($destination) ? 0 : $destination;\n\n\t\t// Merge configs before we proceed\n\t\t$this->config = $this->tasks->merge_configs( $destination );\n\n\t\t// Setup client\n\t\tself::load_s3();\n\n\t\t// Set default error to false\n\t\t$error = false;\n\n\t\t// Do some werk to setup paths\n\t\t$bucket = $this->config['bucket'];\n\t\t$directory = $this->config['directory'];\n\t\t$uri = Request::get('uri');\n\t\t$uri = explode('?', $uri);\n\t\t$uri = reset($uri);\n\t\t$s3_url = Url::tidy( 's3://' . join('/', array($bucket, $directory, $uri)) );\n\n\t\t// Let's make sure we have a valid URL before movin' on\n\t\tif ( Url::isValid( $s3_url ) ) {\n\t\t\t// Just messing around native SDK methods get objects\n\t\t\tif ( FALSE ) {\n\t\t\t\t// Trying out listIterator\n\t\t\t\t$iterator = $this->client->getIterator( 'ListObjects', array(\n\t\t\t\t\t'Bucket' => $this->config['bucket'],\n\t\t\t\t\t'Delimiter' => '/',\n\t\t\t\t\t// 'Prefix' => 'balls/',\n\t\t\t\t), array(\n\t\t\t\t\t'limit' => 1000,\n\t\t\t\t\t'return_prefixes' => true,\n\t\t\t\t));\n\n\t\t\t\t//dd($iterator);\n\n\t\t\t\techo '<pre>';\n\t\t\t\tforeach ( $iterator as $object ) {\n\t\t\t\t\t//if( ! isset($object['Prefix']) ) continue; // Skip non-directories\n\n\t\t\t\t\techo var_dump($object) . '<br>';\n\t\t\t\t\t//echo var_dump($object) . '<br>';\n\t\t\t\t}\n\t\t\t\techo '</pre>';\n\n\t\t\t\texit;\n\t\t\t}\n\n\t\t\t// Finder instance\n\t\t\t$finder = new Finder();\n\n\t\t\t// Finder call\n\t\t\ttry {\n\t\t\t\t$finder\n\t\t\t\t\t->ignoreUnreadableDirs()\n\t\t\t\t\t->ignoreDotFiles(true)\n\t\t\t\t\t->in($s3_url)\n\t\t\t\t\t->depth('== 0') // Do not allow access above the starting directory\n\t\t\t\t;\n\n\t\t\t\t$results = iterator_to_array($finder);\n\t\t\t} catch ( Exception $e ) {\n\t\t\t\t$error = $e->getMessage();\n\n\t\t\t\theader('Content-Type', 'application/json');\n\t\t\t\techo self::build_response_json(false, true, FILECLERK_S3_ERROR, $error, 'error', null, null, null);\n\t\t\t\texit;\n\t\t\t}\n\n\t\t\t// Data array for building out view\n\t\t\t$data = array(\n\t\t\t\t'crumbs' => explode('/', $uri), // Array of the currently request URI.\n\t\t\t\t'destination' => $destination, // Array of the currently request URI.\n\t\t\t\t'list' => array(), // Files and dirs mixed\n\t\t\t);\n\n\t\t\t// Prepare breadcrumbs\n\t\t\tforeach ( $data['crumbs'] as $key => $value ) {\n\t\t\t\t$path = explode('/', $uri, ($key + 1) - (count($data['crumbs'])));\n\t\t\t\t$path = implode('/', $path);\n\t\t\t\t//$path = Url::tidy( $path . '/?' . $querystring );\n\t\t\t\t$path = Url::tidy( $path );\n\t\t\t\t$data['crumbs'][$key] = array(\n\t\t\t\t\t'name' => $value,\n\t\t\t\t\t'path' => $path\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Build breadcrumb\n\t\t\t$breadcrumb = Parse::template( self::get_view('_list-breadcrumb'), $data );\n\n\t\t\t/**\n\t\t\t * Let's make sure we've got somethin' up in this mutha.\n\t\t\t */\n\t\t\tif( $finder->count() > 0 ) {\n\t\t\t\tforeach ($finder as $file) {\n\t\t\t\t\t// Get the filename\n\t\t\t\t\t$filename = $file->getFilename();\n\n\t\t\t\t\t// Set the S3 key string for the objet\n\t\t\t\t\t$key = Url::tidy( join('/', array($directory, $uri, $filename)) );\n\n\t\t\t\t\t// File / directory attributes\n\t\t\t\t\t$this->data = $this->tasks->get_file_data_array();\n\n\t\t\t\t\t// Set some file data\n\t\t\t\t\t$file_data = array(\n\t\t\t\t\t\t'basename' => $file->getBasename( '.' . $file->getExtension() ),\n\t\t\t\t\t\t'destination' => $destination,\n\t\t\t\t\t\t'extension' => $file->getExtension(),\n\t\t\t\t\t\t'file' => $file->getPathname(),\n\t\t\t\t\t\t'filename' => $file->getFilename(),\n\t\t\t\t\t\t'last_modified' => $file->isDir() ? '--' :$file->getMTime(),\n\t\t\t\t\t\t'is_file' => $file->isFile(),\n\t\t\t\t\t\t'is_directory' => $file->isDir(),\n\t\t\t\t\t\t'size' => $file->isDir() ? '--' : File::getHumanSize($file->getSize()),\n\t\t\t\t\t\t'size_bytes' => $file->getSize(),\n\t\t\t\t\t\t'uri' => $uri,\n\t\t\t\t\t);\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Need to set the uri value\n\t\t\t\t\t */\n\t\t\t\t\tif ( $file->isFile() ) {\n\t\t\t\t\t\t// Check if file is an iamge\n\t\t\t\t\t\t$file_data['is_image'] = self::is_image($file_data['extension']);\n\n\t\t\t\t\t\t// Set filesize data\n\t\t\t\t\t\t$file_data['size_kilobytes'] = $this->tasks->get_size_kilobytes($file_data['size_bytes']);\n\t\t\t\t\t\t$file_data['size_megabytes'] = $this->tasks->get_size_megabytes($file_data['size_bytes']);\n\t\t\t\t\t\t$file_data['size_gigabytes'] = $this->tasks->get_size_gigabytes($file_data['size_bytes']);\n\t\t\t\t\t} elseif ( $file->isDir() ) {\n\t\t\t\t\t\tif( is_null($uri) ) {\n\t\t\t\t\t\t\t$file_data['uri'] = Url::tidy( '/' . join('/', array($file_data['filename'])) );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$file_data['uri'] = Url::tidy( '/' . join('/', array($uri,$file_data['filename'])) );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Keep on movin' on.\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Set the URL\n\t\t\t\t\t$file_data['url'] = Url::tidy( self::get_url_prefix($uri) . '/' . $filename );\n\n\t\t\t\t\t// Push file data to a new array with the filename as the key for sorting.\n\t\t\t\t\t$data['list'][$filename] = $file_data;\n\t\t\t\t\tunset( $file_data );\n\t\t\t\t}\n\t\t\t// Nothing returned from Finder\n\t\t\t} else {\n\t\t\t\t/**\n\t\t\t\t * Return an error of type dialog that should show a message to the user\n\t\t\t\t * that there are is nothing to see her. Doh!\n\t\t\t\t * @return [array] JSON\n\t\t\t\t * @todo See `self::set_json_return`.\n\t\t\t\t */\n\t\t\t\t// echo self::build_response_json(false, true, FILECLERK_LIST_NO_RESULTS, 'No results returned.');\n\t\t\t\t// exit;\n\n\t\t\t\t$no_results_template = File::get( __DIR__ . '/views/error-no-results.html');\n\n\t\t\t\tend($data['crumbs']);\n\t\t\t\t$previous_directory = prev($data['crumbs']);\n\n\t\t\t\techo json_encode( array(\n\t\t\t\t\t'error'\t\t\t=> TRUE,\n\t\t\t\t\t'type'\t\t\t=> 'dialog',\n\t\t\t\t\t'code'\t\t\t=> FILECLERK_LIST_NO_RESULTS,\n\t\t\t\t\t'breadcrumb'\t=> $breadcrumb,\n\t\t\t\t\t'html'\t\t\t=> Parse::template( $no_results_template, array('previous_directory' => $previous_directory['path']) ),\n\t\t\t\t));\n\n\t\t\t\texit;\n\n\t\t\t}\n\t\t}\n\n\t\t// Need to pass in the destination for root requests.\n\t\t$data['destination'] = $destination;\n\n\t\t// Sort this fucking multi-dimensional array already.\n\t\tuksort( $data['list'], 'strcasecmp');\n\t\t//array_multisort( array_keys($data['list']), SORT_FLAG_CASE, $data['list'] );\n\n\t\t/**\n\t\t * THIS ONLY WORKS IN PHP 5.4+. FUCK!\n\t\t */\n\t\t// array_multisort( array_keys($data['list']), SORT_NATURAL | SORT_FLAG_CASE, $data['list'] );\n\n\t\t// Now we need to tweak the array for parsing.\n\t\tforeach ( $data['list'] as $filename => $filedata ) {\n\t\t\t$data['list'][] = $filedata;\n\t\t\tunset($data['list'][$filename]);\n\t\t}\n\n\t\t// We're basically parsing template partials here to build out the larger view.\n\t\t$parsed_data = array(\n\t\t\t'list' => Parse::template( self::get_view('_list'), $data ),\n\t\t);\n\n\t\t// Put it all together\n\t\t$ft_template = File::get( __DIR__ . '/views/list.html');\n\n\t\t// Return JASON\n\t\theader('Content-Type', 'application/json');\n\t\techo self::build_response_json(true, false, FILECLERK_LIST_SUCCESS, null, null, $data, $breadcrumb, Parse::template($ft_template, $parsed_data));\n\t\texit;\n\t}", "public function index()\n {\n $files = $this->files\n ->getFilesPaginated(config('core.sys.file.default_per_page'))\n ->items();\n return $this->handler\n ->apiResponse($files);\n }", "protected function processChangedAndNewFiles() {}", "public function browse_files()\n {\n // Scan file directory, render the images.\n if (is_dir($this->file_path)) {\n $files = preg_grep('/^([^.])/', scandir($this->file_path));\n return $files;\n }\n \n }", "public function media_upload_picasa_list()\n\t{\n\t\t$this->api->check_authentication();\n\n\t\tif(isset($_POST['picasa_embed']))\n\t\t{\n\t\t\t$photo_id = $_POST['photo_id'];\n\t\t\t$link_url = esc_url($_POST['link_url']);\n\t\t\t$size = esc_attr($_POST['size']);\n\t\t\t$alignment = esc_attr($_POST['alignment']);\n\n\t\t\t$this->insert_photo($photo_id, compact('link_url', 'size', 'alignment'));\n\t\t}\n\n\t\twp_iframe(array(&$this, 'media_upload_picasa_list_content'));\n\t}", "function getFiles()\r\n\t{\r\n\t\treturn $this->files;\r\n\t}", "public function testListDocuments()\n {\n }", "private function set_files_by_published()\n\t\t{\n\t\t\t$this->files = Filesystem::ls(PATH_POSTS, '*.*.*.*.NULL.*.*.*.*.*.*', 'xml', false, false, true);\n\t\t\t$this->files_count = count( $this->files );\n\t\t}", "function getListOfFiles(){\n $result = \"\";\n $directoryFiles = scandir(\"uploads/\");\n $amount = count($directoryFiles);\n if($amount > 2){\n $result .= '<div class=\"listFile\"><ul class=\"blue\">'; \n $r = 0;\n for ($i = 2; $i < $amount; $i++) { \n $r++;\n if (preg_match(\"/(jpg|jpeg|png|gif)$/\", $directoryFiles[$i])) {\n $result .= '<li><a href=\"uploads/'. $directoryFiles[$i] . '\" download><img class=\"minIcon\" src=\"uploads/'.\n $directoryFiles[$i] . '\" alt=\"' . $directoryFiles[$i] . '\">';\n $filesize = filesize('uploads/'. $directoryFiles[$i]);\n $newFileSize = convertFileSize($filesize);\n $result .= '<span>' . $directoryFiles[$i] . ' (Size is: ' . $newFileSize . ')</span></a></li>';\n } \n }\n $result .= '</ul></div>';\n }\n\n return $result; \n }", "public function listApplicationFiles() {\r\n\t\t$preload = array(\r\n\t\t\t\"config/main.js\"\r\n\t\t);\r\n\t\t\r\n\t\t$return = array();\r\n\t\t$fullPath = $this->applicationPath;\r\n\t\r\n\t\tforeach($preload as $file) {\r\n\t\t\t$return[] = $fullPath.\"/\".$file;\r\n\t\t}\r\n\t\t\r\n\t\t$options = array(\r\n\t\t\t\"fileTypes\" => array(\"js\"),\r\n\t\t\t\"exclude\" => array_merge($preload, array(\r\n\t\t\t\t\"data\", \"messages\", \"compiled.js\"\r\n\t\t\t))\r\n\t\t);\r\n\t\t\r\n\t\t$return = array_merge($return, CFileHelper::findFiles($fullPath,$options));\r\n\t\t\r\n\t\t\r\n\t\treturn $return;\r\n\t}", "abstract protected function _attachmentsList();", "function get_list_of_files() {\n $result = $this->pdo->query('SELECT * FROM files ORDER BY filename ASC');\n return $result;\n }", "public function testReadingFiles()\n {\n $dir = __DIR__;\n $f = $this->adapter->java('java.io.File', $dir);\n $paths = $f->listFiles();\n foreach ($paths as $path) {\n self::assertFileExists((string) $path);\n }\n }", "function fileList(){\n\t\tchdir('./../cloud/books/'); //Move to template directory\n\t\t\n\t\tif ($handle = opendir(getcwd())) { //Open dir\n\t\t echo '<ul class=\"list-group\">';\n\t\t while (false !== ($entry = readdir($handle))) { //While directory not end - return files list\n\t\t \tif ($entry != \".\" && $entry != \".DS_Store\" && $entry != \"..\") { //Filter trash\n\t\t \t\tif(is_dir($entry)){ //IF dir then return button with folder icon \n\t\t \t\t\techo '<a href=\"#\" class=\"list-group-item cat\"><i class=\"fa fa-folder-o\" aria-hidden=\"true\"></i> '.$entry.'</a>';\n\t\t \t\t}else{ //else return file button\n\t\t \t\t\t$FileInfo = new SplFileInfo($entry); //Get file info\n\t\t \t\t\t$ext = $FileInfo->getExtension(); //Get file extension\n\t\t \t\t\tif($ext == \"png\" or $ext == \"jpg\" or $ext == \"bmp\") //IF file is image then return button with image icon\n\t\t \t\t\t\techo '<a href=\"/files/cloud/books/'.$entry.'\" class=\"list-group-item file\"><i class=\"fa fa-file-image-o\" aria-hidden=\"true\"></i> '.$entry.'</a>';\n\t\t \t\t\telse //Else return button with file-code icon\n\t\t \t\t\t\techo '<a href=\"/files/cloud/books/'.$entry.'\" class=\"list-group-item file\"><i class=\"fa fa-file-o\" aria-hidden=\"true\"></i> '.$entry.'</a>';\n\t\t \t\t}\n\t\t \t}\n\t\t }\n\t\t echo '</ul>';\n\t\t closedir($handle); //Close dir\n\t\t}\n\t}", "public function getFileList() {\n return $this->fileList;\n }", "public function testFileRefs() {}", "public function testRecordingListPage(): void\n {\n $recordingListPage = self::$recordingListPage;\n\n $this->assertInstanceOf(RecordingListPage::class, $recordingListPage);\n $this->assertSame(25, count($recordingListPage));\n\n $recording = $recordingListPage[0];\n\n $this->assertInstanceOf(Recording::class, $recording);\n }", "public function get_content_file_video(){\r\n\t\t$path = storage_path().'/data_video/';\r\n\t\t$dir = scandir($path);\r\n\t\tforeach ($dir as $key => $value) {\r\n\t\t\tif(preg_match(\"/\\.json$/\",$value)){\r\n\t\t\t\t$data = (json_decode(file_get_contents($path.$value)));\r\n\t\t\t\tforeach ($data as $key2 => $value2) {\r\n\t\t\t\t\tforeach ($value2->items as $key3 => $value3) {\r\n\t\t\t\t\t\t$params[$key3][\"videoId\"] = $value3->snippet->resourceId->videoId;\r\n\t\t\t\t\t\t$params[$key3][\"title\"] = $value3->snippet->title;\r\n\t\t\t\t\t\t$params[$key3][\"description\"] = $value3->snippet->description;\r\n\t\t\t\t\t\t$params[\"keywords\"] = str_replace(\".json\", \"\", $value);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$this->save_video_by_array($params);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function getFileList()\n {\n return array_map(\n function (FileEntry $file) {\n return $file->getFilename();\n },\n $this->pharchive->getFiles()\n );\n }" ]
[ "0.58834845", "0.5769307", "0.5767245", "0.57574075", "0.572067", "0.56012434", "0.5557108", "0.5524374", "0.5524374", "0.5524374", "0.54968965", "0.54968965", "0.54968965", "0.54705936", "0.5462373", "0.5406382", "0.5346848", "0.5325001", "0.531251", "0.5304454", "0.5276892", "0.52477914", "0.52467114", "0.5202889", "0.51756936", "0.51748455", "0.51662654", "0.5151146", "0.5139908", "0.5114939", "0.5113251", "0.50840575", "0.50736773", "0.50437576", "0.50327045", "0.50131476", "0.5010468", "0.5005318", "0.50043124", "0.49986628", "0.4996285", "0.4993664", "0.49873498", "0.49823958", "0.4979119", "0.49772885", "0.49728853", "0.49445763", "0.49376324", "0.49179837", "0.49105048", "0.4897405", "0.48821035", "0.48773474", "0.48755488", "0.48747483", "0.48672003", "0.4833246", "0.4831795", "0.4826943", "0.48244956", "0.4822391", "0.48213714", "0.48197094", "0.48194307", "0.48178685", "0.4816187", "0.4809828", "0.48082992", "0.48033357", "0.48030818", "0.47973356", "0.47936246", "0.47914004", "0.4789865", "0.47774246", "0.47658968", "0.4746246", "0.47434318", "0.47430965", "0.47366866", "0.4735342", "0.47347227", "0.47345617", "0.47322398", "0.47289407", "0.47275424", "0.47270048", "0.4720098", "0.47179753", "0.47159728", "0.47120196", "0.47013456", "0.47004923", "0.46994743", "0.46991667", "0.4686933", "0.46815187", "0.46804056", "0.46677214" ]
0.82050633
0
Test case for listPastWebinarPollResults List Past Webinar Poll Results.
Тестовый случай для listPastWebinarPollResults Список прошедших опросов вебинара.
public function testListPastWebinarPollResults() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testListPastWebinarQA()\n {\n }", "public function testPastEvents()\n {\n // otherwise test will fail.\n // Other approach is to use fake data or mock it.\n \n $response = $this->json('GET', '/events/expired');\n \n $response\n ->assertStatus(200)\n ->assertJson([\n ['name' => 'Fashion Show']\n ]);\n }", "public function testListPastWebinarFiles()\n {\n }", "public function testWebinarPanelists()\n {\n }", "public function test119DisplayBookingListAfterClickOnEachLinkOfPagination()\n {\n $ssoData = $this->getSSOData();\n\n // current bookings\n $this->createBookings(20, date('Y-m-d'), 15);\n\n //$this->mockApi($data, 'empty_ok');\n\n $responseBefore = $this->ajax($this->getUrlByParams(['page' => 1, 'per_page' => 10]))->json();\n $responseAfter = $this->ajax($this->getUrlByParams(['page' => 2, 'per_page' => 10]))->json();\n\n $listBefore = $responseBefore['current_list'];\n $listAfter = $responseAfter['current_list'];\n\n $this->assertFalse($listBefore == $listAfter);\n }", "public function getPastEvents(){\n\t\t// get the events\n\t\t$events = $this->getEvents();\n\n\t\t$pastEvents = [];\n\t\t$eventNumber = sizeof($events);\n\n\t\t// extracts the events which has not happened yet, which date is not passed\n\t\tfor ($i = 0; $i < $eventNumber; $i++){\n\t\t\t$event = array_shift($events);\n\t\t\tif($event['is_approved'] == 1 && $event['date'] < date('Y-m-d')){\n\t\t\t\tarray_push($pastEvents, $event);\n\t\t\t}\n\t\t}\n\n\t\treturn $pastEvents;\n\t}", "public function testPastEmbargo()\n {\n $page = $this->objFromFixture(SiteTree::class, 'pastEmbargo');\n\n $page = $this->finishWorkflow($page);\n\n $this->assertNotEquals(0, $page->PublishJobID);\n $this->assertEquals(0, $page->UnPublishJobID);\n\n $publish = strtotime($page->PublishJob()->StartAfter ?? '');\n $this->assertFalse($publish);\n }", "public function loop_through_past_posts($callback){\n return call_user_func_array($this->loop_through_posts(array(\"meta_key\" => \"_event_upcoming_label\", \"meta_value\" => \"Past\")), [$callback]);\n }", "public function testWebinarPollGet()\n {\n }", "public function testPastWebinars()\n {\n }", "public function testPastExpiry()\n {\n $page = $this->objFromFixture(SiteTree::class, 'pastExpiry');\n\n $page = $this->finishWorkflow($page);\n\n $this->assertEquals(0, $page->PublishJobID);\n $this->assertNotEquals(0, $page->UnPublishJobID);\n\n $unpublish = strtotime($page->UnPublishJob()->StartAfter ?? '');\n\n $this->assertFalse($unpublish);\n }", "public function test118DisplayPaginationLinksWhenTotalRecordsHigherThan10()\n {\n $ssoData = $this->getSSOData();\n\n // current bookings\n $this->createBookings(11, date('Y-m-d'), 11);\n\n //$this->mockApi($data, 'empty_ok');\n\n $params = [\n 'page' => 1,\n 'per_page' => 10,\n ];\n $response = $this->ajax($this->getUrlByParams($params))->json();\n\n $this->assertTrue(is_array($response));\n $this->assertArrayHasKey('current_list', $response);\n\n $list = $response['current_list'];\n $totalRowsInList = substr_count($list, '<ul class=\"pagination\"');\n\n $this->assertEquals(1, $totalRowsInList);\n }", "public function testWebinarPolls()\n {\n }", "public function pastTrips()\n\t{\n\t\t\n\t\t$now = \\Carbon\\Carbon::now()->format('Y-m-d');\n\t\t\n\t\t// Ensure only the logged in user's bookings are being pulled\n\t\t$listings = Booking::where('traveller_id', '=', Auth::user()->id)\n\t\t\t->where('end_date', '<', $now)\n\t\t\t->whereNotNull('transaction_id')\n\t\t\t->whereNull('canceled_at')\n\t\t\t->leftJoin('listings', 'listings.id', '=', 'bookings.listing_id')\n\t\t\t->leftJoin('listing_addresses', 'listing_addresses.id', '=', 'listings.id')\n\t\t\t->leftJoin(DB::raw(\"(select url, listing_id \n\t\t\t\t\t\t\tfrom `listings_images` \n\t\t\t\t\t\t\twhere `primary` = 1) as `list_images`\"), 'list_images.listing_id', '=', 'listings.id')\n\t\t\t->leftJoin(DB::raw(\"(select booking_id as review from `reviews`) as `listing_review`\"), 'listing_review.review', '=', 'bookings.id')\n\t\t\t->get();\n\t\t\n\t\t\n\t\treturn view('dashboard.traveller.past')\n\t\t\t->with('listings', $listings);\n\t}", "public function pastschedule() {\n //\n $currentDate = \\Helpers\\DateHelper::getLocalUserDate(date('Y-m-d H:i:s'));\n \n $scheduleDays = \\Helpers\\DateHelper::getScheduleDays($currentDate);\n $scheduleDays = array_reverse($scheduleDays);\n \n return view('user/pastschedule', ['scheduleDays' => $scheduleDays, 'number_of_day' => 1])\n ->with('target_areas', json_decode($this->target_areas, true))\n ->with('movements', json_decode($this->movements, true));\n }", "public function pastEvents()\n {\n $banner = array(\n 'title' => 'Past Events',\n 'subtitle' => 'A recap of our past events.',\n );\n\n $today = Carbon::today()->toDateString();\n $events = Event::whereDate('event_date', '<', $today);\n\n // Filter by url param\n if ($month = request('month')) {\n $events->whereMonth('event_date', Carbon::parse($month)->month);\n }\n\n if ($year = request('year')) {\n $events->whereYear('event_date', $year);\n }\n\n $events = $events->orderBy('event_date', 'desc')\n ->paginate(5);\n\n\n // Temporary\n $archives = Event::selectRaw('year(event_date) year, monthname(event_date) month, count(*) published')\n ->whereDate('event_date', '<', $today)\n ->groupBy('year', 'month')\n ->orderByRaw('min(event_date) desc')\n ->get()\n ->toArray();\n\n return view('events.past_events', compact('banner','events', 'archives'));\n }", "public function testPastEmbargoExpiry()\n {\n $page = $this->objFromFixture(SiteTree::class, 'pastEmbargoExpiry');\n\n $page = $this->finishWorkflow($page);\n\n $this->assertEquals(0, $page->PublishJobID);\n $this->assertNotEquals(0, $page->UnPublishJobID);\n\n $unpublish = strtotime($page->UnPublishJob()->StartAfter ?? '');\n\n $this->assertFalse($unpublish);\n }", "public function past()\n {\n $events = Event::orderBy('start_datetime')->past()->paginate();\n\n return view('auth.residents.events.past', compact('events'));\n }", "public function test117NoDisplayPaginationLinksWhenTotalRecordsLessThan10()\n {\n $ssoData = $this->getSSOData();\n\n // current bookings\n $this->createBookings(9, date('Y-m-d'), 9);\n\n //$this->mockApi($data, 'empty_ok');\n\n $params = [\n 'page' => 1,\n 'per_page' => 10,\n ];\n $response = $this->ajax($this->getUrlByParams($params))->json();\n\n $this->assertTrue(is_array($response));\n $this->assertArrayHasKey('current_list', $response);\n\n $list = $response['current_list'];\n $totalRowsInList = substr_count($list, '<div class=\"contract_item\"');\n\n $this->assertLessThan(10, $totalRowsInList);\n }", "public function testWebinarPanelistCreate()\n {\n }", "public function testWebinarAbsentees()\n {\n }", "public function testPastEmbargoAfterExpiry()\n {\n $page = $this->objFromFixture(SiteTree::class, 'pastEmbargoAfterExpiry');\n\n $page = $this->finishWorkflow($page);\n\n $this->assertEquals(0, $page->PublishJobID);\n $this->assertEquals(0, $page->UnPublishJobID);\n }", "public function testPastEmbargoFutureExpiry()\n {\n $page = $this->objFromFixture(SiteTree::class, 'pastEmbargoFutureExpiry');\n\n $page = $this->finishWorkflow($page);\n\n $this->assertNotEquals(0, $page->PublishJobID);\n $this->assertNotEquals(0, $page->UnPublishJobID);\n\n $publish = strtotime($page->PublishJob()->StartAfter ?? '');\n $unpublish = strtotime($page->UnPublishJob()->StartAfter ?? '');\n\n $this->assertFalse($publish);\n $this->assertNotFalse($unpublish);\n }", "function testStopPast() {\n $startDate = Carbon::now()->subDays(3)->toDateString();\n $stopDate = Carbon::now()->subDays(1)->toDateString();\n \n //Test precondition\n $this->tester->seeInDatabase('History', ['counterId'=>2, 'startDate'=>$startDate, 'endDate'=>null]);\n\n Counter::findOne(2)->stop($stopDate);\n\n //Test the results after reset\n $this->tester->seeInDatabase('History', ['counterId'=>2, 'startDate'=>$startDate, 'endDate'=>$stopDate]);\n $this->tester->dontSeeInDatabase('History', ['counterId'=>2, 'endDate'=>null]);\n }", "public function testListingWithFilters()\n {\n $filters[] = ['limit' => 30, 'page' => 30];\n $filters[] = ['listing_type' => 'public'];\n foreach ($filters as $k => $v) {\n $client = static::createClient();\n $client->request('GET', '/v2/story', $v, [], $this->headers);\n $this->assertStatusCode(200, $client);\n\n $response = json_decode($client->getResponse()->getContent(), true);\n $this->assertTrue(is_array($response));\n }\n }", "public function testWebinarPollUpdate()\n {\n }", "public function testTwentySevenResults()\n {\n $response = $this->json('get', '/example', ['count' => 27]);\n $json = $response->json();\n $this->assertCount(27, $json['data']);\n $response->assertStatus(200);\n }", "public function testUpcomingEvents()\n {\n // otherwise test will fail.\n // Other approach is to use fake data or mock it.\n \n $response = $this->json('GET', '/events');\n \n $response\n ->assertStatus(200)\n ->assertJson([\n ['name' => 'IT Expo']\n ]);\n }", "function pi_list_browseresults($showResultCount = 1, $divParams = '', $spacer = false, $total_bodycount = 0) {\n\t\t\t// Initializing variables:\n\t\t$pointer = intval($this->piVars['pointer']);\n\t\t$count = $this->internal['res_count'];\n\t\t$results_at_a_time = t3lib_div::intInRange($this->internal['results_at_a_time'],1,1000);\n\t\t$maxPages = t3lib_div::intInRange($this->internal['maxPages'],1,100);\n\n\t\t$pR1 = $pointer * $results_at_a_time + 1;\n\t\t$pR2 = $pointer * $results_at_a_time + $results_at_a_time;\n\n\t\t$max = t3lib_div::intInRange(ceil($count/$results_at_a_time), 1, $maxPages);\n\n\n\t\t$links=array();\n\n\t\t\t// Make browse-table/links:\n\t\tif ($this->pi_alwaysPrev>=0) {\n\t\t\tif ($pointer > 0) {\n\t\t\t\t$links[] = $this->pi_linkTP_keepPIvars($this->pi_getLL('pi_list_browseresults_prev','< Previous',TRUE),array('pointer'=>($pointer-1 ? $pointer-1 : '')), 1);\n\t\t\t} elseif ($this->pi_alwaysPrev) {\n\t\t\t\t$links[] = $this->pi_getLL('pi_list_browseresults_prev','< Previous',TRUE);\n\t\t\t}\n\t\t}\n\n\t\tif ($max > 1) {\n\t\t\tif ($pointer >= $maxPages - 2) {\n\t\t\t\t$a = (integer) ($pointer - ($maxPages/2));\n\t\t\t} else {\n\t\t\t\t$a = 0;\n\t\t\t}\n\t\t\tif ($a < 0) {\n\t\t\t\t$a = 0;\n\t\t\t}\n\t\t\t// in order to have a correct value for $max we must include the value of the actual $pointer in the calculation\n\t\t\tfor($i=0; $i<$max; $i++) {\n\t\t\t\t$temp_links = array();\n\t\t\t\t// check that the starting point (equivalent of $pR1) doesn't exceed the total $count\n\t\t\t\tif($a * $results_at_a_time + 1 > $count){\n\t\t\t\t\t$i = $max; //quitt!!!\n\t\t\t\t}else{\n\t\t\t\t\t$temp_links[] = '';\n\t\t\t\t\t//beginning:\n\t\t\t\t\tif($pointer == $a){\n\t\t\t\t\t\t$temp_links[] .= '<span '.$this->pi_classParam('browsebox-SCell').'><strong>';\n\t\t\t\t\t}\n\t\t\t\t\t$temp_links[] .= $this->pi_linkTP_keepPIvars(trim($this->pi_getLL('pi_list_browseresults_page', 'Page', TRUE).' '.($a + 1)), array('pointer' => ( $a ? $a : '' )), 1);\n\t\t\t\t\t//ending:\n\t\t\t\t\tif($pointer == $a){\n\t\t\t\t\t\t$temp_links[] .= '</strong></span>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$a++;\n\t\t\t\t$links[] = implode('', $temp_links);\n\t\t\t}// end foreach\n\t\t}// end if max\n\n\t\t// neither $pointer nor the number-link ($a) must exceed the result of the calculation below!\n\t\tif ($pointer < ceil($count/$results_at_a_time)-1) {\n\t\t\t$links[] = $this->pi_linkTP_keepPIvars($this->pi_getLL('pi_list_browseresults_next','Next >',TRUE), array('pointer' => $pointer+1),1);\n\t\t}\n\t$sBox = '';\n\n\t\t$sBox .= '<!-- List browsing box: -->\n\t\t\t\t\t<div'.$this->pi_classParam('browsebox').'>';\n\t\tif($showResultCount){\n\t\t\t$sBox .= '<p>'; //paragraph for 'elements 1 to 20'\n\t\t\tif($this->internal['res_count']){\n\t\t\t\t$from_number = $this->internal['res_count'] > 0 ? $pR1 : 0;\n\t\t\t\t$to_number = min(array($this->internal['res_count'], $pR2));\n\n\n\t\t\t\t// don't know why I need this, found out by trial and error\n\t\t\t\tif($total_bodycount > 0 && !$this->piVars['char']){\n\t\t\t\t\t$to_number -= $total_bodycount;\n\t\t\t\t}\n\n\t\t\t\t$sBox .= sprintf(\n str_replace(\n\t\t\t\t\t\t\t\t\t\t\t'###SPAN_BEGIN###',\n\t\t\t\t\t\t\t\t\t\t\t'<span'.$this->pi_classParam('browsebox-strong').'>',\n\t\t\t\t\t\t\t\t\t\t\t$this->pi_getLL('pi_list_browseresults_displays', 'Displaying results ###SPAN_BEGIN###%s to %s</span> out of ###SPAN_BEGIN###%s</span>')\n\t\t\t\t\t\t\t\t\t\t),\n $from_number,\n\t\t\t\t\t\t\t\t\t\t//to (must substract local_bodycount here!!!)\n $to_number,\n //of a total of\n $this->internal['res_count']\n );\n\n\n\n\t\t\t}else{\n\t\t\t\t$sBox .= $this->pi_getLL('pi_list_browseresults_noResults','Sorry, no items were found.');\n\t\t\t}\n\t\t\t$sBox .= '</p>';\n\t\t}\n\t\t$sBox .= '<'.trim('p '.$divParams).'>'.implode($spacer, $links).'</p>';\n\t\t$sBox .= '</div>';\n\t\treturn $sBox;\n\t}", "protected function _getLists() {\n\t\t/** @var Thrive_Dash_Api_WebinarJamStudio $api */\n\t\t$api = $this->getApi();\n\t\ttry {\n\t\t\t$lists = array();\n\t\t\t$webinars = $api->getUpcomingWebinars();\n\t\t\tforeach ( $webinars as $key => $item ) {\n\t\t\t\t$lists [] = array(\n\t\t\t\t\t'id' => $item['webinar_id'],\n\t\t\t\t\t'name' => $item['name']\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn $lists;\n\t\t} catch ( Thrive_Dash_Api_WebinarJamStudio_Exception $e ) {\n\t\t\t$this->_error = $e->getMessage();\n\n\t\t\treturn false;\n\t\t}\n\n\t}", "public function testLastRuns()\n {\n LastRun::truncate();\n LastRun::factory()->count(30)->create();\n\n $headers['Accept'] = 'application/json';\n\n $response = $this->get('/api/v1/runner/1/form-data', $headers);\n\n $response->assertStatus(200)->assertJsonStructure(['success', 'data' => ['last_runs'], 'status']);\n }", "public function episodePremiumVisibleInDistantFuture(AcceptanceTester $I)\n {\n $I->wantTo('Verify that \"Never\" is displayed in the portal when Premium visible date is in the distant future. - C225103');\n $I->amOnPage(ContentPage::$URL_ingest);\n\n ContentUtils::clickTableRowOfTitle($I, \"CXCMS_Ingest_ContentWindows_\" . BuildNo::$build . \" Episode Paid Distant Future\");\n ContentUtils::clickTableRowOfTitle($I, \"CXCMS_Ingest_ContentWindows_\" . BuildNo::$build . \" Episode Paid Distant Future Season\");\n ContentUtils::clickTableRowOfTitle($I, \"CXCMS_Ingest_ContentWindows_\" . BuildNo::$build . \" Episode Paid Distant Future Title\");\n\n //CXCMS-1738 - This is bugged and will always fail\n $I->waitForText('Ingest Testing', 30, ContentPage::$channelRow);\n $I->seeInField(ContentPage::$windowing_listingBegin_input, 'Never');\n }", "public function moviePremiumVisibleInDistantFuture(AcceptanceTester $I)\n {\n $I->wantTo('Verify that \"Never\" is displayed in the portal when Premium visible date is in the distant future. - C225105');\n $I->amOnPage(ContentPage::$URL_ingest);\n\n ContentUtils::clickTableRowOfTitle($I, \"CXCMS_Ingest_ContentWindows_\" . BuildNo::$build . \" Movie Paid Distant Future\");\n\n //CXCMS-1738 - This should say Never. Change when fixed.\n $I->waitForText('Ingest Testing', 30, ContentPage::$channelRow);\n $I->seeInField(ContentPage::$windowing_listingBegin_input, 'Never');\n }", "public function testListSites()\n {\n }", "public function tournamentCountPast()\n\t{\n\t\t$date = new DateTime();\n\t\treturn $this->tournamentCount($date->format(\"Y-m-d\"), true);\n\t}", "public function testSuccessfulResponse()\n {\n $client = new DebugClient($_SERVER['FANTASY_DATA_API_KEY'], Subscription::KEY_DEVELOPER);\n\n /** @var \\GuzzleHttp\\Command\\Model $result */\n $result = $client->NewsByTeam(['Team' => 'NE']);\n\n $response = $client->mHistory->getLastResponse();\n\n $this->assertEquals('200', $response->getStatusCode());\n\n $check_news = function ( $pNews )\n {\n /** we expect 9 stats */\n $this->assertCount( 9, $pNews );\n\n $cloned_array = $pNews;\n\n /** this function helps us assure that we're not missing any keys in the Enum list */\n $process_key = function ( $pKey ) use ( $pNews, &$cloned_array )\n {\n $this->assertArrayHasKey( $pKey, $pNews );\n unset( $cloned_array[$pKey] );\n };\n\n /** test all the keys */\n $process_key( PlayerNews\\Property::KEY_CONTENT );\n $process_key( PlayerNews\\Property::KEY_NEWS_ID );\n $process_key( PlayerNews\\Property::KEY_PLAYER_ID );\n $process_key( PlayerNews\\Property::KEY_SOURCE );\n $process_key( PlayerNews\\Property::KEY_TEAM );\n $process_key( PlayerNews\\Property::KEY_TERMS_OF_USE );\n $process_key( PlayerNews\\Property::KEY_TITLE );\n $process_key( PlayerNews\\Property::KEY_UPDATED );\n $process_key( PlayerNews\\Property::KEY_URL );\n\n $this->assertEmpty( $cloned_array );\n };\n\n $stats = $result->toArray();\n\n array_walk( $stats, $check_news );\n }", "public function testWebinarPollCreate()\n {\n }", "public function testPastSameEmbargoExpiry()\n {\n $page = $this->objFromFixture(SiteTree::class, 'pastSameEmbargoExpiry');\n\n $page = $this->finishWorkflow($page);\n\n $this->assertEquals(0, $page->PublishJobID);\n $this->assertEquals(0, $page->UnPublishJobID);\n }", "public function _get_past_prices_details(){\n \t$past_prices = $this\n\t\t\t->past_price\n\t\t\t->select('id, price, created')\n\t\t\t->order_by('created', 'desc')\n\t\t\t->get();\n\n\t\t$values = array();\n\t\tforeach($past_prices as $past_price){\n\t\t\t$values[] = format_currency($past_price->price) . ' - ' . format_date($past_price->created, 'default_date_format');\n\t\t}\n\t\treturn ul($values);\n }", "public function testGetAllPolls()\n {\n Passport::actingAs(\n factory(\"App\\User\")->create(),\n ['*']\n );\n $polls= factory(\"App\\Poll\",5)->create();\n $response = $this->get('/polls');\n $response->assertStatus(200);\n $response->assertJson($polls->toArray());\n }", "protected function wrapResults($outputs)\n {\n return new LastFm_User_GetPastEvents_Results($outputs);\n }", "public function get_test_scheduled_events()\n {\n }", "public function episodePremiumWatchableInDistantFuture(AcceptanceTester $I)\n {\n $I->wantTo('Verify that \"Never\" is displayed in the portal when Premium watchable date is in the distant future. - C225102');\n $I->amOnPage(ContentPage::$URL_ingest);\n\n ContentUtils::clickTableRowOfTitle($I, \"CXCMS_Ingest_ContentWindows_\" . BuildNo::$build . \" Episode Paid Distant Future\");\n ContentUtils::clickTableRowOfTitle($I, \"CXCMS_Ingest_ContentWindows_\" . BuildNo::$build . \" Episode Paid Distant Future Season\");\n ContentUtils::clickTableRowOfTitle($I, \"CXCMS_Ingest_ContentWindows_\" . BuildNo::$build . \" Episode Paid Distant Future Title\");\n\n $I->waitForText('Ingest Testing', 30, ContentPage::$channelRow);\n $I->seeInField(ContentPage::$windowing_premiumStartOfWindow_input, 'Never');\n }", "public function otherList()\n\t{\n\t\techo json_encode($this->other_schedule->fetchData());\n\t}", "public static function getHTMLForHistory($history, $laptops = false)\n\t{\n\t\tglobal $issueTypes;\n\t\t$output = \"\";\n \n\t\tforeach ($history as $row)\n\t\t{\n $recorded_by = new Student($row['initiated_by']);\n $recorded_by_string = \"\";\n if ( !empty($row['initiated_by']) && $recorded_by )\n $recorded_by_string = \"- Recorded by \".$recorded_by->getProperty(\"name\");\n \n\t\t\tif ( $row['type'] == ACTION_CREATE )\n\t\t\t{\n\t\t\t\t$output .= \"<div class=\\\"alert action-info\\\"><strong>Created</strong><br>\";\n\t\t\t\t$output .= ($laptops?$laptops[$row['laptop']['id']]['assetTag']:\"This computer\").\" was added to the database.<br>\";\n\t\t\t\t$output .= \"<small>Recorded on \".date(\"M d, Y\", $row['timestamp']).\" at \".date(\"g:i A\", $row['timestamp']).\" \".$recorded_by_string.\"</small>\";\n\t\t\t\t$output .= \"</div>\";\n\t\t\t}\n\t\t\telse if ( $row['type'] == ACTION_UNASSIGN )\n\t\t\t{\n\t\t\t\t$output .= \"<div class=\\\"alert\\\"><strong>Returned</strong><br>\";\n\t\t\t\t$output .= ($laptops?$laptops[$row['laptop']['id']]['assetTag']:\"This computer\").\" was returned.<br>\";\n\t\t\t\t$output .= \"<small>Recorded on \".date(\"M d, Y\", $row['timestamp']).\" at \".date(\"g:i A\", $row['timestamp']).\" \".$recorded_by_string.\"</small>\";\n\t\t\t\t$output .= \"</div>\";\n\t\t\t}\n\t\t\telse if ( $row['type'] == ACTION_ASSIGN )\n\t\t\t{\n\t\t\t\t$output .= \"<div class=\\\"alert alert-success\\\"><strong>Assigned</strong><br>\";\n\t\t\t\t$output .= ($laptops?$laptops[$row['laptop']['id']]['assetTag']:\"This computer\").\" was assigned to <a href=\\\"../students/student.php?sid=\".$row['student'].\"\\\">\".$row['student'].\"</a><br>\";\n\t\t\t\t$output .= \"<small>Recorded on \".date(\"M d, Y\", $row['timestamp']).\" at \".date(\"g:i A\", $row['timestamp']).\" \".$recorded_by_string.\"</small>\";\n\t\t\t\t$output .= \"</div>\";\n\t\t\t}\n\t\t\telse if ( $row['type'] == HISTORYEVENT_SERVICE )\n\t\t\t{\n\t\t\t\t$output .= \"<div class=\\\"alert alert-info\\\"><strong>Service - \".$issueTypes[$row['subtype']].\"</strong><br>\";\n\t\t\t\t$output .= stripcslashes(nl_fix($row['body'])).\"<br>\";\n\t\t\t\t$output .= \"<small>Recorded on \".date(\"M d, Y\", $row['timestamp']).\" at \".date(\"g:i A\", $row['timestamp']).\" \".$recorded_by_string.\"</small>\";\n\t\t\t\t$output .= \"</div>\";\n\t\t\t}\n\t\t}\n\t\treturn $output;\n\t}", "public function testAction()\n {\n if ($this->identity()) {\n $summoners = $this->account()->getSummoners();\n $summoner = $summoners[0];\n $response = $this->getServiceLocator()->get('youtube_service')->findByQuery(\"league of legends\", null, 20, \"this_week\");\n $videos = $response->getVideos(true);\n foreach ($videos as $video) {\n echo $video->getScore() . '<br />';\n }\n # $feeds = $this->getServiceLocator()->get('feed_service')->getLolProFeeds(array(\"Ahri\",\"Aatrox\",\"Jayce\"));\n return new ViewModel();\n } else {\n return $this->notFoundAction();\n }\n }", "public function testGetParliamentaryCandidateWithVoteCast()\n {\n $pollingStation = $this->em->getRepository('VtallyBundle:PollingStation')->find(1);\n $candidates = $pollingStation->getParliamentaryCandidateWithVoteCast();\n $this->assertEquals($candidates[0]->getFirstName(), 'Jhon');\n $this->assertEquals($candidates[0]->getVoteCast(), 100);\n $this->assertEquals($candidates[1]->getFirstName(), 'Jannette');\n $this->assertEquals($candidates[1]->getVoteCast(), 280);\n $this->assertEquals($candidates[2]->getFirstName(), 'Sondra');\n $this->assertEquals($candidates[2]->getVoteCast(), 98);\n $this->assertEquals($candidates[3]->getFirstName(), 'Fadde');\n $this->assertEquals($candidates[3]->getVoteCast(), 0);\n $this->assertEquals($candidates[4]->getFirstName(), 'Vivien');\n $this->assertEquals($candidates[4]->getVoteCast(), 100);\n $this->assertEquals($candidates[5]->getFirstName(), 'Joella');\n $this->assertEquals($candidates[5]->getVoteCast(), 7);\n $this->assertEquals($candidates[6]->getFirstName(), 'Adde');\n $this->assertEquals($candidates[6]->getVoteCast(), 2);\n }", "public function moviePremiumWatchableInDistantFuture(AcceptanceTester $I)\n {\n $I->wantTo('Verify that \"Never\" is displayed in the portal when Premium watchable date is in the distant future. - C225107');\n $I->amOnPage(ContentPage::$URL_ingest);\n\n ContentUtils::clickTableRowOfTitle($I, \"CXCMS_Ingest_ContentWindows_\" . BuildNo::$build . \" Movie Paid Distant Future\");\n\n $I->waitForText('Ingest Testing', 30, ContentPage::$channelRow);\n $I->seeInField(ContentPage::$windowing_premiumStartOfWindow_input, 'Never');\n }", "public function testWebinarStatus()\n {\n }", "public function testAjaxGetVenueListCanBeAccessed()\n {\n $this->dispatch('/venue/ajax-get-venue-list');\n $this->assertResponseStatusCode(200);\n }", "public function index(Request $request)\n {\n /**\n * Past questions are being returned with both approved and unapproved past questions\n * Unapproved past questions should be separated during render\n */\n if ($request->input('status')){\n \n // Get all past questions that are active/approved or inactive/unapproved\n $past_questions = PastQuestion::where('approved', (boolean)$request->input('status'))\n ->with([\n 'image',\n 'document',\n 'comment',\n ])->orderBy('created_at', 'desc')\n ->take(500)\n ->paginate(10);\n\n } elseif ($request->input('properties')){\n \n // Get all past questions with all their relations\n $past_questions = PastQuestion::with([\n 'image',\n 'document',\n 'comment',\n ])->orderBy('created_at', 'desc')\n ->take(500)\n ->paginate(10);\n\n } elseif ($request->input('deleted')){\n\n // Get all deleted past questions with all their relations\n $past_questions = PastQuestion::onlyTrashed()->with([\n 'image',\n 'document',\n 'comment',\n ])->orderBy('created_at', 'desc')\n ->take(500)\n ->paginate(10);\n\n } else {\n\n // Get all past questions with out their relations\n $past_questions = PastQuestion::orderBy('created_at', 'desc')\n ->take(500)\n ->paginate(10);\n }\n\n if ($past_questions) {\n \n if (count($past_questions) > 0) {\n return $this->success($past_questions);\n } else {\n return $this->notFound('Past questions were not found');\n }\n\n } else {\n return $this->requestConflict('Currently unable to search for past questions');\n }\n }", "function get_not_top_5_best_polls($reviewer)\n{\n $reviewer = (int)$reviewer;\n $limit = mysql_result(mysql_query(\"SELECT Value FROM parameter WHERE Short_name = 'Reviews_to_give'\"), 0);\n $query = mysql_query(\"SELECT ID, Reviewee, Score FROM candidate_poll WHERE Reviewer=$reviewer ORDER BY Score DESC LIMIT 100 OFFSET $limit\");\n if (!$query || mysql_num_rows($query) <= 0) {\n echo mysql_error();\n return false;\n } else {\n while ($row = mysql_fetch_assoc($query)) {\n $polls[] = array(\n 'ID' => $row['ID'],\n 'Reviewee' => $row['Reviewee'],\n 'Score' => $row['Score']\n );\n }\n return $polls;\n }\n}", "public function testIsOnTasksListPage()\n {\n $this->addTestFixtures();\n $this->logInAsUser();\n $this->client->request('GET', '/tasks');\n\n $response = $this->client->getResponse();\n $responseContent = $response->getContent();\n\n $statusCode = $response->getStatusCode();\n $this->assertEquals(200, $statusCode);\n $this->assertContains($this->task->getTitle(), $responseContent);\n $this->assertContains($this->task->getContent(), $responseContent);\n }", "public function testGetRetweetersFailure()\n\t{\n\t\t$id = 217781292748652545;\n\t\t$count = 5;\n\n\t\t$returnData = new stdClass;\n\t\t$returnData->code = 200;\n\t\t$returnData->body = $this->rateLimit;\n\n\t\t$path = $this->object->fetchUrl('/application/rate_limit_status.json', array(\"resources\" => \"statuses\"));\n\n\t\t$this->client->expects($this->at(0))\n\t\t->method('get')\n\t\t->with($path)\n\t\t->will($this->returnValue($returnData));\n\n\t\t$returnData = new stdClass;\n\t\t$returnData->code = 500;\n\t\t$returnData->body = $this->errorString;\n\n\t\t// Set request parameters.\n\t\t$data['id'] = $id;\n\t\t$data['count'] = $count;\n\n\t\t$path = $this->object->fetchUrl('/statuses/retweeters/ids.json', $data);\n\n\t\t$this->client->expects($this->at(1))\n\t\t->method('get')\n\t\t->with($path)\n\t\t->will($this->returnValue($returnData));\n\n\t\t$this->object->getRetweeters($id, $count);\n\t}", "public function countAllPastTournamentsWithEvents()\n\t{\n\t\t$date = new DateTime();\n\t\treturn $this->countAllTournamentsWithEvents($date->format(\"Y-m-d\"), true);\n\t}", "function getUpcomingWebinars()\n {\n $path = $this->getPathRelativeToOrganizer('upcomingWebinars');\n\n return $this->sendRequest('GET', $path, $parameters = null, $payload = null);\n }", "public function testListDocumentsFromTo()\n {\n echo \"\\nTesting the document retrieval by ID...\";\n $response = $this->listDocumentsFromTo(0,26);\n //echo $response;\n $result = json_decode($response);\n \n $hits = $result->hits;\n //echo \"\\nCOUNT:\".count($hits);\n $this->assertTrue(count($hits)==26);\n }", "public function findPastPanelsWithoutFeedbackEmailSent()\n {\n $now = new \\DateTime();\n $today = $now->format('Y-m-d');\n\n $query = $this->createQuery();\n $query->getQuerySettings()->setRespectStoragePage(false);\n $query->matching(\n $query->logicalAnd(\n $query->lessThanOrEqual('date', $today),\n $query->equals('feedbackMailSent', false)\n )\n );\n return $query->execute();\n\n }", "public function testReportsReputationHistoryGet()\n {\n }", "function get_past_event_view_url($view) {\n $display = $view->current_display;\n $parameters = $view->getUrl()->getRouteParameters();\n\n switch ($display) {\n // Set the past events link for a topic filtered display.\n case 'page_3': // Event topic display\n case 'page_5': // Past topic display\n return Url::fromRoute('view.events.page_5', $parameters)->toString();\n\n // Set the past events link for a department filtered display.\n case 'page_4': // Event department display\n case 'page_6': // Past department display\n return Url::fromRoute('view.events.page_6', $parameters)->toString();\n\n // Set the past events link for the all events display.\n case 'page_1': // Event all display\n case 'page_2': // Past all display\n default:\n return '/past-events';\n }\n}", "public function get_all_past()\n\t{\n\t\t// Clean cache for testing\n\t\t//@$this->cache->delete('active_deals');\n\t\t\n\t\tif ($past_deals = $this->cache->get('past_deals'))\n\t\t{\n\t\t\t// Prepare the data\n\t\t\tforeach ($past_deals as $key=>$past_deal)\n\t\t\t{\n\t\t\t\t$past_deals[$key] = $this->prepare($past_deal);\n\t\t\t}\n\t\t\t\n\t\t\treturn $past_deals;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Get 'em \n\t\t\t$past_deals = $this->db->from($this->deal_table.' AS e')\n\t\t\t ->where('e.f_expires_at < UNIX_TIMESTAMP()')\n\t\t\t\t\t\t\t ->where('published_at <=', now())\n\t\t\t ->order_by('published_at', 'DESC')\n\t\t\t ->get()->result()\n\t\t\t ;\n\t\t\t\n\t\t\t// Prepare the data\n\t\t\tif ($past_deals)\n\t\t\t{\n\t\t\t\tforeach ($past_deals as $key=>$past_deal)\n\t\t\t\t{\n\t\t\t\t\t$past_deals[$key] = $this->prepare($past_deal);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $past_deals;\n\t\t}\n\t\t\n\t\treturn null;\n\t\t\t\n\t}", "public function testGetViewingHistoryWithNoVideo()\n\t{\n\t\t$this->be(User::first());\n\t\t$response = $this->action('GET', 'ApiViewingHistoryController@getIndex');\n\t\t\n\t\t$this->assertInstanceOf('Illuminate\\Http\\JsonResponse', $response);\n\t\t$this->assertResponseStatus(404);\n\t}", "public function show(PastWinner $pastWinner)\n {\n //\n }", "public function process()\n\t{\n\t\tif (Phpfox::getUserBy('profile_page_id') > 0)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tif ($iVideoId = $this->request()->getInt('video_id'))\n\t\t{\n\t\t\tlist($iCnt, $aVideos) = Phpfox::getService('video')->getRelatedVideos($iVideoId, $this->request()->get('video_title'), ($this->request()->getInt('page_number') + 1));\n\t\t\t\n\t\t\tif (!count($aVideos))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\t\t\t\n\n\t\t\tPhpfox::getLib('pager')->set(array('page' => $this->request()->getInt('page_number'), 'size' => Phpfox::getParam('video.total_related_videos'), 'count' => $iCnt));\t\t\t\n\t\t\tif (Phpfox::getLib('pager')->getLastPage() <= $this->request()->getInt('page_number'))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\t$this->template()->assign(array(\n\t\t\t\t\t'aRelatedVideos' => $aVideos,\n\t\t\t\t\t'bIsLoadingMore' => true\t\t\t\t\t\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$aVideo = $this->getParam('aVideo');\n\t\t\t\n\t\t\tlist($iCnt, $aVideos) = Phpfox::getService('video')->getRelatedVideos($aVideo['video_id'], $aVideo['title'], 1, true);\n\t\t\t\t\t\n\t\t\tif (!count($aVideos))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t$this->template()->assign(array(\n\t\t\t\t\t'sHeader' => Phpfox::getPhrase('video.suggestions'),\n\t\t\t\t\t'aRelatedVideos' => $aVideos\n\t\t\t\t)\n\t\t\t);\t\n\n\t\t\tPhpfox::getLib('pager')->set(array('page' => $this->request()->getInt('page_number'), 'size' => Phpfox::getParam('video.total_related_videos'), 'count' => $iCnt));\n\t\t\tif ($iCnt >= Phpfox::getParam('video.total_related_videos'))\n\t\t\t{\n\t\t\t\t$this->template()->assign(array(\n\t\t\t\t\t\t'aFooter' => array(\n\t\t\t\t\t\t\tPhpfox::getPhrase('video.load_more_suggestions') => '#'\n\t\t\t\t\t\t)\t\t\t\t\n\t\t\t\t\t)\n\t\t\t\t);\t\n\t\t\t}\n\t\t\t\n\t\t\treturn 'block';\t\t\n\t\t}\t\t\n\t}", "public function BrowserPollResults(){\n \t//get dataobjects, group list adds ability to group records\n \t$submissions = new GroupedList(BrowserPollSubmission::get());\n\n \t//count them\n \t$total = $submissions->Count();\n \t//put them in an array\n \t$list = new ArrayList();\n\n \t//get all the results, group them by browser and display in array as key Browsername and value browsersubmission\n \tforeach($submissions->groupBy('Browser') as $browserName => $browserSubmissions){\n \t\t//get all results, count them, find recentage\n \t\t$percentage = (int) ($browserSubmissions->Count() / $total * 100);\n \t\t//give the list the new data, displayed under name with percentage\n \t\t$list->push(new ArrayData(array(\n \t\t\t'Browser' => $browserName,\n \t\t\t'Percentage' => $percentage\n \t\t)));\n\n \t}\n \treturn $list;\n }", "public function testGetListFailure() \n { \n $failingUserId = \"-1\";\n $request = $this->newRequest('/todo/getlist/'.$failingUserId);\n $response = $this->responseFromRun(); \n\n // no headers?\n // [\"reasonPhrase\":\"Zend\\Diactoros\\Response\":private]= string(9) \"Not Found\"\n $this->assertRelayResponse($response, 404, [], \"\");\n }", "public function verifyResultsPageInYourProjectShowsImpressionEvent(): void\n {\n print \"Go to your project's results page and verify decisions events are showing (5 min delay)\";\n }", "public function verifyResultsPageInYourProjectShowsImpressionEvent(): void\n {\n print \"Go to your project's results page and verify decisions events are showing (5 min delay)\";\n }", "function new_since_last_visit() {\n $this->skip_layout = $this->request->isAsyncCall();\n\n $page = (integer) $this->request->get('page');\n if($page < 1) {\n $page = 1;\n } // if\n\n list($objects, $pagination) = ProjectObjects::paginateNew($this->logged_user, $page, 10);\n\n $this->smarty->assign(array(\n 'objects' => $objects,\n 'pagination' => $pagination,\n ));\n }", "function printOfferList() {\n\n\t\t// disable caching of target booking page\n\t\t$conf = array(\n\t\t // Link to booking page\n\t\t 'parameter' => $this->lConf['gotoPID'],\n\t\t // We must add cHash because we use parameters\n\t\t 'useCacheHash' => false,\n\t\t);\n\n\t\t$contentError = array();\n\t\t$offers['numOffers'] = 0;\n\t\t$i = 0;\n\n\t\t$productIds = explode(',', $this->lConf['ProductID']);\n\n\t\tforeach ( $productIds as $key => $uid ) {\n\n\t\t\tif (($this->lConf['productDetails'][$uid]['capacitymin']+$this->lConf['productDetails'][$uid]['capacitymax']) > 0) {\n\t\t\t\t$product = $this->lConf['productDetails'][$uid];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// skip because empty or OffTimeProductID\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$i++;\n\t\t\t$offers[$i] = '';\n\t\t\tunset($interval);\n\t\t\tunset($contentError);\n\n\t\t\tif (sizeof($this->lConf['OffTimeProductIDs']) > 0)\n\t\t\t\t$offTimeProducts = ','.implode(',', $this->lConf['OffTimeProductIDs']);\n\n\t\t\tif ($product['maxAvailable'] < $this->lConf['daySelector']) {\n\t\t\t\t$interval['limitedVacancies'] = $availableMaxDate;\n\t\t\t\t$bookNights = $product['maxAvailable'];\n\t\t\t\tif ($product['maxAvailable'] == 1)\n\t\t\t\t\t$text_periods = ' '.$this->pi_getLL('period');\n\t\t\t\telse\n\t\t\t\t\t$text_periods = ' '.$this->pi_getLL('periods');\n\n\t\t\t\t$contentError[] = sprintf($this->pi_getLL('error_vacancies_limited'), $product['maxAvailable'].' '.$text_periods);\n\t\t\t} else {\n\t\t\t\t$bookNights = $this->lConf['daySelector'];\n\t\t\t}\n\n\t\t\tif ($product['minimumStay'] > $this->lConf['daySelector']) {\n\t\t\t\tif ($product['minimumStay'] == 1)\n\t\t\t\t\t$text_periods = ' '.$this->pi_getLL('period');\n\t\t\t\telse\n\t\t\t\t\t$text_periods = ' '.$this->pi_getLL('periods');\n\n\t\t\t\t$contentError[] = sprintf($this->pi_getLL('error_minimumStay'), $product['minimumStay'].' '.$text_periods);\n\t\t\t\tif ($bookNights < $product['minimumStay'])\n\t\t\t\t\t$bookNights = $product['minimumStay'];\n\t\t\t}\n\n\t\t\t// check if checkIn is ok for startDate\n\t\t\tif ($product['prices'][$this->lConf['startDateStamp']]['checkInOk'] === '0') {\n\t\t\t\t$contentError[] = $this->pi_getLL('error_no_checkIn_on').' '.strftime('%a, %x', $this->lConf['startDateStamp']);\n\t\t\t\t$enableBookingLink = 0;\n\t\t\t\tfor ($j=$this->lConf['startDateStamp']; $j < strtotime('+14 day', $this->lConf['startDateStamp']); $j=strtotime('+1 day', $j)) {\n\n\t\t\t\t\tif ($product['prices'][$j]['checkInOk'] == '1') {\n\t\t\t\t\t\t$interval['startDate'] = $j;\n\n\t\t\t\t\t\tif ($this->lConf['enableBookingLink']) {\n\t\t\t\t\t\t\t$params_united = $interval['startDate'].'_'.$bookNights.'_'.$this->lConf['adultSelector'].'_'.$product['uid'].$offTimeProducts.'_'.$this->lConf['uidpid'].'_'.$this->lConf['PIDbooking'].'_bor1';\n\t\t\t\t\t\t\t$conf['additionalParams'] = '&'.$this->prefixId.'[ABx]='.$params_united;\n\t\t\t\t\t\t\t$url = $this->cObj->typoLink(strftime('%a, %x', $interval['startDate']), $conf);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$url = strftime('%a, %x', $j);\n\n\t\t\t\t\t\t$contentError[] = $this->pi_getLL('error_next_checkIn_on').' '.$url;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else\n\t\t\t\t$enableBookingLink = $this->lConf['enableBookingLink'];\n\n\t\t\t// show calendar list only up to the vacant day\n\t\t\tif (empty($interval['startDate']))\n\t\t\t\t$interval['startDate'] = $this->lConf['startDateStamp'];\n\t\t\t$interval['endDate'] = strtotime('+'.$bookNights.' day', $this->lConf['startDateStamp']);\n\n\t\t\t$params_united = $interval['startDate'].'_'.$bookNights.'_'.$this->lConf['adultSelector'].'_'.$product['uid'].$offTimeProducts.'_'.$this->lConf['uidpid'].'_'.$this->lConf['PIDbooking'].'_bor1';\n\n\t\t\tif (!empty($product['uiddetails']) && !empty($product['detailsRaw']['header'])) {\n\t\t\t\t// get detailed description:\n\t\t\t\t$title = $product['detailsRaw']['header'];\n \n\t\t\t} else {\n\t\t\t\t$title = $product['title'];\n\t\t\t}\n\n\t\t\tif (!empty($product['detailsRaw']['bodytext']) && !empty($product['uiddetails'])) {\n\n\t\t\t\t$mconf['tables'] = 'tt_content';\n\t\t\t\t$mconf['source'] = explode('#', $product['uiddetails'])[1];\n\t\t\t\t$mconf['dontCheckPid'] = 1;\n\n\t\t\t\t$bodytext = $this->cObj->cObjGetSingle('RECORDS', $mconf);\n\n\t\t\t} else {\n\n\t\t\t\tunset($bodytext);\n\n\t\t\t}\n\n\t\t\tif ($enableBookingLink) {\n\t\t\t\t$conf['additionalParams'] = '&'.$this->prefixId.'[ABx]='.$params_united.'&'.$this->prefixId.'[abnocache]=1';\n\t\t\t\t$link = $this->cObj->typoLink($title, $conf);\n\t\t\t}\n\t\t\telse\n\t\t\t\t$link = $title;\n\n\t\t\t$linkBookNow = '';\n\t\t\tif ($product['maxAvailable'] > 0) {\n\t\t\t\t$offers['numOffers']++;\n\t\t\t\t$offers[$i] .= '<li class=\"offerList\"><div class=\"productTitle\">'.$link.' <b>'.strtolower($this->pi_getLL('result_available')).'</b></div>';\n\t\t\t\t$availableMaxDate = strtotime('+ '.$product['maxAvailable'].' days', $this->lConf['startDateStamp']);\n\n\t\t\t\tif (count($contentError)>0) {\n\t\t\t\t\t$offers[$i] .= '<ul class=\"errorHints\">';\n\t\t\t\t\tforeach ($contentError as $error)\n\t\t\t\t\t\t$offers[$i] .= '<li>'.$error.'</li>';\n\t\t\t\t\t$offers[$i] .= '</ul>';\n\t\t\t\t}\n\t\t\t\t$offers[$i] .= $bodytext;\n\n\t\t\t\tif ($enableBookingLink)\n\t\t\t\t\t$offers[$i] .='<form class=\"requestForm\" action=\"'.$this->pi_getPageLink($this->lConf['gotoPID']).'\" method=\"POST\">';\n\n\t\t\t\t$offers[$i] .= $this->printCalculatedRates($uid, $bookNights, 1, 1);\n\n\t\t\t\tif ($enableBookingLink)\n\t\t\t\t\t$linkBookNow = '<input type=\"hidden\" name=\"'.$this->prefixId.'[ABx]\" value=\"'.$params_united.'\">\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"'.$this->prefixId.'[abnocache]\" value=\"1\">\n\t\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"'.$this->prefixId.'[ABwhatToDisplay]\" value=\"BOOKING\"><br/>\n\t\t\t\t\t\t\t\t\t<input class=\"submit\" type=\"submit\" name=\"'.$this->prefixId.'[submit_button]\" value=\"'.htmlspecialchars($this->pi_getLL('bookNow')).'\">\n\t\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t';\n\n\t\t\t} else {\n\t\t\t\t$offers[$i] .= '<li class=\"offerList\"><div class=\"productTitle\"><b>'.$title.' '.strtolower($this->pi_getLL('result_occupied')).'</b> </div>';\n\t\t\t}\n\n\t\t\t// show calendars following TS settings\n\t\t\tif ($this->lConf['form']['showCalendarMonth']>0) {\n\t\t\t\tif (intval($this->lConf['form']['showMonthsBeforeStart'])>0)\n\t\t\t\t\t$intval['startDate'] = strtotime('-'.$this->lConf['form']['showMonthsBeforeStart'].' months', $interval['startDate']);\n\t\t\t\telse\n\t\t\t\t\t$intval['startDate'] = $interval['startDate'];\n\t\t\t\t$intval['endDate'] = strtotime('+'.$this->lConf['form']['showCalendarMonth'].' months', $intval['startDate']);\n\t\t\t\t$offers[$i] .= tx_abbooking_div::printAvailabilityCalendarDiv($product['uid'].$offTimeProducts, $intval, $this->lConf['form']['showCalendarMonth'], 0);\n\n\t\t\t} else if ($this->lConf['form']['showCalendarWeek']>0) {\n\t\t\t\t\t$intval['startDate'] = $interval['startDate'];\n\t\t\t\t$intval['endDate'] = strtotime('+'.$this->lConf['form']['showCalendarWeek'].' weeks', $intval['startDate']);\n\t\t\t\t$offers[$i] .= tx_abbooking_div::printAvailabilityCalendarLine($product['uid'].$offTimeProducts, $intval);\n\t\t\t} else\n\t\t\t\t$offers[$i] .= tx_abbooking_div::printAvailabilityCalendarLine($product['uid'].$offTimeProducts, $interval);\n\n\t\t\tif ($enableBookingLink)\n\t\t\t\t$offers[$i] .= $linkBookNow;\n\t\t\t// close list item...\n\t\t\t$offers[$i] .= '</li>';\n\t\t}\n\t$offers['amount'] = $i;\n\treturn $offers;\n\t}", "function obj_cx_events_list_inner( $events, $bottom_banner, $pagination, $event_list_deets = null ) {\n echo '<h3 class=\"section-title green\">Upcoming events</h3>';\n obj_do_cx_events_list_filter( $events );\n obj_do_cx_events_list( $events );\n obj_do_cx_event_bottom_banner_output( $bottom_banner );\n obj_do_cx_events_list_pagination( $pagination );\n}", "protected function getPendingAppointments($args) {\n\n if ($args['ent_date_time'] == '')\n return $this->_getStatusMessage(1, 1);\n\n $this->curr_date_time = urldecode($args['ent_date_time']);\n\n $returned = $this->_validate_token($args['ent_sess_token'], $args['ent_dev_id'], '1');\n\n if (is_array($returned))\n return $returned;\n\n// $curr_date = date('Y-m-d H:i:s', time());\n// $curr_date_bfr_30min = date('Y-m-d H:i:s', time() - 1800);\n// $curr_date_bfr_1hr = date('Y-m-d H:i:s', time() - 3600);\n\n\n $selectAppntsQry = \"select p.profile_pic,p.first_name,p.phone,p.email,a.appt_lat,a.appt_long,a.appointment_dt,a.extra_notes,a.address_line1,a.address_line2,a.status,a.booking_type from appointment a, slave p \";\n $selectAppntsQry .= \" where p.slave_id = a.slave_id and a.status = 1 and a.mas_id = '\" . $this->User['entityId'] . \"' order by a.appointment_dt DESC\"; // and a.appointment_dt >= '\" . $curr_date_bfr_1hr . \"'\n\n $selectAppntsRes = mysql_query($selectAppntsQry, $this->db->conn);\n\n if (mysql_num_rows($selectAppntsRes) <= 0)\n return $this->_getStatusMessage(30, $selectAppntsQry);\n\n $pending_appt = array();\n\n while ($appnt = mysql_fetch_assoc($selectAppntsRes)) {\n\n if ($appnt['profile_pic'] == '')\n $appnt['profile_pic'] = $this->default_profile_pic;\n\n $pending_appt[] = array('apntDt' => $appnt['appointment_dt'], 'pPic' => $appnt['profile_pic'], 'email' => $appnt['email'],\n 'fname' => $appnt['first_name'], 'phone' => $appnt['phone'], 'apntTime' => date('H:i', strtotime($appnt['appointment_dt'])),\n 'apntDate' => date('Y-m-d', strtotime($appnt['appointment_dt'])), 'apptLat' => (double) $appnt['appt_lat'], 'apptLong' => (double) $appnt['appt_long'],\n 'addrLine1' => urldecode($appnt['address_line1']), 'addrLine2' => urldecode($appnt['address_line2']), 'notes' => $appnt['extra_notes'], 'bookType' => $appnt['booking_type']);\n }\n\n\n $errMsgArr = $this->_getStatusMessage(31, 2);\n\n return array('errNum' => $errMsgArr['errNum'], 'errFlag' => $errMsgArr['errFlag'], 'errMsg' => $errMsgArr['errMsg'], 'appointments' => $pending_appt); //,'test'=>$selectAppntsQry,'test1'=>$appointments);\n }", "public function testListTasks()\n {\n $this->withoutMiddleware();\n $get = $this->json('GET','/api/v1/tasks');\n $this->assertResponseOk();\n $response = json_decode($get->response->getContent(), true);\n $this->assertNotNull($response, 'Test if is a valid json');\n $this->assertTrue(json_last_error() == JSON_ERROR_NONE, 'Test if the response was ok');\n $this->assertCount(0,$response, 'Test if query count is zero');\n //Test for a non empty list\n $tasks = factory(Task::class,2)->create();\n $get = $this->json('GET', 'api/v1/tasks');\n $this->assertResponseOk();\n $response = json_decode($get->response->getContent(), true);\n $this->assertNotNull($response, 'Test if is a valid json');\n $this->assertTrue(json_last_error() == JSON_ERROR_NONE, 'Test if the response was ok');\n $this->assertCount(2, $response, 'Test if query count is 2');\n\n $tasks->each(function($item, $key) use ($response){\n $this->assertObjectEqualsExclude($item,$response[$key]);\n });\n }", "protected function wrapResults($outputs)\n {\n return new LastFm_Artist_GetPastEvents_Results($outputs);\n }", "public function testListQrcodesPagination()\n {\n $this->makeData(self::NUMBER_RECORD_CREATE);\n $this->browse(function (Browser $browser) {\n $browser->loginAs($this->user)\n ->visit('/admin/qrcodes');\n $elements = $browser->elements('#list-qrcodes tbody tr');\n $this->assertCount(config('define.qrcodes.limit_rows'), $elements);\n $this->assertNotNull($browser->element('.pagination'));\n $paginate_element = $browser->elements('.pagination li');\n $number_page = count($paginate_element) - 2;\n $this->assertTrue($number_page == ceil((self::NUMBER_RECORD_CREATE + 1) / (config('define.qrcodes.limit_rows'))));\n });\n }", "public function get_plugin_stories_list_page() {\r\n\t\tglobal $wpdb;\r\n\r\n\t\t$stories = $wpdb->get_results( $wpdb->prepare(\"SELECT * FROM `{$this->table_mf_timeline_stories}`\" ), 'ARRAY_A' );\r\n\t?>\r\n\t\t\r\n\t\t<p>Timeline stories enable you to add content to the timeline without the need to create individual posts. You can manage all your timeline stores from this area.</p><br />\r\n\t\t<p><a href=\"?page=mf-timeline&amp;tab=stories&amp;action=editor\" class=\"add-new-h2\">Add New Story</a></p>\r\n\t\t\r\n\t\t<table class=\"widefat post fixed\" cellspacing=\"0\">\r\n\t\t\t<thead>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<th class=\"manage-column\" scope=\"col\" width=\"40\">ID</th>\r\n\t\t\t\t\t<th class=\"manage-column column-title\" scope=\"col\">Story Title</th>\r\n\t\t\t\t\t<th scope=\"col\" width=\"225\">Author</th>\r\n\t\t\t\t\t<th scope=\"col\" width=\"125\">Timeline Date</th>\r\n\t\t\t\t</tr>\t\t\t\r\n\t\t\t</thead>\r\n\t\t\t<tfoot>\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<th class=\"manage-column\" scope=\"col\" width=\"40\">ID</th>\r\n\t\t\t\t\t<th class=\"manage-column column-title\" scope=\"col\">Story Title</th>\r\n\t\t\t\t\t<th scope=\"col column-title\" width=\"225\">Author</th>\r\n\t\t\t\t\t<th scope=\"col column-date\" width=\"125\">Timeline Date</th>\r\n\t\t\t\t</tr>\t\t\t\r\n\t\t\t</tfoot>\r\n\t\t\r\n\t\t\t<tbody>\r\n\t\t\t\t<?php foreach( $stories as $story ) :?>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th scope=\"row\">\r\n\t\t\t\t\t\t\t<?php echo $story['story_id']; ?>\r\n\t\t\t\t\t\t</th>\r\n\t\t\t\t\t\t<td class=\"column-title\">\r\n\t\t\t\t\t\t\t<strong><a class=\"row-title\" href=\"#\"><?php echo stripslashes( $story['story_title'] ); ?></a></strong>\r\n\t\t\t\t\t\t\t<div class=\"row-actions\">\r\n\t\t\t\t\t\t\t\t<span class=\"edit\"><a href=\"?page=mf-timeline&amp;tab=stories&amp;action=editor&amp;story_id=<?php echo $story['story_id']; ?>\">Edit</a> | </span>\r\n\t\t\t\t\t\t\t\t<span class=\"edit\"><a href=\"?page=mf-timeline&amp;tab=stories&amp;action=delete&amp;story_id=<?php echo $story['story_id']; ?>\">Delete Permanently</a></span>\r\n\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td class=\"column-author\">\r\n\t\t\t\t\t\t\t<?php $user = get_userdata( $story['story_author'] );?>\r\n\t\t\t\t\t\t\t<a href=\"#\"><?php echo $user->display_name; ?></a>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<?php echo date( 'Y/m/d', strtotime( $story['timeline_date'] ) );?>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t<?php endforeach;?>\r\n\t\t\t</tbody>\r\n\t\t</table>\r\n\t<?php\t\r\n\t}", "public function indexAction() {\n if (!Engine_Api::_()->core()->hasSubject('sitereview_listing') && !Engine_Api::_()->core()->hasSubject('sitereview_review')) {\n return $this->setNoRender();\n }\n\n if (Engine_Api::_()->core()->hasSubject('sitereview_listing')) {\n $this->view->sitereview = $sitereview = Engine_Api::_()->core()->getSubject();\n } elseif (Engine_Api::_()->core()->hasSubject('sitereview_review')) {\n $this->view->sitereview = $sitereview = Engine_Api::_()->core()->getSubject()->getParent();\n }\n\n //GET SUBJECT\n $this->view->sitereview = $sitereview = Engine_Api::_()->core()->getSubject();\n\n $this->view->viewType = $this->_getParam('viewType', 0);\n $this->view->statistics = $this->_getParam('statistics', array(\"likeCount\", \"reviewCount\", \"commentCount\"));\n Engine_Api::_()->sitereview()->setListingTypeInRegistry($sitereview->listingtype_id);\n $listingtypeArray = Zend_Registry::get('listingtypeArray' . $sitereview->listingtype_id);\n\n //SEND REVIEW TITLE TO TPL\n $this->view->reviewTitleSingular = $listingtypeArray->review_title_singular ? $listingtypeArray->review_title_singular : 'Review';\n $this->view->reviewTitlePlular = $listingtypeArray->review_title_plural ? $listingtypeArray->review_title_plural : 'Reviews';\n \n if (!empty($this->view->statistics) && empty($listingtypeArray->reviews) || $listingtypeArray->reviews == 1) {\n $key = array_search('reviewCount', $this->view->statistics);\n if (!empty($key)) {\n unset($this->view->statistics[$key]);\n }\n }\n\n $values = array();\n $values['listing_id'] = $sitereview->listing_id;\n $this->view->count = $limit = $values['limit'] = $this->_getParam('itemCount', 3);\n $values['similar_items_order'] = 1;\n $this->view->title_truncation = $this->_getParam('truncation', 24);\n $values['ratingType'] = $this->view->ratingType = $this->_getParam('ratingType', 'rating_avg');\n $listingTable = Engine_Api::_()->getDbTable('listings', 'sitereview');\n\n $similar_items = Engine_Api::_()->getDbTable('otherinfo', 'sitereview')->getColumnValue($sitereview->listing_id, 'similar_items');\n $similarItems = array();\n if (!empty($similar_items)) {\n $similarItems = Zend_Json_Decoder::decode($similar_items);\n }\n\n $showSameCategoryListings = $this->_getParam('showSameCategoryListings', 1);\n \n if (!empty($similar_items) && !empty($similarItems) && Count($similarItems) >= 0) {\n $values['similarItems'] = $similarItems;\n $this->view->listings = $listingTable->getListing('', $values);\n } else {\n \n if(!$showSameCategoryListings) {\n return $this->setNoRender();\n } \n \n $values['listingtype_id'] = $sitereview->listingtype_id;\n\n if ($sitereview->subsubcategory_id) {\n $values['subsubcategory_id'] = $sitereview->subsubcategory_id;\n } elseif ($sitereview->subcategory_id) {\n $values['subcategory_id'] = $sitereview->subcategory_id;\n } elseif ($sitereview->category_id) {\n $values['category_id'] = $sitereview->category_id;\n } else {\n return $this->setNoRender();\n }\n\n $this->view->listings = $listingTable->getListing('', $values);\n }\n\n if (Engine_API::_()->seaocore()->checkSitemobileMode('fullsite-mode')) {\n $this->_childCount = count($this->view->listings);\n } else {\n $this->view->listings->setCurrentPageNumber($this->_getParam('page'));\n $this->view->listings->setItemCountPerPage($limit);\n $this->_childCount = $this->view->listings->getTotalItemCount();\n }\n\n if ($this->_childCount <= 0) {\n return $this->setNoRender();\n }\n\n $this->view->columnWidth = $this->_getParam('columnWidth', '180');\n $this->view->columnHeight = $this->_getParam('columnHeight', '328');\n }", "public function testNineResults()\n {\n $response = $this->json('get', '/example', ['count' => 9]);\n $json = $response->json();\n $this->assertCount(9, $json['data']);\n $response->assertStatus(200);\n }", "public function testGetViewingHistory()\n\t{\n\t\t$this->be(User::first());\n\t\t$video_id = Video::first()->id;\n\t\t$response = $this->action('GET', 'ApiViewingHistoryController@getIndex',[],['video_id' => $video_id]);\n\t\t\n\t\t$this->assertInstanceOf('Illuminate\\Http\\JsonResponse', $response);\n\t\t$this->assertResponseOk();\n\t}", "public function testReportsSpamchecksHistoryGet()\n {\n }", "public function showpollsAction()\n {\n $polls = $this->getDoctrine()->getRepository('PollPollBundle:PollImpl')->findAll();\n return $this->render('PollPollBundle:Poll:show_polls.html.twig', array(\"polls\" => array_reverse($polls)));\n }", "public function testWebSearchForSite()\n {\n $webResultSet = $this->_yahoo->webSearch('php', ['site' => 'www.php.net']);\n\n $this->assertTrue($webResultSet instanceof Zend_Service_Yahoo_WebResultSet);\n\n $this->assertTrue($webResultSet->totalResultsAvailable > 10);\n $this->assertEquals(10, $webResultSet->totalResultsReturned);\n $this->assertEquals(10, $webResultSet->totalResults());\n $this->assertEquals(1, $webResultSet->firstResultPosition);\n\n foreach ($webResultSet as $webResult) {\n $this->assertTrue($webResult instanceof Zend_Service_Yahoo_WebResult);\n }\n }", "public function testIgnoringMinusOneLapTimes()\n {\n // The path to the data source\n $file_path = realpath(\n __DIR__.'/logs/assettocorsa/3.sessions.with.-1.times.json');\n\n // Get qualify\n $session = Data_Reader::factory($file_path)->getSession(2);\n\n // Test pole\n $participants = $session->getParticipants();\n $participant = $participants[0];\n $this->assertSame('Andrea G', $participant->getDriver()->getName());\n $this->assertSame(72.665, $participant->getbestLap()->getTime());\n $this->assertCount(8, $participant->getLaps());\n\n // Invalid lap (cuts)\n $this->assertNull($participant->getLap(6)->getTime());\n $this->assertSame(0, count($participant->getLap(6)->getSectorTimes()));\n $cuts = $participant->getLap(6)->getCuts();\n // Not values known\n $this->assertSame(null, $cuts[0]->getCutTime());\n $this->assertSame(null, $cuts[0]->getTimeSkipped());\n $this->assertSame(null, $cuts[0]->getElapsedSeconds());\n $this->assertSame(null, $cuts[0]->getDate());\n\n }", "public function getLtst() {\n $query = \"SELECT * FROM movies ORDER BY id DESC LIMIT 24\";\n $stmt = $this->conn->prepare($query);\n $stmt->execute();\n $result = $stmt->fetchAll(PDO::FETCH_CLASS);\n if($result) {\n return json_response(200, \"success\", $result);\n } else {\n return json_response(404, \"No titles found\");\n }\n }", "public function testGetMessageListAppointments()\r\n\t{\r\n\t\t// Create an event to make sure we have at least one\r\n\t\t$obj = CAntObject::factory($this->dbh, \"calendar_event\", null, $this->user);\r\n\t\t$obj->setValue(\"name\", \"My Test Event\");\r\n\t\t$obj->setValue(\"ts_start\", date(\"m/d/Y\") . \" 12:00 PM\");\r\n\t\t$obj->setValue(\"ts_end\", date(\"m/d/Y\") . \" 01:00 PM\");\r\n\t\t$eid = $obj->save();\r\n\r\n\t\t// Get events\r\n\t\t$events = $this->backend->GetMessageList(\"calendar_root\", time()); // second param cuts off to today\r\n\t\t$found = false;\r\n\t\tforeach ($events as $evt)\r\n\t\t{\r\n\t\t\tif ($evt[\"id\"] == $eid)\r\n\t\t\t\t$found = true;\r\n\t\t}\r\n\t\t$this->assertTrue($found);\r\n\r\n\t\t// Cleanup\r\n\t\t$obj->removeHard();\r\n\t}", "function testFindBooksResults() {\n\n /* test title */\n echo '<h2 style=\"color: black;\">testFindBookResults...</h2>';\n\n /* can't page layout because of the indeterminate nature of\n * results (i.e. we can't guarantee there's a book in the \n * production database, and the page layout depends on whether\n * or not there's a result)*/\n\n /* a fix for this could be to possibly display the\n * container (div or whatever) for results, then just\n * not populate it with anything if no results */\n\n $this->assertTrue(1);\n\n }", "public function testEventsList()\n {\n $response = $this->get('/events');\n\n $response->assertStatus(200);\n }", "public function run(&$results)\n {\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.1', '\\Flexio\\Base\\Util::createPageRangeArray(); invalid page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"invalid\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.2', '\\Flexio\\Base\\Util::createPageRangeArray(); invalid page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\",\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.3', '\\Flexio\\Base\\Util::createPageRangeArray(); invalid page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"-\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.4', '\\Flexio\\Base\\Util::createPageRangeArray(); invalid page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\",,-,,\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.5', '\\Flexio\\Base\\Util::createPageRangeArray(); invalid page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1,\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.6', '\\Flexio\\Base\\Util::createPageRangeArray(); invalid page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\",1\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.7', '\\Flexio\\Base\\Util::createPageRangeArray(); invalid page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1-\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.8', '\\Flexio\\Base\\Util::createPageRangeArray(); invalid page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1,invalid\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.9', '\\Flexio\\Base\\Util::createPageRangeArray(); invalid page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1 2\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.10', '\\Flexio\\Base\\Util::createPageRangeArray(); invalid page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1 last\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.11', '\\Flexio\\Base\\Util::createPageRangeArray(); invalid page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1 2,3 4\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.12', '\\Flexio\\Base\\Util::createPageRangeArray(); invalid page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1,,2\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.13', '\\Flexio\\Base\\Util::createPageRangeArray(); invalid page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1--2\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.14', '\\Flexio\\Base\\Util::createPageRangeArray(); invalid page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1,null,3\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.14', '\\Flexio\\Base\\Util::createPageRangeArray(); invalid page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1,false,3\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.14', '\\Flexio\\Base\\Util::createPageRangeArray(); invalid page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1,2.1,3\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.15', '\\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1.1-2\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.16', '\\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"2-3.1\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.17', '\\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1-LAST\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.18', '\\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"true\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.19', '\\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1-true\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('A.20', '\\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input', $actual, $expected, $results);\n\n\n // TEST: \\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"none\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('B.1', '\\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"-1\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('B.2', '\\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"0\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('B.3', '\\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1\", 10);\n $expected = [1];\n \\Flexio\\Tests\\Check::assertArray('B.4', '\\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"10\", 10);\n $expected = [10];\n \\Flexio\\Tests\\Check::assertArray('B.5', '\\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"11\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('B.6', '\\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\" 1,2 , 9 ,10 \", 10);\n $expected = [1,2,9,10];\n \\Flexio\\Tests\\Check::assertArray('B.7', '\\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"0,1,2,9,10,11\", 10);\n $expected = [1,2,9,10];\n \\Flexio\\Tests\\Check::assertArray('B.8', '\\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"last\", 10);\n $expected = [10];\n \\Flexio\\Tests\\Check::assertArray('B.9', '\\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1,last\", 10);\n $expected = [1,10];\n \\Flexio\\Tests\\Check::assertArray('B.10', '\\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"last,1\", 10);\n $expected = [1,10];\n \\Flexio\\Tests\\Check::assertArray('B.11', '\\Flexio\\Base\\Util::createPageRangeArray(); basic delimited page input', $actual, $expected, $results);\n\n\n // TEST: \\Flexio\\Base\\Util::createPageRangeArray(); basic range page input\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"0-1\", 10);\n $expected = [1];\n \\Flexio\\Tests\\Check::assertArray('C.1', '\\Flexio\\Base\\Util::createPageRangeArray(); basic range page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"10-11\", 10);\n $expected = [10];\n \\Flexio\\Tests\\Check::assertArray('C.2', '\\Flexio\\Base\\Util::createPageRangeArray(); basic range page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1-2,9-10\", 10);\n $expected = [1,2,9,10];\n \\Flexio\\Tests\\Check::assertArray('C.3', '\\Flexio\\Base\\Util::createPageRangeArray(); basic range page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1-last\", 10);\n $expected = [1,2,3,4,5,6,7,8,9,10];\n \\Flexio\\Tests\\Check::assertArray('C.4', '\\Flexio\\Base\\Util::createPageRangeArray(); basic range page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"2-last\", 10);\n $expected = [2,3,4,5,6,7,8,9,10];\n \\Flexio\\Tests\\Check::assertArray('C.5', '\\Flexio\\Base\\Util::createPageRangeArray(); basic range page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"9-last\", 10);\n $expected = [9,10];\n \\Flexio\\Tests\\Check::assertArray('C.6', '\\Flexio\\Base\\Util::createPageRangeArray(); basic range page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"2-1\", 10);\n $expected = [];\n \\Flexio\\Tests\\Check::assertArray('C.7', '\\Flexio\\Base\\Util::createPageRangeArray(); basic range page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1-2,4-3\", 10);\n $expected = [1,2];\n \\Flexio\\Tests\\Check::assertArray('C.8', '\\Flexio\\Base\\Util::createPageRangeArray(); basic range page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"4-3,1-2\", 10);\n $expected = [1,2];\n \\Flexio\\Tests\\Check::assertArray('C.9', '\\Flexio\\Base\\Util::createPageRangeArray(); basic range page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1-2,last-9\", 10);\n $expected = [1,2];\n \\Flexio\\Tests\\Check::assertArray('C.10', '\\Flexio\\Base\\Util::createPageRangeArray(); basic range page input', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"last-9,1-2\", 10);\n $expected = [1,2];\n \\Flexio\\Tests\\Check::assertArray('C.11', '\\Flexio\\Base\\Util::createPageRangeArray(); basic range page input', $actual, $expected, $results);\n\n\n // TEST: \\Flexio\\Base\\Util::createPageRangeArray(); sort and remove duplicates\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1,1\", 10);\n $expected = [1];\n \\Flexio\\Tests\\Check::assertArray('D.1', '\\Flexio\\Base\\Util::createPageRangeArray(); sort and remove duplicates', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"last,last\", 10);\n $expected = [10];\n \\Flexio\\Tests\\Check::assertArray('D.2', '\\Flexio\\Base\\Util::createPageRangeArray();sort and remove duplicates', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"10,last\", 10);\n $expected = [10];\n \\Flexio\\Tests\\Check::assertArray('D.3', '\\Flexio\\Base\\Util::createPageRangeArray();sort and remove duplicates', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"2,1\", 10);\n $expected = [1,2];\n \\Flexio\\Tests\\Check::assertArray('D.4', '\\Flexio\\Base\\Util::createPageRangeArray();sort and remove duplicates', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"1,3,2-4\", 10);\n $expected = [1,2,3,4];\n \\Flexio\\Tests\\Check::assertArray('D.5', '\\Flexio\\Base\\Util::createPageRangeArray();sort and remove duplicates', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"6-8,1-3,2-4,3-7\", 10);\n $expected = [1,2,3,4,5,6,7,8];\n \\Flexio\\Tests\\Check::assertArray('D.6', '\\Flexio\\Base\\Util::createPageRangeArray();sort and remove duplicates', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"9-11,last\", 10);\n $expected = [9,10];\n \\Flexio\\Tests\\Check::assertArray('D.7', '\\Flexio\\Base\\Util::createPageRangeArray();sort and remove duplicates', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"last,9-11\", 10);\n $expected = [9,10];\n \\Flexio\\Tests\\Check::assertArray('D.8', '\\Flexio\\Base\\Util::createPageRangeArray();sort and remove duplicates', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"11-9,last\", 10);\n $expected = [10];\n \\Flexio\\Tests\\Check::assertArray('D.9', '\\Flexio\\Base\\Util::createPageRangeArray();sort and remove duplicates', $actual, $expected, $results);\n\n // BEGIN TEST\n $actual = \\Flexio\\Base\\Util::createPageRangeArray(\"last,11-9\", 10);\n $expected = [10];\n \\Flexio\\Tests\\Check::assertArray('D.10', '\\Flexio\\Base\\Util::createPageRangeArray();sort and remove duplicates', $actual, $expected, $results);\n }", "public function test_admin_tribe_list_b()\n {\n $this->request('GET', ['pages/Assignments', 'tribe_list']);\n $this->assertResponseCode(404);\n }", "public function testCurrentEvents()\n {\n // otherwise test will fail.\n // Other approach is to use fake data or mock it.\n \n $response = $this->json('GET', '/events/current');\n \n $response\n ->assertStatus(200)\n ->assertJson([\n ['name' => 'Electrical Seminar']\n ]);\n }", "public function findAllByDatePassed($daysPast)\n {\n $sql = <<<SQL\n SELECT s.*, p.title as program_name \n FROM ec_shows s, ec_programs p\n WHERE airdate < ?\n AND s.program_id = p.id\nSQL;\n $sqlQuery = new SqlQuery($sql);\n $targetDate = strtotime($daysPast.\" days\");\n\n $sqlQuery->set(date('Y-m-d', $targetDate));\n return $this->getList($sqlQuery);\n }", "public function testResults()\n {\n $search_term = $this->getSearchTerm();\n $website = $this->getWebsite();\n $limit = $this->getLimit();\n\n $request = $this->mockHttpRequest([\n 'query' => $search_term,\n 'website' => $website\n ]);\n $service = $this->mockGoogleSearchServiceForSearch($search_term, $website, $limit);\n\n $controller = new SearchResultsController($request, $service);\n\n $result = $controller->results();\n\n $this->assertInstanceOf(Views\\Listing::class, $result);\n $this->assertIsArray($result->getData());\n $this->assertEquals($result->getData(), [\n 'search_results' => [],\n 'total_mentions' => 0,\n 'query' => $search_term,\n 'website' => $website,\n 'total_searched' => $limit\n ]);\n }", "public function iN_ListQuestionAnswerFromLanding() {\n\t\t$query = mysqli_query($this->db, \"SELECT * FROM i_landing_qa WHERE qa_status = '1'\") or die(mysqli_error($this->db));\n\t\twhile ($row = mysqli_fetch_array($query, MYSQLI_ASSOC)) {\n\t\t\t// Store the result into array\n\t\t\t$data[] = $row;\n\t\t}\n\t\tif (!empty($data)) {\n\t\t\treturn $data;\n\t\t}\n\t}", "function list_schedules_screen( $vars ) {\r\n $vars['schedules'] = $this->has_schedules();\r\n $vars['assignments'] = BPSP_Assignments::has_assignments();\r\n \r\n if( empty( $vars['schedules'] ) && empty( $vars['assignments'] ) )\r\n $vars['message'] = __( 'No schedules exist.', 'bpsp' );\r\n \r\n $vars['name'] = 'list_schedules';\r\n $vars['trail'] = array(\r\n __( 'Available Schedules', 'bpsp' ) => ''\r\n );\r\n return $vars;\r\n }", "public function testMovieStatus()\n {\n // Find from back date so that results are returned\n $response = $this->get('/api/movies?genre=Animation&showTime=2018-02-01T00:09:00');\n $response->assertStatus(200);\n }", "public function index()\n {\n $hostedEvents = \\Auth::user()->events()\n ->where('event_date', '>', date('Y-m-d H:i'))\n ->orderBy('event_date', 'desc')\n ->get();\n\n foreach($hostedEvents as $event) {\n $event->playersCount = \\DB::table('event_user')\n ->where('event_id', $event->id)\n ->where('status', 'approved')\n ->count();\n }\n\n $appliedEvents = \\DB::table('events')\n ->join('event_user', 'events.id', '=', 'event_user.event_id')\n ->select('events.*', 'event_user.status')\n ->where('event_user.user_id', \\Auth::id())\n ->whereIn('event_user.status', ['pending', 'approved'])\n ->orderBy('event_date', 'desc')\n ->where('event_date', '>', date('Y-m-d H:i'))\n ->get();\n\n foreach($appliedEvents as $event) {\n $event->playersCount = \\DB::table('event_user')\n ->where('event_id', $event->id)\n ->where('status', 'approved')\n ->count();\n }\n\n $pastEvents = \\DB::table('events')\n ->join('event_user', 'event_user.event_id', '=', 'events.id')\n ->where('event_date', '<', date('Y-m-d H:i'))\n ->where('event_user.user_id', '=', \\Auth::id())\n ->orderBy('events.event_date', 'desc')\n ->get(['events.*']);\n\n //$pastEvents = \\Auth::user()->events()->where('event_date', '<', date('Y-m-d H:i'));\n\n return view('events.index')->with('hostedEvents', $hostedEvents)\n ->with('appliedEvents', $appliedEvents)\n ->with('pastEvents', $pastEvents);\n }", "public function index_should_return_a_collection_of_records()\r\n {\r\n // by year collection\r\n $this->get('/holidays/us/2018/');\r\n $body = json_decode($this->response->getContent(), true );\r\n $this->assertArrayHasKey('holidays', $body);\r\n $this->assertCount(47, $body['holidays']);\r\n $this->assertArrayHasKey('2018-02-19', $body['holidays']);\r\n\r\n $arr= $body['holidays']['2018-02-19'];\r\n $this->assertCount(1, $arr);\r\n $this->assertEquals( $arr[0]['name'], 'Washington\\'s Birthday');\r\n $this->assertEquals( $arr[0]['country'], 'us');\r\n $this->assertEquals( $arr[0]['date'], '2018-02-19');\r\n $this->assertEquals( $arr[0]['public'], '0');\r\n\r\n ///////////////////////////////\r\n // public\r\n $this->get('/holidays/us/2018/?public=1');\r\n $body = json_decode($this->response->getContent(), true );\r\n $this->assertArrayHasKey('holidays', $body);\r\n $this->assertCount(7, $body['holidays']);\r\n $this->assertArrayHasKey('2018-01-01', $body['holidays']);\r\n\r\n $arr= $body['holidays']['2018-01-01'];\r\n $this->assertCount(2, $arr);\r\n $this->assertEquals( $arr[1]['name'], 'New Year\\'s Day');\r\n $this->assertEquals( $arr[1]['country'], 'us');\r\n $this->assertEquals( $arr[1]['date'], '2018-01-01');\r\n $this->assertEquals( $arr[1]['public'], '1');\r\n\r\n ///////////////////////\r\n // month\r\n $this->get('/holidays/us/2018/?month=3')\r\n ->seeJson( [\r\n 'status'=> 200,\r\n 'message'=>'succeeded with content',\r\n 'holidays'=>[\r\n [\r\n 'name'=>'International Women\\'s Day',\r\n 'country'=> 'us',\r\n 'date'=>'2018-03-08',\r\n 'public'=> 0\r\n ],\r\n [\r\n 'name'=>'Saint Patrick\\'s Day',\r\n 'country'=> 'us',\r\n 'date'=>'2018-03-17',\r\n 'public'=> 0\r\n ],\r\n [\r\n 'name'=>'Palm Sunday',\r\n 'country'=> 'us',\r\n 'date'=>'2018-03-25',\r\n 'public'=> 0\r\n ],\r\n [\r\n 'name'=>'Good Friday',\r\n 'country'=> 'us',\r\n 'date'=>'2018-03-30',\r\n 'public'=> 1\r\n ]\r\n ]\r\n ] );\r\n }", "public function testlistAction() \n {\n $model = new Application_Model_Mapper_Server($vars);\n $result = $model->getTestDetails();\n $data = array();\n $result = json_encode($result);\n $this->view->assign('result', $result);\n $this->_helper->viewRenderer('index');\n }", "public function testFetchEvents() {\n\t\t$jsonpad = parent::_getJsonpadInstance();\n\t\t\n\t\t// Fetch the events\n\t\t$total = 0;\n\t\t$events = $jsonpad->fetchEvents(1, null, null, $total);\n\t\t$this->assertInternalType(\"array\", $events);\n\t\t$this->assertGreaterThanOrEqual(1, $total);\n\t\t$this->assertInstanceOf(\"\\Jsonpad\\Resource\\Event\", $events[0]);\n\t}", "public function testJobListFromJobSchedule()\n {\n\n }" ]
[ "0.6463519", "0.5745448", "0.54532343", "0.5325194", "0.52149856", "0.5209032", "0.51816463", "0.51735336", "0.51557595", "0.5139043", "0.51316184", "0.5059295", "0.5046634", "0.5028113", "0.501984", "0.4969596", "0.491994", "0.491994", "0.49058336", "0.48983213", "0.4859388", "0.48249108", "0.4816857", "0.47789714", "0.4742196", "0.4714494", "0.46652633", "0.46232188", "0.45920423", "0.4574662", "0.45481387", "0.45464778", "0.45335996", "0.4533376", "0.45325708", "0.45252365", "0.45197937", "0.45159265", "0.45092374", "0.4505097", "0.44988826", "0.44897294", "0.44817758", "0.4470502", "0.44660097", "0.44567916", "0.4454706", "0.44535264", "0.44465068", "0.44425544", "0.4426953", "0.44260827", "0.44096062", "0.44006222", "0.43991047", "0.43982372", "0.43947223", "0.43925706", "0.4379028", "0.43749046", "0.43669006", "0.43638477", "0.43625244", "0.43611085", "0.4355479", "0.435201", "0.4350446", "0.4350446", "0.43490225", "0.43475217", "0.4347398", "0.4347268", "0.4344163", "0.43374023", "0.43259612", "0.43252635", "0.43171933", "0.429502", "0.42933744", "0.42887568", "0.42782602", "0.42756295", "0.42669514", "0.4262158", "0.42615652", "0.42575374", "0.4257504", "0.42526573", "0.42445877", "0.4242206", "0.4241483", "0.42393878", "0.4238355", "0.42306128", "0.42305696", "0.4227768", "0.42232016", "0.42123443", "0.42084444", "0.42070913" ]
0.79743946
0
Test case for listPastWebinarQA List Q&A of Past Webinar.
Тест-кейс для списка List Q&A прошлого вебинара.
public function testListPastWebinarQA() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testListPastWebinarPollResults()\n {\n }", "public function testPastWebinars()\n {\n }", "public function testWebinarPanelists()\n {\n }", "public function testListPastWebinarFiles()\n {\n }", "public function testWebinarPolls()\n {\n }", "public function testWebinarAbsentees()\n {\n }", "public function testWebinarRegistrantsQuestionsGet()\n {\n }", "public function test_all_questions_and_answers_route_when_questioner_has_sitewide_role() {\n global $DB;\n\n // create a user\n $user = $this->getDataGenerator()->create_user();\n $roleid = $DB->get_field('role', 'id', array('shortname' => 'manager'));\n $this->getDataGenerator()->role_assign($roleid, $user->id);\n\n // create a course\n $course = $this->getDataGenerator()->create_course();\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n $now = time();\n\n $this->loadDataSet($this->createArrayDataSet(array(\n 'videoquanda_questions' => array(\n array('id', 'instanceid', 'userid', 'timecreated', 'timemodified' ,'seconds', 'text'),\n array(1, $videoquanda->id, $user->id, $now, $now + 1, 2, 'dummy text')\n )\n )));\n\n $this->setUser($user);\n $client = new Client($this->_app);\n $client->request('GET', '/api/v1/' . $videoquanda->id . '/questions');\n $json = $client->getResponse()->getContent();\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $array = (array) json_decode($json);\n $this->assertCount(1, $array);\n }", "public function testListQrcodes()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs($this->user)\n ->visit('/admin')\n ->clickLink('Qrcodes')\n ->assertPathIs('/admin/qrcodes')\n ->assertSee('List Qrcodes');\n });\n }", "public function testWebinarPanelistCreate()\n {\n }", "public function testPastEmbargo()\n {\n $page = $this->objFromFixture(SiteTree::class, 'pastEmbargo');\n\n $page = $this->finishWorkflow($page);\n\n $this->assertNotEquals(0, $page->PublishJobID);\n $this->assertEquals(0, $page->UnPublishJobID);\n\n $publish = strtotime($page->PublishJob()->StartAfter ?? '');\n $this->assertFalse($publish);\n }", "public function test_admin_squad_list_b()\n {\n $this->request('GET', ['pages/Assignments', 'squad_list']);\n $this->assertResponseCode(404);\n }", "public function test_admin_tribe_list_b()\n {\n $this->request('GET', ['pages/Assignments', 'tribe_list']);\n $this->assertResponseCode(404);\n }", "public function testGetSurveyQuestionChoices0()\n {\n }", "public function testGetSurveyQuestionChoices0()\n {\n }", "public function testWebinar()\n {\n }", "public function test_post_question() {\n global $DB;\n\n // Create user\n $user = $this->getDataGenerator()->create_user();\n\n // create a course\n $course = $this->getDataGenerator()->create_course();\n\n // enrol the user on the course\n $this->getDataGenerator()->enrol_user($user->id, $course->id, $DB->get_field('role', 'id', array(\n 'shortname' => 'student',\n )));\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n // enrol the user on the course\n $this->getDataGenerator()->enrol_user($user->id, $course->id, $DB->get_field('role', 'id', array(\n 'shortname' => 'student',\n )));\n\n $question = array(\n 'seconds' => '2',\n 'text' => 'dummy text'\n );\n\n $this->setUser($user);\n\n $client = new Client($this->_app);\n $client->request('POST', '/api/v1/' . $videoquanda->id . '/questions', array(), array(), array(), json_encode($question));\n\n $this->assertEquals(201, $client->getResponse()->getStatusCode());\n $this->assertEquals(1, $DB->count_records('videoquanda_questions', array('instanceid' => $videoquanda->id)));\n }", "public function testGetSurveyQuestions0()\n {\n }", "public function testGetSurveyQuestions0()\n {\n }", "public function test_admin_training_list_b()\n {\n $this->request('GET', ['pages/MemberSkills', 'training_programs']);\n $this->assertResponseCode(404);\n }", "public function testQna(): void\n {\n $stream = $this->getFeed('/wellformed/atom10/qna.xml');\n $parser = $this->simplepie->parseXml($stream);\n $feed = $parser->getFeed();\n $entry = $feed->getEntries()[0];\n\n static::assertEquals('Q&A session', (string) $entry->getTitle());\n static::assertEquals(Serialization::HTML, $entry->getTitle()->getSerialization());\n }", "public function test_admin_squad_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Assignments', 'squad_list']);\n $this->assertResponseCode(404);\n }", "public function episodePremiumWatchableInDistantFuture(AcceptanceTester $I)\n {\n $I->wantTo('Verify that \"Never\" is displayed in the portal when Premium watchable date is in the distant future. - C225102');\n $I->amOnPage(ContentPage::$URL_ingest);\n\n ContentUtils::clickTableRowOfTitle($I, \"CXCMS_Ingest_ContentWindows_\" . BuildNo::$build . \" Episode Paid Distant Future\");\n ContentUtils::clickTableRowOfTitle($I, \"CXCMS_Ingest_ContentWindows_\" . BuildNo::$build . \" Episode Paid Distant Future Season\");\n ContentUtils::clickTableRowOfTitle($I, \"CXCMS_Ingest_ContentWindows_\" . BuildNo::$build . \" Episode Paid Distant Future Title\");\n\n $I->waitForText('Ingest Testing', 30, ContentPage::$channelRow);\n $I->seeInField(ContentPage::$windowing_premiumStartOfWindow_input, 'Never');\n }", "public function moviePremiumWatchableInDistantFuture(AcceptanceTester $I)\n {\n $I->wantTo('Verify that \"Never\" is displayed in the portal when Premium watchable date is in the distant future. - C225107');\n $I->amOnPage(ContentPage::$URL_ingest);\n\n ContentUtils::clickTableRowOfTitle($I, \"CXCMS_Ingest_ContentWindows_\" . BuildNo::$build . \" Movie Paid Distant Future\");\n\n $I->waitForText('Ingest Testing', 30, ContentPage::$channelRow);\n $I->seeInField(ContentPage::$windowing_premiumStartOfWindow_input, 'Never');\n }", "public function testWebinarStatus()\n {\n }", "public function testPastEvents()\n {\n // otherwise test will fail.\n // Other approach is to use fake data or mock it.\n \n $response = $this->json('GET', '/events/expired');\n \n $response\n ->assertStatus(200)\n ->assertJson([\n ['name' => 'Fashion Show']\n ]);\n }", "public function _testMultipleInventories()\n {\n\n }", "public function testPastEmbargoAfterExpiry()\n {\n $page = $this->objFromFixture(SiteTree::class, 'pastEmbargoAfterExpiry');\n\n $page = $this->finishWorkflow($page);\n\n $this->assertEquals(0, $page->PublishJobID);\n $this->assertEquals(0, $page->UnPublishJobID);\n }", "public function testWebinarRegistrantQuestionUpdate()\n {\n }", "public function test_admin_tribe_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Assignments', 'tribe_list']);\n $this->assertResponseCode(404);\n }", "public function testQuestionSharev1questions()\n {\n\n }", "public function testPastEmbargoExpiry()\n {\n $page = $this->objFromFixture(SiteTree::class, 'pastEmbargoExpiry');\n\n $page = $this->finishWorkflow($page);\n\n $this->assertEquals(0, $page->PublishJobID);\n $this->assertNotEquals(0, $page->UnPublishJobID);\n\n $unpublish = strtotime($page->UnPublishJob()->StartAfter ?? '');\n\n $this->assertFalse($unpublish);\n }", "public function testQuestionSharev1questionslast()\n {\n\n }", "public function testListExperts()\n {\n }", "public function testQuestionSharev1questions0()\n {\n\n }", "public function testWebinarPollGet()\n {\n }", "public function testPastEmbargoFutureExpiry()\n {\n $page = $this->objFromFixture(SiteTree::class, 'pastEmbargoFutureExpiry');\n\n $page = $this->finishWorkflow($page);\n\n $this->assertNotEquals(0, $page->PublishJobID);\n $this->assertNotEquals(0, $page->UnPublishJobID);\n\n $publish = strtotime($page->PublishJob()->StartAfter ?? '');\n $unpublish = strtotime($page->UnPublishJob()->StartAfter ?? '');\n\n $this->assertFalse($publish);\n $this->assertNotFalse($unpublish);\n }", "public function episodePremiumVisibleInDistantFuture(AcceptanceTester $I)\n {\n $I->wantTo('Verify that \"Never\" is displayed in the portal when Premium visible date is in the distant future. - C225103');\n $I->amOnPage(ContentPage::$URL_ingest);\n\n ContentUtils::clickTableRowOfTitle($I, \"CXCMS_Ingest_ContentWindows_\" . BuildNo::$build . \" Episode Paid Distant Future\");\n ContentUtils::clickTableRowOfTitle($I, \"CXCMS_Ingest_ContentWindows_\" . BuildNo::$build . \" Episode Paid Distant Future Season\");\n ContentUtils::clickTableRowOfTitle($I, \"CXCMS_Ingest_ContentWindows_\" . BuildNo::$build . \" Episode Paid Distant Future Title\");\n\n //CXCMS-1738 - This is bugged and will always fail\n $I->waitForText('Ingest Testing', 30, ContentPage::$channelRow);\n $I->seeInField(ContentPage::$windowing_listingBegin_input, 'Never');\n }", "public function iN_ListQuestionAnswerFromLanding() {\n\t\t$query = mysqli_query($this->db, \"SELECT * FROM i_landing_qa WHERE qa_status = '1'\") or die(mysqli_error($this->db));\n\t\twhile ($row = mysqli_fetch_array($query, MYSQLI_ASSOC)) {\n\t\t\t// Store the result into array\n\t\t\t$data[] = $row;\n\t\t}\n\t\tif (!empty($data)) {\n\t\t\treturn $data;\n\t\t}\n\t}", "public function testQuestionSharev1questionstopExperts()\n {\n\n }", "public function moviePremiumVisibleInDistantFuture(AcceptanceTester $I)\n {\n $I->wantTo('Verify that \"Never\" is displayed in the portal when Premium visible date is in the distant future. - C225105');\n $I->amOnPage(ContentPage::$URL_ingest);\n\n ContentUtils::clickTableRowOfTitle($I, \"CXCMS_Ingest_ContentWindows_\" . BuildNo::$build . \" Movie Paid Distant Future\");\n\n //CXCMS-1738 - This should say Never. Change when fixed.\n $I->waitForText('Ingest Testing', 30, ContentPage::$channelRow);\n $I->seeInField(ContentPage::$windowing_listingBegin_input, 'Never');\n }", "public function testVenueQuestionnaire()\n {\n $this->buildVenueSurvey();\n\n $response = $this->json('GET', \"survey/questionnaire\", ['slot_id' => $this->slot->id, 'type' => Survey::TRAINING]);\n $response->assertStatus(200);\n\n $survey = $this->survey;\n $venueGroup = $this->venueGroup;\n $venueQ = $this->venueQuestion;\n $trainerGroup = $this->trainerGroup;\n $trainerQ = $this->trainerQuestion;\n\n $response->assertJson([\n 'survey' => [\n 'id' => $survey->id,\n 'type' => Survey::TRAINING,\n 'year' => $survey->year,\n 'title' => $survey->title,\n ]\n ]);\n\n $response->assertJson([\n 'survey' => [\n 'survey_groups' => [\n [\n 'id' => $venueGroup->id,\n 'title' => $venueGroup->title,\n 'description' => $venueGroup->description,\n 'survey_questions' => [\n [\n 'id' => $venueQ->id,\n 'sort_index' => $venueQ->sort_index,\n 'type' => $venueQ->type,\n 'description' => $venueQ->description,\n ]\n ]\n ],\n\n [\n 'id' => $trainerGroup->id,\n 'title' => $trainerGroup->title,\n 'description' => $trainerGroup->description,\n 'survey_questions' => [\n [\n 'id' => $trainerQ->id,\n 'sort_index' => $trainerQ->sort_index,\n 'type' => $trainerQ->type,\n 'description' => $trainerQ->description,\n ]\n ]\n\n ]\n ]\n ]\n ]);\n\n $trainer = $this->trainer;\n\n $response->assertJson([\n 'trainers' => [\n [\n 'id' => $trainer->id,\n 'callsign' => $trainer->callsign,\n 'position_id' => Position::TRAINER\n ]\n ]\n ]);\n\n $slot = $this->slot;\n $response->assertJson([\n 'slot' => [\n 'id' => $slot->id,\n 'begins' => $slot->begins\n ]\n ]);\n //return response()->json(['survey' => $survey, 'trainers' => $trainers, 'slot' => $slot]);\n\n }", "public function testGetSurveys0()\n {\n }", "public function testGetSurveys0()\n {\n }", "public function testGetSurvey0()\n {\n }", "public function testGetSurvey0()\n {\n }", "public function test_changing_question() {\n global $DB;\n\n // create a user\n $user = $this->getDataGenerator()->create_user();\n\n // create a course\n $course = $this->getDataGenerator()->create_course();\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n $time = mktime(9, 0, 0, 11, 7, 2013);\n\n $this->loadDataSet($this->createArrayDataSet(array(\n 'videoquanda_questions' => array(\n array('id', 'instanceid', 'userid', 'timecreated', 'timemodified' ,'seconds', 'text'),\n array(1, $videoquanda->id, $user->id, $time, $time, 2, 'dummy text')\n )\n )));\n\n $question = array(\n 'text' => 'I have updated my question.',\n 'timemodified' => time()\n );\n\n // enrol the user on the course\n $this->getDataGenerator()->enrol_user($user->id, $course->id, $DB->get_field('role', 'id', array(\n 'shortname' => 'student',\n )));\n\n // login the user\n $this->setUser($user);\n\n $client = new Client($this->_app);\n $client->request('PUT', '/api/v1/' . $videoquanda->id . '/questions/1', array(), array(), array(), json_encode($question));\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $this->assertGreaterThan($time, $DB->get_field('videoquanda_questions', 'timemodified', array('id' => 1)));\n }", "public function testJobListFromJobSchedule()\n {\n\n }", "public function testRun4(){\n\t\t$param = $this->urlParam;\n\n\t\t$listItem = $this->listItems('newsletterCampaignEntry');\n\t\t$this->assertNotNull($listItem->list->attributes);\n\n\t\t$param['{params}'] = \"?get_key={$listItem->uniqueId}\";\n\t\t$this->assertTrackCampaignClick($listItem,$param,$listItem->uniqueId);\n\t\t// It should have exited without doing anything else.\n\t\t$this->assertNoTrackGeneric();\n\t}", "function AddTesteeQuestions($testEntryID, $examQAs)\n {\n try\n {\n if (count($examQAs) < 1)\n {\n return;\n }\n \n $db = GetDBConnection();\n \n $qCount = 1;\n $questions = array();\n foreach ($examQAs as $qa)\n {\n $questionID = $qa->GetQuestionId();\n $question = GetQuestion($questionID);\n \n if ($question != FALSE)\n {\n $aCount = 1;\n $answers = GetQuestionAnswers($questionID);\n \n for ($i = 0; $i < count($answers); $i++)\n {\n $chosen = '0';\n $answer = $answers[$i];\n $answer['AnswerNo'] = $aCount;\n \n if ($answer[GetAnswerIdIdentifier()] == $qa->GetAnswerId())\n {\n $chosen = '1';\n }\n \n $answer['Chosen'] = $chosen;\n \n $answers[$i] = $answer;\n \n $aCount++;\n }\n \n $question['QuestionNo'] = $qCount;\n $question['Answers'] = $answers;\n \n $questions[] = $question;\n \n $qCount++;\n }\n }\n \n $qQuery = 'INSERT INTO ' . GetTesteeQuestionsIdentifier()\n . ' (' . GetTestIdIdentifier()\n . ', ' . 'QuestionNo'\n . ', ' . 'Level'\n . ', ' . 'Instructions'\n . ', ' . 'Question' . ') VALUES';\n \n $aQuery = 'INSERT INTO ' . GetTesteeAnswersIdentifier()\n . ' (' . GetTestIdIdentifier()\n . ', ' . 'QuestionNo'\n . ', ' . 'AnswerNo'\n . ', ' . 'Answer'\n . ', ' . 'Correct'\n . ', ' . 'Chosen' . ') VALUES';\n \n foreach($questions as $question)\n {\n $answers = $question['Answers'];\n $questionNo = $question['QuestionNo'];\n \n $qQuery .= ' (:' . GetTestIdIdentifier()\n . ', :' . 'QuestionNo' . $questionNo\n . ', :' . 'Level' . $questionNo\n . ', :' . 'Instructions' . $questionNo\n . ', :' . 'Question' . $questionNo . '),';\n \n foreach($answers as $answer)\n {\n $answerNo = $answer['AnswerNo'];\n \n $aQuery .= ' (:' . GetTestIdIdentifier()\n . ', :' . 'QuestionNo' . $questionNo . $answerNo\n . ', :' . 'AnswerNo' . $questionNo . $answerNo\n . ', :' . 'Answer' . $questionNo . $answerNo\n . ', :' . 'Correct' . $questionNo . $answerNo\n . ', :' . 'Chosen' . $questionNo . $answerNo . '),';\n }\n }\n \n $qQuery = rtrim($qQuery, ',') . ';';\n $aQuery = rtrim($aQuery, ',') . ';';\n \n $qStatement = $db->prepare($qQuery);\n $aStatement = $db->prepare($aQuery);\n \n foreach($questions as $question)\n {\n $answers = $question['Answers'];\n $questionNo = $question['QuestionNo'];\n \n foreach($answers as $answer)\n {\n $answerNo = $answer['AnswerNo'];\n \n $aStatement->bindValue(':' . GetTestIdIdentifier(), $testEntryID);\n $aStatement->bindValue(':' . 'QuestionNo' . $questionNo . $answerNo, $questionNo);\n $aStatement->bindValue(':' . 'AnswerNo' . $questionNo . $answerNo, $answerNo);\n $aStatement->bindValue(':' . 'Answer' . $questionNo . $answerNo, $answer[GetNameIdentifier()]);\n $aStatement->bindValue(':' . 'Chosen' . $questionNo . $answerNo, $answer['Chosen']);\n $aStatement->bindValue(':' . 'Correct' . $questionNo . $answerNo, $answer['Correct']);\n }\n \n $qStatement->bindValue(':' . GetTestIdIdentifier(), $testEntryID);\n $qStatement->bindValue(':' . 'QuestionNo' . $questionNo, $questionNo);\n $qStatement->bindValue(':' . 'Level' . $questionNo, $question['Level']);\n $qStatement->bindValue(':' . 'Instructions' . $questionNo, $question['Instructions']);\n $qStatement->bindValue(':' . 'Question' . $questionNo, $question[GetNameIdentifier()]);\n }\n \n $qStatement->execute();\n $qStatement->closeCursor();\n \n $aStatement->execute();\n $aStatement->closeCursor();\n }\n catch (PDOException $ex)\n {\n LogError($ex);\n }\n }", "public function test_all_questions_and_answers_route_when_questioner_is_admin() {\n // create a user\n $user = $this->getDataGenerator()->create_user();\n\n // create a course\n $course = $this->getDataGenerator()->create_course();\n\n // enrolment\n $this->getDataGenerator()->enrol_user($user->id, $course->id);\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n $now = time();\n\n $this->loadDataSet($this->createArrayDataSet(array(\n 'videoquanda_questions' => array(\n array('id', 'instanceid', 'userid', 'timecreated', 'timemodified' ,'seconds', 'text'),\n array(1, $videoquanda->id, 2, $now, $now + 1, 2, 'dummy text'),\n array(2, $videoquanda->id, $user->id, $now, $now + 1, 2, 'dummy text')\n )\n )));\n\n $this->setAdminUser();\n $client = new Client($this->_app);\n $client->request('GET', '/api/v1/' . $videoquanda->id . '/questions');\n $json = $client->getResponse()->getContent();\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $array = (array) json_decode($json);\n $this->assertCount(2, $array);\n }", "function testGetAllFaqsPages() {\n $faqspage = $this->fixture->objFromFixture('FaqsPage', 'faq1');\n $this->assertContains('Faq Number 1', $faqspage->Title);\n \n $faqspage = $this->fixture->objFromFixture('FaqsPage', 'faq2');\n $this->assertContains('Faq Number 2', $faqspage->Title); \n }", "public function testPastSameEmbargoExpiry()\n {\n $page = $this->objFromFixture(SiteTree::class, 'pastSameEmbargoExpiry');\n\n $page = $this->finishWorkflow($page);\n\n $this->assertEquals(0, $page->PublishJobID);\n $this->assertEquals(0, $page->UnPublishJobID);\n }", "public function testWebinarPanelistsDelete()\n {\n }", "public function testWebinarPanelistDelete()\n {\n }", "public function testWebinarPollCreate()\n {\n }", "public function test_post_question_not_allowed_content() {\n global $DB;\n\n // Create user\n $user = $this->getDataGenerator()->create_user();\n\n // create a course\n $course = $this->getDataGenerator()->create_course();\n\n // enrol the user on the course\n $this->getDataGenerator()->enrol_user($user->id, $course->id, $DB->get_field('role', 'id', array(\n 'shortname' => 'student',\n )));\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n // enrol the user on the course\n $this->getDataGenerator()->enrol_user($user->id, $course->id, $DB->get_field('role', 'id', array(\n 'shortname' => 'student',\n )));\n\n $question = array(\n 'seconds' => '2',\n 'text' => '<script>alert(\"This content is not allowed!\")</script>'\n );\n\n $this->setUser($user);\n\n $client = new Client($this->_app);\n $client->request('POST', '/api/v1/' . $videoquanda->id . '/questions', array(), array(), array(), json_encode($question));\n\n $this->assertEquals(201, $client->getResponse()->getStatusCode());\n $this->assertEquals(1, $DB->count_records('videoquanda_questions', array('instanceid' => $videoquanda->id)));\n $this->assertEquals('alert(\"This content is not allowed!\")', $DB->get_field('videoquanda_questions', 'text', array('instanceid' => $videoquanda->id)));\n }", "public function testListSites()\n {\n }", "public function testGetSurveyResponses0()\n {\n }", "public function testGetSurveyResponses0()\n {\n }", "public function testCreateSurveyQuestion0()\n {\n }", "public function testCreateSurveyQuestion0()\n {\n }", "public function testPastExpiry()\n {\n $page = $this->objFromFixture(SiteTree::class, 'pastExpiry');\n\n $page = $this->finishWorkflow($page);\n\n $this->assertEquals(0, $page->PublishJobID);\n $this->assertNotEquals(0, $page->UnPublishJobID);\n\n $unpublish = strtotime($page->UnPublishJob()->StartAfter ?? '');\n\n $this->assertFalse($unpublish);\n }", "public function test_admin_training_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/MemberSkills', 'training_programs']);\n $this->assertResponseCode(404);\n }", "public function testGetChallengeActivities()\n {\n }", "public function test_all_questions_and_answers_route_when_in_groupmode_with_sitewide_role() {\n global $DB;\n\n // create a user\n $user = $this->getDataGenerator()->create_user();\n $roleid = $DB->get_field('role', 'id', array('shortname' => 'manager'));\n $this->getDataGenerator()->role_assign($roleid, $user->id);\n\n // create a course\n $course = $this->getDataGenerator()->create_course([\n 'groupmode' => SEPARATEGROUPS,\n 'groupmodeforce' => true,\n ]);\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n $now = time();\n\n $this->loadDataSet($this->createArrayDataSet(array(\n 'videoquanda_questions' => array(\n array('id', 'instanceid', 'userid', 'timecreated', 'timemodified', 'seconds', 'text'),\n array(1, $videoquanda->id, $user->id, $now, $now + 1, 2, 'dummy text')\n )\n )));\n\n $this->setUser($user);\n $client = new Client($this->_app);\n $client->request('GET', '/api/v1/' . $videoquanda->id . '/questions');\n $json = $client->getResponse()->getContent();\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $array = (array) json_decode($json);\n $this->assertCount(1, $array);\n }", "function qa_q_list_page_content($questions, $pagesize, $start, $count, $sometitle, $nonetitle,\n\t$navcategories, $categoryid, $categoryqcount, $categorypathprefix, $feedpathprefix, $suggest,\n\t$pagelinkparams = null, $categoryparams = null, $dummy = null)\n{\n\tif (qa_to_override(__FUNCTION__)) { $args=func_get_args(); return qa_call_override(__FUNCTION__, $args); }\n\n\trequire_once QA_INCLUDE_DIR . 'app/format.php';\n\trequire_once QA_INCLUDE_DIR . 'app/updates.php';\n\n\t$userid = qa_get_logged_in_userid();\n\n\n\t// Chop down to size, get user information for display\n\n\tif (isset($pagesize)) {\n\t\t$questions = array_slice($questions, 0, $pagesize);\n\t}\n\n\t$usershtml = qa_userids_handles_html(qa_any_get_userids_handles($questions));\n\n\n\t// Prepare content for theme\n\n\t$qa_content = qa_content_prepare(true, array_keys(qa_category_path($navcategories, $categoryid)));\n\n\t$qa_content['q_list']['form'] = array(\n\t\t'tags' => 'method=\"post\" action=\"' . qa_self_html() . '\"',\n\n\t\t'hidden' => array(\n\t\t\t'code' => qa_get_form_security_code('vote'),\n\t\t),\n\t);\n\n\t$qa_content['q_list']['qs'] = array();\n\n\tif (count($questions)) {\n\t\t$qa_content['title'] = $sometitle;\n\n\t\t$defaults = qa_post_html_defaults('Q');\n\t\tif (isset($categorypathprefix)) {\n\t\t\t$defaults['categorypathprefix'] = $categorypathprefix;\n\t\t}\n\n\t\tforeach ($questions as $question) {\n\t\t\t$fields = qa_any_to_q_html_fields($question, $userid, qa_cookie_get(), $usershtml, null, qa_post_html_options($question, $defaults));\n\n\t\t\tif (!empty($fields['raw']['closedbyid'])) {\n\t\t\t\t$fields['closed'] = array(\n\t\t\t\t\t'state' => qa_lang_html('main/closed'),\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$qa_content['q_list']['qs'][] = $fields;\n\t\t}\n\t} else {\n\t\t$qa_content['title'] = $nonetitle;\n\t}\n\n\tif (isset($userid) && isset($categoryid)) {\n\t\t$favoritemap = qa_get_favorite_non_qs_map();\n\t\t$categoryisfavorite = @$favoritemap['category'][$navcategories[$categoryid]['backpath']];\n\n\t\t$qa_content['favorite'] = qa_favorite_form(QA_ENTITY_CATEGORY, $categoryid, $categoryisfavorite,\n\t\t\tqa_lang_sub($categoryisfavorite ? 'main/remove_x_favorites' : 'main/add_category_x_favorites', $navcategories[$categoryid]['title']));\n\t}\n\n\tif (isset($count) && isset($pagesize)) {\n\t\t$qa_content['page_links'] = qa_html_page_links(qa_request(), $start, $pagesize, $count, qa_opt('pages_prev_next'), $pagelinkparams);\n\t}\n\n\t$qa_content['canonical'] = qa_get_canonical();\n\n\tif (empty($qa_content['page_links'])) {\n\t\t$qa_content['suggest_next'] = $suggest;\n\t}\n\n\tif (qa_using_categories() && count($navcategories) && isset($categorypathprefix)) {\n\t\t$qa_content['navigation']['cat'] = qa_category_navigation($navcategories, $categoryid, $categorypathprefix, $categoryqcount, $categoryparams);\n\t}\n\n\t// set meta description on category pages\n\tif (!empty($navcategories[$categoryid]['content'])) {\n\t\t$qa_content['description'] = qa_html($navcategories[$categoryid]['content']);\n\t}\n\n\tif (isset($feedpathprefix) && (qa_opt('feed_per_category') || !isset($categoryid))) {\n\t\t$qa_content['feed'] = array(\n\t\t\t'url' => qa_path_html(qa_feed_request($feedpathprefix . (isset($categoryid) ? ('/' . qa_category_path_request($navcategories, $categoryid)) : ''))),\n\t\t\t'label' => strip_tags($sometitle),\n\t\t);\n\t}\n\n\treturn $qa_content;\n}", "public function test119DisplayBookingListAfterClickOnEachLinkOfPagination()\n {\n $ssoData = $this->getSSOData();\n\n // current bookings\n $this->createBookings(20, date('Y-m-d'), 15);\n\n //$this->mockApi($data, 'empty_ok');\n\n $responseBefore = $this->ajax($this->getUrlByParams(['page' => 1, 'per_page' => 10]))->json();\n $responseAfter = $this->ajax($this->getUrlByParams(['page' => 2, 'per_page' => 10]))->json();\n\n $listBefore = $responseBefore['current_list'];\n $listAfter = $responseAfter['current_list'];\n\n $this->assertFalse($listBefore == $listAfter);\n }", "public function testWebinarRegistrants()\n {\n }", "public function testGetVendorComplianceSurveyByFilter()\n {\n }", "public function testWebinarUpdate()\n {\n }", "public function show(pregunta_test $pregunta_test)\n {\n //\n }", "public function testListQrcodesPagination()\n {\n $this->makeData(self::NUMBER_RECORD_CREATE);\n $this->browse(function (Browser $browser) {\n $browser->loginAs($this->user)\n ->visit('/admin/qrcodes');\n $elements = $browser->elements('#list-qrcodes tbody tr');\n $this->assertCount(config('define.qrcodes.limit_rows'), $elements);\n $this->assertNotNull($browser->element('.pagination'));\n $paginate_element = $browser->elements('.pagination li');\n $number_page = count($paginate_element) - 2;\n $this->assertTrue($number_page == ceil((self::NUMBER_RECORD_CREATE + 1) / (config('define.qrcodes.limit_rows'))));\n });\n }", "public function testWebinarPollUpdate()\n {\n }", "public function testIndexSurvey()\n {\n $year = 2018;\n Survey::factory()->create(['year' => $year]);\n\n $response = $this->json('GET', 'survey', ['year' => $year]);\n $response->assertStatus(200);\n $this->assertCount(1, $response->json()['survey']);\n }", "public function testAjaxGetVenueListCanBeAccessed()\n {\n $this->dispatch('/venue/ajax-get-venue-list');\n $this->assertResponseStatusCode(200);\n }", "public function __construct(SiteQa $qa)\n {\n $this->qa = $qa;\n }", "public function test_that_authorized_user_can_view_courses_within_other_periods()\n {\n \n }", "public function testJobListPreparationAndReleaseTaskStatus()\n {\n\n }", "public function show(Question_Test $question_Test)\n {\n //\n }", "public function testFaqControllerManageQuestion()\r\n {\r\n\t\t//model a login user\r\n\t\t$memberController = &getController(\"member\");\r\n\t\t$output = $memberController->procMemberLogin('xe_admin','@xe_part@');\r\n\r\n\t\t//model: get a faq module\r\n\t\t$oModuleAdminModel = &getAdminModel(\"module\");\r\n\t\t$args->module = 'faq';\r\n\t\t$faq_modules = $oModuleAdminModel->getModuleMidList($args)->data;\r\n\t\t$obj->module_srl = $faq_modules[1]->module_srl;\r\n\r\n\t\t//test for insert a question to the faq\r\n\t\t$this->faqModel->init();\r\n\t\t$question_list = $this->faqModel->getQuestionList($obj)->data;\r\n\t\t$before_question_count = sizeOf($question_list);\r\n\t\t$this->InsertFaqQuestion($obj->module_srl);\r\n\t\t$question_list = $this->faqModel->getQuestionList($obj)->data;\r\n\t\t$after_question_count = sizeOf($question_list);\r\n\t\t//assert the number of faq questions increased by 1\r\n\t\t$this->assertEquals(1, $after_question_count-$before_question_count);\r\n\r\n\t\t//test for update the question of the faq\r\n\t\t$question_srl = $question_list[1]->question_srl;\r\n\t\t$this->UpdateFaqQuestion($question_srl);\r\n\t\t$this->faqModel->init();\r\n\t\tunset($GLOBALS['XE_QUESTION_LIST'][$question_srl]);\r\n\t\t$oQuestion = $this->faqModel->getQuestion($question_srl);\r\n\t\t//assert the question and answer have been updated\r\n\t\t$this->assertEquals('test question update', $oQuestion->get('question'));\r\n\t\t$this->assertEquals('test answer update', $oQuestion->get('answer'));\r\n\r\n\t\t//test for delete the question of the faq\r\n\t\t$before_question_count = sizeOf($question_list);\r\n\t\t$this->DeleteFaqQuestion($question_srl);\r\n\t\t$question_list = $this->faqModel->getQuestionList($obj)->data;\r\n\t\t$after_question_count = sizeOf($question_list);\r\n\t\t//assert the number of faq questions decreased by 1\r\n\t\t$this->assertEquals(1, $before_question_count-$after_question_count);\r\n\r\n\t}", "public function testReportsSpamchecksHistoryGet()\n {\n }", "public function testUpcomingEvents()\n {\n // otherwise test will fail.\n // Other approach is to use fake data or mock it.\n \n $response = $this->json('GET', '/events');\n \n $response\n ->assertStatus(200)\n ->assertJson([\n ['name' => 'IT Expo']\n ]);\n }", "public function testWebinarCreate()\n {\n }", "public function testQuestionSharev1questionsidQuestionanswer()\n {\n\n }", "public function testQuizRead_Title()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/quizzes')\n ->clickLink('View Quiz')\n ->assertSee('General Knowledge')\n ->screenshot('RoleEdit/QuizRead');\n });\n }", "public function testJobList()\n {\n\n }", "public function testReportsSkillv1reportsskillsidgaps()\n {\n\n }", "public function test_for_quiz_question()\n {\n $this->withOutExceptionHandling();\n\n $user = $this->actingAs(User::factory()->make());\n\n $session = QuizSession::factory()->create();\n $schedule = ClassSchedule::factory()->create();\n\n $response = $this->post('api/v1/quiz/question',\n array_merge($this->data(), [\n 'quiz_session_id' => $session->id,\n 'class_schedule_id' => $schedule->id,\n ]\n )\n );\n\n $response->assertStatus(200);\n }", "public function test_post_question_as_guest() {\n global $DB;\n\n // create a course\n $course = $this->getDataGenerator()->create_course();\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n // set the instance of the 'guest' enrolment plugin to enabled\n $DB->set_field('enrol', 'status', ENROL_INSTANCE_ENABLED, array(\n 'courseid' => $course->id,\n 'enrol' => 'guest',\n ));\n\n // login as guest\n $this->setGuestUser();\n\n // create a dummy question to post\n $question = array(\n 'seconds' => '2',\n 'text' => 'dummy text'\n );\n\n // try to post a question\n $client = new Client($this->_app);\n $client->request('POST', '/api/v1/' . $videoquanda->id . '/questions', array(), array(), array(\n 'HTTP_X_REQUESTED_WITH' => 'XMLHttpRequest',\n ), json_encode($question));\n $this->assertTrue($client->getResponse()->isClientError());\n $this->assertEquals('application/json', $client->getResponse()->headers->get('Content-Type'));\n $this->assertEquals(get_string('jsonapi:submitquestionasguestdenied', $this->_app['plugin']), json_decode($client->getResponse()->getContent()));\n $this->assertEquals(0, $DB->count_records('videoquanda_questions', array('instanceid' => $videoquanda->id)));\n }", "function test_cinesport_embed_shortcode_works() {\n\t\t//Videos\n\t\t$content = '[cinesport url=\"http://cinesport.boston.com/boston-globe-sports/manning-reflects-win-over-brady-pats/\"]';\n\t\t$output = do_shortcode( $content );\n\t\t$this->assertEquals( '<div class=\"content-media__video content-media__video--cinesport\"><iframe frameborder=\"0\" allowfullscreen=\"true\" webkitallowfullscreen=\"true\" mozallowfullscreen=\"true\" src=\"http://cinesport.boston.com/embed/boston-globe-sports/manning-reflects-win-over-brady-pats/#autostart=on;titles=on;nolink=on;\"></iframe></div>', $output );\n\n\t\t// Bad URL should return nothing\n\t\t$content = '[cinesport url=\"https://boston.com\"]';\n\t\t$output = do_shortcode( $content );\n\t\t$this->assertEquals( '', $output );\n\t}", "public function test_admin_usecase_list_b()\n {\n $this->request('GET', ['pages/Assignments', 'usecase_list']);\n $this->assertResponseCode(404);\n }", "public function testMovieReviewPage(): void\n {\n $this->browse(function (Browser $browser) {\n $browser->visit(new MovieReview())\n ->assertSee('Machine Learning with Scikit Learn');\n });\n }", "public function testReportsSkillv1reportsskillsgaps()\n {\n\n }", "public function test_changing_question_from_other_user() {\n global $DB;\n\n // create a user\n $user = $this->getDataGenerator()->create_user();\n\n // create a course\n $course = $this->getDataGenerator()->create_course();\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n $time = mktime(9, 0, 0, 11, 7, 2013);\n\n $this->loadDataSet($this->createArrayDataSet(array(\n 'videoquanda_questions' => array(\n array('id', 'instanceid', 'userid', 'timecreated', 'timemodified' ,'seconds', 'text'),\n array(1, $videoquanda->id, 99, $time, $time, 2, 'dummy text')\n )\n )));\n\n $question = array(\n 'text' => 'I have updated my question.',\n 'timemodified' => time()\n );\n\n // enrol the user on the course\n $this->getDataGenerator()->enrol_user($user->id, $course->id, $DB->get_field('role', 'id', array(\n 'shortname' => 'student',\n )));\n\n // login the user\n $this->setUser($user);\n\n $client = new Client($this->_app);\n $client->request('PUT', '/api/v1/' . $videoquanda->id . '/questions/1', array(), array(), array(), json_encode($question));\n\n $this->assertEquals(405, $client->getResponse()->getStatusCode());\n $this->assertEquals($time, $DB->get_field('videoquanda_questions', 'timemodified', array('id' => 1)));\n }", "public function testRightSubmission()\n {\n $client = static::createClient();\n $client->followRedirects();\n\n $crawler = $client->request('GET', '/play');\n\n $movieId = $crawler->filter('#quizz_movie')->attr('value');\n $actorId = $crawler->filter('#quizz_actor')->attr('value');\n\n $movieRepo = $client->getContainer()->get('doctrine')->getRepository('AppBundle:Movie');\n $personRepo = $client->getContainer()->get('doctrine')->getRepository('AppBundle:Person');\n\n $movie = $movieRepo->find($movieId);\n $person = $personRepo->find($actorId);\n\n if ($movie->isActor($person)) {\n $form = $crawler->selectButton('quizz_yes')->form();\n } else {\n $form = $crawler->selectButton('quizz_no')->form();\n }\n\n $client->submit($form);\n\n $request = $client->getRequest();\n $this->assertEquals('/play', $request->getPathInfo(), 'on a good submission, the player is redirected on /play');\n }", "public function test1() \n {\n /*$url = \"https://integralads.com/careers/\";\n $html = file_get_contents($url);\n\n $link_text = [\"w Opening\", \"View All Openings\", \"View Jobs\", \"Openings\", \"Jobs\", \"Careers\"];\n $link = \"\";\n $text_string = \"\";\n\n foreach($link_text as $text) {\n \n $text_string = $text;\n $link = $rh->getLinkFromText($html, $text);\n if (!empty($link)) break;\n\n }\n \n print $text_string.\"<br>\";\n print $link;\n */\n //$rh->QACareerPage(625);\n // $rh->convertRobotCompanyToRoleSentryCompany(625);\n //print env('CLOUDAMQP_PORT');\n //dd(config('app.env'));\n // print $_ENV[\"CLOUDAMQP_HOST\"];\n print config(\"app.cloudampq_host\");\n print config(\"app.cloudampq_user\");\n print config(\"app.cloudampq_pw\");\n print config(\"app.cloudampq_port\");\n\n\n }", "public function showResults(){\n $this->extractQuestions();\n }", "public function getSubpasta()\r\n\t{\r\n\t\treturn $this->subpasta;\r\n\t}", "function getTests(){\n $listOfAvailableTests = parent::getTests();\n $url = get_instance()->uri->uri_string();\n $listOfSubTests = trim(Text::getSubstringAfter($url, '/subtests/'));\n if($listOfSubTests){\n $listOfSubTests = explode(',', $listOfSubTests);\n foreach($listOfSubTests as $key => &$subTest){\n $subTest = trim($subTest);\n if(!in_array($subTest, $listOfAvailableTests)){\n unset($listOfSubTests[$key]);\n echo \"Test '$subTest' does not exist as a test within \" . $this->getLabel() . \"<br/>\";\n }\n }\n $listOfSkippedTests = array_diff($listOfAvailableTests, $listOfSubTests);\n $this->reporter->paintSkip(count($listOfSkippedTests) . \" tests not run.\");\n $listOfAvailableTests = $listOfSubTests;\n }\n return $listOfAvailableTests;\n }" ]
[ "0.6955456", "0.59452575", "0.58298326", "0.5821201", "0.5732911", "0.56243193", "0.54987425", "0.54416364", "0.5420459", "0.5414977", "0.54115117", "0.53685975", "0.5187622", "0.5177601", "0.5177601", "0.5174332", "0.51445574", "0.5130628", "0.5130628", "0.51046103", "0.5099534", "0.5075157", "0.5072695", "0.50662506", "0.5065194", "0.50571734", "0.503583", "0.5025018", "0.50246006", "0.50206214", "0.50134397", "0.50114036", "0.5000283", "0.49865717", "0.49842677", "0.49822646", "0.4968814", "0.493449", "0.49330547", "0.49241048", "0.4918006", "0.49175656", "0.49127823", "0.49127823", "0.49115115", "0.49115115", "0.4902912", "0.49023113", "0.49003765", "0.48902777", "0.4882712", "0.48610276", "0.48436254", "0.48371762", "0.47857833", "0.47512135", "0.47480956", "0.47461835", "0.4745878", "0.4745878", "0.4735489", "0.4735489", "0.47283322", "0.47234628", "0.47086474", "0.4697165", "0.46916217", "0.46845365", "0.4683474", "0.4683121", "0.4672734", "0.46694398", "0.46605536", "0.46579194", "0.46534812", "0.46523213", "0.46451613", "0.46431202", "0.46422997", "0.46300086", "0.46282497", "0.46227774", "0.46154258", "0.4614964", "0.46074247", "0.4605818", "0.45966026", "0.45958063", "0.45947877", "0.45805246", "0.4571644", "0.45714563", "0.45487213", "0.4540947", "0.4539712", "0.4530619", "0.45106888", "0.45100933", "0.4508143", "0.44920698" ]
0.7940479
0
Test case for webinarAbsentees Get Webinar Absentees.
Тест-кейс для получения списка участников вебинара, которые не присутствовали.
public function testWebinarAbsentees() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testListPastWebinarPollResults()\n {\n }", "public function testListPastWebinarQA()\n {\n }", "public function testListEnrollmentRequests()\n {\n }", "public function testGetEventsIdSchedulesOut()\n {\n $eventId = '1';\n\n $result = $this->visit('events/' . $eventId . '/schedules')\n ->see('create your suaray account')\n ->see('welcome to suaray')\n ->seePageIs('/account/register');\n }", "public function testGetEventsEventSchedulesIdOut()\n {\n $eventId = '1';\n $id = '1';\n\n $result = $this->visit('events/' . $eventId . '/schedules/' . $id)\n ->see('create your suaray account')\n ->see('welcome to suaray')\n ->seePageIs('/account/register');\n }", "public function testListUserEnrollments()\n {\n }", "public function testWebinar()\n {\n }", "public function testWebinarPollGet()\n {\n }", "public function testIndexEvents()\n {\n \t$caldendarEvents = CalendarEvent::factory()->count(5)->create();\n \t$user = User::find($caldendarEvents[0]->user_id );\n\n\t\t/*\n\t\t * Confirm the visibility of all of a user's calendar events.\n\t\t */\n \t$response = $this->actingAs( $user )\n \t->get( route( 'event-planner.events.index' ) );\n \tforeach( $caldendarEvents as $calendarEvent ){\n \t\t$response->assertSee( $calendarEvent->location )\n \t\t->assertSee( $calendarEvent->type )\n \t\t->assertSee( $calendarEvent->showStartDate() );\n \t}\n\n }", "public function testWebinarPolls()\n {\n }", "public function testVolunteerHourIndexForContactFailure_Inactive()\n {\n $this->session([\n 'username' => $this->inactiveUser->username, \n 'access_level' => $this->inactiveUser->access_level\n ]);\n \n // Set test user as current authenticated user\n $this->be($this->inactiveUser);\n \n $volunteerID = 2;\n // Call route under test\n $response = $this->call('GET', 'volunteerhours/volunteer/'.$volunteerID);\n \n // Assert redirected to access denied page\n $this->assertRedirectedToRoute('unauthorized');\n }", "public function testWebinarStatus()\n {\n }", "public function testPastEvents()\n {\n // otherwise test will fail.\n // Other approach is to use fake data or mock it.\n \n $response = $this->json('GET', '/events/expired');\n \n $response\n ->assertStatus(200)\n ->assertJson([\n ['name' => 'Fashion Show']\n ]);\n }", "public function testWebinarRegistrantGet()\n {\n }", "public function index_should_not_return_any_collection()\r\n {\r\n $this->get('/holidays/gr/2018')->seeStatusCode(200);\r\n $this\r\n ->get('/holidays/gr/2018')\r\n ->seeJson( [\r\n 'status'=> 204,\r\n 'message'=>'succeeded with no content.',\r\n 'holidays' => []\r\n ] );\r\n $this->get('/holidays/?country=gr&year=2018')->seeStatusCode(200);\r\n $this\r\n ->get('/holidays/?country=gr&year=2018')\r\n ->seeJson( [\r\n 'status'=> 204,\r\n 'message'=>'succeeded with no content.',\r\n 'holidays' => []\r\n ] );\r\n }", "public function index()\n {\n //\n $absents = AbsentApplication::whereIn('user_id',\n User::whereIn('id',\n ProjectUser::whereIn('project_id',\n Project::where('managed',\n Auth::user()->id)->get()->pluck('id'))\n ->get()->pluck('user_id'))\n ->get()->pluck('id'))\n ->where('state', AbsentApplication::getAbsentWaitting())->get();\n\n\n return response()->json([\n 'absents' => $absents,\n ], 200);\n }", "public function getNegativeRespondedGuests()\n {\n $query = 'select attendees.displayName as attendeeName, users.name as userName from users right join attendees on attendees.userID = users.userID where attendees.isAttending = 0 AND users.isRSVP = 1;';\n if ($this->connectedModel->runQuery($query)) //query\n {\n while ($row = $this->connectedModel->getResultsAssoc())\n {\n $array[] = array('attendeeName' => $row['attendeeName'], 'userName' => $row['userName']);\n }\n return $array;\n }\n else\n {\n return -1;\n } \n }", "public function testGetAccountDashboardEventOut()\n {\n $eventId = '2';\n\n // Grab Page\n $result = $this->visit('account/dashboard/event/' . $eventId)\n ->see('create your suaray account')\n ->see('welcome to suaray')\n ->seePageIs('/account/register');\n }", "public function testAutoreportDaily()\n {\n echo \"\\n ---- Page : autoreport/daily ---- \\n\";\n $response = $this->visit('autoreport/daily');\n $this->assertResponseStatus($response->response->getStatusCode());\n echo \"Response is \". $response->response->getStatusCode();\n echo \"\\n\";\n }", "private function ofertas() {\n\t\t$data = date ( 'Y/m/d' );\n\t\t$params = array (\n\t\t\t\t'OffersUser' => array (\n\t\t\t\t\t\t'conditions' => array (\n\t\t\t\t\t\t\t\t'user_id' => $this->Session->read ( 'userData.User.id' ),\n\t\t\t\t\t\t\t\t'Offer.status' => 'ACTIVE',\n\t\t\t\t\t\t\t\t'Offer.begins_at <= ' => $data,\n\t\t\t\t\t\t\t\t'Offer.ends_at >= ' => $data \n\t\t\t\t\t\t) \n\t\t\t\t),\n\t\t\t\t'Offer' \n\t\t);\n\t\t$contador = $this->Utility->urlRequestToGetData ( 'offers', 'count', $params );\n\t\t\n\t\tif ($this->Session->check ( 'ofertasIds' )) {\n\t\t\t$this->Session->write ( 'HomeOfertas', 'desejos' );\n\t\t} else if (! $contador > 0 && ! $this->Session->check ( 'Ofertas-Assinaturas' )) {\n\t\t\t$this->Session->write ( 'HomeOfertas', 'publico' );\n\t\t} else {\n\t\t\t$this->Session->write ( 'HomeOfertas', 'personalizado' );\n\t\t}\n\t}", "public function testWebinarRegistrantsQuestionsGet()\n {\n }", "public function testWebinarRegistrants()\n {\n }", "public function testAttendeeSetStatusRecurExceptionAllFollowing()\n {\n $from = new Tinebase_DateTime('2012-02-01 00:00:00');\r\n $until = new Tinebase_DateTime('2012-02-29 23:59:59');\r\n \r\n $event = new Calendar_Model_Event(array(\r\n 'summary' => 'Some Daily Event',\r\n 'dtstart' => '2012-02-03 09:00:00',\r\n 'dtend' => '2012-02-03 10:00:00',\r\n 'rrule' => 'FREQ=DAILY;INTERVAL=1',\r\n 'container_id' => $this->_testCalendar->getId(),\r\n 'attendee' => $this->_getAttendee(),\r\n ));\r\n \r\n $persistentEvent = $this->_controller->create($event);\n \n $exceptions = new Tinebase_Record_RecordSet('Calendar_Model_Event');\r\n $recurSet = Calendar_Model_Rrule::computeRecurrenceSet($persistentEvent, $exceptions, $from, $until);\r\n \n // accept for sclever thisandfuture\n $start = $recurSet[10];\n $sclever = Calendar_Model_Attender::getAttendee($start->attendee, $event->attendee[1]);\r\n $sclever->status = Calendar_Model_Attender::STATUS_ACCEPTED;\r\n $this->_controller->attenderStatusCreateRecurException($start, $sclever, $sclever->status_authkey, TRUE);\r\n \n $events = $this->_controller->search(new Calendar_Model_EventFilter(array(\r\n array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_testCalendar->getId())\r\n )))->sort('dtstart', 'ASC');\n \n // assert two baseEvents\n $this->assertTrue($events[0]->rrule_until instanceof Tinebase_DateTime, 'rrule_until of first baseEvent is not set');\n $this->assertTrue($events[0]->rrule_until < new Tinebase_DateTime('2012-02-14 09:00:00'), 'rrule_until of first baseEvent is not adopted properly');\n $this->assertEquals(Calendar_Model_Attender::STATUS_NEEDSACTION, Calendar_Model_Attender::getAttendee($events[0]->attendee, $event->attendee[1])->status, 'first baseEvent status must not be touched');\n \n $this->assertEquals($events[1]->dtstart, new Tinebase_DateTime('2012-02-14 09:00:00'), 'start of second baseEvent is wrong');\n $this->assertTrue(empty($events[1]->recurid), 'second baseEvent is not a baseEvent');\n $this->assertEquals($events[1]->rrule, $event->rrule, 'rrule of second baseEvent must be set');\n $this->assertFalse($events[1]->rrule_until instanceof Tinebase_DateTime, 'rrule_until of second baseEvent must not be set');\n $this->assertEquals(Calendar_Model_Attender::STATUS_ACCEPTED, Calendar_Model_Attender::getAttendee($events[1]->attendee, $event->attendee[1])->status, 'second baseEvent status is not touched');\n }", "public function testGetEnrollmentRequest()\n {\n }", "public function testRequestEnrollment()\n {\n }", "public function AnomalyPageTest()\n {\n // Test user login\n $user = $this->testAccounts[\"anthro-analyst\"];\n $this->browse(function ($browser) use ($user) {\n $browser->visit(new loginPage)\n ->loginUser($user['email'], $user['password'])\n ->pause(3000)\n ->assertSee('Welcome');\n\n $browser->visit(new specimenPage)\n ->pause(5000)\n ->maximize()\n ->pause(2000)\n\n ->click('@leftSideBar-menu')\n ->pause(2000)\n ->click('@project-report-button')\n ->driver->switchTo()->window(collect($browser->driver->getWindowHandles())->last());\n $browser\n ->pause(3000)\n\n ->click('@anomaly_as')\n ->pause(10000)\n ->assertSee('Accession Number')\n ->assertSee('Bone')\n ->assertSee('Provenance 1')\n ->assertSee('Provenance 2')\n ->assertSee('Side')\n ->assertSee('Anomaly')\n\n ->pause(3000)\n\n\n ->logoutUser();\n });\n }", "public function testGetWaiversDefault()\n {\n $numWaivers = 5;\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::waivers($numWaivers));\n\n $waivers = $sw->getWaiverSummaries();\n\n $this->assertCount($numWaivers, $waivers);\n foreach($waivers as $waiver) {\n $this->assertInstanceOf(SmartwaiverWaiverSummary::class, $waiver);\n }\n\n $this->checkGetRequests($container, ['/v4/waivers?limit=20']);\n }", "public function testGetWaiversDefault()\n {\n $numWaivers = 5;\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::waivers($numWaivers));\n\n $waivers = $sw->getWaiverSummaries();\n\n $this->assertCount($numWaivers, $waivers);\n foreach($waivers as $waiver) {\n $this->assertInstanceOf(SmartwaiverWaiverSummary::class, $waiver);\n }\n\n $this->checkGetRequests($container, ['/v4/waivers?limit=20']);\n }", "public function testReportsReferralsPayoutHistoryGet()\n {\n }", "public function testWebinarDelete()\n {\n }", "public function testWebinarPanelists()\n {\n }", "public function testUpcomingEvents()\n {\n // otherwise test will fail.\n // Other approach is to use fake data or mock it.\n \n $response = $this->json('GET', '/events');\n \n $response\n ->assertStatus(200)\n ->assertJson([\n ['name' => 'IT Expo']\n ]);\n }", "public function testSuccessfulGetAttendants_NoAttendants()\n {\n $this->ajaxGet('/wap/' . self::ROUTE_PREFIX . '/approved/list?page=1')\n ->seeJsonContains([\n 'code' => 0,\n ]);\n\n $result = json_decode($this->response->getContent(), true);\n Assert::assertEquals(0, $result['pages']);\n Assert::assertEquals([], $result['attendants']);\n }", "public function testCreateRecurExceptionAllFollowingPreserveAttendeeStatus()\n {\n $from = new Tinebase_DateTime('2012-02-01 00:00:00');\n $until = new Tinebase_DateTime('2012-02-29 23:59:59');\n \n $event = new Calendar_Model_Event(array(\n 'summary' => 'Some Daily Event',\n 'dtstart' => '2012-02-03 09:00:00',\n 'dtend' => '2012-02-03 10:00:00',\n 'rrule' => 'FREQ=DAILY;INTERVAL=1',\n 'container_id' => $this->_testCalendar->getId(),\n 'attendee' => $this->_getAttendee(),\n ));\n \n $persistentEvent = $this->_controller->create($event);\n $persistentSClever = Calendar_Model_Attender::getAttendee($persistentEvent->attendee, $event->attendee[1]);\n \n // accept series for sclever\n $persistentSClever->status = Calendar_Model_Attender::STATUS_ACCEPTED;\n $this->_controller->attenderStatusUpdate($persistentEvent, $persistentSClever, $persistentSClever->status_authkey);\n \n // update \"allfollowing\" w.o. scheduling change\n $persistentEvent = $this->_controller->get($persistentEvent->getId());\n $exceptions = new Tinebase_Record_RecordSet('Calendar_Model_Event');\n $recurSet = Calendar_Model_Rrule::computeRecurrenceSet($persistentEvent, $exceptions, $from, $until);\n \n $recurSet[5]->description = 'From now on, everything will be better'; //2012-02-09 \n $updatedPersistentEvent = $this->_controller->createRecurException($recurSet[5], FALSE, TRUE);\n \n $updatedPersistentSClever = Calendar_Model_Attender::getAttendee($updatedPersistentEvent->attendee, $event->attendee[1]);\n $this->assertEquals(Calendar_Model_Attender::STATUS_ACCEPTED, $updatedPersistentSClever->status, 'status must not change');\n }", "public function testReportsEventsExportGet()\n {\n }", "public function testWebinarRegistrantStatus()\n {\n }", "public function testLeaseCalendarFrontEnd()\n {\n $this->get(route('lease.calendar'))->assertStatus(200);\n }", "function testGetNotReviewed()\n {\n $events = $this->GroupEvent->getNotReviewed(1);\n $this->assertEqual(Set::extract('/GroupEvent/id', $events), array(1, 2));\n\n //Test invalid event\n $events = $this->GroupEvent->getNotReviewed(999);\n $this->assertEqual(Set::extract('/GroupEvent/id', $events), null);\n }", "public function index_should_return_a_collection_of_records()\r\n {\r\n // by year collection\r\n $this->get('/holidays/us/2018/');\r\n $body = json_decode($this->response->getContent(), true );\r\n $this->assertArrayHasKey('holidays', $body);\r\n $this->assertCount(47, $body['holidays']);\r\n $this->assertArrayHasKey('2018-02-19', $body['holidays']);\r\n\r\n $arr= $body['holidays']['2018-02-19'];\r\n $this->assertCount(1, $arr);\r\n $this->assertEquals( $arr[0]['name'], 'Washington\\'s Birthday');\r\n $this->assertEquals( $arr[0]['country'], 'us');\r\n $this->assertEquals( $arr[0]['date'], '2018-02-19');\r\n $this->assertEquals( $arr[0]['public'], '0');\r\n\r\n ///////////////////////////////\r\n // public\r\n $this->get('/holidays/us/2018/?public=1');\r\n $body = json_decode($this->response->getContent(), true );\r\n $this->assertArrayHasKey('holidays', $body);\r\n $this->assertCount(7, $body['holidays']);\r\n $this->assertArrayHasKey('2018-01-01', $body['holidays']);\r\n\r\n $arr= $body['holidays']['2018-01-01'];\r\n $this->assertCount(2, $arr);\r\n $this->assertEquals( $arr[1]['name'], 'New Year\\'s Day');\r\n $this->assertEquals( $arr[1]['country'], 'us');\r\n $this->assertEquals( $arr[1]['date'], '2018-01-01');\r\n $this->assertEquals( $arr[1]['public'], '1');\r\n\r\n ///////////////////////\r\n // month\r\n $this->get('/holidays/us/2018/?month=3')\r\n ->seeJson( [\r\n 'status'=> 200,\r\n 'message'=>'succeeded with content',\r\n 'holidays'=>[\r\n [\r\n 'name'=>'International Women\\'s Day',\r\n 'country'=> 'us',\r\n 'date'=>'2018-03-08',\r\n 'public'=> 0\r\n ],\r\n [\r\n 'name'=>'Saint Patrick\\'s Day',\r\n 'country'=> 'us',\r\n 'date'=>'2018-03-17',\r\n 'public'=> 0\r\n ],\r\n [\r\n 'name'=>'Palm Sunday',\r\n 'country'=> 'us',\r\n 'date'=>'2018-03-25',\r\n 'public'=> 0\r\n ],\r\n [\r\n 'name'=>'Good Friday',\r\n 'country'=> 'us',\r\n 'date'=>'2018-03-30',\r\n 'public'=> 1\r\n ]\r\n ]\r\n ] );\r\n }", "public function testGetEvenUnevenTimes()\n {\n $expectedArray = [ 'even' => 1, 'uneven' => 3 ];\n\n $this->assertEquals($expectedArray, API::countEvenUnevenTimes($this->data), \"TEST 1 - counting visits in even and ueven hours\");\n }", "public function testVolunteerHourIndexForProjectFailure_Inactive()\n {\n $this->session([\n 'username' => $this->inactiveUser->username, \n 'access_level' => $this->inactiveUser->access_level\n ]);\n \n // Set test user as current authenticated user\n $this->be($this->inactiveUser);\n \n $projectID = 2;\n // Call route under test\n $response = $this->call('GET', 'volunteerhours/project/'.$projectID);\n \n // Assert redirected to access denied page\n $this->assertRedirectedToRoute('unauthorized');\n }", "public function test_user_can_view_invites_no_invites()\n {\n $user = factory(User::class, 1)->create()->first();\n\n $this->actingAs($user);\n\n $response = $this->get('/invites');\n\n $response->assertStatus(200);\n }", "public function testThatGetEnrollmentsThrowsExceptionIfUserIdIsMissing()\n {\n $api = new MockManagementApi();\n\n try {\n $api->call()->users()->getEnrollments( '' );\n $caught_message = '';\n } catch (EmptyOrInvalidParameterException $e) {\n $caught_message = $e->getMessage();\n }\n\n $this->assertContains( 'Empty or invalid user_id', $caught_message );\n }", "public function testShowAllIncidences()\n {\n //1. Preparar el test\n //2. Executar el codi que vull provar.\n //3. Comprovo: assert\n\n $incidences = factory(Incidence::class, 50) -> create();\n\n\n $response = $this->get('/incidences');\n $response->assertStatus(200);\n $response->assertSuccessful();\n $response->assertViewIs('list_events');\n\n\n //TODO faltaria contar que hi ha 50 al resultat\n\n// foreach ( $incidences as $incidence) {\n// $response->assertSeeText($incidence->title);\n// $response->assertSeeText($incidence->description);\n// }\n }", "public function testAttendeeSetStatusRecurException()\n {\n $event = new Calendar_Model_Event(array(\n 'uid' => Tinebase_Record_Abstract::generateUID(),\n 'summary' => 'Abendessen',\n 'dtstart' => '2009-03-25 18:00:00',\n 'dtend' => '2009-03-25 18:30:00',\n 'originator_tz' => 'Europe/Berlin',\n 'rrule' => 'FREQ=DAILY;INTERVAL=1;UNTIL=2009-03-31 17:30:00',\n 'exdate' => '2009-03-27 18:00:00,2009-03-29 17:00:00',\n 'container_id' => $this->_testCalendar->getId(),\n Tinebase_Model_Grants::GRANT_EDIT => true,\n ));\n $event->attendee = $this->_getAttendee();\n unset($event->attendee[1]);\n \n $persistentEvent = $this->_controller->create($event);\n $attendee = $persistentEvent->attendee[0];\n \n $exceptions = new Tinebase_Record_RecordSet('Calendar_Model_Event');\n $from = new Tinebase_DateTime('2009-03-26 00:00:00');\n $until = new Tinebase_DateTime('2009-04-01 23:59:59');\n $recurSet = Calendar_Model_Rrule::computeRecurrenceSet($persistentEvent, $exceptions, $from, $until);\n \n $exception = $recurSet->getFirstRecord();\n $attendee = $exception->attendee[0];\n $attendee->status = Calendar_Model_Attender::STATUS_ACCEPTED;\n \n $this->_controller->attenderStatusCreateRecurException($exception, $attendee, $attendee->status_authkey);\n \n $events = $this->_controller->search(new Calendar_Model_EventFilter(array(\n array('field' => 'period', 'operator' => 'within', 'value' => array('from' => $from, 'until' => $until)),\n array('field' => 'uid', 'operator' => 'equals', 'value' => $persistentEvent->uid)\n )));\n \n $recurid = array_values(array_filter($events->recurid));\n $this->assertEquals(1, count($recurid), 'only recur instance must have a recurid');\n $this->assertEquals('2009-03-26 18:00:00', substr($recurid[0], -19));\n $this->assertEquals(2, count($events));\n }", "public function testWebinarUpdate()\n {\n }", "public function _testMultipleInventories()\n {\n\n }", "public function testVolunteerHourCreateForContactFailure_Inactive()\n {\n $this->session([\n 'username' => $this->inactiveUser->username, \n 'access_level' => $this->inactiveUser->access_level\n ]);\n \n // Set test user as current authenticated user\n $this->be($this->inactiveUser);\n \n $volunteerID = 2;\n // Call route under test\n $response = $this->call('GET', 'volunteerhours/add/volunteer/'.$volunteerID);\n \n // Assert redirected to access denied page\n $this->assertRedirectedToRoute('unauthorized');\n }", "public function testEventsList()\n {\n $response = $this->get('/events');\n\n $response->assertStatus(200);\n }", "public function testWebinarCreate()\n {\n }", "public function testSuccessfulListApprovedAttendants_NoAttendants()\n {\n $this->ajaxGet('/' . self::ROUTE_PREFIX . '/approved/list?page=1&size=2')\n ->seeJsonContains([\n 'code' => 0,\n ]);\n\n $result = json_decode($this->response->getContent(), true);\n Assert::assertEquals(0, $result['pages']);\n Assert::assertEquals([], $result['attendants']);\n }", "public function testOfficeDetailsPageIsValidWithoutCrawls() {\n // but at least in our dev/test environments, no crawls have run yet, so the DB should be empty.\n $this->request('GET', 'offices/detail/49015');\n $this->assertResponseCode(200);\n }", "public function test_admin_member_in_assignmentApp_b()\n {\n $this->request('GET', ['pages/Assignments', 'apprentice_in_assignment']);\n $this->assertResponseCode(404);\n }", "public function index_should_return_single_record()\r\n {\r\n // Single day\r\n $this->get('/holidays/us/2018/?month=3&day=25')\r\n ->seeJson( [\r\n 'status'=> 200,\r\n 'message'=>'succeeded with content',\r\n 'holidays'=>[\r\n [\r\n 'name'=>'Palm Sunday',\r\n 'country'=> 'us',\r\n 'date'=>'2018-03-25',\r\n 'public'=> 0\r\n ]\r\n ]\r\n ] );\r\n\r\n // previous Single day\r\n $this->get('/holidays/us/2018/?month=3&day=25&previous=1')\r\n ->seeJson( [\r\n 'status'=> 200,\r\n 'message'=>'succeeded with content',\r\n 'holidays'=>[\r\n [\r\n 'name'=>'Saint Patrick\\'s Day',\r\n 'country'=> 'us',\r\n 'date'=>'2018-03-17',\r\n 'public'=> 0\r\n ],\r\n ]\r\n ] );\r\n\r\n // upcoming Single day\r\n $this->get('/holidays/us/2018/?month=3&day=25&upcoming=1')\r\n ->seeJson( [\r\n 'status'=> 200,\r\n 'message'=>'succeeded with content',\r\n 'holidays'=>[\r\n [\r\n 'name'=>'Good Friday',\r\n 'country'=> 'us',\r\n 'date'=>'2018-03-30',\r\n 'public'=> 1\r\n ],\r\n ]\r\n ] );\r\n }", "function getAttendees(){\n $this->attendees = array();\n $i = 0;\n $schoolTable = 'school_'.$this->schoolId;\n $query = \"SELECT id, name AS attendeeName, logintype, email, phone, hotel, room, \n committee AS committeeId, country AS countryId \n FROM $schoolTable\";\n $result = mysql_query($query) or die(mysql_error());\n while($row = mysql_fetch_array($result)){\n $this->attendees[$i] = array();\n $this->attendees[$i]['id'] = $row['id'];\n $this->attendees[$i]['name'] = $row['attendeeName'];\n $this->attendees[$i]['logintype'] = $row['logintype'];\n $this->attendees[$i]['committeeId'] = $row['committeeId'];\n $this->attendees[$i]['countryId'] = $row['countryId'];\n $this->attendees[$i]['email'] = $row['email'];\n $this->attendees[$i]['phone'] = $row['phone'];\n $this->attendees[$i]['hotel'] = $row['hotel'];\n $this->attendees[$i]['room'] = $row['room'];\n $i++;\n }\n // Populate empty rows if attendees table isn't filled\n for($i; $i<$this->totalAttendees; $i++){\n $this->attendees[$i] = array();\n $this->attendees[$i]['id'] = 0;\n $this->attendees[$i]['name'] = 0;\n $this->attendees[$i]['logintype'] = 0;\n $this->attendees[$i]['committeeId'] = 0;\n $this->attendees[$i]['countryId'] = 0;\n $this->attendees[$i]['email'] = 0;\n $this->attendees[$i]['phone'] = 0;\n $this->attendees[$i]['hotel'] = 0;\n $this->attendees[$i]['room'] = 0;\n }\n }", "public function testDashboardGet()\n {\n $this->visit('/dashboard/articless')\n ->see('Nieuws');\n }", "public function testSchedulesUpdateOut()\n {\n $result = $this->visit('events/{event}/schedules/update/{id}')\n ->see('create your suaray account')\n ->see('welcome to suaray')\n ->seePageIs('/account/register');\n }", "public function testIndexForHr() {\n\t\t$opt = [\n\t\t\t'method' => 'GET',\n\t\t\t'return' => 'vars',\n\t\t];\n\t\t$expected = [\n\t\t\t'deferredSaves' => [\n\t\t\t\t[\n\t\t\t\t\t'Deferred' => [\n\t\t\t\t\t\t'id' => '2',\n\t\t\t\t\t\t'employee_id' => '3',\n\t\t\t\t\t\t'internal' => false,\n\t\t\t\t\t\t'data' => [\n\t\t\t\t\t\t\t'changed' => [\n\t\t\t\t\t\t\t\t'EmployeeEdit' => [\n\t\t\t\t\t\t\t\t\tCAKE_LDAP_LDAP_DISTINGUISHED_NAME => 'CN=Суханова Л.Б.,OU=ОС,OU=Пользователи,DC=fabrikam,DC=com',\n\t\t\t\t\t\t\t\t\tCAKE_LDAP_LDAP_ATTRIBUTE_TITLE => 'Ведущий инженер',\n\t\t\t\t\t\t\t\t\tCAKE_LDAP_LDAP_ATTRIBUTE_DIVISION => 'Группа №1',\n\t\t\t\t\t\t\t\t\tCAKE_LDAP_LDAP_ATTRIBUTE_PHOTO => '/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCABgAGADASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD+/iiiigAooooAKK+If2tP+Cgv7Jv7FkOmj9oH4saZ4X13XLc3/h/wPpFpq/inx7r9uGaze6svCPhuxvb8aUHAB1jVlj0lWQqX3hBX4g+L/wDg5y+EGk/EC7tvBX7Pvj/4g/C9bYC21+51XSvAfiq11EXhP2r+ydYbWLPVtIvLUKWD/wDCP6ppS71kjctuUA/qcor+afwl/wAHOP7JeqX0Np4y+A/7Q/gu2mX5tT0+18BeMLe27Za1svF1jeEjtiz5Gcg1+yf7Kv7df7L/AO2fod9rX7PnxZ0LxncaNBa3PiPwjP8Aa9E8e+FRdOojHiLwfrEdlrNnbtnA1REfSSzKqOxGSAfYtFFFABRRRQAUUUUAFfK/7W37XXwZ/Yt+Dur/ABq+OGs6lp3hPTr+10Ow07QtMOr+KPFGu6rvGn+H/DeiiS2e/wBVnZCUjVwoWOQFhJhT9UV/NB/wc66PeXX7JnwC1uOWY2WkftH2Vvd2JIW3ubjVPht8QLOyuGHTKMZCDng4wBhiQD+Ur9uP9pq8/bB/au+M37RclnqGj2HjvxJaf8IroOr3dndan4e8DaFpGn+GvB+j3xs2Nmc2lp9uZrRiSfvfN0+U6Mk9TmigAr1r4B/G/wCIf7N/xg+Hvxs+Fev6loPjH4feJLTV7SWwuzajVtK+241jw1rC/cvPDfiOzzo2s6MQoBGCMdfJaKAP9Oz9hL9sXwL+3T+zt4W+PvgTSrvw3DrF3quheKPB2oX1tfap4K8ZaBdiy1jw5fXtotqmpqzfZNY0rVYsx6tpOrRTYjLhD9qV/Nb/AMGydnqsP7H/AMcr+6lWbS7v9pnVv7Hh+VfszWnw5+H9lqtyScHLEjkjJwRzuGP6UqACiiigAooooAK/AD/g45TQ7z/gnnLHfajptnr2nfHL4Zaz4d0++u7O21LVfst3qOkawNFtL3/S74Wekay15dixBBABdlBBP7/1/M3/AMHN3w0v/Ef7LvwI+KdrB51p8LPjldaXrrZGLbS/iP4Q1LRre8IxkAaxpOjWrE5BMgB9aAP4o6KKKACiiigD+8L/AINzY9DsP+CesNnZato17r2o/HP4nax4k06wurO61LSrm8vNOs9KXV7Gyzd6Q97pGiLeWgv1UgMdpIDg/v8AV/M5/wAGyfwwvvDn7LXx4+Kl1AIbX4p/Gu00fSGyM3WlfC/whp2i3F2R1AbWNX1m0VgqjKYyccf0x0AFFFFABRRRQAV84/tUfs2eBf2uPgB8Rv2ePiJNf2Xhj4kaKun3OraP9kGveHdSs72z1fR/EWjvdxXdqmraNrFnZ30T7MOVKBgJNx+jqZJ9xvpQB/lE/GP4Z618F/i38TvhF4igWHXfhZ4+8WeANQM9n9lW9ufDGr6lpC3gswOftv2P7bwMkr90YATziv6Gv+DjP9lzS/hB+1f4Q/aB8Ny2sOlftN+G9Xv/ABJoMGRdWvxG+HFnoGi6xq43DP2LxL4b1fw6o6AayNYZTgqT/PLQAV6P8HPhnrfxo+L/AMK/hB4dK/298TvH/hPwBo5g/wBKWyuvE+r6fpH2z7GRj/Q/tZvOQOGGc4584r+hv/g3I/Zf0v4v/tZ+MP2gfEc1rLpf7MnhyzuPDejEf6VdfEb4kWmvaNo+rgBgfsvhzw3ZeL93Ya1rfzZBoA/sV/ZT/Zt8B/sj/s//AAz/AGdfhwb+Xwl8M9EOkWmp6x9kbW/EOo3F5eavrPiLV2tkVZNW1nV7281eVthZWkCHAQEfSFMRNv8AQen/ANf/AD3p9ABRRRQAUUUUAFMk+430pJJBGMn/AD/n8K/Lz9tz/grH+yR+xZo/iPTfEfxI0Hxr8arKwvBoPwU8E3beJvFVzrn2O8OlW3i46Mz2XgfSTfx41W98S3dp5MRZ03lVoA/mI/4L9ftv/BL9rT4x/B/wR8E9W1nxJH+zofiz4W8d6xfeH9Z0PSj4x13WfCFldaRo51kWN7qx0hfB94by6bRSqncqlvvH+f2t7xR4o1jxt4m8V+MvEc3neI/GHiPxF4w16WDH2W71/wAT6xqOr6xeE4G/beXoJ5wMEDnIrBoAK/fr/ggP+298D/2TfjF8YPA/xp1jWfDiftFH4TeF/AWsadoOs65oA8Y6Fq/iGybSNY/sYXt3pP8AbFz4wtP7F1Z7EhySW46fgLW94X8U6x4I8T+FvG3hyY2fiPwh4j8P+MNCmuD/AMeWveGNY07V9G2g9CbyzY44J5B2gEgA/wBZ6NxIufwIqSvy0/Yj/wCCsn7JP7aOj+G9M8N/EPQvBHxqvNPtBr/wa8c3TeG/FUGumzQ6tZ+EP7YZLTxtpS3p2WL+HLu43xRh3w3A/UhH3f0Pr/8AX/z2oAfRRRQBVleKNCTJ5QiHnnjPyjJORzkeoFfj3+2L/wAFtv2Lv2TDqvh2x8X/APC/vivZD7Ofhx8GLu01+20m+O3daeL/AB1vfwh4aAO75RJrHiMAFR4bKkOf5KP+CgX/AAVj/ab/AG0fG/jXw5pXj3xJ8Mv2bzrWraR4R+E/hDVrzwvbav4Xtb37JZ3vxJ1iwUaz4w1nWgw1e9s9Xu/+EbKjA0UAZH5SGMxZ8qHyov8Anhakjv6bVbPcncB6jmgD9g/2wv8Agt5+23+1h/a/h3RvFNt+zx8K9RbyP+EF+EN3e22v6rphBDWfiP4kMbPxJq+c7LwaN/wjGifOw2YLAfj3/wAtJpussw+0TT8g3l7yRkZPBzn5cgk7cjJpfLf+83/kP/4mjy3/ALzf+Of/ABNABRR5b/3m/wDHP/iaPLf+83/jn/xNABRR5b/3m/8AHP8A4mjy3/vN/wCOf/E0AGR5kMsXE0Vz9pil6XlldtliT2UDjjIJIJILYr9g/wBjz/gt5+2z+ygdI8Paz4n/AOGifhbp5s4W8CfF66vLnX9M0wKyEeEviRm88SaUFBKqdbPibRgMYJZVA/Hzy3/vN/45/wDE0eXJ/eb8dmOOmcAHH0IOOhFAH+hj+x1/wW6/Yq/a0Gk+HL/xfL8Avi3qS/Z0+HPxhvLPQrXVr4bibTwh45yvhHxIAdv7syaN4jYfL/wjqAA1+xKzRFEkEgMcoHlnswIyMHqeP/r81/kiPGZYhFLD50X/ADyuScj7oxkcjIDZIyeQo2jIH6uf8E/f+Cs37Tn7GfjvwVoOs+O/EnxN/Zu/trS7Dxj8JfGN5e+J7fSfC91eCz1jWPhxe3n/ABOvDetaOD/a40j/AJFzVs5XSM5IAP/Z',\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t'current' => [\n\t\t\t\t\t\t\t\t'EmployeeEdit' => [\n\t\t\t\t\t\t\t\t\tCAKE_LDAP_LDAP_ATTRIBUTE_TITLE => 'Зам. начальника отдела - главный специалист',\n\t\t\t\t\t\t\t\t\tCAKE_LDAP_LDAP_ATTRIBUTE_DIVISION => '',\n\t\t\t\t\t\t\t\t\tCAKE_LDAP_LDAP_ATTRIBUTE_PHOTO => '/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAAPAAA/+4ADkFkb2JlAGTAAAAAAf/bAIQABgQEBAUEBgUFBgkGBQYJCwgGBggLDAoKCwoKDBAMDAwMDAwQDA4PEA8ODBMTFBQTExwbGxscHx8fHx8fHx8fHwEHBwcNDA0YEBAYGhURFRofHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8f/8AAEQgAyADIAwERAAIRAQMRAf/EAG0AAAIDAQEBAAAAAAAAAAAAAAIDAAEEBQYIAQEBAQEBAAAAAAAAAAAAAAAAAQIDBBAAAgICAgIBBAIDAQAAAAAAAAECAxEEIQUxEiJBURMGMkJhUhQWEQEBAQEBAAAAAAAAAAAAAAAAAQIREv/aAAwDAQACEQMRAD8A+qQBn4AxbXhlHB3VywOVauQhfqBaiASiASQBIBiZQXsgLU0AxTQRbkUAyKBoAXECvUgrADK/IHS1PoRXZ1vCA2xAsCAVLwBh2Vwyjibi8gcuyPJUAogEoAF6AU4gBKSRAqe1GP1ARPsYL6lArtIfcBtfZQf1CNNe5GX1A0RsUgo0sgT0ApwIAcQCguQOjqLlEV2tbwgNkQLAgFSAx7K4YHG24+TSOZZDkAFEA1EAvUBVrUUBy9zcjBPkDgb3cxhn5EHE2P2HDfyAy/8Ao+f5Aadf9jy18gO1pd6pNfIqPQaXYxmlyFdei1SQGlLIEcAAcAJCHJB0NWPKCuxr+EQa4gWBAKkBlvXBRydqPko5tkOQgPQAlECpcIDmb+yoRfIHj+47T19uSDxXZ9xLL5Irz+x2k23yQZX2U8+QHU9rNPyOjtdd3Uk18i9R7Lp+5z6/Io9p1m+ppclHeosUkgHpZApwAuNfIG3Wj4IrqULgg1RAsCAVIDNeuCjmbMfJRgshyVAegE9AM+zL1iyDyvdbfqpcko8B3O3KTlhmbWuPK7asm2Tq8c+zWsf0J04RLVmvoOnFRommOnGzVVkWi9OPS9Tszi1yOpx7vpN9/HLNSpx7Tr9j2iuSo69XKKG+oBRhyBroiRXQpXBBoiBYEAqQCLlwUc69FGOceSoD0AqUcIDl9hLEWQeI7y1v2M1qR47bplZNmLW5CodPKf0MddJkx/r0mv4jp5Is/Xpf6l6nlnfQST/iOr5FDpJL+pOr5a6OulW1wJUuXoOr9oSRuVyse26i1tI6RivTazzFFRrSAKKA00oit1XggegLAgFMBNvgowXIoyyjyVA+gA2R4A4na8RZKrwvbrMmYrcjlU6inPwcrXbMd7Q6mMkuDHXWR1q+jg1/EdOBs/X4v+pes8ZbP1+P+pOtSEy6KK/qTrXGS/qVH6CVLkqnW9J+DpmuGo9L1PGDrHGx6rT/AIo2w3JcAEgNFJFbqiB6AgEAjARaUYrkUZ3HkqIogBbH4gcDt18WZrUeH7NfNnPTpmEacF7o5V6Mx6nrVHCMOjv68YNIsStDog14KyRbrQ+wWMd1EEnwZrccncpjyQscuVSUzpmuOo63WRw0dZXn1HqdJfFHSOdb1HgqLSA0VIitlZA9AQCARgJsKMlqKhDRREgAtXxIrz/bRzFma1I8T2Vb92c9O2Yya6akcq75jv6FzWDLbuauzwinHQhfwOpwu24dXjDdcRZHO2Je2SLxi/HmRqVjUdXr6sNHXNefUel04/FHWOFjfGPBpgSgA6uJFaq0QOQEAgEYCplGWxFCGioiACxcEWOL2VWYszXTLyPY62ZPg46ejMc+Gu1I512kdHVqksEb46uumiLxthJ4J1eJPLHTjNZW2VOM86GyKGGvyWMWOnpUYaO2XDcdzVhhI6x5tN8I8G3MaiENhEinwRAxAQCARgKsKM1hQiRUUgJKPBFjm71WUzFdMvNb+v8AJ8HLT04YYa69vByr0Ruo1l9iN8a41YIpkURTYwyEovwJmmS566+xAEaFksZ03a1WMHbLzbrq0QwkdY8+muCNOZiQQyKCmxIDAgEAjAVPwUZbWUIZUWgCa4IrHtV5TM1vLgb1PLOWo9GKwKtKRysejNbKUsGXWGyaQaB78k4p9UgzWqOMFZVKKCBjXlmpHPVbdeo65jzbroVQwjrHC0+KKyNAHEBsSAgIBAIwFWeCjJayhDfJQUQGLwQIvjlEqxxN6C5OdjrmuTPCkcq9OKZXYc69GaKVnAdIX+TkNcPpsDNjbXZwGLB+2Sxzp1Ucs3I4aroUVnWPPqtkI8G3OjwVlaAZEKZEgICAQCMBNhRjtZYEN8lBRYDUwFXPgg4u+/Jit5rhXzxI46ejFBC0516c073yZds1EnkOh9YStMJ4Dlqmwnyajjqt2vy0dcvNuuprrhHWOFrXFcFZXgorAQcUFMRAQEAgEYCbHwUYrmaGdvkqIpBR/kIE3W8Eo4+9LOTFWOFs5yzlXbNZ4yaZzsd86aap5Jx3zpphhk46ez48DiXQkxxy1o+rLZqRx1p0tVeDrHn1XUo8HSOda4sqCwUTABJAGiCwIBAKYCbfBRguZqIzSlyUV7gVKwz1Wa63glo5+w/bJijnXU5MVuVllQ0zNjpNLhBonHWbaq8jjfs+KbJxLs6FbY4xdNlFLNSOV06FMMGo52tlbwbjLTCZoNTAIAkAaAgEAgFSAz3Pgo597KMkpcl6isk6oZMzaM9iZnozThkgW6ckUuWrn6EWUP8Ayf4HGpoyGq/sTjXo+vWf2HE9NVWt/gcS1srpwVjp8YYKg0VDYSKHRmVTIyKGRYBoCwIBAKYGa7wBzryjK1yTqIkTqo4kC51kCZVEFKoA1UgCVCCjjrr7A6dChEOnQqSCGxiAXqUX6gWkUEmUHGRQ6Eih0WAQEAgFMDPd4A596IMzjyQFGIBehBTrACVQA/iILVYBqABxgAyMQDUQGKIBKIBegFOJRWAIkUOgUPgUGgIBAKkBntAxWrkyEeoBKJASiBfqBPQCvxoCfjQF/jAJQAJQANQAYogEogXgCmgBaAiQDIIodEoMogEAqQCLfBBjtRAnBASQBJAWkBaQBKIF+pRPUC1EAlEA1EAkgLwBTIBYEAiRQyJQ2JQQEAgFMBNpBjsRAogtAGkBeALSAJFF4AJIC0igkgLwBZBAKYAsCAWgGRKGIoICAQCMBNhBjtAQ2QEmQMQBAQAkUWgCSAJIosCZAgFkFMAWBACQBxKGIoICAQCMBNhBiuYGVy5IDhIB0QDyBMgEgDQBJAWUUBMgQAkBTAFgUASYDIsBkSggIBAI/ACLXwBz9iRBjlPkgbVLIGmL4ALIETAZEA0AQEZRWQJkC0ASAgAsAQImAyLAbEoMCAf/2Q==',\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'created' => '2017-11-16 10:12:44',\n\t\t\t\t\t\t'modified' => '2017-11-16 10:12:44',\n\t\t\t\t\t],\n\t\t\t\t\t'Employee' => [\n\t\t\t\t\t\t'id' => '3',\n\t\t\t\t\t\tCAKE_LDAP_LDAP_ATTRIBUTE_NAME => 'Суханова Л.Б.',\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'Deferred' => [\n\t\t\t\t\t\t'id' => '3',\n\t\t\t\t\t\t'employee_id' => '4',\n\t\t\t\t\t\t'internal' => false,\n\t\t\t\t\t\t'data' => [\n\t\t\t\t\t\t\t'changed' => [\n\t\t\t\t\t\t\t\t'EmployeeEdit' => [\n\t\t\t\t\t\t\t\t\tCAKE_LDAP_LDAP_DISTINGUISHED_NAME => 'CN=Дементьева А.С.,OU=20-02,OU=ОИТ,OU=Пользователи,DC=fabrikam,DC=com',\n\t\t\t\t\t\t\t\t\tCAKE_LDAP_LDAP_ATTRIBUTE_OFFICE_NAME => '216',\n\t\t\t\t\t\t\t\t\tCAKE_LDAP_LDAP_ATTRIBUTE_MAIL => 'a.s.dementeva@fabrikam.com',\n\t\t\t\t\t\t\t\t\tCAKE_LDAP_LDAP_ATTRIBUTE_MANAGER => '',\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t'current' => [\n\t\t\t\t\t\t\t\t'EmployeeEdit' => [\n\t\t\t\t\t\t\t\t\tCAKE_LDAP_LDAP_ATTRIBUTE_OFFICE_NAME => '123',\n\t\t\t\t\t\t\t\t\tCAKE_LDAP_LDAP_ATTRIBUTE_MAIL => 'a.dementeva@fabrikam.com',\n\t\t\t\t\t\t\t\t\tCAKE_LDAP_LDAP_ATTRIBUTE_MANAGER => [\n\t\t\t\t\t\t\t\t\t\t'id' => '8',\n\t\t\t\t\t\t\t\t\t\tCAKE_LDAP_LDAP_ATTRIBUTE_DISTINGUISHED_NAME => 'CN=Голубев Е.В.,OU=АТО,OU=Пользователи,DC=fabrikam,DC=com',\n\t\t\t\t\t\t\t\t\t\tCAKE_LDAP_LDAP_ATTRIBUTE_NAME => 'Голубев Е.В.',\n\t\t\t\t\t\t\t\t\t\tCAKE_LDAP_LDAP_ATTRIBUTE_TITLE => 'Водитель',\n\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'created' => '2017-11-16 12:31:28',\n\t\t\t\t\t\t'modified' => '2017-11-16 12:31:28',\n\t\t\t\t\t],\n\t\t\t\t\t'Employee' => [\n\t\t\t\t\t\t'id' => '4',\n\t\t\t\t\t\tCAKE_LDAP_LDAP_ATTRIBUTE_NAME => 'Дементьева А.С.',\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'Deferred' => [\n\t\t\t\t\t\t'id' => '4',\n\t\t\t\t\t\t'employee_id' => '6',\n\t\t\t\t\t\t'internal' => false,\n\t\t\t\t\t\t'data' => false,\n\t\t\t\t\t\t'created' => '2017-11-16 14:48:22',\n\t\t\t\t\t\t'modified' => '2017-11-16 14:48:22',\n\t\t\t\t\t],\n\t\t\t\t\t'Employee' => [\n\t\t\t\t\t\t'id' => '6',\n\t\t\t\t\t\tCAKE_LDAP_LDAP_ATTRIBUTE_NAME => 'Козловская Е.М.',\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'Deferred' => [\n\t\t\t\t\t\t'id' => '5',\n\t\t\t\t\t\t'employee_id' => '2',\n\t\t\t\t\t\t'internal' => false,\n\t\t\t\t\t\t'data' => [\n\t\t\t\t\t\t\t'changed' => [\n\t\t\t\t\t\t\t\t'EmployeeEdit' => [\n\t\t\t\t\t\t\t\t\t\tCAKE_LDAP_LDAP_DISTINGUISHED_NAME => 'CN=Егоров Т.Г.,OU=14-01,OU=ОС,OU=Пользователи,DC=fabrikam,DC=com',\n\t\t\t\t\t\t\t\t\t\tCAKE_LDAP_LDAP_ATTRIBUTE_DEPARTMENT => 'ОРС',\n\t\t\t\t\t\t\t\t\t\tCAKE_LDAP_LDAP_ATTRIBUTE_OTHER_TELEPHONE_NUMBER => ['+375171000002', '+375171000007'],\n\t\t\t\t\t\t\t\t\t\tCAKE_LDAP_LDAP_ATTRIBUTE_OTHER_MOBILE_TELEPHONE_NUMBER => ['+375291000008'],\n\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'current' => [\n\t\t\t\t\t\t\t\t'EmployeeEdit' => [\n\t\t\t\t\t\t\t\t\tCAKE_LDAP_LDAP_ATTRIBUTE_DEPARTMENT => 'ОС',\n\t\t\t\t\t\t\t\t\tCAKE_LDAP_LDAP_ATTRIBUTE_OTHER_TELEPHONE_NUMBER => ['+375171000002'],\n\t\t\t\t\t\t\t\t\tCAKE_LDAP_LDAP_ATTRIBUTE_OTHER_MOBILE_TELEPHONE_NUMBER => [],\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'created' => '2017-11-17 09:33:19',\n\t\t\t\t\t\t'modified' => '2017-11-17 09:33:19',\n\t\t\t\t\t],\n\t\t\t\t\t'Employee' => [\n\t\t\t\t\t\t'id' => '2',\n\t\t\t\t\t\tCAKE_LDAP_LDAP_ATTRIBUTE_NAME => 'Егоров Т.Г.',\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t],\n\t\t\t'groupActions' => [\n\t\t\t\tGROUP_ACTION_DEFERRED_SAVE_DELETE => __('Delete data group'),\n\t\t\t\tGROUP_ACTION_DEFERRED_SAVE_APPROVE => __('Approve data group'),\n\t\t\t\tGROUP_ACTION_DEFERRED_SAVE_REJECT => __('Reject data group'),\n\t\t\t],\n\t\t\t'fieldsLabel' => [\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_NAME => __dx('app_ldap_field_name', 'employee', 'Name'),\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_DISPLAY_NAME => __dx('app_ldap_field_name', 'employee', 'Name'),\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_SURNAME => __d('cake_ldap_field_name', 'Surname'),\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_GIVEN_NAME => __d('cake_ldap_field_name', 'Given name'),\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_MIDDLE_NAME => __d('cake_ldap_field_name', 'Middle name'),\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_MAIL => __d('cake_ldap_field_name', 'E-mail'),\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_SIP_PHONE => __d('cake_ldap_field_name', 'SIP telephone'),\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_TELEPHONE_NUMBER => __d('app_ldap_field_name', 'Internal telephone'),\n\t\t\t\t'Othertelephone.{n}.value' => __d('app_ldap_field_name', 'Landline telephone'),\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_MOBILE_TELEPHONE_NUMBER => __d('cake_ldap_field_name', 'Mobile telephone'),\n\t\t\t\t'Othermobile.{n}.value' => __d('app_ldap_field_name', 'Personal mobile telephone'),\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_OFFICE_NAME => __d('cake_ldap_field_name', 'Office room'),\n\t\t\t\t'Department.value' => __d('cake_ldap_field_name', 'Department'),\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_DIVISION => __d('cake_ldap_field_name', 'Subdivision'),\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_TITLE => __d('cake_ldap_field_name', 'Position'),\n\t\t\t\t'Manager.' . CAKE_LDAP_LDAP_ATTRIBUTE_NAME => __d('cake_ldap_field_name', 'Manager'),\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_BIRTHDAY => __d('cake_ldap_field_name', 'Birthday'),\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_COMPUTER => __d('cake_ldap_field_name', 'Computer'),\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_EMPLOYEE_ID => __d('cake_ldap_field_name', 'Employee ID'),\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_OBJECT_GUID => __d('cake_ldap_field_name', 'GUID'),\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_DISTINGUISHED_NAME => __d('cake_ldap_field_name', 'Distinguished name'),\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_PHOTO => __d('cake_ldap_field_name', 'Photo'),\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_COMPANY => __d('cake_ldap_field_name', 'Company name'),\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_INITIALS => __d('cake_ldap_field_name', 'Initials'),\n\t\t\t\t'Employee.block' => __d('cake_ldap_field_name', 'Block'),\n\t\t\t],\n\t\t\t'fieldsConfig' => [\n\t\t\t\t'Employee.id' => [\n\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t'truncate' => false,\n\t\t\t\t],\n\t\t\t\t'Employee.department_id' => [\n\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t'truncate' => false,\n\t\t\t\t],\n\t\t\t\t'Employee.manager_id' => [\n\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t'truncate' => false,\n\t\t\t\t],\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_OBJECT_GUID => [\n\t\t\t\t\t'type' => 'guid',\n\t\t\t\t\t'truncate' => false,\n\t\t\t\t],\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_DISTINGUISHED_NAME => [\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'truncate' => false,\n\t\t\t\t],\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_NAME => [\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'truncate' => false,\n\t\t\t\t],\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_DISPLAY_NAME => [\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'truncate' => false,\n\t\t\t\t],\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_INITIALS => [\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'truncate' => false,\n\t\t\t\t],\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_SURNAME => [\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'truncate' => false,\n\t\t\t\t],\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_GIVEN_NAME => [\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'truncate' => false,\n\t\t\t\t],\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_MIDDLE_NAME => [\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'truncate' => false,\n\t\t\t\t],\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_TITLE => [\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'truncate' => true,\n\t\t\t\t],\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_DIVISION => [\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'truncate' => true,\n\t\t\t\t],\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_TELEPHONE_NUMBER => [\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'truncate' => false,\n\t\t\t\t],\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_MOBILE_TELEPHONE_NUMBER => [\n\t\t\t\t\t'type' => 'telephone_name',\n\t\t\t\t\t'truncate' => false,\n\t\t\t\t],\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_OFFICE_NAME => [\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'truncate' => false,\n\t\t\t\t],\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_MAIL => [\n\t\t\t\t\t'type' => 'mail',\n\t\t\t\t\t'truncate' => false,\n\t\t\t\t],\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_PHOTO => [\n\t\t\t\t\t'type' => 'photo',\n\t\t\t\t\t'truncate' => false,\n\t\t\t\t],\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_COMPUTER => [\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'truncate' => true,\n\t\t\t\t],\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_EMPLOYEE_ID => [\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'truncate' => false,\n\t\t\t\t],\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_COMPANY => [\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'truncate' => true,\n\t\t\t\t],\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_BIRTHDAY => [\n\t\t\t\t\t'type' => 'date',\n\t\t\t\t\t'truncate' => false,\n\t\t\t\t],\n\t\t\t\t'Employee.' . CAKE_LDAP_LDAP_ATTRIBUTE_SIP_PHONE => [\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'truncate' => false,\n\t\t\t\t],\n\t\t\t\t'Employee.block' => [\n\t\t\t\t\t'type' => 'boolean',\n\t\t\t\t\t'truncate' => false,\n\t\t\t\t],\n\t\t\t\t'Department.value' => [\n\t\t\t\t\t'type' => 'department_name',\n\t\t\t\t\t'truncate' => true,\n\t\t\t\t],\n\t\t\t\t'Othertelephone.{n}.value' => [\n\t\t\t\t\t'type' => 'telephone_description',\n\t\t\t\t\t'truncate' => false,\n\t\t\t\t],\n\t\t\t\t'Othermobile.{n}.value' => [\n\t\t\t\t\t'type' => 'telephone_name',\n\t\t\t\t\t'truncate' => false,\n\t\t\t\t],\n\t\t\t\t'Manager.' . CAKE_LDAP_LDAP_ATTRIBUTE_NAME => [\n\t\t\t\t\t'type' => 'manager',\n\t\t\t\t\t'truncate' => true,\n\t\t\t\t],\n\t\t\t\t'Subordinate.{n}' => [\n\t\t\t\t\t'type' => 'element',\n\t\t\t\t\t'truncate' => false,\n\t\t\t\t],\n\t\t\t],\n\t\t\t'pageHeader' => __('Index of deferred saves'),\n\t\t\t'breadCrumbs' => [\n\t\t\t\t[\n\t\t\t\t\tCakeText::truncate(__('Employees'), CAKE_THEME_BREADCRUMBS_TEXT_LIMIT),\n\t\t\t\t\t[\n\t\t\t\t\t\t'plugin' => null,\n\t\t\t\t\t\t'controller' => 'employees',\n\t\t\t\t\t\t'action' => 'index'\n\t\t\t\t\t]\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\tCakeText::truncate(__('Deferred saves'), CAKE_THEME_BREADCRUMBS_TEXT_LIMIT),\n\t\t\t\t\t[\n\t\t\t\t\t\t'plugin' => null,\n\t\t\t\t\t\t'controller' => 'deferred',\n\t\t\t\t\t\t'action' => 'index'\n\t\t\t\t\t]\n\t\t\t\t],\n\t\t\t\t__('Index'),\n\t\t\t]\n\t\t];\n\t\t$userRole = USER_ROLE_USER | USER_ROLE_HUMAN_RESOURCES;\n\t\t$userPrefix = 'hr';\n\t\t$userInfo = [\n\t\t\t'role' => $userRole,\n\t\t\t'prefix' => $userPrefix,\n\t\t];\n\t\t$this->applyUserInfo($userInfo);\n\t\t$this->generateMockedController();\n\t\t$url = [\n\t\t\t'controller' => 'deferred',\n\t\t\t'action' => 'index',\n\t\t\t'prefix' => $userPrefix,\n\t\t\t$userPrefix => true\n\t\t];\n\t\t$result = $this->testAction($url, $opt);\n\t\t$this->excludeCommonAppVars($result);\n\t\t$this->assertData($expected, $result);\n\t}", "public function testReportsEventlogGet()\n {\n }", "public function test_list()\n {\n $response = $this->get('/api/employees');\n\n $response->assertStatus(200);\n }", "public function testShowSuccessfully()\n {\n $this->seed(\\UserTableSeeder::class);\n\n $employer = User::query()->where('email', 'employer@user.com')->first();\n Passport::actingAs(\n $employer,\n ['employer']\n );\n\n $response = $this->get('https://api.belsaa.com/employer/employer');\n $response->assertStatus(200);\n $response->assertJsonStructure(['id', 'company_name', 'user_attributes' => ['bio', 'legal_document_url', 'office_photo_url']]);\n $response->assertJsonFragment(['id' => $employer->id]);\n }", "public function reportPeriodicClassWiseTopAbsentList()\n {\n $year = DB::table('student')->distinct()->get(array('year'));\n $shift = DB::table('shift')->get();\n $dept = DB::table('department')->where('status',1)->get();\n $semister = DB::table('semister')->where('status',1)->get();\n return view('report.reportPeriodicClassWiseTopAbsentList')\n ->with('year',$year)\n ->with('shift',$shift)\n ->with('dept',$dept)\n ->with('semister',$semister);\n }", "public function test_getAllCalendars() {\n// \t\t$user = TestingUtil::getTestAdminUser();\n// \t\t$userApp = new UserApp();\n// \t\t$userApp->initializeForAppID($user, 5);\n// \t\t$outlookClient = new OutlookClient($user, $userApp);\n// \t\t$outlookCalendar = new OutlookCalendar($outlookClient);\n// \t\t$calendars = $outlookCalendar->getAllCalendars();\n// \t\t$this->assertCount(3, $calendars);\n\t\t$this->assertEquals(1,1);\n\t}", "public function testIndexForHr()\n {\n $deptId = 1;\n $otherDeptId = 2;\n $userHrAdvisor = factory(User::class)->create([\n 'department_id' => $deptId,\n 'user_role_id' => 4\n ]);\n $hrAdvisor = factory(HrAdvisor::class)->create([\n 'user_id' => $userHrAdvisor->id\n ]);\n $userManagerInDept = factory(User::class)->create([\n 'department_id' => $deptId,\n 'user_role_id' => 2\n ]);\n $managerInDept = factory(Manager::class)->state('upgraded')->create([\n 'user_id' => $userManagerInDept->id\n ]);\n $userManagerOtherDept = factory(User::class)->create([\n 'department_id' => $otherDeptId,\n 'user_role_id' => 2\n ]);\n $managerOtherDept = factory(Manager::class)->state('upgraded')->create([\n 'user_id' => $userManagerOtherDept->id\n ]);\n\n $draftInDept = factory(JobPoster::class)->state('draft')->create([\n 'department_id' => $deptId,\n 'manager_id' => $managerInDept->id,\n ]);\n $draftOtherDept = factory(JobPoster::class)->state('draft')->create([\n 'department_id' => $otherDeptId,\n 'manager_id' => $managerOtherDept->id,\n ]);\n\n $reviewInDept = factory(JobPoster::class)->state('review_requested')->create([\n 'department_id' => $deptId,\n 'manager_id' => $managerInDept->id,\n ]);\n $reviewOtherDept = factory(JobPoster::class)->state('review_requested')->create([\n 'department_id' => $otherDeptId,\n 'manager_id' => $managerOtherDept->id,\n ]);\n\n $openJob = factory(JobPoster::class)->states(['live', 'byUpgradedManager'])->create();\n $closedJob = factory(JobPoster::class)->states(['closed', 'byUpgradedManager'])->create();\n\n $hrResponse = $this->actingAs($hrAdvisor->user)->json('get', route('api.v1.jobs.index'));\n\n $hrResponse->assertJsonMissingExact($this->jobToArray($draftInDept));\n $hrResponse->assertJsonMissingExact($this->jobToArray($draftOtherDept));\n $hrResponse->assertJsonMissingExact($this->jobToArray($reviewOtherDept));\n $hrResponse->assertJsonFragment($this->jobToArray($reviewInDept));\n $hrResponse->assertJsonFragment($this->jobToArray($openJob));\n $hrResponse->assertJsonFragment($this->jobToArray($closedJob));\n }", "public function testGetWaiversParams()\n {\n $paths = [\n '/v4/waivers?limit=5',\n '/v4/waivers?limit=20&verified=true',\n '/v4/waivers?limit=20&templateId=alkagaldeab',\n '/v4/waivers?limit=20&fromDts='.urlencode('2016-11-01 00:00:00'),\n '/v4/waivers?limit=20&toDts='.urlencode('2016-11-01 00:00:00'),\n ];\n\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::waivers(1), count($paths));\n\n $sw->getWaiverSummaries(5);\n $sw->getWaiverSummaries(20, true);\n $sw->getWaiverSummaries(20, null, 'alkagaldeab');\n $sw->getWaiverSummaries(20, null, '', '2016-11-01 00:00:00');\n $sw->getWaiverSummaries(20, null, '', '', '2016-11-01 00:00:00');\n\n $this->checkGetRequests($container, $paths);\n }", "public function testGetMessageListAppointments()\r\n\t{\r\n\t\t// Create an event to make sure we have at least one\r\n\t\t$obj = CAntObject::factory($this->dbh, \"calendar_event\", null, $this->user);\r\n\t\t$obj->setValue(\"name\", \"My Test Event\");\r\n\t\t$obj->setValue(\"ts_start\", date(\"m/d/Y\") . \" 12:00 PM\");\r\n\t\t$obj->setValue(\"ts_end\", date(\"m/d/Y\") . \" 01:00 PM\");\r\n\t\t$eid = $obj->save();\r\n\r\n\t\t// Get events\r\n\t\t$events = $this->backend->GetMessageList(\"calendar_root\", time()); // second param cuts off to today\r\n\t\t$found = false;\r\n\t\tforeach ($events as $evt)\r\n\t\t{\r\n\t\t\tif ($evt[\"id\"] == $eid)\r\n\t\t\t\t$found = true;\r\n\t\t}\r\n\t\t$this->assertTrue($found);\r\n\r\n\t\t// Cleanup\r\n\t\t$obj->removeHard();\r\n\t}", "public function testRentalCalendar()\n {\n $this->visit(route('rental.frontend-calendar'));\n $this->seeStatusCode(200);\n $this->see('Verhuur kalender.');\n }", "public function test_admin_tribe_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Assignments', 'tribe_list']);\n $this->assertResponseCode(404);\n }", "public function testSpecificAllowedEmailAddressGet()\n {\n }", "public function test_search_apartment()\n {\n $response = $this->getJson('/apartments?per_page=5');\n $response->assertStatus(200);\n }", "public function appointments()\n\t{\n\t\tif (!is_cli())\n\t\t{\n\t\t\techo \"This script can only be accessed via the command line\" . PHP_EOL;\n\t\t\treturn;\n\t\t}\n\n\t\t$participations = $this->participationModel->get_confirmed_participations();\n\t\tforeach ($participations as $participation)\n\t\t{\n\t\t\t$appointment = strtotime($participation->appointment); \n\t\t\tif ($appointment > strtotime('tomorrow') && $appointment <= strtotime('tomorrow + 1 day')) \n\t\t\t{\t\t\t\t\t\n\t\t\t\treset_language(L::DUTCH);\n\t\t\t\t\n\t\t\t\t$participant = $this->participationModel->get_participant_by_participation($participation->id);\n\t\t\t\t$experiment = $this->participationModel->get_experiment_by_participation($participation->id);\n\t\t\t\t$message = email_replace('mail/reminder', $participant, $participation, $experiment);\n\t\t\n\t\t\t\t$this->email->clear();\n\t\t\t\t$this->email->from(FROM_EMAIL, FROM_EMAIL_NAME);\n\t\t\t\t$this->email->to(in_development() ? TO_EMAIL_DEV_MODE : $participant->email);\n\t\t\t\t$this->email->subject('Babylab Utrecht: Herinnering deelname');\n\t\t\t\t$this->email->message($message);\n\t\t\t\t$this->email->send();\n\t\t\t\t// DEBUG: $this->email->print_debugger();\n\t\t\t}\n\t\t}\n\t}", "public function itShoulNotSetEndedAt()\n {\n // Arrange...\n $this->login();\n $lecture = factory(Lecture::class)->make();\n\n // Act...\n $this->json('post', 'lectures', array_merge($lecture->toArray(), [\n 'ended_at' => Carbon::yesterday()->toDateTimeString()\n ]));\n\n // Assert...\n $this->seeJson([\n 'endedAt' => null\n ]);\n }", "public function testFetchEvents() {\n\t\t$jsonpad = parent::_getJsonpadInstance();\n\t\t\n\t\t// Fetch the events\n\t\t$total = 0;\n\t\t$events = $jsonpad->fetchEvents(1, null, null, $total);\n\t\t$this->assertInternalType(\"array\", $events);\n\t\t$this->assertGreaterThanOrEqual(1, $total);\n\t\t$this->assertInstanceOf(\"\\Jsonpad\\Resource\\Event\", $events[0]);\n\t}", "public function testListPastWebinarFiles()\n {\n }", "public function testReportsReferralsGet()\n {\n }", "public function testEndPoint()\n {\n\t$response = $this->json('POST', '/api/module_reminder_assigner', ['contact_email' => 'carlos.harvey@example.com']);\n\n\t$response->assertStatus(204);\n }", "public function testGetWaiversParams()\n {\n $paths = [\n '/v4/waivers?limit=5',\n '/v4/waivers?limit=20&verified=true',\n '/v4/waivers?limit=20&templateId=alkagaldeab',\n '/v4/waivers?limit=20&fromDts='.urlencode('2016-11-01 00:00:00'),\n '/v4/waivers?limit=20&toDts='.urlencode('2016-11-01 00:00:00'),\n '/v4/waivers?limit=20&firstName=Kyle',\n '/v4/waivers?limit=20&lastName=Smith',\n '/v4/waivers?limit=20&tag=testing'\n ];\n\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::waivers(1), count($paths));\n\n $sw->getWaiverSummaries(5);\n $sw->getWaiverSummaries(20, true);\n $sw->getWaiverSummaries(20, null, 'alkagaldeab');\n $sw->getWaiverSummaries(20, null, '', '2016-11-01 00:00:00');\n $sw->getWaiverSummaries(20, null, '', '', '2016-11-01 00:00:00');\n $sw->getWaiverSummaries(20, null, '', '', '', 'Kyle');\n $sw->getWaiverSummaries(20, null, '', '', '', '', 'Smith');\n $sw->getWaiverSummaries(20, null, '', '', '', '', '', 'testing');\n\n $this->checkGetRequests($container, $paths);\n }", "function getUpcomingWebinars()\n {\n $path = $this->getPathRelativeToOrganizer('upcomingWebinars');\n\n return $this->sendRequest('GET', $path, $parameters = null, $payload = null);\n }", "public function testGetAllEspMeds()\n {\n \n $controller = new EspMedController();\n $reponse = $controller->index();\n $this->assertJson($reponse);\n \n }", "public function getAttendances(){\n try{\n $projectCode = Input::get('projectCode');\n $startDate = Input::get('beginDate');\n $endDate = Input::get('endDate');\n// Log::channel('in_sys')\n// ->info('API/IntegrationController - getAttendances data projectCode = '. $projectCode . \" | beginDate = \".$startDate.\" | endDate = \".$endDate);\n $project = Project::where('code', $projectCode)->first();\n\n if(!DB::table('projects')->where('code', $projectCode)->exists()){\n return Response::json([\n 'error' => 'Project code not found!'\n ], 400);\n }\n if(empty($startDate) || empty($endDate)){\n return Response::json([\n 'error' => 'Please provide Begin Date and End Date!'\n ], 400);\n }\n\n $attendanceAbsents = DB::table('attendance_absents')\n ->join('employees', 'attendance_absents.employee_id', '=', 'employees.id')\n ->join('projects', 'attendance_absents.project_id', '=', 'projects.id')\n ->select('attendance_absents.id as attendance_absent_id',\n 'attendance_absents.shift_type as shift_type',\n 'attendance_absents.is_done as is_done',\n 'attendance_absents.date as date',\n 'attendance_absents.date_checkout as date_checkout',\n 'attendance_absents.created_at as created_at',\n 'employees.id as employee_id',\n 'employees.code as employee_code',\n 'projects.name as project_name',\n 'projects.code as project_code')\n ->whereBetween('attendance_absents.created_at', array($startDate.' 00:00:00', $endDate.' 23:59:00'))\n ->where('attendance_absents.project_id', $project->id)\n ->where('attendance_absents.status_id',6)\n ->get();\n\n// $attendanceAbsents = AttendanceAbsent::where('project_id', $project->id)\n// ->where('status_id', 6)\n// ->whereBetween('created_at', array($startDate.' 00:00:00', $endDate.' 23:59:00'))\n// ->get();\n\n $dataModel = collect();\n// Log::channel('in_sys')\n// ->info('API/IntegrationController - getAttendances data 0 '. count($attendanceAbsents));\n if($attendanceAbsents->count() < 1){\n return Response::json([\n 'error' => 'No Attendances found within allocated time range!'\n ], 400);\n }\n\n// timestamp: ...,\n// projectCode: XXX, //assume project codes are synced\n// beginDate: ..., //date YYYY-MM-DD\n// endDate: ..., //date YYYY-MM-DD\n// data: [\n// {\n// employeeId: ...,\n// employeeCode: ...,\n// transDate: ..., //date YYYY-MM-DD\n// shiftCode: ..., // 1|2|3 or A|B|C or whatever\n// attendanceIn: ..., //timestamp YYYY-MM-DD HH:mm:ss\n// attendanceOut: ..., //timestamp YYYY-MM-DD HH:mm:ss\n// attendanceStatus: ..., // H=Hadir, A=Alpa, U=Unknown\n// ]\n// }\n\n foreach ($attendanceAbsents as $attendanceAbsent){\n $status = \"U\";\n $attendanceOut = \"\";\n if($attendanceAbsent->is_done == 0){\n $status = \"A\";\n }\n else{\n if(!empty($attendanceAbsent->date_checkout)){\n $status = \"H\";\n// $attendanceOut = $attendanceAbsent->date_checkout->format('Y-m-d H:i:s');\n $attendanceOut = $attendanceAbsent->date_checkout;\n }\n else{\n $status = \"A\";\n }\n }\n $createdAt = Carbon::parse($attendanceAbsent->created_at);\n $projectCSOModel = ([\n 'employeeId' => $attendanceAbsent->employee_id,\n 'employeeCode' => $attendanceAbsent->employee_code,\n 'transDate' => $createdAt->format('Y-m-d'),\n 'shiftCode' => $attendanceAbsent->shift_type ?? 0,\n 'attendanceIn' => $attendanceAbsent->date,\n 'attendanceOut' => $attendanceOut,\n 'attendanceStatus' => $status,\n ]);\n $dataModel->push($projectCSOModel);\n// Log::channel('in_sys')\n// ->info('API/IntegrationController - getAttendances data 2 '. json_encode($projectCSOModel));\n }\n $date = Carbon::now('Asia/Jakarta')->timestamp;\n $returnModel = collect([\n 'timestamp' => $date,\n 'projectCode' => $projectCode,\n 'beginDate' => $startDate,\n 'endDate' => $endDate,\n 'data' => $dataModel,\n ]);\n// Log::channel('in_sys')\n// ->info('API/IntegrationController - getAttendances data 3 '.json_encode($returnModel));\n return Response::json($returnModel, 200);\n }\n catch (\\Exception $ex){\n Log::channel('in_sys')->error('API/IntegrationController - getAttendances error EX: '. $ex);\n return Response::json([\n 'error' => $ex\n ], 500);\n }\n }", "public function test_getNotFound() {\n\t\t$this->testAction('/disease/index/1', array('method'=>'get'));\n\t}", "public function testGetEmployees()\n {\n }", "public function test_admin_tribe_list_b()\n {\n $this->request('GET', ['pages/Assignments', 'tribe_list']);\n $this->assertResponseCode(404);\n }", "public function actionIndex()\n { \n $mac=get_client_mac(get_client_ip());\n $employeeModel=Employee::findIdentityByMacAddress($mac);\n \n if($employeeModel!=null){\n if ($employeeModel->Active==0){\n print_r (\"InActive Employee.. Contact Admin\");\n return;\n }\n $model = new AttendanceIn();\n date_default_timezone_set('Asia/Calcutta');\n $model=AttendanceIn::findIdentityByUniqueKeys($employeeModel->id,date(\"Y-m-d\"));\n $month_off=MonthOff::find()->select([\"Dates\"])->where(['BranchId'=>$employeeModel->Branch])->andWhere(['Month'=>date('m')])->andWhere(['Year'=>date(\"Y\")])->all();\n if($month_off)\n $month_off=array_map('intval',explode(',',$month_off[0]['Dates'],-1));\n if($model==null){\n $model= new AttendanceIn();\n $model->EmployeeId=$employeeModel->id;\n $model->Date=date(\"Y-m-d\");\n $model->Time=date(\"H:i:s\");\n $timeSlotModel=TimeSlots::findOne(['id'=>$employeeModel->TimeSlot]);\n if(strcmp($model->Time,$timeSlotModel->Grace)<0){\n if(in_array(date('d'), $month_off)){\n if(!$leaveHistory=LeaveHistory::findOne(['EmployeeId'=>$employeeModel->id, 'LeaveType'=>4])){\n $leaveHistory =new LeaveHistory();\n $leaveHistory->id=$employeeModel->id;\n $leaveHistory->Type=4;\n $leaveHistory->LeaveCount=0;\n $leaveHistory->MaxLeave=0.5;\n }\n else{\n $leaveHistory->MaxLeave+=0.5;\n }\n $leaveHistory->save();\n $model->FirstHalf=\"WP\";\n }\n else\n $model->FirstHalf=\"P\";\n \n }\n else if (strcmp($model->Time,$timeSlotModel->Grace)>0 && strcmp($model->Time,$timeSlotModel->DeadOut)<0){\n if($employeeModel->DeadOutCount>=$timeSlotModel->MaxDeadOutCount)\n $model->FirstHalf=\"A\";\n else{\n $employeeModel->DeadOutCount+=1;\n $employeeModel->save();\n $model->Remark=$employeeModel->DeadOutCount.\" Late Count\";\n if(in_array(date('d'), $month_off)){\n if(!$leaveHistory=LeaveHistory::findOne(['EmployeeId'=>$employeeModel->id, 'LeaveType'=>4])){\n $leaveHistory =new LeaveHistory();\n $leaveHistory->id=$employeeModel->id;\n $leaveHistory->Type=4;\n $leaveHistory->LeaveCount=0;\n $leaveHistory->MaxLeave=0.5;\n }\n else{\n $leaveHistory->MaxLeave+=0.5;\n }\n $leaveHistory->save();\n $model->FirstHalf=\"WP\";\n }\n else\n $model->FirstHalf=\"P\";\n }\n }\n else{\n $model->FirstHalf=\"A\";\n }\n if($model->validate() && $model->save()){\n return $this->renderPartial('attendance-in-success', [\n 'employeeModel'=>$employeeModel,\n 'model'=>$model,\n ]);\n }\n else{\n print_r(\"Error Occured\");\n return;\n }\n }\n return AttendanceInController::actionOut();\n\n }\n else{\n print_r(\"<h1><p style='color:red;background-color:pink;border-color:#c3e6cb;'>No Such Device/Employee Registered</p></h1>\");\n return;\n }\n \n }", "public function unauthorizedTest(WebTestCase $webTestCase);", "function selectAttendees($emails, $event, $entity = \"Webinar\") {\n\t// Preparing the query params\n\t$selectEmailString = '';\n\t$qParams = $selectEmails = array();\n\t$i = 1;\n\tforeach ($emails as $email) {\n\t\tif(!empty($email)){\n\t\t\t$qParams[$i] = array($email, 'String');\n\t\t\t$selectEmails[] = '%'.$i;\n\t\t\t$i++;\n\t\t}\n\t}\n\t$selectEmailString = join(', ', $selectEmails);\n\n\tif($entity == \"Webinar\"){\n\t\t// $absenteesEmails = join(\"','\",$emails);\n\n\t\t$selectAttendees = \"\n\t\t\tSELECT\n\t\t\t\te.email,\n\t\t\t\tp.contact_id,\n\t\t\t\tp.id AS participant_id\n\t\t\tFROM civicrm_participant p\n\t\t\tLEFT JOIN civicrm_email e ON p.contact_id = e.contact_id\n\t\t\tWHERE\n\t\t\t\te.email NOT IN ($selectEmailString) AND\n\t\t\t\tp.event_id = {$event}\";\n\t}elseif($entity == \"Meeting\"){\n\t\t// $attendeesEmails = join(\"','\",$emails);\n\n\t\t$selectAttendees = \"\n\t\t\tSELECT\n\t\t\t\te.email,\n\t\t\t\tp.contact_id,\n\t\t\t\tp.id AS participant_id\n\t\t\tFROM civicrm_participant p\n\t\t\tLEFT JOIN civicrm_email e ON p.contact_id = e.contact_id\n\t\t\tWHERE\n\t\t\t\te.email IN ($selectEmailString) AND\n\t\t\t\tp.event_id = {$event}\";\n\t}\n\t// Run query\n\t$query = CRM_Core_DAO::executeQuery($selectAttendees, $qParams);\n\n\t$attendees = [];\n\n\twhile($query->fetch()) {\n\t\tarray_push($attendees, [\n\t\t\t'email' => $query->email,\n\t\t\t'contact_id' => $query->contact_id,\n\t\t\t'participant_id' => $query->participant_id\n\t\t]);\n\t}\n\n\treturn $attendees;\n}", "public function testGetPayrollCalendars()\n {\n }", "public function testVolunteerHourProjectStoreFailure_Inactive()\n {\n $this->session([\n 'username' => $this->inactiveUser->username, \n 'access_level' => $this->inactiveUser->access_level\n ]);\n \n // Set test user as current authenticated user\n $this->be($this->inactiveUser);\n \n // Call route under test\n $response = $this->call('POST', 'volunteerhours');\n \n // Assert redirected to access denied page\n $this->assertRedirectedToRoute('unauthorized');\n }", "public function testShowSpecificOutroCardsForGuest(): void\n {\n // Request\n $response = $this->get('api/v1/outroCards/tenants/1');\n\n // Check response status\n $response->assertStatus(401);\n }", "public function getEventBookList($eventId){\n\n $sql = \"Select user.firstName, user.lastName, user.email, attending.attendId, attending.event_id, user.role\n from user \n join attending\n on user.userId = attending.user_id\n where attending.event_id = :eventId\";\n\n $pdoQuery = $this->conn->prepare($sql);\n\n $pdoQuery->execute([':eventId' => $eventId]);\n\n $attendees = $pdoQuery->fetchAll();\n\n return($attendees);\n }", "public function offEmployeeSchedule() {\n \n $employeeLists = $this->EmployeesSchedules->find()\n ->contain('Employees')\n ->where([\n 'Employees.status' => 1, \n 'OR'=> [\n \"Employees.availability_status\" => 1,\n \"Employees.consult_availability_status\" => 1\n ]\n ])\n ->toArray();\n \n if(!empty($employeeLists)) {\n foreach ($employeeLists as $key => $val) {\n \n $timezone = !empty($val->timezone) ? $val->timezone : date_default_timezone_get();\n \n $schedule = json_decode($val->schedule, true);\n $consult_schedule = json_decode($val->consult_schedule, true);\n \n $date = date(\"Y-m-d\");\n $previousDate = date('Y-m-d', strtotime('-1 day'));\n \n if(!empty($schedule)) {\n \n date_default_timezone_set($timezone);\n \n $result = array_filter($schedule, function ($val) use ($date, $previousDate) {\n $compareDate = \\DateTime::createFromFormat('m-d-Y', $val);\n $utime = strtotime($compareDate->format('Y-m-d'));\n return $utime >= strtotime($previousDate) && $utime <= strtotime($date);\n }, ARRAY_FILTER_USE_KEY);\n \n if (! empty($result)) {\n $flag = 0;\n foreach ($result as $r_key => $r_val) {\n $compareDate = \\DateTime::createFromFormat('m-d-Y', $r_key);\n \n if($previousDate == $compareDate->format('Y-m-d')) {\n foreach ($r_val as $previous_key => $previous_val) {\n //pr($previous_val); die;\n $previousTime = explode('-', $previous_val['time']);\n \n $previousStartTime = date('H:i', strtotime(substr($previousTime[0], 0, -1) . ':00 ' . substr($previousTime[0], -1) . 'm'));\n $previousEndTime = date('H:i', strtotime(substr($previousTime[1], 0, -1) . ':00 ' . substr($previousTime[1], -1) . 'm'));\n \n if($previousStartTime > $previousEndTime) {\n // This means schedule is next day shift\n $r_val[0] = [\n 'service_team' => $previous_val['service_team'],\n //'time' => '0a-'.$previousTime[1]\n 'time' => $previous_val['time']\n ];\n } else {\n $flag = 1;\n }\n }\n if($flag) {\n continue;\n }\n }\n \n foreach ($r_val as $v_key => $v_val) {\n if (! empty($v_val['time'])) {\n $time = explode('-', $v_val['time']);\n \n $startTime = date('H:i', strtotime(substr($time[0], 0, -1) . ':00 ' . substr($time[0], -1) . 'm'));\n $endTime = date('H:i', strtotime(substr($time[1], 0, -1) . ':00 ' . substr($time[1], -1) . 'm'));\n \n $currentTime = date('H:i');\n \n $employee = $val->employee;\n \n if(strtotime($endTime) >= strtotime(date(\"H:i\")) && strtotime($endTime) <= strtotime(date(\"H:i\", strtotime('+10 minutes')))) {\n if(!empty($employee)) {\n $employee->availability_status = 0;\n $employee->working_time = '';\n $employee->dirty('modified', true);\n $this->Employees->save($employee);\n \n /* $this->HospitalsEmployees->deleteAll([\n 'employee_id' => $val->employee_id,\n 'hospital_id' => $val->hospital_id\n ]); */\n }\n }\n }\n }\n }\n }\n }\n \n if(!empty($consult_schedule)) {\n date_default_timezone_set($timezone);\n $consultResult = array_filter($consult_schedule, function ($val) use ($date, $previousDate) {\n $compareDate = \\DateTime::createFromFormat('m-d-Y', $val);\n $utime = strtotime($compareDate->format('Y-m-d'));\n return $utime >= strtotime($previousDate) && $utime <= strtotime($date);\n }, ARRAY_FILTER_USE_KEY);\n \n if (! empty($consultResult)) {\n $cFlag = 0;\n $departments = TableRegistry::get('Departments');\n \n foreach ($consultResult as $c_key => $c_val) {\n unset($c_val['service_team']);\n \n $compareDate = \\DateTime::createFromFormat('m-d-Y', $c_key);\n \n if($previousDate == $compareDate->format('Y-m-d')) {\n $i =0;\n foreach ($c_val as $previous_key => $previous_val) {\n $previousTime = explode('-', $previous_val['time']);\n \n $previousStartTime = date('H:i', strtotime(substr($previousTime[0], 0, -1) . ':00 ' . substr($previousTime[0], -1) . 'm'));\n $previousEndTime = date('H:i', strtotime(substr($previousTime[1], 0, -1) . ':00 ' . substr($previousTime[1], -1) . 'm'));\n \n if($previousStartTime > $previousEndTime) {\n // This means schedule is next day shift\n //pr($previous_val);\n $cFlag = 0;\n $c_val[$i] = [\n 'department' => $previous_val['department'],\n 'subdepartment' => $previous_val['subdepartment'],\n 'time' => $previous_val['time'],\n 'is_first_call' => $previous_val['is_first_call'],\n 'is_attending' => $previous_val['is_attending'],\n ];\n } else {\n $cFlag = 1;\n }\n $i++;\n }\n \n if($cFlag) {\n continue;\n }\n }\n \n foreach ($c_val as $v_key => $v_val) {\n // change status of employee\n \n if (! empty($v_val['time'])) {\n $time = explode('-', $v_val['time']);\n \n $startTime = date('H:i', strtotime(substr($time[0], 0, -1) . ':00 ' . substr($time[0], -1) . 'm'));\n $endTime = date('H:i', strtotime(substr($time[1], 0, -1) . ':00 ' . substr($time[1], -1) . 'm'));\n \n $currentTime = date('H:i');\n \n $employee = $val->employee;\n \n if(strtotime($endTime) >= strtotime(date(\"H:i\")) && strtotime($endTime) <= strtotime(date(\"H:i\", strtotime('+10 minutes')))) {\n if(!empty($employee)) {\n $employee->is_consult = 0;\n $employee->working_time = '';\n $employee->is_first_call = 0;\n $employee->is_attending = 0;\n $employee->consult_availability_status = 0;\n $employee->dirty('modified', true);\n $this->Employees->save($employee);\n \n /* $this->HospitalsEmployees->deleteAll([\n 'employee_id' => $val->employee_id,\n 'hospital_id' => $val->hospital_id\n ]); */\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }", "public function events()\n {\n if (!Sentry::check()) {\n // User is not logged in, or is not activated\n return Redirect::route('landing');\n } else {\n // Gets all appointments from the school\n $user = Sentry::getUser();\n\n // Check if user is superAdmin\n if ($user->hasAccess('school')) {\n $appointments = Appointment::get()->load('group.school')->toArray();\n // Returns JSON response of the user\n return Response::json($appointments)->setCallback(\n Input::get('callback')\n ); //return View::make('calendar.events');\n\n } else {\n // If user is not superAdmin, show groups based on the school of the logged in user\n $user->load('school.groups.appointments.group.school');\n $appointments = [];\n\n // Loop through groups to get all appointments\n foreach ($user->school->groups as $group) {\n foreach ($group->appointments as $appointment) {\n array_push($appointments, $appointment);\n }\n }\n // Returns JSON response of the user\n return Response::json($appointments)->setCallback(Input::get('callback'));\n }\n }\n }", "public function testGetInvalidEventbyEventId() : void {\n // grab a profile id that exceeds the maximum allowable profile id\n $event = Event::getEventByEventId($this->getPDO(), generateUuidV4());\n $this->assertNull($event);\n }", "public function testEventimCanBeReached()\n\t{\n\t\t$response = $this->crawler->getClient()->request('GET', 'http://www.eventim.de/yung-hurn-aachen-tickets.html?affiliate=EYA&doc=artistPages%2Ftickets&fun=artist&action=tickets&key=2078585%2410513338&jumpIn=yTix');\n\t\t$this->assertEquals(\n\t\t\t200,\n\t\t\t$response->getStatusCode()\n\t\t);\n\t}", "public function testVolunteerHourIndexForContactSuccess_Administrator()\n {\n // Set test user as current authenticated user\n $this->be($this->administrator);\n \n $this->session([\n 'username' => $this->administrator->username, \n 'access_level' => $this->administrator->access_level\n ]);\n \n $volunteerID = 2;\n // Call route under test\n $response = $this->call('GET', 'volunteerhours/volunteer/'.$volunteerID);\n \n $this->assertContains('Volunteer Hours for', $response->getContent());\n }", "public function test_admin_member_internship_b()\n {\n $this->request('GET', ['pages/memberdsc', 'apprenticeship']);\n $this->assertResponseCode(404);\n }", "public function getAllOfficeEmployers();", "public function testAllowedEmailAddressGet()\n {\n }", "public function testEmailCampaignsGet()\n {\n }", "public function testAdultUsersCanSeeTaskList()\n {\n $this->withoutExceptionHandling();\n Task::factory(3)->create();\n $adult = User::create([\n 'name' => 'vanessa',\n 'role' => 'adult',\n 'points' => 0,\n 'email' => 'misstee@gmail.com',\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n 'remember_token' => Str::random(10)\n ]);\n\n $response = $this->actingAs($adult)\n ->get(route('dashboard.tasks'));\n $response->assertStatus(200)\n ->assertViewIs('dashboard.task-list')\n ->assertViewHas('taskList');\n }" ]
[ "0.6012117", "0.5984477", "0.5918694", "0.5873598", "0.58436704", "0.58301497", "0.58196026", "0.5788358", "0.5774703", "0.57724416", "0.5754003", "0.57515645", "0.570997", "0.5703932", "0.5624342", "0.5612756", "0.560048", "0.5572901", "0.5554806", "0.55531824", "0.5505148", "0.54856896", "0.5482735", "0.5421839", "0.5401551", "0.5383251", "0.53681713", "0.53681713", "0.5366429", "0.5337543", "0.5324751", "0.53141177", "0.5298602", "0.529098", "0.5289157", "0.52801704", "0.52797365", "0.5267547", "0.52590257", "0.5252092", "0.52469325", "0.5246158", "0.5245664", "0.52451736", "0.52416354", "0.52327436", "0.523025", "0.522886", "0.5226553", "0.51884824", "0.5170073", "0.5170028", "0.516116", "0.51609397", "0.51608527", "0.5152351", "0.5136934", "0.5133371", "0.51329917", "0.5132185", "0.51300853", "0.5121005", "0.51187205", "0.51179993", "0.51026267", "0.5098142", "0.5096236", "0.5095167", "0.508713", "0.50741637", "0.50684154", "0.5066495", "0.50592786", "0.5052417", "0.504456", "0.50417", "0.50416005", "0.5034832", "0.50309455", "0.5028487", "0.50264627", "0.50199324", "0.50119346", "0.5010139", "0.5009964", "0.50030273", "0.49972293", "0.49951196", "0.49859512", "0.49829742", "0.4982189", "0.49794376", "0.49760935", "0.4975068", "0.4972321", "0.49711624", "0.4970527", "0.49676463", "0.49601522", "0.49599326" ]
0.7858616
0
Test case for webinarCreate Create a Webinar.
Тест-кейс для вебинара Create Create a Webinar.
public function testWebinarCreate() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarRegistrantCreate()\n {\n }", "public function testWebinarPollCreate()\n {\n }", "public function testWebinar()\n {\n }", "public function testWebinarRegistrants()\n {\n }", "public function testWebinarPanelistCreate()\n {\n }", "public function testWebinarPolls()\n {\n }", "public function testWebinarUpdate()\n {\n }", "public function testWebinarStatus()\n {\n }", "public function testWebinarRegistrantGet()\n {\n }", "public function testWebinarRegistrantStatus()\n {\n }", "public function actionCreate()\n {\n $model = new WebinarCreateRequest();\n\n if ($model->load(Yii::$app->request->post()) ) {\n $model->status = Status::STATUS_NEW;\n $model->created_at = gmdate('Y-m-d H:i:s');\n $model->updated_at = gmdate('Y-m-d H:i:s');\n $model->created_by = $model->author_name;\n $model->updated_by = $model->author_name;\n $user = $model->author_name;\n $model->save();\n\n if($this->sendActivationLink($model->id, $model->email, $user)) {\n return $this->render('create', [\n 'model' => $model, \n 'status' => 'success', 'id' => $model->id]);\n }\n \n //return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function testWebinarAbsentees()\n {\n }", "public function testWebinarDelete()\n {\n }", "public function testCreateSurvey()\n {\n $data = [\n 'year' => 2020,\n 'type' => Survey::TRAINER,\n 'title' => 'My Awesome Survey',\n 'prologue' => 'Take the survey',\n 'epilogue' => 'Did you take it?'\n ];\n\n $response = $this->json('POST', 'survey', [\n 'survey' => $data\n ]);\n\n $response->assertStatus(200);\n $this->assertDatabaseHas('survey', $data);\n }", "function createWebinar($payloadArray)\n {\n $path = $this->getPathRelativeToOrganizer(sprintf('webinars'));\n\n $webinarObject = new WebinarEntity($payloadArray);\n\n return $this->sendRequest('POST', $path, $parameters = null, $payload = $webinarObject->toArray());\n }", "public function testEventCreate()\n {\n $response = $this->get('events/create');\n\n $response->assertStatus(200);\n }", "protected function setUp()\n {\n parent::setUp();\n $this->webinar = create(Webinar::class);\n }", "public function testIntegrationCreate()\n {\n $this->visit('user/create')\n ->see('Create New Account');\n $this->assertResponseOk();\n $this->assertViewHas('model');\n }", "public function testDeveloperCreate()\n {\n $response = $this->get('/developer/create');\n $response->assertStatus(200);\n }", "public function testStoreShouldCreateNewRiddle(){\n\t\t$riddle = [\n\t\t\t'solution' => 'solution',\n\t\t\t'riddle' => 'riddle',\n\t\t\t'name' => 'name',\n\t\t];\n\n\n\t\t$response = $this->call('POST', '/riddles', $riddle);\n\n\t\t$this->assertEquals(302, $response->status());\n\t\t$this->assertRedirectedTo(url('/riddles/1?successMessage=Record+Added+Successfully'));\n\n\t\t$this->assertEquals(1, count(Riddle::all()));\n\n\t\t$storedRiddle = Riddle::findById(1);\n\t\t$this->assertNotNull($storedRiddle);\n\n\t\t$this->assertEquals('solution', $storedRiddle->solution);\n\t\t$this->assertEquals('riddle', $storedRiddle->riddle);\n\t\t$this->assertEquals('name', $storedRiddle->name);\n\n\t\t$this->assertEquals(0, $storedRiddle->approved);\n\t\t$this->assertEquals(0, $storedRiddle->public);\n\t\t$this->assertEquals($this->user->id, $storedRiddle->owner_id);\n\t}", "public function user_can_visit_create_event_page()\n {\n $response = $this->get('/events/create');\n $response->assertStatus(200);\n $response->assertSeeText('Name');\n }", "public function testMeetingCreatePost()\n {\n $user = factory(App\\User::class)->create();\n }", "public function testListPastWebinarQA()\n {\n }", "public function testCreate()\n {\n $this->visit('/admin/school/create')\n ->submitForm($this->saveButtonText, $this->school)\n ->seePageIs('/admin/school')\n ;\n\n $this->seeInDatabase('schools', $this->school);\n }", "public function testPageCreate()\n {\n $faker = Faker::create();\n $response = $this\n ->actingAs(User::whereNotNull(\"verified\")->inRandomOrder()->first(), 'api')\n ->withHeaders([\n \"User-Agent\" => $faker->userAgent(),\n ])\n ->json('POST', \"/api/pages/\", [\n \"data\" => [\n \"name\" => $faker->sentence(4, true),\n ],\n \"relationships\" => [\n \"body\" => [\n \"data\" => [\n \"content\" => $faker->paragraphs(4, true),\n ],\n ],\n ],\n ]);\n $response\n ->assertStatus(201);\n }", "public function create()\n {\n // $crud = new Events();\n // $crud->photo ='anniv.png';\n // $crud->title = 'Sogod Founding Anniversary Concert';\n // $crud->descriptions = 'secret';\n // $crud->venue = 'Sogod Covered Court';\n // $crud->date = date('04/02/2018');\n // $crud->time = time('h:i:s');\n\n // $crud->save(); \n }", "public function testInstrumentCreate()\n {\n $this->browse(function (Browser $browser) {\n $user = User::find(1);\n $browser->loginAs($user)\n ->visit(new instrumentManagementPage())\n ->assertSee('Instruments')\n ->press('@actions-button')\n ->press('@actions-create-menu')\n ->assertSee('New Instrument')\n ->type('@code',uniqid('TestInstrument_'))\n ->type('@category', 'Dusk Testing')\n ->type('@module','Summer Capstone')\n ->type('@reference','Test - safe to delete')\n ->press('Save')\n //->press('@save-button') //TODO: use this once DUSK tag is fixed\n ->assertsee('View Instrument - TestInstrument_');\n });\n }", "public function testWebinarPollGet()\n {\n }", "public function testCreate()\n {\n $model = $this->makeFactory();\n \n $this->json('POST', static::ROUTE, $model->toArray(), [\n 'Authorization' => 'Token ' . self::getToken()\n ])\n ->seeStatusCode(JsonResponse::HTTP_CREATED) \n ->seeJson($model->toArray());\n }", "public function testWebinarRegistrantsQuestionsGet()\n {\n }", "public function testAssessmentIsCreated()\n {\n $this->withoutExceptionHandling();\n $response = $this->post(route('assessments.store'), $this->getData());\n\n $response->assertStatus(200);\n\n $this->assertCount(1, Assessment::all());\n }", "public function testSellerCreateSuccess()\n {\n $this->demoUserLoginIn();\n $response = $this->call('GET', '/seller/create');\n $this->assertEquals(200, $response->status());\n }", "public function testInsert()\n {\n\n $data['url'] = 'unittest.com';\n $data['hosted_server'] = 'unittest';\n $data['state'] = 'unit';\n $data['created_date'] = '2017-01-01';\n $data['last_updated_date'] = '2017-01-01';\n $data['active_from'] = '2017-01-01';\n $data['active_to'] = '2017-01-01';\n\n $new_site = new Site();\n $new_site->createSite($data);\n\n $this->assertTrue(true);\n }", "public function testProfileCreate()\n {\n\n }", "public function testCreateSurvey0()\n {\n }", "public function testCreateSurvey0()\n {\n }", "public function an_authenticated_user_may_created_his_own_schedules()\n {\n $this->withOutExceptionHandling()->signIn();\n $schedule = make('App\\Schedule');\n $schedule->clinic_profile = false;\n // dd($schedule);\n // $this->expectException(\\Exception::class);\n $response = $this->json('post','/schedule', $schedule->toArray());\n $response->assertStatus(200);\n // dd($response->getContent());\n }", "public function create($websiteId, $prospect) {\n // @TODO - add support for api call\n throw new \\Exception('Not implemented');\n }", "function citrixonline_create_registrant_of_webinar($webinar_id=false, $data = array(), $all_fields_chk = false) \n {\n\t\tif($webinar_id and isset($data['first_name']) and isset($data['last_name']) and isset($data['email']))\n\t\t{\n\t\t\t$params = array();\n\t\t\t\n\t\t\t$fields = array(\n\t\t\t\t'firstName'=>$data['first_name'],\n\t\t\t\t'lastName'=>$data['last_name'],\n\t\t\t\t'email'=>$data['email'],\n );\n\t\t\t\n\t\t\t$params[CURLOPT_HTTPHEADER] = array('Accept: application/json', 'Content-Type: application/json', 'Authorization: OAuth oauth_token='.$this->access_token);\n\t\t\t$params[CURLOPT_POSTFIELDS] = json_encode($fields);\n\t\t\t\n\t\t\t$reponse = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/{$webinar_id}/registrants\", $params), true);\n\t\t\t\n\t\t\tif(isset($reponse['registrantKey']))\n\t\t\t\treturn $reponse;\n\t\t}\n\t\t\n\t\treturn false;\t\t\t\n\t}", "public function testWebinarRegistrantQuestionUpdate()\n {\n }", "public function testActCreate()\n {\n $this->browse(function (Browser $browser) {\n $bill = Bill::factory()->create([\n 'contract_id' => $this->contract->id,\n 'requisite_id' => $this->requisite->id,\n 'tenant_id' => $this->tenant->id,\n ]);\n $service = $bill->services()->save(Service::factory()->make([\n 'name' => 'Rent',\n 'quantity' => '2',\n 'measure' => 'pc',\n 'price' => '1234'\n ]));\n\n $browser->loginAs($this->user)\n ->visit('/tenants/'.$this->tenant->id.'?tab=bills#tab')\n ->press('Создать')\n ->clickLink('Загрузить')\n ->assertPathIs($bill->act->document_url)\n ->assertSee('Акт');\n });\n }", "public function testStoreCreate()\n {\n $user = factory(User::class)->create(['id' => 1]);\n $postData = [\n 'slots' => ['10:00', '13:00', '16:00', '19:00']\n ];\n $this->actingAs($user)\n ->post(route('schedule.store'), $postData);\n $this->assertDatabaseHas('schedules', [\n 'user_id' => $user->id,\n 'date' => $tomorrow = Carbon::tomorrow()->format(config('app.date_format_db'))])\n ->assertDatabaseHas('slots', ['slot' => '10:00'])\n ->assertDatabaseHas('slots', ['slot' => '13:00'])\n ->assertDatabaseHas('slots', ['slot' => '16:00'])\n ->assertDatabaseHas('slots', ['slot' => '19:00']);\n }", "public function testBookCreatedSuccessfully()\n {\n $book = factory(Book::class)->make();\n \n $payload = [\n 'title' => $book->title,\n 'isbn' => $book->isbn,\n 'published_at' => $book->published_at,\n ];\n\n $this->json('post', '/api/books/create', $payload, $this->getHeaders())\n ->assertStatus(200)\n ->assertJsonStructure([\n 'message'\n ]);\n }", "public function store(AddWebinarRequest $request)\n {\n $data = $request->all();\n $webinar = new Webinar();\n $webinar->fill($data);\n $image = $request->file('image');\n if($image)\n {\n $path = Storage::disk('public')->put('images', $image);\n $webinar->image = $path;\n }\n\n $webinar->save();\n\n return response()->json([\n 'status' => 200,\n 'webinar' => $webinar,\n ]); \n }", "public function testWebinarPanelists()\n {\n }", "function testCreate() {\n # fails due to not verified...\n $this->aRequest['email'] = 'unverified@example.com';\n $this->assertFalse($this->oObject->create());\n\n # but verified users works\n $this->aRequest['email'] = 'moderator@example.com';\n $this->assertTrue($this->oObject->create());\n $this->oObject->destroy(session_id());\n }", "function testSapAdd()\n {\n $user = User::whereId(1)->first();\n\n $this->actingAs($user)\n ->post('/saps/add', [\n '_token' => csrf_token(),\n 'notes' => 'lead booked',\n 'lead_id' => 1,\n 'appointment_at' => date('Y-m-d H:i:s')\n ])->assertJson(['data' => ['lead_id' => 1]]);\n\n }", "function a_user_can_be_created(){\n\n $profession = factory(Profession::class)->create([\n 'title' => 'Web Developer'\n ]);\n $skillA = factory(Skill::class)->create([\n 'description' => 'CSS'\n ]);\n $skillB = factory(Skill::class)->create([\n 'description' => 'HTML'\n ]);\n\n $this->browse(function(Browser $browser) use ($profession,$skillA,$skillB){\n $browser->visit('users/create')\n ->assertSeeIn('h5','Create User')\n ->type('name','Yariel Gordillo')\n ->type('email','yariko0529@gmail.com')\n ->type('password','secret')\n ->type('bio','This a small bio')\n ->select('profession_id',$profession->id)\n ->type('twitter' ,'https://twitter.com/yariko')\n ->check(\"skills[{$skillA->id}]\")\n ->check(\"skills[{$skillB->id}]\")\n ->radio('role', 'user')\n ->press('Create User')\n ->assertPathIs('/users')\n ->assertSee('Yariel Gordillo')\n ->assertSee('yariko0529@gmail.com');\n });\n\n }", "public function createParticipant(ParticipateRequest $request) {\n \t$participant = new Participant;\n \t$participant -> id_event = $request -> input('id_event');\n \t$participant -> id_user = $request -> input('id_user');\n\n \t$participant -> save();\n\n \treturn redirect('publicevents/'.$participant->id_event);\n }", "public function user_can_create_event()\n {\n $user = User::factory()->create();\n $event = Event::factory()->make()->toArray();\n $response = $this->actingAs($user)->post('/events', $event);\n $response->assertStatus(302);\n $this->assertNotNull(Event::where('name', $event['name'])->first());\n }", "public function test_create_task()\n {\n \n $response = $this->post('/task', [\n 'name' => 'Task name', \n 'priority' => 'urgent', \n 'schedule_date_date' => '2020-12-12',\n 'schedule_date_time' => '12:22',\n 'project_id' => 1,\n ]);\n $response->assertStatus(302);\n }", "public function testHandleCreateSuccess()\n {\n // Populate data\n $this->_populate();\n \n $response = $this->withSession($this->adminSession)\n ->call('POST', '/dealer-account/create', $this->customDealerAccountData, [], [], ['HTTP_REFERER' => '/dealer-account/create']);\n \n $this->assertRedirectedTo('/dealer-account');\n $this->assertSessionHas('dealer-account-created', '');\n }", "public function testQuarantineCreate()\n {\n\n }", "public function testShouldGenerateARegistrationSuccessfully() {\n \n $entity = new Registration;\n $entity->source_id = $this->getSource()->id;\n $entity->registrant_id = $this->getRegistrant()->id;\n $entity->type = 'PLAYER' ;\n $entity->league = 'league';\n $entity->org_name = 'Oranization...';\n $entity->org_state = 'NY';\n $entity->season = '2017';\n $entity->external_id = 'myexternalid';\n $entity->right_to_market = true;\n $entity->team_gender = 'Male';\n $entity->team_name = 'A-Team';\n $entity->school_district = 'school district';\n $entity->school_state = 'school sate';\n $entity->first_name = 'Firt name';\n $entity->middle_name = 'Middle name';\n $entity->last_name = 'Last Name';\n $entity->email = 'mail@mail.com';\n $entity->gender = 'Male';\n $entity->city = 'California';\n $entity->zip_code = '234141234123';\n $entity->birth_date = '11/27/1984';\n $entity->phone_number = '1234567890';\n $entity->game_type = 'SOME';\n $entity->level = 'LEVEL';\n $entity->state = 'CALIFORNIA';\n $entity->address_first_line = 'An Address 1234';\n $entity->county = 'A county';\n\n $entity->save();\n $this->assertTrue(!is_null($entity->id));\n }", "public function createAction() {\n\n $this->validateUser();\n\n $form = new Yourdelivery_Form_Testing_Create();\n if ($this->getRequest()->isPost()) {\n if ($form->isValid($this->getRequest()->getPost())) {\n if ($form->getValue('tag') && $this->getRequest()->getParam('proceed') == 'false') {\n $tags = Yourdelivery_Model_Testing_TestCase::searchForTags($form->getValue('tag'));\n\n if ($tags) {\n foreach ($tags as $tag) {\n $ids .= sprintf('<a href=\"/testing_cms/overview/id/%s\" target=\"blank\">%s</a> ', $tag['id'], $tag['id']);\n }\n $this->warn('Tag already in use for testcase ' . $ids);\n $this->_redirect(vsprintf('testing_cms/create/title/%s/author/%s/description/%s/priority/%s/tag/%s/proceed/true', $form->getValues()));\n }\n }\n\n $testCase = new Yourdelivery_Model_Testing_TestCase();\n $testCase->setData($form->getValues());\n $id = $testCase->save();\n $this->success('Testcase successfully created.');\n $this->_redirect('testing_cms/add/id/' . $id);\n } else {\n $this->error($form->getMessages());\n }\n }\n $this->view->post = $this->getRequest()->getParams();\n }", "private function buildVenueSurvey()\n {\n $this->year = current_year();\n\n $this->trainer = Person::factory()->create();\n\n $this->survey = Survey::factory()->create(['year' => $this->year, 'position_id' => Position::TRAINING]);\n $surveyId = $this->survey->id;\n\n $this->venueGroup = SurveyGroup::factory()->create(['survey_id' => $surveyId, 'sort_index' => 1]);\n $this->venueQuestion = SurveyQuestion::factory()->create(['survey_id' => $surveyId, 'survey_group_id' => $this->venueGroup->id]);\n\n $this->trainerGroup = SurveyGroup::factory()->create(['survey_id' => $surveyId, 'type' => 'trainer', 'sort_index' => 2]);\n $this->trainerQuestion = SurveyQuestion::factory()->create(['survey_id' => $surveyId, 'survey_group_id' => $this->trainerGroup->id]);\n\n $this->slot = Slot::factory()->create([\n 'description' => 'Venue 1',\n 'position_id' => Position::TRAINING,\n 'begins' => \"{$this->year}-01-01 00:00\",\n 'ends' => \"{$this->year}-01-01 00:01\"\n ]);\n PersonSlot::factory()->create(['person_id' => $this->user->id, 'slot_id' => $this->slot->id]);\n TraineeStatus::factory()->create(['person_id' => $this->user->id, 'slot_id' => $this->slot->id, 'passed' => true]);\n $this->trainerSlot = Slot::factory()->create([\n 'description' => 'Venue 1',\n 'position_id' => Position::TRAINER,\n 'begins' => \"{$this->year}-01-01 00:00\",\n 'ends' => \"{$this->year}-01-01 00:01\"\n ]);\n PersonSlot::factory()->create(['person_id' => $this->trainer->id, 'slot_id' => $this->trainerSlot->id]);\n TrainerStatus::factory()->create([\n 'person_id' => $this->trainer->id,\n 'slot_id' => $this->slot->id,\n 'trainer_slot_id' => $this->trainerSlot->id,\n 'status' => TrainerStatus::ATTENDED\n ]);\n }", "public function testNew()\n {\n $clientNoAuth = static::createClient();\n $clientNoAuth->request('GET', '/clientes/new');\n //redireccion a main\n $this->assertEquals(302, $clientNoAuth->getResponse()->getStatusCode());\n\n //caso con todo bien, redirección a /departamento/ y bien agregado el nuevo departamento.\n $client = $this->createAuthorizedClient();\n $crawler = $client->request('GET', '/persona/new');\n $form = $crawler->selectButton('Guardar')->form();\n $form['persona[Nombre]'] = 'Celia';\n $form['persona[Apellidos]'] = 'Cruz';\n $form['persona[Cargo]'] = 'Boss';\n $form['persona[Correo]'] = 'celiaDead@gmail.com';\n $form['persona[Telefono]'] = '123456789';\n $form['persona[Local_id]'] = '1';\n $form['persona[Departamento]'] = '1';\n\n $crawler = $client->submit($form);\n $this->assertTrue($client->getResponse()->isRedirect());\n $crawler = $client->followRedirect();\n }", "public function testRentalInsertFormFrontEnd()\n {\n $this->authentication();\n $this->visit(route('rental.frontend.insert'));\n $this->seeStatusCode(200);\n $this->see('Verhuur aanvraag.');\n }", "public function testCreateChallengeActivity()\n {\n }", "public function createTournament(){\n\t}", "public function testVenueSubmitSurvey()\n {\n $this->buildVenueSurvey();\n\n $venueG = $this->venueGroup;\n $venueQ = $this->venueQuestion;\n\n $response = $this->json('POST', 'survey/submit', [\n 'slot_id' => $this->slot->id,\n 'type' => Survey::TRAINING,\n 'survey' => [\n [\n 'survey_group_id' => $venueG->id,\n 'answers' => [\n [\n 'survey_question_id' => $venueQ->id,\n 'response' => 'a response'\n ]\n ]\n ],\n ]\n ]);\n\n $response->assertStatus(200);\n\n $this->assertDatabaseHas('survey_answer', [\n 'person_id' => $this->user->id,\n 'slot_id' => $this->slot->id,\n 'survey_question_id' => $venueQ->id,\n 'response' => 'a response'\n ]);\n }", "public function __construct($webinar, $participant, $certificate)\n {\n //\n $this->webinar = $webinar;\n $this->participant = $participant;\n $this->certificate = $certificate;\n }", "public function testCreateChallengeActivityTemplate()\n {\n }", "public function testWebinarPollUpdate()\n {\n }", "public function testCreateScenario()\n {\n $client = static::createClient();\n }", "public function test_user_can_create_post()\n {\n $this->signIn();\n $attributes = [\n 'title' => 'my title',\n 'description' => 'my description',\n 'notes' => 'my notes'\n ];\n\n $response = $this->post('/api/projects', $attributes)->assertStatus(201);\n\n $response->assertJson([\n 'data' => [\n 'type' => 'projects',\n 'attributes' => [\n 'title' => $attributes['title'],\n 'notes' => $attributes['notes'],\n 'description' => $attributes['description'],\n 'user_id' => auth()->id()\n ]\n ]\n ]);\n }", "public function test_can_vendor_create(){\n $data = [\n 'Name' => $this->faker->name,\n 'category' => $this->faker->category,\n ];\n\n $this->json('POST','/api/vendor_create',$data);\n }", "public function test_user_can_create_vehicle() {\n // $user = factory(User::class)->create();\n $user = User::factory()->create();\n $this->actingAs($user, 'api');\n\n $storeVehicle = [\n 'name' => 'First Vehicle',\n 'plate_num' => 'kddjjdj',\n 'color' => 'brown',\n 'number_of_seats' => 2\n ];\n\n $this->json('POST', 'api/vehicle', $storeVehicle ,\n [ 'Accept' => 'application/json']\n )\n ->assertStatus(201);\n // ->assertJson([\n // \"status\" => true,\n // \"message\" => \"Vehicle created\",\n // \"data\" => [\n // 'name' => 'First Vehicle',\n // 'plate_num' => 'kddjjdj',\n // 'color' => 'brown',\n // 'number_of_seats' => 2\n // ],\n // \"message\" => \"Vehicle created\"\n // ]);\n }", "public function test_create_item() {}", "public function test_create_item() {}", "public function testCanCreateCourse()\n {\n \n $response = $this->call('POST', '/course', [\n 'name' => 'Kursur PHP Advance',\n 'level' => 'Beginner',\n 'benefit' => 'Bisa membuat website sendiri'\n ]);\n $this->assertEquals(201, $response->status());\n }", "public function testCreate()\n {\n\n $data = array(\n 'achRoutingNumber' => '987654321',\n 'achAccountNumber' => '123456789',\n 'achAccountType' => 'CHECKING',\n 'foo' => 'bar'\n );\n\n $transaction = $this->client->transaction()->create($data);\n $this->assertEquals($data, get_object_vars($transaction->post), 'Passed variables are not correct');\n $this->assertEquals('POST', $transaction->request_method, 'The PHP Verb Is Incorrect');\n $this->assertEquals('/transactions', $transaction->path, 'The path is incorrect');\n }", "public function test_student_can_be_created_with_new_guardian_info()\n {\n $user = User::factory()->create();\n $classroom = $this->generateTestClassroom();\n $studentInfo = $this->studentInfo($classroom);\n $guardianInfo = [\n 'guardian_title' => $this->faker->title,\n 'guardian_first_name' => $this->faker->firstName,\n 'guardian_last_name' => $this->faker->lastName,\n 'guardian_email' => $this->faker->email,\n 'guardian_phone' => $this->faker->e164PhoneNumber,\n 'guardian_occupation' => $this->faker->jobTitle,\n 'guardian_address' => $this->faker->address\n ];\n $studentInfo = array_merge($studentInfo, $guardianInfo);\n $response = $this->actingAs($user)->post('/store/student', $studentInfo);\n\n $response->assertStatus(302)->assertSessionHas('success')->assertSessionHasNoErrors();\n }", "public function testCreate()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/authors/create')\n ->type('name', 'John')\n ->type('lastname', 'Doe')\n ->press('Save')\n ->assertPathIs('/authors')\n ->assertSee('John')\n ->assertSee('Doe');\n });\n }", "public function testExample()\n { \n\n $data = [\n 'name'=>'Побег из Шоушенка',\n 'description'=>'Фильм',\n ];\n\n $this->put('/film',$data)->seeJsonEquals([\n 'created'=>true\n ]);\n }", "public function create($data)\n {\n \n \t\n \t$data = ['url' => 'Employers','method'=>'POST','data'=>$data];\n \treturn $this->payRunObject->call($data);\n }", "public function testParticipantsPost()\n {\n }", "public function testPostCreate()\n {\n $this->json('POST', '/api/post_create', ['title' => 'test1', 'description' => 'description1', 'login' => 'user1'])\n ->assertJson([\n 'post_id' => true\n ]);\n }", "public function create()\n {\n $this->validate();\n Contest::create($this->modelData());\n $this->modalFormVisible = false;\n $this->resetVars();\n }", "public function create()\n {\n $credentials = Request()->validate([\n 'name' => ['required','string'],\n 'price' => ['required','numeric'],\n 'stock' => ['required','numeric'],\n 'instrument_type_id' => ['required']\n ]);\n Instrument::create([\n 'name' => request('name'),\n 'price' => request('price'),\n 'stock' => request('stock'),\n 'instrument_type_id' => request('instrument_type_id')\n ]);\n Binnacle::create([\n 'entity' => \"El insumo : \". request('name'),\n 'action' => \"inserto\",\n 'table' => \"Insumos\",\n 'user_id'=> Auth::user()->id\n ]);\n return redirect()->route('instruments.eachOne');\n }", "public function executeCreate(sfWebRequest $request)\n {\n\t//to handle failure of a validation when the specimen is a new identification\n\t//and allow the callback to still redirect to \"newIdentificationSuccess.php\"\n\t//(see also \"newSuccess.php)\n\tif($request->hasParameter(\"split_created\"))\n\t{\n\t\t$this->newIdentification=TRUE;\n\t\t$this->original_id= $request->getParameter('split_created','0') ;\n\t}\n\t//\n if($this->getUser()->isA(Users::REGISTERED_USER)) $this->forwardToSecureAction();\n $this->forward404Unless($request->isMethod('post'),'You must submit your data with Post Method');\n $spec = new Specimens();\n $this->form = new SpecimensForm($spec);\n $this->processForm($request, $this->form,'create');\n $this->loadWidgets();\n\n $this->setTemplate('new');\n }", "public function testVolunteerHourCreateForProjectSuccess_Administrator()\n {\n // Set test user as current authenticated user\n $this->be($this->administrator);\n \n $this->session([\n 'username' => $this->administrator->username, \n 'access_level' => $this->administrator->access_level\n ]);\n \n $testProjectID = 1;\n // Call route under test\n $response = $this->call('GET', 'volunteerhours/add/project/'.$testProjectID);\n \n $this->assertContains('Volunteer Hours for', $response->getContent());\n }", "public function testVolunteerHourCreateForContactSuccess_Administrator()\n {\n // Set test user as current authenticated user\n $this->be($this->administrator);\n \n $this->session([\n 'username' => $this->administrator->username, \n 'access_level' => $this->administrator->access_level\n ]);\n \n $volunteerID = 2;\n // Call route under test\n $response = $this->call('GET', 'volunteerhours/add/volunteer/'.$volunteerID);\n \n $this->assertContains('Volunteer Hours for', $response->getContent());\n }", "public function testCreateBook()\n {\n $this->browse(function (Browser $browser) {\n //Make a book to add \n $book = factory('App\\Book')->make();\n //Navigate to the create page and send the data\n $browser->visit('/api/books/create')\n ->type('title', $book->title)\n ->type('author', $book->author)\n ->press('Add');\n //Check we are redirected to home page with no errors.\n $browser->pause(500);\n $browser->assertPathIs('/api/books')->assertSee('Book was successfully saved');\n //Check the new book is displayed\n $browser \n ->assertSee($book->title)\n ->assertSee($book->author);\n\n });\n\n }", "public function testRegisterNewContract()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs(factory(User::class)->create());\n $property = factory(Property::class)->create([\n 'rented' => null,\n 'status' => Property::STATUS_ACTIVE\n ]);\n $lessee = factory(Lessee::class)->create();\n\n $browser\n ->visit(route('contrato.create'))\n ->on(new CreateContractPage())\n ->assertSee('Nuevo Contrato');\n\n\n\n\n\n $browser->selectLessor($property->lessor->id);\n $browser->selectProperty($property->id);\n $browser->selectLessee($lessee->id);\n $browser->typeSlowly('@years',1);\n // Contract dates\n $this->fillInputDate($browser,'periods[0][fecha_inicio]', now());\n $this->fillInputDate($browser,'periods[0][fecha_fin]', now()->addMonth());\n $browser->typeSlowly('input[name=\\'periods[0][cantidad]\\']', random_int(1000,1210));\n\n $browser->pause(500);\n $browser->screenshot('after');\n $browser->screenshot('test');\n $browser->type('@bonus',10);\n $browser->type('@deposit',5000);\n $browser->click('@submit');\n\n $browser->assertRouteIs('contrato.index');\n $browser->assertSee('Catalogo de Contratos');\n });\n }", "public function testWebinarPollDelete()\n {\n }", "public function executeCreate(sfWebRequest $request)\n {\n $this->forward404Unless($request->isMethod(sfRequest::POST));\n $this->form = new WebsitePracticeAreaForm();\n $this->websitedetail = UsersWebsite::getUsersWebsiteId($this->getUser()->getAttribute('admin_user_id'));\n $this->displaySlugValue = $_POST['WebsitePracticeArea']['Newslug'];\n $redirectFlag = $request->getPostParameter('submit');\n $this->processForm($request, $this->form, $redirectFlag);\n $this->setTemplate('new');\n }", "public function createBooking(array $data);", "public function testCanCreateUserObject()\n {\n $s = json_decode('{\"url\":\"https://www.test.net:8443/webhook\",\"has_custom_certificate\":true,\"pending_update_count\":0,\"max_connections\":40}');\n $t = new WebhookInfo($s);\n $this->assertInstanceOf(WebhookInfo::class, $t);\n $this->assertEquals('https://www.test.net:8443/webhook', $t->url);\n $this->assertTrue($t->has_custom_certificate);\n }", "public function testCreateTask()\n {\n $this->logInUserObject();\n $crawler = $this->client->request('GET', '/tasks/create');\n $form = $crawler->selectButton('Ajouter')->form();\n $form['task[title]'] = 'Titre test';\n $form['task[content]'] = 'Contenu de test pour la création d\\'une tâche';\n $this->task = $this->client->submit($form);\n\n $crawler = $this->client->followRedirect();\n $response = $this->client->getResponse();\n $statusCode = $response->getStatusCode();\n\n $this->assertEquals(200, $statusCode);\n $this->assertContains('Superbe! La tâche a été bien été ajoutée.', $crawler->filter('div.alert.alert-success')->text());\n }", "public function testCreatePayrun()\n {\n }", "public function testIndexSurvey()\n {\n $year = 2018;\n Survey::factory()->create(['year' => $year]);\n\n $response = $this->json('GET', 'survey', ['year' => $year]);\n $response->assertStatus(200);\n $this->assertCount(1, $response->json()['survey']);\n }", "public function testPolicyCanBeCreated()\n {\n $policy = factory(App\\Models\\Policy::class)->create([\n 'title' => 'Administrator',\n ]);\n\n $this->assertEquals($policy->title, 'Administrator');\n\n $this->seeInDatabase('policies', ['id' => '1', 'title' => 'Administrator']);\n }", "public function testRegisterStudent()\n {\n $this->browse(function (Browser $browser){\n $browser->visit('/register')\n ->click('.slider__container')\n ->type('firstname', env('DUSK_NEW_FIRSTNAME'))\n ->type('lastname', env('DUSK_NEW_LASTNAME'))\n ->type('email', env('DUSK_NEW_USER_STUDENT'))\n ->type('verificateEmail', env('DUSK_NEW_USER_STUDENT'))\n ->type('password', env('DUSK_NEW_PASSWORD'))\n ->press('.button')\n ->assertPathIs('/');\n });\n }", "public function testAddVendorComplianceSurvey()\n {\n }", "public function create()\n\t{\n\t\treturn $this->fail(lang('RESTful.notImplemented', ['create']), 501);\n\t}", "public function test_example()\n {\n $response = $this->post('conciertos/alta',[\n 'nombre' => 'The O2 Arena Muse',\n 'fecha' => '2019-09-15',\n 'recinto_id' => '1',\n 'numero_espectadores' => '100',\n 'promotor_id' => '1',\n 'grupos_ids' => [1,2],\n 'medios_publicitarios_ids' => [1,2],\n ]);\n\n $response->assertStatus(200);\n }", "public function actionCreateappointment(): bool\n {\n $request = Yii::$app->request;\n \n if ($request->isPost) { \n $appointment = new Appointments;\n $appointment->client_id = $request->post('user_id');\n $appointment->service_id = $request->post('service_id');\n $appointment->date = substr(str_replace('T', ' ', $request->post('date')), 0, 18);\n $appointment->status = Appointments::STATUS_ACTIVE;\n\n return ($appointment->save()) ? true : false;\n }\n \n return false;\n }", "public function testCreatePayrollCalendar()\n {\n }", "public function testStoreShouldCreateNewTavern(){\n\t\t$tavern = [\n\t\t\t'name' => 'The Golden Rat',\n\t\t\t'type' => 'Thieves Guild Hangout',\n\t\t\t'tavern_owner_id' => 1,\n\t\t];\n\n\n\t\t$response = $this->call('POST', '/taverns', $tavern);\n\n\t\t$this->assertEquals(302, $response->status());\n\t\t$this->assertRedirectedTo(url('/taverns/1?successMessage=Record+Added+Successfully'));\n\n\t\t$this->assertEquals(1, count(Tavern::all()));\n\n\t\t$storedTavern = Tavern::findById(1);\n\t\t$this->assertNotNull($storedTavern);\n\n\t\t$this->assertEquals('The Golden Rat', $storedTavern->name);\n\t\t$this->assertEquals('Thieves Guild Hangout', $storedTavern->type);\n\t\t$this->assertEquals(1, $storedTavern->tavern_owner_id);\n\n\t\t$this->assertEquals(0, $storedTavern->approved);\n\t\t$this->assertEquals(0, $storedTavern->public);\n\t\t$this->assertEquals($this->user->id, $storedTavern->owner_id);\n\t}" ]
[ "0.7855212", "0.7379238", "0.69512796", "0.6878894", "0.6584363", "0.6553019", "0.64912003", "0.6440262", "0.6421352", "0.64194024", "0.6349812", "0.63445705", "0.62597454", "0.62102824", "0.61887443", "0.6174561", "0.61369574", "0.6054688", "0.601544", "0.5883184", "0.5879682", "0.5864063", "0.58290356", "0.5801273", "0.57977116", "0.5793272", "0.57854867", "0.57656217", "0.5750161", "0.57478935", "0.5742112", "0.57256263", "0.5715932", "0.569887", "0.5670852", "0.5670852", "0.5650862", "0.5626532", "0.5588387", "0.5559275", "0.5529558", "0.5514925", "0.55030876", "0.5493811", "0.54933816", "0.5490643", "0.54881275", "0.54874456", "0.5484526", "0.54805404", "0.5469255", "0.546429", "0.5462932", "0.5449574", "0.5449172", "0.54447055", "0.5435301", "0.54192746", "0.541908", "0.5412494", "0.54119974", "0.5407994", "0.5403464", "0.54016244", "0.53959244", "0.53924465", "0.53921115", "0.53917646", "0.53768957", "0.53768957", "0.53664607", "0.5361709", "0.53519696", "0.53412354", "0.5340198", "0.5337327", "0.5335737", "0.53166944", "0.5315347", "0.5308292", "0.5300565", "0.53000396", "0.52989435", "0.5296069", "0.52954966", "0.5292964", "0.5284439", "0.5283256", "0.528252", "0.5280929", "0.5279378", "0.52703923", "0.5269166", "0.52676994", "0.5258898", "0.52525574", "0.52480745", "0.5245886", "0.5244334", "0.52418554" ]
0.8172204
0
Test case for webinarDelete Delete a Webinar.
Тест-кейс для webinarDelete Удаление вебинара.
public function testWebinarDelete() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarPollDelete()\n {\n }", "public function testWebinarPanelistDelete()\n {\n }", "public function testWebinarPanelistsDelete()\n {\n }", "public function deleteSportsVenue($venue);", "public function testDeleteSurvey()\n {\n $survey = Survey::factory()->create();\n $surveyId = $survey->id;\n\n $response = $this->json('DELETE', \"survey/{$surveyId}\");\n\n $response->assertStatus(204);\n $this->assertDatabaseMissing('survey', ['id' => $surveyId]);\n }", "public function test_delete() {\n global $DB;\n\n self::setAdminUser();\n $this->resetAfterTest(true);\n\n // Save new outage.\n $now = time();\n $outage = new outage([\n 'autostart' => false,\n 'warntime' => $now - 60,\n 'starttime' => 60,\n 'stoptime' => 120,\n 'title' => 'Title',\n 'description' => 'Description',\n ]);\n $outage->id = outagedb::save($outage);\n self::$outage = $outage;\n\n outagedb::delete(self::$outage->id);\n\n // Should not exist.\n $event = $DB->get_record_select(\n 'event',\n \"(eventtype = 'auth_outage' AND instance = :idoutage) OR (id = :idevent)\",\n ['idoutage' => self::$outage->id, 'idevent' => self::$event->id],\n 'id',\n IGNORE_MISSING\n );\n self::assertFalse($event);\n }", "public function testDelete()\n {\n $this->clientAuthenticated->request('DELETE', '/invoice/delete/' . self::$objectId);\n $response = $this->clientAuthenticated->getResponse();\n $this->assertJsonResponse($response, 200);\n\n //Deletes physically the entity created by test\n $this->deleteEntity('Invoice', 'invoiceId', self::$objectId);\n }", "public function testDelete()\n {\n $model = $this->makeFactory();\n $model->save();\n\n $this->json('DELETE', static::ROUTE . '/' . $model->id, [], [\n 'Authorization' => 'Token ' . self::getToken()\n ])\n ->seeStatusCode(JsonResponse::HTTP_NO_CONTENT);\n }", "public function test_deleteSubscriber() {\n\n }", "public function testDeleteSurvey0()\n {\n }", "public function testDeleteSurvey0()\n {\n }", "public function testDelete()\n\t{\n\t\t// Add test bookings\n\t\t$bookings = [];\n\t\tforeach ($this->clients as $client) {\n\t\t\t$booking = factory(\\App\\Booking::class)->create([\n\t\t\t\t'fitter_id' => $this->admin->fitter->id,\n\t\t\t\t'client_id' => $client->id,\n\t\t\t\t'horse_id' => factory(\\App\\Horse::class)->create(['client_id' => $client->id])->id,\n\t\t\t\t'rider_id' => factory(\\App\\Rider::class)->create(['client_id' => $client->id])->id,\n\t\t\t\t'user_id' => factory(\\App\\User::class)->create([\n\t\t\t\t\t'fitter_id' => $this->admin->fitter->id,\n\t\t\t\t\t'type' => 'fitter-user',\n\t\t\t\t])->id,\n\t\t\t]);\n\n\t\t\t$bookings[] = $booking->toArray();\n\t\t}\n\n\t\t$booking = \\App\\Booking::find($bookings[0]['id']);\n\n\t\t$this->actingAs($this->admin, 'api')\n\t\t\t ->delete('/api/v1/admin/bookings/' . $booking->id)\n\t\t\t ->assertStatus(200)\n\t\t\t ->assertJsonStructure([\n\t\t\t\t 'success',\n\t\t\t ]);\n\n\t\t$this->assertDatabaseMissing('bookings', ['id' => $booking->id]);\n\t}", "public function testDelete()\n\t{\n\t\t$this->resetReservationTable();\n\t\t$this->resetDateTimes();\n\t\t\n\t\t$reservation = new Reservation();\n\t\t$reservation->setAttributes(array(\n\t\t\t\t'roomid' => 1,\n\t\t\t\t'datefrom' => $this->_dateOverlapFrom,\n\t\t\t\t'numberofnights'=> $this->_numberofnights,\n\t\t\t\t));\n\t\t$reservation->save(false);\n\t\t$this->assertTrue($reservation->delete());\n\t}", "public function testLeaseDelete()\n {\n $user = factory(User::class)->create();\n $lease = factory(Lease::class)->create();\n\n $this->actingAs($user)\n ->seeIsAuthenticatedAs($user)\n ->get(route('lease.delete', ['id' => $lease->id]))\n ->assertStatus(200);\n }", "public function testDelete()\n\t{\n\t\t$client = static::createClient(array(), array(\n\t\t 'PHP_AUTH_USER' => 'jr',\n\t\t 'PHP_AUTH_PW' => 'jr',\n\t\t));\n\t\t$client->followRedirects();\n\n\t\t// On clique sur le lien entreprise de test\n\t\t$crawler = $client->request('GET', '/clients');\n\t\t$link = $crawler->filter('.bloc__title a:contains(\"Entreprise de test\")')->first()->link();\n\t\t$crawler = $client->click($link);\n\t\t//On vérifie qu'on est bien sur la bonne page\n\t\t$this->assertGreaterThan(0, $crawler->filter('h1:contains(\"Entreprise de test\")')->count());\n\n\t\t// On clique sur le bouton modifier\n\t\t$link = $crawler->filter('.btn--delete')->first()->link();\n\t\t$crawler = $client->click($link);\n\t\t//On vérifie qu'on est bien sur la bonne page\n\t\t$this->assertEquals(1, $crawler->filter('.breadcrumb:contains(\"Supprimer\")')->count()); \n\n\t\t// On modifie le métier\n\t\t$form = $crawler->selectButton('Supprimer')->form();\n\t\t$crawler = $client->submit($form);\t\n\n\t\t//On vérifie que ça a marché\n\t\t$this->assertEquals(1, $crawler->filter('html:contains(\"Le client a bien été supprimé.\")')->count());\n\n\t}", "public function testDeleteEnrollmentRequest()\n {\n }", "public function delete($episode);", "function deleteWebinar($webinarKey, $sendCancellationEmails = true)\n {\n ($sendCancellationEmails) ? $parameters = ['sendCancellationEmails' => true] : $parameters = null;\n\n $path = $this->getPathRelativeToOrganizer(sprintf('webinars/%s', $webinarKey));\n\n return $this->sendRequest('DELETE', $path, $parameters, $payload = null);\n }", "public function testRemove()\n {\n $paymentMethodId = '36538b73-0ff9-4bf6-bc94-20f499b4f85d';\n $customerId = '20e68ad7-ff54-4cb6-8556-f87f58bcf995';\n\n $this->resource->remove($paymentMethodId,$customerId);\n\n $this->assertAttributeEquals(BASE_URL, 'base_url', $this->connector, 'Failed. Base url not correct');\n $this->assertAttributeEquals('DELETE', 'method', $this->connector, 'Failed. Method is not correct');\n $this->assertAttributeEquals('paymentmethods/' . $paymentMethodId . '?customerId=' .$customerId, 'url', $this->connector, 'Failed. Url is not correct');\n }", "public function delete($Enterprise) { ; }", "public function testDeletePromotionCampaignApplicationUsingDELETE()\n {\n }", "public function testDeleteVendorComplianceSurvey()\n {\n }", "public function testDelete()\n {\n\n // Create exhibits and items.\n $neatline1 = $this->_createNeatline('Test Exhibit 1', '', 'test-exhibit-1');\n $neatline2 = $this->_createNeatline('Test Exhibit 2', '', 'test-exhibit-2');\n $item1 = $this->_createItem();\n $item2 = $this->_createItem();\n\n // Create records.\n $record1 = new NeatlineDataRecord($item1, $neatline1);\n $record2 = new NeatlineDataRecord($item2, $neatline1);\n $record3 = new NeatlineDataRecord($item1, $neatline2);\n $record4 = new NeatlineDataRecord($item2, $neatline2);\n $record1->save();\n $record2->save();\n $record3->save();\n $record4->save();\n\n // 2 exhibits, 4 data records.\n $_exhibitsTable = $this->db->getTable('NeatlineExhibit');\n $_recordsTable = $this->db->getTable('NeatlineDataRecord');\n $this->assertEquals($_exhibitsTable->count(), 2);\n $this->assertEquals($_recordsTable->count(), 4);\n\n // Call delete.\n $neatline1->delete();\n\n // 1 exhibits, 2 data records.\n $this->assertEquals($_exhibitsTable->count(), 1);\n $this->assertEquals($_recordsTable->count(), 2);\n\n }", "public function testDelete()\n {\n }", "public function testDeleteCampaignFromPromotionUsingDELETE()\n {\n }", "public function testDelete()\n {\n $this->clientAuthenticated->request('DELETE', '/transaction/delete/' . self::$objectId);\n $response = $this->clientAuthenticated->getResponse();\n $this->assertJsonResponse($response, 200);\n\n //Deletes physically the entity created by test\n $this->deleteEntity('Transaction', 'transactionId', self::$objectId);\n }", "public function testDeleteNotTrashedAndOwnCreated()\r\n {\r\n //create teacher user\r\n $teacher = $this->CreateTeacher();\r\n $lisUser = $this->CreateTeacherUser($teacher);\r\n\r\n //now we have created studentuser set to current controller\r\n $this->controller->setLisUser($lisUser);\r\n $this->controller->setLisPerson($teacher);\r\n\r\n $subjectRound = $this->CreateSubjectRound();\r\n $student = $this->CreateStudent();\r\n $anotherTeacher = $this->CreateTeacher();\r\n //$studentGrade = $this->CreateStudentGrade();\r\n\r\n $independentWork = $this->CreateIndependentWork([\r\n 'name' => uniqid() . 'Name',\r\n 'duedate' => new \\DateTime,\r\n 'description' => uniqid() . ' Description for independentwork',\r\n 'durationAK' => (int) uniqid(),\r\n 'subjectRound' => $subjectRound->getId(),\r\n 'teacher' => $anotherTeacher->getId(),\r\n 'student' => $student->getId(),\r\n 'createdBy' => $lisUser->getId()\r\n ]);\r\n\r\n\r\n $this->em->persist($independentWork);\r\n $this->em->flush($independentWork);\r\n\r\n $id = $independentWork->getId();\r\n\r\n //prepare request\r\n $this->routeMatch->setParam('id', $id);\r\n\r\n $this->request->setMethod('delete');\r\n $result = $this->controller->dispatch($this->request);\r\n $response = $this->controller->getResponse();\r\n\r\n $this->PrintOut($result, false);\r\n\r\n //assertions\r\n $this->assertEquals(200, $response->getStatusCode());\r\n $this->assertEquals(false, $result->success);\r\n $this->assertEquals('NOT_TRASHED', $result->message);\r\n }", "public function testDelete()\n\t{\n\t\t$saddle = $this->saddles[0];\n\n\t\t$this->actingAs($this->admin, 'api')\n\t\t\t ->delete('/api/v1/admin/saddles/' . $saddle->id)\n\t\t\t ->assertStatus(200);\n\n\t\t$this->assertDatabaseMissing('saddles', ['id' => $saddle->id]);\n\t}", "public function deleted(Instructor $instructor)\n {\n //\n }", "public function testDeleteChallenge()\n {\n }", "public function testDeleteRequest()\n {\n $requestInstance = null;\n\n $this->router->delete('/customers/{id}/relationships/{relationship}', [\n 'middleware' => ['request', 'response'],\n function(\\Luminary\\Http\\Requests\\Destroy $request, $id, $relationship) use(&$requestInstance) {\n $requestInstance = $request;\n }\n ]);\n\n $data = [\n 'data' => [\n 'type' => 'location',\n 'id' => '1234'\n ]\n ];\n\n $this->json('DELETE', 'customers/1234/relationships/location', $data, $this->headers());\n\n $this->assertResponseStatus(204);\n $this->assertInstanceOf(\\Luminary\\Http\\Requests\\Destroy::class, $requestInstance);\n $this->assertInstanceOf(CustomerAuthorize::class, $requestInstance->getAuthorize());\n }", "public function testDeleteEvent()\n {\n }", "public function deleted(Investor $investor)\n {\n //\n }", "public function testProjectProjectIDInviteeInviteIDDelete()\n {\n }", "public function testDeleteUrlUsingDELETE()\n {\n }", "public function testDeleteHospital(){\r\n\t\t$this->http = new Client(['base_uri' => 'http://localhost/casecheckapp/public/index.php/']);\r\n\r\n\t\t//Test HTTP status ok for id=1\r\n\t\t$response= $this->http->request('DELETE','api/v1/hospital/2');//Change ID here\r\n\t\t$this->assertEquals(200,$response->getStatusCode());\r\n\r\n\t\t//Stopping the connexion with Guzzle\r\n\t\t$this->http = null;\r\n\t}", "public function testDelete()\n {\n $dataLoader = $this->getDataLoader();\n $data = $dataLoader->getOne();\n $this->deleteTest($data['user']);\n }", "public function test_shopper_can_be_deleted()\n {\n $shopper = Shopper::withoutEvents(function () {\n return Shopper::factory()->create();\n });\n\n $shopper2 = Shopper::withoutEvents(function () {\n return Shopper::factory()->create();\n });\n\n $this->actingAs($shopper);\n\n $response = $this->delete(route('shoppers.destroy', $shopper2));\n\n $response->assertStatus(302);\n $response->assertRedirect(route('shoppers.index'));\n }", "public function testMakeDeleteRequest()\n {\n $client = new MockClient('https://api.xavierinstitute.edu', [\n new JsonResponse([\n 'success' => [\n 'code' => 200,\n 'message' => 'Deleted.',\n ],\n ], 200),\n ]);\n\n $this->assertEquals($client->delete('teachers/1'), true);\n }", "public function deleteTest()\n {\n $this->assertEquals(true, $this->object->delete(1));\n }", "public function testDeleteClient() {\n\n // Generate user and client\n $user = factory(App\\User::class)->create();\n $client = $user->clients()->save(factory(App\\Client::class)->make());\n\n $this->actingAs($user)\n ->get('/clients/' . $client->id . '/delete')\n ->seeJson(['success' => true]);\n\n }", "public function testDeleteChallengeActivity()\n {\n }", "public function testPageDelete()\n {\n $faker = Faker::create();\n $page = Page::inRandomOrder()->first();\n $response = $this\n ->actingAs(User::where(\"admin\", true)->whereNotNull(\"verified\")->inRandomOrder()->first(), 'api')\n ->withHeaders([\n \"User-Agent\" => $faker->userAgent(),\n ])\n ->json('DELETE', \"/api/pages/\" . $page->slug);\n $response\n ->assertStatus(200);\n }", "public function testDeleteSite()\n {\n }", "public function testDeleteChallengeEvent()\n {\n }", "public function testDeleteVendorComplianceSurveyTag()\n {\n }", "public function test_delete_item() {}", "public function test_delete_item() {}", "public function testDeleteAppartment() {\n $newAcc = My_Houseshare_Factory::accommodation(4);\n $newAcc->delete();\n\n $accRowAfter = $this->_model->find(4)->current();\n $this->assertTrue(null === $accRowAfter);\n\n My_Houseshare_Appartment::deleteAcc(5);\n\n $accRowAfter = $this->_model->find(5)->current();\n $this->assertTrue(null === $accRowAfter);\n\n }", "public function testDeleteUnauthorized()\n {\n $model = $this->makeFactory();\n $model->save();\n\n $this->json('DELETE', static::ROUTE . '/' . $model->id, [], [])\n ->seeStatusCode(JsonResponse::HTTP_UNAUTHORIZED);\n }", "public function testDeleteUserrecording()\n {\n }", "public function test_can_delete_a_media()\n { \n $data =$this->mediaDataHelper(); \n $response = $this->postJson('v1/media', $data);\n $media = Media::first();\n \n $response = $this->json('DELETE', 'v1/media/'.$media->id); \n $response->assertStatus(200)\n ->assertJson([\n 'success' => true,\n ]); \n }", "public function testDeleteById(Partner $partner): void\n {\n $this->assertTrue(Partner::deleteById($partner->getId()));\n }", "public function testWebinarCreate()\n {\n }", "public function testDeleteDocument()\n {\n }", "public function testDelete()\n {\n\n $this->createDummyRole();\n\n $this->assertDatabaseHas('roles', [\n 'id' => 1,\n ]);\n\n $this->call('POST', '/api/role', array(\n 'action' => $this->deleteAction,\n 'id' => 1,\n ));\n\n $this->assertDatabaseMissing('roles', [\n 'id' => 1,\n ]);\n\n $this->assertDatabaseMissing('role_permission', [\n 'role_id' => 1,\n 'permission_id' => [1, 2]\n ]);\n }", "public function delete() {\n\n $id = $this->uri->segment(4);\n $this->events_model->delete_event($id);\n redirect('admin/events');\n\n }", "public function testDeleteOutroCardByGuest(): void\n {\n // Request\n $response = $this->delete('api/v1/outroCards/tenants/3');\n\n // Check response status\n $response->assertStatus(401);\n }", "public function delete($video_id);", "public function testQuarantineDeleteById()\n {\n\n }", "public function deleted(Apartment $apartment)\n {\n //\n }", "public function testDeleteSchedule() {\n\t\t$numRows = $this->getConnection()->getRowCount(\"schedule\");\n\n\t\t$schedule = new Schedule(null, $this->company->getCompanyId(), $this->VALID_SCHEDULEDAYOFWEEK1, $this->VALID_SCHEDULEENDTIME1, $this->VALID_SCHEDULELOCATIONADDRESS1, $this->VALID_SCHEDULELOCATIONNAME1, $this->VALID_SCHEDULESTARTTIME1);\n\n\t\t$schedule->insert($this->getPDO());\n\n\t\t//make sure it was inserted\n\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"schedule\"));\n\n\t\t//DELETE!!!!!!!!! a.k.a Tallcot it!!!!!!\n\n\t\t$schedule->delete($this->getPDO());\n\n\t\t//make sure there in no longer any data\n\n\t\t$pdoSchedule = Schedule::getScheduleByScheduleId($this->getPDO(), $schedule->getScheduleId());\n\t\t$this->assertNull($pdoSchedule);\n\t\t$this->assertEquals($numRows, $this->getConnection()->getRowCount(\"schedule\"));\n\n\t}", "public function testDelete()\n\t{\n\t\t$obj2 = $this->setUpObj();\n\t\t$response = $this->call('DELETE', '/'.self::$endpoint.'/'.$obj2->id);\n\t\t$this->assertEquals(200, $response->getStatusCode());\n\t\t$result = $response->getOriginalContent()->toArray();\n\n\t\t// tes apakah sudah terdelete\n\t\t$response = $this->call('GET', '/'.self::$endpoint.'/'.$obj2->id);\n\t\t$this->assertEquals(500, $response->getStatusCode());\n\n\t\t// tes apakah hasil return adalah yang sesuai\n\t\tforeach ($obj2->attributesToArray() as $key => $val) {\n\t\t\t$this->assertArrayHasKey($key, $result);\n\t\t\tif (isset($result[$key])&&($key!='created_at')&&($key!='updated_at'))\n\t\t\t\t$this->assertEquals($val, $result[$key]);\n\t\t}\n\t}", "public function testDeleteValidAdult() : void {\n// count the number of rows and save it for later\n$numRows = $this->getConnection()->getRowCount(\"adult\");\n\n$adultId = generateUuidV4();\n$adult = new Adult($adultId, $this->VALID_ACTIVATION, $this->VALID_AVATAR_URL, $this->VALID_CLOUDINARY_TOKEN, $this->VALID_EMAIL, $this->VALID_HASH, $this->VALID_NAME, $this->VALID_USERNAME);\n$adult->insert($this->getPDO());\n\n// delete the Adult from mySQL\n$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"adult\"));\n$adult->delete($this->getPDO());\n\n// grab the data from mySQL and enforce the Adult does not exist\n$pdoAdult = Adult::getAdultByAdultId($this->getPDO(), $adult->getAdultId());\n$this->assertNull($pdoAdult);\n$this->assertEquals($numRows, $this->getConnection()->getRowCount(\"adult\"));\n}", "public function executeDelete(sfWebRequest $request)\n {\n\t\tif(clsCommon::chkDataExist(\"WebsitePracticeArea\", $request->getParameter('id'), $this->getUser()->getAttribute('personalWebsiteId')))\n\t\t{\n\t\t\t$this->forward404Unless($website_practice_area = Doctrine::getTable('WebsitePracticeArea')->find(array($request->getParameter('id'))), sprintf('Object website_practice_area does not exist (%s).', $request->getParameter('id')));\n\n\t\t\t$oWebsitePracticeArea = new WebsitePracticeArea();\n\t\t\t$oWebsitePracticeArea->changeStatus($request->getParameter('id'),sfConfig::get(\"app_Status_Deleted\"));\n\t\t\t$this->getUser()->setFlash('succMsg', \"Deletion successful.\");\n\n\t\t\t$this->redirect('WebsitePracticeArea/index');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->getUser()->setFlash(\"errMsg\",sfConfig::get('app_Permission_Message'));\n\t\t\t$this->redirect('default/index');\n\t\t}\n }", "public function DELETE() {\n #\n }", "public function delete($calendario);", "public function testDeleteIdentity()\n {\n }", "public function testDeleteIdentity()\n {\n }", "public function testDeleteClub()\n {\n $response = $this->doRequest(\n array(\n 'delete_club',\n array(\n 'id' => 4\n )\n ),\n 'DELETE'\n );\n \n $this->assertEquals(204, $response['status']);\n \n $expectedError = $this->_getClub(4);\n $this->assertEquals(404, $expectedError['status']);\n }", "public function testDeleteTask()\n {\n $userId = User::first()->value('id');\n $taskId = Task::orderBy('id', 'desc')->first()->id;\n\n echo '/api/v1.0.0/users/'.$userId.'/tasks/'.$taskId;\n\n $response = $this->json('DELETE', '/api/v1.0.0/users/'.$userId.'/tasks/'.$taskId);\n $response->assertStatus(200);\n }", "public function testDeleteSuccessForHr() {\n\t\t$userInfo = [\n\t\t\t'role' => USER_ROLE_USER | USER_ROLE_HUMAN_RESOURCES,\n\t\t\t'prefix' => 'hr'\n\t\t];\n\t\t$opt = [\n\t\t\t'method' => 'POST',\n\t\t];\n\t\t$this->applyUserInfo($userInfo);\n\t\t$this->generateMockedController();\n\t\t$url = '/hr/deferred/delete/3';\n\t\t$this->testAction($url, $opt);\n\t\t$this->checkFlashMessage(__('The deferred save has been deleted.'));\n\t\t$result = $this->Controller->Deferred->find('list', ['recursive' => -1]);\n\t\t$expected = [\n\t\t\t1 => '1',\n\t\t\t2 => '2',\n\t\t\t4 => '4',\n\t\t\t5 => '5',\n\t\t];\n\t\t$this->assertData($expected, $result);\n\t}", "public function testDeleteSingleSuccess()\n {\n $entity = $this->findOneEntity();\n\n // Delete Entity\n $this->getClient(true)->request('DELETE', $this->getBaseUrl() . '/' . $entity->getId(),\n [], [], ['Authorization' => 'Bearer ' . $this->adminToken, 'HTTP_AUTHORIZATION' => 'Bearer ' . $this->adminToken]);\n $this->assertEquals(StatusCodesHelper::SUCCESSFUL_CODE, $this->getClient()->getResponse()->getStatusCode());\n }", "public function testDeleteInvoice() {\n\t\t$randomInvoice = rand();\n\n\t\t$tokenizer = new Token($_SESSION['accessToken']);\n\n\t\t$tokenizer->ip('173.49.87.94')\n\t\t\t\t->expirationMonth(12)\n\t\t\t\t->expirationYear(30)\n\t\t\t\t->cardNumber('4321000000001119')\n\t\t\t\t->cvv('333')\n\t\t\t\t->cardType('VS')\n\t\t\t\t->name('John Smith')\n\t\t\t\t->zip('65000')\n\t\t\t\t->address('65 Main Street')\n\t\t\t\t->post();\n\n\t\t$transaction = new Transaction($_SESSION['accessToken']);\n\n\t\t$transaction->total(100)\n\t\t\t\t->clerk('1')\n\t\t\t\t->invoiceNumber($randomInvoice)\n\t\t\t\t->tokenValue($tokenizer->getToken())\n\t\t\t\t->purchaseCard(array(\n\t\t\t\t\t'customerReference' => 412348,\n\t\t\t\t\t'destinationPostalCode' => 19134,\n\t\t\t\t\t'productDescriptors' => array('rent')\n\t\t\t\t))\n\t\t\t\t->sale();\n\n\t\t$output = $transaction->output();\n\n\t\t// Laravel Logging\n\t\tLog::debug('SHIFT 4 TEST 5: ' . __FUNCTION__ . ': CARD AND TRANSACTION CREATION');\n\t\tLog::debug(\n\t\t\tjson_encode(\n\t\t\t\tarray(\n\t\t\t\t\t'Request' => $transaction->request(),\n\t\t\t\t\t'Output' => $output\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\t// Deleting an invoice requires the transaction be sent in the header\n\t\t$transaction = new Transaction($_SESSION['accessToken']);\n\n\t\t$transaction->deleteInvoice($randomInvoice);\n\n\t\t$result = $transaction->output();\n\n\t\t// Laravel Logging\n\t\tLog::debug('SHIFT 4 TEST 5: ' . __FUNCTION__);\n\t\tLog::debug('SHIFT 4 TEST 5: ' . __FUNCTION__ . ' INVOICE: ' . $_SESSION['invoiceForTest5']);\n\t\tLog::debug(\n\t\t\tjson_encode(\n\t\t\t\tarray(\n\t\t\t\t\t'Request' => $transaction->request(),\n\t\t\t\t\t'Output' => $result\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\n\t\t$this->assertNotNull($result);\n\n\t}", "public function testDelete()\n\t{\n\t\t// Remove the following lines when you implement this test.\n\t\t$this->markTestIncomplete(\n\t\t\t'This test has not been implemented yet.'\n\t\t);\n\t}", "public function testDeleteSurveyQuestion0()\n {\n }", "public function testDeleteSurveyQuestion0()\n {\n }", "public function testDeleteProductUsingDELETE()\n {\n }", "public function deleteAction()\n {\n if ( $this->getRequest()->getParam('id') > 0) {\n try {\n $traineecert = Mage::getModel('bs_traineecert/traineecert');\n $traineecert->setId($this->getRequest()->getParam('id'))->delete();\n Mage::getSingleton('adminhtml/session')->addSuccess(\n Mage::helper('bs_traineecert')->__('Trainee Certificate was successfully deleted.')\n );\n $this->_redirect('*/*/');\n return;\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_traineecert')->__('There was an error deleting trainee certificate.')\n );\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n Mage::logException($e);\n return;\n }\n }\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_traineecert')->__('Could not find trainee certificate to delete.')\n );\n $this->_redirect('*/*/');\n }", "public function test_delete_task()\n {\n Project::create([\n 'id' => 1,\n 'name' => 'Project nae', \n 'description' => 'Project description'\n ]);\n Task::create([\n 'id' => 200,\n 'name' => 'Task ndfame', \n 'priority' => 'high', \n 'schedule_date' => '2020-12-12 12:22:00',\n 'project_id' => 200\n ]);\n $response = $this->delete('/task/200');\n $response->assertStatus(302);\n }", "public function testDeleteRole()\n {\n }", "public function testDeleteAuthorizationRole()\n {\n }", "function delete()\n {\n $this->_api->doRequest(\"DELETE\", \"{$this->getBaseApiPath()}\");\n }", "function delete()\n {\n $this->_api->doRequest(\"DELETE\", \"{$this->getBaseApiPath()}\");\n }", "public function testWebinarAbsentees()\n {\n }", "public function testExample()\n {\n $car = \\App\\Car::find(32);\n $delete= $car->delete();\n $this->assertTrue($delete);\n\n }", "public function action_delete() {\n $elect_id = $this->request->query('elect_id');\n $res = Model::factory('Elect')->delete($elect_id);\n if(!$res) exit('error action_delete');\n $this->redirect('/'); \n }", "public function testProfileDeleteById()\n {\n\n }", "public function testDeleteOutroCardForTenantAdmin(): void\n {\n $token = $this->loginByEmail(self::TENANT_ADMIN_1[0], self::TENANT_ADMIN_1[1]);\n\n // Request\n $response = $this->delete('api/v1/outroCards/tenants/2?token=' . $token);\n\n // Check response status\n $response->assertStatus(200);\n\n // Check response structure\n $response->assertJsonStructure(\n [\n 'success',\n 'code',\n 'data',\n 'message'\n ]\n );\n $responseJSON = json_decode($response->getContent(), true);\n $success = $responseJSON['success']; // array\n $code = $responseJSON['code']; // array\n $message = $responseJSON['message']; // array\n $data = $responseJSON['data']; // array\n\n $this->assertEquals(true, $success);\n $this->assertEquals(200, $code);\n $this->assertEquals(null, $data);\n $this->assertEquals(\"Deleted The Outro Card.\", $message);\n\n $removedOutroCard = OutroCard::where('tenant_id', 2)->first();\n $this->assertEquals(null, $removedOutroCard->outro_card);\n }", "function teamdelete(){\n $this->auth(COMP_ADM_LEVEL);\n $team_id = $this->uri->segment(3);\n $contest_id = urldecode($this->uri->segment(4));\n $this->m_key->removeTeam($team_id);\n $this->m_team->delete($team_id, $contest_id);\n $this->teams($contest_id);\n }", "public function delete(): void\n {\n $this->record(new AgendaWasDeleted($this->identity));\n }", "protected function _deleteEvent($eventId)\n {\n }", "public function testUnitDelete()\n {\n $model = Mockery::mock('Suitcoda\\Model\\User');\n $user = new UserController($model);\n \n $model->shouldReceive('findOrFailByUrlKey')->andReturn($model);\n $model->shouldReceive('delete')->once()->andReturn(true);\n\n $this->assertInstanceOf('Illuminate\\Http\\RedirectResponse', $user->destroy(1));\n }", "public function testWebinarUpdate()\n {\n }", "public function testDelete()\n {\n $this->clientAuthenticated->request('DELETE', '/product/delete/' . self::$objectId);\n $response = $this->clientAuthenticated->getResponse();\n $this->assertJsonResponse($response, 200);\n\n //Deletes physically the entity created by test\n $this->deleteEntity('Product', 'productId', self::$objectId);\n }", "public function testDeleteAuthorizationDivision()\n {\n }", "public function delete() {\r\n }", "public function testDeleteTask()\n {\n }", "public function deleted(TenderParticipant $tenderParticipant)\n {\n //\n }", "public function deleteById($inquiryId);" ]
[ "0.7386751", "0.7297796", "0.71680236", "0.66529924", "0.6622835", "0.6563354", "0.65136284", "0.6496925", "0.6489714", "0.64357275", "0.64357275", "0.637083", "0.63620377", "0.6346963", "0.6310489", "0.6308891", "0.6300885", "0.6295698", "0.6273204", "0.62324136", "0.6232029", "0.6224839", "0.62239164", "0.6212295", "0.6201468", "0.61771375", "0.61664516", "0.6161545", "0.6133159", "0.6113491", "0.6101979", "0.61002356", "0.6091627", "0.60826343", "0.6082588", "0.6081988", "0.60723424", "0.60702175", "0.60676163", "0.6065615", "0.6040982", "0.6040819", "0.6038009", "0.6026286", "0.60207945", "0.602068", "0.60108197", "0.60108197", "0.59982234", "0.59829956", "0.5982203", "0.5981663", "0.5979082", "0.5971246", "0.5968587", "0.5964712", "0.59579456", "0.59453934", "0.5936268", "0.5932626", "0.5912712", "0.5906585", "0.590151", "0.5892413", "0.5875832", "0.5874745", "0.5873347", "0.5870581", "0.5870581", "0.58643", "0.5862501", "0.58527917", "0.5846254", "0.5843416", "0.58431506", "0.58369446", "0.58369446", "0.5834271", "0.5829282", "0.5826711", "0.5820088", "0.5817475", "0.5816222", "0.5816222", "0.5812329", "0.5808661", "0.5796073", "0.57950026", "0.57919306", "0.5786371", "0.57792616", "0.5774805", "0.5772235", "0.57703316", "0.57696307", "0.5768587", "0.5767226", "0.5757727", "0.575327", "0.5752041" ]
0.8196134
0
Test case for webinarPanelistCreate Add Panelists.
Тест-кейс для webinarPanelistCreate Добавление панелетов.
public function testWebinarPanelistCreate() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarPanelists()\n {\n }", "public function testWebinarPanelistsDelete()\n {\n }", "public function testWebinarPanelistDelete()\n {\n }", "public function set_panelist() {\n\t\tif (!isset($this->args[0]) || empty($this->args[0])) {\n\t\t\t$this->out('Provide MV user_id argument.');\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (!$this->get_settings()) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$url = $this->settings['hostname.mbd'].'/panelists/'.$this->args[0].'?X-ApiKey='.$this->settings['mbd.api_key'];\n\t\t$this->out('Reaching out to '.$url);\n\t\t$http = new HttpSocket(array(\n\t\t\t'timeout' => 60,\n\t\t\t'ssl_verify_host' => false // PHP does not seem to check SANs for CNs\n\t\t));\n\t\t$request = array(\n\t\t\t'dwid' => '00000000-0000-0001-0379-ef1412100980',\n\t\t\t'panelistId' => $this->args[0],\n\t\t\t'partnerId' => $this->settings['mbd.partner_id'],\n\t\t\t'donotcontact' => true\n\t\t);\n\t\ttry {\n\t\t\t$results = $http->post($url, json_encode($request), $this->options);\n\t\t} \n\t\tcatch (Exception $e) {\n\t\t\t$this->out('Panelists Api endpoint failed.');\n\t\t}\n\t\t\n\t\tprint_r($results);\n\t}", "public function testAddPage() {\r\n $callback = function() {\r\n $this->timer->destroy();\r\n $this->application->stop();\r\n };\r\n\r\n $this->timer = new Timer($callback, $this->application->getWindow(), Timer::TEST_TIMEOUT);\r\n $this->timer->start();\r\n\r\n $this->tab = new Tab(Point::createInstance(10, 10), Dimension::createInstance(200, 100));\r\n $this->application->getWindow()->getRootPane()->add($this->tab);\r\n $this->tab->addTabPage('tab1');\r\n $this->tab->addTabPage('tab2');\r\n\r\n $tabPage1 = $this->tab->getTabPage('tab1');\r\n $tabPage2 = $this->tab->getTabPage('tab2');\r\n\r\n $tabPage1->add(new EditBox('box 1.1', Point::createInstance(5, 15), Dimension::createInstance(50, 20)));\r\n $tabPage1->add(new EditBox('box 1.2', Point::createInstance(65, 15), Dimension::createInstance(50, 20)));\r\n\r\n $tabPage2->add(new EditBox('box 2.1', Point::createInstance(5, 15), Dimension::createInstance(50, 20)));\r\n $tabPage2->add(new EditBox('box 2.2', Point::createInstance(5, 45), Dimension::createInstance(50, 20)));\r\n\r\n $this->application->start();\r\n }", "function admin_add()\n\t{\n\t $this->set('pagetitle',\"Add Page\");\t\n\t $this->loadModel('User');\n\t $userlists = array();\n\t $userlists = array_merge($userlists,array('0'=>'Admin'));\n\t $allClientLists = $this->User->find('list',array('conditions'=>array('User.user_type_id'=>1),'fields'=>array('id','fname')));\n $userlists = array_merge($userlists,$allClientLists);\n\t $this->set('userlists',$userlists);\n\t \n\t if(!empty($this->data))\n\t {\n\t\tif($this->Page->save($this->data))\n\t\t{\n\t\t $this->Session->setFlash('The Page has been created','message/green');\n\t\t $this->redirect(array('action' => 'index'));\n\t\t}\n\t\telse\n\t\t{\n\t\t $this->Session->setFlash('The Page could not be saved. Please, try again.','message/yellow');\n\t\t}\n\t }\n\t}", "public function addAction() {\n\n //ONLY LOGGED IN USER CAN CREATE\n if (!$this->_helper->requireUser()->isValid())\n $this->respondWithError('unauthorized');\n\n\n //GET PAGE ID AND CHECK PAGE ID VALIDATION\n $listing_id = $this->_getParam('listing_id');\n if (empty($listing_id)) {\n $this->respondWithError('no_record');\n }\n\n //GET VIEWER INFORMATION\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n //GET USER DIARIES\n $wishlistTable = Engine_Api::_()->getDbtable('wishlists', 'sitereview');\n $wishlistDatas = $wishlistTable->userWishlists($viewer);\n $wishlistDataCount = Count($wishlistDatas);\n $sitereview = Engine_Api::_()->getItem('sitereview_listing', $this->_getParam('listing_id'));\n if (empty($sitereview)) {\n $this->respondWithError('no_record');\n }\n\n //FORM GENERATION\n if ($this->getRequest()->isGet()) {\n $response= Engine_Api::_()->getApi('Siteapi_Core', 'sitereview')->getAddToWishlistForm();\n \n $this->respondWithSuccess($response, true);\n } else if ($this->getRequest()->isPost()) {\n $values = $this->_getAllParams();\n if (!Engine_Api::_()->getApi('settings', 'core')->getSetting('sitereview.favourite', 0)) {\n //CHECK FOR NEW ADDED DIARY TITLE OR \n if (!empty($values['body']) && empty($values['title'])) {\n $this->respondWithError('parameter_missing');\n }\n //CHECK FOR TITLE IF NO DIARY\n if (empty($wishlistDatas) && empty($values['title']))\n $this->respondWithError('Title feild required');\n\n //GET DIARY PAGE TABLE\n $wishlistEventTable = Engine_Api::_()->getDbtable('wishlistmaps', 'sitereview');\n\n $wishlistOldIds = array();\n\n //GET NOTIFY API\n $notifyApi = Engine_Api::_()->getDbtable('notifications', 'activity');\n\n\n //WORK ON PREVIOUSLY CREATED DIARY\n if (!empty($wishlistDatas)) {\n foreach ($wishlistDatas as $wishlistData) {\n $key_name = 'wishlist_' . $wishlistData->wishlist_id;\n if (isset($values[$key_name]) && !empty($values[$key_name])) {\n $wishlistEventTable->insert(array(\n 'wishlist_id' => $wishlistData->wishlist_id,\n 'listing_id' => $listing_id,\n ));\n\n //DIARY COVER PHOTO\n $wishlistTable->update(\n array(\n 'listing_id' => $listing_id,\n ), array(\n 'wishlist_id = ?' => $wishlistData->wishlist_id,\n 'listing_id = ?' => 0\n )\n );\n\n $activityApi = Engine_Api::_()->getDbtable('actions', 'activity');\n $action = $activityApi->addActivity($viewer, $wishlistData, \"sitereview_wishlist_add_listing_listtype_\" . $sitereview->listingtype_id, '', array('listing' => array($sitereview->getType(), $sitereview->getIdentity())));\n\n if ($action)\n $activityApi->attachActivity($action, $sitereview);\n }\n $in_key_name = 'inWishlist_' . $wishlistData->wishlist_id;\n if (isset($values[$in_key_name]) && empty($values[$in_key_name])) {\n $wishlistOldIds[$wishlistData->wishlist_id] = $wishlistData;\n $wishlistEventTable->delete(array('wishlist_id = ?' => $wishlistData->wishlist_id, 'listing_id = ?' => $listing_id));\n\n //DELETE ACTIVITY FEED\n $actionTable = Engine_Api::_()->getDbtable('actions', 'activity');\n $actionTableName = $actionTable->info('name');\n\n $action_id = $actionTable->select()\n ->setIntegrityCheck(false)\n ->from($actionTableName, 'action_id')\n ->joinInner('engine4_activity_attachments', \"engine4_activity_attachments.action_id = $actionTableName.action_id\", array())\n ->where('engine4_activity_attachments.id = ?', $listing_id)\n ->where($actionTableName . '.type = ?', \"sitereview_wishlist_add_listing\")\n ->where($actionTableName . '.subject_type = ?', 'user')\n ->where($actionTableName . '.object_type = ?', 'sitereview_wishlist')\n ->where($actionTableName . '.object_id = ?', $wishlistData->wishlist_id)\n ->query()\n ->fetchColumn();\n\n if (!empty($action_id)) {\n $activity = Engine_Api::_()->getItem('activity_action', $action_id);\n if (!empty($activity)) {\n $activity->delete();\n }\n }\n }\n }\n }\n\n if (!empty($values['title'])) {\n\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n\n try {\n //CREATE DIARY\n $wishlist = $wishlistTable->createRow();\n $wishlist->setFromArray($values);\n $wishlist->owner_id = $viewer_id;\n $wishlist->listing_id = $listing_id; //DIARY COVER PHOTO\n $wishlist->save();\n\n //PRIVACY WORK\n $auth = Engine_Api::_()->authorization()->context;\n $roles = array('owner', 'owner_member', 'owner_member_member', 'owner_network', 'registered', 'everyone');\n\n if (empty($values['auth_view'])) {\n $values['auth_view'] = 'owner';\n }\n\n $viewMax = array_search($values['auth_view'], $roles);\n foreach ($roles as $i => $role) {\n $auth->setAllowed($wishlist, $role, 'view', ($i <= $viewMax));\n }\n\n $db->commit();\n $wishlistEventTable->insert(array(\n 'wishlist_id' => $wishlist->wishlist_id,\n 'listing_id' => $listing_id,\n 'date' => new Zend_Db_Expr('NOW()')\n ));\n\n $activityApi = Engine_Api::_()->getDbtable('actions', 'activity');\n $action = $activityApi->addActivity($viewer, $sitereview, \"sitereview_wishlist_add_listing\", null, array('child_id' => $wishlist->wishlist_id));\n\n if ($action) {\n $activityApi->attachActivity($action, $sitereview);\n }\n } catch (Exception $e) {\n $db->rollback();\n throw $e;\n }\n }\n $this->successResponseNoContent('no_content', true);\n } else {\n try {\n $wishlistTable = Engine_Api::_()->getDbtable('wishlists', 'sitereview');\n $wishlist_id = $wishlistTable->recentWishlistId($viewer_id, $listing_id);\n $action = $this->_getParam('perform', 'add');\n Engine_Api::_()->getDbtable('wishlistmaps', 'sitereview')->performWishlistMapAction($wishlist_id, $listing_id, $action);\n $this->successResponseNoContent('no_content', true);\n } catch (Exception $ex) {\n $this->respondWithError('internal_server_error', $ex->getMessage());\n }\n }\n }\n }", "function thumbwhere_contentcollectionitem_add_page() {\n $controller = entity_ui_controller('thumbwhere_contentcollectionitem');\n return $controller->addPage();\n}", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// \"edit\"\n\t\t$item = &$this->ListOptions->Add(\"edit\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"detail_avaluo\"\n\t\t$item = &$this->ListOptions->Add(\"detail_avaluo\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->Visible = $Security->AllowList(CurrentProjectID() . 'avaluo') && !$this->ShowMultipleDetails;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\tif (!isset($GLOBALS[\"avaluo_grid\"])) $GLOBALS[\"avaluo_grid\"] = new cavaluo_grid;\n\n\t\t// Multiple details\n\t\tif ($this->ShowMultipleDetails) {\n\t\t\t$item = &$this->ListOptions->Add(\"details\");\n\t\t\t$item->CssClass = \"text-nowrap\";\n\t\t\t$item->Visible = $this->ShowMultipleDetails;\n\t\t\t$item->OnLeft = TRUE;\n\t\t\t$item->ShowInButtonGroup = FALSE;\n\t\t}\n\n\t\t// Set up detail pages\n\t\t$pages = new cSubPages();\n\t\t$pages->Add(\"avaluo\");\n\t\t$this->DetailPages = $pages;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\">\";\n\t\t$item->MoveTo(0);\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = FALSE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "function thumbwhere_contentcollection_add_page() {\n $controller = entity_ui_controller('thumbwhere_contentcollection');\n return $controller->addPage();\n}", "function SetupListOptions() {\n\t\tglobal $Security, $tbl_slide;\n\n\t\t// \"view\"\n\t\t$this->ListOptions->Add(\"view\");\n\t\t$item =& $this->ListOptions->Items[\"view\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsLoggedIn();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"edit\"\n\t\t$this->ListOptions->Add(\"edit\");\n\t\t$item =& $this->ListOptions->Items[\"edit\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsLoggedIn();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"copy\"\n\t\t$this->ListOptions->Add(\"copy\");\n\t\t$item =& $this->ListOptions->Items[\"copy\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsLoggedIn();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"delete\"\n\t\t$this->ListOptions->Add(\"delete\");\n\t\t$item =& $this->ListOptions->Items[\"delete\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsLoggedIn();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\tif ($tbl_slide->Export <> \"\" ||\n\t\t\t$tbl_slide->CurrentAction == \"gridadd\" ||\n\t\t\t$tbl_slide->CurrentAction == \"gridedit\")\n\t\t\t$this->ListOptions->HideAllOptions();\n\t}", "public function add() {\n $this->_setModalLayout();\n //List Label\n $list_lb = $this->Label->find('all', array(\n 'conditions' => array('type' => 'TeamModel')\n ));\n $list_lb = $this->Label->removeArrayWrapper('Label', $list_lb, 'id');\n $list_lb = $this->Label->makeNestedLabels($this->Label->getLabelHierarchy($list_lb));\n\n // List Plan\n $listPlan = $this->Plan->find('list', array(\n 'fields' => array('id', 'type')\n ));\n\n $this->set(array(\n 'list_lb' => $list_lb,\n 'listPlan' => $listPlan\n ));\n\n if ($this->request->is('post') || $this->request->is('put')) {\n\n // Add project\n if (isset($this->request->data['Team'])) {\n $rq_data = $this->request->data['Team'];\n // Upload image\n if (is_uploaded_file($rq_data['splash']['tmp_name'])) {\n if (($rq_data['splash']['type'] == 'image/jpg') || ($rq_data['splash']['type'] == 'image/jpeg') || ($rq_data['splash']['type'] == 'image/png') || ($rq_data['splash']['type'] == 'image/gif')) {\n $imginfo = pathinfo($rq_data['splash']['name']);\n $filename = $imginfo['filename'] . '_' . md5(time()) . '.' . $imginfo['extension'];\n move_uploaded_file(\n $rq_data['splash']['tmp_name'], WWW_ROOT . 'upload' . DS . 'splash' . DS . $filename\n );\n // store the filename in the array to be saved to the db\n $rq_data['splash'] = $filename;\n } else {\n $this->Session->setFlash(__('有効なイメージを提供してください。'), 'alert-box', array('class' => 'alert-danger'));\n $this->redirect(array('action' => 'index'));\n }\n } else {\n $rq_data['splash'] = '';\n }\n $rq_data['management_id'] = $this->Auth->user('id');\n $dup = $this->Team->find('all', array('conditions' => array(\n 'name' => $rq_data['name']\n )));\n if (empty($dup)) {\n $rq_data['cdate'] = date('Y-m-d H:i:s');\n if ($this->Team->save($rq_data,false)) {\n $new_team_id = $this->Team->getLastInsertId();\n // Add Label \n if (isset($this->request->data['Label'])) {\n $rq_label = $this->request->data['Label'];\n $rq_label['type'] = 'TeamModel';\n $rq_label['label'] = $rq_label['add_new_text'];\n $rq_label['team_id'] = Configure::read('teamId');\n $rq_label['cdate'] = date('Y-m-d H:i:s');\n if (isset($rq_label['add_new_text'])) {\n $existing = $this->Label->find('all', array('conditions' => array(\n 'label' => $rq_label['add_new_text'],\n 'team_id' => $rq_label['team_id'],\n 'type' => $rq_label['type'],\n )));\n } else {\n $existing = '';\n }\n if ($rq_label['new_label'] != null) {\n if (isset($rq_label['add_new_text']) && $rq_label['add_new_text'] != null) {\n $rq_label['parent_id'] = $rq_label['new_label'];\n if (empty($existing)) {\n if ($this->Label->save($rq_label)) {\n // Get new ID record\n $new_id = $this->Label->getLastInsertId();\n } else {\n $this->Session->setFlash(__('Can not create new label'), 'alert-box', array('class' => 'alert-danger'));\n $this->redirect(array('action' => 'index'));\n }\n } else {\n $this->Session->setFlash(__('このラベルは既に存在します。'), 'alert-box', array('class' => 'alert-danger'));\n return $this->redirect($this->referer());\n }\n } else {\n $lb_id = $rq_label['new_label'];\n }\n } else {\n if (isset($rq_label['add_new_text']) && $rq_label['add_new_text'] != null) {\n $rq_label['parent_id'] = 0;\n if (empty($existing)) {\n if ($this->Label->save($rq_label)) {\n // Get new ID record\n $new_id = $this->Label->getLastInsertId();\n } else {\n $this->Session->setFlash(__('Can not create new label'), 'alert-box', array('class' => 'alert-danger'));\n $this->redirect(array('action' => 'index'));\n }\n } else {\n $this->Session->setFlash(__('このラベルは既に存在します。'), 'alert-box', array('class' => 'alert-danger'));\n return $this->redirect($this->referer());\n }\n }\n }\n }\n /* Save record to label_datas table */\n $this->request->data['LabelDatas']['target_id'] = $new_team_id;\n $this->request->data['LabelDatas']['cdate'] = date('Y-m-d H:i:s');\n if ($rq_label['new_label'] != null) {\n if ($rq_label['add_new_text'] != null) {\n $this->request->data['LabelDatas']['label_id'] = $new_id;\n } else {\n $this->request->data['LabelDatas']['label_id'] = $lb_id;\n }\n $this->Label->LabelData->save($this->request->data['LabelDatas']);\n } else {\n if ($rq_label['add_new_text'] != null) {\n $this->request->data['LabelDatas']['label_id'] = $new_id;\n $this->Label->LabelData->save($this->request->data['LabelDatas']);\n }\n }\n /* End save */\n $this->Session->setFlash(__('プロジェクトのアップデートに成功しました。'), 'alert-box', array('class' => 'alert-success'));\n return $this->redirect(array('action' => 'index'));\n } else {\n $this->Session->setFlash(__('新規プロジェクトを登録することはできません。'), 'alert-box', array('class' => 'alert-danger'));\n return $this->redirect(array('action' => 'index'));\n }\n } else {\n $this->Session->setFlash(__('このプロジェクトは既に存在します。'), 'alert-box', array('class' => 'alert-danger'));\n return $this->redirect($this->referer());\n }\n }\n }\n $this->render('edit');\n }", "public function create()\n {\n $this->title .= ' create';\n $this->vars = array_add($this->vars, 'menuArray', $this->rep->makeArray());\n }", "public function create()\n {\n return view('AdminPanel.Collection.AddCollection');\n }", "public function testAddColPosListLayoutItems()\n {\n }", "protected function createTabs() {}", "function SetupListOptions() {\r\n\t\tglobal $Security, $Language;\r\n\r\n\t\t// \"view\"\r\n\t\t$item = &$this->ListOptions->Add(\"view\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->CanView();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// \"edit\"\r\n\t\t$item = &$this->ListOptions->Add(\"edit\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->CanEdit();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// \"copy\"\r\n\t\t$item = &$this->ListOptions->Add(\"copy\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->CanAdd();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// \"delete\"\r\n\t\t$item = &$this->ListOptions->Add(\"delete\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->CanDelete();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// Call ListOptions_Load event\r\n\t\t$this->ListOptions_Load();\r\n\t}", "public function addAction() {\n\t\tlist(, $groups) = Resource_Service_Pgroup::getAllPgroup();\n\t\t$this->assign('groups', $groups);\n\t\t$this->assign('ntype', $this->ntype);\n\t\t$this->assign('btype', $this->btype);\n\t}", "public function testListPastWebinarQA()\n {\n }", "public function action_addListMenu() {\n $list_id = $this->request->post('list_id');\n $res = Model::factory('ElectUserList')->add($this->user->id, $list_id);\n if($res) echo $res[1];\n else echo 'not';\n exit();\n }", "function eclecticapp_checklist_settings_create() {\n $page_title = 'Checklist Admin';\n $menu_title = 'Checklist Admin';\n $capability = 'manage_options';\n $menu_slug = 'checklist_settings';\n $function = 'eclecticapp_checklist_settings_display';\n $icon_url = '';\n $position = 20;\n\n add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $position );\n}", "function SetupListOptions() {\n\t\tglobal $Security, $t_tinbai_mainsite;\n\n\t\t// \"view\"\n\t\t$this->ListOptions->Add(\"view\");\n\t\t$item =& $this->ListOptions->Items[\"view\"];\n\t\t$item->CssStyle = \"white-space: nowrap;width:15px\";\n\t\t$item->Visible = $Security->CanView();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"edit\"\n\t\t$this->ListOptions->Add(\"edit\");\n\t\t$item =& $this->ListOptions->Items[\"edit\"];\n\t\t$item->CssStyle = \"white-space: nowrap;width:15px\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"checkbox\"\n\t\t$this->ListOptions->Add(\"checkbox\");\n\t\t$item =& $this->ListOptions->Items[\"checkbox\"];\n\t\t$item->CssStyle = \"white-space: nowrap;width:15px\";\n\t\t$item->Visible = ($Security->CanDelete() || $Security->CanEdit());\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" class=\\\"phpmaker\\\" onclick=\\\"t_tinbai_mainsite_list.SelectAllKey(this);\\\">\";\n\t\t$this->ListOptions->MoveItem(\"checkbox\", 0); // Move to first column\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\tif ($t_tinbai_mainsite->Export <> \"\" ||\n\t\t\t$t_tinbai_mainsite->CurrentAction == \"gridadd\" ||\n\t\t\t$t_tinbai_mainsite->CurrentAction == \"gridedit\")\n\t\t\t$this->ListOptions->HideAllOptions();\n\t}", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// \"view\"\n\t\t$item = &$this->ListOptions->Add(\"view\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanView();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"edit\"\n\t\t$item = &$this->ListOptions->Add(\"edit\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"copy\"\n\t\t$item = &$this->ListOptions->Add(\"copy\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanAdd();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"delete\"\n\t\t$item = &$this->ListOptions->Add(\"delete\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanDelete();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"userpermission\"\n\t\t$item = &$this->ListOptions->Add(\"userpermission\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsAdmin();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t}", "private function testsSection() {\n global $DB, $CFG, $PAGE;\n //var_dump($PAGE->context->id); \n //echo '<pre>'.print_r($PAGE, true).'</pre>'; \n $this->_form->addElement('header', 'tests', 'Tests'); \n \n $this->_form->addElement('html', '<div id=\"ca-tests\">');\n \n // Get existing tests\n $tests = $DB->get_records('codeactivity_tests', array('activity_id' => $this->current->id)); \n //echo '<pre>'.print_r($this, true).'</pre>'; \n if (!empty($tests)) {\n foreach ($tests as $test) {\n //echo '<pre>'.print_r($test, true).'</pre>'; \n $this->_form->addElement('html', codeactivity::testHTML($test->id));\n } \n } \n \n \n $this->_form->addElement('html', '</div>'); // #ca-tests\n \n $this->_form->addElement('html', '<div id=\"ca-add-test\" style=\"display:none;\">');\n //get_string('codeactivityname', 'codeactivity'), array('size'=>'64'));\n $this->_form->addElement('text',\n 'testname',\n get_string('test_name', 'codeactivity'),\n array('size' => '64')\n );\n $this->_form->setType('testname', PARAM_RAW);\n $this->_form->addElement(\n 'select', \n 'testtype', \n get_string('test_type', 'codeactivity'), \n array(\n 'unittest' => get_string('unittest', 'codeactivity'), \n 'output' => get_string('outputmatch', 'codeactivity')\n )\n ); \n \n $this->_form->addElement('html', '<div id=\"ca-unittestcode\" style=\"display:none;\">'); \n $this->_form->addElement(\n 'textarea',\n 'unittestcode',\n get_string('unittest_code', 'codeactivity')\n ); \n $this->_form->addElement('html', '</div>'); \n \n $this->_form->addElement('html', '<div id=\"ca-outputmatching\" style=\"display:none;\">');\n $this->_form->addElement(\n 'select',\n 'runfile',\n get_string('runfile', 'codeactivity'),\n array()); \n \n $this->_form->addElement(\n 'textarea',\n 'expectedoutput',\n get_string('expected_output', 'codeactivity')); \n\n $this->_form->addElement(\n 'selectyesno',\n 'convertnulls',\n get_string('convert_nulls', 'codeactivity')); \n $this->_form->addElement(\n 'selectyesno',\n 'ignorewhitespace',\n get_string('ignore_whitespace', 'codeactivity')); \n $this->_form->addElement('html', '</div>'); \n \n $this->_form->addElement('html', '</div>'); // #ca-add-test\n \n $buttonarray=array();\n \n $buttonarray[] = $this->_form->createElement('button', 'add_test', 'Add Test');\n $buttonarray[] = $this->_form->createElement('button', 'add_save', 'Save');\n $buttonarray[] = $this->_form->createElement('button', 'add_cancel', 'Cancel');\n \n $this->_form->addGroup($buttonarray, 'add_buttons', '', array(''), false);\n \n $this->_form->addElement('hidden', 'ca_temp_code', uniqid()); \n $this->_form->setType('ca_temp_code', PARAM_RAW); \n //echo '<pre>'.print_r($PAGE->context, true).'</pre>'; \n $this->_form->addElement('hidden', 'ca_context', $PAGE->context->instanceid);\n $this->_form->setType('ca_context', PARAM_RAW); \n \n }", "protected function addElements() \n {\n // Add \"email\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'title',\n 'options' => [\n 'label' => 'Title',\n ],\n ]);\n \n // Add \"parent_id\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'parent_id', \n 'options' => [\n 'label' => 'Full Name',\n ],\n ]);\n \n if ($this->scenario == 'create') {\n \n\n }\n \n // Add \"status\" field\n $this->add([ \n 'type' => 'select',\n 'name' => 'status',\n 'options' => [\n 'label' => 'Status',\n 'value_options' => [\n 1 => 'Active',\n 2 => 'Retired', \n ]\n ],\n ]);\n \n // Add the Submit button\n $this->add([\n 'type' => 'submit',\n 'name' => 'submit',\n 'attributes' => [ \n 'value' => 'Create'\n ],\n ]);\n }", "public function panierAdd() : void\n {\n if(!$this->userSession->isAuthenticatedUser()){\n redirect(\"index.php?action=user&action2=loginForm\");\n }\n \n $this->panierModel->addPanier((int) $_GET['id']);\n require_once 'www/templates/panier/PanierView.phtml';\n }", "function SetupListOptions() {\r\n\t\tglobal $Security, $Language;\r\n\r\n\t\t// \"view\"\r\n\t\t$item = &$this->ListOptions->Add(\"view\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->IsLoggedIn();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// Call ListOptions_Load event\r\n\t\t$this->ListOptions_Load();\r\n\t}", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// \"view\"\n\t\t$item = &$this->ListOptions->Add(\"view\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanView();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"edit\"\n\t\t$item = &$this->ListOptions->Add(\"edit\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"copy\"\n\t\t$item = &$this->ListOptions->Add(\"copy\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanAdd();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"delete\"\n\t\t$item = &$this->ListOptions->Add(\"delete\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanDelete();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\">\";\n\t\t$item->MoveTo(0);\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = FALSE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = TRUE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "public function testCreateListSuccessfully(): void\n {\n $this->post('/mailchimp/lists', static::$listData);\n\n $content = \\json_decode($this->response->getContent(), true);\n\n $this->assertResponseOk();\n $this->seeJson(static::$listData);\n self::assertArrayHasKey('mail_chimp_id', $content);\n self::assertNotNull($content['mail_chimp_id']);\n\n $this->createdListIds[] = $content['mail_chimp_id']; // Store MailChimp list id for cleaning purposes\n }", "public function addAction() {\r\n\r\n $param = $this->_getParam('param');\r\n $request_url = $this->_getParam('request_url');\r\n $return_url = $this->_getParam('return_url');\r\n $front = Zend_Controller_Front::getInstance();\r\n $base_url = $front->getBaseUrl();\r\n\r\n // CHECK USER VALIDATION\r\n if (!$this->_helper->requireUser()->isValid()) {\r\n $host = (!empty($_ENV[\"HTTPS\"]) && 'on' == strtolower($_ENV[\"HTTPS\"])) ? \"https://\" : \"http://\";\r\n if ($base_url == '') {\r\n $URL_Home = $host . $_SERVER['HTTP_HOST'] . '/login';\r\n } else {\r\n $URL_Home = $host . $_SERVER['HTTP_HOST'] . '/' . $request_url . '/login';\r\n }\r\n if (empty($param)) {\r\n return $this->_helper->redirector->gotoUrl($URL_Home, array('prependBase' => false));\r\n } else {\r\n return $this->_helper->redirector->gotoUrl($URL_Home . '?return_url=' . urlencode($return_url), array('prependBase' => false));\r\n }\r\n }\r\n\r\n //SET LAYOUT\r\n $this->_helper->layout->setLayout('default-simple');\r\n\r\n //ONLY LOGGED IN USER CAN CREATE\r\n if (!$this->_helper->requireUser()->isValid())\r\n return;\r\n\r\n //CREATION PRIVACY\r\n if (!$this->_helper->requireAuth()->setAuthParams('sitestoreproduct_wishlist', null, \"create\")->isValid())\r\n return;\r\n\r\n //GET PAGE ID AND CHECK PAGE ID VALIDATION\r\n $product_id = $this->_getParam('product_id');\r\n if (empty($product_id)) {\r\n return $this->_forward('notfound', 'error', 'core');\r\n }\r\n\r\n //GET VIEWER INFORMATION\r\n $viewer = Engine_Api::_()->user()->getViewer();\r\n $this->view->viewer_id = $viewer_id = $viewer->getIdentity();\r\n\r\n //GET USER WISHLISTS\r\n $wishlistTable = Engine_Api::_()->getDbtable('wishlists', 'sitestoreproduct');\r\n $wishlistDatas = $wishlistTable->getUserWishlists($viewer_id);\r\n $this->view->wishlistDatasCount = $wishlistDataCount = Count($wishlistDatas);\r\n\r\n //LISING WILL ADD IF YOU CAN VIEW THIS\r\n $this->view->sitestoreproduct = $sitestoreproduct = Engine_Api::_()->getItem('sitestoreproduct_product', $this->_getParam('product_id'));\r\n\r\n $this->view->can_add = 1;\r\n if (!$this->_helper->requireAuth()->setAuthParams($sitestoreproduct, null, \"view\")->isValid()) {\r\n $this->view->can_add = 0;\r\n }\r\n\r\n //AUTHORIZATION CHECK\r\n if (!empty($sitestoreproduct->draft) || empty($sitestoreproduct->search) || empty($sitestoreproduct->approved)) {\r\n $this->view->can_add = 0;\r\n }\r\n\r\n //FORM GENERATION\r\n $this->view->form = $form = new Sitestoreproduct_Form_Wishlist_Add();\r\n\r\n $this->view->success = 0;\r\n\r\n //FORM VALIDATION\r\n if (!$this->getRequest()->isPost() || !$form->isValid($this->getRequest()->getPost())) {\r\n return;\r\n }\r\n\r\n //GET FORM VALUES\r\n $values = $form->getValues();\r\n\r\n //CHECK FOR NEW ADDED WISHLIST TITLE\r\n if (!empty($values['body']) && empty($values['title'])) {\r\n\r\n $error = $this->view->translate('Please enter the wishlist title otherwise remove the wishlist note.');\r\n $this->view->status = false;\r\n $error = Zend_Registry::get('Zend_Translate')->_($error);\r\n $form->getDecorator('errors')->setOption('escape', false);\r\n $form->addError($error);\r\n return;\r\n }\r\n\r\n //GET WISHLIST PAGE TABLE\r\n $wishlistProductTable = Engine_Api::_()->getDbtable('wishlistmaps', 'sitestoreproduct');\r\n\r\n $wishlistOldIds = array();\r\n\r\n //GET FOLLOW TABLE\r\n $followTable = Engine_Api::_()->getDbTable('follows', 'seaocore');\r\n\r\n //GET NOTIFY API\r\n $notifyApi = Engine_Api::_()->getDbtable('notifications', 'activity');\r\n\r\n //WORK ON PREVIOUSLY CREATED WISHLIST\r\n foreach ($wishlistDatas as $wishlistData) {\r\n $key_name = 'wishlist_' . $wishlistData->wishlist_id;\r\n if (isset($values[$key_name]) && !empty($values[$key_name])) {\r\n\r\n $wishlistProductTable->insert(array(\r\n 'wishlist_id' => $wishlistData->wishlist_id,\r\n 'product_id' => $product_id,\r\n ));\r\n\r\n //WISHLIST COVER PHOTO\r\n $wishlistTable->update(\r\n array(\r\n 'product_id' => $product_id,\r\n ), array(\r\n 'wishlist_id = ?' => $wishlistData->wishlist_id,\r\n 'product_id = ?' => 0\r\n )\r\n );\r\n\r\n //GET FOLLOWERS\r\n $followers = $followTable->getFollowers('sitestoreproduct_wishlist', $wishlistData->wishlist_id, $viewer_id);\r\n foreach ($followers as $follower) {\r\n $followerObject = Engine_Api::_()->getItem('user', $follower->poster_id);\r\n $wishlist = Engine_Api::_()->getItem('sitestoreproduct_wishlist', $wishlistData->wishlist_id);\r\n $http = _ENGINE_SSL ? 'https://' : 'http://';\r\n $wishlist_link = '<a href=\"' . $http . $_SERVER['HTTP_HOST'] . '/' . $wishlist->getHref() . '\">' . $wishlist->getTitle() . '</a>';\r\n $notifyApi->addNotification($followerObject, $viewer, $sitestoreproduct, 'sitestoreproduct_wishlist_followers', array(\"wishlist\" => $wishlist_link));\r\n }\r\n\r\n $activityApi = Engine_Api::_()->getDbtable('actions', 'activity');\r\n $action = $activityApi->addActivity($viewer, $wishlistData, \"sitestoreproduct_wishlist_add_product\", '', array('product' => array($sitestoreproduct->getType(), $sitestoreproduct->getIdentity()),\r\n ));\r\n if ($action)\r\n $activityApi->attachActivity($action, $sitestoreproduct);\r\n }\r\n\r\n $in_key_name = 'inWishlist_' . $wishlistData->wishlist_id;\r\n if (isset($values[$in_key_name]) && empty($values[$in_key_name])) {\r\n $wishlistOldIds[$wishlistData->wishlist_id] = $wishlistData;\r\n $wishlistProductTable->delete(array('wishlist_id = ?' => $wishlistData->wishlist_id, 'product_id= ?' => $product_id));\r\n\r\n //DELETE ACTIVITY FEED\r\n $actionTable = Engine_Api::_()->getDbtable('actions', 'activity');\r\n $actionTableName = $actionTable->info('name');\r\n\r\n $action_id = $actionTable->select()\r\n ->setIntegrityCheck(false)\r\n ->from($actionTableName, 'action_id')\r\n ->joinInner('engine4_activity_attachments', \"engine4_activity_attachments.action_id = $actionTableName.action_id\", array())\r\n ->where('engine4_activity_attachments.id = ?', $product_id)\r\n ->where($actionTableName . '.type = ?', \"sitestoreproduct_wishlist_add_listing\")\r\n ->where($actionTableName . '.subject_type = ?', 'user')\r\n ->where($actionTableName . '.object_type = ?', 'sitestoreproduct_wishlist')\r\n ->where($actionTableName . '.object_id = ?', $wishlistData->wishlist_id)\r\n ->query()\r\n ->fetchColumn();\r\n\r\n if (!empty($action_id)) {\r\n $activity = Engine_Api::_()->getItem('activity_action', $action_id);\r\n if (!empty($activity)) {\r\n $activity->delete();\r\n }\r\n }\r\n }\r\n }\r\n\r\n\r\n if (!empty($values['title'])) {\r\n\r\n $db = Engine_Db_Table::getDefaultAdapter();\r\n $db->beginTransaction();\r\n\r\n try {\r\n\r\n //CREATE WISHLIST\r\n $wishlist = $wishlistTable->createRow();\r\n $wishlist->setFromArray($values);\r\n $wishlist->owner_id = $viewer_id;\r\n $wishlist->product_id = $product_id; //WISHLIST COVER PHOTO\r\n $wishlist->save();\r\n\r\n //PRIVACY WORK\r\n $auth = Engine_Api::_()->authorization()->context;\r\n $roles = array('owner', 'owner_member', 'owner_member_member', 'owner_network', 'registered', 'everyone');\r\n\r\n if (empty($values['auth_view'])) {\r\n $values['auth_view'] = array('everyone');\r\n }\r\n\r\n $viewMax = array_search($values['auth_view'], $roles);\r\n foreach ($roles as $i => $role) {\r\n $auth->setAllowed($wishlist, $role, 'view', ($i <= $viewMax));\r\n }\r\n\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollback();\r\n throw $e;\r\n }\r\n\r\n $wishlistProductTable->insert(array(\r\n 'wishlist_id' => $wishlist->wishlist_id,\r\n 'product_id' => $product_id,\r\n 'date' => new Zend_Db_Expr('NOW()')\r\n ));\r\n\r\n $activityApi = Engine_Api::_()->getDbtable('actions', 'activity');\r\n $action = $activityApi->addActivity($viewer, $wishlist, \"sitestoreproduct_wishlist_add_product\", '', array('product' => array($sitestoreproduct->getType(), $sitestoreproduct->getIdentity()),\r\n ));\r\n if ($action)\r\n $activityApi->attachActivity($action, $sitestoreproduct);\r\n }\r\n\r\n $this->view->wishlistOldDatas = $wishlistOldIds;\r\n $this->view->wishlistNewDatas = $wishlistProductTable->pageWishlists($product_id, $viewer_id);\r\n $this->view->success = 1;\r\n \r\n if (!Engine_API::_()->seaocore()->checkSitemobileMode('fullsite-mode')) {\r\n //$this->view->notSuccessMessage=true;\r\n return $this->_forward('success', 'utility', 'core', array(\r\n 'smoothboxClose' => true,\r\n 'parentRefresh' => true,\r\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Add successfully.'))\r\n ));\r\n }\r\n }", "function add() {\r\n\t\t$this->checkUserRoles(array('admin','manager'));\r\n\t\t\r\n\t\tif (!empty($this->data)) {\r\n\t\t\t$this->OffshoreProjectManager->create();\r\n\t\t\tif ($this->OffshoreProjectManager->save($this->data)) {\r\n\t\t\t\t$this->Session->setFlash(__('The offshore project manager has been saved', true));\r\n\t\t\t\t$this->redirect(array('action' => 'index'));\r\n\t\t\t} else {\r\n\t\t\t\t$this->Session->setFlash(__('The offshore project manager could not be saved. Please, try again.', true));\r\n\t\t\t}\r\n\t\t}\r\n\t\t$all_projects = $this->OffshoreProjectManager->Project->find('all');\r\n\t\t$projects = array();\r\n\t\tforeach($all_projects as $project){\r\n\t\t\t$projects[$project['Project']['id']] = $project['Client']['name'].\" - \".$project['Project']['title'];\r\n\t\t}\r\n\t\t$this->set(compact('projects'));\r\n\t}", "public function listingCreate($form){\n \n ///do things only if submited by \"create button\"\n if (!$form['add_postage']->submittedBy){\n \n //things to do when form is submitted by create button\n //unset postage textbox counter on success\n unset($this->hlp->sess(\"postage\")->counter);\n \n $values = $form->getValues(True);\n $postage = $this->lHelp->returnPostageArray($values);\n $procValues = $this->lHelp->getProcValues($values); \n $listingID = $this->listings->create($procValues);\n \n if (!empty($postage['options'])){\n $this->listings->writeListingPostageOptions($listingID, $postage);\n }\n \n $this->redirect(\"Listings:in\");\n }\n }", "function thumbwhere_host_add_page() {\n $controller = entity_ui_controller('thumbwhere_host');\n return $controller->addPage();\n}", "public function testWebinarPollCreate()\n {\n }", "public function add(){\n\n\t $data = array(\n\t \t 'laptops' =>$this->Laptop_model->getLaptops() ,\n\n\t \t );\n\n\t $this->load->view('layouts/header');\n\t\t$this->load->view('layouts/aside');\n\t\t$this->load->view('admin/prestamos/add',$data); // se envia a la vista admin/laptops/add\n\t\t$this->load->view('layouts/footer');\n}", "function SetupListOptions() {\r\n\t\tglobal $Security, $Language, $rekeningju;\r\n\r\n\t\t// \"griddelete\"\r\n\t\tif ($rekeningju->AllowAddDeleteRow) {\r\n\t\t\t$item =& $this->ListOptions->Add(\"griddelete\");\r\n\t\t\t$item->CssStyle = \"white-space: nowrap;\";\r\n\t\t\t$item->OnLeft = TRUE;\r\n\t\t\t$item->Visible = FALSE; // Default hidden\r\n\t\t}\r\n\r\n\t\t// Call ListOptions_Load event\r\n\t\t$this->ListOptions_Load();\r\n\t}", "public function admin_add(){\n \n $this->set(\"title_for_layout\",\"Create a Satellite Group\");\n \n // Load all existing satellites\n $this->set('satellites', $this->Satellite->find('all'));\n }", "public function test_new_category_registration()\n {\n $this->visit('/olify_category')\n ->type('Vegetables', 'category_name')\n ->select('category_status')\n ->type('description')\n ->press('Add')\n ->seePageIs('dashboard');\n }", "public function action_addList() {\n $data = Arr::extract($_POST, array('listname', 'rating', 'description', 'typelist'));\n //Arr::_print($data);\n //$data['name'] = trim($this->request->post('listname'));\n// $rating = trim($this->request->post('rating'));\n// $description = trim($this->request->post('description'));\n// $type = $this->reques->post('type');\n if(!$this->user->id) exit('error - action_addList - not user');\n \n $list_id = Model::factory('ElectList')->add($this->user->id, $data);\n\n $res = Model::factory('ElectUserList')->add($this->user->id, $list_id);\n if(!$res) exit('error - action_addList');\n else $this->redirect('/');\n }", "public function add(){\n\n\t $this->load->view('layouts/header');\n\t\t$this->load->view('layouts/aside');\n\t\t$this->load->view('admin/usuarios/add'); // se envia a la vista admin/laptops/add\n\t\t$this->load->view('layouts/footer');\n}", "function SetupListOptions() {\r\n\t\tglobal $Security, $Language;\r\n\r\n\t\t// \"edit\"\r\n\t\t$item = &$this->ListOptions->Add(\"edit\");\r\n\t\t$item->CssStyle = \"white-space: nowrap;\";\r\n\t\t$item->Visible = $Security->CanEdit();\r\n\t\t$item->OnLeft = TRUE;\r\n\r\n\t\t// Call ListOptions_Load event\r\n\t\t$this->ListOptions_Load();\r\n\t}", "function create()\n\t{\n\t\tif ($_GET[\"obj_id\"] != \"\")\n\t\t{\n\t\t\t$this->setTabs();\n\t\t}\n\t\tparent::create();\n\t}", "public function testListSiteContainers()\n {\n }", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// \"edit\"\n\t\t$item = &$this->ListOptions->Add(\"edit\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<div class=\\\"checkbox\\\"><label><input class=\\\"magic-checkbox\\\" type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\"><span></span></label></div>\";\n\t\t$item->MoveTo(0);\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = FALSE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = TRUE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "public function add(): void\n {\n $exerciseforms = $this->exerciseformBLL->getAllExcerciseforms();\n\n $data = [\n 'exerciseforms' => $exerciseforms,\n 'name' => '',\n 'description' => '',\n 'repetitions' => '',\n 'sets' => ''\n ];\n\n $this->view('exercises/add', $data);\n }", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// \"detail_v_bid_histories_admin\"\n\t\t$item = &$this->ListOptions->Add(\"detail_v_bid_histories_admin\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->Visible = $Security->AllowList(CurrentProjectID() . 'v_bid_histories_admin') && !$this->ShowMultipleDetails;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\tif (!isset($GLOBALS[\"v_bid_histories_admin_grid\"])) $GLOBALS[\"v_bid_histories_admin_grid\"] = new cv_bid_histories_admin_grid;\n\n\t\t// Multiple details\n\t\tif ($this->ShowMultipleDetails) {\n\t\t\t$item = &$this->ListOptions->Add(\"details\");\n\t\t\t$item->CssClass = \"text-nowrap\";\n\t\t\t$item->Visible = $this->ShowMultipleDetails;\n\t\t\t$item->OnLeft = TRUE;\n\t\t\t$item->ShowInButtonGroup = FALSE;\n\t\t}\n\n\t\t// Set up detail pages\n\t\t$pages = new cSubPages();\n\t\t$pages->Add(\"v_bid_histories_admin\");\n\t\t$this->DetailPages = $pages;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\">\";\n\t\t$item->MoveTo(0);\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// \"sequence\"\n\t\t$item = &$this->ListOptions->Add(\"sequence\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->Visible = TRUE;\n\t\t$item->OnLeft = TRUE; // Always on left\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = FALSE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = TRUE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "public function add() {\n parent::add();\n \n if(!$this->request->is('restful')) {\n $this->set('title_for_layout', _txt('op.add-a', array($this->viewVars['vv_authenticator']['Authenticator']['description'])));\n }\n }", "public function add( EchoContainmentList $list ) {\n\t\t$this->lists[] = $list;\n\t}", "protected function setUp()\r\n {\r\n $this->object = new Pane;\r\n }", "public function testAdminCanAddAPage()\n {\n $params = [\n 'title' => $this->faker->name(),\n ];\n\n $response = $this\n ->actingAs($this->admin)\n ->post('/admin/blog/pages', $params);\n\n $response->assertStatus(302);\n $response->assertSessionHasNoErrors();\n\n $page = Post::where('post_type', Post::PAGE)->first();\n $this->assertNotNull($page);\n $this->assertEquals($params['title'], $page->title);\n\n $response->assertRedirect('/admin/blog/pages/'. $page->id .'/edit');\n $response->assertSessionHas('success', __('blog::pages.success_create_message'));\n }", "function show_plan_add() {\n //must check that the user has the required capability \n if (!current_user_can('manage_options')) {\n csm_error('You do not have sufficient permissions to access this page', true);\n }\n \n $CsmWorkplace = new CsmWorkplace();\n $workplaces = $CsmWorkplace->all();\n \n //Add the member\n if (isset($_POST['action']) && $_POST['action'] === 'addplan') {\n $data = $_POST;\n $Csmplan = new CsmPlan();\n try {\n $Csmplan->create($_POST);\n csm_set_update('New membership plan was added');\n hacky_redirect('csm-plans');\n } catch (\\Exception $e) {\n csm_error($e->getMessage());\n }\n }\n \n include(CSM_PLUGIN_PATH . 'app/views/plan-add.view.php');\n}", "public function testAddViewMilestone()\n {\n \t$property_flip_id = $this->createPropertyFlip('Test address line 1000');\n \t$milestone_type_description = 'Test Milestone Type 1';\n \t$milestone_type = $this->createTestMilestoneType($milestone_type_description);\n \t$this->visit('/')\n\t \t->visit('/login')\n\t \t->type('jaco.wk@gmail.com', 'email')\n\t \t->type('password', 'password')\n\t \t->press('Login')\n\t \t->see('Home')\n\t \t->visit('/search-property')\n\t \t \n\t \t->type($property_flip_id, 'property_flip_id')\n\t \t->press('Search')\n\t \t->click('View') //View Property\n\t \t \n\t \t->click('View') //View Property Flip\n\t \t->see('View Property Flip')\n\t \t->see('General')\n\t \t->see('Investors')\n\t \t\n\t \t->click('milestones-tab')\n \t\t->see('Milestones')\n \t\t->press('Add Milestone')\n \t\t->select($milestone_type->id, 'milestone_type_id')\n \t\t->type('2016-11-30', 'effective_date')\n \t\t->press('Add Milestone')\n \t\t\n \t\t->see('View Property Flip')\n \t\t->see('Milestone')\n \t\t->see($milestone_type_description)\n \t\n \t\t->click('view-milestone')\n \t\t->see('View Milestone')\n \t\t->see($milestone_type_description);\n }", "function SetupListOptions() {\n\t\tglobal $Security, $scholarship_package;\n\n\t\t// \"edit\"\n\t\t$this->ListOptions->Add(\"edit\");\n\t\t$item =& $this->ListOptions->Items[\"edit\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"detail_scholarship_payment\"\n\t\t$this->ListOptions->Add(\"detail_scholarship_payment\");\n\t\t$item =& $this->ListOptions->Items[\"detail_scholarship_payment\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->AllowList('scholarship_payment');\n\t\t$item->OnLeft = FALSE;\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\tif ($scholarship_package->Export <> \"\" ||\n\t\t\t$scholarship_package->CurrentAction == \"gridadd\" ||\n\t\t\t$scholarship_package->CurrentAction == \"gridedit\")\n\t\t\t$this->ListOptions->HideAllOptions();\n\t}", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<div class=\\\"checkbox\\\"><label><input class=\\\"magic-checkbox\\\" type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\"><span></span></label></div>\";\n\t\t$item->MoveTo(0);\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = FALSE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = TRUE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "public function add_sections()\n {\n }", "public function addPage() {\n $item = menu_get_item();\n $content = system_admin_menu_block($item);\n\n if (count($content) == 1) {\n $item = array_shift($content);\n drupal_goto($item['href']);\n }\n\n return theme('thumbwhere_host_add_list', array('content' => $content));\n }", "public function create()\n {\n // get all sections\n $allSections = SectionModel::all();\n\n return view('admin.laptops.create', compact('allSections'));\n }", "public function addPage() {\n $item = menu_get_item();\n $content = system_admin_menu_block($item);\n\n if (count($content) == 1) {\n $item = array_shift($content);\n drupal_goto($item['href']);\n }\n\n return theme('thumbwhere_contentcollectionitem_add_list', array('content' => $content));\n }", "public function testVolunteerHourCreateForProjectSuccess_ProjectItemManager()\n {\n // Set test user as current authenticated user\n $this->be($this->projectManager);\n \n $this->session([\n 'username' => $this->projectManager->username, \n 'access_level' => $this->projectManager->access_level\n ]);\n \n $testProjectID = 1;\n // Call route under test\n $response = $this->call('GET', 'volunteerhours/add/project/'.$testProjectID);\n \n $this->assertContains('Volunteer Hours for', $response->getContent());\n \n }", "function add_dashboard() {\n}", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// \"edit\"\n\t\t$item = &$this->ListOptions->Add(\"edit\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\">\";\n\t\t$item->MoveTo(0);\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = FALSE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = TRUE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "public function add (){\n $this->layout='dashboard';\n $this->addLeaves();\n }", "public function setupNewPage()\n {\n $entityManager = $this->_controller->getEntityManager();\n $types = $entityManager->getRepository('\\Jazzee\\Entity\\ElementType')->findAll();\n $elementTypes = array();\n foreach ($types as $type) {\n $elementTypes[$type->getClass()] = $type;\n };\n\n $element = new \\Jazzee\\Entity\\Element;\n $this->_applicationPage->getPage()->addElement($element);\n $element->setType($elementTypes['\\\\Jazzee\\Element\\RadioList']);\n $element->setTitle('Test Type');\n $element->required();\n $element->setWeight(1);\n $element->setFixedId(self::FID_TEST_TYPE);\n $entityManager->persist($element);\n\n $item = new \\Jazzee\\Entity\\ElementListItem;\n $element->addItem($item);\n $item->setValue('GRE/GRE Subject');\n $item->setWeight(1);\n $entityManager->persist($item);\n\n $item = new \\Jazzee\\Entity\\ElementListItem;\n $element->addItem($item);\n $item->setValue('TOEFL');\n $item->setWeight(2);\n $entityManager->persist($item);\n\n $element = new \\Jazzee\\Entity\\Element;\n $this->_applicationPage->getPage()->addElement($element);\n $element->setType($elementTypes['\\\\Jazzee\\Element\\TextInput']);\n $element->setTitle('ETS Registration Number');\n $element->setFormat('no leading zeros or hyphens');\n $element->required();\n $element->setWeight(2);\n $element->setFixedId(self::FID_REGISTRATION_NUMBER);\n $entityManager->persist($element);\n\n $element = new \\Jazzee\\Entity\\Element;\n $this->_applicationPage->getPage()->addElement($element);\n $element->setType($elementTypes['\\\\Jazzee\\Element\\ShortDate']);\n $element->setTitle('Test Date');\n $element->required();\n $element->setWeight(3);\n $element->setFixedId(self::FID_TEST_DATE);\n $entityManager->persist($element);\n }", "public function create()\n {\n return view('admin_panel.add');\n }", "function OnBeforeAdd(){\n }", "public function add()\n\t{\t\n\t\t//Carrega o Model Categorias\t\t\t\n\t\t$this->load->model('CategoriasModel', 'Categorias');\n\t\n\t\t$data['categorias'] = $this->Categorias->getCategorias();\t\n\n\t\t// Editando texto do titulo do header\n\t\t$data['pagecfg']['Title'] = \"Adicionar Pessoa\";\t\t\n\n\t\t// Alterando o Estado da View Para Adicionar Pessoa\n\t\t$data['pagecfg']['viewState'] = \"Adicionar Pessoa\";\n\t\t$data['pagecfg']['btnState'] = \"Adicionar\";\n\t\t$data['pagecfg']['inputState'] = \"enable\";\n\t\t$data['pagecfg']['actionState'] = \"/ListarPessoas/salvar\";\n\t\t\n\t\t//Carrega a View\n\t\t$this->load->view('templates/header', $data);\n\t\t$this->load->view('PessoaView', $data);\n\t\t$this->load->view('templates/footer', $data);\n\t}", "public abstract function create_list($title);", "public function create()\n {\n //for the PAGE on which to create\n }", "public function addPage()\n {\n $placements = array(\n array('id' => 'ads.leftbar.banner', 'name' => $this->translate->translate('Left Side')),\n array('id' => 'ads.rightbar.banner', 'name' => $this->translate->translate('Right Side'))\n );\n $this->putitem(\"placements\", $placements);\n\n $view_types = array(\n array('id' => 'serial', 'name' => 'Serial'),\n array('id' => 'carrousel', 'name' => 'Carroussel')\n );\n $this->putitem(\"view_types\", $view_types);\n\n parent::addPage();\n }", "public function create()\n {\n // Check authorisation and throw 404 if not\n if (!Auth::user()->allowed2('add.site.inspection'))\n return view('errors/404');\n\n return view('site/inspection/plumbing/create');\n }", "public function addPage() {\n $item = menu_get_item();\n $content = system_admin_menu_block($item);\n\n if (count($content) == 1) {\n $item = array_shift($content);\n drupal_goto($item['href']);\n }\n\n return theme('thumbwhere_contentcollection_add_list', array('content' => $content));\n }", "public function addAction()\n {\n $request = $this->getRequest();\n\n $routeMatch = $this->getEvent()->getRouteMatch();\n $id = $routeMatch->getParam('workout_id', 0);\n\n if ($id <= 0) {\n return $this->redirect()->toRoute('hi-training/workout/list');\n }\n\n $workout = $this->_workout->getRow(array('workout_id' => $id));\n//\n if (!$workout) {\n return $this->redirect()->toRoute('hi-training/workout/list');\n }\n\n /**\n * Grid FORM\n */\n $form = new WorkoutExerciseGrid(\n array(\n 'view' => $this->_view,\n )\n );\n\n /**\n * BUILDING Row\n */\n $row = new WorkoutExerciseRow(\n array(\n 'model' => $this->_exercise,\n 'view' => $this->_view,\n )\n );\n\n $row->setFieldOptions('type_id', array(\n 'values' => $this->_exerciseType->getBehaviour('nestedSet')->getResultSetForSelect(),\n 'onchange' => 'exerciseType(this);',\n ));\n $row->setFieldOptions('workout_id', array(\n 'value' => $id,\n ));\n\n //\n\n\n\n //\n $row->build();\n\n //\n $form->addSubForm($row, $row->getName());\n\n //\n $this->_view->headScript()->appendScript(\n $this->_view->render(\n 'workout-exercise/add.js',\n array(\n 'currentFormType' => 0,\n 'back' => $this->url()->fromRoute(\n 'hi-training/workout-exercise/list/wildcard',\n array('workout_id' => $id)\n ),\n 'ajaxFormType' => $this->url()->fromRoute(\n 'hi-training/exercise-type/ajax-form-type/wildcard',\n array('type_id' => '')\n ),\n 'ajaxLastOfType' => $this->url()->fromRoute(\n 'hi-training/workout-exercise/ajax-last-of-type/wildcard',\n array('type_id' => '')\n ),\n )\n )\n );\n\n\n /**\n * POST\n */\n if ($this->getRequest()->isPost()) {\n\n $formData = $this->getRequest()->post()->toArray();\n\n if ($form->isValid($formData)) {\n\n// \\Zend\\Debug::dump($formData);\n\n if ( isset($formData['header']['formId'])\n && $formData['header']['formId'] == 'WorkoutExerciseGridForm') {\n\n if (isset($formData['WorkoutExerciseRow']['actions']['save'])) {\n\n if (is_array($formData['WorkoutExerciseRow']['row'])){\n $newRow = $this->_exercise->createRow()->populate($formData['WorkoutExerciseRow']['row']);\n $newRow->save();\n\n return $this->redirect()->toRoute('hi-training/workout-exercise/list/wildcard', array('workout_id' => $id));\n }\n\n }\n\n if (isset($formData['WorkoutExerciseRow']['actions']['saveAdd'])) {\n\n if (is_array($formData['WorkoutExerciseRow']['row'])){\n $newRow = $this->_exercise->createRow()->populate($formData['WorkoutExerciseRow']['row']);\n $newRow->save();\n\n return $this->redirect()->toRoute('hi-training/workout-exercise/add/wildcard', array('workout_id' => $id));\n }\n\n }\n }\n }\n }\n\n //\n return array(\n 'form' => $form,\n 'workout' => $workout,\n );\n\n }", "public function testAddActionAdds()\n {\n // another time perhaps\n }", "protected function SetupPanel() {\n\t\t\t$this->objGroup = Group::Load($this->strUrlHashArgument);\n\t\t\tif (!$this->objGroup) return $this->ReturnTo('#groups');\n\t\t\tif (!$this->objGroup->IsLoginCanView(QApplication::$Login)) return $this->ReturnTo('#groups');\n\n\t\t\t$this->objDelegate = new EditGroupParticipationDelegate($this, '#groups');\n\t\t}", "public function patients_add(){\n\t\t$data['meta_description']='';\n\t\t$data['menu']= $this->menu;\n\n\t\t$data['user'] = $this->user;\n\t\t$data['group'] = $this->group->name;\n\t\t$data['superviser']=$this->superviser_name;;\n\n\t\t$data['page']='patients/patients-add'; //page view to load\n\t\t$data['pls'] = array(); //page level scripts\n\t\t$data['plugins'] = array(); //plugins\n\t\t$data['javascript'] = array(); //javascript\n\t\t$views= array('design/html_topbar','sidebar','design/page','design/html_footer');\n\t\t$this->layout->view($views, $data);\n\t}", "public function testWebinarCreate()\n {\n }", "public function test_it_can_add_clinic_types()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs($this->admin, 'web-admin')\n ->visit(new AddClinicType)\n ->type('name', 'Đa khoa')\n ->press('Add')\n ->assertSee('List clinic types')\n ->assertSee('A new clinic type is added');\n $this->assertDatabaseHas('clinic_types', ['name' => 'Đa khoa']);\n });\n }", "function add()\r\n\t{\r\n\t\t$data['main_content'] = 'policy_add';\r\n\t\t$opt_load = array(\r\n\t\t\t'<link rel=\"stylesheet\" type=\"text/css\" href=\"http://www.datalabsecurity.com/webscan/resources/css/dashboardui.css\" />',\r\n\t\t\t'<link rel=\"stylesheet\" type=\"text/css\" href=\"http://www.datalabsecurity.com/webscan/resources/css/css3-buttons.css\" />',\r\n\t\t\t'<link rel=\"stylesheet\" type=\"text/css\" href=\"http://www.datalabsecurity.com/webscan/resources/css/progress.css\" />',\r\n\t\t\t'<script type=\"text/javascript\" src=\"http://www.datalabsecurity.com/webscan/resources/js/jquery-1.6.4.min.js\"></script>',\r\n\t\t\t'<script src=\"http://www.datalabsecurity.com/webscan/resources/js/jquery.easytabs.min.js\" type=\"text/javascript\"></script>',\r\n\t\t\t'<script type=\"text/javascript\" src=\"http://www.datalabsecurity.com/webscan/resources/js/progress.js\"></script>',\r\n\t\t\t);\r\n\t\t$opt_head = array(\r\n\t\t\t\"title\" => \"Policies\",\r\n\t\t\t\"opt_load\" => $opt_load,\r\n\t\t\t);\r\n\t\t$data['opt_head'] = $opt_head;\r\n\t\t$this->load->view('includes/template-beta', $data);\t\r\n\t}", "public function testCollectionTicketsAdd()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function create()\n {\n return view('template_joblist/add_joblist');\n }", "public function create()\n {\n //\n return view('livewire.admin.addpartners');\n\n }", "function lb_show_add_record_page_action() {\n\tlb_show_templates(\n\t\tarray(\n\t\t\t'name' => 'add',\n\t\t)\n\t);\n}", "public function test_add_new_wall_route() {\n global $CFG;\n\n // request the page\n $client = new Client($this->_app);\n $crawler = $client->request('GET', '/' . $this->_walls[0]->id . '/add');\n $this->assertTrue($client->getResponse()->isOk());\n\n // post some data\n $form = $crawler->selectButton(get_string('savechanges'))->form();\n $client->submit($form, array(\n 'form[title]' => 'Title 001',\n ));\n\n // expect to get redirected to the wall that was added\n $url = $CFG->wwwroot . SLUG . $this->_app['url_generator']->generate('wall', array(\n 'id' => 6,\n ));\n $this->assertTrue($client->getResponse()->isRedirect($url));\n }", "public function testProfilePrototypeCreateGroups()\n {\n\n }", "public function addTab() {\n\t\tglobal $REQUEST_DATA;\n\n\t\treturn SystemDatabaseManager::getInstance()->runAutoInsert('employee_appraisal_tab', \n array('appraisalTabName','appraisalProofText'), array(trim($REQUEST_DATA['tabName']),trim($REQUEST_DATA['tabProofText'])) \n );\n\t}", "function add() {\n if(!$this->request->is('restful')) {\n // We can't just saveAll because Cake will create rows in the database for all\n // non-member non-owners, which is silly. Create a version without those\n // entries (and properly structured).\n \n // Set page title\n $this->set('title_for_layout', _txt('op.add-a', array(_txt('ct.co_group_members.1'))));\n\n // We may get here via co_groups, in which case co_group_id is static, or\n // via co_people, in which case co_person_id is static\n \n $a = array('CoGroupMember' => array());\n\n foreach($this->request->data['CoGroupMember'] as $g)\n {\n // Must be a member or an owner to get a row created\n \n if(is_array($g)\n && ((isset($g['member']) && $g['member'])\n || (isset($g['owner']) && $g['owner'])))\n {\n $a['CoGroupMember'][] = array(\n 'co_group_id' => (!empty($g['co_group_id'])\n ? $g['co_group_id']\n : $this->request->data['CoGroupMember']['co_group_id']),\n 'co_person_id' => (!empty($g['co_person_id'])\n ? $g['co_person_id']\n : $this->request->data['CoGroupMember']['co_person_id']),\n 'member' => $g['member'],\n 'owner' => $g['owner']\n );\n }\n }\n \n if(count($a['CoGroupMember']) > 0) {\n if($this->CoGroupMember->saveAll($a['CoGroupMember']))\n $this->Flash->set(_txt('rs.added'), array('key' => 'success'));\n else\n $this->Flash->set($this->fieldsErrorToString($this->CoGroupMember->invalidFields()), array('key' => 'error'));\n } else {\n $this->Flash->set(_txt('er.grm.none'), array('key' => 'information'));\n }\n \n $this->performRedirect();\n }\n else\n parent::add();\n }", "function action_add() {\n\t\t\t$data = UTIL::get_post('data');\n\t\t\t$id = (int)$data['add_id'];\n\t\t\t$table = $data['add_table'];\n\t\t\t\n\t\t\t$choosen = $this->SESS->get('objbrowser', 'choosen');\n\t\t\t$choosen[$table][$id] = $id;\n\t\t\t$this->SESS->set('objbrowser', 'choosen', $choosen);\n\t\t}", "public function canCreateNewPages() {}", "public function create()\n {\n // Not needed cause this is coming from the item listing\n }", "function envision_wsclient_pane_checkout_form($form, &$form_state, $checkout_pane, $order) {\n dpm($order);\n\n $result_list = $order->data['result_list'];\n $error_list = $order->data['error_list'];\n \n foreach ($result_list as $ok_item){\n save_result_as_node($ok_item);\n }\n \n $pane_form = array(\n '#prefix' => '<div id=\"content-from-webservice\">',\n '#suffix' => '</div>',\n );\n\n //get successful items list\n $table_data='';\n $err_table_data='';\n foreach($result_list as $result){\n $table_data.='<tr>'\n .'<td>'.$result['data']['vappName'].'</td>'\n .'<tr>';\n }\n \n //show successful items list to $pane_form['OK']\n $pane_form['OK'] = array(\n '#type' => 'item',\n '#title' => t('Create Successfully List'),\n '#markup' => '\n <table class=\"views-table\">\n <thead>\n <tr>\n <th>Vapp Name</th>\n </tr>\n </thead>\n <tbody>'.$table_data.'</tbody>\n </table>\n ',\n );\n \n //get error items list \n foreach($error_list as $error){\n $err_table_data.='<tr>'\n .'<td>'.$error['code'].'</td>'\n .'<td>'.$error['message'].'</td>'\n .'<tr>';\n }\n //show error items list to $pane_form['FAULT']\n $pane_form['FAULT'] = array(\n '#type' => 'item',\n '#title' => ''.($err_table_data==''?$err_table_data:'Create Fault list').'',\n '#markup' => \n '<table class=\"views-table\">\n <thead>\n <tr>\n <th>'.($err_table_data==''?$err_table_data:'Error Code').'</th>\n <th>'.($err_table_data==''?$err_table_data:'Message').'</th>\n </tr>\n </thead>\n <tbody>'.$err_table_data.'</tbody>\n </table>\n ',\n );\n \n\n return $pane_form;\n \n}", "public function testAddItem()\n {\n $this->addItem();\n $this->addItem();\n\n $this->assertEquals(1, $this->laracart->count(false));\n $this->assertEquals(2, $this->laracart->count());\n }", "public function testAddMilestone()\n {\n \t$property_flip_id = $this->createPropertyFlip('Test address line 1000');\n \t$milestone_type_description = 'Test Milestone Type 1';\n \t$milestone_type = $this->createTestMilestoneType($milestone_type_description);\n \t$this->visit('/')\n\t \t->visit('/login')\n\t \t->type('jaco.wk@gmail.com', 'email')\n\t \t->type('password', 'password')\n\t \t->press('Login')\n\t \t->see('Home')\n\t \t->visit('/search-property')\n\t \t \n\t \t->type($property_flip_id, 'property_flip_id')\n\t \t->press('Search')\n\t \t->click('View') //View Property\n\t \t \n\t \t->click('View') //View Property Flip\n\t \t->see('View Property Flip')\n\t \t->see('General')\n\t \t->see('Investors')\n\t \t\n\t \t->click('milestones-tab')\n \t\t->see('Milestones')\n \t\t->press('Add Milestone')\n \t\t->select($milestone_type->id, 'milestone_type_id')\n \t\t->type('2016-11-30', 'effective_date')\n \t\t->press('Add Milestone')\n \t\t\n \t\t->see('View Property Flip')\n \t\t->see('Milestone')\n \t\t->see($milestone_type_description);\n }", "private function addTunnel(){\n\t\t$this->validateTunnelForm();\n\t\t\n\t\t$newtunnel = $this->data->tunnels->addChild('tunnel');\n\t\t$newtunnel->addAttribute('id',time());\n\t\t$newtunnel->addAttribute('enable','true');\n\t\t$newtunnel->addChild('description',htmlentities($_POST['services_ipsec_tunnel_descr']));\n\t\t$local = $newtunnel->addChild('local');\n\t\t$local->addChild('public_ip',$_POST['services_ipsec_tunnel_local_gateway']);\n\t\t$local->addChild('type',$_POST['services_ipsec_tunnel_local_subnet_type']);\n\t\tif($_POST['services_ipsec_tunnel_local_subnet_type'] == 'ipaddr' \n\t\t\t|| $_POST['services_ipsec_tunnel_local_subnet_type'] == 'network'){\n\t\t\t$local->addChild('private_ip',$_POST['services_ipsec_tunnel_local_subnet_ipaddr']);\n\t\t}\n\t\t\n\t\tif($_POST['services_ipsec_tunnel_local_subnet_type'] == 'network'){\n\t\t\t$local->addChild('private_subnet',$_POST['services_ipsec_tunnel_local_subnet_subnet']);\n\t\t}\n\t\t\n\t\t$remote = $newtunnel->addChild('remote');\n\t\t$remote->addChild('public_ip',$_POST['services_ipsec_tunnel_remote_gateway']);\n\t\t$remote->addChild('type',$_POST['services_ipsec_tunnel_remote_subnet_type']);\n\t\tif($_POST['services_ipsec_tunnel_remote_subnet_type'] == 'ipaddr' \n\t\t\t|| $_POST['services_ipsec_tunnel_remote_subnet_type'] == 'network'){\n\t\t\t$remote->addChild('private_ip',$_POST['services_ipsec_tunnel_remote_subnet_ipaddr']);\n\t\t}\n\t\t\n\t\tif($_POST['services_ipsec_tunnel_remote_subnet_type'] == 'network'){\n\t\t\t$remote->addChild('private_subnet',$_POST['services_ipsec_tunnel_remote_subnet_subnet']);\n\t\t}\n\t\t\n\t\t$keepalive = $remote->addChild('keepalive');\n\t\t$keepalive->addAttribute('enable','false');\n\t\tif($_POST['services_ipsec_tunnel_send_keepalive'] == 'true'){\n\t\t\t$keepalive = $_POST['services_ipsec_tunnel_keepalive_ipaddr'];\n\t\t\t$keepalive['enable'] = 'true';\t\n\t\t}\n\t\t\n\t\t$phase1 = $newtunnel->addChild('phase1');\n\t\t$phase1->addChild('mode',$_POST['services_ipsec_tunnel_phase1_negotiation_mode']);\n\t\t$identifier = $phase1->addChild('identifier');\n\t\t$identifier->addAttribute('type',$_POST['services_ipsec_tunnel_p1_id_type']);\n\t\t$identifier = $_POST['services_ipsec_tunnel_p1_id'];\n\t\t\n\t\t//\tCreate array with all supported encryption algorithms\n\t\t$algs = array('des','3des','blowfish','cast128','aes','aes256');\n\t\tforeach($algs as $alg){\n\t\t\tif($_POST['services_ipsec_tunnel_p1_encryption_alg_'.$alg] == 'true'){\n\t\t\t\t$encryption_array[] = $alg;\n\t\t\t}\t\n\t\t}\n\t\t\n\t\t// \tCreate array with all supported hash algorithms\n\t\t$hash_algs = array('md5','sha1');\n\t\tforeach($hash_algs as $alg){\n\t\t\tif($_POST['services_ipsec_tunnel_p1_hashing_alg_'.$alg] == 'true'){\n\t\t\t\t$hash_array[] = $alg;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//\timplode the two arrays into a single string and dump into the XML\n\t\t$phase1->addChild('encryption-algorithm',implode('|',$encryption_array));\n\t\t$phase1->addChild('hash-algorithm',implode('|',$hash_array));\n\t\t\n\t\t$phase1->addChild('dhgroup',$_POST['services_ipsec_tunnel_p1_dh_keygroup']);\n\t\t$phase1->addChild('lifetime',$_POST['services_ipsec_tunnel_p1_lifetime']);\n\t\t\n\t\t$auth_method = $phase1->addChild('authentication-method');\n\t\t$auth_method->addAttribute('type',$_POST['services_ipsec_tunnel_p1_auth_method']);\n\t\tif($_POST['services_ipsec_tunnel_p1_auth_method'] == 'psk'){\n\t\t\t$auth_method = $_POST['services_ipsec_tunnel_p1_preshared_key'];\n\t\t}\n\t\telseif($_POST['services_ipsec_tunnel_p1_auth_method'] == 'rsasig'){\n\t\t\t$auth_method = $_POST['services_ipsec_tunnel_p1_rsa_sig'];\n\t\t}\n\t\t\n\t\t$phase2 = $newtunnel->addChild('phase2');\n\t\t$phase2->addChild('protocol',$_POST['services_ipsec_tunnel_p2_protocol']);\n\t\t\n\t\t//\tCreate array with all supported encryption algorithms\n\t\t$algs = array('des','3des','blowfish','cast128','aes','aes256');\n\t\tforeach($algs as $alg){\n\t\t\tif($_POST['services_ipsec_tunnel_p2_encryption_alg_'.$alg] == 'true'){\n\t\t\t\t$encryption_array[] = $alg;\n\t\t\t}\t\n\t\t}\n\t\t\n\t\t// \tCreate array with all supported authentication algorithms\n\t\t$auth_algs = array('des','3des','md5','sha1');\n\t\tforeach($auth_algs as $alg){\n\t\t\tif($_POST['services_ipsec_tunnel_p2_hashing_alg_'.$alg] == 'true'){\n\t\t\t\t$auth_array[] = $alg;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//\timplode the two arrays into a single string and dump into the XML\n\t\t$phase2->addChild('encryption-algorithm',implode('|',$encryption_array));\n\t\t$phase2->addChild('authentication-algorithm',implode('|',$auth_array));\n\t\t$phase2->addChild('lifetime',$_POST['services_ipsec_tunnel_p2_lifetime']);\n\t\t$phase2->addChild('pfsgroup',$_POST['services_ipsec_tunnel_p2_pfs_keygroup']);\n\t\t\n\t\t\n\t\t$this->config->saveConfig();\n\t\techo '<reply action=\"ok\"><ipsec><tunnels>';\n\t\techo $newtunnel->asXML();\n\t\techo '</tunnels></ipsec></reply>';\n\t}", "public function create()\n {\n return view('piatti_picklists.create');\n }", "function create($p_filelist)\n {\n }", "public function add(){\n\t\t\tif(isset($_POST['submit'])){\n\t\t\t\t//MAP DATA\n\t\t\t\t$admin = $this->_map_posted_data();\n\t\t\t\t$this->adminrepository->insert($admin);\n\t\t\t\theader(\"Location: \".BASE_URL.\"admin/admin\");\n\n\t\t\t}else{\n\t\t\t\t$view_page =\"adminsview/add\";\n\t\t\t\tinclude_once(ROOT_PATH.\"admin/views/admin/container.php\");\n\t\t\t\t}\n\t\t}", "function gotravel_mikado_add_admin_panel($attributes) {\n\t\t$title = '';\n\t\t$name = '';\n\t\t$hidden_property = '';\n\t\t$hidden_value = '';\n\t\t$hidden_values = array();\n\t\t$page = '';\n\n\t\textract($attributes);\n\n\t\tif(isset($page) && !empty($title) && !empty($name) && gotravel_mikado_framework()->mkdOptions->adminPageExists($page)) {\n\t\t\t$admin_page = gotravel_mikado_framework()->mkdOptions->getAdminPage($page);\n\n\t\t\tif(is_object($admin_page)) {\n\t\t\t\t$panel = new GoTravelMikadoPanel($title, $name, $hidden_property, $hidden_value, $hidden_values);\n\t\t\t\t$admin_page->addChild($name, $panel);\n\n\t\t\t\treturn $panel;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public function create()\n {\n return view('admin.add-page');\n }", "private function createTabsProspects()\n {\n $tab = new Tab();\n $tab->active = 1;\n $names = array(1 => 'Prospects', 'Prospects');\n foreach (Language::getLanguages() as $language) {\n $tab->name[$language['id_lang']] = isset($names[$language['id_lang']])\n ? $names[$language['id_lang']] : $names[1];\n }\n $tab->class_name = 'AdminProspects';\n $tab->module = $this->name;\n $tab->id_parent = Tab::getIdFromClassName('AdminCustomers');\n\n return (bool)$tab->add();\n }", "function addParticipantList(& $participantList, & $parentElement) {\n\t\t$element =& $this->_document->createElement('participantList');\n\t\t$parentElement->appendChild($element);\n\t\t\n\t\t$this->addCommonProporties($participantList, $element);\n\t\t\n\t\tif ($participantList->getField('location') == 'right')\n\t\t\t$element->setAttribute('location', 'right');\n\t\telse\n\t\t\t$element->setAttribute('location', 'left');\n\t}" ]
[ "0.7211089", "0.65043837", "0.6392804", "0.5913536", "0.5587062", "0.5463761", "0.5356804", "0.5312291", "0.5305108", "0.5288998", "0.5263735", "0.5252212", "0.52127165", "0.5202787", "0.52021176", "0.52019876", "0.5184639", "0.51807183", "0.5171748", "0.5163554", "0.51232785", "0.51141214", "0.5099525", "0.5099047", "0.50935376", "0.50778276", "0.5074943", "0.50656843", "0.50598454", "0.5044847", "0.504235", "0.50383794", "0.503504", "0.50260025", "0.50257444", "0.5013624", "0.50068176", "0.50023437", "0.50021386", "0.5000871", "0.49983552", "0.4994707", "0.4994086", "0.49886712", "0.4985518", "0.4982553", "0.49735656", "0.49731523", "0.49663246", "0.49624032", "0.49590525", "0.49572355", "0.49564463", "0.49443567", "0.49410364", "0.49373114", "0.4928094", "0.49272487", "0.49202573", "0.4915535", "0.4909869", "0.49086732", "0.49079004", "0.49045095", "0.4901137", "0.48988202", "0.4893475", "0.48916218", "0.48894536", "0.48834386", "0.4882358", "0.48791993", "0.48782778", "0.48766506", "0.4876456", "0.487242", "0.48686907", "0.48575458", "0.48563385", "0.48301813", "0.48218456", "0.4819004", "0.4816065", "0.4814171", "0.48066667", "0.48057985", "0.48014697", "0.4800363", "0.47884902", "0.4787226", "0.47870904", "0.47814456", "0.4776306", "0.47699055", "0.47693944", "0.47678775", "0.47628", "0.47576568", "0.47538784", "0.47534597" ]
0.81021476
0
Test case for webinarPanelistDelete Remove a Panelist.
Тест-кейс для webinarPanelistDelete Удаление панельного участника.
public function testWebinarPanelistDelete() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarPanelistsDelete()\n {\n }", "public function testWebinarPanelistCreate()\n {\n }", "public function testRemoveListSuccessfully(): void\n {\n $this->createMailchimpList($list);\n\n $this->delete(\\sprintf('/mailchimp/lists/%s', $list['list_id']));\n\n $this->assertResponseOk();\n self::assertEmpty(\\json_decode($this->response->content(), true));\n }", "function action_remove() {\n\t\t\t$data = UTIL::get_post('data');\n\t\t\t$id = (int)$data['rem_id'];\n\t\t\t$table = $data['rem_table'];\n\t\t\t\n\t\t\t$choosen = $this->SESS->get('objbrowser', 'choosen');\n\t\t\tunset($choosen[$table][$id]);\n\t\t\tif (count($choosen[$table]) == 0) unset($choosen[$table]);\n\t\t\t\n\t\t\t$this->SESS->set('objbrowser', 'choosen', $choosen);\n\t\t}", "protected function removeFromList($data)\n {\n $repo = \\XLite\\Core\\Database::getRepo('\\XLite\\Model\\ViewList');\n $repo->deleteInBatch($repo->findBy($data), false);\n }", "public function RemoveArtworkList(): void{\n\n if(!Session::isLogin())\n exit;\n\n if(!ArtworkVerifier::removeList($_POST))\n exit;\n\n if(isset(UserList::where('user_list.user_id', Session::getUser()['id'])->where('user_list.artwork_id', $_POST['artwork_id'])->getOne()->id))\n UserList::where('user_id', Session::getUser()['id'])\n ->where('artwork_id', $_POST['artwork_id'])\n ->delete();\n }", "public function deleteAction() {\n\n //CHECK USER VALIDATION\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n //GET VIEWER INFO\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n\n $listingtype_id = $this->_listingType->listingtype_id;\n $this->view->listingType = $this->_listingType;\n\n //GET TAB ID\n $this->view->tab_selected_id = $tab_selected_id = $this->_getParam('content_id');\n $this->view->format_form = $this->_getParam('format', null);\n\n //GET VIDEO OBJECT\n $this->view->sitereview_video = $sitereview_video = Engine_Api::_()->getItem('sitereview_video', $this->getRequest()->getParam('video_id'));\n\n //GET VIDEO TITLE\n $this->view->title = $sitereview_video->title;\n\n //GET LISTING ID\n $listing_id = $sitereview_video->listing_id;\n\n //GET NAVIGATION \n $this->view->navigation = Engine_Api::_()->getApi('menus', 'core')->getNavigation('sitereview_main');\n\n //GET SITEREVIEW SUBJECT\n $this->view->sitereview = $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n $can_edit = $sitereview->authorization()->isAllowed($viewer, 'edit_listtype_' . $sitereview->listingtype_id);\n\n if (!$sitereview_video) {\n $this->view->status = false;\n $this->view->error = Zend_Registry::get('Zend_Translate')->_(\"Video doesn't exists or not authorized to delete\");\n return;\n }\n\n //VIDEO OWNER AND LISTING OWNER CAN DELETE VIDEO\n if ($viewer_id != $sitereview_video->owner_id && $can_edit != 1) {\n return $this->_forwardCustom('requireauth', 'error', 'core');\n }\n\n if (!$this->getRequest()->isPost()) {\n $this->view->status = false;\n $this->view->error = Zend_Registry::get('Zend_Translate')->_('Invalid request method');\n return;\n }\n\n $db = $sitereview_video->getTable()->getAdapter();\n $db->beginTransaction();\n\n try {\n\n Engine_Api::_()->getDbtable('videoratings', 'sitereview')->delete(array('videorating_id =?' => $this->getRequest()->getParam('video_id')));\n\n $sitereview_video->delete();\n\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n\n\n\n\n $this->view->status = true;\n if ($this->view->format_form == 'smoothbox') {\n $this->_forwardCustom('success', 'utility', 'core', array(\n 'smoothboxClose' => true,\n 'parentRefresh' => '500',\n 'parentRefreshTime' => '500',\n 'format' => 'smoothbox',\n 'messages' => Zend_Registry::get('Zend_Translate')->_('You have successfully deleted this video.')\n ));\n } else {\n if (Engine_API::_()->seaocore()->checkSitemobileMode('fullsite-mode')) {\n if ($can_edit) {\n return $this->_gotoRouteCustom(array('action' => 'edit', 'listing_id' => $sitereview->listing_id), \"sitereview_videospecific_listtype_$listingtype_id\", true);\n } else {\n return $this->_gotoRouteCustom(array('listing_id' => $sitereview->listing_id, 'slug' => $sitereview->getSlug(), 'tab' => $tab_selected_id), \"sitereview_entry_view_listtype_$listingtype_id\", true);\n }\n } else {\n return $this->_gotoRouteCustom(array('listing_id' => $sitereview->listing_id, 'slug' => $sitereview->getSlug(), 'tab' => $tab_selected_id), \"sitereview_entry_view_listtype_$listingtype_id\", true);\n }\n }\n }", "public function removeAction() {\n $result = array('status' => 'failed');\n if ($this->getRequest()->isPost() && $this->getRequest()->getPost('remove') == 'true') {\n $dirName = Mage::getBaseDir('code').'/local/Balticode/Postoffice';\n if (is_dir($dirName) && file_exists($dirName.'/etc/config.xml')) {\n $directory = new Varien_Io_File();\n $deleteResult = $directory->rmdir($dirName, true);\n if ($deleteResult) {\n $result['status'] = 'success';\n }\n }\n \n }\n $this->getResponse()->setRawHeader('Content-type: application/json');\n $this->getResponse()->setBody(json_encode($result));\n return;\n }", "public function testWebinarPanelists()\n {\n }", "public function removeAction()\n {\n $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tx_frpformanswers_domain_model_formentry');\n\n $queryBuilder->delete('tx_frpformanswers_domain_model_formentry')\n ->where($queryBuilder->expr()->eq('pid', $queryBuilder->createNamedParameter($this->pid, \\PDO::PARAM_INT)))\n ->andWhere($queryBuilder->expr()->eq('deleted', $queryBuilder->createNamedParameter(1, \\PDO::PARAM_INT)))\n ->execute();\n\n $this->addFlashMessage(\n LocalizationUtility::translate('LLL:EXT:frp_form_answers/Resources/Private/Language/de.locallang_be.xlf:flashmessage.removeEntries.body', null, [$this->pid]),\n LocalizationUtility::translate('LLL:EXT:frp_form_answers/Resources/Private/Language/de.locallang_be.xlf:flashmessage.removeEntries.title'),\n \\TYPO3\\CMS\\Core\\Messaging\\FlashMessage::OK,\n true);\n\n $this->redirect('list');\n }", "public function actionDelete()\n {\n extract(Yii::$app->request->post());\n $this->findModel($list, $item)->delete();\n }", "private function actionListDelete() {\n $put_vars = $this->actionListPutConvert();\n $this->loadModel($put_vars['id'])->delete();\n }", "public function removeAction() {\r\n //DELETE SLIDE DURING THE UPLOAD\r\n $is_ajax = (int) $this->_getParam('is_ajax');\r\n if (!empty($is_ajax)) {\r\n\r\n //GET IMAGE ID AND IT'S OBJECT\r\n $image_id = (int) $this->_getParam('image_id');\r\n $image = Engine_Api::_()->getItem('advancedslideshow_image', $image_id);\r\n\r\n $db = $image->getTable()->getAdapter();\r\n $db->beginTransaction();\r\n\r\n try {\r\n $image->delete();\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollBack();\r\n throw $e;\r\n }\r\n //@unlink(APPLICATION_PATH . \"/public/advancedslideshow/1000000/1000/5/\" . $image_id . 't.' . $image->extension);\r\n }\r\n\r\n //GET SLIDESHOW ID AND IT'S OBJECT\r\n $advancedslideshow_id = (int) $this->_getParam('advancedslideshow_id');\r\n $this->view->advancedslideshow = $advancedslideshow = Engine_Api::_()->getItem('advancedslideshow', $advancedslideshow_id);\r\n\r\n if ($this->getRequest()->isPost() && $this->getRequest()->getPost('confirm') == true) {\r\n\r\n //GET IMAGE ID AND IT'S OBJECT\r\n $image_id = (int) $this->_getParam('image_id');\r\n $image = Engine_Api::_()->getItem('advancedslideshow_image', $image_id);\r\n\r\n if (empty($image)) {\r\n return;\r\n }\r\n\r\n $db = $image->getTable()->getAdapter();\r\n $db->beginTransaction();\r\n\r\n try {\r\n $image->delete();\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollBack();\r\n throw $e;\r\n }\r\n\r\n //@unlink(APPLICATION_PATH . \"/public/advancedslideshow/1000000/1000/5/\" . $image_id . 't.' . $image->extension);\r\n\r\n //GET TOTAL SLIDES COUNT\r\n $total_images = Engine_Api::_()->getDbTable('images', 'advancedslideshow')->getTotalSlides($advancedslideshow_id);\r\n\r\n $start_index = $advancedslideshow->start_index;\r\n\r\n if ($start_index > $total_images - 1) {\r\n if ($total_images != 0) {\r\n $advancedslideshow->start_index = $total_images - 1;\r\n $advancedslideshow->save();\r\n } else {\r\n $advancedslideshow->start_index = 0;\r\n $advancedslideshow->save();\r\n }\r\n }\r\n\r\n $parentRedirect = 'admin/advancedslideshow/slides/manage/advancedslideshow_id/' . $advancedslideshow_id;\r\n $this->_forward('success', 'utility', 'core', array(\r\n 'smoothboxClose' => true,\r\n 'parentRefresh' => 10,\r\n 'parentRedirect' => $parentRedirect,\r\n 'messages' => Zend_Registry::get('Zend_Translate')->_('You have successfully deleted the slide.')\r\n ));\r\n }\r\n }", "public function testRemove()\n {\n $context = $this->createPageContext();\n $storage = $this->createStorage();\n $tokenStorage = $this->createTokenStorage();\n\n $layout1 = $storage->create();\n $layout2 = $storage->create();\n $layout3 = $storage->create();\n\n $context->addLayoutList([$layout1->getId(), $layout2->getId(), $layout3->getId()]);\n $token = $context->createEditToken([$layout1->getId(), $layout3->getId()], ['user_id' => 17]);\n $tokenString = $token->getToken();\n $tokenStorage->saveToken($token);\n\n // Save our editable instances\n $tokenStorage->update($tokenString, $layout1);\n $tokenStorage->update($tokenString, $layout3);\n\n // And now remove one layout\n $tokenStorage->remove($tokenString, $layout2->getId());\n $this->assertTrue($token->contains($layout1->getId()));\n $this->assertFalse($token->contains($layout2->getId()));\n $this->assertTrue($token->contains($layout3->getId()));\n\n try {\n $tokenStorage->load($tokenString, $layout2->getId());\n $this->fail();\n } catch (InvalidTokenError $e) {\n $this->assertTrue(true);\n }\n\n // And the other two still work\n $tokenStorage->load($tokenString, $layout1->getId());\n $tokenStorage->load($tokenString, $layout3->getId());\n }", "function delete_list($listid)\n\t{\n\t\t$this->http_set_content_type('text/html');\n\t\t$this->load_url(\"lists/$listid\", 'delete', array(), 204);\n\t\tif(intval($this->http_response_code) === 204):\n\t\t\treturn true;\n\t\tendif;\n\t\treturn false;\n\t}", "public function onRemove();", "public function destroy($list_id)\n {\n $list = Listt::find($list_id);\n $list->delete();\n return redirect(route('adminpanel.index'));\n }", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "public function removePhotoAction() {\n\n //CHECK USER VALIDATION\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n //GET LISTING ID\n $listing_id = $this->_getParam('listing_id');\n\n //GET LISTING ITEM\n $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n $viewer = Engine_Api::_()->user()->getViewer();\n\n //GET LISTING TYPE ID\n $listingtype_id = $sitereview->listingtype_id;\n\n //CAN EDIT OR NOT\n if (!$this->_helper->requireAuth()->setAuthParams($sitereview, $viewer, \"edit_listtype_$listingtype_id\")->isValid()) {\n return;\n }\n\n //GET FILE ID\n $file_id = Engine_Api::_()->getDbtable('photos', 'sitereview')->getPhotoId($listing_id, $sitereview->photo_id);\n\n //DELETE PHOTO\n if (!empty($file_id)) {\n $photo = Engine_Api::_()->getItem('sitereview_photo', $file_id);\n $photo->delete();\n }\n\n //SET PHOTO ID TO ZERO\n $sitereview->photo_id = 0;\n $sitereview->save();\n\n return $this->_helper->redirector->gotoRoute(array('action' => 'change-photo', 'listing_id' => $listing_id), \"sitereview_dashboard_listtype_$listingtype_id\", true);\n }", "public function testRemove()\n {\n $success = $this->collection->remove(3);\n\n $this->assertTrue($success);\n $this->assertCount(2, $this->collection);\n $this->assertFalse($this->collection->contains(3));\n }", "public function testRemoveMenuAction()\n {\n parent::login();\n $this->clickAt(\"link=CMS\", \"\");\n $this->click(\"link=Menus\");\n $this->waitForPageToLoad(\"30000\");\n $this->dragAndDropToObject(\"css=ul#sortable1.connectedSortable.ui-sortable li#id-1\", \"css=ul#sortable2\");\n $this->clickAt(\"link=CMS\", \"\");\n $this->click(\"link=Menus\");\n $this->waitForPageToLoad(\"30000\");\n $this->assertFalse($this->isElementPresent(\"css=ul#sortable1.connectedSortable.ui-sortable li#id-1.ui-state-default.ui-sortable-handle\"));\n $this->isElementPresent(\"css=ul#sortable2.connectedSortable.ui-sortable li#id-1.ui-state-default.ui-sortable-handle\");\n $this->assertElementContainsText(\"css=ul#sortable2.connectedSortable.ui-sortable li#id-1.ui-state-default.ui-sortable-handle\", \"Test Menu Selenium 1\");\n parent::logout();\n }", "public function deleteList($data)\n {\n var_export($data);\n //return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "function remove()\n\t{\n\t\tJSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\n\n\t\t$user = JFactory::getUser();\n\t\tif (!$user->authorise('core.delete', 'com_gmapfp'))\n\t\t{\n\t\t\t$this->setMessage(JText::_('JLIB_APPLICATION_ERROR_DELETE_NOT_PERMITTED'), 'error');\n\t\t} else {\n\t\t\t$model = $this->getModel('gmapfp');\n\t\t\tif(!$model->delete()) {\n\t\t\t\t$msg = JText::_( 'Error: One or more GMapFPs could not be Deleted' );\n\t\t\t} else {\n\t\t\t\t$msg = JText::_( 'GMapFP(s) Deleted' );\n\t\t\t}\n\t\t}\n\n\t\t$this->setRedirect( 'index.php?option=com_gmapfp&controller=gmapfp&task=view', $msg );\n\t}", "public function testWebinarPollDelete()\n {\n }", "public function deleteAction() {\n\n //GET POST SUBJECT\n $post = Engine_Api::_()->core()->getSubject('sitereview_post');\n\n //GET LISTING SUBJECT\n $sitereview = $post->getParent('sitereview_listing');\n\n //GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n\n if (!$sitereview->isOwner($viewer) && !$post->isOwner($viewer)) {\n return $this->_helper->requireAuth->forward();\n }\n\n //AUTHORIZATION CHECK\n if (!$this->_helper->requireAuth()->setAuthParams($sitereview, null, \"view_listtype_$sitereview->listingtype_id\")->isValid())\n return;\n\n //MAKE FORM\n $this->view->form = $form = new Sitereview_Form_Post_Delete();\n\n //CHECK METHOD\n if (!$this->getRequest()->isPost()) {\n return;\n }\n\n //FORM VALIDATION\n if (!$form->isValid($this->getRequest()->getPost())) {\n return;\n }\n\n //PROCESS\n $table = Engine_Api::_()->getDbTable('posts', 'sitereview');\n $db = $table->getAdapter();\n $db->beginTransaction();\n $topic_id = $post->topic_id;\n try {\n $post->delete();\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n //GET TOPIC\n $topic = Engine_Api::_()->getItem('sitereview_topic', $topic_id);\n\n $href = ( null == $topic ? $sitereview->getHref() : $topic->getHref() );\n return $this->_forwardCustom('success', 'utility', 'core', array(\n 'closeSmoothbox' => true,\n 'parentRedirect' => $href,\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Post deleted.')),\n ));\n }", "function remove()\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 delete' ) );\n\t\t}\n\n\t\t$model = $this->getModel('weblink');\n\t\tif(!$model->delete($cid)) {\n\t\t\techo \"<script> alert('\".$model->getError(true).\"'); window.history.go(-1); </script>\\n\";\n\t\t}\n\n\t\t$this->setRedirect( 'index.php?option=com_weblinks' );\n\t}", "public function action_remove(){\n\t\t$monumentId = $this->request->param('id');\n\t\t$user = Auth::instance()->get_user();\n\t\t\n\t\t// Remove the monument from the user list\n\t\t$favoriteList = new Model_List_Favorite();\n\t\t$favoriteList->remove($monumentId, $user->UserID);\n\t\t\n\t\t// Redirect the user back to the monument page\n\t\t$this->request->redirect('monument/view/' . $monumentId);\n\t}", "public function testCollectionTicketsDelete()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function del(){\n\t\t$this->OnlyAdmin();\n\t\tif($this->input->post()){\n\t\t$this->TicketModel->delet($this->input->post());\n\t\tredirect('index.php/ticket/lists');}\n\t}", "public function removeFromListAction() { \n \n //get id of recipe which should be removed from list\n $recipeID = (int) $this->params()->fromRoute('recipeID');\n\n //get default list of user\n if ($_SESSION['user'] != \"\") {\n $userID = $_SESSION['user'];\n\n $list = $this->getListsTable()->getListsByUser($userID); //1 list \n\n $listID = 0;\n if ($list == null) {\n //should not happen\n throw new \\Exception(\"ERROR: Remove recipe $recipeID from list $listID - no list available\"); \n } else { \n $listID = (int) $list->listID; \n $this->getListDetailTable()->removeRecipeFromList($listID, $recipeID); \n }\n \n //refresh current favorite list\n return $this->redirect()->toRoute('list', array('action' => 'viewList'));\n }//check if user is logged-in\n }", "public function testWebinarDelete()\n {\n }", "public function testDeleteNodeSingle()\n {\n $list = new SimpleList();\n $list->add(\"fred\");\n $list->add(\"wilma\");\n $list->add(\"betty\");\n $list->add(\"barney\");\n\n $this->assertEquals(array(\"fred\", \"wilma\", \"betty\", \"barney\"), $list->getValues());\n\n $list->delete($list->find(\"wilma\"));\n\n $this->assertEquals(array(\"fred\", \"betty\", \"barney\"), $list->getValues());\n }", "public function deleteListAction(){\n $ebookers_obj = new Ep_Ebookers_Managelist();\n //to call a function to delete themes//\n $ebookers_obj->deleteList($this->_request->getParams());\n //unset($_REQUEST);\n exit;\n }", "function ui_sortable_destroy($selector){\n return add_method_support('sortable',$selector, 'destroy');\n}", "public function removeAction() {\r\n if (empty($_POST['photo_id']))\r\n die('error');\r\n //GET PHOTO ID AND ITEM\r\n $photo_id = (int) $this->_getParam('photo_id');\r\n $photo = Engine_Api::_()->getItem('sesvideo_chanelphoto', $photo_id);\r\n $db = Engine_Api::_()->getDbTable('chanelphotos', 'sesvideo')->getAdapter();\r\n $db->beginTransaction();\r\n try {\r\n $photo->delete();\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollBack();\r\n throw $e;\r\n }\r\n }", "function removeFromSlideshow()\r\n\t{\r\n\t\t$art_object_id = $this->input->post('art_object_id');\r\n\t\t\r\n\t\t$result = $this->artobject_model->deleteFromSlideshow($art_object_id);\r\n\t\tif($result)\r\n\t\t{\r\n\t\t\t$url = base_url('admin/manageArt/0/slideshowDeleted');\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$url = base_url('admin/manageArt/0/slideshowDeletedFailed');\r\n\t\t}\r\n\t\tredirect($url);\r\n\t}", "public function destroy(AnesthesiaList $anesthesiaList)\n {\n //\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteAction() {\n\n\t\t//ONLY LOGGED IN USER CAN DELETE REVIEW\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n\t\t//SUBJECT SHOULD BE SET\n if (!$this->_helper->requireSubject('list_listing')->isValid())\n return;\n\n $viewer = Engine_Api::_()->user()->getViewer();\n $this->view->viewer_id = $viewer_id = $viewer->getIdentity();\n\n\t\t//GET REVIEW ID AND REVIEW OBJECT\n $review_id = $this->_getParam('id');\n $review = Engine_Api::_()->getItem('list_reviews', $review_id);\n\n\t\t//ONLY REVIEW OWNER AND SUPER ADMIN CAN DELETE REVIEW\n if (!($review->owner_id == $viewer_id || $viewer->level_id == 1)) {\n return $this->_forward('requireauth', 'error', 'core');\n }\n\n if ($this->getRequest()->isPost()) {\n\n $this->view->list = $list = Engine_Api::_()->core()->getSubject();\n $content_id = $this->_getParam('content_id');\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n //DELETE REVIEW FROM DATABASE\n $review->delete();\n\n\t\t\t\t//DECREASE REVIEW COUNT\n\t\t\t\t$list->review_count--;\n\t\t\t\t$list->save();\n\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n //REDIRECT\n $url = $this->_helper->url->url(array('listing_id' => $list->getIdentity(), 'user_id' => $list->owner_id, 'slug' => $list->getSlug(), 'tab' => $content_id), 'list_entry_view', true);\n\n $this->_forward('success', 'utility', 'core', array(\n 'parentRefresh' => 3,\n 'parentRedirect' => $url,\n 'parentRedirectTime' => 1,\n 'messages' => array('Your Review has been deleted successfully.')\n ));\n } else {\n $this->renderScript('review/delete.tpl');\n }\n }", "public function deleteSlots(Collection $collection): Collection;", "public function testRemovePageWhenDeleted()\n {\n\n // Add a public page.\n $page = $this->_simplePage(true);\n\n // Delete.\n $page->delete();\n\n // Should remove Solr document.\n $this->_assertNotRecordInSolr($page);\n\n }", "function projectpentagon_remove() {\n\ndelete_option('projectpentagon_title');\n\ndelete_option('projectpentagon_name1');\n\ndelete_option('projectpentagon_name2');\n\ndelete_option('projectpentagon_name3');\n\ndelete_option('projectpentagon_name4');\n\ndelete_option('projectpentagon_name5');\n\ndelete_option('projectpentagon_color1');\n\ndelete_option('projectpentagon_color2');\n\ndelete_option('projectpentagon_color3');\n\ndelete_option('projectpentagon_color4');\n\ndelete_option('projectpentagon_color5');\n\ndelete_option('projectpentagon_category');\ndelete_option('projectpentagon-titleonpages');\n\n}", "public function testDelete()\n\t{\n\t\t$client = static::createClient(array(), array(\n\t\t 'PHP_AUTH_USER' => 'jr',\n\t\t 'PHP_AUTH_PW' => 'jr',\n\t\t));\n\t\t$client->followRedirects();\n\n\t\t// On clique sur le lien entreprise de test\n\t\t$crawler = $client->request('GET', '/clients');\n\t\t$link = $crawler->filter('.bloc__title a:contains(\"Entreprise de test\")')->first()->link();\n\t\t$crawler = $client->click($link);\n\t\t//On vérifie qu'on est bien sur la bonne page\n\t\t$this->assertGreaterThan(0, $crawler->filter('h1:contains(\"Entreprise de test\")')->count());\n\n\t\t// On clique sur le bouton modifier\n\t\t$link = $crawler->filter('.btn--delete')->first()->link();\n\t\t$crawler = $client->click($link);\n\t\t//On vérifie qu'on est bien sur la bonne page\n\t\t$this->assertEquals(1, $crawler->filter('.breadcrumb:contains(\"Supprimer\")')->count()); \n\n\t\t// On modifie le métier\n\t\t$form = $crawler->selectButton('Supprimer')->form();\n\t\t$crawler = $client->submit($form);\t\n\n\t\t//On vérifie que ça a marché\n\t\t$this->assertEquals(1, $crawler->filter('html:contains(\"Le client a bien été supprimé.\")')->count());\n\n\t}", "public function removeAction()\n {\n if ( $this->_hasParam('razaoSocialTomador') == false )\n {\n $this->_redirect('clientes/list');\n }\n \t\t$modelo = new Application_Model_Clientes();\n $razaoSocialTomador = $this->_getParam('razaoSocialTomador');\n $modelo->removeByRazaoSocial($razaoSocialTomador);\n\n// $cnte = $modelo->removeByRazaoSocial($razaoSocialTomador);\n\t\t$this->_redirect('clientes/list');\n // action body\n }", "public function doRemove() {\r\n\t\t$host = xn(\"host\");\r\n\t\t\r\n\t\t$ret = $this->_mongo->selectDB(\"admin\")->command(array(\r\n\t\t\t\"removeshard\" => $host\r\n\t\t));\r\n\t\t\r\n\t\t$this->ret = $this->_highlight($ret, \"json\");\r\n\t\t\r\n\t\t$this->display();\r\n\t}", "public function remove() {}", "public function remove() {}", "public function testRemoveUnsetElement()\n {\n $success = $this->collection->remove(7);\n\n $this->assertFalse($success);\n }", "public function do_delete_record()\n {\n $v_list_delete = get_post_var('hdn_item_id_list','');\n $this->model->do_delete_record($v_list_delete);\n }", "function delete()\n\t{\n\t\t$model = $this->getModel();\n\t\t$viewType\t= JFactory::getDocument()->getType();\n\t\t$view = $this->getView($this->view_item, $viewType);\n\t\t$view->setLayout('confirmdelete');\n\t\tif (!JError::isError($model)) {\n\t\t\t$view->setModel($model, true);\n\t\t}\n\t\t//used to load in the confirm form fields\n\t\t$view->setModel($this->getModel('list'));\n\t\t$view->display();\n\t}", "public function eliminar() {\n\t\t\n\t\t\n\t\t$juradodni = $_GET[\"dniJurado\"];\n\t\t\n\t\t$this -> JuradoMapper -> delete($juradodni);\n\n\t\t\n\t\t$this -> view -> redirect(\"jurado\", \"listar\");\n\t\t//falta cambiar\n\t}", "public function testDelete()\n\t{\n\t\t$saddle = $this->saddles[0];\n\n\t\t$this->actingAs($this->admin, 'api')\n\t\t\t ->delete('/api/v1/admin/saddles/' . $saddle->id)\n\t\t\t ->assertStatus(200);\n\n\t\t$this->assertDatabaseMissing('saddles', ['id' => $saddle->id]);\n\t}", "function delete() {\n\t\t$sql = \"DELETE FROM \".$this->hr_db.\".hr_person_detail\n\t\t\t\tWHERE psd_ps_id=?\";\n\t\t$this->hr->query($sql, array($this->psd_ps_id));\n\t}", "function delete() {\n $this->check_action_permission('delete');\n $tours_to_delete = $this->input->post('checkedID');\n if ($this->tour->delete_list($tours_to_delete)) {\n echo json_encode(array('success' => true, 'message' => lang('tours_successful_deleted')));\n } else {\n echo json_encode(array('success' => false, 'message' => lang('tours_cannot_be_deleted')));\n }\n }", "public function deletepoll(){\n \tSiteController::loggedInCheck();\n\n\t\t$pollid = $_POST['pollid'];\n\t\t$poll = Poll::loadById($pollid);\n\t\t$pollAuthorId = $poll->get('userId');\n\t\t$pollAuthor = User::loadById($pollAuthorId);\n\n\t\t//user is the author of the poll, allow delete\n\t\tif($pollAuthor->get('username') == $_SESSION['username']){\n\t\t\t$poll->delete();\n\t\t} else {\n\t\t\t$_SESSION['info'] = \"You can only delete polls you have created.\";\n\t\t}\n\n\t\t//refresh page\n\t\theader('Location: '.BASE_URL);\t\t\t\t\t\t\t\t\t\t\t//TODO update\n\t}", "public function del() {\n\t\t\tif (!empty($this->params['form']['items'])) {\n\t\t\t\t/* Convert string with ids to array */\n\t\t\t\t$allIds = explode(',', $this->params['form']['items']);\n\t\t\t\t$allIds = Sanitize::clean($allIds);\n\t\t\t\t\n\t\t\t\t/* Remove menu item(s) from tree */\n\t\t\t\t/* @todo Check if this could be done with a single method call/db request instead */\n\t\t\t\tforeach ($allIds AS $id) {\n\t\t\t\t\t$this->MyMenu->removefromtree($id, true);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/* Get list of menu items */\n\t\t\t$this->menuList = $this->getThreadedList();\n\t\t\t$this->set('menuList', $this->menuList);\n\t\t\t\n\t\t\t$this->render('list');\n\t\t}", "public function deleteAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$model->deleteLayout($this->_request->getParam('layout'));\n\t\t$this->_redirect('/admin/layout/list');\n\t }", "function ag_del_coll() {\n\tif(!isset($_POST['coll_id'])) {die('missing data');}\n\t$id = addslashes($_POST['coll_id']);\n\t\n\t$resp = wp_delete_term( $id, 'ag_collections');\n\n\tif($resp == '1') {die('success');}\n\telse {die('error during the collection deletion');}\n}", "abstract public function remove();", "abstract public function remove();", "abstract public function remove();", "function delete()\r\n\t{\r\n\t\tglobal $debug;\r\n\t\t$dbh = getOpenedConnection();\r\n\r\n\t\t// Delete current item\r\n\t\t$sql = \"delete from tbl_Pistol_CompetitionDay\r\n\t\t\twhere Id = $pid;\r\n\t\t\";\r\n\r\n\t\t\r\n\t\tif ($debug)\r\n\t\t\tprint_r(\"SQL: \" . $sql);\r\n\t\t\t\r\n\t\tmysqli_query($dbh,$sql);\r\n\t\tif (mysqli_errno($dbh)!=0) {\r\n\t\t\tprint_r(mysqli_error($dbh));\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t$this->clear(); // Clear current object\r\n\r\n\t}", "public function delete()\n {\n JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\n\n // Get items to remove from the request.\n $cid = $this -> input -> get('cid', array(), 'array');\n\n if (!is_array($cid) || count($cid) < 1)\n {\n JFactory::getApplication() -> enqueueMessage(JText::_($this->text_prefix . '_NO_ITEM_SELECTED'), 'error');\n\t\t\t\n }\n else\n {\n // Get the model.\n $model = $this->getModel();\n\n // Make sure the item ids are integers\n jimport('joomla.utilities.arrayhelper');\n JArrayHelper::toInteger($cid);\n\n // Remove the items.\n if ($model->delete($cid))\n {\n $this->setMessage(JText::plural('COM_TZ_PORTFOLIO_PLUS_FIELDS_COUNT_DELETED', count($cid)));\n }\n else\n {\n $this->setMessage($model->getError());\n }\n }\n\n $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=' . $this->view_list, false));\n }", "public function removeAction()\r\n {\r\n $modelNavBlock = $this->getServiceLocator()->get('DotsNavBlock\\Db\\Model\\NavigationBlock');\r\n $QUERY = $this->getRequest()->getQuery()->toArray();\r\n $nav_id = $QUERY['id'];\r\n $nav = $modelNavBlock->getById($nav_id);\r\n $nav->delete();\r\n return $this->jsonResponse(array('success' => true, 'id' => $nav_id));\r\n }", "public function delete()\n\t{\n\t\t$selection = $this->input->post('selection');\n\t\t$ignore = implode('|', array_diff($this->ignore_list, $selection));\n\t\t$this->member->ignore_list = $ignore;\n\t\t$this->member->save();\n\n\t\tee()->functions->redirect(ee('CP/URL')->make($this->index_url, $this->query_string));\n\t}", "function test_restrict_deletion_of_Home_page(){}", "public function removeAction() {\n\n // Validate request methods\n $this->validateRequestMethod('POST');\n\n //GET DIARY ID AND SUBJECT\n if (Engine_Api::_()->core()->hasSubject())\n $wishlist = Engine_Api::_()->core()->getSubject('sitereview_wishlist');\n\n $wishlist_id = $this->_getParam('wishlist_id');\n if (isset($wishlist_id) && !empty($wishlist_id)) {\n $subject = $wishlist = Engine_Api::_()->getItem('sitereview_wishlist', $wishlist_id);\n Engine_Api::_()->core()->setSubject($wishlist);\n } else {\n $this->respondWithError('no_record');\n }\n\n\n if (empty($wishlist))\n $this->respondWithError('no_record');\n\n $wishlist_id = $this->_getParam('wishlist_id');\n\n $viewer = Engine_Api::_()->user()->getViewer();\n\n //GET EVENT ID AND EVENT\n $listing_id = $this->_getParam('listing_id');\n $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n\n if (empty($sitereview) && !isset($sitereview))\n $this->respondWithError('no_record');\n\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n\n //DELETE FROM DATABASE\n Engine_Api::_()->getDbtable('wishlistmaps', 'sitereview')->delete(array('wishlist_id = ?' => $wishlist_id, 'listing_id = ?' => $listing_id));\n\n try {\n //DELETE ACTIVITY FEED\n //SQL ERROR TO BE CORRECTED\n $actionTable = Engine_Api::_()->getDbtable('actions', 'activity');\n $actionTableName = $actionTable->info('name');\n\n $action_id = $actionTable->select()\n ->setIntegrityCheck(false)\n ->from($actionTableName, 'action_id')\n ->joinInner('engine4_activity_attachments', \"engine4_activity_attachments.action_id = $actionTableName.action_id\", array())\n ->where('engine4_activity_attachments.id = ?', $listing_id)\n ->where($actionTableName . '.type = ?', \"sitereview_wishlist_add_listing\")\n ->where($actionTableName . '.subject_type = ?', 'user')\n ->where($actionTableName . '.object_type = ?', 'sitereview_listing')\n ->where($actionTableName . '.object_id = ?', $listing_id)\n //->where($actionTableName . '.params like(?)', '{\"child_id\":' . $wishlist_id . '}')\n ->query()\n ->fetchColumn();\n } catch (Exception $ex) {\n $this->respondWithValidationError('internal_server_error', $ex->getMessage());\n }\n if (!empty($action_id)) {\n $activity = Engine_Api::_()->getItem('activity_action', $action_id);\n if (!empty($activity)) {\n $activity->delete();\n }\n }\n $db->commit();\n $this->successResponseNoContent('no_content', true);\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n }", "public function deleteAction() {\n\t\t$story_id \t\t= $this->getRequest()->getParam(\"id\");\n\t\t\n\t\t//Verify if the requested story exist\n\t\t$stories\t\t= new Stories();\n\t\tif (!($story\t= $stories->getStory($story_id))) {\n\t\t\treturn $this->_helper->json->sendJson(false);\n\t\t}\n\n\t\t// Check if we are the owner\n\t\tif ($this->_application->user->id != $story->user_id) {\n\t\t\treturn $this->_helper->json->sendJson(false);\n\t\t}\n\t\t\n\t\t// Ok, we can hide the item\n\t\t$stories->deleteStory($story_id);\n\t\treturn $this->_helper->json->sendJson(true);\n\t}", "public function testHandleRemoveSuccess()\n {\n // Populate data\n $dealerAccountIDs = $this->_populate();\n \n // Set data\n $ID = $this->_pickRandomItem($dealerAccountIDs);\n \n $this->withSession($this->adminSession)\n ->call('POST', '/dealer-account/remove', ['ID' => $ID]);\n \n // Validate response\n $this->assertRedirectedTo('/dealer-account');\n $this->assertSessionHas('dealer-account-deleted', '');\n \n // Validate data\n $dealerAccount = $this->dealer_account->getOne($ID);\n $this->assertEquals(null, $dealerAccount);\n \n }", "public function ajaxDeleteAction() { \n $request = $this->getRequest();\n $response = $this->getResponse();\n if ($request->isPost()) {\n $list = $request->getPost('list');\n if (is_array($list) && count($list) > 0) {\n foreach($list as $id_shopping_list) {\n $this->getShoppingListTable()->deleteShoppingList($id_shopping_list);\n }\n $t_return[\"result\"] = \"OK\";\n } else {\n $t_return[\"result\"] = \"KO_LIST\";\n }\n $response->setContent(\\Zend\\Json\\Json::encode($t_return));\n }\n return $response;\n }", "public function testDelete()\n {\n $context = $this->createPageContext();\n $storage = $this->createStorage();\n $tokenStorage = $this->createTokenStorage();\n\n $layout1 = $storage->create();\n $layout2 = $storage->create();\n $layout3 = $storage->create();\n\n $context->addLayoutList([$layout1->getId(), $layout2->getId(), $layout3->getId()]);\n $token = $context->createEditToken([$layout1->getId(), $layout3->getId()], ['user_id' => 17]);\n $tokenString = $token->getToken();\n $tokenStorage->saveToken($token);\n\n // Save our editable instances\n $tokenStorage->update($tokenString, $layout1);\n $tokenStorage->update($tokenString, $layout3);\n\n // Validate that load still work\n $tokenStorage->loadToken($tokenString);\n $tokenStorage->loadMultiple($tokenString, [$layout1->getId(), $layout3->getId()]);\n\n // And now delete\n $tokenStorage->deleteAll($tokenString);\n\n try {\n $tokenStorage->loadToken($tokenString);\n $this->fail();\n } catch (InvalidTokenError $e) {\n $this->assertTrue(true);\n }\n try {\n $tokenStorage->loadMultiple($tokenString, [$layout1->getId()]);\n $this->fail();\n } catch (InvalidTokenError $e) {\n $this->assertTrue(true);\n }\n try {\n $tokenStorage->load($tokenString, $layout3->getId());\n $this->fail();\n } catch (InvalidTokenError $e) {\n $this->assertTrue(true);\n }\n }", "function teamdelete(){\n $this->auth(COMP_ADM_LEVEL);\n $team_id = $this->uri->segment(3);\n $contest_id = urldecode($this->uri->segment(4));\n $this->m_key->removeTeam($team_id);\n $this->m_team->delete($team_id, $contest_id);\n $this->teams($contest_id);\n }", "public function remove() {\n\n //GETS TASK RECORD WITH REQUEST TASK ID (ID)\n $task = Tasks::findorfail(request('TaskID'));\n\n //DELETES TASK RECORD FROM DB\n $task->delete();\n\n //REDIRECTS TO TASK VIEW WITH NOTEPADID AS PARAMETER\n return redirect (\"/task/$task->NotepadID\");\n }", "function deleteItem()\r\n\t{\r\n\t\t$this->content_obj->deleteItem();\r\n\t\t$_SESSION[\"il_pg_error\"] = $this->pg_obj->update();\r\n\t\t$this->ctrl->returnToParent($this, \"jump\".$this->hier_id);\r\n\t}", "public function destroy(pregunta_test $pregunta_test)\n {\n //\n }", "public function postRemoveFromWatchlist()\n {\n \n $w_id = Input::get('id');\n $watchlist = new Watchlist();\n return Response::json( $watchlist->removeWatchlist( Auth::user()->id, $w_id, FALSE) ); \n \n }", "public function remove()\n {\n $id = $this->input->post('id_slider'); // menangkap post dari form.php ketika edit data, dengan properties namenya adalah id_size\n $this->slider->delete($id); /* mengakses model size, lalu ke fungsi delete dengan parameter sebuah id */\n\n /* membuat array, yang akan dikonversi menjadi json untuk kebutuhan ajax */\n $jsonmsg = array(\n \"msg\" => 'Delete Data Succces',\n \"hasil\" => true\n );\n\n /* konversi array json, yang akan terkirim ke form.php */\n echo json_encode($jsonmsg);\n }", "public function delete($oPanier) {\n $this->_apiClient->produitpanier(\"delete\",$this->toArray());\n $this->panier->synchronise();\n $oPanier->synchronise();\n }", "public function deleteAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif ($item) {\n\t\t\t$item->delete();\n\t\t}\n\t\t$this->_helper->redirector('list', null, null, array('model' => $modelName));\n\t}", "public function multiDeleteAction() {\n\n if ($this->getRequest()->isPost()) {\n $values = $this->getRequest()->getPost();\n\n foreach ($values as $key => $value) {\n if ($key == 'delete_' . $value) {\n Engine_Api::_()->getItem('list_listing', (int) $value)->delete();\n }\n }\n }\n return $this->_helper->redirector->gotoRoute(array('action' => 'index'));\n }", "function thumbwhere_contentcollection_delete_form($form, &$form_state, $thumbwhere_contentcollection) {\n $form_state['thumbwhere_contentcollection'] = $thumbwhere_contentcollection;\n\n $form['#submit'][] = 'thumbwhere_contentcollection_delete_form_submit';\n\n $form = confirm_form($form,\n t('Are you sure you want to delete thumbwhere_contentcollection %name?', array('%name' => $thumbwhere_contentcollection->title)),\n 'admin/thumbwhere/thumbwhere_contentcollections/thumbwhere_contentcollection',\n '<p>' . t('This action cannot be undone.') . '</p>',\n t('Delete'),\n t('Cancel'),\n 'confirm'\n );\n\n return $form;\n}", "public function delete($address, $list, $type);", "public function removeTask()\n\t{\n\t\t// Check for request forgeries\n\t\tRequest::checkToken(['get', 'post']);\n\n\t\t// Incoming\n\t\t$ids = Request::getArray('id', array());\n\n\t\tif (count($ids) > 0)\n\t\t{\n\t\t\t// Loop through each ID\n\t\t\tforeach ($ids as $id)\n\t\t\t{\n\t\t\t\t$row = new Middleware\\Location(intval($id));\n\n\t\t\t\tif (!$row->delete())\n\t\t\t\t{\n\t\t\t\t\tthrow new \\Exception($row->getError(), 500);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tApp::redirect(\n\t\t\tRoute::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller, false),\n\t\t\tLang::txt('COM_TOOLS_ITEM_DELETED'),\n\t\t\t'message'\n\t\t);\n\t}", "public function deletePlaylistAction()\n {\n\t\t$userSession\t= new Container('fo_user');\n\t\t$request\t\t= $this->getRequest();\n\t\tif(!isset($userSession->userSession['_id']) || trim($userSession->userSession['_id']) == '') {\n\t\t\techo \"-1\";\n\t\t\tdie();\n\t\t}\n\t\tif($request->isPost()) {\n\t\t\t$formData\t= $request->getPost();\n\t\t\tif(isset($formData['playlist_id']) && trim($formData['playlist_id']) != '') {\n\t\t\t\t$result\t= $this->deletePlaylist($formData);\n\t\t\t\t\n\t\t\t\t$tempArray\t= $userSession->mediaSession;\n\t\t\t\tif(isset($tempArray['playlist'][$formData['playlist_id']])) {\n\t\t\t\t\tunset($tempArray['playlist'][$formData['playlist_id']]);\n\t\t\t\t}\n\t\t\t\t$userSession->mediaSession\t= $tempArray;\n\t\t\t\techo \"1\";\t//\tSuccess\n\t\t\t} else {\n\t\t\t\techo \"0\";\t//\timproper request\n\t\t\t}\n\t\t} else {\n\t\t\techo \"0\";\t//\timproper request\n\t\t}\n\t\treturn $this->getResponse();\n }", "function ws_delete($window_name, $form='') {\n global $include, $conf, $self, $onadb;\n\n // Check permissions\n if (! (auth('rack_del') or auth('advanced'))){\n $response = new xajaxResponse();\n $response->addScript(\"alert('Permission denied!');\");\n return($response->getXML());\n }\n\n // If an array in a string was provided, build the array and store it in $form\n $form = parse_options_string($form);\n\n // Instantiate the xajaxResponse object\n $response = new xajaxResponse();\n $js = '';\n\n // Run the module\n list($status, $output) = run_module('rack_assignment_del', array('rack_assignment' => $form['rack_assignment'], 'commit' => 'Y'));\n\n // Set up a refresh\n $form['js'] = \"xajax_window_submit('work_space', 'xajax_window_submit(\\'rack_maint\\', \\'id=>{$form['rack']}\\', \\'display\\')');\";\n\n // If the module returned an error code display a popup warning\n if ($status)\n $js .= \"alert('Delete failed. \" . preg_replace('/[\\s\\']+/', ' ', $self['error']) . \"');\";\n else if ($form['js'])\n $js .= $form['js']; // usually js will refresh the window we got called from\n\n // Return an XML response\n $response->addScript($js);\n return($response->getXML());\n}" ]
[ "0.795948", "0.58884895", "0.5749253", "0.5748073", "0.573655", "0.5675471", "0.5661825", "0.5626825", "0.55920637", "0.5565379", "0.5538664", "0.5531006", "0.5487608", "0.5451873", "0.5446417", "0.54163927", "0.5416242", "0.54077244", "0.54077244", "0.54077244", "0.54077244", "0.5376392", "0.53748155", "0.53446203", "0.5317039", "0.53021455", "0.52959454", "0.5286647", "0.5285564", "0.52709144", "0.5270499", "0.52531713", "0.52358645", "0.52314675", "0.522578", "0.5217353", "0.52004015", "0.5194562", "0.51913023", "0.5188895", "0.5183498", "0.5183498", "0.5183498", "0.5183498", "0.5183498", "0.5183498", "0.5183498", "0.5183498", "0.5183498", "0.5183498", "0.5183498", "0.5183498", "0.5183498", "0.51793975", "0.5178377", "0.51773995", "0.51695186", "0.51665723", "0.5165358", "0.5164921", "0.5155614", "0.51542556", "0.51477665", "0.5147176", "0.5141294", "0.513714", "0.51317877", "0.51245785", "0.51236796", "0.51178604", "0.51146936", "0.51107275", "0.5103812", "0.5087149", "0.5087149", "0.5087149", "0.5085813", "0.5084772", "0.50847256", "0.50846887", "0.5082066", "0.50746137", "0.5073584", "0.505922", "0.50543606", "0.50499135", "0.5026317", "0.50253636", "0.50209695", "0.50168407", "0.50153106", "0.50119543", "0.5011111", "0.50070536", "0.5006589", "0.5004609", "0.5002437", "0.500019", "0.4996069", "0.49937493" ]
0.7986915
0
Test case for webinarPanelists List Panelists.
Тест-кейс для списка участников вебинара Panelists.
public function testWebinarPanelists() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarPanelistCreate()\n {\n }", "public function testWebinarPanelistsDelete()\n {\n }", "public function testWebinarPanelistDelete()\n {\n }", "public function testListPastWebinarQA()\n {\n }", "public function testListPastWebinarPollResults()\n {\n }", "public function set_panelist() {\n\t\tif (!isset($this->args[0]) || empty($this->args[0])) {\n\t\t\t$this->out('Provide MV user_id argument.');\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (!$this->get_settings()) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$url = $this->settings['hostname.mbd'].'/panelists/'.$this->args[0].'?X-ApiKey='.$this->settings['mbd.api_key'];\n\t\t$this->out('Reaching out to '.$url);\n\t\t$http = new HttpSocket(array(\n\t\t\t'timeout' => 60,\n\t\t\t'ssl_verify_host' => false // PHP does not seem to check SANs for CNs\n\t\t));\n\t\t$request = array(\n\t\t\t'dwid' => '00000000-0000-0001-0379-ef1412100980',\n\t\t\t'panelistId' => $this->args[0],\n\t\t\t'partnerId' => $this->settings['mbd.partner_id'],\n\t\t\t'donotcontact' => true\n\t\t);\n\t\ttry {\n\t\t\t$results = $http->post($url, json_encode($request), $this->options);\n\t\t} \n\t\tcatch (Exception $e) {\n\t\t\t$this->out('Panelists Api endpoint failed.');\n\t\t}\n\t\t\n\t\tprint_r($results);\n\t}", "public function testListSiteContainers()\n {\n }", "function SetupListOptions() {\n\t\tglobal $Security, $tbl_slide;\n\n\t\t// \"view\"\n\t\t$this->ListOptions->Add(\"view\");\n\t\t$item =& $this->ListOptions->Items[\"view\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsLoggedIn();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"edit\"\n\t\t$this->ListOptions->Add(\"edit\");\n\t\t$item =& $this->ListOptions->Items[\"edit\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsLoggedIn();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"copy\"\n\t\t$this->ListOptions->Add(\"copy\");\n\t\t$item =& $this->ListOptions->Items[\"copy\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsLoggedIn();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"delete\"\n\t\t$this->ListOptions->Add(\"delete\");\n\t\t$item =& $this->ListOptions->Items[\"delete\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsLoggedIn();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\tif ($tbl_slide->Export <> \"\" ||\n\t\t\t$tbl_slide->CurrentAction == \"gridadd\" ||\n\t\t\t$tbl_slide->CurrentAction == \"gridedit\")\n\t\t\t$this->ListOptions->HideAllOptions();\n\t}", "public function testShowListSuccessfully(): void\n {\n $list = $this->createList(static::$listData);\n\n $this->get(\\sprintf('/mailchimp/lists/%s', $list->getId()));\n $content = \\json_decode($this->response->content(), true);\n\n $this->assertResponseOk();\n\n self::assertArrayHasKey('list_id', $content);\n self::assertEquals($list->getId(), $content['list_id']);\n\n foreach (static::$listData as $key => $value) {\n self::assertArrayHasKey($key, $content);\n self::assertEquals($value, $content[$key]);\n }\n }", "public function testListPastWebinarFiles()\n {\n }", "function SetupListOptions() {\r\n\t\tglobal $Security, $Language;\r\n\r\n\t\t// \"view\"\r\n\t\t$item = &$this->ListOptions->Add(\"view\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->IsLoggedIn();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// Call ListOptions_Load event\r\n\t\t$this->ListOptions_Load();\r\n\t}", "public function testListSites()\n {\n }", "function SetupListOptions() {\r\n\t\tglobal $Security, $Language;\r\n\r\n\t\t// \"view\"\r\n\t\t$item = &$this->ListOptions->Add(\"view\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->CanView();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// \"edit\"\r\n\t\t$item = &$this->ListOptions->Add(\"edit\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->CanEdit();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// \"copy\"\r\n\t\t$item = &$this->ListOptions->Add(\"copy\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->CanAdd();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// \"delete\"\r\n\t\t$item = &$this->ListOptions->Add(\"delete\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->CanDelete();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// Call ListOptions_Load event\r\n\t\t$this->ListOptions_Load();\r\n\t}", "public function testWebinarPolls()\n {\n }", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// \"edit\"\n\t\t$item = &$this->ListOptions->Add(\"edit\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"detail_avaluo\"\n\t\t$item = &$this->ListOptions->Add(\"detail_avaluo\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->Visible = $Security->AllowList(CurrentProjectID() . 'avaluo') && !$this->ShowMultipleDetails;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\tif (!isset($GLOBALS[\"avaluo_grid\"])) $GLOBALS[\"avaluo_grid\"] = new cavaluo_grid;\n\n\t\t// Multiple details\n\t\tif ($this->ShowMultipleDetails) {\n\t\t\t$item = &$this->ListOptions->Add(\"details\");\n\t\t\t$item->CssClass = \"text-nowrap\";\n\t\t\t$item->Visible = $this->ShowMultipleDetails;\n\t\t\t$item->OnLeft = TRUE;\n\t\t\t$item->ShowInButtonGroup = FALSE;\n\t\t}\n\n\t\t// Set up detail pages\n\t\t$pages = new cSubPages();\n\t\t$pages->Add(\"avaluo\");\n\t\t$this->DetailPages = $pages;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\">\";\n\t\t$item->MoveTo(0);\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = FALSE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// \"view\"\n\t\t$item = &$this->ListOptions->Add(\"view\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanView();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"edit\"\n\t\t$item = &$this->ListOptions->Add(\"edit\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"copy\"\n\t\t$item = &$this->ListOptions->Add(\"copy\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanAdd();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"delete\"\n\t\t$item = &$this->ListOptions->Add(\"delete\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanDelete();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"userpermission\"\n\t\t$item = &$this->ListOptions->Add(\"userpermission\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsAdmin();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t}", "function SetupListOptions() {\n\t\tglobal $Security, $t_tinbai_mainsite;\n\n\t\t// \"view\"\n\t\t$this->ListOptions->Add(\"view\");\n\t\t$item =& $this->ListOptions->Items[\"view\"];\n\t\t$item->CssStyle = \"white-space: nowrap;width:15px\";\n\t\t$item->Visible = $Security->CanView();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"edit\"\n\t\t$this->ListOptions->Add(\"edit\");\n\t\t$item =& $this->ListOptions->Items[\"edit\"];\n\t\t$item->CssStyle = \"white-space: nowrap;width:15px\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"checkbox\"\n\t\t$this->ListOptions->Add(\"checkbox\");\n\t\t$item =& $this->ListOptions->Items[\"checkbox\"];\n\t\t$item->CssStyle = \"white-space: nowrap;width:15px\";\n\t\t$item->Visible = ($Security->CanDelete() || $Security->CanEdit());\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" class=\\\"phpmaker\\\" onclick=\\\"t_tinbai_mainsite_list.SelectAllKey(this);\\\">\";\n\t\t$this->ListOptions->MoveItem(\"checkbox\", 0); // Move to first column\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\tif ($t_tinbai_mainsite->Export <> \"\" ||\n\t\t\t$t_tinbai_mainsite->CurrentAction == \"gridadd\" ||\n\t\t\t$t_tinbai_mainsite->CurrentAction == \"gridedit\")\n\t\t\t$this->ListOptions->HideAllOptions();\n\t}", "public function get_panelist() {\n\t\tif (!isset($this->args[0]) || empty($this->args[0])) {\n\t\t\t$this->out('Provide MV user_id argument.');\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (!$this->get_settings()) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$url = $this->settings['hostname.mbd'].'/panelists/'.$this->args[0].'?X-ApiKey='.$this->settings['mbd.api_key'];\n\t\t$this->out('Reaching out to '.$url);\n\t\t$http = new HttpSocket(array(\n\t\t\t'timeout' => 60,\n\t\t\t'ssl_verify_host' => false // PHP does not seem to check SANs for CNs\n\t\t));\n\t\ttry {\n\t\t\t$results = $http->get($url, \n\t\t\t\tarray(\n\t\t\t\t\t'myDataOnly' => 'true'\n\t\t\t\t), \n\t\t\t\t$this->options\n\t\t\t);\n\t\t} catch (Exception $e) {\n\t\t\t$this->out('Get Api endpoint failed.');\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//$results = json_decode($results['body'], true);\n\t\tCakeLog::write('mbd.get', print_r($results, true));\n\t\tprint_r($results);\n\t}", "public function testAddColPosListLayoutItems()\n {\n }", "public function test_listIndexAction ( )\n {\n $params = array(\n 'event_id' => 1,\n 'action' => 'list',\n 'controller'=> 'scales',\n 'module' => 'default'\n );\n\n $urlParams = $this->urlizeOptions($params);\n $url = $this->url($urlParams);\n $this->dispatch($url);\n\n // assertions\n $this->assertModule($urlParams['module']);\n $this->assertController($urlParams['controller']);\n $this->assertAction($urlParams['action']);\n\n }", "public function provideListAndListItemTests() {\n $result = [\n [[\n 'descr' => \"[list] and [*] should produce an unordered list.\",\n 'bbcode' => \"[list][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ul class=\\\"bbcode_list\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ul>\\n\",\n ]],\n [[\n 'descr' => \"[list] and [*] should produce an unordered list even without [/list].\",\n 'bbcode' => \"[list][*]One Box[*]Two Boxes[*]Three Boxes\",\n 'html' => \"\\n<ul class=\\\"bbcode_list\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ul>\\n\",\n ]],\n [[\n 'descr' => \"[list=circle] should produce an unordered list.\",\n 'bbcode' => \"[list=circle][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ul class=\\\"bbcode_list\\\" style=\\\"list-style-type:circle\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ul>\\n\",\n ]],\n [[\n 'descr' => \"[list=disc] should produce an unordered list.\",\n 'bbcode' => \"[list=disc][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ul class=\\\"bbcode_list\\\" style=\\\"list-style-type:disc\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ul>\\n\",\n ]],\n [[\n 'descr' => \"[list=square] should produce an unordered list.\",\n 'bbcode' => \"[list=square][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ul class=\\\"bbcode_list\\\" style=\\\"list-style-type:square\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ul>\\n\",\n ]],\n [[\n 'descr' => \"[list=1] should produce an ordered list.\",\n 'bbcode' => \"[list=1][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ol class=\\\"bbcode_list\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ol>\\n\",\n ]],\n [[\n 'descr' => \"[list=A] should produce an ordered list.\",\n 'bbcode' => \"[list=A][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ol class=\\\"bbcode_list\\\" style=\\\"list-style-type:upper-alpha\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ol>\\n\",\n ]],\n [[\n 'descr' => \"[list=a] should produce an ordered list.\",\n 'bbcode' => \"[list=a][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ol class=\\\"bbcode_list\\\" style=\\\"list-style-type:lower-alpha\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ol>\\n\",\n ]],\n [[\n 'descr' => \"[list=I] should produce an ordered list.\",\n 'bbcode' => \"[list=I][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ol class=\\\"bbcode_list\\\" style=\\\"list-style-type:upper-roman\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ol>\\n\",\n ]],\n [[\n 'descr' => \"[list=i] should produce an ordered list.\",\n 'bbcode' => \"[list=i][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ol class=\\\"bbcode_list\\\" style=\\\"list-style-type:lower-roman\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ol>\\n\",\n ]],\n [[\n 'descr' => \"[list=greek] should produce an ordered list.\",\n 'bbcode' => \"[list=greek][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ol class=\\\"bbcode_list\\\" style=\\\"list-style-type:lower-greek\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ol>\\n\",\n ]],\n [[\n 'descr' => \"[list=georgian] should produce an ordered list.\",\n 'bbcode' => \"[list=georgian][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ol class=\\\"bbcode_list\\\" style=\\\"list-style-type:georgian\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ol>\\n\",\n ]],\n [[\n 'descr' => \"[list=armenian] should produce an ordered list.\",\n 'bbcode' => \"[list=armenian][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ol class=\\\"bbcode_list\\\" style=\\\"list-style-type:armenian\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ol>\\n\",\n ]],\n ];\n return $result;\n }", "public function indexAction() {\n\n //ONLY LOGGED IN USER CAN VIEW THIS PAGE\n if (!$this->_helper->requireUser->isValid())\n return;\n\n $this->view->listingtype_id = $listingtype_id = $this->_listingType->listingtype_id;\n $this->view->listing_singular_uc = ucfirst($this->_listingType->title_singular);\n\n //VIDEO CREATION SHOULD BE ALLOWED\n if (!$this->_helper->requireAuth()->setAuthParams('video', null, \"create\")->isValid())\n return;\n\n //GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n\n //GET LISTING\n $this->view->listing_id = $listing_id = $this->_getParam('listing_id');\n $this->view->sitereview = $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n\n //GET CONTENT ID\n $this->view->content_id = $content_id = $this->_getParam('tab');\n\n //WHO CAN EDIT THE LISTING\n $this->view->canEdit = $canEdit = Engine_Api::_()->authorization()->isAllowed($sitereview, $viewer, \"edit_listtype_$listingtype_id\");\n\n //ACTIVE TAB\n $this->view->TabActive = \"video\";\n\n //VIDEO UPLOAD IS ALLOWED OR NOT\n $this->view->allowed_upload_video = Engine_Api::_()->sitereview()->allowVideo($sitereview, $viewer);\n if (empty($this->view->allowed_upload_video)) {\n return $this->_forwardCustom('requireauth', 'error', 'core');\n }\n\n if (Engine_Api::_()->sitereview()->hasPackageEnable()) {\n //AUTHORIZATION CHECK\n $allowed_upload_photo = Engine_Api::_()->authorization()->isAllowed($sitereview, $viewer, \"auth_photo_listtype_$listingtype_id\");\n if (Engine_Api::_()->sitereviewpaidlisting()->allowPackageContent($sitereview->package_id, \"photo\")) {\n $this->view->allowed_upload_photo = $allowed_upload_photo;\n }\n else\n $this->view->allowed_upload_photo = 0;\n }\n else\n $this->view->allowed_upload_photo = Engine_Api::_()->authorization()->isAllowed($sitereview, $viewer, \"photo_listtype_$listingtype_id\");\n\n $video = null;\n $values['user_id'] = $viewer_id;\n\n //COUNT TOTAL VIDEO\n $this->view->videoCount = Engine_Api::_()->sitereview()->getTotalVideo($viewer_id);\n\n $this->view->video = $video = Engine_Api::_()->getItemTable('sitereview_clasfvideo', 'sitereview')->getListingVideos($listing_id, 0);\n\n $this->view->message = $message = null;\n $session = new Zend_Session_Namespace();\n if (isset($session->video_message)) {\n $message = $session->video_message;\n unset($session->video_message);\n }\n\n //UPLOAD VIDEO\n if (isset($_GET['ul']) || isset($_FILES['Filedata'])) {\n return $this->_forwardCustom('upload-video', null, null, array('format' => 'json'));\n }\n\n //GET VIDEO PAGINATOR\n $values['user_id'] = $viewer_id;\n $paginator = Engine_Api::_()->getApi('core', 'video')->getVideosPaginator($values);\n $this->view->current_count = $paginator->getTotalItemCount();\n\n //GET TOTAL ALLOWED VIDEO\n $this->view->quota = Engine_Api::_()->authorization()->getPermission($viewer->level_id, 'video', 'max');\n\n //MAKE FORM\n $this->view->form = $form = new Sitereview_Form_Video_Video();\n\n if ($this->_getParam('type', false)) {\n $form->getElement('type')->setValue($this->_getParam('type'));\n }\n\n $this->view->display = 0;\n\n //CHECK POST\n if (!$this->getRequest()->isPost()) {\n return;\n }\n\n $this->view->display = 1;\n\n if (!$form->isValid($this->getRequest()->getPost())) {\n $values = $form->getValues('url');\n return;\n }\n\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\n\n //PROCESS\n $values = $form->getValues();\n $values['owner_id'] = $viewer->getIdentity();\n $insert_action = false;\n $db = Engine_Api::_()->getDbtable('videos', 'video')->getAdapter();\n $db->beginTransaction();\n try {\n\n //CREATE VIDEO\n $table = Engine_Api::_()->getDbtable('videos', 'video');\n if ($values['type'] == 3) {\n $video = Engine_Api::_()->getItem('video', $this->_getParam('id'));\n } else {\n $video = $table->createRow();\n }\n\n $video->setFromArray($values);\n $video->save();\n\n $params = $sitereview->main_video;\n\n //CREATE THUMBNAIL\n $thumbnail = $this->handleThumbnail($video->type, $video->code);\n $ext = ltrim(strrchr($thumbnail, '.'), '.');\n $thumbnail_parsed = @parse_url($thumbnail);\n\n if (@GetImageSize($thumbnail)) {\n $valid_thumb = true;\n } else {\n $valid_thumb = false;\n }\n\n if ($valid_thumb && $thumbnail && $ext && $thumbnail_parsed && in_array($ext, array('jpg', 'jpeg', 'gif', 'png'))) {\n\n $tmp_file = APPLICATION_PATH . '/temporary/link_' . md5($thumbnail) . '.' . $ext;\n $thumb_file = APPLICATION_PATH . '/temporary/link_thumb_' . md5($thumbnail) . '.' . $ext;\n $src_fh = fopen($thumbnail, 'r');\n $tmp_fh = fopen($tmp_file, 'w');\n stream_copy_to_stream($src_fh, $tmp_fh, 1024 * 1024 * 2);\n $image = Engine_Image::factory();\n $image->open($tmp_file)\n ->resize(120, 240)\n ->write($thumb_file)\n ->destroy();\n try {\n $thumbFileRow = Engine_Api::_()->storage()->create($thumb_file, array(\n 'parent_type' => $video->getType(),\n 'parent_id' => $video->getIdentity()\n ));\n\n //REMOVE TEMP FILES\n @unlink($thumb_file);\n @unlink($tmp_file);\n } catch (Exception $e) {\n \n }\n $information = $this->handleInformation($video->type, $video->code);\n\n $video->duration = $information['duration'];\n if (!$video->description)\n $video->description = $information['description'];\n $video->photo_id = $thumbFileRow->file_id;\n $video->status = 1;\n $video->save();\n\n //INSERT NEW ACTION ITEM\n $insert_action = true;\n }\n\n if ($values['ignore'] == true) {\n\n $video->status = 1;\n $video->save();\n\n //INSERT NEW ACTION ITEM\n $insert_action = true;\n $owner = $video->getOwner();\n\n //INSERT NEW ACTION ITEM\n $action = Engine_Api::_()->getDbtable('actions', 'activity')->addActivity($owner, $video, 'video_new');\n if ($action != null) {\n Engine_Api::_()->getDbtable('actions', 'activity')->attachActivity($action, $video);\n }\n }\n\n //CREATE AUTH STUFF HERE\n $auth = Engine_Api::_()->authorization()->context;\n $roles = array('owner', 'owner_member', 'owner_member_member', 'owner_network', 'everyone');\n if (isset($values['auth_view']))\n $auth_view = $values['auth_view'];\n else\n $auth_view = \"everyone\";\n $viewMax = array_search($auth_view, $roles);\n\n foreach ($roles as $i => $role) {\n $auth->setAllowed($video, $role, 'view', ($i <= $viewMax));\n }\n\n if (isset($values['auth_comment']))\n $auth_comment = $values['auth_comment'];\n else\n $auth_comment = \"everyone\";\n $commentMax = array_search($auth_comment, $roles);\n foreach ($roles as $i => $role) {\n $auth->setAllowed($video, $role, 'comment', ($i <= $commentMax));\n }\n\n //ADD TAGS\n $tags = preg_split('/[,]+/', $values['tags']);\n $video->tags()->addTagMaps($viewer, $tags);\n $db->commit();\n $db->beginTransaction();\n try {\n if ($insert_action) {\n $owner = $video->getOwner();\n $action = Engine_Api::_()->getDbtable('actions', 'activity')->addActivity($owner, $video, 'video_new');\n if ($action != null) {\n Engine_Api::_()->getDbtable('actions', 'activity')->attachActivity($action, $video);\n }\n }\n\n //REBUILD PRIVACY\n $actionTable = Engine_Api::_()->getDbtable('actions', 'activity');\n foreach ($actionTable->getActionsByObject($video) as $action) {\n $actionTable->resetActivityBindings($action);\n }\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n $video_id = $video->getIdentity();\n $table = Engine_Api::_()->getItemTable('sitereview_clasfvideo', 'sitereview');\n $select = $table->select();\n $rName = $table->info('name');\n $select->where($rName . '.listing_id = ?', $listing_id);\n $row = $table->fetchAll($select);\n if ($video_id != NULL) {\n try {\n\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n\n $row = $table->createRow();\n $row->listing_id = $listing_id;\n $row->created = date('Y-m-d H:i:s');\n $row->video_id = $video_id;\n $row->save();\n\n $activityApi = Engine_Api::_()->getDbtable('actions', 'activity');\n $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n $subject = $sitereview;\n $subjectOwner = $subject->getOwner('user');\n\n if (time() >= strtotime($sitereview->creation_date)) {\n $action = Engine_Api::_()->getDbtable('actions', 'activity')->addActivity($viewer, $subject, 'video_sitereview_listtype_' . $listingtype_id, '', array(\n 'owner' => $subjectOwner->getGuid(),\n 'title' => $subject->getTitle()\n ));\n\n if ($action != null) {\n Engine_Api::_()->getDbtable('actions', 'activity')->attachActivity($action, $video);\n }\n }\n $db->commit();\n unset($_POST);\n if ($canEdit) {\n return $this->_gotoRouteCustom(array('action' => 'edit', 'listing_id' => $listing_id), \"sitereview_videospecific_listtype_$listingtype_id\", true);\n } else {\n $content_id = $this->_getParam('content_id');\n return $this->_gotoRouteCustom(array('listing_id' => $listing_id, 'slug' => $sitereview->getSlug(), 'tab' => $content_id), \"sitereview_entry_view_listtype_$listingtype_id\", true);\n }\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n }\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n }\n }", "public function testListPagination()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs(User::find(1))\n ->visit('admin/users')\n ->assertSee('Users Gestion')\n ->clickLink('3')\n ->assertSee('GreatRedactor');\n });\n }", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// \"detail_v_bid_histories_admin\"\n\t\t$item = &$this->ListOptions->Add(\"detail_v_bid_histories_admin\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->Visible = $Security->AllowList(CurrentProjectID() . 'v_bid_histories_admin') && !$this->ShowMultipleDetails;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\tif (!isset($GLOBALS[\"v_bid_histories_admin_grid\"])) $GLOBALS[\"v_bid_histories_admin_grid\"] = new cv_bid_histories_admin_grid;\n\n\t\t// Multiple details\n\t\tif ($this->ShowMultipleDetails) {\n\t\t\t$item = &$this->ListOptions->Add(\"details\");\n\t\t\t$item->CssClass = \"text-nowrap\";\n\t\t\t$item->Visible = $this->ShowMultipleDetails;\n\t\t\t$item->OnLeft = TRUE;\n\t\t\t$item->ShowInButtonGroup = FALSE;\n\t\t}\n\n\t\t// Set up detail pages\n\t\t$pages = new cSubPages();\n\t\t$pages->Add(\"v_bid_histories_admin\");\n\t\t$this->DetailPages = $pages;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\">\";\n\t\t$item->MoveTo(0);\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// \"sequence\"\n\t\t$item = &$this->ListOptions->Add(\"sequence\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->Visible = TRUE;\n\t\t$item->OnLeft = TRUE; // Always on left\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = FALSE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = TRUE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// \"view\"\n\t\t$item = &$this->ListOptions->Add(\"view\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanView();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"edit\"\n\t\t$item = &$this->ListOptions->Add(\"edit\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"copy\"\n\t\t$item = &$this->ListOptions->Add(\"copy\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanAdd();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"delete\"\n\t\t$item = &$this->ListOptions->Add(\"delete\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanDelete();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\">\";\n\t\t$item->MoveTo(0);\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = FALSE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = TRUE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "public function indexAction() {\n if (!Engine_Api::_()->core()->hasSubject('sitereview_listing')) {\n return $this->setNoRender();\n }\n\n //GET SUBJECT\n $this->view->sitereview = $sitereview = Engine_Api::_()->core()->getSubject('sitereview_listing');\n Engine_Api::_()->sitereview()->setListingTypeInRegistry($sitereview->listingtype_id);\n $sitereviewPhotoCarousel = Zend_Registry::isRegistered('sitereviewPhotoCarousel') ? Zend_Registry::get('sitereviewPhotoCarousel') : null;\n $this->view->listingType = $listingType = Zend_Registry::get('listingtypeArray' . $sitereview->listingtype_id);\n $this->view->listingtype_id = $sitereview->listingtype_id;\n $this->view->album = $album = $sitereview->getSingletonAlbum();\n $this->view->photo_paginator = $photo_paginator = $album->getCollectiblesPaginator();\n $this->view->total_images = $photo_paginator->getTotalItemCount();\n $minMum = $this->_getParam('minMum', 0);\n \n if (empty($this->view->total_images) || $this->view->total_images < $minMum || empty($sitereviewPhotoCarousel)) {\n return $this->setNoRender();\n }\n \n $this->view->itemCount = $itemCount = $this->_getParam('itemCount', 3);\n $this->view->includeInWidget = $this->_getParam('includeInWidget', null);\n $photo_paginator->setItemCountPerPage(100);\n \n if ($this->view->includeInWidget) {\n $this->getElement()->removeDecorator('Title');\n $this->getElement()->removeDecorator('Container');\n }\n }", "public function testFetchLists() {\n\t\t$jsonpad = parent::_getJsonpadInstance();\n\t\t\n\t\t// Create a couple of lists\n\t\t$listCount = 3;\n\t\tfor ($i = 0; $i < $listCount; $i++) {\n\t\t\t$listData = parent::_createTestListData(false, false);\n\t\t\t$jsonpad->createList($listData[\"name\"]);\n\t\t}\n\t\t\n\t\t// Fetch the lists\n\t\t$total = 0;\n\t\t$lists = $jsonpad->fetchLists(1, null, null, null, $total);\n\t\t$this->assertInternalType(\"array\", $lists);\n\t\t$this->assertGreaterThanOrEqual(1, $total);\n\t\t$this->assertInstanceOf(\"\\Jsonpad\\Resource\\ItemList\", $lists[0]);\n\t\t\n\t\t// Delete the lists\n\t\tforeach ($lists as $list) {\n\t\t\t$list->delete();\n\t\t}\n\t}", "function SetupListOptions() {\n\t\tglobal $Security, $scholarship_package;\n\n\t\t// \"edit\"\n\t\t$this->ListOptions->Add(\"edit\");\n\t\t$item =& $this->ListOptions->Items[\"edit\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"detail_scholarship_payment\"\n\t\t$this->ListOptions->Add(\"detail_scholarship_payment\");\n\t\t$item =& $this->ListOptions->Items[\"detail_scholarship_payment\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->AllowList('scholarship_payment');\n\t\t$item->OnLeft = FALSE;\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\tif ($scholarship_package->Export <> \"\" ||\n\t\t\t$scholarship_package->CurrentAction == \"gridadd\" ||\n\t\t\t$scholarship_package->CurrentAction == \"gridedit\")\n\t\t\t$this->ListOptions->HideAllOptions();\n\t}", "public function testIsOnTasksListPage()\n {\n $this->addTestFixtures();\n $this->logInAsUser();\n $this->client->request('GET', '/tasks');\n\n $response = $this->client->getResponse();\n $responseContent = $response->getContent();\n\n $statusCode = $response->getStatusCode();\n $this->assertEquals(200, $statusCode);\n $this->assertContains($this->task->getTitle(), $responseContent);\n $this->assertContains($this->task->getContent(), $responseContent);\n }", "public function testLayoutListCategories()\n {\n $user = $this->makeAdminToLogin();\n $this->browse(function (Browser $browser) use ($user) {\n $browser->loginAs($user)\n ->visit('/admin/categories')\n ->assertSee('List Categories')\n ->assertSeeLink('Admin')\n ->assertSee('ID')\n ->assertSee('Name')\n ->assertSee('Number of Books');\n });\n }", "public function test_admin_tribe_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Assignments', 'tribe_list']);\n $this->assertResponseCode(404);\n }", "public function testAdminCanViewThePageIndex()\n {\n $this->initPosts();\n\n $response = $this\n ->actingAs($this->admin)\n ->get('/admin/blog/pages');\n \n $response->assertStatus(200);\n $response->assertSee('Title one');\n $response->assertSee('Title two');\n }", "public function testList()\n {\n $this->visit('/admin/school')\n ->see(SchoolCrudController::SINGLE_NAME);\n }", "public function testListExperts()\n {\n }", "function SetupListOptions() {\r\n\t\tglobal $Security, $Language;\r\n\r\n\t\t// \"edit\"\r\n\t\t$item = &$this->ListOptions->Add(\"edit\");\r\n\t\t$item->CssStyle = \"white-space: nowrap;\";\r\n\t\t$item->Visible = $Security->CanEdit();\r\n\t\t$item->OnLeft = TRUE;\r\n\r\n\t\t// Call ListOptions_Load event\r\n\t\t$this->ListOptions_Load();\r\n\t}", "public function test_list()\n {\n $response = $this->get('/proposal/all');\n\n $response->assertSee('data-js-proposal-cards');\n\n $response->assertSee('card-header');\n\n $response->assertStatus(200);\n }", "public function videoListDisplayed(AcceptanceTester $I)\n {\n $I->wantTo('Verify Video List is displayed on the Edit Episode page. - C15640');\n if(EpisodeEditCest::$environment == 'staging')\n {\n $guid = TestContentGuids::$episodeViewData_staging;\n }\n else //proto0\n {\n $guid = TestContentGuids::$episodeViewData_proto0;\n }\n $I->amOnPage(ContentPage::$contentUrl . $guid);\n\n $I->expect('Video List is displayed.');\n $I->waitForElementVisible(ContentPage::$clickableTable, 30);\n $I->see('VIDEOS');\n $I->see('series_view_filled_data_automation_1_episode_1_media_id', ContentPage::$videoTable);\n }", "public function test_admin_usecase_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Assignments', 'usecase_list']);\n $this->assertResponseCode(404);\n }", "private function fillWidgetList()\n {\n $this->list = array(\n 'humor' => array(\n 'class' => 'w-scuba-humor',\n 'name' => 'Scuba Humor',\n 'content' => '1'\n ),\n 'community' => array(\n 'class' => 'w-community',\n 'name' => 'Community',\n 'content' => '1'\n ),\n 'dive-news' => array(\n 'class' => 'w-dive-news',\n 'name' => 'Dive News',\n 'content' => array('frontend/news', Config::NUMPAGE_WIDGET_NEWS),\n 'file' => 'dive_news'\n ),\n 'travel-forums' => array(\n 'class' => 'w-travel-forums',\n 'name' => 'Travel Forums',\n 'content' => '1',\n 'file' => 'travel_forums'\n ),\n 'travel-blogs' => array(\n 'class' => 'w-travel-blogs',\n 'name' => 'Travel Blogs',\n 'content' => '1',\n 'file' => 'travel_blogs'\n ),\n 'advertisement' => array(\n 'class' => 'w-advertisement',\n 'name' => 'Advertisement',\n 'content' => '1'\n ),\n 'video' => array(\n 'class' => 'w-video',\n 'name' => 'Video',\n 'content' => '1'\n ),\n 'newsletter' => array(\n 'class' => 'w-sdtn-e-newsletter',\n 'name' => 'SDTN E-Newsletter',\n 'content' => '1'\n ),\n 'facebook' => array(\n 'class' => 'w-find-us-on-facebook',\n 'name' => '',\n 'content' => true\n ),\n 'blog' => array(\n 'class' => 'w-sdtn-blog',\n 'name' => 'SDTN Blog',\n 'content' => array('frontend/blog', Config::NUMPAGE_WIDGET_BLOG)\n ),\n 'google' => array(\n 'class' => 'w-google-ads',\n 'name' => 'Google Ads',\n 'content' => true\n )\n );\n }", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// \"edit\"\n\t\t$item = &$this->ListOptions->Add(\"edit\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<div class=\\\"checkbox\\\"><label><input class=\\\"magic-checkbox\\\" type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\"><span></span></label></div>\";\n\t\t$item->MoveTo(0);\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = FALSE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = TRUE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "public function testListingWithFilters()\n {\n $filters[] = ['limit' => 30, 'page' => 30];\n $filters[] = ['listing_type' => 'public'];\n foreach ($filters as $k => $v) {\n $client = static::createClient();\n $client->request('GET', '/v2/story', $v, [], $this->headers);\n $this->assertStatusCode(200, $client);\n\n $response = json_decode($client->getResponse()->getContent(), true);\n $this->assertTrue(is_array($response));\n }\n }", "public function testListServers()\n {\n }", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<div class=\\\"checkbox\\\"><label><input class=\\\"magic-checkbox\\\" type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\"><span></span></label></div>\";\n\t\t$item->MoveTo(0);\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = FALSE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = TRUE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "public function testFetchList() {\n\t\t$jsonpad = parent::_getJsonpadInstance();\n\t\t\n\t\t// Create a list\n\t\t$listData = parent::_createTestListData(false, false);\n\t\t$list = $jsonpad->createList($listData[\"name\"]);\n\t\t\n\t\t// Fetch the list\n\t\t$listCopy = $jsonpad->fetchList($listData[\"name\"]);\n\t\t$this->assertSame($list->getName(), $listCopy->getName());\n\t\t\n\t\t// Delete the list\n\t\t$listCopy->delete();\n\t}", "public function testCollectionsApi()\n {\n $response = $this->withHeaders([\n 'X-Secure-Code' => '12345678',\n ])->getJson('api/collections/0');\n\n $response->assertStatus(200)\n ->assertJsonPath('title','親子步道')\n ->assertJsonStructure([\n 'id',\n 'title',\n 'subTitle',\n 'bgColor',\n 'iconImage',\n 'trails',\n ]);\n }", "public function test_list_page_shows_all_tasks()\n {\n\n // creiamo dei task e ci assicuriamo che nella vista ci siano un certo particolare set di dati\n // i assicuro che alla vista venga passata la ariabile dal controller ma non che sia stampata nella vista\n\n $task1 = factory(Task::class)->create();\n $task2 = factory(Task::class)->create();\n\n $this->get('tasks')\n ->assertViewHas('tasks')\n ->assertViewHas('tasks', Task::with('actions')->get())\n ->assertViewHasAll([\n 'tasks' => Task::with('actions')->get(),\n 'title' => 'Tasks page'\n ])->assertViewMissing('dogs');\n }", "public function testJobList()\n {\n\n }", "public function _testMultipleInventories()\n {\n\n }", "function components_list(){\n\n\t\t?><li data-type=\"test\" title=\"Sample Title\"></li><?php\n\t}", "public function testListSiteMemberships()\n {\n }", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// \"edit\"\n\t\t$item = &$this->ListOptions->Add(\"edit\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\">\";\n\t\t$item->MoveTo(0);\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = FALSE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = TRUE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "public function test_admin_squad_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Assignments', 'squad_list']);\n $this->assertResponseCode(404);\n }", "function testMenuLink()\n\t{\n\t\t$this->open(JOOMLA_LOCATION.'index.php');\n\t\t$this->waitPageLoad();\n\t\t$this->click(\"//div[@id='leftcolumn']/div[2]/div/div/div/ul/li[10]/a/span\");\n\t\t$this->waitPageLoad();\n\t\t\n\t\t/*\n\t\t$option = JRequest::getCmd('option');\n\t\t$view\t= JRequest::getCmd('view');\n\t\t$this->assertTrue($option == 'com_xius');\n\t\t$this->assertTrue($view == 'users');\n\t\t*/\n\t\t\n\t\t$this->select(\"field2\", \"label=Female\");\n\t\t$this->click(\"xiussearch\");\n\t\t$this->waitPageLoad();\n\t\t$this->assertTrue($this->isElementPresent(\"//span[@id='total_29']\"));\n\t\t$this->assertTrue($this->isTextPresent(\"Refined By\"));\t\n\n\t\t// test for display all list\n\t\t$this->open(JOOMLA_LOCATION.'index.php');\n\t\t$this->waitPageLoad();\n\t\t$this->click(\"//div[@id='leftcolumn']/div[2]/div/div/div/ul/li[11]/a/span\");\n\t\t$this->waitPageLoad();\n\t\t$this->assertTrue($this->isTextPresent(\"All male from 09/05/2009 to 19/05/2009\"));\n\t\t$this->assertTrue($this->isTextPresent(\"All female\"));\n\t\t\n\t\t// test for display Particular list\n\t\t$this->open(JOOMLA_LOCATION.'index.php');\n\t\t$this->waitPageLoad();\n\t\t$this->click(\"//div[@id='leftcolumn']/div[2]/div/div/div/ul/li[12]/a/span\");\n\t\t$this->waitPageLoad();\n\t\t$this->assertTrue($this->isTextPresent(\"All male from 09/05/2009 to 19/05/2009\"));\n\t\t$this->assertTrue($this->isElementPresent(\"//img[@class='xius_test_remove_Male']\"));\n\t\t$this->assertTrue($this->isElementPresent(\"//img[@class='xius_test_remove_From 09-05-2009 To 19-05-2009']\"));\n\t\t$this->assertTrue($this->isElementPresent(\"//span[@id='total_0']\"));\n\t\t\n\t\t// test clear all\n\t\t$this->click(\"//img[@title='Clear All']\");\n\t\t$this->waitPageLoad();\n\t\t$this->assertFalse($this->isElementPresent(\"//img[@class='xius_test_remove_Male']\"));\n\t\t$this->assertFalse($this->isElementPresent(\"//img[@class='xius_test_remove_From 09-05-2009 To 19-05-2009']\"));\n\t\t$this->assertTrue($this->isElementPresent(\"//span[@id='total_59']\"));\n\t}", "public function testContentTypesLists()\n {\n $this->contentTypeItemTest('products');\n $this->contentTypeItemTest('blogs');\n $this->contentTypeItemTest('app_flows');\n $this->contentTypeItemTest('lists');\n $this->contentTypeItemTest('user_reviews');\n $this->contentTypeItemTest('boards');\n }", "public function testListPeople()\n {\n }", "public function testListIdentities()\n {\n }", "public function testListIdentities()\n {\n }", "public function testSortListCategoriesWhenPanigate()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs($this->user)\n ->visit('admin/categories')\n ->resize(1200, 1600)\n ->click(\"#category-sort-name a\")\n ->clickLink(\"2\");\n // Test list Asc\n $arrayAsc = Category::orderBy('name', 'asc')->pluck('name')->toArray();\n $arraySortAsc = array_chunk($arrayAsc, 15)[1];\n for ($i = 1; $i <= 2; $i++) {\n $selector = \".table tbody tr:nth-child($i) td:first-child\";\n $this->assertEquals($browser->text($selector), $arraySortAsc[$i - 1]);\n }\n // Test list Desc\n $browser->click(\"#category-sort-name a\")\n ->clickLink(\"2\");\n $arrayDesc = Category::orderBy('name', 'desc')->pluck('name')->toArray();\n $arraySortDesc = array_chunk($arrayDesc, 15)[1];\n for ($i = 1; $i <= 2; $i++) {\n $selector = \".table tbody tr:nth-child($i) td:first-child\";\n $this->assertEquals($browser->text($selector), $arraySortDesc[$i - 1]);\n }\n });\n }", "public function test_admin_training_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/MemberSkills', 'training_programs']);\n $this->assertResponseCode(404);\n }", "public function test_notes_list()\n {\n Note::create(['note'] => 'Mi primera nota');\n Note::create(['note'] => 'Segunda nota');\n $this->visit('notes')\n ->see('Mi primera nota')\n ->see('Segunda nota');\n }", "public function testPastWebinars()\n {\n }", "public function testListEmpty()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/admin/comment')\n ->assertSee('List comment & rating');\n $elements = $browser->elements('#list-table tbody tr');\n $this->assertCount(0, $elements);\n $this->assertNull($browser->element('.paginate'));\n });\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function testmenuAction()\n {\n parent::login();\n $this->clickAt(\"link=CMS\", \"\");\n $this->click(\"link=Menus\");\n $this->waitForPageToLoad(\"30000\");\n $this->isElementPresent(\"id=sortable1\");\n $this->isElementPresent(\"id=sortable2\");\n parent::logout();\n }", "abstract protected function displayList($list);", "public function testWebinars()\n {\n }", "function obj_cx_events_list_section( $events, $bottom_banner, $pagination, $event_list_deets = null, $section_classes = null, $bg_shapes = null ) {\n\n\t$sec_meta = decide_section_meta( 'event-list-section', $section_classes, $event_list_deets, $bg_shapes );\n\n\tif ( ! empty( $event_list_deets ) ) {\n\t\tdo_section_top( $sec_meta );\n\t\tobj_cx_events_list_inner( $events, $bottom_banner, $pagination, $event_list_deets );\n\t\tdo_section_bottom( $sec_meta );\n\t}\n}", "public function testGetCollections()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "function SetupListOptions() {\r\n\t\tglobal $Security, $Language, $rekeningju;\r\n\r\n\t\t// \"griddelete\"\r\n\t\tif ($rekeningju->AllowAddDeleteRow) {\r\n\t\t\t$item =& $this->ListOptions->Add(\"griddelete\");\r\n\t\t\t$item->CssStyle = \"white-space: nowrap;\";\r\n\t\t\t$item->OnLeft = TRUE;\r\n\t\t\t$item->Visible = FALSE; // Default hidden\r\n\t\t}\r\n\r\n\t\t// Call ListOptions_Load event\r\n\t\t$this->ListOptions_Load();\r\n\t}", "public function testIndexAdminMaps()\n {\n parent::setUpPage();\n parent::setSession('administrator');\n\n $link = $this->webDriver->findElement(WebDriverBy::linkText('All Maps'));\n $link->click();\n $map_list = $this->webDriver->findElements(WebDriverBy::cssSelector('#usermaps > table > tbody > tr'));\n $this->assertEquals(count($map_list), 2);\n }", "public function testAjaxGetVenueListCanBeAccessed()\n {\n $this->dispatch('/venue/ajax-get-venue-list');\n $this->assertResponseStatusCode(200);\n }", "function team_list()\n {\n }", "public function panelist_dwid_freshness() {\n\n\t\tif (!$this->get_settings()) {\n\t\t\treturn;\n\t\t}\n\t\t$http = new HttpSocket(array(\n\t\t\t'timeout' => 15,\n\t\t\t'ssl_verify_host' => false // PHP does not seem to check SANs for CNs\n\t\t));\n\t\t$results = $http->get($this->settings['hostname.mbd'].'/ignite/getinvites?X-ApiKey='.$this->settings['mbd.api_key'], $this->options);\t\t\n\t\t$results = json_decode($results, true);\n\n\t\t$fp = fopen(WWW_ROOT.'/files/mbd-panelist-analysis.csv', 'w');\n \t \tfputcsv($fp, array(\n\t\t\t'Sample ID', \n\t\t\t'Sample Date',\n\t\t\t'Expire Date',\n\t\t\t'Panelist ID',\n\t\t\t'Active',\n\t\t\t'Panelist Last Active'\n\t\t));\n\t\t$total = count($results); \n\t\t$this->out('Total of '.$total.' results');\n\t\t$i = 0; \n\t\tif (!empty($results)) {\n\t\t\tforeach ($results as $result) {\n\t\t\t\t$active = $http->get($result['url'].'&test=true',\n\t\t\t\t\tarray(),\n\t\t\t\t\tarray('header' => array(\n\t\t\t\t\t\t'Accept' => 'application/json',\n\t\t\t\t\t\t'Content-Type' => 'application/json; charset=UTF-8'\n\t\t\t\t\t))\n\t\t\t\t);\n\t\t\t\t$user = $this->User->find('first', array(\n\t\t\t\t\t'fields' => array('User.last_touched'),\n\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t'User.id' => $result['panelistId']\n\t\t\t\t\t),\n\t\t\t\t\t'recursive' => -1\n\t\t\t\t));\n\t\t \t \tfputcsv($fp, array(\n\t\t\t\t\t$result['sampleId'],\n\t\t\t\t\t$result['sampleDate'],\n\t\t\t\t\t$result['expireDate'],\n\t\t\t\t\t$result['panelistId'],\n\t\t\t\t\t$active['body'],\n\t\t\t\t\t$user['User']['last_touched']\n\t\t\t\t));\n\t\t\t\t$i++;\n\t\t\t\t$this->out($i.'/'.$total);\n\t\t\t}\n\t\t}\n\t\tfclose($fp);\n\t}", "public function testGetFormList(): void\n {\n $forms = factory(Form::class, 5)->create()->map(function ($form) {\n return $form;\n });\n\n $this->get(route('form.index'))\n ->assertStatus(200)\n ->assertJson([\n 'success' => true,\n 'data' => $forms->toArray(),\n 'message' => __('messages.list_record', ['model' => Form::$name]),\n ]);\n }", "public function indexAction() {\n $panelsModel = new Datasource_Cms_Panels();\n $panels = $panelsModel->getAll();\n\n $this->view->panelsList = $this->view->partialLoop('/partials/panels-row.phtml', $panels);\n }", "function _cmd_list(SGL_Registry $input, SGL_Output $output)\n {\n SGL::logMessage(null, PEAR_LOG_DEBUG);\n $output->template = 'pageList.html';\n $output->mode = 'Browse';\n\n // get all sections\n $aSections = $this->da->getSectionTree();\n $output->results = $aSections;\n\n $output->pageArrayJS = $this->_createNodesArrayJS($aSections);\n $output->addOnLoadEvent(\"switchRowColorOnHover()\");\n }", "public function test_admin_group_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Assignments', 'group_list']);\n $this->assertResponseCode(404);\n }", "public function index()\r\n {\r\n $this->page_list_grid();\r\n }", "public function editAction() {\n\n //GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n\n //GET SITEREVIEW SUBJECT\n $this->view->sitereview = $sitereview = Engine_Api::_()->core()->getSubject();\n\n $this->view->listingtype_id = $listingtype_id = $this->_listingType->listingtype_id;\n\n $this->view->slideShowEnanle = $this->slideShowEnable($listingtype_id);\n\n $this->view->listing_singular_uc = ucfirst($this->_listingType->title_singular);\n $this->view->listing_singular_lc = strtolower($this->_listingType->title_singular);\n\n //AUTHORIZATION CHECK\n if (!$this->_helper->requireAuth()->setAuthParams($sitereview, $viewer, \"edit_listtype_$listingtype_id\")->isValid()) {\n return;\n }\n\n $this->view->content_id = Engine_Api::_()->sitereview()->getTabId($listingtype_id, 'sitereview.video-sitereview');\n\n //SELECTED TAB\n $this->view->TabActive = \"video\";\n\n if (!Engine_API::_()->seaocore()->checkSitemobileMode('fullsite-mode')) {\n $this->_helper->content\n ->setContentName(\"sitereview_videoedit_edit_listtype_$listingtype_id\")\n //->setNoRender()\n ->setEnabled();\n }\n\n //GET VIDEOS\n $this->view->type_video = $type_video = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitereview.show.video');\n\n if ($type_video && isset($sitereview->main_video['corevideo_id'])) {\n $this->view->main_video_id = $sitereview->main_video['corevideo_id'];\n } elseif (isset($sitereview->main_video['reviewvideo_id'])) {\n $this->view->main_video_id = $sitereview->main_video['reviewvideo_id'];\n }\n\n $this->view->videos = $videos = array();\n $this->view->integratedWithVideo = false;\n $sitevideoEnabled = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitevideo');\n if ($sitevideoEnabled && (Engine_Api::_()->getDbtable('modules', 'sitevideo')->getIntegratedModules(array('enabled' => 1, 'item_type' => \"sitereview_listing_$sitereview->listingtype_id\", 'item_module' => 'sitereview')))) {\n $params = array();\n $params['parent_type'] = $sitereview->getType() . '_' . $sitereview->listingtype_id;\n $params['parent_id'] = $sitereview->listing_id;\n $this->view->videos = $videos = Engine_Api::_()->getDbTable('videos', 'sitevideo')->getVideoPaginator($params);\n $this->view->integratedWithVideo = true;\n } else {\n if (Engine_Api::_()->sitereview()->enableVideoPlugin() && !empty($type_video)) {\n $this->view->videos = $videos = Engine_Api::_()->getItemTable('sitereview_clasfvideo', 'sitereview')->getListingVideos($sitereview->listing_id, 0, 1);\n } elseif (empty($type_video)) {\n $this->view->videos = $videos = Engine_Api::_()->getItemTable('sitereview_clasfvideo', 'sitereview')->getListingVideos($sitereview->listing_id, 0, 0);\n }\n }\n\n $allowed_upload_video = Engine_Api::_()->sitereview()->allowVideo($sitereview, $viewer, count($videos), $uploadVideo = 1);\n $this->view->upload_video = 1;\n if (Engine_Api::_()->sitereview()->hasPackageEnable()) {\n $this->view->upload_video = $allowed_upload_video;\n } else {\n if (empty($allowed_upload_video)) {\n return $this->_forwardCustom('requireauth', 'error', 'core');\n }\n }\n\n $this->view->count = count($videos);\n\n //MAKE FORM\n $this->view->form = $form = new Sitereview_Form_Video_Editvideo();\n\n foreach ($videos as $video) {\n\n $subform = new Sitereview_Form_Video_Edit(array('elementsBelongTo' => $video->getGuid()));\n\n if ($video->status != 1) {\n if ($video->status == 0 || $video->status == 2):\n $msg = $this->view->translate(\"Your video is currently being processed - you will be notified when it is ready to be viewed.\");\n elseif ($video->status == 3):\n $msg = $this->view->translate(\"Video conversion failed. Please try again.\");\n elseif ($video->status == 4):\n $msg = $this->view->translate(\"Video conversion failed. Video format is not supported by FFMPEG. Please try again.\");\n elseif ($video->status == 5):\n $msg = $this->view->translate(\"Video conversion failed. Audio files are not supported. Please try again.\");\n elseif ($video->status == 7):\n $msg = $this->view->translate(\"Video conversion failed. You may be over the site upload limit. Try a smaller file, or delete some files to free up space.\");\n endif;\n\n $subform->addElement('dummy', 'mssg' . $video->video_id, array(\n 'description' => $msg,\n 'decorators' => array(\n 'ViewHelper',\n array('HtmlTag', array('tag' => 'div', 'class' => 'tip')),\n array('Description', array('tag' => 'span', 'placement' => 'APPEND')),\n array('Description', array('placement' => 'APPEND')),\n ),\n ));\n $t = 'mssg' . $video->video_id;\n $subform->$t->getDecorator(\"Description\")->setOption(\"placement\", \"append\");\n }\n $subform->populate($video->toArray());\n $form->addSubForm($subform, $video->getGuid());\n }\n\n //CHECK METHOD\n if (!$this->getRequest()->isPost()) {\n return;\n }\n\n //FORM VALIDATION\n if (!$form->isValid($this->getRequest()->getPost())) {\n return;\n }\n\n //GET FORM VALUES\n $values = $form->getValues();\n\n if (isset($_POST['corevideo_cover']) && !empty($_POST['corevideo_cover'])) {\n if (isset($sitereview->main_video) && !empty($sitereview->main_video)) {\n $sitereview->main_video = array_merge((array) $sitereview->main_video, array('corevideo_id' => $_POST['corevideo_cover']));\n } else {\n $sitereview->main_video = array('corevideo_id' => $_POST['corevideo_cover']);\n }\n } elseif (isset($_POST['reviewvideo_cover']) && $_POST['reviewvideo_cover']) {\n if (isset($sitereview->main_video) && !empty($sitereview->main_video)) {\n $sitereview->main_video = array_merge((array) $sitereview->main_video, array('reviewvideo_id' => $_POST['reviewvideo_cover']));\n } else {\n $sitereview->main_video = array('reviewvideo_id' => $_POST['reviewvideo_cover']);\n }\n }\n\n $sitereview->save();\n\n //VIDEO SUBFORM PROCESS IN EDITING\n foreach ($videos as $video) {\n $subform = $form->getSubForm($video->getGuid());\n\n $values = $subform->getValues();\n $values = $values[$video->getGuid()];\n if (isset($values['delete']) && $values['delete'] == '1') {\n Engine_Api::_()->getDbtable('videos', 'sitereview')->delete(array('video_id = ?' => $video->video_id, 'listing_id = ?' => $sitereview->listing_id));\n Engine_Api::_()->getDbtable('actions', 'activity')->delete(array('type = ?' => 'video_sitereview_listtype_' . $listingtype_id, 'object_id = ?' => $sitereview->listing_id));\n } else {\n $video->setFromArray($values);\n $video->save();\n }\n }\n\n return $this->_helper->redirector->gotoRoute(array('action' => 'edit', 'listing_id' => $sitereview->listing_id), \"sitereview_videospecific_listtype_$listingtype_id\", true);\n }", "public function listAction() {\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n $photo_id = (int) $this->_getParam('photo_id');\n\n // CHECK AUTHENTICATION\n // CHECK AUTHENTICATION\n if (Engine_Api::_()->core()->hasSubject('sitereview_listing')) {\n $sitereview = $subject = Engine_Api::_()->core()->getSubject('sitereview_listing');\n } else if (Engine_Api::_()->core()->hasSubject('sitereview_photo')) {\n $photo = $subject = Engine_Api::_()->core()->getSubject('sitereview_photo');\n $listing_id = $photo->listing_id;\n $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n }\n $bodyResponse = $tempResponse = array();\n $listing_singular_uc = ucfirst($this->_listingType->title_singular);\n $can_edit = $sitereview->authorization()->isAllowed($viewer, \"edit_listtype_$sitereview->listingtype_id\");\n $listingtype_id = $this->_listingType->listingtype_id;\n //AUTHORIZATION CHECK\n $allowed_upload_photo = Engine_Api::_()->authorization()->isAllowed($sitereview, $viewer, \"photo_listtype_$listingtype_id\");\n if (Engine_Api::_()->sitereview()->hasPackageEnable()) {\n $photoCount = Engine_Api::_()->getItem('sitereviewpaidlisting_package', $sitereview->package_id)->photo_count;\n $paginator = $sitereview->getSingletonAlbum()->getCollectiblesPaginator();\n\n if (Engine_Api::_()->sitereviewpaidlisting()->allowPackageContent($sitereview->package_id, \"photo\")) {\n $allowed_upload_photo = $allowed_upload_photo;\n if (empty($photoCount))\n $allowed_upload_photo = $allowed_upload_photo;\n elseif ($photoCount <= $paginator->getTotalItemCount())\n $allowed_upload_photo = 0;\n } else\n $allowed_upload_photo = 0;\n } else\n $allowed_upload_photo = $allowed_upload_photo;\n\n //GET ALBUM\n $album = $sitereview->getSingletonAlbum();\n\n\n /* RETURN THE LIST OF IMAGES, IF FOLLOWED THE FOLLOWING CASES: \n * - IF THERE ARE GET METHOD AVAILABLE.\n * - iF THERE ARE NO $_FILES AVAILABLE.\n */\n if (empty($_FILES) && $this->getRequest()->isGet()) {\n $requestLimit = $this->getRequestParam(\"limit\", 10);\n $page = $requestPage = $this->getRequestParam(\"page\", 1);\n\n //GET PAGINATOR\n $album = $sitereview->getSingletonAlbum();\n $paginator = $album->getCollectiblesPaginator();\n\n $bodyResponse[' totalPhotoCount'] = $totalItemCount = $bodyResponse['totalItemCount'] = $paginator->getTotalItemCount();\n $paginator->setItemCountPerPage($requestLimit);\n $paginator->setCurrentPageNumber($requestPage);\n // Check the Page Number for pass photo_id.\n if (!empty($photo_id)) {\n for ($page = 1; $page <= ceil($totalItemCount / $requestLimit); $page++) {\n $paginator->setCurrentPageNumber($page);\n $tmpGetPhotoIds = array();\n foreach ($paginator as $photo) {\n $tmpGetPhotoIds[] = $photo->photo_id;\n }\n if (in_array($photo_id, $tmpGetPhotoIds)) {\n $bodyResponse['page'] = $page;\n break;\n }\n }\n }\n\n if ($totalItemCount > 0) {\n foreach ($paginator as $photo) {\n $tempImages = $photo->toArray();\n\n // Add images\n $getContentImages = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($photo);\n $tempImages = array_merge($tempImages, $getContentImages);\n\n $tempImages['user_title'] = $photo->getOwner()->getTitle();\n $tempImages['likes_count'] = $photo->likes()->getLikeCount();\n $tempImages['is_like'] = ($photo->likes()->isLike($viewer)) ? 1 : 0;\n \n //Sitereaction Plugin work start here\n if (Engine_Api::_()->getApi('Siteapi_Feed', 'advancedactivity')->isSitereactionPluginLive()) {\n if (Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('sitereaction') && Engine_Api::_()->getApi('settings', 'core')->getSetting('sitereaction.reaction.active', 1)) {\n $popularity = Engine_Api::_()->getApi('core', 'sitereaction')->getLikesReactionPopularity($photo);\n $feedReactionIcons = Engine_Api::_()->getApi('Siteapi_Core', 'sitereaction')->getLikesReactionIcons($popularity, 1);\n $tempImages['reactions']['feed_reactions'] =$tempImages['feed_reactions'] = $feedReactionIcons;\n\n if (isset($viewer_id) && !empty($viewer_id)) {\n $myReaction = $photo->likes()->getLike($viewer);\n if (isset($myReaction) && !empty($myReaction) && isset($myReaction->reaction) && !empty($myReaction->reaction)) {\n $myReactionIcon = Engine_Api::_()->getApi('Siteapi_Core', 'sitereaction')->getIcons($myReaction->reaction, 1);\n $tempImages['reactions']['my_feed_reaction'] =$tempImages['my_feed_reaction'] = $myReactionIcon;\n }\n }\n }\n }\n //Sitereaction Plugin work end here\n if (!empty($viewer) && ($tempMenu = $this->getRequestParam('menu', 1)) && !empty($tempMenu)) {\n $menu = array();\n\n if ($photo->user_id == $viewer_id) {\n $menu[] = array(\n 'label' => $this->translate('Edit'),\n 'name' => 'edit',\n 'url' => 'listings/photo/edit/' . $sitereview->getIdentity(),\n 'urlParams' => array(\n \"photo_id\" => $photo->getIdentity()\n )\n );\n\n $menu[] = array(\n 'label' => $this->translate('Delete'),\n 'name' => 'delete',\n 'url' => 'listings/photo/delete/' . $sitereview->getIdentity(),\n 'urlParams' => array(\n \"photo_id\" => $photo->getIdentity()\n )\n );\n }\n $menu[] = array(\n 'label' => $this->translate('Share'),\n 'name' => 'share',\n 'url' => 'activity/index/share',\n 'urlParams' => array(\n \"type\" => $photo->getType(),\n \"id\" => $photo->getIdentity()\n )\n );\n\n $menu[] = array(\n 'label' => $this->translate('Report'),\n 'name' => 'report',\n 'url' => 'report/create/subject/' . $photo->getGuid()\n );\n\n $menu[] = array(\n 'label' => $this->translate('Make Profile Photo'),\n 'name' => 'make_profile_photo',\n 'url' => 'members/edit/external-photo',\n 'urlParams' => array(\n \"photo\" => $photo->getGuid()\n )\n );\n\n $tempImages['menu'] = $menu;\n }\n\n if (isset($tempImages) && !empty($tempImages))\n $bodyResponse['images'][] = $tempImages;\n }\n }\n $bodyResponse['canUpload'] = $allowed_upload_photo;\n $this->respondWithSuccess($bodyResponse, true);\n } else if (isset($_FILES) && $this->getRequest()->isPost()) { // UPLOAD IMAGES TO RESPECTIVE EVENT\n if (empty($viewer_id) || empty($allowed_upload_photo))\n $this->respondWithError('unauthorized');\n $tablePhoto = Engine_Api::_()->getDbtable('photos', 'sitereview');\n $db = $tablePhoto->getAdapter();\n $db->beginTransaction();\n\n try {\n $viewer = Engine_Api::_()->user()->getViewer();\n $album = $sitereview->getSingletonAlbum();\n $rows = $tablePhoto->fetchRow($tablePhoto->select()->from($tablePhoto->info('name'), 'order')->order('order DESC')->limit(1));\n $order = 0;\n if (!empty($rows)) {\n $order = $rows->order + 1;\n }\n $params = array(\n 'collection_id' => $album->getIdentity(),\n 'album_id' => $album->getIdentity(),\n 'listing_id' => $sitereview->getIdentity(),\n 'user_id' => $viewer->getIdentity(),\n 'order' => $order\n );\n $photoCount = count($_FILES);\n if (isset($_FILES['photo']) && $photoCount == 1) {\n $photo_id = Engine_Api::_()->getApi('Siteapi_Core', 'sitereview')->createPhoto($params, $_FILES['photo'])->photo_id;\n if (!$sitereview->photo_id) {\n $sitereview->photo_id = $photo_id;\n $sitereview->save();\n }\n } else if (!empty($_FILES) && $photoCount > 1) {\n foreach ($_FILES as $photo) {\n Engine_Api::_()->getApi('Siteapi_Core', 'sitereview')->createPhoto($params, $photo);\n }\n }\n\n $db->commit();\n $this->successResponseNoContent('no_content', true);\n } catch (Exception $e) {\n $db->rollBack();\n }\n }\n }", "public function testGetAll()\n {\n $ret =\\App\\Providers\\ListsServiceProvider::getLists();\n \n $this->assertNotEmpty($ret);\n }", "public function renderListContent() {}", "function _elggx_lists_test($hook, $type, $value, $params) {\n\t$value[] = __DIR__ . '/tests/ElggxListsTest.php';\n\treturn $value;\n}", "public function testTaskVisibleOnPage(): void\n {\n $this->client->request('GET', '/');\n self::assertResponseIsSuccessful();\n self::assertSelectorTextContains('.widget-heading', 'Test Task');\n self::assertSelectorTextContains('.widget-subheading', 'Mike');\n }", "function GetWebPanelList()\n\t{\n\t\t$result = $this->sendRequest(\"GetWebPanelList\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function testIndex()\n\t{\n\t\t$data = [];\n\n\t\tforeach ($this->saddles as $saddle) {\n\t\t\t$data[] = [\n\t\t\t\t'id' => $saddle->id,\n\t\t\t\t'name' => $saddle->name,\n\t\t\t\t'horse' => [\n\t\t\t\t\t'id' => $saddle->horse->id,\n\t\t\t\t\t'stable_name' => $saddle->horse->stable_name,\n\t\t\t\t],\n\t\t\t\t'brand' => [\n\t\t\t\t\t'id' => $saddle->brand->id,\n\t\t\t\t\t'name' => $saddle->brand->name,\n\t\t\t\t],\n\t\t\t\t'style' => [\n\t\t\t\t\t'id' => $saddle->style->id,\n\t\t\t\t\t'name' => $saddle->style->name,\n\t\t\t\t],\n\t\t\t\t'type' => $saddle->type,\n\t\t\t\t'serial_number' => $saddle->serial_number,\n\t\t\t\t'created_at' => $saddle->created_at->format('d/m/Y'),\n\t\t\t];\n\t\t}\n\n\t\t$this->actingAs($this->admin, 'api')\n\t\t\t ->get('/api/v1/admin/saddles?per_page=9999')\n\t\t\t ->assertStatus(200)\n\t\t\t ->assertJson(['data' => $data]);\n\t}", "public function test_listSettings() {\n\n }", "public function testDisplayedTest() {\n\n $this->open('?r=site/page&view=test');\n $this->assertEquals('My Web Application - Test', $this->title());\n\n $elements = $this->elements($this->using('css selector')->value('#yw0 > li'));\n error_log(__METHOD__ . ' . count($var): ' . count($elements));\n foreach ($elements as $element) {\n $text = $element->byCssSelector('#yw0 > li > a')->text();\n error_log(__METHOD__ . ' . $text: ' . $text);\n\n if ($text === 'Test') {\n $element->click();\n $breadcrumbsTest = $this->byCssSelector('#page > div.breadcrumbs > span');\n $bool = $breadcrumbsTest->displayed();\n $this->assertEquals(True, $bool);\n $this->assertEquals('Test', $this->byCssSelector('#page > div.breadcrumbs > span')->text());\n break;\n }\n }\n sleep(1);\n }", "public function testJobListFromJobSchedule()\n {\n\n }", "public function test_list_players()\n {\n $players = $this->postScriptumServer->listPlayers();\n\n $this->assertCount(77, $players);\n }", "public function testRecordingListPage(): void\n {\n $recordingListPage = self::$recordingListPage;\n\n $this->assertInstanceOf(RecordingListPage::class, $recordingListPage);\n $this->assertSame(25, count($recordingListPage));\n\n $recording = $recordingListPage[0];\n\n $this->assertInstanceOf(Recording::class, $recording);\n }", "public function iCanSeeEventsForTheGroup()\n {\n $main = $this->getMainContext();\n /** @var \\Behat\\MinkExtension\\Context\\MinkContext $mink */\n $mink = $main->getSubcontext('mink');\n\n // Verify the existance of some things on the page that\n $mink->assertElementOnPage('#upcomingTab');\n $mink->assertElementOnPage('#pastTab');\n }", "function _videoLists($list_type='1', $vid_list, $start=0, $limit=0) {\r\n\t\tif ($limit==0)\r\n\t\t\t$limit = ($list_type=='1' ? $this->options['manage_list_max'] : $this->options['post_list_max']);\r\n\t\tif (!is_array($vid_list))\r\n\t\t\t$vid_list = unserialize(file_get_contents($this->data_txt));\r\n\t\tif (count($vid_list) < 1) return false;\r\n\t\t$vid_list = array_reverse((array) $vid_list);\r\n\t\t$link_format = '<a href=\"'.$this->videopop_url.'?vid=%1$d\" title=\"%2$s\" onclick=\"javascript:VideoPop(%3$d,\\'%1$d\\');return false;\">%4$s</a>';\r\n\t\t$count = 0;\r\n\t\t$next = false;\r\n\r\n\t\t$retval = \"<!--- list start --->\\n\";\r\n\t\t$retval .= \"<div id=\\\"videopop_list\\\">\\n\";\r\n\t\tif ($list_type=='1') {\r\n\t\t\t$retval .= \"<form method=\\\"post\\\" action=\\\"\".$this->admin_manage.\"\\\">\\n\";\r\n\t\t\t$retval .= \"<table id=\\\"VideoLists\\\" class=\\\"stats\\\">\";\r\n\t\t\t$retval .= \"<thead><tr>\\n\";\r\n\t\t\t$retval .= \"<th style=\\\"text-align:center;\\\">\".__('Name', $this->textdomain_name).\"</th>\\n\";\r\n\t\t\t$retval .= \"<th>\".__('Video type', $this->textdomain_name).\"</th>\\n\";\r\n\t\t\t$retval .= \"<th></th>\\n\";\r\n\t\t\t$retval .= \"</tr></thead>\\n\";\r\n\t\t} else {\r\n\t\t\t$retval .= \"<table id=\\\"VideoLists\\\" style=\\\"border-collapse:collapse;margin:10px 0;\\\">\";\r\n\t\t\t$retval .= \"<thead><tr>\\n\";\r\n\t\t\t$retval .= \"<th>&nbsp;</th>\\n\";\r\n\t\t\t$retval .= \"<th>\".__('In line', $this->textdomain_name).\"</th>\\n\";\r\n\t\t\t$retval .= \"<th>\".__('Name', $this->textdomain_name).\"</th>\\n\";\r\n\t\t\t$retval .= \"<th>\".__('Video type', $this->textdomain_name).\"</th>\\n\";\r\n\t\t\t$retval .= \"</tr></thead>\\n\";\r\n\t\t}\r\n\r\n\t\t$retval .= \"<tbody>\\n\";\r\n\t\t$class = \"\";\r\n\t\t$root_uri = preg_replace(\"/^(https?:\\/\\/[^\\/]*\\/).*$/i\", \"$1\", trailingslashit(get_bloginfo('wpurl')));\r\n\t\tforeach((array) $vid_list as $key => $a_value) {\r\n\t\t\tif ($count >= $limit + $start) {\r\n\t\t\t\t$next = true;\r\n\t\t\t\tbreak;\r\n\t\t\t} elseif ($count >= $start) {\r\n\t\t\t\t$a_value = $this->stripArray($a_value); // strip slashes\r\n\t\t\t\t$src = '../wp-content/videopop/'.$a_value['lynkvp_filename'];\r\n\t\t\t\t$is_type = '';\r\n\t\t\t\tif(!empty($a_value['lynkvp_url'])) {\r\n\t\t\t\t\t$src = \"http://\".$a_value['lynkvp_url'];\r\n\t\t\t\t\t$is_type = \"<span style=\\\"font-size:10px;\\\">URL</span>\";\r\n\t\t\t\t}\r\n\t\t\t\t$retval .= \"<tr\".$class.\">\\n\";\r\n\t\t\t\tif ($list_type=='1') {\r\n\t\t\t\t\t$retval .= \"<td>\";\r\n\t\t\t\t\tif ( current_user_can( $this->options['user_lvl'] ) ) {\r\n\t\t\t\t\t\t$retval .= \"<input type=\\\"submit\\\" value=\\\"\".__('edit', $this->textdomain_name).\"\\\" name=\\\"lynkvp_edit[\".$a_value['lynkvp_id'].\"]\\\" class=\\\"button\\\" style=\\\"font-size:10px;\\\" />&nbsp;&nbsp;&nbsp;\";\r\n\t\t\t\t\t\t$retval .= \"<input type=\\\"submit\\\" value=\\\"\".__('delete', $this->textdomain_name).\"\\\" name=\\\"lynkvp_del[\".$a_value['lynkvp_id'].\"]\\\" onclick=\\\"javascript:check=confirm('\".__('The links you created will not work anymore. Delete?', $this->textdomain_name).\"');if(check==false) return false;\\\" class=\\\"button\\\" style=\\\"font-size:10px;\\\" />&nbsp;&nbsp;&nbsp;\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$retval .= sprintf($link_format, $a_value['lynkvp_id'], $a_value['lynkvp_title'], (isset($a_value['lynkvp_width']) ? $a_value['lynkvp_width'] : $a_value['lynkvp_size']), $a_value['lynkvp_name']).'&nbsp;&nbsp;';\r\n\t\t\t\t\t$retval .= \"</td>\\n\";\r\n\t\t\t\t\t$retval .= \"<td>\".$a_value['lynkvp_type'].\"&nbsp;&nbsp;</td>\\n\";\r\n\t\t\t\t\t$retval .= \"<td>\".$is_type.\"&nbsp;&nbsp;</td>\\n\";\r\n\t\t\t\t\t$retval .= \"</tr>\\n\";\r\n\t\t\t\t\t$class = ($class=='' ? ' class=\"alt\"' : '');\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$retval .= \"<td><input type=\\\"submit\\\" value=\\\"\".__('Add to Editor', $this->textdomain_name).\"\\\" name=\\\"insert_\".$a_value['lynkvp_id'].\"\\\"\";\r\n\t\t\t\t\tif ($this->options['ins_shortcode'] == '1') {\r\n\t\t\t\t\t\t$retval .= \" onclick=\\\"javascript:vpInsertAtCursor(\";\r\n\t\t\t\t\t\t$retval .= \"vpEditCode('\".$a_value['lynkvp_id'].\"','\".$a_value['lynkvp_name'].\"','\".$a_value['lynkvp_caption'].\"',(inline_\".$a_value['lynkvp_id'].\".checked==true?true:false))\";\r\n\t\t\t\t\t\t$retval .= \");return false;\\\"\";\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$retval .= \" onclick='javascript:vpInsertAtCursor(\";\r\n\t\t\t\t\t\t$retval .= \"(inline_\".$a_value['lynkvp_id'].\".checked==false\";\r\n//\t\t\t\t\t\t$retval .= str_replace(\"<\", \"<\\\"+\\\"\", str_replace(\"=\", \"=\\\"+\\\"\", str_replace(\"&amp;\", \"&\\\"+\\\"amp;\", str_replace(\r\n//\t\t\t\t\t\t\t $root_uri\r\n//\t\t\t\t\t\t\t,\"/\"\r\n//\t\t\t\t\t\t ,\"?\\\"\".$this->_getLinkTag($a_value['lynkvp_id'], $a_value['lynkvp_name'], false, \"\\\\\".\"\\\"\").\"\\\"\".\":\\\"\".$this->_getLinkTag($a_value['lynkvp_id'], $a_value['lynkvp_name'], true , \"\\\\\".\"\\\"\").\"\\\"\"\r\n//\t\t\t\t\t\t\t))));\r\n\t\t\t\t\t\t$retval .= str_replace(\r\n\t\t\t\t\t\t\t array(\"<\", \"=\", \"&amp;\")\r\n\t\t\t\t\t\t\t,array(\"<\\\"+\\\"\", \"=\\\"+\\\"\", \"&\\\"+\\\"amp;\")\r\n\t\t\t\t\t\t ,\"?\\\"\".$this->_getLinkTag($a_value['lynkvp_id'], $a_value['lynkvp_name'], false, \"\\\\\".\"\\\"\").\"\\\"\".\":\\\"\".$this->_getLinkTag($a_value['lynkvp_id'], $a_value['lynkvp_name'], true , \"\\\\\".\"\\\"\").\"\\\"\"\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t$retval .= \"));return false;'\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$retval .= \" class=\\\"button\\\" style=\\\"font-size:10px;\\\" /></td>\\n\";\r\n\t\t\t\t\t$retval .= \"<td>&nbsp;&nbsp;<input type=\\\"checkbox\\\" name=\\\"inline_\".$a_value['lynkvp_id'].\"\\\" value=\\\"\\\" /></td>\\n\";\r\n\t\t\t\t\t$retval .= \"<td>\".sprintf($link_format, $a_value['lynkvp_id'], $a_value['lynkvp_title'], $a_value['lynkvp_size'], $a_value['lynkvp_name']).\"&nbsp;&nbsp;</td>\\n\";\r\n\t\t\t\t\t$retval .= \"<td>\".$a_value['lynkvp_type'].\"&nbsp;&nbsp;</td>\\n\";\r\n\t\t\t\t}\r\n\t\t\t\t$retval .= \"</tr>\\n\";\r\n\t\t\t}\r\n\t\t\t$count++;\r\n\t\t}\r\n\t\t$retval .= \"</tbody>\\n\";\r\n\t\t$retval .= \"</table>\\n\";\r\n\t\tif ($list_type=='1') $retval .= \"</form>\\n\";\r\n\r\n\t\t$retval .= \"<div id=\\\"videopop_navi\\\" style=\\\"width:95%;margin:0 auto;\\\">\";\r\n\t\t$retval .= \"<span style=\\\"float:left;\\\"><input type=\\\"submit\\\" value=\\\"&laquo; \".__('Prev', $this->textdomain_name).\"\\\" name=\\\"prev\\\" id=\\\"prev\\\" class=\\\"button\\\" style=\\\"visibility:\".($start > 0 ? 'visible' : 'hidden').\";\\\" />&nbsp;&nbsp;</span>\";\r\n\t\t$retval .= \"<span style=\\\"float:right;\\\">&nbsp;&nbsp;<input type=\\\"submit\\\" value=\\\"\".__('Next', $this->textdomain_name).\" &raquo;\\\" name=\\\"next\\\" id=\\\"next\\\" class=\\\"button\\\" style=\\\"visibility:\".($next==true ? 'visible' : 'hidden').\";\\\" /></span>\";\r\n\t\t$retval .= \"</div>\\n\";\r\n\r\n\t\t$retval .= \"</div>\\n\";\r\n\t\t$retval .= \"<!--- list end --->\\n\";\r\n\r\n\t\t$retval .= \"<script type=\\\"text/javascript\\\"> /*<![CDATA[ */\\n\";\r\n\t\t$retval .= \"jQuery(function(){\\n\";\r\n\t\t$retval .= \" jQuery('#prev').unbind('submit').unbind('click').click(function(){get_page(\".$list_type.\", 0, \".$limit.\");return false;});\\n\";\r\n\t\t$retval .= \" jQuery('#next').unbind('submit').unbind('click').click(function(){get_page(\".$list_type.\", \".$limit.\", \".$limit.\");return false;});\\n\";\r\n\t\t$retval .= \" jQuery('#videopop_list').css({height:(jQuery('#VideoLists').height()>180?jQuery('#VideoLists').height():180) + 20});\\n\";\r\n\t\t$retval .= \" function get_page(list_type, start_count, max_count){\\n\";\r\n\t\t$retval .= \" if (start_count < 0) {start_count = 0;}\\n\";\r\n\t\t$retval .= \" jQuery('#videopop_navi').fadeOut('normal');\\n\";\r\n\t\t$retval .= \" jQuery('#videopop_list').block({\\n\";\r\n\t\t$retval .= \" message: '<div style=\\\"margin:0 auto;padding:0 0 0 23px;width:100px;font:normal 12px Arial;background:url(\".$this->plugin_url.\"images/ajax-loader.gif) no-repeat 0 50%;\\\"><p style=\\\"margin:3em 0;\\\">\".__('Loading...', $this->textdomain_name).\"</p></div>'\\n\";\r\n\t\t$retval .= \" ,css: {border:\\\"1px solid #8C8C8C\\\"}\\n\";\r\n\t\t$retval .= \" ,overlayCSS: {backgroundColor:'#FFF',opacity:'0.6'}\\n\";\r\n\t\t$retval .= \" });\\n\";\r\n\t\t$retval .= \" jQuery.get(\\n\";\r\n\t\t$retval .= \" '\".$this->admin_manage.\"'\\n\";\r\n\t\t$retval .= \" ,{'get_list':list_type, 'start':start_count}\\n\";\r\n\t\t$retval .= \" ,function(responseText){\\n\";\r\n\t\t$retval .= \" var newList_html = responseText.replace(/[\\\\r\\\\n]/g,'').replace(/^.*<\\\\!\\\\-+ list start \\\\-+>(.*?)<\\\\!\\\\-+ list end \\\\-+>.*$/i, '$1');\\n\";\r\n\t\t$retval .= \" jQuery('tbody', jQuery('#VideoLists')).children().remove();\\n\";\r\n\t\t$retval .= \" jQuery('#videopop_navi').children().remove();\\n\";\r\n\t\t$retval .= \" jQuery('tbody', jQuery('#VideoLists')).append(jQuery.trim(newList_html.replace(/^.*<tbody.*?>(.*?)<\\\\/tbody>.*$/i, '$1')));\\n\";\r\n\t\t$retval .= \" if (list_type == 1) {\\n\";\r\n\t\t$retval .= \" jQuery('#VideoLists').children().fadeIn('fast');\\n\";\r\n\t\t$retval .= \" } else {\\n\";\r\n\t\t$retval .= \" jQuery('#VideoLists').children().css({visibility:'visible'});\\n\";\r\n\t\t$retval .= \" }\\n\";\r\n\t\t$retval .= \" jQuery('#videopop_navi').append(jQuery.trim(newList_html.replace(/^.*<div id=\\\"videopop_navi\\\".*?>(.*?)<\\\\/div>.*$/i, '$1'))).fadeIn('fast');\\n\";\r\n\t\t$retval .= \" jQuery('#prev').unbind('submit').unbind('click').click(function(){get_page(list_type, start_count - max_count, max_count);return false;});\\n\";\r\n\t\t$retval .= \" jQuery('#next').unbind('submit').unbind('click').click(function(){get_page(list_type, start_count + max_count, max_count);return false;});\\n\";\r\n\t\t$retval .= \" jQuery('#videopop_list').unblock();\\n\";\r\n\t\t$retval .= \" }\\n\";\r\n\t\t$retval .= \" );\\n\";\r\n\t\t$retval .= \" }\\n\";\r\n\t\t$retval .= \"});\\n\";\r\n\t\t$retval .= \"/*]]>*/ </script>\\n\";\r\n\r\n\t\tunset($vid_list);\r\n\t\treturn $retval;\r\n\t}", "public function listAction()\n {\n//\n $request = $this->getRequest();\n\n $routeMatch = $this->getEvent()->getRouteMatch();\n $id = $routeMatch->getParam('workout_id', 0);\n\n if ($id <= 0) {\n return $this->redirect()->toRoute('hi-training/workout/list');\n }\n\n /**\n * Grid FORM\n */\n $form = new WorkoutExerciseGrid(\n array(\n 'view' => $this->_view,\n )\n );\n\n /**\n * BUILDING LIST\n */\n $list = new WorkoutExerciseResultSet(\n array(\n 'model' => $this->_exercise,\n 'view' => $this->_view,\n )\n );\n\n $list->setFieldOptions('type_id', array(\n 'values' => $types = $this->_exerciseType->getBehaviour('nestedSet')->getResultSetForText(),\n ));\n\n $typesTemp = $this->_exerciseType->getResultSet()->toArray();\n $types = array();\n foreach ( $typesTemp as $key => $type) {\n $types[$type['type_id']] = $type;\n }\n\n\n $list->addField(\n 'results',\n 'custom',\n array(\n 'label' => 'results',\n 'sortable' => false,\n 'values' => $types,\n 'viewScript' => 'workout-exercise/_field_result.phtml',\n )\n );\n\n $list->setDbWhere('workout_id = ' . (int)$id);\n\n //\n $list->processRequest($this->getRequest());\n\n //\n $list->build();\n\n //\n $form->addSubForm($list, $list->getName());\n\n// //\n $this->_view->headScript()->appendScript(\n $this->_view->render(\n 'workout-exercise/list.js',\n array(\n 'back' => $this->url()->fromRoute('hi-training/workout/list'),\n 'delete' => $this->url()->fromRoute('hi-training/workout-exercise/delete/wildcard', array('exercise_id' => '')),\n 'edit' => $this->url()->fromRoute('hi-training/workout-exercise/edit/wildcard', array('exercise_id' => '')),\n 'add' => $this->url()->fromRoute('hi-training/workout-exercise/add/wildcard', array('workout_id' => $id)),\n )\n )\n );\n\n /**\n * POST\n */\n if ($this->getRequest()->isPost()) {\n\n $formData = $this->getRequest()->post()->toArray();\n\n\n if ($form->isValid($formData)) {\n \\Zend\\Debug::dump($formData);\n if ( isset($formData['header']['formId'])\n && $formData['header']['formId'] == 'WorkoutExerciseGridForm') {\n\n if (isset($formData['WorkoutExerciseResultSet']['actions']['saveSelected'])) {\n $allBox = $formData['WorkoutExerciseResultSet']['header']['all'];\n $rows = $formData['WorkoutExerciseResultSet']['rows'];\n\n foreach ($rows as $key => $row) {\n if ($row['id'] || $allBox) {\n $exercise = $this->_exercise->getRow(array('exercise_id' => $key));\n $exercise->populate($row['row']);\n $exercise->save();\n\n }\n }\n\n return $this->redirect()->toRoute('hi-training/workout-exercise/list/wildcard', array('workout_id' => $id));\n }\n\n if (isset($formData['WorkoutExerciseResultSet']['actions']['deleteSelected'])) {\n\n $allBox = $formData['WorkoutExerciseResultSet']['header']['all'];\n $rows = $formData['WorkoutExerciseResultSet']['rows'];\n\n foreach ($rows as $key => $row) {\n if ($row['id'] || $allBox) {\n\n $exercise = $this->_exercise->getRow(array('exercise_id' => $key));\n $exercise->delete();\n\n }\n }\n\n return $this->redirect()->toRoute('hi-training/workout-exercise/list/wildcard', array('workout_id' => $id));\n//\n }\n }\n }\n }\n\n return array(\n 'form' => $form,\n 'workout' => $this->_workout->getRow(array('workout_id'=>$id)),\n );\n\n }", "function _uc_order_pane_list($view = 'view') {\n static $panes = array();\n\n if (count($panes) > 0) {\n return $panes;\n }\n\n foreach (module_invoke_all('uc_order_pane') as $id => $pane) {\n // Preserve backward compatibility for panes with no key specified.\n if (is_numeric($id)) {\n $id = $pane['id'];\n }\n\n // Set defaults.\n $pane += array(\n 'id' => $id,\n 'enabled' => TRUE,\n 'weight' => 0,\n );\n\n $panes[$id] = $pane;\n }\n\n // Allow other modules to alter the defaults.\n drupal_alter('uc_order_pane', $panes);\n\n uasort($panes, 'uc_weight_sort');\n\n return $panes;\n}", "private function generateTestPlanetList( )\r\n {\r\n $this->testPlanetListIndex = 0;\r\n $this->testPlanetList = array();\r\n \r\n foreach ( $this->getPlanets() as $testPlanet ) {\r\n if ( ! $testPlanet->isCreated() ) {\r\n continue;\r\n }\r\n \r\n $this->testPlanetList[] = $testPlanet;\r\n } \r\n }", "public function testListServer()\n {\n }", "function SetupListOptions() {\r\n\t\tglobal $Security, $fs_multijoin_v;\r\n\r\n\t\t// Call ListOptions_Load event\r\n\t\t$this->ListOptions_Load();\r\n\t\tif ($fs_multijoin_v->Export <> \"\" ||\r\n\t\t\t$fs_multijoin_v->CurrentAction == \"gridadd\" ||\r\n\t\t\t$fs_multijoin_v->CurrentAction == \"gridedit\")\r\n\t\t\t$this->ListOptions->HideAllOptions();\r\n\t}", "public function testListMembers()\n {\n }", "public function testShowListMemberSuccessfully(): void\n {\n $listMember = $this->createListMember(MailChimpData::$listData, MailChimpData::$listMemberData);\n\n $this->get(\\sprintf('/mailchimp/lists/%s/members/%s', $listMember->getMailChimpList()->getId(), $listMember->getId()));\n $content = \\json_decode($this->response->content(), true);\n\n $this->assertResponseOk();\n\n foreach (MailChimpData::$listMemberData as $key => $value) {\n self::assertArrayHasKey($key, $content);\n self::assertEquals($value, $content[$key]);\n }\n }" ]
[ "0.8041716", "0.69889045", "0.68276155", "0.6213921", "0.61039495", "0.60195667", "0.5794682", "0.5651228", "0.563803", "0.5618443", "0.55301744", "0.5524846", "0.5513889", "0.54806244", "0.5478555", "0.5473747", "0.53977513", "0.5363002", "0.5349754", "0.5313243", "0.5302042", "0.5297186", "0.52841765", "0.5275732", "0.5253515", "0.5231574", "0.5199862", "0.5198448", "0.5161464", "0.5153291", "0.51293385", "0.5116534", "0.51148856", "0.5113899", "0.5105114", "0.51029706", "0.5078438", "0.50726837", "0.5065719", "0.50534993", "0.5037912", "0.50306386", "0.5014676", "0.49986437", "0.49901655", "0.49852356", "0.49810338", "0.49776042", "0.49774337", "0.4975861", "0.49743056", "0.49732253", "0.49724546", "0.49613312", "0.49604818", "0.49594304", "0.49594304", "0.49376056", "0.49371067", "0.4926974", "0.49238756", "0.4906986", "0.49017516", "0.488492", "0.48644242", "0.48640198", "0.48416355", "0.48382542", "0.48372087", "0.48366272", "0.4825154", "0.4814543", "0.48039654", "0.480256", "0.47994456", "0.47941947", "0.47892034", "0.4788476", "0.47776273", "0.47766796", "0.4775046", "0.47713858", "0.47646332", "0.4763957", "0.47622025", "0.475931", "0.4758386", "0.4751261", "0.4749792", "0.47497657", "0.4747691", "0.47471154", "0.4742133", "0.4738379", "0.47326276", "0.4731131", "0.47296128", "0.47286466", "0.47260317", "0.47237474" ]
0.8328777
0
Test case for webinarPanelistsDelete Remove Panelists.
Тестовый случай для webinarPanelistsDelete Удаление панелетов.
public function testWebinarPanelistsDelete() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarPanelistDelete()\n {\n }", "public function testWebinarPanelists()\n {\n }", "public function testWebinarPanelistCreate()\n {\n }", "function action_remove() {\n\t\t\t$data = UTIL::get_post('data');\n\t\t\t$id = (int)$data['rem_id'];\n\t\t\t$table = $data['rem_table'];\n\t\t\t\n\t\t\t$choosen = $this->SESS->get('objbrowser', 'choosen');\n\t\t\tunset($choosen[$table][$id]);\n\t\t\tif (count($choosen[$table]) == 0) unset($choosen[$table]);\n\t\t\t\n\t\t\t$this->SESS->set('objbrowser', 'choosen', $choosen);\n\t\t}", "public function testRemoveListSuccessfully(): void\n {\n $this->createMailchimpList($list);\n\n $this->delete(\\sprintf('/mailchimp/lists/%s', $list['list_id']));\n\n $this->assertResponseOk();\n self::assertEmpty(\\json_decode($this->response->content(), true));\n }", "public function removeAction() {\n $result = array('status' => 'failed');\n if ($this->getRequest()->isPost() && $this->getRequest()->getPost('remove') == 'true') {\n $dirName = Mage::getBaseDir('code').'/local/Balticode/Postoffice';\n if (is_dir($dirName) && file_exists($dirName.'/etc/config.xml')) {\n $directory = new Varien_Io_File();\n $deleteResult = $directory->rmdir($dirName, true);\n if ($deleteResult) {\n $result['status'] = 'success';\n }\n }\n \n }\n $this->getResponse()->setRawHeader('Content-type: application/json');\n $this->getResponse()->setBody(json_encode($result));\n return;\n }", "public function testRemove()\n {\n $context = $this->createPageContext();\n $storage = $this->createStorage();\n $tokenStorage = $this->createTokenStorage();\n\n $layout1 = $storage->create();\n $layout2 = $storage->create();\n $layout3 = $storage->create();\n\n $context->addLayoutList([$layout1->getId(), $layout2->getId(), $layout3->getId()]);\n $token = $context->createEditToken([$layout1->getId(), $layout3->getId()], ['user_id' => 17]);\n $tokenString = $token->getToken();\n $tokenStorage->saveToken($token);\n\n // Save our editable instances\n $tokenStorage->update($tokenString, $layout1);\n $tokenStorage->update($tokenString, $layout3);\n\n // And now remove one layout\n $tokenStorage->remove($tokenString, $layout2->getId());\n $this->assertTrue($token->contains($layout1->getId()));\n $this->assertFalse($token->contains($layout2->getId()));\n $this->assertTrue($token->contains($layout3->getId()));\n\n try {\n $tokenStorage->load($tokenString, $layout2->getId());\n $this->fail();\n } catch (InvalidTokenError $e) {\n $this->assertTrue(true);\n }\n\n // And the other two still work\n $tokenStorage->load($tokenString, $layout1->getId());\n $tokenStorage->load($tokenString, $layout3->getId());\n }", "public function deleteAction() {\n\n //CHECK USER VALIDATION\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n //GET VIEWER INFO\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n\n $listingtype_id = $this->_listingType->listingtype_id;\n $this->view->listingType = $this->_listingType;\n\n //GET TAB ID\n $this->view->tab_selected_id = $tab_selected_id = $this->_getParam('content_id');\n $this->view->format_form = $this->_getParam('format', null);\n\n //GET VIDEO OBJECT\n $this->view->sitereview_video = $sitereview_video = Engine_Api::_()->getItem('sitereview_video', $this->getRequest()->getParam('video_id'));\n\n //GET VIDEO TITLE\n $this->view->title = $sitereview_video->title;\n\n //GET LISTING ID\n $listing_id = $sitereview_video->listing_id;\n\n //GET NAVIGATION \n $this->view->navigation = Engine_Api::_()->getApi('menus', 'core')->getNavigation('sitereview_main');\n\n //GET SITEREVIEW SUBJECT\n $this->view->sitereview = $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n $can_edit = $sitereview->authorization()->isAllowed($viewer, 'edit_listtype_' . $sitereview->listingtype_id);\n\n if (!$sitereview_video) {\n $this->view->status = false;\n $this->view->error = Zend_Registry::get('Zend_Translate')->_(\"Video doesn't exists or not authorized to delete\");\n return;\n }\n\n //VIDEO OWNER AND LISTING OWNER CAN DELETE VIDEO\n if ($viewer_id != $sitereview_video->owner_id && $can_edit != 1) {\n return $this->_forwardCustom('requireauth', 'error', 'core');\n }\n\n if (!$this->getRequest()->isPost()) {\n $this->view->status = false;\n $this->view->error = Zend_Registry::get('Zend_Translate')->_('Invalid request method');\n return;\n }\n\n $db = $sitereview_video->getTable()->getAdapter();\n $db->beginTransaction();\n\n try {\n\n Engine_Api::_()->getDbtable('videoratings', 'sitereview')->delete(array('videorating_id =?' => $this->getRequest()->getParam('video_id')));\n\n $sitereview_video->delete();\n\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n\n\n\n\n $this->view->status = true;\n if ($this->view->format_form == 'smoothbox') {\n $this->_forwardCustom('success', 'utility', 'core', array(\n 'smoothboxClose' => true,\n 'parentRefresh' => '500',\n 'parentRefreshTime' => '500',\n 'format' => 'smoothbox',\n 'messages' => Zend_Registry::get('Zend_Translate')->_('You have successfully deleted this video.')\n ));\n } else {\n if (Engine_API::_()->seaocore()->checkSitemobileMode('fullsite-mode')) {\n if ($can_edit) {\n return $this->_gotoRouteCustom(array('action' => 'edit', 'listing_id' => $sitereview->listing_id), \"sitereview_videospecific_listtype_$listingtype_id\", true);\n } else {\n return $this->_gotoRouteCustom(array('listing_id' => $sitereview->listing_id, 'slug' => $sitereview->getSlug(), 'tab' => $tab_selected_id), \"sitereview_entry_view_listtype_$listingtype_id\", true);\n }\n } else {\n return $this->_gotoRouteCustom(array('listing_id' => $sitereview->listing_id, 'slug' => $sitereview->getSlug(), 'tab' => $tab_selected_id), \"sitereview_entry_view_listtype_$listingtype_id\", true);\n }\n }\n }", "public function RemoveArtworkList(): void{\n\n if(!Session::isLogin())\n exit;\n\n if(!ArtworkVerifier::removeList($_POST))\n exit;\n\n if(isset(UserList::where('user_list.user_id', Session::getUser()['id'])->where('user_list.artwork_id', $_POST['artwork_id'])->getOne()->id))\n UserList::where('user_id', Session::getUser()['id'])\n ->where('artwork_id', $_POST['artwork_id'])\n ->delete();\n }", "public function testCollectionTicketsDelete()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testRemoveMenuAction()\n {\n parent::login();\n $this->clickAt(\"link=CMS\", \"\");\n $this->click(\"link=Menus\");\n $this->waitForPageToLoad(\"30000\");\n $this->dragAndDropToObject(\"css=ul#sortable1.connectedSortable.ui-sortable li#id-1\", \"css=ul#sortable2\");\n $this->clickAt(\"link=CMS\", \"\");\n $this->click(\"link=Menus\");\n $this->waitForPageToLoad(\"30000\");\n $this->assertFalse($this->isElementPresent(\"css=ul#sortable1.connectedSortable.ui-sortable li#id-1.ui-state-default.ui-sortable-handle\"));\n $this->isElementPresent(\"css=ul#sortable2.connectedSortable.ui-sortable li#id-1.ui-state-default.ui-sortable-handle\");\n $this->assertElementContainsText(\"css=ul#sortable2.connectedSortable.ui-sortable li#id-1.ui-state-default.ui-sortable-handle\", \"Test Menu Selenium 1\");\n parent::logout();\n }", "public function deleteList($data)\n {\n var_export($data);\n //return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteListAction(){\n $ebookers_obj = new Ep_Ebookers_Managelist();\n //to call a function to delete themes//\n $ebookers_obj->deleteList($this->_request->getParams());\n //unset($_REQUEST);\n exit;\n }", "private function actionListDelete() {\n $put_vars = $this->actionListPutConvert();\n $this->loadModel($put_vars['id'])->delete();\n }", "protected function removeFromList($data)\n {\n $repo = \\XLite\\Core\\Database::getRepo('\\XLite\\Model\\ViewList');\n $repo->deleteInBatch($repo->findBy($data), false);\n }", "public function testWebinarPollDelete()\n {\n }", "public function testRemove()\n {\n $success = $this->collection->remove(3);\n\n $this->assertTrue($success);\n $this->assertCount(2, $this->collection);\n $this->assertFalse($this->collection->contains(3));\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function testProfilePrototypeDeleteGroups()\n {\n\n }", "public function testWebinarDelete()\n {\n }", "public function removeAction() {\r\n //DELETE SLIDE DURING THE UPLOAD\r\n $is_ajax = (int) $this->_getParam('is_ajax');\r\n if (!empty($is_ajax)) {\r\n\r\n //GET IMAGE ID AND IT'S OBJECT\r\n $image_id = (int) $this->_getParam('image_id');\r\n $image = Engine_Api::_()->getItem('advancedslideshow_image', $image_id);\r\n\r\n $db = $image->getTable()->getAdapter();\r\n $db->beginTransaction();\r\n\r\n try {\r\n $image->delete();\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollBack();\r\n throw $e;\r\n }\r\n //@unlink(APPLICATION_PATH . \"/public/advancedslideshow/1000000/1000/5/\" . $image_id . 't.' . $image->extension);\r\n }\r\n\r\n //GET SLIDESHOW ID AND IT'S OBJECT\r\n $advancedslideshow_id = (int) $this->_getParam('advancedslideshow_id');\r\n $this->view->advancedslideshow = $advancedslideshow = Engine_Api::_()->getItem('advancedslideshow', $advancedslideshow_id);\r\n\r\n if ($this->getRequest()->isPost() && $this->getRequest()->getPost('confirm') == true) {\r\n\r\n //GET IMAGE ID AND IT'S OBJECT\r\n $image_id = (int) $this->_getParam('image_id');\r\n $image = Engine_Api::_()->getItem('advancedslideshow_image', $image_id);\r\n\r\n if (empty($image)) {\r\n return;\r\n }\r\n\r\n $db = $image->getTable()->getAdapter();\r\n $db->beginTransaction();\r\n\r\n try {\r\n $image->delete();\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollBack();\r\n throw $e;\r\n }\r\n\r\n //@unlink(APPLICATION_PATH . \"/public/advancedslideshow/1000000/1000/5/\" . $image_id . 't.' . $image->extension);\r\n\r\n //GET TOTAL SLIDES COUNT\r\n $total_images = Engine_Api::_()->getDbTable('images', 'advancedslideshow')->getTotalSlides($advancedslideshow_id);\r\n\r\n $start_index = $advancedslideshow->start_index;\r\n\r\n if ($start_index > $total_images - 1) {\r\n if ($total_images != 0) {\r\n $advancedslideshow->start_index = $total_images - 1;\r\n $advancedslideshow->save();\r\n } else {\r\n $advancedslideshow->start_index = 0;\r\n $advancedslideshow->save();\r\n }\r\n }\r\n\r\n $parentRedirect = 'admin/advancedslideshow/slides/manage/advancedslideshow_id/' . $advancedslideshow_id;\r\n $this->_forward('success', 'utility', 'core', array(\r\n 'smoothboxClose' => true,\r\n 'parentRefresh' => 10,\r\n 'parentRedirect' => $parentRedirect,\r\n 'messages' => Zend_Registry::get('Zend_Translate')->_('You have successfully deleted the slide.')\r\n ));\r\n }\r\n }", "function ui_sortable_destroy($selector){\n return add_method_support('sortable',$selector, 'destroy');\n}", "function ag_del_coll() {\n\tif(!isset($_POST['coll_id'])) {die('missing data');}\n\t$id = addslashes($_POST['coll_id']);\n\t\n\t$resp = wp_delete_term( $id, 'ag_collections');\n\n\tif($resp == '1') {die('success');}\n\telse {die('error during the collection deletion');}\n}", "function test_restrict_deletion_of_Home_page(){}", "public function deleteSlots(Collection $collection): Collection;", "public function multiDeleteAction() {\n\n if ($this->getRequest()->isPost()) {\n $values = $this->getRequest()->getPost();\n\n foreach ($values as $key => $value) {\n if ($key == 'delete_' . $value) {\n Engine_Api::_()->getItem('list_listing', (int) $value)->delete();\n }\n }\n }\n return $this->_helper->redirector->gotoRoute(array('action' => 'index'));\n }", "function projectpentagon_remove() {\n\ndelete_option('projectpentagon_title');\n\ndelete_option('projectpentagon_name1');\n\ndelete_option('projectpentagon_name2');\n\ndelete_option('projectpentagon_name3');\n\ndelete_option('projectpentagon_name4');\n\ndelete_option('projectpentagon_name5');\n\ndelete_option('projectpentagon_color1');\n\ndelete_option('projectpentagon_color2');\n\ndelete_option('projectpentagon_color3');\n\ndelete_option('projectpentagon_color4');\n\ndelete_option('projectpentagon_color5');\n\ndelete_option('projectpentagon_category');\ndelete_option('projectpentagon-titleonpages');\n\n}", "function delLists ($dbhost, $dbuser, $dbpass, $dbname, $dbport, $field) {\n // connect to the host:\n $connection = mysqli_connect($dbhost, $dbuser, $dbpass, $dbname, $dbport);\n // exit the script with a useful message if there was an error:\n if (!$connection)\n {\n die(\"Connection failed: \" . $mysqli_connect_error);\n }\n\n // connect to our database:\n mysqli_select_db($connection, $dbname);\n\n // get rid of any contents linking before removing the LIST\n $query = \"DELETE FROM contents WHERE listID='$field'\";\n $result = mysqli_query($connection, $query);\n if ($result) {\n echo \"deleted - list contents<br>\";\n }\n else {\n echo \"List contents not deleted - error\";\n }\n\n // run query to remove the LIST\n $query = \"DELETE FROM lists WHERE id='$field'\";\n $result = mysqli_query($connection, $query);\n if ($result) {\n echo \"deleted\";\n }\n else {\n echo \"Not deleted - error\";\n }\n // we're finished with the database, close the connection:\n mysqli_close($connection);\n}", "function teamdelete(){\n $this->auth(COMP_ADM_LEVEL);\n $team_id = $this->uri->segment(3);\n $contest_id = urldecode($this->uri->segment(4));\n $this->m_key->removeTeam($team_id);\n $this->m_team->delete($team_id, $contest_id);\n $this->teams($contest_id);\n }", "public function removeAction()\n {\n $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tx_frpformanswers_domain_model_formentry');\n\n $queryBuilder->delete('tx_frpformanswers_domain_model_formentry')\n ->where($queryBuilder->expr()->eq('pid', $queryBuilder->createNamedParameter($this->pid, \\PDO::PARAM_INT)))\n ->andWhere($queryBuilder->expr()->eq('deleted', $queryBuilder->createNamedParameter(1, \\PDO::PARAM_INT)))\n ->execute();\n\n $this->addFlashMessage(\n LocalizationUtility::translate('LLL:EXT:frp_form_answers/Resources/Private/Language/de.locallang_be.xlf:flashmessage.removeEntries.body', null, [$this->pid]),\n LocalizationUtility::translate('LLL:EXT:frp_form_answers/Resources/Private/Language/de.locallang_be.xlf:flashmessage.removeEntries.title'),\n \\TYPO3\\CMS\\Core\\Messaging\\FlashMessage::OK,\n true);\n\n $this->redirect('list');\n }", "public function testDeleteWrongObjectTypeSubmitAsAdmin()\n {\n $crawler = $this->requestAsAdmin('/tasks');\n\n // Can't use assertSelectorTextContains() because it only checks the first selector occurrence\n // and the task we are looking for is not the first one in the displayed list of tasks.\n // See: https://github.com/symfony/symfony-docs/issues/13036\n //$this->assertSelectorTextContains('h4 > a', 'Tâche Eric n°1');\n $this->assertEquals(1, $crawler->filter('h4 > a:contains(\"Tâche Eric n°1\")')->count());\n\n // Then we delete it\n $task_id = self::getTaskIdByTitle('Tâche Eric n°1');\n\n $this->requestAsAdmin('/tasks/'.$task_id.'/delete');\n\n $crawler = $this->client->followRedirect();\n\n $this->assertRegExp('/tasks$/', $crawler->getUri());\n $this->assertContains(\n 'La tâche a bien été supprimée.',\n $this->client->getResponse()->getContent()\n );\n $this->assertSelectorTextNotContains('h4 > a', 'Tâche Eric n°1');\n }", "public function testDelete()\n {\n $context = $this->createPageContext();\n $storage = $this->createStorage();\n $tokenStorage = $this->createTokenStorage();\n\n $layout1 = $storage->create();\n $layout2 = $storage->create();\n $layout3 = $storage->create();\n\n $context->addLayoutList([$layout1->getId(), $layout2->getId(), $layout3->getId()]);\n $token = $context->createEditToken([$layout1->getId(), $layout3->getId()], ['user_id' => 17]);\n $tokenString = $token->getToken();\n $tokenStorage->saveToken($token);\n\n // Save our editable instances\n $tokenStorage->update($tokenString, $layout1);\n $tokenStorage->update($tokenString, $layout3);\n\n // Validate that load still work\n $tokenStorage->loadToken($tokenString);\n $tokenStorage->loadMultiple($tokenString, [$layout1->getId(), $layout3->getId()]);\n\n // And now delete\n $tokenStorage->deleteAll($tokenString);\n\n try {\n $tokenStorage->loadToken($tokenString);\n $this->fail();\n } catch (InvalidTokenError $e) {\n $this->assertTrue(true);\n }\n try {\n $tokenStorage->loadMultiple($tokenString, [$layout1->getId()]);\n $this->fail();\n } catch (InvalidTokenError $e) {\n $this->assertTrue(true);\n }\n try {\n $tokenStorage->load($tokenString, $layout3->getId());\n $this->fail();\n } catch (InvalidTokenError $e) {\n $this->assertTrue(true);\n }\n }", "public function deleteAction() {\n\n //GET POST SUBJECT\n $post = Engine_Api::_()->core()->getSubject('sitereview_post');\n\n //GET LISTING SUBJECT\n $sitereview = $post->getParent('sitereview_listing');\n\n //GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n\n if (!$sitereview->isOwner($viewer) && !$post->isOwner($viewer)) {\n return $this->_helper->requireAuth->forward();\n }\n\n //AUTHORIZATION CHECK\n if (!$this->_helper->requireAuth()->setAuthParams($sitereview, null, \"view_listtype_$sitereview->listingtype_id\")->isValid())\n return;\n\n //MAKE FORM\n $this->view->form = $form = new Sitereview_Form_Post_Delete();\n\n //CHECK METHOD\n if (!$this->getRequest()->isPost()) {\n return;\n }\n\n //FORM VALIDATION\n if (!$form->isValid($this->getRequest()->getPost())) {\n return;\n }\n\n //PROCESS\n $table = Engine_Api::_()->getDbTable('posts', 'sitereview');\n $db = $table->getAdapter();\n $db->beginTransaction();\n $topic_id = $post->topic_id;\n try {\n $post->delete();\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n //GET TOPIC\n $topic = Engine_Api::_()->getItem('sitereview_topic', $topic_id);\n\n $href = ( null == $topic ? $sitereview->getHref() : $topic->getHref() );\n return $this->_forwardCustom('success', 'utility', 'core', array(\n 'closeSmoothbox' => true,\n 'parentRedirect' => $href,\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Post deleted.')),\n ));\n }", "public function testRemovePageWhenDeleted()\n {\n\n // Add a public page.\n $page = $this->_simplePage(true);\n\n // Delete.\n $page->delete();\n\n // Should remove Solr document.\n $this->_assertNotRecordInSolr($page);\n\n }", "function remove()\n\t{\n\t\tJSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\n\n\t\t$user = JFactory::getUser();\n\t\tif (!$user->authorise('core.delete', 'com_gmapfp'))\n\t\t{\n\t\t\t$this->setMessage(JText::_('JLIB_APPLICATION_ERROR_DELETE_NOT_PERMITTED'), 'error');\n\t\t} else {\n\t\t\t$model = $this->getModel('gmapfp');\n\t\t\tif(!$model->delete()) {\n\t\t\t\t$msg = JText::_( 'Error: One or more GMapFPs could not be Deleted' );\n\t\t\t} else {\n\t\t\t\t$msg = JText::_( 'GMapFP(s) Deleted' );\n\t\t\t}\n\t\t}\n\n\t\t$this->setRedirect( 'index.php?option=com_gmapfp&controller=gmapfp&task=view', $msg );\n\t}", "public function del(){\n\t\t$this->OnlyAdmin();\n\t\tif($this->input->post()){\n\t\t$this->TicketModel->delet($this->input->post());\n\t\tredirect('index.php/ticket/lists');}\n\t}", "public function testRemoveUnsetElement()\n {\n $success = $this->collection->remove(7);\n\n $this->assertFalse($success);\n }", "public function multiDeleteApplicationAction() {\n $listing_id = $this->_getParam('listing_id');\n $listingtype_id = $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id)->listingtype_id;\n\n if ($this->getRequest()->isPost()) {\n $values = $this->getRequest()->getPost();\n\n foreach ($values as $key => $value) {\n if ($key == 'delete_' . $value) {\n Engine_Api::_()->getItem('sitereview_job', (int) $value)->delete();\n }\n }\n }\n //REDIRECTING\n return $this->_helper->redirector->gotoRoute(array('action' => 'show-application', 'listing_id' => $listing_id), \"sitereview_dashboard_listtype_$listingtype_id\", true);\n }", "public function testDeleteSuppliersUsingDELETE()\n {\n }", "public function testDelete()\n\t{\n\t\t$saddle = $this->saddles[0];\n\n\t\t$this->actingAs($this->admin, 'api')\n\t\t\t ->delete('/api/v1/admin/saddles/' . $saddle->id)\n\t\t\t ->assertStatus(200);\n\n\t\t$this->assertDatabaseMissing('saddles', ['id' => $saddle->id]);\n\t}", "function remove()\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 delete' ) );\n\t\t}\n\n\t\t$model = $this->getModel('weblink');\n\t\tif(!$model->delete($cid)) {\n\t\t\techo \"<script> alert('\".$model->getError(true).\"'); window.history.go(-1); </script>\\n\";\n\t\t}\n\n\t\t$this->setRedirect( 'index.php?option=com_weblinks' );\n\t}", "public function testDelete()\n\t{\n\t\t$client = static::createClient(array(), array(\n\t\t 'PHP_AUTH_USER' => 'jr',\n\t\t 'PHP_AUTH_PW' => 'jr',\n\t\t));\n\t\t$client->followRedirects();\n\n\t\t// On clique sur le lien entreprise de test\n\t\t$crawler = $client->request('GET', '/clients');\n\t\t$link = $crawler->filter('.bloc__title a:contains(\"Entreprise de test\")')->first()->link();\n\t\t$crawler = $client->click($link);\n\t\t//On vérifie qu'on est bien sur la bonne page\n\t\t$this->assertGreaterThan(0, $crawler->filter('h1:contains(\"Entreprise de test\")')->count());\n\n\t\t// On clique sur le bouton modifier\n\t\t$link = $crawler->filter('.btn--delete')->first()->link();\n\t\t$crawler = $client->click($link);\n\t\t//On vérifie qu'on est bien sur la bonne page\n\t\t$this->assertEquals(1, $crawler->filter('.breadcrumb:contains(\"Supprimer\")')->count()); \n\n\t\t// On modifie le métier\n\t\t$form = $crawler->selectButton('Supprimer')->form();\n\t\t$crawler = $client->submit($form);\t\n\n\t\t//On vérifie que ça a marché\n\t\t$this->assertEquals(1, $crawler->filter('html:contains(\"Le client a bien été supprimé.\")')->count());\n\n\t}", "public function actionDelete()\n {\n extract(Yii::$app->request->post());\n $this->findModel($list, $item)->delete();\n }", "public function testDeleteAuthorizationDivision()\n {\n }", "public function testProfilePrototypeDeletePosts()\n {\n\n }", "function delete_list($listid)\n\t{\n\t\t$this->http_set_content_type('text/html');\n\t\t$this->load_url(\"lists/$listid\", 'delete', array(), 204);\n\t\tif(intval($this->http_response_code) === 204):\n\t\t\treturn true;\n\t\tendif;\n\t\treturn false;\n\t}", "public function action_remove(){\n\t\t$monumentId = $this->request->param('id');\n\t\t$user = Auth::instance()->get_user();\n\t\t\n\t\t// Remove the monument from the user list\n\t\t$favoriteList = new Model_List_Favorite();\n\t\t$favoriteList->remove($monumentId, $user->UserID);\n\t\t\n\t\t// Redirect the user back to the monument page\n\t\t$this->request->redirect('monument/view/' . $monumentId);\n\t}", "public function doRemove() {\r\n\t\t$host = xn(\"host\");\r\n\t\t\r\n\t\t$ret = $this->_mongo->selectDB(\"admin\")->command(array(\r\n\t\t\t\"removeshard\" => $host\r\n\t\t));\r\n\t\t\r\n\t\t$this->ret = $this->_highlight($ret, \"json\");\r\n\t\t\r\n\t\t$this->display();\r\n\t}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "public function deletePlaylistAction()\n {\n\t\t$userSession\t= new Container('fo_user');\n\t\t$request\t\t= $this->getRequest();\n\t\tif(!isset($userSession->userSession['_id']) || trim($userSession->userSession['_id']) == '') {\n\t\t\techo \"-1\";\n\t\t\tdie();\n\t\t}\n\t\tif($request->isPost()) {\n\t\t\t$formData\t= $request->getPost();\n\t\t\tif(isset($formData['playlist_id']) && trim($formData['playlist_id']) != '') {\n\t\t\t\t$result\t= $this->deletePlaylist($formData);\n\t\t\t\t\n\t\t\t\t$tempArray\t= $userSession->mediaSession;\n\t\t\t\tif(isset($tempArray['playlist'][$formData['playlist_id']])) {\n\t\t\t\t\tunset($tempArray['playlist'][$formData['playlist_id']]);\n\t\t\t\t}\n\t\t\t\t$userSession->mediaSession\t= $tempArray;\n\t\t\t\techo \"1\";\t//\tSuccess\n\t\t\t} else {\n\t\t\t\techo \"0\";\t//\timproper request\n\t\t\t}\n\t\t} else {\n\t\t\techo \"0\";\t//\timproper request\n\t\t}\n\t\treturn $this->getResponse();\n }", "private static function removeAllTestingWebinars(): void\n {\n foreach (self::$driverHandler->getWebinars() as $webinar) {\n if (str_starts_with($webinar->slug, 'test-')) {\n self::$driverHandler->removeWebinar($webinar->id);\n }\n }\n }", "public function testTeamAdminCanDeleteSlots()\n {\n // Create a user with 2 teams and 3 properties for each team\n $user = User::factory()->withPersonalTeam()->create();\n $user->assignRole(Role::findByName('user'));\n $user->assignRole(Role::findByName('team-admin'));\n $teams = $user->ownedTeams;\n\n $property = Property::factory()->create([\n 'team_id' => $teams->first()->getKey(),\n 'is_private' => true\n ]);\n $calendar = Calendar::factory()->create(['property_id' => $property->getKey()]);\n $slot = Slot::factory()->create(['calendar_id' => $calendar->getKey()]);\n\n $response = $this->actingAs($user)->delete('/calendars/' . $calendar->getKey(). '/slots/' . $slot->getKey());\n $response->assertStatus(302);\n $this->assertSoftDeleted('slots', ['id' => $slot->getKey()]);\n }", "private function deleteCollection()\n {\n $request = $_REQUEST;\n global $cbcollection;\n try\n {\n $cid=0;\n\n if(isset($request['cid']))\n $cid = trim($request['cid']);\n\n //check if collection id provided\n if( $cid==0 || !is_numeric($cid) )\n throw_error_msg(\"collection id not provided.\");\n\n if(!userid())\n throw_error_msg(lang(\"you_not_logged_in\")); \n\n $collection = $cbcollection->get_collection($cid);\n\n if(empty($collection))\n throw_error_msg(lang(\"collection_not_exists\"));\n\n if( $collection['userid'] != userid() )\n throw_error_msg(lang(\"cant_perform_action_collect\"));\n\n $cid = mysql_clean($cid);\n $user_id = userid();\n $response = $cbcollection->delete_collection($cid);\n\n if( error() )\n {\n throw_error_msg(error('single')); \n }\n\n if( msg() )\n {\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => \"collection has been deleted\", \"data\" => array());\n $this->response($this->json($data));\n } \n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage()); \n }\n }", "public static function uninstall() {\r\n // $pop_ups = get_pages( array('post_type'=>DGDSCROLLBOXTYPE));\r\n // foreach($pop_ups as $pop_up) {\r\n // wp_delete_post($pop_up->ID, true);\r\n // }\r\n }", "public function onRemove();", "public function testProfilePrototypeDeleteOwnedGroups()\n {\n\n }", "public function del() {\n\t\t\tif (!empty($this->params['form']['items'])) {\n\t\t\t\t/* Convert string with ids to array */\n\t\t\t\t$allIds = explode(',', $this->params['form']['items']);\n\t\t\t\t$allIds = Sanitize::clean($allIds);\n\t\t\t\t\n\t\t\t\t/* Remove menu item(s) from tree */\n\t\t\t\t/* @todo Check if this could be done with a single method call/db request instead */\n\t\t\t\tforeach ($allIds AS $id) {\n\t\t\t\t\t$this->MyMenu->removefromtree($id, true);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/* Get list of menu items */\n\t\t\t$this->menuList = $this->getThreadedList();\n\t\t\t$this->set('menuList', $this->menuList);\n\t\t\t\n\t\t\t$this->render('list');\n\t\t}", "public function testRemove() {\n $index = Phish_Index::load();\n $index->store('TestA', 'testa.php');\n $index->store('TestB', 'testb.php');\n $index->remove('TestA');\n $this->assertNotEmpty($index->classes());\n }", "function remove()\n {\n $items = @implode(\", \", Misc::escapeInteger($_POST[\"items\"]));\n $stmt = \"DELETE FROM\n \" . APP_DEFAULT_DB . \".\" . APP_TABLE_PREFIX . \"news\n WHERE\n nws_id IN ($items)\";\n $res = DB_Helper::getInstance()->query($stmt);\n if (PEAR::isError($res)) {\n Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);\n return false;\n } else {\n self::removeProjectAssociations($_POST['items']);\n return true;\n }\n }", "function delete_list($schedule_ids)\n\t{\t\n\t\treturn true;\t\n \t}", "public function removeAction() {\n\n // Validate request methods\n $this->validateRequestMethod('POST');\n\n //GET DIARY ID AND SUBJECT\n if (Engine_Api::_()->core()->hasSubject())\n $wishlist = Engine_Api::_()->core()->getSubject('sitereview_wishlist');\n\n $wishlist_id = $this->_getParam('wishlist_id');\n if (isset($wishlist_id) && !empty($wishlist_id)) {\n $subject = $wishlist = Engine_Api::_()->getItem('sitereview_wishlist', $wishlist_id);\n Engine_Api::_()->core()->setSubject($wishlist);\n } else {\n $this->respondWithError('no_record');\n }\n\n\n if (empty($wishlist))\n $this->respondWithError('no_record');\n\n $wishlist_id = $this->_getParam('wishlist_id');\n\n $viewer = Engine_Api::_()->user()->getViewer();\n\n //GET EVENT ID AND EVENT\n $listing_id = $this->_getParam('listing_id');\n $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n\n if (empty($sitereview) && !isset($sitereview))\n $this->respondWithError('no_record');\n\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n\n //DELETE FROM DATABASE\n Engine_Api::_()->getDbtable('wishlistmaps', 'sitereview')->delete(array('wishlist_id = ?' => $wishlist_id, 'listing_id = ?' => $listing_id));\n\n try {\n //DELETE ACTIVITY FEED\n //SQL ERROR TO BE CORRECTED\n $actionTable = Engine_Api::_()->getDbtable('actions', 'activity');\n $actionTableName = $actionTable->info('name');\n\n $action_id = $actionTable->select()\n ->setIntegrityCheck(false)\n ->from($actionTableName, 'action_id')\n ->joinInner('engine4_activity_attachments', \"engine4_activity_attachments.action_id = $actionTableName.action_id\", array())\n ->where('engine4_activity_attachments.id = ?', $listing_id)\n ->where($actionTableName . '.type = ?', \"sitereview_wishlist_add_listing\")\n ->where($actionTableName . '.subject_type = ?', 'user')\n ->where($actionTableName . '.object_type = ?', 'sitereview_listing')\n ->where($actionTableName . '.object_id = ?', $listing_id)\n //->where($actionTableName . '.params like(?)', '{\"child_id\":' . $wishlist_id . '}')\n ->query()\n ->fetchColumn();\n } catch (Exception $ex) {\n $this->respondWithValidationError('internal_server_error', $ex->getMessage());\n }\n if (!empty($action_id)) {\n $activity = Engine_Api::_()->getItem('activity_action', $action_id);\n if (!empty($activity)) {\n $activity->delete();\n }\n }\n $db->commit();\n $this->successResponseNoContent('no_content', true);\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n }", "function checkRemove($elements)\n\t{\n\t\tFabrikViewElement::setCheckRemoveToolBar();\n\t\t?>\n\t\t<h1><?php echo JText::_('DO YOU WANT TO DROP THE DATABASE COLUMN AS WELL?') ?></h1>\n\t\t<form action=\"index.php\" method=\"post\" name=\"adminForm\" id=\"adminForm\">\n\t\t<table class=\"adminlist\">\n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t<th><?php echo JText::_('Drop') ?></th>\n\t\t\t\t\t<th><?php echo JText::_('Element') ?></th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t\t<tbody>\n\t\t\t\t<?php\n\t\t\t\t$c = 0;\n\t\t\t\tforeach ($elements as $element) { ?>\n\t\t\t\t\t<tr class=\"row<?php echo $c % 2; ?>\">\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<label><input type=\"radio\" name=\"drop[<?php echo $element->id ?>][]\" value=\"0\" checked=\"checked\" /><?php echo JText::_('No') ?></label>\n\t\t\t\t\t\t\t<label><input type=\"radio\" name=\"drop[<?php echo $element->id ?>][]\" value=\"1\" /><?php echo JText::_('Yes') ?></label>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<?php echo $element->label; ?>\n\t\t\t\t\t\t\t<input type=\"hidden\" name=\"cid[]\" value=\"<?php echo $element->id ?>\" />\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t<?php $c ++;\n\t\t\t\t} ?>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t\t<input type=\"hidden\" name=\"option\" value=\"com_fabrik\" />\n\t\t\t<input type=\"hidden\" name=\"c\" value=\"element\" />\n\t\t\t<input type=\"hidden\" name=\"task\" value=\"remove\" />\n\t\t\t<?php echo JHTML::_('form.token'); ?>\n\t\t</form>\n\t\t<?php\n\t}", "public function testSuccessfulRemoveApplicants()\n {\n $this->createData(10000, '13800001111', 0);\n\n $this->ajaxPost('/' . self::ROUTE_PREFIX . '/remove', [\n '_token' => csrf_token(),\n 'attendant' => 10000,\n ])->seeJsonContains([\n 'code' => 0,\n ]);\n }", "public function destroy($list_id)\n {\n $list = Listt::find($list_id);\n $list->delete();\n return redirect(route('adminpanel.index'));\n }", "public function removePhotoAction() {\n\n //CHECK USER VALIDATION\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n //GET LISTING ID\n $listing_id = $this->_getParam('listing_id');\n\n //GET LISTING ITEM\n $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n $viewer = Engine_Api::_()->user()->getViewer();\n\n //GET LISTING TYPE ID\n $listingtype_id = $sitereview->listingtype_id;\n\n //CAN EDIT OR NOT\n if (!$this->_helper->requireAuth()->setAuthParams($sitereview, $viewer, \"edit_listtype_$listingtype_id\")->isValid()) {\n return;\n }\n\n //GET FILE ID\n $file_id = Engine_Api::_()->getDbtable('photos', 'sitereview')->getPhotoId($listing_id, $sitereview->photo_id);\n\n //DELETE PHOTO\n if (!empty($file_id)) {\n $photo = Engine_Api::_()->getItem('sitereview_photo', $file_id);\n $photo->delete();\n }\n\n //SET PHOTO ID TO ZERO\n $sitereview->photo_id = 0;\n $sitereview->save();\n\n return $this->_helper->redirector->gotoRoute(array('action' => 'change-photo', 'listing_id' => $listing_id), \"sitereview_dashboard_listtype_$listingtype_id\", true);\n }", "public function test_delete_ScienceFiction_category_along_with_its_books(){\n $this->visit('/admin/categories')->press('delete')->press('Proceed')\n ->see('Data removed')->see('The Evolutionary Void')->see('The Dreaming Void')->see('Blood Music');\n\n\n }", "public function deleteList(){\n\n $posts=$this->articleDAO->getPosts();\n $this->view->adminRender ('delete_view', ['posts' =>$posts]);\n\n }", "public function deleteList(Request $request)\n {\n $this->boardList->deleteList($request); \n\n return [\n 'success' => 'success', \n ];\n }", "function top10_remove() {\r\n//delete_option('omekafeedpull_omekaroot');\r\n}", "protected function beforeRemoving()\n {\n }", "public function testDeleteLecturerAndAdministrationWorker()\n {\n $user = factory(User::class)->state('lecturer_administration_worker')->create();\n $response = $this->withHeaders([\n ])->deleteJson(\"/api/user/{$user->id}\", []);\n\n $response\n ->assertStatus(200)\n ->assertJson([\n \"deleted\"=> true\n ]);\n\n $this->assertDeleted('users', ['id' => $user->id]);\n $this->assertDeleted('addresses', ['id' => $user->address_id]);\n $this->assertDeleted('addresses', ['id' => $user->correspondal_address_id]);\n }", "private function uninstall_OSF_TestsSuites()\n {\n // Get package info\n $installPath = \"{$this->osf_web_services_folder}/{$this->osf_tests_suites_folder}\";\n\n // Uninstall\n $this->span(\"Uninstalling...\", 'info');\n $this->rm(\"{$installPath}/\", TRUE);\n }", "public function admin_remove(){\n \n $this->set(\"title_for_layout\",\"Remove a Group\");\n \n // Load the group in question\n $group = $this->Group->find('first', array('conditions' => array('Group.id' => $this->params->id)));\n if($group){\n $this->set('group', $group);\n } else {\n $this->Session->setFlash('That group could not be found.', 'default', array('class' => 'alert alert-error'));\n $this->redirect(array('controller' => 'group', 'action' => 'index', 'admin' => true));\n }\n }", "function doDeleteTestCases(&$dbHandler,$tcaseSet,&$tcaseMgr)\r\n{\r\n if( count($tcaseSet) > 0 )\r\n {\r\n foreach($tcaseSet as $victim)\r\n {\r\n $tcaseMgr->delete($victim);\r\n }\r\n }\r\n}", "protected function afterRemoving()\n {\n }", "public function testHandleRemoveSuccess()\n {\n // Populate data\n $dealerAccountIDs = $this->_populate();\n \n // Set data\n $ID = $this->_pickRandomItem($dealerAccountIDs);\n \n $this->withSession($this->adminSession)\n ->call('POST', '/dealer-account/remove', ['ID' => $ID]);\n \n // Validate response\n $this->assertRedirectedTo('/dealer-account');\n $this->assertSessionHas('dealer-account-deleted', '');\n \n // Validate data\n $dealerAccount = $this->dealer_account->getOne($ID);\n $this->assertEquals(null, $dealerAccount);\n \n }", "public function deleteList()\n {\n if (!request()->ajax()) {\n return response()->json(['error' => 1, 'msg' => 'Method not allow!']);\n } else {\n $ids = request('ids');\n $arrID = explode(',', $ids);\n $arrDontPermission = [];\n foreach ($arrID as $key => $id) {\n if(!$this->checkPermisisonItem($id)) {\n $arrDontPermission[] = $id;\n }\n }\n if (count($arrDontPermission)) {\n return response()->json(['error' => 1, 'msg' => sc_language_render('admin.remove_dont_permisison') . ': ' . json_encode($arrDontPermission)]);\n }\n AdminCmsContent::destroy($arrID);\n sc_clear_cache('cache_cms_content');\n return response()->json(['error' => 0, 'msg' => '']);\n }\n }", "public function testDeletePermissionSet()\n {\n }", "public function testRemoveMemberFromListSuccessfully(): void\n {\n // create list\n $this->createListMemberViaApi(MailChimpData::$listData);\n\n // create list member\n $this->post(\"/mailchimp/lists/{$this->listId}/members/\", MailChimpData::$listMemberData);\n $listMember = \\json_decode($this->response->content(), true);\n\n // remove member from list\n $this->delete(\\sprintf('/mailchimp/lists/%s/members/%s', $this->listId, $listMember['list_member_id']));\n\n $this->assertResponseOk();\n self::assertEmpty(\\json_decode($this->response->content(), true));\n }", "public function testPostAuthorizationSubjectBulkremove()\n {\n }", "public function delete_from_aweber_list($post_data = array(),$list_id = null ){\n\n \t\t$aweber = new AWeberAPI($this->aweber_consumerKey, $this->aweber_consumerSecret);\n // dd($aweber);\n\n\t\ttry {\n\n\t\t $account = $aweber->getAccount($this->aweber_accessKey , $this->aweber_accessSecret);\n\t\t $lists = $account->lists->find(array('name' => $list_id));\n\t\t $list = $lists[0];\n\n\t\t # lets create some custom fields on your list!\n\t\t $custom_fields = $list->custom_fields;\n\t\t $params = array(\n\t\t 'email' => $post_data['email']\n\n\t\t );\n\n\t\t $subscribers = $list->subscribers;\n\t\t $found_subscribers = $subscribers->find($params);\n\t\t foreach ($found_subscribers as $subscriber) {\n\t\t $subscriber->delete();\n\t\t }\n\n\t\t # success!\n\t\t //print \"A new subscriber was added to the $list->name list!\";\n\t\t return true;\n\n\t\t} catch(AWeberAPIException $exc) {\n\t\t return false;\n\t\t}\n\n}", "public function testDelete() {\n $this->initializePurgersService(['c']);\n $this->drupalLogin($this->adminUser);\n $this->drupalGet(Url::fromRoute($this->route, ['id' => 'id0']));\n $this->assertRaw('Yes, delete this purger!');\n $this->assertTrue(array_key_exists('id0', $this->purgePurgers->getPluginsEnabled()));\n $json = $this->drupalPostAjaxForm(Url::fromRoute($this->route, ['id' => 'id0'])->toString(), [], ['op' => 'Yes, delete this purger!']);\n $this->assertEqual('closeDialog', $json[1]['command']);\n $this->assertEqual('redirect', $json[2]['command']);\n $this->purgePurgers->reload();\n $this->assertTrue(is_array($this->purgePurgers->getPluginsEnabled()));\n $this->assertTrue(empty($this->purgePurgers->getPluginsEnabled()));\n $this->assertEqual(3, count($json));\n // Assert that deleting a purger that does not exist, passes silently.\n $json = $this->drupalPostAjaxForm(Url::fromRoute($this->route, ['id' => 'doesnotexist'])->toString(), [], ['op' => 'Yes, delete this purger!']);\n $this->assertEqual('closeDialog', $json[1]['command']);\n $this->assertEqual(2, count($json));\n }", "public function test_delete_item() {}", "public function test_delete_item() {}", "function removeFromSlideshow()\r\n\t{\r\n\t\t$art_object_id = $this->input->post('art_object_id');\r\n\t\t\r\n\t\t$result = $this->artobject_model->deleteFromSlideshow($art_object_id);\r\n\t\tif($result)\r\n\t\t{\r\n\t\t\t$url = base_url('admin/manageArt/0/slideshowDeleted');\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$url = base_url('admin/manageArt/0/slideshowDeletedFailed');\r\n\t\t}\r\n\t\tredirect($url);\r\n\t}" ]
[ "0.80611134", "0.6175651", "0.6084192", "0.5854993", "0.5779039", "0.56939197", "0.5672255", "0.5665499", "0.5657381", "0.56455123", "0.5625484", "0.5580941", "0.5545405", "0.55362356", "0.55231667", "0.5510384", "0.54702806", "0.5467625", "0.5467625", "0.5467625", "0.5467625", "0.5467625", "0.5467625", "0.5467625", "0.5467625", "0.5467625", "0.5467625", "0.5467625", "0.5467625", "0.5467625", "0.54108536", "0.5387946", "0.5368878", "0.53483593", "0.5329022", "0.5326617", "0.5322544", "0.52952904", "0.5282376", "0.52662706", "0.5248388", "0.5248029", "0.52471995", "0.5243253", "0.5213637", "0.5195592", "0.5185584", "0.51674104", "0.51659966", "0.51627666", "0.5160782", "0.51545864", "0.5147323", "0.514606", "0.5145566", "0.51261955", "0.51249903", "0.51112497", "0.5110816", "0.5109", "0.51066697", "0.51066697", "0.51066697", "0.51066697", "0.5105636", "0.5105599", "0.5104418", "0.5101762", "0.5099114", "0.5098535", "0.5094011", "0.5084102", "0.507908", "0.50744617", "0.50734925", "0.5070007", "0.50650406", "0.50618935", "0.5061009", "0.5060796", "0.50563663", "0.5051345", "0.50493735", "0.5048876", "0.5045705", "0.50368565", "0.50297165", "0.5026636", "0.5026262", "0.50229555", "0.50219744", "0.50198764", "0.50064737", "0.5006049", "0.4998601", "0.4997687", "0.49960074", "0.49865448", "0.49865448", "0.49796006" ]
0.83671415
0
Test case for webinarPollCreate Create a Webinar's Poll.
Тест-кейс для webinarPollCreate Создание опроса вебинара.
public function testWebinarPollCreate() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarPollGet()\n {\n }", "public function testWebinarPollUpdate()\n {\n }", "public function createpollAction(Request $request)\n {\n $poll = new PollImpl();\n $form = $this->createForm(new NewPoll(), $poll);\n\n $form->handleRequest($request);\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($poll);\n $em->flush();\n $id = $poll->getId();\n return $this->redirect($this->generateUrl('poll_add_question', array(\"poll_id\" => $id)));\n }\n return $this->render('PollPollBundle:Poll:create_poll.html.twig', array('form' => $form->createView()));\n }", "public function store(CreatePollRequest $request)\n {\n $this->poll->create($request->all());\n\n return redirect()->route('admin.iquiz.poll.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('iquiz::polls.title.polls')]));\n }", "public function testWebinarPolls()\n {\n }", "public function create()\n {\n return view('polls.pollCreate'); \n }", "public function testWebinarCreate()\n {\n }", "private function create()\n {\n $events = [\n Webhook::EVENT_CONVERSATION_CREATED,\n Webhook::EVENT_CONVERSATION_UPDATED,\n Webhook::EVENT_MESSAGE_CREATED,\n Webhook::EVENT_MESSAGE_UPDATED,\n ];\n\n $chosenEvents = $this->choice(\n 'What kind of event you want to create',\n $events,\n $defaultIndex = null,\n $maxAttempts = null,\n $allowMultipleSelections = true\n );\n\n $webhookUrl = $this->ask('Please enter the webhook URL'); \n\n $webhook = new Webhook();\n $webhook->events = $chosenEvents;\n $webhook->channelId = $this->whatsAppChannelId;\n $webhook->url = $webhookUrl;\n\n try {\n $response = $this->messageBirdClient->conversationWebhooks->create($webhook);\n } catch (\\Exception $e) {\n $this->error($e->getMessage());\n }\n }", "protected function createPollRecord(array $data)\n {\n return Poll::create($data);\n }", "public function testWebinarPollDelete()\n {\n }", "public function actionCreate()\n {\n $model = new Poll();\n\n\n if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n $model->startdate = strtotime($model->startdate);\n $model->enddate = strtotime($model->enddate);\n $model->created_by = Yii::$app->user->identity->getEmployeeNo();\n\n //Yii::$app->recruitment->printrr($model); exit;\n $model->save();\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function testWebinarRegistrantCreate()\n {\n }", "function create_poll () {\n\t\treturn is_object($this->POLL_OBJ) ? $this->POLL_OBJ->_create(array(\"common\" => 1)) : \"\";\n\t}", "public function create()\n {\n return view('poll.create');\n }", "public function createPoll($client_project_id = null) {\r\n // Poll for this project already exists\r\n $poll = $this->find('first', array(\r\n 'conditions' => array(\r\n 'Poll.client_project_id' => $client_project_id\r\n )\r\n ));\r\n // Get project details\r\n $this->ClientProject->Behaviors->load('Containable');\r\n $project = $this->ClientProject->find('first', array(\r\n 'conditions' => array(\r\n 'ClientProject.id' => $client_project_id\r\n ),\r\n 'contain' => array(\r\n 'User',\r\n 'Client',\r\n 'ClientProjectBudget' =>array(\r\n 'ClientProjectBudgetPosition',\r\n ),\r\n 'ClientProjectShedule'\r\n )\r\n ));\r\n\r\n // Project does not exists\r\n // Poll already exists\r\n if (empty($project) || !empty($poll)) {\r\n return false;\r\n }\r\n\r\n // Create poll array\r\n $data['Poll'] = array(\r\n 'client_project_id' => $project['ClientProject']['id']\r\n );\r\n \r\n $data['PollQuestion'] = $this->buildQuestions($project['ClientProjectShedule'], $project['Client']['user_id']);\r\n// $data['PollQuestion'] = $this->buildQuestions($project['ClientProjectBudget']['ClientProjectBudgetPosition'], $project['Client']['user_id']);\r\n\r\n // Save poll along with associated data\r\n $result = $this->saveAssociated($data, array(\r\n 'validate' => false,\r\n 'deep' => true,\r\n ));\r\n\r\n return $result;\r\n }", "public function testListPastWebinarPollResults()\n {\n }", "public function polls_post($pollId=NULL){\n //Temporary workaround as I can't access PUT data for some reason\n if ($pollId){\n $this->polls_put($pollId);\n return;\n }\n\n $this->load->model(\"poll\");\n $this->load->model(\"answer\");\n\n try {\n $data = json_decode(trim(file_get_contents('php://input')), true);\n //Validate the poll\n $errors = $this->validate($data);\n if (count($errors) > 0){\n $this->response(array(\"errors\"=>$errors), 404);\n return;\n }\n\n //Question and title don't need html escaping, angular is magic\n $pollId = $this->poll->create($data[\"title\"], $data[\"question\"]);\n $answers = $data[\"answers\"];\n $answers_count = count($answers);\n\n //Insert all the answers\n for ($i = 0; $i < $answers_count; ++$i) {\n $answers[$i][\"optionNo\"] = $i + 1;\n $answers[$i][\"questionId\"] = $pollId;\n\n //Answer doesn't need html escaping, angular is magic\n $this->answer->create($pollId, $i, $answers[$i][\"answer\"]);\n }\n\n header(\"Location: /services/polls/$pollId\");\n $this->response(NULL, 201);\n }catch (Exception $e){\n $this->response(array(\"errorMessage\"=>\"Unable to create poll!\"), 404);\n }\n }", "public function testWebinarPanelistCreate()\n {\n }", "public function newpoll_submit(){\n SiteController::loggedInCheck();\n\n\t\tif (isset($_POST['Cancel'])) {\n\t\t\theader('Location: '.BASE_URL);\n\t\t\texit();\n\t\t}\n\n\t\t//get forumId from the group\n\t\t$groupId = $_POST['groupId'];\n\t\t$group_entry = Group::loadById($groupId);\n\t\t$forumId = $group_entry->get('forumId');\n\n\t\t$title = $_POST['title'];\n\t\t$author = $_SESSION['username'];\n\t\t$timestamp = date(\"Y-m-d\", time());\n\t\t$options = $_POST['options']; //array\n\n\t\t//get author's id\n\t\t$user_row = User::loadByUsername($author);\n\t\t$userid = $user_row->get('id');\n\n\t\t//create poll\n\t\t$poll = new Poll();\n\t\t$poll->set('userId', $userid);\n\t\t$poll->set('title', $title);\n\t\t$poll->set('forumId', $forumId);\n\t\t$poll->set('timestamp', $timestamp);\n\t\t$poll->save();\n\n\t\t//add options\n\t\tforeach ($options as $option){\n\t\t\t$poll_option = new PollOption();\n\t\t\t$poll_option->set('pollId', $poll->get('id'));\n\t\t\t$poll_option->set('poll_option', $option);\n\t\t\t$poll_option->save();\n\t\t}\n\t\theader('Location: '.BASE_URL);\t\t\t\t\t\t\t\t\t\t\t\t//TODO update\n\t}", "public function newpoll(){\n SiteController::loggedInCheck();\n\n\t\tinclude_once SYSTEM_PATH.'/view/newpoll.tpl'; //TODO make sure the tpl is correct\n\t}", "public function testCreateSurvey()\n {\n $data = [\n 'year' => 2020,\n 'type' => Survey::TRAINER,\n 'title' => 'My Awesome Survey',\n 'prologue' => 'Take the survey',\n 'epilogue' => 'Did you take it?'\n ];\n\n $response = $this->json('POST', 'survey', [\n 'survey' => $data\n ]);\n\n $response->assertStatus(200);\n $this->assertDatabaseHas('survey', $data);\n }", "public function add_poll()\n {\n\n $method = $_SERVER['REQUEST_METHOD'];\n\n\n if ($method != 'POST') {\n\n json_output(400, array('status' => 400, 'message' => 'Bad request.'));\n } else {\n\n $check_auth_client = $this->auth_model->check_auth_client();\n\n\n if ($check_auth_client == true) {\n\n $response = $this->auth_model->auth();\n\n if ($response['status'] == 200) {\n\n $this->load->model('Table_poll_model');\n\n $returned_string = $this->Table_poll_model->add_poll();\n\n $response = array();\n $response['success'] = '1';\n $response['message'] = 'Uploaded';\n $response['return'] = $returned_string;\n\n echo json_encode($response);\n\n }\n }\n }\n\n\n }", "public function actionCreate() {\n $model = new Surveys();\n\n if ($model->load(Yii::$app->request->post())) {\n if ($model->validate() == TRUE) {\n // print_r($model);\n $model->save();\n Yii::$app->session->setFlash('success', \"Poll Created Succsesfully\");\n\n return $this->redirect('create');\n } else {\n $sessions = Yii::$app->session->set(\"Error\", \"Error when creating Survey\");\n }\n //print_r($model);\n //return $this->redirect(['view', 'id' => $model->survey_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n {\n $poll=new Polls();\n return view('admin.polls.edit')->withPoll($poll);\n }", "public function store(CreatePollTypeAPIRequest $request)\n {\n $input = $request->all();\n\n $pollType = $this->pollTypeRepository->create($input);\n\n return $this->sendResponse(new PollTypeResource($pollType), 'Poll Type saved successfully');\n }", "public function testEventCreate()\n {\n $response = $this->get('events/create');\n\n $response->assertStatus(200);\n }", "public function store(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => ['required'],\n 'description' => ['required'],\n 'deadline1' => ['required'],\n 'deadline2' => ['required'],\n 'choices1' => ['required']\n ]);\n\n if ($validator->fails()) {\n return redirect()->back()->withInput()->with('status', 'Create Failed!');\n }\n\n \n $crud = Poll::create([\n 'title' => $request->title,\n 'description' => $request->description,\n 'deadline' => $request->deadline1.' '.$request->deadline2,\n 'created_by' => Auth::user()->id\n ]);\n \n if ($crud) {\n $poll_id = Poll::findOrFail($id);\n for ($a=1; $a <= 5; $a++) { \n if ($request->input('choices'.$a)) {\n $crud2 = Choice::create([\n 'choices' => $request->input('choices'.$a),\n 'poll_id' => $poll_id->id\n ]);\n } else {}\n }\n return redirect()->route('poll')->with('status', 'Poll Created!');\n if ($crud2) {\n return redirect()->route('poll')->with('status', 'Poll Created!');\n } else {\n return redirect()->back()->withInput()->with('status', 'Create Failed!');\n }\n } else {\n return redirect()->back()->withInput()->with('status', 'Create Failed!');\n }\n }", "function createWebinar($payloadArray)\n {\n $path = $this->getPathRelativeToOrganizer(sprintf('webinars'));\n\n $webinarObject = new WebinarEntity($payloadArray);\n\n return $this->sendRequest('POST', $path, $parameters = null, $payload = $webinarObject->toArray());\n }", "public function run()\n {\n $poll = new Poll();\n $poll->title = \"This is a simple poll from admin panel\";\n $poll->slug = \"this-is-a-simple-poll-from-admin-panel\";\n $poll->status = 1;\n $poll->start_date = \"2020-06-14\";\n $poll->end_date = \"2020-06-15\";\n $poll->total_yes = 5;\n $poll->total_no = 2;\n $poll->total_no_comment = 1;\n $poll->save();\n\n $poll = new Poll();\n $poll->title = \"This is another poll from admin panel\";\n $poll->slug = \"this-is-another-poll-from-admin-panel\";\n $poll->status = 0;\n $poll->start_date = \"2020-06-15\";\n $poll->end_date = \"2020-06-16\";\n $poll->total_yes = 7;\n $poll->total_no = 11;\n $poll->total_no_comment = 3;\n $poll->save();\n }", "public function create()\n {\n $polls = Poll::all();\n $menuSections = Section::where('level', 1)\n ->where('topnav_back', 1)\n ->where('active', 1)->get();\n\n $menuLeftSections = Section::where('level', 1)\n ->where('active', 1)->get();\n\n $countries = Country::orderBy('name', 'ASC')->get();\n $provinces = Province::orderBy('name', 'ASC')->get();\n $helps = Help::all();\n\n $not_responded = Contact::where('contacted', 0)->get()->count();\n\n return view('backend.polls.create', compact('polls', 'not_responded', 'helps', 'countries', 'provinces', 'menuSections', 'menuLeftSections'));\n }", "public function testStoreShouldCreateNewRiddle(){\n\t\t$riddle = [\n\t\t\t'solution' => 'solution',\n\t\t\t'riddle' => 'riddle',\n\t\t\t'name' => 'name',\n\t\t];\n\n\n\t\t$response = $this->call('POST', '/riddles', $riddle);\n\n\t\t$this->assertEquals(302, $response->status());\n\t\t$this->assertRedirectedTo(url('/riddles/1?successMessage=Record+Added+Successfully'));\n\n\t\t$this->assertEquals(1, count(Riddle::all()));\n\n\t\t$storedRiddle = Riddle::findById(1);\n\t\t$this->assertNotNull($storedRiddle);\n\n\t\t$this->assertEquals('solution', $storedRiddle->solution);\n\t\t$this->assertEquals('riddle', $storedRiddle->riddle);\n\t\t$this->assertEquals('name', $storedRiddle->name);\n\n\t\t$this->assertEquals(0, $storedRiddle->approved);\n\t\t$this->assertEquals(0, $storedRiddle->public);\n\t\t$this->assertEquals($this->user->id, $storedRiddle->owner_id);\n\t}", "public function testPolicyCanBeCreated()\n {\n $policy = factory(App\\Models\\Policy::class)->create([\n 'title' => 'Administrator',\n ]);\n\n $this->assertEquals($policy->title, 'Administrator');\n\n $this->seeInDatabase('policies', ['id' => '1', 'title' => 'Administrator']);\n }", "public function testWebinar()\n {\n }", "function target_add_poll($poll)\n{\n\tif ($GLOBALS['VERBOSE']) pf('...'. $poll['name']);\n\n\tif ($poll['owner'] == 1 && isset($GLOBALS['hack_id'])) {\n\t\t$poll['owner'] = $GLOBALS['hack_id'];\n\t}\n\tq('INSERT INTO '. $GLOBALS['DBHOST_TBL_PREFIX'] .'poll (id, name, owner, creation_date, expiry_date, forum_id)\n\tVALUES(\n\t\t'. (int)$poll['id'] .',\n\t\t'. _esc($poll['name']) .',\n\t\t'. (int)$poll['owner'] .',\n\t\t'. (int)$poll['creation_date'] .',\n\t\t'. (int)$poll['expiry_date'] .',\n\t\t'. $GLOBALS['forum_map'][ (int)$poll['forum_id'] ] .')'\n\t);\n\n\tq('UPDATE '. $GLOBALS['DBHOST_TBL_PREFIX'] .'msg SET poll_id='. (int)$poll['id'] .' WHERE id='. (int)$poll['post_id']);\n}", "public function store(Request $request)\n {\n $poll=Polls::create([\n 'title'=>$request->input('title'), \n 'description'=>$request->input('description'),\n 'videosrc'=>$request->input('videosrc'),\n 'videoposter'=>$request->input('videoposter'), \n 'starttime'=>$request->input('starttime'),\n 'endtime'=>$request->input('endtime'),\n 'rewardflag'=>$request->input('rewardflag')\n ]);\n return redirect('/admin/polls')\n ->withSuccess(\"'$poll->title' 新建成功.\");\n }", "public function testSellerCreateSuccess()\n {\n $this->demoUserLoginIn();\n $response = $this->call('GET', '/seller/create');\n $this->assertEquals(200, $response->status());\n }", "public function create($id)\n {\n $id = $id;\n return view('admin.poll.create', compact('id'));\n }", "public function create(Request $data) {\n \t$vote = new BookVote;\n \t$vote->poll_id = $data->poll_id;\n \t$vote->user_id = $data->user_id;\n \t$vote->vote = $data->vote;\n \t$vote->save();\n\n \treturn response()->json(true, 200);\n }", "public function testWebinarUpdate()\n {\n }", "protected function reportWebinarPollsRequest($webinar_id)\n {\n // verify the required parameter 'webinar_id' is set\n if ($webinar_id === null || (is_array($webinar_id) && count($webinar_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $webinar_id when calling reportWebinarPolls'\n );\n }\n\n $resourcePath = '/report/webinars/{webinarId}/polls';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($webinar_id !== null) {\n $resourcePath = str_replace(\n '{' . 'webinarId' . '}',\n ObjectSerializer::toPathValue($webinar_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'application/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'application/xml'],\n ['application/json', 'multipart/form-data']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function testGetAllPolls()\n {\n Passport::actingAs(\n factory(\"App\\User\")->create(),\n ['*']\n );\n $polls= factory(\"App\\Poll\",5)->create();\n $response = $this->get('/polls');\n $response->assertStatus(200);\n $response->assertJson($polls->toArray());\n }", "public function create()\n {\n return view('iquiz::admin.polls.create');\n }", "public function testCreate()\n\t{\n\t\tRoute::enableFilters();\n\t\tEvaluationTest::adminLogin();\n\t\t$response = $this->call('GET', '/evaluation/create');\n\t\t\n\t\t$this->assertResponseOk();\n\n\t\tSentry::logout();\n\t\t\n\t\t//tesing that a normal user can't retrieve a form to create \n\t\t//an evaluation and that a page displays a message as to why they can't\n\t\tEvaluationTest::userLogin();\n\t\t$crawler = $this->client->request('GET', '/evaluation/create');\n\t\t$message = $crawler->filter('body')->text();\n\n\t\t$this->assertFalse($this->client->getResponse()->isOk());\n\t\t$this->assertEquals(\"Access Forbidden! You do not have permissions to access this page!\", $message);\n\n\t\tSentry::logout();\n\t}", "public function create(\\Marat555\\Eventbrite\\Factories\\Entity\\Webhook $webhook);", "public function executeCreate(sfWebRequest $request)\n {\n $this->forward404Unless($request->isMethod(sfRequest::POST));\n $this->form = new WebsitePracticeAreaForm();\n $this->websitedetail = UsersWebsite::getUsersWebsiteId($this->getUser()->getAttribute('admin_user_id'));\n $this->displaySlugValue = $_POST['WebsitePracticeArea']['Newslug'];\n $redirectFlag = $request->getPostParameter('submit');\n $this->processForm($request, $this->form, $redirectFlag);\n $this->setTemplate('new');\n }", "public function test_is_valid_resource() {\n\n\t\t$webhook = LLMS_REST_API()->webhooks()->create( array(\n\t\t\t'delivery_url' => 'https://fake.tld',\n\t\t\t'topic' => 'course.created',\n\t\t) );\n\n\t\t$course = $this->factory->post->create_and_get( array( 'post_type' => 'course' ) );\n\n\t\tglobal $wp_current_filter;\n\t\t$wp_current_filter = array( 'save_post_course' );\n\t\t$this->assertTrue( LLMS_Unit_Test_Util::call_method( $webhook, 'is_valid_resource', array( array( $course->ID, $course ) ) ) );\n\n\t\t// Alter the post creation date so to simulate an update: A resource is considered created when the hook is executed within 10 seconds of the post creation date.\n\t\t$course->post_date = date( 'Y-m-d H:i:s', strtotime('-11 seconds') );\n\t\twp_update_post( $course );\n\t\t$this->assertFalse( LLMS_Unit_Test_Util::call_method( $webhook, 'is_valid_resource', array( array( $course->ID, $course ) ) ) );\n\t\t$wp_current_filter = array();\n\n\t\t// it's a draft.\n\t\t$course->post_status = 'auto-draft';\n\t\twp_update_post( $course );\n\t\t$this->assertFalse( LLMS_Unit_Test_Util::call_method( $webhook, 'is_valid_resource', array( array( $course->ID, $course ) ) ) );\n\n\t}", "public function addquestionAction(Request $request, $poll_id)\n {\n $em = $this->getDoctrine()->getManager();\n $poll = $em->getRepository('PollPollBundle:PollImpl')->find($poll_id);\n $title = $poll->getTitle();\n\n $form = $this->createForm(new NewQuestion());\n\n $form->handleRequest($request);\n if ($form->isValid()) {\n $data = $form->getViewData();\n // create question entity and fill the data\n $question = new QuestionImpl();\n $question->setPollId($poll);\n $question->setQuestionType($data[\"type\"]);\n $question->setQuestion($data[\"question_text\"]);\n $em->persist($question);\n $em->flush();\n\n if (in_array($data[\"type\"], array(\n ObjectFactory::SINGLE_CHOICE_QUESTION,\n ObjectFactory::MULTIPLE_CHOICE_QUESTION))) {\n $options = $data[\"options\"];\n $options = preg_split('/\\R/', $options);\n\n $question_entity = $em->getRepository('PollPollBundle:QuestionImpl')->find($question->getId());\n\n foreach ($options as $opt) {\n // create option entity and fill the data\n $option = new OptionImpl();\n $option->setPoll($poll);\n $option->setOption($opt);\n $option->setQuestion($question_entity);\n $em->persist($option);\n }\n $em->flush();\n }\n\n $next_action = $form->get('done')->isClicked() ? 'poll_show_one' : 'poll_add_question';\n return $this->redirect($this->generateUrl($next_action, array(\"poll_id\" => $poll_id)));\n }\n return $this->render('PollPollBundle:Poll:add_question.html.twig', array(\n 'form' => $form->createView(),\n 'title' => $title));\n }", "public function testCanCreateUserObject()\n {\n $s = json_decode('{\"url\":\"https://www.test.net:8443/webhook\",\"has_custom_certificate\":true,\"pending_update_count\":0,\"max_connections\":40}');\n $t = new WebhookInfo($s);\n $this->assertInstanceOf(WebhookInfo::class, $t);\n $this->assertEquals('https://www.test.net:8443/webhook', $t->url);\n $this->assertTrue($t->has_custom_certificate);\n }", "public function testWebinarStatus()\n {\n }", "private function buildVenueSurvey()\n {\n $this->year = current_year();\n\n $this->trainer = Person::factory()->create();\n\n $this->survey = Survey::factory()->create(['year' => $this->year, 'position_id' => Position::TRAINING]);\n $surveyId = $this->survey->id;\n\n $this->venueGroup = SurveyGroup::factory()->create(['survey_id' => $surveyId, 'sort_index' => 1]);\n $this->venueQuestion = SurveyQuestion::factory()->create(['survey_id' => $surveyId, 'survey_group_id' => $this->venueGroup->id]);\n\n $this->trainerGroup = SurveyGroup::factory()->create(['survey_id' => $surveyId, 'type' => 'trainer', 'sort_index' => 2]);\n $this->trainerQuestion = SurveyQuestion::factory()->create(['survey_id' => $surveyId, 'survey_group_id' => $this->trainerGroup->id]);\n\n $this->slot = Slot::factory()->create([\n 'description' => 'Venue 1',\n 'position_id' => Position::TRAINING,\n 'begins' => \"{$this->year}-01-01 00:00\",\n 'ends' => \"{$this->year}-01-01 00:01\"\n ]);\n PersonSlot::factory()->create(['person_id' => $this->user->id, 'slot_id' => $this->slot->id]);\n TraineeStatus::factory()->create(['person_id' => $this->user->id, 'slot_id' => $this->slot->id, 'passed' => true]);\n $this->trainerSlot = Slot::factory()->create([\n 'description' => 'Venue 1',\n 'position_id' => Position::TRAINER,\n 'begins' => \"{$this->year}-01-01 00:00\",\n 'ends' => \"{$this->year}-01-01 00:01\"\n ]);\n PersonSlot::factory()->create(['person_id' => $this->trainer->id, 'slot_id' => $this->trainerSlot->id]);\n TrainerStatus::factory()->create([\n 'person_id' => $this->trainer->id,\n 'slot_id' => $this->slot->id,\n 'trainer_slot_id' => $this->trainerSlot->id,\n 'status' => TrainerStatus::ATTENDED\n ]);\n }", "public function testWebinarRegistrants()\n {\n }", "public function test_create_task()\n {\n \n $response = $this->post('/task', [\n 'name' => 'Task name', \n 'priority' => 'urgent', \n 'schedule_date_date' => '2020-12-12',\n 'schedule_date_time' => '12:22',\n 'project_id' => 1,\n ]);\n $response->assertStatus(302);\n }", "public function store(Request $request)\n {\n $newPoll = new NewPoll;\n $newPoll->poll_message = $request->createPoll;\n $newPoll->invite_id = $request->id;\n $newPoll->save();\n\n return back()->withInput();\n }", "public function testCanCreateCourse()\n {\n \n $response = $this->call('POST', '/course', [\n 'name' => 'Kursur PHP Advance',\n 'level' => 'Beginner',\n 'benefit' => 'Bisa membuat website sendiri'\n ]);\n $this->assertEquals(201, $response->status());\n }", "public function testMeetingCreatePost()\n {\n $user = factory(App\\User::class)->create();\n }", "public function testVenueSubmitSurvey()\n {\n $this->buildVenueSurvey();\n\n $venueG = $this->venueGroup;\n $venueQ = $this->venueQuestion;\n\n $response = $this->json('POST', 'survey/submit', [\n 'slot_id' => $this->slot->id,\n 'type' => Survey::TRAINING,\n 'survey' => [\n [\n 'survey_group_id' => $venueG->id,\n 'answers' => [\n [\n 'survey_question_id' => $venueQ->id,\n 'response' => 'a response'\n ]\n ]\n ],\n ]\n ]);\n\n $response->assertStatus(200);\n\n $this->assertDatabaseHas('survey_answer', [\n 'person_id' => $this->user->id,\n 'slot_id' => $this->slot->id,\n 'survey_question_id' => $venueQ->id,\n 'response' => 'a response'\n ]);\n }", "public function user_can_visit_create_event_page()\n {\n $response = $this->get('/events/create');\n $response->assertStatus(200);\n $response->assertSeeText('Name');\n }", "public function __construct(Poll $poll, ObjectFactory $factory)\n\t{\n\t\t$this->objectFactory = $factory;//new LocalObjectFactory;\n\t\t$this->poll = $poll; //$objectFactory.createPoll();\n\t\t$this->questions = array();\n\t\t// $this->options = array();\n\t}", "public function testCreateTask()\n {\n $this->logInUserObject();\n $crawler = $this->client->request('GET', '/tasks/create');\n $form = $crawler->selectButton('Ajouter')->form();\n $form['task[title]'] = 'Titre test';\n $form['task[content]'] = 'Contenu de test pour la création d\\'une tâche';\n $this->task = $this->client->submit($form);\n\n $crawler = $this->client->followRedirect();\n $response = $this->client->getResponse();\n $statusCode = $response->getStatusCode();\n\n $this->assertEquals(200, $statusCode);\n $this->assertContains('Superbe! La tâche a été bien été ajoutée.', $crawler->filter('div.alert.alert-success')->text());\n }", "public function testWebinarRegistrantStatus()\n {\n }", "public function testCreateSurvey0()\n {\n }", "public function testCreateSurvey0()\n {\n }", "public function test_shoppers_create_page_is_rendered()\n {\n $shopper = Shopper::withoutEvents(function () {\n return Shopper::factory()->create();\n });\n\n $this->actingAs($shopper);\n\n $response = $this->get(route('shoppers.create'));\n\n $response->assertStatus(200);\n }", "public function create($websiteId, $prospect) {\n // @TODO - add support for api call\n throw new \\Exception('Not implemented');\n }", "public function testWebinarAbsentees()\n {\n }", "public function testWebinarRegistrantQuestionUpdate()\n {\n }", "public function create()\n\t{\n\t\t$input = JFactory::getApplication()->input;\n\t\t$db = JFactory::getDbo();\n\t\t$view = $this->getView('pbbooking','html');\n\t\t$config = $db->setQuery('select * from #__pbbooking_config')->loadObject();\n\t\t\n\t\t$dateparam = $input->get('dtstart',date_create('now',new DateTimeZone(PBBOOKING_TIMEZONE))->format('YmdHi'),'string');\n\t\t$cal_id = $input->get('cal_id',0,'integer');\n\t\t$opening_hours = json_decode($config->trading_hours,true);\n\t\t$closing_time_arr = str_split( $opening_hours[date_create($dateparam,new DateTimezone(PBBOOKING_TIMEZONE))->format('w')]['close_time'],2 );\n\t\t\n\t\t$view->dateparam = date_create($dateparam,new DateTimeZone(PBBOOKING_TIMEZONE));\n\t\t$view->customfields = $db->setQuery('select * from #__pbbooking_customfields')->loadObjectList();\n\t\t$view->treatments = $db->setQuery('select * from #__pbbooking_treatments')->loadObjectList();\n\t\t$view->cal = new Calendar();\n\t\t$view->cal->loadCalendarFromDbase(array((int)$cal_id));\n\t\t$view->closing_time = clone $view->dateparam;\n\t\t$view->closing_time->setTime((int)$closing_time_arr[0],(int)$closing_time_arr[1],0);\n\t\t$view->config = $config;\n\n\t\t$view->setLayout('create');\n\t\t$view->display();\n\t}", "public function testBookCreatedSuccessfully()\n {\n $book = factory(Book::class)->make();\n \n $payload = [\n 'title' => $book->title,\n 'isbn' => $book->isbn,\n 'published_at' => $book->published_at,\n ];\n\n $this->json('post', '/api/books/create', $payload, $this->getHeaders())\n ->assertStatus(200)\n ->assertJsonStructure([\n 'message'\n ]);\n }", "public function testVolunteerHourCreateForContactSuccess_Administrator()\n {\n // Set test user as current authenticated user\n $this->be($this->administrator);\n \n $this->session([\n 'username' => $this->administrator->username, \n 'access_level' => $this->administrator->access_level\n ]);\n \n $volunteerID = 2;\n // Call route under test\n $response = $this->call('GET', 'volunteerhours/add/volunteer/'.$volunteerID);\n \n $this->assertContains('Volunteer Hours for', $response->getContent());\n }", "public function test_add_new_wall_route() {\n global $CFG;\n\n // request the page\n $client = new Client($this->_app);\n $crawler = $client->request('GET', '/' . $this->_walls[0]->id . '/add');\n $this->assertTrue($client->getResponse()->isOk());\n\n // post some data\n $form = $crawler->selectButton(get_string('savechanges'))->form();\n $client->submit($form, array(\n 'form[title]' => 'Title 001',\n ));\n\n // expect to get redirected to the wall that was added\n $url = $CFG->wwwroot . SLUG . $this->_app['url_generator']->generate('wall', array(\n 'id' => 6,\n ));\n $this->assertTrue($client->getResponse()->isRedirect($url));\n }", "public function actionCreate()\n {\n $model = new WebinarCreateRequest();\n\n if ($model->load(Yii::$app->request->post()) ) {\n $model->status = Status::STATUS_NEW;\n $model->created_at = gmdate('Y-m-d H:i:s');\n $model->updated_at = gmdate('Y-m-d H:i:s');\n $model->created_by = $model->author_name;\n $model->updated_by = $model->author_name;\n $user = $model->author_name;\n $model->save();\n\n if($this->sendActivationLink($model->id, $model->email, $user)) {\n return $this->render('create', [\n 'model' => $model, \n 'status' => 'success', 'id' => $model->id]);\n }\n \n //return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function testHandleCreate(): void\n {\n $query = 'SELECT * FROM [nt:unstructured]';\n $locale = 'fr';\n $primarySelector = 'p';\n\n $this->queryCreateEvent->getInnerQuery()->willReturn($query);\n $this->queryCreateEvent->getLocale()->willReturn($locale);\n $this->queryCreateEvent->getOptions()->willReturn([]);\n $this->queryCreateEvent->getPrimarySelector()->willReturn($primarySelector);\n $this->queryManager->createQuery($query, 'JCR-SQL2')->willReturn($this->phpcrQuery->reveal());\n $this->queryCreateEvent->setQuery(new Query(\n $this->phpcrQuery->reveal(),\n $this->dispatcher->reveal(),\n $locale,\n [],\n $primarySelector\n ))->shouldBeCalled();\n\n $this->subscriber->handleCreate($this->queryCreateEvent->reveal());\n }", "public function testCreate()\n {\n VCR::insertCassette('pickups/create.yml');\n\n $shipment = Shipment::create(Fixture::oneCallBuyShipment());\n\n $pickupData = Fixture::basicPickup();\n $pickupData['shipment'] = $shipment;\n\n $pickup = Pickup::create($pickupData);\n\n $this->assertInstanceOf('\\EasyPost\\Pickup', $pickup);\n $this->assertStringMatchesFormat('pickup_%s', $pickup->id);\n $this->assertNotNull($pickup->pickup_rates);\n }", "public function testStoreCreate()\n {\n $user = factory(User::class)->create(['id' => 1]);\n $postData = [\n 'slots' => ['10:00', '13:00', '16:00', '19:00']\n ];\n $this->actingAs($user)\n ->post(route('schedule.store'), $postData);\n $this->assertDatabaseHas('schedules', [\n 'user_id' => $user->id,\n 'date' => $tomorrow = Carbon::tomorrow()->format(config('app.date_format_db'))])\n ->assertDatabaseHas('slots', ['slot' => '10:00'])\n ->assertDatabaseHas('slots', ['slot' => '13:00'])\n ->assertDatabaseHas('slots', ['slot' => '16:00'])\n ->assertDatabaseHas('slots', ['slot' => '19:00']);\n }", "public function createBooking(array $data);", "public function testHandleCreateSuccess()\n {\n // Populate data\n $this->_populate();\n \n $response = $this->withSession($this->adminSession)\n ->call('POST', '/dealer-account/create', $this->customDealerAccountData, [], [], ['HTTP_REFERER' => '/dealer-account/create']);\n \n $this->assertRedirectedTo('/dealer-account');\n $this->assertSessionHas('dealer-account-created', '');\n }", "public function test_add_status_event()\n {\n $employer = Employer::factory()->create();\n $status = EmployerStatus::create([\n \"employer_id\" => $employer->id,\n \"online_at\" => $online_at = Carbon::now(),\n\n ]);\n $this->assertDatabaseHas(\"employer_statuses\", [\n \"employer_id\" => (string)$employer->id,\n \"online_at\" => $online_at,\n\n ]);\n }", "public function testListPastWebinarQA()\n {\n }", "public function testVolunteerHourCreateForProjectSuccess_Administrator()\n {\n // Set test user as current authenticated user\n $this->be($this->administrator);\n \n $this->session([\n 'username' => $this->administrator->username, \n 'access_level' => $this->administrator->access_level\n ]);\n \n $testProjectID = 1;\n // Call route under test\n $response = $this->call('GET', 'volunteerhours/add/project/'.$testProjectID);\n \n $this->assertContains('Volunteer Hours for', $response->getContent());\n }", "public function testCreateNew(): void\n {\n $requestHandler = $this->createInstance();\n $request = $requestHandler->create();\n\n self::assertInstanceOf(ActivityStub::class, $request);\n }", "public function create(CreateNewOfferRequest $request) {\n\n // Create new paymill request\n $paymillRequest = new \\Paymill\\Request(env('PAYMILL_API_KEY'));\n\n $currency = 'EUR';\n $interval = '1 MONTH';\n\n // Create new offer\n $paymillOffer = new \\Paymill\\Models\\Request\\Offer();\n $paymillOffer->setAmount($request->get('offer_amount'))\n ->setCurrency($currency)\n ->setInterval($interval)\n ->setName($request->get('offer_name'));\n\n $response = $paymillRequest->create($paymillOffer);\n\n $promoCode = $request->get('promo_code');\n $enableOffer = $request->get('enable_offer');\n $useOnSignUp = $request->get('use_on_sign_up');\n\n // If this offer will be used on sign up make sure it is the only one\n if ($useOnSignUp) {\n Offer::where('use_on_sign_up', true)->update(['use_on_sign_up' => false]);\n $promoCode = '';\n $enableOffer = false;\n }\n\n // An enabled offer can not be used on sign up\n if ($enableOffer) {\n $useOnSignUp = false;\n }\n\n // Save in database\n Offer::create([\n 'paymill_offer_id' => $response->getId(),\n 'name' => $request->get('offer_name'),\n 'amount' => $request->get('offer_amount'),\n 'interval' => $interval,\n 'currency' => $currency,\n 'promo_code' => $promoCode,\n 'use_on_sign_up' => (bool)$useOnSignUp,\n 'disabled' => !(bool)$enableOffer\n ]);\n\n // Return response\n $ajaxResponse = new AjaxResponse();\n $ajaxResponse->setSuccessMessage(trans('offers.offer_created'));\n return response($ajaxResponse->get())->header('Content-Type', 'application/json');\n }", "public function create()\n {\n return View::make('polys.create');\n }", "public function createOffer()\n {\n global $mysqli, $_POST;\n $hotel_id = $_POST['hotel_id'];\n $date_begin = date(\"Y-m-d\", strtotime($_POST[\"date_begin\"]));\n $date_end = date(\"Y-m-d\", strtotime($_POST[\"date_end\"]));\n $title = $mysqli->real_escape_string($_POST[\"title\"]);\n $subtitle = $mysqli->real_escape_string($_POST[\"subtitle\"]);\n $header = $mysqli->real_escape_string($_POST[\"header\"]);\n $footer = $mysqli->real_escape_string($_POST[\"footer\"]);\n $services = $mysqli->real_escape_string($_POST[\"services\"]);\n $description = $mysqli->real_escape_string($_POST[\"description\"]);\n $alias = $mysqli->real_escape_string($_POST[\"alias\"]);\n $type = $mysqli->real_escape_string($_POST[\"type\"]);\n $course = $mysqli->real_escape_string($_POST[\"course\"]);\n $status = $mysqli->real_escape_string($_POST[\"status\"]);\n $type_date = $mysqli->real_escape_string($_POST[\"type_date\"]);\n $discount = $mysqli->real_escape_string($_POST[\"discount\"]);\n\n $insert_offer =\"INSERT INTO offers(`hotel_id`,`title`,`subtitle`,`header`,`footer`,`services`,`description`,`alias`,`type`,`type_date`,`course`,`discount`,`date_begin`,`date_end`,`status`,`created_at`)\n VALUES('\".$hotel_id.\"','\".$title.\"','\".$subtitle.\"','\".$header.\"','\".$footer.\"','\".$services.\"','\".$description.\"','\".$alias.\"','\".$type.\"','\".$type_date.\"','\".$course.\"','\".$discount.\"','\".$date_begin.\"','\".$date_end.\"','\".$status.\"',NOW())\";\n $mysqli->query($insert_offer);\n $id = $mysqli->insert_id;\n if($id>0) {\n print json_encode(['success'=>1,'row'=>'']);\n }\n else {\n print json_encode(['success'=>0,'row'=>'']);\n }\n\n }", "public function create()\n {\n $action_plans = ActionPlan::currentReport()->get();\n $observers = Observer::currentReport()->currentUser()->enabled()->get();\n $observer_types = ObserverTypes::optionsWithLabels();\n $data = json_encode(compact('action_plans', 'observers','observer_types'));\n\n return view('pulse-surveys.create', compact('data'));\n }", "public function testCreateBook()\n {\n $this->browse(function (Browser $browser) {\n //Make a book to add \n $book = factory('App\\Book')->make();\n //Navigate to the create page and send the data\n $browser->visit('/api/books/create')\n ->type('title', $book->title)\n ->type('author', $book->author)\n ->press('Add');\n //Check we are redirected to home page with no errors.\n $browser->pause(500);\n $browser->assertPathIs('/api/books')->assertSee('Book was successfully saved');\n //Check the new book is displayed\n $browser \n ->assertSee($book->title)\n ->assertSee($book->author);\n\n });\n\n }", "public function create($observer)\n\t{\n\t\t$webhook\t= Mage::getBaseUrl() . \"compropago/webhook\";\n\t\t$session\t= Mage::getSingleton('adminhtml/session');\n\t\t$publicKey\t= Mage::getStoreConfig('payment/base/publickey');\n\t\t$privateKey\t= Mage::getStoreConfig('payment/base/privatekey');\n\t\t$mode\t\t= intval(Mage::getStoreConfig('payment/base/mode')) == 1;\n\n\t\ttry\n\t\t{\n\t\t\t$objWebhook = (new sdkWebhook)->withKeys($publicKey, $privateKey);\n\n\t\t\t# Create webhook on ComproPago Panel\n\t\t\t$response = $objWebhook->create($webhook);\n\n\t\t\t$session->addSuccess('ComproPago Webhook was registered correctly.');\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$errors = [\n\t\t\t\t'Request Error [409]: ',\n\t\t\t];\n\t\t\t$message = json_decode(str_replace($errors, '', $e->getMessage()), true);\n\n\t\t\t# Ignore Webhook registered\n\t\t\tif ( isset($message['code']) && $message['code']==409 )\n\t\t\t{\n\t\t\t\t$session->addSuccess('ComproPago Webhook is registered.');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telseif( isset($message['message']) )\n\t\t\t{\n\t\t\t\tMage::throwException( $message['message'] );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tMage::throwException('$e->getMessage()');\n\t\t\t}\n\t\t}\n\t}", "function create()\n\t{\n\t\t$db = JFactory::getDbo();\n\t\t\n\t\tif ($_SERVER['REQUEST_METHOD'] == \"GET\") {\n\t\t\t//render the create form\n\t\t\t$view = $this->getView('manage','html');\n\t\t\t\n\t\t\t//load data\n\t\t\t$db->setQuery('select * from #__pbbooking_customfields');\n\t\t\t$view->customfields = $db->loadObjectList();\n\t\t\t$db->setQuery('select* from #__pbbooking_treatments');\n\t\t\t$view->services = $db->loadObjectList();\n\t\t\t$db->setQuery('select * from #__shbesuche_config');\n\t\t\t$view->config = $db->loadObject();\n\t\t\t$view->date = date_create(JRequest::getVar('date'),new DateTimeZone(SHBESUCHE_TIMEZONE));\n\t\t\t$db->setQuery('select * from #__pbbooking_cals');\n\t\t\t$view->cals = $db->loadObjectList();\n\n\t\t\t//sort out openign and closing times\n\t\t\t$opening_hours = json_decode($view->config->trading_hours,true);\n\t\t\t$opening_time_arr = str_split($opening_hours[$view->date->format('w')]['open_time'],2);\n\t\t\t$closing_time_arr = str_split($opening_hours[$view->date->format('w')]['close_time'],2);\n\t\t\t$view->dt_start = date_create($view->date->format(DATE_ATOM),new DateTimeZone(SHBESUCHE_TIMEZONE));\n\t\t\t$view->dt_end = date_create($view->date->format(DATE_ATOM),new DateTimeZone(SHBESUCHE_TIMEZONE));\n\t\t\t$view->dt_start->setTime($opening_time_arr[0],$opening_time_arr[1]);\n\t\t\t$view->dt_end->setTime($closing_time_arr[0],$closing_time_arr[1]);\n\t\n\t\t\t//display the view\n\t\t\t$view->setLayout('create_event');\n\t\t\tJToolbarHelper::save('create');\n\t\t\t$view->display();\n\t\t}\n\t\tif ($_SERVER['REQUEST_METHOD'] == \"POST\") {\n\t\t\t$_POST['treatment_time'] = $_POST['treatment-time'];\n\t\t\t$event_id = Pbbookinghelper::save_pending_event($_POST);\n\t\t\tif ($event_id) {\n\t\t\t\t$db->setQuery('select * from #__pbbooking_pending where id='.$event_id);\n\t\t\t\t$event = $db->loadObject();\n\t\t\t\t$validated_id = Pbbookinghelper::validate_pending($event_id,$event->email);\n\t\t\t\tif ($validated_id) {\n\t\t\t\t\tif ((int)$_POST['reccur'] == 1) {\n\t\t\t\t\t\tPbbookinghelper::make_recurring($validated_id,$_POST);\n\t\t\t\t\t}\n\t\t\t\t\t$this->setRedirect('index.php?option=com_pbbooking&controller=manage&date='.JRequest::getVar('date'),\"Event \".$validated_id.\" has been added.\");\n\t\t\t\t} else {\n\t\t\t\t\t$this->setRedirect('index.php?option=com_pbbooking&controller=manage&date='.JRequest::getVar('date'),JText::_('COM_SHBESUCHE_VALIDATION_ERROR').' '.$db->getErrorMsg());\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->setRedirect('index.php?option=com_pbbooking&controller=manage&date='.JRequest::getVar('date'),JText::_('COM_SHBESUCHE_CREATE_ERROR').' '.$db->getErrorMsg());\n\t\t\t}\n\t\t}\t\n\t}", "public function testNewTask()\n {\n $userId = User::first()->value('id');\n\n $response = $this->json('POST', '/api/v1.0.0/users/'.$userId.'/tasks', [\n 'description' => 'A new task from PHPUnit',\n ]);\n\n $response\n ->assertStatus(200)\n ->assertJson([\n 'description' => 'A new task from PHPUnit',\n ]);\n }", "public function testHandleCreateSuccess()\n {\n // Populate data\n $this->_populate();\n \n $response = $this->withSession($this->adminSession)\n ->call('POST', '/branch/create', $this->customBranchData, [], [], ['HTTP_REFERER' => '/branch/create']);\n \n $this->assertRedirectedTo('/branch');\n $this->assertSessionHas('branch-created', '');\n }", "public function testProductCreation()\n {\n $response = $this->json('POST', '/api/v1/products', ['name' => 'Sally','sku'=>'Test']);\n\n $response->assertStatus(201)->assertJson(['code' => 201]);\n }", "public function user_can_create_event()\n {\n $user = User::factory()->create();\n $event = Event::factory()->make()->toArray();\n $response = $this->actingAs($user)->post('/events', $event);\n $response->assertStatus(302);\n $this->assertNotNull(Event::where('name', $event['name'])->first());\n }", "protected function setUp()\n {\n parent::setUp();\n $this->webinar = create(Webinar::class);\n }", "public function testHandleCreateEvents()\n {\n $mock_storage_writer_map = Mockery::mock(StorageWriterMap::CLASS)->shouldNotReceive('getItem')->mock();\n $mock_query_service_map = Mockery::mock(QueryServiceMap::CLASS)->shouldNotReceive('getItem')->mock();\n $mock_event_bus = Mockery::mock(EventBus::CLASS)->shouldNotReceive('distribute')->mock();\n\n // prepare and test subject\n $relation_projection_updater = new RelationProjectionUpdater(\n new ArrayConfig([]),\n new NullLogger,\n $mock_storage_writer_map,\n $mock_query_service_map,\n $this->projection_type_map,\n $mock_event_bus\n );\n\n $event = $this->buildEvent([\n '@type' => 'Honeybee\\Projection\\Event\\ProjectionCreatedEvent',\n 'uuid' => '44c4597c-f463-4916-a330-2db87ef36547',\n 'projection_type' => 'honeybee_tests.game_schema.player::projection.standard',\n 'projection_identifier' => 'honeybee.fixtures.player-a726301d-dbae-4fb6-91e9-a19188a17e71-de_DE-1',\n 'data' => []\n ]);\n $relation_projection_updater->handleEvent($event);\n }", "public function testCreate()\n {\n $this->visit('/admin/school/create')\n ->submitForm($this->saveButtonText, $this->school)\n ->seePageIs('/admin/school')\n ;\n\n $this->seeInDatabase('schools', $this->school);\n }", "public function testCreate()\n {\n $this->createInstance();\n $user = $this->createAndLogin();\n\n //test creation as admin\n $res = $this->fConnector->getDiscussionManagement()->postTopic('Hello title', 'My content', [$this->configTest['testTagId']],null)->wait();\n $this->assertInstanceOf(FlarumDiscussion::class,$res);\n $this->assertEquals('Hello title',$res->title, 'Testing discussion creation with admin');\n\n //test creation as user\n $res = $this->fConnector->getDiscussionManagement()->postTopic('Hello title', 'My content', [$this->configTest['testTagId']],$user->userId)->wait();\n $this->assertInstanceOf(FlarumDiscussion::class,$res);\n $this->assertEquals('Hello title',$res->title, 'Testing discussion creation with user');\n\n\n\n }", "public function testWebinarPanelists()\n {\n }", "public function testQuestionCreatePostWithValidData() {\n //Select catalogs\n $catalog = $this->course->catalog()->first();\n $subcatalogs = $catalog->children()->get();\n $ids = array();\n\n foreach ($subcatalogs as $c) {\n $ids[] = $c->id;\n }\n\n $post_data = array(\n 'course' => $this->course->id,\n 'type' => 'Question y',\n 'question' => 'Question y',\n 'answer' => 'Question y',\n 'catalogs' => $ids\n );\n $response = $this->post('question/create', $post_data);\n $this->assertEquals('200', $response->foundation->getStatusCode());\n $this->assertEquals('general.permission', $response->content->view);\n }", "public function create($plan, array $properties = array());", "public function testNew()\n {\n $clientNoAuth = static::createClient();\n $clientNoAuth->request('GET', '/clientes/new');\n //redireccion a main\n $this->assertEquals(302, $clientNoAuth->getResponse()->getStatusCode());\n\n //caso con todo bien, redirección a /departamento/ y bien agregado el nuevo departamento.\n $client = $this->createAuthorizedClient();\n $crawler = $client->request('GET', '/persona/new');\n $form = $crawler->selectButton('Guardar')->form();\n $form['persona[Nombre]'] = 'Celia';\n $form['persona[Apellidos]'] = 'Cruz';\n $form['persona[Cargo]'] = 'Boss';\n $form['persona[Correo]'] = 'celiaDead@gmail.com';\n $form['persona[Telefono]'] = '123456789';\n $form['persona[Local_id]'] = '1';\n $form['persona[Departamento]'] = '1';\n\n $crawler = $client->submit($form);\n $this->assertTrue($client->getResponse()->isRedirect());\n $crawler = $client->followRedirect();\n }", "public function create()\n {\n $attributes = validator(request()->all(),\n [\n 'title' => ['required', 'string'],\n 'description' => ['required', 'string'],\n 'lat' => ['required', 'numeric'],\n 'lng' => ['required', 'numeric'],\n 'address_line1' => ['required', 'string'],\n 'hidden' => ['bool'],\n 'price_per_day' => ['required', 'integer', 'min:100'],\n 'monthly_discount' => ['integer', 'min:0'],\n\n 'tags' => ['array'],\n 'tags.*' => ['integer', Rule::exists('tags', 'id')],\n ] \n )->validate();\n\n $attributes['approval_status'] = Office::APPROVAL_PENDING;\n\n $office = auth()->user()->offices()->create(\n Arr::except($attributes, ['tags'])\n );\n\n $office->tags()->sync($attributes['tags']);\n\n return OfficeResource::make($office);\n }" ]
[ "0.645826", "0.64233947", "0.6303108", "0.62919855", "0.6287759", "0.6279859", "0.61923283", "0.59656316", "0.59515786", "0.59352744", "0.5929518", "0.59017617", "0.589709", "0.5864389", "0.5771486", "0.5754985", "0.5707631", "0.5687261", "0.5679037", "0.56305504", "0.5621797", "0.558162", "0.5526383", "0.5512857", "0.551223", "0.5436324", "0.54227895", "0.5414021", "0.5413022", "0.5360863", "0.5351937", "0.53353983", "0.5327531", "0.5325668", "0.53136384", "0.5297932", "0.52841973", "0.52341926", "0.52332693", "0.5231507", "0.5205806", "0.52050585", "0.51654744", "0.51649463", "0.51560414", "0.51409435", "0.510547", "0.51015514", "0.5100825", "0.5099816", "0.50969493", "0.50501233", "0.503632", "0.5027649", "0.50233585", "0.5020792", "0.50161266", "0.50065935", "0.49973834", "0.49707547", "0.49628633", "0.49628633", "0.494406", "0.49366394", "0.49237382", "0.49211353", "0.49010643", "0.49000227", "0.4883732", "0.48792052", "0.48776", "0.48758194", "0.4874905", "0.48363107", "0.48272613", "0.48227292", "0.48198256", "0.48108247", "0.48015898", "0.47992384", "0.47976217", "0.47824764", "0.47805554", "0.47704762", "0.47680047", "0.47666767", "0.47598505", "0.4754207", "0.47288665", "0.4727118", "0.47265342", "0.4722617", "0.4721492", "0.47212026", "0.4713406", "0.47131002", "0.4707143", "0.47005644", "0.46986124", "0.46981326" ]
0.7899342
0
Test case for webinarPollDelete Delete a Webinar Poll.
Тест-кейс для webinarPollDelete Удаление опроса вебинара.
public function testWebinarPollDelete() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deletepoll(){\n \tSiteController::loggedInCheck();\n\n\t\t$pollid = $_POST['pollid'];\n\t\t$poll = Poll::loadById($pollid);\n\t\t$pollAuthorId = $poll->get('userId');\n\t\t$pollAuthor = User::loadById($pollAuthorId);\n\n\t\t//user is the author of the poll, allow delete\n\t\tif($pollAuthor->get('username') == $_SESSION['username']){\n\t\t\t$poll->delete();\n\t\t} else {\n\t\t\t$_SESSION['info'] = \"You can only delete polls you have created.\";\n\t\t}\n\n\t\t//refresh page\n\t\theader('Location: '.BASE_URL);\t\t\t\t\t\t\t\t\t\t\t//TODO update\n\t}", "public function deletepollAction($poll_id) {\n $em = $this->getDoctrine()->getManager();\n $poll = $em->getRepository('PollPollBundle:PollImpl')->find($poll_id);\n $em->remove($poll);\n $em->flush();\n\n return $this->redirect($this->generateUrl('poll_show_all'));\n }", "public function delete(User $user, Poll $poll)\n {\n //\n }", "public function testWebinarDelete()\n {\n }", "public function polls_delete($pollId){\n $this->load->model(\"poll\");\n\n try {\n $this->poll->deleteRecursive($pollId);\n }catch (Exception $e){\n $this->response(array(\"errorMessage\"=>\"No such poll :'(\"), 404);\n }\n }", "public function testWebinarPanelistDelete()\n {\n }", "public function testWebinarPanelistsDelete()\n {\n }", "public function testDeleteSurvey()\n {\n $survey = Survey::factory()->create();\n $surveyId = $survey->id;\n\n $response = $this->json('DELETE', \"survey/{$surveyId}\");\n\n $response->assertStatus(204);\n $this->assertDatabaseMissing('survey', ['id' => $surveyId]);\n }", "public function votes_delete($pollId) {\n $this->load->model(\"poll\");\n $this->load->model(\"answer\");\n $this->load->model(\"vote\");\n\n try {\n //Check to see if the poll exists (this throws an exception if it doesn't)\n $poll = $this->poll->getPoll($pollId);\n //Clear the votes on the poll\n $this->vote->clearVotes($pollId);\n }catch (Exception $e){\n $this->response(array(\"errorMessage\"=>\"The poll does not exist!\"), 404);\n }\n }", "public function test_shopper_can_be_deleted()\n {\n $shopper = Shopper::withoutEvents(function () {\n return Shopper::factory()->create();\n });\n\n $shopper2 = Shopper::withoutEvents(function () {\n return Shopper::factory()->create();\n });\n\n $this->actingAs($shopper);\n\n $response = $this->delete(route('shoppers.destroy', $shopper2));\n\n $response->assertStatus(302);\n $response->assertRedirect(route('shoppers.index'));\n }", "public function testDelete()\n\t{\n\t\t// Add test bookings\n\t\t$bookings = [];\n\t\tforeach ($this->clients as $client) {\n\t\t\t$booking = factory(\\App\\Booking::class)->create([\n\t\t\t\t'fitter_id' => $this->admin->fitter->id,\n\t\t\t\t'client_id' => $client->id,\n\t\t\t\t'horse_id' => factory(\\App\\Horse::class)->create(['client_id' => $client->id])->id,\n\t\t\t\t'rider_id' => factory(\\App\\Rider::class)->create(['client_id' => $client->id])->id,\n\t\t\t\t'user_id' => factory(\\App\\User::class)->create([\n\t\t\t\t\t'fitter_id' => $this->admin->fitter->id,\n\t\t\t\t\t'type' => 'fitter-user',\n\t\t\t\t])->id,\n\t\t\t]);\n\n\t\t\t$bookings[] = $booking->toArray();\n\t\t}\n\n\t\t$booking = \\App\\Booking::find($bookings[0]['id']);\n\n\t\t$this->actingAs($this->admin, 'api')\n\t\t\t ->delete('/api/v1/admin/bookings/' . $booking->id)\n\t\t\t ->assertStatus(200)\n\t\t\t ->assertJsonStructure([\n\t\t\t\t 'success',\n\t\t\t ]);\n\n\t\t$this->assertDatabaseMissing('bookings', ['id' => $booking->id]);\n\t}", "public function testWebinarPollCreate()\n {\n }", "public function destroy(Poll $poll)\n {\n $this->poll->destroy($poll);\n\n return redirect()->route('admin.iquiz.poll.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('iquiz::polls.title.polls')]));\n }", "public function destroy(Poll $poll) {\n // törlés itt nem megengedett\n }", "public function testDeleteLecturerAndAdministrationWorker()\n {\n $user = factory(User::class)->state('lecturer_administration_worker')->create();\n $response = $this->withHeaders([\n ])->deleteJson(\"/api/user/{$user->id}\", []);\n\n $response\n ->assertStatus(200)\n ->assertJson([\n \"deleted\"=> true\n ]);\n\n $this->assertDeleted('users', ['id' => $user->id]);\n $this->assertDeleted('addresses', ['id' => $user->address_id]);\n $this->assertDeleted('addresses', ['id' => $user->correspondal_address_id]);\n }", "public function testDelete()\n\t{\n\t\t$saddle = $this->saddles[0];\n\n\t\t$this->actingAs($this->admin, 'api')\n\t\t\t ->delete('/api/v1/admin/saddles/' . $saddle->id)\n\t\t\t ->assertStatus(200);\n\n\t\t$this->assertDatabaseMissing('saddles', ['id' => $saddle->id]);\n\t}", "public function delete($episode);", "public function executeDelete(sfWebRequest $request)\n {\n\t\tif(clsCommon::chkDataExist(\"WebsitePracticeArea\", $request->getParameter('id'), $this->getUser()->getAttribute('personalWebsiteId')))\n\t\t{\n\t\t\t$this->forward404Unless($website_practice_area = Doctrine::getTable('WebsitePracticeArea')->find(array($request->getParameter('id'))), sprintf('Object website_practice_area does not exist (%s).', $request->getParameter('id')));\n\n\t\t\t$oWebsitePracticeArea = new WebsitePracticeArea();\n\t\t\t$oWebsitePracticeArea->changeStatus($request->getParameter('id'),sfConfig::get(\"app_Status_Deleted\"));\n\t\t\t$this->getUser()->setFlash('succMsg', \"Deletion successful.\");\n\n\t\t\t$this->redirect('WebsitePracticeArea/index');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->getUser()->setFlash(\"errMsg\",sfConfig::get('app_Permission_Message'));\n\t\t\t$this->redirect('default/index');\n\t\t}\n }", "public function testDeleteSurvey0()\n {\n }", "public function testDeleteSurvey0()\n {\n }", "public function testDelete()\n {\n $model = $this->makeFactory();\n $model->save();\n\n $this->json('DELETE', static::ROUTE . '/' . $model->id, [], [\n 'Authorization' => 'Token ' . self::getToken()\n ])\n ->seeStatusCode(JsonResponse::HTTP_NO_CONTENT);\n }", "public function testDelete()\n\t{\n\t\t$client = static::createClient(array(), array(\n\t\t 'PHP_AUTH_USER' => 'jr',\n\t\t 'PHP_AUTH_PW' => 'jr',\n\t\t));\n\t\t$client->followRedirects();\n\n\t\t// On clique sur le lien entreprise de test\n\t\t$crawler = $client->request('GET', '/clients');\n\t\t$link = $crawler->filter('.bloc__title a:contains(\"Entreprise de test\")')->first()->link();\n\t\t$crawler = $client->click($link);\n\t\t//On vérifie qu'on est bien sur la bonne page\n\t\t$this->assertGreaterThan(0, $crawler->filter('h1:contains(\"Entreprise de test\")')->count());\n\n\t\t// On clique sur le bouton modifier\n\t\t$link = $crawler->filter('.btn--delete')->first()->link();\n\t\t$crawler = $client->click($link);\n\t\t//On vérifie qu'on est bien sur la bonne page\n\t\t$this->assertEquals(1, $crawler->filter('.breadcrumb:contains(\"Supprimer\")')->count()); \n\n\t\t// On modifie le métier\n\t\t$form = $crawler->selectButton('Supprimer')->form();\n\t\t$crawler = $client->submit($form);\t\n\n\t\t//On vérifie que ça a marché\n\t\t$this->assertEquals(1, $crawler->filter('html:contains(\"Le client a bien été supprimé.\")')->count());\n\n\t}", "public function testLeaseDelete()\n {\n $user = factory(User::class)->create();\n $lease = factory(Lease::class)->create();\n\n $this->actingAs($user)\n ->seeIsAuthenticatedAs($user)\n ->get(route('lease.delete', ['id' => $lease->id]))\n ->assertStatus(200);\n }", "public function actionDelete($id)\n\t{\n\t\t$question = $this->findQuestion($id);\n\t\t$this->checkAccess($question->user);\n\t\t$question->delete();\n\t\treturn $this->redirect(['/poll/list']);\n\t}", "public function test_delete() {\n global $DB;\n\n self::setAdminUser();\n $this->resetAfterTest(true);\n\n // Save new outage.\n $now = time();\n $outage = new outage([\n 'autostart' => false,\n 'warntime' => $now - 60,\n 'starttime' => 60,\n 'stoptime' => 120,\n 'title' => 'Title',\n 'description' => 'Description',\n ]);\n $outage->id = outagedb::save($outage);\n self::$outage = $outage;\n\n outagedb::delete(self::$outage->id);\n\n // Should not exist.\n $event = $DB->get_record_select(\n 'event',\n \"(eventtype = 'auth_outage' AND instance = :idoutage) OR (id = :idevent)\",\n ['idoutage' => self::$outage->id, 'idevent' => self::$event->id],\n 'id',\n IGNORE_MISSING\n );\n self::assertFalse($event);\n }", "private function delete()\n {\n $webhookId = $this->ask('Please enter Webhook ID');\n\n try {\n $response = $this->messageBirdClient->conversationWebhooks->delete($webhookId);\n\n if ($response) {\n $this->info(\"WebhookId {$webhookId} is deleted successfully\");\n }\n\n } catch (\\Exception $e) {\n $this->error($e->getMessage());\n }\n }", "public function testDelete(): void\n {\n $this->createInstance();\n $this->createAndLogin();\n\n\n $res = $this->fConnector->getDiscussionManagement()->postTopic('Hello title', 'My content', [$this->configTest['testTagId']],null)->wait();\n $res2 = $this->fConnector->getDiscussionManagement()->deleteTopic($res->id)->wait();\n $this->assertTrue($res2, 'Test delete of a topic');\n $res3 = $this->fConnector->getDiscussionManagement()->getDiscussions($this->configTest['testTagName'])->wait();\n $found = false;\n foreach($res3 as $discussion){\n if($discussion->id === $res->id){\n $found = true;\n break;\n }\n }\n $this->assertFalse($found, 'Test delete of a topic, search for deleted topic');\n\n }", "public function test_get_delete_link() {\n\n\t\t$webhook = LLMS_REST_API()->webhooks()->create( array(\n\t\t\t'delivery_url' => 'https://mock.tld',\n\t\t\t'topic' => 'course.created',\n\t\t) );\n\n\t\t$link = $webhook->get_delete_link();\n\n\t\t$this->assertEquals( 0, strpos( admin_url( 'admin.php?page=llms-settings&tab=rest-api&section=webhooks&revoke-webhook=' . $webhook->get( 'id' ) ), $webhook->get_delete_link() ) );\n\t\tparse_str( wp_parse_url( $link, PHP_URL_QUERY ), $parts );\n\t\t$this->assertTrue( array_key_exists( 'delete-webhook-nonce', $parts ) );\n\n\t}", "public function delete(Vote $vote);", "public function delete($Enterprise) { ; }", "public function testWebinarPollGet()\n {\n }", "public function testDeleteSuppliersUsingDELETE()\n {\n }", "public function testDeleteEvent()\n {\n }", "public function test_delete_task()\n {\n Project::create([\n 'id' => 1,\n 'name' => 'Project nae', \n 'description' => 'Project description'\n ]);\n Task::create([\n 'id' => 200,\n 'name' => 'Task ndfame', \n 'priority' => 'high', \n 'schedule_date' => '2020-12-12 12:22:00',\n 'project_id' => 200\n ]);\n $response = $this->delete('/task/200');\n $response->assertStatus(302);\n }", "public function test_deleteSubscriber() {\n\n }", "public function testDelete()\n {\n\n // Create exhibits and items.\n $neatline1 = $this->_createNeatline('Test Exhibit 1', '', 'test-exhibit-1');\n $neatline2 = $this->_createNeatline('Test Exhibit 2', '', 'test-exhibit-2');\n $item1 = $this->_createItem();\n $item2 = $this->_createItem();\n\n // Create records.\n $record1 = new NeatlineDataRecord($item1, $neatline1);\n $record2 = new NeatlineDataRecord($item2, $neatline1);\n $record3 = new NeatlineDataRecord($item1, $neatline2);\n $record4 = new NeatlineDataRecord($item2, $neatline2);\n $record1->save();\n $record2->save();\n $record3->save();\n $record4->save();\n\n // 2 exhibits, 4 data records.\n $_exhibitsTable = $this->db->getTable('NeatlineExhibit');\n $_recordsTable = $this->db->getTable('NeatlineDataRecord');\n $this->assertEquals($_exhibitsTable->count(), 2);\n $this->assertEquals($_recordsTable->count(), 4);\n\n // Call delete.\n $neatline1->delete();\n\n // 1 exhibits, 2 data records.\n $this->assertEquals($_exhibitsTable->count(), 1);\n $this->assertEquals($_recordsTable->count(), 2);\n\n }", "public function delete(){\n\t\t$offerid = $_POST['id'];\n\t\t$delRes = $this->master_db->delete(OFFER_MANAGEMENT,array(\"offer_id\"=>decode_string($offerid)));\n\t\tif($delRes){\n\t\t\t$msg = 'Offer deleted successfully.';\n\t\t\t$msg_type = 'success';\n\t\t\t$msgArr = array(\n\t\t\t\t'msg'=>$msg,\n\t\t\t\t'msg_type'=>$msg_type\n\t\t\t\t);\n\t\t\t$this->session->set_flashdata($msgArr);\n\t\t\t$this->session->flashdata('msg');\n\t\t\t\n\t\t}else{\n\t\t\t$msg ='Oops! error try again.';\n\t\t\t$msg_type = 'error';\n\t\t\t$msgArr = array(\n\t\t\t\t'msg'=>$msg,\n\t\t\t\t'msg_type'=>$msg_type\n\t\t\t\t);\n\t\t\t$this->session->set_flashdata($msgArr);\n\t\t\t\n\t\t}\n\t\techo 1;\n\t\texit();\n\t}", "public function testDeleteWebhook()\n {\n }", "public function testWebinarPollUpdate()\n {\n }", "public function testDeleteById(Partner $partner): void\n {\n $this->assertTrue(Partner::deleteById($partner->getId()));\n }", "public function deleteSportsVenue($venue);", "public function testDeleteVendorComplianceSurvey()\n {\n }", "public function testDeleteSuccessForHr() {\n\t\t$userInfo = [\n\t\t\t'role' => USER_ROLE_USER | USER_ROLE_HUMAN_RESOURCES,\n\t\t\t'prefix' => 'hr'\n\t\t];\n\t\t$opt = [\n\t\t\t'method' => 'POST',\n\t\t];\n\t\t$this->applyUserInfo($userInfo);\n\t\t$this->generateMockedController();\n\t\t$url = '/hr/deferred/delete/3';\n\t\t$this->testAction($url, $opt);\n\t\t$this->checkFlashMessage(__('The deferred save has been deleted.'));\n\t\t$result = $this->Controller->Deferred->find('list', ['recursive' => -1]);\n\t\t$expected = [\n\t\t\t1 => '1',\n\t\t\t2 => '2',\n\t\t\t4 => '4',\n\t\t\t5 => '5',\n\t\t];\n\t\t$this->assertData($expected, $result);\n\t}", "public function testDeleteUrlUsingDELETE()\n {\n }", "public function testDelete()\n {\n\n $this->createDummyRole();\n\n $this->assertDatabaseHas('roles', [\n 'id' => 1,\n ]);\n\n $this->call('POST', '/api/role', array(\n 'action' => $this->deleteAction,\n 'id' => 1,\n ));\n\n $this->assertDatabaseMissing('roles', [\n 'id' => 1,\n ]);\n\n $this->assertDatabaseMissing('role_permission', [\n 'role_id' => 1,\n 'permission_id' => [1, 2]\n ]);\n }", "public function testDeleteWebhookConfig()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::webhooks());\n\n $sw->deleteWebhookConfig();\n\n $this->checkDeleteRequests($container, ['/v4/webhooks/configure']);\n }", "public function testDelete()\n\t{\n\t\t$this->resetReservationTable();\n\t\t$this->resetDateTimes();\n\t\t\n\t\t$reservation = new Reservation();\n\t\t$reservation->setAttributes(array(\n\t\t\t\t'roomid' => 1,\n\t\t\t\t'datefrom' => $this->_dateOverlapFrom,\n\t\t\t\t'numberofnights'=> $this->_numberofnights,\n\t\t\t\t));\n\t\t$reservation->save(false);\n\t\t$this->assertTrue($reservation->delete());\n\t}", "public function testDeleteDelete()\n {\n $this->mockSecurity();\n $this->_loginUser(1);\n $source = 2;\n\n $readPostings = function () use ($source) {\n $read = [];\n $read['all'] = $this->Entries->find()->all()->count();\n $read['source'] = $this->Entries->find()\n ->where(['category_id' => $source])\n ->count();\n\n return $read;\n };\n\n $this->assertTrue($this->Categories->exists($source));\n $before = $readPostings();\n $this->assertGreaterThan(0, $before['source']);\n\n $data = ['mode' => 'delete'];\n $this->post('/admin/categories/delete/2', $data);\n\n $this->assertFalse($this->Categories->exists($source));\n $this->assertRedirect('/admin/categories');\n\n $after = $readPostings();\n $this->assertEquals(0, $after['source']);\n $expected = $before['all'] - $before['source'];\n $this->assertEquals($expected, $after['all']);\n }", "public function testDeleteSurveyQuestion0()\n {\n }", "public function testDeleteSurveyQuestion0()\n {\n }", "public function testDeleteProductUsingDELETE()\n {\n }", "public function testDeleteChallengeEvent()\n {\n }", "public function testDelete()\n {\n $dataLoader = $this->getDataLoader();\n $data = $dataLoader->getOne();\n $this->deleteTest($data['user']);\n }", "public function testDelete()\n {\n $this->clientAuthenticated->request('DELETE', '/product/delete/' . self::$objectId);\n $response = $this->clientAuthenticated->getResponse();\n $this->assertJsonResponse($response, 200);\n\n //Deletes physically the entity created by test\n $this->deleteEntity('Product', 'productId', self::$objectId);\n }", "function doRealDelete()\n {\n $this->assignSingle();\n /* Delete the record */\n DatabaseBean::dbDeleteById();\n\n /* Get a lecture that this subtask is related to. */\n $lectureBean = new LectureBean ($this->id, $this->_smarty, \"\", \"\");\n $lectureBean->assignSingle();\n }", "public function testDeleteProduct()\n // Ici je fais un test de suppression de produit\n {\n $response = $this->json('GET', '/api/products');\n // Vérifier le status de réussite.\n $response->assertStatus(200);\n // Je prend le premier produit [0]\n $product = $response->getData()[0];\n //Il faut etre connecté pour pouvoir supprimer\n $user = factory(\\App\\User::class)->create();\n //C'est une demande en DELETE à la place de POST \n $delete = $this->actingAs($user, 'api')->json('DELETE', '/api/products/'.$product->id);\n $delete->assertStatus(200);\n $delete->assertJson(['message' => \"Produit supprimé!\"]);\n }", "public function testDeleteTask()\n {\n $userId = User::first()->value('id');\n $taskId = Task::orderBy('id', 'desc')->first()->id;\n\n echo '/api/v1.0.0/users/'.$userId.'/tasks/'.$taskId;\n\n $response = $this->json('DELETE', '/api/v1.0.0/users/'.$userId.'/tasks/'.$taskId);\n $response->assertStatus(200);\n }", "public function test_deleting_question() {\n global $DB;\n\n // create a user\n $user = $this->getDataGenerator()->create_user();\n\n // create a course\n $course = $this->getDataGenerator()->create_course();\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n $now = time();\n\n $this->loadDataSet($this->createArrayDataSet(array(\n 'videoquanda_questions' => array(\n array('id', 'instanceid', 'userid', 'timecreated', 'timemodified' ,'seconds', 'text'),\n array(1, $videoquanda->id, $user->id, $now, $now + 1, 2, 'dummy text')\n )\n )));\n\n // enrol the user on the course\n $this->getDataGenerator()->enrol_user($user->id, $course->id, $DB->get_field('role', 'id', array(\n 'shortname' => 'student',\n )));\n\n // login the user\n $this->setUser($user);\n\n $client = new Client($this->_app);\n $client->request('DELETE', '/api/v1/' . $videoquanda->id . '/questions/1');\n\n $this->assertEquals(204, $client->getResponse()->getStatusCode());\n $this->assertFalse($DB->record_exists('videoquanda_questions', array('instanceid' => $videoquanda->id)));\n }", "public function deleteAction()\r\n {\r\n if ($id = $this->getRequest()->getParam('offer_id')) {\r\n $title = \"\";\r\n try {\r\n // init model and delete\r\n $model = Mage::getModel('submitbestoffer/submitbestoffer');\r\n $model->load($id);\r\n /*$title = $model->getGalleryName();*/\r\n $model->delete();\r\n // display success message\r\n Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('submitbestoffer')->__('The Offer has been deleted.'));\r\n // go to grid\r\n $this->_redirect('*/*/');\r\n return;\r\n\r\n } catch (Exception $e) {\r\n // display error message\r\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\r\n // go back to edit form\r\n $this->_redirect('*/*/edit', array('offer_id' => $id));\r\n return;\r\n }\r\n }\r\n // display error message\r\n Mage::getSingleton('adminhtml/session')->addError(Mage::helper('submitbestoffer')->__('Unable to find an offer to delete.'));\r\n // go to grid\r\n $this->_redirect('*/*/');\r\n }", "public function test_deleting_answer() {\n global $DB;\n\n // Create a user\n $user = $this->getDataGenerator()->create_user();\n\n // create a course\n $course = $this->getDataGenerator()->create_course();\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n $now = time();\n\n $this->loadDataSet($this->createArrayDataSet(array(\n 'videoquanda_questions' => array(\n array('id', 'instanceid', 'userid', 'timecreated', 'timemodified' ,'seconds', 'text'),\n array(1, $videoquanda->id, 1, $now, $now + 1, 2, 'dummy text')\n ),\n 'videoquanda_answers' => array(\n array('id', 'questionid', 'userid', 'timecreated', 'timemodified', 'text'),\n array(1, 1, $user->id, $now, $now + 1, 'dummy answer 1.')\n )\n )));\n\n // enrol the user on the course\n $this->getDataGenerator()->enrol_user($user->id, $course->id, $DB->get_field('role', 'id', array(\n 'shortname' => 'student',\n )));\n\n $this->setUser($user);\n\n $client = new Client($this->_app);\n $client->request('DELETE', '/api/v1/' . $videoquanda->id . '/questions/1/answers/1');\n\n $this->assertEquals(204, $client->getResponse()->getStatusCode());\n $this->assertFalse($DB->record_exists('videoquanda_answers', array('questionid' => 1)));\n }", "public function testDeleteSurveyQuestionChoice0()\n {\n }", "public function testDeleteSurveyQuestionChoice0()\n {\n }", "public function testDeleteCampaignFromPromotionUsingDELETE()\n {\n }", "public function testDeletePromotionCampaignApplicationUsingDELETE()\n {\n }", "public function testRemove()\n {\n $paymentMethodId = '36538b73-0ff9-4bf6-bc94-20f499b4f85d';\n $customerId = '20e68ad7-ff54-4cb6-8556-f87f58bcf995';\n\n $this->resource->remove($paymentMethodId,$customerId);\n\n $this->assertAttributeEquals(BASE_URL, 'base_url', $this->connector, 'Failed. Base url not correct');\n $this->assertAttributeEquals('DELETE', 'method', $this->connector, 'Failed. Method is not correct');\n $this->assertAttributeEquals('paymentmethods/' . $paymentMethodId . '?customerId=' .$customerId, 'url', $this->connector, 'Failed. Url is not correct');\n }", "public function testAdminDeleteProduct(): void\n {\n $client = static::createClient([], [\n 'PHP_AUTH_USER' => 'vandana_admin',\n 'PHP_AUTH_PW' => 'vandana@admin',\n ]);\n \n $maxProductId = self::$container->get(ProductRepository::class)->findMaxId(); \n\n $crawler = $client->request('GET', '/en/admin/product/'.$maxProductId);\n $client->submit($crawler->filter('#delete-form-product')->form());\n\n $this->assertResponseRedirects('/en/admin/product/', Response::HTTP_FOUND);\n\n $product = self::$container->get(ProductRepository::class)->find($maxProductId);\n $this->assertNull($product);\n }", "public function delete_watch(){\r\n\r\n\t\tif($this->expectsPost(array('watchId'))){\r\n\r\n\t\t\tif ($this->watch->deleteWatch($this->watchId, $this->session->userdata('userId'))) {\r\n\r\n\t\t\t\t$this->_bodyData['success'] = 'Watch successfully deleted!';\r\n\t\t\t}\r\n\r\n\t\t\t$this->constructMeasurePage();\r\n\t\t}\r\n\t}", "public function testDelete()\n {\n $this->clientAuthenticated->request('DELETE', '/invoice/delete/' . self::$objectId);\n $response = $this->clientAuthenticated->getResponse();\n $this->assertJsonResponse($response, 200);\n\n //Deletes physically the entity created by test\n $this->deleteEntity('Invoice', 'invoiceId', self::$objectId);\n }", "protected function _deleteEvent($eventId)\n {\n }", "public function testDeleteHospital(){\r\n\t\t$this->http = new Client(['base_uri' => 'http://localhost/casecheckapp/public/index.php/']);\r\n\r\n\t\t//Test HTTP status ok for id=1\r\n\t\t$response= $this->http->request('DELETE','api/v1/hospital/2');//Change ID here\r\n\t\t$this->assertEquals(200,$response->getStatusCode());\r\n\r\n\t\t//Stopping the connexion with Guzzle\r\n\t\t$this->http = null;\r\n\t}", "public function destroy($id)\n {\n $div = Poll::findOrFail($id);\n\n $crud = $div->delete();\n\n if ($crud) {\n return redirect()->route('poll')->with('status', 'Poll Deleted!');\n } else {\n return redirect()->back()->withInput()->with('status', 'Delete Failed!');\n }\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function destroy(Request $request){\n\t\t$input = $request->all();\n\t\t$id = $input['id_spec'];\n\t\t$sub = EventSpec::findOrFail($id);\n\t\t$event = Event::findOrFail($sub->id_event);\n\t\tif($event->id_oratorio==Session::get('session_oratorio')){\n\t\t\t$sub->delete();\n\t\t\t//Session::flash(\"flash_message\", \"Specifica $id cancellata!\");\n\t\t\t//return redirect()->route('eventspecs.show', ['id_event' => $sub->id_event]);\n\t\t\techo true;\n\t\t}else{\n\t\t\t//abort(403, 'Unauthorized action.');\n\t\t\techo false;\n\t\t}\n\t}", "function delete()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$data = safePostGetVar('id');\n\t\t\t$promotion = new Promotion();\n\t\t\tforeach ($data as $id)\n\t\t\t{\n\t\t\t\t$promotion->id = $id;\n\t\t\t\t$promotion->delete();\n\t\t\t}\n\t\t\techo \"ok\";\n\n\t\t}catch (Exception $ex)\n\t\t{\n\t\t\tprint_r($ex->getMessage());\n\t\t}\n\t}", "public function testDeleteVendorComplianceSurveyTag()\n {\n }", "public function destroy($id)\n {\n $poll = Polls::findOrFail($id);\n $poll->delflag=1;\n $poll->save();\n return redirect('/admin/polls')\n ->withSuccess(\"'$poll->title' 删除成功.\");\n }", "public function delete_poll_submissions() {\n\t\tforminator_validate_ajax( 'forminatorPollEntries' );\n\t\tif ( ! empty( $_POST['id'] ) ) {\n\t\t\t$form_id = intval( $_POST['id'] );\n\t\t\tForminator_Form_Entry_Model::delete_by_form( $form_id );\n\n\t\t\t$file = forminator_plugin_dir() . \"admin/views/poll/entries/content-none.php\";\n\n\t\t\tob_start();\n\t\t\t/** @noinspection PhpIncludeInspection */\n\t\t\tinclude $file;\n\t\t\t$html = ob_get_clean();\n\n\t\t\t$data['html'] = $html;\n\t\t\t$data['notification'] = array(\n\t\t\t\t'type' => 'success',\n\t\t\t\t'text' => __( 'All the submissions deleted successfully.', Forminator::DOMAIN ),\n\t\t\t\t'duration' => '4000',\n\t\t\t);\n\t\t\twp_send_json_success( $data );\n\t\t} else {\n\t\t\t$data['notification'] = array(\n\t\t\t\t'type' => 'error',\n\t\t\t\t'text' => __( 'Submission delete failed.', Forminator::DOMAIN ),\n\t\t\t\t'duration' => '4000',\n\t\t\t);\n\t\t\twp_send_json_error( $data );\n\t\t}\n\t}", "public function testDelete(): void\n {\n $this->markTestSkipped('Skipping as PostsService::delete() is not yet ready for prod/testing');\n $this->mock(PostsRepository::class, static function ($mock) {\n $mock->shouldReceive('find')->with(123)->andReturn(new Post());\n $mock->shouldReceive('delete')->with(123)->andReturn(true);\n });\n\n $service = resolve(PostsService::class);\n\n $this->expectsEvents(BlogPostWillBeDeleted::class);\n\n $response = $service->delete(123);\n\n $this->assertIsArray($response);\n }", "public function testCollectionTicketsDelete()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testDelete()\n {\n if (! $this->_url) $this->markTestSkipped(\"Test requires a CouchDb server set up - see TestConfiguration.php\");\n $db = $this->_setupDb();\n \n $db->create(array('a' => 1), 'mydoc');\n \n // Make sure document exists in DB\n $doc = $db->retrieve('mydoc');\n $this->assertType('Sopha_Document', $doc);\n \n // Delete document\n $ret = $db->delete('mydoc', $doc->getRevision());\n \n // Make sure return value is true\n $this->assertTrue($ret);\n \n // Try to fetch doc again \n $this->assertFalse($db->retrieve('mydoc'));\n \n $this->_teardownDb();\n }", "public function testProjectProjectIDInviteeInviteIDDelete()\n {\n }", "function deleteWebinar($webinarKey, $sendCancellationEmails = true)\n {\n ($sendCancellationEmails) ? $parameters = ['sendCancellationEmails' => true] : $parameters = null;\n\n $path = $this->getPathRelativeToOrganizer(sprintf('webinars/%s', $webinarKey));\n\n return $this->sendRequest('DELETE', $path, $parameters, $payload = null);\n }", "public function deleteLeague($league);", "function evento_pessoa_delete($idevento){\r\n\r\n\t\t$this->idevento = $idevento;\r\n\t\t$this->status = 2;\r\n\t\t$bd = Crud_Evento::conexao();\r\n\t\t$sql = \"UPDATE evento set status = :status WHERE idevento = :idevento\";\r\n\t\t$stmt = $bd->prepare( $sql );\r\n\t\t$stmt->bindParam(':idevento',$this->idevento,PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(':status', $this->status, PDO::PARAM_INT);\r\n\r\n\t\t\r\n\r\n\t\t$bd = Crud_Evento::conexao();\r\n\r\n\t\t$sql = \"DELETE FROM evento_pessoa WHERE idevento = :idevento \";\r\n\t\t$stmt = $bd->prepare($sql);\r\n\t\t$stmt->bindParam(':idevento',$idevento, PDO::PARAM_INT);\r\n\r\n\t\t$result = $stmt->execute();\r\n\r\n\t}", "public function testDeleteChallenge()\n {\n }", "public function testDelete() {\n $this->initializePurgersService(['c']);\n $this->drupalLogin($this->adminUser);\n $this->drupalGet(Url::fromRoute($this->route, ['id' => 'id0']));\n $this->assertRaw('Yes, delete this purger!');\n $this->assertTrue(array_key_exists('id0', $this->purgePurgers->getPluginsEnabled()));\n $json = $this->drupalPostAjaxForm(Url::fromRoute($this->route, ['id' => 'id0'])->toString(), [], ['op' => 'Yes, delete this purger!']);\n $this->assertEqual('closeDialog', $json[1]['command']);\n $this->assertEqual('redirect', $json[2]['command']);\n $this->purgePurgers->reload();\n $this->assertTrue(is_array($this->purgePurgers->getPluginsEnabled()));\n $this->assertTrue(empty($this->purgePurgers->getPluginsEnabled()));\n $this->assertEqual(3, count($json));\n // Assert that deleting a purger that does not exist, passes silently.\n $json = $this->drupalPostAjaxForm(Url::fromRoute($this->route, ['id' => 'doesnotexist'])->toString(), [], ['op' => 'Yes, delete this purger!']);\n $this->assertEqual('closeDialog', $json[1]['command']);\n $this->assertEqual(2, count($json));\n }", "public function testDeleteSchedule() {\n\t\t$numRows = $this->getConnection()->getRowCount(\"schedule\");\n\n\t\t$schedule = new Schedule(null, $this->company->getCompanyId(), $this->VALID_SCHEDULEDAYOFWEEK1, $this->VALID_SCHEDULEENDTIME1, $this->VALID_SCHEDULELOCATIONADDRESS1, $this->VALID_SCHEDULELOCATIONNAME1, $this->VALID_SCHEDULESTARTTIME1);\n\n\t\t$schedule->insert($this->getPDO());\n\n\t\t//make sure it was inserted\n\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"schedule\"));\n\n\t\t//DELETE!!!!!!!!! a.k.a Tallcot it!!!!!!\n\n\t\t$schedule->delete($this->getPDO());\n\n\t\t//make sure there in no longer any data\n\n\t\t$pdoSchedule = Schedule::getScheduleByScheduleId($this->getPDO(), $schedule->getScheduleId());\n\t\t$this->assertNull($pdoSchedule);\n\t\t$this->assertEquals($numRows, $this->getConnection()->getRowCount(\"schedule\"));\n\n\t}", "public function testDeleteTask()\n {\n }", "public function deleteTest()\n {\n $this->assertEquals(true, $this->object->delete(1));\n }", "public function testPageDelete()\n {\n $faker = Faker::create();\n $page = Page::inRandomOrder()->first();\n $response = $this\n ->actingAs(User::where(\"admin\", true)->whereNotNull(\"verified\")->inRandomOrder()->first(), 'api')\n ->withHeaders([\n \"User-Agent\" => $faker->userAgent(),\n ])\n ->json('DELETE', \"/api/pages/\" . $page->slug);\n $response\n ->assertStatus(200);\n }", "function Delete()\r\n\t{\r\n\t\t$connection = Database::Connect();\r\n\t\t$this->pog_query = \"delete from `specialoffer` where `specialofferid`='\".$this->specialofferId.\"'\";\r\n\t\treturn Database::NonQuery($this->pog_query, $connection);\r\n\t}", "public function testMakeDeleteRequest()\n {\n $client = new MockClient('https://api.xavierinstitute.edu', [\n new JsonResponse([\n 'success' => [\n 'code' => 200,\n 'message' => 'Deleted.',\n ],\n ], 200),\n ]);\n\n $this->assertEquals($client->delete('teachers/1'), true);\n }", "public function destroy(pregunta_test $pregunta_test)\n {\n //\n }", "public function deleteWebhook(){\n return $this->make_http_request(__FUNCTION__);\n }", "public function testComAdobeCqSocialCommonsCommentsEndpointsImplCommentDeleteEvent()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.adobe.cq.social.commons.comments.endpoints.impl.CommentDeleteEventActivitySuppressor';\n\n $crawler = $client->request('POST', $path);\n }", "public function testDeleteExcludedWebsiteAfterWebsiteDelete(): void\n {\n /** Create website */\n /** @var Website $website */\n $website = $this->objectManager->create(Website::class);\n $website->setName('custom website for delete excluded website test')\n ->setCode(self::STORE_WEBSITE_CODE);\n $website->isObjectNew(true);\n $this->websiteResourceModel->save($website);\n $websiteId = $this->websiteRepository->get(self::STORE_WEBSITE_CODE)->getId();\n\n /** Create a new customer group */\n $group = $this->groupFactory->create()\n ->setId(null)\n ->setCode(self::GROUP_CODE)\n ->setTaxClassId(3);\n $groupId = $this->groupRepository->save($group)->getId();\n self::assertNotNull($groupId);\n\n /** Exclude website from customer group */\n $group = $this->groupRepository->getById($groupId);\n $customerGroupExtensionAttributes = $this->groupExtensionInterfaceFactory->create();\n $customerGroupExtensionAttributes->setExcludeWebsiteIds([$websiteId]);\n $group->setExtensionAttributes($customerGroupExtensionAttributes);\n $this->groupRepository->save($group);\n\n /** Check that excluded website is in customer group excluded website table */\n $connection = $this->resourceConnection->getConnection();\n $selectExcludedWebsite = $connection->select();\n /** @var GroupExcludedWebsite $groupExcludedWebsiteResource */\n $groupExcludedWebsiteResource = $this->objectManager->create(GroupExcludedWebsite::class);\n $selectExcludedWebsite->from($groupExcludedWebsiteResource->getMainTable())\n ->where('website_id = ?', $websiteId);\n $excludedWebsites = $connection->fetchAll($selectExcludedWebsite);\n self::assertCount(1, $excludedWebsites);\n\n /** Marks area as secure so Product repository would allow website removal */\n $registry = $this->objectManager->get(Registry::class);\n $isSecuredAreaSystemState = $registry->registry('isSecuredArea');\n $registry->unregister('isSecureArea');\n $registry->register('isSecureArea', true);\n /** Remove website by id */\n /** @var \\Magento\\Store\\Model\\Website $website */\n $website = $this->objectManager->create(\\Magento\\Store\\Model\\Website::class);\n $website->load((int)$websiteId);\n $website->delete();\n\n /** Revert mark area secured */\n $registry->unregister('isSecuredArea');\n $registry->register('isSecuredArea', $isSecuredAreaSystemState);\n\n /** Check that excluded website is no longer in customer group excluded website table */\n $selectExcludedWebsite = $connection->select();\n /** @var GroupExcludedWebsite $groupExcludedWebsiteResource */\n $groupExcludedWebsiteResource = $this->objectManager->create(GroupExcludedWebsite::class);\n $selectExcludedWebsite->from($groupExcludedWebsiteResource->getMainTable())\n ->where('website_id = ?', $websiteId);\n $excludedWebsites = $connection->fetchAll($selectExcludedWebsite);\n self::assertCount(0, $excludedWebsites);\n }", "public function DELETE() {\n #\n }", "public function testDeleteEnrollmentRequest()\n {\n }", "public function testDeleteSurveyGroup()\n {\n $surveyGroup = SurveyGroup::factory()->create();\n $surveyGroupId = $surveyGroup->id;\n\n $response = $this->json('DELETE', \"survey-group/{$surveyGroupId}\");\n\n $response->assertStatus(204);\n $this->assertDatabaseMissing('survey_group', [ 'id' => $surveyGroupId ]);\n }", "public function testDeleteSite()\n {\n }" ]
[ "0.71641266", "0.66191196", "0.6587096", "0.6559964", "0.64290196", "0.6392854", "0.63748217", "0.6316476", "0.61818117", "0.60412574", "0.59323484", "0.5928612", "0.58898", "0.5859758", "0.5821917", "0.5783073", "0.5772443", "0.57544917", "0.5753902", "0.5753902", "0.57384986", "0.56644094", "0.5661651", "0.5657965", "0.5656854", "0.5655541", "0.56391746", "0.56378573", "0.56320286", "0.5598308", "0.558595", "0.5567753", "0.554321", "0.5541752", "0.5535237", "0.5533021", "0.5532107", "0.55284786", "0.5525423", "0.55055004", "0.55034393", "0.5500193", "0.5491772", "0.54820466", "0.5460484", "0.544605", "0.54427505", "0.5432726", "0.5417641", "0.5417641", "0.54153806", "0.5403378", "0.54032075", "0.5398834", "0.53968376", "0.53875834", "0.53863364", "0.5368522", "0.53684795", "0.5361546", "0.53612775", "0.53612775", "0.53605145", "0.53560483", "0.5351902", "0.53458756", "0.5338257", "0.5321206", "0.5319492", "0.53172326", "0.53171927", "0.53082687", "0.5302217", "0.5295097", "0.5294328", "0.5290411", "0.52834165", "0.5279747", "0.527748", "0.5277356", "0.52732885", "0.5272095", "0.5269831", "0.5265737", "0.5264737", "0.52581507", "0.52563006", "0.52521676", "0.52474165", "0.5247254", "0.5244045", "0.5242299", "0.52372104", "0.5236307", "0.5234292", "0.5228312", "0.52268", "0.5226307", "0.5225768", "0.5222697" ]
0.8047244
0
Test case for webinarPollGet Get a Webinar Poll.
Тест-кейс для webinarPollGet Получение опроса вебинара.
public function testWebinarPollGet() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testListPastWebinarPollResults()\n {\n }", "public function testWebinarPollUpdate()\n {\n }", "public function polls_get($pollId = NULL){\n $this->load->model(\"poll\");\n\n if (isset($pollId)) {\n try {\n $poll = $this->poll->getPoll($pollId);\n $this->response($poll, 200);\n }catch (Exception $e){\n $this->response(array(\"errorMessage\"=>\"Poll does not exist!\"), 404);\n }\n } else{\n $polls = $this->poll->getPolls();\n $this->response($polls, 200);\n }\n }", "public function testWebinarPollCreate()\n {\n }", "public function getPoll()\n\t{\n\t\t\t\t// var_dump($poll);\n\n\t\treturn $this->poll;\n\t}", "public function testWebinarPolls()\n {\n }", "public function get_poll($poll_token, Request $request)\n {\n $question = $this->poll_service->get_current_poll_question($poll_token);\n\n if(!$question) {\n //poll is not currently running (no open question)\n return $this->render('user/waitingPoll.html.twig', [\n 'listenerUrl' => $_ENV['SYMFONY_WEBSITE_ROOT_URL'] . '/home/runPoll/' . $poll_token\n ]);\n }\n $answers = $this->poll_service->get_current_poll_answers($question->getId());\n if(!$answers) {\n //question without any answer: means the poll is not correctly defined\n return new Response('Error, question without any answer');\n }\n\n return $this->render('user/poll.html.twig', [\n 'question' => $question,\n 'answers' => $answers,\n 'isSubmitted' => $request->query->get('isSubmitted'),\n 'answerID' => $request->query->get('answerID'),\n 'formUrl' => $_SERVER['SYMFONY_WEBSITE_ROOT_URL'] . '/incrementPollStatistic/' . $poll_token,\n 'listenerUrl' => $_ENV['SYMFONY_WEBSITE_ROOT_URL'] . '/getPoll/' . $poll_token]);\n }", "function citrixonline_get_webinar($webinarKey) \n {\n\t\tif(!$this->organizer_key or !$this->access_token)\n\t\t\treturn 0;\n\t\t\t\n\t\t$return_array = array();\n\n\t\t$reponse = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/\".$webinarKey.\"?oauth_token=\".$this->access_token), true);\n\t\t\n\t\tif(isset($reponse['int_err_code']) and $reponse['int_err_code'] != '')\n\t\t{\n\t\t\t$this->set_access_token('');\n\t\t\t$this->set_organizer_key('');\t\t\t\t\n\t\t\tthrow new Exception($reponse['int_err_code']);\n\t\t}\n\t\t\n\t\treturn $reponse;\n\t}", "protected function reportWebinarPollsRequest($webinar_id)\n {\n // verify the required parameter 'webinar_id' is set\n if ($webinar_id === null || (is_array($webinar_id) && count($webinar_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $webinar_id when calling reportWebinarPolls'\n );\n }\n\n $resourcePath = '/report/webinars/{webinarId}/polls';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($webinar_id !== null) {\n $resourcePath = str_replace(\n '{' . 'webinarId' . '}',\n ObjectSerializer::toPathValue($webinar_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'application/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'application/xml'],\n ['application/json', 'multipart/form-data']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function testGetAllPolls()\n {\n Passport::actingAs(\n factory(\"App\\User\")->create(),\n ['*']\n );\n $polls= factory(\"App\\Poll\",5)->create();\n $response = $this->get('/polls');\n $response->assertStatus(200);\n $response->assertJson($polls->toArray());\n }", "function create_poll () {\n\t\treturn is_object($this->POLL_OBJ) ? $this->POLL_OBJ->_create(array(\"common\" => 1)) : \"\";\n\t}", "function getWebinar($webinarKey)\n {\n $path = $this->getPathRelativeToOrganizer(sprintf('webinars/%s', $webinarKey));\n\n return $this->sendRequest('GET', $path, $parameters = null, $payload = null);\n }", "public function getPollName()\n {\n return $this->_poll_name;\n }", "public function shouldGetPrimaryPollutant(): void\n {\n $expectedValue = $this->faker->randomElement(['pm25', 'pm10', 'co', 'no2', 'o3', 'so2']);\n\n $this->waqi->shouldReceive('getPrimaryPollutant')\n ->once()\n ->withNoArgs()\n ->andReturn($expectedValue);\n\n $result = $this->waqi->getPrimaryPollutant();\n\n $this->assertValue($result, $expectedValue, 'string');\n }", "public function testWebinarRegistrantGet()\n {\n }", "public function testWebinarPollDelete()\n {\n }", "public function testWebinar()\n {\n }", "public function testWebinarStatus()\n {\n }", "public function testGetInstitutionsUsingGET()\n {\n }", "public function loadVote($poll)\n {\n $module = Yii::app()->getModule('poll');\n $userId = (int) Yii::app()->user->id;\n $isGuest = Yii::app()->user->isGuest;\n $cookie = isset(Yii::app()->request->cookies['Poll_'. $poll->id])\n ? Yii::app()->request->cookies['Poll_'. $poll->id] \n : NULL;\n\n foreach ($poll->votes as $vote) {\n if ($vote->user_id == $userId) {\n if (($isGuest && $module->guestCookies && ($cookie === NULL || $vote->id != $cookie->value)) ||\n ($isGuest && $module->ipRestrict && $vote->ip_address != $_SERVER['REMOTE_ADDR'])) {\n continue;\n }\n else\n return $vote;\n }\n }\n\n return new PollVote;\n }", "public function testWebinarRegistrantsQuestionsGet()\n {\n }", "public function poll()\n {\n }", "public function poll()\n {\n return $this->belongsTo('App\\Poll');\n }", "public function getPoller ()\r\n\t\t{\r\n\t\t\t\treturn $this -> pollerInstance;\r\n\t\t}", "public function votes_get($pollId){\n $this->load->model(\"poll\");\n $this->load->model(\"answer\");\n $this->load->model(\"vote\");\n\n try {\n //Check to see if the poll exists (this throws an exception if it doesn't)\n $poll = $this->poll->getPoll($pollId);\n $answers = $this->answer->getAnswers($pollId);\n $votes = $this->vote->getVotes($pollId);\n\n $answerVotes = array();\n foreach ($answers as $answer) {\n //Set the number of votes for this answer to 0\n $answerVotes[$answer->optionNo - 1] = 0;\n foreach ($votes as $vote){\n //Foreach vote that counts towards this answer\n //add one to the number of vote it has\n if ($vote->answerId == $answer->id){\n $answerVotes[$answer->optionNo - 1] += 1;\n }\n }\n }\n\n $this->response($answerVotes, 200);\n }catch (Exception $e){\n $this->response(array(\"errorMessage\"=>\"Poll does not exist!\"), 404);\n }\n }", "public function newpoll(){\n SiteController::loggedInCheck();\n\n\t\tinclude_once SYSTEM_PATH.'/view/newpoll.tpl'; //TODO make sure the tpl is correct\n\t}", "public function testGetSuppliersUsingGET()\n {\n }", "private function get()\n {\n $webhookId = $this->ask('Please enter Webhook ID');\n\n try {\n $response = $this->messageBirdClient->conversationWebhooks->read($webhookId);\n\n $data = [];\n if ($response) {\n array_push($data, $this->getFetchedData($response));\n\n $headers = ['webhook_id', 'href', 'channel_id', 'events', 'url', 'created_at'];\n $this->table($headers, $data);\n }\n } catch (\\Exception $e) {\n $this->error($e->getMessage());\n }\n }", "public function testListPastWebinarQA()\n {\n }", "function smarty_function_PUBLICA_showPoll($params, &$smarty) {\n\tglobal $conexao;\n\t\n\t// Verifica a validade do parametro\n\tif(!isset($params['var']) || !is_numeric($params['var'])) {\n $params['var'] = $conexao->getOne('SELECT MAX(bn_id) FROM tb_enquete WHERE bb_ativo = 1;');\n }\n \n\t// Busca as configuracoes do destaque\n\t$arrE\t= fnEnqueteInfo($params['var'],$smarty);\n\t\n\tif($arrE !== false && is_numeric($arrE['bn_template_conteudo']) && $arrE['bn_template_conteudo'] > 0) {\n\t\t// Busca o nome do arquivo TPL relacionado\n\t\t$query\t= \"\tSELECT bt_arquivo FROM tb_template WHERE bn_id = '\".$arrE['bn_template_conteudo'].\"';\";\n\t\t$strT\t= $conexao->getOne($query);\n\t\tunset($query);\n\t\t\n\t\t// Busca o array das secoes relacionadas ao destaque\n\t\t$arr\t= fnEnqueteResposta($arrE['bn_id']);\n\t\tif($arr !== false && !DB::isError($strT)) {\n\t\t\t// Seta as variaveis do SMARTY\n\t\t\t$smarty->assign('arrPollQuestion',$arrE);\n\t\t\t$smarty->assign('arrPollAnswer',$arr);\n\t\t\t$smarty->display($strT);\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\t} else {\n\t\treturn;\n\t}\n}", "public function get($idpoll, $idquestion) {\n\n $poll = Poll::all()->find($idpoll);\n $user = User::all()->find($poll->IDuser);\n $question = Question::all()->find($idquestion)->where('id', $idquestion)->pluck('questionText')->first();\n\n if(Auth::user()->role == 'ADMIN' || Auth::user()->id == $user->id){\n $answer = Answer::where('IDquestion', $idquestion)->get();\n } else {\n $error = 'non si hanno i permessi per accedere alla risorsa';\n return response()->json($error,Response::HTTP_FORBIDDEN);\n }\n\n if($answer->isEmpty()){\n $error = 'nessun utente ha risposto al sondaggio';\n return response()->json($error, Response::HTTP_NOT_FOUND);\n } else {\n return response()->json([$idquestion.\": \".$question, $answer],Response::HTTP_OK);\n }\n\n }", "public function get($id): PollResource\n {\n $poll = Poll::findOrFail($id);\n\n $this->authorize('get', $poll);\n\n return new PollResource($poll);\n }", "public function testWebinarUpdate()\n {\n }", "public function getEvent()\n {\n // get event\n $this\n ->get('/event')\n ->assertStatus(200);\n }", "public function add_poll()\n {\n\n $method = $_SERVER['REQUEST_METHOD'];\n\n\n if ($method != 'POST') {\n\n json_output(400, array('status' => 400, 'message' => 'Bad request.'));\n } else {\n\n $check_auth_client = $this->auth_model->check_auth_client();\n\n\n if ($check_auth_client == true) {\n\n $response = $this->auth_model->auth();\n\n if ($response['status'] == 200) {\n\n $this->load->model('Table_poll_model');\n\n $returned_string = $this->Table_poll_model->add_poll();\n\n $response = array();\n $response['success'] = '1';\n $response['message'] = 'Uploaded';\n $response['return'] = $returned_string;\n\n echo json_encode($response);\n\n }\n }\n }\n\n\n }", "public function showpollAction(Request $request, $poll_id)\n {\n $em = $this->getDoctrine()->getManager();\n $poll = $em->getRepository('PollPollBundle:PollImpl')->find($poll_id);\n $title = $poll->getTitle();\n $description = $poll->getDescription();\n\n $questions = $em->getRepository('PollPollBundle:QuestionImpl')->findBy(array('poll_id' => $poll_id));\n\n $form = $this->createFormBuilder();\n $dq = new DynamicQuestion($form, $em);\n foreach ($questions as $question) {\n $form = $dq->buildQuestion($question);\n }\n $form->setAction($this->generateUrl('poll_add_answers', array('poll_id' => $poll_id)));\n $form->add('submit', 'submit', array(\n 'label' => \"Submit\",\n 'attr' => array(\n 'class' => 'btn btn-primary')));\n\n $form = $form->getForm();\n return $this->render('PollPollBundle:Poll:show_poll.html.twig', array(\n 'id' => $poll_id,\n 'title' => $title,\n 'description' => $description,\n 'form' => $form->createView()));\n }", "function page_manager_poll() {\n // Load my task plugin\n $task = page_manager_get_task('poll');\n\n ctools_include('context');\n ctools_include('context-task-handler');\n $output = ctools_context_handler_render($task, '', array(), array());\n if ($output !== FALSE) {\n return $output;\n }\n\n module_load_include('inc', 'poll', 'poll.pages');\n $function = 'poll_page';\n foreach (module_implements('page_manager_override') as $module) {\n $call = $module . '_page_manager_override';\n if (($rc = $call('poll')) && function_exists($rc)) {\n $function = $rc;\n break;\n }\n }\n\n // Otherwise, fall back.\n return $function();\n}", "public function Get_Bookings_Test()\n {\n $this->get('/bookings')->seeJson(['Test' => 'Test Data']);\n }", "function list_polls($id = NULL) {\n global $course_id, $course_code, $urlServer, $langPollNone, $langQuestionnaire, $langChoice;\n\n $ret_string = '';\n $result = Database::get()->queryArray(\"SELECT * FROM poll WHERE course_id = ?d AND active = 1\", $course_id);\n $pollinfo = array();\n foreach ($result as $row) {\n $pollinfo[] = array(\n 'id' => $row->pid,\n 'title' => $row->name,\n 'active' => $row->active);\n }\n if (count($pollinfo) == 0) {\n $ret_string .= \"<div class='col-12 mt-3'><div class='alert alert-warning'>$langPollNone</div></div>\";\n } else {\n $exist_poll = array();\n\n if (!is_null($id)) { //find existing resources (edit case)\n $post_res = Database::get()->queryArray(\"SELECT * FROM wall_post_resources WHERE post_id = ?d AND type = ?s\", $id, 'poll');\n foreach ($post_res as $exist_res) {\n $exist_poll[] = $exist_res->res_id;\n }\n }\n\n $ret_string .= \"<div class='table-responsive'><table class='table-default'>\" .\n \"<tr class='list-header'>\" .\n \"<th class='text-start'>&nbsp;$langQuestionnaire</th>\" .\n \"<th style='width:20px;' class='text-center'>$langChoice</th>\" .\n \"</tr>\";\n foreach ($pollinfo as $entry) {\n $checked = '';\n if (in_array($entry['id'], $exist_poll)) {\n $checked = 'checked';\n }\n\n $ret_string .= \"<tr>\";\n $ret_string .= \"<td>&nbsp;\".icon('fa-question').\"&nbsp;&nbsp;<a href='{$urlServer}modules/questionnaire/pollresults.php?course=$course_code&amp;pid=$entry[id]'>\" . q($entry['title']) . \"</a></td>\";\n $ret_string .= \"<td class='text-center'><input type='checkbox' $checked name='poll[]' value='$entry[id]'></td>\";\n $ret_string .= \"</tr>\";\n }\n $ret_string .= \"</table></div>\";\n }\n return $ret_string;\n}", "public function test_happy_flow_get()\n {\n $_SERVER['REQUEST_METHOD'] = 'GET';\n $_GET['sp-entity-id'] = 'http://mock-sp';\n\n $request = new Request($_GET, $_POST, [], [], [], $_SERVER);\n\n $this->assertTrue($this->validator->isValid($request));\n }", "public function getPollInformation(){\n $poll_id = $this->input->post('poll_id'); \n $poll_info = $this->Common_model->getDataById($poll_id, 'tbl_polls');\n $poll_three_highest_days = $this->Vote_model->getThreeHighestDays($poll_id);\n $poll_three_lowest_days = $this->Vote_model->getThreeLowestDays($poll_id);\n $votes_from_countries = $this->Vote_model->getVotesNumberFromCountry($poll_id);\n $poll_created_at = $poll_info->created_at;\n $current_date = date('Y-m-d H:i:s');\n $earlier = new DateTime($poll_created_at);\n $later = new DateTime($current_date);\n\n $data = array();\n $company_id = $this->session->userdata('company_id');\n $data['company'] = $this->Common_model->getDataById($company_id,'tbl_companies');\n $data['total_votes'] = $this->Vote_model->getVotesNumberByPollId($poll_id)->total_votes;\n $data['diff'] = $later->diff($earlier)->format(\"%a\");\n $data['poll_three_highest_days'] = $poll_three_highest_days;\n $data['poll_three_lowest_days'] = $poll_three_lowest_days;\n $data['votes_from_countries'] = $votes_from_countries;\n echo json_encode($data);\n }", "public function testWebinarAbsentees()\n {\n }", "public function testGetWebhookRaw()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::webhooks());\n\n $response = $sw->getWebhookConfigRaw();\n $this->assertInstanceOf(SmartwaiverRawResponse::class, $response);\n\n $this->checkGetRequests($container, ['/v4/webhooks/configure']);\n }", "public function testGetWebhookRaw()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::webhooks());\n\n $response = $sw->getWebhookConfigRaw();\n $this->assertInstanceOf(SmartwaiverRawResponse::class, $response);\n\n $this->checkGetRequests($container, ['/v4/webhooks/configure']);\n }", "public function testBasicGET()\n\t{\n\t\t$Request = new Request(\n\t\t\tnew URL('http://' . self::TESTHOST . '/hallo'),\n\t\t\tnull, // method. Default GET\n\t\t\tnull, // Payload\n\t\t\t$this->_getDefaultOptions());\n\n\t\t// Return the body as string\n\t\t$Result = $Request->getResponseAs(new StringValue());\n\n\t\t$this->assertEquals('hallo', (string)$Result);\n\t}", "public function testCurrentEvents()\n {\n // otherwise test will fail.\n // Other approach is to use fake data or mock it.\n \n $response = $this->json('GET', '/events/current');\n \n $response\n ->assertStatus(200)\n ->assertJson([\n ['name' => 'Electrical Seminar']\n ]);\n }", "public function testGetPromotionCampaignApplicationUsingGET()\n {\n }", "protected function handleGetMine() {\n\t\t\tif ($this->verifyRequest('GET') && $this->verifyParams()) {\n\t\t\t\tif ($this->blnAuthenticated) {\n\t\t\t\t\textract($this->getResultParams());\n\t\t\t\t\t\n\t\t\t\t\t$strFilterBy = str_replace('.' . $this->strFormat, '', $this->objUrl->getSegment(3));\n\t\t\t\t\tswitch ($strFilterBy) {\n\t\t\t\t\t\tcase 'connections':\n\t\t\t\t\t\t\t$strMethod = 'loadConnectionsByUserId';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\t\tcase 'combined':\n\t\t\t\t\t\t\t$strMethod = 'loadCombinedByUserId';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (!empty($strMethod)) {\n\t\t\t\t\t\t$objUserEvent = $this->initModel();\n\t\t\t\t\t\tif ($objUserEvent->$strMethod(AppRegistry::get('UserLogin')->getUserId(), $arrFilters)) {\n\t\t\t\t\t\t\t$this->blnSuccess = true;\n\t\t\t\t\t\t\tif ($objUserEvent->count()) {\n\t\t\t\t\t\t\t\t$this->arrResult = array(\n\t\t\t\t\t\t\t\t\t'events' => $this->formatEvents($objUserEvent),\n\t\t\t\t\t\t\t\t\t'total' => $objUserEvent->count()\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$this->arrResult = array(\n\t\t\t\t\t\t\t\t\t'events' => array(),\n\t\t\t\t\t\t\t\t\t'total' => 0\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttrigger_error(AppLanguage::translate('There was an error loading the event data'));\n\t\t\t\t\t\t\t$this->error();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttrigger_error(AppLanguage::translate('Missing or invalid filter type'));\n\t\t\t\t\t\t$this->error(401);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\ttrigger_error(AppLanguage::translate('Missing or invalid authentication'));\n\t\t\t\t\t$this->error(401);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->error(400);\n\t\t\t}\n\t\t}", "public function offers_get()\n\t{\n $token = $_SERVER['HTTP_TOKEN'];\n $data = array(\n 'status' => 0,\n 'code' => -1,\n 'msg' => 'Bad Request',\n 'data' => null\n );\n if($this->checkToken($token))\n {\n $offers = $this->Api_model->getOffers();\n if (isset($offers)) {\n $data = array(\n 'status' => 1,\n 'code' => 1,\n 'msg' => 'success',\n 'data' => $offers\n );\n }else{\n $data = array(\n 'status' => 1,\n 'code' => 1,\n 'msg' => 'success',\n 'data' => null\n );\n }\n }else\n {\n $data['msg'] = 'Request Unknown or Bad Request';\n }\n $this->response($data, REST_Controller::HTTP_OK);\n\t}", "public function testGetWaiver()\n {\n $paths = [\n '/v4/waivers/6jebdfxzvrdkd?pdf=false',\n '/v4/waivers/6jebdfxzvrdkd?pdf=false',\n '/v4/waivers/6jebdfxzvrdkd?pdf=true',\n ];\n\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::waiver(), count($paths));\n\n $waiver = $sw->getWaiver('6jebdfxzvrdkd');\n $this->assertInstanceOf(SmartwaiverWaiver::class, $waiver);\n\n $sw->getWaiver('6jebdfxzvrdkd', false);\n $sw->getWaiver('6jebdfxzvrdkd', true);\n\n $this->checkGetRequests($container, $paths);\n }", "public function testGetWaiver()\n {\n $paths = [\n '/v4/waivers/6jebdfxzvrdkd?pdf=false',\n '/v4/waivers/6jebdfxzvrdkd?pdf=false',\n '/v4/waivers/6jebdfxzvrdkd?pdf=true',\n ];\n\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::waiver(), count($paths));\n\n $waiver = $sw->getWaiver('6jebdfxzvrdkd');\n $this->assertInstanceOf(SmartwaiverWaiver::class, $waiver);\n\n $sw->getWaiver('6jebdfxzvrdkd', false);\n $sw->getWaiver('6jebdfxzvrdkd', true);\n\n $this->checkGetRequests($container, $paths);\n }", "public function testGetPromotionCampaignsUsingGET()\n {\n }", "public function run()\n {\n $poll = new Poll();\n $poll->title = \"This is a simple poll from admin panel\";\n $poll->slug = \"this-is-a-simple-poll-from-admin-panel\";\n $poll->status = 1;\n $poll->start_date = \"2020-06-14\";\n $poll->end_date = \"2020-06-15\";\n $poll->total_yes = 5;\n $poll->total_no = 2;\n $poll->total_no_comment = 1;\n $poll->save();\n\n $poll = new Poll();\n $poll->title = \"This is another poll from admin panel\";\n $poll->slug = \"this-is-another-poll-from-admin-panel\";\n $poll->status = 0;\n $poll->start_date = \"2020-06-15\";\n $poll->end_date = \"2020-06-16\";\n $poll->total_yes = 7;\n $poll->total_no = 11;\n $poll->total_no_comment = 3;\n $poll->save();\n }", "public function testServiceCanPollAds()\n {\n $this->advertiserA->pollAds();\n $data = $this->mockResponseA()['hotels'];\n $orgTax = $data[0]['rooms'][0]['taxes'];\n $hotels = Hotels::with('rooms','rooms.taxes')->get();\n $dbtax = $hotels[0]->rooms[0]->taxes[0];\n $this->assertEquals(count($data), $hotels->count());\n $this->assertEquals(count($data[0]['rooms']), $hotels[0]->rooms->count());\n $this->assertEquals($orgTax['amount'], $dbtax->amount);\n $this->assertEquals($orgTax['currency'], $dbtax->currency);\n $this->assertEquals($orgTax['type'], $dbtax->type);\n }", "public function poll(Request $request)\n {\n $events = ChatMessage::where('chat_session_id', $request->input('chatSessionId'))\n ->where('id', '>', $request->input('checkpoint', 0))\n ->get();\n\n $chat = ChatSession::find($request->input('chatSessionId'));\n\n $active = false;\n if (isset($chat->accepting_user_id)\n && ($chat->accepting_user_id !== null)\n && ($chat->completed == 0)\n ) {\n $active = true;\n }\n\n $strippedEvents = [];\n foreach ($events as $event) {\n $strippedEvents[] = [\n 'id' => $event->id,\n 'message_text' => $event->message_text,\n 'from_initiator' => $event->from_initiator,\n ];\n }\n\n return response()->json([\n 'success' => true,\n 'active' => $active,\n 'participant_id' => $chat->accepting_user_id,\n 'participant_name' => $active ? $chat->accepting_user->name : '',\n 'events' => $strippedEvents,\n ]);\n }", "public function getHotels(){\n\n if (isset($_GET) && !empty($_GET)) {\n\n $validUrl = $this->targetUrl.$this->getParameters(); // create full Url (target Url string + parameters String) \n\n $response = $this->getResponse($validUrl); //call function that sent request and return response & save the result in $response .\n\n return $this->responseHandler($response); // call function that checking the response ,and return array of offers .\n\n }else{\n return false; \n }\n }", "public function testDemoteAutomatchUrlUsingGET()\n {\n }", "public function testPromoteAutomatchUrlUsingGET()\n {\n }", "public function get_webhooks() {\n\n\t\t$this->method = 'GET';\n\t}", "protected function doGet()\n {\n $apptId = intval($_GET['id']);\n try {\n $apptDetailBO = new AppointmentDetailBO();\n $this->appointmentDetail = $apptDetailBO->getAppointmentDetails($apptId);\n } catch (NoDataFoundException $e) {\n parent::setAlertErrorMessage($e->getMessage());\n }\n\n parent::doGet();\n\n }", "public function testGetInstitutionUsingGET()\n {\n }", "public function getAllPolls()\n {\n $pollz = $this->em\n ->getRepository('NkgPollBundle:Poll')\n ->findAll();\n\n return $pollz;\n }", "public static function pollData(array $poll)\n {\n $query = Core::query('poll-data');\n $query->bindValue(':poll', $poll, PDO::PARAM_INT);\n $query->execute();\n return $query->fetch(PDO::FETCH_ASSOC);\n }", "public function testPollTimeOut() {\n $c = new _MockProviderCronRunner(50, 0.0001);\n $provider = $this->createMock(ProviderInterface::class);\n $polling = $this->createMock(PollingInterface::class);\n $provider->method('polling')->willReturn($polling);\n $polling->expects($this->once())->method('poll')->will($this->returnCallback(function () {\n usleep(101);\n return TRUE;\n }));\n $c->providers = [$provider];\n $start = microtime(TRUE);\n $c->poll();\n $this->assertLessThan(1, microtime(TRUE) - $start);\n }", "public function index($tripId, $pollId)\n {\n $resultYes = \"\";\n $resultNo = \"\";\n $allPolls = NewPoll::all();\n $allDays = Days::all();\n $pollResults = PollResults::all();\n $currentUserId = Auth::id();\n $currentUser = Auth::user()->name;\n foreach($pollResults as $results) {\n if($results->invite_id == $tripId && $pollId == $results->poll_id && $results->results == 1) {\n $resultYes+= 1;\n }\n elseif($results->invite_id == $tripId && $pollId == $results->poll_id && $results->results == 0) {\n $resultNo+= 1;\n }\n }\n $total = $resultYes + $resultNo;\n if($resultYes > 0) {\n $resultYes = $resultYes/$total * 100;\n }\n\n if($resultNo > 0) {\n $resultNo = $resultNo/$total * 100;\n }\n return view('pages.pollResults', ['trip_id' => $tripId])\n ->with(['allDays' => $allDays])\n ->with(['allPolls' => $allPolls])\n ->with(['pollId' => $pollId])\n ->with(['currentUserId' => $currentUserId])\n ->with(['pollResults' => $pollResults])\n ->with(['currentUser' => $currentUser])\n ->with(['resultYes' => $resultYes])\n ->with(['resultNo' => $resultNo]);\n }", "public function get_test_rest_availability()\n {\n }", "public function polls() {\n\t\tSiteController::loggedInCheck();\n\n\t\t//Get polls associated with the current group\n\t\t$groupId = $_POST['groupId'];\n\t\t$group = Group::loadById($groupId);\n\t\t$polls = $group->getAllPolls();\n\n\t\tinclude_once SYSTEM_PATH.'/view/polls.tpl'; //TODO: make sure this is the correct tpl\n\t}", "function get_offered($course)\n{\n return $course->offered;\n}", "function getWebinarID($eventId) {\n\t$result;\n\t$customField = CRM_NcnCiviZoom_Utils::getWebinarCustomField();\n\ttry {\n\t\t$apiResult = civicrm_api3('Event', 'get', [\n\t\t 'sequential' => 1,\n\t\t 'return' => [$customField],\n\t\t 'id' => $eventId,\n\t\t]);\n\t\t$result = null;\n\t\tif(!empty($apiResult['values'][0][$customField])){\n\t\t\t// Remove any empty spaces\n\t\t\t$result = trim($apiResult['values'][0][$customField]);\n\t\t\t$result = str_replace(' ', '', $result);\n\t\t}\n\t} catch (Exception $e) {\n\t\tthrow $e;\n\t}\n\n\treturn $result;\n}", "public function testGetWaiverTemplate()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::template());\n\n $template = $sw->getWaiverTemplate('TestingTemplateId');\n $this->assertInstanceOf(SmartwaiverTemplate::class, $template);\n\n $this->checkGetRequests($container, ['/v4/templates/TestingTemplateId']);\n }", "public function testGetWaiverTemplate()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::template());\n\n $template = $sw->getWaiverTemplate('TestingTemplateId');\n $this->assertInstanceOf(SmartwaiverTemplate::class, $template);\n\n $this->checkGetRequests($container, ['/v4/templates/TestingTemplateId']);\n }", "public function testGetWaiverRaw()\n {\n $paths = [\n '/v4/waivers/6jebdfxzvrdkd?pdf=false',\n '/v4/waivers/6jebdfxzvrdkd?pdf=false',\n '/v4/waivers/6jebdfxzvrdkd?pdf=true',\n ];\n\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::waiver(), count($paths));\n\n $response = $sw->getWaiverRaw('6jebdfxzvrdkd');\n $this->assertInstanceOf(SmartwaiverRawResponse::class, $response);\n\n $sw->getWaiverRaw('6jebdfxzvrdkd', false);\n $sw->getWaiverRaw('6jebdfxzvrdkd', true);\n\n $this->checkGetRequests($container, $paths);\n }", "public function testGetWaiverRaw()\n {\n $paths = [\n '/v4/waivers/6jebdfxzvrdkd?pdf=false',\n '/v4/waivers/6jebdfxzvrdkd?pdf=false',\n '/v4/waivers/6jebdfxzvrdkd?pdf=true',\n ];\n\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::waiver(), count($paths));\n\n $response = $sw->getWaiverRaw('6jebdfxzvrdkd');\n $this->assertInstanceOf(SmartwaiverRawResponse::class, $response);\n\n $sw->getWaiverRaw('6jebdfxzvrdkd', false);\n $sw->getWaiverRaw('6jebdfxzvrdkd', true);\n\n $this->checkGetRequests($container, $paths);\n }", "public function getPollTimeout()\n {\n return $this->pollTimeout;\n }", "public function test_get_request($expected, $yourls_site, $uri) {\n $this->assertSame( $expected, yourls_get_request($yourls_site, $uri) );\n }", "public function show(Poll $poll)\n {\n\n $menuSections = Section::where('level', 1)\n ->where('topnav_back', 1)\n ->where('active', 1)->get();\n\n $menuLeftSections = Section::where('level', 1)\n ->where('active', 1)->get();\n\n $provinces = Province::all();\n\n $not_responded = Contact::where('contacted', 0)->get()->count();\n\n $observations = $poll->observations;\n\n return view('backend.polls.show', compact('polls', 'observations', 'poll', 'not_responded', 'provinces', 'menuSections', 'menuLeftSections'));\n }", "public function test_get_wall_route() {\n $client = new Client($this->_app);\n $client->request('GET', '/wall/3');\n $this->assertTrue($client->getResponse()->isOk());\n $this->assertContains('Wall 003', $client->getResponse()->getContent());\n }", "public function testGetWaiverPhotos()\n {\n $response = APISuccessResponses::photos(1);\n\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, $response, 1);\n\n $photos = $sw->getWaiverPhotos('6jebdfxzvrdkd');\n $this->assertInstanceOf(SmartwaiverPhotos::class, $photos);\n\n $paths = ['/v4/waivers/6jebdfxzvrdkd/photos'];\n $this->checkGetRequests($container, $paths);\n }", "public function test_get() {\n $times = array(\n mktime( 9, 0, 0, 11, 5, 2013),\n mktime( 7, 0, 0, 11, 5, 2013),\n mktime( 6, 0, 0, 11, 5, 2013),\n mktime( 8, 0, 0, 11, 5, 2013),\n mktime(10, 0, 0, 11, 5, 2013),\n );\n $course = $this->getDataGenerator()->create_course();\n $module = $this->getDataGenerator()->create_module('talkpoint', array(\n 'course' => $course->id,\n ));\n $this->loadDataSet($this->createArrayDataSet(array(\n 'talkpoint_talkpoint' => array(\n array('id', 'instanceid', 'userid', 'title', 'uploadedfile', 'nimbbguid', 'mediatype', 'closed', 'timecreated', 'timemodified'),\n array(1, $module->id, 2, 'Talkpoint 001', 'foo.mp4', null, 'file', 0, $times[0], $times[0]),\n array(2, $module->id, 2, 'Talkpoint 002', 'foo.mp4', null, 'file', 0, $times[1], $times[1]),\n array(3, $module->id, 2, 'Talkpoint 003', 'foo.mp4', null, 'file', 0, $times[2], $times[2]),\n array(4, $module->id, 2, 'Talkpoint 004', 'foo.mp4', null, 'file', 0, $times[3], $times[3]),\n array(5, $module->id, 2, 'Talkpoint 005', 'foo.mp4', null, 'file', 0, $times[4], $times[4]),\n ),\n )));\n $this->_cut->set_userid(2);\n $talkpoint = $this->_cut->get(3);\n $this->assertEquals(array(\n 'id' => 3,\n 'instanceid' => $module->id,\n 'userid' => 2,\n 'userfullname' => 'Admin User',\n 'is_owner' => true,\n 'title' => 'Talkpoint 003',\n 'uploadedfile' => 'foo.mp4',\n 'nimbbguid' => null,\n 'mediatype' => 'file',\n 'closed' => false,\n 'timecreated' => userdate($times[2]),\n 'timemodified' => userdate($times[2]),\n ), $talkpoint);\n }", "public function testFetchEvent() {\n\t\t$jsonpad = parent::_getJsonpadInstance();\n\t\t\n\t\t// Fetch the events\n\t\t$total = 0;\n\t\t$events = $jsonpad->fetchEvents(1, null, null, $total);\n\t\t$this->assertInternalType(\"array\", $events);\n\t\t$this->assertGreaterThanOrEqual(1, $total);\n\t\t$this->assertInstanceOf(\"\\Jsonpad\\Resource\\Event\", $events[0]);\n\t\t\n\t\t// Fetch a single event\n\t\t$event = $jsonpad->fetchEvent($events[0]->getId());\n\t\t$this->assertSame($event->getId(), $events[0]->getId());\n\t}", "public function index()\n {\n return response()->json(Poll::paginate(1), 200);\n }", "function _HCM_poll($id=null, $sirka=150){\n \n //nacteni promennych\n $id=intval($id);\n if(isset($sirka)){$sirka=intval($sirka);}else{$sirka=150;}\n if($sirka<100){$sirka=100;}\n \n //nacteni dat ankety\n $vpolldata=mysql_query(\"SELECT * FROM `\"._mysql_prefix.\"-polls` WHERE id=\".$id);\n if(mysql_num_rows($vpolldata)!=0){$vpolldata=mysql_fetch_array($vpolldata); $rcontinue=true;}\n else{$rcontinue=false;}\n \n //sestaveni kodu\n if($rcontinue){\n \n //odpovedi\n $ranswers=explode(\"#\", $vpolldata['answers']);\n $rvotes=explode(\"-\", $vpolldata['votes']);\n $rvotes_sum=array_sum($rvotes);\n if(_loginright_pollvote==1 and $vpolldata['locked']!=1 and _iplogCheck(4, $id)){$rallowvote=true;}else{$rallowvote=false;}\n \n if($rallowvote){$ranswers_code=\"<form action='\"._indexroot.\"remote/hcm/pvote.php?_return=\".urlencode(_indexOutput_url.\"#hcm_poll_\".$GLOBALS['__hcm_uid']).\"' method='post'>\\n<input type='hidden' name='pid' value='\".$vpolldata['id'].\"' />\";}\n else{$ranswers_code=\"\";}\n \n $ranswer_id=0;\n foreach($ranswers as $item){\n if($rvotes_sum!=0 and $rvotes[$ranswer_id]!=0){$rpercent=$rvotes[$ranswer_id]/$rvotes_sum; $rbarwidth=round($rpercent*($sirka-_template_votebarwidthreduction));}else{$rpercent=0; $rbarwidth=1;}\n if($rallowvote){$item=\"<label><input type='radio' name='option' value='\".$ranswer_id.\"' /> \".$item.\" [\".$rvotes[$ranswer_id].\"/\".round($rpercent*100).\"%]</label>\";}else{$item.=\" [\".$rvotes[$ranswer_id].\"/\".round($rpercent*100).\"%]\";}\n $ranswers_code.=\"<div class='poll-answer'>\".$item.\"<div style='width:\".$rbarwidth.\"px;'></div></div>\\n\";\n $ranswer_id++;\n }\n \n $ranswers_code.=\"<div class='poll-answer'>\";\n if($rallowvote){$ranswers_code.=\"<input type='submit' value='\".$GLOBALS['_lang']['hcm.poll.vote'].\"' class='votebutton' />\";}\n $ranswers_code.=$GLOBALS['_lang']['hcm.poll.votes'].\":&nbsp;\".$rvotes_sum.\"</div>\";\n if($rallowvote){$ranswers_code.=\"</form>\\n\";}\n \n return \"\n<div class='anchor'><a name='hcm_poll_\".$GLOBALS['__hcm_uid'].\"'></a></div>\n<div class='poll' style='width:\".$sirka.\"px;'>\n<div class='poll-content'>\n\n<div class='poll-question'>\n\".$vpolldata['question'].\"\n\".(($vpolldata['locked']==1)?\"<div>(\".$GLOBALS['_lang']['hcm.poll.locked'].\")</div>\":'').\"\n</div>\n\n\".$ranswers_code.\"\n\n</div>\n</div>\\n\n\";\n\n }\n\n}", "public function testGetWebhook()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::webhooks());\n\n $webhook = $sw->getWebhookConfig();\n $this->assertInstanceOf(SmartwaiverWebhook::class, $webhook);\n\n $this->checkGetRequests($container, ['/v4/webhooks/configure']);\n }", "public function testPollWithNonPollingProvider() {\n $c = new _MockProviderCronRunner(50, 10);\n $c->providers = [$this->createMock(ProviderInterface::class)];\n $start = microtime(TRUE);\n $c->poll();\n $this->assertLessThan(1, microtime(TRUE) - $start);\n }", "protected function reportMeetingPollsRequest($meeting_id)\n {\n // verify the required parameter 'meeting_id' is set\n if ($meeting_id === null || (is_array($meeting_id) && count($meeting_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $meeting_id when calling reportMeetingPolls'\n );\n }\n\n $resourcePath = '/report/meetings/{meetingId}/polls';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($meeting_id !== null) {\n $resourcePath = str_replace(\n '{' . 'meetingId' . '}',\n ObjectSerializer::toPathValue($meeting_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'application/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'application/xml'],\n ['application/json', 'multipart/form-data']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function testGetWebhookConfig()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::webhooks());\n\n $webhook = $sw->getWebhookConfig();\n $this->assertInstanceOf(SmartwaiverWebhook::class, $webhook);\n\n $this->checkGetRequests($container, ['/v4/webhooks/configure']);\n }", "public function testGetWaiverPhotosRaw()\n {\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::photos(1));\n\n $response = $sw->getWaiverPhotosRaw('6jebdfxzvrdkd');\n $this->assertInstanceOf(SmartwaiverRawResponse::class, $response);\n\n $this->checkGetRequests($container, ['/v4/waivers/6jebdfxzvrdkd/photos']);\n }", "public function testGetOembed()\n\t{\n\t\t$id = 217781292748652545;\n\t\t$maxwidth = 300;\n\t\t$hide_media = true;\n\t\t$hide_thread = true;\n\t\t$omit_script = true;\n\t\t$align = 'center';\n\t\t$related = 'twitter';\n\t\t$lang = 'fr';\n\n\t\t$returnData = new stdClass;\n\t\t$returnData->code = 200;\n\t\t$returnData->body = $this->rateLimit;\n\n\t\t$path = $this->object->fetchUrl('/application/rate_limit_status.json', array(\"resources\" => \"statuses\"));\n\n\t\t$this->client->expects($this->at(0))\n\t\t->method('get')\n\t\t->with($path)\n\t\t->will($this->returnValue($returnData));\n\n\t\t$returnData = new stdClass;\n\t\t$returnData->code = 200;\n\t\t$returnData->body = $this->sampleString;\n\n\t\t// Set request parameters.\n\t\t$data['id'] = $id;\n\t\t$data['maxwidth'] = $maxwidth;\n\t\t$data['hide_media'] = $hide_media;\n\t\t$data['hide_thread'] = $hide_thread;\n\t\t$data['omit_script'] = $omit_script;\n\t\t$data['align'] = $align;\n\t\t$data['related'] = $related;\n\t\t$data['lang'] = $lang;\n\n\t\t$path = $this->object->fetchUrl('/statuses/oembed.json', $data);\n\n\t\t$this->client->expects($this->at(1))\n\t\t->method('get')\n\t\t->with($path)\n\t\t->will($this->returnValue($returnData));\n\n\t\t$this->assertThat(\n\t\t\t$this->object->getOembed($id, null, $maxwidth, $hide_media, $hide_thread, $omit_script, $align, $related, $lang),\n\t\t\t$this->equalTo(json_decode($this->sampleString))\n\t\t);\n\t}", "function getUpcomingWebinars()\n {\n $path = $this->getPathRelativeToOrganizer('upcomingWebinars');\n\n return $this->sendRequest('GET', $path, $parameters = null, $payload = null);\n }", "public function testReportsReferralsGet()\n {\n }", "public function testRejectAutomatchUrlUsingGET()\n {\n }", "public function testWebinarPanelists()\n {\n }", "public function retrieveWebhooks()\n {\n return $this->start()->uri(\"/api/webhook\")\n ->get()\n ->go();\n }", "public function testPollWithoutProviders() {\n $c = new _MockProviderCronRunner(50, 10);\n $start = microtime(TRUE);\n $c->poll();\n $this->assertLessThan(1, microtime(TRUE) - $start);\n }", "public function getActivePolls()\n {\n $pollz = $this->em\n ->createQuery('SELECT p\n FROM NkgPollBundle:Poll p\n WHERE p.active = 1\n AND CURRENT_TIMESTAMP() BETWEEN p.startdate AND p.enddate\n ORDER BY p.enddate DESC');\n\n try {\n $res = $pollz->getResult();\n return $res;\n } catch (\\Doctrine\\ORM\\NoResultException $e) {\n return array();\n }\n }", "public function testFetchEvents() {\n\t\t$jsonpad = parent::_getJsonpadInstance();\n\t\t\n\t\t// Fetch the events\n\t\t$total = 0;\n\t\t$events = $jsonpad->fetchEvents(1, null, null, $total);\n\t\t$this->assertInternalType(\"array\", $events);\n\t\t$this->assertGreaterThanOrEqual(1, $total);\n\t\t$this->assertInstanceOf(\"\\Jsonpad\\Resource\\Event\", $events[0]);\n\t}", "public function showpollsAction()\n {\n $polls = $this->getDoctrine()->getRepository('PollPollBundle:PollImpl')->findAll();\n return $this->render('PollPollBundle:Poll:show_polls.html.twig', array(\"polls\" => array_reverse($polls)));\n }", "public function testComDayCqPollingImporterImplManagedPollConfigImpl()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.day.cq.polling.importer.impl.ManagedPollConfigImpl';\n\n $crawler = $client->request('POST', $path);\n }", "public function testGetAccountPeriodicPaymentsUsingGET()\n {\n }", "public function test_get()\n\t{\n\t\t$_SERVER['REQUEST_METHOD'] = 'GET';\n\n\t\tPigeon::map(function($r){\n\t\t\t$r->get('posts/(:any)', 'posts/show/$1');\n\t\t\t$r->get('posts/(:num)', 'posts#show');\n\t\t\t$r->get('posts/people', array( 'Posts', 'action' ));\n\t\t});\n\n\t\t$this->assertEquals(array( 'posts/(:any)' => 'posts/show/$1', \n\t\t\t\t\t\t\t\t 'posts/people' => 'posts/action',\n\t\t\t\t\t\t\t\t 'posts/(:num)' => 'posts/show/$1' ), Pigeon::draw());\n\t}" ]
[ "0.6517212", "0.63763607", "0.63285667", "0.61603045", "0.61146563", "0.5927292", "0.58602315", "0.56228215", "0.54828477", "0.54216975", "0.53326815", "0.5261555", "0.5261327", "0.5234743", "0.5209806", "0.51862484", "0.5137796", "0.51247567", "0.5106876", "0.50816756", "0.50615215", "0.50030595", "0.49947917", "0.49928623", "0.49740723", "0.4938543", "0.4929184", "0.49227527", "0.48954555", "0.48837635", "0.48292363", "0.48217615", "0.47822097", "0.4774201", "0.47543493", "0.4753188", "0.4748506", "0.47465217", "0.47335157", "0.47317663", "0.47196284", "0.46908402", "0.46723196", "0.46723196", "0.46587244", "0.46550167", "0.46502483", "0.4648983", "0.46480876", "0.46454632", "0.46454632", "0.4631957", "0.4629784", "0.4627866", "0.46250924", "0.46245095", "0.46206763", "0.4617253", "0.46166834", "0.4600943", "0.459614", "0.45843765", "0.45824915", "0.4579361", "0.45668173", "0.45543993", "0.45284453", "0.45284432", "0.4526302", "0.4519469", "0.4519469", "0.45025885", "0.45025885", "0.45019308", "0.45013565", "0.45003435", "0.44904074", "0.44881904", "0.4486273", "0.4482771", "0.44808888", "0.44783095", "0.44680065", "0.4461408", "0.4458169", "0.4454875", "0.44539487", "0.4451962", "0.44511816", "0.44501486", "0.44478893", "0.4442714", "0.4441755", "0.44416794", "0.44413343", "0.4434702", "0.44300076", "0.44299987", "0.44287187", "0.4427197" ]
0.761019
0
Test case for webinarPollUpdate Update a Webinar Poll.
Тест-кейс для webinarPollUpdate Обновление опроса в вебинаре.
public function testWebinarPollUpdate() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update_poll()\n {\n //var_dump::display($_POST);\n @session::init();\n $v_website_id = session::get('session_website_id');\n $v_poll_id = get_post_var('hdn_item_id','');\n $v_poll_name = get_post_var('txt_poll_name');\n $v_poll_status = get_post_var('poll_status');\n \n $v_delete_answer_list = get_post_var('hdn_id_delete_answer_list','');\n \n $arr_answer = isset($_POST['txt_poll_answer'])?$_POST['txt_poll_answer']: array(); \n $v_answer_old_list = get_post_var('hdn_item_id_list_old','');\n $arr_answer_old_list = ($v_answer_old_list!='')?explode(',', $v_answer_old_list):array();\n \n $v_answer_new_list = get_post_var('hdn_item_id_list_new','');\n $arr_answer_new_list = ($v_answer_new_list!='')?explode(',', $v_answer_new_list):array();\n \n $v_begin_date = jwDate::ddmmyyyy_to_yyyymmdd(get_post_var('txt_begin_date','')).\" \". get_post_var('txt_begin_time','');\n \n $v_end_date = jwDate::ddmmyyyy_to_yyyymmdd(get_post_var('txt_end_date','')).\" \". get_post_var('txt_end_time','');\n \n //update poll\n if($v_poll_id!='')\n {\n $stmt=\"select distinct FK_WEBSITE from t_ps_poll Where PK_POLL =?\";\n $v_website_id_of_poll = $this->db->getOne($stmt,array($v_poll_id));\n if($v_website_id_of_poll == $v_website_id)\n {\n if($this->gp_check_user_permission('SUA_CUOC_THAM_DO_Y_KIEN')>0)\n {\n //update poll\n $stmt=\"update t_ps_poll set C_STATUS=?,C_NAME=?,C_BEGIN_DATE=?,C_END_DATE=?\n where PK_POLL=?\";\n $arr_stmt = array($v_poll_status,$v_poll_name,$v_begin_date,$v_end_date,$v_poll_id);\n $this->db->Execute($stmt,$arr_stmt);\n //update poll answer\n for($i=0;$i<count($arr_answer_old_list);$i++)\n {\n $v_answer_id = $arr_answer_old_list[$i];\n $v_answer_name = replace_bad_char($arr_answer[$i]);\n $stmt=\"Update t_ps_poll_detail set C_ANSWER = '$v_answer_name' where PK_POLL_DETAIL=$v_answer_id\";\n $this->db->Execute($stmt);\n }\n //xoá dữ liệu answer\n if($v_delete_answer_list !='')\n {\n $stmt = \"Delete From t_ps_poll_detail Where PK_POLL_DETAIL in ($v_delete_answer_list)\";\n $this->db->Execute($stmt);\n }\n //thêm answer\n if($v_answer_new_list!='')\n {\n foreach($arr_answer_new_list as $answer)\n {\n $v_answer_name = $answer;\n $stmt=\"insert into t_ps_poll_detail(FK_POLL,C_ANSWER,C_VOTE)\n values (?,?,?)\";\n $this->db->Execute($stmt,array($v_poll_id,$v_answer_name,0));\n }\n }\n $this->exec_done($this->goback_url);\n }\n else\n {\n echo \"<script>alert('Bạn không có quyền thực hiện thao tác này !!!');</script>\";\n $this->exec_done($this->goback_url);\n }\n }\n }\n //insert poll\n else \n {\n if($this->gp_check_user_permission('THEM_MOI_CUOC_THAM_DO_Y_KIEN')>0)\n {\n //var_dump($_POST);\n \n $stmt= \"insert into t_ps_poll(FK_WEBSITE,C_STATUS,C_NAME,C_BEGIN_DATE,C_END_DATE)\n values(?,?,?,?,?)\";\n $arr_stmt = array($v_website_id,$v_poll_status,$v_poll_name,\n $v_begin_date,$v_end_date);\n $this->db->Execute($stmt,$arr_stmt);\n \n $stmt=\"Select PK_POLL From t_ps_poll ORDER BY PK_POLL desc limit 1\";\n $v_new_id = $this->db->getOne($stmt);\n if($v_answer_new_list!='')\n {\n foreach($arr_answer_new_list as $answer)\n {\n $v_answer_name = $answer;\n $stmt=\"insert into t_ps_poll_detail(FK_POLL,C_ANSWER,C_VOTE)\n values (?,?,?)\";\n $this->db->Execute($stmt,array($v_new_id,$v_answer_name,0));\n }\n }\n $this->exec_done($this->goback_url);\n }\n else \n {\n echo \"<script>alert('Bạn không có quyền thực hiện thao tác này !!!');</script>\";\n $this->exec_done($this->goback_url, $arr_filter);\n }\n }\n \n //Hoàn thành và lưu điều kiện lọc\n //$arr_filter = get_filter_condition(array('sel_goto_page', 'sel_rows_per_page'));\n $this->exec_done($this->goback_url);\n }", "public function testWebinarUpdate()\n {\n }", "public function update(User $user, Poll $poll)\n {\n //\n }", "public function testWebinarPollGet()\n {\n }", "public function update(Request $request, Poll $poll) {\n $parentType = $poll->parent_type;\n $parent = Poll::getParent($parentType,$poll->parent);\n $statuses = $request->input('statuses');\n \n // csak admin modosíthat proposal és debate státuszban\n\t\tif (!$this->accessCheck('edit',$parentType, $parent->id, $poll)) {\n return redirect()->to(\\URL::to('/poll/list/'.$parentType,'/'.$parent->id.'/'.$statuses))\n ->with('error',__('poll.accessDenied'));\n }\n \n // tartalmi ellenörzés\n $this->model->valid($request);\n \n // poll rekord kiirása\n $id = $poll->id;\n $errorInfo = Poll::saveOrStore($id, $request);\n \n // result kialakítása\n if ($errorInfo == '') {\n $result = redirect()->to('/polls/'.$poll->id)\n ->with('success',__('poll.successSave'));\n } else {\n $result = redirect()->to('/polls/'.$poll->id)\n ->with('error',$errorInfo);\n }\n return $result;\n }", "public function testWebinarPollCreate()\n {\n }", "public function testWebinarRegistrantQuestionUpdate()\n {\n }", "public function testUpdateSurvey()\n {\n $survey = Survey::factory()->create();\n\n $response = $this->json('PATCH', \"survey/{$survey->id}\", [\n 'survey' => ['epilogue' => 'epilogue your behind']\n ]);\n\n $response->assertStatus(200);\n $this->assertDatabaseHas('survey', ['id' => $survey->id, 'epilogue' => 'epilogue your behind']);\n }", "public function testSellerUpdatedSuccess()\n {\n $this->demoUserLoginIn();\n $spu = Spu::create([\n 'users_id' => '1',\n 'name' => 'test',\n 'description' => 'test',\n ]);\n $response = $this->call('PATCH', '/seller/4/update', [\n 'name' => 'testUpdate',\n 'description' => 'testUpdate',\n ]);\n $this->assertEquals(302, $response->status());\n }", "public function update(Poll $poll, UpdatePollRequest $request)\n {\n $this->poll->update($poll, $request->all());\n\n return redirect()->route('admin.iquiz.poll.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('iquiz::polls.title.polls')]));\n }", "public function test_update() {\n global $DB;\n\n self::setAdminUser();\n $this->resetAfterTest(true);\n\n // Save new outage.\n $now = time();\n $outage = new outage([\n 'autostart' => false,\n 'warntime' => $now - 60,\n 'starttime' => 60,\n 'stoptime' => 120,\n 'title' => 'Title',\n 'description' => 'Description',\n ]);\n $outage->id = outagedb::save($outage);\n self::$outage = $outage;\n\n self::$outage->starttime += 10;\n outagedb::save(self::$outage);\n\n // Should still exist.\n $event = $DB->get_record_select(\n 'event',\n \"(eventtype = 'auth_outage' AND instance = :idoutage)\",\n ['idoutage' => self::$outage->id],\n 'id',\n IGNORE_MISSING\n );\n self::assertTrue(is_object($event));\n self::assertSame(self::$event->id, $event->id);\n self::$event = $event;\n }", "public function testUpdate()\n {\n\n // $payment = $this->payment\n // ->setEvent($this->eventId)\n // ->acceptCash()\n // ->acceptCheck()\n // ->acceptGoogle()\n // ->acceptInvoice()\n // ->acceptPaypal()\n // ->setCashInstructions($instructions)\n // ->setCheckInstructions($instructions)\n // ->setInvoiceInstructions($instructions)\n // ->setGoogleMerchantId($this->googleMerchantId)\n // ->setGoogleMerchantKey($this->googleMerchantKey)\n // ->setPaypalEmail($this->paypalEmail)\n // ->update();\n\n // $this->assertArrayHasKey('process', $payment);\n // $this->assertArrayHasKey('status', $payment['process']);\n // $this->assertTrue($payment['process']['status'] == 'OK');\n }", "public function testCollectionTicketsUpdate()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "function update() {\n\t\t$vars = $this->params['url'];\n\t\t$this->Event->id = $vars['id'];\n\t\t$this->Event->saveField('start', $vars['start']);\n\t\t$this->Event->saveField('end', $vars['end']);\n\t\t$this->Event->saveField('all_day', $vars['allday']);\n\t}", "public function update(Request $request, $id)\n { \n $div = Poll::findOrFail($id);\n\n $validator = Validator::make($request->all(), [\n 'title' => ['required'],\n 'description' => ['required'],\n 'deadline1' => ['required'],\n 'deadline2' => ['required'],\n 'choices1' => ['required']\n ]);\n\n if ($validator->fails()) {\n return redirect()->route('poll')->withInput()->with('status', 'Update Failed!');\n }\n\n $crud = $div->update([\n 'title' => $request->title,\n 'description' => $request->description,\n 'deadline' => $request->deadline1.' '.$request->deadline2\n ]);\n\n if ($crud) {\n $choice = Choice::where('poll_id', '=', $id)->get();\n $count = Choice::where('poll_id', '=', $id)->count();\n $a = 1;\n foreach ($choice as $c) {\n $b = $c->id;\n $z = $a++;\n $cccc = Choice::findOrFail($b);\n $crud2 = $cccc->update([\n 'choices' => $request->input('choices'.$z),\n 'poll_id' => $id\n ]);\n }\n $ccccccc = $count + 1;\n if ($request->input('choices'.$ccccccc)) {\n $crud3 = Choice::create([\n 'choices' => $request->input('choices'.$ccccccc),\n 'poll_id' => $id\n ]);\n } else{}\n return redirect()->route('poll')->with('status', 'Poll Updated!');\n } else {\n return redirect()->back()->with('status', 'Update Failed!');\n }\n }", "public function testD_update() {\n\n $fname = self::$generator->firstName();\n $lname = self::$generator->lastName;\n\n $resp = $this->wrapper->update( self::$randomEmail, [\n 'FNAME' => $fname,\n 'LNAME' => $lname\n ]);\n\n $this->assertObjectHasAttribute('id', $resp);\n $this->assertObjectHasAttribute('merge_fields', $resp);\n\n $updated = $resp->merge_fields;\n\n $this->assertEquals($lname, $updated->LNAME);\n\n }", "private function polls_put($pollId){\n $this->load->model(\"poll\");\n $this->load->model(\"answer\");\n\n try {\n $data = json_decode(trim(file_get_contents('php://input')), true);\n //Validate the poll\n $errors = $this->validate($data);\n if (count($errors) > 0){\n $this->response(array(\"errors\"=>$errors), 404);\n return;\n }\n\n //Angular magically escapes stuff\n $this->poll->update($pollId, $data[\"title\"], $data[\"question\"]);\n\n $answers = $data[\"answers\"];\n $answers_count = count($answers);\n\n //Remove all existing answers\n $this->answer->deleteAll($pollId);\n\n for ($i = 0; $i < $answers_count; ++$i) {\n $answer = $answers[$i];\n\n $answer[\"optionNo\"] = $i + 1;\n $answer[\"questionId\"] = $pollId;\n\n //Angular magically doesn't worry about html being escaped\n $this->answer->create($pollId, $answer[\"optionNo\"], $answer[\"answer\"], $answer[\"id\"]);\n }\n }\n catch (Exception $e){\n $this->response(array(\"errorMessage\"=>\"Unable to update poll\"), 404);\n }\n }", "public function update($meeting)\n {\n\n }", "public function editpoll_submit(){\n SiteController::loggedInCheck();\n\n\t\tif (isset($_POST['Cancel'])) {\n\t\t\theader('Location: '.BASE_URL);\n\t\t\texit();\n\t\t}\n\n\t\t$pollid = $_POST['pollid'];\n\t\t$poll = Poll::loadById($pollid);\n\n\t\t$title = $_POST['title'];\n\t\t$options = $_POST['options'];\n\t\t$timestamp = date(\"Y-m-d\", time());\n\n\t\t$poll->set('title', $title);\n\t\t$poll->set('timestamp', $timestamp);\n\t\t$poll->save();\n\n //remove old options\n $old_options = Poll::getPollOptions();\n foreach($old_options as $opt){\n $opt->delete();\n }\n\n //update options\n foreach ($options as $option){\n $poll_option = new PollOption();\n $poll_option->set('pollId', $pollid);\n $poll_option->set('poll_option', $option);\n $poll_option->save();\n }\n\n\t\theader('Location: '.BASE_URL);\n\t}", "public function testUpdate()\n {\n // Test with correct field name\n $this->visit('/cube/1')\n ->type('3', 'x')\n ->type('3', 'y')\n ->type('3', 'z')\n ->type('1', 'value')\n ->press('submit-update')\n ->see('updated successfully');\n\n /*\n * Tests with incorrect fields\n */\n // Field required\n $this->visit('/cube/1')\n ->press('submit-update')\n ->see('is required');\n\n // Field must be integer\n $this->visit('/cube/1')\n ->type('1a', 'x')\n ->press('submit-update')\n ->see('integer');\n\n // Field value very great\n $this->visit('/cube/1')\n ->type('1000000000', 'y')\n ->press('submit-update')\n ->see('greater');\n }", "public function update(Request $request, $id)\n {\n $poll = Polls::findOrFail($id);\n $poll->title=$request->input('title');\n $poll->description=$request->input('description');\n $poll->videosrc=$request->input('videosrc');\n $poll->videoposter=$request->input('videoposter');\n $poll->starttime=$request->input('starttime');\n $poll->endtime=$request->input('endtime');\n $poll->rewardflag=$request->input('rewardflag');\n $poll->save();\n return redirect(\"/admin/polls/$id/edit\")\n ->withSuccess(\"'$poll->title' 更新成功.\");\n }", "public function testUpdateSurvey0()\n {\n }", "public function testUpdateSurvey0()\n {\n }", "public function testHandleUpdateSuccess()\n {\n // Populate data\n $dealerAccountID = $this->_populate();\n \n // Set params\n $params = $this->customDealerAccountData;\n \n // Add ID\n $ID = $this->_pickRandomItem($dealerAccountID);\n $params['ID'] = $ID;\n \n // Request\n $this->withSession($this->adminSession)\n ->call('POST', '/dealer-account/edit', $params, [], [], ['HTTP_REFERER' => '/dealer-account/edit']);\n \n // Validate response\n $this->assertRedirectedTo('/dealer-account/edit');\n $this->assertSessionHas('dealer-account-updated', '');\n \n // Validate data\n $dealerAccount = $this->dealer_account->getOne($ID);\n $this->assertEquals($dealerAccount->name, $this->customDealerAccountData['name']);\n $this->assertEquals($dealerAccount->branch_ID, $this->customDealerAccountData['branch_ID']);\n }", "public function testHandleUpdateSuccess()\n {\n // Populate data\n $branchIDs = $this->_populate();\n \n // Set params\n $params = $this->customBranchData;\n \n // Add ID\n $ID = $this->_pickRandomItem($branchIDs);\n $params['ID'] = $ID;\n \n // Request\n $this->withSession($this->adminSession)\n ->call('POST', '/branch/edit', $params, [], [], ['HTTP_REFERER' => '/branch/edit']);\n \n // Validate response\n $this->assertRedirectedTo('/branch/edit');\n $this->assertSessionHas('branch-updated', '');\n \n // Validate data\n $branch = $this->branch->getOne($ID);\n $this->assertEquals($branch->name, $this->customBranchData['name']);\n $this->assertEquals($branch->promotor_ID, $this->customBranchData['promotor_ID']);\n }", "public function test_admin_can_update_a_worker()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs($admin = $this->createAdmin())\n ->visitRoute($this->route, $this->lastWorker()->id)\n ->type('worker_name', $this->makeWorker()->worker_name)\n ->type('worker_nif', $this->makeWorker()->worker_nif)\n ->type('worker_start', str_replace('/', '', $this->makeWorker()->worker_start))\n ->type('worker_ropo', $this->makeWorker()->worker_ropo)\n ->type('worker_ropo_date', str_replace('/', '', $this->makeWorker()->worker_ropo_date))\n ->select('worker_ropo_level', $this->makeWorker()->worker_ropo_level)\n ->type('worker_observations', $this->makeWorker()->worker_observations)\n ->press(trans('buttons.edit'))\n ->assertSee(__('The items has been updated successfuly'));\n });\n\n $this->assertDatabaseHas('workers', [\n 'worker_name' => $this->makeWorker()->worker_name,\n 'worker_nif' => $this->makeWorker()->worker_nif,\n 'worker_ropo' => $this->makeWorker()->worker_ropo,\n 'worker_ropo_level' => $this->makeWorker()->worker_ropo_level,\n 'worker_observations' => $this->makeWorker()->worker_observations,\n ]);\n }", "public function testUpdateVendorComplianceSurvey()\n {\n }", "public function testListPastWebinarPollResults()\n {\n }", "public function testUpdate()\n\t{\n\t\t$params = $this->setUpParams();\n\t\t$params['title'] = 'some tag';\n\t\t$params['slug'] = 'some-tag';\n\t\t$response = $this->call('PUT', '/'.self::$endpoint.'/'.$this->obj->id, $params);\n\t\t$this->assertEquals(200, $response->getStatusCode());\n\t\t$result = $response->getOriginalContent()->toArray();\n\n\t\t// tes apakah hasil return adalah yang sesuai\n\t\tforeach ($params as $key => $val) {\n\t\t\t$this->assertArrayHasKey($key, $result);\n\t\t\tif (isset($result[$key])&&($key!='created_at')&&($key!='updated_at'))\n\t\t\t\t$this->assertEquals($val, $result[$key]);\n\t\t}\n\n\t\t// tes tak ada yang dicari\n\t\t$response = $this->call('GET', '/'.self::$endpoint.'/696969', $params);\n\t\t$this->assertEquals(500, $response->getStatusCode());\n\t}", "public function testWebinarPollDelete()\n {\n }", "public function test_shoppers_can_be_updated()\n {\n $shopper = Shopper::withoutEvents(function () {\n return Shopper::factory()->create();\n });\n\n $this->actingAs($shopper);\n\n $response = $this->patch(route('shoppers.update', $shopper), $shppr = [\n 'name' => 'John Doe',\n 'email' => 'john.doe@gmail.com',\n 'phone' => '+16089673882',\n 'image' => UploadedFile::fake()->image('avatar.jpg', 400, 400)->size(1000),\n ]);\n\n $response->assertSessionHasNoErrors([\n 'name',\n 'phone',\n 'email',\n ]);\n\n $this->assertDatabaseHas(\n 'shoppers',\n [\n 'name' => $shppr['name'],\n 'email' => $shppr['email'],\n 'phone' => $shppr['phone'],\n 'image' => '/storage/'.time().'.'.$shppr['image']->extension(),\n 'admin_created_id' => '1',\n 'admin_updated_id' => $shopper->id\n ]\n );\n\n $response->assertStatus(302);\n $response->assertRedirect(route('shoppers.index'));\n }", "public function editpoll(){\n SiteController::loggedInCheck();\n\n //retrieve the poll\n\t\t$pollid = $_POST['edit'];\n\t\t$poll = Poll::loadById($pollid);\n\n //retrieve poll author's username\n\t\t$authorid = $poll->get('userId');\n\t\t$user = User::loadById($authorid);\n\t\t$username = $user->get('username');\n\n\t\t//check if author of the poll is the logged in user\n\t\tif($_SESSION['username'] != $username){\n\t\t\t$_SESSION['info'] = \"You can only edit polls of which you are the author of.\";\n\t\t\theader('Location: '.BASE_URL);\n\t\t\texit();\n\t\t} else {\n\t\t\t//allow access to edit poll\n\t\t\t$title = $poll->get('title');\n $options = $poll->getPollOptions();\n\t\t\tinclude_once SYSTEM_PATH.'/view/editpoll.tpl'; //TODO: check tpl is correct\n\t\t}\n\t}", "public function executeUpdate(sfWebRequest $request)\n {\n $this->forward404Unless($request->isMethod(sfRequest::POST) || $request->isMethod(sfRequest::PUT));\n $this->forward404Unless($website_practice_area = Doctrine::getTable('WebsitePracticeArea')->find(array($request->getParameter('id'))), sprintf('Object website_practice_area does not exist (%s).', $request->getParameter('id')));\n $this->form = new WebsitePracticeAreaForm($website_practice_area,array(\"Id\"=>$request->getParameter('id'),\"webId\"=>$website_practice_area->getWebsiteId()));\n $this->websitedetail = UsersWebsite::getUsersWebsiteId($this->getUser()->getAttribute('admin_user_id'));\n\n $this->displaySlugValue = $_POST['WebsitePracticeArea']['Newslug'];\n\n\t\t$redirectFlag = $request->getPostParameter('submit');\n $this->processForm($request, $this->form, $redirectFlag);\n\n $this->setTemplate('edit');\n }", "public function vote()\r\n\t{\r\n\r\n\t\t$poll_id = $_POST['poll_id']; \r\n\r\n\t\t// Increate vote for desired field\r\n\t\tif (have_rows('polls_options', $poll_id)) {\r\n\t\t\twhile (have_rows('polls_options', $poll_id)) {\r\n\t\t\t\tthe_row();\r\n\t\t\t\tif (get_sub_field('poll_option') === $_POST[\"votes_question\"]) {\r\n\r\n\t\t\t\t\t// Update vote count into ACF field\r\n\t\t\t\t\t$current_votes_count = get_sub_field('poll_option_votes');\r\n\t\t\t\t\t$vote = update_sub_field('poll_option_votes', $current_votes_count ? ++$current_votes_count : 1, $poll_id);\r\n\r\n\t\t\t\t\t// Add poll ID to session \r\n\t\t\t\t\tsession_start();\r\n\t\t\t\t\tif (!isset($_SESSION['wppoll'])) {\r\n\t\t\t\t\t\t$_SESSION['wppoll'] = array();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tarray_push($_SESSION['wppoll'], (int) $poll_id);\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\twp_die();\r\n\r\n\t\tif (!$vote) {\r\n\t\t\t$data = array('type' => 'error', 'message' => 'Voting failed');\r\n\t\t\theader('HTTP/1.1 400 Bad Request');\r\n\t\t\theader('Content-Type: application/json; charset=UTF-8');\r\n\t\t\techo json_encode($data);\r\n\t\t}\r\n\t\twp_die();\r\n\t}", "public function testUserUpdate()\n {\n $this->browse(function (Browser $browser) {\n $update_button = self::$locator . ' td .update_button';\n\n self::$username = 'A0Tester' . uniqid();\n $browser->visit('/')\n ->click($update_button)\n ->type('username', self::$username)\n ->type('first_name', 'aaaab')\n ->type('last_name', 'aaaab')\n ->click('button[type=\"submit\"]')\n\n ->waitForText('User data successfully updated!')\n ->assertSee('User data successfully updated!')\n ->assertValue('input[name=\"username\"]', self::$username)\n ->assertValue('input[name=\"first_name\"]', 'aaaab')\n ->assertValue('input[name=\"last_name\"]', 'aaaab');\n });\n }", "public function updated(OnlineInquiry $onlineInquiry)\n {\n //\n }", "function update()\n {\n\n $query = \"UPDATE Proposal set \";\n $query = $query . \"LastEditDate=NOW()\";\n if(isset($this->BidderID))\n {\n $query = $query . \", OpportunityID = '\" . $this->OpportunityID . \"'\"; \n }\n\n if(isset($this->BidderID))\n {\n $query = $query . \", BidderID = '\" . $this->BidderID . \"'\"; \n }\n\n if(isset($this->Status))\n {\n $query = $query . \", Status = \" . $this->Status . \"\"; \n }\n\n if(isset($this->TechnicalScore))\n {\n $query = $query . \", TechnicalScore = \" . $this->TechnicalScore . \" \"; \n }\n\n if(isset($this->FeeScore))\n {\n $query = $query . \", FeeScore = \" . $this->FeeScore . \" \"; \n }\n\n if(isset($this->FinalTotalScore))\n {\n $query = $query . \", FinalTotalScore = \" . $this->FinalTotalScore . \" \"; \n }\n\n if(isset($this->ContractAwarded))\n {\n $query = $query . \", ContractAwarded = \" . $this->ContractAwarded . \" \"; \n }\n\n $query = $query . \" WHERE ProposalID = '\" . $this->ProposalID . \"';\";\n\n $stmt = $this->conn->prepare( $query );\n\n // bind parameters\n //$stmt->bindParam(':ProposalID', $this->ProposalID);\n //$stmt->bindParam(':OpportunityID', $this->OpportunityID);\n //$stmt->bindParam(':BidderID', $this->BidderID);\n //$stmt->bindParam(':Status', $this->Status);\n //$stmt->bindParam(':TechnicalScore', $this->TechnicalScore);\n // $stmt->bindParam(':FeeScore', $this->FeeScore);\n //$stmt->bindParam(':FinalTotalScore', $this->FinalTotalScore);\n\n if($stmt->execute())\n return true;\n else\n return false;\n }", "public function testDeveloperUpdate()\n {\n $developer = factory(Developer::class)->create();\n $response = $this->get('/developer/update?id=' . $developer->id);\n $response->assertStatus(200);\n }", "public function testUpdatePayslipByID()\n {\n }", "public function update(Request $request, EventStarter $eventStarter)\n {\n\t\t\n\t\t$eventStarter->schedule_plan = $request->get('schedule_plan');\n\t\t$eventStarter->status = $request->get('status');\n\t\t$eventStarter->save();\n\n\n\t return redirect(route('detail-event', ['eventStarter' => $eventStarter->id]));\n }", "public function testUpdate() {\n\n\t\t$request_uri = $this->root_url . 'update';\n\n\t\t$parameters = array(\n\t\t\t'uri' => $request_uri,\n\t\t\t'method' => 'POST',\n\t\t\t'database' => $this->db,\n\t\t\t'postdata' => array(\n\t\t\t\t'id' => 4,\n\t\t\t\t'firstname' => 'Andrei',\n\t\t\t\t'surname' => 'Kanchelskis',\n\t\t\t)\n\t\t);\n\n\t\t$server = new APIServer( $parameters );\n\n\t\t$server->run();\n\n\t\t$response = $server->getResponse();\n\n\t\t$this->assertArrayHasKey('status', $response);\n\t\t$this->assertArrayHasKey('command', $response);\n\n\t\t$this->assertEquals( $response['command'], 'update' );\n\t}", "public function testUpdate(): void { }", "private function execute_Update() {\n\n if ((isset($_POST['save'])) or (isset($_POST['save_and_close']))) {\n\n // Check posted Informations\n $weblink_status = filter_input(INPUT_POST, 'weblink_status', FILTER_VALIDATE_INT);\n $this->weblink_data = [\n 'weblink_id' => form_sanitizer(filter_input(INPUT_POST, 'weblink_id', FILTER_VALIDATE_INT), 0, 'weblink_id'),\n 'weblink_name' => form_sanitizer(filter_input(INPUT_POST, 'weblink_name', FILTER_DEFAULT), '', 'weblink_name'),\n 'weblink_cat' => form_sanitizer(filter_input(INPUT_POST, 'weblink_cat', FILTER_VALIDATE_INT), 0, 'weblink_cat'),\n 'weblink_url' => form_sanitizer(filter_input(INPUT_POST, 'weblink_url', FILTER_DEFAULT), '', 'weblink_url'),\n 'weblink_description' => form_sanitizer(filter_input(INPUT_POST, 'weblink_description', FILTER_DEFAULT), '', 'weblink_description'),\n 'weblink_datestamp' => form_sanitizer(filter_input(INPUT_POST, 'weblink_datestamp', FILTER_DEFAULT), '', 'weblink_datestamp'),\n 'weblink_visibility' => form_sanitizer(filter_input(INPUT_POST, 'weblink_visibility', FILTER_VALIDATE_INT), 0, 'weblink_visibility'),\n 'weblink_status' => !empty($weblink_status) ? $weblink_status : '0',\n 'weblink_language' => form_sanitizer(filter_input(INPUT_POST, 'weblink_language', FILTER_DEFAULT), LANGUAGE, 'weblink_language'),\n ];\n\n // Handle\n if (\\defender::safe()) {\n\n $update_datestamp = filter_input(INPUT_POST, 'update_datestamp', FILTER_DEFAULT);\n // Update\n if (dbcount(\"('weblink_id')\", DB_WEBLINKS, \"weblink_id=:weblinkid\", [':weblinkid' => $this->weblink_data['weblink_id']])) {\n $this->weblink_data['weblink_datestamp'] = !empty($update_datestamp) ? time() : $this->weblink_data['weblink_datestamp'];\n dbquery_insert(DB_WEBLINKS, $this->weblink_data, 'update');\n addNotice('success', $this->locale['WLS_0031']);\n // Create\n } else {\n $this->weblink_data['weblink_id'] = dbquery_insert(DB_WEBLINKS, $this->weblink_data, 'save');\n addNotice('success', $this->locale['WLS_0030']);\n }\n\n // Redirect\n if (isset($_POST['save_and_close'])) {\n redirect(clean_request('', ['ref', 'action', 'weblink_id'], FALSE));\n } else {\n redirect(clean_request('action=edit&weblink_id='.$this->weblink_data['weblink_id'], ['action', 'weblink_id'], FALSE));\n }\n }\n }\n }", "function updateWebinar($webinarKey, $payloadArray, $sendNotification = true)\n {\n ($sendNotification) ? $parameters = ['notifyParticipants' => true] : $parameters = ['notifyParticipants' => false];\n\n $path = $this->getPathRelativeToOrganizer(sprintf('webinars/%s', $webinarKey));\n\n $webinarObject = new WebinarEntity($payloadArray);\n\n return $this->sendRequest('PUT', $path, $parameters, $payload = $webinarObject->toArray());\n }", "public function testUpdatePayslip()\n {\n }", "public function updateOffer()\n {\n global $mysqli, $_POST;\n $offer_id = $_POST['offer_id'];\n $date_begin = date(\"Y-m-d\", strtotime($_POST[\"date_begin\"]));\n $date_end = date(\"Y-m-d\", strtotime($_POST[\"date_end\"]));\n $title = $mysqli->real_escape_string($_POST[\"title\"]);\n $subtitle = $mysqli->real_escape_string($_POST[\"subtitle\"]);\n $header = $mysqli->real_escape_string($_POST[\"header\"]);\n $footer = $mysqli->real_escape_string($_POST[\"footer\"]);\n $services = $mysqli->real_escape_string($_POST[\"services\"]);\n $description = $mysqli->real_escape_string($_POST[\"description\"]);\n $alias = $mysqli->real_escape_string($_POST[\"alias\"]);\n $type = $mysqli->real_escape_string($_POST[\"type\"]);\n $course = $mysqli->real_escape_string($_POST[\"course\"]);\n $status = $mysqli->real_escape_string($_POST[\"status\"]);\n $type_date = $mysqli->real_escape_string($_POST[\"type_date\"]);\n $discount = $mysqli->real_escape_string($_POST[\"discount\"]);\n $update_qry = \"UPDATE `offers` SET\n `date_begin`='\".$date_begin.\"',\n `date_end`='\".$date_end.\"',\n `title`='\".$title.\"',\n `subtitle`='\".$subtitle.\"',\n `header`='\".$header.\"',\n `footer`='\".$footer.\"',\n `services`='\".$services.\"',\n `description`='\".$description.\"',\n `alias`='\".$alias.\"',\n `type`='\".$type.\"',\n `course`='\".$course.\"',\n `status`='\".$status.\"',\n `type_date`='\".$type_date.\"',\n `discount`='\".$discount.\"',\n `updated_at` =NOW() WHERE id=\".$offer_id;\n $mysqli->query($update_qry);\n $mes = ($mysqli->affected_rows>=0)?1:0;\n $heading = $title.'<small> Typ: '.$type.'</small>&nbsp; '.$_POST[\"date_begin\"].' - '.$_POST[\"date_end\"];\n\n print json_encode(['success'=>$mes,\"heading\" =>$heading]);\n }", "public function testUpdatePayrun()\n {\n }", "public static function update(){\n $idTimeSlot = $_REQUEST[\"idTimeSlot\"];\n $dayOfWeek = $_REQUEST[\"dayOfWeek\"];\n $startTime = $_REQUEST[\"startTime\"];\n $endTime = $_REQUEST[\"endTime\"];\n\n $result = DB::dataManipulation(\"UPDATE timeslots \n SET dayOfWeek='$dayOfWeek', startTime='$startTime', endTime='$endTime'\n WHERE idTimeSlot = '$idTimeSlot'\");\n return $result;\n }", "public function SurveyReadStatusUpdate() {\n $user = $this->auth();\n if (empty($user)) {\n Utils::response(['status' => false, 'message' => 'Forbidden access.'], 403);\n }\n $input = $this->getInput();\n if (($this->input->method() != 'post') || empty($input)) {\n Utils::response(['status' => false, 'message' => 'Bad request.'], 400);\n }\n $validate = [\n ['field' => 'push_survey_id', 'label' => 'Pushed Survey ID', 'rules' => 'required'],\n ];\n $errors = $this->ConsumerModel->validate($input, $validate);\n if (is_array($errors)) {\n Utils::response(['status' => false, 'message' => 'Validation errors.', 'errors' => $errors]);\n }\t\n\t\t$push_survey_id = $this->getInput('push_survey_id');\n\t\t$push_survey_idi = $push_survey_id['push_survey_id'];\n\t\t\n $this->db->set('media_play_date', date(\"Y-m-d H:i:s\")); \n $this->db->where('id', $push_survey_idi);\n if ($this->db->update('push_surveys')) {\n Utils::response(['status' => true, 'message' => 'Record updated.', 'data' => $input]);\n } else {\n Utils::response(['status' => false, 'message' => 'System failed to update.'], 200);\n }\n }", "public function testUpdate()\n\t{\n\t\t// Update just updates the given fields, let's the rest unchanged.\n\t\t// Use Replace to replace all fields.\n\t\t$updateProduct = [\n\t\t\t'description' => 'This is a product description.',\n\t\t\t'price' => 1150.00\n\t\t];\n\n\t\t$service = $this->getService();\n\n\t\t// Update product\n\t\t$this->mockResponseFromFile('products.update.success');\n\t\t$response = $service->update()->pin('AD8CCDD5F9')->area('work')->spn('MBA11')->product($updateProduct)->execute();\n\t\t$this->assertIsArray($response);\n\t\t$this->assertArrayHasKey('kind', $response);\n\t\t$this->assertArrayHasKey('link', $response);\n\t}", "public function testUpdateValue()\n {\n $response = $this->json('PATCH', '/api/values');\n $response->assertStatus(200);\n }", "public function editpollAction(Request $request, $poll_id) {\n $em = $this->getDoctrine()->getManager();\n $poll = $em->getRepository('PollPollBundle:PollImpl')->find($poll_id);\n\n $form = $this->createForm(new NewPoll(), $poll);\n $form->handleRequest($request);\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($poll);\n $em->flush();\n return $this->redirect($this->generateUrl('poll_show_one', array(\"poll_id\" => $poll_id)));\n }\n return $this->render('PollPollBundle:Poll:edit_poll.html.twig', array('form' => $form->createView()));\n }", "public function edit_watch(){\r\n\t\tif($this->expectsPost(array('watchId','brand', 'name', 'yearOfBuy',\r\n\t\t\t'serial', 'caliber'))){\r\n\r\n\t\t\tif ($this->watch->editWatch($this->session->userdata('userId'),\r\n\t\t\t\t\t\t$this->watchId,\r\n\t\t\t\t\t\t$this->brand, $this->name,\r\n\t\t\t\t\t\t$this->yearOfBuy, $this->serial,\r\n\t\t\t\t\t\t$this->caliber)) {\r\n\r\n\t\t\t\t$this->_bodyData['success'] = 'Watch successfully updated!';\r\n\r\n\t\t\t}\r\n\r\n\t\t\t$this->constructMeasurePage();\r\n\t\t}\r\n\t}", "public function updateEvent()\n {\n $result = $this->_signedResponse($this->vars->cal);\n\n if (!($kronolith_driver = $this->_getDriver($this->vars->cal)) ||\n !isset($this->vars->id)) {\n return $result;\n }\n\n try {\n $oevent = $kronolith_driver->getEvent($this->vars->id);\n } catch (Exception $e) {\n $GLOBALS['notification']->push($e, 'horde.error');\n return $result;\n }\n if (!$oevent) {\n $GLOBALS['notification']->push(_(\"The requested event was not found.\"), 'horde.error');\n return $result;\n } elseif (!$oevent->hasPermission(Horde_Perms::EDIT)) {\n $GLOBALS['notification']->push(_(\"You do not have permission to edit this event.\"), 'horde.warning');\n return $result;\n }\n\n $attributes = Horde_Serialize::unserialize($this->vars->att, Horde_Serialize::JSON);\n\n // If this is a recurring event, need to create an exception.\n if ($oevent->recurs()) {\n $this->_addException($oevent, $attributes);\n $event = $this->_copyEvent($oevent, null, $attributes);\n } else {\n $event = clone($oevent);\n }\n\n foreach ($attributes as $attribute => $value) {\n switch ($attribute) {\n case 'start':\n $newDate = new Horde_Date($value);\n $newDate->setTimezone($event->start->timezone);\n $event->start = clone($newDate);\n break;\n\n case 'end':\n $newDate = new Horde_Date($value);\n $newDate->setTimezone($event->end->timezone);\n $event->end = clone($newDate);\n if ($event->end->hour == 23 &&\n $event->end->min == 59 &&\n $event->end->sec == 59) {\n $event->end->mday++;\n $event->end->hour = $event->end->min = $event->end->sec = 0;\n }\n break;\n\n case 'offDays':\n $event->start->mday += $value;\n $event->end->mday += $value;\n break;\n\n case 'offMins':\n $event->start->min += $value;\n $event->end->min += $value;\n break;\n }\n }\n\n $result = $this->_saveEvent($event, ($oevent->recurs() ? $oevent : null), $attributes);\n if ($this->vars->u) {\n Kronolith::sendITipNotifications($event, $GLOBALS['notification'], Kronolith::ITIP_REQUEST);\n }\n\n return $result;\n }", "public function testSchedulesUpdateOut()\n {\n $result = $this->visit('events/{event}/schedules/update/{id}')\n ->see('create your suaray account')\n ->see('welcome to suaray')\n ->seePageIs('/account/register');\n }", "public function testVolunteerHourUpdateFailure_Inactive()\n {\n $this->session([\n 'username' => $this->inactiveUser->username, \n 'access_level' => $this->inactiveUser->access_level\n ]);\n \n // Set test user as current authenticated user\n $this->be($this->inactiveUser);\n \n $testProjectID = 1; \n // Call route under test\n $this->call('POST', 'volunteerhours/volunteerEdit/');\n \n // Assert redirected to access denied page\n $this->assertRedirectedToRoute('unauthorized');\n }", "public function testUpdateActionOk()\n {\n // Mock the property object.\n $oProperty = $this->getMock('Hook\\Commit\\Diff\\Property', array(), array('svn:keywords'));\n $oProperty->expects($this->any())\n ->method('getOldValue')\n ->will($this->returnValue(''));\n\n $oProperty->expects($this->any())\n ->method('getNewValue')\n ->will($this->returnValue('Id'));\n\n $aParams = array(\n 'txn' => '666-1',\n 'rev' => 666,\n 'action' => 'U',\n 'item' => 'file.php',\n 'real' => 'file.php',\n 'ext' => 'php',\n 'isdir' => false,\n 'props' => array('svn:keywords' => $oProperty),\n 'lines' => null,\n 'info' => null\n );\n\n $oObject = new Object($aParams);\n\n $this->oIdListener->processAction($oObject);\n\n // Check.\n $aErrors = $oObject->getErrorLines();\n\n $this->assertTrue(empty($aErrors));\n }", "public function update(Request $request, Offer $offer)\n {\n //\n }", "public function testUpdate(): void\n {\n $this->createInstance();\n $user = $this->createAndLogin();\n\n $res = $this->fConnector->getDiscussionManagement()->postTopic('Hello title', 'My content', [$this->configTest['testTagId']],$user->userId)->wait();\n\n //Test update as admin\n $res2 = $this->fConnector->getDiscussionManagement()->updateTopic($res->id,'Hello title3', 'My content2', [$this->configTest['testTagId']],null)->wait();\n $this->assertInstanceOf(FlarumDiscussion::class,$res2) ;\n $this->assertEquals('Hello title3',$res2->title, 'Test discussion update as admin');\n\n //Test update as user\n $res2 = $this->fConnector->getDiscussionManagement()->updateTopic($res->id,'Hello title4', 'My content3', [$this->configTest['testTagId']],null)->wait();\n $this->assertInstanceOf(FlarumDiscussion::class,$res2) ;\n $this->assertEquals('Hello title4',$res2->title,'Test discussion update as user');\n\n }", "function UpdateEvents() {\n\t\tforeach ($this->data as $i => $row) {\n\t\t\tif (!is_null($row['EventId'])) {\n\t\t\t\t//check wheter event is assigned to calculated event. If it is take the calculated rating, otherwise set the rating to -0.5\n\t\t\t\tif (array_key_exists($i, $this -> rating)) {\n\t\t\t\t\t$rating = $this -> rating[$i];\n\t\t\t\t} else {\n\t\t\t\t\t$rating = -0.5;\n\t\t\t\t}\n\t\t\t\t//update all events\n\t\t\t\t$sql = \"UPDATE Event SET rating=\" . $rating . \" WHERE EventId=\" . $row['EventId'];\n\t\t\t\t$stmt = $this -> DB -> prepare($sql);\n\t\t\t\tif ($stmt -> execute()) {\n\t\t\t\t} else {\n\t\t\t\t\tinclude_once \"Email.php\";\n\t\t\t\t\tnew Email('failed', 'to update event rating with EventId=' . $row['EventId'], $this -> id);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this -> updateTask();\n\n\t}", "public function testUpdateAction()\n {\n $res = $this->controller->updateAction(\"1\");\n $this->assertContains(\"Update\", $res->getBody());\n }", "public function testUpdatedTask()\n {\n $userId = User::first()->value('id');\n $taskId = Task::orderBy('id', 'desc')->first()->id;\n\n $response = $this->json('PUT', '/api/v1.0.0/users/'.$userId.'/tasks/'.$taskId, [\n 'description' => 'An updated task from PHPUnit',\n 'completed' => true,\n ]);\n\n $response\n ->assertStatus(200)\n ->assertJson([\n 'description' => 'An updated task from PHPUnit',\n 'completed' => true,\n ]);\n }", "public function testUpdateEvents()\n {\n $event= Event::factory(1)->create();\n // dd($event);\n $event->title = 'Maria';\n $this->put(\"/events\". $event[0]->id, $event->toArray());\n\n $this->assertDatabaseHas('events', [\n 'id' => 1,\n 'title' => 'Maria'\n ]);\n }", "public function testWebinarPolls()\n {\n }", "public function testUpdateSurveyQuestion0()\n {\n }", "public function testUpdateSurveyQuestion0()\n {\n }", "public function Update()\n\t{\n\t\t$prefix = $this->Db->TablePrefix;\n\t\t$user = GetUser();\n\t\t$userid = $user->userid;\n\t\t$where = 'id = ' . $this->id;\n\n\t\t$surveys_data = $this->data;\n\n\t\tif (isset($surveys_data['_columns'])) {\n\t\t\tunset($surveys_data['_columns']);\n\t\t}\n\n\t\tif (isset($surveys_data['id'])) {\n\t\t\tunset($surveys_data['id']);\n\t\t}\n\n\t\t$surveys_data['updated'] = $this->GetServerTime();\n\n\t\t$this->Db->UpdateQuery('surveys', $surveys_data, $where);\n\t}", "function TimeIt_operation_updateEvent(&$obj, $params)\n{\n $online = isset($params['online']) ? $params['online'] : 0;\n $obj['status'] = $online;\n //print_r($params);exit();\n $para = array();\n $para['obj'] = &$obj;\n if($params['repeat'] == '1') {\n if(!isset($obj['cid']) && isset($obj['data']['cid'])) {\n $obj['cid'] = $obj['data']['cid'];\n } else if(!isset($obj['cid']) && !isset($obj['data']['cid'])) {\n $obj['cid'] = pnModGetVar('TimeIt', 'defaultCalendar');\n }\n $para['noRecurrences'] = true;\n $prozi = new TimeIt_Recurrence_Processor(new TimeIt_Recurrence_Output_DB(), $obj);\n $prozi->doCalculation();\n } else if($params['deleterepeats'] == '1') {\n pnModAPIFunc('TimeIt', 'user', 'deleteAllRecurrences', array('obj'=>$obj));\n $obj['data']['cid'] = $obj['cid']; // backup calendar id because $obj['cid'] won't be saved\n $para['noRecurrences'] = true;\n }\n \n return pnModAPIFunc('TimeIt', 'user', 'update', $para);\n}", "public function update(Request $request, pregunta_test $pregunta_test)\n {\n //\n }", "public function testGetAccountEventCheckInUpdateIn($auth)\n {\n // Grab Page\n $result = $this->actingAs($auth)\n ->visit('account/event/check-in/update')\n ->see('success\":true')\n ->see('error\":null')\n ->seePageIs('account/event/check-in/update');\n }", "public function updateFeed($feed) {\n\t\t$this->_initDbConnection();\n\t\t\n\t\t$stm = $this->_prepareStatement('feed', 'updatePoll');\n\t\t$stm->execute(array(\n\t\t\t':id' => $feed->id,\n\t\t\t':lastUpdated' => $feed->lastUpdated,\n\t\t\t':lastPolled' => $feed->lastPolled\n\t\t));\n\n\t\tif ($this->_isPdoError($stm)) {\n\t\t\treturn false;\n\t\t}\t\t\n\t\t\n\t\treturn true;\n\t}", "public function testRequestUpdateItem()\n {\n\t\t$response = $this\n\t\t\t\t\t->json('PUT', '/api/items/6', [\n\t\t\t\t\t\t'name' => 'Produkt zostal dodany i zaktualizowany przez test PHPUnit', \n\t\t\t\t\t\t'amount' => 0\n\t\t\t\t\t]);\n\n $response->assertJson([\n 'message' => 'Items updated.',\n\t\t\t\t'updated' => true\n ]);\n }", "private function processPollAndVoteArgumentFromRequest(): void\n {\n if ($this->arguments->hasArgument('poll')) {\n $prop = $this->arguments->getArgument('poll')->getPropertyMappingConfiguration();\n $prop->allowAllProperties();\n $prop->allowProperties('options');\n $prop->forProperty('options.*')->allowProperties('name', 'sorting', 'markToDelete');\n $prop->allowCreationForSubProperty('options.*');\n $prop->allowModificationForSubProperty('options.*');\n }\n\n // Remove empty option entries and trim non-empty ones\n if ($this->request->hasArgument('poll') && is_array($this->request->getArgument('poll'))) {\n $poll = $this->request->getArgument('poll');\n $pollOptions = $poll['options'];\n if ($pollOptions) {\n $lastSorting = 0;\n foreach ($pollOptions as $index => $pollOption) {\n if (empty($pollOption['name'])) {\n unset($poll['options'][$index]); // remove\n } else {\n $poll['options'][$index]['name'] = trim($pollOption['name']); // trim\n\n if (empty($pollOption['sorting'])) {\n $lastSorting = $lastSorting * 2;\n $poll['options'][$index]['sorting'] = (string)$lastSorting;\n } else {\n $lastSorting = $pollOption['sorting'];\n }\n }\n if ('' === $pollOption['__identity']) {\n unset($poll['options'][$index]['__identity']);\n }\n }\n }\n if (is_array($poll['options'])) {\n $poll['options'] = array_values($poll['options']);\n }\n $this->request->setArgument('poll', $poll);\n }\n\n if ($this->arguments->hasArgument('vote')) {\n // Disable generic object validator for option_values in polls\n $this->disableGenericObjectValidator('vote', 'optionValues');\n $this->disableGenericObjectValidator('vote', 'poll');\n }\n\n if ($this->arguments->hasArgument('poll')) {\n // Disable generic object validator for options in polls\n $this->disableGenericObjectValidator('poll', 'options');\n\n // Set DateTimeConverter format\n $this->arguments->getArgument('poll')->getPropertyMappingConfiguration()\n ->forProperty('settingVotingExpiresDate')\n ->setTypeConverterOption(\n DateTimeConverter::class,\n DateTimeConverter::CONFIGURATION_DATE_FORMAT,\n 'Y-m-d'\n );\n $this->arguments->getArgument('poll')->getPropertyMappingConfiguration()\n ->forProperty('settingVotingExpiresTime')\n ->setTypeConverterOption(\n DateTimeConverter::class,\n DateTimeConverter::CONFIGURATION_DATE_FORMAT,\n 'H:i'\n );\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function testUpdate()\n {\n\n $this->createDummyRole();\n\n $this->call('POST', '/api/role', array(\n 'action' => $this->updateAction,\n 'id' => 1,\n 'name' => \"updatedName\",\n 'description' => \"updatedDesc\",\n 'permissionCount' => $this->testPermissionCount,\n 'permission0' => 1,\n ));\n\n $this->assertDatabaseHas('roles', [\n 'id' => 1,\n 'name' => \"updatedName\",\n 'description' => \"updatedDesc\"\n ]);\n\n $this->assertDatabaseHas('role_permission', [\n 'role_id' => 1,\n 'permission_id' => [1]\n ]);\n\n $this->assertDatabaseMissing('role_permission', [\n 'role_id' => 1,\n 'permission_id' => [2]\n ]);\n }", "public function update($id,Request $r, Events $events)\n {\n // dd($r->choice['value']);\n $e=$events->find($id);\n $e->event_name = $r->name;\n $e->event_description = $r->text;\n $e->slot=$r->choice['value'];\n $e->date=$r->date;\n $e->save();\n\n }", "public function testCollectionTicketCommentsUpdate()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function test_update_item() {}", "public function test_update_item() {}", "public function testIntegrationUpdate()\n {\n $userFaker = factory(Model::class)->create();\n $this->visit('user/' . $userFaker->slug . '/edit')\n ->type('Foo bar', 'name')\n ->type('Foobar', 'username')\n ->type('foo@bar.com', 'email')\n ->type('foobar123', 'password')\n ->type('foobar123', 'password_confirmation')\n ->press('Save')\n ->seePageIs('user');\n $this->assertResponseOk();\n $this->seeInDatabase('users', [\n 'username' => 'Foobar',\n 'email' => 'foo@bar.com'\n ]);\n $this->assertViewHas('models');\n }", "public function testSellerUpdatedFailed()\n {\n $this->demoUserLoginIn();\n $response = $this->call('PATCH', '/seller/999/update', [\n 'name' => 'testUpdate',\n 'description' => 'testUpdate',\n ]);\n $this->assertEquals(404, $response->status());\n }", "function wpbs_update_booking($booking_id, $data)\n{\n\n return wp_booking_system()->db['bookings']->update($booking_id, $data);\n\n}", "public function testHandleUpdateValidationError()\n {\n // Populate data\n $this->_populate();\n \n // Request\n $response = $this->withSession($this->adminSession)\n ->call('POST', '/dealer-account/edit', $this->customDealerAccountData, [], [], ['HTTP_REFERER' => '/dealer-account/edit']);\n \n // Verify\n $this->assertRedirectedTo('/dealer-account/edit');\n $this->assertSessionHasErrors();\n }", "public function testUpdate()\n {\n $this->actingAs(User::factory()->make());\n $task = new Task();\n $task->title = 'refined_task';\n $task->completed = false;\n $task->save();\n\n $response = $this->put('/tasks/' . $task->id);\n\n $updated = Task::where('title', '=', 'refined_task')->first();\n\n $response->assertStatus(200);\n $this->assertEquals(true, $updated->completed);\n }", "public function testSaveUpdate()\n {\n $user = User::findOne(1002);\n $version = Version::findOne(1001);\n\n $this->specify('Error update attempt', function () use ($user, $version) {\n $data = [\n 'scenario' => VersionForm::SCENARIO_UPDATE,\n 'title' => 'Some very long title...Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam dignissim, lorem in bibendum.',\n 'type' => Version::TYPE_TABLET,\n 'subtype' => 31,\n 'retinaScale' => false,\n 'autoScale' => 'invalid_value',\n ];\n $model = new VersionForm($user, $data);\n\n $result = $model->save($version);\n $version->refresh();\n\n verify('Model should not succeed', $result)->null();\n verify('Model should have errors', $model->errors)->notEmpty();\n verify('Title error message should be set', $model->errors)->hasKey('title');\n verify('ProjectId error message should not be set', $model->errors)->hasntKey('projectId');\n verify('Type error message should not be set', $model->errors)->hasntKey('type');\n verify('Subtype error message should be set', $model->errors)->hasKey('subtype');\n verify('AutoScale error message should be set', $model->errors)->hasKey('autoScale');\n verify('RetinaScale error message should not be set', $model->errors)->hasntKey('retinaScale');\n verify('Version title should not change', $version->title)->notEquals($data['title']);\n verify('Version type should not be changed', $version->type)->notEquals($data['type']);\n verify('Version subtype should not be changed', $version->subtype)->notEquals($data['subtype']);\n });\n\n $this->specify('Success update attempt', function () use ($user, $version) {\n $data = [\n 'scenario' => VersionForm::SCENARIO_UPDATE,\n 'projectId' => 1003, // should be ignored\n 'title' => 'My new test version title',\n 'type' => Version::TYPE_MOBILE,\n 'subtype' => 31,\n 'retinaScale' => true,\n 'autoScale' => true,\n ];\n $model = new VersionForm($user, $data);\n\n $result = $model->save($version);\n\n verify('Model should succeed and return an instance of Version', $result)->isInstanceOf(Version::className());\n verify('Model should not has any errors', $model->errors)->isEmpty();\n verify('The returned Version should be the same as the updated one', $result->id)->equals($version->id);\n verify('Version projectId should not change', $result->projectId)->notEquals($data['projectId']);\n verify('Version title should match', $result->title)->equals($data['title']);\n verify('Version type should match', $result->type)->equals($data['type']);\n verify('Version subtype should match', $result->subtype)->equals($data['subtype']);\n verify('Version scaleFactor should match', $result->scaleFactor)->equals(Version::AUTO_SCALE_FACTOR);\n });\n }", "public function update(Request $request, InterviewStatistic $interviewStatistic)\n {\n //\n }", "public function testUpdate()\n {\n $data = array(\n 'foo' => 'baz'\n );\n\n $transaction = $this->client->transaction()->Update(654, $data);\n\n $this->assertEquals($data, get_object_vars($transaction->put), 'Passed variables are not correct');\n $this->assertEquals('PUT', $transaction->request_method, 'The PHP Verb Is Incorrect');\n $this->assertEquals('/transactions/654', $transaction->path, 'The path is incorrect');\n\n }", "function newsslider_update_instance($newsslider) {\n global $DB, $CFG;\n\n $newsslider->intro = '\n <div id=\"newsslider\"></div>\n <script src=\"'.$CFG->wwwroot.'/mod/newsslider/ResizeSensor.js\"></script>\n <script>\n $.get(\"'.$CFG->wwwroot.'/mod/newsslider/newsslider_controller.php/?func=get_newsslider_html&cmid='.$newsslider->coursemodule.'\", (response) => {\n $(\"#newsslider\").append(response);\n })\n </script>\n ';\n $newsslider->timemodified = time();\n $newsslider->id = $newsslider->instance;\n\n $completiontimeexpected = !empty($newsslider->completionexpected) ? $newsslider->completionexpected : null;\n \\core_completion\\api::update_completion_date_event($newsslider->coursemodule, 'newsslider', $newsslider->id, $completiontimeexpected);\n\n return $DB->update_record(\"newsslider\", $newsslider);\n}", "function updateEvent(){\r\n\t\tif(!isset($_POST['submitted'])){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$formvars = array();\r\n\r\n\t\tif(!$this->ValidateUpdatedSubmission()){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$itemPicture = $this->upLoadPic();\r\n\t\tif($itemPicture != false){\r\n\t\t\t$formvars['Eflyer'] = $this->upLoadPic();\r\n\t\t}\r\n\t\t\t\t\r\n\t\t$picBanner = $this->upLoadBanner();\r\n\t\tif($picBanner != false){\r\n\t\t\t$formvars['Ebanner'] = $this->upLoadBanner();\r\n\t\t}\r\n\t\t\r\n\t\t$this->CollectUpdatedSubmission($formvars);\r\n\t\t\r\n\t\tif(!$this->updateEventInDatabase($formvars)){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "public function updated(VoteRate $voteRate)\n {\n //\n }", "public function updateSesi() {\n $this->authorize('admin-itd');\n\n $round_detail = Round::find(1);\n $minute = 1;\n\n // [RICKY] Update round\n $end_time = Carbon::now()->addMinutes($minute);\n $update_round = DB::table('rounds')->where('id', 1)->update(['action'=> true, 'time_end'=> $end_time]);\n\n // [RICKY] Pusher broadcast\n event(new UpdateRound($round_detail->round, true, $minute, null));\n return [\"success\" => true];\n }", "public function update($notification);", "public function test_if_failed_update()\n {\n }", "public function update(Request $request, Volunteer $volunteer)\n {\n //\n }", "public function update(Request $request, OfferedCourse $offeredCourse)\n {\n //\n }", "public function update()\n {\n foreach ($this->updates as list($url, $meetingPlace)) {\n try {\n $c = Page::getByPath(parse_url($url)['path']);\n $cp = new Permissions($c);\n\n // Only allow updates if this user can edit\n if ($cp->canEditPageProperties()) {\n $currentCollectionVersion = $c->getVersionObject();\n\n $map = json_decode($c->getAttribute('gmap'), true);\n\n // Check that we have a map marker\n if (!empty($map['markers'])) {\n $newCollectionVersion = $currentCollectionVersion->createNew('Updated via meetingplaceupdate script');\n $c->loadVersionObject($newCollectionVersion->getVersionID());\n // Set the first marker to the new meeting place\n $map['markers'][0]['title'] = $meetingPlace;\n $c->setAttribute('gmap', json_encode($map));\n\n $newCollectionVersion->approve();\n echo 'Updated walk ' . $url . ' to ' . $meetingPlace . PHP_EOL;\n } else {\n echo 'No map found for: ' . $url . PHP_EOL;\n }\n } else {\n throw new RuntimeException('Insufficient permissions to update');\n }\n } catch (Exception $e) {\n echo $e->getMessage() . ' URL: ' . $url . PHP_EOL;\n }\n }\n }", "function ras_submit_db () {\n\n\t\textract(doSlash(psa(array('poll_id', 'name', 'prompt', 'n0', 'n1', 'n2', 'n3', 'n4', 'n5', 'n6', 'n7', 'n8', 'n9' ,'step', 'event', 'selection'))));\n\t\t$where = \"id='\".$poll_id.\"'\";\n\t\t\n\t\tif($step == 'poll_response') {\n\t\t\t$stat = 'r'.substr($selection, -1);\n\t\t\t\t$current = safe_field( $stat ,'txp_poll' , $where);\n\t\t\t\t\t$newstat = $current + 1;\n\t\t\t\t\t$what = $stat.'='.$newstat;\n\t\t\t\tsafe_update('txp_poll', $what ,$where);\n\t\t}\n}", "public function update(Request $request, Evolution $evolution)\n {\n //\n }", "public function testRenderUpdateSuccess()\n {\n // Populate data\n $dealerAccountIDs = $this->_populate();\n \n // Set data\n $ID = $this->_pickRandomItem($dealerAccountIDs);\n $dealerAccount = $this->dealer_account->getOne($ID);\n \n // Request\n $this->withSession($this->adminSession)\n ->call('GET', '/dealer-account/edit', ['ID' => $ID]);\n \n // Verify\n $this->assertResponseOk();\n $this->assertViewHas('dealer_account', $dealerAccount);\n $this->assertViewHas('dataBranch');\n $this->assertPageContain('Edit Dealer Account');\n }" ]
[ "0.67058426", "0.6567143", "0.6510409", "0.5973442", "0.59719884", "0.5864462", "0.5863904", "0.58290815", "0.57604766", "0.5751709", "0.57137495", "0.5650021", "0.5637855", "0.56267464", "0.5623237", "0.56209123", "0.56080276", "0.5605678", "0.55975664", "0.5576203", "0.5551467", "0.5509922", "0.5509922", "0.5488691", "0.5475772", "0.5468532", "0.54536563", "0.54182446", "0.5393446", "0.5366652", "0.5348787", "0.53429765", "0.53277826", "0.53268456", "0.53054017", "0.52860904", "0.5275172", "0.52699995", "0.5262814", "0.52597195", "0.52569604", "0.5244376", "0.52441615", "0.5236868", "0.5233618", "0.5222365", "0.52167284", "0.5176631", "0.51741827", "0.5169476", "0.5162027", "0.515589", "0.5153823", "0.5150731", "0.5150012", "0.5135403", "0.5123658", "0.5123211", "0.51201445", "0.511967", "0.5119335", "0.5111207", "0.510776", "0.5095193", "0.50934863", "0.50934863", "0.5079204", "0.50670236", "0.5064149", "0.5061944", "0.5061869", "0.50536567", "0.50507855", "0.50445074", "0.50445074", "0.5036651", "0.5035207", "0.5031075", "0.5024137", "0.5024137", "0.5023978", "0.50232285", "0.5022882", "0.5022171", "0.5016855", "0.50146097", "0.5011837", "0.500729", "0.5004417", "0.4998465", "0.49934125", "0.4991326", "0.49904877", "0.49815264", "0.49763954", "0.49689358", "0.4964828", "0.49639747", "0.4949637", "0.49484253" ]
0.79205805
0
Test case for webinarPolls List a Webinar's Polls.
Тест-кейс для вебинараPolls Перечисление опросов вебинара.
public function testWebinarPolls() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testListPastWebinarPollResults()\n {\n }", "public function testGetAllPolls()\n {\n Passport::actingAs(\n factory(\"App\\User\")->create(),\n ['*']\n );\n $polls= factory(\"App\\Poll\",5)->create();\n $response = $this->get('/polls');\n $response->assertStatus(200);\n $response->assertJson($polls->toArray());\n }", "public function testWebinarPollGet()\n {\n }", "public function testWebinarPanelists()\n {\n }", "public function testListPastWebinarQA()\n {\n }", "public function polls() {\n\t\tSiteController::loggedInCheck();\n\n\t\t//Get polls associated with the current group\n\t\t$groupId = $_POST['groupId'];\n\t\t$group = Group::loadById($groupId);\n\t\t$polls = $group->getAllPolls();\n\n\t\tinclude_once SYSTEM_PATH.'/view/polls.tpl'; //TODO: make sure this is the correct tpl\n\t}", "public function getActivePolls() {\n $this->active = json_decode(file_get_contents(CONTENT.'polls'), TRUE);\n return $this->getPolls($this->active);\n }", "public function testWebinarPollCreate()\n {\n }", "public function testWebinarPanelistCreate()\n {\n }", "public function testWebinarPollUpdate()\n {\n }", "protected function reportWebinarPollsRequest($webinar_id)\n {\n // verify the required parameter 'webinar_id' is set\n if ($webinar_id === null || (is_array($webinar_id) && count($webinar_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $webinar_id when calling reportWebinarPolls'\n );\n }\n\n $resourcePath = '/report/webinars/{webinarId}/polls';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($webinar_id !== null) {\n $resourcePath = str_replace(\n '{' . 'webinarId' . '}',\n ObjectSerializer::toPathValue($webinar_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'application/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'application/xml'],\n ['application/json', 'multipart/form-data']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function showpollsAction()\n {\n $polls = $this->getDoctrine()->getRepository('PollPollBundle:PollImpl')->findAll();\n return $this->render('PollPollBundle:Poll:show_polls.html.twig', array(\"polls\" => array_reverse($polls)));\n }", "public function getsAListOfPlans()\n {\n // Arrange\n // Act\n $plans = Ezypay::getPlans();\n\n // Assert\n //$this->assertEquals(3, sizeof($plans->data)); // Causing issues as there are aditional plans\n $this->assertNotNull($plans);\n\n $this->plans = $plans;\n }", "public function getAllPolls()\n {\n $pollz = $this->em\n ->getRepository('NkgPollBundle:Poll')\n ->findAll();\n\n return $pollz;\n }", "public function testListPastWebinarFiles()\n {\n }", "public function list(Request $request): \\Illuminate\\Http\\Resources\\Json\\AnonymousResourceCollection\n {\n $this->authorize('list', Poll::class);\n\n $this->validate($request, [\n 'page' => 'numeric',\n 'perPage' => 'numeric',\n 'with' => 'array',\n 'sort' => 'array',\n ]);\n\n $page = (int)$request->get('page', 1);\n $perPage = (int)$request->get('perPage', 10);\n\n $query = Poll::whereOwnerId($request->user()->id);\n\n if ($request->has('with')) {\n if (in_array('emailsList', $request->get('with', []))) {\n $query->with('emailsList');\n }\n }\n\n if ($request->has('sort')) {\n foreach ($request->get('sort') as $key => $direction) {\n $query->orderBy(Str::snake($key), $direction);\n }\n }\n\n $list = $query->paginate($perPage, ['*'], 'page', $page);\n\n return PollResource::collection($list->items())\n ->additional(['pagination' => [\n 'page' => $page,\n 'perPage' => $list->perPage(),\n 'lastPage' => $list->lastPage(),\n 'total' => $list->total(),\n ]]);\n }", "public function index()\n {\n //$polls = $this->poll->all();\n\n return view('iquiz::admin.polls.index', compact(''));\n }", "public function testWebinar()\n {\n }", "public function testWebinarStatus()\n {\n }", "public function testListingWithFilters()\n {\n $filters[] = ['limit' => 30, 'page' => 30];\n $filters[] = ['listing_type' => 'public'];\n foreach ($filters as $k => $v) {\n $client = static::createClient();\n $client->request('GET', '/v2/story', $v, [], $this->headers);\n $this->assertStatusCode(200, $client);\n\n $response = json_decode($client->getResponse()->getContent(), true);\n $this->assertTrue(is_array($response));\n }\n }", "public function test_list()\n {\n $response = $this->get('/proposal/all');\n\n $response->assertSee('data-js-proposal-cards');\n\n $response->assertSee('card-header');\n\n $response->assertStatus(200);\n }", "function list_polls($id = NULL) {\n global $course_id, $course_code, $urlServer, $langPollNone, $langQuestionnaire, $langChoice;\n\n $ret_string = '';\n $result = Database::get()->queryArray(\"SELECT * FROM poll WHERE course_id = ?d AND active = 1\", $course_id);\n $pollinfo = array();\n foreach ($result as $row) {\n $pollinfo[] = array(\n 'id' => $row->pid,\n 'title' => $row->name,\n 'active' => $row->active);\n }\n if (count($pollinfo) == 0) {\n $ret_string .= \"<div class='col-12 mt-3'><div class='alert alert-warning'>$langPollNone</div></div>\";\n } else {\n $exist_poll = array();\n\n if (!is_null($id)) { //find existing resources (edit case)\n $post_res = Database::get()->queryArray(\"SELECT * FROM wall_post_resources WHERE post_id = ?d AND type = ?s\", $id, 'poll');\n foreach ($post_res as $exist_res) {\n $exist_poll[] = $exist_res->res_id;\n }\n }\n\n $ret_string .= \"<div class='table-responsive'><table class='table-default'>\" .\n \"<tr class='list-header'>\" .\n \"<th class='text-start'>&nbsp;$langQuestionnaire</th>\" .\n \"<th style='width:20px;' class='text-center'>$langChoice</th>\" .\n \"</tr>\";\n foreach ($pollinfo as $entry) {\n $checked = '';\n if (in_array($entry['id'], $exist_poll)) {\n $checked = 'checked';\n }\n\n $ret_string .= \"<tr>\";\n $ret_string .= \"<td>&nbsp;\".icon('fa-question').\"&nbsp;&nbsp;<a href='{$urlServer}modules/questionnaire/pollresults.php?course=$course_code&amp;pid=$entry[id]'>\" . q($entry['title']) . \"</a></td>\";\n $ret_string .= \"<td class='text-center'><input type='checkbox' $checked name='poll[]' value='$entry[id]'></td>\";\n $ret_string .= \"</tr>\";\n }\n $ret_string .= \"</table></div>\";\n }\n return $ret_string;\n}", "public function displayAllMyPolls(){\r\n $allMyPolls = $this->model->myPolls($_SESSION['id']);\r\n\r\n // Display user's poll \r\n require ROOT.\"/App/View/AllMyPollsView.php\";\r\n \r\n }", "public function testWebinarAbsentees()\n {\n }", "public function testWebinarRegistrantsQuestionsGet()\n {\n }", "public function testSubscriptionsList()\n {\n }", "public function index()\n {\n return view('polls.pollsList', [\n 'polls' => Poll::select('*')\n ->orderBy('created_at', 'desc')->get()\n ]); \n }", "public function index()\n {\n $tests = $this->getAllTests();\n return view('poll.index', ['tests' => $tests]);\n }", "public function test_list_all_offices_paginated() {\n Office::factory(3)->create();\n\n $response = $this->get('/api/offices');\n\n $response->assertOk();\n\n // Assert the returned json data has 3 items - the ones we created above\n $response->assertJsonCount(3, 'data');\n\n // Assert atleast the ID of the first item is not null\n $this->assertNotNull($response->json('data')[0]['id']);\n\n // Assert there is meta for the paginated results. You can include links as well\n $this->assertNotNull($response->json('meta'));\n\n //dd($response->json());\n\n }", "public function getListing()\n {\n $user = Auth::user();\n $plans = Plan::all();\n $websites = Website::where('user_id', '=', $user->id)\n ->orderBy('created_at', 'desc')\n ->paginate(15);\n\n foreach ($websites as $website) {\n if (is_null($website->token)) {\n $clients = DB::table('oauth_clients')\n ->where('name', '=', $website->id)\n ->get();\n\n if (isset($clients[0])) {\n $website->oauth_id = $clients[0]->id;\n $website->secret_key = $clients[0]->secret;\n }\n }\n }\n\n $_plans_list = Plan::all();\n $plans_list = [];\n\n foreach ($_plans_list as $plan_list) {\n $plans_list[$plan_list->id] = $plan_list->plan;\n }\n\n return view('website.listing')\n ->with([\n 'user' => $user,\n 'websites' => $websites,\n 'plans' => $plans,\n '_plans_list' => $_plans_list,\n 'plans_list' => $plans_list\n ]);\n }", "public function individualPolls(Request $request, $unit = null)\n {\n try {\n if (!empty($unit)) {\n $pollingUnitResults = PollingUnit::where('id', $unit)->has('announcedpuresult')->with(['announcedpuresult'])->paginate($this->pages);\n } else {\n $pollingUnitResults = PollingUnit::has('announcedpuresult')->with(['announcedpuresult'])->paginate($this->pages);\n }\n return view('index', compact('pollingUnitResults'));\n } catch (\\Throwable $th) {\n logger($th);\n }\n }", "public function testWebinarPanelistsDelete()\n {\n }", "public function testWebinarPollDelete()\n {\n }", "public function getActivePolls()\n {\n $pollz = $this->em\n ->createQuery('SELECT p\n FROM NkgPollBundle:Poll p\n WHERE p.active = 1\n AND CURRENT_TIMESTAMP() BETWEEN p.startdate AND p.enddate\n ORDER BY p.enddate DESC');\n\n try {\n $res = $pollz->getResult();\n return $res;\n } catch (\\Doctrine\\ORM\\NoResultException $e) {\n return array();\n }\n }", "public function test119DisplayBookingListAfterClickOnEachLinkOfPagination()\n {\n $ssoData = $this->getSSOData();\n\n // current bookings\n $this->createBookings(20, date('Y-m-d'), 15);\n\n //$this->mockApi($data, 'empty_ok');\n\n $responseBefore = $this->ajax($this->getUrlByParams(['page' => 1, 'per_page' => 10]))->json();\n $responseAfter = $this->ajax($this->getUrlByParams(['page' => 2, 'per_page' => 10]))->json();\n\n $listBefore = $responseBefore['current_list'];\n $listAfter = $responseAfter['current_list'];\n\n $this->assertFalse($listBefore == $listAfter);\n }", "public function testWebinarRegistrants()\n {\n }", "public function polls_get($pollId = NULL){\n $this->load->model(\"poll\");\n\n if (isset($pollId)) {\n try {\n $poll = $this->poll->getPoll($pollId);\n $this->response($poll, 200);\n }catch (Exception $e){\n $this->response(array(\"errorMessage\"=>\"Poll does not exist!\"), 404);\n }\n } else{\n $polls = $this->poll->getPolls();\n $this->response($polls, 200);\n }\n }", "public function test_user_can_view_a_published_concert_listings()\n {\n // Arrange\n $concert = factory(Concert::class)->states('published')->create([\n 'date' => Carbon::parse('December 1, 2017 8:00pm'),\n ]);\n\n // Act\n $this->browse(function (Browser $browser) use ($concert) {\n // Assert\n $browser->visit(\"/concerts/{$concert->id}\")\n ->assertSee($concert->title)\n ->assertSee($concert->subtitle)\n ->assertSee('December 1, 2017')\n ->assertSee('8:00pm')\n ->assertSee('20.00')\n ->assertSee($concert->venue)\n ->assertSee($concert->venue_address)\n ->assertSee($concert->city)\n ->assertSee($concert->state)\n ->assertSee($concert->zip)\n ->assertSee($concert->additional_information);\n });\n }", "public function index()\n {\n $polls = $this->pollRepo->getAvailablePolls();\n\n return view('home', ['polls' => $polls]);\n }", "public function test_list_of_resource()\n {\n $response = $this->artisan('resource:list');\n $this->assertEquals(0, $response);\n }", "public function executeUserWebsitePracticeArea10(sfWebRequest $request)\n {\n $websiteId = $this->context->get('WebsiteId');\n $this->practiceAreaArr = WebsitePracticeAreaTable::getPracticeArea($websiteId);\n }", "public function testListSites()\n {\n }", "public function testUsePlenaryCourseView()\n {\n $this->session->usePlenaryCourseView();\n $courses = $this->session->getCoursesByIds(new phpkit_id_ArrayIdList(array(\n \t\t\t\t\t$this->physId,\n \t\t\t\t\t$this->geolId,\n \t\t\t\t\t$this->unknownId)));\n }", "protected function _getLists() {\n\t\t/** @var Thrive_Dash_Api_WebinarJamStudio $api */\n\t\t$api = $this->getApi();\n\t\ttry {\n\t\t\t$lists = array();\n\t\t\t$webinars = $api->getUpcomingWebinars();\n\t\t\tforeach ( $webinars as $key => $item ) {\n\t\t\t\t$lists [] = array(\n\t\t\t\t\t'id' => $item['webinar_id'],\n\t\t\t\t\t'name' => $item['name']\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn $lists;\n\t\t} catch ( Thrive_Dash_Api_WebinarJamStudio_Exception $e ) {\n\t\t\t$this->_error = $e->getMessage();\n\n\t\t\treturn false;\n\t\t}\n\n\t}", "public function testWebinarUpdate()\n {\n }", "public function testGetMessageListAppointments()\r\n\t{\r\n\t\t// Create an event to make sure we have at least one\r\n\t\t$obj = CAntObject::factory($this->dbh, \"calendar_event\", null, $this->user);\r\n\t\t$obj->setValue(\"name\", \"My Test Event\");\r\n\t\t$obj->setValue(\"ts_start\", date(\"m/d/Y\") . \" 12:00 PM\");\r\n\t\t$obj->setValue(\"ts_end\", date(\"m/d/Y\") . \" 01:00 PM\");\r\n\t\t$eid = $obj->save();\r\n\r\n\t\t// Get events\r\n\t\t$events = $this->backend->GetMessageList(\"calendar_root\", time()); // second param cuts off to today\r\n\t\t$found = false;\r\n\t\tforeach ($events as $evt)\r\n\t\t{\r\n\t\t\tif ($evt[\"id\"] == $eid)\r\n\t\t\t\t$found = true;\r\n\t\t}\r\n\t\t$this->assertTrue($found);\r\n\r\n\t\t// Cleanup\r\n\t\t$obj->removeHard();\r\n\t}", "public function testSubscriptionsListByType()\n {\n }", "public function testListEnrollmentRequests()\n {\n }", "public function index()\n {\n $poll = Poll::all();\n $polls = Poll::orderBy('created_at', 'DESC')->first();\n $polls = $polls->id + 1;\n return view('admin.poll.index',compact('poll', 'polls'))->with('i');\n }", "public function getPlayLists();", "public function index()\n {\n return response()->json(Poll::paginate(1), 200);\n }", "function GetWebPanelList()\n\t{\n\t\t$result = $this->sendRequest(\"GetWebPanelList\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "function displayPolls() {\r\n\tglobal $db, $t, $site;\r\n\r\n\tif ( !$uid )\r\n\t\t$uid = '0';\r\n\r\n\t//print_r( $_SESSION );\r\n\r\n\t$group = $_SESSION['es_auth']['group_id'];\r\n\r\n\t$activePolls = $db->getAll( 'select * from ' . POLLS_TABLE . \" where site_key = '$site' and active = '1'\" );\r\n\r\n\t//print_r( $activePolls );\r\n\r\n\t// for each available active poll, check to see if it has been displayed to the users\r\n\r\n\t$newActivePolls = array();\r\n\r\n\t$userip = $_SERVER['REMOTE_ADDR'];\r\n\r\n\tforeach( $activePolls as $index => $row ) {\r\n\r\n\t\t// check user authentication to view this poll\r\n\r\n\t\tif ( ( $_SESSION['es_auth']['group_id'] > 0 && $row[group_id] == 'auth' )\r\n\t\t\t|| $_SESSION['es_auth']['group_id'] == $row[group_id]\r\n\t\t\t|| $row[group_id] == 'all' ) {\r\n\r\n\t\t\t$pollViewed = $db->getOne( 'select id from ' . POLLRESULTS_TABLE . \" where poll_id = '$row[id]' and site_key = '$site' and user_ip = '$userip'\" );\r\n\r\n\r\n\t\t\tif ( !$pollViewed ) {\r\n\t\t\t\t$newActivePolls [] = $row;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t//print_r( $newActivePolls );\r\n\r\n\t// poll popup code will be displayed in default.tpl\r\n\t$t->assign( 'activePolls', $newActivePolls );\r\n}", "public function testWebinarPanelistDelete()\n {\n }", "public function _testMultipleInventories()\n {\n\n }", "public function executeUserWebsitePracticeArea11(sfWebRequest $request)\n {\n $websiteId = $this->context->get('WebsiteId');\n $this->practiceAreaArr = WebsitePracticeAreaTable::getPracticeArea($websiteId);\n }", "public function executeUserWebsitePracticeArea18(sfWebRequest $request)\n {\n $websiteId = $this->context->get('WebsiteId');\n $this->practiceAreaArr = WebsitePracticeAreaTable::getPracticeArea($websiteId);\n }", "public function test_list_players()\n {\n $players = $this->postScriptumServer->listPlayers();\n\n $this->assertCount(77, $players);\n }", "public function testEventsList()\n {\n $response = $this->get('/events');\n\n $response->assertStatus(200);\n }", "public function executeUserWebsitePracticeArea9(sfWebRequest $request)\n {\n $websiteId = $this->context->get('WebsiteId');\n $this->practiceAreaArr = WebsitePracticeAreaTable::getPracticeArea($websiteId);\n }", "public function testWebinarCreate()\n {\n }", "public function test_list_players()\n {\n $players = $this->btwServer->listPlayers();\n\n $this->assertCount(77, $players);\n }", "public function testGetStudentTakesCourseList()\n {\n $response = $this->loginAsRole(Role::ADMIN)\n ->get($this->url('student-courses'));\n\n $response->assertStatus(200);\n\n $response->assertJsonStructure([\n 'data' => [\n [\n 'student_id',\n 'staff_teach_course_id'\n ]\n ]\n ]);\n }", "public function testListTasks()\n {\n $this->withoutMiddleware();\n $get = $this->json('GET','/api/v1/tasks');\n $this->assertResponseOk();\n $response = json_decode($get->response->getContent(), true);\n $this->assertNotNull($response, 'Test if is a valid json');\n $this->assertTrue(json_last_error() == JSON_ERROR_NONE, 'Test if the response was ok');\n $this->assertCount(0,$response, 'Test if query count is zero');\n //Test for a non empty list\n $tasks = factory(Task::class,2)->create();\n $get = $this->json('GET', 'api/v1/tasks');\n $this->assertResponseOk();\n $response = json_decode($get->response->getContent(), true);\n $this->assertNotNull($response, 'Test if is a valid json');\n $this->assertTrue(json_last_error() == JSON_ERROR_NONE, 'Test if the response was ok');\n $this->assertCount(2, $response, 'Test if query count is 2');\n\n $tasks->each(function($item, $key) use ($response){\n $this->assertObjectEqualsExclude($item,$response[$key]);\n });\n }", "function managePollsPage() {\n include(plugin_dir_path(__FILE__) . '/add-poll.php');\n}", "public function testGetAll()\n {\n $ret =\\App\\Providers\\ListsServiceProvider::getLists();\n \n $this->assertNotEmpty($ret);\n }", "function getUpcomingWebinars()\n {\n $path = $this->getPathRelativeToOrganizer('upcomingWebinars');\n\n return $this->sendRequest('GET', $path, $parameters = null, $payload = null);\n }", "public function testListUserEnrollments()\n {\n }", "private static function removeAllTestingWebinars(): void\n {\n foreach (self::$driverHandler->getWebinars() as $webinar) {\n if (str_starts_with($webinar->slug, 'test-')) {\n self::$driverHandler->removeWebinar($webinar->id);\n }\n }\n }", "function testPowerpackList()\n {\n $request = new PlivoRequest(\n 'GET',\n 'Account/MAXXXXXXXXXXXXXXXXXX/Powerpack/',\n []);\n $body = file_get_contents(__DIR__ . '/../Mocks/powerpackListResponse.json');\n\n $this->mock(new PlivoResponse($request,200, $body));\n\n $actual = $this->client->powerpacks->list();\n\n $this->assertRequest($request);\n\n self::assertNotNull($actual);\n }", "public function index()\n {\n $polls = Poll::select('users.name', 'polls.id', 'polls.deadline', 'polls.description', 'polls.title')->join('users', 'users.id', '=', 'polls.created_by')->get();\n $pollUsers = Poll::select('users.name', 'polls.id', 'polls.deadline', 'polls.description', 'polls.title')->join('users', 'users.id', '=', 'polls.created_by')->where('deadline', '>', date('Y-m-d H:i:s'))->get();\n\n return view('vote.index', compact('polls', 'pollUsers'));\n }", "public function guest_can_get_all_websites() {\n $response = $this->get('api/websites');\n $response->assertStatus(200);\n }", "public function getArchivedPolls() {\n $this->old = json_decode(file_get_contents(CONTENT.'polls-archive'), TRUE);\n return $this->getPolls($this->old);\n }", "public function testGetParliamentaryCandidateWithVoteCast()\n {\n $pollingStation = $this->em->getRepository('VtallyBundle:PollingStation')->find(1);\n $candidates = $pollingStation->getParliamentaryCandidateWithVoteCast();\n $this->assertEquals($candidates[0]->getFirstName(), 'Jhon');\n $this->assertEquals($candidates[0]->getVoteCast(), 100);\n $this->assertEquals($candidates[1]->getFirstName(), 'Jannette');\n $this->assertEquals($candidates[1]->getVoteCast(), 280);\n $this->assertEquals($candidates[2]->getFirstName(), 'Sondra');\n $this->assertEquals($candidates[2]->getVoteCast(), 98);\n $this->assertEquals($candidates[3]->getFirstName(), 'Fadde');\n $this->assertEquals($candidates[3]->getVoteCast(), 0);\n $this->assertEquals($candidates[4]->getFirstName(), 'Vivien');\n $this->assertEquals($candidates[4]->getVoteCast(), 100);\n $this->assertEquals($candidates[5]->getFirstName(), 'Joella');\n $this->assertEquals($candidates[5]->getVoteCast(), 7);\n $this->assertEquals($candidates[6]->getFirstName(), 'Adde');\n $this->assertEquals($candidates[6]->getVoteCast(), 2);\n }", "public function testGetListWithTLTokenAndPromotorMeta()\n {\n // Populate data\n $tlID = $this->_populateTL();\n $dealerID = $this->_populateDealer();\n $dealerAccountID = $this->_populateDealerAccount();\n $branchID = $this->_populateBranch();\n $newsID = $this->_populateNews();\n $dealerNewsID = $this->_populateDealerNews();\n $promtorMetaID = $this->_populatePromotorMeta();\n\n // Create token\n $token = str_random(5);\n $encryptedToken = $this->token->encode($tlID, $token);\n \n $params = [\n 'token' => $encryptedToken \n ];\n\n // Do request\n $response = $this->call('GET', '/api/1.5.0/news-list', $params);\n $result = json_decode($response->getContent(), true);\n\n // Verify\n $this->assertTrue(array_key_exists('result', $result));\n }", "public function testListPeople()\n {\n }", "public function run()\n {\n $poll = new Poll();\n $poll->title = \"This is a simple poll from admin panel\";\n $poll->slug = \"this-is-a-simple-poll-from-admin-panel\";\n $poll->status = 1;\n $poll->start_date = \"2020-06-14\";\n $poll->end_date = \"2020-06-15\";\n $poll->total_yes = 5;\n $poll->total_no = 2;\n $poll->total_no_comment = 1;\n $poll->save();\n\n $poll = new Poll();\n $poll->title = \"This is another poll from admin panel\";\n $poll->slug = \"this-is-another-poll-from-admin-panel\";\n $poll->status = 0;\n $poll->start_date = \"2020-06-15\";\n $poll->end_date = \"2020-06-16\";\n $poll->total_yes = 7;\n $poll->total_no = 11;\n $poll->total_no_comment = 3;\n $poll->save();\n }", "public function testShowAllIncidences()\n {\n //1. Preparar el test\n //2. Executar el codi que vull provar.\n //3. Comprovo: assert\n\n $incidences = factory(Incidence::class, 50) -> create();\n\n\n $response = $this->get('/incidences');\n $response->assertStatus(200);\n $response->assertSuccessful();\n $response->assertViewIs('list_events');\n\n\n //TODO faltaria contar que hi ha 50 al resultat\n\n// foreach ( $incidences as $incidence) {\n// $response->assertSeeText($incidence->title);\n// $response->assertSeeText($incidence->description);\n// }\n }", "public function playlists()\n\t{\n\t\treturn $this->CLI->arrayQuery(\"alarm playlists\");\n\t}", "public function executeUserWebsitePracticeArea19(sfWebRequest $request)\n {\n $websiteId = $this->context->get('WebsiteId');\n $this->practiceAreaArr = WebsitePracticeAreaTable::getPracticeArea($websiteId);\n }", "public function index()\n {\n $polls=Polls::where('delflag',0)\n ->orderBy('id','desc')\n ->paginate(15);\n //var_dump($polls->currentPage());\n return view('admin.polls.index')->withPolls($polls);\n }", "public function testPeopleListsList()\n {\n $r = self::$f1->get('/v1/people/lists.json');\n $this->assertEquals('200', $r['http_code'] );\n $this->assertNotEmpty($r['body'], \"No Response Body\");\n return $r['body']['peopleLists'];\n }", "function citrixonline_get_webinar($webinarKey) \n {\n\t\tif(!$this->organizer_key or !$this->access_token)\n\t\t\treturn 0;\n\t\t\t\n\t\t$return_array = array();\n\n\t\t$reponse = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/\".$webinarKey.\"?oauth_token=\".$this->access_token), true);\n\t\t\n\t\tif(isset($reponse['int_err_code']) and $reponse['int_err_code'] != '')\n\t\t{\n\t\t\t$this->set_access_token('');\n\t\t\t$this->set_organizer_key('');\t\t\t\t\n\t\t\tthrow new Exception($reponse['int_err_code']);\n\t\t}\n\t\t\n\t\treturn $reponse;\n\t}", "public function testList()\n {\n $this->visit('/admin/school')\n ->see(SchoolCrudController::SINGLE_NAME);\n }", "public function executeUserWebsitePracticeArea1(sfWebRequest $request)\n {\n $websiteId = $this->context->get('WebsiteId');\n $this->practiceAreaArr = WebsitePracticeAreaTable::getPracticeArea($websiteId);\n }", "public function testListProduk()\n {\n $response = $this->getJson('/produk', [\n ]);\n $response->dump();\n $response->assertStatus(200);\n }", "public function testGetWaiverTemplates()\n {\n $numTemplates = 3;\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::templates($numTemplates));\n\n $templates = $sw->getWaiverTemplates();\n\n $this->assertCount($numTemplates, $templates);\n foreach($templates as $template) {\n $this->assertInstanceOf(SmartwaiverTemplate::class, $template);\n }\n\n $this->checkGetRequests($container, ['/v4/templates']);\n }", "public function testGetWaiverTemplates()\n {\n $numTemplates = 3;\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::templates($numTemplates));\n\n $templates = $sw->getWaiverTemplates();\n\n $this->assertCount($numTemplates, $templates);\n foreach($templates as $template) {\n $this->assertInstanceOf(SmartwaiverTemplate::class, $template);\n }\n\n $this->checkGetRequests($container, ['/v4/templates']);\n }", "public function testGamesList()\n {\n Passport::actingAs(\n factory(User::class)->create(),\n ['create-servers']\n );\n factory(Stream::class)->create([\n 'game_id' => 1,\n 'viewers_count' => 3,\n ]);\n\n factory(Stream::class)->create([\n 'game_id' => 1,\n 'viewers_count' => 5,\n ]);\n\n factory(Stream::class)->create([\n 'game_id' => 2,\n ]);\n\n factory(Stream::class)->create([\n 'game_id' => 3,\n ]);\n\n // Exact game\n $response = $this->get('/streams/games?games[]=1');\n\n $response->assertStatus(200);\n $response->assertJsonCount(1, 'data');\n $data = json_decode($response->getContent(), true);\n $this->assertEquals(8, $data['data'][0]['viewers_count']);\n\n // List of games\n $response = $this->get('/streams/games?games[]=1&games[]=2');\n\n $response->assertStatus(200);\n $response->assertJsonCount(2, 'data');\n\n // All games\n $response = $this->get('/streams/games');\n\n $response->assertStatus(200);\n $response->assertJsonCount(3, 'data');\n }", "public function test_that_authorized_user_can_view_courses_within_other_periods()\n {\n \n }", "public function reportWebinarPolls($webinar_id)\n {\n list($response) = $this->reportWebinarPollsWithHttpInfo($webinar_id);\n return $response;\n }", "public function testWebinarRegistrantGet()\n {\n }", "public function testList()\n {\n //Tests all products\n $this->clientAuthenticated->request('GET', '/product/list');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('productId', $first);\n\n //Tests all products linked to a child\n $this->clientAuthenticated->request('GET', '/product/list/child/1');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('productId', $first);\n }", "public function testList()\n {\n //Tests list by date\n $this->clientAuthenticated->request('GET', '/transaction/list/2019-03-06');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n\n //Tests list by month\n $this->clientAuthenticated->request('GET', '/transaction/list/2019-03');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n\n //Tests list by date and status\n $this->clientAuthenticated->request('GET', '/transaction/list/2019-03-06/payed');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n\n //Tests list by month and status\n $this->clientAuthenticated->request('GET', '/transaction/list/2019-03/payed');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n\n //Tests list by year and status\n $this->clientAuthenticated->request('GET', '/transaction/list/2019/payed');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n\n //Tests list by date and person\n $this->clientAuthenticated->request('GET', '/transaction/list/2019-03-06/1');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n\n //Tests list by month and person\n $this->clientAuthenticated->request('GET', '/transaction/list/2019-03/1');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n\n //Tests list by year and person\n $this->clientAuthenticated->request('GET', '/transaction/list/2019/1');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n\n //Tests list by status and person\n $this->clientAuthenticated->request('GET', '/transaction/list/payed/1');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('transactionId', $first);\n }", "public function executeUserWebsitePracticeArea20(sfWebRequest $request)\n {\n $websiteId = $this->context->get('WebsiteId');\n $this->practiceAreaArr = WebsitePracticeAreaTable::getPracticeArea($websiteId);\n }", "public function testListExperts()\n {\n }", "public function testAction()\n {\n if ($this->identity()) {\n $summoners = $this->account()->getSummoners();\n $summoner = $summoners[0];\n $response = $this->getServiceLocator()->get('youtube_service')->findByQuery(\"league of legends\", null, 20, \"this_week\");\n $videos = $response->getVideos(true);\n foreach ($videos as $video) {\n echo $video->getScore() . '<br />';\n }\n # $feeds = $this->getServiceLocator()->get('feed_service')->getLolProFeeds(array(\"Ahri\",\"Aatrox\",\"Jayce\"));\n return new ViewModel();\n } else {\n return $this->notFoundAction();\n }\n }", "public function index()\n {\n // $poling = new polling_unit();\n $pol = $this->get_polling_list();\n\n return view('pollingunit', [\n 'pollingList' => $pol\n ]);\n }", "public function testServiceCanPollAds()\n {\n $this->advertiserA->pollAds();\n $data = $this->mockResponseA()['hotels'];\n $orgTax = $data[0]['rooms'][0]['taxes'];\n $hotels = Hotels::with('rooms','rooms.taxes')->get();\n $dbtax = $hotels[0]->rooms[0]->taxes[0];\n $this->assertEquals(count($data), $hotels->count());\n $this->assertEquals(count($data[0]['rooms']), $hotels[0]->rooms->count());\n $this->assertEquals($orgTax['amount'], $dbtax->amount);\n $this->assertEquals($orgTax['currency'], $dbtax->currency);\n $this->assertEquals($orgTax['type'], $dbtax->type);\n }", "public function executeUserWebsitePracticeArea8(sfWebRequest $request)\n {\n $websiteId = $this->context->get('WebsiteId');\n $this->practiceAreaArr = WebsitePracticeAreaTable::getPracticeArea($websiteId);\n }" ]
[ "0.7220611", "0.67623955", "0.64286876", "0.6334028", "0.61761254", "0.5999231", "0.58641374", "0.58622104", "0.5815001", "0.5744109", "0.562562", "0.5541564", "0.5434194", "0.54106075", "0.5409291", "0.5376", "0.53354937", "0.53315526", "0.53140426", "0.53073347", "0.52871454", "0.52156824", "0.5198359", "0.51890326", "0.51649815", "0.5155491", "0.5105315", "0.50998294", "0.50601804", "0.50566334", "0.50236034", "0.49969158", "0.4991219", "0.49861944", "0.4959799", "0.49578345", "0.49518174", "0.4944321", "0.49409977", "0.4913001", "0.49085778", "0.48947123", "0.48848644", "0.48726907", "0.48698643", "0.4847245", "0.48371384", "0.48147735", "0.4810734", "0.48070383", "0.47997457", "0.4798519", "0.47901976", "0.478838", "0.47867352", "0.4786381", "0.47767872", "0.47694233", "0.47690728", "0.47639975", "0.47599638", "0.47595826", "0.47462985", "0.47317675", "0.47248626", "0.47229853", "0.47168824", "0.4714799", "0.47146618", "0.47078952", "0.4707687", "0.4703845", "0.4697161", "0.46967807", "0.46908256", "0.46864805", "0.46815598", "0.4679764", "0.46780655", "0.46674827", "0.466666", "0.46663705", "0.4664855", "0.46562153", "0.46551868", "0.465223", "0.46390495", "0.46390495", "0.46390143", "0.46377257", "0.46365988", "0.46362773", "0.46348578", "0.46342963", "0.46325943", "0.4619627", "0.46151432", "0.46131828", "0.46123332", "0.460493" ]
0.7082206
1
Test case for webinarRegistrantCreate Add a Webinar Registrant.
Тест-кейс для webinarRegistrantCreate Добавление участника в вебинар.
public function testWebinarRegistrantCreate() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarRegistrants()\n {\n }", "function citrixonline_create_registrant_of_webinar($webinar_id=false, $data = array(), $all_fields_chk = false) \n {\n\t\tif($webinar_id and isset($data['first_name']) and isset($data['last_name']) and isset($data['email']))\n\t\t{\n\t\t\t$params = array();\n\t\t\t\n\t\t\t$fields = array(\n\t\t\t\t'firstName'=>$data['first_name'],\n\t\t\t\t'lastName'=>$data['last_name'],\n\t\t\t\t'email'=>$data['email'],\n );\n\t\t\t\n\t\t\t$params[CURLOPT_HTTPHEADER] = array('Accept: application/json', 'Content-Type: application/json', 'Authorization: OAuth oauth_token='.$this->access_token);\n\t\t\t$params[CURLOPT_POSTFIELDS] = json_encode($fields);\n\t\t\t\n\t\t\t$reponse = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/{$webinar_id}/registrants\", $params), true);\n\t\t\t\n\t\t\tif(isset($reponse['registrantKey']))\n\t\t\t\treturn $reponse;\n\t\t}\n\t\t\n\t\treturn false;\t\t\t\n\t}", "public function testWebinarRegistrantStatus()\n {\n }", "public function testWebinarRegistrantGet()\n {\n }", "public function onRegistrantCreated(MeetingRegistrantCreated $event) {\n\n $meetingId = (string)$event->getObject()['id'];\n\n $meeting = Meeting::whereZoomId($meetingId)->first();\n\n if(!empty($meeting)){\n\n $this->logEvent($event);\n try{\n $zoomRegistrant = new Registrant();\n $zoomRegistrant->create($event->getObject()['registrant']);\n\n $registrantModel = null;\n\n switch ($meeting->getSetting(ZoomMeeting::SETTINGS_KEY_REGISTRATION_TYPE)){\n case ZoomMeeting::SETTINGS_REGISTRATION_TYPE_ONCE_ALL_OCCURRENCES:\n case ZoomMeeting::SETTINGS_REGISTRATION_TYPE_ONCE_MANY_OCCURRENCES:\n $occurrences = isset($event->getObject()['occurrences']) ? $event->getObject()['occurrences'] : $meeting->occurrences;\n foreach($occurrences as $occurrence){\n $occurrenceId = is_array($occurrence) ? $occurrence['occurrence_id'] : $occurrence->occurrence_id;\n $this->saveRegistrant($zoomRegistrant, $meetingId, $occurrenceId);\n }\n break;\n case ZoomMeeting::SETTINGS_REGISTRATION_TYPE_ONCE_ONE_OCCURRENCES:\n $this->saveRegistrant($zoomRegistrant, $meetingId, $event->getObject()['occurrences'][0]['occurrence_id']);\n break;\n }\n\n $registrantModel = $this->getRegistrantFromEvent($event);\n\n event(new SendRegistrantConfirm($registrantModel));\n\n event(new SendNewRegistrant($registrantModel));\n\n $this->logFinishEvent();\n }catch (\\Exception $exception){\n $this->logFailedEvent($exception);\n }\n }else{\n $this->logNotFoundEvent();\n }\n\n }", "public function testWebinarCreate()\n {\n }", "public function testShouldGenerateARegistrationSuccessfully() {\n \n $entity = new Registration;\n $entity->source_id = $this->getSource()->id;\n $entity->registrant_id = $this->getRegistrant()->id;\n $entity->type = 'PLAYER' ;\n $entity->league = 'league';\n $entity->org_name = 'Oranization...';\n $entity->org_state = 'NY';\n $entity->season = '2017';\n $entity->external_id = 'myexternalid';\n $entity->right_to_market = true;\n $entity->team_gender = 'Male';\n $entity->team_name = 'A-Team';\n $entity->school_district = 'school district';\n $entity->school_state = 'school sate';\n $entity->first_name = 'Firt name';\n $entity->middle_name = 'Middle name';\n $entity->last_name = 'Last Name';\n $entity->email = 'mail@mail.com';\n $entity->gender = 'Male';\n $entity->city = 'California';\n $entity->zip_code = '234141234123';\n $entity->birth_date = '11/27/1984';\n $entity->phone_number = '1234567890';\n $entity->game_type = 'SOME';\n $entity->level = 'LEVEL';\n $entity->state = 'CALIFORNIA';\n $entity->address_first_line = 'An Address 1234';\n $entity->county = 'A county';\n\n $entity->save();\n $this->assertTrue(!is_null($entity->id));\n }", "protected function createRegistrant() {\n $registrant = $this->registrantFactory->createRegistrant([\n 'event' => $this->registration->getEvent(),\n ]);\n $registrant->setRegistration($this->registration);\n\n return $registrant;\n }", "public function test_new_user_can_register()\n {\n $this->RegisterRolesAndPermissions();\n// $this->withExceptionHandling();\n $response = $this->postJson(route('auth.register'), [\n 'name' => \"ehsan dastras\",\n 'email' => \"test1@gmail.com\",\n 'password' => \"12345678\",\n ]);\n\n $response->assertStatus(Response::HTTP_CREATED);\n }", "public function newparticipant(Request $request)\n {\n $this->validate($request, [\n 'val1' => 'required',\n 'val2' => 'required' \n\n ]);\n\n $reg = new EventRegistrations;\n $reg->name = \\Auth::user()->name;\n $reg->user_id = \\Auth::user()->id;\n $reg->event_id = $request->val4;\n $reg->email = $request->val2;\n $reg->allergies = $request->val3;\n $reg->save();\n\n \n return redirect()->action('EventsController@loggedindex');\n }", "public function sellerCanRegister()\n {\n $input = [\n 'username' => 'iniusername' . Str::random(3),\n 'fullname' => 'ini nama ' . Str::random(4),\n 'email' => 'ini_email' . Str::random(4) . '@gmail.com',\n 'password' => 'P@sswr0d!',\n 'sex' => 0\n ];\n $response = $this->post('/api/seller/register', $input);\n $response->assertStatus(200);\n }", "public function testNewUserRegistration()\n\t{\n\t $this->visit('/register')\n\t ->type('Taylor', 'name')\n\t ->type('luker@gmail.com', 'email')\n\t ->type('mytest', 'password')\n\t ->type('mytest', 'password_confirmation')\n\t ->press('Register');\n\t}", "public function accountant_create()\n\t{\n\t\t$data['name'] = html_escape($this->input->post('name'));\n\t\t$data['email'] = html_escape($this->input->post('email'));\n\t\t$data['password'] = sha1($this->input->post('password'));\n\t\t$data['phone'] = html_escape($this->input->post('phone'));\n\t\t$data['gender'] = html_escape($this->input->post('gender'));\n\t\t$data['blood_group'] = html_escape($this->input->post('blood_group'));\n\t\t$data['address'] = html_escape($this->input->post('address'));\n\t\t$data['school_id'] = $this->school_id;\n\t\t$data['role'] = 'accountant';\n\t\t$data['watch_history'] = '[]';\n\n\t\t$duplication_status = $this->check_duplication('on_create', $data['email']);\n\t\tif($duplication_status){\n\t\t\t$this->db->insert('users', $data);\n\n\t\t\t$response = array(\n\t\t\t\t'status' => true,\n\t\t\t\t'notification' => get_phrase('accountant_added_successfully')\n\t\t\t);\n\t\t}else{\n\t\t\t$response = array(\n\t\t\t\t'status' => false,\n\t\t\t\t'notification' => get_phrase('sorry_this_email_has_been_taken')\n\t\t\t);\n\t\t}\n\n\t\treturn json_encode($response);\n\t}", "public function test_is_new_user_can_register()\n {\n $data = factory('App\\User')->make();\n\n $this->post(route('register'), $data->toArray())\n ->assertRedirect(\"/\");\n }", "public function testRegister()\n {\n $crawler = $this->client->request('GET', '/cliente/');\n $crawler = $this->client->followRedirect();\n\n $this->assertTrue($this->client->getContainer()->get('security.context')->isGranted('IS_AUTHENTICATED_ANONYMOUSLY'));\n $this->assertEquals(200, $this->client->getResponse()->getStatusCode());\n $this->assertGreaterThan(0, $crawler->filter('html:contains(\"Acesse sua conta\")')->count());\n \n // validate form\n $form = $crawler->selectButton('Cadastrar')->form(array(\n 'marcoshoya_marquejogobundle_customer[username]' => '',\n ));\n \n $crawler = $this->client->submit($form);\n $this->assertGreaterThan(0, $crawler->filter('span:contains(\"Campo obrigatório\")')->count());\n \n $form = $crawler->selectButton('Cadastrar')->form(array(\n 'marcoshoya_marquejogobundle_customer[username]' => 'registertest@marquejogo.com',\n ));\n \n $this->client->submit($form);\n $crawler = $this->client->followRedirect();\n\n // Check data in the show view\n $this->assertGreaterThan(0, $crawler->filter('html:contains(\"Novo cadastro\")')->count());\n }", "public function testRegisterStudent()\n {\n $this->browse(function (Browser $browser){\n $browser->visit('/register')\n ->click('.slider__container')\n ->type('firstname', env('DUSK_NEW_FIRSTNAME'))\n ->type('lastname', env('DUSK_NEW_LASTNAME'))\n ->type('email', env('DUSK_NEW_USER_STUDENT'))\n ->type('verificateEmail', env('DUSK_NEW_USER_STUDENT'))\n ->type('password', env('DUSK_NEW_PASSWORD'))\n ->press('.button')\n ->assertPathIs('/');\n });\n }", "public function testSignUp()\n {\n $rand = rand();\n $this->visit('/register')\n ->type('ruchi', 'name')\n ->type('ruchi' .$rand.'@in.com', 'email')\n ->type('qwerty', 'password')\n ->type('qwerty', 'password_confirmation')\n ->press('Register')\n ->seePageIs('/');\n }", "public function test_passed_registration()\n {\n\n $user = $this->user();\n\n $response = $this->post('api/v1/register', $user);\n $response->assertStatus(200);\n $response->assertJsonMissing([\n \"status\"=>'Failed'\n ]);\n\n }", "public function register(Request $request)\n {\n\n //Validates data\n $this->validator($request->all())->validate();\n\n //Create instructor\n $instructor = $this->create($request->all());\n \n //Authenticates instructor\n $this->guard()->login($instructor);\n\n //Redirects instructors\n return redirect($this->redirectPath);\n }", "private function register()\n {\n $this->browser->visit('/admin')->pause(1000)\n ->assertPathIs('/admin/register')\n ->type('first_name', $this->faker->firstName)\n ->type('last_name', $this->faker->lastName)\n ->type('email', $this->email)\n ->type('password', $this->password)\n ->type('password_confirmation', $this->password)\n ->press('Register')\n ->assertPathIs('/admin');\n }", "public function create(RegistrationPostCreatedEvent $event): void\n {\n }", "public function testRegistrationUITest()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/add_user')\n ->assertSee('Username')\n ->assertSee('First Name')\n ->assertSee('Last Name')\n ->assertSee('Password')\n ->assertSee('Confirm Password')\n ->assertSee('Role')\n ->assertSee('Save');\n });\n }", "public function user_can_register_account_with_valid_details()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/register')\n ->assertSee('Register')\n ->type('name','keith')\n ->type('email','keith@test.com')\n ->type('password','secret')\n ->type('password_confirmation','secret')\n ->press('Register')\n ->assertpathIs('/home')\n ->assertDontSeeIn('nav', 'Login')\n ->assertDontSeeIn('nav', 'register')\n ;\n });\n }", "public function testShouldFailIFARegistrationIsCreatedWithoutRegistrant() {\n $this->expectException(\\PDOException::class);\n\n $entity = new Registration;\n $entity->source_id = $this->getSource()->id;\n $entity->type = 'PLAYER' ;\n $entity->league = 'league';\n $entity->org_name = 'Oranization...';\n $entity->org_state = 'NY';\n $entity->season = '2017';\n $entity->external_id = 'myexternalid';\n $entity->right_to_market = true;\n $entity->team_gender = 'Male';\n $entity->team_name = 'A-Team';\n $entity->school_district = 'school district';\n $entity->school_state = 'school sate';\n $entity->first_name = 'Firt name';\n $entity->middle_name = 'Middle name';\n $entity->last_name = 'Last Name';\n $entity->email = 'mail@mail.com';\n $entity->gender = 'Male';\n $entity->city = 'California';\n $entity->zip_code = '234141234123';\n $entity->birth_date = '11/27/1984';\n $entity->phone_number = '1234567890';\n $entity->game_type = 'SOME';\n $entity->level = 'LEVEL';\n $entity->state = 'CALIFORNIA';\n $entity->address_first_line = 'An Address 1234';\n $entity->county = 'A county';\n\n $entity->save();\n }", "public function testVolunteerHourCreateForContactSuccess_Administrator()\n {\n // Set test user as current authenticated user\n $this->be($this->administrator);\n \n $this->session([\n 'username' => $this->administrator->username, \n 'access_level' => $this->administrator->access_level\n ]);\n \n $volunteerID = 2;\n // Call route under test\n $response = $this->call('GET', 'volunteerhours/add/volunteer/'.$volunteerID);\n \n $this->assertContains('Volunteer Hours for', $response->getContent());\n }", "public function user_can_register_with_valid_details() :void\n {\n $this->browse(function (Browser $browser) {\n\n \t$user1= factory(User::class)->make();\n\n//\t\t\tdie($user1);\n $browser->visit('/')\n // ->click('#accountDropdown')\n ->clickLink('Account')\n\n ->waitFor('#nav-register')\n ->click('#nav-register')\n ->assertSee('Register');\n\n\t $this->submitForm($browser,\n\t\t [\n\t\t\t ['field_name'=>'first_name', 'field_value' =>$user1->first_name, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'last_name', 'field_value' =>$user1->last_name, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'username', 'field_value' =>$user1->username, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'email', 'field_value' =>$user1->email, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'password', 'field_value' =>$user1->password, 'field_type'=> 'password'],\n\t\t\t ['field_name'=>'password_confirmation', 'field_value' =>$user1->password, 'field_type'=> 'password']\n\t ]\n\t );\n $browser->assertpathIs('/restaurants')\n ->assertSeeIn('#accountName',$user1->username)\n ->assertDontSeeIn('nav', 'Login')\n ->assertDontSeeIn('nav', 'Sign Up')\n ->logout();\n });\n }", "public function testRegister()\n {\n $this->visit('/register')\n ->type('Test User', 'name')\n ->type('081233548738', 'phone')\n ->type('Tester', 'occupation')\n ->type('test@test.com', 'email')\n ->type(bcrypt('testing123'), 'password')\n ->press('Register')\n ->seeInDatabase('users', ['email' => 'bps.phi@gmail.com']);\n }", "public function testRegistrationIsSuccessfulWithValidInputs()\n {\n $this->output->writeln('Running testRegistrationIsSuccessfulWithValidInputs...');\n\n $this->browse(function ($browser) {\n $browser->visit('/register')\n ->type('name', 'John Smith')\n ->type('email', 'user@test.com')\n ->type('password', 'secret')\n ->type('password_confirmation', 'secret')\n ->press('Register')\n ->assertPathIs('/home');\n });\n }", "public function testApiRegistrationSimple()\n {\n $eventsFaker = Event::fake();\n $emailVerificationSend = Notification::fake();\n $uniqueData = $this->getTestRegisterData();\n $response = $this->withHeaders([ 'Authorization' => $this->getBearerClientToken() ])\n ->json('POST', $this->getRegisterRoute(), $uniqueData);\n\n $response->assertStatus(200)->assertJsonMissingValidationErrors();\n\n $responseArray = $response->decodeResponseJson()->json();\n $this->assertArrayNotHasKey('token_type', $responseArray);\n $this->assertArrayNotHasKey('expires_in', $responseArray);\n $this->assertArrayNotHasKey('access_token', $responseArray);\n $this->assertArrayNotHasKey('refresh_token', $responseArray);\n\n $user = CoreUser::byEmail($uniqueData[ 'email' ])->firstOrFail();\n $this->withoutExceptionHandling();\n\n if ( config('kit-auth.should_dispatch_registered_event') ) {\n $eventsFaker->assertDispatched(Registered::class,\n function (Registered $event) use ($emailVerificationSend) {\n app(ProcessEmailVerification::class)->handle($event);\n\n $emailVerificationSend->assertSentTo($event->user, VerifyEmail::class,\n function (VerifyEmail $notice) {\n $this->assertEquals($notice->requestSide, CoreUserContract::FRONTEND_REQUEST_SIDE);\n return $notice->tokens[ 'web' ] && $notice->tokens[ 'mobile' ];\n });\n\n return true;\n });\n } else {\n $eventsFaker->assertNotDispatched(Registered::class);\n }\n }", "public function testMemberRegistrationForm()\n {\n $response = $this\n ->get('/register-member')\n ->assertStatus(200);\n }", "public function testHandleCreateSuccess()\n {\n // Populate data\n $this->_populate();\n \n $response = $this->withSession($this->adminSession)\n ->call('POST', '/dealer-account/create', $this->customDealerAccountData, [], [], ['HTTP_REFERER' => '/dealer-account/create']);\n \n $this->assertRedirectedTo('/dealer-account');\n $this->assertSessionHas('dealer-account-created', '');\n }", "public function testMemberRegistrationHandler()\n {\n Mail::fake();\n\n // POST and check status code\n $response = $this\n ->followingRedirects()\n ->post('/register-member', $this->postData)\n ->assertStatus(200);\n\n // Check existence of member and user in DB\n $this->assertDatabaseHas('members', $this->memberData);\n $this->assertDatabaseHas('users', $this->userData);\n $this->assertDatabaseHas('event_member', [\n 'member_id' => \\App\\Models\\Member::latest()->first()->id,\n 'event_id' => $this->postData['selected_camp'],\n ]);\n Event::assertDispatched(MemberUpdated::class);\n }", "public function setRegistrant($value) {\n\t\tself::$_registrant = $value;\n\t}", "public function registrar(){\n\n /*parametros del metodo input:\n *nomnbre del campo,\n *si es requerido o no (true,false)\n *tipo del campo -actualmente valida (string,int,date,email)*/\n\n $nombre=$this->input('nombre',true,'string');\n\n $descripcion=$this->input('descripcion',true,'string');\n\n\n\n //si la validacion falla lo redirecciona a la vista donde esta los mensaje de error\n if($this->validateFails()){\n //este metodo REDIRECCIONA osea cambia de pagina, se le pasa a que controlador y que accion\n\n $this->redirect('Example','index');\n }else{\n\n $example=new Example();//no hace falta incluir el modelo ya esta incluido\n $example->setExampleParameters1($nombre);\n $example->setExampleParameters2($descripcion);\n $example->save();\n $this->redirect('Example','index');\n }\n }", "public function postRegister(Request $request)\n\t{\n\t\t$validator = $this->registrar->validator($request->all());\n\n\t\tif ($validator->fails())\n\t\t{\n\t\t\t$this->throwValidationException(\n\t\t\t\t$request, $validator\n\t\t\t);\n\t\t}\n\n\t\t$this->auth->login($this->registrar->create($request->all()));\n\n\t\t$user = Auth::user();\n\n\t\tRole::create(\n\t\t\t[\n\t\t\t\t'user_role' => 'applicant',\n\t\t\t\t'user_id' => $user->id\n\t\t\t]\n\t\t);\n\n\t\treturn Response::json(\n\t\t\t[\n\t\t\t\t'loggedIn' => true,\n\t\t\t\t'name' => $request->get('name'),\n\t\t\t\t'uid' => $request->get('uid'),\n\t\t\t\t'role' => 'applicant',\n\t\t\t\t'message' => 'Account successfully created'\n\t\t\t]\n\t\t);\n\t}", "public function createAction(\\Symfony\\Component\\HttpFoundation\\Request $request) {\n $entity = new CoolwayFestivales\\SafetyBundle\\Entity\\User();\n\n $plan = $request->get('plan');\n\n $form = $this->createForm(new CoolwayFestivales\\SafetyBundle\\Form\\UserType(), $entity);\n $form->bind($request);\n $em = $this->getDoctrine()->getManager();\n\n try {\n $entity->setEnabled(true);\n $role = $em->getRepository(\"SafetyBundle:Role\")->findOneByName(\"ROLE_CMS\");\n if (!$role) {\n $role = new CoolwayFestivales\\SafetyBundle\\Entity\\Role();\n $role->setDescription(\"User CMS\");\n $role->setName(\"ROLE_CMS\");\n $em->persist($role);\n $em->flush();\n }\n $entity->addRole($role);\n $em->persist($entity);\n $em->flush();\n\n// //logear al user\n// try {\n// $token = new \\Symfony\\Component\\Security\\Core\\Authentication\\Token\\UsernamePasswordToken($entity, $entity->getPassword(), 'usuarios', $entity->getRoles());\n// $this->container->get('security.context')->setToken($token);\n//\n// } catch (Exception $exc) {\n// echo $exc->getTraceAsString();\n// }\n\n $user_id = $entity->getId();\n return $this->redirect(\"https://subs.pinpayments.com/apptibase-test/subscribers/$user_id/subscribe/$plan/apptibase-user-$user_id\");\n } catch (\\Exception $exc) {\n return $this->render('AppBundle:Backend:register.html.twig', array(\n 'error' => $exc->getMessage(),\n 'plan' => \"\"\n ));\n }\n }", "public function testSignUp()\n {\n $user = factory(App\\User::class)->make();\n $response = $this->post('/users', [\n 'first_name' => $user->getAttributeValue('first_name'),\n 'last_name' => $user->getAttributeValue('last_name'),\n 'email' => $user->getAttributeValue('email'),\n 'password' => 'qwerty',\n 'password_confirmation' => 'qwerty',\n '_token' => csrf_token()\n ]);\n\n $this->seeJson([\n 'id' => Auth::id(),\n 'first_name' => $user->getAttributeValue('first_name'),\n 'last_name' => $user->getAttributeValue('last_name'),\n 'email' => $user->getAttributeValue('email'),\n 'created_at' => Auth::user()->created_at->format($this->date_format),\n 'updated_at' => Auth::user()->updated_at->format($this->date_format)\n ]);\n\n $user = Auth::user();\n $this->assertTrue($user->hasRole(config('entrust.default')));\n $this->assertResponseStatus(200);\n }", "public function testRegisterCompany()\n {\n $this->browse(function (Browser $browser){\n $browser->visit('/register')\n ->type('name', env('DUSK_NEW_NAME'))\n ->type('email', env('DUSK_NEW_USER'))\n ->type('verificateEmail', env('DUSK_NEW_USER'))\n ->type('password', env('DUSK_NEW_PASSWORD'))\n ->press('.button')\n ->assertPathIs('/');\n });\n }", "public function testSignUp()\n {\n //add new user\n $this->browse(function ($browser) {\n $browser->visit('user/signup')\n ->type('email', 'abc@abc.com')\n ->type('phone', '0775635458')\n ->type('name', 'ABC')\n ->type('password', '1234')\n ->type('passwordConfirm', '1234')\n ->click('.signup')\n ->assertPathIs('/');\n\n });\n }", "public function create()\n {\n // TODO: Algún parámetro para no permitir el registro.\n \n // Es ya un usuario?\n if (Core::isUser())\n {\n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('') . '\\';');\n return;\n }\n \n // Tenemos datos?\n if ($this->request->is('email'))\n {\n // Validamos los datos\n $form = Core::getLib('form.validator');\n $form->setRules(Core::getService('account.signup')->getValidation());\n \n // Si no hay errores procedemos a capturar los datos.\n if ($form->validate())\n {\n // Agregamos usuario\n if (Core::getService('account.process')->add($this->request->getRequest()))\n {\n if (Core::getParam('user.verify_email_at_signup'))\n {\n // Vamos a que verifique su email\n Core::getLib('session')->set('email', $this->request->get('email'));\n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('account.verify') . '\\';');\n }\n else\n {\n // Iniciamos sesión\n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('account.login') . '\\';');\n }\n \n return;\n }\n }\n }\n \n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('account.signup') . '\\';');\n }", "public function register($request)\n {\n \\Auth::user()->agent()->create([\n\n 'businessNumber' => $request->businessNumber,\n 'agentName' => $request->agentName,\n 'agentEmail' => $request->agentEmail,\n 'agentMobileNumber' => $request->agentMobileNumber,\n 'openingHourWeekDay' => $request->openingHourWeekDay,\n 'closingHourWeekDay' => $request->closingHourWeekDay,\n 'openingHourSaturday' => $request->openingHourSaturday,\n 'closingHourSaturday' => $request->closingHourWeekDay,\n 'openingHourSunday'=> $request->openingHourSunday,\n 'closingHourSunday'=> $request->openingHourSunday,\n\n ]);\n }", "public function register($name = null, $registrant = null) {\n return parent::register($name, $registrant);\n }", "public function testRegistration(): void { }", "public function test_create_request_registered_user() {\n\t\twp_delete_post( self::$request_id, true );\n\n\t\t$test_data = array(\n\t\t\t'test-data' => 'test value here',\n\t\t\t'test index' => 'more privacy data',\n\t\t);\n\n\t\t$actual = wp_create_user_request( self::$registered_user_email, 'export_personal_data', $test_data );\n\n\t\t$this->assertNotWPError( $actual );\n\n\t\t$post = get_post( $actual );\n\n\t\t$this->assertSame( self::$user_id, (int) $post->post_author );\n\t\t$this->assertSame( 'export_personal_data', $post->post_name );\n\t\t$this->assertSame( self::$registered_user_email, $post->post_title );\n\t\t$this->assertSame( 'request-pending', $post->post_status );\n\t\t$this->assertSame( 'user_request', $post->post_type );\n\t\t$this->assertSame( wp_json_encode( $test_data ), $post->post_content );\n\t}", "public function fb_register(Request $req){\n\t\t\t$userData = array(\n\t\t\t'fb_id' => $req->get('fb_id'),\n\t\t\t'fb_token' => $req->get('fb_token'),\n\t\t\t'uid' => $req->get('uid'),\n\t\t\t'username' => $req->get('username').rand(),\n\t\t\t'email' => $req->get('email'),\n\t\t\t'password' => $req->get('uid'),\n\t\t\t'referral' => $req->get('referral'),\n\t\t\t'role' => 0\n\t\t\t);\n\t\t\t\n\t\t\t$Crostutor = new Crostutor();\n\t\t\t$response = $Crostutor->register($userData);\n\t\t\t\n\t\t\tif(isset($response['status']) && $response['status'] == 0){\n\t\t\t\treturn response()->json(['status'=>\"0\",'message'=>\"Acount created Sucessfully\"]);\n\t\t\t\t}else{ \n\t\t\t\treturn response()->json(['status'=>\"101\",'message'=>$response['message']]);\n\t\t\t}\n\t\t\t\n\t\t}", "public function postRegister()\n {\n if ($this->request->is('post')) {\n $input = $this->request->getData();\n $validate = $this->Client->newEntity($input);\n\n if ($validate->errors()) {\n $this->set($validate->errors());\n } else {\n $this->Client->insert($input);\n $this->Flash->success('Sign up success');\n }\n $this->register();\n }\n }", "public function actionCreate()\n {\n $model = new WebinarCreateRequest();\n\n if ($model->load(Yii::$app->request->post()) ) {\n $model->status = Status::STATUS_NEW;\n $model->created_at = gmdate('Y-m-d H:i:s');\n $model->updated_at = gmdate('Y-m-d H:i:s');\n $model->created_by = $model->author_name;\n $model->updated_by = $model->author_name;\n $user = $model->author_name;\n $model->save();\n\n if($this->sendActivationLink($model->id, $model->email, $user)) {\n return $this->render('create', [\n 'model' => $model, \n 'status' => 'success', 'id' => $model->id]);\n }\n \n //return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function testIntegrationCreate()\n {\n $this->visit('user/create')\n ->see('Create New Account');\n $this->assertResponseOk();\n $this->assertViewHas('model');\n }", "public function testUserRegister()\n {\n //Voter user registration testing\n $this->browse(function (Browser $voter,$photographer,$organizer) {\n $voter->visit('/')\n ->clickLink('Register')\n ->assertSee('User Registration')\n ->value('#name','VoterTesting')\n ->value('#email','votertesting@gmail.com')\n ->value('#address','University of Moratuwa')\n ->Value('#telephone','0716485403')\n ->Value('#password','123456789')\n ->value('#password-confirm','123456789')\n ->click('.checker')\n ->check('condition')\n ->click('button[type=\"submit\"]')\n ->assertSee('LensView Timeline')\n ->clickLink('View Profile')\n ->assertTitle('LensView | User Profile')\n ->click('#deleteButton')\n ->value('input[type=\"password\"]','123456789')\n ->click('.btn-red');\n\n //Photographer user registration testing\n $photographer->visit('/')\n ->clickLink('Register')\n ->assertSee('User Registration')\n ->value('#name','PhotographerTesting')\n ->value('#email','photographertesting@gmail.com')\n ->value('#address','University of Moratuwa')\n ->Value('#telephone','0716485403')\n ->click('.role2')\n ->Value('#password','123456789')\n ->value('#password-confirm','123456789')\n ->click('.checker')\n ->check('condition')\n ->click('button[type=\"submit\"]')\n ->assertSee(\"Photographer Dashboard\")\n ->clickLink('View Profile')\n ->assertTitle('LensView | User Profile')\n ->click('#deleteButton')\n ->value('input[type=\"password\"]','123456789')\n ->click('.btn-red');\n \n\n // Contest Organizer registration testing\n $organizer->visit('/')\n ->clickLink('Register')\n ->assertSee('User Registration')\n ->value('#name','OrganizerTesting')\n ->value('#email','organizertesting@gmail.com')\n ->value('#address','University of Moratuwa')\n ->Value('#telephone','0716485403')\n ->click('.role3')\n ->Value('#password','123456789')\n ->value('#password-confirm','123456789')\n ->click('.checker')\n ->check('condition')\n ->click('button[type=\"submit\"]')\n ->assertSee(\"Organizer Dashboard\")\n ->clickLink('View Profile')\n ->assertTitle('LensView | User Profile')\n ->click('#deleteButton')\n ->value('input[type=\"password\"]','123456789')\n ->click('.btn-red');\n });\n}", "public function testNewPersonsOwnershipExistingCustomers() {\n $this->addProductToCart($this->product);\n $this->goToCheckout();\n $this->assertCheckoutProgressStep('Event registration');\n\n // Save first registrant.\n $this->clickLink('Add registrant');\n $this->submitForm([\n 'person[field_name][0][value]' => 'Person 1',\n 'person[field_email][0][value]' => 'person1@example.com',\n 'field_comments[0][value]' => 'No commments',\n ], 'Save');\n\n // Assert that this person profile is now owned by the current logged in\n // user.\n $person = Profile::load(1);\n // Assert that we are checking the expected person.\n $this->assertEquals('Person 1', $person->field_name->value);\n $this->assertEquals($this->adminUser->id(), $person->getOwnerId());\n }", "public function testRegisterSucessful() {\n\t\t$data = $this->getUserData(\n\t\t\t$this->username,\n\t\t\t$this->first_name,\n\t\t\t$this->surname,\n\t\t\t$this->email\n\t\t);\n\t\t\n\t\t$response = $this->call('POST','v1/users', $data);\n\t\t$resp_data = $response->getData();\n\t\tvar_dump($resp_data);\n\t\t$this->assertResponseStatus(201);\n\t\t$this->assertEquals($resp_data->user->username, $this->username);\n\t\t$this->assertEquals($resp_data->user->first_name, $this->first_name);\n\t\t$this->assertEquals($resp_data->user->surname, $this->surname);\n\t\t$this->assertEquals($resp_data->user->email, $this->email);\n\t}", "function invite_workshop_attendees_create(){\n\t\t$this->content_data['uri'] = base_url('workshops/invite/register');\n $this->content_data['get_dropdown_all_titles'] = _get_dropdown_all_titles();\t\t\n\t\t$this->content_data['submit_button'] = lang('invite_').lang('attendee');\t\t\t\t\n\t\t$this->panel_title = 'ADD WORKSHOP ATTENDEES';\n\t\t$this->add_external_css(array(\"/themes/core/css/bootstrap-datetimepicker.css\"));\n\t\t$this->add_external_js(array(\"/themes/core/js/date-time-picker/moment.js\", \"/themes/core/js/date-time-picker/transition.js\", \"/themes/core/js/date-time-picker/collapse.js\", \"/themes/core/js/date-time-picker/bootstrap-datetimepicker.js\", \"/themes/core/js/views/training/workshops/workshops.js\"));\n\t\t$this->data = $this->includes;\t\t\n\t\t$this->content_data['workshopId'] = $this->id;\n\t\t$this->data['content'] = $this->load->view('training/workshops/workshop_attendees_add', $this->content_data, true);\n \t $this->load->view($this->template, $this->data);\n }", "function ciniki_fatt_offeringRegistrationAdd(&$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 'customer_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Customer'),\n 'student_id'=>array('required'=>'no', 'blank'=>'no', 'name'=>'Student'),\n 'customer_notes'=>array('required'=>'no', 'blank'=>'yes', 'default'=>'', 'name'=>'Customer Notes'), \n 'notes'=>array('required'=>'no', 'blank'=>'yes', 'default'=>'', 'name'=>'Notes'), \n 'test_results'=>array('required'=>'no', 'blank'=>'no', 'name'=>'Test Results'), \n )); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n $args = $rc['args'];\n \n // \n // Make sure this module is activated, and\n // check permission to run this function for this tenant\n // \n ciniki_core_loadMethod($ciniki, 'ciniki', 'fatt', 'private', 'checkAccess');\n $rc = ciniki_fatt_checkAccess($ciniki, $args['tnid'], 'ciniki.fatt.offeringRegistrationAdd'); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n\n //\n // Create the invoice\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'sapos', 'public', 'invoiceAdd');\n $rc = ciniki_sapos_invoiceAdd($ciniki);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $invoice = $rc['invoice'];\n\n //\n // Get the registration_id, should be the first one we just created this invoice\n //\n if( !isset($invoice['items']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.fatt.3', 'msg'=>'Internal error creating invoice'));\n }\n\n foreach($invoice['items'] as $item) {\n if( $item['object'] == 'ciniki.fatt.offeringregistration' ) {\n $registration_id = $item['object_id'];\n }\n }\n\n if( !isset($registration_id) || $registration_id === NULL || $registration_id == 0 ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.fatt.4', 'msg'=>'Internal error creating invoice'));\n }\n\n //\n // Update the student_id for the registration\n //\n if( isset($args['student_id']) && $args['student_id'] != $args['customer_id'] ) {\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectUpdate');\n $rc = ciniki_core_objectUpdate($ciniki, $args['tnid'], 'ciniki.fatt.offeringregistration', $registration_id, array('student_id'=>$args['student_id']), 0x04);\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.fatt.5', 'msg'=>'Unable to update student', 'err'=>$rc['err']));\n }\n }\n \n //\n // Get the registration\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'fatt', 'private', 'registrationLoad');\n return ciniki_fatt_registrationLoad($ciniki, $args['tnid'], $registration_id); \n}", "public function getRegistrant();", "public function testWebinarPollCreate()\n {\n }", "public function startWebAuthnRegistration($request)\n {\n return $this->start()->uri(\"/api/webauthn/register/start\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "public function register_post() \n {\n $first_name = $this->post('fname');\n $last_name = $this->post('lname');\n $username = $this->post('username');\n $email = $this->post('email');\n $password = $this->post('password');\n $dob = $this->post('dob');\n $contact_no = $this->post('contact_no');\n $gender = $this->post('gender');\n $address = $this->post('address');\n $user_type = 2;//Member user\n $status = 1;//Active\n $added_date = time();\n if($first_name != '' && $last_name != '' && $username != '' && $email != '' && $password != '' && $dob != '' && $gender != '' && $address != '')\n {\n $userData = array('fname'=>$first_name,'lname'=>$last_name,'username'=>$username,'status'=>$status,\n 'email'=>$email,'password'=>$password,'dob'=>$dob,'contact_no'=>$contact_no,'address'=>$address,\n 'user_type'=>$user_type,'gender'=>$gender,'added_date'=>$added_date);\n \n $record = $this->artists_model->register_member($userData);\n $message = [\n 'status' => TRUE, \n 'message' => 'Registered successfully',\n 'status_code'=> 200\n ];\n $this->set_response($message, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code\n }\n else\n {\n $message = [\n 'status' => FALSE,\n 'message' => 'Not register,please enter required fields properly',\n 'status_code'=> 400\n ];\n $this->set_response($message, REST_Controller::HTTP_BAD_REQUEST); \n \n }\n }", "public function test_register()\n {\n $faker = Factory::create();\n // User's data\n $user = [\n 'email' => $faker->email,\n 'name' => $faker->name,\n 'password' => 'password',\n ];\n // Send post request\n $response = $this->json('POST', route('api.register'), $user);\n // Assert it was successful\n $response->assertStatus(200)->json(['successfully register test user!']);\n }", "public function testSuccessfulRegistration(){\n \t/*\n \t * Create a user for registration\n \t */\n \t$clearpass = str_random(10);\n \t$user = factory(App\\User::class)->make([\n \t\t\t'password' => bcrypt($clearpass)\n \t]);\n \t\n \t/*\n \t * Visit the Registration page and confirm a user can successfully create an account\n \t */\n \t$this->visit('/register')\n \t->see('E-Mail Address')\n \t->type($user->name, 'name')\n \t->type($user->email, 'email')\n \t->type($clearpass, 'password')\n \t->type($clearpass, 'password_confirmation')\n \t->press('Register') \t\n \t->see('You are logged in!');\n \t\n \t$this->assertFalse(App\\User::where('name', $user->name)->get()->isEmpty());\n }", "public function setRegistrant($registrant = null)\n {\n $this->registrant = $registrant;\n\n return $this;\n }", "public function testRegisterUser()\n {\n $this->withoutExceptionHandling();\n $user = [\n 'email' => 'test@test.com',\n 'password' => 'test1234',\n ];\n $response = $this->postJson('/api/register', $user);\n $response->assertStatus(201)->assertJsonFragment([\n 'email' => 'test@test.com',\n ]);\n }", "public function getRegistrant()\n {\n return $this->registrant;\n }", "public function addAction(Request $request){\r\n \t$factory = $this->get('services.institution.factory');\r\n \t$institution = $factory->createInstance(); \t\n \t$institutionUser = new InstitutionUser();\n \t\n \t$this->get('services.contact_detail')->initializeContactDetails($institutionUser, array(ContactDetailTypes::PHONE, ContactDetailTypes::MOBILE));\r\n \t\r\n \t$form = $this->createForm(new InstitutionUserSignUpFormType(), $institutionUser, array('include_terms_agreement' => false));\r\n\t \tif ($request->isMethod('POST')) {\n\t \t\t$form->bind($request);\r\n\t \t\t \r\n\t \t\tif ($form->isValid()) {\r\n\t \t\t $postData = $request->get('institutionUserSignUp');\n\t \t\t $institutionUser = $form->getData();\n\t \t\t\t// initialize required database fields\n\t \t\t $institution->setName(uniqid());\r\n\t \t\t\t$institution->setAddress1('');\r\n\t \t\t\t$institution->setContactEmail('');\r\n\t \t\t\t$institution->setContactNumber('');\n\t \t\t\t$institution->setDescription('');\r\n\t \t\t\t$institution->setLogo(null);\n\t \t\t\t$institution->setCoordinates('');\n\t \t\t\t$institution->setType(trim($postData['type'])); /* FIX ME! */\n\t \t\t\t$institution->setWebsites('');\r\n\t \t\t\t$institution->setStatus(InstitutionStatus::getBitValueForInactiveStatus());\r\n\t \t\t\t$institution->setZipCode('');\n\t \t\t\t$institution->setSignupStepStatus(0);\n\n\t \t\t\t// Temporary Code to mark a newly added institution as added internally.\n\t \t\t\t// Added By: Adelbert Silla\n\t \t\t\t$institution->setIsFromInternalAdmin(1);\n\t \t\t\t\n\t \t\t\t\n\t \t\t\t$factory->save($institution);\r\n\t \t\t\t \r\n\t \t\t\t// create Institution user\r\n\t \t\t\t$institutionUser = new InstitutionUser();\r\n\t \t\t\t$institutionUser->setEmail($form->get('email')->getData());\r\n\t \t\t\t$institutionUser->setFirstName($institution->getName());\r\n\t \t\t\t$institutionUser->setLastName('Admin');\r\n\t \t\t\t$institutionUser->setPassword(SecurityHelper::hash_sha256($form->get('password')->getData()));\r\n\t \t\t\t$institutionUser->setInstitution($institution);\r\n\t \t\t\t$institutionUser->setStatus(SiteUser::STATUS_ACTIVE);\r\n\t \t\t\t$this->get('services.contact_detail')->removeInvalidContactDetails($institutionUser);\n// var_dump($institutionUser->getContactDetails()); exit;\r\n\t \t\t\t// dispatch event\r\n\t \t\t\t$this->get('event_dispatcher')->dispatch(InstitutionBundleEvents::ON_ADD_INSTITUTION,\r\n\t \t\t\t\t\t\t\t$this->get('events.factory')->create(InstitutionBundleEvents::ON_ADD_INSTITUTION,$institution,array('institutionUser' => $institutionUser)\r\n \t\t\t\t\t\t\t));\r\n\t \t\n\t \t\t\treturn $this->redirect($this->generateUrl('admin_institution_add_details', array('institutionId' => $institution->getId())));\r\n\t \t\t}\n\t \t\telse {\n\t \t\t \n\t \t\t}\n\t \t}\n\t \t\n \treturn $this->render('AdminBundle:Institution:add.html.twig', array(\r\n \t\t\t\t\t'form' => $form->createView(),\r\n \t\t\t\t\t'institutionTypes' => InstitutionTypes::getFormChoices(),\r\n \t));\r\n }", "public function create()\r\n {\r\n app('antares.asset')->container('antares/installer')->add('validator_min', 'public/packages/core/js/validator.min.js');\r\n set_meta('title', 'Create Administrator');\r\n return $this->processor->create($this);\r\n }", "public function postEventRegister() {\n\n $data = $this->request->all();\n $this->eventRegistar->create($data);\n return json_encode(array('status' => 200, 'message' => 'Saved successfuly'));\n }", "public function test_user_can_register()\n {\n $this->withoutExceptionHandling();\n\n $user = [\n 'name' => 'John Doe',\n 'email' => 'john@doe.com',\n 'password' => 'password',\n 'password_confirmation' => 'password',\n ];\n\n $response = $this->post('/api/register/', $user);\n\n $response->assertStatus(200);\n $response->assertStatus(Response::HTTP_OK);\n $this->assertDatabaseHas('users', ['email' => 'john@doe.com']);\n }", "public function testCanDisplayTheAssessorRegistrationForm()\n {\n $response = $this->get('/assessors/register');\n\n $response->assertStatus(200);\n\n $response->assertViewIs('auth.register');\n }", "public function test_admin_can_create_user()\n {\n // $this->withoutExceptionHandling();\n $this->actingAs($this->adminUser())\n ->post(route('users.store'), [\n 'name' => 'Faustino Vasquez'\n ])->assertRedirect('admin/users/faustino-vasquez/edit');\n }", "public function registrar()\n\t{\n\t\t$estado = new Estado();\n\t\t$estado->nombre = $_POST['nombre'];\n\t\t$estado->poblacion_hombres = $_POST['poblacionH'];\n\t\t$estado->poblacion_mujeres = $_POST['poblacionM'];\n\t\t$estado->poblacion_total = $_POST['poblacionT'];\n\t\t$estado->edad_promedio = $_POST['edadP'];\n\t\t$estado->create();\n\t\t//redireccionamos con un header location a la vista de agregarEstado\n\t\theader(\"location: index.php?controller=Direccion&action=agregarEstado\");\n\t}", "public function createAction()\r\n\t{\r\n\t\t$form = $this->createForm(new RegistrationType(), new Registration());\r\n\t\t$form->bindRequest($this->getRequest());\r\n\r\n\t\tif($form->isValid())\r\n\t\t{\r\n\t\t\t$registration = $form->getData();\r\n\r\n\t\t\t$user = $registration->getUser();\r\n\t\t\t$employee = $registration->getEmployee();\r\n\r\n\t\t\t$employee->setUser($user);\r\n\r\n\t\t\t$em = $this->getDoctrine()->getEntityManager();\r\n\t\t\t$em->persist($user);\r\n\t\t\t$em->persist($employee);\r\n\t\t\t$em->flush();\r\n\t\t}\r\n\r\n\t\treturn array('form'=>$form->createView());\r\n\t}", "protected function register(Request $request)\n { \n \n $user= User::create([\n \n 'f_name' => $request->f_name,\n 'l_name' => $request->l_name,\n 'u_name' => str_slug($request->f_name.$request->l_name),\n 'p_number' => $request->p_number,\n 'email' => $request->email,\n 'password' => Hash::make($request->password),\n 'street_address' => $request->street_address,\n 'Division_id' => $request->Divition_id,\n 'District_id' => $request->District_id,\n 'ip_address' => request()->ip(),\n 'remember_token' => str_random(50),\n 'status' => 0,\n\n ]);\n\n $user-> notify (new verifyreg ($user) );\n\n session()->flash('success','A Confirmation Email has sent to you.. please check and Confirma ');\n return redirect('/');\n }", "public function register_new() {\n\t\t$fields = array(\n\t\t\t'address1', 'address2', 'city', 'comment', 'country', 'email', 'fax_src', 'first_name',\n\t\t\t'gender', 'insertion', 'company_name', 'lang', 'last_name', 'middle_name', 'mobile_src',\n\t\t\t'phone_src', 'prefix', 'state', 'suffix', 'zip', 'tax_ex_number', 'timezone'/* , 'house_num', 'house_suff' */\n\t\t);\n\t\t$clean_data = $this->_fill_account_data($fields);\n\n\t\t$clean_data['password'] = $_POST['password'];\t## password may contain escapeable symbols\n\t\t$clean_data['fraud_check'] = 1;\n\t\t$clean_data['ip_address'] = $this->translator->getClientIp();\n\n\t\tinstall_error_handler(array('UserPerson', 'NewAccountsDenied', 'UserExtData', 'InvalidAccountStatus'), 'handle_register_new_account_error');\n\t\t$account_id = call('create_customer', $clean_data, 'HSPC/API/Account');\n\t\tif($account_id) {\n\t\t\t$this->error->add(MC_SUCCESS, 'YOU_BEEN_REGISTERED');\n\t\t\treturn $this->sign_in();\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function testRegistration()\n {\n $this->module->enableRegistration = false;\n\n $this->specify(\"we have register if registration disabled\", function () {\n $user = new User([\n 'email' => 'user@example.com',\n 'password' => 'password',\n 'name' => 'Tester',\n ]);\n expect(\"we can't register if registration disabled\", $user->register())->false();\n expect(\"we must see message about this\", $user->getErrors())->hasKey('registration');\n });\n\n $this->module->enableRegistration = true;\n $this->module->enableConfirmation = true;\n $this->module->registrationFields = [];\n $this->specify(\"we have register user by email\", function () {\n $user = new User([\n 'email' => 'user@example.com',\n ]);\n expect(\"we can register user by email only\", $user->register())->true();\n expect(\"user must have register date\", $user->registered_at)->notEmpty();\n expect(\"user must have status STATUS_CONFIRM\", $user->status)->equals(User::STATUS_CONFIRM);\n expect(\"we can get user profile\", Profile::findOne(['user_id' => $user->id]))->notNull();\n\n $this->tester->seeEmailIsSent();\n $message = $this->tester->grabLastSentEmail();\n expect(\"we must view confirmation email\", $message->getTo())->hasKey($user->email);\n expect(\"we must view confirmation email\", $message->getSubject())->contains('confirm');\n\n //register() on existing user throw \\RuntimeException\n $user->register();\n }, ['throws' => new \\RuntimeException]);\n\n $this->specify(\"we have register user with same email\", function () {\n $user = new User([\n 'email' => 'user@example.com',\n ]);\n expect(\"we can't create user with same email\", $user->register())->false();\n expect(\"we must see error message\", $user->getErrors())->hasKey('email');\n });\n\n $this->module->registrationFields = ['password'];\n $this->specify(\"we have register user by email with password\", function () {\n $pass = 'password';\n $user = new User([\n 'email' => 'user1@example.com',\n ]);\n expect(\"we can't register user without pass\", $user->register())->false();\n expect('we must see error in password', $user->getErrors())->hasKey('password');\n $user->password = $pass;\n expect(\"we can register user\", $user->register())->true();\n expect(\"`pass_hash` must match\", Yii::$app->security->validatePassword($pass, $user->pass_hash))->true();\n expect(\"we can get user profile\", Profile::findOne(['user_id' => $user->id]))->notNull();\n });\n\n $this->module->registrationFields = ['password', 'name'];\n $this->specify(\"we have register user with full data\", function () {\n $pass = 'password';\n $name = 'Tester';\n $user = new User([\n 'email' => 'user2@example.com',\n ]);\n expect(\"we can't register user without pass and name\", $user->register())->false();\n expect('we must see error in password', $user->getErrors())->hasKey('password');\n expect('we must see error in name', $user->getErrors())->hasKey('name');\n $user->password = $pass;\n $user->name = $name;\n expect(\"we can register user\", $user->register())->true();\n expect(\"`pass_hash` must match\", Yii::$app->security->validatePassword($pass, $user->pass_hash))->true();\n expect(\"we can get user profile\", Profile::findOne(['user_id' => $user->id]))->notNull();\n $user1 = User::findOne($user->id);\n expect(\"name must be set\", $user1->name)->equals($name);\n });\n\n $this->module->registrationFields = ['password', 'name', 'gender', 'birth'];\n $this->specify(\"we have register user with full data\", function () {\n $pass = 'password';\n $name = 'Tester';\n $gender = User::MALE;\n $birth = '2000-01-01';\n $user = new User([\n 'email' => 'user3@example.com',\n 'password' => $pass,\n 'name' => $name,\n ]);\n expect(\"we can register user without gender and birth\", $user->register())->true();\n\n $user = new User([\n 'email' => 'user4@example.com',\n 'password' => $pass,\n 'name' => $name,\n 'gender' => $gender,\n 'birth' => $birth,\n ]);\n expect(\"we can register user with full data\", $user->register())->true();\n $user1 = User::findOne($user->id);\n expect('we must see gender', $user1->gender)->equals($gender);\n expect('we must see birth', $user1->birth)->equals($birth);\n });\n\n $this->module->enableConfirmation = false;\n $this->module->registrationFields = [];\n $this->specify(\"we have register user without confirm email\", function () {\n $user = new User([\n 'email' => 'user5@example.com',\n ]);\n expect(\"we can register user\", $user->register())->true();\n expect(\"user must have status STATUS_ACTIVE\", $user->status)->equals(User::STATUS_ACTIVE);\n $this->tester->seeEmailIsSent();\n $message = $this->tester->grabLastSentEmail();\n expect(\"we must view registration email\", $message->getTo())->hasKey($user->email);\n expect(\"we must view registration email\", $message->getSubject())->contains('register');\n });\n }", "public function createAgency(Request $request) {\n //validate incoming request \n $this->validate($request, [\n 'agencyName' => 'required|string', \n 'agencyAdr' => 'required|string', \n 'agencyPhone' => 'required|string', \n 'agencyContact' => 'required|email',\n ]);\n\n try {\n \n $agency = new Agency;\n $agency->agencyName = $request->input('agencyName');\n $agency->agencyAdr = $request->input('agencyAdr');\n $agency->agencyPhone = $request->input('agencyPhone');\n $agency->agencyContact = $request->input('agencyContact');\n\n $agency->save();\n\n //return successful response\n return response()->json(['agency' => $agency, 'message' => 'CREATED'], 201);\n\n } catch (\\Exception $e) {\n //return error message\n return response()->json(['message' => 'Property Registration Failed!'], 409);\n }\n }", "protected function RegisterIfNew(){\n // Si el sitio es de acceso gratuito, no debe registrarse al usuario.\n // Luego debe autorizarse el acceso en el metodo Authorize\n $url = $this->getUrl();\n if ($url instanceof Url && $this->isWebsiteFree($url->host)){\n return;\n }\n\t\t\n\t\t// Crear la cuenta de usuarios nuevos\n // if (!DBHelper::is_user_registered($this->user)){\n // if (!(int)$this->data->mobile || \n // (int)($this->data->client_app_version) < AU_NEW_USER_MIN_VERSION_CODE){\n // // Force update\n // $this->url = Url::Parse(\"http://\". HTTP_HOST .\"/__www/new_user_update_required.php\");\n // }else{\n // DBHelper::createNewAccount($this->user, DIAS_PRUEBA);\n // }\n // }\n \n // No crear cuenta. En su lugar mostrar una pagina notificando\n // E:\\XAMPP\\htdocs\\__www\\no_registration_allowed.html\n \n if (!DBHelper::is_user_registered($this->user)){\n DBHelper::storeMailAddress($this->user);\n $this->url = Url::Parse(\"http://auroraml.com/__www/no_registration_allowed.html\");\n }\n }", "public function testDeveloperCreate()\n {\n $response = $this->get('/developer/create');\n $response->assertStatus(200);\n }", "public function testVolunteerHourCreateForProjectSuccess_Administrator()\n {\n // Set test user as current authenticated user\n $this->be($this->administrator);\n \n $this->session([\n 'username' => $this->administrator->username, \n 'access_level' => $this->administrator->access_level\n ]);\n \n $testProjectID = 1;\n // Call route under test\n $response = $this->call('GET', 'volunteerhours/add/project/'.$testProjectID);\n \n $this->assertContains('Volunteer Hours for', $response->getContent());\n }", "public function register($data, Form $form) {\n if($member = $this->addMember($form)) {\n if(!$this->RequireApproval && $this->EmailType != 'Validation' && !$this->AllowAdding) {\n $member->logIn();\n }\n\n if(isset($data['backURL'])){\n $this->redirect($data['backURL']);\n }\n\n if ($this->RegistrationRedirect) {\n if ($this->PostRegistrationTargetID) {\n $this->redirect($this->PostRegistrationTarget()->Link());\n return;\n }\n\n if ($sessionTarget = Session::get('MemberProfile.REDIRECT')) {\n Session::clear('MemberProfile.REDIRECT');\n if (Director::is_site_url($sessionTarget)) {\n $this->redirect($sessionTarget);\n return;\n }\n }\n }\n\n return $this->redirect($this->Link('afterregistration'));\n } else {\n return $this->redirectBack();\n }\n }", "public function test_it_creates_a_new_user()\n {\n $user = ['email' => 'me@andrewhook.uk', 'given_name' => 'Andrew', 'family_name' => 'Hook'];\n\n $this->json('POST', '/users', $user)\n ->seeJson($user);\n }", "public function testCanRegister()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/');\n $browser->assertSee('TicTacToe');\n $browser->clickLink('register');\n $browser->assertSee('Create your account');\n $browser->type('name', $name = $this->faker->name);\n $browser->type('email', $this->faker->email);\n $password = $this->faker->password;\n $browser->type('password', $password);\n $browser->type('password_confirmation', $password);\n $browser->press('Register')\n ->on(new Home)\n ->assertSee('Dashboard')\n ->assertSee($name . ', you have lost 0 times and won 0 times.');\n });\n }", "public function CreateUser (\\AcceptanceTester $I)\n {\n \n $I->amOnPage(signUpPage::$signUpURL);\n $I->wait('2'); //wait untill all JS scipts are loaded\n $I->fillField(signUpPage::$firstName, signUpPage::$testerName);\n $I->fillField(signUpPage::$lastName, signUpPage::$testerSurname);\n $I->fillField(signUpPage::$email, self::$uniqueEmail = \"check\" . rand(10, 99999) . \"@testBot.com\"); \n $I->fillField(signUpPage::$password, signUpPage::$testerPass);\n $I->fillField(signUpPage::$passConfirm, signUpPage::$testerPass);\n $I->scrollTo(signUpPage::$createUser);\n $I->click(signUpPage::$createUser);\n $I->seeElementInDOM(myAccount::$welcomeMessage);\n \n\n\n }", "function registerUser()\n {\n $DBA = new DatabaseInterface();\n $fields = array(0 => 'title', 1 => 'first_name', 2 => 'last_name', 3 => 'contacttelephone', 4 => 'contactemail', 5 => 'password', 6 => 'username', 7 => 'dob', 8 => 'house', 9 => 'street', 10 => 'town', 11 => 'county', 12 => 'pcode', 13 => 'optout', 14 => 'newsletter', 15 => 'auth_level', 16 => 'store_owner');\n $fieldvals = array(0 => $this->Title, 1 => $this->FirstName, 2 => $this->LastName, 3 => $this->ContactTelephone, 4 => $this->ContactEmail, 5 => $this->Password, 6 => $this->Username, 7 => $this->DOB, 8 => $this->House, 9 => $this->Street, 10 => $this->Town, 11 => $this->County, 12 => $this->PCode, 13 => $this->Optout, 14 => $this->NewsletterSubscriber, 15 => $this->AuthLevel, 16 => 1);\n $rs = $DBA->insertQuery(DBUSERTABLE, $fields, $fieldvals);\n if ($rs == 1)\n {\n $this->RegistrationSuccess = 1;\n }\n if (isset($this->PCode))\n {\n $this->geoLocate();\n }\n }", "function Register()\r\n\t{\r\n\t\tglobal $Site;\r\n\t\t//if all the details is valid save the user on data base\r\n\t\tif ($this->IsValid())\r\n\t\t{\r\n\t\t\t$MemberID = GetID(\"member\", \"MemberID\");//getting last MemberID +1 for adding one more user\r\n\t\t\t$DateAdded = date(\"Y-m-d H:i:s\");\r\n\t\t\t$DateUpdated = $DateAdded;\r\n\t\t\t$IsEnable = 1;\r\n\t\t\t$pass = base64_encode($this->Password);\r\n\t\t\t$SQL = \"insert into member (MemberID, ProfileType, FirstName, LastName, TelNo, Email, Password, IsActive, IsEnable, DateAdded, DateUpdated) values ($MemberID, 'user', '$this->FirstName', '$this->LastName', '$this->PhoneNumber', '$this->Email', '$pass', '1' , '$IsEnable', '$DateAdded', '$DateUpdated')\";\r\n\t\t\tGetRS($SQL);\r\n\t\t\t$_SESSION['SAWMemberID'] = $MemberID;//cookie- to not allow impersonation of another user PHP gives each customer ID\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\t\t\r\n\t}", "public function testAddConsent(): void\n\t{\n\t\t$request = $this->httpClient->post('ApprovalsRegister/Record', \\App\\Utils::merge(['json' => [\n\t\t\t'subject' => 'Text',\n\t\t\t'approvalsid' => self::$approvalId,\n\t\t\t'contactid' => self::$recordId,\n\t\t\t'approvals_register_type' => 'PLL_ACCEPTANCE',\n\t\t\t'approvals_register_status' => 'PLL_ACCEPTED',\n\t\t\t'registration_date' => date('Y-m-d H:i:s'),\n\t\t]], self::$requestOptions));\n\t\t$this->logs = $body = $request->getBody()->getContents();\n\t\t$response = \\App\\Json::decode($body);\n\t\tstatic::assertSame(200, $request->getStatusCode(), 'ApprovalsRegister/RecordAPI error: ' . PHP_EOL . $request->getReasonPhrase() . '|' . $body);\n\t\tstatic::assertSame(1, $response['status'], 'ApprovalsRegister/Record API error: ' . PHP_EOL . $request->getReasonPhrase() . '|' . $body);\n\t\tstatic::assertNotEmpty($response['result'], 'ApprovalsRegister/Record result is empty and should have at least one entry.');\n\t\tstatic::assertNotEmpty($response['result']['id'], 'ApprovalsRegister/Record record should not be empty');\n\t\tself::assertResponseBodyMatch($response, self::$schemaManager, '/webservice/ManageConsents/ApprovalsRegister/Record', 'post', 200);\n\t\t\\ApprovalsRegister_Module_Model::reloadApprovals(self::$recordId);\n\t}", "public function registerAction() {\n $request = $this->getRequest();\n $plan = $request->get('plan', '25139');\n $entity = new CoolwayFestivales\\SafetyBundle\\Entity\\User();\n $form = $this->createForm(new CoolwayFestivales\\SafetyBundle\\Form\\UserType(), $entity);\n\n return $this->render('AppBundle:Backend:register.html.twig', array(\n 'form' => $form->createView(),\n 'error' => false,\n 'plan' => $plan\n ));\n }", "public function testRegisterRecruiterForm()\n {\n $client = static::createClient();\n\n //Crawler object which can be used to select elements in the response,\n //click on links and submit forms.\n $crawler = $client->request('GET', '/recruiter/register');\n\n //Select the button with ID name\n $buttonCrawlerNode = $crawler->selectButton('submit');\n \n //Get form for override some form values and submit the corresponding form\n $form = $buttonCrawlerNode->form();\n $form = $buttonCrawlerNode->form([\n 'recruiter[firstName]' => 'Azerty',\n 'recruiter[lastName]' => 'Uiopqsd',\n 'recruiter[email]' => 'Azerty@Azerty.fr',\n 'recruiter[birthDay][year]' => 1984,\n 'recruiter[birthDay][month]'=> 2,\n 'recruiter[birthDay][day]'=> 1,\n 'recruiter[password][first]' => 'Azerty123',\n 'recruiter[password][second]' => 'Azerty123',\n 'recruiter[business]' => '01234567891011',\n 'recruiter[legalConditions]' => 1,\n ]);\n \n $client->submit($form);\n $this->assertResponseIsSuccessful();\n }", "public function test_student_can_be_created_with_new_guardian_info()\n {\n $user = User::factory()->create();\n $classroom = $this->generateTestClassroom();\n $studentInfo = $this->studentInfo($classroom);\n $guardianInfo = [\n 'guardian_title' => $this->faker->title,\n 'guardian_first_name' => $this->faker->firstName,\n 'guardian_last_name' => $this->faker->lastName,\n 'guardian_email' => $this->faker->email,\n 'guardian_phone' => $this->faker->e164PhoneNumber,\n 'guardian_occupation' => $this->faker->jobTitle,\n 'guardian_address' => $this->faker->address\n ];\n $studentInfo = array_merge($studentInfo, $guardianInfo);\n $response = $this->actingAs($user)->post('/store/student', $studentInfo);\n\n $response->assertStatus(302)->assertSessionHas('success')->assertSessionHasNoErrors();\n }", "public function registerAction()\n {\n Zend_Registry::set('SubCategory', SubCategory::USERREGISTER);\n \t$form = new User_Form_Register();\n $data = $this->_request->getPost();\n if(!$data){\n // Display empty form\n $this->view->registerForm = $form;\n return;\n }\n\n if (!$form->isValid($data) || $this->_request->getParam('emailFailure')) {\n // Display form with errors\n $this->view->registerForm = $form;\n $this->view->emailFailure = $this->_request->getParam('emailFailure', null);\n return;\n }\n\n // Parameters for email and user creation\n $params = array(\n User::COLUMN_USERNAME => $form->getValue(User::INPUT_USERNAME),\n User::COLUMN_PASSWORD => $form->getValue(User::INPUT_PASSWORD),\n User::COLUMN_EMAIL => $form->getValue(User::INPUT_EMAIL),\n //User::COLUMN_OPENID_IDENTITY => $form->getValue(User::INPUT_OPENID_IDENTITY),\n User::INPUT_AUTH_METHOD => $form->getValue(User::INPUT_AUTH_METHOD),\n );\n\n try{\n // Create user in database\n $user = $this->_createNewUser($params);\n $userId = $user->{User::COLUMN_USERID};\n\n $params['activationKey'] = $user->activationKey;\n $params['link'] = APP_URL.Globals::getRouter()->assemble(array(),'userconfirmation');\n $params['link'] .= '?'.User::COLUMN_USERID.\"=$userId&\".self::ACTIVATION_KEY_PARAMNAME.\"={$user->activationKey}\";\n $params['site'] = APP_NAME;\n } catch (Exception $e){\n \t$msg = \"Error while creating user and/or blog. \".$e->getMessage();\n Globals::getLogger()->registrationError($msg);\n \t$userId = null;\n }\n\n if($userId === null){\n // Redirect to error page in case of user creation failure\n $this->_helper->redirectToRoute('usererror',array('errorCode'=>User::CREATION_FAILURE));\n }\n\n try{\n // Send Email\n $emailStatus = $this->_helper->emailer()->sendEmail($params[User::COLUMN_EMAIL], $params);\n } catch (Exception $e) {\n $emailStatus = false;\n $msg = \"Email error 2 \".$e->getMessage();\n Globals::getLogger()->registrationError($msg);\n }\n\n if(!$emailStatus){\n // If there was en error sending the email, delete user row, and forward to current page\n $this->_cleanupUser($userId);\n $this->_forward('register', null, null, array('emailFailure'=>1));\n return;\n }\n\n // Success !\n $this->_savePendingUserIdentity($userId);\n $this->_helper->redirectToRoute('userpending');\n }", "public function created(Instructor $instructor)\n {\n if (count(request()->all()))\n {\n $role = Role::firstOrCreate(['name' => 'instructor'], ['name' => 'instructor']);\n $data = array_merge(\n request()->all(),\n [\n // 'status' => 'active'\n ]);\n $instructor->details()->create($data);\n $instructor->details->assignRole($role);\n \n event(new NewUserRegistered($instructor->details));\n }\n }", "function get_registrants_of_webinars($webinar_id=false) \n {\n\t\tif($webinar_id)\n\t\t{\n\t\t\tif(!$this->organizer_key or !$this->access_token)\n\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t$return_array = array();\n\t\t\t\n\t\t\t$return_array = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/{$webinar_id}/registrants?oauth_token=\".$this->access_token), true);\n\n\t\t\tif(isset($reponse['int_err_code']) and $reponse['int_err_code'] != '')\n\t\t\t{\n\t\t\t\t$this->set_access_token('');\n\t\t\t\t$this->set_organizer_key('');\t\t\t\t\n\t\t\t\tthrow new Exception($reponse['int_err_code']);\n\t\t\t}\n\t\t}\n\t\t\t\n return $return_array;\n\t}", "public function created(OnlineInviteRegister $onlineInviteRegister)\n {\n $courseName = OnlineCourse::find($onlineInviteRegister->course_id)->name;\n $student = ProfileView::find($onlineInviteRegister->user_id)->full_name;\n $action = 'Thêm mời ghi danh '.$student.' (khóa học online)';\n parent::saveHistory($onlineInviteRegister,'Insert',$action,$courseName, $onlineInviteRegister->course_id,app(OnlineCourse::class)->getTable());\n }", "public function store(ANimal_RegistrationRequest $request)\n {\n Animal_Registration::create($request->all());\n return redirect('animal_registration');\n }", "public function user_signup_new(Request $request)\n {\n $request->validate([\n 'first_name' => 'required',\n 'email' => 'required|string|unique:users',\n 'other_mobile_number' => 'required|integer|unique:users',\n 'selectType' => 'required',\n 'agree_check' => 'required|boolean',\n 'password' => 'required|string|confirmed'\n ]);\n\n $token = getenv(\"TWILIO_AUTH_TOKEN\");\n $twilio_sid = getenv(\"TWILIO_SID\");\n $twilio_verify_sid = getenv(\"TWILIO_VERIFY_SID\");\n $twilio = new Client($twilio_sid, $token);\n $twilio->verify->v2->services($twilio_verify_sid)\n ->verifications\n ->create(\"+91\".$request->other_mobile_number, \"sms\");\n\n $user = new User([\n 'name' => $request->first_name,\n 'last_name' => $request->last_name,\n 'email' => $request->email,\n 'usertype' => 3,\n 'userSelect_type' => $request->selectType,\n 'other_mobile_number' => $request->other_mobile_number,\n 'password' => bcrypt($request->password)\n ]);\n\n $user->save();\n eventtracker::create(['symbol_code' => '1', 'event' => $request->email.' created a new account as a User']);\n\n return response()->json([\n 'data' => $user,\n 'message' => 'Successfully created user!'\n ], 201);\n }", "function register_user($username,$email,$institution){\n\t}", "public function create()\n {\n \n $users = User::with(['role' => function($q){\n $q->where('name', 'Doctor');\n }])->get();\n \n $doctors = User::has('role', 1)\n ->orderBy('name', 'desc')->get();\n $proficiencies = Proficiency::all();\n \n return view ('help.appointment.register', compact('users', 'proficiencies'));\n }", "public function testUserRegister()\n {\n $response = $this->get('/register')\n ->assertStatus(200)\n ->assertSee('Register');\n }", "public function create()\n\t{\n\t\t//\n\t\treturn view('registrations.create');\n\t}", "public function register() {\n \n $this->form_validation->set_rules('email', 'Email', 'required|valid_email');\n $this->form_validation->set_rules('password', 'Passwort', 'required');\n $this->form_validation->set_rules('dataprotection', 'Datenschutz', 'required');\n \n if ($this->form_validation->run() === FALSE) {\n \t$this->error(400, 'Validation error');\n }\n \n if (strtolower($this->input->post('dataprotection')) == 'true') {\n \t// TODO: save acceptance or acceptance date to db, i.e. hand over to model\n } else {\n \t$this->error(404, 'Dataprotection error');\n } \n \n $this->user_model->setValue('email', $this->input->post('email'));\n $this->user_model->setValue(\n \t'hashed_password', \n \tpassword_hash($this->input->post('password'), PASSWORD_DEFAULT));\n\n if (! $this->user_model->newUser()) {\n\t\t\t$this->error(409, 'Duplicate');\n }\n\n\t\t$this->sendConfirmationMail($this->input->post('email'));\n\t\t$data['msg'] = $this->input->post('email') . ' registered.';\n\t\t$this->responseWithCode(201, $data);\n }", "public function testRegisterUser()\n {\n\n $data = factory(User::class)->raw([\n 'password' => $this->faker->password,\n ]);\n\n $response = $this->postJson(\"$this->baseurl/signup\", $data);\n $response->assertStatus(201);\n $response->assertJsonStructure([\n \"data\" => [\n \"token\",\n \"user\",\n ],\n \"status\",\n \"message\",\n ]);\n }", "public function create()\n {\n $page_title = trans(\"auth/front_register.registro\");\n\n //return view('modules.auth.front_register', compact('page_title'));\n $user = new User;\n $user_profiles = new UserProfile();\n $user->setRelation('user_profile', $user_profiles);\n\n $form_data = array(\n 'route' => array('register'),\n 'method' => 'POST',\n 'id' => 'formData',\n 'class' => 'form-horizontal'\n );\n\n return view(\n \"modules.auth.front_register\",\n compact(\n 'page_title',\n 'user',\n 'form_data'\n )\n );\n }" ]
[ "0.68164665", "0.68048227", "0.65093935", "0.64443994", "0.6280504", "0.6259114", "0.6228451", "0.6091112", "0.59748995", "0.5923236", "0.58715576", "0.58711356", "0.586229", "0.58319163", "0.58306944", "0.5823281", "0.58220184", "0.5764362", "0.57226545", "0.57079804", "0.5649337", "0.56471825", "0.56303316", "0.5623243", "0.5598284", "0.5591086", "0.556163", "0.5561521", "0.55391264", "0.55347073", "0.5533882", "0.5489937", "0.548095", "0.5475963", "0.5475505", "0.5455002", "0.54531264", "0.54417133", "0.5439179", "0.54380816", "0.5431076", "0.5428557", "0.54131967", "0.5407142", "0.54041445", "0.5400745", "0.5399896", "0.5396645", "0.5385921", "0.53786725", "0.5361904", "0.53609556", "0.5355183", "0.5351725", "0.5328373", "0.53257513", "0.532461", "0.5323038", "0.532025", "0.5315761", "0.5313063", "0.5310774", "0.52998894", "0.52850556", "0.52826333", "0.52776265", "0.5276918", "0.52718264", "0.5253122", "0.52495337", "0.5247805", "0.5246395", "0.52447927", "0.52445954", "0.52416277", "0.52322316", "0.5231971", "0.5230624", "0.5230088", "0.5228983", "0.52282226", "0.5222519", "0.5218932", "0.5213669", "0.5212273", "0.52088714", "0.52085537", "0.5206853", "0.52047396", "0.51909983", "0.5186229", "0.51853544", "0.5184374", "0.518177", "0.5180256", "0.5180209", "0.5177981", "0.51731986", "0.5171937", "0.51718414" ]
0.7710731
0
Test case for webinarRegistrantGet Get a Webinar Registrant.
Тест-кейс для webinarRegistrantGet Получение участника вебинара.
public function testWebinarRegistrantGet() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_registrants_of_webinars($webinar_id=false) \n {\n\t\tif($webinar_id)\n\t\t{\n\t\t\tif(!$this->organizer_key or !$this->access_token)\n\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t$return_array = array();\n\t\t\t\n\t\t\t$return_array = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/{$webinar_id}/registrants?oauth_token=\".$this->access_token), true);\n\n\t\t\tif(isset($reponse['int_err_code']) and $reponse['int_err_code'] != '')\n\t\t\t{\n\t\t\t\t$this->set_access_token('');\n\t\t\t\t$this->set_organizer_key('');\t\t\t\t\n\t\t\t\tthrow new Exception($reponse['int_err_code']);\n\t\t\t}\n\t\t}\n\t\t\t\n return $return_array;\n\t}", "public function getRegistrant()\n {\n return $this->registrant;\n }", "public function getRegistrant();", "public function getRegistrant() {\n\t\treturn self::$_registrant;\n\t}", "function citrixonline_create_registrant_of_webinar($webinar_id=false, $data = array(), $all_fields_chk = false) \n {\n\t\tif($webinar_id and isset($data['first_name']) and isset($data['last_name']) and isset($data['email']))\n\t\t{\n\t\t\t$params = array();\n\t\t\t\n\t\t\t$fields = array(\n\t\t\t\t'firstName'=>$data['first_name'],\n\t\t\t\t'lastName'=>$data['last_name'],\n\t\t\t\t'email'=>$data['email'],\n );\n\t\t\t\n\t\t\t$params[CURLOPT_HTTPHEADER] = array('Accept: application/json', 'Content-Type: application/json', 'Authorization: OAuth oauth_token='.$this->access_token);\n\t\t\t$params[CURLOPT_POSTFIELDS] = json_encode($fields);\n\t\t\t\n\t\t\t$reponse = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/{$webinar_id}/registrants\", $params), true);\n\t\t\t\n\t\t\tif(isset($reponse['registrantKey']))\n\t\t\t\treturn $reponse;\n\t\t}\n\t\t\n\t\treturn false;\t\t\t\n\t}", "public function testWebinarRegistrants()\n {\n }", "public function testWebinarRegistrantStatus()\n {\n }", "public function testWebinarRegistrantCreate()\n {\n }", "public function registration_get(){\n }", "public function testWebinarRegistrantsQuestionsGet()\n {\n }", "public function getRegistrants()\n {\n if (array_key_exists(\"registrants\", $this->_propDict)) {\n return $this->_propDict[\"registrants\"];\n } else {\n return null;\n }\n }", "public function setRegistrant($registrant = null)\n {\n $this->registrant = $registrant;\n\n return $this;\n }", "public function getAllowedRegistrant()\n {\n if (array_key_exists(\"allowedRegistrant\", $this->_propDict)) {\n if (is_a($this->_propDict[\"allowedRegistrant\"], \"\\Beta\\Microsoft\\Graph\\Model\\MeetingAudience\") || is_null($this->_propDict[\"allowedRegistrant\"])) {\n return $this->_propDict[\"allowedRegistrant\"];\n } else {\n $this->_propDict[\"allowedRegistrant\"] = new MeetingAudience($this->_propDict[\"allowedRegistrant\"]);\n return $this->_propDict[\"allowedRegistrant\"];\n }\n }\n return null;\n }", "function _getRegistration($id){\n\t\tglobal $wpdb;\n\t\t$result=$wpdb->get_row(\"SELECT * FROM {$wpdb->prefix}events_attendee WHERE registration_id='$id'\",ARRAY_A);\n\t\tif(empty($result)){\n\t\t\tthrow new EspressoAPI_ObjectDoesNotExist($id);\n\t\t}\n\t\treturn array(\"registration\"=>$result);\n\t}", "public function getRegistration()\n {\n return $this->_registration;\n }", "public function getRegistratienummer()\n {\n return $this->registratienummer;\n }", "function citrixonline_get_webinar($webinarKey) \n {\n\t\tif(!$this->organizer_key or !$this->access_token)\n\t\t\treturn 0;\n\t\t\t\n\t\t$return_array = array();\n\n\t\t$reponse = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/\".$webinarKey.\"?oauth_token=\".$this->access_token), true);\n\t\t\n\t\tif(isset($reponse['int_err_code']) and $reponse['int_err_code'] != '')\n\t\t{\n\t\t\t$this->set_access_token('');\n\t\t\t$this->set_organizer_key('');\t\t\t\t\n\t\t\tthrow new Exception($reponse['int_err_code']);\n\t\t}\n\t\t\n\t\treturn $reponse;\n\t}", "public function setRegistrant($value) {\n\t\tself::$_registrant = $value;\n\t}", "public function testGetInstitutionUsingGET()\n {\n }", "public function registrationAction()\n {\n $eventId = $this->params('eventId');\n $registrations = $this->regTable->findRegByEventId($eventId);\n //*** DATABASE TABLE MODULE RELATIONSHIPS LAB: provide secondary data usersModelTableGateway which performs lookups for attendees for each registration\n $data = [];\n if ($registrations) {\n foreach ($registrations as $item) {\n $secondaryDataTable = '???';\n $data[] = [\n $item->registration_time,\n $item->first_name,\n $item->last_name,\n $secondaryDataTable];\n }\n }\n return new JsonModel(['data' => $data]);\n }", "public function onRegistrantCreated(MeetingRegistrantCreated $event) {\n\n $meetingId = (string)$event->getObject()['id'];\n\n $meeting = Meeting::whereZoomId($meetingId)->first();\n\n if(!empty($meeting)){\n\n $this->logEvent($event);\n try{\n $zoomRegistrant = new Registrant();\n $zoomRegistrant->create($event->getObject()['registrant']);\n\n $registrantModel = null;\n\n switch ($meeting->getSetting(ZoomMeeting::SETTINGS_KEY_REGISTRATION_TYPE)){\n case ZoomMeeting::SETTINGS_REGISTRATION_TYPE_ONCE_ALL_OCCURRENCES:\n case ZoomMeeting::SETTINGS_REGISTRATION_TYPE_ONCE_MANY_OCCURRENCES:\n $occurrences = isset($event->getObject()['occurrences']) ? $event->getObject()['occurrences'] : $meeting->occurrences;\n foreach($occurrences as $occurrence){\n $occurrenceId = is_array($occurrence) ? $occurrence['occurrence_id'] : $occurrence->occurrence_id;\n $this->saveRegistrant($zoomRegistrant, $meetingId, $occurrenceId);\n }\n break;\n case ZoomMeeting::SETTINGS_REGISTRATION_TYPE_ONCE_ONE_OCCURRENCES:\n $this->saveRegistrant($zoomRegistrant, $meetingId, $event->getObject()['occurrences'][0]['occurrence_id']);\n break;\n }\n\n $registrantModel = $this->getRegistrantFromEvent($event);\n\n event(new SendRegistrantConfirm($registrantModel));\n\n event(new SendNewRegistrant($registrantModel));\n\n $this->logFinishEvent();\n }catch (\\Exception $exception){\n $this->logFailedEvent($exception);\n }\n }else{\n $this->logNotFoundEvent();\n }\n\n }", "protected function createRegistrant() {\n $registrant = $this->registrantFactory->createRegistrant([\n 'event' => $this->registration->getEvent(),\n ]);\n $registrant->setRegistration($this->registration);\n\n return $registrant;\n }", "public function getRegisterAgent()\n {\n return $this->register_agent;\n }", "public function testShouldGenerateARegistrationSuccessfully() {\n \n $entity = new Registration;\n $entity->source_id = $this->getSource()->id;\n $entity->registrant_id = $this->getRegistrant()->id;\n $entity->type = 'PLAYER' ;\n $entity->league = 'league';\n $entity->org_name = 'Oranization...';\n $entity->org_state = 'NY';\n $entity->season = '2017';\n $entity->external_id = 'myexternalid';\n $entity->right_to_market = true;\n $entity->team_gender = 'Male';\n $entity->team_name = 'A-Team';\n $entity->school_district = 'school district';\n $entity->school_state = 'school sate';\n $entity->first_name = 'Firt name';\n $entity->middle_name = 'Middle name';\n $entity->last_name = 'Last Name';\n $entity->email = 'mail@mail.com';\n $entity->gender = 'Male';\n $entity->city = 'California';\n $entity->zip_code = '234141234123';\n $entity->birth_date = '11/27/1984';\n $entity->phone_number = '1234567890';\n $entity->game_type = 'SOME';\n $entity->level = 'LEVEL';\n $entity->state = 'CALIFORNIA';\n $entity->address_first_line = 'An Address 1234';\n $entity->county = 'A county';\n\n $entity->save();\n $this->assertTrue(!is_null($entity->id));\n }", "public function test_passed_registration()\n {\n\n $user = $this->user();\n\n $response = $this->post('api/v1/register', $user);\n $response->assertStatus(200);\n $response->assertJsonMissing([\n \"status\"=>'Failed'\n ]);\n\n }", "public function getRegistrantWrapperId() {\n $uuid = $this->registrant->uuid->first()->getValue();\n return $uuid['value'];\n }", "public function testGetInstitutionsUsingGET()\n {\n }", "function getRegistrationID()\n { \n return $this->getValueByFieldName('registration_id');\n }", "public function testApiRegistrationSimple()\n {\n $eventsFaker = Event::fake();\n $emailVerificationSend = Notification::fake();\n $uniqueData = $this->getTestRegisterData();\n $response = $this->withHeaders([ 'Authorization' => $this->getBearerClientToken() ])\n ->json('POST', $this->getRegisterRoute(), $uniqueData);\n\n $response->assertStatus(200)->assertJsonMissingValidationErrors();\n\n $responseArray = $response->decodeResponseJson()->json();\n $this->assertArrayNotHasKey('token_type', $responseArray);\n $this->assertArrayNotHasKey('expires_in', $responseArray);\n $this->assertArrayNotHasKey('access_token', $responseArray);\n $this->assertArrayNotHasKey('refresh_token', $responseArray);\n\n $user = CoreUser::byEmail($uniqueData[ 'email' ])->firstOrFail();\n $this->withoutExceptionHandling();\n\n if ( config('kit-auth.should_dispatch_registered_event') ) {\n $eventsFaker->assertDispatched(Registered::class,\n function (Registered $event) use ($emailVerificationSend) {\n app(ProcessEmailVerification::class)->handle($event);\n\n $emailVerificationSend->assertSentTo($event->user, VerifyEmail::class,\n function (VerifyEmail $notice) {\n $this->assertEquals($notice->requestSide, CoreUserContract::FRONTEND_REQUEST_SIDE);\n return $notice->tokens[ 'web' ] && $notice->tokens[ 'mobile' ];\n });\n\n return true;\n });\n } else {\n $eventsFaker->assertNotDispatched(Registered::class);\n }\n }", "public function verifyUserRegistration($request)\n {\n return $this->startAnonymous()->uri(\"/api/user/verify-registration\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "public function getRegister()\n {\n return $this->showRegistrationForm();\n }", "public function getRegister()\n {\n return $this->showRegistrationForm();\n }", "function getWebinar($webinarKey)\n {\n $path = $this->getPathRelativeToOrganizer(sprintf('webinars/%s', $webinarKey));\n\n return $this->sendRequest('GET', $path, $parameters = null, $payload = null);\n }", "public function getEnableRegistration();", "public function testMemberRegistrationForm()\n {\n $response = $this\n ->get('/register-member')\n ->assertStatus(200);\n }", "public function hrregistration(){\n\n \t $rands = str_random(10);\n \t $rand = json_encode($rands);\n return response()->json($rand,200);\n }", "public function getJWT();", "public function getRegistration()\n {\n //output\n return view('auth.registration');\n }", "public function setRegistrants($val)\n {\n $this->_propDict[\"registrants\"] = $val;\n return $this;\n }", "public function testWebinar()\n {\n }", "public function testCanDisplayTheAssessorRegistrationForm()\n {\n $response = $this->get('/assessors/register');\n\n $response->assertStatus(200);\n\n $response->assertViewIs('auth.register');\n }", "public function testWebinarCreate()\n {\n }", "public function testWebinarStatus()\n {\n }", "public function testAuthenticationsEmailIdGet()\n {\n }", "public function register($name = null, $registrant = null) {\n return parent::register($name, $registrant);\n }", "public function getLoginAfterRegistration();", "public function setAllowedRegistrant($val)\n {\n $this->_propDict[\"allowedRegistrant\"] = $val;\n return $this;\n }", "public function sellerCanRegister()\n {\n $input = [\n 'username' => 'iniusername' . Str::random(3),\n 'fullname' => 'ini nama ' . Str::random(4),\n 'email' => 'ini_email' . Str::random(4) . '@gmail.com',\n 'password' => 'P@sswr0d!',\n 'sex' => 0\n ];\n $response = $this->post('/api/seller/register', $input);\n $response->assertStatus(200);\n }", "public function adminRegistrer()\n {\n return $this->belongTo(AdminRegistrationController::class);\n }", "public function testAuthenticationsInweboIdGet()\n {\n }", "public function getRegistration_no()\n {\n return $this->registration_no;\n }", "public function testWebinarPollGet()\n {\n }", "public function startWebAuthnRegistration($request)\n {\n return $this->start()->uri(\"/api/webauthn/register/start\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "public function getGebruiker()\n {\n return KVDutil_Auth_Gebruiker::newNull();\n }", "public function completeWebAuthnRegistration($request)\n {\n return $this->start()->uri(\"/api/webauthn/register/complete\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "public function testVerifyAllowedEmailAddressGet()\n {\n }", "function ciniki_patents_patentGet($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 'patent_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Patent'),\n 'images'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Images'),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args = $rc['args'];\n\n //\n // Make sure this module is activated, and\n // check permission to run this function for this tenant\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'patents', 'private', 'checkAccess');\n $rc = ciniki_patents_checkAccess($ciniki, $args['tnid'], 'ciniki.patents.patentGet');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Load tenant settings\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'tenants', 'private', 'intlSettings');\n $rc = ciniki_tenants_intlSettings($ciniki, $args['tnid']);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $intl_timezone = $rc['settings']['intl-default-timezone'];\n $intl_currency_fmt = numfmt_create($rc['settings']['intl-default-locale'], NumberFormatter::CURRENCY);\n $intl_currency = $rc['settings']['intl-default-currency'];\n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'users', 'private', 'datetimeFormat');\n $datetime_format = ciniki_users_datetimeFormat($ciniki, 'php');\n\n //\n // Return default for new Patent\n //\n if( $args['patent_id'] == 0 ) {\n $patent = array('id'=>0,\n 'name'=>'',\n 'permalink'=>'',\n 'status'=>'10',\n 'flags'=>'1',\n 'order'=>'1',\n 'primary_image_id'=>'0',\n 'primary_image_caption'=>'',\n 'synopsis'=>'',\n 'description'=>'',\n );\n if( ciniki_core_checkModuleFlags($ciniki, 'ciniki.patents', 0x01) ) {\n $strsql = \"SELECT MAX(sequence) AS seq FROM ciniki_patents WHERE tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.patents', 'max');\n if( $rc['stat'] != 'ok' ) { \n return $rc;\n }\n if( isset($rc['max']['seq']) && $rc['max']['seq'] > 0 ) {\n $patent['order'] = $rc['max']['seq'] + 1;\n }\n }\n }\n\n //\n // Get the details for an existing Patent\n //\n else {\n ciniki_core_loadMethod($ciniki, 'ciniki', 'patents', 'private', 'patentLoad');\n $rc = ciniki_patents_patentLoad($ciniki, $args['tnid'], $args);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $patent = $rc['patent'];\n }\n\n return array('stat'=>'ok', 'patent'=>$patent);\n}", "public function getCareer();", "public function getRegistrationNumber(): ?string;", "public function test_admin_tribe_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Assignments', 'tribe_list']);\n $this->assertResponseCode(404);\n }", "public function testLoginRegister(){\n $user = User::find(1);\n $this->be($user);\n\n $response =$this->get(route('administracion'));\n $response->assertStatus(200);\n }", "public function testAllowedEmailAddressGet()\n {\n }", "public function test_create_request_registered_user() {\n\t\twp_delete_post( self::$request_id, true );\n\n\t\t$test_data = array(\n\t\t\t'test-data' => 'test value here',\n\t\t\t'test index' => 'more privacy data',\n\t\t);\n\n\t\t$actual = wp_create_user_request( self::$registered_user_email, 'export_personal_data', $test_data );\n\n\t\t$this->assertNotWPError( $actual );\n\n\t\t$post = get_post( $actual );\n\n\t\t$this->assertSame( self::$user_id, (int) $post->post_author );\n\t\t$this->assertSame( 'export_personal_data', $post->post_name );\n\t\t$this->assertSame( self::$registered_user_email, $post->post_title );\n\t\t$this->assertSame( 'request-pending', $post->post_status );\n\t\t$this->assertSame( 'user_request', $post->post_type );\n\t\t$this->assertSame( wp_json_encode( $test_data ), $post->post_content );\n\t}", "public function actionRegistration() {\n\n $first_name = Yii::$app->request->post('first_name');\n $last_name = Yii::$app->request->post('last_name');\n $code = Yii::$app->request->post('code');\n $sample_code = Yii::$app->request->post('sample_code');\n $collector_code = Yii::$app->request->post('collector_code');\n $user = new User();\n $result = $user->registration($first_name,$last_name,$code,$sample_code, $collector_code);\n if(array_key_exists('error',$result))\n throw new \\yii\\web\\HttpException(400, 'Error occurred:'. json_encode($result['error']));\n return $result;\n }", "public function testUserRegister()\n {\n $response = $this->get('/register')\n ->assertStatus(200)\n ->assertSee('Register');\n }", "public function testSpecificAllowedEmailAddressGet()\n {\n }", "public function testWebinarAbsentees()\n {\n }", "function get_visitor() {\n \n // Return currently logged in user\n return $this->visitor;\n \n }", "function getAuthenticatedParticipant();", "public function testRegistrationUITest()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/add_user')\n ->assertSee('Username')\n ->assertSee('First Name')\n ->assertSee('Last Name')\n ->assertSee('Password')\n ->assertSee('Confirm Password')\n ->assertSee('Role')\n ->assertSee('Save');\n });\n }", "public function testGetSiteMembershipRequestForPerson()\n {\n }", "public function getRegistration()\n {\n return view('social.register');\n }", "public function testWPGetProfileOtherUserPatientRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = 'profileVision@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(1, $response->body->data->relationships->isWellnessProRel);\r\n }", "function private_home(){\r\n return sreg_basic(array(\r\n 'role' => 'subscriber',\r\n 'from' => get_bloginfo('admin_email'),\r\n 'message' => 'Thank you for registering',\r\n 'notify' => get_bloginfo('admin_email'),\r\n 'fb' => false,\r\n ));\r\n}", "public function test_admin_member_internship()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/DscMember', 'apprenticeship']);\n $this->assertResponseCode(404);\n }", "public function getRegistration(string $registrationId, bool $spd = true): object\n {\n $request = $this->apiClient(false)\n ->get(\"/v1/registrations/{$registrationId}\", ['statusSPD' => $spd ? 'true' : 'false']);\n\n if ($request->failed()) {\n throw new GetCompanyRegistrationException();\n }\n\n return $request->object()->result;\n }", "public static function isRegistrant($av_id=Null,$e_id=Null){\n static $visits = array();\n if (empty($av_id)) $av_id = bAuth::$av->ID;\n if (!empty($av_id)){\n if (@$visits[$av_id] === Null){\n\tlocateAndInclude('bForm_vm_Visit');\n\t$visits[$av_id] = bForm_vm_Visit::getVisits($av_id,array(VISIT_TYPE_PROGRAM));\n }\n if ($e_id === Null) $reply = !empty($visits[$av_id]);\n else $reply = in_array($e_id,$visits[$av_id]);\n }\n return @$reply;\n }", "public function testRegister()\n {\n $crawler = $this->client->request('GET', '/cliente/');\n $crawler = $this->client->followRedirect();\n\n $this->assertTrue($this->client->getContainer()->get('security.context')->isGranted('IS_AUTHENTICATED_ANONYMOUSLY'));\n $this->assertEquals(200, $this->client->getResponse()->getStatusCode());\n $this->assertGreaterThan(0, $crawler->filter('html:contains(\"Acesse sua conta\")')->count());\n \n // validate form\n $form = $crawler->selectButton('Cadastrar')->form(array(\n 'marcoshoya_marquejogobundle_customer[username]' => '',\n ));\n \n $crawler = $this->client->submit($form);\n $this->assertGreaterThan(0, $crawler->filter('span:contains(\"Campo obrigatório\")')->count());\n \n $form = $crawler->selectButton('Cadastrar')->form(array(\n 'marcoshoya_marquejogobundle_customer[username]' => 'registertest@marquejogo.com',\n ));\n \n $this->client->submit($form);\n $crawler = $this->client->followRedirect();\n\n // Check data in the show view\n $this->assertGreaterThan(0, $crawler->filter('html:contains(\"Novo cadastro\")')->count());\n }", "public static function claimPropertyAction() {\n $token = self::getPropertyClaimToken();\n if(empty($token)){\n $referer = wp_get_referer();\n if (empty($referer)) {\n $referer = 'index.php';\n }\n $query = parse_url($referer, PHP_URL_QUERY);\n // Returns a string if the URL has parameters or NULL if not\n if (!empty($query)) {\n $referer .= '&claim_property_error=1';\n } else {\n $referer .= '?claim_property_error=1';\n }\n wp_redirect($referer);\n return;\n }\n // If the token is received though, redirect to signup with the intent to claim-property\n wp_redirect('https://getadmiral.com/a/signup?i=claim-property&t=' . $token . '&d=' . get_site_url() . '&p=' . self::getPropertyID() . '&aid=' . self::$clientID);\n }", "public function getRegister()\n {\n return view(\"Home::auth.register\");\n }", "public function getRegister()\n {\n // if($this->auth->check())\n // \treturn redirect()->route('home');\n\n return view('auth.register');\n }", "public function testGetAccountScheduledPaymentsUsingGET()\n {\n }", "public function canGetRecurringProfileDetails()\r\n {\r\n return true;\r\n }", "public function testShouldFailIFARegistrationIsCreatedWithoutRegistrant() {\n $this->expectException(\\PDOException::class);\n\n $entity = new Registration;\n $entity->source_id = $this->getSource()->id;\n $entity->type = 'PLAYER' ;\n $entity->league = 'league';\n $entity->org_name = 'Oranization...';\n $entity->org_state = 'NY';\n $entity->season = '2017';\n $entity->external_id = 'myexternalid';\n $entity->right_to_market = true;\n $entity->team_gender = 'Male';\n $entity->team_name = 'A-Team';\n $entity->school_district = 'school district';\n $entity->school_state = 'school sate';\n $entity->first_name = 'Firt name';\n $entity->middle_name = 'Middle name';\n $entity->last_name = 'Last Name';\n $entity->email = 'mail@mail.com';\n $entity->gender = 'Male';\n $entity->city = 'California';\n $entity->zip_code = '234141234123';\n $entity->birth_date = '11/27/1984';\n $entity->phone_number = '1234567890';\n $entity->game_type = 'SOME';\n $entity->level = 'LEVEL';\n $entity->state = 'CALIFORNIA';\n $entity->address_first_line = 'An Address 1234';\n $entity->county = 'A county';\n\n $entity->save();\n }", "public function getRegister()\n {\n $user = null;\n\t\t\n\t\tif(Auth::check())\n\t\t{\n\t\t\t$user = Auth::user();\n\t\t\treturn redirect()->intended('/');\n\t\t}\n\t\t\n \treturn view('register',compact(['user']));\n }", "public function getRegistrationCountry(): ?string;", "protected function registered(Request $request)\n {\n $user = $request->user();\n $twoStepVerification = new TwoStepVerificationController();\n $twoStepVerification->setUserRegisteredPhoneSmsCode($user);\n $twoStepVerification->setUserRegisteredEmailCode($user);\n $tokenResult = $user->createToken('Personal Access Web Token');\n return response()->json([\n 'user' => $request->user(),\n 'token' => [\n 'access_token' => $tokenResult->accessToken,\n 'token_type' => 'Bearer',\n 'expires_at' => Carbon::parse(\n $tokenResult->token->expires_at\n )->toDateTimeString()\n ]\n ]);\n return response()->json(['message' => 'Telefonunuza gönderilen doğrulama kodunu giriniz.'],\n 200);\n }", "public function getLaatsteRegistratie(): ?Registratie\n {\n $registraties = $this->getRecenteRegistraties(1);\n\n return (is_array($registraties) || $registraties instanceof \\Countable ? count($registraties) : 0) > 0 ? $registraties[0] : null;\n }", "public function testSignUp()\n {\n $rand = rand();\n $this->visit('/register')\n ->type('ruchi', 'name')\n ->type('ruchi' .$rand.'@in.com', 'email')\n ->type('qwerty', 'password')\n ->type('qwerty', 'password_confirmation')\n ->press('Register')\n ->seePageIs('/');\n }", "public function testGet()\n {\n $response = $this->get('/api/merchants');\n\n $response->assertSuccessful();\n }", "public function testProjectProjectIDInviteeInviteIDGet()\n {\n }", "public function getProvisioning();", "public function testRegistration(): void { }", "public function getSubscriber()\n {\n return UserPeer::retrieveByPk($this->getSubscriberId());\n }", "public function retrieveRegistrationReport($applicationId, $start, $end)\n {\n return $this->start()->uri(\"/api/report/registration\")\n ->urlParameter(\"applicationId\", $applicationId)\n ->urlParameter(\"start\", $start)\n ->urlParameter(\"end\", $end)\n ->get()\n ->go();\n }", "public function testListTenant()\n {\n $this->json('GET', 'reseller/'.$this->reseller->id.'/tenants')\n ->assertStatus(200);\n }", "public function testCreateSiteMembershipRequestForPerson()\n {\n }", "function getInstitutionValidate(){\n\t\tif($this->country == \"\"){\n\t\t\t$respArray = $this->makeResponse(\"ERROR\",\" ALL FIELDS ARE REQUIRED! \",\"\");\n\t\t\techo $this->jsoncallback.\"(\".json_encode($respArray).\")\";\n\t\t\texit;\t\t\n\t\t}else{\n\t\t\t$this->basics->getInstitution($this->country);\n\t\t}\n\t}", "public function testRegisterStudent()\n {\n $this->browse(function (Browser $browser){\n $browser->visit('/register')\n ->click('.slider__container')\n ->type('firstname', env('DUSK_NEW_FIRSTNAME'))\n ->type('lastname', env('DUSK_NEW_LASTNAME'))\n ->type('email', env('DUSK_NEW_USER_STUDENT'))\n ->type('verificateEmail', env('DUSK_NEW_USER_STUDENT'))\n ->type('password', env('DUSK_NEW_PASSWORD'))\n ->press('.button')\n ->assertPathIs('/');\n });\n }", "public function testProjectProjectIDInviteGet()\n {\n }" ]
[ "0.68977153", "0.6843426", "0.6761253", "0.6463811", "0.64311665", "0.6392972", "0.63280797", "0.62443304", "0.60247093", "0.5908627", "0.57308906", "0.55995554", "0.5596293", "0.558569", "0.5451014", "0.54231215", "0.53971064", "0.53788775", "0.53557867", "0.5348735", "0.53368413", "0.5330909", "0.53276604", "0.5318221", "0.52824605", "0.51856107", "0.5129945", "0.5092938", "0.5041742", "0.5028168", "0.5024767", "0.5024767", "0.49968758", "0.49631178", "0.49530962", "0.49238908", "0.4918771", "0.4873702", "0.48610023", "0.4858971", "0.48546076", "0.4847189", "0.48202026", "0.48191574", "0.4812651", "0.48051894", "0.48031396", "0.48029867", "0.48013788", "0.47945407", "0.476892", "0.47611892", "0.47557607", "0.47465572", "0.4744968", "0.47441864", "0.47393614", "0.47271743", "0.47234797", "0.47193864", "0.47122717", "0.4698605", "0.46849194", "0.46698382", "0.46676663", "0.46643558", "0.46601132", "0.4659488", "0.46526095", "0.4651331", "0.4647481", "0.46445957", "0.46400288", "0.46388814", "0.4628644", "0.46273428", "0.4626556", "0.46175846", "0.46150696", "0.45973608", "0.45947787", "0.45938602", "0.4592793", "0.45922196", "0.45919076", "0.45912242", "0.4589872", "0.45818868", "0.45707592", "0.45694438", "0.45678896", "0.45638397", "0.45637056", "0.45585468", "0.45574632", "0.45564032", "0.45546556", "0.4554529", "0.45502523", "0.45408598" ]
0.7519076
0
Test case for webinarRegistrantQuestionUpdate Update Registration Questions.
Тест-кейс для вебинара RegistrantQuestionUpdate Обновление регистрационных вопросов.
public function testWebinarRegistrantQuestionUpdate() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testUpdateSurveyQuestion0()\n {\n }", "public function testUpdateSurveyQuestion0()\n {\n }", "public function testWebinarRegistrantsQuestionsGet()\n {\n }", "public function testUpdateVendorComplianceSurvey()\n {\n }", "public function testUpdateSurveyQuestionChoice0()\n {\n }", "public function testUpdateSurveyQuestionChoice0()\n {\n }", "public function testWebinarUpdate()\n {\n }", "public function test_changing_question() {\n global $DB;\n\n // create a user\n $user = $this->getDataGenerator()->create_user();\n\n // create a course\n $course = $this->getDataGenerator()->create_course();\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n $time = mktime(9, 0, 0, 11, 7, 2013);\n\n $this->loadDataSet($this->createArrayDataSet(array(\n 'videoquanda_questions' => array(\n array('id', 'instanceid', 'userid', 'timecreated', 'timemodified' ,'seconds', 'text'),\n array(1, $videoquanda->id, $user->id, $time, $time, 2, 'dummy text')\n )\n )));\n\n $question = array(\n 'text' => 'I have updated my question.',\n 'timemodified' => time()\n );\n\n // enrol the user on the course\n $this->getDataGenerator()->enrol_user($user->id, $course->id, $DB->get_field('role', 'id', array(\n 'shortname' => 'student',\n )));\n\n // login the user\n $this->setUser($user);\n\n $client = new Client($this->_app);\n $client->request('PUT', '/api/v1/' . $videoquanda->id . '/questions/1', array(), array(), array(), json_encode($question));\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $this->assertGreaterThan($time, $DB->get_field('videoquanda_questions', 'timemodified', array('id' => 1)));\n }", "private function sync_asked_questions_for_validation($questions): void {\n\t\t/** @var User $user */\n\t\t$user = auth()->guard('api')->user();\n\n\t\t$user->registration_questions()->sync($questions->pluck('id')->toArray());\n\t}", "public function testUpdateSurvey()\n {\n $survey = Survey::factory()->create();\n\n $response = $this->json('PATCH', \"survey/{$survey->id}\", [\n 'survey' => ['epilogue' => 'epilogue your behind']\n ]);\n\n $response->assertStatus(200);\n $this->assertDatabaseHas('survey', ['id' => $survey->id, 'epilogue' => 'epilogue your behind']);\n }", "public function testSuccessfulInstructorUpdate() {\n try {\n $updatedInstructor = UserManagementController::updateInstructorProfile(self::USERNAME,self::PASSWORD ,self::EMAIL\n ,self::FIRSTNAME,self::LASTNAME,$this->project->getProjectJnName()\n ,self::IS_OWNER,$this->institution->getAbbreviation(),self::IDENTIFICATION);\n\n $this->assertNotNull($updatedInstructor, \"The updated instructor is null\");\n $this->assertEquals($this->userTypeEnum->INSTRUCTOR, $updatedInstructor->getType(), \"The updated user is not\n an instance of INSTRUCTOR\");\n\n $InstructorInstitution = PersistentUserXInstitutionPeer::retrieveByPk($updatedInstructor->getUserId(),\n $this->institution->getInstitutionId());\n $this->assertNotNull($InstructorInstitution, \"The user x institution relation was not created for the instructor.\");\n $this->assertEquals(self::IDENTIFICATION, $InstructorInstitution->getIdentification(), \"The Instructor school\n identification is incorrect\");\n $this->assertEquals($updatedInstructor->getUserId(), $InstructorInstitution->getUserId(), \"The user id is\n incorrect on user x institution for the instructor\");\n $this->assertEquals($this->institution->getInstitutionId(), $InstructorInstitution->getInstitutionId(),\n \"The institution id is incorrect on user x institution for the instructor\");\n\n $instXProjec = PersistentUserXProjectPeer::retrieveByPK($updatedInstructor->getJnUsername(),\n $this->project->getProjectJnName());\n $this->assertNotNull($instXProjec, \"The relationship between instructor and project was not created\");\n $this->assertEquals($this->project->getProjectJnName(), $instXProjec->getProjectJnName(), \"The project name\n is incorrect on user x project\");\n $this->assertEquals($updatedInstructor->getJnUsername(), $instXProjec->getJnUsername(), \"The java.net\n username is incorrect on user x project for instructor\");\n $this->assertTrue($instXProjec->getIsOwner() == 1, \"The instructor is the owner of project.\");\n\n } catch (InfinityMetricsException $ime){\n $this->fail(\"The successful update of profile failed: \" . $ime);\n }\n\n }", "public function testUpdateSurvey0()\n {\n }", "public function testUpdateSurvey0()\n {\n }", "public function submit_registration_2(RegistrationQuizSubmissionRequest $request) {\n\t\t$questionIds = $request->questionIds;\n\t\t$answerIds = $request->answerIds;\n\n\t\t/** @var User $user */\n\t\t$user = auth()->guard('api')->user();\n\n\t\t$user->age = $request->input('age');\n\t\t$user->gender = $request->input('gender');\n\t\t$user->save();\n\n\t\t$savedQuestions = $user->registration_questions()->orderBy('id')->get();\n\n\t\t$this->validateGeneratedQuestions($savedQuestions, $questionIds, $answerIds);\n\n\t\t$randomAlphaNumericString = randomAlphaNumericString(10);\n\t\t$user->registration_participation()->create([\n\t\t\t'token' => $randomAlphaNumericString,\n\t\t\t'selected' => 0,\n\t\t]);\n\n\t\t$this->deleteGeneratedQuestions($user);\n\n\t\treturn response()->json([\n\t\t\t'status' => true,\n\t\t\t'code' => 200,\n\t\t\t'message' => 'Success.',\n\t\t\t'registration_count' => $user->registration_participation()->count(),\n\t\t\t'registration_token' => $randomAlphaNumericString,\n\t\t]);\n\n\t}", "public function testUpdateVendorComplianceSurveyCustomFields()\n {\n }", "public function testPostUpdate()\n {\n $this->getEmailWithLocal('uk');\n /** check email with ticket pdf file */\n $this->findEmailWithText('ticket-php-day-2017.pdf');\n /** check email with string */\n $this->findEmailWithText('Шановний учасник, в вкладенні Ваш вхідний квиток. Покажіть його з екрану телефону або роздрукуйте на папері.');\n }", "public function testWebinarPollUpdate()\n {\n }", "public function updateclaimquestion(){\n try{\n\t if(isset($this->getData['operators'])){\n\t $opertaors = commonfunction::implod_array($this->getData['operators']);\n\t $update = $this->UpdateInToTable(CLAIM_QUESTIONS, array(array('operators'=>$opertaors, 'question'=>$this->getData['claimquename'], 'status'=>$this->getData['claim_status'])), \"question_id='\".$this->getData['question_id'].\"'\");\n\t }\n\t else{\n\t $update = $this->UpdateInToTable(CLAIM_QUESTIONS, array(array('question'=>$this->getData['claimquename'], 'status'=>$this->getData['claim_status'])), \"question_id='\".$this->getData['question_id'].\"'\");\n\t }\n\t}\n\tcatch (Exception $e) {\n $this->_logger->info('Class-'.__CLASS__.',Function-'.__FUNCTION__.',Line-'.__LINE__.',Error-'.$e->getMessage());\n } \n\t return $update;\n }", "public function testWebinarRegistrantStatus()\n {\n }", "public function updated(InterviewQuestion $interviewQuestion): void\n {\n //\n }", "public function testWebinarRegistrants()\n {\n }", "public function update_question() {\r\n $questions = stripcslashes($this->input->get('questions'));\r\n \r\n // Decode the JSON array\r\n $questions = json_decode($questions,TRUE);\r\n \r\n foreach ($questions as $question) {\r\n $data['status'] = $this->question_model->update_correct_answer($question['question_id'],$question['correct_answer']);\r\n //mysqli_next_result( $this->db->conn_id );//Free BDD\r\n }\r\n \r\n $data['status'] = $this->message->warning('U');\r\n echo json_encode($data);\r\n }", "public function testWebinarRegistrantCreate()\n {\n }", "public function update(Request $request, Question_Test $question_Test)\n {\n //\n }", "public function changeQuestionAndAnswers () {\n global $ilUser, $tpl, $ilTabs, $ilCtrl;\n $ilTabs->activateTab(\"editQuiz\");\n\n // update database\n // create wizard object\n include_once('class.ilObjMobileQuizWizard.php');\n $wiz = new ilObjMobileQuizWizard();\n $wiz->changeQuestionAndAnswers($this->object);\n\n $_GET['question_id'] = $_POST['question_id'];\n $this->initQuestionAndAnswersEditForm();\n\n // load changed data and display them\n }", "public function test_changing_question_from_other_user() {\n global $DB;\n\n // create a user\n $user = $this->getDataGenerator()->create_user();\n\n // create a course\n $course = $this->getDataGenerator()->create_course();\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n $time = mktime(9, 0, 0, 11, 7, 2013);\n\n $this->loadDataSet($this->createArrayDataSet(array(\n 'videoquanda_questions' => array(\n array('id', 'instanceid', 'userid', 'timecreated', 'timemodified' ,'seconds', 'text'),\n array(1, $videoquanda->id, 99, $time, $time, 2, 'dummy text')\n )\n )));\n\n $question = array(\n 'text' => 'I have updated my question.',\n 'timemodified' => time()\n );\n\n // enrol the user on the course\n $this->getDataGenerator()->enrol_user($user->id, $course->id, $DB->get_field('role', 'id', array(\n 'shortname' => 'student',\n )));\n\n // login the user\n $this->setUser($user);\n\n $client = new Client($this->_app);\n $client->request('PUT', '/api/v1/' . $videoquanda->id . '/questions/1', array(), array(), array(), json_encode($question));\n\n $this->assertEquals(405, $client->getResponse()->getStatusCode());\n $this->assertEquals($time, $DB->get_field('videoquanda_questions', 'timemodified', array('id' => 1)));\n }", "public function onQuestionRegister(QuestionEvent $event)\n {\n $questionMail = new QuestionMail($this->serviceContainer);\n\n $em = $this->serviceContainer->get('doctrine.orm.default_entity_manager');\n\n $question = $event->getQuestion();\n\n $date = time();\n\n $question->setDate($date);\n\n $em->persist($question);\n $em->flush();\n\n $questionMail->newQuestion();\n\n $questionMail->registerQuestion($question->getEmail());\n\n $this->session->getFlashBag()->add('success', 'Question sender success');\n }", "public function submit_registration(Request $request) {\n\t\t$data = $request->input('data');\n\t\t$questions = $data['qA'];\n\t\t$duration = $data['duration'];\n\n\t\t/** @var User $user */\n\t\t$user = auth()->guard('api')->user();\n\t\t$savedQuestions = $user->registration_questions()->orderBy('id')->get();\n\n\t\tif($savedQuestions->count() == 0) {\n\t\t\treturn response()->json([\n\t\t\t\t'status' => false,\n\t\t\t\t'code' => 200,\n\t\t\t\t'message' => 'No questions generated from the server.',\n\t\t\t]);\n\t\t}\n\n\t\t// check if the question asked and sent from user's phone are in the same order\n\t\t// and answer also matches the actual answer\n\t\tforeach($questions as $key => $question) {\n\t\t\tif($question['questionId'] != $savedQuestions[ $key ]->id) {\n\t\t\t\treturn response()->json(['status' => false, 'code' => 200, 'message' => 'Failure on question matching.']);\n\t\t\t}\n\n\t\t\t$option = Option::find($question['answerId']);\n\t\t\tif($option->is_answer() && $option->question_id == $question['questionId']) {\n\t\t\t} else {\n\t\t\t\treturn response()->json(['status' => false, 'code' => 200, 'message' => 'Failure on option matching.']);\n\t\t\t}\n\t\t}\n\n\t\t$user->registration_participation()->create([\n\t\t\t'token' => str_random(100),\n\t\t\t'selected' => 1,\n\t\t]);\n\n\t\t$this->deleteGeneratedQuestions($user);\n\n\t\treturn response()->json(['status' => true, 'code' => 200, 'message' => 'Success.']);\n\t}", "public function updateUserQuestion()\n\t{\n\t\tif (Input::has('add_good_answer'))\n\t\t{\n\t\t\t// increase number of good answers\n\t\t\t$apiResponse = $this->apiDispatcher->callApiRoute('api_add_good_answer', [\n\t\t\t\t'auth_token' => $this->apiAuthToken,\n\t\t\t\t'id' => Input::get('user_question_id'),\n\t\t\t]);\n\t\t}\n\n\t\tif (Input::has('add_bad_answer'))\n\t\t{\n\t\t\t// increase number of bad answers\n\t\t\t$apiResponse = $this->apiDispatcher->callApiRoute('api_add_bad_answer', [\n\t\t\t\t'auth_token' => $this->apiAuthToken,\n\t\t\t\t'id' => Input::get('user_question_id'),\n\t\t\t]);\n\t\t}\n\n\t\tif (Input::has('update'))\n\t\t{\n\t\t\t// update question and/or answer\n\t\t\t$apiResponse = $this->apiDispatcher->callApiRoute('api_update_user_question', [\n\t\t\t\t'auth_token' => $this->apiAuthToken,\n\t\t\t\t'id' => Input::get('user_question_id'),\n\t\t\t\t'question' => Input::get('question'),\n\t\t\t\t'answer' => Input::get('answer')\n\t\t\t]);\n\n\t\t\t/*\n\t\t\t * Store in session for next request only\n\t\t\t * This will force learning page to display concrete user question instead of random one,\n\t\t\t * and the answer div to be displayed so user can see updated fields\n\t\t\t */\n\t\t\tSession::flash('user_question_id', Input::get('user_question_id'));\n\t\t\tSession::flash('display_answer', true);\n\t\t}\n\n\t\t/*\n\t\t * Success API response\n\t\t */\n\t\tif (isset($apiResponse) && $apiResponse->getSuccess())\n\t\t{\n\t\t\t// redirect to learning page display user question\n\t\t\treturn Redirect::route('learning_page_display_user_question');\n\t\t}\n\n\t\t// unexpected API resppnse\n\t\tthrow new Exception('Unexpected API response');\n\t}", "public function testVenueSubmitSurvey()\n {\n $this->buildVenueSurvey();\n\n $venueG = $this->venueGroup;\n $venueQ = $this->venueQuestion;\n\n $response = $this->json('POST', 'survey/submit', [\n 'slot_id' => $this->slot->id,\n 'type' => Survey::TRAINING,\n 'survey' => [\n [\n 'survey_group_id' => $venueG->id,\n 'answers' => [\n [\n 'survey_question_id' => $venueQ->id,\n 'response' => 'a response'\n ]\n ]\n ],\n ]\n ]);\n\n $response->assertStatus(200);\n\n $this->assertDatabaseHas('survey_answer', [\n 'person_id' => $this->user->id,\n 'slot_id' => $this->slot->id,\n 'survey_question_id' => $venueQ->id,\n 'response' => 'a response'\n ]);\n }", "public function question_and_option_update()\n\t{\t\n\t\t$CI =& get_instance();\n\t\t$CI->auth->check_operator_auth();\n\t\t$CI->load->model('operator/Questions');\t\t\n\t\t$CI->Questions->question_and_option_update();\n\t\t$this->session->set_userdata(array('message'=>display('successfully_update')));\n\t\tredirect(base_url('operator/Oquestion'));\n\t}", "public function registration_questions() {\n\t\t// return $this->get_registration_token_list();\n\t\t$category = Category::with('questions')->where('name', 'registration')->first();\n\n\t\tif($this->categoryHasLessThanFiveQuestions($category)) {\n\t\t\treturn response()->json(['status' => false, 'code' => 200, 'message' => 'No questions for registration'], 200);\n\t\t}\n\n\t\t$questions = $category->questions->shuffle()->take(5)->sortBy('id')->values();\n\n\t\t$return_data = $this->format_according_to_multi_language($questions);\n\t\t$advertisement = Advertisement::active()->type('top')->category(3)->first();\n\t\t$return_data['advertisement'] = [\n\t\t\t'image' => $advertisement->image ?? '',\n\t\t\t'url' => $advertisement->url ?? '',\n\t\t];\n\n\t\t$this->sync_asked_questions_for_validation($questions);\n\n\t\treturn response()->json(['status' => true, 'code' => 200, 'data' => $return_data], 200);\n\t}", "public function testEmailUpdate(): void {\n\t\t$user = $this->createUser();\n\t\t$newEmail = 'b.cottagecheese@website.sk';\n\t\tPassport::actingAs($user);\n\t\t$response = $this->withHeaders([\n\t\t\t'Accept' => 'application/json',\n\t\t\t'Content-Type' => 'application/json',\n\t\t])->postJson($this->route.'/email/update', [\n\t\t\t'email' => $user->email,\n\t\t\t'email_update' => $newEmail]);\n\t\t$response->assertStatus(HttpStatus::STATUS_OK);\n\t\t$response->assertJson([\n\t\t\t'message' => 'We have e-mailed you your e-mail verification link!',\n\t\t]);\n\t\t$this->assertDatabaseHas('email_verification',[\n\t\t\t'user_id' => $user->id,\n\t\t\t'email_update' => $newEmail\n\t\t]);\n\t}", "public function testPostVoteOnQuestion(): void {\n $user = factory(User::class)->create();\n $q = factory(Question::class)->create();\n $url = \"/api/questions/$q->id\";\n //up and cancel\n $this->get(url(\"$url/votes\"))\n ->assertStatus(200)\n ->assertJsonFragment(['total' => 0]);\n $this->post(url(\"$url/upvote\"), ['api_token' => $user->api_token])\n ->assertStatus(200)\n ->assertJsonFragment(['total' => 1, 'up' => 1]);\n $this->post(url(\"$url/upvote\"), ['api_token' => $user->api_token])\n ->assertStatus(200)\n ->assertJsonFragment(['total' => 0, 'up' => 0]);\n //down and cancel\n $this->post(url(\"$url/downvote\"), ['api_token' => $user->api_token])\n ->assertStatus(200)\n ->assertJsonFragment(['total' => -1, 'down' => 1]);\n $this->post(url(\"$url/downvote\"), ['api_token' => $user->api_token])\n ->assertStatus(200)\n ->assertJsonFragment(['total' => 0, 'down' => 0]);\n // down up down\n $this->post(url(\"$url/downvote\"), ['api_token' => $user->api_token])\n ->assertStatus(200)\n ->assertJsonFragment(['total' => -1, 'down' => 1]);\n $this->post(url(\"$url/upvote\"), ['api_token' => $user->api_token])\n ->assertStatus(200)\n ->assertJsonFragment(['total' => 1, 'up' => 1]);\n $this->post(url(\"$url/downvote\"), ['api_token' => $user->api_token])\n ->assertStatus(200)\n ->assertJsonFragment(['total' => -1, 'down' => 1]);\n\n $this->get(url(\"$url/votes\"))\n ->assertStatus(200)\n ->assertJsonFragment(['total' => -1]);\n }", "public function update(Request $request, Questions $questions)\n {\n //\n }", "public function updatequestionAction(){\n\n try{\n\n\t\t global $objSession;\n\n\t\t $this->view->languages = $this->ModelObj->systemlanguage();\n\n\t\t $this->view->operatortype = $this->ModelObj->operatortype(); \n\n\t\t $this->view->addedquestions = $this->ModelObj->addedquestiondata($this->Request);\n\n\t\t if($this->_request->isPost()){\n\n\t\t if(!empty($this->Request['operators']) && count($this->Request['question'])>0){\n\n\t\t\t $this->ModelObj->updatequestions($this->Request);\t\n\n\t\t\t $objSession->successMsg = \"Record Updated Successfully\";\n\n\t\t\t $this->_redirect($this->_request->getControllerName().'/helpdesksetting'); \n\n\t\t }\n\n\t\t else{\n\n\t\t\t $objSession->errorMsg = \"Please enter question and select Operator!\";\n\n\t\t }\n\n\t\t}\n\n\t }\n\n\t \n\n\t catch (Exception $e) {\n\n $this->ModelObj->_logger->info('Class-'.__CLASS__.',Function-'.__FUNCTION__.',Line-'.__LINE__.',Error-'.$e->getMessage());\n\n }\n\n\t \n\n }", "public function optInAction()\n {\n\n $tokenYes = preg_replace('/[^a-zA-Z0-9]/', '', ($this->request->hasArgument('token_yes') ? $this->request->getArgument('token_yes') : ''));\n $tokenNo = preg_replace('/[^a-zA-Z0-9]/', '', ($this->request->hasArgument('token_no') ? $this->request->getArgument('token_no') : ''));\n $userSha1 = preg_replace('/[^a-zA-Z0-9]/', '', $this->request->getArgument('user'));\n\n /** @var \\RKW\\RkwRegistration\\Tools\\Registration $register */\n $register = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('RKW\\\\RkwRegistration\\\\Tools\\\\Registration');\n $check = $register->checkTokens($tokenYes, $tokenNo, $userSha1, $this->request, $data);\n\n // set hash value for changing subscriptions without login\n $hash = '';\n if ($check == 1) {\n\n $this->addFlashMessage(\n \\TYPO3\\CMS\\Extbase\\Utility\\LocalizationUtility::translate(\n 'subscriptionController.message.subscriptionSaved',\n 'rkw_newsletter'\n )\n );\n\n if (\n ($data['frontendUser'])\n && ($frontendUser = $data['frontendUser'])\n && ($frontendUser instanceof \\RKW\\RkwRegistration\\Domain\\Model\\FrontendUser)\n && ($frontendUser = $this->frontendUserRepository->findByIdentifier($frontendUser->getUid()))\n ) {\n /** @var \\RKW\\RkwNewsletter\\Domain\\Model\\FrontendUser $frontendUser */\n if (!$frontendUser->getTxRkwnewsletterHash()) {\n $hash = sha1($frontendUser->getUid() . $frontendUser->getEmail() . rand());\n $frontendUser->setTxRkwnewsletterHash($hash);\n $this->frontendUserRepository->update($frontendUser);\n\n } else {\n $hash = $frontendUser->getTxRkwnewsletterHash();\n }\n }\n\n\n } elseif ($check == 2) {\n\n $this->addFlashMessage(\n \\TYPO3\\CMS\\Extbase\\Utility\\LocalizationUtility::translate(\n 'subscriptionController.message.subscriptionCanceled',\n 'rkw_newsletter'\n )\n );\n\n if (\n ($data['frontendUser'])\n && ($frontendUser = $data['frontendUser'])\n && ($frontendUser instanceof \\RKW\\RkwRegistration\\Domain\\Model\\FrontendUser)\n && ($frontendUser = $this->frontendUserRepository->findByIdentifier($frontendUser->getUid()))\n ) {\n /** @var \\RKW\\RkwNewsletter\\Domain\\Model\\FrontendUser $frontendUser */\n $hash = $frontendUser->getTxRkwnewsletterHash();\n }\n\n } else {\n\n $this->addFlashMessage(\n \\TYPO3\\CMS\\Extbase\\Utility\\LocalizationUtility::translate(\n 'subscriptionController.error.subscriptionError',\n 'rkw_newsletter'\n ),\n '',\n \\TYPO3\\CMS\\Core\\Messaging\\AbstractMessage::ERROR\n );\n }\n\n $this->redirect('message', null, null, array('hash' => $hash));\n //===\n }", "public function testRegisterStudent()\n {\n $this->browse(function (Browser $browser){\n $browser->visit('/register')\n ->click('.slider__container')\n ->type('firstname', env('DUSK_NEW_FIRSTNAME'))\n ->type('lastname', env('DUSK_NEW_LASTNAME'))\n ->type('email', env('DUSK_NEW_USER_STUDENT'))\n ->type('verificateEmail', env('DUSK_NEW_USER_STUDENT'))\n ->type('password', env('DUSK_NEW_PASSWORD'))\n ->press('.button')\n ->assertPathIs('/');\n });\n }", "public function testWebinarRegistrantGet()\n {\n }", "public function testUpdateNotOwnCreated()\r\n {\r\n //create teacher user\r\n $teacher = $this->CreateTeacher();\r\n $lisUser = $this->CreateTeacherUser($teacher);\r\n\r\n //now we have created teacheruser set to current controller\r\n $this->controller->setLisUser($lisUser);\r\n $this->controller->setLisPerson($teacher);\r\n\r\n //create other teacher user\r\n $otherTeacher = $this->CreateTeacher();\r\n $otherLisUser = $this->CreateTeacherUser($otherTeacher);\r\n\r\n //$name = uniqid() . 'Name';\r\n $subjectRound = $this->CreateSubjectRound();\r\n $student = $this->CreateStudent();\r\n //$anotherTeacher = $this->CreateTeacher();\r\n \r\n\r\n $independentWork = $this->CreateIndependentWork([\r\n 'name' => uniqid() . 'Name',\r\n 'duedate' => new \\DateTime,\r\n 'description' => uniqid() . ' Description for independentwork',\r\n 'durationAK' => (int) uniqid(),\r\n 'subjectRound' => $subjectRound->getId(),\r\n 'teacher' => $teacher->getId(),\r\n 'student' => $student->getId(),\r\n 'createdBy' => $otherLisUser->getId()\r\n ]);\r\n\r\n //$subjectRoundIdOld = $independentWork->getSubjectRound()->getId();\r\n //$studentIdOld = $independentWork->getStudent()->getId();\r\n //$teacherIdOld = $independentWork->getTeacher()->getId();\r\n\r\n $this->request->setMethod('put');\r\n $this->routeMatch->setParam('id', $independentWork->getId());\r\n\r\n $this->request->setContent(http_build_query([\r\n 'student' => $this->CreateStudent()->getId(),\r\n 'subjectRound' => $this->CreateSubjectRound()->getId(),\r\n 'teacher' => $teacher->getId(),\r\n ]));\r\n\r\n //fire request\r\n $result = $this->controller->dispatch($this->request);\r\n $response = $this->controller->getResponse();\r\n\r\n $this->PrintOut($result, false);\r\n\r\n $this->assertEquals(200, $response->getStatusCode());\r\n $this->assertEquals(false, $result->success);\r\n $this->assertEquals('SELF_CREATED_RESTRICTION', $result->message);\r\n }", "public function update(Request $request){\n $validators=Validator::make($request->all(),[\n 'question'=>'required',\n 'answer'=>'required'\n ]);\n if($validators->fails()){\n return Response::json(['errors'=>$validators->getMessageBag()->toArray()]);\n }else{\n $q=CommonQuestion::where('id',$request->id)->where('user_id',Auth::user()->id)->first();\n if($q){\n $q->question=$request->question;\n $q->user_id=Auth::user()->id;\n $q->answer=$request->answer;\n $q->save();\n return Response::json(['success'=>'CommonQuestion updated successfully !']);\n }else{\n return Response::json(['error'=>'CommonQuestion not found !']);\n }\n }\n }", "public function update(RegistrationPostUpdatedEvent $event): void\n {\n }", "public function update(Request $request, pregunta_test $pregunta_test)\n {\n //\n }", "public function testQuestionSharev1questionsidQuestionanswer()\n {\n\n }", "public function update(Request $request, UserQuestion $userQuestion)\n {\n //\n }", "public function test_post_question() {\n global $DB;\n\n // Create user\n $user = $this->getDataGenerator()->create_user();\n\n // create a course\n $course = $this->getDataGenerator()->create_course();\n\n // enrol the user on the course\n $this->getDataGenerator()->enrol_user($user->id, $course->id, $DB->get_field('role', 'id', array(\n 'shortname' => 'student',\n )));\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n // enrol the user on the course\n $this->getDataGenerator()->enrol_user($user->id, $course->id, $DB->get_field('role', 'id', array(\n 'shortname' => 'student',\n )));\n\n $question = array(\n 'seconds' => '2',\n 'text' => 'dummy text'\n );\n\n $this->setUser($user);\n\n $client = new Client($this->_app);\n $client->request('POST', '/api/v1/' . $videoquanda->id . '/questions', array(), array(), array(), json_encode($question));\n\n $this->assertEquals(201, $client->getResponse()->getStatusCode());\n $this->assertEquals(1, $DB->count_records('videoquanda_questions', array('instanceid' => $videoquanda->id)));\n }", "public function testFriendsUpdateOut()\n {\n $result = $this->visit('account/friends/update/{id}')\n ->see('create your suaray account')\n ->see('welcome to suaray')\n ->seePageIs('/account/register');\n }", "public function testQuestionEditPostWithValidData() {\n //Select catalogs\n $catalog = $this->course->catalog()->first();\n $subcatalogs = $catalog->children()->get();\n $ids = array();\n \n foreach ($subcatalogs as $c) {\n $ids[] = $c->id;\n }\n\n\n $post_data = array(\n 'course' => $this->course->id,\n 'id' => $this->question->id,\n 'type' => 'Question z',\n 'question' => 'Question z',\n 'answer' => 'Question z',\n 'catalogs' => $ids\n );\n $response = $this->post('question/edit', $post_data);\n $this->assertEquals('200', $response->foundation->getStatusCode());\n $this->assertEquals('general.permission', $response->content->view);\n }", "public function testUpdateSiteMembershipRequestForPerson()\n {\n }", "public function testRegistrationExtraFields(): void { }", "public function testWrongFieldInstructorProfileUpdate() {\n try {\n\n $nonExistentInstructor = UserManagementController::updateInstructorProfile(\"gggggg\",\"686875\",\"ggggg@gmail.com\",\n \"gfhgjhk \",\"hjhkhkj\",\"ghgjhgj\",true,$this->institution->getAbbreviation(),\n \"Teacher572\");\n\n $this->fail(\"The exceptional profile update failed for non existing Instructor\");\n } catch (InfinityMetricsException $ime) {\n $errorFields = $ime->getErrorList();\n $this->assertNotNull($errorFields);\n $this->assertNotNull($errorFields[\"userNotFound\"]);\n }\n\n try {\n\n $wrongProjectNameFieldUpdate = UserManagementController::updateInstructorProfile(self::USERNAME,self::PASSWORD ,self::EMAIL\n ,self::FIRSTNAME,self::LASTNAME,\"ABC\"\n ,self::IS_OWNER,$this->institution->getAbbreviation(),self::IDENTIFICATION);\n\n $this->fail(\"The exceptional profile update failed for non existing Project of Instructor\");\n } catch (InfinityMetricsException $ime) {\n $errorFields = $ime->getErrorList();\n $this->assertNotNull($errorFields);\n $this->assertNotNull($errorFields[\"projectNotFound\"]);\n }\n\n try {\n\n $wrongInstitutionNameFieldUpdate = UserManagementController::updateInstructorProfile(self::USERNAME,self::PASSWORD ,self::EMAIL\n ,self::FIRSTNAME,self::LASTNAME,$this->project->getProjectJnName()\n ,self::IS_OWNER,\"ABCD\",self::IDENTIFICATION);\n\n $this->fail(\"The exceptional profile update failed for non existing Institution of Instructor\");\n } catch (InfinityMetricsException $ime) {\n $errorFields = $ime->getErrorList();\n $this->assertNotNull($errorFields);\n $this->assertNotNull($errorFields[\"institutionNotFound\"]);\n }\n }", "public function testIntegrationUpdate()\n {\n $userFaker = factory(Model::class)->create();\n $this->visit('user/' . $userFaker->slug . '/edit')\n ->type('Foo bar', 'name')\n ->type('Foobar', 'username')\n ->type('foo@bar.com', 'email')\n ->type('foobar123', 'password')\n ->type('foobar123', 'password_confirmation')\n ->press('Save')\n ->seePageIs('user');\n $this->assertResponseOk();\n $this->seeInDatabase('users', [\n 'username' => 'Foobar',\n 'email' => 'foo@bar.com'\n ]);\n $this->assertViewHas('models');\n }", "public function update(Request $request, question $question)\n {\n //\n }", "public function updateTask()\n\t{\n\t\t// Check if the user is logged in\n\t\tif (User::isGuest())\n\t\t{\n\t\t\tNotify::warning(Lang::txt('COM_MEMBERS_NOT_LOGGEDIN'));\n\n\t\t\tApp::redirect(\n\t\t\t\tRoute::url('index.php?option=com_users&view=login&return=' . base64_encode(Route::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller . 'task=' . $this->_task, false, true)), false)\n\t\t\t);\n\t\t\t//return App::abort(500, Lang::txt('COM_MEMBERS_REGISTER_ERROR_SESSION_EXPIRED'));\n\t\t}\n\n\t\t$force = false;\n\t\t$updateEmail = false;\n\n\t\t// Set the pathway\n\t\t$this->_buildPathway();\n\n\t\t// Set the page title\n\t\t$this->_buildTitle();\n\n\t\t// Instantiate a new registration object\n\t\t$xregistration = new \\Components\\Members\\Models\\Registration();\n\n\t\t$xprofile = Member::oneOrFail(User::get('id'));\n\n\t\t$hzal = \\Hubzero\\Auth\\Link::find_by_id(User::get('auth_link_id'));\n\n\t\t// Get users component config options, specifically whether or not 'simple' registration is enabled\n\t\t$method = Request::getMethod();\n\t\t$usersConfig = Component::params('com_members');\n\t\t$simpleRegistration = $usersConfig->get('simple_registration', false);\n\n\t\tif ($method == 'POST')\n\t\t{\n\t\t\t// Load POSTed data\n\t\t\t$xregistration->loadPost();\n\n\t\t\t// Incoming profile edits\n\t\t\t$profile = Request::getArray('profile', array(), 'post');\n\n\t\t\t// Compile profile data\n\t\t\tforeach ($profile as $key => $data)\n\t\t\t{\n\t\t\t\tif (isset($profile[$key]) && is_array($profile[$key]))\n\t\t\t\t{\n\t\t\t\t\t$profile[$key] = array_filter($profile[$key]);\n\t\t\t\t}\n\t\t\t\tif (isset($profile[$key . '_other']) && trim($profile[$key . '_other']))\n\t\t\t\t{\n\t\t\t\t\tif (is_array($profile[$key]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$profile[$key][] = $profile[$key . '_other'];\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$profile[$key] = $profile[$key . '_other'];\n\t\t\t\t\t}\n\n\t\t\t\t\tunset($profile[$key . '_other']);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Load data from the user object\n\t\t\t$xregistration->loadProfile($xprofile);\n\n\t\t\t$username = User::get('username');\n\t\t\t$email = User::get('email');\n\n\t\t\tif ($username[0] == '-' && is_object($hzal))\n\t\t\t{\n\t\t\t\t$sub_email = explode('@', (string) $hzal->email, 2);\n\t\t\t\t$tmp_username = Session::get('auth_link.tmp_username', $sub_email[0]);\n\t\t\t\t$xregistration->set('login', $tmp_username);\n\t\t\t\t$xregistration->set('orcid', Session::get('auth_link.tmp_orcid', ''));\n\t\t\t\t$xregistration->set('email', $hzal->email);\n\t\t\t\t$xregistration->set('confirmEmail', $hzal->email);\n\n\t\t\t\tif ($simpleRegistration)\n\t\t\t\t{\n\t\t\t\t\t$force = false;\n\t\t\t\t\t$method = 'POST';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$force = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Profile info\n\t\t\t$member = Member::oneOrNew(User::get('id'));\n\t\t\t$entries = $member->profiles();\n\n\t\t\t$p = $entries->getTableName();\n\t\t\t$f = \\Components\\Members\\Models\\Profile\\Field::blank()->getTableName();\n\t\t\t$o = \\Components\\Members\\Models\\Profile\\Option::blank()->getTableName();\n\n\t\t\t$profiles = $entries\n\t\t\t\t->select($p . '.*,' . $o . '.label')\n\t\t\t\t->join($f, $f . '.name', $p . '.profile_key', 'inner')\n\t\t\t\t->joinRaw($o, $o . '.field_id=' . $f . '.id AND ' . $o . '.value=' . $p . '.profile_value', 'left')\n\t\t\t\t->ordered()\n\t\t\t\t->rows();\n\n\t\t\t// Gather data to pass to the form processor\n\t\t\t$profile = \\Components\\Members\\Models\\Profile::collect($profiles);\n\n\t\t\t$xregistration->_registration['_profile'] = $profile;\n\t\t}\n\n\t\t$check = $xregistration->check('update');\n\n\t\t// Validate profile data\n\t\t$fields = \\Components\\Members\\Models\\Profile\\Field::all()\n\t\t\t->including(['options', function ($option){\n\t\t\t\t$option\n\t\t\t\t\t->select('*');\n\t\t\t}])\n\t\t\t->where('action_create', '!=', \\Components\\Members\\Models\\Profile\\Field::STATE_HIDDEN)\n\t\t\t->ordered()\n\t\t\t->rows();\n\n\t\t// Validate profile fields\n\t\tif ($fields->count())\n\t\t{\n\t\t\t$form = new \\Hubzero\\Form\\Form('profile', array('control' => 'profile'));\n\t\t\t$form->load(\\Components\\Members\\Models\\Profile\\Field::toXml($fields, 'create', $profile));\n\t\t\t$form->bind(new \\Hubzero\\Config\\Registry($profile));\n\n\t\t\tif (!$form->validate($profile))\n\t\t\t{\n\t\t\t\t$check = false;\n\n\t\t\t\tforeach ($form->getErrors() as $key => $error)\n\t\t\t\t{\n\t\t\t\t\tif ($error instanceof \\Hubzero\\Form\\Exception\\MissingData)\n\t\t\t\t\t{\n\t\t\t\t\t\t$xregistration->_missing[$key] = $error;\n\t\t\t\t\t}\n\n\t\t\t\t\t$xregistration->_invalid[$key] = $error;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (!$force && $check && $method == 'GET')\n\t\t{\n\t\t\tSession::set('registration.incomplete', false);\n\t\t\tif ($_SERVER['REQUEST_URI'] == rtrim(Request::base(true), '/') . '/register/update'\n\t\t\t || $_SERVER['REQUEST_URI'] == rtrim(Request::base(true), '/') . '/members/register/update')\n\t\t\t{\n\t\t\t\tApp::redirect(rtrim(Request::base(true), '/') . '/');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tApp::redirect($_SERVER['REQUEST_URI']);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tif (!$force && $check && $method == 'POST')\n\t\t{\n\t\t\t// Before going any further, we need to do a sanity check to make sure username isn't being changed.\n\t\t\t// This really only happens on a race condition where someone is creating the same account\n\t\t\t// using a 3rd party auth service in two different browsers. Yes, it's crazy!\n\t\t\tif ($xregistration->get('login') && substr(User::get('username'), 0, 1) == '-')\n\t\t\t{\n\t\t\t\t// Make sure the username hasn't since been set in the database\n\t\t\t\tif (substr(User::getInstance(User::get('id'))->get('username'), 0, 1) != '-')\n\t\t\t\t{\n\t\t\t\t\tApp::redirect(\n\t\t\t\t\t\tRoute::url('index.php?option=com_users&view=login&view=logout'),\n\t\t\t\t\t\tLang::txt('This account appears to already exist. Please try logging in again.'),\n\t\t\t\t\t\t'warning'\n\t\t\t\t\t);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$hubHomeDir = rtrim($this->config->get('homedir'), DS);\n\n\t\t\t$updateEmail = false;\n\n\t\t\tif ($xprofile->get('homeDirectory') == '')\n\t\t\t{\n\t\t\t\t$xprofile->set('homeDirectory', $hubHomeDir . DS . $xprofile->get('username'));\n\t\t\t}\n\n\t\t\tif ($xprofile->get('registerIP') == '')\n\t\t\t{\n\t\t\t\t$xprofile->set('registerIP', Request::getString('REMOTE_ADDR', '', 'server'));\n\t\t\t}\n\n\t\t\tif ($xprofile->get('registerDate') == '')\n\t\t\t{\n\t\t\t\t$xprofile->set('registerDate', Date::toSql());\n\t\t\t}\n\n\t\t\tif ($xregistration->get('email') != $xprofile->get('email'))\n\t\t\t{\n\t\t\t\tif (is_object($hzal) && $xregistration->get('email') == $hzal->email)\n\t\t\t\t{\n\t\t\t\t\t$xprofile->set('activation', 3);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$code = \\Components\\Members\\Helpers\\Utility::genemailconfirm();\n\t\t\t\t\t$xprofile->set('activation', $code);\n\t\t\t\t\t$updateEmail = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($xregistration->get('login') != $xprofile->get('username'))\n\t\t\t{\n\t\t\t\t$xprofile->set('homeDirectory', $hubHomeDir . DS . $xregistration->get('login'));\n\t\t\t}\n\n\t\t\t$keys = array('email', 'name', 'surname', 'givenName', 'middleName', 'usageAgreement', 'sendEmail', 'password');\n\t\t\tforeach ($keys as $key)\n\t\t\t{\n\t\t\t\tif ($xregistration->get($key) !== null)\n\t\t\t\t{\n\t\t\t\t\t$xprofile->set($key, $xregistration->get($key));\n\t\t\t\t}\n\t\t\t}\n\t\t\t$xprofile->set('username', $xregistration->get('login'));\n\n\t\t\tif ($xprofile->save())\n\t\t\t{\n\t\t\t\t$access = array();\n\t\t\t\tforeach ($fields as $field)\n\t\t\t\t{\n\t\t\t\t\t$access[$field->get('name')] = $field->get('access');\n\t\t\t\t}\n\n\t\t\t\t$profile = $xregistration->_registration['_profile'];\n\n\t\t\t\t// Save profile data\n\t\t\t\t$member = Member::oneOrNew($xprofile->get('id'));\n\t\t\t\tif (!$member->saveProfile($profile, $access))\n\t\t\t\t{\n\t\t\t\t\t\\Notify::error($member->getError());\n\t\t\t\t\t// Don't stop the registration process!\n\t\t\t\t\t// At this point, the account was successfully created.\n\t\t\t\t\t// The profile info, however, may have issues. But, it's not crucial.\n\t\t\t\t\t//$result = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Update current session if appropriate\n\t\t\t// TODO: update all session of this user\n\t\t\t// TODO: only update if changed\n\t\t\tif ($xprofile->get('id') == User::get('id'))\n\t\t\t{\n\t\t\t\t$suser = Session::get('user');\n\t\t\t\t$suser->set('username', $xprofile->get('username'));\n\t\t\t\t$suser->set('email', $xprofile->get('email'));\n\t\t\t\t$suser->set('name', $xprofile->get('name'));\n\t\t\t\tSession::set('user', $suser);\n\n\t\t\t\t// Update the session entry\n\t\t\t\t// @TODO: Use a model rather than direct query\n\t\t\t\t$database = App::get('db');\n\t\t\t\t$database->setQuery(\n\t\t\t\t\t\"UPDATE `#__session`\n\t\t\t\t\tSET `username`=\" . $database->quote($xprofile->get('username')) . \"\n\t\t\t\t\tWHERE `session_id`=\" . $database->quote(Session::getId())\n\t\t\t\t);\n\t\t\t\t$database->query();\n\t\t\t}\n\n\t\t\tSession::set('registration.incomplete', false);\n\n\t\t\t// Notify the user\n\t\t\tif ($updateEmail)\n\t\t\t{\n\t\t\t\t\\Components\\Members\\Helpers\\Utility::sendConfirmEmail($xprofile, $xregistration);\n\t\t\t}\n\n\t\t\t// Notify administration\n\t\t\tif ($method == 'POST')\n\t\t\t{\n\t\t\t\t$subject = Config::get('sitename') .' '.Lang::txt('COM_MEMBERS_REGISTER_EMAIL_ACCOUNT_UPDATE');\n\n\t\t\t\t$eaview = new \\Hubzero\\Component\\View(array(\n\t\t\t\t\t'name' => 'emails',\n\t\t\t\t\t'layout' => 'adminupdate'\n\t\t\t\t));\n\t\t\t\t$eaview->option = $this->_option;\n\t\t\t\t$eaview->controller = $this->_controller;\n\t\t\t\t$eaview->sitename = Config::get('sitename');\n\t\t\t\t$eaview->xprofile = $xprofile;\n\t\t\t\t$eaview->baseURL = $this->baseURL;\n\t\t\t\t$message = $eaview->loadTemplate();\n\t\t\t\t$message = str_replace(\"\\n\", \"\\r\\n\", $message);\n\t\t\t}\n\n\t\t\tif (!$updateEmail)\n\t\t\t{\n\t\t\t\t$suri = urldecode(Request::getString('return', ''));\n\t\t\t\tif (!$suri)\n\t\t\t\t{\n\t\t\t\t\t$suri = Request::getString('REQUEST_URI', '/', 'server');\n\t\t\t\t}\n\n\t\t\t\tif ($suri == '/register/update' || $suri == '/members/update' || $suri == '/members/register/update')\n\t\t\t\t{\n\t\t\t\t\t$suri = Route::url('index.php?option=' . $this->_option . '&task=myaccount');\n\t\t\t\t}\n\n\t\t\t\tApp::redirect(\n\t\t\t\t\t$suri\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Instantiate a new view\n\t\t\t\t$this->view\n\t\t\t\t\t->set('title', Lang::txt('COM_MEMBERS_REGISTER_UPDATE'))\n\t\t\t\t\t->set('sitename', Config::get('sitename'))\n\t\t\t\t\t->set('xprofile', $xprofile)\n\t\t\t\t\t->set('isSelf', true)\n\t\t\t\t\t->set('updateEmail', $updateEmail)\n\t\t\t\t\t->setErrors($this->getErrors())\n\t\t\t\t\t->display();\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn $this->_show_registration_form($xregistration, 'update');\n\t}", "public function testSchedulesUpdateOut()\n {\n $result = $this->visit('events/{event}/schedules/update/{id}')\n ->see('create your suaray account')\n ->see('welcome to suaray')\n ->seePageIs('/account/register');\n }", "public function testUserUpdate()\n {\n $this->browse(function (Browser $browser) {\n $update_button = self::$locator . ' td .update_button';\n\n self::$username = 'A0Tester' . uniqid();\n $browser->visit('/')\n ->click($update_button)\n ->type('username', self::$username)\n ->type('first_name', 'aaaab')\n ->type('last_name', 'aaaab')\n ->click('button[type=\"submit\"]')\n\n ->waitForText('User data successfully updated!')\n ->assertSee('User data successfully updated!')\n ->assertValue('input[name=\"username\"]', self::$username)\n ->assertValue('input[name=\"first_name\"]', 'aaaab')\n ->assertValue('input[name=\"last_name\"]', 'aaaab');\n });\n }", "public function test_post_question_as_guest() {\n global $DB;\n\n // create a course\n $course = $this->getDataGenerator()->create_course();\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n // set the instance of the 'guest' enrolment plugin to enabled\n $DB->set_field('enrol', 'status', ENROL_INSTANCE_ENABLED, array(\n 'courseid' => $course->id,\n 'enrol' => 'guest',\n ));\n\n // login as guest\n $this->setGuestUser();\n\n // create a dummy question to post\n $question = array(\n 'seconds' => '2',\n 'text' => 'dummy text'\n );\n\n // try to post a question\n $client = new Client($this->_app);\n $client->request('POST', '/api/v1/' . $videoquanda->id . '/questions', array(), array(), array(\n 'HTTP_X_REQUESTED_WITH' => 'XMLHttpRequest',\n ), json_encode($question));\n $this->assertTrue($client->getResponse()->isClientError());\n $this->assertEquals('application/json', $client->getResponse()->headers->get('Content-Type'));\n $this->assertEquals(get_string('jsonapi:submitquestionasguestdenied', $this->_app['plugin']), json_decode($client->getResponse()->getContent()));\n $this->assertEquals(0, $DB->count_records('videoquanda_questions', array('instanceid' => $videoquanda->id)));\n }", "public function updatecourseRegister(CourseRegister $courseRegister): bool\n {\n }", "public function test_updateReplenishmentProcessCustomFields() {\n\n }", "function testDoubleRegistration() {\n\t\t$pkey = Cgn_User::registerUser($this->user);\n\t\t$this->assertEqual(FALSE, $pkey);\n\t}", "public function testUpdateChallenge()\n {\n }", "public function testUserRegister()\n {\n //Voter user registration testing\n $this->browse(function (Browser $voter,$photographer,$organizer) {\n $voter->visit('/')\n ->clickLink('Register')\n ->assertSee('User Registration')\n ->value('#name','VoterTesting')\n ->value('#email','votertesting@gmail.com')\n ->value('#address','University of Moratuwa')\n ->Value('#telephone','0716485403')\n ->Value('#password','123456789')\n ->value('#password-confirm','123456789')\n ->click('.checker')\n ->check('condition')\n ->click('button[type=\"submit\"]')\n ->assertSee('LensView Timeline')\n ->clickLink('View Profile')\n ->assertTitle('LensView | User Profile')\n ->click('#deleteButton')\n ->value('input[type=\"password\"]','123456789')\n ->click('.btn-red');\n\n //Photographer user registration testing\n $photographer->visit('/')\n ->clickLink('Register')\n ->assertSee('User Registration')\n ->value('#name','PhotographerTesting')\n ->value('#email','photographertesting@gmail.com')\n ->value('#address','University of Moratuwa')\n ->Value('#telephone','0716485403')\n ->click('.role2')\n ->Value('#password','123456789')\n ->value('#password-confirm','123456789')\n ->click('.checker')\n ->check('condition')\n ->click('button[type=\"submit\"]')\n ->assertSee(\"Photographer Dashboard\")\n ->clickLink('View Profile')\n ->assertTitle('LensView | User Profile')\n ->click('#deleteButton')\n ->value('input[type=\"password\"]','123456789')\n ->click('.btn-red');\n \n\n // Contest Organizer registration testing\n $organizer->visit('/')\n ->clickLink('Register')\n ->assertSee('User Registration')\n ->value('#name','OrganizerTesting')\n ->value('#email','organizertesting@gmail.com')\n ->value('#address','University of Moratuwa')\n ->Value('#telephone','0716485403')\n ->click('.role3')\n ->Value('#password','123456789')\n ->value('#password-confirm','123456789')\n ->click('.checker')\n ->check('condition')\n ->click('button[type=\"submit\"]')\n ->assertSee(\"Organizer Dashboard\")\n ->clickLink('View Profile')\n ->assertTitle('LensView | User Profile')\n ->click('#deleteButton')\n ->value('input[type=\"password\"]','123456789')\n ->click('.btn-red');\n });\n}", "public function questionFormSucceeded($form) {\n $values = $form->getValues();\n $this->questions->update($values);\n }", "public function testRegistrationEmailAlreadyInUse(): void { }", "public function test_passed_registration()\n {\n\n $user = $this->user();\n\n $response = $this->post('api/v1/register', $user);\n $response->assertStatus(200);\n $response->assertJsonMissing([\n \"status\"=>'Failed'\n ]);\n\n }", "public function testUpdate()\n {\n\n // $payment = $this->payment\n // ->setEvent($this->eventId)\n // ->acceptCash()\n // ->acceptCheck()\n // ->acceptGoogle()\n // ->acceptInvoice()\n // ->acceptPaypal()\n // ->setCashInstructions($instructions)\n // ->setCheckInstructions($instructions)\n // ->setInvoiceInstructions($instructions)\n // ->setGoogleMerchantId($this->googleMerchantId)\n // ->setGoogleMerchantKey($this->googleMerchantKey)\n // ->setPaypalEmail($this->paypalEmail)\n // ->update();\n\n // $this->assertArrayHasKey('process', $payment);\n // $this->assertArrayHasKey('status', $payment['process']);\n // $this->assertTrue($payment['process']['status'] == 'OK');\n }", "public function update(Request $request, Question $question)\n {\n\n }", "public function test_changing_answer_from_other_user() {\n global $DB;\n\n // create user\n $user = $this->getDataGenerator()->create_user();\n\n // create a course\n $course = $this->getDataGenerator()->create_course();\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n $time = time();\n\n $this->loadDataSet($this->createArrayDataSet(array(\n 'videoquanda_questions' => array(\n array('id', 'instanceid', 'userid', 'timecreated', 'timemodified' ,'seconds', 'text'),\n array(1, $videoquanda->id, 99, $time, $time, 2, 'dummy text')\n ),\n 'videoquanda_answers' => array(\n array('id', 'questionid', 'userid', 'timecreated', 'timemodified', 'text'),\n array(1, 1, 1, $time, $time, 'dummy answer 1.')\n )\n )));\n\n $answer = array(\n 'text' => 'I have updated my answer.',\n 'timemodified' => time()\n );\n\n // enrol the user on the course\n $this->getDataGenerator()->enrol_user($user->id, $course->id, $DB->get_field('role', 'id', array(\n 'shortname' => 'student',\n )));\n\n // login the user\n $this->setUser($user);\n\n $client = new Client($this->_app);\n $client->request('PUT', '/api/v1/' . $videoquanda->id . '/questions/1/answers/1', array(), array(), array(), json_encode($answer));\n\n $this->assertEquals(405, $client->getResponse()->getStatusCode());\n $this->assertEquals($time, $DB->get_field('videoquanda_answers', 'timemodified', array('id' => 1)));;\n\n }", "public function update(Request $request, Question $question)\n {\n //\n }", "public function update(Request $request, Question $question)\n {\n //\n }", "public function update(Request $request, Question $question)\n {\n //\n }", "public function testApiRegistrationSimple()\n {\n $eventsFaker = Event::fake();\n $emailVerificationSend = Notification::fake();\n $uniqueData = $this->getTestRegisterData();\n $response = $this->withHeaders([ 'Authorization' => $this->getBearerClientToken() ])\n ->json('POST', $this->getRegisterRoute(), $uniqueData);\n\n $response->assertStatus(200)->assertJsonMissingValidationErrors();\n\n $responseArray = $response->decodeResponseJson()->json();\n $this->assertArrayNotHasKey('token_type', $responseArray);\n $this->assertArrayNotHasKey('expires_in', $responseArray);\n $this->assertArrayNotHasKey('access_token', $responseArray);\n $this->assertArrayNotHasKey('refresh_token', $responseArray);\n\n $user = CoreUser::byEmail($uniqueData[ 'email' ])->firstOrFail();\n $this->withoutExceptionHandling();\n\n if ( config('kit-auth.should_dispatch_registered_event') ) {\n $eventsFaker->assertDispatched(Registered::class,\n function (Registered $event) use ($emailVerificationSend) {\n app(ProcessEmailVerification::class)->handle($event);\n\n $emailVerificationSend->assertSentTo($event->user, VerifyEmail::class,\n function (VerifyEmail $notice) {\n $this->assertEquals($notice->requestSide, CoreUserContract::FRONTEND_REQUEST_SIDE);\n return $notice->tokens[ 'web' ] && $notice->tokens[ 'mobile' ];\n });\n\n return true;\n });\n } else {\n $eventsFaker->assertNotDispatched(Registered::class);\n }\n }", "public function testQuestionSharev1questions()\n {\n\n }", "public function update_security_question(){\n\t\t\t\n\t\t\t$this->load->library('form_validation');\n\t\t\t\n\t\t\t$this->form_validation->set_rules('question','Security Question','required|trim|xss_clean');\n\t\t\t$this->form_validation->set_rules('questionID','Question ID','required|trim|xss_clean');\n\t\t\t\n\t\t\t$this->form_validation->set_message('required', '%s cannot be blank!');\n\t\t\t\n\t\t\t$this->form_validation->set_error_delimiters('<div class=\"alert alert-danger text-danger text-center\"><i class=\"fa fa-exclamation-triangle\" aria-hidden=\"true\"></i> ', '</div>');\n\t\t\t \t\n\t\t\tif ($this->form_validation->run()){\n\t\t\t\t\n\t\t\t\t$questionID = $this->input->post('questionID');\n\t\t\t\t$id = preg_replace('#[^0-9]#i', '', $questionID); // filter everything but numbers\n\t\t\t\t\t\n\t\t\t\t$edit_data = array(\n\t\t\t\t\t'question' => ucfirst($this->input->post('question')),\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\tif ($this->Security_questions->update_question($edit_data, $id)){\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$data['success'] = true;\n\t\t\t\t\t$data['notif'] = '<div class=\"alert alert-success text-center\" role=\"alert\"> <i class=\"fa fa-check-circle\"></i><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">&times;</button> Question has been updated!</div>';\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else {\n\t\t\t\t$data['success'] = false;\n\t\t\t\t$data['notif'] = '<div class=\"alert alert-danger text-center\" role=\"alert\"><i class=\"fa fa-ban\"></i><button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-hidden=\"true\">&times;</button> There are errors on the form!'.validation_errors().'</div>';\n\t\t\t}\n\t\t\t// Encode the data into JSON\n\t\t\t$this->output->set_content_type('application/json');\n\t\t\t$data = json_encode($data);\n\n\t\t\t// Send the data back to the client\n\t\t\t$this->output->set_output($data);\n\t\t\t//echo json_encode($data);\t\t\t\n\t\t}", "public function update()\n {\n $data = Input::all();\n foreach (array_combine($data['question_id'], $data['question_name']) as $question_id => $question_name) {\n $question = Question::find($question_id);\n $question->question_name = $question_name;\n $question->save();\n }\n\n Flash::success('The question has been successfully updated!');\n return Redirect::action('AnswerController@edit', $question->exam_id);\n }", "public static function updateConfirm($aa_inst_id,$fb_user_id)\r\n {\r\n //update app_participation\r\n $lottery = new iCon_Lottery($aa_inst_id,getConfig('aa_app_id'));\r\n $id=$lottery->isUserParticipating($fb_user_id, $aa_inst_id) ;\r\n\r\n if($id != false)\r\n {\r\n $table=new Table_Participation();\r\n $table->load($id);\r\n $table->newsletter_doubleoptin =1;\r\n $table->save();\r\n }\r\n\r\n }", "public function testDeleteSurveyQuestion0()\n {\n }", "public function testDeleteSurveyQuestion0()\n {\n }", "public function testFailedAnswerAdd()\n {\n $this->artisan('migrate:refresh');\n $this->browse(function (Browser $browser) {\n factory(User::class, 2)->create();\n $users = User::All();\n $users->each(function ($user) {\n $profile = factory(Profile::class)->make();\n $user->profile()->save($profile);\n });\n $user = User::find(1);\n $question = new Question;\n $question->user_id = 2;\n $question->question = 'This is a sample question';\n $question->save();\n $browser->visit('/')\n ->clickLink('Login')\n ->assertPathIs('/login')\n ->type('email', $user->email)\n ->type('password', 'secretsecret')\n ->press('LOGIN');\n $browser->pause(1000)\n ->assertPathIs('/')\n ->click('@question')\n ->assertPathIs('/question/1')\n ->click('@addAnswer')\n ->type('answer', ' ')\n ->assertSee('Answer is required.')\n ->type('answer', str_random(1))\n ->assertSee('Answer must be between 10 and 500 characters long.')\n ->type('answer', str_random(501))\n ->assertSee('Answer must be between 10 and 500 characters long.');\n });\n }", "public function testShouldGenerateARegistrationSuccessfully() {\n \n $entity = new Registration;\n $entity->source_id = $this->getSource()->id;\n $entity->registrant_id = $this->getRegistrant()->id;\n $entity->type = 'PLAYER' ;\n $entity->league = 'league';\n $entity->org_name = 'Oranization...';\n $entity->org_state = 'NY';\n $entity->season = '2017';\n $entity->external_id = 'myexternalid';\n $entity->right_to_market = true;\n $entity->team_gender = 'Male';\n $entity->team_name = 'A-Team';\n $entity->school_district = 'school district';\n $entity->school_state = 'school sate';\n $entity->first_name = 'Firt name';\n $entity->middle_name = 'Middle name';\n $entity->last_name = 'Last Name';\n $entity->email = 'mail@mail.com';\n $entity->gender = 'Male';\n $entity->city = 'California';\n $entity->zip_code = '234141234123';\n $entity->birth_date = '11/27/1984';\n $entity->phone_number = '1234567890';\n $entity->game_type = 'SOME';\n $entity->level = 'LEVEL';\n $entity->state = 'CALIFORNIA';\n $entity->address_first_line = 'An Address 1234';\n $entity->county = 'A county';\n\n $entity->save();\n $this->assertTrue(!is_null($entity->id));\n }", "public function testVenueQuestionnaire()\n {\n $this->buildVenueSurvey();\n\n $response = $this->json('GET', \"survey/questionnaire\", ['slot_id' => $this->slot->id, 'type' => Survey::TRAINING]);\n $response->assertStatus(200);\n\n $survey = $this->survey;\n $venueGroup = $this->venueGroup;\n $venueQ = $this->venueQuestion;\n $trainerGroup = $this->trainerGroup;\n $trainerQ = $this->trainerQuestion;\n\n $response->assertJson([\n 'survey' => [\n 'id' => $survey->id,\n 'type' => Survey::TRAINING,\n 'year' => $survey->year,\n 'title' => $survey->title,\n ]\n ]);\n\n $response->assertJson([\n 'survey' => [\n 'survey_groups' => [\n [\n 'id' => $venueGroup->id,\n 'title' => $venueGroup->title,\n 'description' => $venueGroup->description,\n 'survey_questions' => [\n [\n 'id' => $venueQ->id,\n 'sort_index' => $venueQ->sort_index,\n 'type' => $venueQ->type,\n 'description' => $venueQ->description,\n ]\n ]\n ],\n\n [\n 'id' => $trainerGroup->id,\n 'title' => $trainerGroup->title,\n 'description' => $trainerGroup->description,\n 'survey_questions' => [\n [\n 'id' => $trainerQ->id,\n 'sort_index' => $trainerQ->sort_index,\n 'type' => $trainerQ->type,\n 'description' => $trainerQ->description,\n ]\n ]\n\n ]\n ]\n ]\n ]);\n\n $trainer = $this->trainer;\n\n $response->assertJson([\n 'trainers' => [\n [\n 'id' => $trainer->id,\n 'callsign' => $trainer->callsign,\n 'position_id' => Position::TRAINER\n ]\n ]\n ]);\n\n $slot = $this->slot;\n $response->assertJson([\n 'slot' => [\n 'id' => $slot->id,\n 'begins' => $slot->begins\n ]\n ]);\n //return response()->json(['survey' => $survey, 'trainers' => $trainers, 'slot' => $slot]);\n\n }", "public function testQuestionSharev1questionsidQuestion()\n {\n\n }", "public function test_changing_non_existing_answer() {\n global $DB;\n\n // create a user\n $user = $this->getDataGenerator()->create_user();\n\n // create a course\n $course = $this->getDataGenerator()->create_course();\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n $time = mktime(9, 0, 0, 11, 7, 2013);\n\n $this->loadDataSet($this->createArrayDataSet(array(\n 'videoquanda_questions' => array(\n array('id', 'instanceid', 'userid', 'timecreated', 'timemodified' ,'seconds', 'text'),\n array(1, $videoquanda->id, $user->id, $time, $time, 2, 'dummy text')\n ),\n 'videoquanda_answers' => array(\n array('id', 'questionid', 'userid', 'timecreated', 'timemodified', 'text'),\n array(1, 1, $user->id, $time, $time, 'dummy answer 1.')\n )\n )));\n\n $answer = array(\n 'text' => 'I have updated my answer.',\n 'timemodified' => time()\n );\n\n // enrol the user on the course\n $this->getDataGenerator()->enrol_user($user->id, $course->id, $DB->get_field('role', 'id', array(\n 'shortname' => 'student',\n )));\n\n // login the user\n $this->setUser($user);\n\n $client = new Client($this->_app);\n $client->request('PUT', '/api/v1/' . $videoquanda->id . '/questions/1/answers/2', array(), array(), array(), json_encode($answer));\n\n $this->assertEquals(404, $client->getResponse()->getStatusCode());\n $this->assertEquals($time, $DB->get_field('videoquanda_answers', 'timemodified', array('id' => 1)));\n }", "public function update(){\n var_dump(parent::update_register($_POST) ? header('location:?controller=factura&method=create'): 'Error al actualizar');\n\n die();\n }", "public function testTestBlockSubmitterRegistration ()\n {\n // This test assumes that you're logged in as manager or admin, and it\n // will leave as a manager.\n\n // First, set it to *NOT* allowed to register. Go to settings...\n $this->driver->get(ROOT_URL . '/src/settings?edit');\n\n // Find the element that defines the setting.\n $element = $this->driver->findElement(WebDriverBy::name('allow_submitter_registration'));\n if ($element->getAttribute('checked')) {\n // It's currently allowed. Turn it off!\n $element->click();\n $element = $this->driver->findElement(WebDriverBy::xpath('//input[@type=\"submit\"]'));\n $element->click();\n $this->chooseOkOnNextConfirmation();\n }\n\n // Log out, then check if element is gone indeed.\n $this->logout();\n\n // There should be no link to register yourself.\n // First, I had this findElements(), but Chrome doesn't like that at all, and times out.\n // Firefox anyway took quite some time, because of the timeout that we have set if elements are not found immediately (normally needed if pages load slowly).\n // $this->assertFalse((bool) count($this->driver->findElements(WebDriverBy::xpath('//a/b[text()=\"Register as submitter\"]'))));\n // New attempt to test for absence of register link.\n $this->assertFalse(strpos($this->driver->findElement(WebDriverBy::xpath('//table[@class=\"logo\"]//td[3]'))->getText(), 'Register as submitter'));\n\n // Not only the link should be gone. Also the form should no longer work.\n $this->driver->get(ROOT_URL . '/src/users?register');\n $this->driver->findElement(WebDriverBy::xpath('//table[@class=\"info\"]//td[contains(text(), \"Submitter registration is not active in this LOVD installation.\")]'));\n\n // Then, log in as a manager again, and enable the feature again. Then test again.\n $this->login('manager', 'test1234');\n\n // Change the setting back.\n $this->driver->get(ROOT_URL . '/src/settings?edit');\n $this->setCheckBoxValue(WebDriverBy::name('allow_submitter_registration'), true);\n $element = $this->driver->findElement(WebDriverBy::xpath('//input[@type=\"submit\"]'));\n $element->click();\n $this->chooseOkOnNextConfirmation();\n\n // Log out, and check if registration is allowed again.\n $this->logout();\n\n // Find the link to register yourself.\n $this->driver->findElement(WebDriverBy::xpath('//a/b[text()=\"Register as submitter\"]'));\n\n // Also verify the form still works.\n $this->driver->get(ROOT_URL . '/src/users?register');\n $this->driver->findElement(WebDriverBy::xpath('//input[contains(@value, \"I don\\'t have an ORCID ID\")]'));\n\n // Log back in, future tests may need it.\n $this->login('manager', 'test1234');\n }", "public function testCreateSurveyQuestion0()\n {\n }", "public function testCreateSurveyQuestion0()\n {\n }", "public function test_authenticated_admin_users_can_hit_the_update_endpoint()\n {\n // First we create a test country\n $country = $this->createCountry();\n\n // Then we check if it was successfully added into the database\n $this->assertDatabaseHas('countries', $country->toArray());\n\n // Then we create an update request with auth headers and empty params\n $this->authenticatedAdmin()->update($country->code, [])\n // We assert status is 422, because now we are authenticated, but request params are invalid\n ->assertStatus(422)\n // Then we assert errors structure matches expected\n ->assertJsonStructure([\n 'errors' => [\n 'name',\n 'code'\n ]\n ]);\n }", "public function testHandleUpdateValidationError()\n {\n // Populate data\n $this->_populate();\n \n // Request\n $response = $this->withSession($this->adminSession)\n ->call('POST', '/dealer-account/edit', $this->customDealerAccountData, [], [], ['HTTP_REFERER' => '/dealer-account/edit']);\n \n // Verify\n $this->assertRedirectedTo('/dealer-account/edit');\n $this->assertSessionHasErrors();\n }", "public function testQuestionEditExistingID() {\n $response = $this->get('question/' . $this->question->id . '/edit');\n $this->assertEquals('200', $response->foundation->getStatusCode());\n $this->assertEquals('general.permission', $response->content->view);\n }", "public function testRegistrationUITest()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/add_user')\n ->assertSee('Username')\n ->assertSee('First Name')\n ->assertSee('Last Name')\n ->assertSee('Password')\n ->assertSee('Confirm Password')\n ->assertSee('Role')\n ->assertSee('Save');\n });\n }", "public function testGetDuplicateVendorComplianceSurveyById()\n {\n }", "public function testEmailUpdateNewEmailAlreadyInUse(): void {\n\t\t$user = $this->createUser();\n\t\tPassport::actingAs($user);\n\t\t$response = $this->withHeaders([\n\t\t\t'Accept' => 'application/json',\n\t\t\t'Content-Type' => 'application/json',\n\t\t])->postJson($this->route.'/email/update', [\n\t\t\t'email' => $user->email,\n\t\t\t'email_update' => $user->email]);\n\t\t$response->assertStatus(HttpStatus::STATUS_UNPROCESSABLE_ENTITY);\n\t\t$response->assertJson([\n\t\t\t'message' => 'The given data was invalid.',\n\t\t\t'errors' => [\n\t\t\t\t'email_update' => [\n\t\t\t\t\t'The email update has already been taken.'\n\t\t\t\t]\n\t\t\t]\n\t\t]);\n\t\t$this->assertDatabaseMissing('email_verification',[\n\t\t\t'user_id' => $user->id,\n\t\t\t'email_update' => $user->email\n\t\t]);\n\t}", "public function testUpdateChallengeActivity()\n {\n }", "public function test_users_update_non_unique_email_error(){\n $this->signInUser();\n $this->user['email'] = 'admin@admin.com'; //assume correct test data\n $response = $this->patch(route('users.update', ['user' => 5]), $this->user); \n $response->assertSessionHasErrors(['email']);\n }", "function questionnaire_update_instance($questionnaire) {\n global $DB, $CFG;\n require_once($CFG->dirroot.'/mod/questionnaire/locallib.php');\n\n // Check the realm and set it to the survey if its set.\n if (!empty($questionnaire->sid) && !empty($questionnaire->realm)) {\n $DB->set_field('questionnaire_survey', 'realm', $questionnaire->realm, array('id' => $questionnaire->sid));\n }\n\n $questionnaire->timemodified = time();\n $questionnaire->id = $questionnaire->instance;\n\n // May have to add extra stuff in here.\n if (empty($questionnaire->useopendate)) {\n $questionnaire->opendate = 0;\n }\n if (empty($questionnaire->useclosedate)) {\n $questionnaire->closedate = 0;\n }\n\n if ($questionnaire->resume == '1') {\n $questionnaire->resume = 1;\n } else {\n $questionnaire->resume = 0;\n }\n\n // Field questionnaire->navigate used for branching questionnaires. Starting with version 2.5.5.\n /* if ($questionnaire->navigate == '1') {\n $questionnaire->navigate = 1;\n } else {\n $questionnaire->navigate = 0;\n } */\n\n // Get existing grade item.\n questionnaire_grade_item_update($questionnaire);\n\n questionnaire_set_events($questionnaire);\n\n return $DB->update_record(\"questionnaire\", $questionnaire);\n}", "function TestSave_getAnswers2(){\n \t$newAnswer = new Answer();\n \t$answerArray = array(array(\"elementId\" => 1, \"value\" => \"15\"), array(\"elementId\" => 2, \"value\" => \"0\"), array(\"elementId\" => 2, \"value\" => \"56\"), array(\"elementId\" => 2, \"value\" => \"29\"));\t\n \t$newAnswer->setAnswers($answerArray);\n \t$newAnswer->setRecipient(new User(1));\n \t$newAnswer->setFormId(4);\n \t$newAnswer->save();\n \t$newFormId = $newAnswer->getId();\n \t$newAnswer = new Answer($newFormId);\n \t$this->assertTrue($newAnswer->getAnswers() == $answerArray);\n }", "public function testAddVendorComplianceSurvey()\n {\n }", "public function test_users_update_short_confirmed_password_error(){\n $this->signInUser();\n $this->user['password_confirmation'] = str_repeat('A', 2);\n $response = $this->patch(route('users.update', ['user' => 5]), $this->user); \n $response->assertSessionHasErrors(['password_confirmation']);\n }", "public function updateQuestion($Question){\n\n\t\t$Result = new Result();\t\n\t\t$Result = $this->_QuestionDAO->updateQuestion($Question);\n\t\t\n\t\tif(!$Result->getIsSuccess())\n\t\t\t$Result->setResultObject(\"Database failure in QuestionDAO.updateQuestion()\");\t\t\n\n\t\treturn $Result;\n\t}" ]
[ "0.6326959", "0.6326959", "0.6215054", "0.6106913", "0.5868318", "0.5868318", "0.5843494", "0.58333194", "0.5764647", "0.5714424", "0.5704338", "0.570071", "0.570071", "0.56935734", "0.5648956", "0.5614041", "0.5593699", "0.5581167", "0.558031", "0.5559604", "0.5554796", "0.5537029", "0.551252", "0.5498532", "0.54832333", "0.5475688", "0.5472237", "0.5456587", "0.5448332", "0.5439653", "0.539906", "0.53848034", "0.53540844", "0.5335607", "0.53296477", "0.5321542", "0.52844864", "0.5281963", "0.52630144", "0.52541983", "0.5253555", "0.5239794", "0.5238306", "0.5215729", "0.5203376", "0.5189732", "0.5172184", "0.5168448", "0.5164286", "0.5162605", "0.51564133", "0.515628", "0.51545715", "0.5146508", "0.5140458", "0.51373565", "0.51160973", "0.5114457", "0.5112837", "0.5099367", "0.508781", "0.5084989", "0.50783014", "0.50769264", "0.50705963", "0.50484806", "0.5045053", "0.50395733", "0.50304055", "0.50304055", "0.50304055", "0.5029973", "0.5028773", "0.5022362", "0.50216025", "0.502088", "0.5014816", "0.5014816", "0.5011548", "0.5006302", "0.5006158", "0.50041074", "0.49992177", "0.49916682", "0.49911642", "0.49844697", "0.49844697", "0.49775553", "0.49735796", "0.49703628", "0.49699247", "0.49652055", "0.4961575", "0.49591392", "0.49479118", "0.4945627", "0.49440935", "0.494074", "0.4936233", "0.49331766" ]
0.81059843
0
Test case for webinarRegistrantStatus Update Webinar Registrant Status.
Тест-кейс для обновления статуса участника вебинара.
public function testWebinarRegistrantStatus() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update_organiser_status(){\r\n\t\t$this->organiser_model->update_organiser_status($_POST['status'],$_POST['organiser_id']);\r\n\t\t$this->send_status_email($_POST['status'],$_POST['organiser_id']);\r\n\t\techo \"1\";exit;\r\n\t}", "public function testWebinarUpdate()\n {\n }", "public function testWebinarStatus()\n {\n }", "public function testWebinarRegistrantQuestionUpdate()\n {\n }", "public function testWebinarRegistrants()\n {\n }", "public function testWebinarRegistrantGet()\n {\n }", "public function status(Request $request)\n {\n $urow = Registration::where(['id' => $request['Row_id']]);\n if ($urow!= null) {\n $urow->update(['status' => $request['status']]);\n return redirect()->action('FollowupController@index')->with('success', 'Successfully Updated!');\n } else {\n return redirect()->action('FollowupController@index')->with('failed', 'Successfully Updated!');\n }\n }", "public function update_status();", "public function testWebinarRegistrantCreate()\n {\n }", "function update_status()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t\n\t\tif(!empty($data['t']) && !empty($data['list'])) $response = $this->_tender->update_status($data['t'], explode('--',$data['list']));\n\t\t\n\t\t# all good\n\t\tif(!empty($response) && $response['boolean']){\n\t\t\t$data['msg'] = 'The Invitation for Bids/Quotations status has been updated.';\n\t\t\t$data['area'] = 'refresh_list_msg';\n\t\t} \n\t\t# there was an error\n\t\telse {\n\t\t\t$data['msg'] = (!empty($data['t']) && !empty($data['list']))? 'ERROR: There was an error updating the Invitation for Bids/Quotations status.': 'ERROR: This action can not be resolved';\n\t\t\t$data['area'] = 'basic_msg';\n\t\t}\n\t\t\n\t\t$this->load->view('addons/basic_addons', $data);\n\t}", "public function updateSubmissionStatus() {\n\n $updateStatus = Usersubmissionstatus::where('user_id', Auth::user()->id)\n ->where('quarter_id', Quarter::getRunningQuarter()->id)\n ->update(['status_id' => config('constant.status.L1_APPROVAL_PENDING')]);\n // Let's notify user and L1 about user submission status.\n return $this->sendMail(config('constant.email_status.INFORM_APPRAISEE'));\n }", "public function status() : void\n {\n $jwt = Auth::isValidToken($_COOKIE['SSID']);\n \n if (!$jwt) {\n View::jsonResponse(['status' => 401, 'message' => 'Access denied for you!']);\n }\n\n $data = [ 'status' => $_POST['status'], 'id' => $_POST['statusid']];\n $data = Validator::cleanData($data);\n (new Task())->update($data)->execute();\n header('location: user-profile');\n\n }", "public function testcall(){\n self::updateUserStatus(2,2);\n }", "public function test_should_deliver_status() {\n\n\t\t$webhook = LLMS_REST_API()->webhooks()->create( array(\n\t\t\t'delivery_url' => 'https://mock.tld',\n\t\t\t'topic' => 'student.created',\n\t\t) );\n\n\t\t// Inactive.\n\t\t$this->assertFalse( LLMS_Unit_Test_Util::call_method( $webhook, 'should_deliver', array( array( $this->factory->student->create() ) ) ) );\n\n\t\t// Active.\n\t\t$webhook->set( 'status', 'active' )->save();\n\t\t$this->assertTrue( LLMS_Unit_Test_Util::call_method( $webhook, 'should_deliver', array( array( $this->factory->student->create() ) ) ) );\n\n\t}", "public function testComAdobeGraniteResourcestatusImplStatusResourceProviderImpl()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.adobe.granite.resourcestatus.impl.StatusResourceProviderImpl';\n\n $crawler = $client->request('POST', $path);\n }", "public function ajaxMemberStatus() {\n\t\t$this->autoRender = false;\n\t\t$this->viewBuilder()->setLayout(false);\n\t\tif ($this->request->is('ajax')) {\n\t\t\t$id = $this->request->getData()['id'];\n\t\t\t$status = $this->request->getData()['status'];\n\t\t\t$data = $this->Users->get($id);\n\n\t\t\t$user = $this->Users->patchEntity($data, ['status' => $status]);\n\n\t\t\tif ($this->Users->save($user)) {\n\t\t\t\t$message = ($status == 1) ? 'Member is Active now.' : 'Member is InActive now.';\n\t\t\t\techo json_encode(array('status' => 'success', 'message' => $message));\n\t\t\t\texit;\n\t\t\t}\n\t\t\t$message = ($status == 1) ? 'Error while updating member status to Active.' : 'Error while updating member status to InActive.';\n\t\t\techo json_encode(array('status' => 'error', 'message' => $message));\n\t\t\texit;\n\t\t}\n\t}", "public function test_admin_status()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/DscMember', 'status']);\n $this->assertResponseCode(404);\n }", "public function testSuccessfulInstructorUpdate() {\n try {\n $updatedInstructor = UserManagementController::updateInstructorProfile(self::USERNAME,self::PASSWORD ,self::EMAIL\n ,self::FIRSTNAME,self::LASTNAME,$this->project->getProjectJnName()\n ,self::IS_OWNER,$this->institution->getAbbreviation(),self::IDENTIFICATION);\n\n $this->assertNotNull($updatedInstructor, \"The updated instructor is null\");\n $this->assertEquals($this->userTypeEnum->INSTRUCTOR, $updatedInstructor->getType(), \"The updated user is not\n an instance of INSTRUCTOR\");\n\n $InstructorInstitution = PersistentUserXInstitutionPeer::retrieveByPk($updatedInstructor->getUserId(),\n $this->institution->getInstitutionId());\n $this->assertNotNull($InstructorInstitution, \"The user x institution relation was not created for the instructor.\");\n $this->assertEquals(self::IDENTIFICATION, $InstructorInstitution->getIdentification(), \"The Instructor school\n identification is incorrect\");\n $this->assertEquals($updatedInstructor->getUserId(), $InstructorInstitution->getUserId(), \"The user id is\n incorrect on user x institution for the instructor\");\n $this->assertEquals($this->institution->getInstitutionId(), $InstructorInstitution->getInstitutionId(),\n \"The institution id is incorrect on user x institution for the instructor\");\n\n $instXProjec = PersistentUserXProjectPeer::retrieveByPK($updatedInstructor->getJnUsername(),\n $this->project->getProjectJnName());\n $this->assertNotNull($instXProjec, \"The relationship between instructor and project was not created\");\n $this->assertEquals($this->project->getProjectJnName(), $instXProjec->getProjectJnName(), \"The project name\n is incorrect on user x project\");\n $this->assertEquals($updatedInstructor->getJnUsername(), $instXProjec->getJnUsername(), \"The java.net\n username is incorrect on user x project for instructor\");\n $this->assertTrue($instXProjec->getIsOwner() == 1, \"The instructor is the owner of project.\");\n\n } catch (InfinityMetricsException $ime){\n $this->fail(\"The successful update of profile failed: \" . $ime);\n }\n\n }", "public function changestatus_post()\r\n {\r\n $userid=$this->uri->segment(3);\r\n\r\n $user=$this->user_m->get($userid);\r\n if($user->status==\"1\"){\r\n $data=array(\r\n \"status\"=> \"0\"\r\n );\r\n }\r\n else{\r\n $data=array(\r\n \"status\"=> \"1\"\r\n ); \r\n }\r\n if ($succes_status = $this->user_m->update_data($userid,$data)){\r\n if($user->status==\"1\"){\r\n $this->response(\r\n array(\r\n 'Status_code' => \"201\",\r\n 'Message' => \"User Deactivated\"\r\n )\r\n );\r\n }\r\n else{\r\n $this->response(\r\n array(\r\n 'Status_code' => \"201\",\r\n 'Message' => \"User Activated\"\r\n )\r\n ); \r\n }\r\n }\r\n else\r\n {\r\n $this->response(\r\n array(\r\n 'Status_code' => \"401\",\r\n 'Message' => \"ops something went wrong\"\r\n )\r\n ); \r\n }\r\n }", "public function changeStatus($u_status,$delivery_id){\n $sql=\"UPDATE `deliveries` SET `delivery_status`='$u_status' WHERE delivery_id='$delivery_id'\";\n $result=$this->conn->query($sql);\n if($result==true){\n header(\"location:delivery.php?success=1&message=You successfully updated the status.\");\n }else{\n header(\"location:delivery.php?success=0&message=Error occured in delivery table. Try it agin.\");\n }\n }", "public function updateAllergyStatus(AllergyStatusRequest $request)\r\n {\r\n $allergy = $this->allergy->changeStatus($request);\r\n $message = trans('message.allergy_started_successfully');\r\n\r\n if(!$allergy->status) {\r\n $message = trans('message.allergy_discontinued_successfully');\r\n }\r\n\r\n return $this->respond([\r\n 'status' => 'success',\r\n 'message'=> $message\r\n ]);\r\n }", "protected function getRecordRegistrationStatus() {}", "function updateStatus(){\n $serv_ID=$this->uri->segment(3);\n $status=$this->input->post('status');\n if ($this->deliveryAndPickupModel->updateCustService($serv_ID, $status)) {\n echo \"<script>alert('Successfully Updated');window.location.href='\".site_url('deliveryAndPickupController/acceptServRequest/'.$serv_ID.'').\"';</script>\";\n }\n else\n {\n echo \"<script>alert('Something when wrong');window.location.href='\".site_url('deliveryAndPickupController/acceptServRequest/'.$serv_ID.'').\"';</script>\";\n }\n }", "public function update(Request $request, PregnancyStatus $pregnancyStatus)\n {\n //\n }", "public function testWebinarPollUpdate()\n {\n }", "function change_status_to() {\n $stat_param = array(\n 'status' => $this->uri->segment(3)\n );\n $id = $this->uri->segment(4);\n $updt_status = $this->guest_post_model->change_status_to('newsletter', $stat_param, $id);\n if ($updt_status) {\n $this->session->set_userdata('success_msg', 'Status Updated susseccfully.');\n } else {\n $this->session->set_userdata('error_msg', 'Cannot update status.');\n }\n redirect('news_letter_cont');\n }", "public function updateUserStatus($email) {\n $registry = new Registry();\n // Database\n $db = new DB(DB_DRIVER, DB_HOSTNAME, DB_USERNAME, DB_PASSWORD, DB_DATABASE);\n $registry->set('db', $db);\n $db->query(\"UPDATE \" . DB_PREFIX . \"customer SET status = 1, approved = 1 WHERE LOWER(email) = '\" . $db->escape(utf8_strtolower($email)) . \"'\");\n }", "function setStatus( $status )\n {\n\t if (is_int($status)) {\n\t\t \n\t\t switch ( $status ) {\n\t\t\t \n\t\t\t case RowManager_RegistrationManager::STATUS_REGISTERED:\n\t\t\t \t$this->setValueByFieldName( 'registration_status', $status );\n\t\t\t \tbreak;\t\t\t \t\n\t\t\t case RowManager_RegistrationManager::STATUS_INCOMPLETE:\n\t\t\t \t$this->setValueByFieldName( 'registration_status', $status );\n\t\t\t \tbreak;\t\t\t \t\n\t\t\t case RowManager_RegistrationManager::STATUS_CANCELLED:\n\t\t\t \t$this->setValueByFieldName( 'registration_status', $status );\n\t\t\t \tbreak;\n\t\t\t case RowManager_RegistrationManager::STATUS_UNASSIGNED:\n\t\t\t \t$this->setValueByFieldName( 'registration_status', $status );\n\t\t\t \tbreak;\n\t\t }\n\n\t\t}\n\t}", "public function locationChangeStatus(Request $request) {\n $data = [\n 'status' => $request->status,\n ];\n\n $userCount = User::where('location_id',$request->locationid)->count();\n $userLocationCount = UserLocation::where('location_id',$request->locationid)->count();\n $salesAgentCount = Salesagentdetail::where('location_id',$request->locationid)->count();\n\n if(($userCount > 0 || $userLocationCount > 0 || $salesAgentCount > 0) && $request->status =='inactive') {\n return response()->json([ 'status' => 'error', 'message'=> 'Unable to deactivat of location, due to this location assigned to users.' ]);\n } else {\n\n $updateStatus = Salescenterslocations::where('id', $request->locationid)->update($data);\n\n if ($updateStatus) {\n if ($request->status =='active') {\n $message='Sales center location successfully activated.';\n } else {\n $message='Sales center location successfully deactivated';\n }\n return response()->json([ 'status' => 'success', 'message' => $message]);\n } else {\n return response()->json([ 'status' => 'error', 'message'=> 'Unable to update location' ]);\n }\n }\n }", "public function update(Request $request,PropertyStatus $propertyStatus)\n {\n $attribute = $request->validate([\n 'property_status'=>'required'\n ]);\n\n $attribute['updated_by'] = auth()->user()->name;;\n \n $propertyStatus->update($attribute); \n\n Session::flash('success',\"Registro actualizado satisfactoriamente\");\n\n return redirect()->route('property_status.index');\n }", "public function travel_conditions_status() {\n\t\t$id = $this->uri->segment(4);\n\t\t$status = $this->uri->segment(5);\n\t\tCheckAdminLoginSession();\t\t\n\t\t$data['status'] = $status;\t\t\t\t \t \t\t \n\t\t$this->admin_model->setUpdateData($this->travel,$data,$id);\n\t\t$this->session->set_flashdata('message','Your status has been update successfully');\n\t\tredirect('admin/travel-conditions/lists','refresh');\t\t\n\t}", "public function testUpdateStatusByUserId()\n {\n $session = $this->objectManager->create(\\Magento\\Security\\Model\\AdminSessionInfo::class);\n /** @var $session \\Magento\\Security\\Model\\AdminSessionInfo */\n $session->getResource()->updateStatusByUserId(\n \\Magento\\Security\\Model\\AdminSessionInfo::LOGGED_OUT_BY_LOGIN,\n 1,\n [1],\n [1],\n '2016-01-19 12:00:00'\n );\n $collection = $session->getResourceCollection()\n ->addFieldToFilter('main_table.user_id', 1)\n ->addFieldToFilter('main_table.status', \\Magento\\Security\\Model\\AdminSessionInfo::LOGGED_OUT_BY_LOGIN)\n ->load();\n $count = $collection->count();\n $this->assertGreaterThanOrEqual(1, $count);\n }", "public function setStatusTrue($event_id,$user_id,$subgroup_id) {\n\t\tDB::table('event_user')\n\t\t\t->where('myevent_id', $event_id)\n\t\t\t->where('user_id', $user_id)\n\t\t\t->where('subgroup_id', $subgroup_id)\n\t\t\t->update(array('status' => 1));\n\n\t\treturn Redirect::to(URL::previous());\n\t}", "public function update(EstablishmentRegisterRequest $request, $id)\n {\n $data = Establishment::byId($id)->with('users')->firstOrFail();\n $data->status = $request->input('status') ? \"1\" : \"0\";\n $data->branch_no = $request->input('branch_no');\n $data->save();\n \n // Update the user data\n if (isset($data->users)) {\n $data->users()->update(['active' => $data->status]);\n }\n \n return trans('governments_registeration.updated');\n }", "public function update(){\n var_dump(parent::update_register($_POST) ? header('location: ?controller=admin'): 'Error al actualizar');\n\n die();\n }", "function citrixonline_create_registrant_of_webinar($webinar_id=false, $data = array(), $all_fields_chk = false) \n {\n\t\tif($webinar_id and isset($data['first_name']) and isset($data['last_name']) and isset($data['email']))\n\t\t{\n\t\t\t$params = array();\n\t\t\t\n\t\t\t$fields = array(\n\t\t\t\t'firstName'=>$data['first_name'],\n\t\t\t\t'lastName'=>$data['last_name'],\n\t\t\t\t'email'=>$data['email'],\n );\n\t\t\t\n\t\t\t$params[CURLOPT_HTTPHEADER] = array('Accept: application/json', 'Content-Type: application/json', 'Authorization: OAuth oauth_token='.$this->access_token);\n\t\t\t$params[CURLOPT_POSTFIELDS] = json_encode($fields);\n\t\t\t\n\t\t\t$reponse = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/{$webinar_id}/registrants\", $params), true);\n\t\t\t\n\t\t\tif(isset($reponse['registrantKey']))\n\t\t\t\treturn $reponse;\n\t\t}\n\t\t\n\t\treturn false;\t\t\t\n\t}", "public function updateCommunityMemberStatus() {\n $community_id = $this->request->params ['named'] ['community_id'];\n $community_owner = $this->Community->find('first', array(\n 'conditions' => array('Community.id' => $community_id),\n 'fields' => array('Community.created_by')\n ));\n $community_owner = $community_owner['Community']['created_by'];\n $user_id = $this->request->params ['named'] ['user_id'];\n $status = $this->request->params ['named'] ['status'];\n $current_user = $this->Auth->user('id');\n $conditions = array(\n 'CommunityMember.user_id' => $user_id,\n 'CommunityMember.community_id' => $community_id\n );\n $current_user_type = $this->CommunityMember->getCommunityMemberUserType($community_id, $current_user);\n if ($this->CommunityMember->hasAny($conditions) && $current_user_type >= CommunityMember::USER_TYPE_ADMIN) {\n $communityMemberRecordId = $this->CommunityMember->find('first', array(\n 'conditions' => $conditions,\n 'fields' => array('CommunityMember.id')\n ));\n $communityMemberRecordId = $communityMemberRecordId['CommunityMember']['id'];\n $requested_user = $this->User->getUserDetails($user_id);\n $requested_user['user_name'] = Common::getUsername($requested_user['user_name'], $requested_user['first_name'], $requested_user['last_name']);\n switch ($status) {\n case 'add':\n //setting staus to Approved.\n\t\t\t\t\t$set_status = 1;\n\t\t\t\t\t$updateCommunityMember = array(\n\t\t\t\t\t\t'CommunityMember' => array(\n\t\t\t\t\t\t\t'id' => $communityMemberRecordId,\n\t\t\t\t\t\t\t'status' => $set_status,\n\t\t\t\t\t\t\t'joined_on' => Date::getCurrentDateTime()\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t\t$this->CommunityMember->save($updateCommunityMember);\n\n\t\t\t\t\t//Community follow data\n\t\t\t\t\t$followCommunityData = array(\n\t\t\t\t\t\t'type' => FollowingPage::COMMUNITY_TYPE,\n\t\t\t\t\t\t'page_id' => $community_id,\n\t\t\t\t\t\t'user_id' => $user_id,\n\t\t\t\t\t\t'notification' => FollowingPage::NOTIFICATION_ON\n\t\t\t\t\t);\t\t\t\t\t\n\t\t\t\t\t$this->FollowingPage->followPage($followCommunityData);\n\n\t\t\t\t\t$updated_member_count = $this->Community->changeMemberCount($community_id, 1);\n\t\t\t\t\t$result_message = $requested_user['user_name'] . \" has been added as a member to the community.\";\n\t\t\t\t\t$result = array(\n\t\t\t\t\t\t'success' => 'success',\n\t\t\t\t\t\t'member_count' => $updated_member_count,\n\t\t\t\t\t\t'message' => $result_message\n\t\t\t\t\t);\n break;\n case 'ignore':\n //Reject the request. Delete the entry from table.\n\t\t\t\t\tif ($this->CommunityMember->delete($communityMemberRecordId)) {\n\t\t\t\t\t\t//Community unfollow data\n\t\t\t\t\t\t$followCommunityData = array(\n\t\t\t\t\t\t\t'type' => FollowingPage::COMMUNITY_TYPE,\n\t\t\t\t\t\t\t'page_id' => $community_id,\n\t\t\t\t\t\t\t'user_id' => $user_id\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->FollowingPage->unFollowPage($followCommunityData);\n\n\t\t\t\t\t\t$result_message = $requested_user['user_name'] . \" is denied from joining the community.\";\n\t\t\t\t\t\t$result = array(\n\t\t\t\t\t\t\t'success' => 'success',\n\t\t\t\t\t\t\t'message' => $result_message\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n case 'update_admin':\n //update member type to admin or remove the existing secondary admin\n if ($community_owner == $current_user && $user_id != $community_owner) {\n $memberTypeNow = $this->CommunityMember->getCommunityMemberUserType($community_id, $user_id);\n if ($memberTypeNow == CommunityMember::USER_TYPE_MEMBER) {\n $setMemberType = CommunityMember::USER_TYPE_ADMIN;\n $result_message = \"You have set \" . $requested_user['user_name'] . \" as a secondary admin for this community.\";\n } else {\n $setMemberType = CommunityMember::USER_TYPE_MEMBER;\n $result_message = $requested_user['user_name'] . \" is removed from the secondary admin list of this community.\";\n }\n $updateCommunityMember = array(\n 'CommunityMember' => array(\n 'id' => $communityMemberRecordId,\n 'user_type' => $setMemberType\n )\n );\n $this->CommunityMember->save($updateCommunityMember);\n $this->sendMailToNewSecondaryAdmin($community_id, $user_id, $setMemberType); //send mail to new added secondary admin.\n $result = array(\n 'success' => 'success',\n 'message' => $result_message\n );\n } else {\n $result = array(\n 'success' => 'danger',\n 'message' => 'Cannot change member type'\n );\n }\n break;\n default :\n $result = array(\n 'success' => 'danger',\n 'message' => 'invalid status'\n );\n break;\n exit;\n }\n } else {\n $result = array(\n 'success' => 'danger',\n 'message' => 'The user is not a member of the Community.'\n );\n }\n print_r(json_encode($result));\n exit;\n }", "public function test_passed_registration()\n {\n\n $user = $this->user();\n\n $response = $this->post('api/v1/register', $user);\n $response->assertStatus(200);\n $response->assertJsonMissing([\n \"status\"=>'Failed'\n ]);\n\n }", "public function setRegistrant($value) {\n\t\tself::$_registrant = $value;\n\t}", "function updatePaymentStatus(){\r\n $payment = new managePaymentModel();\r\n $payment->cust_ID = $_SESSION['cust_ID'];\r\n $payment->updatePaymentStatus();\r\n }", "public function executeChangePracticeAreaStatus(sfWebRequest $request)\n {\n\t\tif(clsCommon::chkDataExist(\"WebsitePracticeArea\", $request->getParameter('id'), $this->getUser()->getAttribute('personalWebsiteId')))\n\t\t{\n\t\t\t$snId \t\t= \t$request->getParameter('id');\n\t\t\t$ssStatus \t= \t$request->getParameter('status');\n\t\t\t$oWebsitePracticeArea = new WebsitePracticeArea();\n\t\t\t$oWebsitePracticeArea->changeStatus($snId, $ssStatus);\n\n\t\t\tif($ssStatus == sfConfig::get(\"app_Status_Active\"))\n\t\t\t$successMessage = \"active\";\n\t\t\telse\n\t\t\t$successMessage = \"inactive\";\n\n\t\t\t$this->getUser()->setFlash(\"succMsg\",'Status successfully changed to '.$successMessage.'.');\n\n\t\t\t$this->redirect('WebsitePracticeArea/index');\n }\n else\n\t\t{\n\t\t\t$this->getUser()->setFlash(\"errMsg\",sfConfig::get('app_Permission_Message'));\n\t\t\t$this->redirect('default/index');\n\t\t}\n }", "function update_user_status($id, $pref, $value, $deprecated = \\null)\n {\n }", "function changeStatusQualfications($post,$deviceType,$appVersion,$OSVersion,$browserVersion){\n\n $con=connectToDB(); //connect to the DB\n mysql_query('SET NAMES UTF8');\t\t\n $StatusID=$post['StatusID'];\n\t$QualificationID=$post['QualificationID'];\n\t\n\t\n\t $errorMsg=\"Error in updation\";\n\t\t$result2 = mysql_query(\"SELECT * FROM SCP_Qualification_Staff WHERE QualificationID='\".$QualificationID.\"'\")or die(mysql_error());\n\t\t$num_rows = mysql_num_rows($result2);\n\t\t\n\n\t\tif($num_rows>0){\n\t\t $result = '';\n\t\t $errorMsg = 'Sorry, you do not deactivate this Qualification, it is already assigned to some staff.';\n\t\t}else{\n\t\t \t$sql2=\"UPDATE `SCP_Qualification` SET `StatusID` = '\".$StatusID.\"' WHERE `QualificationID` = '\".$QualificationID.\"'\";\t \n $result = mysql_query($sql2) or die(mysql_error());\n\t\t}\n\t\t\t\n if($result) {\n $data['responseData'] = '';\n $data['message'] = \"Updated successfully\";\n $data['responseCode'] = \"200\";\n $data['status'] = \"1\";\n } else {\n $data['responseData'] = '';\n $data['message'] = $errorMsg;\n $data['responseCode'] = \"200\";\n $data['status'] = \"0\";\n }\n print json_encode($data);\n mysql_close($con); //close the connection\n}", "public function testStatusConfirm()\n {\n\n }", "public function onRegistrantApproved(MeetingRegistrantApproved $event) {\n\n $registrant = $this->getRegistrantFromEvent($event);\n\n if(!empty($registrant)){\n $this->logEvent($event);\n\n try{\n foreach ($registrant->occurrences as $occurrence){\n if(is_array($occurrence)){\n $occurrence = (object)$occurrence;\n }\n RegistrantModel::whereMeetingId($registrant->meeting_id)->whereRegistrantId($registrant->registrant_id)->whereOccurrenceId($occurrence->occurrence_id)->update(['status' => 'approved']);\n }\n\n event(new SendApproveRegistrant($registrant));\n $this->logFinishEvent();\n }catch (\\Exception $exception){\n $this->logFailedEvent($exception);\n }\n }else{\n $this->logNotFoundEvent();\n }\n\n\n\n }", "public static function LogInStatusUpdate($status)\n {\t\n\t\t$loginstatuschange = \\App\\AppUser::where('email',\\Auth::guard('appUser')->user()->email )->update(array('login_status'=>$status));\n\t\treturn $loginstatuschange;\n\t\t//return 1; \n }", "function updateNotificationStatus($userData)\n\t\t{\n\t\t\t//update status\n\t\t\t$update = $this->manageContent->updateValueWhere('notification_info', 'view_status', 1, 'notification_id', $userData['noti_id']);\n\t\t\techo $update;\n\t\t}", "public function testUpdateSiteMembershipRequestForPerson()\n {\n }", "public function onChangeStatus(){\n \n if (($groupId = post('groupId')) != ''){\n \n $group = UserGroup::findOrFail($groupId);\n \n if (($status = post('status')) != ''){\n $user = $this->getuser();\n \n switch ($status){\n case UserGroup::MEMBERSHIP_ACCEPTED:\n $group->acceptMembership($user);\n break;\n \n case UserGroup::MEMBERSHIP_REJECTED:\n \t$group->rejectMembership($user);\n \tbreak;\n \t\n \tcase UserGroup::MEMBERSHIP_CANCELLED:\n \t\t$group->cancelMembership($user);\n \t\tbreak; \t \n \n } \n }\n }\n \n \n // Updated list of request and other vars\n $this->prepareVars();\n }", "public function UserListChangeStatus(): void{\n \n if(!ArtworkVerifier::setStatusList($_POST) || !Session::isLogin()){\n exit;\n }\n \n if(isset(UserList::where('user_list.user_id', Session::getUser()['id'])->where('user_list.artwork_id', $_POST['artwork_id'])->getOne()->id)){\n UserList::values([ 'user_list.status' => $_POST['status'] ])\n ->where('user_id' ,Session::getUser()['id'])\n ->where('artwork_id', $_POST['artwork_id'])\n ->update();\n exit;\n }\n }", "public function updatestatus($client_id,$salescenter_id,Request $request)\n {\n\n $user = User::find($request->userid);\n $user->status = $request->status;\n $user->save();\n return redirect()->route('client.salescenter.users',['client_id' => $client_id,'salescenter_id' =>$salescenter_id ])\n ->with('success','User successfully updated.');\n }", "public function test_wp_create_user_request_confirmed_status() {\n\t\t$actual = wp_create_user_request( self::$non_registered_user_email, 'export_personal_data', array(), 'confirmed' );\n\t\t$post = get_post( $actual );\n\n\t\t$this->assertSame( 'request-confirmed', $post->post_status );\n\t}", "public function change_promocodes_status(){\n\t\tif ($this->checkLogin('A') == ''){\n\t\t\tredirect(ADMIN_PATH);\n\t\t}else {\n\t\t\t$mode = $this->uri->segment(4,0);\n\t\t\t$promocode_id = $this->uri->segment(5,0);\n\t\t\t$status = ($mode == '0')?'Inactive':'Active';\n\t\t\t$newdata = array('status' => $status);\n\t\t\t$condition = array('id' => $promocode_id);\n\t\t\t$this->promocodes_model->update_details(PROMOCODES,$newdata,$condition);\n\t\t\t$this->setErrorMessage('success','Promocode Status Changed Successfully');\n\t\t\tredirect(ADMIN_PATH.'/promocodes/display_promocodes');\n\t\t}\n\t}", "public function updateStatus() {\n $ref = ORM::forTable('referrals')\n ->findOne($this->data['id']);\n if ($this->data['status'] == 'Assigned' && $this->data['route_id']) {\n $route = ORM::forTable('estimate_routes')\n ->findOne($this->data['route_id']);\n $assignedReferralsCount = ORM::forTable('referrals')\n ->select('id')\n ->where('route_id', $route->id)\n ->count();\n $ref->route_id = $this->data['route_id'];\n $ref->status = 'Assigned';\n $ref->route_order = $assignedReferralsCount;\n\n } elseif ($this->data['status'] == 'Pending') {\n $ref->status = 'Pending';\n $ref->route_order = 0;\n $ref->route_id = NULL;\n } else {\n $ref->status = $this->data['status'];\n }\n if ($ref->save()) {\n $this->renderJson([\n 'success' => true,\n 'message' => 'Job request status updated successfully'\n ]);\n } else {\n $this->renderJson([\n 'success' => false,\n 'message' => 'An error has occurred while saving job request'\n ]);\n }\n }", "function updateReservationStatus($codigo_reserva) {\r\n\r\n global $connect;\r\n\r\n $sql_update_query = \"UPDATE reserva SET estado=1 WHERE (codigo_reserva = '$codigo_reserva');\";\r\n\r\n // Realizamos la consulta a la tabla \r\n $updated = $connect->executeIDU($sql_update_query);\r\n\r\n if (!$updated) { \r\n echo \"no se pudo acceder a la base\";\r\n return false;\r\n }\r\n\r\n }", "static function set_invite_status(RowUpdate &$upd, RowResult $entity, $status) {\r\n $link_name = null;\r\n\r\n if ($entity->base_model == 'User') {\r\n $link_name = 'users';\r\n } elseif ($entity->base_model == 'Contact') {\r\n $link_name = 'contacts';\r\n }\r\n\r\n if ($link_name != null) {\r\n $id = $entity->getField('id');\r\n $params[$id] = array('name' => 'accept_status', 'value' => $status);\r\n $upd->addUpdateLink($link_name, $id, $params);\r\n }\r\n }", "public function updateRegister(Gest $dto): bool\n {\n }", "function change_status_to() {\n $stat_param = array(\n 'status' => $this->uri->segment(3)\n );\n $id = $this->uri->segment(4);\n $updt_status = $this->news_letter_model->change_status_to('newsletter', $stat_param, $id);\n if ($updt_status) {\n $this->session->set_userdata('success_msg', 'Status Updated susseccfully.');\n } else {\n $this->session->set_userdata('error_msg', 'Cannot update status.');\n }\n redirect('news_letter_cont');\n }", "public function check_and_update_license_status() {\n\n\t\tswitch ( $status = $this->client->get_status() ) {\n\n\t\t\tcase 'valid' :\n\t\t\tcase 'expired' :\n\t\t\t\t$this->set_license_status( $status );\n\t\t\t\tbreak;\n\t\t\tcase 'site_inactive' :\n\t\t\t\tif ( ! is_wp_error( $this->client->activate() ) ) {\n\t\t\t\t\t$this->set_license_status( 'valid' );\n\t\t\t\t} else {\n\t\t\t\t\t$this->set_license_status( $status );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\t$this->set_license_status( 'invalid' );\n\t\t\t\tbreak;\n\n\t\t}\n\n\t}", "public function actionUpdateStatus()\n { \n $user_id = Yii::$app->user->identity->id;\n $model = Users::find()->where(['id'=>$user_id])->one();\n $model->step_validate = 2;\n $model->load(Yii::$app->getRequest()->getBodyParams(), '');\n if ($model->validate()) {\n $model->save();\n $response = \\Yii::$app->getResponse();\n $response->setStatusCode(202);\n return $model->getUsersStatusValues();\n }\n else {\n throw new HttpException(422, json_encode($model->errors, JSON_UNESCAPED_UNICODE));\n }\n }", "function change_status()\n {\n //Create Model Object\n $groupObj=new groupModel();\n \n //change status\n $groupObj->changeStatus();\n\n $msg=\"Group Type status has been activated successfully\";\n if($_GET['newstatus']=='0')\n {\n $msg=\"Group Type status has been deactivated successfully\";\n }\n\n echo json_encode(array(\"result\" => \"success\",\"title\" => \"Group Status\",\"message\" => $msg));\n exit();\n }", "public function restaurant_update_status($restaurant_id = '') {\n\t global $foodbakery_plugin_options;\n\t $foodbakery_restaurants_review_option = isset($foodbakery_plugin_options['foodbakery_restaurants_review_option']) ? $foodbakery_plugin_options['foodbakery_restaurants_review_option'] : '';\n\n\t $get_restaurant_id = foodbakery_get_input('restaurant_id', 0);\n\t $is_updating = false;\n\t if ($get_restaurant_id != '' && $get_restaurant_id != 0 && $this->is_publisher_restaurant($get_restaurant_id)) {\n\t\t$is_updating = true;\n\t }\n\n\t $user_data = wp_get_current_user();\n\n\t if ($foodbakery_restaurants_review_option == 'on') {\n\t\tupdate_post_meta($restaurant_id, 'foodbakery_restaurant_status', 'awaiting-activation');\n\t\t// Restaurant not approved\n\t\tdo_action('foodbakery_restaurant_not_approved_email', $user_data, $restaurant_id);\n\t } else {\n\t\tupdate_post_meta($restaurant_id, 'foodbakery_restaurant_status', 'active');\n\t\t// Restaurant approved\n\t\tdo_action('foodbakery_restaurant_approved_email', $user_data, $restaurant_id);\n\n\t\t// social sharing\n\t\t$get_social_reach = get_post_meta($restaurant_id, 'foodbakery_transaction_restaurant_social', true);\n\t\tif ($get_social_reach == 'on') {\n\t\t do_action('foodbakery_restaurant_social_post', $restaurant_id);\n\t\t}\n\t }\n\n\t $foodbakery_free_restaurants_switch = isset($foodbakery_plugin_options['foodbakery_free_restaurants_switch']) ? $foodbakery_plugin_options['foodbakery_free_restaurants_switch'] : '';\n\n\t if ($foodbakery_free_restaurants_switch != 'on') {\n\n\t\t$foodbakery_package_id = get_post_meta($restaurant_id, 'foodbakery_restaurant_package', true);\n\t\tif ($foodbakery_package_id) {\n\t\t $foodbakery_package_data = get_post_meta($foodbakery_package_id, 'foodbakery_package_data', true);\n\n\t\t $restaurant_duration = isset($foodbakery_package_data['restaurant_duration']['value']) ? $foodbakery_package_data['restaurant_duration']['value'] : 0;\n\n\t\t // calculating restaurant expiry date\n\t\t $foodbakery_trans_restaurant_expiry = $this->date_conv($restaurant_duration, 'days');\n\t\t update_post_meta($restaurant_id, 'foodbakery_restaurant_expired', strtotime($foodbakery_trans_restaurant_expiry));\n\t\t}\n\t }\n\t}", "public function updateTask()\n\t{\n\t\t// Check if the user is logged in\n\t\tif (User::isGuest())\n\t\t{\n\t\t\tNotify::warning(Lang::txt('COM_MEMBERS_NOT_LOGGEDIN'));\n\n\t\t\tApp::redirect(\n\t\t\t\tRoute::url('index.php?option=com_users&view=login&return=' . base64_encode(Route::url('index.php?option=' . $this->_option . '&controller=' . $this->_controller . 'task=' . $this->_task, false, true)), false)\n\t\t\t);\n\t\t\t//return App::abort(500, Lang::txt('COM_MEMBERS_REGISTER_ERROR_SESSION_EXPIRED'));\n\t\t}\n\n\t\t$force = false;\n\t\t$updateEmail = false;\n\n\t\t// Set the pathway\n\t\t$this->_buildPathway();\n\n\t\t// Set the page title\n\t\t$this->_buildTitle();\n\n\t\t// Instantiate a new registration object\n\t\t$xregistration = new \\Components\\Members\\Models\\Registration();\n\n\t\t$xprofile = Member::oneOrFail(User::get('id'));\n\n\t\t$hzal = \\Hubzero\\Auth\\Link::find_by_id(User::get('auth_link_id'));\n\n\t\t// Get users component config options, specifically whether or not 'simple' registration is enabled\n\t\t$method = Request::getMethod();\n\t\t$usersConfig = Component::params('com_members');\n\t\t$simpleRegistration = $usersConfig->get('simple_registration', false);\n\n\t\tif ($method == 'POST')\n\t\t{\n\t\t\t// Load POSTed data\n\t\t\t$xregistration->loadPost();\n\n\t\t\t// Incoming profile edits\n\t\t\t$profile = Request::getArray('profile', array(), 'post');\n\n\t\t\t// Compile profile data\n\t\t\tforeach ($profile as $key => $data)\n\t\t\t{\n\t\t\t\tif (isset($profile[$key]) && is_array($profile[$key]))\n\t\t\t\t{\n\t\t\t\t\t$profile[$key] = array_filter($profile[$key]);\n\t\t\t\t}\n\t\t\t\tif (isset($profile[$key . '_other']) && trim($profile[$key . '_other']))\n\t\t\t\t{\n\t\t\t\t\tif (is_array($profile[$key]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$profile[$key][] = $profile[$key . '_other'];\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$profile[$key] = $profile[$key . '_other'];\n\t\t\t\t\t}\n\n\t\t\t\t\tunset($profile[$key . '_other']);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Load data from the user object\n\t\t\t$xregistration->loadProfile($xprofile);\n\n\t\t\t$username = User::get('username');\n\t\t\t$email = User::get('email');\n\n\t\t\tif ($username[0] == '-' && is_object($hzal))\n\t\t\t{\n\t\t\t\t$sub_email = explode('@', (string) $hzal->email, 2);\n\t\t\t\t$tmp_username = Session::get('auth_link.tmp_username', $sub_email[0]);\n\t\t\t\t$xregistration->set('login', $tmp_username);\n\t\t\t\t$xregistration->set('orcid', Session::get('auth_link.tmp_orcid', ''));\n\t\t\t\t$xregistration->set('email', $hzal->email);\n\t\t\t\t$xregistration->set('confirmEmail', $hzal->email);\n\n\t\t\t\tif ($simpleRegistration)\n\t\t\t\t{\n\t\t\t\t\t$force = false;\n\t\t\t\t\t$method = 'POST';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$force = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Profile info\n\t\t\t$member = Member::oneOrNew(User::get('id'));\n\t\t\t$entries = $member->profiles();\n\n\t\t\t$p = $entries->getTableName();\n\t\t\t$f = \\Components\\Members\\Models\\Profile\\Field::blank()->getTableName();\n\t\t\t$o = \\Components\\Members\\Models\\Profile\\Option::blank()->getTableName();\n\n\t\t\t$profiles = $entries\n\t\t\t\t->select($p . '.*,' . $o . '.label')\n\t\t\t\t->join($f, $f . '.name', $p . '.profile_key', 'inner')\n\t\t\t\t->joinRaw($o, $o . '.field_id=' . $f . '.id AND ' . $o . '.value=' . $p . '.profile_value', 'left')\n\t\t\t\t->ordered()\n\t\t\t\t->rows();\n\n\t\t\t// Gather data to pass to the form processor\n\t\t\t$profile = \\Components\\Members\\Models\\Profile::collect($profiles);\n\n\t\t\t$xregistration->_registration['_profile'] = $profile;\n\t\t}\n\n\t\t$check = $xregistration->check('update');\n\n\t\t// Validate profile data\n\t\t$fields = \\Components\\Members\\Models\\Profile\\Field::all()\n\t\t\t->including(['options', function ($option){\n\t\t\t\t$option\n\t\t\t\t\t->select('*');\n\t\t\t}])\n\t\t\t->where('action_create', '!=', \\Components\\Members\\Models\\Profile\\Field::STATE_HIDDEN)\n\t\t\t->ordered()\n\t\t\t->rows();\n\n\t\t// Validate profile fields\n\t\tif ($fields->count())\n\t\t{\n\t\t\t$form = new \\Hubzero\\Form\\Form('profile', array('control' => 'profile'));\n\t\t\t$form->load(\\Components\\Members\\Models\\Profile\\Field::toXml($fields, 'create', $profile));\n\t\t\t$form->bind(new \\Hubzero\\Config\\Registry($profile));\n\n\t\t\tif (!$form->validate($profile))\n\t\t\t{\n\t\t\t\t$check = false;\n\n\t\t\t\tforeach ($form->getErrors() as $key => $error)\n\t\t\t\t{\n\t\t\t\t\tif ($error instanceof \\Hubzero\\Form\\Exception\\MissingData)\n\t\t\t\t\t{\n\t\t\t\t\t\t$xregistration->_missing[$key] = $error;\n\t\t\t\t\t}\n\n\t\t\t\t\t$xregistration->_invalid[$key] = $error;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (!$force && $check && $method == 'GET')\n\t\t{\n\t\t\tSession::set('registration.incomplete', false);\n\t\t\tif ($_SERVER['REQUEST_URI'] == rtrim(Request::base(true), '/') . '/register/update'\n\t\t\t || $_SERVER['REQUEST_URI'] == rtrim(Request::base(true), '/') . '/members/register/update')\n\t\t\t{\n\t\t\t\tApp::redirect(rtrim(Request::base(true), '/') . '/');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tApp::redirect($_SERVER['REQUEST_URI']);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tif (!$force && $check && $method == 'POST')\n\t\t{\n\t\t\t// Before going any further, we need to do a sanity check to make sure username isn't being changed.\n\t\t\t// This really only happens on a race condition where someone is creating the same account\n\t\t\t// using a 3rd party auth service in two different browsers. Yes, it's crazy!\n\t\t\tif ($xregistration->get('login') && substr(User::get('username'), 0, 1) == '-')\n\t\t\t{\n\t\t\t\t// Make sure the username hasn't since been set in the database\n\t\t\t\tif (substr(User::getInstance(User::get('id'))->get('username'), 0, 1) != '-')\n\t\t\t\t{\n\t\t\t\t\tApp::redirect(\n\t\t\t\t\t\tRoute::url('index.php?option=com_users&view=login&view=logout'),\n\t\t\t\t\t\tLang::txt('This account appears to already exist. Please try logging in again.'),\n\t\t\t\t\t\t'warning'\n\t\t\t\t\t);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$hubHomeDir = rtrim($this->config->get('homedir'), DS);\n\n\t\t\t$updateEmail = false;\n\n\t\t\tif ($xprofile->get('homeDirectory') == '')\n\t\t\t{\n\t\t\t\t$xprofile->set('homeDirectory', $hubHomeDir . DS . $xprofile->get('username'));\n\t\t\t}\n\n\t\t\tif ($xprofile->get('registerIP') == '')\n\t\t\t{\n\t\t\t\t$xprofile->set('registerIP', Request::getString('REMOTE_ADDR', '', 'server'));\n\t\t\t}\n\n\t\t\tif ($xprofile->get('registerDate') == '')\n\t\t\t{\n\t\t\t\t$xprofile->set('registerDate', Date::toSql());\n\t\t\t}\n\n\t\t\tif ($xregistration->get('email') != $xprofile->get('email'))\n\t\t\t{\n\t\t\t\tif (is_object($hzal) && $xregistration->get('email') == $hzal->email)\n\t\t\t\t{\n\t\t\t\t\t$xprofile->set('activation', 3);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$code = \\Components\\Members\\Helpers\\Utility::genemailconfirm();\n\t\t\t\t\t$xprofile->set('activation', $code);\n\t\t\t\t\t$updateEmail = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($xregistration->get('login') != $xprofile->get('username'))\n\t\t\t{\n\t\t\t\t$xprofile->set('homeDirectory', $hubHomeDir . DS . $xregistration->get('login'));\n\t\t\t}\n\n\t\t\t$keys = array('email', 'name', 'surname', 'givenName', 'middleName', 'usageAgreement', 'sendEmail', 'password');\n\t\t\tforeach ($keys as $key)\n\t\t\t{\n\t\t\t\tif ($xregistration->get($key) !== null)\n\t\t\t\t{\n\t\t\t\t\t$xprofile->set($key, $xregistration->get($key));\n\t\t\t\t}\n\t\t\t}\n\t\t\t$xprofile->set('username', $xregistration->get('login'));\n\n\t\t\tif ($xprofile->save())\n\t\t\t{\n\t\t\t\t$access = array();\n\t\t\t\tforeach ($fields as $field)\n\t\t\t\t{\n\t\t\t\t\t$access[$field->get('name')] = $field->get('access');\n\t\t\t\t}\n\n\t\t\t\t$profile = $xregistration->_registration['_profile'];\n\n\t\t\t\t// Save profile data\n\t\t\t\t$member = Member::oneOrNew($xprofile->get('id'));\n\t\t\t\tif (!$member->saveProfile($profile, $access))\n\t\t\t\t{\n\t\t\t\t\t\\Notify::error($member->getError());\n\t\t\t\t\t// Don't stop the registration process!\n\t\t\t\t\t// At this point, the account was successfully created.\n\t\t\t\t\t// The profile info, however, may have issues. But, it's not crucial.\n\t\t\t\t\t//$result = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Update current session if appropriate\n\t\t\t// TODO: update all session of this user\n\t\t\t// TODO: only update if changed\n\t\t\tif ($xprofile->get('id') == User::get('id'))\n\t\t\t{\n\t\t\t\t$suser = Session::get('user');\n\t\t\t\t$suser->set('username', $xprofile->get('username'));\n\t\t\t\t$suser->set('email', $xprofile->get('email'));\n\t\t\t\t$suser->set('name', $xprofile->get('name'));\n\t\t\t\tSession::set('user', $suser);\n\n\t\t\t\t// Update the session entry\n\t\t\t\t// @TODO: Use a model rather than direct query\n\t\t\t\t$database = App::get('db');\n\t\t\t\t$database->setQuery(\n\t\t\t\t\t\"UPDATE `#__session`\n\t\t\t\t\tSET `username`=\" . $database->quote($xprofile->get('username')) . \"\n\t\t\t\t\tWHERE `session_id`=\" . $database->quote(Session::getId())\n\t\t\t\t);\n\t\t\t\t$database->query();\n\t\t\t}\n\n\t\t\tSession::set('registration.incomplete', false);\n\n\t\t\t// Notify the user\n\t\t\tif ($updateEmail)\n\t\t\t{\n\t\t\t\t\\Components\\Members\\Helpers\\Utility::sendConfirmEmail($xprofile, $xregistration);\n\t\t\t}\n\n\t\t\t// Notify administration\n\t\t\tif ($method == 'POST')\n\t\t\t{\n\t\t\t\t$subject = Config::get('sitename') .' '.Lang::txt('COM_MEMBERS_REGISTER_EMAIL_ACCOUNT_UPDATE');\n\n\t\t\t\t$eaview = new \\Hubzero\\Component\\View(array(\n\t\t\t\t\t'name' => 'emails',\n\t\t\t\t\t'layout' => 'adminupdate'\n\t\t\t\t));\n\t\t\t\t$eaview->option = $this->_option;\n\t\t\t\t$eaview->controller = $this->_controller;\n\t\t\t\t$eaview->sitename = Config::get('sitename');\n\t\t\t\t$eaview->xprofile = $xprofile;\n\t\t\t\t$eaview->baseURL = $this->baseURL;\n\t\t\t\t$message = $eaview->loadTemplate();\n\t\t\t\t$message = str_replace(\"\\n\", \"\\r\\n\", $message);\n\t\t\t}\n\n\t\t\tif (!$updateEmail)\n\t\t\t{\n\t\t\t\t$suri = urldecode(Request::getString('return', ''));\n\t\t\t\tif (!$suri)\n\t\t\t\t{\n\t\t\t\t\t$suri = Request::getString('REQUEST_URI', '/', 'server');\n\t\t\t\t}\n\n\t\t\t\tif ($suri == '/register/update' || $suri == '/members/update' || $suri == '/members/register/update')\n\t\t\t\t{\n\t\t\t\t\t$suri = Route::url('index.php?option=' . $this->_option . '&task=myaccount');\n\t\t\t\t}\n\n\t\t\t\tApp::redirect(\n\t\t\t\t\t$suri\n\t\t\t\t);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Instantiate a new view\n\t\t\t\t$this->view\n\t\t\t\t\t->set('title', Lang::txt('COM_MEMBERS_REGISTER_UPDATE'))\n\t\t\t\t\t->set('sitename', Config::get('sitename'))\n\t\t\t\t\t->set('xprofile', $xprofile)\n\t\t\t\t\t->set('isSelf', true)\n\t\t\t\t\t->set('updateEmail', $updateEmail)\n\t\t\t\t\t->setErrors($this->getErrors())\n\t\t\t\t\t->display();\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn $this->_show_registration_form($xregistration, 'update');\n\t}", "public function testUpdateSiteMembership()\n {\n }", "private function changeStatusCareOrg() {\n if ($this->get_request_method() != \"POST\") {\n $error = array('status_code' => \"0\", 'message' => \"wrong method\", 'response_code' => \"406\");\n $this->response($this->json($error), 406);\n }\n\n $arr = array();\n if(@$_POST['reqparams']) {\n $post = $_POST['reqparams'];\n $UserID = $post['UserID'];\n $StatusID = $post['StatusID'];\n } else {\n $UserID = $_POST['UserID'];\n $StatusID = $_POST['StatusID'];\n }\n\n mysql_query(\"UPDATE `SCP_UserLogin` SET `StatusID`='$StatusID' WHERE `UserID` = '$UserID'\", $this->db);\n mysql_query(\"UPDATE `SCP_CareOrg` SET `StatusID`='$StatusID' WHERE `UserID` = '$UserID'\", $this->db);\n mysql_query(\"UPDATE `SCP_UserAccess` SET `StatusID`='$StatusID' WHERE `UserID` = '$UserID'\", $this->db);\n\n $success = true;\n\n if ($success) {\n $error = array('status_code' => \"1\", 'status' => \"success\", 'message' => \"Changed Organization Status Successfully\", 'response_code' => \"200\", 'response_data' => $arr);\n $this->response($this->json($error), 200);\n } else {\n $error = array('status_code' => \"0\", 'status' => \"error\", 'message' => \"validation error\", 'response_code' => \"200\", 'response_data' => $arr);\n $this->response($this->json($error), 200);\n }\n }", "public function userLiveStatusUpdate_post() {\n $this->form_validation->set_rules('ContestGUID', 'ContestGUID', 'trim|required|callback_validateEntityGUID[Contest,ContestID]');\n $this->form_validation->set_rules('UserGUID', 'UserGUID', 'trim|callback_validateEntityGUID[User,UserID]');\n $this->form_validation->set_rules('UserStatus', 'UserStatus', 'trim|required|in_list[Yes,No]');\n $this->form_validation->set_rules('SeriesGUID', 'SeriesGUID', 'trim|required|callback_validateEntityGUID[Series,SeriesID]');\n $this->form_validation->validation($this); /* Run validation */\n $AuctionStatus = $this->SnakeDrafts_model->userLiveStatusUpdate($this->Post, $this->ContestID, $this->UserID, $this->SeriesID);\n if ($AuctionStatus) {\n $this->Return['Message'] = \"User status successfully updated.\";\n $this->Return['Data']['DraftUserLiveTime'] = date('Y-m-d H:i:s');\n } else {\n $this->Return['ResponseCode'] = 500;\n $this->Return['Message'] = \"User status already updated.\";\n }\n }", "public function admin_status($id = '', $status = '') {\n\n $this->checkAccess('Promocode', 'can_edit');\n $id = base64_decode($id);\n\n $is_valid = true;\n $name = $email = '';\n if('' == $id || '' == $status){\n $is_valid = false;\n }else{\n $check_user_exists = $this->Promocode->Find('first', array('fields' => array('Promocode.code'), 'conditions' => array('Promocode.id' => $id)));\n if (empty($check_user_exists)) {\n $is_valid = false;\n }\n }\n\n if($is_valid) {\n\n $this->Promocode->updateAll(array('Promocode.status' => \"'\" . $status . \"'\"), array('Promocode.id' => $id));\n \n $this->Session->setFlash('Promocode status has been changed successfully', 'success');\n $this->redirect(Router::url( $this->referer(), true ));\n\n }else{\n $this->Session->setFlash('Invalid Request', 'error');\n $this->redirect(array('plugin' => false, 'controller' => 'promocodes', 'action' => 'index', 'admin' => true));\n }\n }", "public function respon(){\n //update 'status'\n }", "public function change_subadmin_status()\n\t{\n\t\tif ($this->checkLogin('A') == '') \n\t\t{\n\t\t\tredirect('admin');\n\t\t} \n\t\telse \n\t\t{\n\t\t\t$mode = $this->uri->segment(4, 0); \n\t\t\t$adminid = $this->uri->segment(5, 0);\n\t\t\t$status = ($mode == '0') ? 'Inactive' : 'Active';\n\t\t\t$newdata = array('status' => $status); \n\t\t\t$condition = array('id' => $adminid);\n\n\t\t\t$this->subadmin_model->update_details(SUBADMIN, $newdata, $condition);\n\t\t\t$this->setErrorMessage('success', 'Sub Admin Status Changed Successfully');\n\t\t\tredirect('admin/subadmin/display_sub_admin');\n\t\t}\n\t}", "public function ajaxStaffStatus() {\n\t\t$this->autoRender = false;\n\t\t$this->viewBuilder()->setLayout(false);\n\t\tif ($this->request->is('ajax')) {\n\t\t\t$id = $this->request->getData()['id'];\n\t\t\t$status = $this->request->getData()['status'];\n\t\t\t$data = $this->Users->get($id);\n\n\t\t\t$user = $this->Users->patchEntity($data, ['status' => $status]);\n\n\t\t\tif ($this->Users->save($user)) {\n\t\t\t\t$message = ($status == 1) ? 'Staff is Active now.' : 'Staff is InActive now.';\n\t\t\t\techo json_encode(array('status' => 'success', 'message' => $message));\n\t\t\t\texit;\n\t\t\t}\n\t\t\t$message = ($status == 1) ? 'Error while updating staff status to Active.' : 'Error while updating staff status to InActive.';\n\t\t\techo json_encode(array('status' => 'error', 'message' => $message));\n\t\t\texit;\n\t\t}\n\t}", "public function putUpdateInvitationStatus($data)\n {\n DB::beginTransaction();\n try{\n $invite = UserInvite::checkUsersInvite($data['inviteId'],Auth::user()->user_id);\n if(is_object($invite)) {\n \n $invite = UserInvite::updateInviteStatus($invite,$data['status']);\n $notification = NotificationsLogs::getNotificationById($invite['notification_id']);\n NotificationsLogs::updateInviteNotificstionStatus($notification, $data['status'],Constant::$userReadNotification);\n self::sendInviteNotification($invite['user_id'],self::inviteStatusMessage($data['status']), Constant::$ACCEPT_REJECT_INVITE_NOTIFICATION);\n $result = $this->renderSuccess(trans('messages.invite_status_updated'),$invite);\n } \n else {\n $result = $this->renderFailure(trans('messages.not_authorised_to_update_invite'), StatusCode::$EXCEPTION,[]);\n }\n DB::commit();\n }\n catch(\\Exception $e){\n DB::rollback();\n UtilityHelper::logExceptionWithObject(__METHOD__, $e);\n $result = $this->renderFailure(trans('messages.error.exception'), Response::HTTP_OK);\n }\n return $result;\n }", "public function updateUrgencyStatuses() {\n\n\n $deadlineOverdue = date('Y-m-d H:i:s', strtotime('-' . Configure::read('TICKET.OVERDUE_DAYS') . ' days'));\n $overdueTickets = $this->getPendingTicketsByAge($deadlineOverdue);\n\n foreach ($overdueTickets as $i => $overdueTicket) {\n\n $this->id = $overdueTicket['Ticket']['ticket_id'];\n $overdueTicket['Ticket']['status'] = 'Overdue';\n $this->save($overdueTicket, array('validate' => false, 'modified' => false, 'callbacks' => false));\n }\n\n\n $deadlineUrgend = date('Y-m-d H:i:s', strtotime('-' . Configure::read('TICKET.URGEND_DAYS') . ' days'));\n $urgendTickets = $this->getPendingTicketsByAge($deadlineUrgend, array('New', 'Requested'));\n\n foreach ($urgendTickets as $i => $urgendTicket) {\n\n $this->id = $urgendTicket['Ticket']['ticket_id'];\n $urgendTicket['Ticket']['status'] = 'Urgend';\n $this->save($urgendTicket, array('validate' => false, 'modified' => false, 'callbacks' => false));\n }\n\n }", "public function statusAction(){\n $this->_models->changeStatusIcons($this->_arrParam,array('task' => 'change-submit-status'));\n redirect::locationHeader('admin','user','index');\n }", "public function update() {\n\n\t\tif (!empty($this->plan_model->return_plan_by_id($this->input->post('id_plan')))) {\n\t\t\t\n\t\t\t$this->data['plansUpdate'] = $this->plan_model->return_plan_by_id($this->input->post('id_plan'));\n\n\t\t\t$this->session->set_flashdata('succes_msg','Registered Plan Health!');\n\n\t\t}else {\n\n\t\t\t$this->session->set_flashdata('error_msg','Fail Register!');\n\t\t}\n\n\t\t$this->index();\n\n\t}", "public function update(Request $request){ \n $restaurant = Restaurant::find($request->user_id);\n $restaurant->active = $request->status;\n $restaurant->save();\n $user = $restaurant->user;\n $user->active = $request->status;\n $user->save();\n $response['restaurant'] = $restaurant;\n return response()->json($response, $this-> successStatus); \n }", "public function testSchedulesUpdateOut()\n {\n $result = $this->visit('events/{event}/schedules/update/{id}')\n ->see('create your suaray account')\n ->see('welcome to suaray')\n ->seePageIs('/account/register');\n }", "public function change_user_status(){\r\n\t\tif ($this->checkLogin('A') == ''){\r\n\t\t\tredirect('admin');\r\n\t\t}else {\r\n\t\t\t$mode = $this->uri->segment(4,0);\r\n\t\t\t$user_id = $this->uri->segment(5,0);\r\n\t\t\t$status = ($mode == '0')?'Inactive':'Active';\r\n\t\t\t$newdata = array('status' => $status);\r\n\t\t\t$condition = array('id' => $user_id);\r\n\t\t\t$this->seller_model->update_details(USERS,$newdata,$condition);\r\n\t\t\t$this->setErrorMessage('success','Seller Status Changed Successfully');\r\n\t\t\tredirect('admin/seller/display_seller_list');\r\n\t\t}\r\n\t}", "public function updateInviteStatus($cell_number, $invitation_status){\n return DB::table('my_friends')->where('cell_number', $cell_number)->update(['invitation_status'=>$invitation_status]);\n }", "function changeStatus()\n\t{\n\t\t$role_status = $this->input->post('role_status');\n\t\t$role_id = $this->input->post('role_id');\n\t\t// response array\n\t\t$jsonData = array('success' => false);\n\t\t$result = $this->db->set('role_status', $role_status == 1 ? 0 : 1)\n\t\t\t\t\t\t->where('role_id', $role_id)\n\t\t\t\t\t\t->update(\"roles\");\n\t\t// if role status changed successfully\n\t\tif($result) {\n\t\t\t$jsonData['success'] = true;\n\t\t}\n\n\t\t// send response to clint\n\t\techo json_encode($jsonData);\n\t}", "public function update(){\n var_dump(parent::update_register($_POST) ? header('location:?controller=factura&method=create'): 'Error al actualizar');\n\n die();\n }", "public function updateStatus()\n {\n $this->Invoice->updateInvoiceStatus($this->input->post('id'));\n }", "public function status() {\n\t\t$id = $this->uri->segment(4);\n\t\t$status = $this->uri->segment(5);\n\t\tCheckAdminLoginSession();\t\t\n\t\t$data['status'] = $status;\t\t\t\t \t \t\t \n\t\t$this->admin_model->setUpdateData($this->policy_duration,$data,$id);\n\t\t$this->session->set_flashdata('message','Your status has been update successfully');\n\t\tredirect('admin/policy-duration/lists','refresh');\t\t\n\t}", "function updateStatus()\n\t{\n\t\t$this->setPost();\n\n\t\t$postData = $_POST;\n\n\t\tif ($postData->status_id == 1) {\n\t\t\t$updateData = array('status_id' => 2);\n\t\t} else {\n\t\t\t$updateData = array('status_id' => 1);\n\t\t}\n\n\t\t$where = array('id' => $postData->id);\n\n\t\t$result = $this->base_model->updateCommon($this->primaryTable, $updateData, $where);\n\n\t\t$response = array('status' => true, 'message' => 'Branch status updated successfully.');\n\n\t\techo json_encode($response);\n\t}", "public function vendorChangeStatus(Request $request)\n {\n $validator=Validator::make($request->all(), [\n 'user_id' => 'required',\n 'vendor_id' => 'required',\n 'tag'=>'required',\n 'gig_id'=>'required',\n 'status'=>'required'\n ]);\n if ($validator->fails())\n {\n return response(array(\n 'success'=>0,\n 'data'=>$validator->errors()\n ));\n }\n else\n {\n $response=VendorServiceGig::where(['id'=>$request->gig_id,'vendor_id'=>$request->vendor_id])->update([\n 'status'=>$request->status\n ]);\n if($response)\n {\n return response(array(\n 'success'=>1,\n 'msg'=>'Successfully Updated'\n ));\n }\n else {\n return response(array(\n 'success'=>0,\n 'msg'=>'Something Went Wrong'\n ));\n }\n }\n }", "public function updateStatus(){\t\t\tif( is_null( $this->id ) ) trigger_error( \"User::update(): Attempt to update a user object that does not have its ID property set.\", E_USER_ERROR );\r\n\t\t\t\r\n\t\t\r\n\r\n\t\t\t//Update the object\r\n\t\t\t$conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\t\t\r\n\t\t\t$sql = \"UPDATE \".TABLENAME_GROUPS.\" SET status=:status WHERE id = :id\";\r\n\t\t\t$st = $conn->prepare( $sql );\r\n\t\t\t$st->bindValue( \":status\", $this->status, PDO::PARAM_STR );\r\n\t\t\t$st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\r\n\t\t\techo \"<br>\";\r\n\t\t\t$st->execute();\r\n\t\t//\tprint_r($st->errorInfo());\r\n\t\t\t$conn = null;\t\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t}", "function changeStatusGroup($post,$deviceType,$appVersion,$OSVersion,$browserVersion){\n\n $con=connectToDB(); //connect to the DB\n mysql_query('SET NAMES UTF8');\t\t\n $StatusID=$post['StatusID'];\n\t$GroupID=$post['GroupID'];\n\t\n\t\n\t $errorMsg=\"Error in updation\";\n\t\t$result2 = mysql_query(\"SELECT * FROM SCP_Groups_Staff WHERE GroupID='\".$GroupID.\"'\")or die(mysql_error());\n\t\t$num_rows = mysql_num_rows($result2);\n\t\t\n\n\t\tif($num_rows>0){\n\t\t $result = '';\n\t\t $errorMsg = 'Sorry, you do not deactivate this Check, it is already assigned to some staff.';\n\t\t}else{\n\t\t \t$sql2=\"UPDATE `SCP_Groups` SET `StatusID` = '\".$StatusID.\"' WHERE `GroupID` = '\".$GroupID.\"'\";\t \n $result = mysql_query($sql2) or die(mysql_error());\n\t\t}\n\t\t\t\n if($result) {\n $data['responseData'] = '';\n $data['message'] = \"Updated successfully\";\n $data['responseCode'] = \"200\";\n $data['status'] = \"1\";\n } else {\n $data['responseData'] = '';\n $data['message'] = $errorMsg;\n $data['responseCode'] = \"200\";\n $data['status'] = \"0\";\n }\n print json_encode($data);\n mysql_close($con); //close the connection\n}", "public function notConfirmed($dt)\n{\n\n $code = 401;\n $payload = null;\n $remarks = \"failed\";\n $message = \"Unable to retrieve data\";\n\n\n\n $sql = \"UPDATE `crm_reservations_tb` SET `status_id` = '5' WHERE phone_no = '$dt->phone_no' AND status_id = '3'\";\n $res = $this->gm->generalQuery1($sql, \"\");\n\n if($res['code']!=200) {\n \n $code = 200;\n $payload = $res;\n $remarks = \"success\";\n $message = \"Successfully retrieved data\";\n }\n \n \n return $this->gm->sendPayload($payload, $remarks, $message, $code);\n\n}", "public function testAdministrationCreateStatus()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit(new Login())\n ->loginAsUser('first-user@example.com', 'password');\n\n $browser->visit('/admin/status')\n ->assertSee('Ajouter décision')\n ->clickLink('Ajouter décision')\n ->assertPathIs('/admin/status/create');\n\n $name = 'Test create status';\n\n $browser->type('name', $name)\n ->press('Enregistrer et retour')\n ->waitForText($name)\n ->assertSee($name)\n ->assertDontSee('Aucune donnée à afficher')\n ->assertPathIs('/admin/status');\n });\n }", "public function testVolunteerHourContactEditSuccess_Administrator()\n {\n // Set test user as current authenticated user\n $this->be($this->administrator);\n \n $this->session([\n 'username' => $this->administrator->username, \n 'access_level' => $this->administrator->access_level\n ]);\n \n $volunteerID = 2;\n // Call route under test\n $response = $this->call('GET', 'volunteerhours/volunteerEdit/'.$volunteerID);\n \n $this->assertContains(\"Editing Volunteer Hours for\", $response->getContent());\n }", "public function updateTimesheetStatus(Request $request){\n\t\t$timesheetid = $request->id;\n\t\t$status = $request->status;\n\t\t$timesheet = \\App\\Models\\Timesheet::where('id', $timesheetid)->first();\n\t\t$user = User::where('id', $timesheet->user_id)->first();\n\n\t\tMail::to($user->email)->send(new TimeSheetApproved($user, $status));\n\n\t\t$timesheet->client_approved = $status;\n\t\t$timesheet->save();\n\n\t\treturn response()->json(['status'=>true,'message'=>'status updated successfully'], 200);\n\t}", "public function ajax_change_status($id) {\n $result = $this->manager->get_status('user', $id);\n if ($result->status == \"1\") {\n $project_id = $this->manager->update('user', array('user_id' => $id), array('status' => 0));\n \n $subject = \"Account Deactivation Notification\";\n $content = \"<p>Dear \" . ucwords($result->name) . \",</p>\";\n\n $content .= \"<p>We regret to to inform to you that your account \";\n $content .= \"has been automatically disabled from our system due to some problems.</p>\";\n\n $content .= \"<p>Kindly contact our customer care operators at +91 8369516308 \";\n $content .= \"or write to us at care@aasaan.co</p>\";\n\n $content .= \"<p>With your assistance,our team will surely help you to enable your systems again.</p>\";\n\n $content .= \"<p>Thanking you in anticipation.</p>\";\n $content .= \"<p>Regards,</p>\";\n $content .= \"<p>Team Aasaan</p>\";\n $content .= \"<p>http://www.aasaan.co/hajiri</p>\";\n $content .= \"<img src='\" . base_url('assets/admin/images/AASAAN-LOGO.png') . \"' height='80' width='250'/>\";\n \n } else {\n $project_id = $this->manager->update('user', array('user_id' => $id), array('status' => 1));\n \n $subject = \"Account Activation Notification\";\n\n $content = \"<p>Dear \" . ucwords($result->name) . \",</p>\";\n $content .= \"<p>We feel glad to inform you that your account \";\n $content .= \"has been enabled!</p>\";\n\n $content .= \"<p>For any inconvenience do call our customer care services at +91 8369516308 \";\n $content .= \"or write to us at care@aasaan.co</p>\";\n\n $content .= \"<p>Thanking you in anticipation.</p>\";\n $content .= \"<p>Regards,</p>\";\n $content .= \"<p>Team Aasaan</p>\";\n $content .= \"<p>http://www.aasaan.co/hajiri</p>\";\n $content .= \"<img src='\" . base_url('assets/admin/images/AASAAN-LOGO.png') . \"' height='80' width='250'/>\";\n }\n //$result = htmlmail($result->email, $subject, $content);\n $this->session->set_flashdata('success', 'Status Changed Successfully');\n echo json_encode(array(\"status\" => TRUE));\n }", "public function updateAgent() {\r\n $pwd = parent::getPassword();\r\n $sqlQuery = \"UPDATE users SET \"\r\n . \"fname='\" . parent::getFirstname() . \"', \"\r\n . \"lname='\" . parent::getLastname() . \"', \"\r\n . \"image_name='\" . parent::getPictureName() .\"', \"\r\n . \"email='\" . parent::getEmail() . \"', \"\r\n . \"enable=\" . $this->enabled . \", \"\r\n . \"address1='\" . parent::getAddress1() . \"', \"\r\n . \"address2='\" . parent::getAddress2() . \"', \"\r\n . \"zipcode='\" . parent::getZipcode() . \"', \"\r\n . \"phone='\" . parent::getPhone() . \"', \"\r\n . \"city='\" . parent::getCity() . \"', \"\r\n . \"state='\" . parent::getState() . \"', \"\r\n . \"country='\" . parent::getCountry() . \"', \";\r\n // add a comment of what the below line does\r\n // - @vishal\r\n if(!empty($pwd))\r\n $sqlQuery .= \"password='\" . hash(\"sha256\", parent::getPassword()) . \"', \";\r\n \r\n $sqlQuery .= \"modification_date=NOW()\" \r\n . \" WHERE user_id = \" . parent::getID() . \";\";\r\n $result = $this->dbcomm->executeQuery($sqlQuery);\r\n \r\n if ($result != true)\r\n {\r\n echo \"<br><b>\" . $sqlQuery . \"</b>\";\r\n echo \"<br><b>\" . $this->dbcomm->giveError() . \"</b>\";\r\n die(\"Error at agent saving\");\r\n }\r\n else\r\n {\r\n return 1;\r\n }\r\n }", "public function testDeveloperUpdate()\n {\n $developer = factory(Developer::class)->create();\n $response = $this->get('/developer/update?id=' . $developer->id);\n $response->assertStatus(200);\n }", "function changeStatusChecks($post,$deviceType,$appVersion,$OSVersion,$browserVersion){\n\n $con=connectToDB(); //connect to the DB\n mysql_query('SET NAMES UTF8');\t\t\n $StatusID=$post['StatusID'];\n\t$ChecksID=$post['ChecksID'];\n\t\n\t\n\t $errorMsg=\"Error in updation\";\n\t\t$result2 = mysql_query(\"SELECT * FROM SCP_Checks_Staff WHERE ChecksID='\".$ChecksID.\"'\")or die(mysql_error());\n\t\t$num_rows = mysql_num_rows($result2);\n\t\t\n\t\t\n\t\tif($num_rows>0){\n\t\t $result = '';\n\t\t $errorMsg = 'Sorry, you do not deactivate this Check, it is already assigned to some staff.';\n\t\t}else{\n\t\t \t$sql2=\"UPDATE `SCP_Checks` SET `StatusID` = '\".$StatusID.\"' WHERE `ChecksID` = '\".$ChecksID.\"'\";\t \n $result = mysql_query($sql2) or die(mysql_error());\n\t\t}\n\t\t\t\n if($result) {\n $data['responseData'] = '';\n $data['message'] = \"Updated successfully\";\n $data['responseCode'] = \"200\";\n $data['status'] = \"1\";\n } else {\n $data['responseData'] = '';\n $data['message'] = $errorMsg;\n $data['responseCode'] = \"200\";\n $data['status'] = \"0\";\n }\n print json_encode($data);\n mysql_close($con); //close the connection\n}", "function changeStatusEquipments($post,$deviceType,$appVersion,$OSVersion,$browserVersion){\n\n $con=connectToDB(); //connect to the DB\n mysql_query('SET NAMES UTF8');\t\t\n $StatusID=$post['StatusID'];\n\t$EquipmentID=$post['EquipmentID'];\n\t\n\t\n\t $errorMsg=\"Error in updation\";\n\t\t$result2 = mysql_query(\"SELECT * FROM SCP_Equipments_Staff WHERE EquipmentID='\".$EquipmentID.\"'\")or die(mysql_error());\n\t\t$num_rows = mysql_num_rows($result2);\n\t\t\n\t\t\n\t\tif($num_rows>0){\n\t\t $result = '';\n\t\t $errorMsg = 'Sorry, you do not deactivate this Equipment, it is already assigned to some staff.';\n\t\t}else{\n\t\t \t$sql2=\"UPDATE `SCP_Equipments` SET `StatusID` = '\".$StatusID.\"' WHERE `EquipmentID` = '\".$EquipmentID.\"'\";\t \n $result = mysql_query($sql2) or die(mysql_error());\n\t\t}\n\t\t\t\n if($result) {\n $data['responseData'] = '';\n $data['message'] = \"Updated successfully\";\n $data['responseCode'] = \"200\";\n $data['status'] = \"1\";\n } else {\n $data['responseData'] = '';\n $data['message'] = $errorMsg;\n $data['responseCode'] = \"200\";\n $data['status'] = \"0\";\n }\n print json_encode($data);\n mysql_close($con); //close the connection\n}", "public function test_authenticated_admin_users_can_hit_the_update_endpoint()\n {\n // First we create a test country\n $country = $this->createCountry();\n\n // Then we check if it was successfully added into the database\n $this->assertDatabaseHas('countries', $country->toArray());\n\n // Then we create an update request with auth headers and empty params\n $this->authenticatedAdmin()->update($country->code, [])\n // We assert status is 422, because now we are authenticated, but request params are invalid\n ->assertStatus(422)\n // Then we assert errors structure matches expected\n ->assertJsonStructure([\n 'errors' => [\n 'name',\n 'code'\n ]\n ]);\n }", "public function changeStatus(Request $request)\n {\n $user = User::find($request->id);\n $user->is_admin = $request->is_admin;\n $user->save();\n\n return response()->json(['success'=>'Status change successfully.']);\n }", "public function setstatus()\n {\n $this->checkAjaxToken();\n $this->throwForbiddenUnless(SecurityUtil::checkPermission('Ephemerides::', '::', ACCESS_ADMIN));\n\n $eid = $this->request->request->get('eid', 0);\n $status = $this->request->request->get('status', 0);\n $alert = '';\n \n if ($eid == 0) {\n $alert .= $this->__('No ID passed.');\n } else {\n $item = array('eid' => $eid, 'status' => $status);\n $res = DBUtil::updateObject($item, 'ephem', '', 'eid');\n if (!$res) {\n $alert .= $item['eid'].', '. $this->__f('Could not change item, ID %s.', DataUtil::formatForDisplay($eid));\n if ($item['status']) {\n $item['status'] = 0;\n } else {\n $item['status'] = 1;\n }\n }\n }\n // get current status to return\n $item = ModUtil::apiFunc($this->name, 'user', 'get', array('eid' => $eid));\n if (!$item) {\n $alert .= $this->__f('Could not get data, ID %s.', DataUtil::formatForDisplay($eid));\n }\n\n return new Zikula_Response_Ajax(array('eid' => $eid, 'status' => $item['status'], 'alert' => $alert));\n }", "public function test_admin_status_b()\n {\n $this->request('GET', ['pages/memberdsc', 'status']);\n $this->assertResponseCode(404);\n }", "public function AddEditStatusCode(){\n\t\ttry{\n\t\t\tif(isset($this->getData['emailstatus'])){\n\t\t\t\t\tif($this->getData['emailstatus'] == '0' && isset($this->getData['new_notification_name']) && $this->getData['new_notification_name'] != ''){\n\t\t\t\t\t\t$inserted = $this->_db->insert(MAIL_NOTIFY_TYPES,array('notification_name' => $this->getData['new_notification_name'],'notification_staus' => $this->getData['notification_sta'],'admin_display'=>'1','templatecategory_id'=>3));\n\t\t\t\t\t\t$this->getData['notification_id'] = ($inserted)?$this->_db->lastInsertId():'0';\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tunset($this->getData['notification_id']);\n\t\t\t\t}\n\t\t\tif(isset($this->getData['mode']) && $this->getData['mode'] == 'add'){\n\t\t\t\treturn ($this->insertInToTable(STATUS_MASTER,array($this->getData))) ? TRUE : FALSE;\n\t\t\t}else{\n\t\t\t\t$where = 'master_id ='.Zend_Encript_Encription:: decode($this->getData['token']);\n\t\t\t\t$this->getData['modify_by'] = $this->Useconfig['user_id'];\n\t\t\t\t$this->getData['modify_ip'] = commonfunction::loggedinIP();\n\t\t\t\t$this->getData['modify_date'] = '';\n\t\t\t\treturn ($this->UpdateInToTable(STATUS_MASTER,array($this->getData),$where)) ? TRUE : FALSE;\n\t\t\t}\n\t\t}catch (Exception $e) {\n\t\t\t\t $this->_logger->info('Class-'.__CLASS__.',Function-'.__FUNCTION__.',Line-'.__LINE__.',Error-'.$e->getMessage());\n\t\t}\n }" ]
[ "0.61954045", "0.596753", "0.5939235", "0.59271204", "0.58863634", "0.58448845", "0.5814457", "0.5804797", "0.573674", "0.55866015", "0.5571828", "0.554309", "0.5540145", "0.55377865", "0.5517234", "0.5506369", "0.54942244", "0.5482305", "0.5469329", "0.5466056", "0.54422605", "0.5428633", "0.5422021", "0.5408735", "0.53940105", "0.5381583", "0.53748757", "0.5356886", "0.5356594", "0.53369457", "0.5328046", "0.5327555", "0.5325396", "0.53186756", "0.5317932", "0.5312355", "0.5308621", "0.530587", "0.53026915", "0.5275358", "0.52551967", "0.5248533", "0.52391624", "0.52355874", "0.5232998", "0.5223237", "0.5222847", "0.52191556", "0.5212606", "0.5210356", "0.52078533", "0.5206044", "0.520384", "0.5203768", "0.520094", "0.5199324", "0.5183782", "0.5178106", "0.5175626", "0.51743996", "0.5170217", "0.51692", "0.5168426", "0.5168267", "0.5166974", "0.51584053", "0.5153102", "0.5149167", "0.5143218", "0.5140963", "0.514079", "0.5135532", "0.5130869", "0.5124444", "0.51213974", "0.51113385", "0.5107608", "0.5095848", "0.5094482", "0.5093297", "0.50909114", "0.5090429", "0.5085609", "0.5084251", "0.50829977", "0.50824404", "0.5076321", "0.50681686", "0.50654125", "0.50638074", "0.50496805", "0.5049297", "0.5049127", "0.5048773", "0.5047315", "0.5046948", "0.5045891", "0.5042373", "0.50422984", "0.5041212" ]
0.7310263
0
Test case for webinarRegistrants List Webinar Registrants.
Тест-кейс для списка участников вебинара.
public function testWebinarRegistrants() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_registrants_of_webinars($webinar_id=false) \n {\n\t\tif($webinar_id)\n\t\t{\n\t\t\tif(!$this->organizer_key or !$this->access_token)\n\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t$return_array = array();\n\t\t\t\n\t\t\t$return_array = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/{$webinar_id}/registrants?oauth_token=\".$this->access_token), true);\n\n\t\t\tif(isset($reponse['int_err_code']) and $reponse['int_err_code'] != '')\n\t\t\t{\n\t\t\t\t$this->set_access_token('');\n\t\t\t\t$this->set_organizer_key('');\t\t\t\t\n\t\t\t\tthrow new Exception($reponse['int_err_code']);\n\t\t\t}\n\t\t}\n\t\t\t\n return $return_array;\n\t}", "public function testWebinarRegistrantGet()\n {\n }", "public function testWebinarRegistrantStatus()\n {\n }", "public function testWebinarRegistrantCreate()\n {\n }", "public function testListTenant()\n {\n $this->json('GET', 'reseller/'.$this->reseller->id.'/tenants')\n ->assertStatus(200);\n }", "public function test_admin_tribe_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Assignments', 'tribe_list']);\n $this->assertResponseCode(404);\n }", "function citrixonline_create_registrant_of_webinar($webinar_id=false, $data = array(), $all_fields_chk = false) \n {\n\t\tif($webinar_id and isset($data['first_name']) and isset($data['last_name']) and isset($data['email']))\n\t\t{\n\t\t\t$params = array();\n\t\t\t\n\t\t\t$fields = array(\n\t\t\t\t'firstName'=>$data['first_name'],\n\t\t\t\t'lastName'=>$data['last_name'],\n\t\t\t\t'email'=>$data['email'],\n );\n\t\t\t\n\t\t\t$params[CURLOPT_HTTPHEADER] = array('Accept: application/json', 'Content-Type: application/json', 'Authorization: OAuth oauth_token='.$this->access_token);\n\t\t\t$params[CURLOPT_POSTFIELDS] = json_encode($fields);\n\t\t\t\n\t\t\t$reponse = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/{$webinar_id}/registrants\", $params), true);\n\t\t\t\n\t\t\tif(isset($reponse['registrantKey']))\n\t\t\t\treturn $reponse;\n\t\t}\n\t\t\n\t\treturn false;\t\t\t\n\t}", "public function testWebinarRegistrantsQuestionsGet()\n {\n }", "public function getRegistrants()\n {\n if (array_key_exists(\"registrants\", $this->_propDict)) {\n return $this->_propDict[\"registrants\"];\n } else {\n return null;\n }\n }", "public function testListSiteMembershipsForPerson()\n {\n }", "public function testListSiteMembershipRequestsForPerson()\n {\n }", "public function testListSiteMemberships()\n {\n }", "function getRegistrationList()\r\n {\r\n global $objDatabase;\r\n \r\n $blnFirst = true;\r\n $arrWhere = array();\r\n if ($this->getRegistrations) { $arrWhere[] = 1; }\r\n if ($this->getDeregistrations) { $arrWhere[] = 0; }\r\n if ($this->getWaitlist) { $arrWhere[] = 2; }\r\n $strWhere = ' AND (';\r\n foreach ($arrWhere as $value) {\r\n $strWhere .= $blnFirst ? '`type` = '.$value : ' OR `type` = '.$value;\r\n $blnFirst = false;\r\n }\r\n $strWhere .= ')';\r\n \r\n $query = '\r\n SELECT `id`\r\n FROM `'.DBPREFIX.'module_'.$this->moduleTablePrefix.'_registration`\r\n WHERE `event_id` = '.$this->eventId.'\r\n '.$strWhere.'\r\n ORDER BY `id` DESC'\r\n ;\r\n $objResult = $objDatabase->Execute($query);\r\n \r\n if ($objResult !== false) {\r\n while (!$objResult->EOF) {\r\n $objRegistration = new \\Cx\\Modules\\Calendar\\Controller\\CalendarRegistration($this->formId, intval($objResult->fields['id']));\r\n $this->registrationList[$objResult->fields['id']] = $objRegistration;\r\n $objResult->MoveNext();\r\n }\r\n }\r\n }", "public function listRegisteredDestinations($request);", "public function testListPastWebinarQA()\n {\n }", "public function testWebinarPanelistCreate()\n {\n }", "public function testWebinarAbsentees()\n {\n }", "public function actionRegistrationList() {\n $userCounter = new СountRegisteredUsers();\n $userCounter->getAllUserForDays();\n $userCounter->getNonActiveUsersForDays();\n\n $dayDate = new DateTime();\n\n // TODO registration\n\n $registrationsByDay = [];\n for($i = 0; $i<30; $i++) {\n $day = date_format($dayDate, 'Y-m-d');\n $registrationsByDay[$day]['period'] = $day;\n $registrationsByDay[$day]['totalRegistrations'] = isset($userCounter->totalRegistrations[$day]) ? $userCounter->totalRegistrations[$day] : 0;\n $registrationsByDay[$day]['totalPersonals'] = isset($userCounter->totalPersonals[$day]) ? $userCounter->totalPersonals[$day] : 0;\n $registrationsByDay[$day]['totalCorporate'] = isset($userCounter->totalCorporate[$day]) ? $userCounter->totalCorporate[$day] : 0;\n $registrationsByDay[$day]['totalNonActivePersonals'] = isset($userCounter->totalNonActivePersonals[$day]) ? $userCounter->totalNonActivePersonals[$day] : 0;\n $registrationsByDay[$day]['totalNonActiveCorporate'] = isset($userCounter->totalNonActiveCorporate[$day]) ? $userCounter->totalNonActiveCorporate[$day] : 0;\n\n $dateInterval = new DateInterval('P1D');\n $dateInterval->invert = 1;\n $dayDate->add($dateInterval);\n }\n\n // getting registration by month\n $userCounter = new СountRegisteredUsers();\n $userCounter->getAllUserForMonths();\n $userCounter->getNonActiveUsersForMonths();\n\n $dayDate = new DateTime();\n\n $registrationsByMonth = [];\n for($i = 0; $i<12; $i++) {\n $day = date_format($dayDate, 'F');\n $registrationsMonth[$day]['period'] = $day;\n $registrationsMonth[$day]['totalRegistrations'] = isset($userCounter->totalRegistrations[$day]) ? $userCounter->totalRegistrations[$day] : 0;\n $registrationsMonth[$day]['totalPersonals'] = isset($userCounter->totalPersonals[$day]) ? $userCounter->totalPersonals[$day] : 0;\n $registrationsMonth[$day]['totalCorporate'] = isset($userCounter->totalCorporate[$day]) ? $userCounter->totalCorporate[$day] : 0;\n $registrationsMonth[$day]['totalNonActivePersonals'] = isset($userCounter->totalNonActivePersonals[$day]) ? $userCounter->totalNonActivePersonals[$day] : 0;\n $registrationsMonth[$day]['totalNonActiveCorporate'] = isset($userCounter->totalNonActiveCorporate[$day]) ? $userCounter->totalNonActiveCorporate[$day] : 0;\n\n $dateInterval = new DateInterval('P1M');\n $dateInterval->invert = 1;\n $dayDate->add($dateInterval);\n }\n\n // getting registration by year\n $userCounter = new СountRegisteredUsers();\n $userCounter->getAllUserForYears();\n $userCounter->getNonActiveUserForYears();\n\n $dayDate = new DateTime();\n\n $registrationsByYear = [];\n $day = date_format($dayDate, 'Y');\n $registrationsByYear[$day]['period'] = $day;\n $registrationsByYear[$day]['totalRegistrations'] = isset($userCounter->totalRegistrations[$day]) ? $userCounter->totalRegistrations[$day] : 0;\n $registrationsByYear[$day]['totalPersonals'] = isset($userCounter->totalPersonals[$day]) ? $userCounter->totalPersonals[$day] : 0;\n $registrationsByYear[$day]['totalCorporate'] = isset($userCounter->totalCorporate[$day]) ? $userCounter->totalCorporate[$day] : 0;\n $registrationsByYear[$day]['totalNonActivePersonals'] = isset($userCounter->totalNonActivePersonals[$day]) ? $userCounter->totalNonActivePersonals[$day] : 0;\n $registrationsByYear[$day]['totalNonActiveCorporate'] = isset($userCounter->totalNonActiveCorporate[$day]) ? $userCounter->totalNonActiveCorporate[$day] : 0;\n\n $registrationsByYearOld = [];\n $day--;\n $registrationsByYearOld[$day]['period'] = $day;\n $registrationsByYearOld[$day]['totalRegistrations'] = isset($userCounter->totalRegistrations[$day]) ? $userCounter->totalRegistrations[$day] : 0;\n $registrationsByYearOld[$day]['totalPersonals'] = isset($userCounter->totalPersonals[$day]) ? $userCounter->totalPersonals[$day] : 0;\n $registrationsByYearOld[$day]['totalCorporate'] = isset($userCounter->totalCorporate[$day]) ? $userCounter->totalCorporate[$day] : 0;\n $registrationsByYearOld[$day]['totalNonActivePersonals'] = isset($userCounter->totalNonActivePersonals[$day]) ? $userCounter->totalNonActivePersonals[$day] : 0;\n $registrationsByYearOld[$day]['totalNonActiveCorporate'] = isset($userCounter->totalNonActiveCorporate[$day]) ? $userCounter->totalNonActiveCorporate[$day] : 0;\n $this->layout = '//admin_area/layouts/admin_main';\n $this->render('/admin_area/pages/registrationCounterList',\n [\n 'registrationsByDay' => $registrationsByDay,\n 'registrationsByMonth' => $registrationsMonth,\n 'registrationsByYear' => $registrationsByYear,\n 'registrationsByYearOld' => $registrationsByYearOld,\n ]\n );\n }", "public function getRegistrant();", "public function testWebinarPolls()\n {\n }", "public function testWebinarPanelists()\n {\n }", "public function registrationAction()\n {\n $eventId = $this->params('eventId');\n $registrations = $this->regTable->findRegByEventId($eventId);\n //*** DATABASE TABLE MODULE RELATIONSHIPS LAB: provide secondary data usersModelTableGateway which performs lookups for attendees for each registration\n $data = [];\n if ($registrations) {\n foreach ($registrations as $item) {\n $secondaryDataTable = '???';\n $data[] = [\n $item->registration_time,\n $item->first_name,\n $item->last_name,\n $secondaryDataTable];\n }\n }\n return new JsonModel(['data' => $data]);\n }", "public function testListEnrollmentRequests()\n {\n }", "public function testWebinarStatus()\n {\n }", "public function testSubscriptionsList()\n {\n }", "public function testWebinarCreate()\n {\n }", "public function instructorList()\n\t{\n\t\techo json_encode($this->instructor->get_instructor());\n\t}", "public function testWebinar()\n {\n }", "public function testRegistrationUITest()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/add_user')\n ->assertSee('Username')\n ->assertSee('First Name')\n ->assertSee('Last Name')\n ->assertSee('Password')\n ->assertSee('Confirm Password')\n ->assertSee('Role')\n ->assertSee('Save');\n });\n }", "public function test_admin_tribe_list_b()\n {\n $this->request('GET', ['pages/Assignments', 'tribe_list']);\n $this->assertResponseCode(404);\n }", "public function get_all_registered()\n {\n }", "public function get_all_registered()\n {\n }", "public function testListPastWebinarPollResults()\n {\n }", "public function testAdminCreations() {\n $admins = Config::get('boilerplate.admins');\n foreach ($admins as $email => $pw) {\n $user = User::where('email', $email)->first();\n $this->assertNotNull($user);\n $this->assertTrue($user->isAdmin());\n }\n }", "public function testListUserEnrollments()\n {\n }", "public function generate_users_list()\n {\n $this->get('/usuarios')->assertStatus(200)->assertSee('Pedro');\n }", "public function testListSites()\n {\n }", "public function testListMemberAccounts()\n {\n }", "public function testAuthenticationServiceListIdentityProviders()\n {\n }", "public function setRegistrants($val)\n {\n $this->_propDict[\"registrants\"] = $val;\n return $this;\n }", "public function getRegistrant()\n {\n return $this->registrant;\n }", "public function test_admin_squad_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Assignments', 'squad_list']);\n $this->assertResponseCode(404);\n }", "public function index()\n {\n return OrganizerResource::collection(\n Auth::user()->organizers\n );\n }", "public function testCanDisplayTheAssessorRegistrationForm()\n {\n $response = $this->get('/assessors/register');\n\n $response->assertStatus(200);\n\n $response->assertViewIs('auth.register');\n }", "public function testSubscriptionsListByType()\n {\n }", "public function updateIncompleteTenantsList()\n\t{\n\t\ttry{\n\t\t\t$rol_arrendatario = Role::where('name', 'Arrendatario')->first();\n\t\t\t$membresia_default = $rol_arrendatario->memberships()->where('name', 'Default')->first();\n\t\t\t$users = $membresia_default->users()->get();\n\t\t\t$arregloUsuarios = [];\n\t\t\tforeach( $users as $user ){\n\t\t\t\t$arregloUsuarios[] = [ 'first_name' => $user->firstname,\n\t\t\t\t\t\t\t\t\t\t'last_name' => $user->lastname,\n\t\t\t\t\t\t\t\t\t\t'email' => $user->email\n\t\t\t\t\t\t\t\t\t ];\n\t\t\t}\n\t\t\t$res = $this->client->request('PUT', 'https://api.sendgrid.com/v3/marketing/contacts', [\n\t\t\t\t//'headers' => ['Authorization' => 'Bearer '.env('SENDGRID_API_KEY'), 'Content-Type' => 'application/json'],\n\t\t\t\t'body' => json_encode([\n\t\t\t\t\t\t'list_ids' => [env('SENDGRID_ID_TENANTS')],\n\t\t\t\t\t\t'contacts' => $arregloUsuarios\n\t\t\t\t\t])\n\t\t\t]);\n\t\t}catch( \\Exception $e )\n\t\t{\n\t\t\tdd($e);\n\t\t}\n\t}", "public function getRegistries()\n {\n return $this->registries;\n }", "public function testAjaxGetVenueListCanBeAccessed()\n {\n $this->dispatch('/venue/ajax-get-venue-list');\n $this->assertResponseStatusCode(200);\n }", "public function testUserRegister()\n {\n //Voter user registration testing\n $this->browse(function (Browser $voter,$photographer,$organizer) {\n $voter->visit('/')\n ->clickLink('Register')\n ->assertSee('User Registration')\n ->value('#name','VoterTesting')\n ->value('#email','votertesting@gmail.com')\n ->value('#address','University of Moratuwa')\n ->Value('#telephone','0716485403')\n ->Value('#password','123456789')\n ->value('#password-confirm','123456789')\n ->click('.checker')\n ->check('condition')\n ->click('button[type=\"submit\"]')\n ->assertSee('LensView Timeline')\n ->clickLink('View Profile')\n ->assertTitle('LensView | User Profile')\n ->click('#deleteButton')\n ->value('input[type=\"password\"]','123456789')\n ->click('.btn-red');\n\n //Photographer user registration testing\n $photographer->visit('/')\n ->clickLink('Register')\n ->assertSee('User Registration')\n ->value('#name','PhotographerTesting')\n ->value('#email','photographertesting@gmail.com')\n ->value('#address','University of Moratuwa')\n ->Value('#telephone','0716485403')\n ->click('.role2')\n ->Value('#password','123456789')\n ->value('#password-confirm','123456789')\n ->click('.checker')\n ->check('condition')\n ->click('button[type=\"submit\"]')\n ->assertSee(\"Photographer Dashboard\")\n ->clickLink('View Profile')\n ->assertTitle('LensView | User Profile')\n ->click('#deleteButton')\n ->value('input[type=\"password\"]','123456789')\n ->click('.btn-red');\n \n\n // Contest Organizer registration testing\n $organizer->visit('/')\n ->clickLink('Register')\n ->assertSee('User Registration')\n ->value('#name','OrganizerTesting')\n ->value('#email','organizertesting@gmail.com')\n ->value('#address','University of Moratuwa')\n ->Value('#telephone','0716485403')\n ->click('.role3')\n ->Value('#password','123456789')\n ->value('#password-confirm','123456789')\n ->click('.checker')\n ->check('condition')\n ->click('button[type=\"submit\"]')\n ->assertSee(\"Organizer Dashboard\")\n ->clickLink('View Profile')\n ->assertTitle('LensView | User Profile')\n ->click('#deleteButton')\n ->value('input[type=\"password\"]','123456789')\n ->click('.btn-red');\n });\n}", "public function getInvestigatorsList() {\n return $this->_get(6);\n }", "public function index(){\n\t\t\t\n\t\t\t$this->renderView(\"registrar\");\n\t\t}", "public function testAuthenticationServiceListAuthentications()\n {\n }", "public function testList()\n {\n $this->visit('/admin/school')\n ->see(SchoolCrudController::SINGLE_NAME);\n }", "function customRegisterAttendees($attendees){\n foreach ($attendees as $attendee){\n\t\tcustomRegisterAttendee($attendee);\n }\n\n}", "public function testRegisterPageDisplay()\n {\n $this->browse(function ($browser) {\n $browser->visit('/register')\n ->assertDontSee('Contacts Manager');\n });\n }", "public function testShouldGenerateARegistrationSuccessfully() {\n \n $entity = new Registration;\n $entity->source_id = $this->getSource()->id;\n $entity->registrant_id = $this->getRegistrant()->id;\n $entity->type = 'PLAYER' ;\n $entity->league = 'league';\n $entity->org_name = 'Oranization...';\n $entity->org_state = 'NY';\n $entity->season = '2017';\n $entity->external_id = 'myexternalid';\n $entity->right_to_market = true;\n $entity->team_gender = 'Male';\n $entity->team_name = 'A-Team';\n $entity->school_district = 'school district';\n $entity->school_state = 'school sate';\n $entity->first_name = 'Firt name';\n $entity->middle_name = 'Middle name';\n $entity->last_name = 'Last Name';\n $entity->email = 'mail@mail.com';\n $entity->gender = 'Male';\n $entity->city = 'California';\n $entity->zip_code = '234141234123';\n $entity->birth_date = '11/27/1984';\n $entity->phone_number = '1234567890';\n $entity->game_type = 'SOME';\n $entity->level = 'LEVEL';\n $entity->state = 'CALIFORNIA';\n $entity->address_first_line = 'An Address 1234';\n $entity->county = 'A county';\n\n $entity->save();\n $this->assertTrue(!is_null($entity->id));\n }", "public function retrieveTenants()\n {\n return $this->start()->uri(\"/api/tenant\")\n ->get()\n ->go();\n }", "public function testRegistration(): void { }", "public function testGetSiteMembershipForPerson()\n {\n }", "public function GetAllDevise() {\n if ($this->get_request_method() != \"GET\") {\n $this->response('', 406);\n }\n\n $sql = $this->db->prepare(\"SELECT * FROM devise\");\n $sql->execute();\n if ($sql->rowCount() > 0) {\n $result = array();\n while ($rlt = $sql->fetchAll()) {\n $result[] = $rlt;\n }\n // If success everythig is good send header as \"OK\" and return list of users in JSON format\n $this->response($this->json($result[0]), 200);\n }\n $this->response('', 204); // If no records \"No Content\" status\n }", "public function testCanRegisterUsers()\n {\n $this->post('/api/v1/register', [\n 'name' => 'John Doe',\n 'email' => 'john@doe.com',\n 'password' => 'johndoepass',\n 'password_confirmation' => 'johndoepass',\n ], ['HTTP_X-Requested-With' => 'XMLHttpRequest'])\n ->assertJson([\n 'user' => [\n 'name' => 'John Doe',\n 'email' => 'john@doe.com'\n ]\n ]);\n $this->assertDatabaseHas('users', [\n 'name' => 'John Doe',\n 'email' => 'john@doe.com',\n 'activated' => false\n ]);\n $this->assertDatabaseHas('user_activations', [\n 'email' => 'john@doe.com'\n ]);\n }", "public function testMerchantsAllForm()\n\t{\n\t\t$crawler = $this->client->request('GET', \"/merchants/$this->from/$this->to\");\n\n\t\t$this->processMerchantsForm($crawler);\n\t}", "public function testGetSiteMembershipRequestForPerson()\n {\n }", "public function getInvestigatorsList() {\n return $this->_get(5);\n }", "public function test_admin_usecase_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Assignments', 'usecase_list']);\n $this->assertResponseCode(404);\n }", "public function getregisteredlaboreres()\n\t{\n\t\t$this->db->where('tenant_id > 0 ');\n\t\t$query = $this->db->get('tenants');\n\t\t\n\t\tif($query->num_rows() > 0)\n\t\t{\n\t\t\t$response['admindetails'] = array();\n\t\t\tforeach ($query->result() as $key) {\n\t\t\t\t# code...\n\t\t\t\t$product = array();\n\t\t\t\t$product['tenant_id'] = $key->tenant_id;\n\t\t\t\t$product['tenant_name'] = $key->tenant_name;\n\n\t\t\t\tarray_push($response['admindetails'], $product);\n\t\t\t}\n\t\t\t$response['status']=1;\n \t$response['message'] =\"Successfull login\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t $response['status']=0;\n \t $response['message'] =\"Successfull login\";\n\t\t}\n\t\treturn $response;\n\t}", "public function guest_can_get_all_websites() {\n $response = $this->get('api/websites');\n $response->assertStatus(200);\n }", "public function getRegistrant() {\n\t\treturn self::$_registrant;\n\t}", "public function updateCompleteTenantsList()\n\t{\n\t\t$role = Role::where('name', 'Arrendatario')->first();\n\n\t\t$arregloUsuarios = $this->usersCompletedByRole($role);\n\n\t\ttry{\n\t\t\t$res = $this->client->request('PUT', 'https://api.sendgrid.com/v3/marketing/contacts', [\n\t\t\t\t//'headers' => ['Authorization' => 'Bearer '.env('SENDGRID_API_KEY'), 'Content-Type' => 'application/json'],\n\t\t\t\t'body' => json_encode([\n\t\t\t\t\t\t'list_ids' => [env('SENDGRID_ID_TENANTS')],\n\t\t\t\t\t\t'contacts' => $arregloUsuarios\n\t\t\t\t\t])\n\t\t\t]);\n\t\t}catch( \\Exception $e )\n\t\t{\n\t\t\tdd($e);\n\t\t}\n\t}", "public function indexAction()\n {\n $user = $this->get('security.context')->getToken()->getUser();\n\n// $em = $this->getDoctrine()->getEntityManager();\n// $entity = $em->getRepository('CfpCfpBundle:Registration')->findOneById(1);\n\n// foreach ($entity->getSubmissions() as $submission) {\n// print_r($submission->getRemarks());\n// print \"<hr>\";\n// }\n// exit;\n//\n $entities = $user->getRegistrations();\n\n return $this->render('CfpCfpBundle:Registration:index.html.twig', array(\n 'entities' => $entities\n ));\n }", "public function testListPeople()\n {\n }", "public function actionTest()\n {\n $videoconference = \\lispa\\amos\\videoconference\\models\\Videoconf::findOne(1);\n // pr($videoconference->toArray(), 'videoconference');//exit;\n $users = $videoconference->getVideoconfUsersMms()->all();\n // $users = $videoconference->getVideoconfUsers();\n\n foreach ($users as $u) {\n pr($u->toArray(), '$u relazione'); //exit;\n $userProfile = \\lispa\\amos\\admin\\models\\UserProfile::findOne($u->user_id);\n // pr($userProfile->toArray(), '$userProfile');//exit;\n $user = $userProfile->getUser()->one();\n // pr($user->toArray(), '$user');//exit;\n $userEmail = $userProfile->getUser()->one()->email;\n // print \"Email: $userEmail;<br />\";\n }\n //pr($users->toArray(), '$users');exit;/****/\n }", "public function viewRegister()\n {\n $data = DB::select(\"SELECT * FROM riders WHERE Rider_Status = 'PENDING'\");\n return view('ManageAccount.RegistrationListInterface', compact(\"data\"));\n }", "public function index()\n {\n\n if (request('show_deleted') == 1) {\n if (! Gate::allows('property_delete')) {\n return abort(401);\n }\n $tenants = User::whereIn('property_id', Property::where('user_id', auth()->user()->id)->pluck('id'))->onlyTrashed()->get();\n } else {\n\n $tenants = User::whereIn('property_id', Property::where('user_id', auth()->user()->id)->pluck('id'))->get();\n }\n\n return view('admin.tenants.index', compact('tenants'));\n }", "public function testCreateSiteMembershipRequestForPerson()\n {\n }", "public function test_can_get_all_true()\n {\n $this->seed();\n $user = User::where('email', '=', 'a@a.com')->first();\n $token = JWTAuth::fromUser($user);\n $response = $this->json('GET','/api/treatments?token='.$token);\n\n $response->assertStatus(200);\n }", "public function testCountRegioes()\n {\n $this->assertCount(5, UF::$REGIOES);\n }", "public function test_admin_member_internship()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/DscMember', 'apprenticeship']);\n $this->assertResponseCode(404);\n }", "public function getAllApplicants();", "public function startWebAuthnRegistration($request)\n {\n return $this->start()->uri(\"/api/webauthn/register/start\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "public function user_can_register_with_valid_details() :void\n {\n $this->browse(function (Browser $browser) {\n\n \t$user1= factory(User::class)->make();\n\n//\t\t\tdie($user1);\n $browser->visit('/')\n // ->click('#accountDropdown')\n ->clickLink('Account')\n\n ->waitFor('#nav-register')\n ->click('#nav-register')\n ->assertSee('Register');\n\n\t $this->submitForm($browser,\n\t\t [\n\t\t\t ['field_name'=>'first_name', 'field_value' =>$user1->first_name, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'last_name', 'field_value' =>$user1->last_name, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'username', 'field_value' =>$user1->username, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'email', 'field_value' =>$user1->email, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'password', 'field_value' =>$user1->password, 'field_type'=> 'password'],\n\t\t\t ['field_name'=>'password_confirmation', 'field_value' =>$user1->password, 'field_type'=> 'password']\n\t ]\n\t );\n $browser->assertpathIs('/restaurants')\n ->assertSeeIn('#accountName',$user1->username)\n ->assertDontSeeIn('nav', 'Login')\n ->assertDontSeeIn('nav', 'Sign Up')\n ->logout();\n });\n }", "public function index()\n {\n $webinar = Webinar::with('user')->get();\n return response()->json($webinar);\n \n }", "public static function get_admins();", "public function testGetInstitutionsUsingGET()\n {\n }", "public function test_get_all_reservations()\n {\n $response = $this->get('/api/reservations');\n\n $response->assertStatus(200);\n }", "function get_super_admins()\n {\n }", "public function testMemberRegistrationForm()\n {\n $response = $this\n ->get('/register-member')\n ->assertStatus(200);\n }", "public function user_can_register_account_with_valid_details()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/register')\n ->assertSee('Register')\n ->type('name','keith')\n ->type('email','keith@test.com')\n ->type('password','secret')\n ->type('password_confirmation','secret')\n ->press('Register')\n ->assertpathIs('/home')\n ->assertDontSeeIn('nav', 'Login')\n ->assertDontSeeIn('nav', 'register')\n ;\n });\n }", "public function setRegistrant($value) {\n\t\tself::$_registrant = $value;\n\t}", "public function testIndexForm()\n\t{\n\t\t$crawler = $this->client->request('GET', '/merchants/');\n\n\t\t$this->processMerchantsForm($crawler);\n\t}", "public function testListUserIdentities()\n {\n }", "public function testIndex(): void\n {\n $response = $this\n ->actingAs($this->user)\n ->get('/');\n $response->assertViewIs('home');\n $response->assertSeeText('Сообщения от всех пользователей');\n }", "function getUpcomingWebinars()\n {\n $path = $this->getPathRelativeToOrganizer('upcomingWebinars');\n\n return $this->sendRequest('GET', $path, $parameters = null, $payload = null);\n }", "public function completeWebAuthnRegistration($request)\n {\n return $this->start()->uri(\"/api/webauthn/register/complete\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }", "public function getIntervenants()\n {\n return $this->intervenants;\n }", "public function testSoapDeleteRegistrationsInteractingWithOnlineWebservice()\n {\n $this->soap = new \\SoapClient(WSDL, array('trace' => 1));\n $credentials = new Credentials(USERNAME, PASSWORD, SKOLEKODE);\n $client = new Client($credentials, $this->soap);\n\n $repository = new RegistrationRepository($client);\n\n $weblist_id = 11111;\n $response = $repository->delete($weblist_id)->getBody();\n }", "public function testCreateSiteMembership()\n {\n }", "public function testRegisterStudent()\n {\n $this->browse(function (Browser $browser){\n $browser->visit('/register')\n ->click('.slider__container')\n ->type('firstname', env('DUSK_NEW_FIRSTNAME'))\n ->type('lastname', env('DUSK_NEW_LASTNAME'))\n ->type('email', env('DUSK_NEW_USER_STUDENT'))\n ->type('verificateEmail', env('DUSK_NEW_USER_STUDENT'))\n ->type('password', env('DUSK_NEW_PASSWORD'))\n ->press('.button')\n ->assertPathIs('/');\n });\n }", "function geteventlist(){\r\n\t\t\t$res=$this->auth_chk();\r\n\t\t\tif(isset($res[\"trust\"])){\r\n\t\t\t\t$data =$this->model->get_event_list($this->post());\r\n\t\t\t\techo json_encode($data);\r\n\t\t\t}else{\r\n\t\t\t\techo json_encode(array(\"status\" => array(\"code\" => 1,'success'=>false,'msg'=>'User have no permission')));\t\r\n\t\t\t}\t\t\r\n\t\t}", "public function sellerCanRegister()\n {\n $input = [\n 'username' => 'iniusername' . Str::random(3),\n 'fullname' => 'ini nama ' . Str::random(4),\n 'email' => 'ini_email' . Str::random(4) . '@gmail.com',\n 'password' => 'P@sswr0d!',\n 'sex' => 0\n ];\n $response = $this->post('/api/seller/register', $input);\n $response->assertStatus(200);\n }" ]
[ "0.712533", "0.6706353", "0.65471625", "0.63244635", "0.60663444", "0.59959614", "0.5994309", "0.5917624", "0.5810444", "0.57461953", "0.5665831", "0.5652421", "0.56106544", "0.5591197", "0.5565672", "0.5482361", "0.54760706", "0.5439773", "0.54333013", "0.543098", "0.54060936", "0.5389081", "0.5343885", "0.52739346", "0.527223", "0.5270274", "0.524847", "0.5225634", "0.51836187", "0.5166671", "0.5164724", "0.51644534", "0.5148558", "0.51449275", "0.51374924", "0.5123603", "0.5116346", "0.50944066", "0.5081317", "0.5069806", "0.5059505", "0.50571424", "0.5047642", "0.5047351", "0.5038859", "0.5037387", "0.5024242", "0.5013324", "0.50080186", "0.499857", "0.49984077", "0.49726754", "0.49540818", "0.49339357", "0.49317393", "0.49160075", "0.4914116", "0.4906334", "0.48941648", "0.4893917", "0.48915976", "0.48893917", "0.488333", "0.4879833", "0.48761404", "0.48722425", "0.4850241", "0.48500976", "0.48494145", "0.48456752", "0.4843954", "0.4838848", "0.4836128", "0.48191947", "0.48173073", "0.4807996", "0.4804525", "0.4802469", "0.48001993", "0.4797445", "0.47960162", "0.4785518", "0.4785447", "0.47827038", "0.47680962", "0.47678953", "0.4765622", "0.47634932", "0.47634298", "0.4758266", "0.475706", "0.47523063", "0.47511685", "0.47459665", "0.47454283", "0.4743894", "0.47432432", "0.47418636", "0.47413993", "0.47302794" ]
0.72998947
0
Test case for webinarRegistrantsQuestionsGet List Registration Questions.
Тест-кейс для получения списка вопросов регистрации в вебинаре.
public function testWebinarRegistrantsQuestionsGet() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function registration_questions() {\n\t\t// return $this->get_registration_token_list();\n\t\t$category = Category::with('questions')->where('name', 'registration')->first();\n\n\t\tif($this->categoryHasLessThanFiveQuestions($category)) {\n\t\t\treturn response()->json(['status' => false, 'code' => 200, 'message' => 'No questions for registration'], 200);\n\t\t}\n\n\t\t$questions = $category->questions->shuffle()->take(5)->sortBy('id')->values();\n\n\t\t$return_data = $this->format_according_to_multi_language($questions);\n\t\t$advertisement = Advertisement::active()->type('top')->category(3)->first();\n\t\t$return_data['advertisement'] = [\n\t\t\t'image' => $advertisement->image ?? '',\n\t\t\t'url' => $advertisement->url ?? '',\n\t\t];\n\n\t\t$this->sync_asked_questions_for_validation($questions);\n\n\t\treturn response()->json(['status' => true, 'code' => 200, 'data' => $return_data], 200);\n\t}", "public function testWebinarRegistrants()\n {\n }", "public function testWebinarRegistrantGet()\n {\n }", "public function getQuestions()\n {\n $title = \"Questions\";\n $subtitle = \"Here you will find all the questions!\";\n $view = $this->di->get(\"view\");\n $pageRender = $this->di->get(\"pageRender\");\n\n // Get all the questions\n $questions = $this->di->get(\"questionModel\")->getQuestions();\n\n // Get number of answers\n $answers = [];\n foreach ($questions as $question) {\n $ans = $this->di->get(\"answerModel\")->getAnswersWhere(\"questionId\", $question->id);\n $answers[$question->id] = count($ans);\n }\n\n $data = [\n \"questions\" => $questions,\n \"subtitle\" => $subtitle,\n \"noOfAnswers\" => $answers,\n ];\n\n $view->add(\"pages/questions\", $data);\n $pageRender->renderPage([\"title\" => $title]);\n }", "function get_registrants_of_webinars($webinar_id=false) \n {\n\t\tif($webinar_id)\n\t\t{\n\t\t\tif(!$this->organizer_key or !$this->access_token)\n\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t$return_array = array();\n\t\t\t\n\t\t\t$return_array = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/{$webinar_id}/registrants?oauth_token=\".$this->access_token), true);\n\n\t\t\tif(isset($reponse['int_err_code']) and $reponse['int_err_code'] != '')\n\t\t\t{\n\t\t\t\t$this->set_access_token('');\n\t\t\t\t$this->set_organizer_key('');\t\t\t\t\n\t\t\t\tthrow new Exception($reponse['int_err_code']);\n\t\t\t}\n\t\t}\n\t\t\t\n return $return_array;\n\t}", "public function testWebinarRegistrantQuestionUpdate()\n {\n }", "public function test_admin_tribe_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Assignments', 'tribe_list']);\n $this->assertResponseCode(404);\n }", "public function test_all_questions_and_answers_route_when_questioner_has_sitewide_role() {\n global $DB;\n\n // create a user\n $user = $this->getDataGenerator()->create_user();\n $roleid = $DB->get_field('role', 'id', array('shortname' => 'manager'));\n $this->getDataGenerator()->role_assign($roleid, $user->id);\n\n // create a course\n $course = $this->getDataGenerator()->create_course();\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n $now = time();\n\n $this->loadDataSet($this->createArrayDataSet(array(\n 'videoquanda_questions' => array(\n array('id', 'instanceid', 'userid', 'timecreated', 'timemodified' ,'seconds', 'text'),\n array(1, $videoquanda->id, $user->id, $now, $now + 1, 2, 'dummy text')\n )\n )));\n\n $this->setUser($user);\n $client = new Client($this->_app);\n $client->request('GET', '/api/v1/' . $videoquanda->id . '/questions');\n $json = $client->getResponse()->getContent();\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $array = (array) json_decode($json);\n $this->assertCount(1, $array);\n }", "public function submit_registration(Request $request) {\n\t\t$data = $request->input('data');\n\t\t$questions = $data['qA'];\n\t\t$duration = $data['duration'];\n\n\t\t/** @var User $user */\n\t\t$user = auth()->guard('api')->user();\n\t\t$savedQuestions = $user->registration_questions()->orderBy('id')->get();\n\n\t\tif($savedQuestions->count() == 0) {\n\t\t\treturn response()->json([\n\t\t\t\t'status' => false,\n\t\t\t\t'code' => 200,\n\t\t\t\t'message' => 'No questions generated from the server.',\n\t\t\t]);\n\t\t}\n\n\t\t// check if the question asked and sent from user's phone are in the same order\n\t\t// and answer also matches the actual answer\n\t\tforeach($questions as $key => $question) {\n\t\t\tif($question['questionId'] != $savedQuestions[ $key ]->id) {\n\t\t\t\treturn response()->json(['status' => false, 'code' => 200, 'message' => 'Failure on question matching.']);\n\t\t\t}\n\n\t\t\t$option = Option::find($question['answerId']);\n\t\t\tif($option->is_answer() && $option->question_id == $question['questionId']) {\n\t\t\t} else {\n\t\t\t\treturn response()->json(['status' => false, 'code' => 200, 'message' => 'Failure on option matching.']);\n\t\t\t}\n\t\t}\n\n\t\t$user->registration_participation()->create([\n\t\t\t'token' => str_random(100),\n\t\t\t'selected' => 1,\n\t\t]);\n\n\t\t$this->deleteGeneratedQuestions($user);\n\n\t\treturn response()->json(['status' => true, 'code' => 200, 'message' => 'Success.']);\n\t}", "public function test_admin_squad_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Assignments', 'squad_list']);\n $this->assertResponseCode(404);\n }", "public function testListPastWebinarQA()\n {\n }", "public function questions()\n {\n\n $client = new \\GuzzleHttp\\Client();\n\n $request = $client->get('http://localhost/quizci/questions');\n $response = $request->getBody()->getContents();\n\n $res_json_decode = json_decode($response);\n $data_collection = collect($res_json_decode->questions);\n //dd($data_collect);\n\n return View('admin.pages.questions', compact('data_collection'));\n }", "function getRegistrationList()\r\n {\r\n global $objDatabase;\r\n \r\n $blnFirst = true;\r\n $arrWhere = array();\r\n if ($this->getRegistrations) { $arrWhere[] = 1; }\r\n if ($this->getDeregistrations) { $arrWhere[] = 0; }\r\n if ($this->getWaitlist) { $arrWhere[] = 2; }\r\n $strWhere = ' AND (';\r\n foreach ($arrWhere as $value) {\r\n $strWhere .= $blnFirst ? '`type` = '.$value : ' OR `type` = '.$value;\r\n $blnFirst = false;\r\n }\r\n $strWhere .= ')';\r\n \r\n $query = '\r\n SELECT `id`\r\n FROM `'.DBPREFIX.'module_'.$this->moduleTablePrefix.'_registration`\r\n WHERE `event_id` = '.$this->eventId.'\r\n '.$strWhere.'\r\n ORDER BY `id` DESC'\r\n ;\r\n $objResult = $objDatabase->Execute($query);\r\n \r\n if ($objResult !== false) {\r\n while (!$objResult->EOF) {\r\n $objRegistration = new \\Cx\\Modules\\Calendar\\Controller\\CalendarRegistration($this->formId, intval($objResult->fields['id']));\r\n $this->registrationList[$objResult->fields['id']] = $objRegistration;\r\n $objResult->MoveNext();\r\n }\r\n }\r\n }", "public function test_all_questions_and_answers_route_when_questioner_is_admin() {\n // create a user\n $user = $this->getDataGenerator()->create_user();\n\n // create a course\n $course = $this->getDataGenerator()->create_course();\n\n // enrolment\n $this->getDataGenerator()->enrol_user($user->id, $course->id);\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n $now = time();\n\n $this->loadDataSet($this->createArrayDataSet(array(\n 'videoquanda_questions' => array(\n array('id', 'instanceid', 'userid', 'timecreated', 'timemodified' ,'seconds', 'text'),\n array(1, $videoquanda->id, 2, $now, $now + 1, 2, 'dummy text'),\n array(2, $videoquanda->id, $user->id, $now, $now + 1, 2, 'dummy text')\n )\n )));\n\n $this->setAdminUser();\n $client = new Client($this->_app);\n $client->request('GET', '/api/v1/' . $videoquanda->id . '/questions');\n $json = $client->getResponse()->getContent();\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $array = (array) json_decode($json);\n $this->assertCount(2, $array);\n }", "public function indexAction()\n {\n $user = $this->get('security.context')->getToken()->getUser();\n\n// $em = $this->getDoctrine()->getEntityManager();\n// $entity = $em->getRepository('CfpCfpBundle:Registration')->findOneById(1);\n\n// foreach ($entity->getSubmissions() as $submission) {\n// print_r($submission->getRemarks());\n// print \"<hr>\";\n// }\n// exit;\n//\n $entities = $user->getRegistrations();\n\n return $this->render('CfpCfpBundle:Registration:index.html.twig', array(\n 'entities' => $entities\n ));\n }", "public function testWebinarRegistrantCreate()\n {\n }", "public function get_questions() {\n return $this->questions;\n }", "public function testRegistrationUITest()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/add_user')\n ->assertSee('Username')\n ->assertSee('First Name')\n ->assertSee('Last Name')\n ->assertSee('Password')\n ->assertSee('Confirm Password')\n ->assertSee('Role')\n ->assertSee('Save');\n });\n }", "public function getQuestions()\n {\n $title = \"Questions\";\n $view = $this->di->get(\"view\");\n $pageRender = $this->di->get(\"pageRender\");\n $post = new Post($this->di->get(\"db\"));\n $user = new User($this->di->get(\"db\"));\n $tag = $this->di->get(\"tag\");\n\n $questions = $post->getQuestions();\n foreach ($questions as $question) {\n $question->tags = $tag->getPostTags($question->id);\n $question->user = $user->findAllWhere(\"id = ?\", [$question->userId])[0];//$user->find(\"id\", $question->userId);\n }\n\n $pag = $this->getPagination($questions);\n $view->add(\"comment/question-list\", [\n \"questions\" => array_slice($questions, $pag[\"offset\"], $pag[\"length\"], true),\n \"pag\" => $pag,\n ]);\n return $pageRender->renderPage([\"title\" => $title]);\n }", "function _getRegistrations($queryParameters){\n\t\t//echo \"get attendees in api 32\";\n // @TODO handle $_GET parameters, specifically allowing for ORs, and LIKE\n\t\tif(!empty($queryParameters))\n\t\t\t$whereSql=\"WHERE \".implode(\" AND \",$this->constructSQLWhereSubclauses($queryParameters));\n\t\telse\n\t\t\t$whereSql='';\n global $wpdb;\n $sql=\"\n SELECT\n *\n FROM\n {$wpdb->prefix}events_detail\n\t\t\t$whereSql\";\n $results=$wpdb->get_results($sql,ARRAY_A);\n return array(\"registrations\"=>$results);\n }", "public function testWebinarRegistrantStatus()\n {\n }", "public function actionRegistrationList() {\n $userCounter = new СountRegisteredUsers();\n $userCounter->getAllUserForDays();\n $userCounter->getNonActiveUsersForDays();\n\n $dayDate = new DateTime();\n\n // TODO registration\n\n $registrationsByDay = [];\n for($i = 0; $i<30; $i++) {\n $day = date_format($dayDate, 'Y-m-d');\n $registrationsByDay[$day]['period'] = $day;\n $registrationsByDay[$day]['totalRegistrations'] = isset($userCounter->totalRegistrations[$day]) ? $userCounter->totalRegistrations[$day] : 0;\n $registrationsByDay[$day]['totalPersonals'] = isset($userCounter->totalPersonals[$day]) ? $userCounter->totalPersonals[$day] : 0;\n $registrationsByDay[$day]['totalCorporate'] = isset($userCounter->totalCorporate[$day]) ? $userCounter->totalCorporate[$day] : 0;\n $registrationsByDay[$day]['totalNonActivePersonals'] = isset($userCounter->totalNonActivePersonals[$day]) ? $userCounter->totalNonActivePersonals[$day] : 0;\n $registrationsByDay[$day]['totalNonActiveCorporate'] = isset($userCounter->totalNonActiveCorporate[$day]) ? $userCounter->totalNonActiveCorporate[$day] : 0;\n\n $dateInterval = new DateInterval('P1D');\n $dateInterval->invert = 1;\n $dayDate->add($dateInterval);\n }\n\n // getting registration by month\n $userCounter = new СountRegisteredUsers();\n $userCounter->getAllUserForMonths();\n $userCounter->getNonActiveUsersForMonths();\n\n $dayDate = new DateTime();\n\n $registrationsByMonth = [];\n for($i = 0; $i<12; $i++) {\n $day = date_format($dayDate, 'F');\n $registrationsMonth[$day]['period'] = $day;\n $registrationsMonth[$day]['totalRegistrations'] = isset($userCounter->totalRegistrations[$day]) ? $userCounter->totalRegistrations[$day] : 0;\n $registrationsMonth[$day]['totalPersonals'] = isset($userCounter->totalPersonals[$day]) ? $userCounter->totalPersonals[$day] : 0;\n $registrationsMonth[$day]['totalCorporate'] = isset($userCounter->totalCorporate[$day]) ? $userCounter->totalCorporate[$day] : 0;\n $registrationsMonth[$day]['totalNonActivePersonals'] = isset($userCounter->totalNonActivePersonals[$day]) ? $userCounter->totalNonActivePersonals[$day] : 0;\n $registrationsMonth[$day]['totalNonActiveCorporate'] = isset($userCounter->totalNonActiveCorporate[$day]) ? $userCounter->totalNonActiveCorporate[$day] : 0;\n\n $dateInterval = new DateInterval('P1M');\n $dateInterval->invert = 1;\n $dayDate->add($dateInterval);\n }\n\n // getting registration by year\n $userCounter = new СountRegisteredUsers();\n $userCounter->getAllUserForYears();\n $userCounter->getNonActiveUserForYears();\n\n $dayDate = new DateTime();\n\n $registrationsByYear = [];\n $day = date_format($dayDate, 'Y');\n $registrationsByYear[$day]['period'] = $day;\n $registrationsByYear[$day]['totalRegistrations'] = isset($userCounter->totalRegistrations[$day]) ? $userCounter->totalRegistrations[$day] : 0;\n $registrationsByYear[$day]['totalPersonals'] = isset($userCounter->totalPersonals[$day]) ? $userCounter->totalPersonals[$day] : 0;\n $registrationsByYear[$day]['totalCorporate'] = isset($userCounter->totalCorporate[$day]) ? $userCounter->totalCorporate[$day] : 0;\n $registrationsByYear[$day]['totalNonActivePersonals'] = isset($userCounter->totalNonActivePersonals[$day]) ? $userCounter->totalNonActivePersonals[$day] : 0;\n $registrationsByYear[$day]['totalNonActiveCorporate'] = isset($userCounter->totalNonActiveCorporate[$day]) ? $userCounter->totalNonActiveCorporate[$day] : 0;\n\n $registrationsByYearOld = [];\n $day--;\n $registrationsByYearOld[$day]['period'] = $day;\n $registrationsByYearOld[$day]['totalRegistrations'] = isset($userCounter->totalRegistrations[$day]) ? $userCounter->totalRegistrations[$day] : 0;\n $registrationsByYearOld[$day]['totalPersonals'] = isset($userCounter->totalPersonals[$day]) ? $userCounter->totalPersonals[$day] : 0;\n $registrationsByYearOld[$day]['totalCorporate'] = isset($userCounter->totalCorporate[$day]) ? $userCounter->totalCorporate[$day] : 0;\n $registrationsByYearOld[$day]['totalNonActivePersonals'] = isset($userCounter->totalNonActivePersonals[$day]) ? $userCounter->totalNonActivePersonals[$day] : 0;\n $registrationsByYearOld[$day]['totalNonActiveCorporate'] = isset($userCounter->totalNonActiveCorporate[$day]) ? $userCounter->totalNonActiveCorporate[$day] : 0;\n $this->layout = '//admin_area/layouts/admin_main';\n $this->render('/admin_area/pages/registrationCounterList',\n [\n 'registrationsByDay' => $registrationsByDay,\n 'registrationsByMonth' => $registrationsMonth,\n 'registrationsByYear' => $registrationsByYear,\n 'registrationsByYearOld' => $registrationsByYearOld,\n ]\n );\n }", "public function testGetSurveyQuestionChoices0()\n {\n }", "public function testGetSurveyQuestionChoices0()\n {\n }", "public function getRegistrants()\n {\n if (array_key_exists(\"registrants\", $this->_propDict)) {\n return $this->_propDict[\"registrants\"];\n } else {\n return null;\n }\n }", "public function submit_registration_2(RegistrationQuizSubmissionRequest $request) {\n\t\t$questionIds = $request->questionIds;\n\t\t$answerIds = $request->answerIds;\n\n\t\t/** @var User $user */\n\t\t$user = auth()->guard('api')->user();\n\n\t\t$user->age = $request->input('age');\n\t\t$user->gender = $request->input('gender');\n\t\t$user->save();\n\n\t\t$savedQuestions = $user->registration_questions()->orderBy('id')->get();\n\n\t\t$this->validateGeneratedQuestions($savedQuestions, $questionIds, $answerIds);\n\n\t\t$randomAlphaNumericString = randomAlphaNumericString(10);\n\t\t$user->registration_participation()->create([\n\t\t\t'token' => $randomAlphaNumericString,\n\t\t\t'selected' => 0,\n\t\t]);\n\n\t\t$this->deleteGeneratedQuestions($user);\n\n\t\treturn response()->json([\n\t\t\t'status' => true,\n\t\t\t'code' => 200,\n\t\t\t'message' => 'Success.',\n\t\t\t'registration_count' => $user->registration_participation()->count(),\n\t\t\t'registration_token' => $randomAlphaNumericString,\n\t\t]);\n\n\t}", "public function testQuestionSharev1questions()\n {\n\n }", "public function testCanDisplayTheAssessorRegistrationForm()\n {\n $response = $this->get('/assessors/register');\n\n $response->assertStatus(200);\n\n $response->assertViewIs('auth.register');\n }", "public function providertestRequest()\r\n {\r\n return array(array(\"list\",\"course\"),array(\"list\",\"teacher\"));\r\n }", "public function getQuestions()\n {\n return $this->questions;\n }", "public function getQuestions()\n {\n return $this->questions;\n }", "public function test_admin_certification_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/MemberSkills', 'certification_programs']);\n $this->assertResponseCode(404);\n }", "function ipal_get_questions_student($qid){\r\n\r\n global $ipal;\r\n global $DB;\r\n global $CFG;\r\n\t\t$q='';\r\n\t\t$pagearray2=array();\r\n\t\t\r\n $aquestions=$DB->get_record('question',array('id'=>$qid));\r\n\t\t\tif($aquestions->questiontext != \"\"){ \r\n\r\n\t$pagearray2[]=array('id'=>$qid, 'question'=>$aquestions->questiontext, 'answers'=>ipal_get_answers_student($qid));\r\n\t\t\t\t\t\t\t}\r\n return($pagearray2);\r\n}", "public function testUserRegister()\n {\n //Voter user registration testing\n $this->browse(function (Browser $voter,$photographer,$organizer) {\n $voter->visit('/')\n ->clickLink('Register')\n ->assertSee('User Registration')\n ->value('#name','VoterTesting')\n ->value('#email','votertesting@gmail.com')\n ->value('#address','University of Moratuwa')\n ->Value('#telephone','0716485403')\n ->Value('#password','123456789')\n ->value('#password-confirm','123456789')\n ->click('.checker')\n ->check('condition')\n ->click('button[type=\"submit\"]')\n ->assertSee('LensView Timeline')\n ->clickLink('View Profile')\n ->assertTitle('LensView | User Profile')\n ->click('#deleteButton')\n ->value('input[type=\"password\"]','123456789')\n ->click('.btn-red');\n\n //Photographer user registration testing\n $photographer->visit('/')\n ->clickLink('Register')\n ->assertSee('User Registration')\n ->value('#name','PhotographerTesting')\n ->value('#email','photographertesting@gmail.com')\n ->value('#address','University of Moratuwa')\n ->Value('#telephone','0716485403')\n ->click('.role2')\n ->Value('#password','123456789')\n ->value('#password-confirm','123456789')\n ->click('.checker')\n ->check('condition')\n ->click('button[type=\"submit\"]')\n ->assertSee(\"Photographer Dashboard\")\n ->clickLink('View Profile')\n ->assertTitle('LensView | User Profile')\n ->click('#deleteButton')\n ->value('input[type=\"password\"]','123456789')\n ->click('.btn-red');\n \n\n // Contest Organizer registration testing\n $organizer->visit('/')\n ->clickLink('Register')\n ->assertSee('User Registration')\n ->value('#name','OrganizerTesting')\n ->value('#email','organizertesting@gmail.com')\n ->value('#address','University of Moratuwa')\n ->Value('#telephone','0716485403')\n ->click('.role3')\n ->Value('#password','123456789')\n ->value('#password-confirm','123456789')\n ->click('.checker')\n ->check('condition')\n ->click('button[type=\"submit\"]')\n ->assertSee(\"Organizer Dashboard\")\n ->clickLink('View Profile')\n ->assertTitle('LensView | User Profile')\n ->click('#deleteButton')\n ->value('input[type=\"password\"]','123456789')\n ->click('.btn-red');\n });\n}", "public function questions() {\n $questions = DB::select('select Question, AnswerType, rowid from Questions WHERE AnswerType<>\"mcq-radio\" AND AnswerType<>\"mcq-dropDown\";');\n\n // Obtain a list of all questions that are mcq\n $MCQ = DB::select('select Question, AnswerType, rowid from Questions WHERE AnswerType=\"mcq-radio\" OR AnswerType=\"mcq-dropDown\";');\n $mcqOptions = DB::select('select Qid, mcqOption from mcqOptions');\n\n return view('userResponseArea', compact(['questions','MCQ', 'mcqOptions']));\n }", "public function testGetSurveyQuestions0()\n {\n }", "public function testGetSurveyQuestions0()\n {\n }", "public function registrationAction()\n {\n $eventId = $this->params('eventId');\n $registrations = $this->regTable->findRegByEventId($eventId);\n //*** DATABASE TABLE MODULE RELATIONSHIPS LAB: provide secondary data usersModelTableGateway which performs lookups for attendees for each registration\n $data = [];\n if ($registrations) {\n foreach ($registrations as $item) {\n $secondaryDataTable = '???';\n $data[] = [\n $item->registration_time,\n $item->first_name,\n $item->last_name,\n $secondaryDataTable];\n }\n }\n return new JsonModel(['data' => $data]);\n }", "public function getQuestions() {\r\n\t\treturn $this->questions;\r\n\t}", "public function testWebinarPolls()\n {\n }", "public function findAll() {\n\t\t$registrations = $this->registrationRepository->findAll();\n\t\t$this->assertEquals(10, $registrations->count());\n\t}", "function citrixonline_create_registrant_of_webinar($webinar_id=false, $data = array(), $all_fields_chk = false) \n {\n\t\tif($webinar_id and isset($data['first_name']) and isset($data['last_name']) and isset($data['email']))\n\t\t{\n\t\t\t$params = array();\n\t\t\t\n\t\t\t$fields = array(\n\t\t\t\t'firstName'=>$data['first_name'],\n\t\t\t\t'lastName'=>$data['last_name'],\n\t\t\t\t'email'=>$data['email'],\n );\n\t\t\t\n\t\t\t$params[CURLOPT_HTTPHEADER] = array('Accept: application/json', 'Content-Type: application/json', 'Authorization: OAuth oauth_token='.$this->access_token);\n\t\t\t$params[CURLOPT_POSTFIELDS] = json_encode($fields);\n\t\t\t\n\t\t\t$reponse = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/{$webinar_id}/registrants\", $params), true);\n\t\t\t\n\t\t\tif(isset($reponse['registrantKey']))\n\t\t\t\treturn $reponse;\n\t\t}\n\t\t\n\t\treturn false;\t\t\t\n\t}", "private function questionList()\n {\n \t$requiredQuestions = [];\n\n \tfor ($x = 1; $x <= count($this->questions); $x++) {\n \t\t$requiredQuestions[ config('constants.questionInputPrefix') . $x] = 'required';\n \t}\n\n \treturn $requiredQuestions;\n }", "public function testSubscriptionsList()\n {\n }", "public function testListQrcodes()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs($this->user)\n ->visit('/admin')\n ->clickLink('Qrcodes')\n ->assertPathIs('/admin/qrcodes')\n ->assertSee('List Qrcodes');\n });\n }", "public function index()\n {\n $questions = auth()->user()->questions()->paginate(10);\n return view('teacher.question.index',[\n 'questions' => $questions\n ]);\n }", "public function testRegisterStudent()\n {\n $this->browse(function (Browser $browser){\n $browser->visit('/register')\n ->click('.slider__container')\n ->type('firstname', env('DUSK_NEW_FIRSTNAME'))\n ->type('lastname', env('DUSK_NEW_LASTNAME'))\n ->type('email', env('DUSK_NEW_USER_STUDENT'))\n ->type('verificateEmail', env('DUSK_NEW_USER_STUDENT'))\n ->type('password', env('DUSK_NEW_PASSWORD'))\n ->press('.button')\n ->assertPathIs('/');\n });\n }", "public function actionTest()\n {\n $videoconference = \\lispa\\amos\\videoconference\\models\\Videoconf::findOne(1);\n // pr($videoconference->toArray(), 'videoconference');//exit;\n $users = $videoconference->getVideoconfUsersMms()->all();\n // $users = $videoconference->getVideoconfUsers();\n\n foreach ($users as $u) {\n pr($u->toArray(), '$u relazione'); //exit;\n $userProfile = \\lispa\\amos\\admin\\models\\UserProfile::findOne($u->user_id);\n // pr($userProfile->toArray(), '$userProfile');//exit;\n $user = $userProfile->getUser()->one();\n // pr($user->toArray(), '$user');//exit;\n $userEmail = $userProfile->getUser()->one()->email;\n // print \"Email: $userEmail;<br />\";\n }\n //pr($users->toArray(), '$users');exit;/****/\n }", "public function getQuestionIds(){\n\t\treturn array('todo'); // This will be moved to QuestionTemplate\n\t}", "function ipal_get_questions(){ \r\n \r\n\tglobal $ipal;\r\n\tglobal $DB;\r\n\tglobal $CFG;\r\n\t$q='';\t\r\n\t$pagearray2=array();\r\n\t // is there an quiz associated with an ipal?\r\n//\t$ipal_quiz=$DB->get_record('ipal_quiz',array('ipal_id'=>$ipal->id));\r\n\t\r\n\t// get quiz and put it into an array\r\n\t$quiz=$DB->get_record('ipal',array('id'=>$ipal->id));\r\n\t\r\n\t//Get the question ids\r\n\t$questions=explode(\",\",$quiz->questions);\r\n\t\r\n\t//get the questions and stuff them into an array\r\n\t\tforeach($questions as $q){\t\r\n\t\t\t\r\n\t\t $aquestions=$DB->get_record('question',array('id'=>$q));\r\n\t\t if(isset($aquestions->questiontext)){\r\n\t\t $pagearray2[]=array('id'=>$q, 'question'=>strip_tags($aquestions->questiontext), 'answers'=>ipal_get_answers($q));\r\n\t\t\t\t \r\n\t\t }\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t}\r\n \r\n\treturn($pagearray2);\r\n\t}", "public function get_all_registered()\n {\n }", "public function get_all_registered()\n {\n }", "public function testApiRegistrationSimple()\n {\n $eventsFaker = Event::fake();\n $emailVerificationSend = Notification::fake();\n $uniqueData = $this->getTestRegisterData();\n $response = $this->withHeaders([ 'Authorization' => $this->getBearerClientToken() ])\n ->json('POST', $this->getRegisterRoute(), $uniqueData);\n\n $response->assertStatus(200)->assertJsonMissingValidationErrors();\n\n $responseArray = $response->decodeResponseJson()->json();\n $this->assertArrayNotHasKey('token_type', $responseArray);\n $this->assertArrayNotHasKey('expires_in', $responseArray);\n $this->assertArrayNotHasKey('access_token', $responseArray);\n $this->assertArrayNotHasKey('refresh_token', $responseArray);\n\n $user = CoreUser::byEmail($uniqueData[ 'email' ])->firstOrFail();\n $this->withoutExceptionHandling();\n\n if ( config('kit-auth.should_dispatch_registered_event') ) {\n $eventsFaker->assertDispatched(Registered::class,\n function (Registered $event) use ($emailVerificationSend) {\n app(ProcessEmailVerification::class)->handle($event);\n\n $emailVerificationSend->assertSentTo($event->user, VerifyEmail::class,\n function (VerifyEmail $notice) {\n $this->assertEquals($notice->requestSide, CoreUserContract::FRONTEND_REQUEST_SIDE);\n return $notice->tokens[ 'web' ] && $notice->tokens[ 'mobile' ];\n });\n\n return true;\n });\n } else {\n $eventsFaker->assertNotDispatched(Registered::class);\n }\n }", "public function testIndexSurvey()\n {\n $year = 2018;\n Survey::factory()->create(['year' => $year]);\n\n $response = $this->json('GET', 'survey', ['year' => $year]);\n $response->assertStatus(200);\n $this->assertCount(1, $response->json()['survey']);\n }", "function getQuestions()\n\t{\n\t\treturn $this->aQuestion;\n\t}", "public function getQuestions()\n {\n if (isset($_GET[\"user_id\"]) && isset($_GET[\"action_id\"]) && isset($_GET[\"attempted\"]) && isset($_GET[\"oq\"] ) ) {\n\n $user_id = $this->input->get('user_id');\n $action_id = $this->input->get('action_id');\n $attempted = $this->input->get('attempted');\n $oq = $this->input->get('oq');\n\n $questions = $this->Question_model->getQuestions($user_id, $action_id, $attempted, $oq);\n\n //var_dump($questions);\n\n foreach ($questions as $key => $question) {\n\n $questions[$key]['answer_id'] = null;\n \n if($answer_question = $this->Answer_model->getAnswer($question['question_id'])){\n if ($answer_question['isRecorded'] == 1) {\n $questions[$key]['answer_id'] = $answer_question['answer_id'];\n }\n }\n\n if ($user_id == \"142566\") $questions[$key]['answer_id'] = 18;\n\n $questions[$key]['listen_before'] = false;\n if($this->Question_model->checkUserQuestion($user_id, $question['question_id']))\n $questions[$key]['listen_before'] = true;\n \n $questions[$key]['like'] = false;\n $questions[$key]['dislike'] = false;\n $questions[$key]['report'] = false;\n $questions[$key]['pref'] = false;\n \n if($response = $this->Question_model->checkUserResponse($user_id, $question['question_id'])) {\n $questions[$key]['pref'] = true;\n $questions[$key][$response['response']] = false;\n }\n }\n echo json_encode(array('result' => array('error' => false, 'length' => sizeof($questions), 'questions' => $questions)));\n return;\n }\n else echo json_encode(array('result' => array('error' => true, 'message' => 'wrong params')));\n }", "public function show(Questions $questions)\n {\n //\n }", "public function getRegistries()\n {\n return $this->registries;\n }", "public function testQuestionSharev1questions0()\n {\n\n }", "public function getSalespersonAllQuestions() {\n return $this->_salespersonDatasource->getSalespersonAllQuestions();\n }", "public function getRegistrant();", "public function testListEnrollmentRequests()\n {\n }", "public function testGetSurveys0()\n {\n }", "public function testGetSurveys0()\n {\n }", "public function testQuestionCreateView() {\n $response = $this->get('course/' . $this->course->id . '/question/create');\n $this->assertEquals('200', $response->foundation->getStatusCode());\n $this->assertEquals('general.permission', $response->content->view);\n }", "public function testVenueQuestionnaire()\n {\n $this->buildVenueSurvey();\n\n $response = $this->json('GET', \"survey/questionnaire\", ['slot_id' => $this->slot->id, 'type' => Survey::TRAINING]);\n $response->assertStatus(200);\n\n $survey = $this->survey;\n $venueGroup = $this->venueGroup;\n $venueQ = $this->venueQuestion;\n $trainerGroup = $this->trainerGroup;\n $trainerQ = $this->trainerQuestion;\n\n $response->assertJson([\n 'survey' => [\n 'id' => $survey->id,\n 'type' => Survey::TRAINING,\n 'year' => $survey->year,\n 'title' => $survey->title,\n ]\n ]);\n\n $response->assertJson([\n 'survey' => [\n 'survey_groups' => [\n [\n 'id' => $venueGroup->id,\n 'title' => $venueGroup->title,\n 'description' => $venueGroup->description,\n 'survey_questions' => [\n [\n 'id' => $venueQ->id,\n 'sort_index' => $venueQ->sort_index,\n 'type' => $venueQ->type,\n 'description' => $venueQ->description,\n ]\n ]\n ],\n\n [\n 'id' => $trainerGroup->id,\n 'title' => $trainerGroup->title,\n 'description' => $trainerGroup->description,\n 'survey_questions' => [\n [\n 'id' => $trainerQ->id,\n 'sort_index' => $trainerQ->sort_index,\n 'type' => $trainerQ->type,\n 'description' => $trainerQ->description,\n ]\n ]\n\n ]\n ]\n ]\n ]);\n\n $trainer = $this->trainer;\n\n $response->assertJson([\n 'trainers' => [\n [\n 'id' => $trainer->id,\n 'callsign' => $trainer->callsign,\n 'position_id' => Position::TRAINER\n ]\n ]\n ]);\n\n $slot = $this->slot;\n $response->assertJson([\n 'slot' => [\n 'id' => $slot->id,\n 'begins' => $slot->begins\n ]\n ]);\n //return response()->json(['survey' => $survey, 'trainers' => $trainers, 'slot' => $slot]);\n\n }", "public function viewQuestion(Request $request)\r\n {\r\n $responseArray = array();\r\n\r\n $userLoggedIn = $this->get('security.token_storage')->getToken()->getUser();\r\n\r\n //Makes sure a user is logged in and not tha anonymous user.\r\n $securityContext = $this->container->get('security.authorization_checker');\r\n if ($securityContext->isGranted('IS_AUTHENTICATED_FULLY')) {\r\n\r\n $viewWellnessQuestions = new ViewWellnessQuestions();\r\n $generatedArray = $viewWellnessQuestions->generateArray($userLoggedIn);\r\n\r\n //Return the array that was created as JSON\r\n return new JsonResponse($generatedArray);\r\n\r\n }else{\r\n $responseArray = array(\r\n 'status'=>\"failure\",\r\n 'message'=>\"User is not logged in.\",\r\n 'data'=> array(\r\n )\r\n );\r\n }\r\n\r\n return new JsonResponse($responseArray);\r\n }", "public function testRegisterPageDisplay()\n {\n $this->browse(function ($browser) {\n $browser->visit('/register')\n ->assertDontSee('Contacts Manager');\n });\n }", "public function testCreateSurveyQuestion0()\n {\n }", "public function testCreateSurveyQuestion0()\n {\n }", "public function showRegistrationForm()\n {\n $data = [];\n\n // References\n $data['countries'] = CountryLocalizationHelper::transAll(CountryLocalization::getCountries());\n\n $data['genders'] = Gender::trans()->get();\n $cities = City::where('country_code',\"SA\")->orderBy('name')->get();\n\n MetaTag::set('title', getMetaTag('title', 'register'));\n MetaTag::set('description', strip_tags(getMetaTag('description', 'register')));\n MetaTag::set('keywords', getMetaTag('keywords', 'register'));\n\n return response()->json([\n 'status' => 'success',\n 'cities' => $cities,\n ]);\n }", "public static function getAllQuestionsAndAnswers(){\n $returnArray = array(\n 'Result' => 1,\n 'Reason' => \"\",\n 'QuestionResponses' => array()\n );\n\n $questionObjects = question::getAllQuestions();\n\n if(count($questionObjects) > 0){\n $responsesArray = self::buildQuestionsAndAnswersArray_Admin($questionObjects);\n $returnArray['QuestionResponses'] = $responsesArray;\n }\n else{\n $returnArray['Result'] = 0;\n $returnArray['Reason'] = \"No questions were found\";\n }\n\n return $returnArray;\n }", "public function getStudentRegistrations()\n {\n return $this->hasMany(StudentRegistration::className(), ['courseId' => 'courseId']);\n }", "public function testListPastWebinarPollResults()\n {\n }", "public function getUnansweredQuestions()\n {\n if ($this->input->server('REQUEST_METHOD') == 'GET')\n {\n $unanswered_questions = $this->Question_model->getUnansweredQuestions();\n echo json_encode(array('status' => \"success\", 'unanswered_questions' => $unanswered_questions));\n return;\n }\n }", "public function testGetInstitutionsUsingGET()\n {\n }", "public function registration_get(){\n }", "private function json_retrieveQuestions()\n {\n // Gets the input data from the Front-End\n $input = json_decode(file_get_contents(\"php://input\"));\n// $surveyID = $_POST['surveyID'];\n $surveyID= $input->surveyID;\n\n // Gets Survey Details\n $surveyQuery = \"SELECT surveyTitle, surveyDescription FROM Surveys WHERE surveyID = :surveyID;\";\n $surveyParams = [\n \":surveyID\" => $surveyID,\n ];\n // This decodes the JSON encoded by getJSONRecordSet() from an associative array\n $resSurveyDetails = json_decode($this->recordset->getJSONRecordSet($surveyQuery, $surveyParams), true);\n $surveyTitle = $resSurveyDetails['data']['0']['surveyTitle'];\n $surveyDescription = $resSurveyDetails['data']['0']['surveyDescription'];\n\n // Gets Questions Details\n $questionsQuery = \"SELECT questionID, question, mediaPath FROM Questions WHERE surveyID = :surveyID;\";\n $questionsParams = [\n \":surveyID\" => $surveyID,\n ];\n\n // This decodes the JSON encoded by getJSONRecordSet() from an associative array\n $resQuestions = json_decode($this->recordset->getJSONRecordSet($questionsQuery, $questionsParams), true);\n $questionID = $resQuestions['data']['0']['questionID'];\n $question = $resQuestions['data']['0']['question'];\n $mediaPath = $resQuestions['data']['0']['mediaPath'];\n\n $nextpage = null;\n\n $res['status'] = 200;\n $res['message'] = \"ok\";\n $res['next_page'] = $nextpage;\n $res['surveyTitle'] = $surveyTitle;\n $res['surveyDescription'] = $surveyDescription;\n $res['questionID'] = $questionID;\n $res['question'] = $question;\n $res['mediaPath'] = $mediaPath;\n\n return json_encode($res);\n }", "public static function get_cms_question_url_list()\n\t{\n\t\treturn self::get_cms_post_url_list(Helper_PostType::QUESTION);\n\t}", "public function test_all_questions_and_answers_route_when_in_groupmode_with_sitewide_role() {\n global $DB;\n\n // create a user\n $user = $this->getDataGenerator()->create_user();\n $roleid = $DB->get_field('role', 'id', array('shortname' => 'manager'));\n $this->getDataGenerator()->role_assign($roleid, $user->id);\n\n // create a course\n $course = $this->getDataGenerator()->create_course([\n 'groupmode' => SEPARATEGROUPS,\n 'groupmodeforce' => true,\n ]);\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n $now = time();\n\n $this->loadDataSet($this->createArrayDataSet(array(\n 'videoquanda_questions' => array(\n array('id', 'instanceid', 'userid', 'timecreated', 'timemodified', 'seconds', 'text'),\n array(1, $videoquanda->id, $user->id, $now, $now + 1, 2, 'dummy text')\n )\n )));\n\n $this->setUser($user);\n $client = new Client($this->_app);\n $client->request('GET', '/api/v1/' . $videoquanda->id . '/questions');\n $json = $client->getResponse()->getContent();\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $array = (array) json_decode($json);\n $this->assertCount(1, $array);\n }", "public function user_can_register_account_with_valid_details()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/register')\n ->assertSee('Register')\n ->type('name','keith')\n ->type('email','keith@test.com')\n ->type('password','secret')\n ->type('password_confirmation','secret')\n ->press('Register')\n ->assertpathIs('/home')\n ->assertDontSeeIn('nav', 'Login')\n ->assertDontSeeIn('nav', 'register')\n ;\n });\n }", "public function index()\n {\n $questions = Question::all();\n return response()->json(['questions' => $questions],200);\n }", "public function test_passed_registration()\n {\n\n $user = $this->user();\n\n $response = $this->post('api/v1/register', $user);\n $response->assertStatus(200);\n $response->assertJsonMissing([\n \"status\"=>'Failed'\n ]);\n\n }", "public function testListSiteMembershipRequestsForPerson()\n {\n }", "public function hrregistration(){\n\n \t $rands = str_random(10);\n \t $rand = json_encode($rands);\n return response()->json($rand,200);\n }", "public function questions(Request $request){\n $user_id = $request->user_id;\n\n // Cari question sesuai dengan user_id yang masuk\n $questions = Question::where('user_id', $user_id)->get();\n\n // Kirim response\n return response()->json($questions);\n\n }", "public function index()\n {\n // $questions = Question::all();\n // dd($questions); \n return view('questions::index');\n }", "public function testRegistrationFieldsMissing(): void { }", "public function testShouldGenerateARegistrationSuccessfully() {\n \n $entity = new Registration;\n $entity->source_id = $this->getSource()->id;\n $entity->registrant_id = $this->getRegistrant()->id;\n $entity->type = 'PLAYER' ;\n $entity->league = 'league';\n $entity->org_name = 'Oranization...';\n $entity->org_state = 'NY';\n $entity->season = '2017';\n $entity->external_id = 'myexternalid';\n $entity->right_to_market = true;\n $entity->team_gender = 'Male';\n $entity->team_name = 'A-Team';\n $entity->school_district = 'school district';\n $entity->school_state = 'school sate';\n $entity->first_name = 'Firt name';\n $entity->middle_name = 'Middle name';\n $entity->last_name = 'Last Name';\n $entity->email = 'mail@mail.com';\n $entity->gender = 'Male';\n $entity->city = 'California';\n $entity->zip_code = '234141234123';\n $entity->birth_date = '11/27/1984';\n $entity->phone_number = '1234567890';\n $entity->game_type = 'SOME';\n $entity->level = 'LEVEL';\n $entity->state = 'CALIFORNIA';\n $entity->address_first_line = 'An Address 1234';\n $entity->county = 'A county';\n\n $entity->save();\n $this->assertTrue(!is_null($entity->id));\n }", "public function displayQuestions() {\n $listQuestions = array();\n $sql = 'SELECT `id`, `question`, `picture` FROM `' . self::PREFIX . 'question`';\n $result = $this->db->query($sql);\n $listQuestions = $result->fetchAll(PDO::FETCH_OBJ);\n return $listQuestions;\n }", "public function testRegistration(): void { }", "public function get_research_questions()\n\t{\n\t\treturn $this->research_questions;\n\t}", "public function test_can_get_all_true()\n {\n $this->seed();\n $user = User::where('email', '=', 'a@a.com')->first();\n $token = JWTAuth::fromUser($user);\n $response = $this->json('GET','/api/treatments?token='.$token);\n\n $response->assertStatus(200);\n }", "public function testTeacherReg_WithGET_HasBlankForm() {\n\t\t$client = new Client();\n\t\t$response = $client->request('GET', 'http://wordbricks.xyz/teacherReg.php'); \n\t\t$this->assertCount(1, $response->filter('form')); //Check for one form on the page\n\t\t$this->assertEquals('', $response->filter('form input[name=username]')->attr('value')); //Check the value of each field\n\t\t$this->assertEquals('',\t$response->filter('form input[name=email]')->attr('value')); \n\t\t$this->assertEquals('',\t$response->filter('form input[name=password]')->attr('value')); \n\t\t$this->assertEquals('', $response->filter('form input[name=confirm]')->attr('value'));\n\t\t$this->assertEquals('', $response->filter('form input[name=class-name]')->attr('value'));\n\t}", "public function test_admin_training_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/MemberSkills', 'training_programs']);\n $this->assertResponseCode(404);\n }", "public function index()\n {\n // Get questions list\n $questions = Questions::orderby('created_at', 'desc')->paginate(15);\n //return collection as resource\n return $questions;\n\n }", "public function testCountRegioes()\n {\n $this->assertCount(5, UF::$REGIOES);\n }", "public function registeredUsers()\n {\n $data = DB::table('persons')\n ->select('FirstName', 'LastName', 'Email', 'Phone', 'credits', 'Subscribe')\n ->orderBy('FirstName', 'desc')\n ->get();\n\n if(count($data) > 0){\n return response(array(\n 'registered' =>$data-> toArray()\n ));\n }else{\n return response(array(\n \"No registerd users\"\n ));\n }\n }", "public function questions ( ) {\n $hooks = hooks::all();\n\n $title = \"Questions\";\n return view('pages.questions')->with([\n 'title' => $title,\n 'hooks' => $hooks\n ]);\n }", "public function getAllcourseRegister(): array\n {\n }" ]
[ "0.7154707", "0.60555196", "0.60346353", "0.5704522", "0.5638833", "0.5632243", "0.5621794", "0.5526942", "0.5455713", "0.54485816", "0.5391416", "0.53890324", "0.53485394", "0.53445524", "0.53413343", "0.53380704", "0.5323038", "0.5306515", "0.5293291", "0.5253302", "0.5230904", "0.5226102", "0.51825625", "0.51825625", "0.5177561", "0.5176155", "0.5156462", "0.51405275", "0.51341796", "0.51337445", "0.51337445", "0.5130324", "0.51216525", "0.51183397", "0.51105404", "0.50973165", "0.50973165", "0.50939363", "0.5082789", "0.5079721", "0.507704", "0.50585026", "0.5050216", "0.5031543", "0.50277597", "0.49990612", "0.4985358", "0.49797592", "0.49683514", "0.49610394", "0.49609992", "0.49609515", "0.49597877", "0.4959137", "0.49509642", "0.49498582", "0.49494785", "0.494762", "0.49342892", "0.49320254", "0.49247032", "0.49138337", "0.49120817", "0.49120817", "0.4911881", "0.49104738", "0.49099964", "0.4904111", "0.49025458", "0.49025458", "0.4899507", "0.4896924", "0.489626", "0.48899752", "0.48879057", "0.4886232", "0.48844552", "0.48843986", "0.48810306", "0.4873364", "0.4870577", "0.4869776", "0.48695636", "0.4863538", "0.48594236", "0.48500925", "0.48500204", "0.48474836", "0.48418775", "0.48378685", "0.48366958", "0.4830168", "0.4819738", "0.48105478", "0.4799546", "0.47993273", "0.4799234", "0.47929546", "0.47905654", "0.47878057" ]
0.7223803
0
Test case for webinarStatus Update Webinar Status.
Тест-кейс для обновления статуса вебинара.
public function testWebinarStatus() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarUpdate()\n {\n }", "public function testWebinarPollUpdate()\n {\n }", "public function testWebinarRegistrantStatus()\n {\n }", "public function update_status();", "function update_status()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t\n\t\tif(!empty($data['t']) && !empty($data['list'])) $response = $this->_tender->update_status($data['t'], explode('--',$data['list']));\n\t\t\n\t\t# all good\n\t\tif(!empty($response) && $response['boolean']){\n\t\t\t$data['msg'] = 'The Invitation for Bids/Quotations status has been updated.';\n\t\t\t$data['area'] = 'refresh_list_msg';\n\t\t} \n\t\t# there was an error\n\t\telse {\n\t\t\t$data['msg'] = (!empty($data['t']) && !empty($data['list']))? 'ERROR: There was an error updating the Invitation for Bids/Quotations status.': 'ERROR: This action can not be resolved';\n\t\t\t$data['area'] = 'basic_msg';\n\t\t}\n\t\t\n\t\t$this->load->view('addons/basic_addons', $data);\n\t}", "public function testWebinarRegistrantQuestionUpdate()\n {\n }", "public function executeChangePracticeAreaStatus(sfWebRequest $request)\n {\n\t\tif(clsCommon::chkDataExist(\"WebsitePracticeArea\", $request->getParameter('id'), $this->getUser()->getAttribute('personalWebsiteId')))\n\t\t{\n\t\t\t$snId \t\t= \t$request->getParameter('id');\n\t\t\t$ssStatus \t= \t$request->getParameter('status');\n\t\t\t$oWebsitePracticeArea = new WebsitePracticeArea();\n\t\t\t$oWebsitePracticeArea->changeStatus($snId, $ssStatus);\n\n\t\t\tif($ssStatus == sfConfig::get(\"app_Status_Active\"))\n\t\t\t$successMessage = \"active\";\n\t\t\telse\n\t\t\t$successMessage = \"inactive\";\n\n\t\t\t$this->getUser()->setFlash(\"succMsg\",'Status successfully changed to '.$successMessage.'.');\n\n\t\t\t$this->redirect('WebsitePracticeArea/index');\n }\n else\n\t\t{\n\t\t\t$this->getUser()->setFlash(\"errMsg\",sfConfig::get('app_Permission_Message'));\n\t\t\t$this->redirect('default/index');\n\t\t}\n }", "function update_organiser_status(){\r\n\t\t$this->organiser_model->update_organiser_status($_POST['status'],$_POST['organiser_id']);\r\n\t\t$this->send_status_email($_POST['status'],$_POST['organiser_id']);\r\n\t\techo \"1\";exit;\r\n\t}", "public function testcall(){\n self::updateUserStatus(2,2);\n }", "function updateStatus(){\n\t\t$this->setPost();\n\n\t\t$postData = $_POST;\n\n\t\tif($postData->status_id == 1){\n\t\t\t$updateData = array('status_id' => 2);\n\t\t}else{\n\t\t\t$updateData = array('status_id' => 1);\n\t\t}\n\n\t\t$where = array('id' => $postData->id);\n\n\t\t$result = $this->base_model->updateCommon($this->primaryTable, $updateData, $where);\n\n\t\t$response = array('status' => TRUE, 'message' => 'Document status updated successfully.');\n\n\t\techo json_encode($response);\n\t}", "public function updateStatus($params)\r\n {\r\n }", "public function updateUrgencyStatuses() {\n\n\n $deadlineOverdue = date('Y-m-d H:i:s', strtotime('-' . Configure::read('TICKET.OVERDUE_DAYS') . ' days'));\n $overdueTickets = $this->getPendingTicketsByAge($deadlineOverdue);\n\n foreach ($overdueTickets as $i => $overdueTicket) {\n\n $this->id = $overdueTicket['Ticket']['ticket_id'];\n $overdueTicket['Ticket']['status'] = 'Overdue';\n $this->save($overdueTicket, array('validate' => false, 'modified' => false, 'callbacks' => false));\n }\n\n\n $deadlineUrgend = date('Y-m-d H:i:s', strtotime('-' . Configure::read('TICKET.URGEND_DAYS') . ' days'));\n $urgendTickets = $this->getPendingTicketsByAge($deadlineUrgend, array('New', 'Requested'));\n\n foreach ($urgendTickets as $i => $urgendTicket) {\n\n $this->id = $urgendTicket['Ticket']['ticket_id'];\n $urgendTicket['Ticket']['status'] = 'Urgend';\n $this->save($urgendTicket, array('validate' => false, 'modified' => false, 'callbacks' => false));\n }\n\n }", "public function updateCommunityMemberStatus() {\n $community_id = $this->request->params ['named'] ['community_id'];\n $community_owner = $this->Community->find('first', array(\n 'conditions' => array('Community.id' => $community_id),\n 'fields' => array('Community.created_by')\n ));\n $community_owner = $community_owner['Community']['created_by'];\n $user_id = $this->request->params ['named'] ['user_id'];\n $status = $this->request->params ['named'] ['status'];\n $current_user = $this->Auth->user('id');\n $conditions = array(\n 'CommunityMember.user_id' => $user_id,\n 'CommunityMember.community_id' => $community_id\n );\n $current_user_type = $this->CommunityMember->getCommunityMemberUserType($community_id, $current_user);\n if ($this->CommunityMember->hasAny($conditions) && $current_user_type >= CommunityMember::USER_TYPE_ADMIN) {\n $communityMemberRecordId = $this->CommunityMember->find('first', array(\n 'conditions' => $conditions,\n 'fields' => array('CommunityMember.id')\n ));\n $communityMemberRecordId = $communityMemberRecordId['CommunityMember']['id'];\n $requested_user = $this->User->getUserDetails($user_id);\n $requested_user['user_name'] = Common::getUsername($requested_user['user_name'], $requested_user['first_name'], $requested_user['last_name']);\n switch ($status) {\n case 'add':\n //setting staus to Approved.\n\t\t\t\t\t$set_status = 1;\n\t\t\t\t\t$updateCommunityMember = array(\n\t\t\t\t\t\t'CommunityMember' => array(\n\t\t\t\t\t\t\t'id' => $communityMemberRecordId,\n\t\t\t\t\t\t\t'status' => $set_status,\n\t\t\t\t\t\t\t'joined_on' => Date::getCurrentDateTime()\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t\t$this->CommunityMember->save($updateCommunityMember);\n\n\t\t\t\t\t//Community follow data\n\t\t\t\t\t$followCommunityData = array(\n\t\t\t\t\t\t'type' => FollowingPage::COMMUNITY_TYPE,\n\t\t\t\t\t\t'page_id' => $community_id,\n\t\t\t\t\t\t'user_id' => $user_id,\n\t\t\t\t\t\t'notification' => FollowingPage::NOTIFICATION_ON\n\t\t\t\t\t);\t\t\t\t\t\n\t\t\t\t\t$this->FollowingPage->followPage($followCommunityData);\n\n\t\t\t\t\t$updated_member_count = $this->Community->changeMemberCount($community_id, 1);\n\t\t\t\t\t$result_message = $requested_user['user_name'] . \" has been added as a member to the community.\";\n\t\t\t\t\t$result = array(\n\t\t\t\t\t\t'success' => 'success',\n\t\t\t\t\t\t'member_count' => $updated_member_count,\n\t\t\t\t\t\t'message' => $result_message\n\t\t\t\t\t);\n break;\n case 'ignore':\n //Reject the request. Delete the entry from table.\n\t\t\t\t\tif ($this->CommunityMember->delete($communityMemberRecordId)) {\n\t\t\t\t\t\t//Community unfollow data\n\t\t\t\t\t\t$followCommunityData = array(\n\t\t\t\t\t\t\t'type' => FollowingPage::COMMUNITY_TYPE,\n\t\t\t\t\t\t\t'page_id' => $community_id,\n\t\t\t\t\t\t\t'user_id' => $user_id\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->FollowingPage->unFollowPage($followCommunityData);\n\n\t\t\t\t\t\t$result_message = $requested_user['user_name'] . \" is denied from joining the community.\";\n\t\t\t\t\t\t$result = array(\n\t\t\t\t\t\t\t'success' => 'success',\n\t\t\t\t\t\t\t'message' => $result_message\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n case 'update_admin':\n //update member type to admin or remove the existing secondary admin\n if ($community_owner == $current_user && $user_id != $community_owner) {\n $memberTypeNow = $this->CommunityMember->getCommunityMemberUserType($community_id, $user_id);\n if ($memberTypeNow == CommunityMember::USER_TYPE_MEMBER) {\n $setMemberType = CommunityMember::USER_TYPE_ADMIN;\n $result_message = \"You have set \" . $requested_user['user_name'] . \" as a secondary admin for this community.\";\n } else {\n $setMemberType = CommunityMember::USER_TYPE_MEMBER;\n $result_message = $requested_user['user_name'] . \" is removed from the secondary admin list of this community.\";\n }\n $updateCommunityMember = array(\n 'CommunityMember' => array(\n 'id' => $communityMemberRecordId,\n 'user_type' => $setMemberType\n )\n );\n $this->CommunityMember->save($updateCommunityMember);\n $this->sendMailToNewSecondaryAdmin($community_id, $user_id, $setMemberType); //send mail to new added secondary admin.\n $result = array(\n 'success' => 'success',\n 'message' => $result_message\n );\n } else {\n $result = array(\n 'success' => 'danger',\n 'message' => 'Cannot change member type'\n );\n }\n break;\n default :\n $result = array(\n 'success' => 'danger',\n 'message' => 'invalid status'\n );\n break;\n exit;\n }\n } else {\n $result = array(\n 'success' => 'danger',\n 'message' => 'The user is not a member of the Community.'\n );\n }\n print_r(json_encode($result));\n exit;\n }", "function updateStatus(){\n $serv_ID=$this->uri->segment(3);\n $status=$this->input->post('status');\n if ($this->deliveryAndPickupModel->updateCustService($serv_ID, $status)) {\n echo \"<script>alert('Successfully Updated');window.location.href='\".site_url('deliveryAndPickupController/acceptServRequest/'.$serv_ID.'').\"';</script>\";\n }\n else\n {\n echo \"<script>alert('Something when wrong');window.location.href='\".site_url('deliveryAndPickupController/acceptServRequest/'.$serv_ID.'').\"';</script>\";\n }\n }", "function practice_status()\n {\n $query = \"UPDATE\n\t\t\t\t\t\" . $this->table_name . \"\n\t\t\t\tSET\n\t\t\t\t\tStatus = :status\n\t\t\t\tWHERE\n\t\t\t\t\tid = :id AND Viewer_ID = :vid\";\n\n $stmt = $this->conn->prepare($query);\n\t\t\n\t\t$stmt->bindParam(':status', $this->status);\n $stmt->bindParam(':id', $this->id);\n\t\t$stmt->bindParam(':vid', $this->Viewer_ID);\n\n // execute the query\n if ($stmt->execute()) {\n return true;\n } else {\n return false;\n }\n }", "public function changeStatus($u_status,$delivery_id){\n $sql=\"UPDATE `deliveries` SET `delivery_status`='$u_status' WHERE delivery_id='$delivery_id'\";\n $result=$this->conn->query($sql);\n if($result==true){\n header(\"location:delivery.php?success=1&message=You successfully updated the status.\");\n }else{\n header(\"location:delivery.php?success=0&message=Error occured in delivery table. Try it agin.\");\n }\n }", "public function testStatusConfirm()\n {\n\n }", "public function test_should_deliver_status() {\n\n\t\t$webhook = LLMS_REST_API()->webhooks()->create( array(\n\t\t\t'delivery_url' => 'https://mock.tld',\n\t\t\t'topic' => 'student.created',\n\t\t) );\n\n\t\t// Inactive.\n\t\t$this->assertFalse( LLMS_Unit_Test_Util::call_method( $webhook, 'should_deliver', array( array( $this->factory->student->create() ) ) ) );\n\n\t\t// Active.\n\t\t$webhook->set( 'status', 'active' )->save();\n\t\t$this->assertTrue( LLMS_Unit_Test_Util::call_method( $webhook, 'should_deliver', array( array( $this->factory->student->create() ) ) ) );\n\n\t}", "public function UserListChangeStatus(): void{\n \n if(!ArtworkVerifier::setStatusList($_POST) || !Session::isLogin()){\n exit;\n }\n \n if(isset(UserList::where('user_list.user_id', Session::getUser()['id'])->where('user_list.artwork_id', $_POST['artwork_id'])->getOne()->id)){\n UserList::values([ 'user_list.status' => $_POST['status'] ])\n ->where('user_id' ,Session::getUser()['id'])\n ->where('artwork_id', $_POST['artwork_id'])\n ->update();\n exit;\n }\n }", "public function travel_conditions_status() {\n\t\t$id = $this->uri->segment(4);\n\t\t$status = $this->uri->segment(5);\n\t\tCheckAdminLoginSession();\t\t\n\t\t$data['status'] = $status;\t\t\t\t \t \t\t \n\t\t$this->admin_model->setUpdateData($this->travel,$data,$id);\n\t\t$this->session->set_flashdata('message','Your status has been update successfully');\n\t\tredirect('admin/travel-conditions/lists','refresh');\t\t\n\t}", "public function status() {\n\t\t$id = $this->uri->segment(4);\n\t\t$status = $this->uri->segment(5);\n\t\tCheckAdminLoginSession();\t\t\n\t\t$data['status'] = $status;\t\t\t\t \t \t\t \n\t\t$this->admin_model->setUpdateData($this->policy_duration,$data,$id);\n\t\t$this->session->set_flashdata('message','Your status has been update successfully');\n\t\tredirect('admin/policy-duration/lists','refresh');\t\t\n\t}", "public function testWebinar()\n {\n }", "public function change_stories_status(){\r\r\n\t\tif ($this->checkLogin('A') == ''){\r\r\n\t\t\tredirect('admin');\r\r\n\t\t}else {\r\r\n\t\t\t$mode = $this->uri->segment(4,0);\r\r\n\t\t\t$user_id = $this->uri->segment(5,0);\r\r\n\t\t\t$status = ($mode == '0')?'UnPublish':'Publish';\r\r\n\t\t\t$newdata = array('status' => $status);\r\r\n\t\t\t$condition = array('id' => $user_id);\r\r\n\t\t\t$this->stories_model->update_details(STORIES,$newdata,$condition);\r\r\n\t\t\t$this->setErrorMessage('success','Stories Status Changed Successfully');\r\r\n\t\t\tredirect('admin/stories/display_stories_list');\r\r\n\t\t}\r\r\n\t}", "function updateStatus()\n\t{\n\t\t$this->setPost();\n\n\t\t$postData = $_POST;\n\n\t\tif ($postData->status_id == 1) {\n\t\t\t$updateData = array('status_id' => 2);\n\t\t} else {\n\t\t\t$updateData = array('status_id' => 1);\n\t\t}\n\n\t\t$where = array('id' => $postData->id);\n\n\t\t$result = $this->base_model->updateCommon($this->primaryTable, $updateData, $where);\n\n\t\t$response = array('status' => true, 'message' => 'Branch status updated successfully.');\n\n\t\techo json_encode($response);\n\t}", "function update_status()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\tif(!empty($data['t']) && !empty($data['list'])) $result = $this->_bid->update_status($data['t'], explode('--',$data['list']));\n\t\t\n\t\t$data['msg'] = !empty($result['boolean']) && $result['boolean']? 'The bid status has been changed.': 'ERROR: The bid status could not be changed.';\n\t\t\n\t\t$data['area'] = 'refresh_list_msg';\n\t\t$this->load->view('addons/basic_addons', $data);\n\t}", "public function updateStatus()\n {\n $data = request()->validate([\n 'estimate' => 'required|exists:estimates,estimate_id',\n 'status_id' => 'required|integer|exists:statuses,id',\n ]);\n\n $estimate = Estimate::where('estimate_id', $data['estimate'])->firstOrFail();\n $estimate->update(['status_id' => $data['status_id']]);\n\n return redirect()->route('admin.estimates.index')->with([\n 'alertType' => 'success',\n 'alertMessage' => 'Le statut a bien été mis à jour',\n ]);\n }", "public function testWebinarPolls()\n {\n }", "public function updateStatus() {\n $ref = ORM::forTable('referrals')\n ->findOne($this->data['id']);\n if ($this->data['status'] == 'Assigned' && $this->data['route_id']) {\n $route = ORM::forTable('estimate_routes')\n ->findOne($this->data['route_id']);\n $assignedReferralsCount = ORM::forTable('referrals')\n ->select('id')\n ->where('route_id', $route->id)\n ->count();\n $ref->route_id = $this->data['route_id'];\n $ref->status = 'Assigned';\n $ref->route_order = $assignedReferralsCount;\n\n } elseif ($this->data['status'] == 'Pending') {\n $ref->status = 'Pending';\n $ref->route_order = 0;\n $ref->route_id = NULL;\n } else {\n $ref->status = $this->data['status'];\n }\n if ($ref->save()) {\n $this->renderJson([\n 'success' => true,\n 'message' => 'Job request status updated successfully'\n ]);\n } else {\n $this->renderJson([\n 'success' => false,\n 'message' => 'An error has occurred while saving job request'\n ]);\n }\n }", "public function testUpdate()\n {\n\n // $payment = $this->payment\n // ->setEvent($this->eventId)\n // ->acceptCash()\n // ->acceptCheck()\n // ->acceptGoogle()\n // ->acceptInvoice()\n // ->acceptPaypal()\n // ->setCashInstructions($instructions)\n // ->setCheckInstructions($instructions)\n // ->setInvoiceInstructions($instructions)\n // ->setGoogleMerchantId($this->googleMerchantId)\n // ->setGoogleMerchantKey($this->googleMerchantKey)\n // ->setPaypalEmail($this->paypalEmail)\n // ->update();\n\n // $this->assertArrayHasKey('process', $payment);\n // $this->assertArrayHasKey('status', $payment['process']);\n // $this->assertTrue($payment['process']['status'] == 'OK');\n }", "public function updateStatuses()\n {\n $affected = DB::update('UPDATE los_orders SET status_code=1 WHERE status_code=0 AND order_date IN (SELECT provide_date FROM los_lunchdates WHERE orders_placed IS NOT NULL)');\n $affected = DB::update('UPDATE los_orders SET status_code=0 WHERE status_code=1 AND order_date IN (SELECT provide_date FROM los_lunchdates WHERE orders_placed IS NULL)');\n }", "public function changestatusAction()\n {\n $user_params=$this->_request->getParams();\n $automail=new Ep_Message_AutoEmails();\n $ftvrequest_obj = new Ep_Ftv_FtvRequests();\n $ftvcontacts_obj = new Ep_Ftv_FtvContacts();\n $ftvpausetime_obj = new Ep_Ftv_FtvPauseTime();\n\n if($user_params['status'] == 'closed')\n $data = array(\"status\"=>$user_params['status'], \"cancelled_at\"=>date('Y-m-d H:i:s'));////////updating\n elseif($user_params['status'] == 'done')\n $data = array(\"status\"=>$user_params['status'], \"closed_at\"=>date('Y-m-d H:i:s'));////////updating\n else\n $data = array(\"status\"=>$user_params['status'], \"closed_at\"=>NULL, \"cancelled_at\"=>NULL);////////updating\n $query = \"identifier= '\".$user_params['requestId'].\"'\";\n $requestdetails = $ftvrequest_obj->requestDetailsById($user_params['requestId']);\n $contactId = $requestdetails[0]['request_by'];\n $contactdetails = $ftvcontacts_obj->getFtvContactDetails($contactId);\n $contactName = $contactdetails[0]['first_name'].\" \".$contactdetails[0]['last_name'];\n $parameters['ftvobject'] = $requestdetails[0]['request_object'];\n $parameters['ftvcontactName'] = $contactName;\n $ftvrequest_obj->updateFtvRequests($data,$query);\n ////making the time resume if its in pause////\n $inpause = $ftvpausetime_obj->inPause($user_params['requestId']);\n if($inpause == 'yes')\n {\n $data = array(\"resume_at\"=>date('Y-m-d H:i:s'));////////updating\n $query = \"ftvrequest_id = '\".$user_params['requestId'].\"' AND resume_at IS NULL \";\n $ftvpausetime_obj->updateFtvPauseTime($data,$query);\n }\n if($user_params['status'] == 'done')\n {\n if($this->adminLogin->userId != '110823103540627' ) ///when not johny head of BO user for FTV changed\n {\n $parameters['ftvrequestlink'] = \"/ftvchaine/ftvch-requests?submenuId=ML11-SL6\";\n $parameters['ftvType'] = \"chaine\";\n $automail->messageToEPMail('110823103540627',114,$parameters);// to johny\n $parameters['ftvrequestlink'] = \"http://ep-test.edit-place.com/ftvchaine/index\";\n $automail->sendFtvChaineContactsPersonalEmail($contactId,114,$parameters); // to client contact\n }\n else // in case jhony change the status\n {\n $parameters['ftvrequestlink'] = \"http://ep-test.edit-place.com/ftvchaine/index\";\n $automail->sendFtvChaineContactsPersonalEmail($contactId,114,$parameters); // to client contact\n }\n }\n\n }", "public function updateStatusProposal()\n { \n $now = Mage::getSingleton('core/date')->gmtDate(\"Y-m-d\"); \n $collection = Mage::getModel('qquoteadv/qqadvcustomer')->getCollection();\n $collection->addFieldToFilter('status', Ophirah_Qquoteadv_Model_Status::STATUS_PROPOSAL);\n $collection->getSelect()->where('expiry < \\''.$now.'\\' AND no_expiry = \\'0\\'');\n $collection->load(); \n\n foreach ($collection as $item) { \n $item->setStatus(Ophirah_Qquoteadv_Model_Status::STATUS_PROPOSAL_EXPIRED);\n $item->save(); \n }\n }", "public function updateStatus()\n {\n $this->Invoice->updateInvoiceStatus($this->input->post('id'));\n }", "function updatePaymentStatus(){\r\n $payment = new managePaymentModel();\r\n $payment->cust_ID = $_SESSION['cust_ID'];\r\n $payment->updatePaymentStatus();\r\n }", "public function testDeveloperUpdate()\n {\n $developer = factory(Developer::class)->create();\n $response = $this->get('/developer/update?id=' . $developer->id);\n $response->assertStatus(200);\n }", "public function changeStatus(Request $request)\n {\n $id = $request->id;\n\n /* non active the previous school year */\n SchoolYear::where('status_active', 1)->update([\n 'status_active' => 0,\n 'status_passed' => 2\n ]);\n\n /* enable status of the new school year */\n $update = SchoolYear::where('id', $id)->update([\n 'status_active' => 1,\n 'status_passed' => 0\n ]);\n\n if ($update) {\n $json = ['status' => 200, 'message' => 'Tahun ajar berhasil diubah'];\n } else {\n $json = ['status' => 500, 'message' => 'Tahun ajar gagal diubah'];\n }\n\n return response()->json($json);\n }", "public function respon(){\n //update 'status'\n }", "public function testWebinarPollGet()\n {\n }", "public function refreshTaskStatus(){\n\n $webCronResult = $this->webCronResults()->orderBy('code', 'desc')->first();\n\n if ($webCronResult) {\n\n if ($webCronResult->code >= 300) {\n // bad status\n $this->status = 0 ;\n }else{\n // good status\n $this->status = 2 ;\n };\n\n $this->save();\n\n };\n\n }", "public function status() : void\n {\n $jwt = Auth::isValidToken($_COOKIE['SSID']);\n \n if (!$jwt) {\n View::jsonResponse(['status' => 401, 'message' => 'Access denied for you!']);\n }\n\n $data = [ 'status' => $_POST['status'], 'id' => $_POST['statusid']];\n $data = Validator::cleanData($data);\n (new Task())->update($data)->execute();\n header('location: user-profile');\n\n }", "public function userLiveStatusUpdate_post() {\n $this->form_validation->set_rules('ContestGUID', 'ContestGUID', 'trim|required|callback_validateEntityGUID[Contest,ContestID]');\n $this->form_validation->set_rules('UserGUID', 'UserGUID', 'trim|callback_validateEntityGUID[User,UserID]');\n $this->form_validation->set_rules('UserStatus', 'UserStatus', 'trim|required|in_list[Yes,No]');\n $this->form_validation->set_rules('SeriesGUID', 'SeriesGUID', 'trim|required|callback_validateEntityGUID[Series,SeriesID]');\n $this->form_validation->validation($this); /* Run validation */\n $AuctionStatus = $this->SnakeDrafts_model->userLiveStatusUpdate($this->Post, $this->ContestID, $this->UserID, $this->SeriesID);\n if ($AuctionStatus) {\n $this->Return['Message'] = \"User status successfully updated.\";\n $this->Return['Data']['DraftUserLiveTime'] = date('Y-m-d H:i:s');\n } else {\n $this->Return['ResponseCode'] = 500;\n $this->Return['Message'] = \"User status already updated.\";\n }\n }", "public function test_update() {\n global $DB;\n\n self::setAdminUser();\n $this->resetAfterTest(true);\n\n // Save new outage.\n $now = time();\n $outage = new outage([\n 'autostart' => false,\n 'warntime' => $now - 60,\n 'starttime' => 60,\n 'stoptime' => 120,\n 'title' => 'Title',\n 'description' => 'Description',\n ]);\n $outage->id = outagedb::save($outage);\n self::$outage = $outage;\n\n self::$outage->starttime += 10;\n outagedb::save(self::$outage);\n\n // Should still exist.\n $event = $DB->get_record_select(\n 'event',\n \"(eventtype = 'auth_outage' AND instance = :idoutage)\",\n ['idoutage' => self::$outage->id],\n 'id',\n IGNORE_MISSING\n );\n self::assertTrue(is_object($event));\n self::assertSame(self::$event->id, $event->id);\n self::$event = $event;\n }", "public function updateLeadStatus() {\n\n /////////////////////////////////////////////////////////////////////\n // CHECK REQUIRED DATA //////////////////////////////////////////////\n /////////////////////////////////////////////////////////////////////\n\n if (is_null($this->__apiPrivateToken)) {\n throw new \\Exception(\"API Private Token must be setted!\");\n }\n\n if (is_null($this->__leadEmail)) {\n throw new \\Exception(\"Lead email must be setted!\");\n }\n\n if (!isset($this->__leadData['status'])) {\n throw new \\Exception(\"Lead data 'status' must be setted!\");\n }\n\n /////////////////////////////////////////////////////////////////////\n // PREPARE DATA COLLECTION //////////////////////////////////////////\n /////////////////////////////////////////////////////////////////////\n\n $this->__translateLeadData();\n\n $this->__leadData['email'] = $this->__leadEmail;\n\n /////////////////////////////////////////////////////////////////////\n // PERFORM REQUEST TO API ///////////////////////////////////////////\n /////////////////////////////////////////////////////////////////////\n\n return $this->__request('POST', 'generic');\n }", "public function status(Request $request)\n {\n $urow = Registration::where(['id' => $request['Row_id']]);\n if ($urow!= null) {\n $urow->update(['status' => $request['status']]);\n return redirect()->action('FollowupController@index')->with('success', 'Successfully Updated!');\n } else {\n return redirect()->action('FollowupController@index')->with('failed', 'Successfully Updated!');\n }\n }", "public function updateStatusOnNewDay() {\n // Update advs\n UIAdv::where('last_update_time', '<', Carbon::now()->subDays(1))->where('status', '=', 1)->update([\n 'last_update_time' => Carbon::now(),\n 'status' => 0\n ]);\n\n // Update advgroups\n UIAdvGroup::where('last_update_time', '<', Carbon::now()->subDays(1))->where('status', '=', 1)->update([\n 'last_update_time' => Carbon::now(),\n 'status' => 0\n ]);\n\n // Update campaign\n UICampaign::where('last_update_time', '<', Carbon::now()->subDays(1))->where('status', '=', 1)->update([\n 'last_update_time' => Carbon::now(),\n 'status' => 0\n ]);\n\n // Update project\n UIProject::where('last_update_time', '<', Carbon::now()->subDays(1))->where('status', '=', 1)->update([\n 'last_update_time' => Carbon::now(),\n 'status' => 0\n ]);\n }", "public function actionUpdateStatus() {\n $model = UserJobEditorFlag::model()->findByPk(Yii::app()->request->getPost('instanceId'));\n if (!$model instanceof UserJobEditorFlag) return false;\n $saved = $model->updateStatus(Yii::app()->request->getPost('status'));\n $this->sendResponse(200, $this->getObjectEncoded(array('message' => $saved ? 'ok' : 'error')));\n }", "public function updateJobStatus($status, $additional_info=null, $datasource_id=null){\n $this->status = $status;\n $this->additional_info = $additional_info;\n $this->datasource_id = $datasource_id;\n return $this->submit();\n }", "public function testGetStatus($status)\n\t{\n\t\t$timeSheetStatusChange = new TimeSheetStatusChange($status);\n\n\t\t$this->assertEquals($status, $timeSheetStatusChange->getStatus());\n\t}", "function change_status_to() {\n $stat_param = array(\n 'status' => $this->uri->segment(3)\n );\n $id = $this->uri->segment(4);\n $updt_status = $this->guest_post_model->change_status_to('newsletter', $stat_param, $id);\n if ($updt_status) {\n $this->session->set_userdata('success_msg', 'Status Updated susseccfully.');\n } else {\n $this->session->set_userdata('error_msg', 'Cannot update status.');\n }\n redirect('news_letter_cont');\n }", "public function setWatchStatus()\n\t\t{\n\t\t\t$model = $this->getModel();\n\t\t\t$model->is_watched = 'yes';\n\t\t\t$model->modifying_agent_id = ECash::getAgent()->getAgentId();\n\t\t\t$model->save();\n\t\t}", "public function testWebinarAbsentees()\n {\n }", "public function update(Request $request, EventStarter $eventStarter)\n {\n\t\t\n\t\t$eventStarter->schedule_plan = $request->get('schedule_plan');\n\t\t$eventStarter->status = $request->get('status');\n\t\t$eventStarter->save();\n\n\n\t return redirect(route('detail-event', ['eventStarter' => $eventStarter->id]));\n }", "public function test_if_failed_update()\n {\n }", "public function testWinnerVerifiedStatus()\n\t{\n\t\t$data = new OLPBlackbox_Data();\n\t\t$data->phone_home = '123451234';\n\t\t$data->phone_work = '123451234';\n\t\t$data->paydates = array(time(), strtotime('+1 week'));\n\n\t\t$init = array('target_name' => 'ca', 'name' => 'ca');\n\t\t$state_data = new OLPBlackbox_TargetStateData($init);\n\n\t\t$rule = $this->getMock('OLPBlackbox_Enterprise_Impact_Rule_WinnerVerifiedStatus',\n\t\t\t\t\t\tarray('logEvent')\n\t\t);\n\t\t$rule->expects($this->at(0))\n\t\t\t->method('logEvent')\n\t\t\t->with($this->equalTo('VERIFY_SAME_WH'),\n\t\t\t\t\t$this->equalTo('VERIFY'),\n\t\t\t\t\t$this->equalTo($state_data->name));\n\n\t\t$rule->isValid($data, $state_data);\n\t}", "public function locationChangeStatus(Request $request) {\n $data = [\n 'status' => $request->status,\n ];\n\n $userCount = User::where('location_id',$request->locationid)->count();\n $userLocationCount = UserLocation::where('location_id',$request->locationid)->count();\n $salesAgentCount = Salesagentdetail::where('location_id',$request->locationid)->count();\n\n if(($userCount > 0 || $userLocationCount > 0 || $salesAgentCount > 0) && $request->status =='inactive') {\n return response()->json([ 'status' => 'error', 'message'=> 'Unable to deactivat of location, due to this location assigned to users.' ]);\n } else {\n\n $updateStatus = Salescenterslocations::where('id', $request->locationid)->update($data);\n\n if ($updateStatus) {\n if ($request->status =='active') {\n $message='Sales center location successfully activated.';\n } else {\n $message='Sales center location successfully deactivated';\n }\n return response()->json([ 'status' => 'success', 'message' => $message]);\n } else {\n return response()->json([ 'status' => 'error', 'message'=> 'Unable to update location' ]);\n }\n }\n }", "public function updateTimesheetStatus(Request $request){\n\t\t$timesheetid = $request->id;\n\t\t$status = $request->status;\n\t\t$timesheet = \\App\\Models\\Timesheet::where('id', $timesheetid)->first();\n\t\t$user = User::where('id', $timesheet->user_id)->first();\n\n\t\tMail::to($user->email)->send(new TimeSheetApproved($user, $status));\n\n\t\t$timesheet->client_approved = $status;\n\t\t$timesheet->save();\n\n\t\treturn response()->json(['status'=>true,'message'=>'status updated successfully'], 200);\n\t}", "public function testUpdateAction()\n {\n $res = $this->controller->updateAction(\"1\");\n $this->assertContains(\"Update\", $res->getBody());\n }", "public function update(Request $request,PropertyStatus $propertyStatus)\n {\n $attribute = $request->validate([\n 'property_status'=>'required'\n ]);\n\n $attribute['updated_by'] = auth()->user()->name;;\n \n $propertyStatus->update($attribute); \n\n Session::flash('success',\"Registro actualizado satisfactoriamente\");\n\n return redirect()->route('property_status.index');\n }", "public function actionUpdateStatus()\n { \n $user_id = Yii::$app->user->identity->id;\n $model = Users::find()->where(['id'=>$user_id])->one();\n $model->step_validate = 2;\n $model->load(Yii::$app->getRequest()->getBodyParams(), '');\n if ($model->validate()) {\n $model->save();\n $response = \\Yii::$app->getResponse();\n $response->setStatusCode(202);\n return $model->getUsersStatusValues();\n }\n else {\n throw new HttpException(422, json_encode($model->errors, JSON_UNESCAPED_UNICODE));\n }\n }", "public function testUpdateStatusByUserId()\n {\n $session = $this->objectManager->create(\\Magento\\Security\\Model\\AdminSessionInfo::class);\n /** @var $session \\Magento\\Security\\Model\\AdminSessionInfo */\n $session->getResource()->updateStatusByUserId(\n \\Magento\\Security\\Model\\AdminSessionInfo::LOGGED_OUT_BY_LOGIN,\n 1,\n [1],\n [1],\n '2016-01-19 12:00:00'\n );\n $collection = $session->getResourceCollection()\n ->addFieldToFilter('main_table.user_id', 1)\n ->addFieldToFilter('main_table.status', \\Magento\\Security\\Model\\AdminSessionInfo::LOGGED_OUT_BY_LOGIN)\n ->load();\n $count = $collection->count();\n $this->assertGreaterThanOrEqual(1, $count);\n }", "public function status_change_action(){\n\t $table = $this->input->post('table');\n\t $state = $this->input->post('state');\n\t $primary_field = $this->input->post('primary_field');\n\t $primary_key = $this->input->post('primary_key');\n\t if($state=='true'){\n\t $status = \"Y\";\n\t $status_text = \"Approved\";\n\t }else{\n\t $status = \"N\";\n\t $status_text = \"Rejected\";\n\t }\n\t $statusReturn = $this->common_model->update_row(array('fr_status'=>$status), array($primary_field=>$primary_key), $table);\n\t if($statusReturn){\n\t echo \"1\";\n\t }else{\n\t echo \"0\";\n\t }\n\t}", "public function testSchedulesUpdateOut()\n {\n $result = $this->visit('events/{event}/schedules/update/{id}')\n ->see('create your suaray account')\n ->see('welcome to suaray')\n ->seePageIs('/account/register');\n }", "public function updateSubmissionStatus() {\n\n $updateStatus = Usersubmissionstatus::where('user_id', Auth::user()->id)\n ->where('quarter_id', Quarter::getRunningQuarter()->id)\n ->update(['status_id' => config('constant.status.L1_APPROVAL_PENDING')]);\n // Let's notify user and L1 about user submission status.\n return $this->sendMail(config('constant.email_status.INFORM_APPRAISEE'));\n }", "public function testSuccessfulInstructorUpdate() {\n try {\n $updatedInstructor = UserManagementController::updateInstructorProfile(self::USERNAME,self::PASSWORD ,self::EMAIL\n ,self::FIRSTNAME,self::LASTNAME,$this->project->getProjectJnName()\n ,self::IS_OWNER,$this->institution->getAbbreviation(),self::IDENTIFICATION);\n\n $this->assertNotNull($updatedInstructor, \"The updated instructor is null\");\n $this->assertEquals($this->userTypeEnum->INSTRUCTOR, $updatedInstructor->getType(), \"The updated user is not\n an instance of INSTRUCTOR\");\n\n $InstructorInstitution = PersistentUserXInstitutionPeer::retrieveByPk($updatedInstructor->getUserId(),\n $this->institution->getInstitutionId());\n $this->assertNotNull($InstructorInstitution, \"The user x institution relation was not created for the instructor.\");\n $this->assertEquals(self::IDENTIFICATION, $InstructorInstitution->getIdentification(), \"The Instructor school\n identification is incorrect\");\n $this->assertEquals($updatedInstructor->getUserId(), $InstructorInstitution->getUserId(), \"The user id is\n incorrect on user x institution for the instructor\");\n $this->assertEquals($this->institution->getInstitutionId(), $InstructorInstitution->getInstitutionId(),\n \"The institution id is incorrect on user x institution for the instructor\");\n\n $instXProjec = PersistentUserXProjectPeer::retrieveByPK($updatedInstructor->getJnUsername(),\n $this->project->getProjectJnName());\n $this->assertNotNull($instXProjec, \"The relationship between instructor and project was not created\");\n $this->assertEquals($this->project->getProjectJnName(), $instXProjec->getProjectJnName(), \"The project name\n is incorrect on user x project\");\n $this->assertEquals($updatedInstructor->getJnUsername(), $instXProjec->getJnUsername(), \"The java.net\n username is incorrect on user x project for instructor\");\n $this->assertTrue($instXProjec->getIsOwner() == 1, \"The instructor is the owner of project.\");\n\n } catch (InfinityMetricsException $ime){\n $this->fail(\"The successful update of profile failed: \" . $ime);\n }\n\n }", "public function executeChangeStatus(sfWebRequest $request)\n {\n $snId \t\t= \t$request->getParameter('id');\n $ssStatus \t= \t$request->getParameter('status');\n $oForumCategories = new ForumCategories();\n $oForumCategories->changeStatus($snId,$ssStatus);\n\n if($ssStatus == sfConfig::get(\"app_Status_Active\")){\n $successMessage = \"activated\";\n $msgStatus = \"succMsg\";\n }\n else{\n $successMessage = \"inactivated\";\n $msgStatus = \"errMsg\";\n }\n\n $this->getUser()->setFlash($msgStatus,'Status successfully changed to '.$successMessage.'.');\n\n $this->redirect('Forums/index');\n }", "private function manageStatus()\n {\n $this->updateStatus();\n $this->checkStatus();\n }", "public function testProfileUpdateAll()\n {\n\n }", "function updateInvestigationComepleteStatus($data_status,$fhi_id)\n\t\t{\n\t\t\t$this->db->where(\"id\",$fhi_id);\n\t\t\tif($this->db->update(\"da_farm_hygiene_investigation\",$data_status))\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function updateBookingStatus(){\n $command = Yii::$app->db->createCommand();\n $id= Yii::$app->request->bodyParams[\"booking2\"];\n\n try {\n $command->update('car', ['pendingTime' => 'on', 'inUse' => 'pending'], 'id = '.$id)->execute();\n } catch (Exception $e) {\n printf(\"Cannot update data\");\n }\n }", "public function change_promocodes_status(){\n\t\tif ($this->checkLogin('A') == ''){\n\t\t\tredirect(ADMIN_PATH);\n\t\t}else {\n\t\t\t$mode = $this->uri->segment(4,0);\n\t\t\t$promocode_id = $this->uri->segment(5,0);\n\t\t\t$status = ($mode == '0')?'Inactive':'Active';\n\t\t\t$newdata = array('status' => $status);\n\t\t\t$condition = array('id' => $promocode_id);\n\t\t\t$this->promocodes_model->update_details(PROMOCODES,$newdata,$condition);\n\t\t\t$this->setErrorMessage('success','Promocode Status Changed Successfully');\n\t\t\tredirect(ADMIN_PATH.'/promocodes/display_promocodes');\n\t\t}\n\t}", "public function doUpdateStatus()\n\t{\n\n\t\t\n\t\t$rules = array(\n\t\t\t'row_id' => 'required', \n\t\t\t'status' => 'required'\n\t\t);\n\t\t\n\t\t// run the validation rules \n\t\t$validator = Validator::make(Input::all(), $rules);\n\n\t\tif ($validator->fails()) {\n\t\t\t\n\t\t\treturn Redirect::to('order')\n\t\t\t\t->withErrors($validator);\n\t\t\t\n\t\t}\n\t\t\n\t\ttry {\n\t\t \n\t\t\t$object = Object::find(Input::get('row_id'));\n\t\t\t$object->fk_status = Input::get('status');\n\t\t\t$object->save();\n\t\t\t\n $logDetails = json_encode(['row_id' => Input::get('row_id'),\n\t\t\t\t\t\t\t\t\t 'status' => Input::get('status')]);\n\t\t\t\t\t\n\t\t\tActivity::log([\n\t\t\t\t'contentId' => Auth::User()->id,\n\t\t\t\t'contentType' => 'admin_pickup_status',\n\t\t\t\t'action' => 'Updated',\n\t\t\t\t'description' => 'Pickup Status Updated',\n\t\t\t\t'details' => $logDetails,\n\t\t\t\t'updated' => true,\n\t\t\t]);\n\t\t\t\n\t\t\t Session::flash('message', 'Order #' . Input::get('row_id') . ' updated');\n\t\t\treturn Redirect::to('order');\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t \n\t\t\tSession::flash('error', $e->getMessage() );\n\t\t\treturn Redirect::to('order');\n\t\t}\n\t\t\n\t\t\n\t}", "public function update_problem_status(){\n $id = $_GET['id']; // get the problem id\n $status = $_GET['status']; // get the current status(visibility) of the problem\n\n if($status) $status = 0; else $status = 1; // reverse the status for update\n\n // json return format\n $data = array(\n 'success' => 'false',\n 'current' => $status\n );\n\n if(DB::table('problems')->where('id', $id)->update(['status' => $status])){\n // update status successfully\n $data['success'] = 'true';\n }\n return json_encode($data);\n }", "public function massStatusAction()\n {\n $curriculumdocIds = $this->getRequest()->getParam('curriculumdoc');\n if (!is_array($curriculumdocIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_curriculumdoc')->__('Please select curriculum docs.')\n );\n } else {\n try {\n foreach ($curriculumdocIds as $curriculumdocId) {\n $curriculumdoc = Mage::getSingleton('bs_curriculumdoc/curriculumdoc')->load($curriculumdocId)\n ->setStatus($this->getRequest()->getParam('status'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d curriculum docs were successfully updated.', count($curriculumdocIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_curriculumdoc')->__('There was an error updating curriculum docs.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }", "public function updateStatus()\n\t\t{\n\t\t\t$thingdom = $this->getThingdom();\n\n\t\t\tif(!$thingdom) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$page_count = wp_count_posts('page')->publish;\n\t\t\t$post_count = wp_count_posts()->publish;\n\t\t\t$comment_count = wp_count_comments()->approved;\n\n\t\t\t$thing = $thingdom->getThing($this->thingName, $this->thingType);\n\n\t\t\t$thing->status('page_count', $page_count);\n\t\t\t$thing->status('post_count', $post_count);\n\t\t\t$thing->status('comment_count', $comment_count);\n\t\t}", "function updateReservationStatus($codigo_reserva) {\r\n\r\n global $connect;\r\n\r\n $sql_update_query = \"UPDATE reserva SET estado=1 WHERE (codigo_reserva = '$codigo_reserva');\";\r\n\r\n // Realizamos la consulta a la tabla \r\n $updated = $connect->executeIDU($sql_update_query);\r\n\r\n if (!$updated) { \r\n echo \"no se pudo acceder a la base\";\r\n return false;\r\n }\r\n\r\n }", "function tep_set_banner_status($banners_id, $status, $site_id) {\n if ($status == '1') {\n return tep_db_query(\"update \" . TABLE_BANNERS . \" set status = '1',\n expires_impressions = NULL, expires_date = NULL, date_status_change = NULL\n where banners_id = '\" . $banners_id . \"' and site_id ='\".$site_id.\"'\");\n } elseif ($status == '0') {\n return tep_db_query(\"update \" . TABLE_BANNERS . \" set status = '0', date_status_change = now() where banners_id = '\" . $banners_id . \"' and site_id ='\".$site_id.\"'\");\n } else {\n return -1;\n }\n}", "function update_event_status($event_id,$event_status)\n {\n if($event_status==0)\n {\n $new_stat=\"1\";\n }\n elseif($event_status==1)\n {\n $new_stat=\"0\";\n }\n $query = $this->db->query(\"UPDATE tbl_events SET event_status = '$new_stat' WHERE event_id='$event_id'\");\n //echo $this->db->last_query();\n }", "function update_story_idea_edit_status($status='',$storyId){\n\n\t\tif($status==0){\n\n \t\t\t\t$updatedData=array(\n\n\t\t\t\t\t\"status\"=>0,\n\n\t\t\t\t\t\"is_reporter_edit\"=>1\n\n \t\t\t\t);\n\n \t\t}else{\n\n\t\t\t\t$updatedData=array(\n\n\t\t\t\t\t\"assigned\"=>1,\n\n\t\t\t\t\t\"status\"=>1\n\n \t\t\t\t);\n\n\t\t}\n\n\t\t$whereData = array('id'=>$storyId);\n\n\t\t$this->db->set($updatedData);\n\n\t\t$this->db->where($whereData);\n\n\t\t$this->db->update('buzz_idea');\t\n\n\t\treturn '1';\n\n\t}", "public function changeStatus()\n {\n }", "public function status()\t{\n\t\t\t$this->veiculo->update($this->input->post('id'), array('veiculo_status' => $this->input->post('status')));\n\t\t}", "function updatestatus() {\n global $_lib;\n\n $dataH = array();\n $dataH['ID'] = $this->transaction->ID;\n $dataH['RemittanceSequence'] = $this->transaction->RemittanceSequence;\n $dataH['RemittanceDaySequence'] = $this->transaction->RemittanceDaySequence;\n $dataH['RemittanceSendtDateTime'] = $_lib['sess']->get_session('Datetime');\n $dataH['RemittanceSendtPersonID'] = $_lib['sess']->get_person('PersonID');\n $dataH['RemittanceStatus'] = 'sent';\n \n #Disse mŒ fjernes nŒr vi har en godkjenningsprosess\n $dataH['RemittanceApprovedDateTime'] = $_lib['sess']->get_session('Datetime');\n $dataH['RemittanceApprovedPersonID'] = $_lib['sess']->get_person('PersonID');\n\n $_lib['storage']->store_record(array('data' => $dataH, 'table' => 'invoicein', 'debug' => false));\n }", "public function vendorChangeStatus(Request $request)\n {\n $validator=Validator::make($request->all(), [\n 'user_id' => 'required',\n 'vendor_id' => 'required',\n 'tag'=>'required',\n 'gig_id'=>'required',\n 'status'=>'required'\n ]);\n if ($validator->fails())\n {\n return response(array(\n 'success'=>0,\n 'data'=>$validator->errors()\n ));\n }\n else\n {\n $response=VendorServiceGig::where(['id'=>$request->gig_id,'vendor_id'=>$request->vendor_id])->update([\n 'status'=>$request->status\n ]);\n if($response)\n {\n return response(array(\n 'success'=>1,\n 'msg'=>'Successfully Updated'\n ));\n }\n else {\n return response(array(\n 'success'=>0,\n 'msg'=>'Something Went Wrong'\n ));\n }\n }\n }", "public function notConfirmed($dt)\n{\n\n $code = 401;\n $payload = null;\n $remarks = \"failed\";\n $message = \"Unable to retrieve data\";\n\n\n\n $sql = \"UPDATE `crm_reservations_tb` SET `status_id` = '5' WHERE phone_no = '$dt->phone_no' AND status_id = '3'\";\n $res = $this->gm->generalQuery1($sql, \"\");\n\n if($res['code']!=200) {\n \n $code = 200;\n $payload = $res;\n $remarks = \"success\";\n $message = \"Successfully retrieved data\";\n }\n \n \n return $this->gm->sendPayload($payload, $remarks, $message, $code);\n\n}", "public function setStatusTrue($event_id,$user_id,$subgroup_id) {\n\t\tDB::table('event_user')\n\t\t\t->where('myevent_id', $event_id)\n\t\t\t->where('user_id', $user_id)\n\t\t\t->where('subgroup_id', $subgroup_id)\n\t\t\t->update(array('status' => 1));\n\n\t\treturn Redirect::to(URL::previous());\n\t}", "public function testSellerUpdatedSuccess()\n {\n $this->demoUserLoginIn();\n $spu = Spu::create([\n 'users_id' => '1',\n 'name' => 'test',\n 'description' => 'test',\n ]);\n $response = $this->call('PATCH', '/seller/4/update', [\n 'name' => 'testUpdate',\n 'description' => 'testUpdate',\n ]);\n $this->assertEquals(302, $response->status());\n }", "function twe_set_banner_status($banners_id, $status) {\n global $db;\n if ($status == '1') {\n $db->Execute(\"update \" . TABLE_BANNERS . \" set status = '1', date_status_change = now(), date_scheduled = NULL where banners_id = '\" . $banners_id . \"'\");\n } elseif ($status == '0') {\n $db->Execute(\"update \" . TABLE_BANNERS . \" set status = '0', date_status_change = now() where banners_id = '\" . $banners_id . \"'\");\n } else {\n return -1;\n }\n }", "public static function status($status) {}", "public function testTestStatus()\n {\n // create review record for change 1\n $this->createChange();\n $review = Review::createFromChange('1')->save();\n\n // ensure starting test status of null.\n $this->assertSame($review->get('testStatus'), null);\n\n // dispatch and check output\n $this->dispatch('/reviews/2/tests/fail/' . $review->getToken());\n $result = $this->getResult();\n $review = Review::fetch(2, $this->p4);\n $this->assertRoute('review-tests');\n $this->assertResponseStatusCode(200);\n $this->assertSame(true, $result->getVariable('isValid'));\n $this->assertSame('fail', $review->get('testStatus'));\n }", "public function test_updateSettings() {\n\n }", "public function massStatusAction()\n {\n $traineecertIds = $this->getRequest()->getParam('traineecert');\n if (!is_array($traineecertIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_traineecert')->__('Please select trainee certificates.')\n );\n } else {\n try {\n foreach ($traineecertIds as $traineecertId) {\n $traineecert = Mage::getSingleton('bs_traineecert/traineecert')->load($traineecertId)\n ->setStatus($this->getRequest()->getParam('status'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d trainee certificates were successfully updated.', count($traineecertIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_traineecert')->__('There was an error updating trainee certificates.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }", "public function status_update()\n {\n if (!$this->input->is_ajax_request()) {\n exit('No direct script access allowed');\n }\n \n if ($this->input->server('REQUEST_METHOD') != 'POST') {\n show_ajax_error('403', lang('error_message_forbidden'));\n }\n \n $id = $this->input->post('id',TRUE);\n $status = $this->input->post('status',TRUE);\n if (empty($id) || empty($status)) {\n show_ajax_error('404', lang('error_message'));\n }\n \n $result = $this->cms_page_model->as_array()->get($id);\n if (empty($result)) {\n show_ajax_error('404', lang('error_message'));\n }\n \n $status = ($status == \"true\") ? 1 : 0;\n if ($this->cms_page_model->update($id, array('status' => $status))) {\n if ($status) {\n set_ajax_flashdata('success', lang('status_enabled'));\n } else {\n set_ajax_flashdata('success', lang('status_disabled'));\n }\n } else {\n set_ajax_flashdata('error', lang('error_message'));\n }\n }", "protected function statusUpdate($data)\n {\n // DB::table('status_update')->insert(['date' => Carbon::now(),\n // 'status' => $data['status'],\n // 'booking_id' => $data['id'],\n // 'created_at' => Carbon::now()\n // ]);\n }", "public function updateStatusRequest()\n { \n $now = Mage::getSingleton('core/date')->gmtDate(); \n $items = Mage::getModel('qquoteadv/qqadvcustomer')->getCollection();\n $items->addFieldToFilter('status', Ophirah_Qquoteadv_Model_Status::STATUS_REQUEST);\n $items->getSelect()->group('store_id');\n if($items->getSize() >0 ){\n $data = $items->getData();\n\n foreach($data as $unit) { \n $storeId = $unit['store_id'];\n $day = Mage::getStoreConfig('qquoteadv/general/expirtime_proposal', (int)$storeId); \n \n $now = Mage::getSingleton('core/date')->gmtDate(); \n $collection = Mage::getModel('qquoteadv/qqadvcustomer')->getCollection();\n $collection->addFieldToFilter('status', Ophirah_Qquoteadv_Model_Status::STATUS_REQUEST);\n $collection->getSelect()\n ->where('created_at<INTERVAL -' . $day . ' DAY + \\'' . $now . '\\'');\n $collection->load(); \n\n foreach ($collection as $item) { \n $item->setStatus(Ophirah_Qquoteadv_Model_Status::STATUS_REQUEST_EXPIRED);\n $item->save(); \n }\n }\n }\n }", "function change_status_to() {\n $stat_param = array(\n 'status' => $this->uri->segment(3)\n );\n $id = $this->uri->segment(4);\n $updt_status = $this->news_letter_model->change_status_to('newsletter', $stat_param, $id);\n if ($updt_status) {\n $this->session->set_userdata('success_msg', 'Status Updated susseccfully.');\n } else {\n $this->session->set_userdata('error_msg', 'Cannot update status.');\n }\n redirect('news_letter_cont');\n }", "public function testUpdateVendorComplianceSurvey()\n {\n }", "public function test_add_status_event()\n {\n $employer = Employer::factory()->create();\n $status = EmployerStatus::create([\n \"employer_id\" => $employer->id,\n \"online_at\" => $online_at = Carbon::now(),\n\n ]);\n $this->assertDatabaseHas(\"employer_statuses\", [\n \"employer_id\" => (string)$employer->id,\n \"online_at\" => $online_at,\n\n ]);\n }", "function _updateStatus($a_obj_id, $a_usr_id, $a_obj = null, $a_percentage = false, $a_no_raise = false, $a_force_raise = false)\n\t{\n//global $ilLog;\n//$ilLog->write(\"ilLPStatus-_updateStatus-\");\n\n\t\t$status = $this->determineStatus($a_obj_id, $a_usr_id, $a_obj);\n\t\t$percentage = $this->determinePercentage($a_obj_id, $a_usr_id, $a_obj);\n\t\t$changed = self::writeStatus($a_obj_id, $a_usr_id, $status, $percentage);\n\t\t\n\t\tif(!$a_no_raise && \n\t\t\t($changed || $a_force_raise)) // #15529\n\t\t{\n\t\t\tself::raiseEvent($a_obj_id, $a_usr_id, $status, $percentage);\t\t\t\n\t\t}\t\t\t\n\t}", "public function testUpdateUpdatesDateValue()\n {\n $account_status_spans_table = $this->insight->getTableName('account_status_spans');\n\n $this->insight->accounts->addTrial(1);\n $this->insight->accounts->changePlan(1, new PlanM(), new Yearly());\n\n $row = $this->connection->executeFirstRow(\"SELECT * FROM `$account_status_spans_table` WHERE `id` = ?\", 1);\n\n $this->assertInternalType('array', $row);\n\n $this->assertInstanceOf(DateTimeValue::class, $row['started_at']);\n $this->assertInstanceOf(DateValue::class, $row['started_on']);\n $this->assertEquals($row['started_at']->format('Y-m-d'), $row['started_on']->format('Y-m-d'));\n\n $this->assertInstanceOf(DateTimeValue::class, $row['ended_at']);\n $this->assertInstanceOf(DateValue::class, $row['ended_on']);\n $this->assertEquals($row['ended_at']->format('Y-m-d'), $row['ended_on']->format('Y-m-d'));\n }", "public function SurveyReadStatusUpdate() {\n $user = $this->auth();\n if (empty($user)) {\n Utils::response(['status' => false, 'message' => 'Forbidden access.'], 403);\n }\n $input = $this->getInput();\n if (($this->input->method() != 'post') || empty($input)) {\n Utils::response(['status' => false, 'message' => 'Bad request.'], 400);\n }\n $validate = [\n ['field' => 'push_survey_id', 'label' => 'Pushed Survey ID', 'rules' => 'required'],\n ];\n $errors = $this->ConsumerModel->validate($input, $validate);\n if (is_array($errors)) {\n Utils::response(['status' => false, 'message' => 'Validation errors.', 'errors' => $errors]);\n }\t\n\t\t$push_survey_id = $this->getInput('push_survey_id');\n\t\t$push_survey_idi = $push_survey_id['push_survey_id'];\n\t\t\n $this->db->set('media_play_date', date(\"Y-m-d H:i:s\")); \n $this->db->where('id', $push_survey_idi);\n if ($this->db->update('push_surveys')) {\n Utils::response(['status' => true, 'message' => 'Record updated.', 'data' => $input]);\n } else {\n Utils::response(['status' => false, 'message' => 'System failed to update.'], 200);\n }\n }", "function change_status()\n {\n //Create Model Object\n $helpDeskObj=new HelpDeskModel();\n \n //change status\n $helpDeskObj->changeStatus();\n\n $msg=\"Help Desk status has been activated successfully\";\n if($_GET['newstatus']=='0')\n {\n $msg=\"Help Desk status has been deactivated successfully\";\n }\n\n echo json_encode(array(\"result\" => \"success\",\"title\" => \"Help Desk Status\",\"message\" => $msg));\n exit();\n }" ]
[ "0.7402796", "0.7066509", "0.6592195", "0.65656424", "0.614286", "0.6069463", "0.6058696", "0.59344006", "0.5911069", "0.5883186", "0.5882107", "0.58265615", "0.5811445", "0.5768166", "0.5738013", "0.5712161", "0.569947", "0.568407", "0.56723994", "0.56482786", "0.5633261", "0.56320846", "0.56204545", "0.5619602", "0.56175125", "0.56159323", "0.56117266", "0.5594314", "0.55940014", "0.5589019", "0.5586751", "0.5583319", "0.5581159", "0.5581068", "0.55802447", "0.5571759", "0.55628026", "0.5562245", "0.55354303", "0.5531027", "0.55269027", "0.5525164", "0.5523639", "0.5520364", "0.55196536", "0.5515871", "0.5515266", "0.55074966", "0.5506252", "0.5505785", "0.550574", "0.54974204", "0.54926604", "0.549148", "0.54883146", "0.5481498", "0.54787946", "0.54714155", "0.5467625", "0.5463993", "0.54608035", "0.5458126", "0.5456452", "0.545555", "0.54470915", "0.5433578", "0.54301393", "0.54222095", "0.5420393", "0.5416217", "0.5412949", "0.54101956", "0.54073054", "0.5404168", "0.53988373", "0.53980535", "0.5396924", "0.5395683", "0.5394738", "0.53918445", "0.5391393", "0.5389182", "0.53878903", "0.53870195", "0.53869116", "0.5381488", "0.5379293", "0.53758365", "0.53738636", "0.5372725", "0.5370994", "0.5368245", "0.53670776", "0.5362626", "0.5354274", "0.53472257", "0.53437304", "0.53413635", "0.5337966", "0.5335678" ]
0.7082255
1
Test case for webinarUpdate Update a Webinar.
Тест-кейс для webinarUpdate Обновление вебинара.
public function testWebinarUpdate() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarPollUpdate()\n {\n }", "public function testWebinarRegistrantQuestionUpdate()\n {\n }", "public function update($meeting)\n {\n\n }", "public function test_update() {\n global $DB;\n\n self::setAdminUser();\n $this->resetAfterTest(true);\n\n // Save new outage.\n $now = time();\n $outage = new outage([\n 'autostart' => false,\n 'warntime' => $now - 60,\n 'starttime' => 60,\n 'stoptime' => 120,\n 'title' => 'Title',\n 'description' => 'Description',\n ]);\n $outage->id = outagedb::save($outage);\n self::$outage = $outage;\n\n self::$outage->starttime += 10;\n outagedb::save(self::$outage);\n\n // Should still exist.\n $event = $DB->get_record_select(\n 'event',\n \"(eventtype = 'auth_outage' AND instance = :idoutage)\",\n ['idoutage' => self::$outage->id],\n 'id',\n IGNORE_MISSING\n );\n self::assertTrue(is_object($event));\n self::assertSame(self::$event->id, $event->id);\n self::$event = $event;\n }", "public function testDeveloperUpdate()\n {\n $developer = factory(Developer::class)->create();\n $response = $this->get('/developer/update?id=' . $developer->id);\n $response->assertStatus(200);\n }", "public function testUpdateSurvey()\n {\n $survey = Survey::factory()->create();\n\n $response = $this->json('PATCH', \"survey/{$survey->id}\", [\n 'survey' => ['epilogue' => 'epilogue your behind']\n ]);\n\n $response->assertStatus(200);\n $this->assertDatabaseHas('survey', ['id' => $survey->id, 'epilogue' => 'epilogue your behind']);\n }", "public function testUpdate()\n {\n\n // $payment = $this->payment\n // ->setEvent($this->eventId)\n // ->acceptCash()\n // ->acceptCheck()\n // ->acceptGoogle()\n // ->acceptInvoice()\n // ->acceptPaypal()\n // ->setCashInstructions($instructions)\n // ->setCheckInstructions($instructions)\n // ->setInvoiceInstructions($instructions)\n // ->setGoogleMerchantId($this->googleMerchantId)\n // ->setGoogleMerchantKey($this->googleMerchantKey)\n // ->setPaypalEmail($this->paypalEmail)\n // ->update();\n\n // $this->assertArrayHasKey('process', $payment);\n // $this->assertArrayHasKey('status', $payment['process']);\n // $this->assertTrue($payment['process']['status'] == 'OK');\n }", "public function testD_update() {\n\n $fname = self::$generator->firstName();\n $lname = self::$generator->lastName;\n\n $resp = $this->wrapper->update( self::$randomEmail, [\n 'FNAME' => $fname,\n 'LNAME' => $lname\n ]);\n\n $this->assertObjectHasAttribute('id', $resp);\n $this->assertObjectHasAttribute('merge_fields', $resp);\n\n $updated = $resp->merge_fields;\n\n $this->assertEquals($lname, $updated->LNAME);\n\n }", "public function testSuccessfulInstructorUpdate() {\n try {\n $updatedInstructor = UserManagementController::updateInstructorProfile(self::USERNAME,self::PASSWORD ,self::EMAIL\n ,self::FIRSTNAME,self::LASTNAME,$this->project->getProjectJnName()\n ,self::IS_OWNER,$this->institution->getAbbreviation(),self::IDENTIFICATION);\n\n $this->assertNotNull($updatedInstructor, \"The updated instructor is null\");\n $this->assertEquals($this->userTypeEnum->INSTRUCTOR, $updatedInstructor->getType(), \"The updated user is not\n an instance of INSTRUCTOR\");\n\n $InstructorInstitution = PersistentUserXInstitutionPeer::retrieveByPk($updatedInstructor->getUserId(),\n $this->institution->getInstitutionId());\n $this->assertNotNull($InstructorInstitution, \"The user x institution relation was not created for the instructor.\");\n $this->assertEquals(self::IDENTIFICATION, $InstructorInstitution->getIdentification(), \"The Instructor school\n identification is incorrect\");\n $this->assertEquals($updatedInstructor->getUserId(), $InstructorInstitution->getUserId(), \"The user id is\n incorrect on user x institution for the instructor\");\n $this->assertEquals($this->institution->getInstitutionId(), $InstructorInstitution->getInstitutionId(),\n \"The institution id is incorrect on user x institution for the instructor\");\n\n $instXProjec = PersistentUserXProjectPeer::retrieveByPK($updatedInstructor->getJnUsername(),\n $this->project->getProjectJnName());\n $this->assertNotNull($instXProjec, \"The relationship between instructor and project was not created\");\n $this->assertEquals($this->project->getProjectJnName(), $instXProjec->getProjectJnName(), \"The project name\n is incorrect on user x project\");\n $this->assertEquals($updatedInstructor->getJnUsername(), $instXProjec->getJnUsername(), \"The java.net\n username is incorrect on user x project for instructor\");\n $this->assertTrue($instXProjec->getIsOwner() == 1, \"The instructor is the owner of project.\");\n\n } catch (InfinityMetricsException $ime){\n $this->fail(\"The successful update of profile failed: \" . $ime);\n }\n\n }", "public function updated(Instructor $instructor)\n {\n //\n }", "public function testUpdate()\n {\n // Test with correct field name\n $this->visit('/cube/1')\n ->type('3', 'x')\n ->type('3', 'y')\n ->type('3', 'z')\n ->type('1', 'value')\n ->press('submit-update')\n ->see('updated successfully');\n\n /*\n * Tests with incorrect fields\n */\n // Field required\n $this->visit('/cube/1')\n ->press('submit-update')\n ->see('is required');\n\n // Field must be integer\n $this->visit('/cube/1')\n ->type('1a', 'x')\n ->press('submit-update')\n ->see('integer');\n\n // Field value very great\n $this->visit('/cube/1')\n ->type('1000000000', 'y')\n ->press('submit-update')\n ->see('greater');\n }", "public function test_update_item() {}", "public function test_update_item() {}", "function update() {\n\t\t$vars = $this->params['url'];\n\t\t$this->Event->id = $vars['id'];\n\t\t$this->Event->saveField('start', $vars['start']);\n\t\t$this->Event->saveField('end', $vars['end']);\n\t\t$this->Event->saveField('all_day', $vars['allday']);\n\t}", "public function update(Request $request, InterviewStatistic $interviewStatistic)\n {\n //\n }", "public function testUpdateVendorComplianceSurvey()\n {\n }", "public function testIntegrationUpdate()\n {\n $userFaker = factory(Model::class)->create();\n $this->visit('user/' . $userFaker->slug . '/edit')\n ->type('Foo bar', 'name')\n ->type('Foobar', 'username')\n ->type('foo@bar.com', 'email')\n ->type('foobar123', 'password')\n ->type('foobar123', 'password_confirmation')\n ->press('Save')\n ->seePageIs('user');\n $this->assertResponseOk();\n $this->seeInDatabase('users', [\n 'username' => 'Foobar',\n 'email' => 'foo@bar.com'\n ]);\n $this->assertViewHas('models');\n }", "public function testUpdate()\n\t{\n\t\t$params = $this->setUpParams();\n\t\t$params['title'] = 'some tag';\n\t\t$params['slug'] = 'some-tag';\n\t\t$response = $this->call('PUT', '/'.self::$endpoint.'/'.$this->obj->id, $params);\n\t\t$this->assertEquals(200, $response->getStatusCode());\n\t\t$result = $response->getOriginalContent()->toArray();\n\n\t\t// tes apakah hasil return adalah yang sesuai\n\t\tforeach ($params as $key => $val) {\n\t\t\t$this->assertArrayHasKey($key, $result);\n\t\t\tif (isset($result[$key])&&($key!='created_at')&&($key!='updated_at'))\n\t\t\t\t$this->assertEquals($val, $result[$key]);\n\t\t}\n\n\t\t// tes tak ada yang dicari\n\t\t$response = $this->call('GET', '/'.self::$endpoint.'/696969', $params);\n\t\t$this->assertEquals(500, $response->getStatusCode());\n\t}", "function updateWebinar($webinarKey, $payloadArray, $sendNotification = true)\n {\n ($sendNotification) ? $parameters = ['notifyParticipants' => true] : $parameters = ['notifyParticipants' => false];\n\n $path = $this->getPathRelativeToOrganizer(sprintf('webinars/%s', $webinarKey));\n\n $webinarObject = new WebinarEntity($payloadArray);\n\n return $this->sendRequest('PUT', $path, $parameters, $payload = $webinarObject->toArray());\n }", "public function testUnitUpdate()\n {\n $input = [\n 'username' => 'foo.bar',\n 'email' => 'foo@bar.com',\n 'password' => 'asdfg',\n 'password_confirmation' => 'asdfg',\n 'name' => 'foo bar'\n ];\n $request = Mockery::mock('Suitcoda\\Http\\Requests\\UserEditRequest[all]');\n $request->shouldReceive('all')->once()->andReturn($input);\n\n $model = Mockery::mock('Suitcoda\\Model\\User[save]');\n $model->shouldReceive('findOrFailByUrlKey')->once()->andReturn($model);\n $model->shouldReceive('save')->once();\n\n $user = new UserController($model);\n\n $this->assertInstanceOf('Illuminate\\Http\\RedirectResponse', $user->update($request, 1));\n }", "public function testUpdateAction()\n {\n $res = $this->controller->updateAction(\"1\");\n $this->assertContains(\"Update\", $res->getBody());\n }", "public function updated(Investor $investor)\n {\n //\n }", "public function testUpdate()\n {\n $data = array(\n 'foo' => 'baz'\n );\n\n $transaction = $this->client->transaction()->Update(654, $data);\n\n $this->assertEquals($data, get_object_vars($transaction->put), 'Passed variables are not correct');\n $this->assertEquals('PUT', $transaction->request_method, 'The PHP Verb Is Incorrect');\n $this->assertEquals('/transactions/654', $transaction->path, 'The path is incorrect');\n\n }", "public function test_it_updates_a_user()\n {\n $user = User::create(['email' => 'me@andrewhook.uk', 'given_name' => 'Andrew', 'family_name' => 'Hook']);\n\n $update = ['email' => 'andy@andrewhook.uk', 'given_name' => 'A', 'family_name' => 'H'];\n\n $this->json('PUT', sprintf('/users/%d', $user->id), $update)\n ->seeJson($update);\n }", "public function testExampleUpdateRequestShouldSucceed()\n {\n $example = Example::factory()->create();\n $response = $this->put(route('example.update', $example->id), [\n 'param1' => 100,\n 'param2' => 'Hello World',\n ]);\n $response->assertStatus(200);\n }", "public function testHandleUpdateSuccess()\n {\n // Populate data\n $dealerAccountID = $this->_populate();\n \n // Set params\n $params = $this->customDealerAccountData;\n \n // Add ID\n $ID = $this->_pickRandomItem($dealerAccountID);\n $params['ID'] = $ID;\n \n // Request\n $this->withSession($this->adminSession)\n ->call('POST', '/dealer-account/edit', $params, [], [], ['HTTP_REFERER' => '/dealer-account/edit']);\n \n // Validate response\n $this->assertRedirectedTo('/dealer-account/edit');\n $this->assertSessionHas('dealer-account-updated', '');\n \n // Validate data\n $dealerAccount = $this->dealer_account->getOne($ID);\n $this->assertEquals($dealerAccount->name, $this->customDealerAccountData['name']);\n $this->assertEquals($dealerAccount->branch_ID, $this->customDealerAccountData['branch_ID']);\n }", "public function update(Request $request, Meeting $meeting)\n {\n //\n }", "public function update(Request $request, Appointments $appointments)\n {\n //\n }", "public function testUpdate(): void { }", "public function update(Request $request, EventStarter $eventStarter)\n {\n\t\t\n\t\t$eventStarter->schedule_plan = $request->get('schedule_plan');\n\t\t$eventStarter->status = $request->get('status');\n\t\t$eventStarter->save();\n\n\n\t return redirect(route('detail-event', ['eventStarter' => $eventStarter->id]));\n }", "public function testUpdateSurvey0()\n {\n }", "public function testUpdateSurvey0()\n {\n }", "public function testUpdate()\n\t{\n\t\t$this->resetReservationTable();\n\t\t$this->resetDateTimes();\n\t\t\n\t\t$reservation = new Reservation();\n\t\t$reservation->setAttributes(array(\n\t\t\t\t'roomid' => 1,\n\t\t\t\t'datefrom' => $this->_dateOverlapFrom,\n\t\t\t\t'numberofnights'=> $this->_numberofnights,\n\t\t\t\t));\n\t\t$reservation->save(false);\t\n\t\t$newDateTo = DateTime::createFromFormat('Y-m-d',$this->_dateOverlapToObj->format('Y-m-d'));;\n\t\t$newDateTo->add(new DateInterval('P10D'));\n\n\n\t\t$reservation = Reservation::model()->findByPk($reservation->getAttribute('id'));\n\t\t$reservation->setAttribute('dateto',$newDateTo->format('Y-m-d'));\n\t\t$reservation->setAttribute('confirmreservation',true);\n\t\t\n\t\t//must run validation rules\n\t\t$this->assertTrue($reservation->save());\n\t\n\t\t\n\t\t$reservation = Reservation::model()->findByPk($reservation->getAttribute('id'));\n\t\t$this->assertEquals($newDateTo->format('Y-m-d'),$reservation->dateto);\t\n\n\t\t\n\t}", "public function testApiUpdate()\n {\n $user = User::find(1);\n\n \n $compte = Compte::where('name', 'compte22')->first();\n\n $data = [\n 'num' => '2019',\n 'name' => 'compte22',\n 'nature' => 'caisse',\n 'solde_init' => '12032122' \n \n ];\n\n $response = $this->actingAs($user)->withoutMiddleware()->json('PUT', '/api/comptes/'.$compte->id, $data);\n $response->assertStatus(200)\n ->assertJson([\n 'success' => true,\n 'compte' => true,\n ]);\n }", "public function testUpdatePayrun()\n {\n }", "public function testSellerUpdatedSuccess()\n {\n $this->demoUserLoginIn();\n $spu = Spu::create([\n 'users_id' => '1',\n 'name' => 'test',\n 'description' => 'test',\n ]);\n $response = $this->call('PATCH', '/seller/4/update', [\n 'name' => 'testUpdate',\n 'description' => 'testUpdate',\n ]);\n $this->assertEquals(302, $response->status());\n }", "public function testSchedulesUpdateOut()\n {\n $result = $this->visit('events/{event}/schedules/update/{id}')\n ->see('create your suaray account')\n ->see('welcome to suaray')\n ->seePageIs('/account/register');\n }", "public function testWebinarStatus()\n {\n }", "public function test_admin_can_update_a_worker()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs($admin = $this->createAdmin())\n ->visitRoute($this->route, $this->lastWorker()->id)\n ->type('worker_name', $this->makeWorker()->worker_name)\n ->type('worker_nif', $this->makeWorker()->worker_nif)\n ->type('worker_start', str_replace('/', '', $this->makeWorker()->worker_start))\n ->type('worker_ropo', $this->makeWorker()->worker_ropo)\n ->type('worker_ropo_date', str_replace('/', '', $this->makeWorker()->worker_ropo_date))\n ->select('worker_ropo_level', $this->makeWorker()->worker_ropo_level)\n ->type('worker_observations', $this->makeWorker()->worker_observations)\n ->press(trans('buttons.edit'))\n ->assertSee(__('The items has been updated successfuly'));\n });\n\n $this->assertDatabaseHas('workers', [\n 'worker_name' => $this->makeWorker()->worker_name,\n 'worker_nif' => $this->makeWorker()->worker_nif,\n 'worker_ropo' => $this->makeWorker()->worker_ropo,\n 'worker_ropo_level' => $this->makeWorker()->worker_ropo_level,\n 'worker_observations' => $this->makeWorker()->worker_observations,\n ]);\n }", "public function update($bunch_id , $subscriber_id, SubscriberRequest $request) {\n\n\n $update = Subscriber::find($subscriber_id);\n\n $update->update($request->all());\n\n return redirect()->route('subscriber.index',[$bunch_id]);\n\n }", "public function update(Request $request, Volunteer $volunteer)\n {\n //\n }", "public function testDebtorUpdate()\n {\n $this->saveDebtor();\n\n $oDebtor = (new DebtorDAO())->findByCpfCnpj('01234567890');\n $this->assertTrue(!is_null($oDebtor->getId()));\n\n $aDadosUpdate = [\n 'id' => $oDebtor->getId(),\n 'name' => 'Carlos Vinicius Atualização',\n 'email' => 'cvmm321atualizado@gmail.com',\n 'cpf_cnpj' => '14725836905',\n 'birthdate' => '01/01/2000',\n 'phone_number' => '(79) 9 8888-8888',\n 'zipcode' => '11111-111',\n 'address' => 'Rua Atualização',\n 'number' => '005544',\n 'complement' => 'Conjunto Atualização',\n 'neighborhood' => 'Bairro Atualização',\n 'city' => 'Maceió',\n 'state' => 'AL'\n ];\n\n $oDebtorFound = (new DebtorDAO())->find($aDadosUpdate['id']);\n $oDebtorFound->update($aDadosUpdate);\n\n $oDebtorUpdated = (new DebtorDAO())->find($aDadosUpdate['id']);\n $this->assertTrue($oDebtorUpdated->getName() == 'Carlos Vinicius Atualização');\n $this->assertTrue($oDebtorUpdated->getEmail() == 'cvmm321atualizado@gmail.com');\n $this->assertTrue($oDebtorUpdated->getCpfCnpj() == '14725836905');\n $this->assertTrue($oDebtorUpdated->getBirthdate()->format('d/m/Y') == '01/01/2000');\n $this->assertTrue($oDebtorUpdated->getPhoneNumber() == '79988888888');\n $this->assertTrue($oDebtorUpdated->getZipcode() == '11111111');\n $this->assertTrue($oDebtorUpdated->getAddress() == 'Rua Atualização');\n $this->assertTrue($oDebtorUpdated->getNumber() == '005544');\n $this->assertTrue($oDebtorUpdated->getComplement() == 'Conjunto Atualização');\n $this->assertTrue($oDebtorUpdated->getNeighborhood() == 'Bairro Atualização');\n $this->assertTrue($oDebtorUpdated->getCity() == 'Maceió');\n $this->assertTrue($oDebtorUpdated->getState() == 'AL');\n $this->assertTrue(!is_null($oDebtorUpdated->getUpdated()));\n $oDebtorUpdated->delete();\n }", "public function update($data) {}", "public function update($data) {}", "public function update(Request $request, Appointment $appointment)\n {\n //\n }", "public function update(Request $request, Appointment $appointment)\n {\n //\n }", "public function update(Request $request, appointment $appointment)\n {\n //\n }", "public function update(Request $request, TestResult $testResult)\n {\n //\n }", "public function testUpdate() {\n\n\t\t$request_uri = $this->root_url . 'update';\n\n\t\t$parameters = array(\n\t\t\t'uri' => $request_uri,\n\t\t\t'method' => 'POST',\n\t\t\t'database' => $this->db,\n\t\t\t'postdata' => array(\n\t\t\t\t'id' => 4,\n\t\t\t\t'firstname' => 'Andrei',\n\t\t\t\t'surname' => 'Kanchelskis',\n\t\t\t)\n\t\t);\n\n\t\t$server = new APIServer( $parameters );\n\n\t\t$server->run();\n\n\t\t$response = $server->getResponse();\n\n\t\t$this->assertArrayHasKey('status', $response);\n\t\t$this->assertArrayHasKey('command', $response);\n\n\t\t$this->assertEquals( $response['command'], 'update' );\n\t}", "public function testUpdate()\n {\n $requestInstance = null;\n\n $this->router->patch('/customers/{id}/relationships/{relationship}', [\n 'middleware' => ['request', 'response'],\n function(\\Luminary\\Http\\Requests\\Update $request) use(&$requestInstance) {\n $requestInstance = $request;\n }\n ]);\n\n $data = [\n 'data' => [\n 'type' => 'location',\n 'id' => '1234'\n ]\n ];\n\n $this->json('PATCH', 'customers/1234/relationships/location', $data , $this->headers());\n\n $this->assertResponseStatus(204);\n $this->assertInstanceOf(\\Luminary\\Http\\Requests\\Update::class, $requestInstance);\n $this->assertInstanceOf(CustomerAuthorize::class, $requestInstance->getAuthorize());\n $this->assertInstanceOf(\\Luminary\\Http\\Requests\\Update::class, $requestInstance->validatorArgs());\n $this->assertInstanceOf(\\Luminary\\Services\\Sanitation\\DefaultSanitizable::class, $requestInstance->getSanitizable());\n }", "public function updated(OnlineInquiry $onlineInquiry)\n {\n //\n }", "public function update(Request $request, RemoteAssessment $remoteAssessment)\n {\n //\n }", "public function testUpdateEvents()\n {\n $event= Event::factory(1)->create();\n // dd($event);\n $event->title = 'Maria';\n $this->put(\"/events\". $event[0]->id, $event->toArray());\n\n $this->assertDatabaseHas('events', [\n 'id' => 1,\n 'title' => 'Maria'\n ]);\n }", "public function testWebinarCreate()\n {\n }", "public function testHandleUpdateValidationError()\n {\n // Populate data\n $this->_populate();\n \n // Request\n $response = $this->withSession($this->adminSession)\n ->call('POST', '/dealer-account/edit', $this->customDealerAccountData, [], [], ['HTTP_REFERER' => '/dealer-account/edit']);\n \n // Verify\n $this->assertRedirectedTo('/dealer-account/edit');\n $this->assertSessionHasErrors();\n }", "public function testRequestUpdateItem()\n {\n\t\t$response = $this\n\t\t\t\t\t->json('PUT', '/api/items/6', [\n\t\t\t\t\t\t'name' => 'Produkt zostal dodany i zaktualizowany przez test PHPUnit', \n\t\t\t\t\t\t'amount' => 0\n\t\t\t\t\t]);\n\n $response->assertJson([\n 'message' => 'Items updated.',\n\t\t\t\t'updated' => true\n ]);\n }", "public function testUpdateNotOwnCreated()\r\n {\r\n //create teacher user\r\n $teacher = $this->CreateTeacher();\r\n $lisUser = $this->CreateTeacherUser($teacher);\r\n\r\n //now we have created teacheruser set to current controller\r\n $this->controller->setLisUser($lisUser);\r\n $this->controller->setLisPerson($teacher);\r\n\r\n //create other teacher user\r\n $otherTeacher = $this->CreateTeacher();\r\n $otherLisUser = $this->CreateTeacherUser($otherTeacher);\r\n\r\n //$name = uniqid() . 'Name';\r\n $subjectRound = $this->CreateSubjectRound();\r\n $student = $this->CreateStudent();\r\n //$anotherTeacher = $this->CreateTeacher();\r\n \r\n\r\n $independentWork = $this->CreateIndependentWork([\r\n 'name' => uniqid() . 'Name',\r\n 'duedate' => new \\DateTime,\r\n 'description' => uniqid() . ' Description for independentwork',\r\n 'durationAK' => (int) uniqid(),\r\n 'subjectRound' => $subjectRound->getId(),\r\n 'teacher' => $teacher->getId(),\r\n 'student' => $student->getId(),\r\n 'createdBy' => $otherLisUser->getId()\r\n ]);\r\n\r\n //$subjectRoundIdOld = $independentWork->getSubjectRound()->getId();\r\n //$studentIdOld = $independentWork->getStudent()->getId();\r\n //$teacherIdOld = $independentWork->getTeacher()->getId();\r\n\r\n $this->request->setMethod('put');\r\n $this->routeMatch->setParam('id', $independentWork->getId());\r\n\r\n $this->request->setContent(http_build_query([\r\n 'student' => $this->CreateStudent()->getId(),\r\n 'subjectRound' => $this->CreateSubjectRound()->getId(),\r\n 'teacher' => $teacher->getId(),\r\n ]));\r\n\r\n //fire request\r\n $result = $this->controller->dispatch($this->request);\r\n $response = $this->controller->getResponse();\r\n\r\n $this->PrintOut($result, false);\r\n\r\n $this->assertEquals(200, $response->getStatusCode());\r\n $this->assertEquals(false, $result->success);\r\n $this->assertEquals('SELF_CREATED_RESTRICTION', $result->message);\r\n }", "public function update(Request $request, ClientSurvey $clientSurvey)\n {\n //\n }", "public function Update()\n\t{\n\t\t$prefix = $this->Db->TablePrefix;\n\t\t$user = GetUser();\n\t\t$userid = $user->userid;\n\t\t$where = 'id = ' . $this->id;\n\n\t\t$surveys_data = $this->data;\n\n\t\tif (isset($surveys_data['_columns'])) {\n\t\t\tunset($surveys_data['_columns']);\n\t\t}\n\n\t\tif (isset($surveys_data['id'])) {\n\t\t\tunset($surveys_data['id']);\n\t\t}\n\n\t\t$surveys_data['updated'] = $this->GetServerTime();\n\n\t\t$this->Db->UpdateQuery('surveys', $surveys_data, $where);\n\t}", "public function update(User $user, Meeting $meeting)\n {\n //\n }", "public function update(Request $request, Nurse $nurse)\n {\n //\n }", "public function testUserUpdate()\n {\n $this->browse(function (Browser $browser) {\n $update_button = self::$locator . ' td .update_button';\n\n self::$username = 'A0Tester' . uniqid();\n $browser->visit('/')\n ->click($update_button)\n ->type('username', self::$username)\n ->type('first_name', 'aaaab')\n ->type('last_name', 'aaaab')\n ->click('button[type=\"submit\"]')\n\n ->waitForText('User data successfully updated!')\n ->assertSee('User data successfully updated!')\n ->assertValue('input[name=\"username\"]', self::$username)\n ->assertValue('input[name=\"first_name\"]', 'aaaab')\n ->assertValue('input[name=\"last_name\"]', 'aaaab');\n });\n }", "public function update(Request $request, Dateplanner $dateplanner)\n {\n //\n }", "public function actionUpdate() {}", "public function actionUpdate() {}", "public function update(Request $request, pregunta_test $pregunta_test)\n {\n //\n }", "public function updated(Apartment $apartment)\n {\n //\n }", "public function testUpdate()\n {\n Item::factory()->create(\n ['email' => 'test1@test.com', 'name' => 'test']\n );\n\n Item::factory()->create(\n ['email' => 'test2@test.com', 'name' => 'test']\n );\n\n Item::factory()->count(10)->create();\n\n //test item not found\n $this->call('PUT', '/items/11111')\n ->assertStatus(404);\n\n //test validation\n $this->put('items/1', array('email' => 'test1!kl'))\n ->seeJson([\n 'email' => array('The email must be a valid email address.'),\n ]);\n\n //test exception\n $this->put('items/1', array('email' => 'test2@test.com'))\n ->seeJsonStructure([\n 'error', 'code'\n ])\n ->seeJson(['code' => 400]);\n\n //test success updated item\n $this->put('items/1', array('email' => 'test3@test.com', 'name' => 'test1 updated'))\n ->seeJson([\n 'status' => 'ok',\n ])\n ->seeJson([\n 'email' => 'test3@test.com',\n ])\n ->seeJson([\n 'name' => 'test1 updated',\n ])\n ->seeJsonStructure([\n 'data' => [\n 'id',\n 'guid',\n 'name',\n 'email',\n 'created_dates',\n 'updated_dates',\n ]\n ]);\n\n $this->seeInDatabase('items', array('email' => 'test3@test.com', 'name' => 'test1 updated'));\n }", "public function testUpdateAirport()\n {\n $db=new Db();\n $this->airport->setAirportFromDB($db, 8);\n $actual=$this->airport->updateAirport($db);\n $this->assertEquals(true,$actual);\n }", "public function testUpdateSession()\n {\n $response = $this->loginAsRole(Role::ADMIN)\n ->put($this->url('sessions/1'), [\n 'name' => '2020-2021'\n ]);\n\n $response->assertStatus(200);\n\n $response->assertJsonStructure([\n 'name',\n 'school_id',\n 'start_date',\n 'end_date'\n ]);\n\n $response->assertJson([\n 'name' => '2020-2021'\n ]);\n }", "public function update($bannerclient);", "public function test_user_update()\n {\n $this->withoutMiddleware(ValidJWTMiddleware::class);\n\n $user = User::first();\n\n $response = $this->json('PUT', \"api/usuario/$user->id\", [\n 'first_name' => $this->faker->firstName(),\n 'last_name' => $this->faker->lastName(),\n 'email' => $this->faker->email(),\n 'telephone' => '+55' . $this->faker->phoneNumberCleared(),\n ]);\n\n $userValidate = User::first();\n\n $response->assertStatus(200)\n ->assertJson([\n 'success' => true,\n ]);\n\n $this->assertNotEquals($userValidate, $user);\n }", "public function Do_update_Example1(){\n\n\t}", "public function testUpdate()\n {\n $model = $this->makeFactory();\n $model->save();\n\n $newModel = $this->makeFactory();\n\n $this->json('PUT', static::ROUTE . '/' . $model->id, $newModel->toArray(), [\n 'Authorization' => 'Token ' . self::getToken()\n ])\n ->seeStatusCode(JsonResponse::HTTP_OK) \n ->seeJson($newModel->toArray());\n }", "public function testHandleUpdateSuccess()\n {\n // Populate data\n $branchIDs = $this->_populate();\n \n // Set params\n $params = $this->customBranchData;\n \n // Add ID\n $ID = $this->_pickRandomItem($branchIDs);\n $params['ID'] = $ID;\n \n // Request\n $this->withSession($this->adminSession)\n ->call('POST', '/branch/edit', $params, [], [], ['HTTP_REFERER' => '/branch/edit']);\n \n // Validate response\n $this->assertRedirectedTo('/branch/edit');\n $this->assertSessionHas('branch-updated', '');\n \n // Validate data\n $branch = $this->branch->getOne($ID);\n $this->assertEquals($branch->name, $this->customBranchData['name']);\n $this->assertEquals($branch->promotor_ID, $this->customBranchData['promotor_ID']);\n }", "public function update(Agenda $agenda)\n {\n //\n }", "public function testCollectionTicketsUpdate()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testSaveUpdate()\n {\n $city = $this->existing_city;\n\n // set string properties to \"updated <property_name>\"\n // set numeric properties to strlen(<property_name>)\n foreach (get_object_vars($city) as $key => $value) {\n if ($key !== 'id' && $key != 'created') {\n if (is_string($value)) {\n $city->$key = \"updated \".$key;\n } elseif (is_numeric($value)) {\n $city->$key = strlen($key);\n }\n }\n }\n\n // update the city\n $city->save();\n\n // go get the updated record\n $updated_city = new City($city->id);\n // check the properties of the updatedCity\n foreach (get_object_vars($updated_city) as $key => $value) {\n if ($key !== 'id' && $key != 'created') {\n if (is_string($city->$key)) {\n $this->assertEquals(\"updated \".$key, $value);\n } elseif (is_numeric($city->$key)) {\n $this->assertEquals(strlen($key), $value);\n }\n }\n }\n }", "public function testPageUpdate()\n {\n $faker = Faker::create();\n $page = Page::inRandomOrder()->first();\n $response = $this\n ->actingAs(User::inRandomOrder()->first(), 'api')\n ->withHeaders([\n \"User-Agent\" => $faker->userAgent(),\n ])\n ->json('PUT', \"/api/pages/\" . $page->slug, [\n \"data\" => [\n \"name\" => $faker->sentence(4, true),\n ],\n \"relationships\" => [\n \"body\" => [\n \"data\" => [\n \"content\" => $faker->paragraphs(4, true),\n ],\n ],\n ],\n ]);\n $response\n ->assertStatus(200);\n }", "public function update(Request $request, Trainer $trainer)\n {\n //\n }", "public function Update($data) {\n\n }", "public function testProfileUpdateAll()\n {\n\n }", "public function update(Request $request, TrainingInstitute $trainingInstitute)\n {\n //\n }", "public function testUpdateUser()\n {\n $userData = [\n \"name\" => \"User 2\",\n \"email\" => \"user2@gmail.com\",\n \"password\" => \"demo12345123\",\n \"org_id\" => 2\n ];\n $id = 4;\n $this->json('PUT', \"api/user/update/$id\", $userData, ['Accept' => 'application/json'])\n ->assertStatus(200)\n ->assertJsonStructure([\n \"action\",\n \"data\" => [],\n \"status\"\n ]);\n }", "public function update(Request $request, BookTour $bookTour)\n {\n //\n }", "public function testProfilePrototypeUpdateByIdReviews()\n {\n\n }", "public function test_authenticated_admin_users_can_hit_the_update_endpoint()\n {\n // First we create a test country\n $country = $this->createCountry();\n\n // Then we check if it was successfully added into the database\n $this->assertDatabaseHas('countries', $country->toArray());\n\n // Then we create an update request with auth headers and empty params\n $this->authenticatedAdmin()->update($country->code, [])\n // We assert status is 422, because now we are authenticated, but request params are invalid\n ->assertStatus(422)\n // Then we assert errors structure matches expected\n ->assertJsonStructure([\n 'errors' => [\n 'name',\n 'code'\n ]\n ]);\n }", "public function update(Request $request, AgendaItemSpeaker $agendaItemSpeaker)\n {\n //\n }", "public function test_shoppers_can_be_updated()\n {\n $shopper = Shopper::withoutEvents(function () {\n return Shopper::factory()->create();\n });\n\n $this->actingAs($shopper);\n\n $response = $this->patch(route('shoppers.update', $shopper), $shppr = [\n 'name' => 'John Doe',\n 'email' => 'john.doe@gmail.com',\n 'phone' => '+16089673882',\n 'image' => UploadedFile::fake()->image('avatar.jpg', 400, 400)->size(1000),\n ]);\n\n $response->assertSessionHasNoErrors([\n 'name',\n 'phone',\n 'email',\n ]);\n\n $this->assertDatabaseHas(\n 'shoppers',\n [\n 'name' => $shppr['name'],\n 'email' => $shppr['email'],\n 'phone' => $shppr['phone'],\n 'image' => '/storage/'.time().'.'.$shppr['image']->extension(),\n 'admin_created_id' => '1',\n 'admin_updated_id' => $shopper->id\n ]\n );\n\n $response->assertStatus(302);\n $response->assertRedirect(route('shoppers.index'));\n }", "public function testWebinar()\n {\n }", "public function update(Request $request, Visit $visit)\n {\n //\n }", "public function update(Request $request, specimen_results $specimen_results)\n {\n //\n }", "public function test_if_failed_update()\n {\n }", "public function testUpdate()\n {\n\n $this->createDummyRole();\n\n $this->call('POST', '/api/role', array(\n 'action' => $this->updateAction,\n 'id' => 1,\n 'name' => \"updatedName\",\n 'description' => \"updatedDesc\",\n 'permissionCount' => $this->testPermissionCount,\n 'permission0' => 1,\n ));\n\n $this->assertDatabaseHas('roles', [\n 'id' => 1,\n 'name' => \"updatedName\",\n 'description' => \"updatedDesc\"\n ]);\n\n $this->assertDatabaseHas('role_permission', [\n 'role_id' => 1,\n 'permission_id' => [1]\n ]);\n\n $this->assertDatabaseMissing('role_permission', [\n 'role_id' => 1,\n 'permission_id' => [2]\n ]);\n }", "public function testUpdatedTask()\n {\n $userId = User::first()->value('id');\n $taskId = Task::orderBy('id', 'desc')->first()->id;\n\n $response = $this->json('PUT', '/api/v1.0.0/users/'.$userId.'/tasks/'.$taskId, [\n 'description' => 'An updated task from PHPUnit',\n 'completed' => true,\n ]);\n\n $response\n ->assertStatus(200)\n ->assertJson([\n 'description' => 'An updated task from PHPUnit',\n 'completed' => true,\n ]);\n }", "public function update(Request $request, Contest $contest)\n {\n //\n }", "public function update(Request $request, Test $test)\n {\n //\n }", "public function update(Request $request,Instagrame $instagrame)\n {\n // dd($request);\n // // dd('hello');\n $insta=Instagrame::where('id',$request->id)->first();\n // dd($insta);\n DB::beginTransaction();\n try {\n $insta->update([\n // $personne_info->update([\n 'nombre_abonne'=>$request->nombre_abonne,\n 'engagement'=>$request->engagement,\n 'qualite'=>$request->qualite,\n 'like'=>$request->like,\n 'followers'=>$request->followers,\n 'commentaire'=>$request->commentaire\n ]);\n $insta->domaine()->sync($request->arr);\n Story::where('instagrame_id',$request->id)->update([\n 'date_1er'=>$request->date_1ers,\n 'nombre_publicaion'=>$request->nombre_publicaions, \n 'taux_reponse'=>$request->taux_reponses,\n 'nombre_jaime'=>$request->nombre_jaimes,\n ]);\n Feed::where('instagrame_id',$request->id)->update([\n 'date_1er'=>$request->date_1erf,\n 'nombre_publicaion'=>$request->nombre_publicaionf, \n 'taux_reponse'=>$request->taux_reponsef,\n 'nombre_jaime'=>$request->nombre_jaimef,\n ]);\n DB::commit();\n return response()->json(['message'=>'modification bien fait insta feed story']);\n } catch (Exception $e) {\n // } catch (\\Throwable $th) {\n DB::rollback();\n return response()->json(['message'=>'modification failed']);\n // return response()->json(['message1'=>'l\\'Ajout failed','error'=>$th->getMessage()]);\n }\n }", "public function update($banner);", "private function update($eventid,$title, $venue,$privacy,$email,$password)\n {\n $response =array();\n $response[\"success\"]=0;\n \n //check if the user is valid\n $tryLoginUser= new TryUserLogin($email,$password);\n if($tryLoginUser->isExists())\n {\n //get the current event if exist\n $event = TryFetchUserEvent::FetchById($eventid);\n if($event!=null){\n \n //set the event properties to the new added informations\n $eventObject= $this->parserEventJson(json_encode($event));\n if($eventObject!=null){\n \n $eventObject->setTitle($title);\n $eventObject->setId($eventid);\n $eventObject->setVenue($venue); \n $eventObject->setType($privacy); \n \n //validate to match such the date send is current\n if($this->validateEvent($eventObject))\n {\n //update the vent\n $tryUpdateEvent = new TryUpdateUserEvent($eventObject);\n $status= $tryUpdateEvent->update();\n if($status){\n $response[\"success\"]=1;\n $response[\"message\"]=\"Event Updated\";\n \n }else{\n $response[\"message\"]=\"There was error when trying to update event\";\n }\n }else{\n $response[\"error_message\"]=$this->__message; \n } \n }\n \n }else{\n $response[\"error_message\"]=\"Know event with the given information\"; \n } \n //exist\n\n }else{\n $response[\"error_message\"]=\"Unknown user request...\";\n }\n \n \n $jsonView = new JsonViewer();\n $jsonView->setContent($response);\n return $jsonView;\n }" ]
[ "0.73612994", "0.6821884", "0.6562233", "0.6452065", "0.64265007", "0.6362201", "0.6313415", "0.6226509", "0.6219833", "0.60943675", "0.6045985", "0.6031974", "0.6031974", "0.6027522", "0.5991147", "0.5972692", "0.59578246", "0.59480345", "0.59453034", "0.59413856", "0.5924573", "0.59210736", "0.5906127", "0.58821946", "0.58794975", "0.58515316", "0.58504605", "0.5848199", "0.58480036", "0.584564", "0.58452433", "0.58452433", "0.58313054", "0.58188504", "0.58002126", "0.57887113", "0.57680106", "0.5749245", "0.57330954", "0.5721358", "0.5718621", "0.57179826", "0.5710528", "0.5710528", "0.5707028", "0.5707028", "0.5703953", "0.569939", "0.56960404", "0.5687183", "0.5678702", "0.56770116", "0.56748253", "0.5670351", "0.56577086", "0.5657707", "0.56545717", "0.5649456", "0.5639158", "0.56344634", "0.5629755", "0.5626197", "0.5614427", "0.5613854", "0.5613854", "0.56092495", "0.5602793", "0.5601443", "0.5601411", "0.5598476", "0.5593626", "0.557799", "0.55763507", "0.55632204", "0.5563054", "0.5557327", "0.5554806", "0.5551512", "0.55503684", "0.5548486", "0.55478865", "0.55457157", "0.5542875", "0.55411893", "0.55397666", "0.5539407", "0.5538849", "0.5536886", "0.55366635", "0.55331486", "0.55328536", "0.55283105", "0.55267864", "0.5526217", "0.55252415", "0.5522929", "0.5519219", "0.5519176", "0.55135715", "0.55106884" ]
0.8108941
0
Test case for webinars List Webinars.
Тест-кейс для вебинаров Список вебинаров.
public function testWebinars() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarPanelists()\n {\n }", "public function testListPastWebinarQA()\n {\n }", "public function list_wilayah()\n\t{\n\t\tif($this->is_login){\n\t\t\t$products = $this->M_region->getAll();\n\t\t\t// Set Response\n\t\t\t$this->response_code = 200;\n\t\t\t$this->response['status'] = TRUE;\n\t\t\t$this->response['data'] = $products;\n\t\t}\n\n\t\t// Run the Application\n\t\t$this->run(SECURED);\n\t}", "public function testListSites()\n {\n }", "public function testIndex()\n {\n $client = static::createClient();\n $crawler = $client->request('GET', '/');\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $this->assertCount(1, $crawler->filter('h1'));\n $this->assertEquals(1, $crawler->filter('html:contains(\"Trick List\")')->count());\n }", "function getAllWebinars($parameters = null)\n {\n $path = $this->getPathRelativeToOrganizer('webinars');\n\n return $this->sendRequest('GET', $path, $parameters, $payload = null);\n }", "function citrixonline_get_list_of_webinars($type = 0) \n {\n\t\tif(!$this->organizer_key or !$this->access_token)\n\t\t\treturn 0;\n\t\t\t\n\t\t$return_array = array();\n\t\t\n\t\t$reponse = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/upcomingWebinars?oauth_token=\".$this->access_token), true);\n\t\t\n\t\tif(isset($reponse['int_err_code']) and $reponse['int_err_code'] != '')\n\t\t{\n\t\t\t$this->set_access_token('');\n\t\t\t$this->set_organizer_key('');\t\t\t\t\n\t\t\tthrow new Exception($reponse['int_err_code']);\n\t\t}\n\t\t\n\t\t$return_array['upcoming']['webinars'] = $reponse;\n $return_array['upcoming']['status'] = true;\n\t\t\n\t\tif($type>0)\n\t\t{\n\t\t\t$reponse = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/historicalWebinars?oauth_token=\".$this->access_token), true);\n\t\t\t\t\t\t\n\t\t\tif(isset($reponse['int_err_code']) and $reponse['int_err_code'] != '')\n\t\t\t{\n\t\t\t\t$this->set_access_token('');\n\t\t\t\t$this->set_organizer_key('');\t\t\t\t\n\t\t\t\tthrow new Exception($reponse['int_err_code']);\n\t\t\t}\n\t\t\t\n\t\t\t$return_array['historical']['webinars'] = $reponse;\n\t\t\t$return_array['historical']['status'] = true;\n\t\t}\n\t\t\t\n return $return_array;\n\t}", "public function testListPastWebinarPollResults()\n {\n }", "public function testList()\n {\n $this->visit('/admin/school')\n ->see(SchoolCrudController::SINGLE_NAME);\n }", "public function guest_can_get_all_websites() {\n $response = $this->get('api/websites');\n $response->assertStatus(200);\n }", "public function testWebinarPanelistCreate()\n {\n }", "public function testListSiteContainers()\n {\n }", "public function testIndex()\n {\n // full list\n $response = $this->get(url('api/genre?api_token=' . $this->api_token));\n $response->assertStatus(200);\n $response->assertSeeText('Thriller');\n $response->assertSeeText('Fantasy');\n $response->assertSeeText('Sci-Fi');\n }", "public function test_list_how_do_you_hears()\n {\n $data = factory(HowDoYouHear::class)->create();\n $response = $this->get($this->url, $this->headers());\n $response->assertStatus(200);\n $response->assertJsonStructure(array_keys($data->toarray()), $data->toarray());\n $this->assertDatabaseHas($this->table, $data->toarray());\n }", "public function listing();", "function getUpcomingWebinars()\n {\n $path = $this->getPathRelativeToOrganizer('upcomingWebinars');\n\n return $this->sendRequest('GET', $path, $parameters = null, $payload = null);\n }", "public function testIndex()\n {\n $this->getBrowser()->\n getAndCheck('partenaire', 'index', '/partenaire/index', 404)\n ;\n }", "public function test_show_list_of_products()\n {\n $response = $this->getJson('/api/products');\n $response->assertStatus(200);\n }", "public function listar() {\n \t$lista_webs = Web::all();\n \treturn view('webs')\n \t\t->with('lista_webs',$lista_webs);\n }", "protected function _getLists() {\n\t\t/** @var Thrive_Dash_Api_WebinarJamStudio $api */\n\t\t$api = $this->getApi();\n\t\ttry {\n\t\t\t$lists = array();\n\t\t\t$webinars = $api->getUpcomingWebinars();\n\t\t\tforeach ( $webinars as $key => $item ) {\n\t\t\t\t$lists [] = array(\n\t\t\t\t\t'id' => $item['webinar_id'],\n\t\t\t\t\t'name' => $item['name']\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn $lists;\n\t\t} catch ( Thrive_Dash_Api_WebinarJamStudio_Exception $e ) {\n\t\t\t$this->_error = $e->getMessage();\n\n\t\t\treturn false;\n\t\t}\n\n\t}", "public function testGetAll()\n {\n $ret =\\App\\Providers\\ListsServiceProvider::getLists();\n \n $this->assertNotEmpty($ret);\n }", "function testListBuckets() {\n $this->get('/');\n $this->assertEqual(api_response::getInstance()->getCode(), 200);\n $this->assertText('/buckets/bucket[@id=\"test\"]/@id', 'test');\n }", "public function test_list()\n {\n $response = $this->get('/api/employees');\n\n $response->assertStatus(200);\n }", "public function testIndexTahun()\n\t{\n\t\t$response = $this->action('GET', 'TahunController@index');\n\t}", "public function testListPastWebinarFiles()\n {\n }", "private static function removeAllTestingWebinars(): void\n {\n foreach (self::$driverHandler->getWebinars() as $webinar) {\n if (str_starts_with($webinar->slug, 'test-')) {\n self::$driverHandler->removeWebinar($webinar->id);\n }\n }\n }", "public function testWebinarPolls()\n {\n }", "public function test_listIndexAction ( )\n {\n $params = array(\n 'event_id' => 1,\n 'action' => 'list',\n 'controller'=> 'scales',\n 'module' => 'default'\n );\n\n $urlParams = $this->urlizeOptions($params);\n $url = $this->url($urlParams);\n $this->dispatch($url);\n\n // assertions\n $this->assertModule($urlParams['module']);\n $this->assertController($urlParams['controller']);\n $this->assertAction($urlParams['action']);\n\n }", "public function testListPagination()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs(User::find(1))\n ->visit('admin/users')\n ->assertSee('Users Gestion')\n ->clickLink('3')\n ->assertSee('GreatRedactor');\n });\n }", "public function getMagentoWebsites();", "function GetWebPanelList()\n\t{\n\t\t$result = $this->sendRequest(\"GetWebPanelList\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "function testgetHyperLinks() {\n //Setup \n $pageTest = new INM5001A13_WebTools(\"http://localhost/EquipeRene/Snippets/pagePourTestUnitaireWebTool.html\");\n\n $resultat = $pageTest->getHyperLinks();\n\n\n $this->assertEquals($resultat[\"http://google.ca\"], 'Search GGxxGLE');\n }", "public function testListaProdutoTest()\n {\n $response = $this->get('/pedidos');\n $response->assertStatus(200);\n\n }", "public function testListingWithFilters()\n {\n $filters[] = ['limit' => 30, 'page' => 30];\n $filters[] = ['listing_type' => 'public'];\n foreach ($filters as $k => $v) {\n $client = static::createClient();\n $client->request('GET', '/v2/story', $v, [], $this->headers);\n $this->assertStatusCode(200, $client);\n\n $response = json_decode($client->getResponse()->getContent(), true);\n $this->assertTrue(is_array($response));\n }\n }", "public function testList()\n {\n //Tests all products\n $this->clientAuthenticated->request('GET', '/product/list');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('productId', $first);\n\n //Tests all products linked to a child\n $this->clientAuthenticated->request('GET', '/product/list/child/1');\n $response = $this->clientAuthenticated->getResponse();\n $content = $this->assertJsonResponse($response, 200);\n $this->assertInternalType('array', $content);\n $first = $content[0];\n $this->assertArrayHasKey('productId', $first);\n }", "public function apiList();", "function loadUsersListPage()\n {\n $this->get('/usuarios')\n ->assertStatus(200)\n ->assertSee('Listado de usuarios')\n ->assertSee('Javier')\n ->assertSee('Francisco');\n }", "public function test_rangLista()\n\t{\n\t\t$output = $this->request('GET', ['UserController','rangLista']);\n\t\t$this->assertContains('<h3 class=\"text-center text-dark\"><i>Običan korisnik -> Rang lista</i></h3>\t', $output);\n\t}", "public function testListProduk()\n {\n $response = $this->getJson('/produk', [\n ]);\n $response->dump();\n $response->assertStatus(200);\n }", "public function testGetBrandsUsingGET()\n {\n }", "public function index()\n {\n // Get all of the wishlists from the database, and return them as JSON data\n $wishlists = Wishlist::with(['wishitems'])->get();\n return response($wishlists, 200)\n ->header('Content-Type', 'application/json');\n }", "public function testFindAllByRoute()\n {\n $this->markTestIncomplete('WebTestCases are not implemented yet.');\n }", "public function listsList()\n {\n\tthrow new Exception('Not implemented');\n }", "public function testWebSearchForSite()\n {\n $webResultSet = $this->_yahoo->webSearch('php', ['site' => 'www.php.net']);\n\n $this->assertTrue($webResultSet instanceof Zend_Service_Yahoo_WebResultSet);\n\n $this->assertTrue($webResultSet->totalResultsAvailable > 10);\n $this->assertEquals(10, $webResultSet->totalResultsReturned);\n $this->assertEquals(10, $webResultSet->totalResults());\n $this->assertEquals(1, $webResultSet->firstResultPosition);\n\n foreach ($webResultSet as $webResult) {\n $this->assertTrue($webResult instanceof Zend_Service_Yahoo_WebResult);\n }\n }", "public function testDashboardGet()\n {\n $this->visit('/dashboard/articless')\n ->see('Nieuws');\n }", "public function getServerList() {}", "public function testListServers()\n {\n }", "public function test_list()\n {\n $response = $this->get('/proposal/all');\n\n $response->assertSee('data-js-proposal-cards');\n\n $response->assertSee('card-header');\n\n $response->assertStatus(200);\n }", "function index() {\n\t\t$this->show_list();\n\t}", "public function testIndex()\n\t{\n\t\t$data = [];\n\n\t\tforeach ($this->saddles as $saddle) {\n\t\t\t$data[] = [\n\t\t\t\t'id' => $saddle->id,\n\t\t\t\t'name' => $saddle->name,\n\t\t\t\t'horse' => [\n\t\t\t\t\t'id' => $saddle->horse->id,\n\t\t\t\t\t'stable_name' => $saddle->horse->stable_name,\n\t\t\t\t],\n\t\t\t\t'brand' => [\n\t\t\t\t\t'id' => $saddle->brand->id,\n\t\t\t\t\t'name' => $saddle->brand->name,\n\t\t\t\t],\n\t\t\t\t'style' => [\n\t\t\t\t\t'id' => $saddle->style->id,\n\t\t\t\t\t'name' => $saddle->style->name,\n\t\t\t\t],\n\t\t\t\t'type' => $saddle->type,\n\t\t\t\t'serial_number' => $saddle->serial_number,\n\t\t\t\t'created_at' => $saddle->created_at->format('d/m/Y'),\n\t\t\t];\n\t\t}\n\n\t\t$this->actingAs($this->admin, 'api')\n\t\t\t ->get('/api/v1/admin/saddles?per_page=9999')\n\t\t\t ->assertStatus(200)\n\t\t\t ->assertJson(['data' => $data]);\n\t}", "public function testIndex()\n {\n // $this->assertTrue(true);\n $response = $this->json('get','/api/todos');\n $this->seeJsonStructure($response, [\n '*' => [\n 'id', 'status', 'title', 'created_at', 'updated_at'\n ]\n ]);\n }", "public function index()\n {\n //\n //$warehouses = Warehouse::paginate(10);\n //return WarehouseResource::collection($warehouses);\n return Warehouse::all();\n }", "public function test_admin_tribe_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Assignments', 'tribe_list']);\n $this->assertResponseCode(404);\n }", "public function list();", "public function list();", "public function list();", "public function _testMultipleInventories()\n {\n\n }", "public function show(web $web)\n {\n //\n }", "public function test_index()\n {\n Instrument::factory(2)->create();\n $response = $this->get('instrument');\n $response->assertStatus(200);\n }", "public function testWebinarPollGet()\n {\n }", "public function test_all_movies_list_should_be_accessible()\n {\n $response=$this->get(route('index.movies'));\n $response->assertStatus(Response::HTTP_OK);\n }", "public function testGetListActionWithToken()\n {\n // Get an authenticated client\n $client = $this->createAuthenticatedClient('sjouan', '1GreatP@ssword');\n // Test the route\n $client->request('GET', '/api/products');\n\n // Check the response\n $this->assertSame(Response::HTTP_OK, $client->getResponse()->getStatusCode());\n // asserts that the response status code is 2xx\n $this->assertTrue($client->getResponse()->isSuccessful(), 'response status is 2xx');\n }", "public function testGetSuppliersUsingGET()\n {\n }", "public function browseAction() {\n $this->validateRequestMethod();\n // Prepare the response\n $params = $response = array();\n $params = $this->_getAllParams();\n Engine_Api::_()->getApi('Core', 'siteapi')->setView();\n\n //GET PAGINATOR\n $params['pagination'] = 1;\n $paginator = Engine_Api::_()->getDbtable('wishlists', 'sitereview')->getBrowseWishlists($params);\n $page = $this->_getParam('page', 1);\n $limit = $this->_getParam('limit', 20);\n $paginator->setItemCountPerPage($limit);\n $paginator->setCurrentPageNumber($page);\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n\n $totalItemCount = $paginator->getTotalItemCount();\n $totalPages = ceil(($totalItemCount) / $limit);\n $response['totalItemCount'] = $totalItemCount;\n if (!empty($totalItemCount)) {\n foreach ($paginator as $wishlistObj) {\n $wishlist = $wishlistObj->toArray();\n if (isset($wishlist['body']) && !empty($wishlist['body']))\n $wishlist['body'] = strip_tags($wishlist['body']);\n $lists = $wishlistObj->getWishlistMap(array('orderby' => 'listing_id'));\n $count = $lists->getTotalItemCount();\n $tempListings = array();\n $counter = 0;\n if (_ANDROID_VERSION >= '1.8.6' || _IOS_VERSION >= '1.8.0') {\n if (empty($count) || !isset($count) || $count == 0) {\n $tempListings['images_' . $counter] = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($wishlistObj);\n } else {\n foreach ($lists as $listings) {\n if ($counter >= 3)\n break;\n else {\n $counter++;\n $tempListings['images_' . $counter] = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($listings);\n }\n }\n }\n } else {\n if (empty($count) || !isset($count) || $count == 0) {\n $tempListings['listing_images_' . $counter] = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($wishlistObj);\n } else {\n foreach ($lists as $listings) {\n if ($counter >= 3)\n break;\n else {\n $counter++;\n $tempListings['listing_images_' . $counter] = Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($listings);\n }\n }\n }\n }\n $wishlist = array_merge($wishlist, $tempListings);\n $check_availability = Engine_Api::_()->sitereview()->check_availability('sitereview_wishlist', $wishlistObj->wishlist_id);\n $checkFollowAvailablity = $wishlistObj->follows()->isFollow($viewer);\n $tempMenu = array();\n if (!empty($viewer_id)) {\n if (empty($check_availability)) {\n $wishlist['isLike'] = 0;\n $tempMenu[] = array(\n 'name' => 'like',\n 'label' => $this->translate('Like'),\n 'url' => '/like',\n 'urlParams' => array(\n \"subject_type\" => 'sitereview_wishlist',\n 'subject_id' => $wishlistObj->getIdentity()\n )\n );\n } else {\n $wishlist['isLike'] = 1;\n $tempMenu[] = array(\n 'name' => 'like',\n 'label' => $this->translate('Unlike'),\n 'url' => '/unlike',\n 'urlParams' => array(\n \"subject_type\" => 'sitereview_wishlist',\n 'subject_id' => $wishlistObj->getIdentity()\n )\n );\n }\n\n if (!empty($checkFollowAvailablity)) {\n $wishlist['followed'] = 1;\n $tempMenu[] = array(\n 'name' => 'follow',\n 'label' => $this->translate('Unfollow'),\n 'url' => '/listings/wishlist/follow/' . $wishlistObj->getIdentity(),\n 'urlParams' => array()\n );\n } else {\n $wishlist['followed'] = 0;\n $tempMenu[] = array(\n 'name' => 'follow',\n 'label' => $this->translate('Follow'),\n 'url' => '/listings/wishlist/follow/' . $wishlistObj->getIdentity(),\n 'urlParams' => array()\n );\n }\n\n $wishlist['gutterMenu'] = $tempMenu;\n }\n $tempResponse[] = $wishlist;\n }\n }\n if (!empty($viewer_id)) {\n $level_id = $viewer->level_id;\n } else {\n $level_id = Engine_Api::_()->getDbtable('levels', 'authorization')->fetchRow(array('type = ?' => \"public\"))->level_id;\n }\n $can_create = ($viewer_id) ? 1 : 0;\n $response['canCreate'] = $can_create;\n if (!empty($tempResponse))\n $response['response'] = $tempResponse;\n $this->respondWithSuccess($response, true);\n }", "public function testWebinarPanelistsDelete()\n {\n }", "function listing() {\r\n\r\n }", "public function testIndex(): void\n {\n $response = $this\n ->actingAs($this->user)\n ->get('/');\n $response->assertViewIs('home');\n $response->assertSeeText('Сообщения от всех пользователей');\n }", "public function testListExperts()\n {\n }", "public function testListSiteMemberships()\n {\n }", "public function lister()\r\n {\r\n }", "public function test_list_of_resource()\n {\n $response = $this->artisan('resource:list');\n $this->assertEquals(0, $response);\n }", "public function testIndexRouteIsWorking()\n {\n $client = static::createClient();\n $client->request('GET', '/');\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $this->assertSelectorExists('.profit_amount');\n $this->assertSelectorTextContains('.navbar-brand', 'Margin Calculator');\n\n return null;\n }", "public function testListQrcodes()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs($this->user)\n ->visit('/admin')\n ->clickLink('Qrcodes')\n ->assertPathIs('/admin/qrcodes')\n ->assertSee('List Qrcodes');\n });\n }", "public function testIndexAction()\n {\n// $this->logInAsSuperAdmin();\n\n $crawler = $this->client->request('GET', '/admin/dashboard');\n\n $this->assertTrue($this->client->getResponse()->isSuccessful());\n $this->assertEquals(1, $crawler->filter('h2:contains(\"Tableau de bord\")')->count());\n }", "public function listsWhostageget()\r\n {\r\n $response = Whostage::all();\r\n return response()->json($response,200);\r\n }", "public function testAllManufacturerUrls()\n {\n $this->loginAsMeatManufacturer();\n\n $testUrls = [\n $this->Slug->getManufacturerMyOptions(),\n $this->Slug->getMyDepositList(),\n $this->Slug->getMyStatistics(),\n $this->Slug->getManufacturerProfile(),\n $this->Slug->getProductAdmin(),\n $this->Network->getSyncProductData(),\n $this->Network->getSyncProducts()\n ];\n\n $this->assertPagesForErrors($testUrls);\n\n $this->logout();\n }", "public function testWebinar()\n {\n }", "public function testListarProdutos()\n {\n $response = $this->get('/api/produtos/listar');\n\n $response->assertStatus(200);\n }", "public function testIndex()\n {\n $this->browse(function (Browser $browser) {\n $bill_1 = Bill::factory()->create(['contract_id' => $this->contract->id, 'tenant_id' => $this->tenant->id]);\n $bill_2 = Bill::factory()->create(['contract_id' => $this->contract->id, 'tenant_id' => $this->tenant->id]);\n\n $browser->loginAs($this->user)\n ->visit('/tenants/'.$this->tenant->id.'?tab=bills#tab')\n ->assertSee($bill_1->number)\n ->assertSee($bill_2->number);\n });\n }", "public function test_list_stores_url()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs($this->user)\n ->visit(new ListStores());\n });\n }", "public function listAction() {}", "public function testIndex()\n\t{\n\t\t// correct route for posts\n\t\t$this->call('GET', '/api/posts');\n\t}", "public function webIndex()\n {\n $data['roles'] = Role::where('guard_name','web')->paginate(10);\n $data['title'] = 'Available Roles for Web';\n\n if (View::exists('roles.index')) {\n return view('roles.index', $data);\n } else {\n return view('laravel-permission::roles.index', $data);\n }\n }", "public function test_admin_squad_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Assignments', 'squad_list']);\n $this->assertResponseCode(404);\n }", "public function testAllProductsList()\n {\n $response = $this->runApp('GET', '/v1/products?password=' . $this->apiPassword);\n\n $this->assertEquals(StatusCode::HTTP_OK, $response->getStatusCode());\n $result = (array)json_decode($response->getBody())->result;\n $this->assertEquals(count($result), 100);//default 100 products in db\n }", "public function testIndex()\n\t{\n\t\t$client = static::createClient();\n\n\t\t$crawler = $client->request('GET', '/');\n\n\t\t$this->assertEquals(200, $client->getResponse()->getStatusCode());\n\t}", "public function test_shows_skills_list()\n {\n factory(Skill::class)->create(['name' => 'PHP']);\n factory(Skill::class)->create(['name' => 'JS']);\n factory(Skill::class)->create(['name' => 'SQL']);\n\n $this->get('/habilidades')\n \t\t ->assertStatus(200)\n \t\t ->assertSeeInOrder([\n \t\t \t'JS',\n \t\t \t'PHP',\n \t\t \t'SQL'\n \t\t ]);\n }", "public function web();", "public function index()\n {\n $data['webpages'] = WebPage::orderBy('id', 'desc')->paginate(10);\n\n return view('webpage.list', $data);\n }", "public function index()\n {\n // CHANGED TO FRONTENDCONTROLLER@HOMEPAGE\n\n $client = new Client(['base_uri' => 'http://www.mocky.io/v2/']);\n $response = $client->request('GET', '5c67eb6b3800002615b100ff');\n if($response->getStatusCode() == 200){\n $allergens = json_decode($response->getBody()->getContents())->items;\n }\n //send list of allergens to frontend\n dd($allergens);\n }", "public function testInitCleanHTML()\n {\n new DomainList();\n }", "public function testListServer()\n {\n }", "public function listAction()\n {\n // some logic\n }", "public function testWebinarPanelistDelete()\n {\n }", "public function testIndex(){\r\n\t\t$destino = Enhance::getCodeCoverageWrapper('EventosControllerClass');\r\n\t\t$destino->index();\r\n\t\t$this->call('GET', 'admin');\r\n\t\t$this->assertResponseOk();\r\n\t}", "public function testIndex()\n {\n // serializing it back in indexAction().\n $client = new Client('http://svsjbshc1.stg.allegiantair.com:8580');\n $request = $client->get(\n 'otares/v2/api/lookups/CustomerRole'\n );\n\n $response = $request->send();\n $initialResult = $response->getBody(true);\n\n $client = static::createClient();\n $client->request(\n 'GET',\n 'customer-role',\n array(),\n array(),\n array('CONTENT_TYPE' => 'application/json')\n );\n\n $processedResult = $client->getResponse()->getContent();\n\n $this->assertJsonStringEqualsJsonString(\n $initialResult,\n $processedResult\n );\n\n $this->assertEquals(200, $response->getStatusCode());\n }", "public function testListIdentities()\n {\n }", "public function testListIdentities()\n {\n }", "public function testWebinarStatus()\n {\n }", "public function getViewWarehouseList();" ]
[ "0.635775", "0.6300158", "0.6266826", "0.61853427", "0.6053846", "0.5991229", "0.59525377", "0.59223324", "0.5878913", "0.5813563", "0.5790048", "0.57246953", "0.5714969", "0.5712513", "0.56930894", "0.5674928", "0.5632804", "0.5627633", "0.5627321", "0.56119186", "0.559497", "0.55930626", "0.55845904", "0.55688286", "0.5553756", "0.55341005", "0.5530284", "0.5523856", "0.55195713", "0.5516311", "0.5511735", "0.5501357", "0.5493221", "0.5465281", "0.5450625", "0.5446986", "0.5445108", "0.54348856", "0.54337084", "0.5423535", "0.5418711", "0.5415779", "0.5385932", "0.5377176", "0.53720254", "0.53719234", "0.5365518", "0.53632176", "0.5362812", "0.5337342", "0.5333619", "0.5330253", "0.5325894", "0.5317813", "0.5317813", "0.5317813", "0.53163445", "0.53092164", "0.5302191", "0.5301722", "0.53016657", "0.5291455", "0.5287518", "0.5275879", "0.5274605", "0.5261326", "0.52573377", "0.52570623", "0.52526015", "0.5250963", "0.5250002", "0.52493185", "0.5239685", "0.5238256", "0.5229972", "0.5229695", "0.52267694", "0.52224064", "0.5220437", "0.52195305", "0.52168083", "0.5216212", "0.5214993", "0.52145296", "0.5210848", "0.5204256", "0.5202572", "0.51891154", "0.51872253", "0.5183883", "0.51810896", "0.51808506", "0.5177136", "0.5176728", "0.51723766", "0.51707673", "0.51525456", "0.51525456", "0.51506156", "0.5148257" ]
0.7002258
0
Test for Directory::factory() The directory doesn't exist. Throws Kaili\DirectoryException because the provided directory doesn't exist.
Тест для Directory::factory() Директория не существует. Выбрасывается исключение Kaili\DirectoryException, поскольку предоставленная директория не существует.
public function test_factory_not_exist() { Directory::factory(ROOT.DS.'test_dir'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function should_throw_if_trying_to_build_on_non_existing_directory(): void\n {\n $this->expectException(\\InvalidArgumentException::class);\n new DirectorySnapshot(__DIR__ . '/not-existing');\n }", "private function ensureDirectory() {\n\t\tif (!is_dir($this -> directory)) {\n\t\t\tif (!mkdir($this -> directory)) {\n\t\t\t\tthrow new LatexException('Could not create directory ' . $this -> directory);\n\t\t\t}\n\t\t}\n\t}", "function createDirectoryIfNonExistent() {\n if (! file_exists($this->path)) {\n mkdir($this->path);\n }\n }", "private function createDir()\n {\n if ($this->dirCreated) {\n return;\n }\n\n $dir = $this->getDirFromStream($this->url);\n if (null !== $dir && !is_dir($dir)) {\n $this->errorMessage = null;\n set_error_handler(array($this, 'customErrorHandler'));\n $status = mkdir($dir, 0777, true);\n restore_error_handler();\n if (false === $status) {\n throw new \\UnexpectedValueException(sprintf('There is no existing directory at \"%s\" and its not buildable: '.$this->errorMessage, $dir));\n }\n }\n $this->dirCreated = true;\n }", "private function check_directory()\n\t{\n\t\tif (!is_dir(Kohana::config($this->type.'.cache_folder')))\n\t\t\tmkdir(Kohana::config($this->type.'.cache_folder'));\n\t}", "public function testInvalidArgumentExceptionIsThrownIfDirectoryIsNotReadableWhenCreatingProcedureLoader()\n {\n $this->setExpectedException('\\InvalidArgumentException');\n\n $procedureFactory = $this->getProcedureFactory();\n\n $procedureLoaderFactory = $this->getProcedureLoaderFactory($procedureFactory);\n $procedureLoaderFactory->createProcedureLoader('invalid/directory');\n }", "public function test_create_exists()\n {\n Directory::create(ROOT.DS.'application');\n }", "public function testOnNewDirectoryWithIllegalArgumentException() {\n\n $obj = new FileSystemStorageProvider($this->logger, $this->directory);\n\n try {\n\n $obj->onNewDirectory($this->doc1);\n } catch (Exception $ex) {\n\n $this->assertInstanceOf(IllegalArgumentException::class, $ex);\n $this->assertEquals(\"The document must be a directory\", $ex->getMessage());\n }\n }", "public function testCreateSubDirsWithExistingDirectory()\n {\n mkdir($this->dir.'56');\n $this->assertNotEmpty($this->hd->getHash());\n }", "protected function createDirectory() {}", "protected function isDirectory() {}", "public function testExists() {\n $testDirName = self::TEST_DIR . '/testExists';\n\n $handle = (new Directory($testDirName));\n\n mkdir($testDirName);\n $this->assertTrue($handle->exists());\n\n rmdir($testDirName);\n $this->assertFalse($handle->exists());\n }", "public function testLoadThrowsDataDirectoryNotFoundForNonExistingDir(): void\n {\n $dirname = 'nonexistent';\n $path = $this->getFullPath($dirname);\n $this->expectException(DataDirectoryNotFoundException::class);\n $this->expectExceptionExactMessage(\"Root folder $path was not found.\");\n\n $directoryDataLoader = $this->prepareDirectoryDataLoader();\n\n $directoryDataLoader->load($path, '/^.*\\..*$/');\n }", "public function testMakeDirectory()\n {\n $this->assertTrue(Storage::mkdir(self::$temp.DS.'created'));\n $this->assertTrue(is_dir(self::$temp.DS.'created'));\n }", "public function test_move_directory_exists()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT, false);\n }", "public function testEnsureExists() {\n $testDirName = self::TEST_DIR . '/testEnsureExists';\n\n (new Directory($testDirName))->ensureExists();\n\n $this->assertDirectoryExists($testDirName);\n }", "public function createDirectoriesIfTheyDontExist()\n\t{\n\t\t$directories = array(\n\t\t\t$this->getIntegrationDirectory(),\n\t\t\t$this->getProductsProcessingDirectory(),\n\t\t\t$this->getProductsProcessedDirectory(),\n\t\t\t$this->getStockProcessingDirectory(),\n\t\t\t$this->getStockProcessedDirectory()\n\t\t);\n\t\tforeach ($directories as $directory){\n\t\t\tif(!file_exists($directory)){\n\t\t\t\tmkdir($directory);\n\t\t\t}\n\t\t}\n\t}", "function mdl_create_directory_if_not_exists(string $dirname)\n{\n // Create the path directory if not exists\n if (!is_dir($dirname)) {\n mkdir($dirname, 0777, true);\n }\n}", "public function test_move_not_exists_dir()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT.DS.'not_exist');\n }", "public function testEmptyDirectory()\n {\n $directory = vfsStream::url('foo');\n $method = $this->makeMethodPublic('empty_directory');\n $method->invokeArgs($this->testModel, [$directory]);\n \n $this->assertFalse($this->mockFileUploadDir->hasChild('bar'));\n $this->assertFileExists(vfsStream::url('foo'));\n }", "protected static function checkForDirectoryToBeExisting($directory) {\n\t\tif (!file_exists($directory)) {\n\t\t\tthrow new Exception($directory . ' is not existing! 1287234117');\n\t\t}\n\t}", "public function testCreateDataCollectionFailsBecauseOfEmptyDirectory(): void\n {\n $path = __DIR__ . '/../../../fixtures/empty-directory';\n\n $this->expectException(RuntimeException::class);\n $this->expectExceptionMessage(sprintf('Directory \"%s/browsers\" was empty.', $path));\n\n $this->object->createDataCollection($path);\n }", "public function testDeleteDirectoryReturnFalseWhenNotADirectory()\n {\n mkdir(self::$temp.DS.'bar');\n file_put_contents(self::$temp.DS.'bar'.DS.'file.txt', 'Hello World');\n\n $this->assertFalse(Storage::rmdir(self::$temp.DS.'bar'.DS.'file.txt'));\n }", "public function testLoadThrowsDataDirectoryNotFoundForNonReadableDirectory(): void\n {\n $dirname = 'forbidden';\n $this->addDirectoryToVFS($dirname, 0);\n $path = $this->getFullPath($dirname);\n $this->expectException(DataDirectoryNotFoundException::class);\n $this->expectExceptionExactMessage(\"Root folder $path was not found.\");\n\n $directoryDataLoader = $this->prepareDirectoryDataLoader();\n\n $directoryDataLoader->load($path, '/^.*\\..*$/');\n }", "public function createDirectory($directory = null)\n {\n if (!empty($directory) && !file_exists($directory)) {\n if (!mkdir($directory, 0755, true)) {\n throw new \\Exception('Unable to create directory: ' . $directory);\n }\n }\n return $directory;\n }", "function check_directory($directory)\n{\n if (!Storage::exists($directory)) {\n Storage::makeDirectory($directory);\n }\n\n return $directory;\n}", "private function checkDirectory($directory, Output $output = null)\n {\n if (!is_dir($directory)) {\n if ($output != null) {\n $output->writeNewLine();\n $output->writeLine(\"Invalid folder ($directory) is given.\");\n $output->writeNewLine();\n }\n\n throw new \\Exception(\"Invalid folder ($directory) is given.\");\n }\n }", "public function testCacheFileDoesNotExistsAndDirectoryIsNotWritable()\n {\n $cacheFile = __DIR__ . '/non-writable-directory/router.cache';\n\n $this->expectException(RuntimeException::class);\n $this->expectExceptionMessage(sprintf(\n 'Route collector cache file directory `%s` is not writable',\n dirname($cacheFile)\n ));\n\n $responseFactoryProphecy = $this->prophesize(ResponseFactoryInterface::class);\n $callableResolverProphecy = $this->prophesize(CallableResolverInterface::class);\n\n $routeCollector = new RouteCollector($responseFactoryProphecy->reveal(), $callableResolverProphecy->reveal());\n $routeCollector->setCacheFile($cacheFile);\n }", "public function checkDir($directory)\n {\n if (!is_dir($directory)) {\n //Directory does not exist, so lets create it.\n mkdir($directory, 0755, true);\n }\n\n }", "public function testTypeIdentifiesDirectory()\n {\n mkdir(self::$temp.DS.'foo-dir');\n\n $this->assertSame('dir', Storage::type(self::$temp.DS.'foo-dir'));\n }", "public function testCreateDataCollectionThrowsExceptionOnInvalidDirectory(): void\n {\n $collection = $this->getMockBuilder(DataCollection::class)\n ->disableOriginalConstructor()\n ->getMock();\n\n $property = new ReflectionProperty($this->object, 'collection');\n $property->setValue($this->object, $collection);\n\n $this->expectException(RuntimeException::class);\n $this->expectExceptionMessage('Directory \"./platforms\" does not exist.');\n\n $this->object->createDataCollection('.');\n }", "protected function checkDirectory()\n {\n $directoryPath = $this\n ->directory\n ->getDirectoryPath();\n\n if (!is_dir($directoryPath)) {\n\n mkdir($directoryPath);\n }\n\n return $this;\n }", "private function dirIsValid() {\n return is_dir($this->directory);\n }", "public function createDirectoriesIfTheyDontExist()\n {\n $directories = array(\n $this->getNewSitemapPath(),\n $this->getExistingSitemapPath()\n );\n foreach ($directories as $directory){\n if(!file_exists($directory)){\n mkdir($directory);\n }\n }\n }", "public function canNotOpenDirectory()\n {\n $this->assertFalse(@dir(vfsStream::url('foo')));\n }", "public function testLoadThrowsDataDirectoryNotFoundForFileInsteadOfDirectory(): void\n {\n $filename = 'accessible.json';\n $this->addFileToVFS($filename);\n $path = $this->getFullPath($filename);\n $this->expectException(DataDirectoryNotFoundException::class);\n $this->expectExceptionExactMessage(\"Root folder $path was not found.\");\n\n $directoryDataLoader = $this->prepareDirectoryDataLoader();\n\n $directoryDataLoader->load($path, '/^.*\\..*$/');\n }", "public function testOnNewDirectory() {\n\n $obj = new FileSystemStorageProvider($this->logger, $this->directory);\n\n $obj->onNewDirectory($this->dir1);\n $this->assertFileExists($this->directory . \"/1\");\n\n $obj->onNewDirectory($this->dir2);\n $this->assertFileExists($this->directory . \"/1/2\");\n\n $obj->onNewDirectory($this->dir3);\n $this->assertFileExists($this->directory . \"/1/2/3\");\n }", "public function setupPath()\n {\n // if directory doesn't exist, create it\n if (!is_dir($this->path->getPath())) {\n $reporting = error_reporting();\n error_reporting(0);\n $created = mkdir($this->path->getPath(), 0755, true);\n error_reporting($reporting);\n if (!$created) {\n throw new Exception(sprintf('cant\\'t create directory: %s', $this->path->getPath()));\n }\n }\n if (!is_writable($this->path->getPath())) {\n throw new Exception(sprintf('no write permission for directory: %s', $this->path->getPath()));\n }\n }", "protected function checkFilesDir() {\n\t\t$perms = @fileperms(self::FILES_DIR);\n\t\t/* create if not exist */\n\t\tif ($perms === false) {\n\t\t\tif (!mkdir(self::FILES_DIR, 0700, true)) {\n\t\t\t\tthrow new QuicksandException(\"Cannot create files dir.\");\n\t\t\t}\n\t\t}\n\t\t/* check if dir */\n\t\telse if (($perms & 0x4000) != 0x4000) {\n\t\t\tthrow new QuicksandException(\"Files dir is not actually a directory.\");\n\t\t}\n\t\t/* check permissions */\n\t\telse if (($perms & 0700) != 0700) {\n\t\t\tthrow new QuicksandException(\"Missing permissions. Make sure this script can read, write and enter the files dir.\");\n\t\t}\n\t}", "public function ensureDirExists($dirs);", "public function testDirectoryFunctions()\n {\n $dir = 'pear-service-amazon-s3://' . $this->bucketName . '/dir';\n $this->assertFalse(file_exists($dir));\n $this->assertTrue(mkdir($dir));\n $this->assertTrue(is_dir($dir));\n $this->assertTrue(is_readable($dir));\n $this->assertTrue(is_writable($dir));\n $this->assertFalse(is_file($dir));\n $this->assertTrue(rmdir($dir));\n clearstatcache();\n $this->assertFalse(file_exists($dir));\n }", "function destinationIsValid($destination, $make = true) {\n if (file_exists($destination) AND !is_dir($destination)) {\n throw new TerminusException(\n 'Destination given is a file. It must be a directory.'\n );\n }\n\n if (!is_dir($destination)) {\n if (!$make) {\n $make = Input::confirm(\n array('message' => 'Directory does not exists. Create it now?')\n );\n }\n if ($make) {\n mkdir($destination, 0755);\n }\n }\n\n return $destination;\n}", "private function check_directory($path) {\n\t\tif (!@opendir($path)) {\n\t\t\tmkdir($path, 0755);\n\t\t} //if(!@opendir($path))\n\t\treturn;\n\t}", "function IsDirExists($dir) {\n\t\tif (!is_dir($dir)) {\n\t\t\t$msg = \"There is no Directory in this path: \";\n\t\t\techo $msg = $msg . $dir; \n\t\t}else {\n\t\t\treturn $dir;\n\t\t} \n\t}", "public function testMkdir() {\n $testDirName = self::TEST_DIR . '/testMkdir';\n\n (new Directory($testDirName))->mkdir();\n\n $this->assertDirectoryExists($testDirName);\n }", "private function mustCreateFolder(){\n }", "private static function defaultDirectory($dir){\n $dirs = array(\"controller\", \"model\");\n\n foreach ($dirs as $d){\n if(!file_exists($dir . \"/\" . $d)) {\n if (@!mkdir($dir . \"/\" . $d, 0777))//criar arquivo de log caso não crie o path\n print \"<< [create_path_\" . self::$pathName . \"] Error ao criar o diretorio << \" . self::$pathName .\"/\".$d. \" >>\\n\";\n\n }\n }\n }", "private function ensureDirectoryExists( $directory )\n\t{\n\t\t$TargetDirName = realpath( \"./\" ) . '/' . $directory;\n\t\tif( ( ! realpath( $directory ) ) &&\n\t\t\t ( ! mkdir( $TargetDirName, 0777, true ) ) )\n\t\t{\n\t\t\t;\n\t\t}\n\t}", "private function checkSaveDir()\n\t{\n\t\t// Determines the path to check:\n\t\t$path = $_SERVER['DOCUMENT_ROOT'] . $this->save_dir;\n\n\t\t// Check to see if directory exists:\n\t\tif(!is_dir($path))\n\t\t{\n\t\t\t// Check to see if directory can be made, this will also make the directory:\n\t\t\tif(!mkdir($path, 0777, TRUE))\n\t\t\t{\n\t\t\t\t// If fails, throw execption:\n\t\t\t\tthrow new Exception(\"Can't create the directory!\");\n\t\t\t\n\t\t\t}\n\t\t}\n\t}", "private function checkDir()\n {\n if (!is_dir($this->basePath)) {\n throw new InvalidArgumentException('base path: ' . $this->basePath .\n ' is not a directory or does not exist' .\n ' current working dir is ' . getcwd());\n }\n // check writable\n if (!is_writable($this->basePath)) {\n throw new InvalidArgumentException('base path: ' . $this->basePath .\n ' is not writable' .\n ' current working dir is ' . getcwd());\n }\n }", "public function hasDirectory(): bool;", "public function hasDirectory(): bool;", "protected function checkIfImagineCacheDirectoryExists(): void\n {\n $cacheDirectory = $this->kernel->getProjectDir() . '/public/media/cache';\n $fs = new Filesystem();\n if ($fs->exists($cacheDirectory)) {\n return;\n }\n try {\n $parentDirectory = mb_substr($cacheDirectory, 0, -6);\n if (!$fs->exists($parentDirectory)) {\n $fs->mkdir($parentDirectory);\n }\n $fs->mkdir($cacheDirectory);\n } catch (IOExceptionInterface $exception) {\n $request = $this->requestStack->getCurrentRequest();\n if ($request->hasSession() && $session = $request->getSession()) {\n $session->getFlashBag()->add(\n 'warning',\n $this->translator->trans(\n 'The cache directory \"%directory%\" does not exist. Please create it and make it writable for the webserver.',\n ['%directory%' => $cacheDirectory],\n 'config'\n )\n );\n }\n }\n }", "public function test_UserFileWithDrDir()\n {\n $this->setExpectedException('Q\\Exception', \"File '{$this->file}' is not a directory, but a file\");\n $config = Config::with(\"dir:mock:{$this->file}\");\n }", "function check_dir_exists($dir,$create=false) {\n\n global $CFG; \n\n $status = true;\n if(!is_dir($dir)) {\n if (!$create) {\n $status = false;\n } else {\n umask(0000);\n $status = mkdir ($dir,$CFG->directorypermissions);\n }\n }\n return $status;\n }", "private function ensureDirectory($directoryPath) {\r\n\t\tif (! is_dir ( $directoryPath )) {\r\n\t\t\t$this->logger->writeLOG( '-not already a directory ' . $directoryPath);\r\n\t\t\tif (mkdir ( $directoryPath )) {\r\n\t\t\t\t$this->logger->writeLOG( '-created directory ' . $directoryPath);\r\n\t\t\t} else {\r\n\t\t\t\t$this->logger->writeLOG( '-failed to create directory ' . $directoryPath);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->logger->writeLOG( '-existing directory ' . $directoryPath);\r\n\t\t}\r\n\t}", "protected function verifyApplicationDoesntExist($directory, OutputInterface $output)\n {\n if (is_dir($directory)) {\n throw new RuntimeException('Application already exists!');\n }\n }", "private function checkDir()\n {\n $this->init = $this->url[0].'/';\n\n for ($i=0; $i < $this->count; $i++) { \n if (is_dir($this->init)) {\n if ($i == 0) {\n $this->dir .= $this->init;\n } elseif (is_dir($this->dir.$this->url[$i])) {\n $this->dir .= $this->url[$i].'/';\n } else {\n $this->file = $this->url[$i];\n break;\n }\n } else {\n if ($i == 0) {\n $this->dir .= 'views/';\n }\n \n if (is_dir($this->dir.$this->url[$i])) {\n $this->dir .= $this->url[$i].'/';\n } else {\n $this->file = $this->url[$i];\n break;\n }\n \n }\n }\n\n $this->dir = str_replace(\"//\", \"/\", $this->dir);\n $this->checkFile();\n }", "public function createRootDirectory(DirectoryInterface $directory): DirectoryInterface;", "public static function assertIsDirectory($path) {\n if (!is_dir($path)) {\n throw new FilesystemException(\n $path,\n pht(\"Requested path '%s' is not a directory.\", $path));\n }\n }", "public function testOnDeletedDirectoryWithIllegalArgumentException() {\n\n $obj = new FileSystemStorageProvider($this->logger, $this->directory);\n\n try {\n\n $obj->onDeletedDirectory($this->doc1);\n } catch (Exception $ex) {\n\n $this->assertInstanceOf(IllegalArgumentException::class, $ex);\n $this->assertEquals(\"The document must be a directory\", $ex->getMessage());\n }\n }", "function create_dir($dir_path){\r\n die( __FILE__ . ' : ' . __LINE__ );\r\n }", "private function checkFolderPathExist()\n {\n $folderPath = $this->getFolderPath();\n if (!file_exists($folderPath)) {\n mkdir($folderPath, 0777, true);\n }\n }", "public function mkdirDeepCreatesDirectoryWithAndWithoutDoubleSlashesDataProvider() {}", "public function testGetDirectory(): void\n {\n $model = Hash::load([\n \"directory\" => \"directory\",\n ], $this->container);\n\n $this->assertSame(\"directory\", $model->getDirectory());\n }", "private function checkDir() {\n if (! is_dir ( $this->option ['templateDir'] ))\n $this->core->err ( '101', $this->option ['templateDir'] );\n \n if (! is_dir ( $this->option ['compileDir'] ))\n $this->core->err ( '101', $this->option ['compileDir'] );\n \n if (! is_dir ( $this->option ['cacheDir'] ))\n $this->core->err ( '101', $this->option ['cacheDir'] );\n }", "public function testDirnameReturnsDirectory()\n {\n file_put_contents(self::$temp.DS.'foo.txt', 'foo');\n\n $this->assertSame(self::$temp, Storage::dirname(self::$temp.DS.'foo.txt'));\n }", "protected function throwUnableToCreate()\n {\n throw new FilesystemException(\"Unable to create the file '{$this->path}'. A directory with the same path already exists.\");\n }", "public function testConstructSingleDirectory()\n {\n $filter = new FileRename($this->newDir);\n\n $this->assertEquals(\n [0 => [\n 'source' => '*',\n 'target' => $this->newDir,\n 'overwrite' => false,\n 'randomize' => false,\n ]],\n $filter->getFile()\n );\n $this->assertEquals($this->newDirFile, $filter($this->oldFile));\n $this->assertEquals('falsefile', $filter('falsefile'));\n }", "public function createDirectory()\n {\n $bReturn = $this->exists();\n if( !$bReturn && $this->_sPath->isValid() )\n {\n $bReturn = mkdir( (string)$this->_sPath, 0770, TRUE);\n if( $bReturn )\n {\n $this->_sPath->setValue( $this->getRealPath() );\n }\n }\n return $bReturn;\n }", "private function checkSaveDir(){\n\t\t//determines the path to check\n\t\t$path=$_SERVER['DOCUMENT_ROOT'].$this->save_dir;\n\t\t\n\t\t//check if the directory exists\n\t\tif(!is_dir($path)){\n\t\t\t//creates the directory\n\t\t\tif(!mkdir($path,0777,TRUE)){\n\t\t\t\tthrow new Exception(\"Can't create the directory\");\n\t\t\t}\n\t\t}\n\t\t\n\t}", "function crearCarpeta($ruta){\r\n if (!is_dir(($ruta))){\r\n mkdir($ruta);\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n}", "public function makeDirIfNotExist(string $dir): void\n {\n if (!is_dir($dir))\n mkdir($dir, 0777, true);\n \n }", "public function createDirectory(DirectoryInterface $directory, DirectoryInterface $parent): DirectoryInterface;", "function cemhub_create_directory($directory) {\n $return = FALSE;\n\n if (!is_dir($directory)) {\n if (!mkdir($directory, 0777, TRUE)) {\n watchdog('cemhub', 'Could not create directory: {$directory}');\n }\n else {\n $return = TRUE;\n }\n }\n\n return $return;\n}", "public function assertIsDirectory($path);", "public function testRemoveDirectory()\n {\n $directory = vfsStream::url('foo');\n $method = $this->makeMethodPublic('empty_directory');\n $method->invokeArgs($this->testModel, [$directory, true]);\n\n $this->assertFileNotExists(vfsStream::url('foo'));\n }", "public abstract function getDirectory();", "public function testFileExists()\n {\n $filePointer = 'Core/RandomNonExistentDirectory/RandomFileNamexhjctgyutcgasghj.php';\n //initial test will fail\n $this->assertFalse(FileExists::exists($filePointer));\n\n // test using a file that should definitely exist\n $filePointer = 'Core/Config/bootstrap.php';\n // if the core has not been tampered with, this test should pass\n $this->assertTrue(FileExists::exists($filePointer));\n }", "public function __construct($path, \\Exception $previous = null) {\n\t\tparent::__construct('Directory ' . $path . ' does not exists', 0, $previous);\n\t}", "public function testCreateInvalidFile()\n {\n new MaterializedResource(new GenericResource('file_not_found.txt'), '/probably/not/a/directory');\n }", "public function createDirectory()\n\t{\n\t\tif(is_dir($this->storagePath) and is_writable($this->storagePath)===false)\n\t\t{\n\t\t\tchmod($this->storagePath,$this->permissions);\n\t\t}\n\t\t\n\t\tif(is_dir($this->storagePath) and is_writable($this->storagePath))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif(!is_dir($this->storagePath) and $this->createDir===true and mkdir($this->storagePath,$this->permissions,true))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tthrow new \\RuntimeException(\"Cannot to create the storage path:\".$this->storagePath);\n\t}", "function dossier_existe($dossier)\n{\n $result = false;\n \n if(file_exists($dossier) && is_dir($dossier))\n $result = true;\n \n return $result;\n}", "public function test_remove()\n {\n $path = ROOT.DS.'test_dir';\n $object = Directory::create($path);\n $object->remove($path);\n $this->assertFalse(is_dir($path));\n }", "protected function verifyApplicationDoesntExist($directory)\n {\n if ((is_dir($directory) || is_file($directory)) && $directory != getcwd()) {\n throw new RuntimeException('Application already exists!');\n }\n }", "protected function verifyApplicationDoesntExist($directory)\n {\n if ((is_dir($directory) || is_file($directory)) && $directory != getcwd()) {\n throw new RuntimeException('Application already exists!');\n }\n }", "function is_needed_new_folder_form($directory)\n{\n\t// SEE: ternary operator.\n\treturn (is_dir($directory))?TRUE:FALSE;\n}", "function createDirectory() {\n\t$fmpImporter = new FilemakerProImporter();\n\t$fmpImporter->createDirectory();\n}", "private static function checkDirectory( $directoryName ) {\n\t\tif( ! is_dir( CACHE . \"$directoryName\" ) ) {\n\t\t\t// TODO: Provjera ispravnosti imena direktorija?\n\t\t\tmkdir( CACHE . \"$directoryName\" );\n\t\t\t// Odmah i index.html da se ne bi vidio sadrzaj:\n\t\t\tfile_put_contents( CACHE . $directoryName . '/index.html', '' );\n\t\t}\n\t}", "public function createDirectory(string $directory) : bool\n {\n if(!file_exists($directory)) {\n mkdir($directory);\n return true;\n } else if (file_exists($directory)) {\n return true;\n } else {\n return false;\n }\n }", "protected function assertFilesDontExist()\n {\n $this->assertFileNotExists($this->getSeedFilePath('LarafolioSeeder.php'));\n\n $this->assertFileNotExists($this->getSeedFilePath('ImagesTableSeeder.php'));\n\n $this->assertFileNotExists($this->getSeedFilePath('ProjectsTableSeeder.php'));\n\n $this->assertFileNotExists($this->getSeedFilePath('TextBlocksTableSeeder.php'));\n\n $this->assertFileNotExists($this->getSeedFilePath('UsersTableSeeder.php'));\n\n $this->assertFileNotExists(database_path('factories/ModelFactory.php'));\n }", "protected function createDestinationDirectory()\n {\n if ($this->fs->exists($this->destinationDirectory)) {\n if (!$this->overwrite) {\n throw new RuntimeException(t('The directory %s already exists.', $this->destinationDirectory));\n }\n if ($this->fs->isFile($this->destinationDirectory)) {\n throw new RuntimeException(t('The destination %s is a file, not a directory.', $this->destinationDirectory));\n }\n\n return;\n }\n if ($this->output->getVerbosity() >= OutputInterface::VERBOSITY_VERBOSE) {\n $this->output->writeln(t('Creating directory %s', $this->destinationDirectory));\n }\n if (!$this->fs->makeDirectory($this->destinationDirectory)) {\n throw new RuntimeException(t('Failed to create the directory %s.', $this->destinationDirectory));\n }\n }", "public function is_dir(string $message = ''): self {\n if (is_dir(filename: $this->path)) {\n return $this;\n }\n\n throw new \\InvalidArgumentException(\n message: $message ?: \"Path '{$this->path}' must be a directory.\",\n );\n }", "public function createDirectory(\\SplFileInfo $directoryToCreate)\n {\n\n // set the umask that is necessary to create the directory\n $this->initUmask();\n\n // we don't have a directory to change the user/group permissions for\n if ($directoryToCreate->isDir() === false) {\n // create the directory if necessary\n if (mkdir($directoryToCreate->getPathname()) === false) {\n throw new \\Exception(sprintf('Directory %s can\\'t be created', $directoryToCreate->getPathname()));\n }\n }\n\n // load the deployment service\n $this->setUserRights($directoryToCreate);\n }", "protected static function try_create_folder( $dir, $allow_dir_create ) {\r\n\t\t\tif ( !is_dir( $dir ) ) {\r\n\t\t\t\tif ( $allow_dir_create ) {\r\n\t\t\t\t\tif ( !mkdir( $dir, 0777, true ) ) {\r\n\t\t\t\t\t\tthrow new Exception( 'Unable to create folder, check the parent folder\\'s permissions it must be writable for the system user which executes PHP.' );\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// ensure file mode\r\n\t\t\t\t\tchmod( $dir, 0777 );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new Exception( '\"' . htmlspecialchars( $dir ) . '\" \\n\\n\\npath does not exist, set @param $allow_dir_create to TRUE to allow path creation.' );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "public function initializeObject()\n {\n if (!is_writable($this->path)) {\n Files::createDirectoryRecursively($this->path);\n }\n if (!is_dir($this->path) && !is_link($this->path)) {\n throw new StorageException('The directory \"' . $this->path . '\" which was configured as a resource storage does not exist.', 1361533189);\n }\n if (!is_writable($this->path)) {\n throw new StorageException('The directory \"' . $this->path . '\" which was configured as a resource storage is not writable.', 1361533190);\n }\n }", "function parseAndValidateDirectory($dirname) {\n\t\tif (empty($dirname) || !is_string($dirname)){\n\t\t\treturn new File_Exception(\"La ruta del directorio no es un string o es nula\");\n\t\t}\n\t\t//podria usarse la constante PATH_SEPARATOR o DIRECTORY_SEPARATOR pero no tiene sentido ya que directamente se usa /\n\t\t$dirname = stripslashes($dirname);\n\n\t\t$dirname = preg_replace(\"/([\\\\\\\\\\/]+)/\",\"/\",$dirname);\n\t\t\n\t\tif (substr($dirname, -1, 1) !== \"/\")\n\t\t\t$dirname .= \"/\";\n\t\t$primerCaracter = substr($dirname,0,1);\n\t\tif (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'){\n\t\t\t//windows\n\t\t\tif (strtolower($primerCaracter) === strtoupper($primerCaracter)){\n\t\t\t\t//no es una letra\n\t\t\t\treturn new File_Exception(\"La ruta del directorio debe comenzar con una letra\");\n\t\t\t}\n\t\t\tif (substr($dirname, 1, 1) !== \":\"){\n\t\t\t\t//tiene :\n\t\t\t\treturn new File_Exception(\"La ruta del directorio debe poser el caracter ':' luego de la letra de unidad\");\n\t\t\t}\n\t\t}else{\n\t\t\t//es linux u otro SO\n\t\t\tif ($primerCaracter!== \"/\"){\n\t\t\t\t//no es una /\n\t\t\t\treturn new File_Exception(\"La ruta del directorio debe comenzar con una /\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (!is_dir($dirname)){\n\t\t\treturn new File_Exception(\"El directorio especificado no existe\");\n\t\t}\n\t\tif (!is_writable($dirname)){\n\t\t\treturn new File_Exception(\"El directorio especificado no puede ser escrito por la aplicacion. Chequee que los permisos sobre el directorio sean correctos.\");\n\t\t}\n\t\treturn $dirname;\n\t}", "public function createDirectory(Directory $directory): void;", "public function testEmptyDirectoryShouldReturnEmptyResult(): void\n {\n $iterator = new FileIterator('vfs://', []);\n self::assertEmpty(iterator_to_array($iterator->iterate()));\n }", "public function test__isset()\n \t{\n \t$this->setExpectedException('Q\\Fs_Exception', \"Unable to get '{$this->file}/test': '{$this->file}' is not a directory, but a \" . Fs::typeOfNode($this->Fs_Node, Fs::DESCRIPTION));\n $this->Fs_Node->has('test');\n\t}" ]
[ "0.7088399", "0.6924278", "0.6888639", "0.68042946", "0.6631374", "0.6572095", "0.6568139", "0.6549179", "0.64917636", "0.6464703", "0.64470893", "0.64444333", "0.6375025", "0.63464355", "0.63353115", "0.63278794", "0.6325423", "0.6319147", "0.6303984", "0.6292826", "0.6269976", "0.62117875", "0.6208824", "0.6204837", "0.62011856", "0.6166056", "0.6144788", "0.61340123", "0.61208504", "0.6118696", "0.611023", "0.60731894", "0.60656923", "0.60581386", "0.60431784", "0.6028946", "0.6016461", "0.60127676", "0.60062677", "0.5963742", "0.59380925", "0.59293383", "0.5910736", "0.5901576", "0.58953047", "0.58886576", "0.5865613", "0.58610207", "0.5840802", "0.58346623", "0.5797142", "0.5797142", "0.57962435", "0.57733166", "0.57727647", "0.57663894", "0.57627875", "0.57366496", "0.5735633", "0.5730349", "0.5728194", "0.57268584", "0.572682", "0.5709688", "0.5707856", "0.5707581", "0.5705188", "0.57028407", "0.56837505", "0.56800675", "0.56684726", "0.56567734", "0.5656559", "0.5643631", "0.5643255", "0.564196", "0.56401354", "0.5623235", "0.5617377", "0.5615485", "0.56105804", "0.5607827", "0.5601765", "0.5599503", "0.5588596", "0.5588596", "0.5586058", "0.5584204", "0.5583396", "0.5576788", "0.5569176", "0.55682045", "0.5566005", "0.5564666", "0.5561494", "0.55534166", "0.5544129", "0.5543039", "0.5528356", "0.55250967" ]
0.82290375
0
Test for Directory::create() The Directory already exist. Throws Exception because provided path is an already existent Directory
Тест для Directory::create() Директория уже существует. Выбрасывается исключение, поскольку предоставленный путь представляет собой уже существующую директорию
public function test_create_exists() { Directory::create(ROOT.DS.'application'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createDirectoryIfNonExistent() {\n if (! file_exists($this->path)) {\n mkdir($this->path);\n }\n }", "public function testExists() {\n $testDirName = self::TEST_DIR . '/testExists';\n\n $handle = (new Directory($testDirName));\n\n mkdir($testDirName);\n $this->assertTrue($handle->exists());\n\n rmdir($testDirName);\n $this->assertFalse($handle->exists());\n }", "protected function createDirectory() {}", "public function createDirectory()\n {\n $bReturn = $this->exists();\n if( !$bReturn && $this->_sPath->isValid() )\n {\n $bReturn = mkdir( (string)$this->_sPath, 0770, TRUE);\n if( $bReturn )\n {\n $this->_sPath->setValue( $this->getRealPath() );\n }\n }\n return $bReturn;\n }", "private static function createDirectory($path)\n {\n $success = true;\n\n if (! is_dir($path))\n $success = mkdir($path, 0700, true);\n\n if ($success === false)\n throw new RuntimeException(\"Could not create $path\");\n }", "private function checkFolderPathExist()\n {\n $folderPath = $this->getFolderPath();\n if (!file_exists($folderPath)) {\n mkdir($folderPath, 0777, true);\n }\n }", "public function testEnsureExists() {\n $testDirName = self::TEST_DIR . '/testEnsureExists';\n\n (new Directory($testDirName))->ensureExists();\n\n $this->assertDirectoryExists($testDirName);\n }", "private function checkPath($path)\r\n {\r\n if (!file_exists($path)) {\r\n mkdir($path, 0777, true);\r\n }\r\n }", "function check_dir_exists($dir,$create=false) {\n\n global $CFG; \n\n $status = true;\n if(!is_dir($dir)) {\n if (!$create) {\n $status = false;\n } else {\n umask(0000);\n $status = mkdir ($dir,$CFG->directorypermissions);\n }\n }\n return $status;\n }", "public function testCreateSubDirsWithExistingDirectory()\n {\n mkdir($this->dir.'56');\n $this->assertNotEmpty($this->hd->getHash());\n }", "public function createDirectoriesIfTheyDontExist()\n {\n $directories = array(\n $this->getNewSitemapPath(),\n $this->getExistingSitemapPath()\n );\n foreach ($directories as $directory){\n if(!file_exists($directory)){\n mkdir($directory);\n }\n }\n }", "private function ensureDirectoryExists($path)\n {\n if (!file_exists($path)) {\n mkdir($path, 0775, true);\n }\n }", "private function check_directory($path) {\n\t\tif (!@opendir($path)) {\n\t\t\tmkdir($path, 0755);\n\t\t} //if(!@opendir($path))\n\t\treturn;\n\t}", "private function createDir($path)\n {\n if (!is_dir($path)) {\n if (!mkdir($path, self::CHMOD, true)) {\n throw new Exception('unable to create path '.$path);\n }\n }\n }", "private function createPathIfNeeded($path)\n {\n if ( ! is_dir($path)) {\n if (false === @mkdir($path, 0777, true) && !is_dir($path)) {\n return false;\n }\n }\n\n return true;\n }", "public function test_factory_not_exist()\n {\n Directory::factory(ROOT.DS.'test_dir');\n }", "public function testMakeDirectory()\n {\n $this->assertTrue(Storage::mkdir(self::$temp.DS.'created'));\n $this->assertTrue(is_dir(self::$temp.DS.'created'));\n }", "private function createDir()\n {\n if ($this->dirCreated) {\n return;\n }\n\n $dir = $this->getDirFromStream($this->url);\n if (null !== $dir && !is_dir($dir)) {\n $this->errorMessage = null;\n set_error_handler(array($this, 'customErrorHandler'));\n $status = mkdir($dir, 0777, true);\n restore_error_handler();\n if (false === $status) {\n throw new \\UnexpectedValueException(sprintf('There is no existing directory at \"%s\" and its not buildable: '.$this->errorMessage, $dir));\n }\n }\n $this->dirCreated = true;\n }", "private function createDir($path)\n {\n if (!is_dir($path)) {\n $success = mkdir($path, 0775, true);\n if (!$success) {\n throw new \\Exception(\"Cannot create folder {$path}. Check file system permissions.\");\n }\n }\n }", "public function test_move_directory_exists()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT, false);\n }", "function mdl_create_directory_if_not_exists(string $dirname)\n{\n // Create the path directory if not exists\n if (!is_dir($dirname)) {\n mkdir($dirname, 0777, true);\n }\n}", "public function createDirectoriesIfTheyDontExist()\n\t{\n\t\t$directories = array(\n\t\t\t$this->getIntegrationDirectory(),\n\t\t\t$this->getProductsProcessingDirectory(),\n\t\t\t$this->getProductsProcessedDirectory(),\n\t\t\t$this->getStockProcessingDirectory(),\n\t\t\t$this->getStockProcessedDirectory()\n\t\t);\n\t\tforeach ($directories as $directory){\n\t\t\tif(!file_exists($directory)){\n\t\t\t\tmkdir($directory);\n\t\t\t}\n\t\t}\n\t}", "public function createFolderIfNotExisted($path)\n {\n if (!file_exists($path)) {\n mkdir($path);\n }\n }", "public function createDirectory()\n\t{\n\t\tif(is_dir($this->storagePath) and is_writable($this->storagePath)===false)\n\t\t{\n\t\t\tchmod($this->storagePath,$this->permissions);\n\t\t}\n\t\t\n\t\tif(is_dir($this->storagePath) and is_writable($this->storagePath))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif(!is_dir($this->storagePath) and $this->createDir===true and mkdir($this->storagePath,$this->permissions,true))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tthrow new \\RuntimeException(\"Cannot to create the storage path:\".$this->storagePath);\n\t}", "public function mkdirIfNotExist($path=array())\n\t{\n\t\tforeach($path as $key=>$value)\n\t\t{\n\t\t\tif(file_exists($value) && is_dir($value)){\n\t\t\t}else{\n\t\t\t\tmkdir($value,0777);\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn true;\n\t}", "function check_create($name) {\n global $lsarray;\n if (!in_array($name, $lsarray)) { mkdir($name); return true; }\n else { echo \"Folder already exists: $name\".PHP_EOL; return false; }\n}", "private function mustCreateFolder(){\n }", "public function createDirectory($name, $path)\n {\n if (Directory::exists($this->disk, $path) && Directory::notExists($name, $this->disk, $path)) {\n Directory::createDirectory($name, $this->disk, $path );\n return Directory::metaDataOf(Path::normalize($path) . $name , $this->disk);\n }\n\n throw new DirectoryAlreadyExistsException();\n }", "public function createPath( $path ) {\n\t\tif ( !file_exists($path) || !is_dir($path) ) {\n\t\t\tif ( !mkdir( $path, 0777, true ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn $path;\n\t}", "public function testMkdir() {\n $testDirName = self::TEST_DIR . '/testMkdir';\n\n (new Directory($testDirName))->mkdir();\n\n $this->assertDirectoryExists($testDirName);\n }", "private function ensureDirectory() {\n\t\tif (!is_dir($this -> directory)) {\n\t\t\tif (!mkdir($this -> directory)) {\n\t\t\t\tthrow new LatexException('Could not create directory ' . $this -> directory);\n\t\t\t}\n\t\t}\n\t}", "public static function createDirectory ($path) {\n\t\t\\clearstatcache(true, $path);\n\t\tif (!\\is_dir($path)) {\n\t\t\t\\mkdir($path, 493, true);\n\t\t}\n\t}", "public static function existsOrCreatePath($path)\n\t{\n\t\tFile::exists($path) or File::makeDirectory($path);\n\t\treturn $path;\n\t}", "function create_dir($dir_path){\r\n die( __FILE__ . ' : ' . __LINE__ );\r\n }", "private function ensureDirectory($directoryPath) {\r\n\t\tif (! is_dir ( $directoryPath )) {\r\n\t\t\t$this->logger->writeLOG( '-not already a directory ' . $directoryPath);\r\n\t\t\tif (mkdir ( $directoryPath )) {\r\n\t\t\t\t$this->logger->writeLOG( '-created directory ' . $directoryPath);\r\n\t\t\t} else {\r\n\t\t\t\t$this->logger->writeLOG( '-failed to create directory ' . $directoryPath);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->logger->writeLOG( '-existing directory ' . $directoryPath);\r\n\t\t}\r\n\t}", "public static function mkdir($path)\n {\n // (array) Convert Traversable object to array\n if ($path instanceof Traversable) {\n $path = iterator_to_array($path, FALSE);\n }\n\n // Loop through each directory to create (convert string to array if needed)\n foreach ((array) $path as $p) {\n // Directory doesn't exist, create it now\n if ( ! is_dir($p)) {\n // [recursion] Create parent directory if needed\n static::mkdir(dirname($p));\n\n // Failed to create directory\n if ( ! @mkdir($p)) {\n throw new RuntimeException('Failed to create directory: ' . $p);\n }\n }\n }\n\n // Successful if no exceptions thrown\n return TRUE;\n }", "public function test_move_not_exists_dir()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT.DS.'not_exist');\n }", "private function make_path($path){\n\t\t\t// Test if path extist\n\t\t\tif(is_dir($path) || file_exists($path))\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Create it\n\t\t\t\tmkdir($path, 0777, true);\n\t\t\t}\n\t}", "protected static function ensureDirectoryExists($path)\n {\n if(!File::isDirectory($path)) {\n File::makeDirectory($path);\n }\n }", "public static function createDirectory($path)\n {\n // init\n $path\t= self::normalizePath($path);\n\n // creation (if needed)\n if (!is_dir(realPath($path))) {\n mkdir($path, 0777, true);\n }\n\n return is_dir($path);\n }", "function ensure_directory_writable($path, $base_path = '') {\n $result = false;\n if ($base_path != '') {\n $base_path = rtrim($base_path, '/').'/';\n $path = trim(substr($path, count($base_path) -1), '/');\n }\n if (file_exists($base_path.$path)) {\n $result = is_dir($base_path.$path) && is_writable($base_path.$path);\n } else {\n $result = true;\n $path_item = $base_path;\n foreach (explode('/', $path) as $item) {\n $path_item .= $item.'/';\n if (!file_exists($path_item)) {\n $result = mkdir($path_item);\n // if (!$result) debug('path_item', $path_item);\n } else {\n $result = is_dir($path_item);\n }\n if (!$result) {\n break;\n }\n }\n $result &= is_writable($base_path.$path);\n }\n return $result;\n}", "private function checkSaveDir(){\n\t\t//determines the path to check\n\t\t$path=$_SERVER['DOCUMENT_ROOT'].$this->save_dir;\n\t\t\n\t\t//check if the directory exists\n\t\tif(!is_dir($path)){\n\t\t\t//creates the directory\n\t\t\tif(!mkdir($path,0777,TRUE)){\n\t\t\t\tthrow new Exception(\"Can't create the directory\");\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public function createDirectory(string $path): bool\n {\n if (!is_dir($path)) {\n return mkdir($path, 0755, true);\n }\n\n return true;\n }", "protected function checkIfTempFolderExists() {\n $dir = codemonkey_pathTempDir;\n if (file_exists($dir) && is_dir($dir)) {\n return;\n }\n mkdir($dir);\n }", "private function check_directory()\n\t{\n\t\tif (!is_dir(Kohana::config($this->type.'.cache_folder')))\n\t\t\tmkdir(Kohana::config($this->type.'.cache_folder'));\n\t}", "protected function createDirectory($path)\n {\n if (! File::exists($path)) {\n File::makeDirectory($path, 0755, true);\n }\n }", "public function validate_directory($path) {\n if(!File::isDirectory($path)){\n if(File::makeDirectory($path, 0777, true, true)) {\n return true;\n } else {\n # Unable to create directory.\n return false;\n }\n\n } else {\n return true;\n }\n\n\n }", "public function ensureDirectoryExists($path, $mode = 0755, $recursive = true)\n {\n\n }", "public function testMkdirRecursive() {\n $testDirName = self::TEST_DIR . '/testMkdirRecursive/recursiveFlag';\n\n (new Directory($testDirName))->mkdir(true);\n\n $this->assertDirectoryExists($testDirName);\n }", "private function checkSaveDir()\n\t{\n\t\t// Determines the path to check:\n\t\t$path = $_SERVER['DOCUMENT_ROOT'] . $this->save_dir;\n\n\t\t// Check to see if directory exists:\n\t\tif(!is_dir($path))\n\t\t{\n\t\t\t// Check to see if directory can be made, this will also make the directory:\n\t\t\tif(!mkdir($path, 0777, TRUE))\n\t\t\t{\n\t\t\t\t// If fails, throw execption:\n\t\t\t\tthrow new Exception(\"Can't create the directory!\");\n\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public function createDirectory(string $directory) : bool\n {\n if(!file_exists($directory)) {\n mkdir($directory);\n return true;\n } else if (file_exists($directory)) {\n return true;\n } else {\n return false;\n }\n }", "public function createDir($dirName) {\n if(!file_exists($dirName)){\n if(mkdir($dirName, 0755))\n\treturn TRUE;\n else Throw new AMUECannotCreateDir($dirName);\n }else Throw new AMUEFileExists($dirName);\n }", "protected function _createWriteableDir($path) {\n $io = new Varien_Io_File();\n if (!$io->isWriteable($path) && !$io->mkdir($path, 0777, true)) {\n Mage::throwException(Mage::helper('catalog')->__(\"Cannot create writeable directory '%s'.\", $path));\n }\n }", "protected function createDirectories() {\n\t\t@mkdir($this->getAbsoluteBasePath(), 0777, TRUE); // @ - Directories may exist\n\t}", "public function mkdirDeepCreatesDirectoryWithAndWithoutDoubleSlashesDataProvider() {}", "public function setupPath()\n {\n // if directory doesn't exist, create it\n if (!is_dir($this->path->getPath())) {\n $reporting = error_reporting();\n error_reporting(0);\n $created = mkdir($this->path->getPath(), 0755, true);\n error_reporting($reporting);\n if (!$created) {\n throw new Exception(sprintf('cant\\'t create directory: %s', $this->path->getPath()));\n }\n }\n if (!is_writable($this->path->getPath())) {\n throw new Exception(sprintf('no write permission for directory: %s', $this->path->getPath()));\n }\n }", "function crearCarpeta($ruta){\r\n if (!is_dir(($ruta))){\r\n mkdir($ruta);\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n}", "function create_dir($path, $make_writable = false) {\n if(mkdir($path)) {\n if($make_writable) {\n if(!chmod($path, 0777)) {\n return false;\n } // if\n } // if\n } else {\n return false;\n } // if\n \n return true;\n }", "function fud_mkdir($path)\n{\n\t$dirs = array();\n\twhile (!is_dir($path)) {\n\t\t$dirs[] = $path;\n\t\t$path = dirname($path);\n\t\tif (!$path || $path == '/') {\n\t\t\tbreak;\n\t\t}\n\t}\n\tforeach (array_reverse($dirs) as $dir) {\n\t\tif (!mkdir($dir, 0755)) {\n\t\t\tfe('Failed to create \"'. $dir .'\" directory.');\t\n\t\t}\n\t}\n}", "public function mkdir($path)\n {\n \n }", "static public function mkdir($path) {\n\t\treturn self::$defaultInstance->mkdir($path);\n\t}", "public function createDirectory($path) {\n\n $parentPath = dirname($path);\n if ($parentPath=='.') $parentPath='/';\n $parent = $this->getNodeForPath($parentPath);\n $parent->createDirectory(basename($path));\n\n }", "public function createDirectory(string $path, array $properties = []) : bool\n {\n if (is_array($path))\n {\n $path = $path['path'] ?? '';\n }\n\n $connection_identifier = '';\n $rpath = '';\n $service = $this->getServiceFromPath($path, $connection_identifier, $rpath);\n\n return $service->createDirectory($rpath, $properties);\n }", "protected function ensure_path_exists() {\n global $CFG;\n if (!is_writable($this->path)) {\n if ($this->custompath && !$this->autocreate) {\n throw new coding_exception('File store path does not exist. It must exist and be writable by the web server.');\n }\n $createdcfg = false;\n if (!isset($CFG)) {\n // This can only happen during destruction of objects.\n // A cache is being used within a destructor, php is ending a request and $CFG has\n // already being cleaned up.\n // Rebuild $CFG with directory permissions just to complete this write.\n $CFG = $this->cfg;\n $createdcfg = true;\n }\n if (!make_writable_directory($this->path, false)) {\n throw new coding_exception('File store path does not exist and can not be created.');\n }\n if ($createdcfg) {\n // We re-created it so we'll clean it up.\n unset($CFG);\n }\n }\n return true;\n }", "protected function throwUnableToCreate()\n {\n throw new FilesystemException(\"Unable to create the file '{$this->path}'. A directory with the same path already exists.\");\n }", "public function testFolderAlreadyExists()\n {\n CodeIgniterHelper::setDefaults($this->appPath);\n\n $options = [\n 'name' => $this->table,\n '--camel' => true,\n '--bootstrap' => true,\n '--keep' => false\n ];\n\n $createCommand = new CommandTester($this->createCommand);\n $createCommand->execute($options);\n\n $createCommand = new CommandTester($this->createCommand);\n $createCommand->execute($options);\n\n $expected = 'The \"' . plural($this->table) . '\" views folder already exists!' . PHP_EOL;\n\n $this->assertEquals($expected, $createCommand->getDisplay());\n\n CodeIgniterHelper::setDefaults($this->appPath);\n }", "private function createDirectory(string $pathDirectory) : void{\n if(!file_exists($pathDirectory) && !is_dir($pathDirectory)){\n mkdir($pathDirectory, 0777);\n }\n }", "private function Make_UniqueDIR( )\n\t{\n\t\t$this -> DIR = self :: $Request -> server -> get( 'DOCUMENT_ROOT' ) . $this -> FULL_PATH . self :: FOLDER_BASE_NAME . $this -> ID;\n\t\tif ( !file_exists( $this -> DIR ) )\n\t\t\tmkdir( $this -> DIR , 0777 , true ) ;\n\t}", "private function createFolder()\n {\n if (!file_exists($this->cacheDir)) {//if folder doesn't exist\n mkdir($this->cacheDir, 0755);//create folder\n }\n if (!file_exists($this->cacheFile)) {//if cache doesnt exist\n $file = fopen($this->cacheFile, 'w');\n fclose($file);\n } else {\n return true;\n } //return true if folder exists\n }", "public function createDirectory(Directory $directory): void;", "protected function checkIfFoldersExist() {\n $arrFilePath = explode(DIRECTORY_SEPARATOR, $this->filePath);\n array_pop($arrFilePath); //Remove filename\n if (count($arrFilePath) > 0) {\n $folderPath = implode(DIRECTORY_SEPARATOR, $arrFilePath);\n $folder = new Folder();\n $folder->createFolderIfNotExists($folderPath);\n }\n }", "public function createCacheDirectory() {\n\t\tif (!file_exists(dirname($this->cache_file))) {\n\t\t\tif (!@mkdir(dirname($this->cache_file))) {\n\t\t\t\tdie('Please create the cache directory: '.dirname($this->cache_file).' and make sure it\\'s writeable by this script.');\n\t\t\t} else {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} elseif (file_exists(dirname($this->cache_file)) && !is_writable(dirname($this->cache_file))) {\n\t\t\tdie('Cannot write to cache directory. Please make it writeable.');\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "private static function createCurrentFolder() : bool {\n return is_dir(self::getCurrentFolder()) || mkdir(self::getCurrentFolder(), 0777, true);\n }", "function checkPaths() {\n\tif(!file_exists(MODEL_PATH)) {\n\t\tmkdir(MODEL_PATH);\n\t}\n\tif(!file_exists(ENTITY_PATH)) {\n\t\tmkdir(ENTITY_PATH);\n\t}\n\tif(!file_exists(REPOSITORY_PATH)) {\n\t\tmkdir(REPOSITORY_PATH);\n\t}\n}", "private function recursiveCreateDirectory($path)\n {\n if ( !File::isDirectory($path) )\n {\n File::makeDirectory($path, 0755, true);\n }\n }", "protected function ensureCacheDirectoryExists($path)\n {\n $directory = dirname($path);\n\n if (! $this->files->exists($directory)) {\n $this->files->makeDirectory($directory, 0777, true, true);\n\n // We're creating two levels of directories (e.g. 7e/24), so we check them both...\n $this->ensurePermissionsAreCorrect($directory);\n $this->ensurePermissionsAreCorrect(dirname($directory));\n }\n }", "public function validate_directory($path)\n {\n if (!File::isDirectory($path)) {\n if (File::makeDirectory($path, 0777, true, true)) {\n return true;\n } else {\n # Unable to create directory.\n return false;\n }\n\n } else {\n return true;\n }\n\n\n }", "private function mkpath($path){\n $dirs=array();\n $path=preg_replace('/(\\/){2,}|(\\\\\\){1,}/','/',$path);\n $dirs=explode(\"/\",$path);\n $path=\"\";\n foreach ($dirs as $element){\n $path.=$element.\"/\";\n if(!is_dir($path)){ \n if(!mkdir($path)){ \n return false; \n }\n } \n }\n }", "private function ensureFileUploadFolderExists(): void\n {\n // Create directory\n if (!file_exists($this->uploadPath)) {\n mkdir($this->uploadPath, 0777, true);\n }\n }", "public function makeDirIfNotExist(string $dir): void\n {\n if (!is_dir($dir))\n mkdir($dir, 0777, true);\n \n }", "public function create($path)\n {\n return $this->fs->cloud()->createDir($path);\n }", "protected static function makeDir($path) {\n\t\tif (!file_exists($path)) {\n\t\t\tmkdir($path, 0777, true);\n\t\t}\n\t}", "protected static function makeDir($path) {\n\t\tif (!file_exists($path)) {\n\t\t\tmkdir($path, 0777, true);\n\t\t}\n\t}", "protected function createDirectory($path)\n {\n $filesystem = App::make('files');\n if (!$filesystem->isDirectory($path)) {\n $this->comment(\"Creating directory: \".$path);\n $filesystem->makeDirectory($path, 0777, true);\n return $filesystem;\n }\n return $filesystem;\n }", "public function should_throw_if_trying_to_build_on_non_existing_directory(): void\n {\n $this->expectException(\\InvalidArgumentException::class);\n new DirectorySnapshot(__DIR__ . '/not-existing');\n }", "function cemhub_create_directory($directory) {\n $return = FALSE;\n\n if (!is_dir($directory)) {\n if (!mkdir($directory, 0777, TRUE)) {\n watchdog('cemhub', 'Could not create directory: {$directory}');\n }\n else {\n $return = TRUE;\n }\n }\n\n return $return;\n}", "function check_and_create_import_dir($unique_code) {\n\n global $CFG; \n\n $status = $this->check_dir_exists($CFG->dataroot.\"/temp\",true);\n if ($status) {\n $status = $this->check_dir_exists($CFG->dataroot.\"/temp/webworkquiz_import\",true);\n }\n if ($status) {\n $status = $this->check_dir_exists($CFG->dataroot.\"/temp/webworkquiz_import/\".$unique_code,true);\n }\n \n return $status;\n }", "function mkdir_or_exit($dir, $retry_alllowed = 2){\n mkdir($dir);\n $retry_used = 0;\n while (!file_exists($dir) && $retry_used < $retry_alllowed){ if (!empty($retry_used)){ sleep(1); } $retry_used++; mkdir($dir); }\n if (!file_exists($dir)){ ob_echo('Failed to make directory '.clean_path($dir).'!'); ob_echo('Force exiting script!'); die(); }\n}", "public function ensureDirExists($dirs);", "function check_and_create_import_dir($unique_code) {\n global $CFG; \n $status = $this->check_dir_exists($CFG->dataroot.\"/temp\",true);\n if ($status) {\n $status = $this->check_dir_exists($CFG->dataroot.\"/temp/webworkquiz_import\",true);\n }\n if ($status) {\n $status = $this->check_dir_exists($CFG->dataroot.\"/temp/webworkquiz_import/\".$unique_code,true);\n }\n return $status;\n }", "public function createFolder(string $fullPath) : bool;", "public function test_remove()\n {\n $path = ROOT.DS.'test_dir';\n $object = Directory::create($path);\n $object->remove($path);\n $this->assertFalse(is_dir($path));\n }", "function create($path = '', $mode = 0755) \n {\n \n // Initialize variables\n static $nested = 0;\n \n // Check to make sure the path valid and clean\n $path = $this->_fs->path()->clean($path);\n\n // Check if parent dir exists\n $parent = dirname($path);\n \n if (!$this->exists($parent)) {\n // Prevent infinite loops!\n $nested++;\n if (($nested > 20) || ($parent == $path)) {\n $nested--;\n return VWP::raiseWarning(VText::_('Infinite loop detected'),get_class($this) . ':create',null,false); \n }\n\n // Create the parent directory\n $cr = $this->create($parent, $mode);\n if (VWP::isWarning($cr)) {\n $nested--;\n return $cr;\n }\n // OK, parent directory has been created\n $nested--;\n }\n\n // Check if dir already exists\n if ($this->exists($path)) {\n return true;\n }\n\n // Check for safe mode\n \n // We need to get and explode the open_basedir paths\n $obd = ini_get('open_basedir');\n\n // If open_basedir is set we need to get the open_basedir that the path is in\n if ($obd != null) {\n if (VPATH_ISWIN) {\n $obdSeparator = \";\";\n } else {\n $obdSeparator = \":\";\n }\n \n // Create the array of open_basedir paths\n $obdArray = explode($obdSeparator, $obd);\n $inBaseDir = false;\n // Iterate through open_basedir paths looking for a match\n foreach ($obdArray as $test) {\n $test = $this->_fs->path()->clean($test);\n if (strpos($path, $test) === 0) {\n $obdpath = $test;\n $inBaseDir = true;\n break;\n }\n }\n \n if ($inBaseDir == false) {\n // Return false because the path to be created is not in open_basedir\n return VWP::raiseWarning(VText::_('Path not in open_basedir paths'), get_class($this). \":create\",null,false);\n }\n }\n\n // First set umask\n $origmask = @umask(0);\n\n // Create the path\n if (!$ret = @mkdir($path, $mode)) {\n @umask($origmask);\n return VWP::raiseWarning(VText::_('Could not create directory' ) . ' Path: ' . $path,get_class($this) . ':create',null,false);\n }\n\n // Reset umask\n @umask($origmask);\t\t\n return $ret;\n }", "public function testDeleteDirectoryReturnFalseWhenNotADirectory()\n {\n mkdir(self::$temp.DS.'bar');\n file_put_contents(self::$temp.DS.'bar'.DS.'file.txt', 'Hello World');\n\n $this->assertFalse(Storage::rmdir(self::$temp.DS.'bar'.DS.'file.txt'));\n }", "private function _mkdir($target)\n\t{\n\t\t// from php.net/mkdir user contributed notes\n\t\tif (file_exists($target))\n\t\t{\n\t\t\tif ( ! @is_dir($target))\n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\n\t\t// Attempting to create the directory may clutter up our display.\n\t\tif (@mkdir($target))\n\t\t{\n\t\t\t$stat = @stat(dirname($target));\n\t\t\t$dir_perms = $stat['mode'] & 0007777; // Get the permission bits.\n\t\t\t@chmod($target, $dir_perms);\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (is_dir(dirname($target)))\n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\n\t\t// If the above failed, attempt to create the parent node, then try again.\n\t\tif ($this->_mkdir(dirname($target)))\n\t\t{\n\t\t\treturn $this->_mkdir($target);\n\t\t}\n\n\t\treturn FALSE;\n\t}", "public static function create_dir($dir_to_create)\n\t{\n\t\tif (mkdir($dir_to_create))\n\t\t{\n\t\t\tif (self::findServerOS() == 'LINUX')\n\t\t\t{\n\t\t\t\t$perms = self::unix_file_permissions($dir_to_create);\n\t\t\t\tif ( $perms != '0755') @chmod($dirPath, 0755);\n\t\t\t}\n\n\t\t\treturn true;\n\t\t} else {\n\t\t\tthrow new Exception(\"Error creating directory '{$dir_to_create}'\");\n\n\t\t\treturn false;\n\t\t}\n\t}", "protected static function try_create_folder( $dir, $allow_dir_create ) {\r\n\t\t\tif ( !is_dir( $dir ) ) {\r\n\t\t\t\tif ( $allow_dir_create ) {\r\n\t\t\t\t\tif ( !mkdir( $dir, 0777, true ) ) {\r\n\t\t\t\t\t\tthrow new Exception( 'Unable to create folder, check the parent folder\\'s permissions it must be writable for the system user which executes PHP.' );\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// ensure file mode\r\n\t\t\t\t\tchmod( $dir, 0777 );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new Exception( '\"' . htmlspecialchars( $dir ) . '\" \\n\\n\\npath does not exist, set @param $allow_dir_create to TRUE to allow path creation.' );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "protected function _create_folder($path = null)\n {\n if (is_dir(APPPATH . $path)) {\n $this->_message(\"This \" . $this->_command . \": \" . $this->_name . \" folder \" . $path . \" already exists.\");\n return false;\n } else {\n $mkdir = mkdir(APPPATH . $path, 0755, TRUE);\n // If unable to write folder in path\n if (!$mkdir) {\n $this->_message(\"Unable to write the folder \" . $path . \" \" . $this->_command . \": \" . $this->_name . \".\");\n return false;\n } else\n return true;\n }\n }", "function crateFolder($path,$mode)\n\t{\n\t\tif(!is_dir($path))\n\t\t\t{\n\t\t\t\tif(!mkdir($path,$mode))\n\t\t\t\t\t{return false;}else{return true;}\n\t\t\t}\n\t\telse{return \"Found\";}\n\t}", "private function makeFolder()\n {\n if (file_exists($this->backup_folder)) {\n // folder exist nothing to do\n return true;\n }\n\n if (!mkdir($this->backup_folder, 0777, true)) {\n throw new FileDropperException('Make folder function failure');\n }\n\n return true;\n }" ]
[ "0.803957", "0.738031", "0.7285328", "0.7276571", "0.7262561", "0.7183224", "0.71716", "0.705012", "0.70488226", "0.70256615", "0.69991064", "0.69938815", "0.6983108", "0.6961843", "0.69514316", "0.6939701", "0.6902881", "0.68776363", "0.6841167", "0.68147177", "0.68039656", "0.6802962", "0.67876834", "0.6785655", "0.67531645", "0.6743948", "0.6728339", "0.672519", "0.67141783", "0.66998243", "0.6675574", "0.66679853", "0.6655082", "0.66406935", "0.6638223", "0.6611964", "0.6604112", "0.6564655", "0.65459204", "0.6522401", "0.651573", "0.6505709", "0.6499935", "0.6465713", "0.6463352", "0.6455552", "0.64399904", "0.6435476", "0.6435437", "0.6415902", "0.6412701", "0.6398237", "0.6395258", "0.6387554", "0.6378042", "0.6361352", "0.635792", "0.635702", "0.6330095", "0.63293964", "0.63148904", "0.63107675", "0.6303931", "0.6303412", "0.62991846", "0.6298145", "0.6295943", "0.62888277", "0.6279582", "0.62573373", "0.6256336", "0.6254109", "0.62473744", "0.62431574", "0.6242915", "0.62380123", "0.6234902", "0.62227434", "0.62154776", "0.6203423", "0.62031865", "0.61968666", "0.61968666", "0.6186424", "0.61785084", "0.6174598", "0.616999", "0.6162551", "0.6149055", "0.6147648", "0.6146606", "0.6134467", "0.61327714", "0.6132761", "0.6124114", "0.61143976", "0.6112269", "0.6095324", "0.6093514", "0.6066828" ]
0.74785715
1
Test for Directory::rename() Create a new directory named test_dir and renames it as test_new_dir. At the end of the test, remove the created directory.
Тест для Directory::rename() Создайте новый каталог с именем test_dir и переименуйте его в test_new_dir. В конце теста удалите созданный каталог.
public function test_rename() { $object = Directory::create(ROOT.DS.'test_dir'); $object->rename('test_new_dir'); $this->assertEquals($object->get_base_name(), 'test_new_dir'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_rename_same_name()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->rename('test_dir');\n $this->assertEquals($object->get_base_name(), 'test_dir');\n }", "public function testMoveDirectoryMovesEntireDirectoryAndOverwrites()\n {\n mkdir(self::$temp.DS.'tmp4', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp4'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp4'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'nested'.DS.'baz.txt', '');\n\n mkdir(self::$temp.DS.'tmp5', 0777, true);\n file_put_contents(self::$temp.DS.'tmp5'.DS.'foo2.txt', '');\n file_put_contents(self::$temp.DS.'tmp5'.DS.'bar2.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp4', self::$temp.DS.'tmp5', true);\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'foo2.txt'));\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'bar2.txt'));\n $this->assertFalse(is_dir(self::$temp.DS.'tmp4'));\n }", "public function testMoveDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp2', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp2'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp2'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp2', self::$temp.DS.'tmp3');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_dir(self::$temp.DS.'tmp2'));\n }", "public function test_move_directory_exists()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT, false);\n }", "public function test_remove()\n {\n $path = ROOT.DS.'test_dir';\n $object = Directory::create($path);\n $object->remove($path);\n $this->assertFalse(is_dir($path));\n }", "public function testRename()\n {\n $oldFilename = static::$baseFile . '/fs/tmp.txt';\n $newFilename = static::$baseFile . '/fs/test/tmp.txt';\n\n file_put_contents($oldFilename, 'It works!');\n\n $this->assertTrue(rename($oldFilename, $newFilename));\n\n $this->assertFalse(file_exists($oldFilename));\n $this->assertTrue(file_exists($newFilename));\n }", "public function renameDirectory(DirectoryInterface $directory, string $newName): DirectoryInterface;", "public function testConstructSingleDirectory()\n {\n $filter = new FileRename($this->newDir);\n\n $this->assertEquals(\n [0 => [\n 'source' => '*',\n 'target' => $this->newDir,\n 'overwrite' => false,\n 'randomize' => false,\n ]],\n $filter->getFile()\n );\n $this->assertEquals($this->newDirFile, $filter($this->oldFile));\n $this->assertEquals('falsefile', $filter('falsefile'));\n }", "public function test_move()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(SYSTEM);\n $this->assertTrue(is_dir(SYSTEM.DS.'test_dir'));\n $this->assertFalse(is_dir(ROOT.DS.'test_dir'));\n $this->assertEquals($object->get_path(), SYSTEM.DS.'test_dir');\n }", "public function test_move_not_exists_dir()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT.DS.'not_exist');\n }", "function narrative_move_files($current_narrative_dir, $new_narrative_dir)\n{\n $file_scan = scandir($current_narrative_dir);\n foreach ($file_scan as $filecheck)\n {\n if ($filecheck != '.' && $filecheck != '..' && !is_dir($current_narrative_dir . $filecheck))\n {\n rename($current_narrative_dir . $filecheck, $new_narrative_dir . $filecheck);\n }\n }\n}", "public function testRenameFailure($newFilename)\n {\n $oldFilename = static::$baseFile . '/fs/tmp.txt';\n\n file_put_contents($oldFilename, 'It works!');\n $this->assertFalse(rename($oldFilename, $newFilename));\n }", "public function renameDir($curpath, $newname)\n {\n $filterSlug = new FrontZend_Filter_Slug();\n $newpath = strstr($newname, '/') || strstr($newname, DIRECTORY_SEPARATOR)\n ? $newname\n : substr($curpath, 0, strrpos($curpath, DIRECTORY_SEPARATOR)+1)\n . $filterSlug->filter($newname);\n\n $newfullpath = Media_Model_File::getFullPath($newpath);\n if (is_dir($newfullpath)) {\n throw new FrontZend_Exception('Já existe uma pasta com este nome');\n }\n\n $curfullpath = Media_Model_File::getFullPath($curpath);\n\n if (is_dir($curfullpath)) {\n if (rename($curfullpath, $newfullpath)) {\n try {\n $this->_renamePath($curpath, $newpath);\n return true;\n } catch(Exception $e) {\n rename($newfullpath, $curfullpath);\n throw $e;\n }\n\n };\n }\n return false;\n }", "private function renameDirectories(): void\n {\n //update directory names and update file created paths accordingly\n foreach ($this->dirsToRename as $dirPath) {\n $updateDirPath = $this->pathHelper->renamePathBasenameSingularOrPlural(\n $dirPath,\n $this->singularNamespacedName,\n $this->pluralNamespacedName\n );\n foreach ($this->filesCreated as $k => $filePath) {\n $this->filesCreated[$k] = str_replace($dirPath, $updateDirPath, $filePath);\n }\n }\n }", "public function testMkdir() {\n $testDirName = self::TEST_DIR . '/testMkdir';\n\n (new Directory($testDirName))->mkdir();\n\n $this->assertDirectoryExists($testDirName);\n }", "protected function createRealTestdir() {}", "public function renameDirNames($base_old_dir, $old_name, $base_new_dir, $new_name) {\n $paths = $this->_arrayDataFolders();\n\n foreach ($paths as $dir) {\n $basePath = WikiGlobalConfig::getConf($dir);\n $oldPath = \"$basePath/$base_old_dir/$old_name\";\n if (file_exists($oldPath)) {\n $newPath = \"$basePath/$base_new_dir/$new_name\";\n if ($base_old_dir !== $base_new_dir && !is_dir($newPath))\n mkdir($newPath, 0775, true);\n if (! rename($oldPath, $newPath))\n throw new Exception(\"renameProjectOrDirectory: Error mentre canviava el nom del projecte/carpeta a $dir.\");\n }\n }\n }", "public function rename($new_dirname, $overwrite)\n\t{\n\t\t$this->tossIfException();\n\t\t\n\t\tif (!$this->getParent()->isWritable()) {\n\t\t\tthrow new fEnvironmentException(\n\t\t\t\t'The directory, %s, can not be renamed because the directory containing it is not writable',\n\t\t\t\t$this->directory\n\t\t\t);\n\t\t}\n\t\t\n\t\t$info = fFilesystem::getPathInfo($new_dirname);\n\t\t\n\t\tif (!file_exists($info['dirname'])) {\n\t\t\tthrow new fProgrammerException(\n\t\t\t\t'The new directory name specified, %s, is inside of a directory that does not exist',\n\t\t\t\t$new_dirname\n\t\t\t);\n\t\t}\n\t\t\n\t\t// Make the dirname absolute\n\t\t$new_dirname = fDirectory::makeCanonical(realpath($new_dirname));\n\t\t\n\t\tif (file_exists($new_dirname)) {\n\t\t\tif (!is_writable($new_dirname)) {\n\t\t\t\tthrow new fEnvironmentException(\n\t\t\t\t\t'The new directory name specified, %s, already exists, but is not writable',\n\t\t\t\t\t$new_dirname\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (!$overwrite) {\n\t\t\t\t$new_dirname = fFilesystem::makeUniqueName($new_dirname);\n\t\t\t}\n\t\t} else {\n\t\t\t$parent_dir = new fDirectory($info['dirname']);\n\t\t\tif (!$parent_dir->isWritable()) {\n\t\t\t\tthrow new fEnvironmentException(\n\t\t\t\t\t'The new directory name specified, %s, is inside of a directory that is not writable',\n\t\t\t\t\t$new_dirname\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t\n\t\trename($this->directory, $new_dirname);\n\t\t\n\t\t// Allow filesystem transactions\n\t\tif (fFilesystem::isInsideTransaction()) {\n\t\t\tfFilesystem::rename($this->directory, $new_dirname);\n\t\t}\n\t\t\n\t\tfFilesystem::updateFilenameMapForDirectory($this->directory, $new_dirname);\n\t}", "protected function cleanupTestDirectory() {\n\t\tforeach ($this->filesToRemove as $file) {\n\t\t\tif (file_exists($this->testBasePath . $file)) {\n\t\t\t\tunlink($this->testBasePath . $file);\n\t\t\t}\n\t\t}\n\n\t\tforeach ($this->directoriesToRemove as $directory) {\n\t\t\tif (file_exists($this->testBasePath . $directory)) {\n\t\t\t\trmdir($this->testBasePath . $directory);\n\t\t\t}\n\t\t}\n\t}", "protected function tearDown()\n {\n $test_dirs = array(\n ROOT.DS.'test_dir',\n ROOT.DS.'test_new_dir',\n SYSTEM.DS.'test_dir',\n );\n foreach($test_dirs as $f){\n is_dir($f) and rmdir($f);\n }\n }", "public function testDeleteDirectory()\n {\n mkdir(self::$temp.DS.'foo');\n file_put_contents(self::$temp.DS.'foo'.DS.'file.txt', 'Hello World');\n\n Storage::rmdir(self::$temp.DS.'foo');\n\n $this->assertTrue(! is_dir(self::$temp.DS.'foo'));\n $this->assertTrue(! is_file(self::$temp.DS.'foo'.DS.'file.txt'));\n }", "public function testDeleteDirectory()\n {\n $this->createTestDirectories(\n array(\n '/artifacts/foo/12345',\n '/artifacts/foo/67890',\n )\n );\n\n $this->createTestFile( '/artifacts/foo/12345/bar.txt' );\n $this->createTestFile( '/artifacts/foo/67890/bar.txt' );\n $this->createTestFile( '/artifacts/foo/bar.txt' );\n $this->createTestFile( '/artifacts/bar.txt' );\n\n phpucFileUtil::deleteDirectory( PHPUC_TEST_DIR . '/artifacts' );\n\n $this->assertFileNotExists( PHPUC_TEST_DIR . '/artifacts' );\n }", "function rename_folder()\n\t{\n\t\t$new_name = trailingslashit($this->paths['fontdir']).$this->font_name;\n\t\t\n\t\t//delete folder and contents if they already exist\n\t\t$this->delete_folder($new_name);\n\t\n\t\trename($this->paths['tempdir'], $new_name);\n\t}", "public function testMoveRecursive() {\n $sourceDirName = self::TEST_DIR . '/testMoveRecursiveSource/hierachy1';\n $targetDirName = self::TEST_DIR . '/testMoveRecursiveTarget/hierachy1';\n\n mkdir(self::TEST_DIR . '/testMoveRecursiveSource/hierachy1', 0777, true);\n\n $directoryHandle = new Directory(self::TEST_DIR . '/testMoveRecursiveSource');\n\n $directoryHandle->move(new Directory(self::TEST_DIR . '/testMoveRecursiveTarget'));\n\n $this->assertDirectoryExists($targetDirName);\n $this->assertDirectoryNotExists(self::TEST_DIR . '/testMoveRecursiveSource');\n }", "public function testCopyDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::cpdir(self::$temp.DS.'tmp', self::$temp.DS.'tmp2');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt'));\n }", "public function moveDirectory(string $oldDirName, string $newDirName): MoveDirectory\n {\n return $this->addAction(new MoveDirectory($oldDirName, $newDirName));\n }", "public function moveDirectory($oldDirName, $newDirName)\n\t{\n\t\treturn $this->addAction(new MoveDirectory($oldDirName, $newDirName));\n\t}", "public function testDirnameReturnsDirectory()\n {\n file_put_contents(self::$temp.DS.'foo.txt', 'foo');\n\n $this->assertSame(self::$temp, Storage::dirname(self::$temp.DS.'foo.txt'));\n }", "public function testCleanDirectory()\n {\n mkdir(self::$temp.DS.'baz');\n file_put_contents(self::$temp.DS.'baz'.DS.'file.txt', 'Hello World');\n\n Storage::cleandir(self::$temp.DS.'baz');\n\n $this->assertTrue(is_dir(self::$temp.DS.'baz'));\n $this->assertTrue(! is_file(self::$temp.DS.'baz'.DS.'file.txt'));\n }", "function rename($old, $new = null) {\n \n if (!$new) {\n $new = $old;\n \t$old = $this->_file;\n }\n \n if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN' && (strtolower($old) == strtolower($new))) {\n \n $rand = sprintf('%s%s%s%s%s',\n dirname($old),\n DIRECTORY_SEPARATOR,\n microtime(),\n rand(1, 999),\n basename($old)\n );\n \n if (!@rename($old, $rand)) {\n Fire_Error::throwError(sprintf('Failed to temporary rename \"%s\".',\n $old\n ), __FILE__, __LINE__\n );\n }\n $old = $rand;\n }\n \n if (!@rename($old, $new)) {\n Fire_Error::throwError(sprintf('Failed to rename \"%s\" to \"%s\".',\n $old,\n $new\n ), __FILE__, __LINE__\n );\n } \n }", "public function testOnNewDirectory() {\n\n $obj = new FileSystemStorageProvider($this->logger, $this->directory);\n\n $obj->onNewDirectory($this->dir1);\n $this->assertFileExists($this->directory . \"/1\");\n\n $obj->onNewDirectory($this->dir2);\n $this->assertFileExists($this->directory . \"/1/2\");\n\n $obj->onNewDirectory($this->dir3);\n $this->assertFileExists($this->directory . \"/1/2/3\");\n }", "public function testMakeDirectory()\n {\n $this->assertTrue(Storage::mkdir(self::$temp.DS.'created'));\n $this->assertTrue(is_dir(self::$temp.DS.'created'));\n }", "public function testConstructTruncatedSourceDirectory()\n {\n $filter = new FileRename([\n 'target' => $this->newDir]);\n\n $this->assertEquals(\n [0 => [\n 'source' => '*',\n 'target' => $this->newDir,\n 'overwrite' => false,\n 'randomize' => false,\n ]],\n $filter->getFile()\n );\n $this->assertEquals($this->newDirFile, $filter($this->oldFile));\n $this->assertEquals('falsefile', $filter('falsefile'));\n }", "function renameFolder($oldName,$newName){\r\n\t\t\t\t// open the user's directory\r\n\t\t\t\t\t$path = './cloud/'.$_SESSION['SESS_USER_ID'].'/'; // '.' for current\r\n\r\n\r\n\t\t\t}", "public function test_mkdir_and_rmdir() {\n /**\n * Test creating a single directory\n */\n $dir = 'dir1';\n $uri = 'test://'.$dir;\n $path = $this->test_dir.'/'.$dir;\n\n mkdir($uri);\n $this->assertFileExists($path);\n rmdir($uri);\n $this->assertFileNotExists($path);\n\n /**\n * Test creating multiple directories recursively as needed\n */\n $dir = 'dir2/dir3/dir4';\n $uri = 'test://' . $dir;\n $path = $this->test_dir.'/'.$dir;\n\n mkdir($uri, 0777, true);\n\n $error_tripped = false;\n $this->assertFileExists($path);\n try {\n $return = rmdir('test://dir2');\n }\n catch (PHPUnit_Framework_Error $e) {\n $error_tripped = true;\n }\n\n $this->assertTrue($error_tripped, \"rmdir() on a non-empty directory should trigger an error.\");\n $this->assertTrue(wp_rmdir_recursive('test://dir2'));\n $this->assertFileNotExists($this->test_dir.'/dir2');\n }", "function narrative_purge_files($old_narrative_dir, $new_narrative_dir)\n{\n $file_scan = scandir($old_narrative_dir);\n foreach ($file_scan as $filecheck)\n {\n $file_extension = pathinfo($filecheck, PATHINFO_EXTENSION);\n if ($file_extension == 'jpg')\n {\n rename($old_narrative_dir . $filecheck, $new_narrative_dir . $filecheck);\n }\n }\n}", "abstract function rename($old_file, $new_file, $move = FALSE);", "protected static function moveTemporaryDirs()\n {\n if (static::isCapsular()) {\n // Rename directories\n $original = static::getCacheDirs(false);\n foreach (static::getCacheDirs(true) as $i => $tmpDir) {\n \\Includes\\Utils\\FileManager::unlinkRecursive($tmpDir);\n $originalDir = $original[$i];\n rename($originalDir, $tmpDir);\n }\n\n // Rename files\n $original = static::getDecoratorDataFiles(false);\n foreach (static::getDecoratorDataFiles(true) as $i => $tmpPath) {\n $destPath = $original[$i];\n if (file_exists($tmpPath)) {\n rename($tmpPath, $destPath);\n }\n }\n }\n }", "public function testEnsureExists() {\n $testDirName = self::TEST_DIR . '/testEnsureExists';\n\n (new Directory($testDirName))->ensureExists();\n\n $this->assertDirectoryExists($testDirName);\n }", "public function tearDown(): void\n {\n if (is_dir($this->tmpPath)) {\n if (file_exists($this->oldFile)) {\n unlink($this->oldFile);\n }\n if (file_exists($this->origFile)) {\n unlink($this->origFile);\n }\n if (file_exists($this->newFile)) {\n unlink($this->newFile);\n }\n if (is_dir($this->newDir)) {\n if (file_exists($this->newDirFile)) {\n unlink($this->newDirFile);\n }\n rmdir($this->newDir);\n }\n rmdir($this->tmpPath);\n }\n }", "function move_dir_to_tmp($src, $id)\n{\n $CI =& get_instance();\n $tmpPath = $CI->config->item('site_data_dir') . '/tmp/' . time() . '/';\n if (!is_dir($tmpPath))\n {\n mkdir($tmpPath, 0775, TRUE);\n }\n $tmpPath .= '/' . $id . '/';\n rename($src, $tmpPath);\n return $tmpPath;\n}", "public function testDirectoryFunctions()\n {\n $dir = 'pear-service-amazon-s3://' . $this->bucketName . '/dir';\n $this->assertFalse(file_exists($dir));\n $this->assertTrue(mkdir($dir));\n $this->assertTrue(is_dir($dir));\n $this->assertTrue(is_readable($dir));\n $this->assertTrue(is_writable($dir));\n $this->assertFalse(is_file($dir));\n $this->assertTrue(rmdir($dir));\n clearstatcache();\n $this->assertFalse(file_exists($dir));\n }", "public function testDeleteDirectoryReturnFalseWhenNotADirectory()\n {\n mkdir(self::$temp.DS.'bar');\n file_put_contents(self::$temp.DS.'bar'.DS.'file.txt', 'Hello World');\n\n $this->assertFalse(Storage::rmdir(self::$temp.DS.'bar'.DS.'file.txt'));\n }", "private function moveFile($old_file, $new_file)\n {\n if (!file_exists($old_file)) {\n return;\n }\n\n if (!is_dir(dirname($new_file))) {\n mkdir(dirname($new_file), 0755, true);\n }\n\n // move the file to the archive folder\n rename($old_file, $new_file);\n }", "public function renameFolder($oldName, $newName)\n {\n // TODO: This is also not atomar and has similar problems as removeFolder()\n\n if ($oldName instanceof Zend_Mail_Storage_Folder) {\n $oldName = $oldName->getGlobalName();\n }\n\n $oldName = trim($oldName, $this->_delim);\n if (strpos($oldName, 'INBOX' . $this->_delim) === 0) {\n $oldName = substr($oldName, 6);\n }\n\n $newName = trim($newName, $this->_delim);\n if (strpos($newName, 'INBOX' . $this->_delim) === 0) {\n $newName = substr($newName, 6);\n }\n\n if (strpos($newName, $oldName . $this->_delim) === 0) {\n /**\n * @see Zend_Mail_Storage_Exception\n */\n require_once 'Zend/Mail/Storage/Exception.php';\n throw new Zend_Mail_Storage_Exception('new folder cannot be a child of old folder');\n }\n\n // check if folder exists and has no children\n $folder = $this->getFolders($oldName);\n\n if ($oldName == 'INBOX' || $oldName == DIRECTORY_SEPARATOR || $oldName == '/') {\n /**\n * @see Zend_Mail_Storage_Exception\n */\n require_once 'Zend/Mail/Storage/Exception.php';\n throw new Zend_Mail_Storage_Exception('wont rename INBOX');\n }\n\n if ($oldName == $this->getCurrentFolder()) {\n /**\n * @see Zend_Mail_Storage_Exception\n */\n require_once 'Zend/Mail/Storage/Exception.php';\n throw new Zend_Mail_Storage_Exception('wont rename selected folder');\n }\n\n $newdir = $this->createFolder($newName);\n\n if (!$folder->isLeaf()) {\n foreach ($folder as $k => $v) {\n $this->renameFolder($v->getGlobalName(), $newName . $this->_delim . $k);\n }\n }\n\n $olddir = $this->_rootdir . '.' . $folder;\n foreach (['tmp', 'new', 'cur'] as $subdir) {\n $subdir = DIRECTORY_SEPARATOR . $subdir;\n if (!file_exists($olddir . $subdir)) {\n continue;\n }\n // using copy or moving files would be even better - but also much slower\n if (!rename($olddir . $subdir, $newdir . $subdir)) {\n /**\n * @see Zend_Mail_Storage_Exception\n */\n require_once 'Zend/Mail/Storage/Exception.php';\n throw new Zend_Mail_Storage_Exception('error while moving ' . $subdir);\n }\n }\n // create a dummy if removing fails - otherwise we can't read it next time\n mkdir($olddir . DIRECTORY_SEPARATOR . 'cur');\n $this->removeFolder($oldName);\n }", "public function testMoveEmpty() {\n $sourceDirName = self::TEST_DIR . '/testMoveEmptySource';\n $targetDirName = self::TEST_DIR . '/testMoveEmptyTarget';\n\n mkdir($sourceDirName);\n\n $directoryHandle = new Directory($sourceDirName);\n\n $directoryHandle->move(new Directory($targetDirName));\n\n $this->assertDirectoryExists($targetDirName);\n $this->assertDirectoryNotExists($sourceDirName);\n }", "public function testCopyDirOverExistingUpcountsDestinationDirname()\n {\n $this->storage->createDir('/', 'dest');\n $this->storage->createDir('/dest', 'tmp');\n $this->storage->createFile('/dest/tmp/', 'a.txt');\n $this->storage->createDir('/', 'tmp');\n $this->storage->createFile('/tmp/', 'b.txt');\n\n $this->storage->copyDir('/tmp', '/dest');\n\n $this->assertDirectoryExists(TEST_REPOSITORY.'/dest/tmp/');\n $this->assertTrue($this->storage->fileExists('/dest/tmp/a.txt'));\n\n $this->assertDirectoryExists(TEST_REPOSITORY.'/dest/tmp (1)');\n $this->assertTrue($this->storage->fileExists('/dest/tmp (1)/b.txt'));\n }", "function moveFiles($src, $dest)\n{\n if (!is_dir($src)) {\n return false;\n }\n\n // If the destination directory does not exist create it\n if (!is_dir($dest)) {\n if (!mkdir($dest)) {\n // If the destination directory could not be created stop processing\n return false;\n }\n }\n\n // Open the source directory to read in files\n $i = new DirectoryIterator($src);\n foreach ($i as $f) {\n if ($f->isFile()) {\n rename($f->getRealPath(), \"$dest/\" . $f->getFilename());\n } else {\n if (!$f->isDot() && $f->isDir()) {\n rmDirRecursive($f->getRealPath(), \"$dest/$f\");\n unlink($f->getRealPath());\n }\n }\n }\n unlink($src);\n}", "public function testRenameTo()\n {\n /*\n * remove all tables\n */\n $tables = $this->fixture->getDBObject()->fetchList('SHOW TABLES');\n foreach($tables as $table) {\n $this->fixture->getDBObject()->simpleQuery('DROP TABLE '. $table['Tables_in_'.$this->fixture->a['db_name']]);\n }\n\n /*\n * create fresh store and check tables\n */\n $this->fixture->setup();\n\n $tables = $this->fixture->getDBObject()->fetchList('SHOW TABLES');\n foreach($tables as $table) {\n $this->assertTrue(\n false !== strpos($table['Tables_in_'.$this->fixture->a['db_name']], $this->dbConfig['db_table_prefix'].'_')\n );\n }\n\n /*\n * rename store\n */\n $prefix = 'new_store';\n $this->fixture->renameTo($prefix);\n\n /*\n * check for new prefixes\n */\n $tables = $this->fixture->getDBObject()->fetchList('SHOW TABLES');\n foreach($tables as $table) {\n $this->assertTrue(\n false !== strpos($table['Tables_in_'.$this->fixture->a['db_name']], $prefix)\n );\n }\n }", "public function testChDir() {\n $currentDir = getcwd();\n $parentDir = dirname($currentDir);\n\n $handle = new Directory($parentDir);\n $handle->chdir();\n\n $this->assertEquals($parentDir, getcwd());\n chdir($currentDir);\n }", "public function testDeleteDirectoryWithLinksAndSymlinks()\n {\n if ( !function_exists( 'link' ) || !function_exists( 'symlink' ) )\n {\n $this->markTestSkipped( 'Missing \"link\" or \"symlink\" function.' );\n return;\n }\n\n $this->createTestDirectories( array( '/logs/foo/12345' ) );\n $this->createTestFile( '/logs/foo/12345/bar.txt' );\n\n $file = PHPUC_TEST_DIR . '/logs/foo/12345/bar.txt';\n\n link( $file, PHPUC_TEST_DIR . '/logs/bar.txt' );\n symlink( $file, PHPUC_TEST_DIR . '/logs/foo/bar.txt' );\n\n phpucFileUtil::deleteDirectory( PHPUC_TEST_DIR . '/logs' );\n\n $this->assertFileNotExists( PHPUC_TEST_DIR . '/logs' );\n }", "protected function tearDown()\n {\n exec('rm -rf '.$this->testDir);\n chdir(__DIR__);\n }", "protected function tearDown()\n {\n exec('rm -rf '.$this->testDir);\n chdir(__DIR__);\n }", "public function testRemoveDirectory()\n {\n $directory = vfsStream::url('foo');\n $method = $this->makeMethodPublic('empty_directory');\n $method->invokeArgs($this->testModel, [$directory, true]);\n\n $this->assertFileNotExists(vfsStream::url('foo'));\n }", "function fn_rename($oldname, $newname, $context = null)\n{\n $result = ($context === null) ? rename($oldname, $newname) : rename($oldname, $newname, $context);\n if ($result !== false) {\n @chmod($newname, is_dir($newname) ? DEFAULT_DIR_PERMISSIONS : DEFAULT_FILE_PERMISSIONS);\n }\n\n return $result;\n}", "public function testDirectoryManagement()\n {\n $limit = 5;\n $filesystem = $this->createFilesystemMock(0, $limit, $limit);\n $instance = $this->createTestInstance($filesystem);\n $this->assertEmpty($instance->getTemporaryDirectories());\n $directories = array();\n for ($i = 0; $i < 5; $i++) {\n $directories[] = $instance->createTemporaryDirectory();\n }\n $this->assertCount($limit, $instance->getTemporaryDirectories());\n $this->assertContains(\n $directories[0],\n $instance->getTemporaryDirectories()\n );\n $instance->removeTemporaryDirectory($directories[0]);\n $this->assertCount($limit - 1, $instance->getTemporaryDirectories());\n $this->assertNotContains(\n $directories[0],\n $instance->getTemporaryDirectories()\n );\n $instance->removeTemporaryDirectories();\n $this->assertCount(0, $instance->getTemporaryDirectories());\n }", "static public function movePhysically($old_path, $new_path)\n {\n\n if(!is_dir($old_path))\n {\n return true;\n }\n \n if (!is_dir($new_path) || !is_writable($new_path))\n {\n $old = umask(0);\n mkdir($new_path, 0770);\n umask($old); \n }\n \n $files = sfFinder::type('file')->maxdepth(0)->in($old_path);\n $success = true;\n\n foreach ($files as $file)\n {\n $success = rename($file, $new_path . '/' . basename($file)) && $success;\n }\n if ($success)\n {\n $folders = sfFinder::type('dir')->maxdepth(0)->in($old_path);\n foreach($folders as $folder)\n {\n $new_name = substr($folder, strlen($old_path));\n $success = self::movePhysically($folder, $new_path . '/' . $new_name) && $success;\n }\n }\n \n $success = rmdir($old_path) && $success;\n\n return $success;\n }", "public function dir_rewinddir() {}", "public function move($new_dirname){\n\t \tif($this->dirname == $new_dirname)\n\t\t\treturn true;\t\t\n\t \t\n\t\tif(!is_dir(Yii::getPathOfAlias('webroot').'/'.$new_dirname))\n\t\t\treturn false;\n\t\t\n\t\t$filename=$this->filename;\n\t\t$new_file=Yii::getPathOfAlias('webroot').'/'.$new_dirname.'/'.$filename.'.'.$this->extension;\n\t\t\n\t\twhile(file_exists($new_file)){\n\t\t\t$filename .= '_copy';\n\t\t\t$new_file=Yii::getPathOfAlias('webroot').'/'.$new_dirname.'/'.$filename.'.'.$this->extension;\n\t\t}\n\t\t\n\t\t$old_file=$this->getAbsolutePath();\n\t\tif(copy($old_file,$new_file)){\n\t\t\t$this->filename=$filename;\n\t\t\t$this->dirname=$new_dirname;\n\t\t\tif($this->save()){\n\t\t\t\tunlink($old_file);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tunlink($new_file);\n\t\t\t\treturn false;\n\t\t\t}\t\t\t\t\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t\t}", "public static function move($_path, $_target)\r\n {\r\n return rename($_path, $_target);\r\n }", "protected function tearDown()\n {\n if (file_exists(\"{$this->dir}/file1.mock\")) unlink(\"{$this->dir}/file1.mock\");\n if (file_exists(\"{$this->dir}/file2.mock\")) unlink(\"{$this->dir}/file2.mock\");\n if (file_exists(\"{$this->dir}/dir1/file3.mock\")) unlink(\"{$this->dir}/dir1/file3.mock\");\n if (file_exists(\"{$this->dir}/dir1/file4.mock\")) unlink(\"{$this->dir}/dir1/file4.mock\");\n if (file_exists(\"{$this->dir}/dir1\")) rmdir(\"{$this->dir}/dir1\");\n\n if (file_exists(sys_get_temp_dir().'/def/xyz.mock')) unlink(sys_get_temp_dir().'/def/xyz.mock'); \n if (file_exists(sys_get_temp_dir().'/def')) rmdir(sys_get_temp_dir().'/def'); \n\n if (file_exists($this->dir.\"/abc.mock\")) unlink($this->dir.\"/abc.mock\");\n if (file_exists($this->dir.\"/def.mock\")) unlink($this->dir.\"/def.mock\");\n\n if (file_exists(sys_get_temp_dir().'/abc/def/xy/abc.mock')) unlink(sys_get_temp_dir().'/abc/def/xy/abc.mock'); \n if (file_exists(sys_get_temp_dir().'/abc/def/xy/dd.mock')) unlink(sys_get_temp_dir().'/abc/def/xy/dd.mock'); \n if (file_exists(sys_get_temp_dir().'/abc/def/xy')) rmdir(sys_get_temp_dir().'/abc/def/xy'); \n if (file_exists(sys_get_temp_dir().'/abc/def')) rmdir(sys_get_temp_dir().'/abc/def'); \n if (file_exists(sys_get_temp_dir().'/abc')) rmdir(sys_get_temp_dir().'/abc'); \n \n if (file_exists(\"{$this->dir}/dir2\")) rmdir(\"{$this->dir}/dir2\");\n if (file_exists($this->dir)) rmdir($this->dir);\n \n Config_Mock_Unserialize:$created = array();\n unset(Q\\Transform::$drivers['from-mock']);\n }", "public static function renamefile()\n\t{\n\t\tglobal $g_dir;\n\t\t$filetorename = $_POST['fileToRename'];\n\t\t$newfilename = $_POST['newRenamedFileName'];\n\n\t\t//$dir= '/var/www/html/UPLOADS/';\n\n\t\tif(rename($g_dir.$filetorename, $g_dir.$newfilename))\n\t\t\techo(\"Successfully renamed $filetorename to $newfilename!\");\n\t\telse\n\t\t\techo(\"ERROR: Could not rename $filetorename to $newfilename!\");\n\t}", "public function tearDown() {\n\t\tif(is_dir('/tmp/clara')) {\n\t\t\t$this->rrmdir('/tmp/clara');\n\t\t}\n\t}", "public function testOnDeletedDirectory() {\n\n $obj = new FileSystemStorageProvider($this->logger, $this->directory);\n\n $this->dir3->setParent($this->dir1); // This directory was moved.\n\n $obj->onDeletedDirectory($this->dir3);\n $this->assertFileNotExists($this->directory . \"/1/3\");\n\n $obj->onDeletedDirectory($this->dir2);\n $this->assertFileNotExists($this->directory . \"/1/2\");\n\n $obj->onDeletedDirectory($this->dir1);\n $this->assertFileNotExists($this->directory . \"/1\");\n }", "function moveFinalDirectories($aBooksDone, $aDirectories)\r\n{\r\n\t$readydir = $aDirectories['ready'];\r\n\t$sipdir = $aDirectories['sip'];\r\n\t$result = 0;\r\n\r\n\tforeach ($aBooksDone as $itemnumber) {\r\n\t\t$sourcedir = $readydir . '\\\\' . $itemnumber;\r\n\t\t$destinationdir = $sipdir . '\\\\' . $itemnumber;\r\n\r\n\t\tif (!(@opendir($destinationdir))) {\r\n\t\t\t$mk = mkdir($destinationdir);\r\n\t\t\t//if ($mk === FALSE) {\r\n\t\t\t//\t$result = 0;\r\n\t\t\t//\treturn $result;\r\n\t\t\t//}\r\n\t\t}\r\n\r\n\t\t$dh = opendir($sourcedir);\r\n if ($dh) {\r\n while (($file = @readdir($dh)) !== false) {\r\n if ($file != \".\" && $file != \"..\") {\r\n $source = $sourcedir . \"\\\\\" . $file;\r\n $destination = $destinationdir . \"\\\\\" . $file;\r\n //echo 'ik zou ' . $source . ' verplaatsen naar ' . $destination . '<br>';\r\n $result = @rename($source, $destination);\r\n }\r\n }\r\n \t\t}\r\n\r\n\t\t$result = rmdir($sourcedir);\r\n\t}\r\n\r\n\treturn $result;\r\n}", "public function renameOnDFS( $oldPath, $newPath )\n {\n $this->accumulatorStart();\n\n $oldPath = $this->makeDFSPath( $oldPath );\n $newPath = $this->makeDFSPath( $newPath );\n\n if(strpos($oldPath,'/storage/') !== FALSE )\n {\n try\n {\n $result = $this->s3->getObject(array('Bucket' => $this->bucket,\n 'Key' => $oldPath));\n $contents=(string) $result['Body'];\n \n $this->s3->putObject(array('Bucket' => $this->bucket,\n 'Key' => $newPath,\n 'Body' => $contents,\n 'ACL' => 'public-read'));\n \n $this->s3->deleteObject(array('Bucket' => $this->bucket,\n 'Key' => $oldPath ));\n $ret = true;\n }catch(S3Exception $e){\n $ret =false;\n }\n }\n else\n {\n $item_old = $this->pool->getItem($oldPath);\n $item_new = $this->pool->getItem($newPath);\n \n $item_new->lock();\n $item_new->set($item_old->get($oldPath));\n $item_old->clear();\n\n $ret = eZFile::rename( $oldPath, $newPath, true );\n\n if ( $ret )\n eZClusterFileHandler::cleanupEmptyDirectories( $oldPath );\n }\n \n $this->accumulatorStop();\n\n return $ret;\n }", "public function testCreateSubDirsWithExistingDirectory()\n {\n mkdir($this->dir.'56');\n $this->assertNotEmpty($this->hd->getHash());\n }", "function moveDIR($dir,$dest=\"\",$debug,$nMode=0755) {\n //$debug = 1;\n $result=true;\n\n //if($debug) { echo \"<h2>Moving directory</h2><p> From:<br> $dir <br>To: $dest</p>\";}\n\n $path = dirname(__FILE__);\n $files = scandir($dir);\n\n foreach($files as $file) {\n if (substr( $file ,0,1) != \".\") {\n $pathFile = $dir.'/'.$file;\n if (is_dir($pathFile)) {\n //if($debug) { echo \"<p><b>Directory:</b> $pathFile</p>\"; }\n\n $newDir = $dest.\"/\".$file;\n\n if (!moveDIR($pathFile,$newDir,$debug)) {\n $result = false;\n }\n\n } else {\n //echo ($debug) ? \"<p>$pathFile is a file</p>\" : \"\";\n\n // $currentFile = realpath($file); // current location\n $currentFile = $pathFile;\n\n $newFile = $dest.\"/\".$file;\n\n if (!file_exists($dest)) {\n makeDIR($dest,0,$nMode);\n }\n // if file already exists remove it\n if (file_exists($newFile)) {\n //if($debug) { echo \"<p>File $newFile already exists - Deleting</p>\"; }\n unlink($newFile);\n } else {\n //if($debug) { echo \"<p>File $newFile doesn't exist yet</p>\"; }\n }\n\n // Move via rename\n // rename(oldname, newname)\n if (rename($currentFile , $newFile)) {\n (CHMOD == 1) ? chmod($newFile, 0755) : '';\n //if($debug) { echo \"<p>Moved $currentFile to $newFile</p>\"; }\n } else {\n //if($debug) { echo \"<p>Failed to move $currentFile to $newFile</p>\"; }\n $result = false;\n } // END rename \n\n } // END if dir or file\n } // end if no dot\n } // END foreach\n return $result;\n }", "function rename_folder($json_path,$folder,$newFolder){\n\t$oldPath = $json_path.$folder;\n\t$newPath = $json_path.$newFolder;\n\tif(!file_exists($oldPath)){\n\t\treturn 'no exist';\n\t}\n\tif(file_exists($newPath)){\n\t\treturn 'folder just exist';\n\t}\n\tif(rename($oldPath,$newPath)){\n\t\treturn 'renamed';\n\t} else {\n\t\treturn 'fatal error';\n\t}\n}", "public function rename_folder($folder, $new_name) {\n\n // mailbox esists?\n $mailbox_idnr = $this->get_mail_box_id($folder);\n if (!$mailbox_idnr) {\n // mailbox not found\n return FALSE;\n }\n\n // ACLs check ('create' grant required )\n $ACLs = $this->_get_acl($folder);\n if (!is_array($ACLs) || !in_array(self::ACL_CREATE_FLAG, $ACLs)) {\n // Unauthorized!\n return FALSE;\n }\n\n // new mailbox name already exists?\n if ($this->get_mail_box_id($new_name)) {\n // name already exist\n return FALSE;\n }\n\n // start transaction\n if (!$this->dbmail->startTransaction()) {\n return FALSE;\n }\n\n // has children?\n $sub_folders = $this->get_sub_folders($folder);\n\n if (count($sub_folders) > 0) {\n\n // target path segment level\n $current_path_segment_level = count(explode($this->delimiter, $folder));\n\n // fetch children\n foreach ($sub_folders as $sub_folder_idnr => $sub_folder_name) {\n\n // explode sub folder name\n $exploded_sub_folder = explode($this->delimiter, $sub_folder_name);\n\n // append to $new_name sub folders\n $new_sub_folder_name = $new_name . $this->delimiter . implode($this->delimiter, array_slice($exploded_sub_folder, $current_path_segment_level));\n\n // rename sub folder\n $query = \"UPDATE dbmail_mailboxes \"\n . \" set name = '{$this->dbmail->escape($new_sub_folder_name)}' \"\n . \" WHERE mailbox_idnr = {$this->dbmail->escape($sub_folder_idnr)} \";\n\n if (!$this->dbmail->query($query)) {\n // rollbalk transaction\n $this->dbmail->rollbackTransaction();\n return FALSE;\n }\n\n // increment folder 'seq' flag\n if (!$this->increment_mailbox_seq($sub_folder_idnr)) {\n $this->dbmail->rollbackTransaction();\n return FALSE;\n }\n\n // unset temporary stored mailbox_id (if present)\n if (!$this->unset_temp_value(\"MBOX_ID_{$sub_folder_name}_{$this->user_idnr}\")) {\n $this->dbmail->rollbackTransaction();\n return FALSE;\n }\n }\n }\n\n // rename target folder\n $query = \"UPDATE dbmail_mailboxes \"\n . \" set name = '{$this->dbmail->escape($new_name)}' \"\n . \" WHERE mailbox_idnr = {$this->dbmail->escape($mailbox_idnr)} \";\n\n if (!$this->dbmail->query($query)) {\n // rollbalk transaction\n $this->dbmail->rollbackTransaction();\n return FALSE;\n }\n\n // increment folder 'seq' flag\n if (!$this->increment_mailbox_seq($mailbox_idnr)) {\n $this->dbmail->rollbackTransaction();\n return FALSE;\n }\n\n // unset temporary stored mailbox_id (if present)\n if (!$this->unset_temp_value(\"MBOX_ID_{$folder}_{$this->user_idnr}\")) {\n $this->dbmail->rollbackTransaction();\n return FALSE;\n }\n\n return ($this->dbmail->endTransaction() ? TRUE : FALSE);\n }", "public function rename($new_name) {\n\t\t$new_path = $this->getParentDirectory()->getPath().DIRECTORY_SEPARATOR.$new_name;\n\t\tif (!rename($this->getPath(), $new_path)) throw new \\Exception(\"Couldn't rename the file $this to $new_path\");\n\t\t$this->path = $new_path;\n\t}", "public function testExists() {\n $testDirName = self::TEST_DIR . '/testExists';\n\n $handle = (new Directory($testDirName));\n\n mkdir($testDirName);\n $this->assertTrue($handle->exists());\n\n rmdir($testDirName);\n $this->assertFalse($handle->exists());\n }", "public function rename($path, $newpath)\n {\n }", "function _moveFile($sourceDir, $destDir, $filename) {\n\t\t$currentFilePath = $sourceDir . DIRECTORY_SEPARATOR . $filename;\n\t\t$destinationPath = $destDir . DIRECTORY_SEPARATOR . $filename;\n\n\t\tif (!rename($currentFilePath, $destinationPath)) {\n\t\t\t$message = __('admin.fileLoader.moveFileFailed', array('filename' => $filename,\n\t\t\t\t'currentFilePath' => $currentFilePath, 'destinationPath' => $destinationPath));\n\t\t\t$this->addExecutionLogEntry($message, SCHEDULED_TASK_MESSAGE_TYPE_ERROR);\n\n\t\t\t// Script should always stop if it can't manipulate files inside\n\t\t\t// its own directory system.\n\t\t\tfatalError($message);\n\t\t}\n\n\t\treturn $destinationPath;\n\t}", "abstract function changedir($path = '', $supress_debug = FALSE);", "public function testMkdirRecursive() {\n $testDirName = self::TEST_DIR . '/testMkdirRecursive/recursiveFlag';\n\n (new Directory($testDirName))->mkdir(true);\n\n $this->assertDirectoryExists($testDirName);\n }", "function makedir($dir)\n{\n\tglobal $config_vars;\n\t$ret = ForceDirectories($dir,$config_vars['dir_mask']);\n\ttouch ($dir . '/index.html');\n\treturn $ret;\n}", "public function testRenameKey()\n {\n $data = array(\n 'Hello' => 'Funilrys',\n 'How' => 'is',\n 'Are' => 'on',\n 'You?' => 'GitHub'\n );\n $toChange = array(\n 'How' => 'world',\n 'Are' => 'from',\n 'You?' => 'Germany'\n );\n\n $validKeys = array('Hello', 'world', 'from', 'Germany');\n $validValues = array('Funilrys', 'is', 'on', 'GitHub');\n\n $invalidData = array('Funilrys', 'is', 'on', 'GitHub');\n $invalidToChange = array('Hello', 'How', 'Are', 'You?');\n\n $this\n ->given($array = new classToTest())\n ->then\n ->array($array::renameKey($data, $toChange))\n ->keys\n ->isEqualTo($validKeys)\n ->array($array::renameKey($data, $toChange))\n ->containsValues($validValues)\n ->array($array::renameKey($data, $toChange))\n ->isNotEmpty()\n ->boolean($array::renameKey($invalidData, $invalidToChange))\n ->isFalse()\n ;\n }", "public function rename($new_name, $new_extension = false)\n\t{\n\t\t$info = pathinfo($this->path);\n\n\t\t$new_name = str_replace(array('..', '/', '\\\\'), array('', '', ''), $new_name);\n\t\t$extension = $new_extension === false\n\t\t\t? $info['extension']\n\t\t\t: ltrim(str_replace(array('/', '\\\\'), array('', '', ''), $new_name), '.');\n\t\t$extension = ! empty($extension) ? '.'.$extension : '';\n\n\t\t$new_path = $info['dirname'].DS.$new_name.$extension;\n\n\t\t$return = $this->area->rename($this->path, $new_path);\n\t\t$return and $this->path = $new_path;\n\t\t\n\t\treturn $return;\n\t}", "protected function removeTestFilePath()\n {\n $path = $this->getTestFilePath();\n FileHelper::removeDirectory($path);\n }", "public function rename(string $source, string $newFileName): bool\n {\n $path = pathinfo($source);\n $newFilePath = $path['dirname'] . '/' . $newFileName;\n\n return rename($source, $newFilePath);\n }", "private function renameTempFile($path, $newPath, $webRoot)\n {\n $fs = $this->getFileSystem();\n\n $fs->copy($webRoot.$path, $webRoot.$newPath, true);\n $fs->remove($webRoot.$path);\n }", "function tearDown() {\n\t\t$this->wfRecursiveRemoveDir( $this->tmpName );\n\t}", "public function move($new_path)\n\t{\n\t\t$info = pathinfo($this->path);\n\t\t$new_path = $this->area->get_path($new_path);\n\n\t\t$new_path = rtrim($new_path, '\\\\/').DS.$info['basename'];\n\n\t\t$return = $this->area->rename($this->path, $new_path);\n\t\t$return and $this->path = $new_path;\n\t\t\n\t\treturn $return;\n\t}", "protected function tearDown()\n {\n chdir(CWD);\n }", "function renameDirectory($path=\"\", $filter, $transform) {\n\t\t$dir_handle = @opendir($path) or die(\"Unable to open $path\");\n\n\t\t//running the while loop\n\t\t$count = 0;\n\n\t\twhile ($name = readdir($dir_handle)) \n\t\t{\n\t\t\t// echo \"dir loop: $path/$name\\n\";\n\t\t\tif(strpos($name, \".\") === 0) {\n\t\t\t\t// skipping dot file\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// run the item through our filter\n\t\t\tif($filter && !$filter($name)) {\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\t// transform it\n\t\t\t\t$newName = $transform($name);\n\t\t\t\t$this->log(\"$name transformed to $newName\");\n\t\t\t\tif($this->dryRun) {\n\t\t\t\t\t$this->log(\"(dry run) rename $path/$name to $path/$newName\");\n\t\t\t\t} else {\n\t\t\t\t\t$result = rename(\"$path/$name\", \"$path/$newName\");\n\t\t\t\t\tif(!$result) {\n\t\t\t\t\t\tthrow new Exception(\"Failed to rename: $path/$name to $path/$newName\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$name = $newName;\n\t\t\t}\n\t\t\t\n\t\t\tif(is_dir(\"$path/$name\")) {\n\t\t\t\t$this->renameDirectory(\"$path/$name\", $filter, $transform);\n\t\t\t}\n\t\t\t$count++;\n\t\t}\n\t\tclosedir($dir_handle);\n\n\t\t// // return array\n\t\t// return $items;\n\t}", "function frename($oldfile=false, $newfile=false, $dir=false) {\n//\t\t$ereg = '\\.([a-zA-Z0-9]*)$';\n//\t\tereg($ereg, $oldfile, $arr);\n preg_match('/\\.([a-zA-Z0-9]*)$/', $oldfile, $arr);\n\t\tif (ereg('/\\.([a-zA-Z0-9]*)$/', $newfile)) \n\t\t $newfile = preg_replace('/\\.([a-zA-Z0-9]*)$/', \".\" . $arr[1], $newfile);\n\t\telse $newfile .= \".\" . $arr[1];\n\t\treturn $this->rename($oldfile, $newfile, $dir);\n\t}", "public function & renamePath ($newRenamedName) {\n if (($this->pathExists->toBoolean () == TRUE) && !(file_exists ($newRenamedName))) {\n if (rename ($this->varContainer, $newRenamedName)) {\n $this->varContainer = $newRenamedName;\n return $this->returnToChain ();\n } else {\n if (self::checkCanOutputErrorScreen ()->toBoolean ()) {\n self::renderScreenOfDeath (new S (__CLASS__),\n new S (RENAME_OPERATION_FAILED),\n new S (RENAME_OPERATION_FAILED_FIX));\n } else {\n return $this->pathExists;\n }\n }\n } else {\n return $this->pathExists;\n }\n }", "public function moveTo(Directory $dir) {\n\t\t$new_path = $this->pathIn($dir);\n\t\tif (!rename($this->getPath(), $new_path)) throw new \\Exception(\"Couldn't rename the file $this to $new_path\");\n\t\t$this->path = $new_path;\n\t}", "public function testRemoveDummyTestFileAfterDoneTest()\n {\n unlink(TESTING_STORE);\n\n // boolean result must be === false\n $this->assertFalse(file_exists(TESTING_STORE));\n }", "public function createDirectory(Directory $directory): void;", "protected function createDirectory() {}", "public static function rename($old, $new) {\n $old = self::resolvePath($old);\n $new = self::resolvePath($new);\n\n self::assertExists($old);\n\n $ok = rename($old, $new);\n if (!$ok) {\n throw new FilesystemException(\n $new,\n pht(\"Failed to rename '%s' to '%s'!\", $old, $new));\n }\n }", "public function rename($source, $destination);", "public function rename($newname);", "public function testMoveFolder()\n {\n $remoteFolder = \"TestData/In\";\n\n $localName = \"Book1.xlsx\";\n $remoteName = \"Book1.xlsx\";\n\n CellsApiTestBase::ready( $this->instance,$localName ,$remoteFolder . \"/\" . $remoteName , \"\");\n \n $request = new MoveFolderRequest();\n $request->setSrcPath( \"OutResult/Create\");\n $request->setDestPath( \"OutResult/Move\");\n $request->setSrcStorageName( \"\");\n $request->setDestStorageName( \"\");\n $this->instance->moveFolder($request);\n }", "public function changeCurrentDirectory(Directory $newCurrentDirectory);", "public function testMoveSuccess_zipSubfolder()\n {\n $file = array(\"name\"=>\"zipSubfolder.zip\", \"size\"=>500, \"tmp_name\"=>__DIR__.'/zipSubfolder.zip');\n\n $service = $this->setMockPluginUploaderServiceMoveUploadedFile();\n\n $result = $service->upload($file);\n\n // check we got the correct result\n $this->assertEquals(false, $result);\n }", "function setName( $newName )\r\n\t{\r\n\t\t$basePath = dirname( $this->path );\r\n\t\tif(rename( $this->path, $basePath.'/'.$newName ))\r\n\t\t{\r\n\t\t\t$this->path = $basePath.'/'.$newName;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\ttrigger_error(\"Não foi possível renomear a pasta \" . $this->path);\r\n\t\t}\r\n\t}", "public function uploadCheckForExistingFile($directory, $testFilename)\n\t{\n\t\tif (file_exists($directory . $testFilename)) {\n\t\t\t$filenamePieces = explode('_', $testFilename);\n\n\t\t\tif (is_numeric($filenamePieces[0])) {\n\t\t\t\t$filenamePieces[0] = intval($filenamePieces[0]) + 1;\n\t\t\t\t$newFilenamePieces = $filenamePieces;\n\t\t\t} else {\n\t\t\t\t$newFilenamePieces = array_merge([0], $filenamePieces);\n\t\t\t}\n\n\t\t\treturn $this->uploadCheckForExistingFile($directory, implode('_', $newFilenamePieces));\n\t\t} else {\n\t\t\treturn $testFilename;\n\t\t}\n\t}" ]
[ "0.7675573", "0.6942143", "0.6803566", "0.66557056", "0.6410179", "0.63514674", "0.63316065", "0.6303983", "0.62753636", "0.6271949", "0.6264431", "0.6144328", "0.6107304", "0.6092823", "0.60601956", "0.6049897", "0.6024232", "0.60035455", "0.59846485", "0.59535265", "0.59388083", "0.59384656", "0.5845024", "0.58058167", "0.58050144", "0.57979053", "0.5794211", "0.5774315", "0.57674843", "0.5746615", "0.5708963", "0.56981796", "0.5697029", "0.5694243", "0.5659459", "0.5654342", "0.559932", "0.5583654", "0.5577599", "0.55681765", "0.5548854", "0.5540921", "0.55369276", "0.55194485", "0.5514052", "0.5511689", "0.5510175", "0.54919803", "0.5491625", "0.5475125", "0.5473948", "0.5467575", "0.5467575", "0.5453702", "0.54414594", "0.54276425", "0.5409281", "0.5386303", "0.53822905", "0.537898", "0.534635", "0.5336339", "0.5326326", "0.5323985", "0.53125596", "0.5308049", "0.5301367", "0.5299388", "0.5294618", "0.5285136", "0.52823514", "0.52817947", "0.52639127", "0.52604246", "0.5220661", "0.5213533", "0.5211713", "0.5195872", "0.5194506", "0.518953", "0.51854306", "0.51623887", "0.5157265", "0.51521087", "0.51246136", "0.51197916", "0.5119735", "0.51185906", "0.5106501", "0.5101603", "0.50863385", "0.5083668", "0.50755155", "0.50605386", "0.50495386", "0.5049277", "0.50449926", "0.50417894", "0.5022774", "0.50223505" ]
0.8054311
0
Test for Directory::rename() Create a new Directory named test_dir and renames it with the same name. At the end of the test, remove the created directory.
Тест для Directory::rename() Создать новый Directory с именем test_dir и переименовать его в то же имя. В конце теста удалить созданный каталог.
public function test_rename_same_name() { $object = Directory::create(ROOT.DS.'test_dir'); $object->rename('test_dir'); $this->assertEquals($object->get_base_name(), 'test_dir'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_rename()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->rename('test_new_dir');\n $this->assertEquals($object->get_base_name(), 'test_new_dir');\n }", "public function testMoveDirectoryMovesEntireDirectoryAndOverwrites()\n {\n mkdir(self::$temp.DS.'tmp4', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp4'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp4'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'nested'.DS.'baz.txt', '');\n\n mkdir(self::$temp.DS.'tmp5', 0777, true);\n file_put_contents(self::$temp.DS.'tmp5'.DS.'foo2.txt', '');\n file_put_contents(self::$temp.DS.'tmp5'.DS.'bar2.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp4', self::$temp.DS.'tmp5', true);\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'foo2.txt'));\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'bar2.txt'));\n $this->assertFalse(is_dir(self::$temp.DS.'tmp4'));\n }", "public function testMoveDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp2', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp2'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp2'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp2', self::$temp.DS.'tmp3');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_dir(self::$temp.DS.'tmp2'));\n }", "public function test_move_directory_exists()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT, false);\n }", "public function test_remove()\n {\n $path = ROOT.DS.'test_dir';\n $object = Directory::create($path);\n $object->remove($path);\n $this->assertFalse(is_dir($path));\n }", "public function testRename()\n {\n $oldFilename = static::$baseFile . '/fs/tmp.txt';\n $newFilename = static::$baseFile . '/fs/test/tmp.txt';\n\n file_put_contents($oldFilename, 'It works!');\n\n $this->assertTrue(rename($oldFilename, $newFilename));\n\n $this->assertFalse(file_exists($oldFilename));\n $this->assertTrue(file_exists($newFilename));\n }", "public function renameDirectory(DirectoryInterface $directory, string $newName): DirectoryInterface;", "public function test_move()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(SYSTEM);\n $this->assertTrue(is_dir(SYSTEM.DS.'test_dir'));\n $this->assertFalse(is_dir(ROOT.DS.'test_dir'));\n $this->assertEquals($object->get_path(), SYSTEM.DS.'test_dir');\n }", "public function testConstructSingleDirectory()\n {\n $filter = new FileRename($this->newDir);\n\n $this->assertEquals(\n [0 => [\n 'source' => '*',\n 'target' => $this->newDir,\n 'overwrite' => false,\n 'randomize' => false,\n ]],\n $filter->getFile()\n );\n $this->assertEquals($this->newDirFile, $filter($this->oldFile));\n $this->assertEquals('falsefile', $filter('falsefile'));\n }", "public function test_move_not_exists_dir()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT.DS.'not_exist');\n }", "private function renameDirectories(): void\n {\n //update directory names and update file created paths accordingly\n foreach ($this->dirsToRename as $dirPath) {\n $updateDirPath = $this->pathHelper->renamePathBasenameSingularOrPlural(\n $dirPath,\n $this->singularNamespacedName,\n $this->pluralNamespacedName\n );\n foreach ($this->filesCreated as $k => $filePath) {\n $this->filesCreated[$k] = str_replace($dirPath, $updateDirPath, $filePath);\n }\n }\n }", "public function testDeleteDirectory()\n {\n mkdir(self::$temp.DS.'foo');\n file_put_contents(self::$temp.DS.'foo'.DS.'file.txt', 'Hello World');\n\n Storage::rmdir(self::$temp.DS.'foo');\n\n $this->assertTrue(! is_dir(self::$temp.DS.'foo'));\n $this->assertTrue(! is_file(self::$temp.DS.'foo'.DS.'file.txt'));\n }", "public function testMkdir() {\n $testDirName = self::TEST_DIR . '/testMkdir';\n\n (new Directory($testDirName))->mkdir();\n\n $this->assertDirectoryExists($testDirName);\n }", "public function testDeleteDirectory()\n {\n $this->createTestDirectories(\n array(\n '/artifacts/foo/12345',\n '/artifacts/foo/67890',\n )\n );\n\n $this->createTestFile( '/artifacts/foo/12345/bar.txt' );\n $this->createTestFile( '/artifacts/foo/67890/bar.txt' );\n $this->createTestFile( '/artifacts/foo/bar.txt' );\n $this->createTestFile( '/artifacts/bar.txt' );\n\n phpucFileUtil::deleteDirectory( PHPUC_TEST_DIR . '/artifacts' );\n\n $this->assertFileNotExists( PHPUC_TEST_DIR . '/artifacts' );\n }", "protected function cleanupTestDirectory() {\n\t\tforeach ($this->filesToRemove as $file) {\n\t\t\tif (file_exists($this->testBasePath . $file)) {\n\t\t\t\tunlink($this->testBasePath . $file);\n\t\t\t}\n\t\t}\n\n\t\tforeach ($this->directoriesToRemove as $directory) {\n\t\t\tif (file_exists($this->testBasePath . $directory)) {\n\t\t\t\trmdir($this->testBasePath . $directory);\n\t\t\t}\n\t\t}\n\t}", "public function testRenameFailure($newFilename)\n {\n $oldFilename = static::$baseFile . '/fs/tmp.txt';\n\n file_put_contents($oldFilename, 'It works!');\n $this->assertFalse(rename($oldFilename, $newFilename));\n }", "protected function tearDown()\n {\n $test_dirs = array(\n ROOT.DS.'test_dir',\n ROOT.DS.'test_new_dir',\n SYSTEM.DS.'test_dir',\n );\n foreach($test_dirs as $f){\n is_dir($f) and rmdir($f);\n }\n }", "function narrative_move_files($current_narrative_dir, $new_narrative_dir)\n{\n $file_scan = scandir($current_narrative_dir);\n foreach ($file_scan as $filecheck)\n {\n if ($filecheck != '.' && $filecheck != '..' && !is_dir($current_narrative_dir . $filecheck))\n {\n rename($current_narrative_dir . $filecheck, $new_narrative_dir . $filecheck);\n }\n }\n}", "public function testCleanDirectory()\n {\n mkdir(self::$temp.DS.'baz');\n file_put_contents(self::$temp.DS.'baz'.DS.'file.txt', 'Hello World');\n\n Storage::cleandir(self::$temp.DS.'baz');\n\n $this->assertTrue(is_dir(self::$temp.DS.'baz'));\n $this->assertTrue(! is_file(self::$temp.DS.'baz'.DS.'file.txt'));\n }", "protected function createRealTestdir() {}", "public function testMoveRecursive() {\n $sourceDirName = self::TEST_DIR . '/testMoveRecursiveSource/hierachy1';\n $targetDirName = self::TEST_DIR . '/testMoveRecursiveTarget/hierachy1';\n\n mkdir(self::TEST_DIR . '/testMoveRecursiveSource/hierachy1', 0777, true);\n\n $directoryHandle = new Directory(self::TEST_DIR . '/testMoveRecursiveSource');\n\n $directoryHandle->move(new Directory(self::TEST_DIR . '/testMoveRecursiveTarget'));\n\n $this->assertDirectoryExists($targetDirName);\n $this->assertDirectoryNotExists(self::TEST_DIR . '/testMoveRecursiveSource');\n }", "function rename_folder()\n\t{\n\t\t$new_name = trailingslashit($this->paths['fontdir']).$this->font_name;\n\t\t\n\t\t//delete folder and contents if they already exist\n\t\t$this->delete_folder($new_name);\n\t\n\t\trename($this->paths['tempdir'], $new_name);\n\t}", "public function testDirnameReturnsDirectory()\n {\n file_put_contents(self::$temp.DS.'foo.txt', 'foo');\n\n $this->assertSame(self::$temp, Storage::dirname(self::$temp.DS.'foo.txt'));\n }", "public function test_mkdir_and_rmdir() {\n /**\n * Test creating a single directory\n */\n $dir = 'dir1';\n $uri = 'test://'.$dir;\n $path = $this->test_dir.'/'.$dir;\n\n mkdir($uri);\n $this->assertFileExists($path);\n rmdir($uri);\n $this->assertFileNotExists($path);\n\n /**\n * Test creating multiple directories recursively as needed\n */\n $dir = 'dir2/dir3/dir4';\n $uri = 'test://' . $dir;\n $path = $this->test_dir.'/'.$dir;\n\n mkdir($uri, 0777, true);\n\n $error_tripped = false;\n $this->assertFileExists($path);\n try {\n $return = rmdir('test://dir2');\n }\n catch (PHPUnit_Framework_Error $e) {\n $error_tripped = true;\n }\n\n $this->assertTrue($error_tripped, \"rmdir() on a non-empty directory should trigger an error.\");\n $this->assertTrue(wp_rmdir_recursive('test://dir2'));\n $this->assertFileNotExists($this->test_dir.'/dir2');\n }", "public function testCopyDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::cpdir(self::$temp.DS.'tmp', self::$temp.DS.'tmp2');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt'));\n }", "public function renameDir($curpath, $newname)\n {\n $filterSlug = new FrontZend_Filter_Slug();\n $newpath = strstr($newname, '/') || strstr($newname, DIRECTORY_SEPARATOR)\n ? $newname\n : substr($curpath, 0, strrpos($curpath, DIRECTORY_SEPARATOR)+1)\n . $filterSlug->filter($newname);\n\n $newfullpath = Media_Model_File::getFullPath($newpath);\n if (is_dir($newfullpath)) {\n throw new FrontZend_Exception('Já existe uma pasta com este nome');\n }\n\n $curfullpath = Media_Model_File::getFullPath($curpath);\n\n if (is_dir($curfullpath)) {\n if (rename($curfullpath, $newfullpath)) {\n try {\n $this->_renamePath($curpath, $newpath);\n return true;\n } catch(Exception $e) {\n rename($newfullpath, $curfullpath);\n throw $e;\n }\n\n };\n }\n return false;\n }", "public function testMakeDirectory()\n {\n $this->assertTrue(Storage::mkdir(self::$temp.DS.'created'));\n $this->assertTrue(is_dir(self::$temp.DS.'created'));\n }", "protected static function moveTemporaryDirs()\n {\n if (static::isCapsular()) {\n // Rename directories\n $original = static::getCacheDirs(false);\n foreach (static::getCacheDirs(true) as $i => $tmpDir) {\n \\Includes\\Utils\\FileManager::unlinkRecursive($tmpDir);\n $originalDir = $original[$i];\n rename($originalDir, $tmpDir);\n }\n\n // Rename files\n $original = static::getDecoratorDataFiles(false);\n foreach (static::getDecoratorDataFiles(true) as $i => $tmpPath) {\n $destPath = $original[$i];\n if (file_exists($tmpPath)) {\n rename($tmpPath, $destPath);\n }\n }\n }\n }", "public function testDeleteDirectoryReturnFalseWhenNotADirectory()\n {\n mkdir(self::$temp.DS.'bar');\n file_put_contents(self::$temp.DS.'bar'.DS.'file.txt', 'Hello World');\n\n $this->assertFalse(Storage::rmdir(self::$temp.DS.'bar'.DS.'file.txt'));\n }", "public function testDirectoryManagement()\n {\n $limit = 5;\n $filesystem = $this->createFilesystemMock(0, $limit, $limit);\n $instance = $this->createTestInstance($filesystem);\n $this->assertEmpty($instance->getTemporaryDirectories());\n $directories = array();\n for ($i = 0; $i < 5; $i++) {\n $directories[] = $instance->createTemporaryDirectory();\n }\n $this->assertCount($limit, $instance->getTemporaryDirectories());\n $this->assertContains(\n $directories[0],\n $instance->getTemporaryDirectories()\n );\n $instance->removeTemporaryDirectory($directories[0]);\n $this->assertCount($limit - 1, $instance->getTemporaryDirectories());\n $this->assertNotContains(\n $directories[0],\n $instance->getTemporaryDirectories()\n );\n $instance->removeTemporaryDirectories();\n $this->assertCount(0, $instance->getTemporaryDirectories());\n }", "public function testRemoveDirectory()\n {\n $directory = vfsStream::url('foo');\n $method = $this->makeMethodPublic('empty_directory');\n $method->invokeArgs($this->testModel, [$directory, true]);\n\n $this->assertFileNotExists(vfsStream::url('foo'));\n }", "public function testEnsureExists() {\n $testDirName = self::TEST_DIR . '/testEnsureExists';\n\n (new Directory($testDirName))->ensureExists();\n\n $this->assertDirectoryExists($testDirName);\n }", "public function tearDown(): void\n {\n if (is_dir($this->tmpPath)) {\n if (file_exists($this->oldFile)) {\n unlink($this->oldFile);\n }\n if (file_exists($this->origFile)) {\n unlink($this->origFile);\n }\n if (file_exists($this->newFile)) {\n unlink($this->newFile);\n }\n if (is_dir($this->newDir)) {\n if (file_exists($this->newDirFile)) {\n unlink($this->newDirFile);\n }\n rmdir($this->newDir);\n }\n rmdir($this->tmpPath);\n }\n }", "public function testOnNewDirectory() {\n\n $obj = new FileSystemStorageProvider($this->logger, $this->directory);\n\n $obj->onNewDirectory($this->dir1);\n $this->assertFileExists($this->directory . \"/1\");\n\n $obj->onNewDirectory($this->dir2);\n $this->assertFileExists($this->directory . \"/1/2\");\n\n $obj->onNewDirectory($this->dir3);\n $this->assertFileExists($this->directory . \"/1/2/3\");\n }", "public function testMoveEmpty() {\n $sourceDirName = self::TEST_DIR . '/testMoveEmptySource';\n $targetDirName = self::TEST_DIR . '/testMoveEmptyTarget';\n\n mkdir($sourceDirName);\n\n $directoryHandle = new Directory($sourceDirName);\n\n $directoryHandle->move(new Directory($targetDirName));\n\n $this->assertDirectoryExists($targetDirName);\n $this->assertDirectoryNotExists($sourceDirName);\n }", "public function testDirectoryFunctions()\n {\n $dir = 'pear-service-amazon-s3://' . $this->bucketName . '/dir';\n $this->assertFalse(file_exists($dir));\n $this->assertTrue(mkdir($dir));\n $this->assertTrue(is_dir($dir));\n $this->assertTrue(is_readable($dir));\n $this->assertTrue(is_writable($dir));\n $this->assertFalse(is_file($dir));\n $this->assertTrue(rmdir($dir));\n clearstatcache();\n $this->assertFalse(file_exists($dir));\n }", "public function testConstructTruncatedSourceDirectory()\n {\n $filter = new FileRename([\n 'target' => $this->newDir]);\n\n $this->assertEquals(\n [0 => [\n 'source' => '*',\n 'target' => $this->newDir,\n 'overwrite' => false,\n 'randomize' => false,\n ]],\n $filter->getFile()\n );\n $this->assertEquals($this->newDirFile, $filter($this->oldFile));\n $this->assertEquals('falsefile', $filter('falsefile'));\n }", "public function testDeleteDirectoryWithLinksAndSymlinks()\n {\n if ( !function_exists( 'link' ) || !function_exists( 'symlink' ) )\n {\n $this->markTestSkipped( 'Missing \"link\" or \"symlink\" function.' );\n return;\n }\n\n $this->createTestDirectories( array( '/logs/foo/12345' ) );\n $this->createTestFile( '/logs/foo/12345/bar.txt' );\n\n $file = PHPUC_TEST_DIR . '/logs/foo/12345/bar.txt';\n\n link( $file, PHPUC_TEST_DIR . '/logs/bar.txt' );\n symlink( $file, PHPUC_TEST_DIR . '/logs/foo/bar.txt' );\n\n phpucFileUtil::deleteDirectory( PHPUC_TEST_DIR . '/logs' );\n\n $this->assertFileNotExists( PHPUC_TEST_DIR . '/logs' );\n }", "public function renameDirNames($base_old_dir, $old_name, $base_new_dir, $new_name) {\n $paths = $this->_arrayDataFolders();\n\n foreach ($paths as $dir) {\n $basePath = WikiGlobalConfig::getConf($dir);\n $oldPath = \"$basePath/$base_old_dir/$old_name\";\n if (file_exists($oldPath)) {\n $newPath = \"$basePath/$base_new_dir/$new_name\";\n if ($base_old_dir !== $base_new_dir && !is_dir($newPath))\n mkdir($newPath, 0775, true);\n if (! rename($oldPath, $newPath))\n throw new Exception(\"renameProjectOrDirectory: Error mentre canviava el nom del projecte/carpeta a $dir.\");\n }\n }\n }", "public function rename($new_dirname, $overwrite)\n\t{\n\t\t$this->tossIfException();\n\t\t\n\t\tif (!$this->getParent()->isWritable()) {\n\t\t\tthrow new fEnvironmentException(\n\t\t\t\t'The directory, %s, can not be renamed because the directory containing it is not writable',\n\t\t\t\t$this->directory\n\t\t\t);\n\t\t}\n\t\t\n\t\t$info = fFilesystem::getPathInfo($new_dirname);\n\t\t\n\t\tif (!file_exists($info['dirname'])) {\n\t\t\tthrow new fProgrammerException(\n\t\t\t\t'The new directory name specified, %s, is inside of a directory that does not exist',\n\t\t\t\t$new_dirname\n\t\t\t);\n\t\t}\n\t\t\n\t\t// Make the dirname absolute\n\t\t$new_dirname = fDirectory::makeCanonical(realpath($new_dirname));\n\t\t\n\t\tif (file_exists($new_dirname)) {\n\t\t\tif (!is_writable($new_dirname)) {\n\t\t\t\tthrow new fEnvironmentException(\n\t\t\t\t\t'The new directory name specified, %s, already exists, but is not writable',\n\t\t\t\t\t$new_dirname\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (!$overwrite) {\n\t\t\t\t$new_dirname = fFilesystem::makeUniqueName($new_dirname);\n\t\t\t}\n\t\t} else {\n\t\t\t$parent_dir = new fDirectory($info['dirname']);\n\t\t\tif (!$parent_dir->isWritable()) {\n\t\t\t\tthrow new fEnvironmentException(\n\t\t\t\t\t'The new directory name specified, %s, is inside of a directory that is not writable',\n\t\t\t\t\t$new_dirname\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t\n\t\trename($this->directory, $new_dirname);\n\t\t\n\t\t// Allow filesystem transactions\n\t\tif (fFilesystem::isInsideTransaction()) {\n\t\t\tfFilesystem::rename($this->directory, $new_dirname);\n\t\t}\n\t\t\n\t\tfFilesystem::updateFilenameMapForDirectory($this->directory, $new_dirname);\n\t}", "function narrative_purge_files($old_narrative_dir, $new_narrative_dir)\n{\n $file_scan = scandir($old_narrative_dir);\n foreach ($file_scan as $filecheck)\n {\n $file_extension = pathinfo($filecheck, PATHINFO_EXTENSION);\n if ($file_extension == 'jpg')\n {\n rename($old_narrative_dir . $filecheck, $new_narrative_dir . $filecheck);\n }\n }\n}", "protected function tearDown()\n {\n exec('rm -rf '.$this->testDir);\n chdir(__DIR__);\n }", "protected function tearDown()\n {\n exec('rm -rf '.$this->testDir);\n chdir(__DIR__);\n }", "function renameFolder($oldName,$newName){\r\n\t\t\t\t// open the user's directory\r\n\t\t\t\t\t$path = './cloud/'.$_SESSION['SESS_USER_ID'].'/'; // '.' for current\r\n\r\n\r\n\t\t\t}", "public function testExists() {\n $testDirName = self::TEST_DIR . '/testExists';\n\n $handle = (new Directory($testDirName));\n\n mkdir($testDirName);\n $this->assertTrue($handle->exists());\n\n rmdir($testDirName);\n $this->assertFalse($handle->exists());\n }", "public function testOnDeletedDirectory() {\n\n $obj = new FileSystemStorageProvider($this->logger, $this->directory);\n\n $this->dir3->setParent($this->dir1); // This directory was moved.\n\n $obj->onDeletedDirectory($this->dir3);\n $this->assertFileNotExists($this->directory . \"/1/3\");\n\n $obj->onDeletedDirectory($this->dir2);\n $this->assertFileNotExists($this->directory . \"/1/2\");\n\n $obj->onDeletedDirectory($this->dir1);\n $this->assertFileNotExists($this->directory . \"/1\");\n }", "protected function tearDown()\n {\n if (file_exists(\"{$this->dir}/file1.mock\")) unlink(\"{$this->dir}/file1.mock\");\n if (file_exists(\"{$this->dir}/file2.mock\")) unlink(\"{$this->dir}/file2.mock\");\n if (file_exists(\"{$this->dir}/dir1/file3.mock\")) unlink(\"{$this->dir}/dir1/file3.mock\");\n if (file_exists(\"{$this->dir}/dir1/file4.mock\")) unlink(\"{$this->dir}/dir1/file4.mock\");\n if (file_exists(\"{$this->dir}/dir1\")) rmdir(\"{$this->dir}/dir1\");\n\n if (file_exists(sys_get_temp_dir().'/def/xyz.mock')) unlink(sys_get_temp_dir().'/def/xyz.mock'); \n if (file_exists(sys_get_temp_dir().'/def')) rmdir(sys_get_temp_dir().'/def'); \n\n if (file_exists($this->dir.\"/abc.mock\")) unlink($this->dir.\"/abc.mock\");\n if (file_exists($this->dir.\"/def.mock\")) unlink($this->dir.\"/def.mock\");\n\n if (file_exists(sys_get_temp_dir().'/abc/def/xy/abc.mock')) unlink(sys_get_temp_dir().'/abc/def/xy/abc.mock'); \n if (file_exists(sys_get_temp_dir().'/abc/def/xy/dd.mock')) unlink(sys_get_temp_dir().'/abc/def/xy/dd.mock'); \n if (file_exists(sys_get_temp_dir().'/abc/def/xy')) rmdir(sys_get_temp_dir().'/abc/def/xy'); \n if (file_exists(sys_get_temp_dir().'/abc/def')) rmdir(sys_get_temp_dir().'/abc/def'); \n if (file_exists(sys_get_temp_dir().'/abc')) rmdir(sys_get_temp_dir().'/abc'); \n \n if (file_exists(\"{$this->dir}/dir2\")) rmdir(\"{$this->dir}/dir2\");\n if (file_exists($this->dir)) rmdir($this->dir);\n \n Config_Mock_Unserialize:$created = array();\n unset(Q\\Transform::$drivers['from-mock']);\n }", "function rename($old, $new = null) {\n \n if (!$new) {\n $new = $old;\n \t$old = $this->_file;\n }\n \n if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN' && (strtolower($old) == strtolower($new))) {\n \n $rand = sprintf('%s%s%s%s%s',\n dirname($old),\n DIRECTORY_SEPARATOR,\n microtime(),\n rand(1, 999),\n basename($old)\n );\n \n if (!@rename($old, $rand)) {\n Fire_Error::throwError(sprintf('Failed to temporary rename \"%s\".',\n $old\n ), __FILE__, __LINE__\n );\n }\n $old = $rand;\n }\n \n if (!@rename($old, $new)) {\n Fire_Error::throwError(sprintf('Failed to rename \"%s\" to \"%s\".',\n $old,\n $new\n ), __FILE__, __LINE__\n );\n } \n }", "public function testRenameTo()\n {\n /*\n * remove all tables\n */\n $tables = $this->fixture->getDBObject()->fetchList('SHOW TABLES');\n foreach($tables as $table) {\n $this->fixture->getDBObject()->simpleQuery('DROP TABLE '. $table['Tables_in_'.$this->fixture->a['db_name']]);\n }\n\n /*\n * create fresh store and check tables\n */\n $this->fixture->setup();\n\n $tables = $this->fixture->getDBObject()->fetchList('SHOW TABLES');\n foreach($tables as $table) {\n $this->assertTrue(\n false !== strpos($table['Tables_in_'.$this->fixture->a['db_name']], $this->dbConfig['db_table_prefix'].'_')\n );\n }\n\n /*\n * rename store\n */\n $prefix = 'new_store';\n $this->fixture->renameTo($prefix);\n\n /*\n * check for new prefixes\n */\n $tables = $this->fixture->getDBObject()->fetchList('SHOW TABLES');\n foreach($tables as $table) {\n $this->assertTrue(\n false !== strpos($table['Tables_in_'.$this->fixture->a['db_name']], $prefix)\n );\n }\n }", "function move_dir_to_tmp($src, $id)\n{\n $CI =& get_instance();\n $tmpPath = $CI->config->item('site_data_dir') . '/tmp/' . time() . '/';\n if (!is_dir($tmpPath))\n {\n mkdir($tmpPath, 0775, TRUE);\n }\n $tmpPath .= '/' . $id . '/';\n rename($src, $tmpPath);\n return $tmpPath;\n}", "public function tearDown() {\n\t\tif(is_dir('/tmp/clara')) {\n\t\t\t$this->rrmdir('/tmp/clara');\n\t\t}\n\t}", "public function moveDirectory($oldDirName, $newDirName)\n\t{\n\t\treturn $this->addAction(new MoveDirectory($oldDirName, $newDirName));\n\t}", "public function moveDirectory(string $oldDirName, string $newDirName): MoveDirectory\n {\n return $this->addAction(new MoveDirectory($oldDirName, $newDirName));\n }", "function moveFiles($src, $dest)\n{\n if (!is_dir($src)) {\n return false;\n }\n\n // If the destination directory does not exist create it\n if (!is_dir($dest)) {\n if (!mkdir($dest)) {\n // If the destination directory could not be created stop processing\n return false;\n }\n }\n\n // Open the source directory to read in files\n $i = new DirectoryIterator($src);\n foreach ($i as $f) {\n if ($f->isFile()) {\n rename($f->getRealPath(), \"$dest/\" . $f->getFilename());\n } else {\n if (!$f->isDot() && $f->isDir()) {\n rmDirRecursive($f->getRealPath(), \"$dest/$f\");\n unlink($f->getRealPath());\n }\n }\n }\n unlink($src);\n}", "public function testCopyDirOverExistingUpcountsDestinationDirname()\n {\n $this->storage->createDir('/', 'dest');\n $this->storage->createDir('/dest', 'tmp');\n $this->storage->createFile('/dest/tmp/', 'a.txt');\n $this->storage->createDir('/', 'tmp');\n $this->storage->createFile('/tmp/', 'b.txt');\n\n $this->storage->copyDir('/tmp', '/dest');\n\n $this->assertDirectoryExists(TEST_REPOSITORY.'/dest/tmp/');\n $this->assertTrue($this->storage->fileExists('/dest/tmp/a.txt'));\n\n $this->assertDirectoryExists(TEST_REPOSITORY.'/dest/tmp (1)');\n $this->assertTrue($this->storage->fileExists('/dest/tmp (1)/b.txt'));\n }", "abstract function rename($old_file, $new_file, $move = FALSE);", "public function testMkdirRecursive() {\n $testDirName = self::TEST_DIR . '/testMkdirRecursive/recursiveFlag';\n\n (new Directory($testDirName))->mkdir(true);\n\n $this->assertDirectoryExists($testDirName);\n }", "public function testChDir() {\n $currentDir = getcwd();\n $parentDir = dirname($currentDir);\n\n $handle = new Directory($parentDir);\n $handle->chdir();\n\n $this->assertEquals($parentDir, getcwd());\n chdir($currentDir);\n }", "public function testCreateSubDirsWithExistingDirectory()\n {\n mkdir($this->dir.'56');\n $this->assertNotEmpty($this->hd->getHash());\n }", "function fn_rename($oldname, $newname, $context = null)\n{\n $result = ($context === null) ? rename($oldname, $newname) : rename($oldname, $newname, $context);\n if ($result !== false) {\n @chmod($newname, is_dir($newname) ? DEFAULT_DIR_PERMISSIONS : DEFAULT_FILE_PERMISSIONS);\n }\n\n return $result;\n}", "public static function move($_path, $_target)\r\n {\r\n return rename($_path, $_target);\r\n }", "function tearDown() {\n\t\t$this->wfRecursiveRemoveDir( $this->tmpName );\n\t}", "public function testRenameKey()\n {\n $data = array(\n 'Hello' => 'Funilrys',\n 'How' => 'is',\n 'Are' => 'on',\n 'You?' => 'GitHub'\n );\n $toChange = array(\n 'How' => 'world',\n 'Are' => 'from',\n 'You?' => 'Germany'\n );\n\n $validKeys = array('Hello', 'world', 'from', 'Germany');\n $validValues = array('Funilrys', 'is', 'on', 'GitHub');\n\n $invalidData = array('Funilrys', 'is', 'on', 'GitHub');\n $invalidToChange = array('Hello', 'How', 'Are', 'You?');\n\n $this\n ->given($array = new classToTest())\n ->then\n ->array($array::renameKey($data, $toChange))\n ->keys\n ->isEqualTo($validKeys)\n ->array($array::renameKey($data, $toChange))\n ->containsValues($validValues)\n ->array($array::renameKey($data, $toChange))\n ->isNotEmpty()\n ->boolean($array::renameKey($invalidData, $invalidToChange))\n ->isFalse()\n ;\n }", "public function renameFolder($oldName, $newName)\n {\n // TODO: This is also not atomar and has similar problems as removeFolder()\n\n if ($oldName instanceof Zend_Mail_Storage_Folder) {\n $oldName = $oldName->getGlobalName();\n }\n\n $oldName = trim($oldName, $this->_delim);\n if (strpos($oldName, 'INBOX' . $this->_delim) === 0) {\n $oldName = substr($oldName, 6);\n }\n\n $newName = trim($newName, $this->_delim);\n if (strpos($newName, 'INBOX' . $this->_delim) === 0) {\n $newName = substr($newName, 6);\n }\n\n if (strpos($newName, $oldName . $this->_delim) === 0) {\n /**\n * @see Zend_Mail_Storage_Exception\n */\n require_once 'Zend/Mail/Storage/Exception.php';\n throw new Zend_Mail_Storage_Exception('new folder cannot be a child of old folder');\n }\n\n // check if folder exists and has no children\n $folder = $this->getFolders($oldName);\n\n if ($oldName == 'INBOX' || $oldName == DIRECTORY_SEPARATOR || $oldName == '/') {\n /**\n * @see Zend_Mail_Storage_Exception\n */\n require_once 'Zend/Mail/Storage/Exception.php';\n throw new Zend_Mail_Storage_Exception('wont rename INBOX');\n }\n\n if ($oldName == $this->getCurrentFolder()) {\n /**\n * @see Zend_Mail_Storage_Exception\n */\n require_once 'Zend/Mail/Storage/Exception.php';\n throw new Zend_Mail_Storage_Exception('wont rename selected folder');\n }\n\n $newdir = $this->createFolder($newName);\n\n if (!$folder->isLeaf()) {\n foreach ($folder as $k => $v) {\n $this->renameFolder($v->getGlobalName(), $newName . $this->_delim . $k);\n }\n }\n\n $olddir = $this->_rootdir . '.' . $folder;\n foreach (['tmp', 'new', 'cur'] as $subdir) {\n $subdir = DIRECTORY_SEPARATOR . $subdir;\n if (!file_exists($olddir . $subdir)) {\n continue;\n }\n // using copy or moving files would be even better - but also much slower\n if (!rename($olddir . $subdir, $newdir . $subdir)) {\n /**\n * @see Zend_Mail_Storage_Exception\n */\n require_once 'Zend/Mail/Storage/Exception.php';\n throw new Zend_Mail_Storage_Exception('error while moving ' . $subdir);\n }\n }\n // create a dummy if removing fails - otherwise we can't read it next time\n mkdir($olddir . DIRECTORY_SEPARATOR . 'cur');\n $this->removeFolder($oldName);\n }", "function renameDirectory($path=\"\", $filter, $transform) {\n\t\t$dir_handle = @opendir($path) or die(\"Unable to open $path\");\n\n\t\t//running the while loop\n\t\t$count = 0;\n\n\t\twhile ($name = readdir($dir_handle)) \n\t\t{\n\t\t\t// echo \"dir loop: $path/$name\\n\";\n\t\t\tif(strpos($name, \".\") === 0) {\n\t\t\t\t// skipping dot file\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// run the item through our filter\n\t\t\tif($filter && !$filter($name)) {\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\t// transform it\n\t\t\t\t$newName = $transform($name);\n\t\t\t\t$this->log(\"$name transformed to $newName\");\n\t\t\t\tif($this->dryRun) {\n\t\t\t\t\t$this->log(\"(dry run) rename $path/$name to $path/$newName\");\n\t\t\t\t} else {\n\t\t\t\t\t$result = rename(\"$path/$name\", \"$path/$newName\");\n\t\t\t\t\tif(!$result) {\n\t\t\t\t\t\tthrow new Exception(\"Failed to rename: $path/$name to $path/$newName\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$name = $newName;\n\t\t\t}\n\t\t\t\n\t\t\tif(is_dir(\"$path/$name\")) {\n\t\t\t\t$this->renameDirectory(\"$path/$name\", $filter, $transform);\n\t\t\t}\n\t\t\t$count++;\n\t\t}\n\t\tclosedir($dir_handle);\n\n\t\t// // return array\n\t\t// return $items;\n\t}", "public function createDirectory(Directory $directory): void;", "public static function renamefile()\n\t{\n\t\tglobal $g_dir;\n\t\t$filetorename = $_POST['fileToRename'];\n\t\t$newfilename = $_POST['newRenamedFileName'];\n\n\t\t//$dir= '/var/www/html/UPLOADS/';\n\n\t\tif(rename($g_dir.$filetorename, $g_dir.$newfilename))\n\t\t\techo(\"Successfully renamed $filetorename to $newfilename!\");\n\t\telse\n\t\t\techo(\"ERROR: Could not rename $filetorename to $newfilename!\");\n\t}", "function moveDIR($dir,$dest=\"\",$debug,$nMode=0755) {\n //$debug = 1;\n $result=true;\n\n //if($debug) { echo \"<h2>Moving directory</h2><p> From:<br> $dir <br>To: $dest</p>\";}\n\n $path = dirname(__FILE__);\n $files = scandir($dir);\n\n foreach($files as $file) {\n if (substr( $file ,0,1) != \".\") {\n $pathFile = $dir.'/'.$file;\n if (is_dir($pathFile)) {\n //if($debug) { echo \"<p><b>Directory:</b> $pathFile</p>\"; }\n\n $newDir = $dest.\"/\".$file;\n\n if (!moveDIR($pathFile,$newDir,$debug)) {\n $result = false;\n }\n\n } else {\n //echo ($debug) ? \"<p>$pathFile is a file</p>\" : \"\";\n\n // $currentFile = realpath($file); // current location\n $currentFile = $pathFile;\n\n $newFile = $dest.\"/\".$file;\n\n if (!file_exists($dest)) {\n makeDIR($dest,0,$nMode);\n }\n // if file already exists remove it\n if (file_exists($newFile)) {\n //if($debug) { echo \"<p>File $newFile already exists - Deleting</p>\"; }\n unlink($newFile);\n } else {\n //if($debug) { echo \"<p>File $newFile doesn't exist yet</p>\"; }\n }\n\n // Move via rename\n // rename(oldname, newname)\n if (rename($currentFile , $newFile)) {\n (CHMOD == 1) ? chmod($newFile, 0755) : '';\n //if($debug) { echo \"<p>Moved $currentFile to $newFile</p>\"; }\n } else {\n //if($debug) { echo \"<p>Failed to move $currentFile to $newFile</p>\"; }\n $result = false;\n } // END rename \n\n } // END if dir or file\n } // end if no dot\n } // END foreach\n return $result;\n }", "function moveFinalDirectories($aBooksDone, $aDirectories)\r\n{\r\n\t$readydir = $aDirectories['ready'];\r\n\t$sipdir = $aDirectories['sip'];\r\n\t$result = 0;\r\n\r\n\tforeach ($aBooksDone as $itemnumber) {\r\n\t\t$sourcedir = $readydir . '\\\\' . $itemnumber;\r\n\t\t$destinationdir = $sipdir . '\\\\' . $itemnumber;\r\n\r\n\t\tif (!(@opendir($destinationdir))) {\r\n\t\t\t$mk = mkdir($destinationdir);\r\n\t\t\t//if ($mk === FALSE) {\r\n\t\t\t//\t$result = 0;\r\n\t\t\t//\treturn $result;\r\n\t\t\t//}\r\n\t\t}\r\n\r\n\t\t$dh = opendir($sourcedir);\r\n if ($dh) {\r\n while (($file = @readdir($dh)) !== false) {\r\n if ($file != \".\" && $file != \"..\") {\r\n $source = $sourcedir . \"\\\\\" . $file;\r\n $destination = $destinationdir . \"\\\\\" . $file;\r\n //echo 'ik zou ' . $source . ' verplaatsen naar ' . $destination . '<br>';\r\n $result = @rename($source, $destination);\r\n }\r\n }\r\n \t\t}\r\n\r\n\t\t$result = rmdir($sourcedir);\r\n\t}\r\n\r\n\treturn $result;\r\n}", "protected function removeTestFilePath()\n {\n $path = $this->getTestFilePath();\n FileHelper::removeDirectory($path);\n }", "public function dir_rewinddir() {}", "public function moveTo(Directory $dir) {\n\t\t$new_path = $this->pathIn($dir);\n\t\tif (!rename($this->getPath(), $new_path)) throw new \\Exception(\"Couldn't rename the file $this to $new_path\");\n\t\t$this->path = $new_path;\n\t}", "public function testRemoveDummyTestFileAfterDoneTest()\n {\n unlink(TESTING_STORE);\n\n // boolean result must be === false\n $this->assertFalse(file_exists(TESTING_STORE));\n }", "function makedir($dir)\n{\n\tglobal $config_vars;\n\t$ret = ForceDirectories($dir,$config_vars['dir_mask']);\n\ttouch ($dir . '/index.html');\n\treturn $ret;\n}", "public function rename_folder($folder, $new_name) {\n\n // mailbox esists?\n $mailbox_idnr = $this->get_mail_box_id($folder);\n if (!$mailbox_idnr) {\n // mailbox not found\n return FALSE;\n }\n\n // ACLs check ('create' grant required )\n $ACLs = $this->_get_acl($folder);\n if (!is_array($ACLs) || !in_array(self::ACL_CREATE_FLAG, $ACLs)) {\n // Unauthorized!\n return FALSE;\n }\n\n // new mailbox name already exists?\n if ($this->get_mail_box_id($new_name)) {\n // name already exist\n return FALSE;\n }\n\n // start transaction\n if (!$this->dbmail->startTransaction()) {\n return FALSE;\n }\n\n // has children?\n $sub_folders = $this->get_sub_folders($folder);\n\n if (count($sub_folders) > 0) {\n\n // target path segment level\n $current_path_segment_level = count(explode($this->delimiter, $folder));\n\n // fetch children\n foreach ($sub_folders as $sub_folder_idnr => $sub_folder_name) {\n\n // explode sub folder name\n $exploded_sub_folder = explode($this->delimiter, $sub_folder_name);\n\n // append to $new_name sub folders\n $new_sub_folder_name = $new_name . $this->delimiter . implode($this->delimiter, array_slice($exploded_sub_folder, $current_path_segment_level));\n\n // rename sub folder\n $query = \"UPDATE dbmail_mailboxes \"\n . \" set name = '{$this->dbmail->escape($new_sub_folder_name)}' \"\n . \" WHERE mailbox_idnr = {$this->dbmail->escape($sub_folder_idnr)} \";\n\n if (!$this->dbmail->query($query)) {\n // rollbalk transaction\n $this->dbmail->rollbackTransaction();\n return FALSE;\n }\n\n // increment folder 'seq' flag\n if (!$this->increment_mailbox_seq($sub_folder_idnr)) {\n $this->dbmail->rollbackTransaction();\n return FALSE;\n }\n\n // unset temporary stored mailbox_id (if present)\n if (!$this->unset_temp_value(\"MBOX_ID_{$sub_folder_name}_{$this->user_idnr}\")) {\n $this->dbmail->rollbackTransaction();\n return FALSE;\n }\n }\n }\n\n // rename target folder\n $query = \"UPDATE dbmail_mailboxes \"\n . \" set name = '{$this->dbmail->escape($new_name)}' \"\n . \" WHERE mailbox_idnr = {$this->dbmail->escape($mailbox_idnr)} \";\n\n if (!$this->dbmail->query($query)) {\n // rollbalk transaction\n $this->dbmail->rollbackTransaction();\n return FALSE;\n }\n\n // increment folder 'seq' flag\n if (!$this->increment_mailbox_seq($mailbox_idnr)) {\n $this->dbmail->rollbackTransaction();\n return FALSE;\n }\n\n // unset temporary stored mailbox_id (if present)\n if (!$this->unset_temp_value(\"MBOX_ID_{$folder}_{$this->user_idnr}\")) {\n $this->dbmail->rollbackTransaction();\n return FALSE;\n }\n\n return ($this->dbmail->endTransaction() ? TRUE : FALSE);\n }", "function rename_folder($json_path,$folder,$newFolder){\n\t$oldPath = $json_path.$folder;\n\t$newPath = $json_path.$newFolder;\n\tif(!file_exists($oldPath)){\n\t\treturn 'no exist';\n\t}\n\tif(file_exists($newPath)){\n\t\treturn 'folder just exist';\n\t}\n\tif(rename($oldPath,$newPath)){\n\t\treturn 'renamed';\n\t} else {\n\t\treturn 'fatal error';\n\t}\n}", "public function tearDown()\n {\n if (file_exists($this->__testFilePath)) {\n unlink($this->__testFilePath);\n }\n if (is_dir($this->__testFileDir)) {\n rmdir($this->__testFileDir);\n }\n }", "static public function movePhysically($old_path, $new_path)\n {\n\n if(!is_dir($old_path))\n {\n return true;\n }\n \n if (!is_dir($new_path) || !is_writable($new_path))\n {\n $old = umask(0);\n mkdir($new_path, 0770);\n umask($old); \n }\n \n $files = sfFinder::type('file')->maxdepth(0)->in($old_path);\n $success = true;\n\n foreach ($files as $file)\n {\n $success = rename($file, $new_path . '/' . basename($file)) && $success;\n }\n if ($success)\n {\n $folders = sfFinder::type('dir')->maxdepth(0)->in($old_path);\n foreach($folders as $folder)\n {\n $new_name = substr($folder, strlen($old_path));\n $success = self::movePhysically($folder, $new_path . '/' . $new_name) && $success;\n }\n }\n \n $success = rmdir($old_path) && $success;\n\n return $success;\n }", "protected function tearDown()\r\n {\r\n DirectoryManager::recursiveRemoveDir('data/tests');\r\n }", "function _moveFile($sourceDir, $destDir, $filename) {\n\t\t$currentFilePath = $sourceDir . DIRECTORY_SEPARATOR . $filename;\n\t\t$destinationPath = $destDir . DIRECTORY_SEPARATOR . $filename;\n\n\t\tif (!rename($currentFilePath, $destinationPath)) {\n\t\t\t$message = __('admin.fileLoader.moveFileFailed', array('filename' => $filename,\n\t\t\t\t'currentFilePath' => $currentFilePath, 'destinationPath' => $destinationPath));\n\t\t\t$this->addExecutionLogEntry($message, SCHEDULED_TASK_MESSAGE_TYPE_ERROR);\n\n\t\t\t// Script should always stop if it can't manipulate files inside\n\t\t\t// its own directory system.\n\t\t\tfatalError($message);\n\t\t}\n\n\t\treturn $destinationPath;\n\t}", "protected function tearDown()\n {\n chdir(CWD);\n }", "protected function createDirectory() {}", "public function renameOnDFS( $oldPath, $newPath )\n {\n $this->accumulatorStart();\n\n $oldPath = $this->makeDFSPath( $oldPath );\n $newPath = $this->makeDFSPath( $newPath );\n\n if(strpos($oldPath,'/storage/') !== FALSE )\n {\n try\n {\n $result = $this->s3->getObject(array('Bucket' => $this->bucket,\n 'Key' => $oldPath));\n $contents=(string) $result['Body'];\n \n $this->s3->putObject(array('Bucket' => $this->bucket,\n 'Key' => $newPath,\n 'Body' => $contents,\n 'ACL' => 'public-read'));\n \n $this->s3->deleteObject(array('Bucket' => $this->bucket,\n 'Key' => $oldPath ));\n $ret = true;\n }catch(S3Exception $e){\n $ret =false;\n }\n }\n else\n {\n $item_old = $this->pool->getItem($oldPath);\n $item_new = $this->pool->getItem($newPath);\n \n $item_new->lock();\n $item_new->set($item_old->get($oldPath));\n $item_old->clear();\n\n $ret = eZFile::rename( $oldPath, $newPath, true );\n\n if ( $ret )\n eZClusterFileHandler::cleanupEmptyDirectories( $oldPath );\n }\n \n $this->accumulatorStop();\n\n return $ret;\n }", "private function moveFile($old_file, $new_file)\n {\n if (!file_exists($old_file)) {\n return;\n }\n\n if (!is_dir(dirname($new_file))) {\n mkdir(dirname($new_file), 0755, true);\n }\n\n // move the file to the archive folder\n rename($old_file, $new_file);\n }", "public function testMoveSuccess_zipSubfolder()\n {\n $file = array(\"name\"=>\"zipSubfolder.zip\", \"size\"=>500, \"tmp_name\"=>__DIR__.'/zipSubfolder.zip');\n\n $service = $this->setMockPluginUploaderServiceMoveUploadedFile();\n\n $result = $service->upload($file);\n\n // check we got the correct result\n $this->assertEquals(false, $result);\n }", "public function testMoveFolder()\n {\n $remoteFolder = \"TestData/In\";\n\n $localName = \"Book1.xlsx\";\n $remoteName = \"Book1.xlsx\";\n\n CellsApiTestBase::ready( $this->instance,$localName ,$remoteFolder . \"/\" . $remoteName , \"\");\n \n $request = new MoveFolderRequest();\n $request->setSrcPath( \"OutResult/Create\");\n $request->setDestPath( \"OutResult/Move\");\n $request->setSrcStorageName( \"\");\n $request->setDestStorageName( \"\");\n $this->instance->moveFolder($request);\n }", "public function rename($path, $newpath)\n {\n }", "abstract function changedir($path = '', $supress_debug = FALSE);", "public function rename($newname);", "public function rename($new_name) {\n\t\t$new_path = $this->getParentDirectory()->getPath().DIRECTORY_SEPARATOR.$new_name;\n\t\tif (!rename($this->getPath(), $new_path)) throw new \\Exception(\"Couldn't rename the file $this to $new_path\");\n\t\t$this->path = $new_path;\n\t}", "public function testMoveFileFromTmp(): void\n {\n $expectedFilePath = $this->imageUploader->getBasePath() . DIRECTORY_SEPARATOR . 'magento_small_image_1.jpg';\n\n $this->assertFalse($this->mediaDirectory->isExist($expectedFilePath));\n\n $this->imageUploader->moveFileFromTmp('magento_small_image.jpg');\n\n $this->assertTrue($this->mediaDirectory->isExist($expectedFilePath));\n }", "private function renameTempFile($path, $newPath, $webRoot)\n {\n $fs = $this->getFileSystem();\n\n $fs->copy($webRoot.$path, $webRoot.$newPath, true);\n $fs->remove($webRoot.$path);\n }", "public function testTypeIdentifiesDirectory()\n {\n mkdir(self::$temp.DS.'foo-dir');\n\n $this->assertSame('dir', Storage::type(self::$temp.DS.'foo-dir'));\n }", "protected function tearDown()\n {\n \\RPI\\Foundation\\Helpers\\FileUtils::delTree(__DIR__.\"/LESSPHPTest/ROOT\");\n }", "protected function doCopyRename($fn, $dir, $name, $flags=0)\n\t{\n\t\tif (($fn == 'rename' && ~$flags & Fs::MERGE) || ($this instanceof Fs_Symlink && $flags & Fs::NO_DEREFERENCE)) return parent::doCopyRename($fn, $dir, $name, $flags); \n\t\t\n\t\tif (empty($name) || $name == '.' || $name == '..' || strpos('/', $name) !== false) throw new SecurityException(\"Unable to $fn '{$this->_path}' to '$dir/$name'; Invalid filename '$name'.\");\n\t\t\n\t\tif (!($dir instanceof Fs_Dir)) $dir = Fs::dir($dir);\n\t\tif (!$dir->exists() && ~$flags & Fs::MKDIR) throw new Fs_Exception(\"Unable to \" . ($fn == 'rename' ? 'move' : $fn) . \" '{$this->_path}' to '$dir/': Directory does not exist\");\n\n\t\t$files = @scandir($this->_path);\n\t\tif ($files === false) throw new Fs_Exception(\"Failed to read directory to $fn '{$this->_path}' to '$dir/$name'\", error_get_last());\n\t\t\n\t\tif ($dir->has($name) && (~$flags & Fs::MERGE || !($dir->$name instanceof Fs_Dir))) {\n\t\t\t$dest = $dir->$name;\n\t\t\tif ($dest instanceof Fs_Dir && !($dest instanceof Fs_Symlink) && count($dest) != 0) throw new Fs_Exception(\"Unable to $fn '{$this->_path}' to '{$dest->_path}': Target is a non-empty directory\");\n\t\t\tif (~$flags & Fs::OVERWRITE) throw new Fs_Exception(\"Unable to $fn '{$this->_path}' to '{$dest->_path}': Target already exists\");\n\t\t\t$dest->delete();\n\t\t}\n\t\t\n\t\t$dest = Fs::dir(\"$dir/$name\");\n\t\t$dest->create($this->getAttribute('mode'), Fs::RECURSIVE | Fs::PRESERVE);\n\t\t\n\t\tforeach ($files as $file) {\n\t\t\tif ($file == '.' || $file == '..') continue;\n\t\t\t\n\t\t\ttry {\n\t\t\t\tif (is_dir(\"{$this->_path}/$file)\") && (!is_link(\"{$this->_path}/$file)\") || $flags & ALWAYS_FOLLOW)) {\n\t\t\t\t\t$this->$file->doCopyRename($fn, $dest, $file, $flags);\n\t\t\t\t} else {\n\t\t\t\t\tif ($dest->has($file)) {\n\t\t\t\t\t\tif ($flags & Fs::UPDATE == Fs::UPDATE && $dest->$file['ctime'] >= $this->$file['ctime']) continue;\n\t\t\t\t\t\tif (~$flags & Fs::OVERWRITE) throw new Fs_Exception(\"Unable to $fn '{$this->_path}/$file' to '{$dest->_path}/$file': Target already exists\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (is_link(\"{$this->_path}/$file)\") && ~$flags & ALWAYS_FOLLOW) symlink(readlink(\"{$this->_path}/$file\"), \"{$dest->_path}/$file\");\n\t\t\t\t\t else $fn(\"{$this->_path}/$file\", \"{$dest->_path}/$file\");\n\t\t\t\t}\n\t\t\t} catch (Fs_Exception $e) {\n\t\t\t\ttrigger_error($e->getMessage(), E_USER_WARNING);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($fn == 'rename') rmdir($this->_path);\n\t\treturn Fs::get(\"$dir/$name\");\n\t}", "public function testPrepareDirOriginal()\n {\n $imgPath = $this->imageService->imgPath(\n \\Media\\Service\\Image::ORIGINAL,\n $this->imageId,\n $this->imageEntityData['extension']\n );\n $this->assertTrue($this->imageService->prepareDir($imgPath));\n }", "function chdir(string $directory): void\n{\n error_clear_last();\n $safeResult = \\chdir($directory);\n if ($safeResult === false) {\n throw DirException::createFromPhpError();\n }\n}", "function tempdir($dir=false,$prefix='php') {\n $tempfile=tempnam('','');\n if (file_exists($tempfile)) { unlink($tempfile); }\n mkdir($tempfile);\n if (is_dir($tempfile)) { return $tempfile . '/'; }\n}", "function setName( $newName )\r\n\t{\r\n\t\t$basePath = dirname( $this->path );\r\n\t\tif(rename( $this->path, $basePath.'/'.$newName ))\r\n\t\t{\r\n\t\t\t$this->path = $basePath.'/'.$newName;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\ttrigger_error(\"Não foi possível renomear a pasta \" . $this->path);\r\n\t\t}\r\n\t}", "public function rename($source, $destination);" ]
[ "0.8073711", "0.69530237", "0.6793304", "0.67131215", "0.66003954", "0.63539195", "0.6330553", "0.62984866", "0.6267685", "0.6255804", "0.6138651", "0.61358964", "0.61334026", "0.609102", "0.6087658", "0.597927", "0.59581673", "0.5946811", "0.59413356", "0.59262115", "0.59253424", "0.5842497", "0.5831824", "0.58051944", "0.57979715", "0.5795752", "0.57305807", "0.5704202", "0.570261", "0.56702673", "0.5640221", "0.5636418", "0.5635786", "0.562599", "0.5622357", "0.5621054", "0.5605761", "0.55978984", "0.558438", "0.5574252", "0.554932", "0.5540337", "0.5540337", "0.55373454", "0.55096155", "0.5509557", "0.5507776", "0.55003726", "0.54957914", "0.5486431", "0.54795915", "0.5471601", "0.5462886", "0.5434698", "0.54305977", "0.5428296", "0.5417201", "0.54141814", "0.5337627", "0.5334376", "0.5308587", "0.53050464", "0.52722883", "0.52562636", "0.5236864", "0.5235377", "0.52352077", "0.5232183", "0.5222511", "0.52156633", "0.5214544", "0.5212495", "0.51995873", "0.5192058", "0.5171613", "0.51698554", "0.5169113", "0.5164821", "0.5154672", "0.51502764", "0.5142243", "0.5126412", "0.5081973", "0.50521326", "0.5044448", "0.50383914", "0.5033482", "0.5028941", "0.5027866", "0.5019489", "0.50144625", "0.5012466", "0.50084186", "0.50048065", "0.49995542", "0.49975473", "0.49964425", "0.4995419", "0.4986369", "0.4985804" ]
0.78430563
1
Test for Directory::move() Create the Directory test_dir in [ROOT] and moves it to [SYSTEM] At the end of the test, remove the moved directory.
Тест для Directory::move() Создать Directory test_dir в [ROOT] и переместить его в [SYSTEM] В конце теста удалить перемещенный каталог.
public function test_move() { $object = Directory::create(ROOT.DS.'test_dir'); $object->move(SYSTEM); $this->assertTrue(is_dir(SYSTEM.DS.'test_dir')); $this->assertFalse(is_dir(ROOT.DS.'test_dir')); $this->assertEquals($object->get_path(), SYSTEM.DS.'test_dir'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_move_directory_exists()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT, false);\n }", "public function testMoveDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp2', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp2'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp2'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp2', self::$temp.DS.'tmp3');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_dir(self::$temp.DS.'tmp2'));\n }", "public function test_move_not_exists_dir()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT.DS.'not_exist');\n }", "public function testMoveDirectoryMovesEntireDirectoryAndOverwrites()\n {\n mkdir(self::$temp.DS.'tmp4', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp4'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp4'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'nested'.DS.'baz.txt', '');\n\n mkdir(self::$temp.DS.'tmp5', 0777, true);\n file_put_contents(self::$temp.DS.'tmp5'.DS.'foo2.txt', '');\n file_put_contents(self::$temp.DS.'tmp5'.DS.'bar2.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp4', self::$temp.DS.'tmp5', true);\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'foo2.txt'));\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'bar2.txt'));\n $this->assertFalse(is_dir(self::$temp.DS.'tmp4'));\n }", "public function testMoveRecursive() {\n $sourceDirName = self::TEST_DIR . '/testMoveRecursiveSource/hierachy1';\n $targetDirName = self::TEST_DIR . '/testMoveRecursiveTarget/hierachy1';\n\n mkdir(self::TEST_DIR . '/testMoveRecursiveSource/hierachy1', 0777, true);\n\n $directoryHandle = new Directory(self::TEST_DIR . '/testMoveRecursiveSource');\n\n $directoryHandle->move(new Directory(self::TEST_DIR . '/testMoveRecursiveTarget'));\n\n $this->assertDirectoryExists($targetDirName);\n $this->assertDirectoryNotExists(self::TEST_DIR . '/testMoveRecursiveSource');\n }", "public function testMoveEmpty() {\n $sourceDirName = self::TEST_DIR . '/testMoveEmptySource';\n $targetDirName = self::TEST_DIR . '/testMoveEmptyTarget';\n\n mkdir($sourceDirName);\n\n $directoryHandle = new Directory($sourceDirName);\n\n $directoryHandle->move(new Directory($targetDirName));\n\n $this->assertDirectoryExists($targetDirName);\n $this->assertDirectoryNotExists($sourceDirName);\n }", "public function testCopyDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::cpdir(self::$temp.DS.'tmp', self::$temp.DS.'tmp2');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt'));\n }", "public function test_remove()\n {\n $path = ROOT.DS.'test_dir';\n $object = Directory::create($path);\n $object->remove($path);\n $this->assertFalse(is_dir($path));\n }", "public function testMoveFolder()\n {\n $remoteFolder = \"TestData/In\";\n\n $localName = \"Book1.xlsx\";\n $remoteName = \"Book1.xlsx\";\n\n CellsApiTestBase::ready( $this->instance,$localName ,$remoteFolder . \"/\" . $remoteName , \"\");\n \n $request = new MoveFolderRequest();\n $request->setSrcPath( \"OutResult/Create\");\n $request->setDestPath( \"OutResult/Move\");\n $request->setSrcStorageName( \"\");\n $request->setDestStorageName( \"\");\n $this->instance->moveFolder($request);\n }", "public function test_rename()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->rename('test_new_dir');\n $this->assertEquals($object->get_base_name(), 'test_new_dir');\n }", "function moveDIR($dir,$dest=\"\",$debug,$nMode=0755) {\n //$debug = 1;\n $result=true;\n\n //if($debug) { echo \"<h2>Moving directory</h2><p> From:<br> $dir <br>To: $dest</p>\";}\n\n $path = dirname(__FILE__);\n $files = scandir($dir);\n\n foreach($files as $file) {\n if (substr( $file ,0,1) != \".\") {\n $pathFile = $dir.'/'.$file;\n if (is_dir($pathFile)) {\n //if($debug) { echo \"<p><b>Directory:</b> $pathFile</p>\"; }\n\n $newDir = $dest.\"/\".$file;\n\n if (!moveDIR($pathFile,$newDir,$debug)) {\n $result = false;\n }\n\n } else {\n //echo ($debug) ? \"<p>$pathFile is a file</p>\" : \"\";\n\n // $currentFile = realpath($file); // current location\n $currentFile = $pathFile;\n\n $newFile = $dest.\"/\".$file;\n\n if (!file_exists($dest)) {\n makeDIR($dest,0,$nMode);\n }\n // if file already exists remove it\n if (file_exists($newFile)) {\n //if($debug) { echo \"<p>File $newFile already exists - Deleting</p>\"; }\n unlink($newFile);\n } else {\n //if($debug) { echo \"<p>File $newFile doesn't exist yet</p>\"; }\n }\n\n // Move via rename\n // rename(oldname, newname)\n if (rename($currentFile , $newFile)) {\n (CHMOD == 1) ? chmod($newFile, 0755) : '';\n //if($debug) { echo \"<p>Moved $currentFile to $newFile</p>\"; }\n } else {\n //if($debug) { echo \"<p>Failed to move $currentFile to $newFile</p>\"; }\n $result = false;\n } // END rename \n\n } // END if dir or file\n } // end if no dot\n } // END foreach\n return $result;\n }", "public function testCleanDirectory()\n {\n mkdir(self::$temp.DS.'baz');\n file_put_contents(self::$temp.DS.'baz'.DS.'file.txt', 'Hello World');\n\n Storage::cleandir(self::$temp.DS.'baz');\n\n $this->assertTrue(is_dir(self::$temp.DS.'baz'));\n $this->assertTrue(! is_file(self::$temp.DS.'baz'.DS.'file.txt'));\n }", "public function test_rename_same_name()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->rename('test_dir');\n $this->assertEquals($object->get_base_name(), 'test_dir');\n }", "public function testDeleteDirectory()\n {\n mkdir(self::$temp.DS.'foo');\n file_put_contents(self::$temp.DS.'foo'.DS.'file.txt', 'Hello World');\n\n Storage::rmdir(self::$temp.DS.'foo');\n\n $this->assertTrue(! is_dir(self::$temp.DS.'foo'));\n $this->assertTrue(! is_file(self::$temp.DS.'foo'.DS.'file.txt'));\n }", "public function testMoveMovesStorages()\n {\n file_put_contents(self::$temp.DS.'foo.txt', 'foo');\n\n Storage::move(self::$temp.DS.'foo.txt', self::$temp.DS.'bar.txt');\n\n $this->assertTrue(is_file(self::$temp.DS.'bar.txt'));\n $this->assertFalse(is_file(self::$temp.DS.'foo.txt'));\n }", "protected function cleanupTestDirectory() {\n\t\tforeach ($this->filesToRemove as $file) {\n\t\t\tif (file_exists($this->testBasePath . $file)) {\n\t\t\t\tunlink($this->testBasePath . $file);\n\t\t\t}\n\t\t}\n\n\t\tforeach ($this->directoriesToRemove as $directory) {\n\t\t\tif (file_exists($this->testBasePath . $directory)) {\n\t\t\t\trmdir($this->testBasePath . $directory);\n\t\t\t}\n\t\t}\n\t}", "function moveFolder($user_dir){\r\n\t\t\t\t// open the user's directory\r\n\t\t\t\t\t$path = './cloud/'.$_SESSION['SESS_USER_ID'].'/'; // '.' for current\r\n\r\n\t\t\t\t\t\r\n\t\t\t}", "public function moveDirectory( $source, $destination )\n {\n $path = explode( DS, $source );\n\n $destination = $destination . DS . $path[ count( $path ) - 1 ];\n\n $result = $this->copyDirectory( $source, $destination, TRUE );\n\n if ( TRUE === $result )\n {\n $result = $this->deleteDirectory( $source );\n }\n\n return $result;\n }", "public function testMoveFileFromTmp(): void\n {\n $expectedFilePath = $this->imageUploader->getBasePath() . DIRECTORY_SEPARATOR . 'magento_small_image_1.jpg';\n\n $this->assertFalse($this->mediaDirectory->isExist($expectedFilePath));\n\n $this->imageUploader->moveFileFromTmp('magento_small_image.jpg');\n\n $this->assertTrue($this->mediaDirectory->isExist($expectedFilePath));\n }", "protected static function moveTemporaryDirs()\n {\n if (static::isCapsular()) {\n // Rename directories\n $original = static::getCacheDirs(false);\n foreach (static::getCacheDirs(true) as $i => $tmpDir) {\n \\Includes\\Utils\\FileManager::unlinkRecursive($tmpDir);\n $originalDir = $original[$i];\n rename($originalDir, $tmpDir);\n }\n\n // Rename files\n $original = static::getDecoratorDataFiles(false);\n foreach (static::getDecoratorDataFiles(true) as $i => $tmpPath) {\n $destPath = $original[$i];\n if (file_exists($tmpPath)) {\n rename($tmpPath, $destPath);\n }\n }\n }\n }", "protected function createRealTestdir() {}", "public function testMakeDirectory()\n {\n $this->assertTrue(Storage::mkdir(self::$temp.DS.'created'));\n $this->assertTrue(is_dir(self::$temp.DS.'created'));\n }", "public function testDirectoryManagement()\n {\n $limit = 5;\n $filesystem = $this->createFilesystemMock(0, $limit, $limit);\n $instance = $this->createTestInstance($filesystem);\n $this->assertEmpty($instance->getTemporaryDirectories());\n $directories = array();\n for ($i = 0; $i < 5; $i++) {\n $directories[] = $instance->createTemporaryDirectory();\n }\n $this->assertCount($limit, $instance->getTemporaryDirectories());\n $this->assertContains(\n $directories[0],\n $instance->getTemporaryDirectories()\n );\n $instance->removeTemporaryDirectory($directories[0]);\n $this->assertCount($limit - 1, $instance->getTemporaryDirectories());\n $this->assertNotContains(\n $directories[0],\n $instance->getTemporaryDirectories()\n );\n $instance->removeTemporaryDirectories();\n $this->assertCount(0, $instance->getTemporaryDirectories());\n }", "protected function _move($source, $targetDir, $name) {\r\n\t\treturn false;\r\n\t}", "static public function movePhysically($old_path, $new_path)\n {\n\n if(!is_dir($old_path))\n {\n return true;\n }\n \n if (!is_dir($new_path) || !is_writable($new_path))\n {\n $old = umask(0);\n mkdir($new_path, 0770);\n umask($old); \n }\n \n $files = sfFinder::type('file')->maxdepth(0)->in($old_path);\n $success = true;\n\n foreach ($files as $file)\n {\n $success = rename($file, $new_path . '/' . basename($file)) && $success;\n }\n if ($success)\n {\n $folders = sfFinder::type('dir')->maxdepth(0)->in($old_path);\n foreach($folders as $folder)\n {\n $new_name = substr($folder, strlen($old_path));\n $success = self::movePhysically($folder, $new_path . '/' . $new_name) && $success;\n }\n }\n \n $success = rmdir($old_path) && $success;\n\n return $success;\n }", "public function testOnMovedDocument() {\n\n $obj = new FileSystemStorageProvider($this->logger, getcwd());\n\n $this->dir3->setParentBackedUp($this->dir3->getParent());\n $this->dir2->removeChildren($this->dir3);\n $this->dir1->addChildren($this->dir3);\n\n $obj->onMovedDocument($this->dir3);\n $this->assertFileExists($this->directory . \"/1/3\");\n }", "public function testCopyDirOverExistingUpcountsDestinationDirname()\n {\n $this->storage->createDir('/', 'dest');\n $this->storage->createDir('/dest', 'tmp');\n $this->storage->createFile('/dest/tmp/', 'a.txt');\n $this->storage->createDir('/', 'tmp');\n $this->storage->createFile('/tmp/', 'b.txt');\n\n $this->storage->copyDir('/tmp', '/dest');\n\n $this->assertDirectoryExists(TEST_REPOSITORY.'/dest/tmp/');\n $this->assertTrue($this->storage->fileExists('/dest/tmp/a.txt'));\n\n $this->assertDirectoryExists(TEST_REPOSITORY.'/dest/tmp (1)');\n $this->assertTrue($this->storage->fileExists('/dest/tmp (1)/b.txt'));\n }", "public function testDeleteDirectoryReturnFalseWhenNotADirectory()\n {\n mkdir(self::$temp.DS.'bar');\n file_put_contents(self::$temp.DS.'bar'.DS.'file.txt', 'Hello World');\n\n $this->assertFalse(Storage::rmdir(self::$temp.DS.'bar'.DS.'file.txt'));\n }", "public function testMoveSuccess_zipSubfolder()\n {\n $file = array(\"name\"=>\"zipSubfolder.zip\", \"size\"=>500, \"tmp_name\"=>__DIR__.'/zipSubfolder.zip');\n\n $service = $this->setMockPluginUploaderServiceMoveUploadedFile();\n\n $result = $service->upload($file);\n\n // check we got the correct result\n $this->assertEquals(false, $result);\n }", "public function testMoveSuccess_ZipNoSubfolder()\n {\n $file = array(\"name\"=>\"zipNoSubfolder.zip\", \"size\"=>500, \"tmp_name\"=>__DIR__.'/zipNoSubfolder.zip');\n\n $service = $this->setMockPluginUploaderServiceMoveUploadedFile();\n\n $result = $service->upload($file);\n\n // check we got the correct result\n $this->assertEquals(false, $result);\n }", "public function testMkdir() {\n $testDirName = self::TEST_DIR . '/testMkdir';\n\n (new Directory($testDirName))->mkdir();\n\n $this->assertDirectoryExists($testDirName);\n }", "public function moveDirectory(string $oldDirName, string $newDirName): MoveDirectory\n {\n return $this->addAction(new MoveDirectory($oldDirName, $newDirName));\n }", "public function testDeleteDirectory()\n {\n $this->createTestDirectories(\n array(\n '/artifacts/foo/12345',\n '/artifacts/foo/67890',\n )\n );\n\n $this->createTestFile( '/artifacts/foo/12345/bar.txt' );\n $this->createTestFile( '/artifacts/foo/67890/bar.txt' );\n $this->createTestFile( '/artifacts/foo/bar.txt' );\n $this->createTestFile( '/artifacts/bar.txt' );\n\n phpucFileUtil::deleteDirectory( PHPUC_TEST_DIR . '/artifacts' );\n\n $this->assertFileNotExists( PHPUC_TEST_DIR . '/artifacts' );\n }", "public function testChDir() {\n $currentDir = getcwd();\n $parentDir = dirname($currentDir);\n\n $handle = new Directory($parentDir);\n $handle->chdir();\n\n $this->assertEquals($parentDir, getcwd());\n chdir($currentDir);\n }", "public function test_mkdir_and_rmdir() {\n /**\n * Test creating a single directory\n */\n $dir = 'dir1';\n $uri = 'test://'.$dir;\n $path = $this->test_dir.'/'.$dir;\n\n mkdir($uri);\n $this->assertFileExists($path);\n rmdir($uri);\n $this->assertFileNotExists($path);\n\n /**\n * Test creating multiple directories recursively as needed\n */\n $dir = 'dir2/dir3/dir4';\n $uri = 'test://' . $dir;\n $path = $this->test_dir.'/'.$dir;\n\n mkdir($uri, 0777, true);\n\n $error_tripped = false;\n $this->assertFileExists($path);\n try {\n $return = rmdir('test://dir2');\n }\n catch (PHPUnit_Framework_Error $e) {\n $error_tripped = true;\n }\n\n $this->assertTrue($error_tripped, \"rmdir() on a non-empty directory should trigger an error.\");\n $this->assertTrue(wp_rmdir_recursive('test://dir2'));\n $this->assertFileNotExists($this->test_dir.'/dir2');\n }", "public function move (MetaFolder $destination): MetaFolder\n {\n if ($destination->l >= $this->l && $destination->r <= $this->r) {\n throw new MetaFolderException('Metafolder cannot be moved into itself or a contained subfolder.');\n }\n if (!$this->level) {\n throw new MetaFolderException('Root metafolder cannot be moved.');\n }\n\n $newRelPath = $destination->getRelativePath() . array_slice (explode('/', trim($this->getRelativePath(), '/')), -1)[0] . '/';\n\n try {\n $existingFolder = self::getInstance($newRelPath);\n }\n catch (MetaFolderException $e) {\n }\n if (isset($existingFolder)) {\n throw new MetaFolderException('Cannot move folder. Folder with same path already exists.');\n }\n\n // metafile updates\n\n $db = Application::getInstance()->getVxPDO();\n\n // handle nesting, kudos to https://rogerkeays.com/how-to-move-a-node-in-nested-sets-with-sql\n\n $subtreeWidth = $this->r - $this->l + 1;\n $newPos = $destination->l + 1;\n $subtreeDist = $newPos - $this->l;\n $tmpPos = $this->l;\n $levelDiff = $destination->level - $this->level + 1;\n\n // observe backward movement\n\n if($subtreeDist < 0) {\n $subtreeDist -= $subtreeWidth;\n $tmpPos += $subtreeWidth;\n }\n\n $db->beginTransaction();\n\n // create space for subtree at new position\n\n $db->execute('UPDATE folders SET l = l + ? WHERE l >= ?', [$subtreeWidth, $newPos]);\n $db->execute('UPDATE folders SET r = r + ? WHERE r >= ?', [$subtreeWidth, $newPos]);\n\n // move subtree into new space\n\n $db->execute('UPDATE folders SET l = l + ?, r = r + ?, level = level + (?) WHERE l >= ? AND r < ?', [$subtreeDist, $subtreeDist, $levelDiff, $tmpPos, $tmpPos + $subtreeWidth]);\n\n // remove space previously occupied by subtree\n\n $db->execute('UPDATE folders SET l = l - ? WHERE l > ?', [$subtreeWidth, $this->r]);\n $db->execute('UPDATE folders SET r = r - ? WHERE r > ?', [$subtreeWidth, $this->r]);\n\n // update path\n\n $db->execute('UPDATE folders SET path = REGEXP_REPLACE(path, ?, ?) WHERE path LIKE ?', ['^' . $this->getRelativePath(), $newRelPath, $this->getRelativePath() . '%']);\n $db->commit();\n\n self::refreshNestings();\n\n // move filesystem folder\n\n $this->filesystemFolder->move($destination->getFilesystemFolder());\n\n // unset cached instances\n\n unset(self::$instancesById[$this->id], self::$instancesByPath[$this->filesystemFolder->getPath()]);\n return self::getInstance(null, $this->id);\n }", "public function testRemoveDirectory()\n {\n $directory = vfsStream::url('foo');\n $method = $this->makeMethodPublic('empty_directory');\n $method->invokeArgs($this->testModel, [$directory, true]);\n\n $this->assertFileNotExists(vfsStream::url('foo'));\n }", "public function testOnDeletedDirectory() {\n\n $obj = new FileSystemStorageProvider($this->logger, $this->directory);\n\n $this->dir3->setParent($this->dir1); // This directory was moved.\n\n $obj->onDeletedDirectory($this->dir3);\n $this->assertFileNotExists($this->directory . \"/1/3\");\n\n $obj->onDeletedDirectory($this->dir2);\n $this->assertFileNotExists($this->directory . \"/1/2\");\n\n $obj->onDeletedDirectory($this->dir1);\n $this->assertFileNotExists($this->directory . \"/1\");\n }", "public function testMove()\n {\n $this->rlpMapper->save($this->content1, '/products/news/content1-news', 'default', 'de');\n $this->sessionManager->getSession()->save();\n\n // move\n $this->rlpMapper->move('/products/news/content1-news', '/products/asdf/content2-news', 'default', 'de');\n $this->sessionManager->getSession()->save();\n\n $oldNode = $this->session->getNode('/cmf/default/routes/de/products/news/content1-news');\n $newNode = $this->session->getNode('/cmf/default/routes/de/products/asdf/content2-news');\n\n $oldNodeMixins = $oldNode->getMixinNodeTypes();\n $newNodeMixins = $newNode->getMixinNodeTypes();\n\n $this->assertEquals('sulu:path', $newNodeMixins[0]->getName());\n $this->assertEquals('sulu:path', $oldNodeMixins[0]->getName());\n\n $this->assertTrue($oldNode->getPropertyValue('sulu:history'));\n $this->assertEquals($newNode, $oldNode->getPropertyValue('sulu:content'));\n $this->assertEquals($this->content1, $newNode->getPropertyValue('sulu:content'));\n\n // get content from new path\n $result = $this->rlpMapper->loadByResourceLocator('/products/asdf/content2-news', 'default', 'de');\n $this->assertEquals($this->content1->getIdentifier(), $result);\n\n // get content from history should throw an exception\n $this->setExpectedException('Sulu\\Component\\Content\\Exception\\ResourceLocatorMovedException');\n $result = $this->rlpMapper->loadByResourceLocator('/products/news/content1-news', 'default', 'de');\n }", "public function testMove(): void\n {\n $this->document1->setResourceSegment('/products/news/content1-news');\n $this->phpcrMapper->save($this->document1);\n $this->sessionManager->getSession()->save();\n\n // move\n $this->document1->setResourceSegment('/products/asdf/content2-news');\n $this->phpcrMapper->save($this->document1);\n $this->sessionManager->getSession()->save();\n\n $oldNode = $this->defaultSession->getNode('/cmf/sulu_io/routes/de/products/news/content1-news');\n $newNode = $this->defaultSession->getNode('/cmf/sulu_io/routes/de/products/asdf/content2-news');\n\n $oldNodeMixins = $oldNode->getMixinNodeTypes();\n $newNodeMixins = $newNode->getMixinNodeTypes();\n\n $this->assertEquals('sulu:path', $newNodeMixins[0]->getName());\n $this->assertEquals('sulu:path', $oldNodeMixins[0]->getName());\n\n $this->assertTrue($oldNode->getPropertyValue('sulu:history'));\n $this->assertEquals($newNode, $oldNode->getPropertyValue('sulu:content'));\n $this->assertEquals(\n $this->documentInspector->getNode($this->document1),\n $newNode->getPropertyValue('sulu:content')\n );\n\n // get content from new path\n $result = $this->phpcrMapper->loadByResourceLocator('/products/asdf/content2-news', 'sulu_io', 'de');\n $this->assertEquals($this->document1->getUuid(), $result);\n\n // get content from history should throw an exception\n $this->expectException(ResourceLocatorMovedException::class);\n $this->phpcrMapper->loadByResourceLocator('/products/news/content1-news', 'sulu_io', 'de');\n }", "public function testExists() {\n $testDirName = self::TEST_DIR . '/testExists';\n\n $handle = (new Directory($testDirName));\n\n mkdir($testDirName);\n $this->assertTrue($handle->exists());\n\n rmdir($testDirName);\n $this->assertFalse($handle->exists());\n }", "protected function tearDown()\n {\n $test_dirs = array(\n ROOT.DS.'test_dir',\n ROOT.DS.'test_new_dir',\n SYSTEM.DS.'test_dir',\n );\n foreach($test_dirs as $f){\n is_dir($f) and rmdir($f);\n }\n }", "public function testDirnameReturnsDirectory()\n {\n file_put_contents(self::$temp.DS.'foo.txt', 'foo');\n\n $this->assertSame(self::$temp, Storage::dirname(self::$temp.DS.'foo.txt'));\n }", "public function testCopy() {\n $sourceDirName = self::TEST_DIR . '/testCopyDirectorySource';\n $targetDirName = self::TEST_DIR . '/testCopyDirectoryTarget';\n\n mkdir($sourceDirName);\n\n $directoryHandle = new Directory($sourceDirName);\n\n $directoryHandle->copy(new Directory($targetDirName));\n\n $this->assertDirectoryExists($targetDirName);\n $this->assertDirectoryExists($sourceDirName);\n }", "public function move(string $source, string $destination)\n {\n $this->filesystem->move(\n $this->relativeToRoot($source),\n $this->relativeToRoot($destination)\n );\n }", "public function testMoveNotExist()\n {\n $this->rlpMapper->save($this->content1, '/news/news-1', 'default', 'de');\n $this->sessionManager->getSession()->save();\n\n $this->setExpectedException('Sulu\\Component\\Content\\Exception\\ResourceLocatorNotFoundException');\n $this->rlpMapper->move('/news', '/neuigkeiten', 'default', 'de');\n }", "function move_dir_to_tmp($src, $id)\n{\n $CI =& get_instance();\n $tmpPath = $CI->config->item('site_data_dir') . '/tmp/' . time() . '/';\n if (!is_dir($tmpPath))\n {\n mkdir($tmpPath, 0775, TRUE);\n }\n $tmpPath .= '/' . $id . '/';\n rename($src, $tmpPath);\n return $tmpPath;\n}", "function narrative_move_files($current_narrative_dir, $new_narrative_dir)\n{\n $file_scan = scandir($current_narrative_dir);\n foreach ($file_scan as $filecheck)\n {\n if ($filecheck != '.' && $filecheck != '..' && !is_dir($current_narrative_dir . $filecheck))\n {\n rename($current_narrative_dir . $filecheck, $new_narrative_dir . $filecheck);\n }\n }\n}", "public function testEnsureExists() {\n $testDirName = self::TEST_DIR . '/testEnsureExists';\n\n (new Directory($testDirName))->ensureExists();\n\n $this->assertDirectoryExists($testDirName);\n }", "function moveFinalDirectories($aBooksDone, $aDirectories)\r\n{\r\n\t$readydir = $aDirectories['ready'];\r\n\t$sipdir = $aDirectories['sip'];\r\n\t$result = 0;\r\n\r\n\tforeach ($aBooksDone as $itemnumber) {\r\n\t\t$sourcedir = $readydir . '\\\\' . $itemnumber;\r\n\t\t$destinationdir = $sipdir . '\\\\' . $itemnumber;\r\n\r\n\t\tif (!(@opendir($destinationdir))) {\r\n\t\t\t$mk = mkdir($destinationdir);\r\n\t\t\t//if ($mk === FALSE) {\r\n\t\t\t//\t$result = 0;\r\n\t\t\t//\treturn $result;\r\n\t\t\t//}\r\n\t\t}\r\n\r\n\t\t$dh = opendir($sourcedir);\r\n if ($dh) {\r\n while (($file = @readdir($dh)) !== false) {\r\n if ($file != \".\" && $file != \"..\") {\r\n $source = $sourcedir . \"\\\\\" . $file;\r\n $destination = $destinationdir . \"\\\\\" . $file;\r\n //echo 'ik zou ' . $source . ' verplaatsen naar ' . $destination . '<br>';\r\n $result = @rename($source, $destination);\r\n }\r\n }\r\n \t\t}\r\n\r\n\t\t$result = rmdir($sourcedir);\r\n\t}\r\n\r\n\treturn $result;\r\n}", "function move($source, $destination);", "public function moveToTmpDir()\n\t{\n\t\tif($this->source instanceof UploadedFile) {\n\t\t\t$this->source->move($this->getTmpDir()->getRootPath());\n\t\t} else if(is_string($this->source)) {\n\t\t\tcopy($this->params['path'], $this->getTmpDir()->getRootPath() . '/' . $this->params['name']);\n\t\t}\n\t}", "function make_move_build($build_path) {\n $tmp_path = make_tmp();\n $ret = TRUE;\n if ($build_path == '.') {\n $info = drush_scan_directory($tmp_path . DIRECTORY_SEPARATOR . '__build__', '/./', array('.', '..'), 0, FALSE, 'filename', 0, TRUE);\n foreach ($info as $file) {\n $destination = $build_path . DIRECTORY_SEPARATOR . $file->basename;\n if (file_exists($destination)) {\n // To prevent the removal of top-level directories such as 'modules' or\n // 'themes', descend in a level if the file exists.\n // TODO: This only protects one level of directories from being removed.\n $files = drush_scan_directory($file->filename, '/./', array('.', '..'), 0, FALSE);\n foreach ($files as $file) {\n $ret = $ret && drush_copy_dir($file->filename, $destination . DIRECTORY_SEPARATOR . $file->basename, FILE_EXISTS_MERGE);\n }\n }\n else {\n $ret = $ret && drush_copy_dir($file->filename, $destination);\n }\n }\n }\n else {\n drush_mkdir(dirname($build_path));\n $ret = drush_move_dir($tmp_path . DIRECTORY_SEPARATOR . '__build__', $tmp_path . DIRECTORY_SEPARATOR . basename($build_path), TRUE);\n $ret = $ret && drush_copy_dir($tmp_path . DIRECTORY_SEPARATOR . basename($build_path), $build_path);\n }\n\n // Copying to final destination resets write permissions. Re-apply.\n if (drush_get_option('prepare-install')) {\n $default = $build_path . '/sites/default';\n chmod($default . '/settings.php', 0666);\n chmod($default . '/files', 0777);\n }\n\n if (!$ret) {\n drush_set_error('MAKE_CANNOT_MOVE_BUILD', dt(\"Cannot move build into place.\"));\n }\n return $ret;\n}", "public function testDeleteDirectoryWithLinksAndSymlinks()\n {\n if ( !function_exists( 'link' ) || !function_exists( 'symlink' ) )\n {\n $this->markTestSkipped( 'Missing \"link\" or \"symlink\" function.' );\n return;\n }\n\n $this->createTestDirectories( array( '/logs/foo/12345' ) );\n $this->createTestFile( '/logs/foo/12345/bar.txt' );\n\n $file = PHPUC_TEST_DIR . '/logs/foo/12345/bar.txt';\n\n link( $file, PHPUC_TEST_DIR . '/logs/bar.txt' );\n symlink( $file, PHPUC_TEST_DIR . '/logs/foo/bar.txt' );\n\n phpucFileUtil::deleteDirectory( PHPUC_TEST_DIR . '/logs' );\n\n $this->assertFileNotExists( PHPUC_TEST_DIR . '/logs' );\n }", "public function testDirectoryFunctions()\n {\n $dir = 'pear-service-amazon-s3://' . $this->bucketName . '/dir';\n $this->assertFalse(file_exists($dir));\n $this->assertTrue(mkdir($dir));\n $this->assertTrue(is_dir($dir));\n $this->assertTrue(is_readable($dir));\n $this->assertTrue(is_writable($dir));\n $this->assertFalse(is_file($dir));\n $this->assertTrue(rmdir($dir));\n clearstatcache();\n $this->assertFalse(file_exists($dir));\n }", "function moveTestSuite(&$smartyObj,$template_dir,&$tprojectMgr,$argsObj)\r\n{\r\n $exclude_node_types=array('testplan' => 1, 'requirement' => 1, 'requirement_spec' => 1);\r\n\r\n $tprojectMgr->tree_manager->change_parent($argsObj->objectID,$argsObj->containerID);\r\n $tprojectMgr->tree_manager->change_child_order($argsObj->containerID,$argsObj->objectID,\r\n $argsObj->target_position,$exclude_node_types);\r\n\r\n $guiObj = new stdClass();\r\n $guiObj->id = $argsObj->tprojectID;\r\n $guiObj->refreshTree = $argsObj->refreshTree;\r\n\r\n $tprojectMgr->show($smartyObj,$guiObj,$template_dir,$argsObj->tprojectID,null,'ok');\r\n}", "public function testMoveFail_PluginExists()\n {\n $file = array(\"name\"=>\"zipNoSubfolder.zip\", \"size\"=>500, \"tmp_name\"=>__DIR__.'/zipNoSubfolder.zip');\n\n $service = $this->setMockPluginUploaderServiceMoveUploadedFile();\n\n $result = $service->upload($file);\n // check we got the correct result first time around\n $this->assertEquals(false, $result);\n\n $result = $service->upload($file);\n // check we got the correct result second time around\n $this->assertEquals('A plugin with the same name (TestPlugin) is already uploaded.', $result);\n }", "public function moveDirectory($oldDirName, $newDirName)\n\t{\n\t\treturn $this->addAction(new MoveDirectory($oldDirName, $newDirName));\n\t}", "public function testMoveFileFromTmpWithMediaStorageDatabase(): void\n {\n $fileName = 'magento_small_image.jpg';\n $storage = $this->objectManager->get(Storage::class);\n $databaseStorage = $this->objectManager->get(Storage\\Database::class);\n $directory = $this->objectManager->get(DatabaseFactory::class)->create();\n // Synchronize media.\n $storage->synchronize(\n [\n 'type' => 1,\n 'connection' => 'default_setup'\n ]\n );\n // Upload file.\n $fixtureDir = realpath(__DIR__ . '/../_files');\n $filePath = $this->tmpDirectory->getAbsolutePath($fileName);\n copy($fixtureDir . DIRECTORY_SEPARATOR . $fileName, $filePath);\n $_FILES['image'] = [\n 'name' => $fileName,\n 'type' => 'image/jpeg',\n 'tmp_name' => $filePath,\n 'error' => 0,\n 'size' => 12500,\n ];\n $result = $this->imageUploader->saveFileToTmpDir('image');\n // Move file from tmp dir.\n $moveResult = $this->imageUploader->moveFileFromTmp($result['name'], true);\n // Verify file moved to new dir.\n $databaseStorage->loadByFilename($moveResult);\n $directory->loadByPath('catalog/category');\n $this->assertEquals('catalog/category', $databaseStorage->getDirectory());\n $this->assertEquals($directory->getId(), $databaseStorage->getDirectoryId());\n }", "public function tearDown() {\n\t\tif(is_dir('/tmp/clara')) {\n\t\t\t$this->rrmdir('/tmp/clara');\n\t\t}\n\t}", "function moveFiles($src, $dest)\n{\n if (!is_dir($src)) {\n return false;\n }\n\n // If the destination directory does not exist create it\n if (!is_dir($dest)) {\n if (!mkdir($dest)) {\n // If the destination directory could not be created stop processing\n return false;\n }\n }\n\n // Open the source directory to read in files\n $i = new DirectoryIterator($src);\n foreach ($i as $f) {\n if ($f->isFile()) {\n rename($f->getRealPath(), \"$dest/\" . $f->getFilename());\n } else {\n if (!$f->isDot() && $f->isDir()) {\n rmDirRecursive($f->getRealPath(), \"$dest/$f\");\n unlink($f->getRealPath());\n }\n }\n }\n unlink($src);\n}", "public function testCopyDirectoryReturnsFalseIfSourceIsntDirectory()\n {\n $origin = self::$temp.DS.'breeze'.DS.'boom'.DS.'foo'.DS.'bar'.DS.'baz';\n $this->assertFalse(Storage::cpdir($origin, self::$temp));\n }", "public function move(string $from, string $to) : bool\n {\n $absoluteFrom = $this->absolutePath($from);\n $absoluteTo = $this->absolutePath($to);\n\n if ($absoluteFrom == $absoluteTo)\n return true;\n\n $parts = explode('/', $absoluteTo);\n $folderTo = implode('/', array_splice($parts, 0, count($parts) - 1));\n\n $old = umask(0);\n $this->fileSystem()->makeDirectory($folderTo, 0777, true, true);\n umask($old);\n\n return $this->fileSystem()->move($absoluteFrom, $absoluteTo);\n }", "protected function tearDown()\n {\n if (file_exists(\"{$this->dir}/file1.mock\")) unlink(\"{$this->dir}/file1.mock\");\n if (file_exists(\"{$this->dir}/file2.mock\")) unlink(\"{$this->dir}/file2.mock\");\n if (file_exists(\"{$this->dir}/dir1/file3.mock\")) unlink(\"{$this->dir}/dir1/file3.mock\");\n if (file_exists(\"{$this->dir}/dir1/file4.mock\")) unlink(\"{$this->dir}/dir1/file4.mock\");\n if (file_exists(\"{$this->dir}/dir1\")) rmdir(\"{$this->dir}/dir1\");\n\n if (file_exists(sys_get_temp_dir().'/def/xyz.mock')) unlink(sys_get_temp_dir().'/def/xyz.mock'); \n if (file_exists(sys_get_temp_dir().'/def')) rmdir(sys_get_temp_dir().'/def'); \n\n if (file_exists($this->dir.\"/abc.mock\")) unlink($this->dir.\"/abc.mock\");\n if (file_exists($this->dir.\"/def.mock\")) unlink($this->dir.\"/def.mock\");\n\n if (file_exists(sys_get_temp_dir().'/abc/def/xy/abc.mock')) unlink(sys_get_temp_dir().'/abc/def/xy/abc.mock'); \n if (file_exists(sys_get_temp_dir().'/abc/def/xy/dd.mock')) unlink(sys_get_temp_dir().'/abc/def/xy/dd.mock'); \n if (file_exists(sys_get_temp_dir().'/abc/def/xy')) rmdir(sys_get_temp_dir().'/abc/def/xy'); \n if (file_exists(sys_get_temp_dir().'/abc/def')) rmdir(sys_get_temp_dir().'/abc/def'); \n if (file_exists(sys_get_temp_dir().'/abc')) rmdir(sys_get_temp_dir().'/abc'); \n \n if (file_exists(\"{$this->dir}/dir2\")) rmdir(\"{$this->dir}/dir2\");\n if (file_exists($this->dir)) rmdir($this->dir);\n \n Config_Mock_Unserialize:$created = array();\n unset(Q\\Transform::$drivers['from-mock']);\n }", "public function ftp_moveAll($src_dir, $dst_dir) {\n if (!(@$this->rmdir($directory) || @$this->delete($directory))) {\n # if the attempt to delete fails, get the file listing\n $filelist = @$this->listFiles($directory);\n\n # loop through the file list and recursively delete the FILE in the list\n foreach ($filelist as $file) {\n $this->recursiveDelete($file);\n }\n\n #if the file list is empty, delete the DIRECTORY we passed\n $this->recursiveDelete($directory);\n }\n }", "public function move($target_directory, $target_name = '', $replace = true, $target_filesystem_type = '')\n {\n if ($target_filesystem_type == '') {\n $target_filesystem_type = $this->getFilesystemType();\n }\n\n $this->moveOrCopy($target_directory, $target_name,\n $replace, $target_filesystem_type, 'move');\n\n return;\n }", "function __moveUploadedFile($source, $destination) {\r\n\t\tif (!Configure::read('Documents.isTesting')) {\r\n\t\t\treturn move_uploaded_file($source, $destination);\r\n\t\t} else {\r\n\t\t\treturn rename($source, $destination);\r\n\t\t}\r\n\r\n\t}", "public function move($sourcePath, $destinationPath) {\n\n\t\t$sourceNode = $this->getNodeForPath($sourcePath);\n\t\tif ($sourceNode instanceof \\Sabre_DAV_ICollection and $this->nodeExists($destinationPath)) {\n\t\t\tthrow new \\Sabre_DAV_Exception_Forbidden('Could not copy directory ' . $sourceNode . ', target exists');\n\t\t}\n\t\tlist($sourceDir,) = \\Sabre_DAV_URLUtil::splitPath($sourcePath);\n\t\tlist($destinationDir,) = \\Sabre_DAV_URLUtil::splitPath($destinationPath);\n\n\t\tFilesystem::rename($sourcePath, $destinationPath);\n\n\t\t$this->markDirty($sourceDir);\n\t\t$this->markDirty($destinationDir);\n\n\t}", "protected function _moveToImageDir()\n\t{\n\t\t$path = $this->getFilePath();\n\t\t$this->_uploadedFile->moveTo($path);\n\t\tchmod($path, 0644);\n\t}", "public function test_factory_not_exist()\n {\n Directory::factory(ROOT.DS.'test_dir');\n }", "public function move($source, $dest);", "public function move($destination)\r\n {\r\n if (!is_dir($destination)) {\r\n $this->createDirectory($destination);\r\n }\r\n\r\n if (!rename($this->filename, $destination . '/' . $this->getFilename())) {\r\n throw new \\DomainException(\r\n 'File (`' . $this->filename . '`) could not be moved to the destination directory (`' . $destination . '`).'\r\n );\r\n }\r\n\r\n $this->filename = $destination . $this->getFilename();\r\n }", "private function _moveImagesToNewFileSystem()\n\t{\n\t\tif (!Image::testFileSystem())\n\t\t\t$this->_errors[] = Tools::displayError('Error: your server configuration is not compatible with the new image system. No images were moved');\n\t\telse\n\t\t{\n\t\t\tini_set('max_execution_time', $this->max_execution_time); // ini_set may be disabled, we need the real value\n\t\t\t$this->max_execution_time = (int)ini_get('max_execution_time');\t\n\t\t\t$result = Image::moveToNewFileSystem($this->max_execution_time);\n\t\t\tif ($result === 'timeout')\n\t\t\t\t$this->_errors[] = Tools::displayError('Not all images have been moved, server timed out before finishing. Click on \\\"Move images\\\" again to resume moving images');\n\t\t\telseif ($result === false)\n\t\t\t\t$this->_errors[] = Tools::displayError('Error: some or all images could not be moved.');\n\t\t}\n\t\treturn (sizeof($this->_errors) > 0 ? false : true);\n\t}", "public function move(sfAssetFolder $new_parent)\n {\n // controls\n if($this->getNode()->isRoot())\n {\n throw new sfAssetException('The root folder cannot be moved');\n }\n else if($new_parent->hasSubFolder($this->getName()))\n {\n throw new sfAssetException('The target folder \"%folder%\" already contains a folder named \"%name%\". The folder has not been moved.', array('%folder%' => $new_parent, '%name%' => $this->getName()));\n }\n else if($new_parent->getNode()->isDescendantOf($this))\n {\n throw new sfAssetException('The target folder cannot be a subfolder of moved folder. The folder has not been moved.');\n }\n else if ($this->getId() == $new_parent->getId())\n {\n return;\n }\n \n $old_path = $this->getFullPath();\n \n $this->getNode()->moveAsLastChildOf($new_parent);\n $this->save();\n \n $descendants = $this->getNode()->getChildren();\n $descendants = $descendants ? $descendants : array();\n \n // move its assets\n self::movePhysically($old_path, $this->getFullPath());\n \n foreach ($descendants as $descendant)\n {\n // Update relative path\n $descendant->save();\n }\n \n // else: nothing to do\n }", "function move_uploaded_file_to_temp_directory($file, $destination_sufix_name) {\n do {\n $temp_destination = WORK_PATH.'/'.make_string(10).'_'.$destination_sufix_name;\n } while (is_file($temp_destination));\n \n if (move_uploaded_file($file, $temp_destination)) {\n return $temp_destination;\n } // if\n\n return false;\n }", "public function testGoBack() {\n $currentDir = getcwd();\n $parentDir = dirname($currentDir);\n\n $handle = new Directory($parentDir);\n $handle->chdir()->goBack();\n\n $this->assertEquals($currentDir, getcwd());\n chdir($currentDir);\n }", "public function move($path){\n\t\t$oldPath = $this->path;\n\t\t$path_array = explode(self::DS, $this->path);\n\t\t$fileName = $path_array[sizeof($path_array) - 1];\n\t\t$newPath = $path . self::DS . $fileName;\n\t\t$this->path = $newPath;\n\t\t$this->createFile($newPath);\n\t\tunlink($oldPath);\n\t}", "public function testCreateSubDirsWithExistingDirectory()\n {\n mkdir($this->dir.'56');\n $this->assertNotEmpty($this->hd->getHash());\n }", "function _moveFile($sourceDir, $destDir, $filename) {\n\t\t$currentFilePath = $sourceDir . DIRECTORY_SEPARATOR . $filename;\n\t\t$destinationPath = $destDir . DIRECTORY_SEPARATOR . $filename;\n\n\t\tif (!rename($currentFilePath, $destinationPath)) {\n\t\t\t$message = __('admin.fileLoader.moveFileFailed', array('filename' => $filename,\n\t\t\t\t'currentFilePath' => $currentFilePath, 'destinationPath' => $destinationPath));\n\t\t\t$this->addExecutionLogEntry($message, SCHEDULED_TASK_MESSAGE_TYPE_ERROR);\n\n\t\t\t// Script should always stop if it can't manipulate files inside\n\t\t\t// its own directory system.\n\t\t\tfatalError($message);\n\t\t}\n\n\t\treturn $destinationPath;\n\t}", "public function testOnNewDirectory() {\n\n $obj = new FileSystemStorageProvider($this->logger, $this->directory);\n\n $obj->onNewDirectory($this->dir1);\n $this->assertFileExists($this->directory . \"/1\");\n\n $obj->onNewDirectory($this->dir2);\n $this->assertFileExists($this->directory . \"/1/2\");\n\n $obj->onNewDirectory($this->dir3);\n $this->assertFileExists($this->directory . \"/1/2/3\");\n }", "public function dir_rewinddir() {}", "public function moveOrCopy\n (\n $target_directory,\n $target_name = '',\n $replace = false,\n $target_filesystem_type,\n $move_or_copy = 'copy'\n ) {\n\n /** Defaults */\n if ($target_directory == '') {\n $target_directory = $this->parent;\n }\n\n if ($target_name == '' && $this->is_file) {\n if ($target_directory == $this->parent) {\n throw new FilesystemException\n ('Ftp Filesystem ' . $move_or_copy\n . ': Must specify new file name when using the same target path: '\n . $this->path);\n }\n $target_name = $this->name;\n }\n\n if ($this->is_file === true) {\n $base_folder = $this->parent;\n } else {\n $base_folder = $this->path;\n }\n\n /** Edits */\n if (file_exists($this->path)) {\n } else {\n throw new FilesystemException\n ('Ftp Filesystem moveOrCopy: failed. This path does not exist: '\n . $this->path . ' Specified as source for ' . $move_or_copy\n . ' operation to ' . $target_directory);\n }\n\n if (file_exists($target_directory)) {\n } else {\n throw new FilesystemException\n ('Ftp Filesystem moveOrCopy: failed. This path does not exist: '\n . $this->path . ' Specified as destination for ' . $move_or_copy\n . ' to ' . $target_directory);\n }\n\n if (is_writeable($target_directory) === false) {\n throw new FilesystemException\n ('Ftp Filesystem Delete: No write access to file/path: ' . $target_directory);\n }\n\n if ($move_or_copy == 'move') {\n if (is_writeable($this->path) === false) {\n throw new FilesystemException\n ('Ftp Filesystem Delete: No write access for moving source file/path: '\n . $move_or_copy);\n }\n }\n\n if ($this->is_file === true || $target_name == '') {\n\n } else {\n if (is_dir($target_directory . '/' . $target_name)) {\n\n } else {\n\n new fsAdapter('write', $target_directory, $target_filesystem_type,\n $this->options = array('file' => $target_name)\n );\n }\n $target_directory = $target_directory . '/' . $target_name;\n $target_name = '';\n }\n\n /** Create new target directories from source directories list */\n if (count($this->directories) > 0) {\n\n asort($this->directories);\n\n $parent = '';\n $new_node = '';\n $new_path = '';\n\n foreach ($this->directories as $directory) {\n\n $new_path = $this->build_new_path($directory, $target_directory, $base_folder);\n\n if (is_dir($new_path)) {\n\n } else {\n\n $parent = dirname($new_path);\n $new_node = basename($new_path);\n\n new fsAdapter('write', $parent, $target_filesystem_type,\n $this->options = array('file' => $new_node)\n );\n }\n\n $parent = '';\n $new_node = '';\n $new_path = '';\n }\n }\n\n /** Copy files now that directories are in place */\n if (count($this->files) > 0) {\n\n $path_name = '';\n $file_name = '';\n\n foreach ($this->files as $file) {\n\n $new_path = $this->build_new_path($file, $target_directory, $base_folder);\n\n /** Single file copy or move */\n if ($this->is_file === true) {\n $file_name = $target_name;\n } else {\n $file_name = basename($file);\n }\n\n /** Source */\n $adapter = new fsAdapter('Read', $file);\n $data = $adapter->fs->data;\n\n /** Write Target */\n new fsAdapter('Write', $new_path, $target_filesystem_type,\n $this->options = array(\n 'file' => $file_name,\n 'replace' => $replace,\n 'data' => $data,\n )\n );\n\n $path_name = '';\n $file_name = '';\n }\n }\n\n /** For move, remove the files and folders just copied */\n if ($move_or_copy == 'move') {\n $this->_deleteDiscoveryFilesArray();\n $this->_deleteDiscoveryDirectoriesArray();\n }\n\n return true;\n }", "public function cleanUpFolder()\r\n {\r\n $fs = new Filesystem();\r\n\r\n foreach($this->file_list as $file) :\r\n if ( preg_match('#^'.$this->destination_dir.'/#', $file))\r\n $fs->remove($file);\r\n endforeach;\r\n }", "public function move($source, $target)\n {\n \n }", "protected function _before() {\n\t\tparent::_before ();\n\t\t$this->uFileSystem = new UFileSystem ();\n\t\t$this->testDir = $this->uFileSystem->cleanFilePathname ( \\ROOT . \\DS . \"tests-files/\" );\n\t\t$this->uFileSystem->xcopy ( $this->uFileSystem->cleanFilePathname ( \\ROOT . \\DS . \"files-tests/\" ), $this->testDir );\n\t}", "protected function removeTestFilePath()\n {\n $path = $this->getTestFilePath();\n FileHelper::removeDirectory($path);\n }", "public static function move($_path, $_target)\r\n {\r\n return rename($_path, $_target);\r\n }", "public function move($sourceDir,$sourceFile,$targetDir,$targetFile){\n\t\tif(!$this->connected){\n\t\t\treturn false;\n\t\t}\n\t\treturn $this->apiCall('move',array('sourcedir'=>$sourceDir,'source'=>$sourceFile,'targetdir'=>$targetDir,'target'=>$targetFile),true);\n\t}", "public function testPrepareDirOriginal()\n {\n $imgPath = $this->imageService->imgPath(\n \\Media\\Service\\Image::ORIGINAL,\n $this->imageId,\n $this->imageEntityData['extension']\n );\n $this->assertTrue($this->imageService->prepareDir($imgPath));\n }", "public function testDeleteFolder()\n {\n $remoteFolder = \"TestData/In\";\n\n $localName = \"Book1.xlsx\";\n $remoteName = \"Book1.xlsx\";\n\n CellsApiTestBase::ready( $this->instance,$localName ,$remoteFolder . \"/\" . $remoteName , \"\");\n \n $request = new DeleteFolderRequest();\n $request->setPath( \"OutResult/Create\");\n $request->setStorageName( \"\");\n $request->setRecursive( 'true');\n $this->instance->deleteFolder($request);\n }", "protected function onMove(){\n\t\tif (empty($this->post['directory']) || empty($this->post['file'])) return;\n\t\t\n\t\t$rename = empty($this->post['newDirectory']) && !empty($this->post['name']);\n\t\t$dir = $this->getDir($this->post['directory']);\n\t\t$file = realpath($dir . '/' . $this->post['file']);\n\t\t\n\t\t$is_dir = is_dir($file);\n\t\tif (!$this->checkFile($file) || (!$rename && $is_dir))\n\t\t\treturn;\n\t\t\n\t\tif ($rename || $is_dir){\n\t\t\tif (empty($this->post['name'])) return;\n\t\t\t$newname = $this->getName($this->post['name'], $dir);\n\t\t\t$fn = 'rename';\n\t\t}else{\n\t\t\t$newname = $this->getName(pathinfo($file, PATHINFO_FILENAME), $this->getDir($this->post['newDirectory']));\n\t\t\t$fn = !empty($this->post['copy']) ? 'copy' : 'rename';\n\t\t}\n\t\t\n\t\tif (!$newname) return;\n\t\t\n\t\t$ext = pathinfo($file, PATHINFO_EXTENSION);\n\t\tif ($ext) $newname .= '.' . $ext;\n\t\t$fn($file, $newname);\n\t\t\n\t\techo json_encode(array(\n\t\t\t'name' => pathinfo($this->normalize($newname), PATHINFO_BASENAME),\n\t\t));\n\t}", "function ftp_put_dir($loc_dir, $rmt_dir, $isRecursive=TRUE, $useWhiteList=FALSE) {\n\t\t$loc_dir = rtrim($loc_dir, '/');\n\t\t$rmt_dir = rtrim($rmt_dir, '/');\n\t\t\n\t\t$this->prv_ftp_put_dir($loc_dir, $rmt_dir, $isRecursive, $useWhiteList);\n\t}", "public static function move($path, $toPath, $replace = TRUE) {\n \n }", "public function testTypeIdentifiesDirectory()\n {\n mkdir(self::$temp.DS.'foo-dir');\n\n $this->assertSame('dir', Storage::type(self::$temp.DS.'foo-dir'));\n }", "function tearDown() {\n\t\t$this->wfRecursiveRemoveDir( $this->tmpName );\n\t}", "public function test_create_exists()\n {\n Directory::create(ROOT.DS.'application');\n }", "function movefile($POSTfrom, $POSTto, $currentdir) {\n\tif(count($POSTto) == 1) { //if the user selected only one \"move to\" location\n\t\tforeach($POSTfrom as $fromItem => $n1) { //$fromItem returns selected file/folder name to be moved, $n is checkbox status\n\t\t\tforeach($POSTto as $toItem => $n2) {//$toItem returns selected folder to have the files put in\n\t\t\t\tif(!file_exists($currentdir . \"/\" . $toItem . \"/\" . $fromItem)) {\n\t\t\t\t\tif(rename($currentdir . \"/\" . $fromItem, $currentdir . \"/\" . $toItem . \"/\" . $fromItem)) { //if rename worked, do nothing. Else, echo an error. Since rename() can rename a folder, it is possible to rename a file/folder to its new directory and have linux move it accourdingly\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if ($fromItem == $toItem) { //if user tries to move the same folder into its self\n\t\t\t\t\t\techo \"<p><b>Error</b>: Could not move file or folder <b>\" . $fromItem . \"</b>. You cannot move a file into its self. Everything before it was moved.</p>\";\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo \"<p><b>Error</b>: Could not move file or folder <b>\" . $fromItem . \"</b>. Everything before it was moved.</p>\";\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\techo \"<p><b>Error</b>: File already exists in the folder you want to move it to. Everything before <b>\" . $fromItem . \"</b> has been moved.</p>\";\n\t\t\t\t\techo \"<p>Rename file if you want to move it.</p>\";\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\techo \"<p><b>Error</b>: You selected more than one destination folder, or none at all. Or, you might have not selected anything to move.</p>\";\n\t\treturn false;\n\t}\n\t\n\treturn true; // If everything worked out, return true\n}", "public function remove_dir() {\n\n $path = $this->get_upload_pres_path();\n\n //append_debug_msg($path);\n\n if(!$path || !file_exists($path)){ return; }\n delete_dir($path);\n }", "protected function tearDown()\n {\n exec('rm -rf '.$this->testDir);\n chdir(__DIR__);\n }", "protected function tearDown()\n {\n exec('rm -rf '.$this->testDir);\n chdir(__DIR__);\n }" ]
[ "0.80949366", "0.7867393", "0.76190865", "0.7546802", "0.73030376", "0.7230169", "0.7162468", "0.6590736", "0.6350258", "0.6209349", "0.6183593", "0.6081983", "0.60330856", "0.5999443", "0.59931886", "0.5987112", "0.5961271", "0.59227955", "0.59041375", "0.5877521", "0.58459896", "0.58384687", "0.58262146", "0.5798939", "0.57848257", "0.5776328", "0.5723072", "0.5710129", "0.5704671", "0.5688802", "0.56250817", "0.56173205", "0.5613123", "0.5611958", "0.55716544", "0.5564868", "0.5542967", "0.5540844", "0.55406123", "0.5508295", "0.54881096", "0.5481234", "0.547544", "0.5452461", "0.5446057", "0.5422859", "0.5409587", "0.5407662", "0.5372875", "0.5350599", "0.53405005", "0.53332514", "0.53269327", "0.5325039", "0.5318805", "0.5308968", "0.5306821", "0.5299757", "0.52949876", "0.5269429", "0.5267709", "0.5262666", "0.5250621", "0.5227147", "0.52254", "0.5217053", "0.51947385", "0.51707006", "0.51673514", "0.51628804", "0.5159453", "0.5139611", "0.5139095", "0.51228327", "0.51184684", "0.51147395", "0.5111571", "0.5101115", "0.510105", "0.5078859", "0.50727654", "0.5069836", "0.50607467", "0.50598925", "0.50565666", "0.5052254", "0.50457454", "0.5037839", "0.5026886", "0.5018082", "0.5013133", "0.50055677", "0.50054705", "0.49945748", "0.49925277", "0.49851608", "0.49809313", "0.49780834", "0.49719653", "0.49719653" ]
0.84177864
0
Test for Directory::move() Attempts to move [ROOT]/test.txt to [ROOT] with overwriting disabled Throws \Kaili\DirectoryException because Directory alredy exists
Тест для Directory::move() Попытка переместить [ROOT]/test.txt в [ROOT] с отключенным перезаписыванием Выбрасывает \Kaili\DirectoryException, так как директория уже существует
public function test_move_directory_exists() { $object = Directory::create(ROOT.DS.'test_dir'); $object->move(ROOT, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_move_not_exists_dir()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT.DS.'not_exist');\n }", "public function test_move()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(SYSTEM);\n $this->assertTrue(is_dir(SYSTEM.DS.'test_dir'));\n $this->assertFalse(is_dir(ROOT.DS.'test_dir'));\n $this->assertEquals($object->get_path(), SYSTEM.DS.'test_dir');\n }", "public function testMoveDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp2', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp2'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp2'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp2', self::$temp.DS.'tmp3');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_dir(self::$temp.DS.'tmp2'));\n }", "public function testMoveDirectoryMovesEntireDirectoryAndOverwrites()\n {\n mkdir(self::$temp.DS.'tmp4', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp4'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp4'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'nested'.DS.'baz.txt', '');\n\n mkdir(self::$temp.DS.'tmp5', 0777, true);\n file_put_contents(self::$temp.DS.'tmp5'.DS.'foo2.txt', '');\n file_put_contents(self::$temp.DS.'tmp5'.DS.'bar2.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp4', self::$temp.DS.'tmp5', true);\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'foo2.txt'));\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'bar2.txt'));\n $this->assertFalse(is_dir(self::$temp.DS.'tmp4'));\n }", "public function testMoveRecursive() {\n $sourceDirName = self::TEST_DIR . '/testMoveRecursiveSource/hierachy1';\n $targetDirName = self::TEST_DIR . '/testMoveRecursiveTarget/hierachy1';\n\n mkdir(self::TEST_DIR . '/testMoveRecursiveSource/hierachy1', 0777, true);\n\n $directoryHandle = new Directory(self::TEST_DIR . '/testMoveRecursiveSource');\n\n $directoryHandle->move(new Directory(self::TEST_DIR . '/testMoveRecursiveTarget'));\n\n $this->assertDirectoryExists($targetDirName);\n $this->assertDirectoryNotExists(self::TEST_DIR . '/testMoveRecursiveSource');\n }", "public function testMoveEmpty() {\n $sourceDirName = self::TEST_DIR . '/testMoveEmptySource';\n $targetDirName = self::TEST_DIR . '/testMoveEmptyTarget';\n\n mkdir($sourceDirName);\n\n $directoryHandle = new Directory($sourceDirName);\n\n $directoryHandle->move(new Directory($targetDirName));\n\n $this->assertDirectoryExists($targetDirName);\n $this->assertDirectoryNotExists($sourceDirName);\n }", "public function testCopyDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::cpdir(self::$temp.DS.'tmp', self::$temp.DS.'tmp2');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt'));\n }", "public function test_rename()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->rename('test_new_dir');\n $this->assertEquals($object->get_base_name(), 'test_new_dir');\n }", "function moveDIR($dir,$dest=\"\",$debug,$nMode=0755) {\n //$debug = 1;\n $result=true;\n\n //if($debug) { echo \"<h2>Moving directory</h2><p> From:<br> $dir <br>To: $dest</p>\";}\n\n $path = dirname(__FILE__);\n $files = scandir($dir);\n\n foreach($files as $file) {\n if (substr( $file ,0,1) != \".\") {\n $pathFile = $dir.'/'.$file;\n if (is_dir($pathFile)) {\n //if($debug) { echo \"<p><b>Directory:</b> $pathFile</p>\"; }\n\n $newDir = $dest.\"/\".$file;\n\n if (!moveDIR($pathFile,$newDir,$debug)) {\n $result = false;\n }\n\n } else {\n //echo ($debug) ? \"<p>$pathFile is a file</p>\" : \"\";\n\n // $currentFile = realpath($file); // current location\n $currentFile = $pathFile;\n\n $newFile = $dest.\"/\".$file;\n\n if (!file_exists($dest)) {\n makeDIR($dest,0,$nMode);\n }\n // if file already exists remove it\n if (file_exists($newFile)) {\n //if($debug) { echo \"<p>File $newFile already exists - Deleting</p>\"; }\n unlink($newFile);\n } else {\n //if($debug) { echo \"<p>File $newFile doesn't exist yet</p>\"; }\n }\n\n // Move via rename\n // rename(oldname, newname)\n if (rename($currentFile , $newFile)) {\n (CHMOD == 1) ? chmod($newFile, 0755) : '';\n //if($debug) { echo \"<p>Moved $currentFile to $newFile</p>\"; }\n } else {\n //if($debug) { echo \"<p>Failed to move $currentFile to $newFile</p>\"; }\n $result = false;\n } // END rename \n\n } // END if dir or file\n } // end if no dot\n } // END foreach\n return $result;\n }", "public function testMoveFolder()\n {\n $remoteFolder = \"TestData/In\";\n\n $localName = \"Book1.xlsx\";\n $remoteName = \"Book1.xlsx\";\n\n CellsApiTestBase::ready( $this->instance,$localName ,$remoteFolder . \"/\" . $remoteName , \"\");\n \n $request = new MoveFolderRequest();\n $request->setSrcPath( \"OutResult/Create\");\n $request->setDestPath( \"OutResult/Move\");\n $request->setSrcStorageName( \"\");\n $request->setDestStorageName( \"\");\n $this->instance->moveFolder($request);\n }", "public function test_rename_same_name()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->rename('test_dir');\n $this->assertEquals($object->get_base_name(), 'test_dir');\n }", "public function testMoveNotExist()\n {\n $this->rlpMapper->save($this->content1, '/news/news-1', 'default', 'de');\n $this->sessionManager->getSession()->save();\n\n $this->setExpectedException('Sulu\\Component\\Content\\Exception\\ResourceLocatorNotFoundException');\n $this->rlpMapper->move('/news', '/neuigkeiten', 'default', 'de');\n }", "public function testOnMovedDocument() {\n\n $obj = new FileSystemStorageProvider($this->logger, getcwd());\n\n $this->dir3->setParentBackedUp($this->dir3->getParent());\n $this->dir2->removeChildren($this->dir3);\n $this->dir1->addChildren($this->dir3);\n\n $obj->onMovedDocument($this->dir3);\n $this->assertFileExists($this->directory . \"/1/3\");\n }", "public function move (MetaFolder $destination): MetaFolder\n {\n if ($destination->l >= $this->l && $destination->r <= $this->r) {\n throw new MetaFolderException('Metafolder cannot be moved into itself or a contained subfolder.');\n }\n if (!$this->level) {\n throw new MetaFolderException('Root metafolder cannot be moved.');\n }\n\n $newRelPath = $destination->getRelativePath() . array_slice (explode('/', trim($this->getRelativePath(), '/')), -1)[0] . '/';\n\n try {\n $existingFolder = self::getInstance($newRelPath);\n }\n catch (MetaFolderException $e) {\n }\n if (isset($existingFolder)) {\n throw new MetaFolderException('Cannot move folder. Folder with same path already exists.');\n }\n\n // metafile updates\n\n $db = Application::getInstance()->getVxPDO();\n\n // handle nesting, kudos to https://rogerkeays.com/how-to-move-a-node-in-nested-sets-with-sql\n\n $subtreeWidth = $this->r - $this->l + 1;\n $newPos = $destination->l + 1;\n $subtreeDist = $newPos - $this->l;\n $tmpPos = $this->l;\n $levelDiff = $destination->level - $this->level + 1;\n\n // observe backward movement\n\n if($subtreeDist < 0) {\n $subtreeDist -= $subtreeWidth;\n $tmpPos += $subtreeWidth;\n }\n\n $db->beginTransaction();\n\n // create space for subtree at new position\n\n $db->execute('UPDATE folders SET l = l + ? WHERE l >= ?', [$subtreeWidth, $newPos]);\n $db->execute('UPDATE folders SET r = r + ? WHERE r >= ?', [$subtreeWidth, $newPos]);\n\n // move subtree into new space\n\n $db->execute('UPDATE folders SET l = l + ?, r = r + ?, level = level + (?) WHERE l >= ? AND r < ?', [$subtreeDist, $subtreeDist, $levelDiff, $tmpPos, $tmpPos + $subtreeWidth]);\n\n // remove space previously occupied by subtree\n\n $db->execute('UPDATE folders SET l = l - ? WHERE l > ?', [$subtreeWidth, $this->r]);\n $db->execute('UPDATE folders SET r = r - ? WHERE r > ?', [$subtreeWidth, $this->r]);\n\n // update path\n\n $db->execute('UPDATE folders SET path = REGEXP_REPLACE(path, ?, ?) WHERE path LIKE ?', ['^' . $this->getRelativePath(), $newRelPath, $this->getRelativePath() . '%']);\n $db->commit();\n\n self::refreshNestings();\n\n // move filesystem folder\n\n $this->filesystemFolder->move($destination->getFilesystemFolder());\n\n // unset cached instances\n\n unset(self::$instancesById[$this->id], self::$instancesByPath[$this->filesystemFolder->getPath()]);\n return self::getInstance(null, $this->id);\n }", "function narrative_move_files($current_narrative_dir, $new_narrative_dir)\n{\n $file_scan = scandir($current_narrative_dir);\n foreach ($file_scan as $filecheck)\n {\n if ($filecheck != '.' && $filecheck != '..' && !is_dir($current_narrative_dir . $filecheck))\n {\n rename($current_narrative_dir . $filecheck, $new_narrative_dir . $filecheck);\n }\n }\n}", "public function testMoveMovesStorages()\n {\n file_put_contents(self::$temp.DS.'foo.txt', 'foo');\n\n Storage::move(self::$temp.DS.'foo.txt', self::$temp.DS.'bar.txt');\n\n $this->assertTrue(is_file(self::$temp.DS.'bar.txt'));\n $this->assertFalse(is_file(self::$temp.DS.'foo.txt'));\n }", "protected function _move($source, $targetDir, $name) {\r\n\t\treturn false;\r\n\t}", "public function test_remove()\n {\n $path = ROOT.DS.'test_dir';\n $object = Directory::create($path);\n $object->remove($path);\n $this->assertFalse(is_dir($path));\n }", "public function testMoveSuccess_ZipNoSubfolder()\n {\n $file = array(\"name\"=>\"zipNoSubfolder.zip\", \"size\"=>500, \"tmp_name\"=>__DIR__.'/zipNoSubfolder.zip');\n\n $service = $this->setMockPluginUploaderServiceMoveUploadedFile();\n\n $result = $service->upload($file);\n\n // check we got the correct result\n $this->assertEquals(false, $result);\n }", "public function testCopyDirOverExistingUpcountsDestinationDirname()\n {\n $this->storage->createDir('/', 'dest');\n $this->storage->createDir('/dest', 'tmp');\n $this->storage->createFile('/dest/tmp/', 'a.txt');\n $this->storage->createDir('/', 'tmp');\n $this->storage->createFile('/tmp/', 'b.txt');\n\n $this->storage->copyDir('/tmp', '/dest');\n\n $this->assertDirectoryExists(TEST_REPOSITORY.'/dest/tmp/');\n $this->assertTrue($this->storage->fileExists('/dest/tmp/a.txt'));\n\n $this->assertDirectoryExists(TEST_REPOSITORY.'/dest/tmp (1)');\n $this->assertTrue($this->storage->fileExists('/dest/tmp (1)/b.txt'));\n }", "public function testMoveFileFromTmp(): void\n {\n $expectedFilePath = $this->imageUploader->getBasePath() . DIRECTORY_SEPARATOR . 'magento_small_image_1.jpg';\n\n $this->assertFalse($this->mediaDirectory->isExist($expectedFilePath));\n\n $this->imageUploader->moveFileFromTmp('magento_small_image.jpg');\n\n $this->assertTrue($this->mediaDirectory->isExist($expectedFilePath));\n }", "public function move($destination)\r\n {\r\n if (!is_dir($destination)) {\r\n $this->createDirectory($destination);\r\n }\r\n\r\n if (!rename($this->filename, $destination . '/' . $this->getFilename())) {\r\n throw new \\DomainException(\r\n 'File (`' . $this->filename . '`) could not be moved to the destination directory (`' . $destination . '`).'\r\n );\r\n }\r\n\r\n $this->filename = $destination . $this->getFilename();\r\n }", "public function testMoveFail_PluginExists()\n {\n $file = array(\"name\"=>\"zipNoSubfolder.zip\", \"size\"=>500, \"tmp_name\"=>__DIR__.'/zipNoSubfolder.zip');\n\n $service = $this->setMockPluginUploaderServiceMoveUploadedFile();\n\n $result = $service->upload($file);\n // check we got the correct result first time around\n $this->assertEquals(false, $result);\n\n $result = $service->upload($file);\n // check we got the correct result second time around\n $this->assertEquals('A plugin with the same name (TestPlugin) is already uploaded.', $result);\n }", "static public function movePhysically($old_path, $new_path)\n {\n\n if(!is_dir($old_path))\n {\n return true;\n }\n \n if (!is_dir($new_path) || !is_writable($new_path))\n {\n $old = umask(0);\n mkdir($new_path, 0770);\n umask($old); \n }\n \n $files = sfFinder::type('file')->maxdepth(0)->in($old_path);\n $success = true;\n\n foreach ($files as $file)\n {\n $success = rename($file, $new_path . '/' . basename($file)) && $success;\n }\n if ($success)\n {\n $folders = sfFinder::type('dir')->maxdepth(0)->in($old_path);\n foreach($folders as $folder)\n {\n $new_name = substr($folder, strlen($old_path));\n $success = self::movePhysically($folder, $new_path . '/' . $new_name) && $success;\n }\n }\n \n $success = rmdir($old_path) && $success;\n\n return $success;\n }", "public function move(string $from, string $to) : bool\n {\n $absoluteFrom = $this->absolutePath($from);\n $absoluteTo = $this->absolutePath($to);\n\n if ($absoluteFrom == $absoluteTo)\n return true;\n\n $parts = explode('/', $absoluteTo);\n $folderTo = implode('/', array_splice($parts, 0, count($parts) - 1));\n\n $old = umask(0);\n $this->fileSystem()->makeDirectory($folderTo, 0777, true, true);\n umask($old);\n\n return $this->fileSystem()->move($absoluteFrom, $absoluteTo);\n }", "public function testMoveSuccess_zipSubfolder()\n {\n $file = array(\"name\"=>\"zipSubfolder.zip\", \"size\"=>500, \"tmp_name\"=>__DIR__.'/zipSubfolder.zip');\n\n $service = $this->setMockPluginUploaderServiceMoveUploadedFile();\n\n $result = $service->upload($file);\n\n // check we got the correct result\n $this->assertEquals(false, $result);\n }", "function move($source, $destination);", "function moveFiles($src, $dest)\n{\n if (!is_dir($src)) {\n return false;\n }\n\n // If the destination directory does not exist create it\n if (!is_dir($dest)) {\n if (!mkdir($dest)) {\n // If the destination directory could not be created stop processing\n return false;\n }\n }\n\n // Open the source directory to read in files\n $i = new DirectoryIterator($src);\n foreach ($i as $f) {\n if ($f->isFile()) {\n rename($f->getRealPath(), \"$dest/\" . $f->getFilename());\n } else {\n if (!$f->isDot() && $f->isDir()) {\n rmDirRecursive($f->getRealPath(), \"$dest/$f\");\n unlink($f->getRealPath());\n }\n }\n }\n unlink($src);\n}", "public function testMove(): void\n {\n $this->document1->setResourceSegment('/products/news/content1-news');\n $this->phpcrMapper->save($this->document1);\n $this->sessionManager->getSession()->save();\n\n // move\n $this->document1->setResourceSegment('/products/asdf/content2-news');\n $this->phpcrMapper->save($this->document1);\n $this->sessionManager->getSession()->save();\n\n $oldNode = $this->defaultSession->getNode('/cmf/sulu_io/routes/de/products/news/content1-news');\n $newNode = $this->defaultSession->getNode('/cmf/sulu_io/routes/de/products/asdf/content2-news');\n\n $oldNodeMixins = $oldNode->getMixinNodeTypes();\n $newNodeMixins = $newNode->getMixinNodeTypes();\n\n $this->assertEquals('sulu:path', $newNodeMixins[0]->getName());\n $this->assertEquals('sulu:path', $oldNodeMixins[0]->getName());\n\n $this->assertTrue($oldNode->getPropertyValue('sulu:history'));\n $this->assertEquals($newNode, $oldNode->getPropertyValue('sulu:content'));\n $this->assertEquals(\n $this->documentInspector->getNode($this->document1),\n $newNode->getPropertyValue('sulu:content')\n );\n\n // get content from new path\n $result = $this->phpcrMapper->loadByResourceLocator('/products/asdf/content2-news', 'sulu_io', 'de');\n $this->assertEquals($this->document1->getUuid(), $result);\n\n // get content from history should throw an exception\n $this->expectException(ResourceLocatorMovedException::class);\n $this->phpcrMapper->loadByResourceLocator('/products/news/content1-news', 'sulu_io', 'de');\n }", "public function testMove()\n {\n $this->rlpMapper->save($this->content1, '/products/news/content1-news', 'default', 'de');\n $this->sessionManager->getSession()->save();\n\n // move\n $this->rlpMapper->move('/products/news/content1-news', '/products/asdf/content2-news', 'default', 'de');\n $this->sessionManager->getSession()->save();\n\n $oldNode = $this->session->getNode('/cmf/default/routes/de/products/news/content1-news');\n $newNode = $this->session->getNode('/cmf/default/routes/de/products/asdf/content2-news');\n\n $oldNodeMixins = $oldNode->getMixinNodeTypes();\n $newNodeMixins = $newNode->getMixinNodeTypes();\n\n $this->assertEquals('sulu:path', $newNodeMixins[0]->getName());\n $this->assertEquals('sulu:path', $oldNodeMixins[0]->getName());\n\n $this->assertTrue($oldNode->getPropertyValue('sulu:history'));\n $this->assertEquals($newNode, $oldNode->getPropertyValue('sulu:content'));\n $this->assertEquals($this->content1, $newNode->getPropertyValue('sulu:content'));\n\n // get content from new path\n $result = $this->rlpMapper->loadByResourceLocator('/products/asdf/content2-news', 'default', 'de');\n $this->assertEquals($this->content1->getIdentifier(), $result);\n\n // get content from history should throw an exception\n $this->setExpectedException('Sulu\\Component\\Content\\Exception\\ResourceLocatorMovedException');\n $result = $this->rlpMapper->loadByResourceLocator('/products/news/content1-news', 'default', 'de');\n }", "public static function move($_path, $_target)\r\n {\r\n return rename($_path, $_target);\r\n }", "public function moveDirectory( $source, $destination )\n {\n $path = explode( DS, $source );\n\n $destination = $destination . DS . $path[ count( $path ) - 1 ];\n\n $result = $this->copyDirectory( $source, $destination, TRUE );\n\n if ( TRUE === $result )\n {\n $result = $this->deleteDirectory( $source );\n }\n\n return $result;\n }", "public function move(DirectoryInterface $directory, string $name = null): void\n {\n if ( ! $this->exists() ) {\n throw new FileSystemException('can not move not existing file: '.$this->filename);\n }\n\n if ( ! $directory->exists() ) {\n throw new FileSystemException('can not move to not existing target directories: '.$directory->getPath());\n }\n\n if ( false !== strpos(str_replace('\\\\', '/', $name), '/') ) {\n throw new FileSystemException('name parameter can not contain slashes');\n }\n\n $name = $name ?? $this->filename;\n\n $done = rename(\n $this->getPathname(),\n $directory->getPath().'/'.$name\n );\n\n if ( ! $done ) {\n throw new FileSystemException('moving failed, probably due to access issues');\n }\n\n $this->directory = $directory;\n $this->filename = $name;\n $this->extension = pathinfo($name, PATHINFO_EXTENSION);\n $this->basename = basename($name, '.'.$this->extension);\n }", "public static function move($path, $toPath, $replace = TRUE) {\n \n }", "public function move(string $source, string $destination)\n {\n $this->filesystem->move(\n $this->relativeToRoot($source),\n $this->relativeToRoot($destination)\n );\n }", "function moveFolder($user_dir){\r\n\t\t\t\t// open the user's directory\r\n\t\t\t\t\t$path = './cloud/'.$_SESSION['SESS_USER_ID'].'/'; // '.' for current\r\n\r\n\t\t\t\t\t\r\n\t\t\t}", "function movefile($POSTfrom, $POSTto, $currentdir) {\n\tif(count($POSTto) == 1) { //if the user selected only one \"move to\" location\n\t\tforeach($POSTfrom as $fromItem => $n1) { //$fromItem returns selected file/folder name to be moved, $n is checkbox status\n\t\t\tforeach($POSTto as $toItem => $n2) {//$toItem returns selected folder to have the files put in\n\t\t\t\tif(!file_exists($currentdir . \"/\" . $toItem . \"/\" . $fromItem)) {\n\t\t\t\t\tif(rename($currentdir . \"/\" . $fromItem, $currentdir . \"/\" . $toItem . \"/\" . $fromItem)) { //if rename worked, do nothing. Else, echo an error. Since rename() can rename a folder, it is possible to rename a file/folder to its new directory and have linux move it accourdingly\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if ($fromItem == $toItem) { //if user tries to move the same folder into its self\n\t\t\t\t\t\techo \"<p><b>Error</b>: Could not move file or folder <b>\" . $fromItem . \"</b>. You cannot move a file into its self. Everything before it was moved.</p>\";\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo \"<p><b>Error</b>: Could not move file or folder <b>\" . $fromItem . \"</b>. Everything before it was moved.</p>\";\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\techo \"<p><b>Error</b>: File already exists in the folder you want to move it to. Everything before <b>\" . $fromItem . \"</b> has been moved.</p>\";\n\t\t\t\t\techo \"<p>Rename file if you want to move it.</p>\";\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\techo \"<p><b>Error</b>: You selected more than one destination folder, or none at all. Or, you might have not selected anything to move.</p>\";\n\t\treturn false;\n\t}\n\t\n\treturn true; // If everything worked out, return true\n}", "function _moveFile($sourceDir, $destDir, $filename) {\n\t\t$currentFilePath = $sourceDir . DIRECTORY_SEPARATOR . $filename;\n\t\t$destinationPath = $destDir . DIRECTORY_SEPARATOR . $filename;\n\n\t\tif (!rename($currentFilePath, $destinationPath)) {\n\t\t\t$message = __('admin.fileLoader.moveFileFailed', array('filename' => $filename,\n\t\t\t\t'currentFilePath' => $currentFilePath, 'destinationPath' => $destinationPath));\n\t\t\t$this->addExecutionLogEntry($message, SCHEDULED_TASK_MESSAGE_TYPE_ERROR);\n\n\t\t\t// Script should always stop if it can't manipulate files inside\n\t\t\t// its own directory system.\n\t\t\tfatalError($message);\n\t\t}\n\n\t\treturn $destinationPath;\n\t}", "public function move($path) {\n\n if (!$this->exists())\n throw new Exception\\FileException(\"File not found\", 1);\n\n if (!rename($this->path, $path))\n throw new Exception\\FileException(\"Unknown error\", 0);\n\n return true;\n }", "function __moveUploadedFile($source, $destination) {\r\n\t\tif (!Configure::read('Documents.isTesting')) {\r\n\t\t\treturn move_uploaded_file($source, $destination);\r\n\t\t} else {\r\n\t\t\treturn rename($source, $destination);\r\n\t\t}\r\n\r\n\t}", "public function move($sourcePath, $destinationPath, $checkIfIsUploaded = false, $overwrite = true);", "public function move($uid) {\n\n $uid = str::slug($uid);\n\n if(empty($uid)) {\n throw new Exception('The uid is missing');\n }\n\n // don't do anything if the uid exists\n if($this->uid() === $uid) return true;\n\n // check for an existing page with the same UID\n if($this->siblings()->not($this)->find($uid)) {\n throw new Exception('A page with this uid already exists');\n }\n\n $dir = $this->isVisible() ? $this->num() . '-' . $uid : $uid;\n $root = dirname($this->root()) . DS . $dir;\n\n if(!dir::move($this->root(), $root)) {\n throw new Exception('The directory could not be moved');\n }\n\n $this->dirname = $dir;\n $this->root = $root;\n $this->uid = $uid;\n\n // assign a new id and uri\n $this->id = $this->uri = ltrim($this->parent->id() . '/' . $this->uid, '/');\n\n // clean the cache\n $this->kirby->cache()->flush();\n $this->reset();\n return true;\n\n }", "public function move($sourcePath, $destinationPath) {\n\n\t\t$sourceNode = $this->getNodeForPath($sourcePath);\n\t\tif ($sourceNode instanceof \\Sabre_DAV_ICollection and $this->nodeExists($destinationPath)) {\n\t\t\tthrow new \\Sabre_DAV_Exception_Forbidden('Could not copy directory ' . $sourceNode . ', target exists');\n\t\t}\n\t\tlist($sourceDir,) = \\Sabre_DAV_URLUtil::splitPath($sourcePath);\n\t\tlist($destinationDir,) = \\Sabre_DAV_URLUtil::splitPath($destinationPath);\n\n\t\tFilesystem::rename($sourcePath, $destinationPath);\n\n\t\t$this->markDirty($sourceDir);\n\t\t$this->markDirty($destinationDir);\n\n\t}", "public function move($source, $dest);", "private function _moveImagesToNewFileSystem()\n\t{\n\t\tif (!Image::testFileSystem())\n\t\t\t$this->_errors[] = Tools::displayError('Error: your server configuration is not compatible with the new image system. No images were moved');\n\t\telse\n\t\t{\n\t\t\tini_set('max_execution_time', $this->max_execution_time); // ini_set may be disabled, we need the real value\n\t\t\t$this->max_execution_time = (int)ini_get('max_execution_time');\t\n\t\t\t$result = Image::moveToNewFileSystem($this->max_execution_time);\n\t\t\tif ($result === 'timeout')\n\t\t\t\t$this->_errors[] = Tools::displayError('Not all images have been moved, server timed out before finishing. Click on \\\"Move images\\\" again to resume moving images');\n\t\t\telseif ($result === false)\n\t\t\t\t$this->_errors[] = Tools::displayError('Error: some or all images could not be moved.');\n\t\t}\n\t\treturn (sizeof($this->_errors) > 0 ? false : true);\n\t}", "public function testDirectoryFunctions()\n {\n $dir = 'pear-service-amazon-s3://' . $this->bucketName . '/dir';\n $this->assertFalse(file_exists($dir));\n $this->assertTrue(mkdir($dir));\n $this->assertTrue(is_dir($dir));\n $this->assertTrue(is_readable($dir));\n $this->assertTrue(is_writable($dir));\n $this->assertFalse(is_file($dir));\n $this->assertTrue(rmdir($dir));\n clearstatcache();\n $this->assertFalse(file_exists($dir));\n }", "public function moveOrCopy\n (\n $target_directory,\n $target_name = '',\n $replace = false,\n $target_filesystem_type,\n $move_or_copy = 'copy'\n ) {\n\n /** Defaults */\n if ($target_directory == '') {\n $target_directory = $this->parent;\n }\n\n if ($target_name == '' && $this->is_file) {\n if ($target_directory == $this->parent) {\n throw new FilesystemException\n ('Ftp Filesystem ' . $move_or_copy\n . ': Must specify new file name when using the same target path: '\n . $this->path);\n }\n $target_name = $this->name;\n }\n\n if ($this->is_file === true) {\n $base_folder = $this->parent;\n } else {\n $base_folder = $this->path;\n }\n\n /** Edits */\n if (file_exists($this->path)) {\n } else {\n throw new FilesystemException\n ('Ftp Filesystem moveOrCopy: failed. This path does not exist: '\n . $this->path . ' Specified as source for ' . $move_or_copy\n . ' operation to ' . $target_directory);\n }\n\n if (file_exists($target_directory)) {\n } else {\n throw new FilesystemException\n ('Ftp Filesystem moveOrCopy: failed. This path does not exist: '\n . $this->path . ' Specified as destination for ' . $move_or_copy\n . ' to ' . $target_directory);\n }\n\n if (is_writeable($target_directory) === false) {\n throw new FilesystemException\n ('Ftp Filesystem Delete: No write access to file/path: ' . $target_directory);\n }\n\n if ($move_or_copy == 'move') {\n if (is_writeable($this->path) === false) {\n throw new FilesystemException\n ('Ftp Filesystem Delete: No write access for moving source file/path: '\n . $move_or_copy);\n }\n }\n\n if ($this->is_file === true || $target_name == '') {\n\n } else {\n if (is_dir($target_directory . '/' . $target_name)) {\n\n } else {\n\n new fsAdapter('write', $target_directory, $target_filesystem_type,\n $this->options = array('file' => $target_name)\n );\n }\n $target_directory = $target_directory . '/' . $target_name;\n $target_name = '';\n }\n\n /** Create new target directories from source directories list */\n if (count($this->directories) > 0) {\n\n asort($this->directories);\n\n $parent = '';\n $new_node = '';\n $new_path = '';\n\n foreach ($this->directories as $directory) {\n\n $new_path = $this->build_new_path($directory, $target_directory, $base_folder);\n\n if (is_dir($new_path)) {\n\n } else {\n\n $parent = dirname($new_path);\n $new_node = basename($new_path);\n\n new fsAdapter('write', $parent, $target_filesystem_type,\n $this->options = array('file' => $new_node)\n );\n }\n\n $parent = '';\n $new_node = '';\n $new_path = '';\n }\n }\n\n /** Copy files now that directories are in place */\n if (count($this->files) > 0) {\n\n $path_name = '';\n $file_name = '';\n\n foreach ($this->files as $file) {\n\n $new_path = $this->build_new_path($file, $target_directory, $base_folder);\n\n /** Single file copy or move */\n if ($this->is_file === true) {\n $file_name = $target_name;\n } else {\n $file_name = basename($file);\n }\n\n /** Source */\n $adapter = new fsAdapter('Read', $file);\n $data = $adapter->fs->data;\n\n /** Write Target */\n new fsAdapter('Write', $new_path, $target_filesystem_type,\n $this->options = array(\n 'file' => $file_name,\n 'replace' => $replace,\n 'data' => $data,\n )\n );\n\n $path_name = '';\n $file_name = '';\n }\n }\n\n /** For move, remove the files and folders just copied */\n if ($move_or_copy == 'move') {\n $this->_deleteDiscoveryFilesArray();\n $this->_deleteDiscoveryDirectoriesArray();\n }\n\n return true;\n }", "protected function onMove(){\n\t\tif (empty($this->post['directory']) || empty($this->post['file'])) return;\n\t\t\n\t\t$rename = empty($this->post['newDirectory']) && !empty($this->post['name']);\n\t\t$dir = $this->getDir($this->post['directory']);\n\t\t$file = realpath($dir . '/' . $this->post['file']);\n\t\t\n\t\t$is_dir = is_dir($file);\n\t\tif (!$this->checkFile($file) || (!$rename && $is_dir))\n\t\t\treturn;\n\t\t\n\t\tif ($rename || $is_dir){\n\t\t\tif (empty($this->post['name'])) return;\n\t\t\t$newname = $this->getName($this->post['name'], $dir);\n\t\t\t$fn = 'rename';\n\t\t}else{\n\t\t\t$newname = $this->getName(pathinfo($file, PATHINFO_FILENAME), $this->getDir($this->post['newDirectory']));\n\t\t\t$fn = !empty($this->post['copy']) ? 'copy' : 'rename';\n\t\t}\n\t\t\n\t\tif (!$newname) return;\n\t\t\n\t\t$ext = pathinfo($file, PATHINFO_EXTENSION);\n\t\tif ($ext) $newname .= '.' . $ext;\n\t\t$fn($file, $newname);\n\t\t\n\t\techo json_encode(array(\n\t\t\t'name' => pathinfo($this->normalize($newname), PATHINFO_BASENAME),\n\t\t));\n\t}", "public function testDeleteDirectoryReturnFalseWhenNotADirectory()\n {\n mkdir(self::$temp.DS.'bar');\n file_put_contents(self::$temp.DS.'bar'.DS.'file.txt', 'Hello World');\n\n $this->assertFalse(Storage::rmdir(self::$temp.DS.'bar'.DS.'file.txt'));\n }", "public function move($destination,$filename){\n\t\tif(!is_uploaded_file($this->getPathname())){\n\t\t\tthrow new \\Exception('File couldn\\'t be uploaded!');\n\t\t}\n\n\t\t/// chceck that destination directory exists\n\t\tif(!is_dir($destination)){\n\t\t\t/// try to create the directory\n if(false === @mkdir($destination,0777,true) && !is_dir($destination)){\n throw new \\Exception('Can\\'t create directory \"'.$destination.'\"');\n }\n }\n /// check access rights\n else if(!is_writable($destination)){\n throw new \\Exception('Can\\'t write to directory \"'.$destination.'\"');\n }\n\n /// determine target path\n $target = rtrim($destination,'/\\\\').DIRECTORY_SEPARATOR.$this->getFilename($filename);\n\n\t\t/// move the file\n\t\tif(!@move_uploaded_file($this->getPathname(), $target)){\n\t\t\tthrow new \\Exception('Can\\'t move the file from \"'.$this->getPathname().'\" to \"'.$target.'\"');\n\t\t}\n\n\t\t/// set access rights\n\t\t@chmod($target,0666 & ~umask());\n\n\t\treturn $target;\n\t}", "protected function _moveToImageDir()\n\t{\n\t\t$path = $this->getFilePath();\n\t\t$this->_uploadedFile->moveTo($path);\n\t\tchmod($path, 0644);\n\t}", "public function method_MOVE( $destination, $overwrite, $path )\n{\n $multistatus = new DAV_Multistatus();\n \n // This might generate an exception, but that's OK:\n $retval = ($destination[0] == '/')\n ? $this->method_COPY( $destination, $overwrite )\n : $this->method_COPY_external( $destination, $overwrite );\n \n foreach ( $this as $member ) {\n try {\n $deeppath = DAV::slashify($path) . $member;\n $deepdest = DAV::slashify($destination) . (\n $destination[0] == '/' ? $member : DAV::urlencode($member)\n );\n $resource = DAV_Server::inst()->resource($deeppath);\n if (!$resource)\n $multistatus->addStatus(\n $deeppath, new DAV_Status(\n REST::HTTP_INTERNAL_SERVER_ERROR,\n \"Resource not found: $deeppath\"\n )\n );\n elseif ( $resource instanceof DAV_Collection )\n $resource->method_MOVE( $deepdest, $overwrite, $deeppath );\n elseif ($destination[0] == '/')\n $resource->method_MOVE( $deepdest, $overwrite );\n else\n $resource->method_MOVE_external( $deepdest, $overwrite );\n }\n catch (DAV_Status $e) {\n $multistatus->addStatus($deeppath, $e);\n }\n catch (DAV_Multistatus $e) {\n $multistatus->mergeWith($e);\n }\n }\n if ( count( $multistatus->statuses() ) )\n throw $multistatus;\n \n try { $this->method_DELETE(); }\n catch (DAV_Status $e) {}\n \n return $retval;\n}", "function move_uploaded_file_to_temp_directory($file, $destination_sufix_name) {\n do {\n $temp_destination = WORK_PATH.'/'.make_string(10).'_'.$destination_sufix_name;\n } while (is_file($temp_destination));\n \n if (move_uploaded_file($file, $temp_destination)) {\n return $temp_destination;\n } // if\n\n return false;\n }", "public function move($path){\n\t\t$oldPath = $this->path;\n\t\t$path_array = explode(self::DS, $this->path);\n\t\t$fileName = $path_array[sizeof($path_array) - 1];\n\t\t$newPath = $path . self::DS . $fileName;\n\t\t$this->path = $newPath;\n\t\t$this->createFile($newPath);\n\t\tunlink($oldPath);\n\t}", "function narrative_move_xml($id, $new_narrative_dir)\n{\n $CI =& get_instance();\n $base_dir = $CI->config->item('site_data_dir') . '/' . $id . '/';\n $file_scan = scandir($base_dir);\n foreach ($file_scan as $filecheck)\n {\n $file_extension = pathinfo($filecheck, PATHINFO_EXTENSION);\n // Finding the XML file to be moved\n if ($file_extension == \"xml\" && $filecheck != 'AudioTimes.xml')\n {\n rename($base_dir . $filecheck, $new_narrative_dir . $filecheck);\n }\n }\n}", "public function testMakeDirectory()\n {\n $this->assertTrue(Storage::mkdir(self::$temp.DS.'created'));\n $this->assertTrue(is_dir(self::$temp.DS.'created'));\n }", "function moveDirs($source, $dest, $recursive = true, $message) {\n jimport('joomla.filesystem.folder');\n jimport('joomla.filesystem.file');\n \n $error = false;\n\t\n\tif (!is_dir($dest)) { \n mkdir($dest); \n \t} \n \n $handle = @opendir($source);\n \n if(!$handle) {\n $message = JText::_('COM_JDOWNLOADS_BACKEND_CATSEDIT_ERROR_CAT_COPY');\n return $message;\n }\n \n while ($file = @readdir ($handle)) {\n if (eregi(\"^\\.{1,2}$\",$file)) {\n continue;\n }\n \n if(!$recursive && $source != $source.$file.\"/\") {\n if(is_dir($source.$file))\n continue;\n }\n \n if(is_dir($source.$file)) {\n moveDirs($source.$file.\"/\", $dest.$file.\"/\", $recursive, $message);\n } else {\n if (!JFile::copy($source.$file, $dest.$file)) {\n\t\t\t\t$error = true;\n\t\t\t}\n }\n }\n @closedir($handle);\n \n // $source loeschen wenn KEIN error\n if (!$error) {\n\t\t$res = delete_dir_and_allfiles ($source);\t\n if ($res) {\n\t\t\t$message = JText::_('COM_JDOWNLOADS_BACKEND_CATSEDIT_ERROR_CAT_DEL_AFTER_COPY');\t\t\n\t\t}\n\t} else {\n\t\t$message = JText::_('COM_JDOWNLOADS_BACKEND_CATSEDIT_ERROR_CAT_COPY');\n\t}\n\treturn $message;\n}", "public function move($source, $target)\n {\n \n }", "public function move(sfAssetFolder $new_parent)\n {\n // controls\n if($this->getNode()->isRoot())\n {\n throw new sfAssetException('The root folder cannot be moved');\n }\n else if($new_parent->hasSubFolder($this->getName()))\n {\n throw new sfAssetException('The target folder \"%folder%\" already contains a folder named \"%name%\". The folder has not been moved.', array('%folder%' => $new_parent, '%name%' => $this->getName()));\n }\n else if($new_parent->getNode()->isDescendantOf($this))\n {\n throw new sfAssetException('The target folder cannot be a subfolder of moved folder. The folder has not been moved.');\n }\n else if ($this->getId() == $new_parent->getId())\n {\n return;\n }\n \n $old_path = $this->getFullPath();\n \n $this->getNode()->moveAsLastChildOf($new_parent);\n $this->save();\n \n $descendants = $this->getNode()->getChildren();\n $descendants = $descendants ? $descendants : array();\n \n // move its assets\n self::movePhysically($old_path, $this->getFullPath());\n \n foreach ($descendants as $descendant)\n {\n // Update relative path\n $descendant->save();\n }\n \n // else: nothing to do\n }", "public function renameDirectory(DirectoryInterface $directory, string $newName): DirectoryInterface;", "public function checkMove($source, $destination) {\n\t\t$sourceNode = $this->tree->getNodeForPath($source);\n\t\tif (!$sourceNode instanceof Node) {\n\t\t\treturn;\n\t\t}\n\t\tlist($sourceDir, ) = \\Sabre\\HTTP\\URLUtil::splitPath($source);\n\t\tlist($destinationDir, ) = \\Sabre\\HTTP\\URLUtil::splitPath($destination);\n\n\t\tif ($sourceDir !== $destinationDir) {\n\t\t\t$sourceNodeFileInfo = $sourceNode->getFileInfo();\n\t\t\tif ($sourceNodeFileInfo === null) {\n\t\t\t\tthrow new NotFound($source . ' does not exist');\n\t\t\t}\n\n\t\t\tif (!$sourceNodeFileInfo->isDeletable()) {\n\t\t\t\tthrow new Forbidden($source . \" cannot be deleted\");\n\t\t\t}\n\t\t}\n\t}", "public function testCopy() {\n $sourceDirName = self::TEST_DIR . '/testCopyDirectorySource';\n $targetDirName = self::TEST_DIR . '/testCopyDirectoryTarget';\n\n mkdir($sourceDirName);\n\n $directoryHandle = new Directory($sourceDirName);\n\n $directoryHandle->copy(new Directory($targetDirName));\n\n $this->assertDirectoryExists($targetDirName);\n $this->assertDirectoryExists($sourceDirName);\n }", "function move_dir_to_tmp($src, $id)\n{\n $CI =& get_instance();\n $tmpPath = $CI->config->item('site_data_dir') . '/tmp/' . time() . '/';\n if (!is_dir($tmpPath))\n {\n mkdir($tmpPath, 0775, TRUE);\n }\n $tmpPath .= '/' . $id . '/';\n rename($src, $tmpPath);\n return $tmpPath;\n}", "public function testMkdir() {\n $testDirName = self::TEST_DIR . '/testMkdir';\n\n (new Directory($testDirName))->mkdir();\n\n $this->assertDirectoryExists($testDirName);\n }", "public function testCleanDirectory()\n {\n mkdir(self::$temp.DS.'baz');\n file_put_contents(self::$temp.DS.'baz'.DS.'file.txt', 'Hello World');\n\n Storage::cleandir(self::$temp.DS.'baz');\n\n $this->assertTrue(is_dir(self::$temp.DS.'baz'));\n $this->assertTrue(! is_file(self::$temp.DS.'baz'.DS.'file.txt'));\n }", "function _pm_update_move_files($src_dir, $dest_dir, $skip_list, $remove_conflicts = TRUE) {\n $items_to_move = drush_scan_directory($src_dir, '/.*/', array_merge(array('.', '..'), $skip_list), 0, FALSE, 'filename', 0, TRUE);\n foreach ($items_to_move as $filename => $info) {\n if ($remove_conflicts) {\n drush_delete_dir($dest_dir . '/' . basename($filename));\n }\n if (!file_exists($dest_dir . '/' . basename($filename))) {\n $move_result = drush_move_dir($filename, $dest_dir . '/' . basename($filename));\n }\n }\n return TRUE;\n}", "public function testEnsureExists() {\n $testDirName = self::TEST_DIR . '/testEnsureExists';\n\n (new Directory($testDirName))->ensureExists();\n\n $this->assertDirectoryExists($testDirName);\n }", "public function move($sDestinationFileName);", "public function testDirnameReturnsDirectory()\n {\n file_put_contents(self::$temp.DS.'foo.txt', 'foo');\n\n $this->assertSame(self::$temp, Storage::dirname(self::$temp.DS.'foo.txt'));\n }", "private function moveFile($old_file, $new_file)\n {\n if (!file_exists($old_file)) {\n return;\n }\n\n if (!is_dir(dirname($new_file))) {\n mkdir(dirname($new_file), 0755, true);\n }\n\n // move the file to the archive folder\n rename($old_file, $new_file);\n }", "public function testDeleteDirectory()\n {\n mkdir(self::$temp.DS.'foo');\n file_put_contents(self::$temp.DS.'foo'.DS.'file.txt', 'Hello World');\n\n Storage::rmdir(self::$temp.DS.'foo');\n\n $this->assertTrue(! is_dir(self::$temp.DS.'foo'));\n $this->assertTrue(! is_file(self::$temp.DS.'foo'.DS.'file.txt'));\n }", "public function move($new_path)\n\t{\n\t\t$info = pathinfo($this->path);\n\t\t$new_path = $this->area->get_path($new_path);\n\n\t\t$new_path = rtrim($new_path, '\\\\/').DS.$info['basename'];\n\n\t\t$return = $this->area->rename($this->path, $new_path);\n\t\t$return and $this->path = $new_path;\n\t\t\n\t\treturn $return;\n\t}", "public static function x_move($source, $destination, $overwrite = false) {\n // source is array\n if (is_array($source)) {\n $result = true;\n foreach($source as $s) {\n $result = self::x_move($s, $destination, $overwrite) && $result;\n }\n return $result;\n }\n\n // target not existing\n // => rename\n // target file\n // => rename if overwrite\n if (!self::file_exists($destination) || $overwrite)\n return self::rename($source, $destination);\n\n // source is file and target folder\n // => rename if target not exists\n $new_dest = new Path($destination->getPath().DIRECTORY_SEPARATOR.basename($source->getPath()), $destination->getType());\n if (self::is_file($source) && self::is_dir($destination) && !self::file_exists($new_dest))\n return self::rename($source, $new_dest);\n }", "public function testOnNewDirectory() {\n\n $obj = new FileSystemStorageProvider($this->logger, $this->directory);\n\n $obj->onNewDirectory($this->dir1);\n $this->assertFileExists($this->directory . \"/1\");\n\n $obj->onNewDirectory($this->dir2);\n $this->assertFileExists($this->directory . \"/1/2\");\n\n $obj->onNewDirectory($this->dir3);\n $this->assertFileExists($this->directory . \"/1/2/3\");\n }", "public function testOnDeletedDirectory() {\n\n $obj = new FileSystemStorageProvider($this->logger, $this->directory);\n\n $this->dir3->setParent($this->dir1); // This directory was moved.\n\n $obj->onDeletedDirectory($this->dir3);\n $this->assertFileNotExists($this->directory . \"/1/3\");\n\n $obj->onDeletedDirectory($this->dir2);\n $this->assertFileNotExists($this->directory . \"/1/2\");\n\n $obj->onDeletedDirectory($this->dir1);\n $this->assertFileNotExists($this->directory . \"/1\");\n }", "public function testExists() {\n $testDirName = self::TEST_DIR . '/testExists';\n\n $handle = (new Directory($testDirName));\n\n mkdir($testDirName);\n $this->assertTrue($handle->exists());\n\n rmdir($testDirName);\n $this->assertFalse($handle->exists());\n }", "public function move($file, $path)\n {\n if (! \\File::exists($file)) return $this->notify('The file or directory doesn\\'t exist.', 400); \n try {\n \\File::move($file, $path . '/' . fileName($file));\n }\n catch (Exception $e) {\n return $this->notify($e->getMessage(), 500);\n }\n }", "public function move(string $directory, string $name = null): File\n {\n $reflector = new \\ReflectionMethod($this, 'move');\n if ($reflector->getDeclaringClass()->getName() !== get_class($this)) {\n throw new \\BadFunctionCallException(sprintf('%s must override method \\'move\\' method.', get_class($this)));\n }\n\n return parent::move($directory, $name);\n }", "function FilesMoveToFolder()\r\n{\r\n global $PH;\r\n\r\n $file_ids= getPassedIds('file','files_*');\r\n\r\n if(!$file_ids) {\r\n $PH->abortWarning(__(\"Select some files to move\"));\r\n exit();\r\n }\r\n\r\n\r\n\r\n /**\r\n * by default render list of folders...\r\n */\r\n $target_id=-1;\r\n\r\n /**\r\n * ...but, if folder was given, directly move files...\r\n */\r\n $folder_ids= getPassedIds('folder','folders_*');\r\n if(count($folder_ids) == 1) {\r\n if($folder_task= Task::getVisibleById($folder_ids[0])) {\r\n $target_id= $folder_task->id;\r\n }\r\n }\r\n\r\n /**\r\n * if no folders was selected, move files to project root\r\n */\r\n else if(get('from_selection')) {\r\n $target_id= 0;\r\n }\r\n\r\n\r\n if($target_id != -1) {\r\n\r\n\r\n if($target_id != 0){\r\n if(!$target_task= Task::getEditableById($target_id)) {\r\n $PH->abortWarning(__(\"insufficient rights\"));\r\n\r\n }\r\n ### get path of target to check for cycles ###\r\n $parent_tasks= $target_task->getFolder();\r\n $parent_tasks[]= $target_task;\r\n }\r\n else {\r\n $parent_tasks=array();\r\n }\r\n\r\n\r\n $count=0;\r\n foreach($file_ids as $id) {\r\n if($file= File::getEditableById($id)) {\r\n\r\n $file->parent_item= $target_id;\r\n $file->update();\r\n }\r\n else {\r\n $PH->messages[]= sprintf(__(\"Can not edit file %s\"), $file->name);\r\n }\r\n }\r\n\r\n ### return to from-page? ###\r\n if(!$PH->showFromPage()) {\r\n $PH->show('home');\r\n }\r\n exit();\r\n }\r\n #else if($target_id != -1) {\r\n # $PH->abortWarning(__(\"insufficient rights to edit any of the selected items\"));\r\n #}\r\n\r\n\r\n\r\n\r\n /**\r\n * build page folder lists...\r\n */\r\n\r\n ### get project ####\r\n if(!$file= File::getVisibleById($file_ids[0])) {\r\n $PH->abortWarning(\"could not get file\", ERROR_BUG);\r\n }\r\n\r\n if(!$project= Project::getVisibleById($file->project)) {\r\n $PH->abortWarning(\"file without project?\", ERROR_BUG);\r\n }\r\n\r\n\r\n ### set up page and write header ####\r\n {\r\n $page= new Page(array('use_jscalendar'=>false, 'autofocus_field'=>'company_name'));\r\n $page->cur_tab='projects';\r\n $page->type= __(\"Edit files\");\r\n $page->title=\"$project->name\";\r\n $page->title_minor=__(\"Select folder to move files into\");\r\n\r\n $page->crumbs= build_project_crumbs($project);\r\n\r\n $page->options[]= new NaviOption(array(\r\n 'target_id' =>'filesMoveToFolder',\r\n ));\r\n\r\n echo(new PageHeader);\r\n }\r\n echo (new PageContentOpen);\r\n\r\n\r\n ### write form #####\r\n {\r\n ### write files as hidden entry ###\r\n foreach($file_ids as $id) {\r\n if($file= File::getEditableById($id)) {\r\n echo \"<input type=hidden name='files_{$id}_chk' value='1'>\";\r\n }\r\n }\r\n\r\n\r\n ### write list of folders ###\r\n {\r\n require_once(confGet('DIR_STREBER') . 'lists/list_tasks.inc.php');\r\n $list= new ListBlock_tasks();\r\n $list->reduced_header= true;\r\n $list->query_options['show_folders']= true;\r\n #$list->query_options['folders_only']= true;\r\n $list->query_options['project']= $project->id;\r\n $list->groupings= NULL;\r\n $list->block_functions= NULL;\r\n $list->id= 'folders';\r\n $list->no_items_html= __('No folders available');\r\n unset($list->columns['status']);\r\n unset($list->columns['date_start']);\r\n unset($list->columns['days_left']);\r\n unset($list->columns['created_by']);\r\n unset($list->columns['label']);\r\n unset($list->columns['project']);\r\n\r\n $list->functions= array();\r\n\r\n $list->active_block_function = 'tree';\r\n\r\n\r\n $list->print_automatic($project,NULL);\r\n }\r\n\r\n echo __(\"(or select nothing to move to project root)\"). \"<br> \";\r\n\r\n echo \"<input type=hidden name='from_selection' value='1'>\"; # keep flag to ungroup files\r\n echo \"<input type=hidden name='project' value='$project->id'>\";\r\n $button_name=__(\"Move items\");\r\n echo \"<input class=button2 type=submit value='$button_name'>\";\r\n\r\n $PH->go_submit='filesMoveToFolder';\r\n\r\n }\r\n echo (new PageContentClose);\r\n echo (new PageHtmlEnd());\r\n\r\n}", "public function testCopyDirectoryReturnsFalseIfSourceIsntDirectory()\n {\n $origin = self::$temp.DS.'breeze'.DS.'boom'.DS.'foo'.DS.'bar'.DS.'baz';\n $this->assertFalse(Storage::cpdir($origin, self::$temp));\n }", "public function moveDirectory(string $oldDirName, string $newDirName): MoveDirectory\n {\n return $this->addAction(new MoveDirectory($oldDirName, $newDirName));\n }", "public function moveTo(Directory $dir) {\n\t\t$new_path = $this->pathIn($dir);\n\t\tif (!rename($this->getPath(), $new_path)) throw new \\Exception(\"Couldn't rename the file $this to $new_path\");\n\t\t$this->path = $new_path;\n\t}", "public function testFindDestination() {\n\t\t$this->assertEquals(TEMP_DIR . '/scott-pilgrim.jpg', $this->object->findDestination('scott-pilgrim.jpg', true));\n\t\t$this->assertEquals(TEMP_DIR . '/scott-pilgrim-1.jpg', $this->object->findDestination(new File($this->baseFile), false));\n\t}", "public function upload_move($file, $local_file);", "public function test_factory_not_exist()\n {\n Directory::factory(ROOT.DS.'test_dir');\n }", "public function move($source, $destination, $overwrite = \\false)\n {\n }", "public function move($source, $destination, $overwrite = \\false)\n {\n }", "public function move($source, $destination, $overwrite = \\false)\n {\n }", "public function move($source, $destination, $overwrite = \\false)\n {\n }", "function moveFinalDirectories($aBooksDone, $aDirectories)\r\n{\r\n\t$readydir = $aDirectories['ready'];\r\n\t$sipdir = $aDirectories['sip'];\r\n\t$result = 0;\r\n\r\n\tforeach ($aBooksDone as $itemnumber) {\r\n\t\t$sourcedir = $readydir . '\\\\' . $itemnumber;\r\n\t\t$destinationdir = $sipdir . '\\\\' . $itemnumber;\r\n\r\n\t\tif (!(@opendir($destinationdir))) {\r\n\t\t\t$mk = mkdir($destinationdir);\r\n\t\t\t//if ($mk === FALSE) {\r\n\t\t\t//\t$result = 0;\r\n\t\t\t//\treturn $result;\r\n\t\t\t//}\r\n\t\t}\r\n\r\n\t\t$dh = opendir($sourcedir);\r\n if ($dh) {\r\n while (($file = @readdir($dh)) !== false) {\r\n if ($file != \".\" && $file != \"..\") {\r\n $source = $sourcedir . \"\\\\\" . $file;\r\n $destination = $destinationdir . \"\\\\\" . $file;\r\n //echo 'ik zou ' . $source . ' verplaatsen naar ' . $destination . '<br>';\r\n $result = @rename($source, $destination);\r\n }\r\n }\r\n \t\t}\r\n\r\n\t\t$result = rmdir($sourcedir);\r\n\t}\r\n\r\n\treturn $result;\r\n}", "public function testChDir() {\n $currentDir = getcwd();\n $parentDir = dirname($currentDir);\n\n $handle = new Directory($parentDir);\n $handle->chdir();\n\n $this->assertEquals($parentDir, getcwd());\n chdir($currentDir);\n }", "public function move($folder)\r\n\t{\r\n\t\tif (!$folder || !$folder->id && $this->getValue(\"name\") != \"/\")\r\n\t\t\treturn false;\r\n\t\t$this->setValue(\"parent_id\", $folder->id);\r\n\t\treturn $this->save();\r\n\t}", "public function move( $dest )\n\t\t{\n\t\t\tif( $this->path )\n\t\t\t{\n\t\t\t\tFileSystem::move( $this->path, $dest );\n\t\t\t\t$this->path = $dest;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new \\System\\Base\\InvalidOperationException(\"attempt to perform action on empty Folder object\");\n\t\t\t}\n\t\t}", "public function testConstructSingleDirectory()\n {\n $filter = new FileRename($this->newDir);\n\n $this->assertEquals(\n [0 => [\n 'source' => '*',\n 'target' => $this->newDir,\n 'overwrite' => false,\n 'randomize' => false,\n ]],\n $filter->getFile()\n );\n $this->assertEquals($this->newDirFile, $filter($this->oldFile));\n $this->assertEquals('falsefile', $filter('falsefile'));\n }", "public function move($sourceDir,$sourceFile,$targetDir,$targetFile){\n\t\tif(!$this->connected){\n\t\t\treturn false;\n\t\t}\n\t\treturn $this->apiCall('move',array('sourcedir'=>$sourceDir,'source'=>$sourceFile,'targetdir'=>$targetDir,'target'=>$targetFile),true);\n\t}", "public function move(string $path, string $target): bool\n {\n return rename($path, $target);\n }", "public function MOVE(ResourceObject $resource) {\n\t\t$depth = $this->request->headers['Depth'] !== null ? 'infinity' : $this->request->headers['Depth'];\n\t\t\n\t\t// get the destination\n\t\t$url = parse_url($this->request->headers['Destination']);\n\t\t$path = urldecode($url['path']);\n\t\t$host = $url['host'];\n\t\tif (isset($url['port']) && $url['port'] != 80)\n\t\t\t$host .= ':' . $url['port'];\n\t\t\n\t\t// get the host header\n\t\t$hostHeader = preg_replace('/:80$/', '', $this->request->headers['Host']);\n\t\t\n\t\t// check whether the destination is on this host or not\n#[TODO] ensure no file is moved above base folder! supply base folder?\n\t\tif ($host == $hostHeader) {\n\t\t\t// the destination is on this server\n#[TODO] we can't use filenames!\n\t\t\t$dest = $_SERVER['DOCUMENT_ROOT'] . $path;\n#[TODO]\t\t\t// check lock status\n#\t\t\tif (!$this->_check_lock_status($this->path))\n#\t\t\t\tthrow new HTTPStatusException(423, 'Locked');\n\t\t} else {\n\t\t\t// the destination is on another server\n\t\t\t$destURI = $this->request->headers['Destination'];\n\t\t}\n\t\t\n\t\t// get overwrite flag\n\t\t$overwrite = ($this->request->headers['Overwrite'] != 'F');\n\t\n#[TODO]\t\t// body parsing not supported\n\t\tif (strlen($this->request->content->get()))\n\t\t\tthrow new HTTPStatusException(415);\n\t\t\n#[TODO]\t\t// no copying to other servers yet\n\t\tif (isset($destURI))\n\t\t\tthrow new HTTPStatusException(502);\n\t\t \n#[TODO]\t\t// property updates are broken\n\n\t\t// check if the destination file exists or not\n\t\t$new = !file_exists($dest);\n\t\t$existing_col = false;\n\n\t\t// if the destination is a folder, overwrite, or make child\n\t\tif (!$new && is_dir($dest)) {\n\t\t\t// prevent overwrite\n\t\t\tif (!$overwrite)\n\t\t\t\tthrow new HTTPStatusException(412);\n\t\t\t// add the filename to the destination\n\t\t\t$dest .= basename($resource->getPath());\n\t\t\t// \n\t\t\t\tif (file_exists($dest)) {\n\t\t\t\t\t$options[\"dest\"] .= basename($source);\n\t\t\t\t} else {\n\t\t\t\t\t$new = true;\n\t\t\t\t\t$existing_col = true;\n\t\t\t\t}\n\t\t}\n\n\t\tif (!$new) {\n\t\t\tif ($options[\"overwrite\"]) {\n\t\t\t\t$stat = $this->DELETE(array(\"path\" => $options[\"dest\"]));\n\t\t\t\tif (($stat{0} != \"2\") && (substr($stat, 0, 3) != \"404\")) {\n\t\t\t\t\treturn $stat; \n\t\t\t\t}\n\t\t\t} else {\t\t\t\t\n\t\t\t\treturn \"412 precondition failed\";\n\t\t\t}\n\t\t}\n\n\t\tif (is_dir($source) && ($options[\"depth\"] != \"infinity\")) {\n\t\t\t// RFC 2518 Section 9.2, last paragraph\n\t\t\treturn \"400 Bad request\";\n\t\t}\n\n\t\tif ($del) {\n\t\t\tif (!rename($source, $dest)) {\n\t\t\t\treturn \"500 Internal server error\";\n\t\t\t}\n\t\t\t$destpath = $this->_unslashify($options[\"dest\"]);\n\t\t\tif (is_dir($source)) {\n\t\t\t\t$query = \"UPDATE properties \n\t\t\t\t\t\t\t SET path = REPLACE(path, '\".$options[\"path\"].\"', '\".$destpath.\"') \n\t\t\t\t\t\t WHERE path LIKE '\".$this->_slashify($options[\"path\"]).\"%'\";\n\t\t\t\tmysql_query($query);\n\t\t\t}\n\n\t\t\t$query = \"UPDATE properties \n\t\t\t\t\t\t SET path = '\".$destpath.\"'\n\t\t\t\t\t WHERE path = '\".$options[\"path\"].\"'\";\n\t\t\tmysql_query($query);\n\t\t}\n\n\t\treturn ($new && !$existing_col) ? \"201 Created\" : \"204 No Content\";\n\t}", "public function testDirectoryManagement()\n {\n $limit = 5;\n $filesystem = $this->createFilesystemMock(0, $limit, $limit);\n $instance = $this->createTestInstance($filesystem);\n $this->assertEmpty($instance->getTemporaryDirectories());\n $directories = array();\n for ($i = 0; $i < 5; $i++) {\n $directories[] = $instance->createTemporaryDirectory();\n }\n $this->assertCount($limit, $instance->getTemporaryDirectories());\n $this->assertContains(\n $directories[0],\n $instance->getTemporaryDirectories()\n );\n $instance->removeTemporaryDirectory($directories[0]);\n $this->assertCount($limit - 1, $instance->getTemporaryDirectories());\n $this->assertNotContains(\n $directories[0],\n $instance->getTemporaryDirectories()\n );\n $instance->removeTemporaryDirectories();\n $this->assertCount(0, $instance->getTemporaryDirectories());\n }", "public function moveUploadedFile($directory){\n\n $target_path = dirname(__DIR__, 3) . Config::DS . static::$upload_directories[$directory] . Config::DS . $this->filename;\n if(file_exists($target_path)){\n $this->errors_on_upload[] = 'This file already exists in this directory';\n return false;\n }\n\n if( !empty($this->tmp_name)){ // if tmp_name is empty, we just don't upload files\n\n if( ! move_uploaded_file($this->tmp_name, $target_path)){\n $this->errors_on_upload[] = 'The folder probably doesnt have permissions';\n return false;\n } else {\n return true;\n }\n\n }\n\n }", "protected static function moveTemporaryDirs()\n {\n if (static::isCapsular()) {\n // Rename directories\n $original = static::getCacheDirs(false);\n foreach (static::getCacheDirs(true) as $i => $tmpDir) {\n \\Includes\\Utils\\FileManager::unlinkRecursive($tmpDir);\n $originalDir = $original[$i];\n rename($originalDir, $tmpDir);\n }\n\n // Rename files\n $original = static::getDecoratorDataFiles(false);\n foreach (static::getDecoratorDataFiles(true) as $i => $tmpPath) {\n $destPath = $original[$i];\n if (file_exists($tmpPath)) {\n rename($tmpPath, $destPath);\n }\n }\n }\n }" ]
[ "0.8364826", "0.8341061", "0.8054002", "0.80286586", "0.78115845", "0.7408394", "0.7035016", "0.6758503", "0.66618764", "0.6528062", "0.6508351", "0.6483764", "0.6476313", "0.64304525", "0.6402691", "0.640205", "0.62653875", "0.62580246", "0.6214017", "0.6189024", "0.615714", "0.6121776", "0.611669", "0.60829675", "0.6081632", "0.6075489", "0.60714054", "0.6010069", "0.5984624", "0.5955704", "0.5940004", "0.5904826", "0.5890759", "0.586669", "0.5851714", "0.5826814", "0.582352", "0.58203965", "0.58132154", "0.58042186", "0.5803951", "0.57796377", "0.5773684", "0.5767549", "0.5767391", "0.57599634", "0.57365656", "0.5722986", "0.57200927", "0.56904835", "0.5690054", "0.5690044", "0.56873167", "0.5673279", "0.5660467", "0.56548727", "0.56537074", "0.565355", "0.5650831", "0.56332195", "0.56285197", "0.5628207", "0.5605148", "0.56046814", "0.5603835", "0.55804044", "0.55724746", "0.5565373", "0.55623317", "0.5549444", "0.5543108", "0.5538597", "0.55357736", "0.5528144", "0.55184466", "0.5493391", "0.54861695", "0.5486061", "0.54715073", "0.5466918", "0.5459096", "0.5449544", "0.5448666", "0.5431774", "0.5411378", "0.54044604", "0.54044604", "0.54044604", "0.5403021", "0.54000866", "0.5377332", "0.53762484", "0.5355896", "0.53442734", "0.5342765", "0.5336259", "0.5335891", "0.53268147", "0.5315364", "0.5314672" ]
0.84916425
0
Test for Directory::move() Attempts to move [ROOT]/index.php to [ROOT]/not_exist Throws \InvalidArgumentException because provided path doesn't exist
Тест для Directory::move() Попытка переместить [ROOT]/index.php в [ROOT]/not_exist Вызывает \InvalidArgumentException, так как предоставленный путь не существует
public function test_move_not_exists_dir() { $object = Directory::create(ROOT.DS.'test_dir'); $object->move(ROOT.DS.'not_exist'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_move_directory_exists()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT, false);\n }", "public function test_move()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(SYSTEM);\n $this->assertTrue(is_dir(SYSTEM.DS.'test_dir'));\n $this->assertFalse(is_dir(ROOT.DS.'test_dir'));\n $this->assertEquals($object->get_path(), SYSTEM.DS.'test_dir');\n }", "public function testMoveDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp2', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp2'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp2'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp2', self::$temp.DS.'tmp3');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_dir(self::$temp.DS.'tmp2'));\n }", "public function testMoveEmpty() {\n $sourceDirName = self::TEST_DIR . '/testMoveEmptySource';\n $targetDirName = self::TEST_DIR . '/testMoveEmptyTarget';\n\n mkdir($sourceDirName);\n\n $directoryHandle = new Directory($sourceDirName);\n\n $directoryHandle->move(new Directory($targetDirName));\n\n $this->assertDirectoryExists($targetDirName);\n $this->assertDirectoryNotExists($sourceDirName);\n }", "public function testMoveDirectoryMovesEntireDirectoryAndOverwrites()\n {\n mkdir(self::$temp.DS.'tmp4', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp4'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp4'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'nested'.DS.'baz.txt', '');\n\n mkdir(self::$temp.DS.'tmp5', 0777, true);\n file_put_contents(self::$temp.DS.'tmp5'.DS.'foo2.txt', '');\n file_put_contents(self::$temp.DS.'tmp5'.DS.'bar2.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp4', self::$temp.DS.'tmp5', true);\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'foo2.txt'));\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'bar2.txt'));\n $this->assertFalse(is_dir(self::$temp.DS.'tmp4'));\n }", "public function testMoveRecursive() {\n $sourceDirName = self::TEST_DIR . '/testMoveRecursiveSource/hierachy1';\n $targetDirName = self::TEST_DIR . '/testMoveRecursiveTarget/hierachy1';\n\n mkdir(self::TEST_DIR . '/testMoveRecursiveSource/hierachy1', 0777, true);\n\n $directoryHandle = new Directory(self::TEST_DIR . '/testMoveRecursiveSource');\n\n $directoryHandle->move(new Directory(self::TEST_DIR . '/testMoveRecursiveTarget'));\n\n $this->assertDirectoryExists($targetDirName);\n $this->assertDirectoryNotExists(self::TEST_DIR . '/testMoveRecursiveSource');\n }", "public function testMoveNotExist()\n {\n $this->rlpMapper->save($this->content1, '/news/news-1', 'default', 'de');\n $this->sessionManager->getSession()->save();\n\n $this->setExpectedException('Sulu\\Component\\Content\\Exception\\ResourceLocatorNotFoundException');\n $this->rlpMapper->move('/news', '/neuigkeiten', 'default', 'de');\n }", "public function testMoveFail_PluginExists()\n {\n $file = array(\"name\"=>\"zipNoSubfolder.zip\", \"size\"=>500, \"tmp_name\"=>__DIR__.'/zipNoSubfolder.zip');\n\n $service = $this->setMockPluginUploaderServiceMoveUploadedFile();\n\n $result = $service->upload($file);\n // check we got the correct result first time around\n $this->assertEquals(false, $result);\n\n $result = $service->upload($file);\n // check we got the correct result second time around\n $this->assertEquals('A plugin with the same name (TestPlugin) is already uploaded.', $result);\n }", "public function testMoveMovesStorages()\n {\n file_put_contents(self::$temp.DS.'foo.txt', 'foo');\n\n Storage::move(self::$temp.DS.'foo.txt', self::$temp.DS.'bar.txt');\n\n $this->assertTrue(is_file(self::$temp.DS.'bar.txt'));\n $this->assertFalse(is_file(self::$temp.DS.'foo.txt'));\n }", "function move($source, $destination);", "public function testMoveSuccess_ZipNoSubfolder()\n {\n $file = array(\"name\"=>\"zipNoSubfolder.zip\", \"size\"=>500, \"tmp_name\"=>__DIR__.'/zipNoSubfolder.zip');\n\n $service = $this->setMockPluginUploaderServiceMoveUploadedFile();\n\n $result = $service->upload($file);\n\n // check we got the correct result\n $this->assertEquals(false, $result);\n }", "public function testMoveFolder()\n {\n $remoteFolder = \"TestData/In\";\n\n $localName = \"Book1.xlsx\";\n $remoteName = \"Book1.xlsx\";\n\n CellsApiTestBase::ready( $this->instance,$localName ,$remoteFolder . \"/\" . $remoteName , \"\");\n \n $request = new MoveFolderRequest();\n $request->setSrcPath( \"OutResult/Create\");\n $request->setDestPath( \"OutResult/Move\");\n $request->setSrcStorageName( \"\");\n $request->setDestStorageName( \"\");\n $this->instance->moveFolder($request);\n }", "public function move($path) {\n\n if (!$this->exists())\n throw new Exception\\FileException(\"File not found\", 1);\n\n if (!rename($this->path, $path))\n throw new Exception\\FileException(\"Unknown error\", 0);\n\n return true;\n }", "public function testCopyDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::cpdir(self::$temp.DS.'tmp', self::$temp.DS.'tmp2');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt'));\n }", "function narrative_move_files($current_narrative_dir, $new_narrative_dir)\n{\n $file_scan = scandir($current_narrative_dir);\n foreach ($file_scan as $filecheck)\n {\n if ($filecheck != '.' && $filecheck != '..' && !is_dir($current_narrative_dir . $filecheck))\n {\n rename($current_narrative_dir . $filecheck, $new_narrative_dir . $filecheck);\n }\n }\n}", "public function move($file, $path)\n {\n if (! \\File::exists($file)) return $this->notify('The file or directory doesn\\'t exist.', 400); \n try {\n \\File::move($file, $path . '/' . fileName($file));\n }\n catch (Exception $e) {\n return $this->notify($e->getMessage(), 500);\n }\n }", "public static function move($path, $toPath, $replace = TRUE) {\n \n }", "public function move($destination)\r\n {\r\n if (!is_dir($destination)) {\r\n $this->createDirectory($destination);\r\n }\r\n\r\n if (!rename($this->filename, $destination . '/' . $this->getFilename())) {\r\n throw new \\DomainException(\r\n 'File (`' . $this->filename . '`) could not be moved to the destination directory (`' . $destination . '`).'\r\n );\r\n }\r\n\r\n $this->filename = $destination . $this->getFilename();\r\n }", "public function move (MetaFolder $destination): MetaFolder\n {\n if ($destination->l >= $this->l && $destination->r <= $this->r) {\n throw new MetaFolderException('Metafolder cannot be moved into itself or a contained subfolder.');\n }\n if (!$this->level) {\n throw new MetaFolderException('Root metafolder cannot be moved.');\n }\n\n $newRelPath = $destination->getRelativePath() . array_slice (explode('/', trim($this->getRelativePath(), '/')), -1)[0] . '/';\n\n try {\n $existingFolder = self::getInstance($newRelPath);\n }\n catch (MetaFolderException $e) {\n }\n if (isset($existingFolder)) {\n throw new MetaFolderException('Cannot move folder. Folder with same path already exists.');\n }\n\n // metafile updates\n\n $db = Application::getInstance()->getVxPDO();\n\n // handle nesting, kudos to https://rogerkeays.com/how-to-move-a-node-in-nested-sets-with-sql\n\n $subtreeWidth = $this->r - $this->l + 1;\n $newPos = $destination->l + 1;\n $subtreeDist = $newPos - $this->l;\n $tmpPos = $this->l;\n $levelDiff = $destination->level - $this->level + 1;\n\n // observe backward movement\n\n if($subtreeDist < 0) {\n $subtreeDist -= $subtreeWidth;\n $tmpPos += $subtreeWidth;\n }\n\n $db->beginTransaction();\n\n // create space for subtree at new position\n\n $db->execute('UPDATE folders SET l = l + ? WHERE l >= ?', [$subtreeWidth, $newPos]);\n $db->execute('UPDATE folders SET r = r + ? WHERE r >= ?', [$subtreeWidth, $newPos]);\n\n // move subtree into new space\n\n $db->execute('UPDATE folders SET l = l + ?, r = r + ?, level = level + (?) WHERE l >= ? AND r < ?', [$subtreeDist, $subtreeDist, $levelDiff, $tmpPos, $tmpPos + $subtreeWidth]);\n\n // remove space previously occupied by subtree\n\n $db->execute('UPDATE folders SET l = l - ? WHERE l > ?', [$subtreeWidth, $this->r]);\n $db->execute('UPDATE folders SET r = r - ? WHERE r > ?', [$subtreeWidth, $this->r]);\n\n // update path\n\n $db->execute('UPDATE folders SET path = REGEXP_REPLACE(path, ?, ?) WHERE path LIKE ?', ['^' . $this->getRelativePath(), $newRelPath, $this->getRelativePath() . '%']);\n $db->commit();\n\n self::refreshNestings();\n\n // move filesystem folder\n\n $this->filesystemFolder->move($destination->getFilesystemFolder());\n\n // unset cached instances\n\n unset(self::$instancesById[$this->id], self::$instancesByPath[$this->filesystemFolder->getPath()]);\n return self::getInstance(null, $this->id);\n }", "public function testOnMovedDocument() {\n\n $obj = new FileSystemStorageProvider($this->logger, getcwd());\n\n $this->dir3->setParentBackedUp($this->dir3->getParent());\n $this->dir2->removeChildren($this->dir3);\n $this->dir1->addChildren($this->dir3);\n\n $obj->onMovedDocument($this->dir3);\n $this->assertFileExists($this->directory . \"/1/3\");\n }", "public static function move($_path, $_target)\r\n {\r\n return rename($_path, $_target);\r\n }", "public function move(string $from, string $to) : bool\n {\n $absoluteFrom = $this->absolutePath($from);\n $absoluteTo = $this->absolutePath($to);\n\n if ($absoluteFrom == $absoluteTo)\n return true;\n\n $parts = explode('/', $absoluteTo);\n $folderTo = implode('/', array_splice($parts, 0, count($parts) - 1));\n\n $old = umask(0);\n $this->fileSystem()->makeDirectory($folderTo, 0777, true, true);\n umask($old);\n\n return $this->fileSystem()->move($absoluteFrom, $absoluteTo);\n }", "public function move($path){\n\t\t$oldPath = $this->path;\n\t\t$path_array = explode(self::DS, $this->path);\n\t\t$fileName = $path_array[sizeof($path_array) - 1];\n\t\t$newPath = $path . self::DS . $fileName;\n\t\t$this->path = $newPath;\n\t\t$this->createFile($newPath);\n\t\tunlink($oldPath);\n\t}", "public function test_rename()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->rename('test_new_dir');\n $this->assertEquals($object->get_base_name(), 'test_new_dir');\n }", "public function move($source, $dest);", "public function move($sourcePath, $destinationPath, $checkIfIsUploaded = false, $overwrite = true);", "public function move(string $source, string $destination)\n {\n $this->filesystem->move(\n $this->relativeToRoot($source),\n $this->relativeToRoot($destination)\n );\n }", "public function checkMove($source, $destination) {\n\t\t$sourceNode = $this->tree->getNodeForPath($source);\n\t\tif (!$sourceNode instanceof Node) {\n\t\t\treturn;\n\t\t}\n\t\tlist($sourceDir, ) = \\Sabre\\HTTP\\URLUtil::splitPath($source);\n\t\tlist($destinationDir, ) = \\Sabre\\HTTP\\URLUtil::splitPath($destination);\n\n\t\tif ($sourceDir !== $destinationDir) {\n\t\t\t$sourceNodeFileInfo = $sourceNode->getFileInfo();\n\t\t\tif ($sourceNodeFileInfo === null) {\n\t\t\t\tthrow new NotFound($source . ' does not exist');\n\t\t\t}\n\n\t\t\tif (!$sourceNodeFileInfo->isDeletable()) {\n\t\t\t\tthrow new Forbidden($source . \" cannot be deleted\");\n\t\t\t}\n\t\t}\n\t}", "function __moveUploadedFile($source, $destination) {\r\n\t\tif (!Configure::read('Documents.isTesting')) {\r\n\t\t\treturn move_uploaded_file($source, $destination);\r\n\t\t} else {\r\n\t\t\treturn rename($source, $destination);\r\n\t\t}\r\n\r\n\t}", "static public function movePhysically($old_path, $new_path)\n {\n\n if(!is_dir($old_path))\n {\n return true;\n }\n \n if (!is_dir($new_path) || !is_writable($new_path))\n {\n $old = umask(0);\n mkdir($new_path, 0770);\n umask($old); \n }\n \n $files = sfFinder::type('file')->maxdepth(0)->in($old_path);\n $success = true;\n\n foreach ($files as $file)\n {\n $success = rename($file, $new_path . '/' . basename($file)) && $success;\n }\n if ($success)\n {\n $folders = sfFinder::type('dir')->maxdepth(0)->in($old_path);\n foreach($folders as $folder)\n {\n $new_name = substr($folder, strlen($old_path));\n $success = self::movePhysically($folder, $new_path . '/' . $new_name) && $success;\n }\n }\n \n $success = rmdir($old_path) && $success;\n\n return $success;\n }", "public function testMoveMessageException()\n {\n $this->assertSame($this->funcForTestMove(\"exception\"), \"exception\");\n }", "public function testMove(): void\n {\n $this->document1->setResourceSegment('/products/news/content1-news');\n $this->phpcrMapper->save($this->document1);\n $this->sessionManager->getSession()->save();\n\n // move\n $this->document1->setResourceSegment('/products/asdf/content2-news');\n $this->phpcrMapper->save($this->document1);\n $this->sessionManager->getSession()->save();\n\n $oldNode = $this->defaultSession->getNode('/cmf/sulu_io/routes/de/products/news/content1-news');\n $newNode = $this->defaultSession->getNode('/cmf/sulu_io/routes/de/products/asdf/content2-news');\n\n $oldNodeMixins = $oldNode->getMixinNodeTypes();\n $newNodeMixins = $newNode->getMixinNodeTypes();\n\n $this->assertEquals('sulu:path', $newNodeMixins[0]->getName());\n $this->assertEquals('sulu:path', $oldNodeMixins[0]->getName());\n\n $this->assertTrue($oldNode->getPropertyValue('sulu:history'));\n $this->assertEquals($newNode, $oldNode->getPropertyValue('sulu:content'));\n $this->assertEquals(\n $this->documentInspector->getNode($this->document1),\n $newNode->getPropertyValue('sulu:content')\n );\n\n // get content from new path\n $result = $this->phpcrMapper->loadByResourceLocator('/products/asdf/content2-news', 'sulu_io', 'de');\n $this->assertEquals($this->document1->getUuid(), $result);\n\n // get content from history should throw an exception\n $this->expectException(ResourceLocatorMovedException::class);\n $this->phpcrMapper->loadByResourceLocator('/products/news/content1-news', 'sulu_io', 'de');\n }", "function moveDIR($dir,$dest=\"\",$debug,$nMode=0755) {\n //$debug = 1;\n $result=true;\n\n //if($debug) { echo \"<h2>Moving directory</h2><p> From:<br> $dir <br>To: $dest</p>\";}\n\n $path = dirname(__FILE__);\n $files = scandir($dir);\n\n foreach($files as $file) {\n if (substr( $file ,0,1) != \".\") {\n $pathFile = $dir.'/'.$file;\n if (is_dir($pathFile)) {\n //if($debug) { echo \"<p><b>Directory:</b> $pathFile</p>\"; }\n\n $newDir = $dest.\"/\".$file;\n\n if (!moveDIR($pathFile,$newDir,$debug)) {\n $result = false;\n }\n\n } else {\n //echo ($debug) ? \"<p>$pathFile is a file</p>\" : \"\";\n\n // $currentFile = realpath($file); // current location\n $currentFile = $pathFile;\n\n $newFile = $dest.\"/\".$file;\n\n if (!file_exists($dest)) {\n makeDIR($dest,0,$nMode);\n }\n // if file already exists remove it\n if (file_exists($newFile)) {\n //if($debug) { echo \"<p>File $newFile already exists - Deleting</p>\"; }\n unlink($newFile);\n } else {\n //if($debug) { echo \"<p>File $newFile doesn't exist yet</p>\"; }\n }\n\n // Move via rename\n // rename(oldname, newname)\n if (rename($currentFile , $newFile)) {\n (CHMOD == 1) ? chmod($newFile, 0755) : '';\n //if($debug) { echo \"<p>Moved $currentFile to $newFile</p>\"; }\n } else {\n //if($debug) { echo \"<p>Failed to move $currentFile to $newFile</p>\"; }\n $result = false;\n } // END rename \n\n } // END if dir or file\n } // end if no dot\n } // END foreach\n return $result;\n }", "protected function _move($source, $targetDir, $name) {\r\n\t\treturn false;\r\n\t}", "public function testMoveSuccess_zipSubfolder()\n {\n $file = array(\"name\"=>\"zipSubfolder.zip\", \"size\"=>500, \"tmp_name\"=>__DIR__.'/zipSubfolder.zip');\n\n $service = $this->setMockPluginUploaderServiceMoveUploadedFile();\n\n $result = $service->upload($file);\n\n // check we got the correct result\n $this->assertEquals(false, $result);\n }", "public function move($sourcePath, $destinationPath) {\n\n\t\t$sourceNode = $this->getNodeForPath($sourcePath);\n\t\tif ($sourceNode instanceof \\Sabre_DAV_ICollection and $this->nodeExists($destinationPath)) {\n\t\t\tthrow new \\Sabre_DAV_Exception_Forbidden('Could not copy directory ' . $sourceNode . ', target exists');\n\t\t}\n\t\tlist($sourceDir,) = \\Sabre_DAV_URLUtil::splitPath($sourcePath);\n\t\tlist($destinationDir,) = \\Sabre_DAV_URLUtil::splitPath($destinationPath);\n\n\t\tFilesystem::rename($sourcePath, $destinationPath);\n\n\t\t$this->markDirty($sourceDir);\n\t\t$this->markDirty($destinationDir);\n\n\t}", "public function move(string $directory, string $name = null): File\n {\n $reflector = new \\ReflectionMethod($this, 'move');\n if ($reflector->getDeclaringClass()->getName() !== get_class($this)) {\n throw new \\BadFunctionCallException(sprintf('%s must override method \\'move\\' method.', get_class($this)));\n }\n\n return parent::move($directory, $name);\n }", "public function testMove()\n {\n $this->rlpMapper->save($this->content1, '/products/news/content1-news', 'default', 'de');\n $this->sessionManager->getSession()->save();\n\n // move\n $this->rlpMapper->move('/products/news/content1-news', '/products/asdf/content2-news', 'default', 'de');\n $this->sessionManager->getSession()->save();\n\n $oldNode = $this->session->getNode('/cmf/default/routes/de/products/news/content1-news');\n $newNode = $this->session->getNode('/cmf/default/routes/de/products/asdf/content2-news');\n\n $oldNodeMixins = $oldNode->getMixinNodeTypes();\n $newNodeMixins = $newNode->getMixinNodeTypes();\n\n $this->assertEquals('sulu:path', $newNodeMixins[0]->getName());\n $this->assertEquals('sulu:path', $oldNodeMixins[0]->getName());\n\n $this->assertTrue($oldNode->getPropertyValue('sulu:history'));\n $this->assertEquals($newNode, $oldNode->getPropertyValue('sulu:content'));\n $this->assertEquals($this->content1, $newNode->getPropertyValue('sulu:content'));\n\n // get content from new path\n $result = $this->rlpMapper->loadByResourceLocator('/products/asdf/content2-news', 'default', 'de');\n $this->assertEquals($this->content1->getIdentifier(), $result);\n\n // get content from history should throw an exception\n $this->setExpectedException('Sulu\\Component\\Content\\Exception\\ResourceLocatorMovedException');\n $result = $this->rlpMapper->loadByResourceLocator('/products/news/content1-news', 'default', 'de');\n }", "function moveFiles($src, $dest)\n{\n if (!is_dir($src)) {\n return false;\n }\n\n // If the destination directory does not exist create it\n if (!is_dir($dest)) {\n if (!mkdir($dest)) {\n // If the destination directory could not be created stop processing\n return false;\n }\n }\n\n // Open the source directory to read in files\n $i = new DirectoryIterator($src);\n foreach ($i as $f) {\n if ($f->isFile()) {\n rename($f->getRealPath(), \"$dest/\" . $f->getFilename());\n } else {\n if (!$f->isDot() && $f->isDir()) {\n rmDirRecursive($f->getRealPath(), \"$dest/$f\");\n unlink($f->getRealPath());\n }\n }\n }\n unlink($src);\n}", "public function testMoveFileFromTmp(): void\n {\n $expectedFilePath = $this->imageUploader->getBasePath() . DIRECTORY_SEPARATOR . 'magento_small_image_1.jpg';\n\n $this->assertFalse($this->mediaDirectory->isExist($expectedFilePath));\n\n $this->imageUploader->moveFileFromTmp('magento_small_image.jpg');\n\n $this->assertTrue($this->mediaDirectory->isExist($expectedFilePath));\n }", "public function move(DirectoryInterface $directory, string $name = null): void\n {\n if ( ! $this->exists() ) {\n throw new FileSystemException('can not move not existing file: '.$this->filename);\n }\n\n if ( ! $directory->exists() ) {\n throw new FileSystemException('can not move to not existing target directories: '.$directory->getPath());\n }\n\n if ( false !== strpos(str_replace('\\\\', '/', $name), '/') ) {\n throw new FileSystemException('name parameter can not contain slashes');\n }\n\n $name = $name ?? $this->filename;\n\n $done = rename(\n $this->getPathname(),\n $directory->getPath().'/'.$name\n );\n\n if ( ! $done ) {\n throw new FileSystemException('moving failed, probably due to access issues');\n }\n\n $this->directory = $directory;\n $this->filename = $name;\n $this->extension = pathinfo($name, PATHINFO_EXTENSION);\n $this->basename = basename($name, '.'.$this->extension);\n }", "public function test_rename_same_name()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->rename('test_dir');\n $this->assertEquals($object->get_base_name(), 'test_dir');\n }", "public function testOnNewDirectoryWithIllegalArgumentException() {\n\n $obj = new FileSystemStorageProvider($this->logger, $this->directory);\n\n try {\n\n $obj->onNewDirectory($this->doc1);\n } catch (Exception $ex) {\n\n $this->assertInstanceOf(IllegalArgumentException::class, $ex);\n $this->assertEquals(\"The document must be a directory\", $ex->getMessage());\n }\n }", "public function upload_move($file, $local_file);", "public function move($source, $target)\n {\n \n }", "public function move($new_path)\n\t{\n\t\t$info = pathinfo($this->path);\n\t\t$new_path = $this->area->get_path($new_path);\n\n\t\t$new_path = rtrim($new_path, '\\\\/').DS.$info['basename'];\n\n\t\t$return = $this->area->rename($this->path, $new_path);\n\t\t$return and $this->path = $new_path;\n\t\t\n\t\treturn $return;\n\t}", "function movefile($POSTfrom, $POSTto, $currentdir) {\n\tif(count($POSTto) == 1) { //if the user selected only one \"move to\" location\n\t\tforeach($POSTfrom as $fromItem => $n1) { //$fromItem returns selected file/folder name to be moved, $n is checkbox status\n\t\t\tforeach($POSTto as $toItem => $n2) {//$toItem returns selected folder to have the files put in\n\t\t\t\tif(!file_exists($currentdir . \"/\" . $toItem . \"/\" . $fromItem)) {\n\t\t\t\t\tif(rename($currentdir . \"/\" . $fromItem, $currentdir . \"/\" . $toItem . \"/\" . $fromItem)) { //if rename worked, do nothing. Else, echo an error. Since rename() can rename a folder, it is possible to rename a file/folder to its new directory and have linux move it accourdingly\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if ($fromItem == $toItem) { //if user tries to move the same folder into its self\n\t\t\t\t\t\techo \"<p><b>Error</b>: Could not move file or folder <b>\" . $fromItem . \"</b>. You cannot move a file into its self. Everything before it was moved.</p>\";\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo \"<p><b>Error</b>: Could not move file or folder <b>\" . $fromItem . \"</b>. Everything before it was moved.</p>\";\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\techo \"<p><b>Error</b>: File already exists in the folder you want to move it to. Everything before <b>\" . $fromItem . \"</b> has been moved.</p>\";\n\t\t\t\t\techo \"<p>Rename file if you want to move it.</p>\";\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\techo \"<p><b>Error</b>: You selected more than one destination folder, or none at all. Or, you might have not selected anything to move.</p>\";\n\t\treturn false;\n\t}\n\t\n\treturn true; // If everything worked out, return true\n}", "public function testCopyDirOverExistingUpcountsDestinationDirname()\n {\n $this->storage->createDir('/', 'dest');\n $this->storage->createDir('/dest', 'tmp');\n $this->storage->createFile('/dest/tmp/', 'a.txt');\n $this->storage->createDir('/', 'tmp');\n $this->storage->createFile('/tmp/', 'b.txt');\n\n $this->storage->copyDir('/tmp', '/dest');\n\n $this->assertDirectoryExists(TEST_REPOSITORY.'/dest/tmp/');\n $this->assertTrue($this->storage->fileExists('/dest/tmp/a.txt'));\n\n $this->assertDirectoryExists(TEST_REPOSITORY.'/dest/tmp (1)');\n $this->assertTrue($this->storage->fileExists('/dest/tmp (1)/b.txt'));\n }", "public static function move(string $src, string $target)\n {\n if( is_null($src) || is_null($target) )\n {\n return false;\n } \n\n if( Storage::getDefaultDriver() === 'local' )\n {\n //Use File facade since Storage facade points to app/storage by default\n\n $target = sprintf('%s/%s',public_path(),$target);\n \n if( ! File::exists($src) )\n {\n return false;\n }\n\n return File::move($src,$target); \n }\n\n else \n {\n if( ! Storage::has($src) )\n {\n return false;\n } \n\n return Storage::move($src,$target);\n }\n }", "public function move($destination,$filename){\n\t\tif(!is_uploaded_file($this->getPathname())){\n\t\t\tthrow new \\Exception('File couldn\\'t be uploaded!');\n\t\t}\n\n\t\t/// chceck that destination directory exists\n\t\tif(!is_dir($destination)){\n\t\t\t/// try to create the directory\n if(false === @mkdir($destination,0777,true) && !is_dir($destination)){\n throw new \\Exception('Can\\'t create directory \"'.$destination.'\"');\n }\n }\n /// check access rights\n else if(!is_writable($destination)){\n throw new \\Exception('Can\\'t write to directory \"'.$destination.'\"');\n }\n\n /// determine target path\n $target = rtrim($destination,'/\\\\').DIRECTORY_SEPARATOR.$this->getFilename($filename);\n\n\t\t/// move the file\n\t\tif(!@move_uploaded_file($this->getPathname(), $target)){\n\t\t\tthrow new \\Exception('Can\\'t move the file from \"'.$this->getPathname().'\" to \"'.$target.'\"');\n\t\t}\n\n\t\t/// set access rights\n\t\t@chmod($target,0666 & ~umask());\n\n\t\treturn $target;\n\t}", "public function move(string $destination, ?string $name = null, ?string $ext = null): bool {\n $path = explode(self::SEPARATOR, $this->getPath());\n $old_name = $path[count($path) - 1];\n $ext = $ext ?? (strpos($old_name, \".\") !== false ? explode(\".\", $old_name)[count(explode(\".\", $old_name)) - 1] : '');\n $ext = $ext !== '' ? \".\" . $ext : '';\n $name = $name ?? $old_name;\n if(substr($destination, -strlen($destination)) !== self::SEPARATOR) $destination .= self::SEPARATOR;\n return rename($this->getPath(), $destination . $name . $ext);\n }", "private function _moveImagesToNewFileSystem()\n\t{\n\t\tif (!Image::testFileSystem())\n\t\t\t$this->_errors[] = Tools::displayError('Error: your server configuration is not compatible with the new image system. No images were moved');\n\t\telse\n\t\t{\n\t\t\tini_set('max_execution_time', $this->max_execution_time); // ini_set may be disabled, we need the real value\n\t\t\t$this->max_execution_time = (int)ini_get('max_execution_time');\t\n\t\t\t$result = Image::moveToNewFileSystem($this->max_execution_time);\n\t\t\tif ($result === 'timeout')\n\t\t\t\t$this->_errors[] = Tools::displayError('Not all images have been moved, server timed out before finishing. Click on \\\"Move images\\\" again to resume moving images');\n\t\t\telseif ($result === false)\n\t\t\t\t$this->_errors[] = Tools::displayError('Error: some or all images could not be moved.');\n\t\t}\n\t\treturn (sizeof($this->_errors) > 0 ? false : true);\n\t}", "public function move(string $fromPath, string $toPath, array $mimeType) : bool\n {\n $fromPath = $this->normalizePath($fromPath);\n\n $toPath = $this->normalizePath($toPath);\n\n // If plain/text, its a folder\n if (substr($mimeType['mimetype'], 0, 4) === 'text') {\n $action = 'GetFolderByServerRelativeUrl(\\''.$this->folderPath.$fromPath.'\\')/moveTo(newUrl=\\''.$this->folderPath.$toPath.'\\')';\n } else {\n $action = 'GetFileByServerRelativeUrl(\\''.$this->folderPath.$fromPath.'\\')/moveTo(newUrl=\\''.$this->folderPath.$toPath.'\\', flags=1)';\n }\n\n $options = [\n 'headers' => $this->requestHeaders,\n ];\n\n $response = $this->send('POST', $action, $options);\n\n return $response->getStatusCode() === 200 ? true : false;\n }", "public function test_remove()\n {\n $path = ROOT.DS.'test_dir';\n $object = Directory::create($path);\n $object->remove($path);\n $this->assertFalse(is_dir($path));\n }", "public function move($sDestinationFileName);", "function _moveFile($sourceDir, $destDir, $filename) {\n\t\t$currentFilePath = $sourceDir . DIRECTORY_SEPARATOR . $filename;\n\t\t$destinationPath = $destDir . DIRECTORY_SEPARATOR . $filename;\n\n\t\tif (!rename($currentFilePath, $destinationPath)) {\n\t\t\t$message = __('admin.fileLoader.moveFileFailed', array('filename' => $filename,\n\t\t\t\t'currentFilePath' => $currentFilePath, 'destinationPath' => $destinationPath));\n\t\t\t$this->addExecutionLogEntry($message, SCHEDULED_TASK_MESSAGE_TYPE_ERROR);\n\n\t\t\t// Script should always stop if it can't manipulate files inside\n\t\t\t// its own directory system.\n\t\t\tfatalError($message);\n\t\t}\n\n\t\treturn $destinationPath;\n\t}", "public function move( $dest )\n\t\t{\n\t\t\tif( $this->path )\n\t\t\t{\n\t\t\t\tFileSystem::move( $this->path, $dest );\n\t\t\t\t$this->path = $dest;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new \\System\\Base\\InvalidOperationException(\"attempt to perform action on empty Folder object\");\n\t\t\t}\n\t\t}", "public function move_to_slideshow_dir()\n\t{\n\t\t\n\t\t$file_name = substr($this->file_handler[\"name\"], 0, strrpos($this->file_handler[\"name\"], \".\"));\n\t\t$file_name = $file_name . \"-\" . time();\n\t\t$file_name = $file_name . \".\" . pathinfo($this->file_handler['name'], PATHINFO_EXTENSION);\n\t\t$file_name = strtolower($file_name);\n\t\t\n\t\t$new_file_name = $this->base_path . $file_name;\n\n\t\t\n\t\tif(move_uploaded_file($this->file_handler[\"tmp_name\"], $new_file_name))\n\t\t\treturn $this->relative_path . $file_name;\n\t\telse\n\t\t\treturn false;\n\t}", "public function moveDirectory( $source, $destination )\n {\n $path = explode( DS, $source );\n\n $destination = $destination . DS . $path[ count( $path ) - 1 ];\n\n $result = $this->copyDirectory( $source, $destination, TRUE );\n\n if ( TRUE === $result )\n {\n $result = $this->deleteDirectory( $source );\n }\n\n return $result;\n }", "public function move($uid) {\n\n $uid = str::slug($uid);\n\n if(empty($uid)) {\n throw new Exception('The uid is missing');\n }\n\n // don't do anything if the uid exists\n if($this->uid() === $uid) return true;\n\n // check for an existing page with the same UID\n if($this->siblings()->not($this)->find($uid)) {\n throw new Exception('A page with this uid already exists');\n }\n\n $dir = $this->isVisible() ? $this->num() . '-' . $uid : $uid;\n $root = dirname($this->root()) . DS . $dir;\n\n if(!dir::move($this->root(), $root)) {\n throw new Exception('The directory could not be moved');\n }\n\n $this->dirname = $dir;\n $this->root = $root;\n $this->uid = $uid;\n\n // assign a new id and uri\n $this->id = $this->uri = ltrim($this->parent->id() . '/' . $this->uid, '/');\n\n // clean the cache\n $this->kirby->cache()->flush();\n $this->reset();\n return true;\n\n }", "public function method_MOVE( $destination, $overwrite, $path )\n{\n $multistatus = new DAV_Multistatus();\n \n // This might generate an exception, but that's OK:\n $retval = ($destination[0] == '/')\n ? $this->method_COPY( $destination, $overwrite )\n : $this->method_COPY_external( $destination, $overwrite );\n \n foreach ( $this as $member ) {\n try {\n $deeppath = DAV::slashify($path) . $member;\n $deepdest = DAV::slashify($destination) . (\n $destination[0] == '/' ? $member : DAV::urlencode($member)\n );\n $resource = DAV_Server::inst()->resource($deeppath);\n if (!$resource)\n $multistatus->addStatus(\n $deeppath, new DAV_Status(\n REST::HTTP_INTERNAL_SERVER_ERROR,\n \"Resource not found: $deeppath\"\n )\n );\n elseif ( $resource instanceof DAV_Collection )\n $resource->method_MOVE( $deepdest, $overwrite, $deeppath );\n elseif ($destination[0] == '/')\n $resource->method_MOVE( $deepdest, $overwrite );\n else\n $resource->method_MOVE_external( $deepdest, $overwrite );\n }\n catch (DAV_Status $e) {\n $multistatus->addStatus($deeppath, $e);\n }\n catch (DAV_Multistatus $e) {\n $multistatus->mergeWith($e);\n }\n }\n if ( count( $multistatus->statuses() ) )\n throw $multistatus;\n \n try { $this->method_DELETE(); }\n catch (DAV_Status $e) {}\n \n return $retval;\n}", "private function moveMigration($arguments){\n\n $migrationPathWillBeMoved=staticPathModel::getProjectPath($arguments['move']).'/'.utils::getAppVersion($arguments['move']).'/migrations/schemas/'.$arguments['schema'];\n $newPath=root.'/'.staticPathModel::$storeMigrationsPath.'/schemas/'.$arguments['schema'];\n\n\n $migrationPurePath=str_replace(root.'/','',$migrationPathWillBeMoved);\n $migrationNamespace=str_replace('/','\\\\',$migrationPurePath);\n $newMigrationNamespace=str_replace('/','\\\\',str_replace(root.'/','',$newPath));\n\n\n if(rename($migrationPathWillBeMoved,$newPath)){\n\n foreach (glob($newPath.\"/*.php\") as $filename) {\n utils::changeClass($filename,[\n $migrationNamespace=>$newMigrationNamespace\n ]);\n }\n\n echo 'migration named '.$arguments['schema'].' in '.$arguments['move'].' project has been successfully moved';\n echo PHP_EOL;\n }\n\n\n $migrationSeedPathWillBeMoved=staticPathModel::getProjectPath($arguments['move']).'/'.utils::getAppVersion($arguments['move']).'/migrations/seeds';\n $newSeedPath=root.'/'.staticPathModel::$storeMigrationsPath.'/seeds';\n\n\n $migrationSeedPurePath=str_replace(root.'/','',$migrationSeedPathWillBeMoved);\n $migrationSeedNamespace=str_replace('/','\\\\',$migrationSeedPurePath);\n $newMigrationSeedNamespace=str_replace('/','\\\\',str_replace(root.'/','',$newSeedPath));\n\n if(rename($migrationSeedPathWillBeMoved,$newSeedPath)){\n\n foreach (glob($newSeedPath.\"/*.php\") as $filename) {\n utils::changeClass($filename,[\n $migrationSeedNamespace=>$newMigrationSeedNamespace\n ]);\n }\n\n echo 'migration seeds named '.$arguments['schema'].' in '.$arguments['move'].' project has been successfully moved';\n\n }\n }", "public function move(string $path, string $target): bool\n {\n return rename($path, $target);\n }", "public function move($path)\n {\n return move_uploaded_file($this->tmp, $path);\n }", "public function moveUploadedFile($source, $dest)\n {\n if (!is_dir($dest)) {\n throw new UploadableDirectoryNotFoundException(sprintf('File \"%s\" cannot be moved because that directory does not exist!',\n $dest\n ));\n }\n\n return $this->doMoveUploadedFile($source, $dest);\n }", "public function test_factory_not_exist()\n {\n Directory::factory(ROOT.DS.'test_dir');\n }", "public function renameDirectory(DirectoryInterface $directory, string $newName): DirectoryInterface;", "public function moveTo($destination) {}", "function move_file($path) {\n $pathto = 'upload/'.$path;\n move_uploaded_file( $_FILES['new_file']['tmp_name'], $pathto) or\n die( \"Le format du fichier n\\'est pas compatibe !\");\n\n return $pathto;\n}", "public static function x_move($source, $destination, $overwrite = false) {\n // source is array\n if (is_array($source)) {\n $result = true;\n foreach($source as $s) {\n $result = self::x_move($s, $destination, $overwrite) && $result;\n }\n return $result;\n }\n\n // target not existing\n // => rename\n // target file\n // => rename if overwrite\n if (!self::file_exists($destination) || $overwrite)\n return self::rename($source, $destination);\n\n // source is file and target folder\n // => rename if target not exists\n $new_dest = new Path($destination->getPath().DIRECTORY_SEPARATOR.basename($source->getPath()), $destination->getType());\n if (self::is_file($source) && self::is_dir($destination) && !self::file_exists($new_dest))\n return self::rename($source, $new_dest);\n }", "function move($src, $dest)\n\t{\n\t\treturn rename($src, $dest);\n\t}", "public function testCopyDirectoryReturnsFalseIfSourceIsntDirectory()\n {\n $origin = self::$temp.DS.'breeze'.DS.'boom'.DS.'foo'.DS.'bar'.DS.'baz';\n $this->assertFalse(Storage::cpdir($origin, self::$temp));\n }", "function _pm_update_move_files($src_dir, $dest_dir, $skip_list, $remove_conflicts = TRUE) {\n $items_to_move = drush_scan_directory($src_dir, '/.*/', array_merge(array('.', '..'), $skip_list), 0, FALSE, 'filename', 0, TRUE);\n foreach ($items_to_move as $filename => $info) {\n if ($remove_conflicts) {\n drush_delete_dir($dest_dir . '/' . basename($filename));\n }\n if (!file_exists($dest_dir . '/' . basename($filename))) {\n $move_result = drush_move_dir($filename, $dest_dir . '/' . basename($filename));\n }\n }\n return TRUE;\n}", "function move($pathFrom , $pathTo, $overwrite = true)\r\n\t{\r\n\t\tif (file_exists($pathTo)) {\r\n\t\t\tif ($overwrite) {\r\n\t\t\t\tunlink($pathTo);\r\n\t\t\t\t$ok = rename($pathFrom, $pathTo);\r\n\t\t\t} else {\r\n\t\t\t\t$ok = false;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$ok = rename($pathFrom, $pathTo);\r\n\t\t}\r\n\t\treturn $ok;\r\n\t}", "public static function move($path, $target)\n\t{\n\t\treturn rename($path, $target);\n\t}", "function make_move_build($build_path) {\n $tmp_path = make_tmp();\n $ret = TRUE;\n if ($build_path == '.') {\n $info = drush_scan_directory($tmp_path . DIRECTORY_SEPARATOR . '__build__', '/./', array('.', '..'), 0, FALSE, 'filename', 0, TRUE);\n foreach ($info as $file) {\n $destination = $build_path . DIRECTORY_SEPARATOR . $file->basename;\n if (file_exists($destination)) {\n // To prevent the removal of top-level directories such as 'modules' or\n // 'themes', descend in a level if the file exists.\n // TODO: This only protects one level of directories from being removed.\n $files = drush_scan_directory($file->filename, '/./', array('.', '..'), 0, FALSE);\n foreach ($files as $file) {\n $ret = $ret && drush_copy_dir($file->filename, $destination . DIRECTORY_SEPARATOR . $file->basename, FILE_EXISTS_MERGE);\n }\n }\n else {\n $ret = $ret && drush_copy_dir($file->filename, $destination);\n }\n }\n }\n else {\n drush_mkdir(dirname($build_path));\n $ret = drush_move_dir($tmp_path . DIRECTORY_SEPARATOR . '__build__', $tmp_path . DIRECTORY_SEPARATOR . basename($build_path), TRUE);\n $ret = $ret && drush_copy_dir($tmp_path . DIRECTORY_SEPARATOR . basename($build_path), $build_path);\n }\n\n // Copying to final destination resets write permissions. Re-apply.\n if (drush_get_option('prepare-install')) {\n $default = $build_path . '/sites/default';\n chmod($default . '/settings.php', 0666);\n chmod($default . '/files', 0777);\n }\n\n if (!$ret) {\n drush_set_error('MAKE_CANNOT_MOVE_BUILD', dt(\"Cannot move build into place.\"));\n }\n return $ret;\n}", "static function move($path, $handler)\r\n {\r\n Route::route(\"MOVE\", $path, $handler);\r\n }", "protected function onMove(){\n\t\tif (empty($this->post['directory']) || empty($this->post['file'])) return;\n\t\t\n\t\t$rename = empty($this->post['newDirectory']) && !empty($this->post['name']);\n\t\t$dir = $this->getDir($this->post['directory']);\n\t\t$file = realpath($dir . '/' . $this->post['file']);\n\t\t\n\t\t$is_dir = is_dir($file);\n\t\tif (!$this->checkFile($file) || (!$rename && $is_dir))\n\t\t\treturn;\n\t\t\n\t\tif ($rename || $is_dir){\n\t\t\tif (empty($this->post['name'])) return;\n\t\t\t$newname = $this->getName($this->post['name'], $dir);\n\t\t\t$fn = 'rename';\n\t\t}else{\n\t\t\t$newname = $this->getName(pathinfo($file, PATHINFO_FILENAME), $this->getDir($this->post['newDirectory']));\n\t\t\t$fn = !empty($this->post['copy']) ? 'copy' : 'rename';\n\t\t}\n\t\t\n\t\tif (!$newname) return;\n\t\t\n\t\t$ext = pathinfo($file, PATHINFO_EXTENSION);\n\t\tif ($ext) $newname .= '.' . $ext;\n\t\t$fn($file, $newname);\n\t\t\n\t\techo json_encode(array(\n\t\t\t'name' => pathinfo($this->normalize($newname), PATHINFO_BASENAME),\n\t\t));\n\t}", "private function copiarExistenciaDir($directorio = null, $nombre = null) {\n\t\t\tif(is_dir($directorio) == true):\n\t\t\t\t$nombre = (is_string($nombre) == true) ? $nombre : $this->raw['nombre'];\n\t\t\t\treturn move_uploaded_file($this->raw['temporal'], implode(DIRECTORY_SEPARATOR, array($directorio, $nombre)));\n\t\t\telse:\n\t\t\t\treturn null;\n\t\t\tendif;\n\t\t}", "public function moveOrCopy\n (\n $target_directory,\n $target_name = '',\n $replace = false,\n $target_filesystem_type,\n $move_or_copy = 'copy'\n ) {\n\n /** Defaults */\n if ($target_directory == '') {\n $target_directory = $this->parent;\n }\n\n if ($target_name == '' && $this->is_file) {\n if ($target_directory == $this->parent) {\n throw new FilesystemException\n ('Ftp Filesystem ' . $move_or_copy\n . ': Must specify new file name when using the same target path: '\n . $this->path);\n }\n $target_name = $this->name;\n }\n\n if ($this->is_file === true) {\n $base_folder = $this->parent;\n } else {\n $base_folder = $this->path;\n }\n\n /** Edits */\n if (file_exists($this->path)) {\n } else {\n throw new FilesystemException\n ('Ftp Filesystem moveOrCopy: failed. This path does not exist: '\n . $this->path . ' Specified as source for ' . $move_or_copy\n . ' operation to ' . $target_directory);\n }\n\n if (file_exists($target_directory)) {\n } else {\n throw new FilesystemException\n ('Ftp Filesystem moveOrCopy: failed. This path does not exist: '\n . $this->path . ' Specified as destination for ' . $move_or_copy\n . ' to ' . $target_directory);\n }\n\n if (is_writeable($target_directory) === false) {\n throw new FilesystemException\n ('Ftp Filesystem Delete: No write access to file/path: ' . $target_directory);\n }\n\n if ($move_or_copy == 'move') {\n if (is_writeable($this->path) === false) {\n throw new FilesystemException\n ('Ftp Filesystem Delete: No write access for moving source file/path: '\n . $move_or_copy);\n }\n }\n\n if ($this->is_file === true || $target_name == '') {\n\n } else {\n if (is_dir($target_directory . '/' . $target_name)) {\n\n } else {\n\n new fsAdapter('write', $target_directory, $target_filesystem_type,\n $this->options = array('file' => $target_name)\n );\n }\n $target_directory = $target_directory . '/' . $target_name;\n $target_name = '';\n }\n\n /** Create new target directories from source directories list */\n if (count($this->directories) > 0) {\n\n asort($this->directories);\n\n $parent = '';\n $new_node = '';\n $new_path = '';\n\n foreach ($this->directories as $directory) {\n\n $new_path = $this->build_new_path($directory, $target_directory, $base_folder);\n\n if (is_dir($new_path)) {\n\n } else {\n\n $parent = dirname($new_path);\n $new_node = basename($new_path);\n\n new fsAdapter('write', $parent, $target_filesystem_type,\n $this->options = array('file' => $new_node)\n );\n }\n\n $parent = '';\n $new_node = '';\n $new_path = '';\n }\n }\n\n /** Copy files now that directories are in place */\n if (count($this->files) > 0) {\n\n $path_name = '';\n $file_name = '';\n\n foreach ($this->files as $file) {\n\n $new_path = $this->build_new_path($file, $target_directory, $base_folder);\n\n /** Single file copy or move */\n if ($this->is_file === true) {\n $file_name = $target_name;\n } else {\n $file_name = basename($file);\n }\n\n /** Source */\n $adapter = new fsAdapter('Read', $file);\n $data = $adapter->fs->data;\n\n /** Write Target */\n new fsAdapter('Write', $new_path, $target_filesystem_type,\n $this->options = array(\n 'file' => $file_name,\n 'replace' => $replace,\n 'data' => $data,\n )\n );\n\n $path_name = '';\n $file_name = '';\n }\n }\n\n /** For move, remove the files and folders just copied */\n if ($move_or_copy == 'move') {\n $this->_deleteDiscoveryFilesArray();\n $this->_deleteDiscoveryDirectoriesArray();\n }\n\n return true;\n }", "public function move($folder)\r\n\t{\r\n\t\tif (!$folder || !$folder->id && $this->getValue(\"name\") != \"/\")\r\n\t\t\treturn false;\r\n\t\t$this->setValue(\"parent_id\", $folder->id);\r\n\t\treturn $this->save();\r\n\t}", "function moveFolder($user_dir){\r\n\t\t\t\t// open the user's directory\r\n\t\t\t\t\t$path = './cloud/'.$_SESSION['SESS_USER_ID'].'/'; // '.' for current\r\n\r\n\t\t\t\t\t\r\n\t\t\t}", "public function move(sfAssetFolder $new_parent)\n {\n // controls\n if($this->getNode()->isRoot())\n {\n throw new sfAssetException('The root folder cannot be moved');\n }\n else if($new_parent->hasSubFolder($this->getName()))\n {\n throw new sfAssetException('The target folder \"%folder%\" already contains a folder named \"%name%\". The folder has not been moved.', array('%folder%' => $new_parent, '%name%' => $this->getName()));\n }\n else if($new_parent->getNode()->isDescendantOf($this))\n {\n throw new sfAssetException('The target folder cannot be a subfolder of moved folder. The folder has not been moved.');\n }\n else if ($this->getId() == $new_parent->getId())\n {\n return;\n }\n \n $old_path = $this->getFullPath();\n \n $this->getNode()->moveAsLastChildOf($new_parent);\n $this->save();\n \n $descendants = $this->getNode()->getChildren();\n $descendants = $descendants ? $descendants : array();\n \n // move its assets\n self::movePhysically($old_path, $this->getFullPath());\n \n foreach ($descendants as $descendant)\n {\n // Update relative path\n $descendant->save();\n }\n \n // else: nothing to do\n }", "public static function move($path, $target)\n {\n return rename($path, $target);\n }", "function move_uploaded_file_to_temp_directory($file, $destination_sufix_name) {\n do {\n $temp_destination = WORK_PATH.'/'.make_string(10).'_'.$destination_sufix_name;\n } while (is_file($temp_destination));\n \n if (move_uploaded_file($file, $temp_destination)) {\n return $temp_destination;\n } // if\n\n return false;\n }", "function move_file($name)\n{\n $old_file = __DIR__ . '/xml_schemas/' . $name . '.xml';\n $new_file = Path::get_repository_path() . 'lib/content_object/' . $name . '/install/' . $name . '.xml';\n Filesystem::copy_file($old_file, $new_file);\n return $new_file;\n}", "protected function moveFolderRequest(Requests\\MoveFolderRequest $request)\n {\n // verify the required parameter 'src_path' is set\n if ($request->srcPath === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $srcPath when calling moveFolder');\n }\n // verify the required parameter 'dest_path' is set\n if ($request->destPath === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $destPath when calling moveFolder');\n }\n\n $resourcePath = '/slides/storage/folder/move/{srcPath}';\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n\n // query params\n if ($request->destPath !== null) {\n $queryParams['destPath'] = ObjectSerializer::toQueryValue($request->destPath);\n }\n // query params\n if ($request->srcStorageName !== null) {\n $queryParams['srcStorageName'] = ObjectSerializer::toQueryValue($request->srcStorageName);\n }\n // query params\n if ($request->destStorageName !== null) {\n $queryParams['destStorageName'] = ObjectSerializer::toQueryValue($request->destStorageName);\n }\n\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"srcPath\", $request->srcPath);\n $this->headerSelector->selectHeaders(\n $headerParams,\n ['application/json'],\n ['application/json']);\n\n return $this->createRequest($resourcePath, $queryParams, $headerParams, $httpBody, 'PUT');\n }", "public function should_throw_if_trying_to_build_on_non_existing_directory(): void\n {\n $this->expectException(\\InvalidArgumentException::class);\n new DirectorySnapshot(__DIR__ . '/not-existing');\n }", "function FilesMoveToFolder()\r\n{\r\n global $PH;\r\n\r\n $file_ids= getPassedIds('file','files_*');\r\n\r\n if(!$file_ids) {\r\n $PH->abortWarning(__(\"Select some files to move\"));\r\n exit();\r\n }\r\n\r\n\r\n\r\n /**\r\n * by default render list of folders...\r\n */\r\n $target_id=-1;\r\n\r\n /**\r\n * ...but, if folder was given, directly move files...\r\n */\r\n $folder_ids= getPassedIds('folder','folders_*');\r\n if(count($folder_ids) == 1) {\r\n if($folder_task= Task::getVisibleById($folder_ids[0])) {\r\n $target_id= $folder_task->id;\r\n }\r\n }\r\n\r\n /**\r\n * if no folders was selected, move files to project root\r\n */\r\n else if(get('from_selection')) {\r\n $target_id= 0;\r\n }\r\n\r\n\r\n if($target_id != -1) {\r\n\r\n\r\n if($target_id != 0){\r\n if(!$target_task= Task::getEditableById($target_id)) {\r\n $PH->abortWarning(__(\"insufficient rights\"));\r\n\r\n }\r\n ### get path of target to check for cycles ###\r\n $parent_tasks= $target_task->getFolder();\r\n $parent_tasks[]= $target_task;\r\n }\r\n else {\r\n $parent_tasks=array();\r\n }\r\n\r\n\r\n $count=0;\r\n foreach($file_ids as $id) {\r\n if($file= File::getEditableById($id)) {\r\n\r\n $file->parent_item= $target_id;\r\n $file->update();\r\n }\r\n else {\r\n $PH->messages[]= sprintf(__(\"Can not edit file %s\"), $file->name);\r\n }\r\n }\r\n\r\n ### return to from-page? ###\r\n if(!$PH->showFromPage()) {\r\n $PH->show('home');\r\n }\r\n exit();\r\n }\r\n #else if($target_id != -1) {\r\n # $PH->abortWarning(__(\"insufficient rights to edit any of the selected items\"));\r\n #}\r\n\r\n\r\n\r\n\r\n /**\r\n * build page folder lists...\r\n */\r\n\r\n ### get project ####\r\n if(!$file= File::getVisibleById($file_ids[0])) {\r\n $PH->abortWarning(\"could not get file\", ERROR_BUG);\r\n }\r\n\r\n if(!$project= Project::getVisibleById($file->project)) {\r\n $PH->abortWarning(\"file without project?\", ERROR_BUG);\r\n }\r\n\r\n\r\n ### set up page and write header ####\r\n {\r\n $page= new Page(array('use_jscalendar'=>false, 'autofocus_field'=>'company_name'));\r\n $page->cur_tab='projects';\r\n $page->type= __(\"Edit files\");\r\n $page->title=\"$project->name\";\r\n $page->title_minor=__(\"Select folder to move files into\");\r\n\r\n $page->crumbs= build_project_crumbs($project);\r\n\r\n $page->options[]= new NaviOption(array(\r\n 'target_id' =>'filesMoveToFolder',\r\n ));\r\n\r\n echo(new PageHeader);\r\n }\r\n echo (new PageContentOpen);\r\n\r\n\r\n ### write form #####\r\n {\r\n ### write files as hidden entry ###\r\n foreach($file_ids as $id) {\r\n if($file= File::getEditableById($id)) {\r\n echo \"<input type=hidden name='files_{$id}_chk' value='1'>\";\r\n }\r\n }\r\n\r\n\r\n ### write list of folders ###\r\n {\r\n require_once(confGet('DIR_STREBER') . 'lists/list_tasks.inc.php');\r\n $list= new ListBlock_tasks();\r\n $list->reduced_header= true;\r\n $list->query_options['show_folders']= true;\r\n #$list->query_options['folders_only']= true;\r\n $list->query_options['project']= $project->id;\r\n $list->groupings= NULL;\r\n $list->block_functions= NULL;\r\n $list->id= 'folders';\r\n $list->no_items_html= __('No folders available');\r\n unset($list->columns['status']);\r\n unset($list->columns['date_start']);\r\n unset($list->columns['days_left']);\r\n unset($list->columns['created_by']);\r\n unset($list->columns['label']);\r\n unset($list->columns['project']);\r\n\r\n $list->functions= array();\r\n\r\n $list->active_block_function = 'tree';\r\n\r\n\r\n $list->print_automatic($project,NULL);\r\n }\r\n\r\n echo __(\"(or select nothing to move to project root)\"). \"<br> \";\r\n\r\n echo \"<input type=hidden name='from_selection' value='1'>\"; # keep flag to ungroup files\r\n echo \"<input type=hidden name='project' value='$project->id'>\";\r\n $button_name=__(\"Move items\");\r\n echo \"<input class=button2 type=submit value='$button_name'>\";\r\n\r\n $PH->go_submit='filesMoveToFolder';\r\n\r\n }\r\n echo (new PageContentClose);\r\n echo (new PageHtmlEnd());\r\n\r\n}", "public function moveFile($filename, $key);", "public function testCannotMoveWhenMove()\r\n {\r\n $this->myTestcar = new Car(new moveCarState());\r\n $this->myTestcar->move();\r\n }", "public static function assertExists($path) {\n if (self::pathExists($path)) {\n return;\n }\n\n // Before we claim that the path doesn't exist, try to find a parent we\n // don't have \"+x\" on. If we find one, tailor the error message so we don't\n // say \"does not exist\" in cases where the path does exist, we just don't\n // have permission to test its existence.\n foreach (self::walkToRoot($path) as $parent) {\n if (!self::pathExists($parent)) {\n continue;\n }\n\n if (!is_dir($parent)) {\n continue;\n }\n\n if (phutil_is_windows()) {\n // Do nothing. On Windows, there's no obvious equivalent to the\n // check below because \"is_executable(...)\" always appears to return\n // \"false\" for any directory.\n } else if (!is_executable($parent)) {\n // On Linux, note that we don't need read permission (\"+r\") on parent\n // directories to determine that a path exists, only execute (\"+x\").\n throw new FilesystemException(\n $path,\n pht(\n 'Filesystem path \"%s\" can not be accessed because a parent '.\n 'directory (\"%s\") is not executable (the current process does '.\n 'not have \"+x\" permission).',\n $path,\n $parent));\n }\n }\n\n throw new FilesystemException(\n $path,\n pht(\n 'Filesystem path \"%s\" does not exist.',\n $path));\n }", "protected function _moveToImageDir()\n\t{\n\t\t$path = $this->getFilePath();\n\t\t$this->_uploadedFile->moveTo($path);\n\t\tchmod($path, 0644);\n\t}", "public function moveFile($oldPath, $newPath, $filename)\n {\n // TODO: Implement moveFile() method.\n }", "public function move($from, $to)\n\t{\n\t\trename($from, $this->base_location . \"/\" . $to);\n\t}", "public function testOnDeletedDirectoryWithIllegalArgumentException() {\n\n $obj = new FileSystemStorageProvider($this->logger, $this->directory);\n\n try {\n\n $obj->onDeletedDirectory($this->doc1);\n } catch (Exception $ex) {\n\n $this->assertInstanceOf(IllegalArgumentException::class, $ex);\n $this->assertEquals(\"The document must be a directory\", $ex->getMessage());\n }\n }", "function move($msg_index, $folder='INBOX.Processed') {\n\n // move on server\n\n imap_mail_move($this->conn, $msg_index, $folder);\n\n imap_expunge($this->conn);\n // re-read the inbox\n $this->inbox();\n}", "public function assertIsDirectory($path);", "public function moveTo($targetPath): void\n {\n $this->ensureUploadedFileIsValid();\n\n if (empty($targetPath) || !is_string($targetPath)) {\n throw new InvalidArgumentException('Invalid path provided.');\n }\n\n if ($this->file !== null) {\n if (PHP_SAPI === 'cli') {\n $this->hasMoveTo = rename($this->file, $targetPath);\n } else {\n $this->hasMoveTo = move_uploaded_file($this->file, $targetPath);\n }\n } elseif ($this->stream !== null) {\n if ($this->stream->isSeekable()) {\n $this->stream->rewind();\n }\n\n try {\n $dst = new Stream($targetPath, 'w');\n } catch (Throwable $e) {\n throw new RuntimeException(\"Target path cannot be opened: \" . $e->getMessage(), $e->getCode(), $e);\n }\n\n while (!$this->stream->eof()) {\n if ($dst->write($this->stream->read(1024000)) === 0) {\n throw new RuntimeException(\"Error occurred while writing stream to target.\");\n }\n }\n\n $this->hasMoveTo = true;\n }\n\n if ($this->hasMoveTo === false) {\n throw new RuntimeException('Unable to move uploaded file to ' . $targetPath);\n }\n }", "public function moveUploadedFile($filename, $key);" ]
[ "0.77261436", "0.7507489", "0.7113042", "0.6941977", "0.6908604", "0.67369854", "0.6474342", "0.6204443", "0.6170524", "0.6140496", "0.6086301", "0.6080597", "0.6074179", "0.60411793", "0.5988749", "0.5920087", "0.59006655", "0.58893067", "0.58556426", "0.58260906", "0.5819664", "0.578769", "0.57804203", "0.57619363", "0.574939", "0.57319474", "0.5708597", "0.56621516", "0.565725", "0.56099707", "0.55860454", "0.5584399", "0.55822706", "0.5580288", "0.55784625", "0.55720085", "0.5565581", "0.5561645", "0.55565953", "0.5526652", "0.5513373", "0.5511826", "0.54961574", "0.5490764", "0.5468887", "0.5461961", "0.5456894", "0.545455", "0.54537386", "0.5427242", "0.5425641", "0.53852683", "0.5381955", "0.5346349", "0.53321636", "0.533045", "0.53239566", "0.53137994", "0.5287292", "0.52694285", "0.5247322", "0.5244004", "0.5236897", "0.52365625", "0.5233679", "0.52302235", "0.5227634", "0.52211505", "0.52089095", "0.5195739", "0.51926893", "0.51835275", "0.5172847", "0.5168531", "0.51675326", "0.51485133", "0.5139957", "0.51226074", "0.5121921", "0.50894904", "0.5088841", "0.5083169", "0.507344", "0.5064381", "0.50631815", "0.50594085", "0.5054211", "0.5053126", "0.505038", "0.5046313", "0.5043456", "0.5039755", "0.50097007", "0.50054437", "0.5005274", "0.50016356", "0.49987283", "0.4982849", "0.49820513", "0.49804944" ]
0.798785
0
Test for Directory::remove() Create and remove [ROOT]/test_dir
Тест для Directory::remove() Создать и удалить [ROOT]/test_dir
public function test_remove() { $path = ROOT.DS.'test_dir'; $object = Directory::create($path); $object->remove($path); $this->assertFalse(is_dir($path)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRemoveDirectory()\n {\n $directory = vfsStream::url('foo');\n $method = $this->makeMethodPublic('empty_directory');\n $method->invokeArgs($this->testModel, [$directory, true]);\n\n $this->assertFileNotExists(vfsStream::url('foo'));\n }", "public function testDeleteDirectory()\n {\n mkdir(self::$temp.DS.'foo');\n file_put_contents(self::$temp.DS.'foo'.DS.'file.txt', 'Hello World');\n\n Storage::rmdir(self::$temp.DS.'foo');\n\n $this->assertTrue(! is_dir(self::$temp.DS.'foo'));\n $this->assertTrue(! is_file(self::$temp.DS.'foo'.DS.'file.txt'));\n }", "protected function cleanupTestDirectory() {\n\t\tforeach ($this->filesToRemove as $file) {\n\t\t\tif (file_exists($this->testBasePath . $file)) {\n\t\t\t\tunlink($this->testBasePath . $file);\n\t\t\t}\n\t\t}\n\n\t\tforeach ($this->directoriesToRemove as $directory) {\n\t\t\tif (file_exists($this->testBasePath . $directory)) {\n\t\t\t\trmdir($this->testBasePath . $directory);\n\t\t\t}\n\t\t}\n\t}", "public function testCleanDirectory()\n {\n mkdir(self::$temp.DS.'baz');\n file_put_contents(self::$temp.DS.'baz'.DS.'file.txt', 'Hello World');\n\n Storage::cleandir(self::$temp.DS.'baz');\n\n $this->assertTrue(is_dir(self::$temp.DS.'baz'));\n $this->assertTrue(! is_file(self::$temp.DS.'baz'.DS.'file.txt'));\n }", "public function test_mkdir_and_rmdir() {\n /**\n * Test creating a single directory\n */\n $dir = 'dir1';\n $uri = 'test://'.$dir;\n $path = $this->test_dir.'/'.$dir;\n\n mkdir($uri);\n $this->assertFileExists($path);\n rmdir($uri);\n $this->assertFileNotExists($path);\n\n /**\n * Test creating multiple directories recursively as needed\n */\n $dir = 'dir2/dir3/dir4';\n $uri = 'test://' . $dir;\n $path = $this->test_dir.'/'.$dir;\n\n mkdir($uri, 0777, true);\n\n $error_tripped = false;\n $this->assertFileExists($path);\n try {\n $return = rmdir('test://dir2');\n }\n catch (PHPUnit_Framework_Error $e) {\n $error_tripped = true;\n }\n\n $this->assertTrue($error_tripped, \"rmdir() on a non-empty directory should trigger an error.\");\n $this->assertTrue(wp_rmdir_recursive('test://dir2'));\n $this->assertFileNotExists($this->test_dir.'/dir2');\n }", "public function testDeleteDirectoryReturnFalseWhenNotADirectory()\n {\n mkdir(self::$temp.DS.'bar');\n file_put_contents(self::$temp.DS.'bar'.DS.'file.txt', 'Hello World');\n\n $this->assertFalse(Storage::rmdir(self::$temp.DS.'bar'.DS.'file.txt'));\n }", "public function testDeleteDirectory()\n {\n $this->createTestDirectories(\n array(\n '/artifacts/foo/12345',\n '/artifacts/foo/67890',\n )\n );\n\n $this->createTestFile( '/artifacts/foo/12345/bar.txt' );\n $this->createTestFile( '/artifacts/foo/67890/bar.txt' );\n $this->createTestFile( '/artifacts/foo/bar.txt' );\n $this->createTestFile( '/artifacts/bar.txt' );\n\n phpucFileUtil::deleteDirectory( PHPUC_TEST_DIR . '/artifacts' );\n\n $this->assertFileNotExists( PHPUC_TEST_DIR . '/artifacts' );\n }", "public function test_move_directory_exists()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT, false);\n }", "protected function tearDown()\n {\n $test_dirs = array(\n ROOT.DS.'test_dir',\n ROOT.DS.'test_new_dir',\n SYSTEM.DS.'test_dir',\n );\n foreach($test_dirs as $f){\n is_dir($f) and rmdir($f);\n }\n }", "protected function removeTestFilePath()\n {\n $path = $this->getTestFilePath();\n FileHelper::removeDirectory($path);\n }", "public function testExists() {\n $testDirName = self::TEST_DIR . '/testExists';\n\n $handle = (new Directory($testDirName));\n\n mkdir($testDirName);\n $this->assertTrue($handle->exists());\n\n rmdir($testDirName);\n $this->assertFalse($handle->exists());\n }", "public function testDeleteDirectoryWithLinksAndSymlinks()\n {\n if ( !function_exists( 'link' ) || !function_exists( 'symlink' ) )\n {\n $this->markTestSkipped( 'Missing \"link\" or \"symlink\" function.' );\n return;\n }\n\n $this->createTestDirectories( array( '/logs/foo/12345' ) );\n $this->createTestFile( '/logs/foo/12345/bar.txt' );\n\n $file = PHPUC_TEST_DIR . '/logs/foo/12345/bar.txt';\n\n link( $file, PHPUC_TEST_DIR . '/logs/bar.txt' );\n symlink( $file, PHPUC_TEST_DIR . '/logs/foo/bar.txt' );\n\n phpucFileUtil::deleteDirectory( PHPUC_TEST_DIR . '/logs' );\n\n $this->assertFileNotExists( PHPUC_TEST_DIR . '/logs' );\n }", "public function testDirectoryManagement()\n {\n $limit = 5;\n $filesystem = $this->createFilesystemMock(0, $limit, $limit);\n $instance = $this->createTestInstance($filesystem);\n $this->assertEmpty($instance->getTemporaryDirectories());\n $directories = array();\n for ($i = 0; $i < 5; $i++) {\n $directories[] = $instance->createTemporaryDirectory();\n }\n $this->assertCount($limit, $instance->getTemporaryDirectories());\n $this->assertContains(\n $directories[0],\n $instance->getTemporaryDirectories()\n );\n $instance->removeTemporaryDirectory($directories[0]);\n $this->assertCount($limit - 1, $instance->getTemporaryDirectories());\n $this->assertNotContains(\n $directories[0],\n $instance->getTemporaryDirectories()\n );\n $instance->removeTemporaryDirectories();\n $this->assertCount(0, $instance->getTemporaryDirectories());\n }", "public function remove_dir() {\n\n $path = $this->get_upload_pres_path();\n\n //append_debug_msg($path);\n\n if(!$path || !file_exists($path)){ return; }\n delete_dir($path);\n }", "function remove_dir($path) {\n\t\tif (file_exists($path) && is_dir($path))\n\t\t\trmdir($path);\n\t}", "public function test_move_not_exists_dir()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT.DS.'not_exist');\n }", "protected function tearDown()\n {\n if (file_exists(\"{$this->dir}/file1.mock\")) unlink(\"{$this->dir}/file1.mock\");\n if (file_exists(\"{$this->dir}/file2.mock\")) unlink(\"{$this->dir}/file2.mock\");\n if (file_exists(\"{$this->dir}/dir1/file3.mock\")) unlink(\"{$this->dir}/dir1/file3.mock\");\n if (file_exists(\"{$this->dir}/dir1/file4.mock\")) unlink(\"{$this->dir}/dir1/file4.mock\");\n if (file_exists(\"{$this->dir}/dir1\")) rmdir(\"{$this->dir}/dir1\");\n\n if (file_exists(sys_get_temp_dir().'/def/xyz.mock')) unlink(sys_get_temp_dir().'/def/xyz.mock'); \n if (file_exists(sys_get_temp_dir().'/def')) rmdir(sys_get_temp_dir().'/def'); \n\n if (file_exists($this->dir.\"/abc.mock\")) unlink($this->dir.\"/abc.mock\");\n if (file_exists($this->dir.\"/def.mock\")) unlink($this->dir.\"/def.mock\");\n\n if (file_exists(sys_get_temp_dir().'/abc/def/xy/abc.mock')) unlink(sys_get_temp_dir().'/abc/def/xy/abc.mock'); \n if (file_exists(sys_get_temp_dir().'/abc/def/xy/dd.mock')) unlink(sys_get_temp_dir().'/abc/def/xy/dd.mock'); \n if (file_exists(sys_get_temp_dir().'/abc/def/xy')) rmdir(sys_get_temp_dir().'/abc/def/xy'); \n if (file_exists(sys_get_temp_dir().'/abc/def')) rmdir(sys_get_temp_dir().'/abc/def'); \n if (file_exists(sys_get_temp_dir().'/abc')) rmdir(sys_get_temp_dir().'/abc'); \n \n if (file_exists(\"{$this->dir}/dir2\")) rmdir(\"{$this->dir}/dir2\");\n if (file_exists($this->dir)) rmdir($this->dir);\n \n Config_Mock_Unserialize:$created = array();\n unset(Q\\Transform::$drivers['from-mock']);\n }", "function cleanUpTmpFiles($target){\n if (is_dir($target)) {\n $files = glob($target . '*', GLOB_MARK); //GLOB_MARK adds a slash to directories returned\n\n foreach ($files as $file) {\n cleanUpTmpFiles($file);\n }\n\n // Checks if dir is empty\n if (!(new FilesystemIterator($target))->valid()) {\n rmdir($target);\n }\n } elseif (is_file($target)) {\n unlink($target);\n }\n}", "public function testMoveDirectoryMovesEntireDirectoryAndOverwrites()\n {\n mkdir(self::$temp.DS.'tmp4', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp4'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp4'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'nested'.DS.'baz.txt', '');\n\n mkdir(self::$temp.DS.'tmp5', 0777, true);\n file_put_contents(self::$temp.DS.'tmp5'.DS.'foo2.txt', '');\n file_put_contents(self::$temp.DS.'tmp5'.DS.'bar2.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp4', self::$temp.DS.'tmp5', true);\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'foo2.txt'));\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'bar2.txt'));\n $this->assertFalse(is_dir(self::$temp.DS.'tmp4'));\n }", "public function testDirectoryFunctions()\n {\n $dir = 'pear-service-amazon-s3://' . $this->bucketName . '/dir';\n $this->assertFalse(file_exists($dir));\n $this->assertTrue(mkdir($dir));\n $this->assertTrue(is_dir($dir));\n $this->assertTrue(is_readable($dir));\n $this->assertTrue(is_writable($dir));\n $this->assertFalse(is_file($dir));\n $this->assertTrue(rmdir($dir));\n clearstatcache();\n $this->assertFalse(file_exists($dir));\n }", "public function testRemoveDummyTestFileAfterDoneTest()\n {\n unlink(TESTING_STORE);\n\n // boolean result must be === false\n $this->assertFalse(file_exists(TESTING_STORE));\n }", "public function tearDown(): void\n {\n if (is_dir($this->tmpPath)) {\n if (file_exists($this->oldFile)) {\n unlink($this->oldFile);\n }\n if (file_exists($this->origFile)) {\n unlink($this->origFile);\n }\n if (file_exists($this->newFile)) {\n unlink($this->newFile);\n }\n if (is_dir($this->newDir)) {\n if (file_exists($this->newDirFile)) {\n unlink($this->newDirFile);\n }\n rmdir($this->newDir);\n }\n rmdir($this->tmpPath);\n }\n }", "public function tearDown() {\n\t\tif(is_dir('/tmp/clara')) {\n\t\t\t$this->rrmdir('/tmp/clara');\n\t\t}\n\t}", "public function testOnDeletedDirectory() {\n\n $obj = new FileSystemStorageProvider($this->logger, $this->directory);\n\n $this->dir3->setParent($this->dir1); // This directory was moved.\n\n $obj->onDeletedDirectory($this->dir3);\n $this->assertFileNotExists($this->directory . \"/1/3\");\n\n $obj->onDeletedDirectory($this->dir2);\n $this->assertFileNotExists($this->directory . \"/1/2\");\n\n $obj->onDeletedDirectory($this->dir1);\n $this->assertFileNotExists($this->directory . \"/1\");\n }", "public function testCreateSubDirsWithExistingDirectory()\n {\n mkdir($this->dir.'56');\n $this->assertNotEmpty($this->hd->getHash());\n }", "public function testMoveDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp2', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp2'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp2'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp2', self::$temp.DS.'tmp3');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_dir(self::$temp.DS.'tmp2'));\n }", "abstract function delete_dir($filepath);", "function remove_client_dir(){\n\t\t$cmd=\"rm -rf $this->client_dir\";\n\t\t`$cmd`;\n\t}", "protected function tearDown()\n {\n \\RPI\\Foundation\\Helpers\\FileUtils::delTree(__DIR__.\"/LESSPHPTest/ROOT\");\n }", "public static function removeTempDir()\n {\n $tmpDir = self::getTempDir();\n\n array_map('unlink', glob(\"$tmpDir/*.*\"));\n array_map('unlink', glob(\"$tmpDir/*/*.*\"));\n array_map('unlink', glob(\"$tmpDir/*/*/*.*\"));\n array_map('unlink', glob(\"$tmpDir/*/*/*/*.*\"));\n array_map('unlink', glob(\"$tmpDir/*/*/*/*/*.*\"));\n array_map('rmdir', glob(\"$tmpDir/*/*/*/*\", GLOB_ONLYDIR));\n array_map('rmdir', glob(\"$tmpDir/*/*/*\", GLOB_ONLYDIR));\n array_map('rmdir', glob(\"$tmpDir/*/*\", GLOB_ONLYDIR));\n array_map('rmdir', glob(\"$tmpDir/*\", GLOB_ONLYDIR));\n is_dir($tmpDir) and rmdir($tmpDir);\n }", "private function cleanTmp()\n {\n // cleanup files in tmp\n $dir = ELAB_ROOT . '/uploads/tmp';\n $di = new \\RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS);\n $ri = new \\RecursiveIteratorIterator($di, \\RecursiveIteratorIterator::CHILD_FIRST);\n foreach ($ri as $file) {\n $file->isDir() ? rmdir($file) : unlink($file);\n }\n }", "public function testEnsureExists() {\n $testDirName = self::TEST_DIR . '/testEnsureExists';\n\n (new Directory($testDirName))->ensureExists();\n\n $this->assertDirectoryExists($testDirName);\n }", "function eraseTempDir() {\n FileSystem::removeDirectory($this->getTestDir(), true);\n $this->testDir = null;\n }", "public function tearDown()\n {\n if (file_exists($this->__testFilePath)) {\n unlink($this->__testFilePath);\n }\n if (is_dir($this->__testFileDir)) {\n rmdir($this->__testFileDir);\n }\n }", "protected function createRealTestdir() {}", "function rrmdir($path)\n{\n exec(\"rm -rf {$path}\");\n}", "public function test_remove_files() \n {\n $mockedModel = $this->getMock('TestModel', ['path', 'get_offset', 'empty_directory']);\n $mockedModel->expects($this->once())\n ->method('path')\n ->will($this->returnValue('foo/bar'));\n\n $mockedModel->expects($this->once())\n ->method('get_offset')\n ->will($this->returnValue(3));\n\n $mockedModel->expects($this->once())\n ->method('empty_directory')\n ->with('foo', true);\n\n $this->testModel->remove_files($mockedModel);\n }", "public function testDeleteFolder()\n {\n $remoteFolder = \"TestData/In\";\n\n $localName = \"Book1.xlsx\";\n $remoteName = \"Book1.xlsx\";\n\n CellsApiTestBase::ready( $this->instance,$localName ,$remoteFolder . \"/\" . $remoteName , \"\");\n \n $request = new DeleteFolderRequest();\n $request->setPath( \"OutResult/Create\");\n $request->setStorageName( \"\");\n $request->setRecursive( 'true');\n $this->instance->deleteFolder($request);\n }", "function clear_local($dir){\n \n$di = new RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS);\n$ri = new RecursiveIteratorIterator($di, RecursiveIteratorIterator::CHILD_FIRST);\nforeach ( $ri as $file ) {\n $file->isDir() ? rmdir($file) : unlink($file);\n}\n\n\n\n}", "protected function tearDown()\r\n {\r\n DirectoryManager::recursiveRemoveDir('data/tests');\r\n }", "function tearDown() {\n\t\t$this->wfRecursiveRemoveDir( $this->tmpName );\n\t}", "function wpdev_rm_dir($dir) {\r\n\r\n if (DIRECTORY_SEPARATOR == '/')\r\n $dir=str_replace('\\\\','/',$dir);\r\n else\r\n $dir=str_replace('/','\\\\',$dir);\r\n\r\n $files = glob( $dir . '*', GLOB_MARK );\r\n debuge($files);\r\n foreach( $files as $file ){\r\n if( is_dir( $file ) )\r\n $this->wpdev_rm_dir( $file );\r\n else\r\n unlink( $file );\r\n }\r\n rmdir( $dir );\r\n }", "public function delete_with_dir() {\n if(!empty($this->username && $this->id)) {\n if($this->delete()) {\n $target = SITE_PATH . DS . 'admin' . DS . $this->image_path . DS . $this->username;\n if(is_dir($target)){\n $this->delete_files_in_dir($target);\n return rmdir($target) ? true : false;\n echo \"yes\";\n }\n }else{\n return true;\n }\n }else{\n return false;\n }\n }", "function delete_user_dir($userId) {\n\t$userDir=get_user_dir($userId);\t\n\tif($userDir) {\t\t\n\t\t//File destination\n\t\t$userPath=FS_PATH.$userDir;\"some/dir/*.txt\";\n\t\tarray_map('unlink', glob(FS_PATH.$userDir.\"/*.*\"));\n\t\tif(rmdir($userPath)) { \n\t\t\treturn true;\n\t\t} else return false;\t\t\n\t} else {\n\t\terror_log(\"delete_user_dir: user_dir could not be found.\",0);\n\t\treturn false;\n\t}\n}", "public function cleanUpFolder()\r\n {\r\n $fs = new Filesystem();\r\n\r\n foreach($this->file_list as $file) :\r\n if ( preg_match('#^'.$this->destination_dir.'/#', $file))\r\n $fs->remove($file);\r\n endforeach;\r\n }", "function fud_rmdir($dir, $deleteRootToo=false)\n{\n\tif(!$dh = @opendir($dir)) {\n\t\treturn;\n\t}\n\twhile (false !== ($obj = readdir($dh))) {\n\t\tif($obj == '.' || $obj == '..') {\n\t\t\tcontinue;\n\t\t}\n\t\tif (!@unlink($dir .'/'. $obj)) {\n\t\t\tfud_rmdir($dir .'/'. $obj, true);\n\t\t}\n\t}\n\tclosedir($dh);\n\tif ($deleteRootToo) {\n\t\t@rmdir($dir);\n\t}\n\treturn;\n}", "public function testMakeDirectory()\n {\n $this->assertTrue(Storage::mkdir(self::$temp.DS.'created'));\n $this->assertTrue(is_dir(self::$temp.DS.'created'));\n }", "function delete_dir_with_file($target)\n{\n if (is_dir($target)) {\n $files = glob($target . '*', GLOB_MARK); //GLOB_MARK adds a slash to directories returned\n\n foreach ($files as $file) {\n delete_dir_with_file($file);\n }\n\n if (file_exists($target)) {\n rmdir($target);\n }\n } elseif (is_file($target)) {\n unlink($target);\n }\n}", "function cleanTemporaryDirectory($tmpTopdir, $tmpdir, $tmpfile)\n{\n global $tmpCreated;\n $deletedir = NULL;\n\n /* if this script created tmp directory, delete tmp directory */\n if ($tmpCreated) {\n $deleteDir = $tmpTopdir;\n } else {\n $deleteDir = $tmpdir;\n unlink($tmpfile);\n }\n\n deleteDirectory($deleteDir);\n}", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "function rrmdir($path) {\n // Open the source directory to read in files\n $i = new DirectoryIterator($path);\n foreach($i as $f) {\n if($f->isFile()) {\n unlink($f->getRealPath());\n } else if(!$f->isDot() && $f->isDir()) {\n rrmdir($f->getRealPath());\n }\n }\n rmdir($path);\n}", "public function test_move()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(SYSTEM);\n $this->assertTrue(is_dir(SYSTEM.DS.'test_dir'));\n $this->assertFalse(is_dir(ROOT.DS.'test_dir'));\n $this->assertEquals($object->get_path(), SYSTEM.DS.'test_dir');\n }", "public function testDeleteFile()\n {\n\n }", "public function delete()\n {\n $filesystem = $this->localFilesystem(dirname($this->path));\n\n method_exists($filesystem, 'deleteDir')\n ? $filesystem->deleteDir(basename($this->path))\n : $filesystem->deleteDirectory(basename($this->path));\n }", "protected function tearDown()\n {\n exec('rm -rf '.$this->testDir);\n chdir(__DIR__);\n }", "protected function tearDown()\n {\n exec('rm -rf '.$this->testDir);\n chdir(__DIR__);\n }", "public function testEmptyDirectory()\n {\n $directory = vfsStream::url('foo');\n $method = $this->makeMethodPublic('empty_directory');\n $method->invokeArgs($this->testModel, [$directory]);\n \n $this->assertFalse($this->mockFileUploadDir->hasChild('bar'));\n $this->assertFileExists(vfsStream::url('foo'));\n }", "function deleteFolder();", "public static function cleanUp()\n {\n foreach (glob(static::getYamlRoot() . '*') as $file) {\n is_file($file) and unlink($file);\n }\n foreach (glob('{' . static::getEntitiesRoot() . '*,' . static::getProxiesRoot() . '*' . '}', GLOB_BRACE) as $file) {\n is_file($file) and unlink($file);\n is_dir(basename($file)) and rmdir(basename($file));\n is_dir($file) and rmdir($file);\n }\n !is_dir(static::getYamlRoot()) and mkdir(static::getYamlRoot(), 0777, true);\n !is_dir(static::getEntitiesRoot()) and mkdir(static::getEntitiesRoot(), 0777, true);\n !is_dir(static::getProxiesRoot()) and mkdir(static::getProxiesRoot(), 0777, true);\n }", "public function test_rename()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->rename('test_new_dir');\n $this->assertEquals($object->get_base_name(), 'test_new_dir');\n }", "protected function tearDown()\n {\n unlink(__DIR__.'/foo.graphql');\n unlink(__DIR__.'/schema/bar.graphql');\n unlink(__DIR__.'/schema/baz.graphql');\n\n if (is_dir(__DIR__.'/schema')) {\n rmdir(__DIR__.'/schema');\n }\n }", "function ftp_rm_dir($rmt_dir, $isRecursive=false, $useWhiteList=true) {\n\t\t$rmt_dir = rtrim($rmt_dir, '/');\n\t\tprv_ftp_rm_dir($rmt_dir, $isRecursive, $useWhiteList);\n\t}", "protected function cleanDirectories()\n {\n $filesystem = new Filesystem();\n\n $filesystem->cleanDirectory($this->getSeedFilePath());\n\n $filesystem->cleanDirectory(database_path('factories'));\n }", "function remove_directory($src)\n{\n $dir = opendir($src);\n while(false !== ( $file = readdir($dir)) )\n\t{\n if (( $file != '.' ) && ( $file != '..' ))\n\t\t{\n $full = $src . '/' . $file;\n\t\t\t\n if ( is_dir($full) )\n\t\t\t{\n remove_directory($full);\n }\n else\n\t\t\t{\n unlink($full);\n }\n }\n }\n closedir($dir);\n rmdir($src);\n}", "public function clean()\n {\n if ( is_dir( $this->_strDirectory ) ) {\n $h = opendir($this->_strDirectory);\n while ($h && $f = readdir($h)) { \n if ( $f != '.' && $f != '..') {\n $fn = $this->_strDirectory . '/' . $f;\n if ( is_dir($fn) ) {\n $dir = new Sys_Dir($fn);\n $dir->delete();\n } else {\n $file = new Sys_File( $fn );\n $file->delete();\n }\n }\n }\n\t if ( $h ) { closedir( $h ); }\n \n }\n }", "public function on_delete() {\n $this->remove_dir();\n }", "function delete_directory($dirname) {\n if (is_dir($dirname))\n $dir_handle = opendir($dirname);\nif (!$dir_handle)\n return false;\nwhile($myfile = readdir($dir_handle)) {\n if ($myfile != \".\" && $myfile != \"..\") {\n if (!is_dir($dirname.\"/\".$myfile))\n unlink($dirname.\"/\".$myfile);\n else\n delete_directory($dirname.'/'.$myfile);\n }\n}\nclosedir($dir_handle);\nrmdir($dirname);\nreturn true;\n}", "public function _after(UnitTester $I)\n {\n if (file_exists($this->fileWithDir)) {\n unlink($this->fileWithDir);\n }\n }", "function eliminarDirectorio($directorio){\n foreach(glob($directorio . \"/*\") as $archivos_carpeta){\n if (is_dir($archivos_carpeta)){\n eliminarDirectorio($archivos_carpeta);\n }\n else{\n unlink($archivos_carpeta);\n }\n }\n rmdir($directorio);\n}", "function remove_dir_rec($dirtodelete)\n{\n if ( strpos($dirtodelete,\"../\") !== false )\n die(_NONPUOI);\n if ( false !== ($objs = glob($dirtodelete . \"/*\")) )\n {\n foreach ( $objs as $obj )\n {\n is_dir($obj) ? remove_dir_rec($obj) : unlink($obj);\n }\n }\n rmdir($dirtodelete);\n}", "public function removeAction() {\n $result = array('status' => 'failed');\n if ($this->getRequest()->isPost() && $this->getRequest()->getPost('remove') == 'true') {\n $dirName = Mage::getBaseDir('code').'/local/Balticode/Postoffice';\n if (is_dir($dirName) && file_exists($dirName.'/etc/config.xml')) {\n $directory = new Varien_Io_File();\n $deleteResult = $directory->rmdir($dirName, true);\n if ($deleteResult) {\n $result['status'] = 'success';\n }\n }\n \n }\n $this->getResponse()->setRawHeader('Content-type: application/json');\n $this->getResponse()->setBody(json_encode($result));\n return;\n }", "function deletedirectory($path)\n{\n $files = glob($path . '*', GLOB_MARK);\n foreach ($files as $file)\n {\n unlink($file);\n }\n rmdir($path);\n}", "function cleanDir($path) {\n if(file_exists($path) && is_dir($path)){\n\t\t$dirHandle = opendir($path);\n\t\twhile(false!==($file = readdir($dirHandle))){\n\t\t\tif($file!='.' && $file!='..' && $file!='db_upload.php'){\n\t\t\t\t$tmpPath = $path.'/'.$file;\n\t\t\t\tchmod($tmpPath, 0777);\n\t\t\t\tif(is_dir($tmpPath)){\n\t\t\t\t\tcleanDir($tmpPath);\n\t\t\t\t} else {\n\t\t\t\t\tif(!unlink($tmpPath)){\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tclosedir($dirHandle);\n \n\t} else {\n\t\treturn false;\n\t}\n}", "public function testGetRoot() {\n\t\t$max_size = 32;\n\t\t$ttl = 60;\n\n\t\t$cache_dir = Utils\\get_temp_dir() . uniqid( 'wp-cli-test-file-cache', true );\n\n\t\t$cache = new FileCache( $cache_dir, $ttl, $max_size );\n\t\t$this->assertSame( $cache_dir . '/', $cache->get_root() );\n\t\tunset( $cache );\n\n\t\t$cache = new FileCache( $cache_dir . '/', $ttl, $max_size );\n\t\t$this->assertSame( $cache_dir . '/', $cache->get_root() );\n\t\tunset( $cache );\n\n\t\t$cache = new FileCache( $cache_dir . '\\\\', $ttl, $max_size );\n\t\t$this->assertSame( $cache_dir . '/', $cache->get_root() );\n\t\tunset( $cache );\n\n\t\trmdir( $cache_dir );\n\t}", "public function tearDown(): void\n {\n File::deleteDirectory($this->rootDir, true);\n\n parent::tearDown();\n }", "public function testCopyDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::cpdir(self::$temp.DS.'tmp', self::$temp.DS.'tmp2');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt'));\n }", "public function test_rename_same_name()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->rename('test_dir');\n $this->assertEquals($object->get_base_name(), 'test_dir');\n }", "function delete_tmp_folder_content()\n{\n\t$baseDir = '../backups/tmp/';\n\t$files = scandir($baseDir);\n\tforeach ($files as $file) \n\t{\n\t\tif ( ($file != '.') && ($file != '..') && ($file != '.htaccess') ) \n\t\t{\n\t\t\tif ( is_dir($baseDir . $file) ) recursive_deletion($baseDir.$file.'/');\n\t\t\telse unlink('../backups/tmp/' . $file);\n\t\t}\n\t}\n}", "function recursive_deletion($baseDir)\n{\n\t$files = scandir($baseDir);\n\tforeach ($files as $file) \n\t{\n\t\tif ( ($file != '.') && ($file != '..') ) \n\t\t{\n\t\t\tif ( is_dir($baseDir . $file) ) recursive_deletion($baseDir.$file.'/');\n\t\t\telse unlink($baseDir . $file);\n\t\t}\n\t}\n\trmdir($baseDir);\n}", "protected function cleanup()\n {\n $cleanupDirNames = ['Repository', 'Voter', 'Entity', 'Form', '../templates'];\n foreach ($cleanupDirNames as $cleanupDirName) {\n if (is_dir($dir = __DIR__ . '/App/src/' . $cleanupDirName)) {\n $this->rrmdir($dir);\n }\n }\n // Entity-dir must exist or locators for entity will fail (doctrine functionality; cannot be changed)\n mkdir(__DIR__.'/App/src/Entity');\n }", "function delete_files($target) { \n if(is_dir($target)){\n $files = glob( $target . '*', GLOB_MARK ); //GLOB_MARK adds a slash to directories returned\n \n foreach( $files as $file )\n {\n delete_files( $file ); \n }\n \n rmdir( $target );\n } elseif(is_file($target)) {\n unlink( $target ); \n }\n}", "public function testMkdir() {\n $testDirName = self::TEST_DIR . '/testMkdir';\n\n (new Directory($testDirName))->mkdir();\n\n $this->assertDirectoryExists($testDirName);\n }", "public function test_create_exists()\n {\n Directory::create(ROOT.DS.'application');\n }", "function delTree($dir) { \n\t $files = array_diff(scandir($dir), array('.','..')); \n\t foreach ($files as $file) { \n\t (is_dir(\"$dir/$file\")) ? delTree(\"$dir/$file\") : unlink(\"$dir/$file\"); \n\t } \n\t return rmdir($dir); \n\t}", "function delete_files($target) {\n if(is_dir($target)){\n $files = glob( $target . '*', GLOB_MARK ); //GLOB_MARK adds a slash to directories returned\n\n foreach( $files as $file ){\n delete_files( $file ); \n }\n\n rmdir( $target );\n } elseif(is_file($target)) {\n unlink( $target ); \n }\n}", "function delete() {\n global $USER;\n if($this->Dir !== 0 && $this->mayI(DELETE)) {\n $this->loadStructure();\n foreach($this->files as $file) {\n $file->delete();\n }\n foreach($this->folders as $folder) {\n $folder->delete();\n }\n rmdir($this->path);\n parent::delete();\n }\n }", "private function deleteOldTempdirs(){\n $dirname = FRONTEND_ABSDIRPATH.ARTICLEIMAGESPATH;\n $dircontents = scandir($dirname);\n foreach($dircontents as $file){\n if ( substr($file, 0,5) == 'temp_' &&\n is_dir($dirname.$file) &&\n filemtime( $dirname.$file ) < strtotime('now -2 days')) {\n $this->destroyDir($dirname.$file);\n }\n }\n }", "public function testUnlinkFile777(): void\n {\n $dirName = 'unlink';\n $basePath = $this->testFilePath . '/' . $dirName . '/';\n $filePath = $basePath . 'file.txt';\n\n $this->createFileStructure([\n $dirName => [\n 'file.txt' => 'test',\n ],\n ]);\n chmod($filePath, 777);\n\n FileHelper::unlink($filePath);\n\n $this->assertFileDoesNotExist($filePath);\n }", "function rrmdir($dir) {\nif (is_dir($dir)) {\n $objects = scandir($dir);\n foreach ($objects as $object) {\n if ($object != \".\" && $object != \"..\") {\n if (filetype($dir.\"/\".$object) == \"dir\") rrmdir($dir.\"/\".$object); else unlink($dir.\"/\".$object);\n }\n }\n reset($objects);\n rmdir($dir);\n}\n}", "public static function tearDownAfterClass()\n {\n $fileSystemHelper = new FileSystemHelper(__DIR__ . '/cache');\n\n if (is_dir(__DIR__ . '/cache/builder') === true) {\n $fileSystemHelper->deleteFolderRecursively(__DIR__ . '/cache/builder');\n }\n }", "public function testDeleteRemovesStorages()\n {\n file_put_contents(self::$temp.DS.'file1.txt', 'Hello World');\n\n Storage::delete(self::$temp.DS.'file1.txt');\n $this->assertTrue(! is_file(self::$temp.DS.'file1.txt'));\n }", "function emptyDir($dir)\n{\n foreach (scandir($dir) as $basename) {\n $path = $dir . '/' . $basename;\n\n if (is_file($path)) {\n unlink($path);\n }\n }\n}", "function fn_rm($source, $delete_root = true, $pattern = '')\n{\n // Simple copy for a file\n if (is_file($source)) {\n $res = true;\n if (empty($pattern) || (!empty($pattern) && preg_match('/' . $pattern . '/', fn_basename($source)))) {\n $res = @unlink($source);\n }\n\n return $res;\n }\n\n // Loop through the folder\n if (is_dir($source) && $dir = dir($source)) {\n while (false !== $entry = $dir->read()) {\n // Skip pointers\n if ($entry == '.' || $entry == '..') {\n continue;\n }\n if (fn_rm($source . '/' . $entry, true, $pattern) == false) {\n return false;\n }\n }\n // Clean up\n $dir->close();\n\n return ($delete_root == true && empty($pattern)) ? @rmdir($source) : true;\n } else {\n return false;\n }\n}", "function clearDirUpload($dossier) {\r\n\t\t$ouverture=@opendir($dossier);\r\n\t\tif (!$ouverture) return false;\r\n\t\twhile($fichier=readdir($ouverture)) {\r\n\t\t\tif ($fichier == '.' || $fichier == '..' || $fichier == \".htaccess\") continue;\r\n\t\t\t\tif (is_dir($dossier.\"/\".$fichier)) {\r\n\t\t\t\t\t$r=clearDirUpload($dossier.\"/\".$fichier);\r\n\t\t\t\t\tif (!$r) return false;\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\t$r=@unlink($dossier.\"/\".$fichier);\r\n\t\t\t\t\tif (!$r) return false;\r\n\t\t\t\t}\r\n\t\t}\r\n\t\tclosedir($ouverture);\r\n\t\t$r=@rmdir($dossier);\r\n\t\tif (!$r) return false;\r\n\t\treturn true;\r\n\t}", "public function test_factory_not_exist()\n {\n Directory::factory(ROOT.DS.'test_dir');\n }", "function delete_folder($main_folder)\r\n{\r\n \r\n\t$dir = $main_folder;\r\n \tchmod($dir, 0755);\r\n \t$di = new RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS);\r\n \t$ri = new RecursiveIteratorIterator($di, RecursiveIteratorIterator::CHILD_FIRST);\r\n \tforeach ( $ri as $file ) \r\n \t{\r\n \t $file->isDir() ? rmdir($file) : unlink($file);\r\n \t}\r\n \trmdir($dir);\r\n\r\n}", "function clean_temp_dir($dir='') {\n // that a mess may be piling up in $CFG->dataroot/temp/webworkquiz_import\n return true;\n \n if ($dir == '') {\n $dir = $this->temp_dir; \n }\n $slash = \"/\";\n\n // Create arrays to store files and directories\n $dir_files = array();\n $dir_subdirs = array();\n\n // Make sure we can delete it\n chmod($dir, 0777);\n\n if ((($handle = opendir($dir))) == FALSE) {\n // The directory could not be opened\n return false;\n }\n\n // Loop through all directory entries, and construct two temporary arrays containing files and sub directories\n while($entry = readdir($handle)) {\n if (is_dir($dir. $slash .$entry) && $entry != \"..\" && $entry != \".\") {\n $dir_subdirs[] = $dir. $slash .$entry;\n }\n else if ($entry != \"..\" && $entry != \".\") {\n $dir_files[] = $dir. $slash .$entry;\n }\n }\n\n // Delete all files in the curent directory return false and halt if a file cannot be removed\n for($i=0; $i<count($dir_files); $i++) {\n chmod($dir_files[$i], 0777);\n if (((unlink($dir_files[$i]))) == FALSE) {\n return false;\n }\n }\n\n // Empty sub directories and then remove the directory\n for($i=0; $i<count($dir_subdirs); $i++) {\n chmod($dir_subdirs[$i], 0777);\n if ($this->clean_temp_dir($dir_subdirs[$i]) == FALSE) {\n return false;\n }\n else {\n if (rmdir($dir_subdirs[$i]) == FALSE) {\n return false;\n }\n }\n }\n\n // Close directory\n closedir($handle);\n if (rmdir($this->temp_dir) == FALSE) {\n return false; \n }\n // Success, every thing is gone return true\n return true;\n }", "function gttn_tpps_rmdir($dir) {\n if (is_dir($dir)) {\n $children = scandir($dir);\n foreach ($children as $child) {\n if ($child != '.' and $child != '..') {\n if (is_dir($dir . '/' . $child) and !is_link($dir . '/' . $child)) {\n gttn_tpps_rmdir($dir . '/' . $child);\n }\n else {\n unlink($dir . '/' . $child);\n }\n }\n }\n rmdir($dir);\n }\n}", "function _removeDir($dir) {\r\n\t\tif(file_exists($dir)) {\r\n\t\t\tif($objs = glob($dir.\"/*\"))\r\n\t\t\t\tforeach($objs as $obj) {\r\n\t\t\t\t\tis_dir($obj) ? rmdir($obj) : unlink($obj);\r\n\t\t\t\t}\r\n\t\t\trmdir($dir);\r\n\t\t}\r\n\t}", "public function testDelete()\n {\n $sampleIndexDir = dirname(__FILE__) . '/_indexSample/_files';\n $tempIndexDir = dirname(__FILE__) . '/_files';\n if (!is_dir($tempIndexDir)) {\n mkdir($tempIndexDir);\n }\n\n $this->_clearDirectory($tempIndexDir);\n\n $indexDir = opendir($sampleIndexDir);\n while (($file = readdir($indexDir)) !== false) {\n if (!is_dir($sampleIndexDir . '/' . $file)) {\n copy($sampleIndexDir . '/' . $file, $tempIndexDir . '/' . $file);\n }\n }\n closedir($indexDir);\n\n\n $index = Zend_Search_Lucene::open($tempIndexDir);\n\n $this->assertFalse($index->isDeleted(2));\n $index->delete(2);\n $this->assertTrue($index->isDeleted(2));\n\n $index->commit();\n\n unset($index);\n\n $index1 = Zend_Search_Lucene::open($tempIndexDir);\n $this->assertTrue($index1->isDeleted(2));\n unset($index1);\n\n $this->_clearDirectory($tempIndexDir);\n }" ]
[ "0.7788672", "0.76651603", "0.7491406", "0.73429984", "0.73013794", "0.71828717", "0.715201", "0.6991792", "0.69013095", "0.6786815", "0.6779039", "0.6778822", "0.66575205", "0.66531", "0.65665174", "0.65494186", "0.6527012", "0.6483709", "0.6471884", "0.6419089", "0.6408338", "0.64025337", "0.6372909", "0.6368823", "0.63438916", "0.6334712", "0.63229966", "0.6289897", "0.6289009", "0.62825686", "0.6254813", "0.62541395", "0.6234262", "0.6226908", "0.6215088", "0.6209409", "0.61897206", "0.61865014", "0.61829394", "0.61633724", "0.6158894", "0.61496305", "0.6148944", "0.614789", "0.6144912", "0.6138055", "0.6129777", "0.61272043", "0.61152136", "0.6098247", "0.60969424", "0.60906756", "0.6084482", "0.60837156", "0.60818994", "0.60818994", "0.60396653", "0.60379845", "0.60353434", "0.6035312", "0.60211915", "0.6018004", "0.6004106", "0.6000951", "0.5995073", "0.59743226", "0.59593284", "0.59584755", "0.5948605", "0.59391654", "0.5929531", "0.59225684", "0.5913362", "0.58968085", "0.5894447", "0.58910775", "0.58817333", "0.5881146", "0.5878702", "0.5874233", "0.58707803", "0.5870314", "0.58666116", "0.58654463", "0.58654225", "0.58628565", "0.5860351", "0.58599573", "0.5857342", "0.58460844", "0.5838327", "0.5826785", "0.5825533", "0.58246964", "0.58237284", "0.58227843", "0.5822548", "0.5817999", "0.58167154", "0.58136153" ]
0.8669114
0
Test for Directory::scan() Scan the content of ROOT directory
Тест для Directory::scan() Сканирование содержимого директории ROOT
public function test_scan() { $content = array('.','..','application','.git','.gitignore','.htaccess','index.php','nbproject','README','system'); $object = Directory::factory(ROOT); $res = $object->scan(Directory::SORT_ASC); $output = array(); foreach($res as $f) $output[] = $f->get_base_name(); $this->assertEquals($content, $output); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_scan_directories()\n {\n $content = array('.','..','application','.git','nbproject','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_DIRS);\n \n $this->assertEquals(count($content), count($res));\n foreach($res as $path=>$dir){\n $this->assertTrue(in_array($dir->get_base_name(), $content));\n $this->assertInstanceOf('\\Kaili\\Directory', $dir);\n }\n }", "public function test_scan_files()\n {\n $content = array('.gitignore','.htaccess','index.php','README');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_FILES);\n \n $this->assertEquals(count($content), count($res));\n foreach($res as $path=>$dir){\n $this->assertTrue(in_array($dir->get_base_name(), $content));\n $this->assertInstanceOf('\\Kaili\\File', $dir);\n }\n }", "private function scanFolder()\n {\n return scandir($this->currentPath);\n }", "function rScanDir($scanMe) {\r\n\t\tglobal $path, $tmpPath, $cur_folder, $tags2;\r\n\t\tforeach($scanMe as $folder)\r\n\t\t{\r\n\t\t\tif(is_dir($path.$tmpPath.$folder) && $folder !=\".\" && $folder !=\"..\")\r\n\t\t\t{\r\n\t\t\t\t$cur_folder[] = $tmpPath.$folder;\r\n\t\t\t\techo \"getTagString input:\".$tmpPath.$folder.\"<br/>\";\r\n\t\t\t\t$tags2[] = getTagString($tmpPath.$folder);\r\n\t\t\t\t$tmpPath .= $folder.\"/\";\r\n\t\t\t\trScanDir(scandir($path.$tmpPath));\r\n\t\t\t}\r\n\t\t}\r\n\t\t$tmpPath = substr($tmpPath, 0, strrpos($tmpPath, \"/\"));\r\n\t\t$tmpPath = substr($tmpPath, 0, strrpos($tmpPath, \"/\")+1);\r\n\t}", "private function __scanDir($dir) {\n\n if ($dir == '/') {\n $dir = $this->startDirectory;\n $this->__currentDirectory = $dir;\n }\n\n $strippedDir = str_replace('/', '', $dir);\n\n $dir = ltrim($dir, \"/\");\n\n // Prevent listing blacklisted directories\n if (in_array($strippedDir, $this->ignoredDirectories)) {\n return false;\n }\n\n if (! file_exists($dir) || !is_dir($dir)) {\n return false;\n }\n\n return scandir($dir);\n }", "protected function scanDir()\n {\n $this->moduleList = [];\n foreach ($this->getVendorList() as $vendorName) {\n $this->moduleList[$vendorName] = [];\n }\n\n $this->readModules();\n }", "function DNUI_scan_dir($dirBase) {\r\n return array_diff(scandir($dirBase), array('..', '.'));\r\n}", "private function scan_directory($dir, $scan = \"\", &$nb_files = 0, &$nb_errors = 0){\n\t\t//Si c est la ou on etait , alors on reprend\n\t\tif ($dir == $scan or $scan == \"\"){\n\t\t\t$scan = \"\";\n\t\t\tDB::delete(\"delete from movies where directory = ?\",array($dir));\n\t\t\t$files = scandir($dir);\n\t\t\tforeach ($files as $file){\n\t\t\t\tif ($file != \"..\" and $file != \".\"){\n\t\t\t\t\tif (is_dir($dir.\"/\".$file)){\n\t\t\t\t\t\t$this->scan_directory($dir.\"/\".$file, $scan, $nb_files, $nb_errors);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tforeach (config(\"app.MOVIES_FILES\") as $ext){\n\t\t\t\t\t\t\tif (stripos($file,\".\".$ext) !== false){\n\t\t\t\t\t\t\t\t//Analyse du fichier\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$movie = new Movie();\n\t\t\t\t\t\t\t\t//On rajoute le fichier en base\t\t\t\t\t\n\t\t\t\t\t\t\t\t$movie->directory = $dir;\n\t\t\t\t\t\t\t\t$movie->filename = $file;\n\t\t\t\t\t\t\t\t$movie->status = -1;\n\t\t\t\t\t\t\t\t$movie->save();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t$movie->name = $this->remove($file);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$movie->status = 1;\n\t\t\t\t\t\t\t\t\t$movie->save();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$nb_files++;\n\t\t\t\t\t\t\t\t}catch(\\Exception $e){\n\t\t\t\t\t\t\t\t\t//Next...\n\t\t\t\t\t\t\t\t\t$nb_errors++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$json = [];\n\t\t\t$json[\"updated\"] = date(\"Y-m-d H:i:s\");\n\t\t\t$json[\"nb_files\"] = $nb_files;\n\t\t\t$json[\"nb_errors\"] = $nb_errors;\n\t\t\t$json[\"scan\"] = $scan;\n\t\t\tfile_put_contents(storage_path().\"/scan_movies.txt\",json_encode($json));\n\t\t}else{\n\t\t\t//Sinon, on reparcourt a partir de l'endroit, ou on etait\n\t\t\t$files = scandir($dir);\n\t\t\tforeach ($files as $file){\n\t\t\t\tif ($file != \"..\" and $file != \".\"){\n\t\t\t\t\tif (is_dir($dir.\"/\".$file)){\n\t\t\t\t\t\t$this->scan_directory($dir.\"/\".$file, $scan, $nb_files, $nb_errors);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private function directoryScan($dir) {\n\t\t\n\t\t// check for the validity of input / working directory\n\t\t\n\t\tif (!is_dir($dir)) {\n\t\t\tdie(\"'$dir' is not a directory.\".LE);\n\t\t}\n\t\t\n\t\t// listing directory contents\n\t\t\n\t\t$result = [];\n\t\t\n\t\t$root = scandir($dir);\n\t\tforeach($root as $value)\n\t\t{\n\t\t\t// removing dots & output directory\n\t\t\t\n\t\t\tif($value === '.' || $value === '..') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// listing only files\n\t\t\t\n\t\t\tif(is_file(\"$dir\".DS.\"$value\")) {\n\t\t\t\t$result[$value]=\"$dir\".DS.\"$value\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// recursive call to self(this method) so we can get files listing recursively\n\t\t\t\n\t\t\tforeach($this->directoryScan(\"$dir\".DS.\"$value\") as $value1)\n\t\t\t{\n\t\t\t\t$result[basename($value1)]=$value1;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "function scanDir() {\r\n $returnArray = array();\r\n \r\n if ($handle = opendir($this->uploadDirectory)) {\r\n \r\n while (false !== ($file = readdir($handle))) {\r\n if (is_file($this->uploadDirectory.\"/\".$file)) {\r\n $returnArray[] = $file;\r\n }\r\n }\r\n \r\n closedir($handle);\r\n }\r\n else {\r\n die(\"<b>ERROR: </b> No se puede leer el directorio <b>\". $this->uploadDirectory.'</b>');\r\n }\r\n return $returnArray; \r\n }", "function scanDir($cfg) //$view, $tdir , $subdir='', $match)\n {\n $ff = HTML_FlexyFramework::get();\n \n $subdir = $cfg['subdir'];\n $scandir = $cfg['tdir']. (empty($subdir) ? '' : '/') . $subdir;\n \n if (in_array($subdir, $cfg['skipdir'])) {\n return array();\n }\n // skip dom_templates\n \n if (!file_exists($scandir)) {\n return array();\n }\n $dh = opendir($scandir);\n if(!$dh){\n return array(); // something went wrong!?\n }\n $ret = array();\n \n while (($fn = readdir($dh)) !== false) {\n // do we care that it will try and parse the template directory??? - not really..\n // as we are only looking for php files..\n if(empty($fn) || $fn[0] == '.'){\n continue;\n }\n \n $fullpath = $scandir.(empty($scandir) ? '' : \"/\").$fn;\n // echo \"filename: $fullpath \\n\";\n \n if (is_link($fullpath)) {\n continue;\n }\n \n if(is_dir($fullpath)){\n // then recursively call self...\n $cfg['subdir'] = $subdir . (empty($subdir) ? '' : '/') . $fn;\n $children = $this->scanDir($cfg);\n if (count($children)) {\n $ret = array_merge($ret, $children);\n \n }\n continue;\n \n }\n \n if (!preg_match($cfg['match'], $fn) || !is_file($fullpath)) {\n continue;\n }\n \n \n \n $ret[] = $subdir . (empty($subdir) ? '' : '/'). $fn; /// this used to be strtolower?? why???\n\n \n \n }\n// print_r($ret);\n \n return $ret;\n \n \n \n \n }", "function scan($dir){\n\n\t$files = array();\n\n\t// Is there actually such a folder/file?\n\n\tif(file_exists($dir)){\n\t\n\t\tforeach(scandir($dir) as $f) {\n\t\t\n\t\t\tif(!$f || $f[0] == '.') {\n\t\t\t\tcontinue; // Ignore hidden files\n\t\t\t}\n\n\t\t\tif(is_dir($dir . '/' . $f)) {\n\n\t\t\t\t// The path is a folder\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"folder\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"items\" => scan($dir . '/' . $f) // Recursively get the contents of the folder\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\n\t\t\t\t// It is a file\n\t\t\t\t$path_info = pathinfo($f);\n\t\t\t\t//if ($path_info && $path_info.extension )\n\t\t\t\t$ext = $path_info['extension'];\n\t\t\t\tif($ext =='html'||$ext =='jpg' || $ext ==='png' || $ext == 'pdf'){\n\t\t\t\t\t$text = ($ext =='html') ?'doc':'image';\n\t\t\t\t\t$files[] = array(\n\t\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\t\"type\" => \"file\",\n\t\t\t\t\t\t\"text\" => $text,\n\t\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\t\"size\" => filesize($dir . '/' . $f) // Gets the size of this file\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t}\n\n\treturn $files;\n}", "public function test_search()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search('/(index.php|.htaccess)/');\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n $this->assertArrayHasKey(ROOT.DS.'.htaccess', $res);\n }", "function scan($dir){\n\n\t$files = array();\n\n\t// Is there actually such a folder/file?\n\n\tif(file_exists($dir)){\n\t\n\t\tforeach(scandir($dir) as $f) { // scandir() accepts the full path of the folder to be scanned\n\t\t\n\t\t\tif(!$f || $f[0] == '.') {\n\n\t\t\t\t// It is a hidden file\n\t\t\t\t\n\t\t\t\tcontinue; \n\t\t\t}\n\n\t\t\tif(is_dir($dir . '/' . $f)) {\n\n\t\t\t\t// The path is a folder\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"folder\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"items\" => scan($dir . '/' . $f) // Recursively get the contents of the folder\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\n\t\t\t\t// It is a file\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"file\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"size\" => filesize($dir . '/' . $f) // Gets the size of this file\n\t\t\t\t);\n\t\t\t}\n\n\t\t}\n\t\n\t}\n\n\treturn $files;\n}", "function scan(SplFileInfo $fileInfo, $repository)\n{\n $baseName = $fileInfo->getBasename();\n if ($baseName === '.' || $baseName === '..') {\n return;\n }\n\n $file = new File($fileInfo);\n $repository->save($file);\n if ($fileInfo->isDir()) {\n foreach (new RecursiveDirectoryIterator($fileInfo) as $child) {\n scan($child, $repository);\n }\n }\n}", "function scanFiles($dir){\n $path = __DIR__ . DIRECTORY_SEPARATOR . $dir; /** Nurodomas kelias iki jsons folderio */\n $files = scandir($path); /** Nuskenuoja folderi pagal kelia($path) ir grazina esanciu failu masyva */\n\n return $files;\n}", "function scan_directory_recursively($directory, $filter=FALSE)\n{\n\tif(substr($directory,-1) == '/')\n\t{\n\t\t$directory = substr($directory,0,-1);\n\t}\n\tif(!file_exists($directory) || !is_dir($directory))\n\t{\n\t\treturn FALSE;\n\t}elseif(is_readable($directory))\n\t{\n\t\t$directory_list = opendir($directory);\n\t\twhile($file = readdir($directory_list))\n\t\t{\n\t\t\tif($file != '.' && $file != '..' && $file != '.DS_Store' && $file != '.svn')\n\t\t\t{\n\t\t\t\t$path = $directory.'/'.$file;\n\t\t\t\tif(is_readable($path))\n\t\t\t\t{\n\t\t\t\t\t$subdirectories = explode('/',$path);\n\t\t\t\t\tif(is_dir($path))\n\t\t\t\t\t{\n\t\t\t\t\t\t$directory_tree[] = array(\n\t\t\t\t\t\t\t'path' => $path,\n\t\t\t\t\t\t\t'name' => end($subdirectories),\n\t\t\t\t\t\t\t'modified'\t=> filemtime($path),\n\t\t\t\t\t\t\t'kind' => 'directory',\n\t\t\t\t\t\t\t'content' => scan_directory_recursively($path, $filter));\n\t\t\t\t\t}elseif(is_file($path))\n\t\t\t\t\t{\n\t\t\t\t\t\t$extension = end(explode('.',end($subdirectories)));\n\t\t\t\t\t\tif($filter === FALSE || $filter == $extension)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Get metadata and image dimensions\n\t\t\t\t\t\t\t$size = getimagesize($path, $info);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Get containing directory of file\n\t\t\t\t\t\t\t$directory_array = explode('/', $path);\n\t\t\t\t\t\t\t$parent_folder = min($directory_array);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Reset title, caption, tags\n\t\t\t\t\t\t\t$title = $caption = $taglist = $tags = '';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$directory_tree[] = array(\n\t\t\t\t\t\t\t'path'\t\t=> dirname($path),\n\t\t\t\t\t\t\t'group'\t\t=> $parent_folder,\n\t\t\t\t\t\t\t'file'\t\t=> end($subdirectories),\n\t\t\t\t\t\t\t'extension' => $extension,\n\t\t\t\t\t\t\t'size'\t\t=> filesize($path),\n\t\t\t\t\t\t\t'width'\t\t=> $size[0],\n\t\t\t\t\t\t\t'height'\t=> $size[1],\n\t\t\t\t\t\t\t'modified'\t=> filemtime($path),\n\t\t\t\t\t\t\t'title'\t\t=> $title,\n\t\t\t\t\t\t\t'caption'\t=> $caption,\n\t\t\t\t\t\t\t'tags'\t\t=> $tags,\n\t\t\t\t\t\t\t'kind'\t\t=> '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\t\tclosedir($directory_list); \n\t\treturn $directory_tree;\n\t}else{\n\t\treturn FALSE;\t\n\t}\n}", "public function scan($filename){ }", "function scan_dir($dir, $type=array(),$only=FALSE, $allFiles=FALSE, $recursive=TRUE, $onlyDir=\"\", &$files){\n\t$handle = @opendir($dir);\n\tif(!$handle)\n\t\treturn false;\n\twhile ($file = @readdir ($handle))\n\t{\n\t\tif (eregi(\"^\\.{1,2}$\",$file) || $file == 'index.html')\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\t\tif(!$recursive && $dir != $dir.$file.\"/\")\n\t\t{\n\t\t\tif(is_dir($dir.$file))\n\t\t\t\tcontinue;\n\t\t}\n\t\tif(is_dir($dir.$file))\n\t\t{\n\t\t\tscan_dir($dir.$file.\"/\", $type, $only, $allFiles, $recursive, $file, $files);\n\t\t}\n\t\telse\n\t\t{\n if($only)\n\t\t\t\t$onlyDir = $dir;\n\n\t\t\t$files = buildArray($dir,$file,$onlyDir,$type,$allFiles,$files);\n\t\t}\n\t}\n\t@closedir($handle);\n\treturn $files;\n}", "function searchDir($root,$path,&$data)\n\t{\n\t\t$full_path = $root.$path;\n\t\tif(is_dir($full_path))\n\t\t{\n\t\t\t$dp=dir($full_path);\n\t\t\twhile($file=$dp->read())\n\t\t\t{\n\t\t\t\tif($file!='.'&& $file!='..')\n\t\t\t\t{\n\t\t\t\t\tsearchDir($root,$path.'/'.$file,$data);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$dp->close();\n\t\t}\n\t\tif(is_file($full_path))\n\t\t{\n\t\t\t$data[]=$path;\n\t\t}\n\t}", "function scan_directory($dir, $ext = '*', $recurse = true) {\n $files = array ();\n if ($handle = opendir($dir)) {\n while (false !== ($file = readdir($handle))) {\n if ($file == '.' || $file == '..' ||\n $file == 'CVS' || preg_match('|^\\.|', $file)) {\n continue;\n }\n if (is_link($dir . '/' . $file)) {\n continue;\n }\n if (is_dir ($dir . '/' . $file)) {\n if ($recurse == true)\n $files = array_merge($files, scan_directory ($dir . '/' . $file, $ext));\n } else {\n if($ext == get_file_extension($file) || $ext == '*') {\n $files[] = $dir . '/' . $file;\n }\n }\n }\n closedir($handle);\n }\n return $files;\n}", "function dirscan_files($rootFolder){\n $fileNames=[]; // will get filled\n foreach (scandir($rootFolder) as $name){\n if ($name=='.' || $name=='..') continue;\n if (!is_dir($rootFolder.\"/\".$name)) $fileNames[]=$name;\n }\n sort($fileNames);\n return $fileNames;\n}", "public function dir_readdir() {}", "function scanfiles( $path = '' ) {\n\t\t\t\n\t\t\tglobal $bwpsoptions;\n\t\t\t\n\t\t\t$tz = get_option( 'gmt_offset' ) * 60 * 60;\n\n $data = array();\n\n\t\t\tif ( $dirHandle = @opendir( ABSPATH . $path ) ) { //get the directory\n\t\t\t\n\t\t\t\twhile ( ( $item = readdir( $dirHandle ) ) !== false ) { // loop through dirs\n\t\t\t\t\t\n\t\t\t\t\tif ( $item != '.' && $item != '..' ) { //don't scan parent/etc\n\n\t\t\t\t\t\t$relname = $path . $item;\n \n\t\t\t\t\t\t$absname = ABSPATH . $relname;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( $this->checkFile( $relname ) == true ) { //make sure the user wants this file scanned\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( filetype( $absname ) == 'dir' ) { //if directory scan it\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$data = array_merge( $data, $this->scanfiles( $relname . '/' ) );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} else { //is file so add to array\n\n\t\t\t\t\t\t\t\t$data[$relname] = array();\n\t\t\t\t\t\t\t\t$data[$relname]['mod_date'] = @filemtime( $absname ) + $tz;\n\t\t\t\t\t\t\t\t$data[$relname]['hash'] = @md5_file( $absname );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} \n\t\t\t\t\n\t\t\t\t@closedir( $dirHandle ); //close the directory we're working with\n \n\t\t\t} \n\t\t\t\n\t\t\treturn $data; // return the files we found in this dir\n\t\t\t\n\t\t}", "public function test_search_by_name()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search_by_name('index.php');\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n }", "public function backgroundScan() {\n\t\t$lastPath = null;\n\t\twhile (($path = $this->cache->getIncomplete()) !== false && $path !== $lastPath) {\n\t\t\t$this->scan($path, self::SCAN_RECURSIVE, self::REUSE_ETAG);\n\t\t\t$this->cache->correctFolderSize($path);\n\t\t\t$lastPath = $path;\n\t\t}\n\t}", "protected static function _scanForPlugins(){\n\t\t$directory = __DIR__ . Config::$pluginsDirectory;\n\t\t$handle = opendir( $directory );\n\n\t\t// check to make sure we could open the directory handle\n\t\tif( !$handle )\n\t\t\treturn;\n\n\t\t// now begin looping through all of the contents of the plugin directory\n\t\twhile( ( $dir = readdir( $handle ) ) !== false ){\n\t\t\tif( $dir === '.' || $dir === '..' )\n\t\t\t\tcontinue;\n\n\t\t\t// now we need to verify that the current \"file\" is a directory before continuing\n\t\t\tif( !is_dir( $directory . $dir ) )\n\t\t\t\tcontinue;\n\n\t\t\t// expect a class file to exist in the format \"class-<DirectoryName>.php\"\n\t\t\t$classFile = $directory . $dir . '/' . $dir . '.php';\n\t\t\tif( !file_exists( $classFile ) )\n\t\t\t\tcontinue;\n\n\t\t\t// now actually include the code\n\t\t\trequire_once( $classFile );\n\n\t\t\t// now expect the class name to match whatever the $dir name was\n\t\t\tif( !class_exists( $dir ) )\n\t\t\t\tcontinue;\n\n\t\t\t// now we can instantiate the class name and store it now\n\t\t\tself::$_plugins[] = new $dir();\n\t\t}\n\t}", "static function AJAX_Scan() {\n\t\t$list = RecursiveScanDir(__DIR__);\n\t\tusort($list, \"strnatcasecmp\");\n\t\t\n\t\t// No files?\n\t\tif (!$list || !count($list)) die(\"No .php files located in this<br />folder and/or subfolders\");\n\t\t\n\t\t// For each file we'll present something nice\n\t\t$out = \"\";\n\t\tforeach($list as $file) {\n\t\t\t\n\t\t\t// If Mode is set to 1, we need to parse the file and check the completion\n\t\t\t$analysis = \"\";\n\t\t\tif ($_POST['Mode']) {\n\t\t\t\t$analysis = DocBlock::AnalyzeFile($file);\n\t\t\t}\n\t\t\t\n\t\t\t$out .= \"\n\t\t\t\t$analysis<a href='#' data-filename='\".rawurlencode($file).\"' class='filelink'>$file</a><br />\n\t\t\t\";\n\t\t}\n\t\t\n\t\t// Ouptut\n\t\techo $out;\n\t\t\n\t\t// Exit \"Gracefully\"\n\t\texit(0);\n\t}", "function l10n_drupal_files_scan($source = NULL, $automated = FALSE) {\n\n // We look for projects in the working directory.\n $workdir = variable_get('l10n_server_connector_l10n_drupal_files_directory', '');\n\n if (!is_dir($workdir)) {\n drupal_set_message(t('The configured directory (%workdir) cannot be found. <a href=\"@configure\">Check your configuration</a>.', array('%workdir' => $workdir, '@configure' => url('admin/l10n_server/connectors/config/l10n_drupal/files'))));\n }\n else {\n // define a list of allowed extensions, we will use it later on file_scan_directory\n // and further regular expression buildung processing. Thanks to EugenMayer\n $allowed_file_extensions = array('.tar.gz', '.tgz');\n // build the regular expression\n foreach($allowed_file_extensions as $key => $extension) {\n // escape the file extensions for later regular expression usage\n $allowed_file_extensions[$key] = preg_quote($extension);\n }\n $file_extension_pattern = '(' . implode('|', $allowed_file_extensions) . ')$';\n\n // Packages are always .tar.gz files.\n $files = file_scan_directory($workdir, $file_extension_pattern);\n if (count($files)) {\n foreach ($files as $path => $file) {\n\n if (!l10n_drupal_is_supported_version($path)) {\n // Skip files for unsupported versions.\n continue;\n }\n\n // Get rid of $workdir prefix on file names, eg.\n // drupal-6.x-6.19.tar.gz\n // Drupal/drupal-4.6.7.tar.gz or\n // files/Ubercart/ubercart-5.x-1.0-alpha8.tar.gz.\n $path = $package = trim(preg_replace('!(^' . preg_quote($workdir, '!') . ')(.+)\\.tar\\.gz!', '\\2', $path), '/');\n\n // split the filename into parts to $filename_splitted\n // [0] = the full string\n // [1] = the subdirectory and filename with extension\n // [1] = the subdirectory and filename without extension\n // [2] = the extension .tar.gz or .tgz\n $file_splitted = array(); // ensure to be a array....\n // the regular expression pattern (i put it in a var because i can better handle it with dpm for debugging, move if you want...)\n $file_split_pattern = '!^'. preg_quote($workdir, '!') .'((.+)'. $file_extension_pattern .')!';\n preg_match( $file_split_pattern, $path, $file_splitted );\n // put the result in vars for better handling\n list($file_fullpath, $file_subpath_ext, $file_subpath, $file_extension) = $file_splitted;\n\n // redefine the path to subpath without slash at beginning\n $path = trim($file_subpath, '/');\n // same on package\n $package = trim($file_subpath, '/');\n $project_title = '';\n if (strpos($path, '/')) {\n // We have a slash, so this package is in a subfolder.\n // Eg. Drupal/drupal-4.6.7 or Ubercart/ubercart-5.x-1.0-alpha8.\n // Grab the directory name as project title.\n list($project_title, $package) = explode('/', $path);\n }\n if (strpos($package, '-')) {\n // Only remaining are the project uri and release,\n // eg. drupal-4.6.7 or ubercart-5.x-1.0-alpha8.\n list($project_uri, $release_version) = explode('-', $package, 2);\n\n l10n_drupal_save_data($project_uri, ($project_title ? $project_title : $project_uri), $release_version, trim($file_subpath_ext, '/'), filemtime($file->filename));\n }\n else {\n // File name not formatted properly.\n $result['error'] = t('File name should have project codename and version number included separated with hyphen, such as drupal-5.2.tar.gz.');\n }\n }\n }\n }\n\n $user_feedback = FALSE;\n $results = db_query_range(\"SELECT * FROM {l10n_server_release} WHERE pid IN (SELECT pid FROM {l10n_server_project} WHERE connector_module = 'l10n_drupal_files' AND status = 1) ORDER BY last_parsed ASC\", 0, variable_get('l10n_server_connector_l10n_drupal_files_limit', 1));\n while ($release = db_fetch_object($results)) {\n\n // Only parse file if something changed since we last parsed it.\n $file_name = $workdir . '/' . $release->download_link;\n\n if (file_exists($file_name)) {\n if (filemtime($file_name) > $release->last_parsed) {\n $result = l10n_drupal_parse_package($file_name, $release);\n\n // User feedback, if not automated. Log messages are already done.\n if (isset($result['error']) && !$automated) {\n $user_feedback = TRUE;\n drupal_set_message($result['error'], 'error');\n }\n elseif (isset($result['message']) && !$automated) {\n $user_feedback = TRUE;\n drupal_set_message($result['message']);\n }\n }\n else {\n if (!$automated) {\n $user_feedback = TRUE;\n drupal_set_message(t('@release was already parsed, no need to scan again.', array('@release' => $release->download_link)));\n }\n }\n }\n // Hackish update of last parsed time so other tarballs will get into the queue too.\n // @todo: work on something better for this.\n db_query(\"UPDATE {l10n_server_release} SET last_parsed = %d WHERE rid = %d\", time(), $release->rid);\n }\n if (!$automated && !$user_feedback) {\n drupal_set_message(t('No (new) local Drupal files found to scan in %workdir.', array('%workdir' => $workdir)));\n }\n\n // Ensure that a Drupal page will be displayed with the messages.\n return '';\n}", "function scan_files( ){\n\n // List of all the audio files found in the directory and sub-directories\n $audioFileArray = array();\n\n // List of filenames already handled during the scan. To detect dupe filenames.\n $alreadyhandledFileArray = array();\n\n // Make list of all files in db to remove non existent files\n $DBaudioFileArray = array();\n foreach ( $this->get_list_of_files()->fetchAll() as $row ) {\n $DBaudioFileArray[] = $row['filename'];\n }\n\n // Prepare variables for file urls\n //$base_dir = dirname(dirname(realpath($this->filedirectorypath))); // Absolute path to your installation, ex: /var/www/mywebsite\n $doc_root = preg_replace(\"!{$_SERVER['SCRIPT_NAME']}$!\", '', $_SERVER['SCRIPT_FILENAME']); # ex: /var/www\n $protocol = empty($_SERVER['HTTPS']) ? 'http' : 'https';\n $port = $_SERVER['SERVER_PORT'];\n $disp_port = ($protocol == 'http' && $port == 80 || $protocol == 'https' && $port == 443) ? '' : \":$port\";\n $domain = $_SERVER['SERVER_NAME'];\n // variables for file urls\n\n // Create recursive dir iterator which skips dot folders\n $dir = new RecursiveDirectoryIterator( $this->filedirectorypath , FilesystemIterator::SKIP_DOTS);\n\n // Flatten the recursive iterator, consider only files, no directories\n $it = new RecursiveIteratorIterator($dir);\n\n // Find all the mp3 files\n foreach ($it as $fileinfo) {\n if ($fileinfo->isFile() && !strcmp($fileinfo->getExtension(), \"mp3\")) {\n $audioFileArray[] = $fileinfo;\n\n //Warning: files with same md5key in different folders will not be inserted into the db.\n //print md5_file($fileinfo) . \"<br />\\n\";\n }\n }\n\n foreach ($audioFileArray as $key => $fileinfo) {\n\n $filename = $fileinfo->getFilename();\n\n //For each file found on disk remove entry from list from DB\n // if any left at the end, they are files that no longer are present on the drive.\n //print \"unsetting: \" . $filename . \"<br>\";\n unset($DBaudioFileArray[array_search($filename,$DBaudioFileArray,true)]);\n\n // check file not in db\n if( !$this->is_file_in_db( $filename ) ) {\n\n //decode filename date if named according to our naming scheme\n $date = $this->decode_filename($filename);\n\n // Build file url based on server path\n $filepath = realpath($fileinfo->getRealPath());\n $base_url = preg_replace(\"!^{$doc_root}!\", '', $filepath); # ex: '' or '/mywebsite'\n $full_url = \"$protocol://{$domain}{$disp_port}{$base_url}\"; # Ex: 'http://example.com', 'https://example.com/mywebsite', etc.\n\n //print $filename . \" - \" . $full_url . \"<br />\\n\";\n\n //insert audiofile in db for first time\n $this->insert_new_file_into_db( $filename, $full_url, $fileinfo->getRealPath(), $fileinfo->getSize(), $date );\n\n $alreadyhandledFileArray[$key] = $filename;\n\n } else {\n // if file in alreadyhandled array, then duplicate named files have been found\n // how to check for duplicate file names?\n // if we're here then the name has already ben added to the db (but maybe during a previous run)\n //we still need to look for the file in the alreadyhandledFileArray\n if( in_array($filename, $alreadyhandledFileArray) ){\n // flag file\n $this->flag_file($filename, \"Il y a 2 ou plusieurs fichiers audio avec le même nom dans le dossier audio du serveur ftp. Veuillez changer les noms ou supprimer les doublons.\");\n }\n }\n\n\n }\n\n // If there are files from the database that weren't found in the audio folder,\n // flag them and add a comment stating that the file can no longer be found.\n if( count($DBaudioFileArray) ){\n //print_r($DBaudioFileArray);\n foreach($DBaudioFileArray as $key => $fn){\n $this->flag_file($fn, \"Le fichier en question n'est plus présent dans le dossier audio du serveur ftp. Il faut le supprimer de la base de données.\");\n $this->set_file_not_new($fn);\n }\n }\n\n return true;\n }", "public function scanSourceFolders() {\n $this->addons = [];\n foreach ($this->sources as $sourceDir) {\n $this->scanSource($sourceDir);\n }\n }", "function open_and_scan($SCAN_DIRECTORY,$prev_files){\n\tglobal $files,$exempt_files,$prev_files,$exempt_directory;\n\t$changed_files = '';\n\t$file_details = stat($SCAN_DIRECTORY);\n\t$dt = array();\n\tforeach($file_details as $key=>$info){\n\t\t$dt[$key] = $info;\n\t}\n\t$data = array(\n\t\t'file'=>$SCAN_DIRECTORY,\n\t\t'info'=>$dt\n\t);\n\tarray_push($files,$data);\n\t$changed_files .= get_prev_stats($SCAN_DIRECTORY,$prev_files);\n\t\t\t\t\t\n\t$handle = opendir($SCAN_DIRECTORY);\n\twhile($f = readdir($handle)){\n\t\tif($f != '.' && $f != '..'){\n\t\t\tif(!is_dir($SCAN_DIRECTORY.$f)){\n\t\t\t\t$file_array = explode('.',$f);\n\t\t\t\t$count = count($file_array);\n\t\t\t\t$extension = $file_array[$count-1];\n\t\t\t\tif($count > 1 && !in_array($extension,$exempt_files)){\n\t\t\t\t\t$file_details = stat($SCAN_DIRECTORY.$f);\n\t\t\t\t\t$dt = array();\n\t\t\t\t\tforeach($file_details as $key=>$info){\n\t\t\t\t\t\t$dt[$key] = $info;\n\t\t\t\t\t}\n\t\t\t\t\t$data = array(\n\t\t\t\t\t\t'file'=>$SCAN_DIRECTORY.$f,\n\t\t\t\t\t\t'info'=>$dt\n\t\t\t\t\t);\n\t\t\t\t\tarray_push($files,$data);\n\t\t\t\t\t$changed_files .= get_prev_stats($SCAN_DIRECTORY.$f,$prev_files);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif(!in_array($f,$exempt_directory)){\n\t\t\t\t\topen_and_scan($SCAN_DIRECTORY.$f.'/',$prev_files);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn array(\n\t\t'changed'=>$changed_files,\n\t\t'files'=>$files\n\t);\n}", "static private function scan_dir( $dir ) {\n\t\t$ignored = array( '.', '..', '.svn', '.htaccess', 'test-log.log' );\n\n\t\t$files = array();\n\t\tforeach ( scandir( $dir ) as $file ) {\n\t\t\tif ( in_array( $file, $ignored ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$files[ $file ] = filemtime( $dir . '/' . $file );\n\t\t}\n\t\tarsort( $files );\n\t\t$files = array_keys( $files );\n\n\t\treturn ( $files ) ? $files : false;\n\t}", "function RecursiveScanDir($dir, $prefix = '') {\n\t$dir = rtrim($dir, '\\\\/');\n\t$result = array();\n\tforeach (scandir($dir) as $f) {\n if (\n preg_match('`/tmp/`', \"$dir/$f\")\n || preg_match('`/fpdf.php$`', \"$dir/$f\")\n || preg_match('`/libs/pi_barcode.php$`', \"$dir/$f\")\n || preg_match('`/libs/phpmailer/`', \"$dir/$f\")\n || preg_match('`/libs/securimage/`', \"$dir/$f\")\n || preg_match('`/libs/Smarty/`', \"$dir/$f\")\n )\n continue;\n\t\tif ($f !== '.' and $f !== '..') {\n\t\t\tif (is_dir(\"$dir/$f\")) {\n\t\t\t\t$result = array_merge($result, RecursiveScanDir(\"$dir/$f\", \"$prefix$f/\"));\n\t\t\t} else {\n\t\t\t\tif ( strtolower(substr(pathinfo($f,PATHINFO_EXTENSION),0,3)) == \"php\" && pathinfo(__FILE__,PATHINFO_BASENAME ) != pathinfo($f,PATHINFO_BASENAME ) )\n\t\t\t\t\t$result[] = $prefix.$f;\n\t\t\t}\n\t\t}\n\t}\n\treturn $result;\n}", "public function scan($regex_filter=NULL)\n\t{\n\t\t$this->tossIfException();\n\t\t\n\t\t$files = array_diff(scandir($this->directory), array('.', '..'));\n\t\t$objects = array();\n\t\t\n\t\tforeach ($files as $file) {\n\t\t\t$file = $this->directory . $file;\n\t\t\t\n\t\t\tif ($regex_filter) {\n\t\t\t\t$test_path = (is_dir($file)) ? $file . '/' : $file;\n\t\t\t\tif (!preg_match($regex_filter, $test_path)) {\n\t\t\t\t\tcontinue;\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$objects[] = fFilesystem::createObject($file);\n\t\t}\n\t\t\n\t\treturn $objects;\n\t}", "function scan_dir($dir){\n\tif( !is_dir( $dir ) )\n\t\treturn false;\n\n\t$files=scandir($dir);\n\n\t$dirs=array();\n\tforeach($files as $file){\n\t\tif($file=='.'||$file=='..'||substr($file,0,1)=='.')\n\t\t\tcontinue;\n\t\tif(is_dir($dir.'/'.$file))\n\t\t\tarray_push($dirs,$file);\n\t}\n\n\treturn $dirs;\n}", "private static function __fordeepscan($dir, $file)\n {\n $path = \"\";\n $scan = glob($dir.'/*');\n $q = preg_quote($file, '\\\\');\n\n if (is_array($scan))\n {\n foreach ($scan as $d => $f)\n {\n if ($f != '.' && $f != '..')\n {\n $f = preg_replace(\"/[\\/]{1,}/\", '/', $f);\n\n if (!is_dir($f))\n {\n $base = basename($f);\n\n if (($base == $file) && strrpos($f, $file) !== false)\n {\n $path = $f;\n }\n\n $base = null;\n }\n\n if ($path == \"\")\n {\n $path = self::__fordeepscan($f, $file);\n if ($path !== \"\"){\n if (strrpos($path, $file) !== false){\n break;\n }\n }\n }\n\n $f = null;\n }\n }\n\n $scan = null;\n }\n\n return $path;\n }", "protected function scanDirectory($dir, $include_tests) {\n $files = array();\n\n // In order to scan top-level directories, absolute directory paths have to\n // be used (which also improves performance, since any configured PHP\n // include_paths will not be consulted). Retain the relative originating\n // directory being scanned, so relative paths can be reconstructed below\n // (all paths are expected to be relative to $this->root).\n $dir_prefix = ($dir == '' ? '' : \"$dir/\");\n $absolute_dir = ($dir == '' ? $this->root : $this->root . \"/$dir\");\n\n if (!is_dir($absolute_dir)) {\n return $files;\n }\n // Use Unix paths regardless of platform, skip dot directories, follow\n // symlinks (to allow extensions to be linked from elsewhere), and return\n // the RecursiveDirectoryIterator instance to have access to getSubPath(),\n // since SplFileInfo does not support relative paths.\n $flags = \\FilesystemIterator::UNIX_PATHS;\n $flags |= \\FilesystemIterator::SKIP_DOTS;\n $flags |= \\FilesystemIterator::FOLLOW_SYMLINKS;\n $flags |= \\FilesystemIterator::CURRENT_AS_SELF;\n $directory_iterator = new \\RecursiveDirectoryIterator($absolute_dir, $flags);\n\n // Filter the recursive scan to discover extensions only.\n // Important: Without a RecursiveFilterIterator, RecursiveDirectoryIterator\n // would recurse into the entire filesystem directory tree without any kind\n // of limitations.\n $filter = new RecursiveExtensionFilterIterator($directory_iterator);\n $filter->acceptTests($include_tests);\n\n // The actual recursive filesystem scan is only invoked by instantiating the\n // RecursiveIteratorIterator.\n $iterator = new \\RecursiveIteratorIterator($filter,\n \\RecursiveIteratorIterator::LEAVES_ONLY,\n // Suppress filesystem errors in case a directory cannot be accessed.\n \\RecursiveIteratorIterator::CATCH_GET_CHILD\n );\n\n foreach ($iterator as $key => $fileinfo) {\n $name = $fileinfo->getBasename('.info.yml');\n\n if ($this->fileCache && $cached_extension = $this->fileCache->get($fileinfo->getPathName())) {\n $files[$cached_extension->getType()][$key] = $cached_extension;\n continue;\n }\n\n // Determine extension type from info file.\n $type = FALSE;\n $file = $fileinfo->openFile('r');\n while (!$type && !$file->eof()) {\n preg_match('@^type:\\s*(\\'|\")?(\\w+)\\1?\\s*$@', $file->fgets(), $matches);\n if (isset($matches[2])) {\n $type = $matches[2];\n }\n }\n if (empty($type)) {\n continue;\n }\n $name = $fileinfo->getBasename('.info.yml');\n $pathname = $dir_prefix . $fileinfo->getSubPathname();\n\n $filename = $name . '.' . $type;\n\n if (!file_exists(dirname($pathname) . '/' . $filename)) {\n $filename = NULL;\n }\n\n $extension = new Extension($this->root, $type, $pathname, $filename);\n\n // Track the originating directory for sorting purposes.\n $extension->subpath = $fileinfo->getSubPath();\n $extension->origin = $dir;\n\n $files[$type][$key] = $extension;\n\n if ($this->fileCache) {\n $this->fileCache->set($fileinfo->getPathName(), $extension);\n }\n }\n return $files;\n }", "function check_dir($dir)\n {\n global $docdir, $lang;\n \n // Collect files and diretcories in these arrays\n $directories = array();\n $files = array();\n \n // Open and traverse the directory\n $handle = @opendir($dir);\n while ($file = @readdir($handle)) {\n if (preg_match(\"/^\\.{1,2}/\",$file) || $file == 'CVS')\n continue;\n\n // Collect files and directories\n if (is_dir($dir.$file)) { $directories[] = $file; }\n else { $files[] = $file; }\n\n }\n @closedir($handle);\n \n // Sort files and directories\n sort($directories);\n sort($files);\n \n // Files first...\n $file_cnt = 0;\n foreach ($files as $file) {\n if (check_file($dir.$file, $file_cnt)) { $file_cnt++; }\n }\n\n // than the subdirs\n foreach ($directories as $file) {\n check_dir($dir.$file.\"/\");\n }\n }", "public function scanSrc($dir, $total = array())\n {\n if ($handle = opendir($dir)) {\n while (($file = readdir($handle)) !== false) {\n if ($file != \"..\" && $file != \".\") {\n if (is_dir($dir . \"/\" . $file))\n // Do DFS\n $total += $this->scanSrc($dir . \"/\" . $file, $total);\n else\n array_push($total, $dir . '/' . $file);\n }\n }\n closedir($handle);\n return $total;\n }\n }", "function searchDir($base_dir=\"./\",$p=\"\",$f=\"\",$allowed_depth=-1){\n\t$contents=array();\n\n\t# trim all input arguments for whitespace\n\t$base_dir=trim($base_dir);\n\t$p=trim($p);\n\t$f=trim($f);\n\n # if base dir is not given, use the this\n\tif($base_dir==\"\")$base_dir=\"./\";\n\n\t# if last character of basedir lacks a \"/\" then add one\n\tif(substr($base_dir,-1)!=\"/\")$base_dir.=\"/\";\n\n\t# remove the \"../\" and \"./\" directories, and trim all \"./\"\n\t$p=str_replace(array(\"../\",\"./\"),\"\",trim($p,\"./\"));\n\n\t# add the requested path to the base directory string\n\t$p=$base_dir.$p;\n\n\t#if p is not a directory, meaning it is a file, get the path to it\n\tif(!is_dir($p))$p=dirname($p);\n\n\t#if the last character of p is not a \"/\" then add one\n\tif(substr($p,-1)!=\"/\")$p.=\"/\";\n\n\t# if caps are set on allowed depth (allowed depth>-1) count the dirs\n\tif($allowed_depth>-1){\n\t\t$allowed_depth=count(explode(\"/\",$base_dir))+ $allowed_depth-1;\n\t\t$p=implode(\"/\",array_slice(explode(\"/\",$p),0,$allowed_depth));\n\t\tif(substr($p,-1)!=\"/\")$p.=\"/\";\n\t}\n\n\t# if f is empty, create an empty array, if not explode and store elements\n\t$filter=($f==\"\")?array():explode(\",\",strtolower($f));\n\n\t# store the files in the files array, and shut up while scanning\n\t$files=@scandir($p);\n\n\t# if there are no files after scan, return an empty array and the path\n\tif(!$files)return array(\"contents\"=>array(),\"currentPath\"=>$p);\n\n\t# iterate through all files found\n\tfor ($i=0;$i<count($files);$i++){\n\n\t\t# gather name and path of each file\n\t\t$fName=$files[$i];\n\t\t$fPath=$p.$fName;\n\n\t\t# check if the file is a directory and tag it as directory\n\t\t# each file is tagged as a folder by default\n\t\t$isDir=is_dir($fPath);\n\t\t$add=false;\n\t\t$fType=\"folder\";\n\n\t\t# if the file is a file\n\t\tif(!$isDir){\n\n\t\t\t# extract extension from filename\n\t\t\t$ft=strtolower(substr($files[$i],strrpos($files[$i],\".\")+1));\n\t\t\t$fType=$ft;\n\n\t\t\t# if there is anything in the filter that matches, add it\n\t\t\tif($f!=\"\"){\n\t\t\t\tif(in_array($ft,$filter))$add=true;\n\t\t\t}else{\n\t\t\t\t$add=true;\n\t\t\t}\n\t\t# if the file is a folder\n\t\t}else{\n\t\t\tif($fName==\".\")continue;\n\t\t\t$add=true;\n\n\t\t\t# filter it, and discard if bad\n\t\t\tif($f!=\"\"){\n\t\t\t\tif(!in_array($fType,$filter))$add=false;\n\t\t\t}\n\n\t\t\t# if the file is the \"..\" folder\n\t\t\tif($fName==\"..\"){\n\t\t\t\t# if we are in the base dir, no not add upper directory option\n\t\t\t\tif($p==$base_dir){\n\t\t\t\t\t$add=false;\n\t\t\t\t}else $add=true;\n\n\t\t\t\t# explode the path by path steps\n\t\t\t\t$tempar=explode(\"/\",$fPath);\n\t\t\t\t# remove last two elements, so the file references parent dir\n\t\t\t\tarray_splice($tempar,-2);\n\t\t\t\t# implode the array, to recreate the path string\n\t\t\t\t$fPath=implode(\"/\",$tempar);\n\t\t\t\t# if for some reason, this reference is shorter than basedir, deny it!\n\t\t\t\tif(strlen($fPath)<= strlen($base_dir))$fPath=\"\";\n\t\t\t}\n\t\t}\n\n\t\t# if the created fPath is non-zero, append to basedir\n\t\tif($fPath!=\"\")$fPath=substr($fPath,strlen($base_dir));\n\t\t# if approved to add, add path, name and type to contents[] array\n\t\tif($add)$contents[]=array(\"fPath\"=>$fPath,\"fName\"=>$fName,\"fType\"=>$fType);\n\t}\n\n\t# if p is shorter than base_dir, deny it! Else, cut away base_dir and use it\n\t$p=(strlen($p)<= strlen($base_dir))?$p=\"\":substr($p,strlen($base_dir));\n\t# return the final contents and its respective path\n\treturn array(\"contents\"=>$contents,\"currentPath\"=>$p);\n}", "function lscan($scat, $param)\n{\n if(isset($param[1][0]) == FALSE)\n {\n $scat[1][0] = '.';\n }\n $c = 0;\n if (file_exists($scat[1][0]) == TRUE && is_dir($scat[1][0]) == TRUE && is_readable($scat[1][0]) == TRUE && is_executable($scat[1][0]) == TRUE && $fh = fopen($scat[1][0], 'r'))\n {\n while(isset(scandir($scat[1][0])[$c]))\n {\n $tab[$c] = scandir($scat[1][0])[$c];\n $c++;\n }\n $c = 0;\n sort($tab);\n while(isset($tab[$c]))\n {\n if (is_dir($tab[$c]))\n {\n echo(\"\\033[34m{$tab[$c]}\");\n echo (\"/\");\n }\n else if(is_executable($tab[$c]) && is_dir($tab[$c]) == FALSE)\n {\n echo(\"\\033[32m{$tab[$c]}\");\n echo (\"*\");\n }\n else if(is_link($tab[$c]))\n {\n echo($tab[$c]);\n echo (\"@\");\n }\n else\n echo($tab[$c]);\n echo (\" \");\n $c++;\n }\n echo (\"\\n\");\n }\n else if (is_file($scat[1][0]) == TRUE)\n echo (\"Is a file\\n\");\n else if (file_exists($scat[1][0]) == TRUE && (is_readable($scat[1][0]) == FALSE || is_executable($scat[1][0]) == FALSE))\n echo (\"Permission denied\\n\");\n else if (file_exists($scat[1][0]) == FALSE && is_dir($scat[1][0]) == FALSE)\n echo (\"No such file or directory\\n\");\n else\n echo (\"Cannot open folder\\n\");\n}", "public function test_scan_sort_desc()\n {\n $content = array('.','..','application','.git','.gitignore','.htaccess','index.php','nbproject','README','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_DESC);\n \n $output = array();\n foreach($res as $f) $output[] = $f->get_base_name();\n $this->assertEquals(array_reverse($content), $output);\n }", "function scan_students()\n {\n $current_students = [];\n $di = new RecursiveDirectoryIterator('students/');\n foreach (new RecursiveIteratorIterator($di) as $filename => $file) {\n $path_info = pathinfo($filename);\n if($path_info['extension']=='json'){\n array_push($current_students,$path_info['filename']);\n }\n }\n // echo print_r($current_students);\n return $current_students;\n }", "function dirscan_folders($rootFolder){\n $folderNames=[]; // will get filled\n foreach (scandir($rootFolder) as $name){\n if ($name=='.' || $name=='..') continue;\n if (is_dir($rootFolder.\"/\".$name)) \n $folderNames[]=$name;\n }\n sort($folderNames);\n return $folderNames;\n}", "public function scanPath(Path $path)\n\t{\n\t\treturn @scandir($path->getPath());\n\t}", "function bob_scandir($root_path, $bad_path, $recursive) {\n $output = array();\n if (file_exists($root_path)){\n $paths = scandir($root_path);\n if ($paths === False)\n return False;\n foreach ($paths as $path) {\n $potential_path = \"${root_path}/${path}\";\n\n // Ignore any files in the bad (admin) path or files that begin with a period.\n if ($potential_path == $bad_path or $path[0] == '.')\n continue;\n\n $output[] = $potential_path;\n $bad_folder = ''; // not sure what this is for\n if ($recursive and is_dir($potential_path)) // Recursively descend and print out files.\n $output = array_merge($output, bob_scandir($potential_path, $bad_folder, $recursive));\n }\n }\n return $output;\n}", "function dynamik_skins_folder_scan( $skin_check = false )\n{\n\tif( dynamik_dir_check( dynamik_get_skins_folder_path() ) )\n\t{\n\t\t$skin_folder_names = scandir( dynamik_get_skins_folder_path() );\n\t\tif( false != $skin_check )\n\t\t{\n\t\t\tif( in_array( $skin_check, $skin_folder_names ) )\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t}\n\telse\n\t{\n\t\treturn;\n\t}\t\n}", "private function scan_registry_dir($directory, &$message = '') {\n \tglobal $dbKITregistryFiles;\n \tglobal $dbKITregistryCfg;\n\n \t$sub_dirs = $dbKITregistryCfg->getValue(dbKITregistryCfg::cfgRegistryListTabs);\n\n $handle = opendir($directory);\n while ($file = readdir($handle)) {\n if ($file != \".\" && $file != \"..\") {\n if (is_dir($directory.$file)) {\n // Erneuter Funktionsaufruf, um das aktuelle Verzeichnis auszulesen\n $this->scan_registry_dir($directory.$file.'/');\n }\n else {\n // Wenn Verzeichnis-Eintrag eine Datei ist, diese ausgeben\n $actual_file = page_filename(utf8_encode($file));\n $actual_file = $directory.$actual_file;\n $where = array(dbKITregistryFiles::field_filepath_registry => $actual_file);\n $data = array();\n if (!$dbKITregistryFiles->sqlSelectRecord($where, $data)) {\n \t$this->setError($dbKITregistryFiles->getError());\n \treturn false;\n }\n if (count($data) > 0) {\n \t// Datensatz existiert\n \t$data = $data[0];\n \t$update = array();\n \t// Vergleichen, ob sich etwas veraendert hat\n \tif (filemtime($actual_file) != $data[dbKITregistryFiles::field_filemtime]) {\n \t\t$update[dbKITregistryFiles::field_filemtime] = filemtime($actual_file);\n \t}\n \tif (filesize($actual_file) != $data[dbKITregistryFiles::field_filesize]) {\n \t\t$update[dbKITregistryFiles::field_filesize] = filesize($actual_file);\n \t}\n \tif ($data[dbKITregistryFiles::field_status] == dbKITregistryFiles::status_deleted) {\n \t\t$update[dbKITregistryFiles::field_status] = dbKITregistryFiles::status_active;\n \t\t$message .= sprintf(reg_msg_registry_file_undeleted, $data[dbKITregistryFiles::field_filename_registry]);\n \t}\n \tif (count($update) > 0) {\n \t\t$where = array(dbKITregistryFiles::field_id => $data[dbKITregistryFiles::field_id]);\n \t\tif (!$dbKITregistryFiles->sqlUpdateRecord($update, $where)) {\n \t\t\t$this->setError($dbKITregistryFiles->getError());\n \t\t\treturn false;\n \t\t}\n \t\t$message .= sprintf(reg_msg_registry_file_updated, $data[dbKITregistryFiles::field_filename_registry]);\n \t}\n }\n else {\n \t// es existiert noch kein Eintrag\n \tif (!file_exists($actual_file)) {\n \t\t// Datei muss noch umbenannt werden\n \t\tif (!rename($directory.$file, $actual_file)) {\n \t\t\t$this->setError(sprintf(reg_error_rename_file, basename($directory.$file), basename($actual_file)));\n \t\t\treturn false;\n \t\t}\n \t\t$message .= sprintf(reg_msg_registry_file_renamed, basename($directory.$file), basename($actual_file));\n \t}\n \t$sub_dir = substr(basename($actual_file), 0, 1);\n \tif (!in_array($sub_dir, $sub_dirs)) $sub_dir = '#';\n \tif (!file_exists($this->registry_path.$sub_dir)) {\n \t\tif (!mkdir($this->registry_path.$sub_dir)) {\n \t\t\t$this->setError(sprintf(reg_error_mkdir, $this->registry_path.$sub_dir));\n \t\t\treturn false;\n \t\t}\n \t\t$message .= sprintf(reg_msg_mkdir, '/'.$sub_dir);\n \t}\n \t$check_file = page_filename(utf8_encode($file));\n \t$check_file = $this->registry_path.$sub_dir.'/'.$check_file;\n \t// pruefen, ob sich die Datei im richtigen Verzeichnis befindet\n \tif ($actual_file != $check_file) {\n \t\tif (!rename($actual_file, $check_file)) {\n \t\t\t$this->setError(sprintf(reg_error_rename_file, basename($actual_file), '/'.$sub_dir.'/'.basename($check_file)));\n \t\t\treturn false;\n \t\t}\n \t\t$message .= sprintf(reg_msg_registry_file_moved, basename($actual_file), $sub_dir);\n \t\t$actual_file = $check_file;\n \t}\n \t$data = array(\n \t\tdbKITregistryFiles::field_filename_original\t\t\t=> utf8_encode(basename($directory.$file)),\n \t\tdbKITregistryFiles::field_filename_registry\t\t\t=> basename($actual_file),\n \t\tdbKITregistryFiles::field_filepath_registry\t\t\t=> $actual_file,\n \t\tdbKITregistryFiles::field_filemtime\t\t\t\t\t\t\t=> filemtime($actual_file),\n \t\tdbKITregistryFiles::field_filesize\t\t\t\t\t\t\t=> filesize($actual_file),\n \t\tdbKITregistryFiles::field_filetype\t\t\t\t\t\t\t=> pathinfo($actual_file, PATHINFO_EXTENSION),\n \t\tdbKITregistryFiles::field_status\t\t\t\t\t\t\t\t=> dbKITregistryFiles::status_active,\n \t\tdbKITregistryFiles::field_sub_dir\t\t\t\t\t\t\t\t=> $sub_dir\n \t);\n \t$id = -1;\n \tif (!$dbKITregistryFiles->sqlInsertRecord($data, $id)) {\n \t\t$this->setError($dbKITregistryFiles->getError());\n \t\treturn false;\n \t}\n \t$message .= sprintf(reg_msg_registry_file_added, $data[dbKITregistryFiles::field_filename_registry]);\n }\n }\n }\n }\n closedir($handle);\n }", "function directory_scan($directory, $withfiles) {\n\t$scanned_directory = array_diff(scandir($directory), array(\"..\", \".\")); //This removes all of the unessesary results\n\n\tfor ($i = 0; ($i < count(scandir($directory))) && $withfiles == true; $i = $i + 1) {\n\t\tif (isset($scanned_directory[$i]) && (is_dir($directory . \"/\" . $scanned_directory[$i]) == FALSE)) { // If current item is a file, make it a download link\n\t\t\techo \"<div class='fileDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='movefrom[\" . $scanned_directory[$i] . \"]' form='moveto'>\";\n\t\t\techo \"<img src='Assets/SVG/file.svg' class='foldersvg'/>\";\n\t\t\techo \"<p class='fileLink'>\" . $scanned_directory[$i] . \"</p>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='fileinfo'><b>Type</b>: \" . mime_content_type($directory. \"/\" . $scanned_directory[$i]) . \" <b>Size</b>: \" . getfilesize($directory . \"/\" . $scanned_directory[$i], 0) . \" <b>Last Modified</b>: \" . date(\"F d Y H:i:s.\",filectime($directory. \"/\" . $scanned_directory[$i])) . \"</p> \";\t\t\t\n\t\t\techo \"</div>\";\n\t\t} else if (isset($scanned_directory[$i]) && $directory . \"/\" . $scanned_directory[$i] != \"uploads/\" . $_SESSION[\"username\"] . \"/Trash\") { // Makes this a special dir box if a item is folder\n\t\t\techo \"<div class='folderDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='movefrom[\" . $scanned_directory[$i] . \"]' form='moveto'>\";\n\t\t\techo \"<img src='Assets/SVG/folder.svg' class='foldersvg'/>\";\n\t\t\techo \"<input type='button' class='folderButton' value='\" . $scanned_directory[$i] . \"' name='directory[\" . $i . \"]'>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='folderinfo'><b>Type</b>: Folder <b>Size</b>: \" . getfilesize($directory . \"/\" . $scanned_directory[$i], 1) . \" <b>Last Modified</b>: \" . date(\"F d Y H:i:s.\",filectime($directory. \"/\" . $scanned_directory[$i])) . \"</p> \";\n\t\t\techo \"</div>\"; \n\t\t}\n\t}\n\t\n\tfor ($i = 0; ($i < count(scandir($directory))) && $withfiles == false; $i = $i + 1) { //$withfiles only outputs files when true. when false, it will output files and folders. This is for the right-side of the page\n\t\tif ($i==0 && $directory != \"uploads/\" . $_SESSION[\"username\"]) { //when $i gets to its first iteration, output the \"back a directory\" folder\n\t\t\techo \"<div class='folderDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='moveto[../]' form='moveto'>\";\n\t\t\techo \"<img src='Assets/SVG/folder.svg' class='foldersvg'/>\";\n\t\t\techo \"<input type='button' class='folderButton' value='../' name='directory[\" . $i . \"]'>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='folderinfo'><b>Info</b>: Selecting this will move your selection back a folder.</p> \";\n\t\t\techo \"</div>\";\n\t\t}\n\t\t\n\t\tif (isset($scanned_directory[$i]) && is_dir($directory . \"/\" . $scanned_directory[$i])) { // Makes this a special dir box if an item is folder\n\t\t\techo \"<div class='folderDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='moveto[\" . $scanned_directory[$i] . \"]' form='moveto'>\";\n\t\t\tif ($directory . \"/\" . $scanned_directory[$i] == \"uploads/\" . $_SESSION[\"username\"] . \"/Trash\") {\n\t\t\t\techo \"<img src='Assets/SVG/bin.svg' class='foldersvg'/>\";\n\t\t\t} else {\n\t\t\t\techo \"<img src='Assets/SVG/folder.svg' class='foldersvg'/>\";\n\t\t\t}\n\t\t\techo \"<input type='button' class='folderButton' value='\" . $scanned_directory[$i] . \"' name='directory[\" . $i . \"]'>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='folderinfo'><b>Type</b>: Folder <b>Size</b>: \" . getfilesize($directory . \"/\" . $scanned_directory[$i], 1) . \" <b>Last Modified</b>: \" . date(\"F d Y H:i:s.\",filectime($directory. \"/\" . $scanned_directory[$i])) . \"</p> \";\n\t\t\techo \"</div>\";\n\t\t}\n\t}\n\n}", "private function scanDir(string $path, array &$files, bool $recursion = false): void\n {\n $handler = opendir($path);\n\n while ($item = readdir($handler)) {\n if (in_array($item, ['.', '..'])) {\n continue;\n }\n\n $itemPath = sprintf('%s/%s', $path, $item);\n\n if (is_file($itemPath)) {\n $files[] = $itemPath;\n continue;\n }\n\n if ($recursion && is_dir($itemPath)) {\n $this->scanDir($itemPath, $files, $recursion);\n }\n }\n }", "function dir_enter($entry_dir='/', $depth=0)\r\n{\r\n\t$found = 0;\r\n\r\n\t# Remove the last trailing slash and void dual writing\r\n\t$entry_dir = preg_replace('/\\/$/i', '', $entry_dir);\r\n\r\n\t$skip_list = array(\r\n\t\t'.', # self\r\n\t\t'..', # parent\r\n\t);\r\n\r\n\tif($dir_handle = opendir($entry_dir))\r\n\t{\r\n\t\twhile(false !== ($filename = readdir($dir_handle)))\r\n\t\t{\r\n\t\t\tif(in_array($filename, $skip_list))\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$full_file_path = \"{$entry_dir}/{$filename}\";\r\n\t\t\t\r\n\t\t\tif(is_dir($full_file_path))\r\n\t\t\t{\r\n\t\t\t\t# Need to loop here inside the directory\r\n\r\n\t\t\t\tfecho(str_repeat(' ', $depth)); # depth marker\r\n\t\t\t\t#fecho(\"{$full_file_path}\");\r\n\t\t\t\tfecho(\"{$filename}\");\r\n\r\n\t\t\t\t\r\n\t\t\t\t# Recurse through the file\r\n\t\t\t\t$function = __FUNCTION__;\r\n\t\t\t\t$found += $function($full_file_path, $depth+1);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t#fecho(str_repeat(' ', $depth)); # depth marker\r\n\t\t\t\t#fecho(\"{$full_file_path}\");\r\n\t\t\t\t#fecho(\"{$filename}\");\r\n\r\n\t\t\t\t++$found;\r\n\t\t\t\tprocess_file($full_file_path, $depth);\r\n\t\t\t}\r\n\t\t}\r\n\t\tclosedir($dir_handle);\r\n\t}\r\n\t\r\n\treturn $found;\r\n}", "protected function getFilesInDirCreateTestDirectory() {}", "function getDirContents($dir){\r\n foreach(scandir($dir) as $key => $value){\r\n print \"$value<BR>\";\r\n }\r\n\r\n\r\n }", "public function scanIniDir($dir) {\n\n //prevent ../../../ attach\n $full_data_dir = realpath($this->configuration['base_ini_dir']);\n $full_dir_unsafe = realpath($full_data_dir . '/' . $dir);\n $full_dir = $full_data_dir . str_replace($full_data_dir, '', $full_dir_unsafe);\n\n $a_out = array();\n if (!is_dir($full_dir_unsafe)) {\n die(\"pqz.class.php: Directory $dir Not Found / full dir $full_dir\");\n }\n\n $scanned_directory = array_diff(scandir($full_dir), array('..', '.'));\n $index = 0;\n foreach ($scanned_directory as $entry) {\n\n if (is_dir(\"$full_dir/$entry\")) {\n $a_out[$index]['type'] = \"dir\";\n $a_out[$index]['path'] = $dir . $entry . '/';\n $a_out[$index]['name'] = $entry;\n $index ++;\n } else {\n // is a file\n\n $filename = $full_dir . '/' . $entry;\n\n $file_parts = pathinfo($filename);\n if (strtolower($file_parts['extension']) == 'ini') {\n \n } else {\n if ($this->debug) {\n echo \"$filename NOT an ini file\";\n }\n }\n $ini_array = parse_ini_file($filename);\n\n if (isset($ini_array['title'])) {\n $a_out[$index] = $ini_array;\n $a_out[$index]['type'] = \"file\";\n $a_out[$index]['path'] = $dir . $entry;\n $a_out[$index]['name'] = $entry;\n $index ++;\n }\n }\n }\n\n // --- sort the multidimensional array ---\n // Obtain a list of columns\n foreach ($a_out as $key => $row) {\n $type[$key] = $row['type'];\n $name[$key] = $row['name'];\n $path[$key] = $row['path'];\n }\n\n// Sort the data with volume descending, edition ascending\n// Add $data as the last parameter, to sort by the common key\n array_multisort($type, SORT_ASC, $name, SORT_ASC, $path, SORT_ASC, $a_out);\n\n return $a_out;\n }", "public function crawl() {\n\t\t$sDirectories = BsConfig::get( 'MW::ExtendedSearch::ExternalRepo' );\n\t\tif ( $sDirectories === '' ) return $sDirectories;\n\n\t\t$aDirectories = explode( ',', $sDirectories );\n\t\tforeach ( $aDirectories as $sDirectory ) {\n\t\t\t$sDir = trim ( $sDirectory );\n\t\t\tif( !is_dir( $sDir ) ) continue;\n\t\t\t$this->readInFiles( $sDir );\n\t\t}\n\t\treturn $this->aFiles;\n\t}", "public function testScan_string() {\n $this->createExampleFile($this->fixturePath . '/modules/example.txt');\n $this->createExampleFile($this->fixturePath . '/modules/extra-1/example.txt');\n $this->createExampleFile($this->fixturePath . '/themes/extra-1/example.txt');\n $this->createExampleFile($this->fixturePath . '/sites/all/modules/extra-2/example.txt');\n $this->createExampleRepo($this->fixturePath);\n $this->createExampleRepo($this->fixturePath . '/sites/all/modules/real-1');\n $this->createExampleRepo($this->fixturePath . '/sites/default/real-2');\n\n $scanner = new GitRepoScanner();\n $gitRepos = $scanner->scan($this->fixturePath);\n\n $this->assertRepos($gitRepos, array(\n $this->fixturePath,\n $this->fixturePath . '/sites/all/modules/real-1',\n $this->fixturePath . '/sites/default/real-2',\n ));\n }", "public function findFiles();", "function m_walk_dir( $root, $callback, $recursive = true, $level = 0 ) {\r\n $dh = @opendir( $root );\r\n if( false === $dh ) {\r\n return false;\r\n }\r\n while( $file = readdir( $dh )) {\r\n if( \".\" == $file || \"..\" == $file ){\r\n continue;\r\n }\r\n //echo \"## DEBUG:$level - $file<br/>\"; \r\n\r\n //echo \"Level: $level\";\r\n call_user_func( $callback,$level, \"{$root}/{$file}\", $file );\r\n if( false !== $recursive && is_dir( \"{$root}/{$file}\" )) {\r\n m_walk_dir( \"{$root}/{$file}\", $callback, $recursive, $level+1 );\r\n }\r\n }\r\n closedir( $dh );\r\n return true;\r\n}", "abstract protected function yieldSearchPaths(): Generator;", "function scan_directory($directory) {\n $dir = scandir($directory);\n foreach ($dir as $d) {\n if ($d === '.' or $d === '..')\n continue;\n\n if (is_dir($directory . '/' . $d)) {\n //code to use if directory\n scan_directory($directory . '/' . $d);\n } else {\n //code to use if file \n $type = pathinfo($directory . '/' . $d, PATHINFO_EXTENSION);\n if ($type == \"mp4\" || $type == \"html\") {\n //do nothing \n continue;\n } else {\n if (unlink($directory . '/' . $d)) {\n echo '<strong>Deleted</strong>'.$directory . '/' . $d . '<br/><br/>';\n }\n }\n }\n }\n}", "public function scanRecursive($regex_filter=NULL)\n\t{\n\t\t$this->tossIfException();\n\t\t\n\t\t$files = $this->scan();\n\t\t$objects = $files;\n\t\t\n\t\t$total_files = sizeof($files);\n\t\tfor ($i=0; $i < $total_files; $i++) {\n\t\t\tif ($files[$i] instanceof fDirectory) {\n\t\t\t\tarray_splice($objects, $i+1, 0, $files[$i]->scanRecursive());\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($regex_filter) {\n\t\t\t$new_objects = array();\n\t\t\tforeach ($objects as $object) {\n\t\t\t\t$test_path = ($object instanceof fDirectory) ? substr($object->getPath(), 0, -1) . '/' : $object->getPath();\n\t\t\t\tif (!preg_match($regex_filter, $test_path)) {\n\t\t\t\t\tcontinue;\t\n\t\t\t\t}\t\n\t\t\t\t$new_objects[] = $object;\n\t\t\t}\n\t\t\t$objects = $new_objects;\n\t\t}\n\t\t\n\t\treturn $objects;\n\t}", "function logonscreener_source_scan() {\n global $source;\n $source = str_replace('\\\\', '/', rtrim($source, '/\\\\'));\n\n if (!$files = @scandir($source)) {\n if ($GLOBALS['debug_mode'] && is_file($source)) {\n // Debug mode let us set one specific image file as a source.\n $files = array(basename($source));\n $source = dirname($source);\n }\n else {\n logonscreener_log(\"$source not found.\");\n return FALSE;\n }\n }\n\n while (!empty($files)) {\n $key = array_rand($files);\n if (logonscreener_file_change($source . '/' . $files[$key])) {\n break;\n }\n unset($files[$key]);\n }\n\n return TRUE;\n}", "public function watch() {\n\t\t\t$totalFiles = 0;\n\n\t\t\twhile(true) {\n\t\t\t\t$dir = new DirectoryIterator(realpath($this->input_dir));\n\t\t\t\t$numFiles = iterator_count($dir);\n\n\t\t\t\tif($numFiles != $totalFiles) {\n\t\t\t\t\t$totalFiles = $numFiles;\n\n\t\t\t\t\tforeach($dir as $fileinfo) {\n\t\t\t\t\t if(!$fileinfo->isDot() && $fileinfo->isFile()) {\n\t\t\t\t\t \t$filename = $fileinfo->getFilename();\n\t\t\t\t\t \t$ext = pathinfo($filename, PATHINFO_EXTENSION);\n\n\t\t\t\t\t \tif(in_array($ext, array('dat')))\n\t\t\t\t\t \t\t$this->extractInfo($filename);\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsleep(3);\n\t\t\t}\n\t\t}", "public function scanDirectory($directory) {\n global $database;\n\n $check = self::getDirectoryTree($directory, array(\n 'php',\n 'lte'\n ));\n $translation = array();\n foreach ($check as $file_path) {\n $path_info = pathinfo($file_path);\n if ($path_info['extension'] == 'php') {\n if (!$this->parseSourceFile($file_path, $translation)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $this->getError()));\n return false;\n }\n }\n elseif ($path_info['extension'] == 'lte') {\n if (!$this->parseTemplateFile($file_path, $translation)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $this->getError()));\n return false;\n }\n }\n else {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__,\n $this->I18n('The file type <b>{{ file_type }}</b> is not supported!',\n array('file_type' => $path_info['extension']))));\n return false;\n }\n }\n\n foreach ($translation as $entry) {\n $key = self::sanitize($entry['key']);\n $SQL = \"SELECT `i18n_id`, `i18n_key` FROM `\".dbManufakturI18n::getTableName() .\n \"` WHERE `i18n_key`='$key' AND (`i18n_status`='ACTIVE' OR `i18n_status`='IGNORE')\";\n if (null == ($query = $database->query($SQL))) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $database->get_error()));\n return false;\n }\n\n $add_only_source = false;\n if ($query->numRows() > 0) {\n $result = $query->fetchRow(MYSQL_ASSOC);\n $add_only_source = ($result['i18n_key'] == $key) ? true : false;\n }\n\n if ($add_only_source) {\n // entry already exists, keep only the source usage\n $SQL = \"INSERT INTO `\".dbManufakturI18nSources::getTableName().\n \"` (`i18n_id`, `src_path`, `src_file`, `src_line`, `src_module`) VALUES (\".\n \"'{$result[dbManufakturI18n::FIELD_ID]}','{$entry['path']}',\".\n \"'{$entry['file']}','{$entry['line']}','{$entry['module']}')\";\n if (null == ($database->query($SQL))) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $database->get_error()));\n return false;\n }\n }\n else {\n // create a new entry\n $SQL = \"INSERT INTO `\".dbManufakturI18n::getTableName().\"` \".\n \"(`i18n_description`, `i18n_key`, `i18n_last_sync`, `i18n_status`) VALUES ( \".\n \"'', '$key', '\".date(\"Y-m-d H:i:s\", time()).\"', \".\n \"'\".dbManufakturI18n::STATUS_ACTIVE.\"')\";\n if (null == ($database->query($SQL))) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $database->get_error()));\n return false;\n }\n // get the ID for the new entry\n $id = mysql_insert_id();\n // add the standard EN translation\n $author = (isset($_SESSION['DISPLAY_NAME'])) ? $_SESSION['DISPLAY_NAME'] : dbManufakturI18n::AUTHOR_UNKNOWN;\n $SQL = \"INSERT INTO `\".dbManufakturI18nTranslations::getTableName().\"` (\".\n \"`trans_author`, `i18n_id`, `trans_language`, `trans_translation`, \".\n \"`trans_usage`, `trans_type`, `trans_status`) VALUES (\".\n \"'$author','$id','EN','$key','TEXT','REGULAR','ACTIVE')\";\n if (null == ($database->query($SQL))) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $database->get_error()));\n return false;\n }\n // add source usage...\n $SQL = \"INSERT INTO `\".dbManufakturI18nSources::getTableName().\"` (\".\n \"`i18n_id`, `src_path`, `src_file`, `src_line`, `src_module`) VALUES (\".\n \"'$id', '{$entry['path']}', '{$entry['file']}', '{$entry['line']}', '{$entry['module']}')\";\n if (null == ($database->query($SQL))) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $database->get_error()));\n return false;\n }\n }\n }\n return true;\n }", "public function scanDir($dir)\n {\n $objects = scandir($dir);\n\n // unset 2 first elements\n unset($objects[0], $objects[1]);\n\n return $objects;\n }", "function searchFile($directory, $file)\n{\n // Blacklisted directory names - not doing so will provoke an endless loop\n $blacklist = array ( '.idea', '.git', '.', '..');\n\n // Getting a handle on the directory\n $dir_handle = opendir($directory);\n\n // Looping on all the directorie's entry to find the right file\n while(false !== ($entry = readdir($dir_handle)))\n {\n //if($entry != '.' && $entry != '..' && $entry != '.idea' && $entry != '.git')\n if(!in_array($entry, $blacklist))\n {\n // if it's a directory - call back the same function recursively\n if(is_dir($directory. DIRECTORY_SEPARATOR .$entry))\n {\n searchFile($directory . DIRECTORY_SEPARATOR . $entry, $file);\n }\n // If it's a file, test against class name to know if it is the right file\n else if(str_replace(\".php\", \"\", $entry) == get_class_name($file))\n {\n $path = $directory . DIRECTORY_SEPARATOR . $entry;\n add_to_cache($file, $path);\n\n return;\n }\n }\n }\n\n closedir($dir_handle);\n\n\n}", "public function testReadingFiles()\n {\n $dir = __DIR__;\n $f = $this->adapter->java('java.io.File', $dir);\n $paths = $f->listFiles();\n foreach ($paths as $path) {\n self::assertFileExists((string) $path);\n }\n }", "public function scanRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, Dir|File>\n */\n return $this->scanRawRecursive(true, true, $filter, true);\n }", "public function scanDirPaths(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, string>\n */\n return $this->scanRaw(false, true, $filter, false);\n }", "public function discoverPlugins() {\n foreach($this->fs->roots(false) as $root) {\n $this->findAvailablePlugins($root);\n }\n }", "public function testScanFileWithMatchShouldReturnResult(): void\n {\n $processor = new Processor(self::$defaultOptions);\n $fileObject = new \\SplFileObject('vfs://match.php.dist');\n\n $scanResult = $processor->scan($fileObject);\n\n self::assertInstanceOf(ResultContainer::class, $scanResult);\n self::assertCount(1, $scanResult);\n self::assertEquals($fileObject->getPathname(), $scanResult->getPathName());\n self::assertArrayHasKey('test', $scanResult);\n\n $first = $scanResult['test'];\n\n self::assertCount(1, $scanResult);\n self::assertEquals(0, $first->lineNumber);\n self::assertEquals('Awesome {$test}', $first->lineContent);\n self::assertEquals('test', $first->name);\n }", "public function scanDirs(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, Dir>\n */\n return $this->scanRaw(false, true, $filter, true);\n }", "public function scan($directories)\n\t{\n\t\tif (!is_array($directories)) {\n\t\t\t$directories = [$directories];\n\t\t}\n\n\t\tforeach ($directories as $directory) {\n\t\t\tforeach (Finder::findFiles('*.latte', '*.php')->from($directory) as $file) {\n\t\t\t\t$this->extract($file, $directory);\n\t\t\t}\n\t\t}\n\t\treturn $this->compactMessages();\n\t}", "public function &getFolders($folder)\n\t{\n\t\t$registry =& AEFactory::getConfiguration();\n\t\t$breakflag_before_process = $registry->get('volatile.breakflag', false);\n\n\t\t// Reset break flag before continuing\n\t\t$breakflag = false;\n\n\t\t// Initialize variables\n\t\t$arr = array();\n\t\t$false = false;\n\n\t\tif(!is_dir($folder) && !is_dir($folder.'/')) return $false;\n\n\t\t$counter = 0;\n\t\t$registry =& AEFactory::getConfiguration();\n\t\t$maxCounter = $registry->get('engine.scan.smart.large_dir_threshold',100);\n\n\t\t$allowBreakflag = ($registry->get('volatile.operation_counter', 0) != 0) && !$breakflag_before_process;\n\n\t\t$handle = @opendir($folder);\n\t\t/* If opening the directory doesn't work, try adding a trailing slash. This is useful in cases\n\t\t * like this: open_basedir=/home/user/www/ and the root is /home/user/www. Trying to scan\n\t\t * /home/user/www results in error, trying to scan /home/user/www/ succeeds. Duh!\n\t\t */\n\t\tif ($handle === FALSE) {\n\t\t\t$handle = @opendir($folder.'/');\n\t\t}\n\t\t// If directory is not accessible, just return FALSE\n\t\tif ($handle === FALSE) {\n\t\t\t$this->setWarning('Unreadable directory '.$folder);\n\t\t\treturn $false;\n\t\t}\n\n\t\twhile ( (($file = @readdir($handle)) !== false) && (!$breakflag) )\n\t\t{\n\t\t\tif (($file != '.') && ($file != '..'))\n\t\t\t{\n\t\t\t\t// # Fix 2.4: Do not add DS if we are on the site's root and it's an empty string\n\t\t\t\t$ds = ($folder == '') || ($folder == '/') || (@substr($folder, -1) == '/') || (@substr($folder, -1) == DIRECTORY_SEPARATOR) ? '' : DIRECTORY_SEPARATOR;\n\t\t\t\t$dir = $folder . $ds . $file;\n\t\t\t\t$isDir = is_dir($dir);\n\t\t\t\tif ($isDir) {\n\t\t\t\t\t$data = _AKEEBA_IS_WINDOWS ? AEUtilFilesystem::TranslateWinPath($dir) : $dir;\n\t\t\t\t\tif($data) $arr[] = $data;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$counter++;\n\t\t\tif($counter >= $maxCounter) $breakflag = $allowBreakflag;\n\t\t}\n\t\t@closedir($handle);\n\n\t\t// Save break flag status\n\t\t$registry->set('volatile.breakflag', $breakflag);\n\n\t\treturn $arr;\n\t}", "public function testListDirectory()\n {\n $temp = BASE_FOLDER . '/.dev/Tests/Data/Testcases';\n\n $this->options = array(\n 'recursive' => false,\n 'exclude_files' => false,\n 'exclude_folders' => false,\n 'extension_list' => array(),\n 'name_mask' => null\n );\n $this->path = BASE_FOLDER . '/.dev/Tests/Data/Testcases/';\n\n $adapter = new fsAdapter($this->action, $this->path, $this->filesystem_type, $this->options);\n\n $this->assertEquals(1, count($adapter->fs->data));\n\n return;\n }", "function searchForFile($dir, $searchfile)\r\n{\r\n\tglobal $total_loops;\r\n\t// Make sure we do not exceed 80% memory usage. If so, return false to prevent hitting memory limit.\r\n\t// if (memory_get_usage()/1048576 > (int)ini_get('memory_limit')*0.8) return false;\r\n\t// Set max number of loops we'll do\r\n\t$max_loops = 20000;\r\n\t// Trim $dir and make sure it ends with directory separator\r\n\t$dir = rtrim(trim($dir), DS) . DS;\r\n\t// Loop through all files and subdirectories\r\n\tforeach (getDirFiles($dir) as $thisFileOrDir) \r\n\t{\r\n\t\t// Increment loop\r\n\t\t$total_loops++;\r\n\t\t// Stop if we've done over $max_loops loops and reset $total_loops for other processes\r\n\t\tif ($total_loops > $max_loops) {\r\n\t\t\t$total_loops = 0;\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// Set full path of file/dir we're looking at\r\n\t\t$fullPath = $dir.$thisFileOrDir;\r\n\t\t// If it's a file, check if it's the one we're looking for\r\n\t\tif (isFile($fullPath)) {\r\n\t\t\t// Found the file! Return the current directory.\r\n\t\t\tif ($thisFileOrDir == $searchfile) return $dir;\r\n\t\t}\r\n\t\t// If it's a directory, then recursively check all files in that subdirectory\r\n\t\telseif (is_dir($fullPath)) {\r\n\t\t\t// Get return value for this directory\r\n\t\t\t$returnedDir = searchForFile($fullPath, $searchfile);\r\n\t\t\t// If returned a filename and it matches teh search file, return the returned directory\r\n\t\t\tif ($returnedDir !== false) return $returnedDir;\r\n\t\t}\r\n\t}\r\n\t// If didn't find it, return false\r\n\treturn false;\r\n}", "function CheckDir($dir, $startWith = '')\n{\n global $count;\n global $pruned;\n $count++;\n \n echo \"\\r$count ($pruned): Checking $dir \";\n \n $started = false;\n if( !strlen($startWith) )\n $started = true;\n\n // see if this is a directory we need to prune\n if( $started && is_dir(\"$dir/video_2\") )\n {\n PruneDir($dir);\n }\n else\n {\n // recurse into any directories\n $f = scandir($dir);\n foreach( $f as $file )\n {\n if( !$started && $file == $startWith )\n $started = true;\n \n if( $started && is_dir(\"$dir/$file\") && $file != '.' && $file != '..' )\n CheckDir(\"$dir/$file\");\n }\n unset($f);\n }\n}", "public function scanDirsRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, Dir>\n */\n return $this->scanRawRecursive(false, true, $filter, true);\n }", "static function getDirectoryListing();", "function _ft_search_find_files($dir, $q){\r\n\t$output = array();\r\n\tif (ft_check_dir($dir) && $dirlink = @opendir($dir)) {\r\n\t\twhile(($file = readdir($dirlink)) !== false){\r\n\t\t\tif($file != \".\" && $file != \"..\" && ((ft_check_file($file) && ft_check_filetype($file)) || (is_dir($dir.\"/\".$file) && ft_check_dir($file)))){\r\n\t\t\t\t$path = $dir.'/'.$file;\r\n\t\t\t\t// Check if filename/directory name is a match.\r\n\t\t\t\tif(stristr($file, $q)) {\r\n\t\t\t\t\t$new['name'] = $file;\r\n\t\t\t\t\t$new['shortname'] = ft_get_nice_filename($file, 20);\r\n\t\t\t\t\t$new['dir'] = substr($dir, strlen(ft_get_root()));\r\n\t\t\t\t\tif (is_dir($path)) {\r\n if (ft_check_dir($path)) {\r\n \t\t\t\t\t\t$new['type'] = \"dir\";\t\t\t\t\t \r\n \t\t\t\t\t$output[] = $new;\r\n }\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t $new['type'] = \"file\";\r\n \t\t\t\t\t$output[] = $new;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Check subdirs for matches.\r\n\t\t\t\tif(is_dir($path)) {\r\n\t\t\t\t\t$dirres = _ft_search_find_files($path, $q);\r\n\t\t\t\t\tif (is_array($dirres) && count($dirres) > 0) {\r\n\t\t\t\t\t\t$output = array_merge($dirres, $output);\r\n\t\t\t\t\t\tunset($dirres);\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tsort($output);\r\n\t\tclosedir($dirlink);\r\n\t\treturn $output;\r\n\t} else {\r\n\t\treturn FALSE;\r\n\t}\r\n}", "private function listFolderFiles($dir){\n $children = false;\n $isRoot = false;\n if($dir==$this->file_storage){\n $isRoot = true;\n }\n\n $folderName = $this->getFolderName($dir);\n if(!$isRoot){\n //$this->info('Directory Name: '.$folderName['child']);\n //$this->info('Parent Name: '.$folderName['parent']);\n }\n\n //$this->info('Folder: '.$dir);\n\n foreach (new \\DirectoryIterator($dir) as $fileInfo) {\n if (!$fileInfo->isDot()) {\n if ($fileInfo->isDir()) {\n $this->listFolderFiles($fileInfo->getPathname());\n }else{\n $rename = false;\n //$this->info('File: '.$fileInfo->getFilename());\n //$info = new SplFileInfo($dir.'/'.$fileInfo->getFilename());\n $ext = \".\".pathinfo($fileInfo->getFilename(), PATHINFO_EXTENSION);\n //$ext = \".\"$info->getExtension();\n //$this->info('File: extension '.$ext);\n $filebreak = str_replace($ext,\"\",$fileInfo->getFilename());\n if (strpos($filebreak, '.') !== false || strpos($filebreak, \"'\") !== false || strpos($filebreak, \"#\") !== false) {\n $rename = true;\n }\n if($rename){\n $replace = array(\".\", \"'\", \"#\", \";\", \"/\", \"?\", \":\", \"@\", \"=\", \"&\", \",\");\n //“;”, “/”, “?”, “:”, “@”, “=” and “&\n $fileraw = str_replace($replace,\" \",$filebreak);\n //$this->info('File: raw '.$fileraw);\n $newfilename = $fileraw . $ext;\n //$this->info('File: new '.$newfilename);\n $prod_filename = $newfilename;\n rename($dir.'/'.$fileInfo->getFilename(),$dir.'/'.$newfilename);\n }else{\n $prod_filename = $fileInfo->getFilename();\n }\n $this->checkFileExtension($dir.'/'.$prod_filename, $prod_filename, $dir);\n }\n $children = true;\n }else{\n $children = false;\n }\n }\n //$this->info('Children: '.$children);\n\n if(!$isRoot){\n $this->folders[$this->count]['name'] \t\t\t= $folderName['child'];\n $this->folders[$this->count]['parent'] \t\t= $folderName['parent'];\n $this->folders[$this->count]['full_path']\t= $dir;\n $this->folders[$this->count]['children']\t= $children;\n $this->count++;\n }\n //$this->info('#################');\n }", "function parseDir($dir) {\r\n global $zoom;\r\n // start the scan...(open the local dir)\r\n $images = array();\r\n $handle = $zoom->platform->opendir($dir);\r\n while (($file = $zoom->platform->readdir($handle)) != false) {\r\n if ($file != \".\" && $file != \"..\") {\r\n $tag = ereg_replace(\".*\\.([^\\.]*)$\", \"\\\\1\", $file);\r\n $tag = strtolower($tag);\r\n if ($zoom->acceptableFormat($tag)) {\r\n // Tack it onto images...\r\n $images[] = $file;\r\n }\r\n }\r\n }\r\n $zoom->platform->closedir($handle);\r\n return $images;\r\n }", "public function accept()\n {\n /**\n * @var \\SplFileInfo $current\n */\n $current = parent::current();\n if (!$current->isDir()) {\n return false;\n }\n }", "static public function scan_dir($dir = '', $partial = '')\n\t\t{\n\t\t$d = dir($dir);\n\t\twhile ($file = $d->read())\n\t\t\t{\n\t\t\t$full = \"$dir/$file\";\n\t\t\tif (preg_match(\"/^\\./\", $file)) continue;\n\t\t\tif (is_dir($full)) self::scan_dir($full, $partial);\n\t\t\telse {\n\t\t\t\t$class = str_replace('.php', '', $full);\n\t\t\t\t$class = str_replace($partial, '', $class);\n\t\t\t\t$class = str_replace('/', '\\\\', $class);\n\n\t\t\t\tif ($class != \"\\\\Model\\\\Model\"\n\t\t\t\t\t&& strpos($class, 'Model') !== false\n\t\t\t\t\t&& class_exists($class)\n\t\t\t\t\t&& get_parent_class($class) == 'Model'\n\t\t\t\t\t) {\n\t\t\t\t\techo \"\\n\\nFound $class.\";\n\t\t\t\t\t$model = new $class();\n\t\t\t\t\t\\Model\\Create::create($model->my_table(), $model->my_columns());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function scan(Context $context);", "function toIterator($root) {\n $root = realpath($root);\n $iterator = new \\AppendIterator();\n\n if(!file_exists($root))\n die('The components folder could not be found');\n\n $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($root));\n //$directoryIterator->setFlags(\\RecursiveDirectoryIterator::SKIP_DOTS);\n\n return $iterator;\n }", "public function scanDirPathsRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, string>\n */\n return $this->scanRawRecursive(false, true, $filter, false);\n }", "function get_files($instructor=False, $sources=array('class', 'lab', 'project', 'exam', 'review', 'capstone', 'continued-lab'), $file_path = '.', $access=array(), $virtual=array(), $categories=array(), $secret='really') {\n $results = array();\n $basedir = scandir($file_path);\n foreach ($sources as $i => $l0) {\n if (in_array($l0, $basedir) && is_dir($file_path . '/' . $l0)) {\n $level1 = scandir($file_path . '/' . $l0);\n sort($level1);\n foreach ($level1 as $i => $l1) {\n if (substr($l1, 0, 1) != '.' && is_dir($file_path . '/' . $l0 . '/' . $l1)) {\n // The following code allows the system recursively look through the Directory\n // structure within a class, and the system can now process RELATIVE links\n // that go into those subordinate directories\n $level2 = array();\n try {\n $Iterator = new RecursiveIteratorIterator(\n new RecursiveDirectoryIterator($file_path . '/' . $l0 . '/' . $l1),\n RecursiveIteratorIterator::LEAVES_ONLY,\n RecursiveIteratorIterator::CATCH_GET_CHILD);\n foreach($Iterator as $name => $object) {\n $name = explode(\"/\", $name);\n unset($name[2]);\n unset($name[1]);\n unset($name[0]);\n $name = implode(\"/\", $name);\n $level2[] = $name;\n }\n } catch (Exception $e) {\n // Unable to recurse, so don't bother...\n }\n //$level2 = scandir($file_path . '/' . $l0 . '/' . $l1);\n $results[$l0][$l1] = array();\n sort($level2);\n foreach ($level2 as $i => $l2) {\n $key = sha1($secret.$l0.$l1.$l2);\n if (substr($l2, 0, 1) != '.' && validate_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $access)[0]) {\n if (is_link($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2)) {\n if (validate_file($instructor, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $access)[0]) {\n $vf = validate_file($instructor, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $access);\n $category = categorize_file($instructor, $l2, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $vf[5], $categories);\n $results[$l0][$l1][$l2] = array('actual' => $file_path . '/' . $l0 . '/' . $l1 . '/' . readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2),\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n } else {\n $vf = validate_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $access);\n $category = categorize_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $vf[5], $categories);\n $results[$l0][$l1][$l2] = array('actual' => $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2,\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n }\n }\n }\n }\n }\n }\n # Add Virtual files, format like array('class'=>array(1 => array(array('answers.html', 'homework/answers05.html'))))\n foreach ($virtual as $l0 => $l1array) {\n if (isset($results[$l0])) {\n $classes = array_keys($results[$l0]);\n foreach ($l1array as $day => $l2array) {\n if (isset($classes[$day-1])) {\n foreach ($l2array as $i => $values) {\n $virt_file = $values[0];\n $real_file = $values[1];\n if (validate_file($instructor, $real_file, $real_file, $access)[0]) {\n $key = sha1($secret.$real_file.$virt_file);\n $vf = validate_file($instructor, $real_file, $real_file, $access);\n $category = categorize_file($instructor, $virt_file, $real_file, $vf[5], $categories);\n $results[$l0][$classes[$day-1]][$virt_file] = array('actual' => $real_file,\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n }\n }\n }\n }\n }\n #####################################################\n # Verify that the class is not blocked by security...\n $today = getdate();\n foreach ($results as $l0 => $classes) {\n $counter = 1;\n foreach ($classes as $l1 => $data) {\n foreach ($data as $filename => $fdata) {\n if ($fdata['year'] == 1 && $fdata['month'] == 1 && $fdata['day'] == 1) {\n $cate = $fdata['category'];\n if (isset($access[$l0.\"_\".$counter]) && $cate == 'title') {\n $sspec = $l0.\"_\".$counter;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/\".$cate])) {\n $sspec = $l0.\"_\".$counter.\"/\".$cate;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/\".$filename])) {\n $sspec = $l0.\"_\".$counter.\"/\".$filename;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/all\"])) {\n $sspec = $l0.\"_\".$counter.\"/all\";\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n }\n }\n }\n $counter++;\n }\n }\n return $results;\n }", "private function recurseThroughDirectory($baseDir, $lookingFor = \"/(.*)\\.php$/i\")\n {\n $results = array();\n $di = new RecursiveDirectoryIterator($baseDir);\n\n $this->output->writeLn(\"Scanning $baseDir...\");\n\n foreach (new RecursiveIteratorIterator($di) as $filename => $file) {\n if (preg_match($lookingFor, $filename)) {\n $results[] = $this->extractFrom($filename);\n }\n }\n\n return $results;\n }", "public function scan($path, $recursive = self::SCAN_RECURSIVE, $reuse = -1) {\n\t\tif ($reuse === -1) {\n\t\t\t$reuse = ($recursive === self::SCAN_SHALLOW) ? self::REUSE_ETAG | self::REUSE_SIZE : 0;\n\t\t}\n\t\t$this->scanFile($path, $reuse);\n\t\treturn $this->scanChildren($path, $recursive, $reuse);\n\t}", "public function test_search_by_extension()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search_by_extension(array('php'));\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n }", "public function scanDirNamesRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string>\n */\n return $this->scanRawRecursive(false, true, $filter, null);\n }", "protected function scan_directory($target) {\n $files = array();\n $target_images = $this->get_target_images();\n $target_components = explode(DIRECTORY_SEPARATOR, $target);\n $target = implode(DIRECTORY_SEPARATOR, $target_components);\n $target_length = strlen($target) + 1;\n\n $patterns = array(\n $target,\n '.xml'\n );\n $datatypes = array(\n '-01.tif',\n '-01.jpg',\n );\n\n $images = file_scan_directory($target_images, '/.*-01.*/');\n $xml = file_scan_directory($target, '/.*.xml$/');\n foreach ($xml as $uri => $value) {\n if (strpos($uri, '.xml') !== FALSE) {\n foreach ($datatypes as $datatype) {\n $replacements = array($target_images, $datatype);\n // Only process xml if there is a matching image to go with it.\n $matching_image = str_replace($patterns, $replacements, $value->uri);\n if (!empty($images[$matching_image])) {\n $files[substr($uri, $target_length)] = $value;\n }\n }\n }\n }\n return $files;\n }", "function dirtree($dir, $f, &$ret, $search=null, $directory=null)\n\t{\n\t\t\n\t\t$tree = array();\n\t\t$uri = $dir.'/'.$f;\n\t\t$uri = str_replace(\"//\", \"/\", $uri);\n\t\t$handler = @opendir($uri);\n\t\t//open all directories\n\t\twhile ($file = @readdir($handler)) \n\t\t{\n \tif ($file != '.' && $file != '..')\n \t{\n \t\t$items = $dir.'/'.$f;\n \t\tif(is_dir($items.'/'.$file))\n \t\t{\n \t\t\tif($file[0] !='.')\n \t\t\t{\n\t \t\t\tif($search == null)\n\t \t\t\t\tdirtree($items, $file, $tree);\n\t \t\t\telse\n\t \t\t\t{\n\t \t\t\t\tif($directory != '')\n\t \t\t\t\t\t$src = $directory.'/'.$file;\n\t \t\t\t\telse\n\t \t\t\t\t\t$src = $file;\n\t \t\t\t\tdirtree($items, $file, &$ret,$search, $src);\n\t \t\t\t}\n \t\t\t}\n \t\t}\n \t\telse if($search != null) // If search mode true\n \t\t{\n \t\t\t$file_parts = pathinfo($file);\n\t \t\tif(strstr(strtolower($file),strtolower($search))) // If search string is in file name\n\t \t\t{\n\t \t\t\tif($directory != '') // If root dir\n \t\t\t\t\t$src = $directory.'/'.$file;\n \t\t\t\telse\n \t\t\t\t\t$src = $file;\n\t \t\t\t$item = array( 'src' => $src, 'file' => $file); \n\t \t\t\tif(isset($param))\n\t \t\t\t$param=\"\";\n\t \t\t\tif( @!is_dir($param.$file)) // If not dir and is picture file.\n\t \t\t\t{\n\t \t\t\t\t\n\t \t\t\t\tif(strtolower($file_parts['extension']) == 'jpeg' || strtolower($file_parts['extension']) == 'jpg' || strtolower($file_parts['extension']) == 'png' || strtolower($file_parts['extension']) == 'gif' || strtolower($file_parts['extension']) == 'bmp')\n\t \t\t\t\t{\t\n\t \t\t\t\t\t$uri = $dir.'/'.$f.'/'.$file;\n\t\t\t\t\t\t\t\t$uri = str_replace(\"//\", \"/\", $uri);\n\t \t\t\t\t\t@$size = getimagesize($uri);\n\t \t\t\t\t\t@$item['x'] = $size[0];\n\t \t\t\t\t\t@$item['y'] = $size[1];\n\t \t\t\t\t\tarray_push($ret, $item);\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t}\n \t\t}\n \t}\n \t}\n \tif($search === null) // Add dir to aray\n \t{\n \t\t$it = array('name' => $f,'items' => $tree);\n \t\tarray_push($ret,$it);\n \t}\n\t}", "function processDir($dir, $link) {\n\t\tif(is_dir($dir)) {\n\t\t\t$currentDir = scandir($dir);\n\t\t\tforeach ($currentDir as $key => $value)\t{\n\t\t\t\tif (!in_array($value,array(\".\", \"..\", \".DS_Store\")))\t{\n\t\t\t\t\tif (is_dir($dir . \"/\" . $value)) {\n\t\t\t\t\t\t$this->processDir($dir . \"/\" . $value, $link);//Recursive\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$metaFileNameFound = \"\";\n\t\t\t//Search the link in the meta files\n\t\t\tforeach (glob($dir.\"/*.meta.xml\") as $file) {\n\t\t\t\t$content = file_get_contents($file);\n\t\t\t\tif (strpos($content, $link) !== false) {\n\t\t\t\t\t//TODO: Optimisation: Memorize the link and the file path together For reusablilty.\n\t\t\t\t\treturn $file;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}", "function buscar($dir,&$archivo_buscar) \n{ // Funcion Recursiva \n // Autor DeeRme \n // http://deerme.org \n if ( is_dir($dir) ) \n { \n // Recorremos Directorio \n $d=opendir($dir); \n while( $archivo = readdir($d) ) \n { \n if ( $archivo!=\".\" AND $archivo!=\"..\" ) \n { \n \n if ( is_file($dir.'/'.$archivo) ) \n { \n // Es Archivo \n if ( $archivo == $archivo_buscar ) \n { \n return ($dir.'/'.$archivo); \n } \n \n } \n \n if ( is_dir($dir.'/'.$archivo) ) \n { \n // Es Directorio \n // Volvemos a llamar \n $r=buscar($dir.'/'.$archivo,$archivo_buscar); \n if ( basename($r) == $archivo_buscar ) \n { \n return $r; \n } \n \n \n } \n \n \n \n \n \n } \n \n } \n \n } \n return FALSE; \n}", "public function test_scan_document()\n {\n $ocr = new \\App\\Modules\\OCR\\OCR();\n\n $location = $ocr->image(__DIR__ . '/test.png')->process('test.txt');\n\n PHPUnit::assertEquals(\n \"/Users/mark.fluehmann/Documents/60.Technik/Code/cerbo/storage/app/ocr/test.txt\",\n $location,\n );\n\n $content = file_get_contents($location);\n\n PHPUnit::assertTrue(\n strpos($content, 'Bundesrat') > 0\n );\n\n }", "private function recSearchFiles($dir)\n {\n $ffs = scandir($dir);\n\n foreach ($ffs as $ff) {\n\n if ($ff != '.' && $ff != '..') {\n\n if (is_dir($dir . '/' . $ff)) {\n $this->recSearchFiles($dir . $ff . '/');\n } else if (strlen($ff) >= 5) {\n $this->searchedFiles[] = $dir . $ff;\n }\n }\n }\n }", "static private function find_contents($dir)\n {\n $result = array();\n $root = scandir($dir);\n foreach ($root as $value) {\n if ($value === '.' || $value === '..') {\n continue;\n }\n if (is_file($dir . DIRECTORY_SEPARATOR . $value)) {\n if (! self::$ext_filter || in_array(strtolower(pathinfo($dir . DIRECTORY_SEPARATOR . $value, PATHINFO_EXTENSION)), self::$ext_filter)) {\n self::$files[] = $result[] = $dir . DIRECTORY_SEPARATOR . $value;\n }\n continue;\n }\n if (self::$recursive) {\n foreach (self::find_contents($dir . DIRECTORY_SEPARATOR . $value) as $value) {\n self::$files[] = $result[] = $value;\n }\n }\n }\n // Return required for recursive search\n return $result;\n }" ]
[ "0.7979879", "0.77180135", "0.7239821", "0.71102506", "0.68057096", "0.676981", "0.65207386", "0.64884", "0.6479395", "0.639054", "0.6378024", "0.6366621", "0.63291353", "0.62446964", "0.61983824", "0.61747074", "0.6162355", "0.6128189", "0.6079859", "0.6079535", "0.6075999", "0.6058093", "0.60260195", "0.60008717", "0.59994924", "0.5991255", "0.59684193", "0.59668815", "0.5936124", "0.5917058", "0.5896349", "0.5878318", "0.5870553", "0.5830011", "0.5826411", "0.5818301", "0.5785676", "0.5785122", "0.5768685", "0.5766073", "0.5763065", "0.5754492", "0.5753943", "0.57364917", "0.5734635", "0.5701144", "0.56872267", "0.56670177", "0.564201", "0.56160676", "0.5607403", "0.55691326", "0.55031574", "0.54869455", "0.54824877", "0.54781014", "0.5471294", "0.54683334", "0.54626954", "0.5444092", "0.5438938", "0.54094726", "0.5408548", "0.5408071", "0.5394411", "0.5394271", "0.5369407", "0.53654283", "0.5360352", "0.53588223", "0.5356523", "0.53506756", "0.5345445", "0.53342855", "0.53291863", "0.53284246", "0.53276336", "0.5320366", "0.53109795", "0.53107804", "0.53085136", "0.53069144", "0.52990305", "0.52935886", "0.52637327", "0.5263339", "0.52570695", "0.52493036", "0.5236209", "0.52283305", "0.52249384", "0.5215173", "0.5208341", "0.51961946", "0.5195224", "0.51857895", "0.5182123", "0.51817554", "0.51800835", "0.51743543" ]
0.77456445
1
Test for Directory::scan() Scan only the directories inside ROOT directory
Тест для Directory::scan() Сканирование только директорий внутри корневой директории
public function test_scan_directories() { $content = array('.','..','application','.git','nbproject','system'); $object = Directory::factory(ROOT); $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_DIRS); $this->assertEquals(count($content), count($res)); foreach($res as $path=>$dir){ $this->assertTrue(in_array($dir->get_base_name(), $content)); $this->assertInstanceOf('\Kaili\Directory', $dir); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function scanFolder()\n {\n return scandir($this->currentPath);\n }", "function rScanDir($scanMe) {\r\n\t\tglobal $path, $tmpPath, $cur_folder, $tags2;\r\n\t\tforeach($scanMe as $folder)\r\n\t\t{\r\n\t\t\tif(is_dir($path.$tmpPath.$folder) && $folder !=\".\" && $folder !=\"..\")\r\n\t\t\t{\r\n\t\t\t\t$cur_folder[] = $tmpPath.$folder;\r\n\t\t\t\techo \"getTagString input:\".$tmpPath.$folder.\"<br/>\";\r\n\t\t\t\t$tags2[] = getTagString($tmpPath.$folder);\r\n\t\t\t\t$tmpPath .= $folder.\"/\";\r\n\t\t\t\trScanDir(scandir($path.$tmpPath));\r\n\t\t\t}\r\n\t\t}\r\n\t\t$tmpPath = substr($tmpPath, 0, strrpos($tmpPath, \"/\"));\r\n\t\t$tmpPath = substr($tmpPath, 0, strrpos($tmpPath, \"/\")+1);\r\n\t}", "function DNUI_scan_dir($dirBase) {\r\n return array_diff(scandir($dirBase), array('..', '.'));\r\n}", "public function test_scan()\n {\n $content = array('.','..','application','.git','.gitignore','.htaccess','index.php','nbproject','README','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC);\n \n $output = array();\n foreach($res as $f) $output[] = $f->get_base_name();\n $this->assertEquals($content, $output);\n }", "public function test_scan_files()\n {\n $content = array('.gitignore','.htaccess','index.php','README');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_FILES);\n \n $this->assertEquals(count($content), count($res));\n foreach($res as $path=>$dir){\n $this->assertTrue(in_array($dir->get_base_name(), $content));\n $this->assertInstanceOf('\\Kaili\\File', $dir);\n }\n }", "private function __scanDir($dir) {\n\n if ($dir == '/') {\n $dir = $this->startDirectory;\n $this->__currentDirectory = $dir;\n }\n\n $strippedDir = str_replace('/', '', $dir);\n\n $dir = ltrim($dir, \"/\");\n\n // Prevent listing blacklisted directories\n if (in_array($strippedDir, $this->ignoredDirectories)) {\n return false;\n }\n\n if (! file_exists($dir) || !is_dir($dir)) {\n return false;\n }\n\n return scandir($dir);\n }", "protected function scanDir()\n {\n $this->moduleList = [];\n foreach ($this->getVendorList() as $vendorName) {\n $this->moduleList[$vendorName] = [];\n }\n\n $this->readModules();\n }", "private function directoryScan($dir) {\n\t\t\n\t\t// check for the validity of input / working directory\n\t\t\n\t\tif (!is_dir($dir)) {\n\t\t\tdie(\"'$dir' is not a directory.\".LE);\n\t\t}\n\t\t\n\t\t// listing directory contents\n\t\t\n\t\t$result = [];\n\t\t\n\t\t$root = scandir($dir);\n\t\tforeach($root as $value)\n\t\t{\n\t\t\t// removing dots & output directory\n\t\t\t\n\t\t\tif($value === '.' || $value === '..') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// listing only files\n\t\t\t\n\t\t\tif(is_file(\"$dir\".DS.\"$value\")) {\n\t\t\t\t$result[$value]=\"$dir\".DS.\"$value\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// recursive call to self(this method) so we can get files listing recursively\n\t\t\t\n\t\t\tforeach($this->directoryScan(\"$dir\".DS.\"$value\") as $value1)\n\t\t\t{\n\t\t\t\t$result[basename($value1)]=$value1;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "function scanDir() {\r\n $returnArray = array();\r\n \r\n if ($handle = opendir($this->uploadDirectory)) {\r\n \r\n while (false !== ($file = readdir($handle))) {\r\n if (is_file($this->uploadDirectory.\"/\".$file)) {\r\n $returnArray[] = $file;\r\n }\r\n }\r\n \r\n closedir($handle);\r\n }\r\n else {\r\n die(\"<b>ERROR: </b> No se puede leer el directorio <b>\". $this->uploadDirectory.'</b>');\r\n }\r\n return $returnArray; \r\n }", "function scanDir($cfg) //$view, $tdir , $subdir='', $match)\n {\n $ff = HTML_FlexyFramework::get();\n \n $subdir = $cfg['subdir'];\n $scandir = $cfg['tdir']. (empty($subdir) ? '' : '/') . $subdir;\n \n if (in_array($subdir, $cfg['skipdir'])) {\n return array();\n }\n // skip dom_templates\n \n if (!file_exists($scandir)) {\n return array();\n }\n $dh = opendir($scandir);\n if(!$dh){\n return array(); // something went wrong!?\n }\n $ret = array();\n \n while (($fn = readdir($dh)) !== false) {\n // do we care that it will try and parse the template directory??? - not really..\n // as we are only looking for php files..\n if(empty($fn) || $fn[0] == '.'){\n continue;\n }\n \n $fullpath = $scandir.(empty($scandir) ? '' : \"/\").$fn;\n // echo \"filename: $fullpath \\n\";\n \n if (is_link($fullpath)) {\n continue;\n }\n \n if(is_dir($fullpath)){\n // then recursively call self...\n $cfg['subdir'] = $subdir . (empty($subdir) ? '' : '/') . $fn;\n $children = $this->scanDir($cfg);\n if (count($children)) {\n $ret = array_merge($ret, $children);\n \n }\n continue;\n \n }\n \n if (!preg_match($cfg['match'], $fn) || !is_file($fullpath)) {\n continue;\n }\n \n \n \n $ret[] = $subdir . (empty($subdir) ? '' : '/'). $fn; /// this used to be strtolower?? why???\n\n \n \n }\n// print_r($ret);\n \n return $ret;\n \n \n \n \n }", "function dirscan_files($rootFolder){\n $fileNames=[]; // will get filled\n foreach (scandir($rootFolder) as $name){\n if ($name=='.' || $name=='..') continue;\n if (!is_dir($rootFolder.\"/\".$name)) $fileNames[]=$name;\n }\n sort($fileNames);\n return $fileNames;\n}", "function scan_dir($dir){\n\tif( !is_dir( $dir ) )\n\t\treturn false;\n\n\t$files=scandir($dir);\n\n\t$dirs=array();\n\tforeach($files as $file){\n\t\tif($file=='.'||$file=='..'||substr($file,0,1)=='.')\n\t\t\tcontinue;\n\t\tif(is_dir($dir.'/'.$file))\n\t\t\tarray_push($dirs,$file);\n\t}\n\n\treturn $dirs;\n}", "function RecursiveScanDir($dir, $prefix = '') {\n\t$dir = rtrim($dir, '\\\\/');\n\t$result = array();\n\tforeach (scandir($dir) as $f) {\n if (\n preg_match('`/tmp/`', \"$dir/$f\")\n || preg_match('`/fpdf.php$`', \"$dir/$f\")\n || preg_match('`/libs/pi_barcode.php$`', \"$dir/$f\")\n || preg_match('`/libs/phpmailer/`', \"$dir/$f\")\n || preg_match('`/libs/securimage/`', \"$dir/$f\")\n || preg_match('`/libs/Smarty/`', \"$dir/$f\")\n )\n continue;\n\t\tif ($f !== '.' and $f !== '..') {\n\t\t\tif (is_dir(\"$dir/$f\")) {\n\t\t\t\t$result = array_merge($result, RecursiveScanDir(\"$dir/$f\", \"$prefix$f/\"));\n\t\t\t} else {\n\t\t\t\tif ( strtolower(substr(pathinfo($f,PATHINFO_EXTENSION),0,3)) == \"php\" && pathinfo(__FILE__,PATHINFO_BASENAME ) != pathinfo($f,PATHINFO_BASENAME ) )\n\t\t\t\t\t$result[] = $prefix.$f;\n\t\t\t}\n\t\t}\n\t}\n\treturn $result;\n}", "private function scan_directory($dir, $scan = \"\", &$nb_files = 0, &$nb_errors = 0){\n\t\t//Si c est la ou on etait , alors on reprend\n\t\tif ($dir == $scan or $scan == \"\"){\n\t\t\t$scan = \"\";\n\t\t\tDB::delete(\"delete from movies where directory = ?\",array($dir));\n\t\t\t$files = scandir($dir);\n\t\t\tforeach ($files as $file){\n\t\t\t\tif ($file != \"..\" and $file != \".\"){\n\t\t\t\t\tif (is_dir($dir.\"/\".$file)){\n\t\t\t\t\t\t$this->scan_directory($dir.\"/\".$file, $scan, $nb_files, $nb_errors);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tforeach (config(\"app.MOVIES_FILES\") as $ext){\n\t\t\t\t\t\t\tif (stripos($file,\".\".$ext) !== false){\n\t\t\t\t\t\t\t\t//Analyse du fichier\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$movie = new Movie();\n\t\t\t\t\t\t\t\t//On rajoute le fichier en base\t\t\t\t\t\n\t\t\t\t\t\t\t\t$movie->directory = $dir;\n\t\t\t\t\t\t\t\t$movie->filename = $file;\n\t\t\t\t\t\t\t\t$movie->status = -1;\n\t\t\t\t\t\t\t\t$movie->save();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t$movie->name = $this->remove($file);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$movie->status = 1;\n\t\t\t\t\t\t\t\t\t$movie->save();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$nb_files++;\n\t\t\t\t\t\t\t\t}catch(\\Exception $e){\n\t\t\t\t\t\t\t\t\t//Next...\n\t\t\t\t\t\t\t\t\t$nb_errors++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$json = [];\n\t\t\t$json[\"updated\"] = date(\"Y-m-d H:i:s\");\n\t\t\t$json[\"nb_files\"] = $nb_files;\n\t\t\t$json[\"nb_errors\"] = $nb_errors;\n\t\t\t$json[\"scan\"] = $scan;\n\t\t\tfile_put_contents(storage_path().\"/scan_movies.txt\",json_encode($json));\n\t\t}else{\n\t\t\t//Sinon, on reparcourt a partir de l'endroit, ou on etait\n\t\t\t$files = scandir($dir);\n\t\t\tforeach ($files as $file){\n\t\t\t\tif ($file != \"..\" and $file != \".\"){\n\t\t\t\t\tif (is_dir($dir.\"/\".$file)){\n\t\t\t\t\t\t$this->scan_directory($dir.\"/\".$file, $scan, $nb_files, $nb_errors);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function bob_scandir($root_path, $bad_path, $recursive) {\n $output = array();\n if (file_exists($root_path)){\n $paths = scandir($root_path);\n if ($paths === False)\n return False;\n foreach ($paths as $path) {\n $potential_path = \"${root_path}/${path}\";\n\n // Ignore any files in the bad (admin) path or files that begin with a period.\n if ($potential_path == $bad_path or $path[0] == '.')\n continue;\n\n $output[] = $potential_path;\n $bad_folder = ''; // not sure what this is for\n if ($recursive and is_dir($potential_path)) // Recursively descend and print out files.\n $output = array_merge($output, bob_scandir($potential_path, $bad_folder, $recursive));\n }\n }\n return $output;\n}", "function scan_directory($dir, $ext = '*', $recurse = true) {\n $files = array ();\n if ($handle = opendir($dir)) {\n while (false !== ($file = readdir($handle))) {\n if ($file == '.' || $file == '..' ||\n $file == 'CVS' || preg_match('|^\\.|', $file)) {\n continue;\n }\n if (is_link($dir . '/' . $file)) {\n continue;\n }\n if (is_dir ($dir . '/' . $file)) {\n if ($recurse == true)\n $files = array_merge($files, scan_directory ($dir . '/' . $file, $ext));\n } else {\n if($ext == get_file_extension($file) || $ext == '*') {\n $files[] = $dir . '/' . $file;\n }\n }\n }\n closedir($handle);\n }\n return $files;\n}", "function searchDir($root,$path,&$data)\n\t{\n\t\t$full_path = $root.$path;\n\t\tif(is_dir($full_path))\n\t\t{\n\t\t\t$dp=dir($full_path);\n\t\t\twhile($file=$dp->read())\n\t\t\t{\n\t\t\t\tif($file!='.'&& $file!='..')\n\t\t\t\t{\n\t\t\t\t\tsearchDir($root,$path.'/'.$file,$data);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$dp->close();\n\t\t}\n\t\tif(is_file($full_path))\n\t\t{\n\t\t\t$data[]=$path;\n\t\t}\n\t}", "public function test_search()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search('/(index.php|.htaccess)/');\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n $this->assertArrayHasKey(ROOT.DS.'.htaccess', $res);\n }", "function scan_dir($dir, $type=array(),$only=FALSE, $allFiles=FALSE, $recursive=TRUE, $onlyDir=\"\", &$files){\n\t$handle = @opendir($dir);\n\tif(!$handle)\n\t\treturn false;\n\twhile ($file = @readdir ($handle))\n\t{\n\t\tif (eregi(\"^\\.{1,2}$\",$file) || $file == 'index.html')\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\t\tif(!$recursive && $dir != $dir.$file.\"/\")\n\t\t{\n\t\t\tif(is_dir($dir.$file))\n\t\t\t\tcontinue;\n\t\t}\n\t\tif(is_dir($dir.$file))\n\t\t{\n\t\t\tscan_dir($dir.$file.\"/\", $type, $only, $allFiles, $recursive, $file, $files);\n\t\t}\n\t\telse\n\t\t{\n if($only)\n\t\t\t\t$onlyDir = $dir;\n\n\t\t\t$files = buildArray($dir,$file,$onlyDir,$type,$allFiles,$files);\n\t\t}\n\t}\n\t@closedir($handle);\n\treturn $files;\n}", "function dirscan_folders($rootFolder){\n $folderNames=[]; // will get filled\n foreach (scandir($rootFolder) as $name){\n if ($name=='.' || $name=='..') continue;\n if (is_dir($rootFolder.\"/\".$name)) \n $folderNames[]=$name;\n }\n sort($folderNames);\n return $folderNames;\n}", "public function scanSourceFolders() {\n $this->addons = [];\n foreach ($this->sources as $sourceDir) {\n $this->scanSource($sourceDir);\n }\n }", "function scanFiles($dir){\n $path = __DIR__ . DIRECTORY_SEPARATOR . $dir; /** Nurodomas kelias iki jsons folderio */\n $files = scandir($path); /** Nuskenuoja folderi pagal kelia($path) ir grazina esanciu failu masyva */\n\n return $files;\n}", "public function scanDirsRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, Dir>\n */\n return $this->scanRawRecursive(false, true, $filter, true);\n }", "function scan_directory_recursively($directory, $filter=FALSE)\n{\n\tif(substr($directory,-1) == '/')\n\t{\n\t\t$directory = substr($directory,0,-1);\n\t}\n\tif(!file_exists($directory) || !is_dir($directory))\n\t{\n\t\treturn FALSE;\n\t}elseif(is_readable($directory))\n\t{\n\t\t$directory_list = opendir($directory);\n\t\twhile($file = readdir($directory_list))\n\t\t{\n\t\t\tif($file != '.' && $file != '..' && $file != '.DS_Store' && $file != '.svn')\n\t\t\t{\n\t\t\t\t$path = $directory.'/'.$file;\n\t\t\t\tif(is_readable($path))\n\t\t\t\t{\n\t\t\t\t\t$subdirectories = explode('/',$path);\n\t\t\t\t\tif(is_dir($path))\n\t\t\t\t\t{\n\t\t\t\t\t\t$directory_tree[] = array(\n\t\t\t\t\t\t\t'path' => $path,\n\t\t\t\t\t\t\t'name' => end($subdirectories),\n\t\t\t\t\t\t\t'modified'\t=> filemtime($path),\n\t\t\t\t\t\t\t'kind' => 'directory',\n\t\t\t\t\t\t\t'content' => scan_directory_recursively($path, $filter));\n\t\t\t\t\t}elseif(is_file($path))\n\t\t\t\t\t{\n\t\t\t\t\t\t$extension = end(explode('.',end($subdirectories)));\n\t\t\t\t\t\tif($filter === FALSE || $filter == $extension)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Get metadata and image dimensions\n\t\t\t\t\t\t\t$size = getimagesize($path, $info);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Get containing directory of file\n\t\t\t\t\t\t\t$directory_array = explode('/', $path);\n\t\t\t\t\t\t\t$parent_folder = min($directory_array);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Reset title, caption, tags\n\t\t\t\t\t\t\t$title = $caption = $taglist = $tags = '';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$directory_tree[] = array(\n\t\t\t\t\t\t\t'path'\t\t=> dirname($path),\n\t\t\t\t\t\t\t'group'\t\t=> $parent_folder,\n\t\t\t\t\t\t\t'file'\t\t=> end($subdirectories),\n\t\t\t\t\t\t\t'extension' => $extension,\n\t\t\t\t\t\t\t'size'\t\t=> filesize($path),\n\t\t\t\t\t\t\t'width'\t\t=> $size[0],\n\t\t\t\t\t\t\t'height'\t=> $size[1],\n\t\t\t\t\t\t\t'modified'\t=> filemtime($path),\n\t\t\t\t\t\t\t'title'\t\t=> $title,\n\t\t\t\t\t\t\t'caption'\t=> $caption,\n\t\t\t\t\t\t\t'tags'\t\t=> $tags,\n\t\t\t\t\t\t\t'kind'\t\t=> '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\t\tclosedir($directory_list); \n\t\treturn $directory_tree;\n\t}else{\n\t\treturn FALSE;\t\n\t}\n}", "function scan(SplFileInfo $fileInfo, $repository)\n{\n $baseName = $fileInfo->getBasename();\n if ($baseName === '.' || $baseName === '..') {\n return;\n }\n\n $file = new File($fileInfo);\n $repository->save($file);\n if ($fileInfo->isDir()) {\n foreach (new RecursiveDirectoryIterator($fileInfo) as $child) {\n scan($child, $repository);\n }\n }\n}", "function scan($dir){\n\n\t$files = array();\n\n\t// Is there actually such a folder/file?\n\n\tif(file_exists($dir)){\n\t\n\t\tforeach(scandir($dir) as $f) { // scandir() accepts the full path of the folder to be scanned\n\t\t\n\t\t\tif(!$f || $f[0] == '.') {\n\n\t\t\t\t// It is a hidden file\n\t\t\t\t\n\t\t\t\tcontinue; \n\t\t\t}\n\n\t\t\tif(is_dir($dir . '/' . $f)) {\n\n\t\t\t\t// The path is a folder\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"folder\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"items\" => scan($dir . '/' . $f) // Recursively get the contents of the folder\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\n\t\t\t\t// It is a file\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"file\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"size\" => filesize($dir . '/' . $f) // Gets the size of this file\n\t\t\t\t);\n\t\t\t}\n\n\t\t}\n\t\n\t}\n\n\treturn $files;\n}", "public function scanDirs(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, Dir>\n */\n return $this->scanRaw(false, true, $filter, true);\n }", "protected function scanDirectory($dir, $include_tests) {\n $files = array();\n\n // In order to scan top-level directories, absolute directory paths have to\n // be used (which also improves performance, since any configured PHP\n // include_paths will not be consulted). Retain the relative originating\n // directory being scanned, so relative paths can be reconstructed below\n // (all paths are expected to be relative to $this->root).\n $dir_prefix = ($dir == '' ? '' : \"$dir/\");\n $absolute_dir = ($dir == '' ? $this->root : $this->root . \"/$dir\");\n\n if (!is_dir($absolute_dir)) {\n return $files;\n }\n // Use Unix paths regardless of platform, skip dot directories, follow\n // symlinks (to allow extensions to be linked from elsewhere), and return\n // the RecursiveDirectoryIterator instance to have access to getSubPath(),\n // since SplFileInfo does not support relative paths.\n $flags = \\FilesystemIterator::UNIX_PATHS;\n $flags |= \\FilesystemIterator::SKIP_DOTS;\n $flags |= \\FilesystemIterator::FOLLOW_SYMLINKS;\n $flags |= \\FilesystemIterator::CURRENT_AS_SELF;\n $directory_iterator = new \\RecursiveDirectoryIterator($absolute_dir, $flags);\n\n // Filter the recursive scan to discover extensions only.\n // Important: Without a RecursiveFilterIterator, RecursiveDirectoryIterator\n // would recurse into the entire filesystem directory tree without any kind\n // of limitations.\n $filter = new RecursiveExtensionFilterIterator($directory_iterator);\n $filter->acceptTests($include_tests);\n\n // The actual recursive filesystem scan is only invoked by instantiating the\n // RecursiveIteratorIterator.\n $iterator = new \\RecursiveIteratorIterator($filter,\n \\RecursiveIteratorIterator::LEAVES_ONLY,\n // Suppress filesystem errors in case a directory cannot be accessed.\n \\RecursiveIteratorIterator::CATCH_GET_CHILD\n );\n\n foreach ($iterator as $key => $fileinfo) {\n $name = $fileinfo->getBasename('.info.yml');\n\n if ($this->fileCache && $cached_extension = $this->fileCache->get($fileinfo->getPathName())) {\n $files[$cached_extension->getType()][$key] = $cached_extension;\n continue;\n }\n\n // Determine extension type from info file.\n $type = FALSE;\n $file = $fileinfo->openFile('r');\n while (!$type && !$file->eof()) {\n preg_match('@^type:\\s*(\\'|\")?(\\w+)\\1?\\s*$@', $file->fgets(), $matches);\n if (isset($matches[2])) {\n $type = $matches[2];\n }\n }\n if (empty($type)) {\n continue;\n }\n $name = $fileinfo->getBasename('.info.yml');\n $pathname = $dir_prefix . $fileinfo->getSubPathname();\n\n $filename = $name . '.' . $type;\n\n if (!file_exists(dirname($pathname) . '/' . $filename)) {\n $filename = NULL;\n }\n\n $extension = new Extension($this->root, $type, $pathname, $filename);\n\n // Track the originating directory for sorting purposes.\n $extension->subpath = $fileinfo->getSubPath();\n $extension->origin = $dir;\n\n $files[$type][$key] = $extension;\n\n if ($this->fileCache) {\n $this->fileCache->set($fileinfo->getPathName(), $extension);\n }\n }\n return $files;\n }", "public function scanDirPathsRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, string>\n */\n return $this->scanRawRecursive(false, true, $filter, false);\n }", "function dynamik_skins_folder_scan( $skin_check = false )\n{\n\tif( dynamik_dir_check( dynamik_get_skins_folder_path() ) )\n\t{\n\t\t$skin_folder_names = scandir( dynamik_get_skins_folder_path() );\n\t\tif( false != $skin_check )\n\t\t{\n\t\t\tif( in_array( $skin_check, $skin_folder_names ) )\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t}\n\telse\n\t{\n\t\treturn;\n\t}\t\n}", "function scan($dir){\n\n\t$files = array();\n\n\t// Is there actually such a folder/file?\n\n\tif(file_exists($dir)){\n\t\n\t\tforeach(scandir($dir) as $f) {\n\t\t\n\t\t\tif(!$f || $f[0] == '.') {\n\t\t\t\tcontinue; // Ignore hidden files\n\t\t\t}\n\n\t\t\tif(is_dir($dir . '/' . $f)) {\n\n\t\t\t\t// The path is a folder\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"folder\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"items\" => scan($dir . '/' . $f) // Recursively get the contents of the folder\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\n\t\t\t\t// It is a file\n\t\t\t\t$path_info = pathinfo($f);\n\t\t\t\t//if ($path_info && $path_info.extension )\n\t\t\t\t$ext = $path_info['extension'];\n\t\t\t\tif($ext =='html'||$ext =='jpg' || $ext ==='png' || $ext == 'pdf'){\n\t\t\t\t\t$text = ($ext =='html') ?'doc':'image';\n\t\t\t\t\t$files[] = array(\n\t\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\t\"type\" => \"file\",\n\t\t\t\t\t\t\"text\" => $text,\n\t\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\t\"size\" => filesize($dir . '/' . $f) // Gets the size of this file\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t}\n\n\treturn $files;\n}", "private static function __fordeepscan($dir, $file)\n {\n $path = \"\";\n $scan = glob($dir.'/*');\n $q = preg_quote($file, '\\\\');\n\n if (is_array($scan))\n {\n foreach ($scan as $d => $f)\n {\n if ($f != '.' && $f != '..')\n {\n $f = preg_replace(\"/[\\/]{1,}/\", '/', $f);\n\n if (!is_dir($f))\n {\n $base = basename($f);\n\n if (($base == $file) && strrpos($f, $file) !== false)\n {\n $path = $f;\n }\n\n $base = null;\n }\n\n if ($path == \"\")\n {\n $path = self::__fordeepscan($f, $file);\n if ($path !== \"\"){\n if (strrpos($path, $file) !== false){\n break;\n }\n }\n }\n\n $f = null;\n }\n }\n\n $scan = null;\n }\n\n return $path;\n }", "private function scanDir(string $path, array &$files, bool $recursion = false): void\n {\n $handler = opendir($path);\n\n while ($item = readdir($handler)) {\n if (in_array($item, ['.', '..'])) {\n continue;\n }\n\n $itemPath = sprintf('%s/%s', $path, $item);\n\n if (is_file($itemPath)) {\n $files[] = $itemPath;\n continue;\n }\n\n if ($recursion && is_dir($itemPath)) {\n $this->scanDir($itemPath, $files, $recursion);\n }\n }\n }", "public function scanDirPaths(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, string>\n */\n return $this->scanRaw(false, true, $filter, false);\n }", "static private function scan_dir( $dir ) {\n\t\t$ignored = array( '.', '..', '.svn', '.htaccess', 'test-log.log' );\n\n\t\t$files = array();\n\t\tforeach ( scandir( $dir ) as $file ) {\n\t\t\tif ( in_array( $file, $ignored ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$files[ $file ] = filemtime( $dir . '/' . $file );\n\t\t}\n\t\tarsort( $files );\n\t\t$files = array_keys( $files );\n\n\t\treturn ( $files ) ? $files : false;\n\t}", "public function scanPath(Path $path)\n\t{\n\t\treturn @scandir($path->getPath());\n\t}", "protected static function _scanForPlugins(){\n\t\t$directory = __DIR__ . Config::$pluginsDirectory;\n\t\t$handle = opendir( $directory );\n\n\t\t// check to make sure we could open the directory handle\n\t\tif( !$handle )\n\t\t\treturn;\n\n\t\t// now begin looping through all of the contents of the plugin directory\n\t\twhile( ( $dir = readdir( $handle ) ) !== false ){\n\t\t\tif( $dir === '.' || $dir === '..' )\n\t\t\t\tcontinue;\n\n\t\t\t// now we need to verify that the current \"file\" is a directory before continuing\n\t\t\tif( !is_dir( $directory . $dir ) )\n\t\t\t\tcontinue;\n\n\t\t\t// expect a class file to exist in the format \"class-<DirectoryName>.php\"\n\t\t\t$classFile = $directory . $dir . '/' . $dir . '.php';\n\t\t\tif( !file_exists( $classFile ) )\n\t\t\t\tcontinue;\n\n\t\t\t// now actually include the code\n\t\t\trequire_once( $classFile );\n\n\t\t\t// now expect the class name to match whatever the $dir name was\n\t\t\tif( !class_exists( $dir ) )\n\t\t\t\tcontinue;\n\n\t\t\t// now we can instantiate the class name and store it now\n\t\t\tself::$_plugins[] = new $dir();\n\t\t}\n\t}", "function scanfiles( $path = '' ) {\n\t\t\t\n\t\t\tglobal $bwpsoptions;\n\t\t\t\n\t\t\t$tz = get_option( 'gmt_offset' ) * 60 * 60;\n\n $data = array();\n\n\t\t\tif ( $dirHandle = @opendir( ABSPATH . $path ) ) { //get the directory\n\t\t\t\n\t\t\t\twhile ( ( $item = readdir( $dirHandle ) ) !== false ) { // loop through dirs\n\t\t\t\t\t\n\t\t\t\t\tif ( $item != '.' && $item != '..' ) { //don't scan parent/etc\n\n\t\t\t\t\t\t$relname = $path . $item;\n \n\t\t\t\t\t\t$absname = ABSPATH . $relname;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( $this->checkFile( $relname ) == true ) { //make sure the user wants this file scanned\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( filetype( $absname ) == 'dir' ) { //if directory scan it\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$data = array_merge( $data, $this->scanfiles( $relname . '/' ) );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} else { //is file so add to array\n\n\t\t\t\t\t\t\t\t$data[$relname] = array();\n\t\t\t\t\t\t\t\t$data[$relname]['mod_date'] = @filemtime( $absname ) + $tz;\n\t\t\t\t\t\t\t\t$data[$relname]['hash'] = @md5_file( $absname );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} \n\t\t\t\t\n\t\t\t\t@closedir( $dirHandle ); //close the directory we're working with\n \n\t\t\t} \n\t\t\t\n\t\t\treturn $data; // return the files we found in this dir\n\t\t\t\n\t\t}", "function check_dir($dir)\n {\n global $docdir, $lang;\n \n // Collect files and diretcories in these arrays\n $directories = array();\n $files = array();\n \n // Open and traverse the directory\n $handle = @opendir($dir);\n while ($file = @readdir($handle)) {\n if (preg_match(\"/^\\.{1,2}/\",$file) || $file == 'CVS')\n continue;\n\n // Collect files and directories\n if (is_dir($dir.$file)) { $directories[] = $file; }\n else { $files[] = $file; }\n\n }\n @closedir($handle);\n \n // Sort files and directories\n sort($directories);\n sort($files);\n \n // Files first...\n $file_cnt = 0;\n foreach ($files as $file) {\n if (check_file($dir.$file, $file_cnt)) { $file_cnt++; }\n }\n\n // than the subdirs\n foreach ($directories as $file) {\n check_dir($dir.$file.\"/\");\n }\n }", "function searchDir($base_dir=\"./\",$p=\"\",$f=\"\",$allowed_depth=-1){\n\t$contents=array();\n\n\t# trim all input arguments for whitespace\n\t$base_dir=trim($base_dir);\n\t$p=trim($p);\n\t$f=trim($f);\n\n # if base dir is not given, use the this\n\tif($base_dir==\"\")$base_dir=\"./\";\n\n\t# if last character of basedir lacks a \"/\" then add one\n\tif(substr($base_dir,-1)!=\"/\")$base_dir.=\"/\";\n\n\t# remove the \"../\" and \"./\" directories, and trim all \"./\"\n\t$p=str_replace(array(\"../\",\"./\"),\"\",trim($p,\"./\"));\n\n\t# add the requested path to the base directory string\n\t$p=$base_dir.$p;\n\n\t#if p is not a directory, meaning it is a file, get the path to it\n\tif(!is_dir($p))$p=dirname($p);\n\n\t#if the last character of p is not a \"/\" then add one\n\tif(substr($p,-1)!=\"/\")$p.=\"/\";\n\n\t# if caps are set on allowed depth (allowed depth>-1) count the dirs\n\tif($allowed_depth>-1){\n\t\t$allowed_depth=count(explode(\"/\",$base_dir))+ $allowed_depth-1;\n\t\t$p=implode(\"/\",array_slice(explode(\"/\",$p),0,$allowed_depth));\n\t\tif(substr($p,-1)!=\"/\")$p.=\"/\";\n\t}\n\n\t# if f is empty, create an empty array, if not explode and store elements\n\t$filter=($f==\"\")?array():explode(\",\",strtolower($f));\n\n\t# store the files in the files array, and shut up while scanning\n\t$files=@scandir($p);\n\n\t# if there are no files after scan, return an empty array and the path\n\tif(!$files)return array(\"contents\"=>array(),\"currentPath\"=>$p);\n\n\t# iterate through all files found\n\tfor ($i=0;$i<count($files);$i++){\n\n\t\t# gather name and path of each file\n\t\t$fName=$files[$i];\n\t\t$fPath=$p.$fName;\n\n\t\t# check if the file is a directory and tag it as directory\n\t\t# each file is tagged as a folder by default\n\t\t$isDir=is_dir($fPath);\n\t\t$add=false;\n\t\t$fType=\"folder\";\n\n\t\t# if the file is a file\n\t\tif(!$isDir){\n\n\t\t\t# extract extension from filename\n\t\t\t$ft=strtolower(substr($files[$i],strrpos($files[$i],\".\")+1));\n\t\t\t$fType=$ft;\n\n\t\t\t# if there is anything in the filter that matches, add it\n\t\t\tif($f!=\"\"){\n\t\t\t\tif(in_array($ft,$filter))$add=true;\n\t\t\t}else{\n\t\t\t\t$add=true;\n\t\t\t}\n\t\t# if the file is a folder\n\t\t}else{\n\t\t\tif($fName==\".\")continue;\n\t\t\t$add=true;\n\n\t\t\t# filter it, and discard if bad\n\t\t\tif($f!=\"\"){\n\t\t\t\tif(!in_array($fType,$filter))$add=false;\n\t\t\t}\n\n\t\t\t# if the file is the \"..\" folder\n\t\t\tif($fName==\"..\"){\n\t\t\t\t# if we are in the base dir, no not add upper directory option\n\t\t\t\tif($p==$base_dir){\n\t\t\t\t\t$add=false;\n\t\t\t\t}else $add=true;\n\n\t\t\t\t# explode the path by path steps\n\t\t\t\t$tempar=explode(\"/\",$fPath);\n\t\t\t\t# remove last two elements, so the file references parent dir\n\t\t\t\tarray_splice($tempar,-2);\n\t\t\t\t# implode the array, to recreate the path string\n\t\t\t\t$fPath=implode(\"/\",$tempar);\n\t\t\t\t# if for some reason, this reference is shorter than basedir, deny it!\n\t\t\t\tif(strlen($fPath)<= strlen($base_dir))$fPath=\"\";\n\t\t\t}\n\t\t}\n\n\t\t# if the created fPath is non-zero, append to basedir\n\t\tif($fPath!=\"\")$fPath=substr($fPath,strlen($base_dir));\n\t\t# if approved to add, add path, name and type to contents[] array\n\t\tif($add)$contents[]=array(\"fPath\"=>$fPath,\"fName\"=>$fName,\"fType\"=>$fType);\n\t}\n\n\t# if p is shorter than base_dir, deny it! Else, cut away base_dir and use it\n\t$p=(strlen($p)<= strlen($base_dir))?$p=\"\":substr($p,strlen($base_dir));\n\t# return the final contents and its respective path\n\treturn array(\"contents\"=>$contents,\"currentPath\"=>$p);\n}", "public function scanSrc($dir, $total = array())\n {\n if ($handle = opendir($dir)) {\n while (($file = readdir($handle)) !== false) {\n if ($file != \"..\" && $file != \".\") {\n if (is_dir($dir . \"/\" . $file))\n // Do DFS\n $total += $this->scanSrc($dir . \"/\" . $file, $total);\n else\n array_push($total, $dir . '/' . $file);\n }\n }\n closedir($handle);\n return $total;\n }\n }", "public function backgroundScan() {\n\t\t$lastPath = null;\n\t\twhile (($path = $this->cache->getIncomplete()) !== false && $path !== $lastPath) {\n\t\t\t$this->scan($path, self::SCAN_RECURSIVE, self::REUSE_ETAG);\n\t\t\t$this->cache->correctFolderSize($path);\n\t\t\t$lastPath = $path;\n\t\t}\n\t}", "public function dir_readdir() {}", "public function scan($regex_filter=NULL)\n\t{\n\t\t$this->tossIfException();\n\t\t\n\t\t$files = array_diff(scandir($this->directory), array('.', '..'));\n\t\t$objects = array();\n\t\t\n\t\tforeach ($files as $file) {\n\t\t\t$file = $this->directory . $file;\n\t\t\t\n\t\t\tif ($regex_filter) {\n\t\t\t\t$test_path = (is_dir($file)) ? $file . '/' : $file;\n\t\t\t\tif (!preg_match($regex_filter, $test_path)) {\n\t\t\t\t\tcontinue;\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$objects[] = fFilesystem::createObject($file);\n\t\t}\n\t\t\n\t\treturn $objects;\n\t}", "function open_and_scan($SCAN_DIRECTORY,$prev_files){\n\tglobal $files,$exempt_files,$prev_files,$exempt_directory;\n\t$changed_files = '';\n\t$file_details = stat($SCAN_DIRECTORY);\n\t$dt = array();\n\tforeach($file_details as $key=>$info){\n\t\t$dt[$key] = $info;\n\t}\n\t$data = array(\n\t\t'file'=>$SCAN_DIRECTORY,\n\t\t'info'=>$dt\n\t);\n\tarray_push($files,$data);\n\t$changed_files .= get_prev_stats($SCAN_DIRECTORY,$prev_files);\n\t\t\t\t\t\n\t$handle = opendir($SCAN_DIRECTORY);\n\twhile($f = readdir($handle)){\n\t\tif($f != '.' && $f != '..'){\n\t\t\tif(!is_dir($SCAN_DIRECTORY.$f)){\n\t\t\t\t$file_array = explode('.',$f);\n\t\t\t\t$count = count($file_array);\n\t\t\t\t$extension = $file_array[$count-1];\n\t\t\t\tif($count > 1 && !in_array($extension,$exempt_files)){\n\t\t\t\t\t$file_details = stat($SCAN_DIRECTORY.$f);\n\t\t\t\t\t$dt = array();\n\t\t\t\t\tforeach($file_details as $key=>$info){\n\t\t\t\t\t\t$dt[$key] = $info;\n\t\t\t\t\t}\n\t\t\t\t\t$data = array(\n\t\t\t\t\t\t'file'=>$SCAN_DIRECTORY.$f,\n\t\t\t\t\t\t'info'=>$dt\n\t\t\t\t\t);\n\t\t\t\t\tarray_push($files,$data);\n\t\t\t\t\t$changed_files .= get_prev_stats($SCAN_DIRECTORY.$f,$prev_files);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif(!in_array($f,$exempt_directory)){\n\t\t\t\t\topen_and_scan($SCAN_DIRECTORY.$f.'/',$prev_files);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn array(\n\t\t'changed'=>$changed_files,\n\t\t'files'=>$files\n\t);\n}", "public function scanDirNamesRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string>\n */\n return $this->scanRawRecursive(false, true, $filter, null);\n }", "function CheckDir($dir, $startWith = '')\n{\n global $count;\n global $pruned;\n $count++;\n \n echo \"\\r$count ($pruned): Checking $dir \";\n \n $started = false;\n if( !strlen($startWith) )\n $started = true;\n\n // see if this is a directory we need to prune\n if( $started && is_dir(\"$dir/video_2\") )\n {\n PruneDir($dir);\n }\n else\n {\n // recurse into any directories\n $f = scandir($dir);\n foreach( $f as $file )\n {\n if( !$started && $file == $startWith )\n $started = true;\n \n if( $started && is_dir(\"$dir/$file\") && $file != '.' && $file != '..' )\n CheckDir(\"$dir/$file\");\n }\n unset($f);\n }\n}", "public function crawl() {\n\t\t$sDirectories = BsConfig::get( 'MW::ExtendedSearch::ExternalRepo' );\n\t\tif ( $sDirectories === '' ) return $sDirectories;\n\n\t\t$aDirectories = explode( ',', $sDirectories );\n\t\tforeach ( $aDirectories as $sDirectory ) {\n\t\t\t$sDir = trim ( $sDirectory );\n\t\t\tif( !is_dir( $sDir ) ) continue;\n\t\t\t$this->readInFiles( $sDir );\n\t\t}\n\t\treturn $this->aFiles;\n\t}", "abstract protected function yieldSearchPaths(): Generator;", "function m_walk_dir( $root, $callback, $recursive = true, $level = 0 ) {\r\n $dh = @opendir( $root );\r\n if( false === $dh ) {\r\n return false;\r\n }\r\n while( $file = readdir( $dh )) {\r\n if( \".\" == $file || \"..\" == $file ){\r\n continue;\r\n }\r\n //echo \"## DEBUG:$level - $file<br/>\"; \r\n\r\n //echo \"Level: $level\";\r\n call_user_func( $callback,$level, \"{$root}/{$file}\", $file );\r\n if( false !== $recursive && is_dir( \"{$root}/{$file}\" )) {\r\n m_walk_dir( \"{$root}/{$file}\", $callback, $recursive, $level+1 );\r\n }\r\n }\r\n closedir( $dh );\r\n return true;\r\n}", "function scan_files( ){\n\n // List of all the audio files found in the directory and sub-directories\n $audioFileArray = array();\n\n // List of filenames already handled during the scan. To detect dupe filenames.\n $alreadyhandledFileArray = array();\n\n // Make list of all files in db to remove non existent files\n $DBaudioFileArray = array();\n foreach ( $this->get_list_of_files()->fetchAll() as $row ) {\n $DBaudioFileArray[] = $row['filename'];\n }\n\n // Prepare variables for file urls\n //$base_dir = dirname(dirname(realpath($this->filedirectorypath))); // Absolute path to your installation, ex: /var/www/mywebsite\n $doc_root = preg_replace(\"!{$_SERVER['SCRIPT_NAME']}$!\", '', $_SERVER['SCRIPT_FILENAME']); # ex: /var/www\n $protocol = empty($_SERVER['HTTPS']) ? 'http' : 'https';\n $port = $_SERVER['SERVER_PORT'];\n $disp_port = ($protocol == 'http' && $port == 80 || $protocol == 'https' && $port == 443) ? '' : \":$port\";\n $domain = $_SERVER['SERVER_NAME'];\n // variables for file urls\n\n // Create recursive dir iterator which skips dot folders\n $dir = new RecursiveDirectoryIterator( $this->filedirectorypath , FilesystemIterator::SKIP_DOTS);\n\n // Flatten the recursive iterator, consider only files, no directories\n $it = new RecursiveIteratorIterator($dir);\n\n // Find all the mp3 files\n foreach ($it as $fileinfo) {\n if ($fileinfo->isFile() && !strcmp($fileinfo->getExtension(), \"mp3\")) {\n $audioFileArray[] = $fileinfo;\n\n //Warning: files with same md5key in different folders will not be inserted into the db.\n //print md5_file($fileinfo) . \"<br />\\n\";\n }\n }\n\n foreach ($audioFileArray as $key => $fileinfo) {\n\n $filename = $fileinfo->getFilename();\n\n //For each file found on disk remove entry from list from DB\n // if any left at the end, they are files that no longer are present on the drive.\n //print \"unsetting: \" . $filename . \"<br>\";\n unset($DBaudioFileArray[array_search($filename,$DBaudioFileArray,true)]);\n\n // check file not in db\n if( !$this->is_file_in_db( $filename ) ) {\n\n //decode filename date if named according to our naming scheme\n $date = $this->decode_filename($filename);\n\n // Build file url based on server path\n $filepath = realpath($fileinfo->getRealPath());\n $base_url = preg_replace(\"!^{$doc_root}!\", '', $filepath); # ex: '' or '/mywebsite'\n $full_url = \"$protocol://{$domain}{$disp_port}{$base_url}\"; # Ex: 'http://example.com', 'https://example.com/mywebsite', etc.\n\n //print $filename . \" - \" . $full_url . \"<br />\\n\";\n\n //insert audiofile in db for first time\n $this->insert_new_file_into_db( $filename, $full_url, $fileinfo->getRealPath(), $fileinfo->getSize(), $date );\n\n $alreadyhandledFileArray[$key] = $filename;\n\n } else {\n // if file in alreadyhandled array, then duplicate named files have been found\n // how to check for duplicate file names?\n // if we're here then the name has already ben added to the db (but maybe during a previous run)\n //we still need to look for the file in the alreadyhandledFileArray\n if( in_array($filename, $alreadyhandledFileArray) ){\n // flag file\n $this->flag_file($filename, \"Il y a 2 ou plusieurs fichiers audio avec le même nom dans le dossier audio du serveur ftp. Veuillez changer les noms ou supprimer les doublons.\");\n }\n }\n\n\n }\n\n // If there are files from the database that weren't found in the audio folder,\n // flag them and add a comment stating that the file can no longer be found.\n if( count($DBaudioFileArray) ){\n //print_r($DBaudioFileArray);\n foreach($DBaudioFileArray as $key => $fn){\n $this->flag_file($fn, \"Le fichier en question n'est plus présent dans le dossier audio du serveur ftp. Il faut le supprimer de la base de données.\");\n $this->set_file_not_new($fn);\n }\n }\n\n return true;\n }", "public function scanDir($dir)\n {\n $objects = scandir($dir);\n\n // unset 2 first elements\n unset($objects[0], $objects[1]);\n\n return $objects;\n }", "public function scanRecursive($regex_filter=NULL)\n\t{\n\t\t$this->tossIfException();\n\t\t\n\t\t$files = $this->scan();\n\t\t$objects = $files;\n\t\t\n\t\t$total_files = sizeof($files);\n\t\tfor ($i=0; $i < $total_files; $i++) {\n\t\t\tif ($files[$i] instanceof fDirectory) {\n\t\t\t\tarray_splice($objects, $i+1, 0, $files[$i]->scanRecursive());\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($regex_filter) {\n\t\t\t$new_objects = array();\n\t\t\tforeach ($objects as $object) {\n\t\t\t\t$test_path = ($object instanceof fDirectory) ? substr($object->getPath(), 0, -1) . '/' : $object->getPath();\n\t\t\t\tif (!preg_match($regex_filter, $test_path)) {\n\t\t\t\t\tcontinue;\t\n\t\t\t\t}\t\n\t\t\t\t$new_objects[] = $object;\n\t\t\t}\n\t\t\t$objects = $new_objects;\n\t\t}\n\t\t\n\t\treturn $objects;\n\t}", "public function test_search_by_name()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search_by_name('index.php');\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n }", "function directory_mapper($path)\n{\n $maxDepth = 3;\n $minDepth = 3;\n $iterator = new RecursiveIteratorIterator(\n new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::SKIP_DOTS),\n RecursiveIteratorIterator::SELF_FIRST,\n RecursiveIteratorIterator::CATCH_GET_CHILD// Ignore \"Permission denied\"\n );\n $iterator->setMaxDepth($maxDepth);\n\n $paths = array($path);\n foreach ($iterator as $path => $dir) {\n if ($iterator->getDepth() >= $minDepth) {\n if ($dir->isDir()) {\n if (file_exists($dir . DIRECTORY_SEPARATOR . \"meta\")) {\n $paths[] = $path;\n }\n }\n }\n }\n array_shift($paths);\n return $paths;\n}", "function scan_students()\n {\n $current_students = [];\n $di = new RecursiveDirectoryIterator('students/');\n foreach (new RecursiveIteratorIterator($di) as $filename => $file) {\n $path_info = pathinfo($filename);\n if($path_info['extension']=='json'){\n array_push($current_students,$path_info['filename']);\n }\n }\n // echo print_r($current_students);\n return $current_students;\n }", "function scandir_recursive($directory, $format = null, $excludes = array()){\n $format = ($format == null) ? 'absolute' : $format;\n $paths = array();\n $stack[] = $directory;\n while($stack){\n $this_resource = array_pop($stack);\n if ($resource = scandir($this_resource)){\n $i = 0;\n while (isset($resource[$i])){\n if ($resource[$i] != '.' && $resource[$i] != '..'){\n $current = array(\n 'absolute' => \"{$this_resource}/{$resource[$i]}\",\n 'relative' => preg_replace('/' . preg_quote($directory, '/') . '/', '', \"{$this_resource}/{$resource[$i]}\")\n );\n if (is_file($current['absolute'])){\n $paths[] = $current[$format];\n } elseif (is_dir($current['absolute'])){\n $paths[] = $current[$format];\n $stack[] = $current['absolute'];\n }\n }\n $i++;\n }\n }\n }\n if (count($excludes) > 0){\n $clean = array();\n foreach($paths as $path){\n $remove = false;\n foreach($excludes as $exclude){\n $exclude = preg_quote($exclude, '/');\n $exclude = str_replace('\\*', '.*', $exclude);\n if (preg_match('/' . $exclude . '/', $path)){\n $remove = true;\n }\n }\n if (!$remove) $clean[] = $path;\n }\n $paths = $clean;\n }\n return $paths;\n}", "public function scanRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, Dir|File>\n */\n return $this->scanRawRecursive(true, true, $filter, true);\n }", "function l10n_drupal_files_scan($source = NULL, $automated = FALSE) {\n\n // We look for projects in the working directory.\n $workdir = variable_get('l10n_server_connector_l10n_drupal_files_directory', '');\n\n if (!is_dir($workdir)) {\n drupal_set_message(t('The configured directory (%workdir) cannot be found. <a href=\"@configure\">Check your configuration</a>.', array('%workdir' => $workdir, '@configure' => url('admin/l10n_server/connectors/config/l10n_drupal/files'))));\n }\n else {\n // define a list of allowed extensions, we will use it later on file_scan_directory\n // and further regular expression buildung processing. Thanks to EugenMayer\n $allowed_file_extensions = array('.tar.gz', '.tgz');\n // build the regular expression\n foreach($allowed_file_extensions as $key => $extension) {\n // escape the file extensions for later regular expression usage\n $allowed_file_extensions[$key] = preg_quote($extension);\n }\n $file_extension_pattern = '(' . implode('|', $allowed_file_extensions) . ')$';\n\n // Packages are always .tar.gz files.\n $files = file_scan_directory($workdir, $file_extension_pattern);\n if (count($files)) {\n foreach ($files as $path => $file) {\n\n if (!l10n_drupal_is_supported_version($path)) {\n // Skip files for unsupported versions.\n continue;\n }\n\n // Get rid of $workdir prefix on file names, eg.\n // drupal-6.x-6.19.tar.gz\n // Drupal/drupal-4.6.7.tar.gz or\n // files/Ubercart/ubercart-5.x-1.0-alpha8.tar.gz.\n $path = $package = trim(preg_replace('!(^' . preg_quote($workdir, '!') . ')(.+)\\.tar\\.gz!', '\\2', $path), '/');\n\n // split the filename into parts to $filename_splitted\n // [0] = the full string\n // [1] = the subdirectory and filename with extension\n // [1] = the subdirectory and filename without extension\n // [2] = the extension .tar.gz or .tgz\n $file_splitted = array(); // ensure to be a array....\n // the regular expression pattern (i put it in a var because i can better handle it with dpm for debugging, move if you want...)\n $file_split_pattern = '!^'. preg_quote($workdir, '!') .'((.+)'. $file_extension_pattern .')!';\n preg_match( $file_split_pattern, $path, $file_splitted );\n // put the result in vars for better handling\n list($file_fullpath, $file_subpath_ext, $file_subpath, $file_extension) = $file_splitted;\n\n // redefine the path to subpath without slash at beginning\n $path = trim($file_subpath, '/');\n // same on package\n $package = trim($file_subpath, '/');\n $project_title = '';\n if (strpos($path, '/')) {\n // We have a slash, so this package is in a subfolder.\n // Eg. Drupal/drupal-4.6.7 or Ubercart/ubercart-5.x-1.0-alpha8.\n // Grab the directory name as project title.\n list($project_title, $package) = explode('/', $path);\n }\n if (strpos($package, '-')) {\n // Only remaining are the project uri and release,\n // eg. drupal-4.6.7 or ubercart-5.x-1.0-alpha8.\n list($project_uri, $release_version) = explode('-', $package, 2);\n\n l10n_drupal_save_data($project_uri, ($project_title ? $project_title : $project_uri), $release_version, trim($file_subpath_ext, '/'), filemtime($file->filename));\n }\n else {\n // File name not formatted properly.\n $result['error'] = t('File name should have project codename and version number included separated with hyphen, such as drupal-5.2.tar.gz.');\n }\n }\n }\n }\n\n $user_feedback = FALSE;\n $results = db_query_range(\"SELECT * FROM {l10n_server_release} WHERE pid IN (SELECT pid FROM {l10n_server_project} WHERE connector_module = 'l10n_drupal_files' AND status = 1) ORDER BY last_parsed ASC\", 0, variable_get('l10n_server_connector_l10n_drupal_files_limit', 1));\n while ($release = db_fetch_object($results)) {\n\n // Only parse file if something changed since we last parsed it.\n $file_name = $workdir . '/' . $release->download_link;\n\n if (file_exists($file_name)) {\n if (filemtime($file_name) > $release->last_parsed) {\n $result = l10n_drupal_parse_package($file_name, $release);\n\n // User feedback, if not automated. Log messages are already done.\n if (isset($result['error']) && !$automated) {\n $user_feedback = TRUE;\n drupal_set_message($result['error'], 'error');\n }\n elseif (isset($result['message']) && !$automated) {\n $user_feedback = TRUE;\n drupal_set_message($result['message']);\n }\n }\n else {\n if (!$automated) {\n $user_feedback = TRUE;\n drupal_set_message(t('@release was already parsed, no need to scan again.', array('@release' => $release->download_link)));\n }\n }\n }\n // Hackish update of last parsed time so other tarballs will get into the queue too.\n // @todo: work on something better for this.\n db_query(\"UPDATE {l10n_server_release} SET last_parsed = %d WHERE rid = %d\", time(), $release->rid);\n }\n if (!$automated && !$user_feedback) {\n drupal_set_message(t('No (new) local Drupal files found to scan in %workdir.', array('%workdir' => $workdir)));\n }\n\n // Ensure that a Drupal page will be displayed with the messages.\n return '';\n}", "function dir_enter($entry_dir='/', $depth=0)\r\n{\r\n\t$found = 0;\r\n\r\n\t# Remove the last trailing slash and void dual writing\r\n\t$entry_dir = preg_replace('/\\/$/i', '', $entry_dir);\r\n\r\n\t$skip_list = array(\r\n\t\t'.', # self\r\n\t\t'..', # parent\r\n\t);\r\n\r\n\tif($dir_handle = opendir($entry_dir))\r\n\t{\r\n\t\twhile(false !== ($filename = readdir($dir_handle)))\r\n\t\t{\r\n\t\t\tif(in_array($filename, $skip_list))\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$full_file_path = \"{$entry_dir}/{$filename}\";\r\n\t\t\t\r\n\t\t\tif(is_dir($full_file_path))\r\n\t\t\t{\r\n\t\t\t\t# Need to loop here inside the directory\r\n\r\n\t\t\t\tfecho(str_repeat(' ', $depth)); # depth marker\r\n\t\t\t\t#fecho(\"{$full_file_path}\");\r\n\t\t\t\tfecho(\"{$filename}\");\r\n\r\n\t\t\t\t\r\n\t\t\t\t# Recurse through the file\r\n\t\t\t\t$function = __FUNCTION__;\r\n\t\t\t\t$found += $function($full_file_path, $depth+1);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t#fecho(str_repeat(' ', $depth)); # depth marker\r\n\t\t\t\t#fecho(\"{$full_file_path}\");\r\n\t\t\t\t#fecho(\"{$filename}\");\r\n\r\n\t\t\t\t++$found;\r\n\t\t\t\tprocess_file($full_file_path, $depth);\r\n\t\t\t}\r\n\t\t}\r\n\t\tclosedir($dir_handle);\r\n\t}\r\n\t\r\n\treturn $found;\r\n}", "function toIterator($root) {\n $root = realpath($root);\n $iterator = new \\AppendIterator();\n\n if(!file_exists($root))\n die('The components folder could not be found');\n\n $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($root));\n //$directoryIterator->setFlags(\\RecursiveDirectoryIterator::SKIP_DOTS);\n\n return $iterator;\n }", "function directory_scan($directory, $withfiles) {\n\t$scanned_directory = array_diff(scandir($directory), array(\"..\", \".\")); //This removes all of the unessesary results\n\n\tfor ($i = 0; ($i < count(scandir($directory))) && $withfiles == true; $i = $i + 1) {\n\t\tif (isset($scanned_directory[$i]) && (is_dir($directory . \"/\" . $scanned_directory[$i]) == FALSE)) { // If current item is a file, make it a download link\n\t\t\techo \"<div class='fileDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='movefrom[\" . $scanned_directory[$i] . \"]' form='moveto'>\";\n\t\t\techo \"<img src='Assets/SVG/file.svg' class='foldersvg'/>\";\n\t\t\techo \"<p class='fileLink'>\" . $scanned_directory[$i] . \"</p>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='fileinfo'><b>Type</b>: \" . mime_content_type($directory. \"/\" . $scanned_directory[$i]) . \" <b>Size</b>: \" . getfilesize($directory . \"/\" . $scanned_directory[$i], 0) . \" <b>Last Modified</b>: \" . date(\"F d Y H:i:s.\",filectime($directory. \"/\" . $scanned_directory[$i])) . \"</p> \";\t\t\t\n\t\t\techo \"</div>\";\n\t\t} else if (isset($scanned_directory[$i]) && $directory . \"/\" . $scanned_directory[$i] != \"uploads/\" . $_SESSION[\"username\"] . \"/Trash\") { // Makes this a special dir box if a item is folder\n\t\t\techo \"<div class='folderDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='movefrom[\" . $scanned_directory[$i] . \"]' form='moveto'>\";\n\t\t\techo \"<img src='Assets/SVG/folder.svg' class='foldersvg'/>\";\n\t\t\techo \"<input type='button' class='folderButton' value='\" . $scanned_directory[$i] . \"' name='directory[\" . $i . \"]'>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='folderinfo'><b>Type</b>: Folder <b>Size</b>: \" . getfilesize($directory . \"/\" . $scanned_directory[$i], 1) . \" <b>Last Modified</b>: \" . date(\"F d Y H:i:s.\",filectime($directory. \"/\" . $scanned_directory[$i])) . \"</p> \";\n\t\t\techo \"</div>\"; \n\t\t}\n\t}\n\t\n\tfor ($i = 0; ($i < count(scandir($directory))) && $withfiles == false; $i = $i + 1) { //$withfiles only outputs files when true. when false, it will output files and folders. This is for the right-side of the page\n\t\tif ($i==0 && $directory != \"uploads/\" . $_SESSION[\"username\"]) { //when $i gets to its first iteration, output the \"back a directory\" folder\n\t\t\techo \"<div class='folderDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='moveto[../]' form='moveto'>\";\n\t\t\techo \"<img src='Assets/SVG/folder.svg' class='foldersvg'/>\";\n\t\t\techo \"<input type='button' class='folderButton' value='../' name='directory[\" . $i . \"]'>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='folderinfo'><b>Info</b>: Selecting this will move your selection back a folder.</p> \";\n\t\t\techo \"</div>\";\n\t\t}\n\t\t\n\t\tif (isset($scanned_directory[$i]) && is_dir($directory . \"/\" . $scanned_directory[$i])) { // Makes this a special dir box if an item is folder\n\t\t\techo \"<div class='folderDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='moveto[\" . $scanned_directory[$i] . \"]' form='moveto'>\";\n\t\t\tif ($directory . \"/\" . $scanned_directory[$i] == \"uploads/\" . $_SESSION[\"username\"] . \"/Trash\") {\n\t\t\t\techo \"<img src='Assets/SVG/bin.svg' class='foldersvg'/>\";\n\t\t\t} else {\n\t\t\t\techo \"<img src='Assets/SVG/folder.svg' class='foldersvg'/>\";\n\t\t\t}\n\t\t\techo \"<input type='button' class='folderButton' value='\" . $scanned_directory[$i] . \"' name='directory[\" . $i . \"]'>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='folderinfo'><b>Type</b>: Folder <b>Size</b>: \" . getfilesize($directory . \"/\" . $scanned_directory[$i], 1) . \" <b>Last Modified</b>: \" . date(\"F d Y H:i:s.\",filectime($directory. \"/\" . $scanned_directory[$i])) . \"</p> \";\n\t\t\techo \"</div>\";\n\t\t}\n\t}\n\n}", "protected function scanTarget($path,$recursive=false) {\n $newpaths = [];\n $dir = $this->cache->getDestination();\n\n $stream = new \\qio\\Directory\\Stream($dir);\n $reader = new \\qio\\Directory\\Reader($stream);\n $list = $reader->scan();\n\n foreach($list as $item) {\n $fullItemPath = $path.DIRECTORY_SEPARATOR.$item;\n if(is_file($fullItemPath)) {\n $newpaths[] = $fullItemPath;\n } elseif($recursive && \n is_dir($fullItemPath)) {\n $newpaths = array_merge($newpaths, $this->scanTarget($fullItemPath,$recursive));\n }\n }\n\n return $newpaths;\n }", "protected function getFilesInDirCreateTestDirectory() {}", "function lscan($scat, $param)\n{\n if(isset($param[1][0]) == FALSE)\n {\n $scat[1][0] = '.';\n }\n $c = 0;\n if (file_exists($scat[1][0]) == TRUE && is_dir($scat[1][0]) == TRUE && is_readable($scat[1][0]) == TRUE && is_executable($scat[1][0]) == TRUE && $fh = fopen($scat[1][0], 'r'))\n {\n while(isset(scandir($scat[1][0])[$c]))\n {\n $tab[$c] = scandir($scat[1][0])[$c];\n $c++;\n }\n $c = 0;\n sort($tab);\n while(isset($tab[$c]))\n {\n if (is_dir($tab[$c]))\n {\n echo(\"\\033[34m{$tab[$c]}\");\n echo (\"/\");\n }\n else if(is_executable($tab[$c]) && is_dir($tab[$c]) == FALSE)\n {\n echo(\"\\033[32m{$tab[$c]}\");\n echo (\"*\");\n }\n else if(is_link($tab[$c]))\n {\n echo($tab[$c]);\n echo (\"@\");\n }\n else\n echo($tab[$c]);\n echo (\" \");\n $c++;\n }\n echo (\"\\n\");\n }\n else if (is_file($scat[1][0]) == TRUE)\n echo (\"Is a file\\n\");\n else if (file_exists($scat[1][0]) == TRUE && (is_readable($scat[1][0]) == FALSE || is_executable($scat[1][0]) == FALSE))\n echo (\"Permission denied\\n\");\n else if (file_exists($scat[1][0]) == FALSE && is_dir($scat[1][0]) == FALSE)\n echo (\"No such file or directory\\n\");\n else\n echo (\"Cannot open folder\\n\");\n}", "public function discoverPlugins() {\n foreach($this->fs->roots(false) as $root) {\n $this->findAvailablePlugins($root);\n }\n }", "public function scanDirectory($base_dir = '', $attributes = array()) {\n if (!is_dir($base_dir)) {\n return array();\n }\n if (!isset($attributes['exclude_dirs'])) {\n $attributes['exclude_dirs'] = self::DIR_INACTIVE;\n }\n if (!isset($attributes['type'])) {\n $attributes['type'] = self::DIR_ALL;\n }\n\n $dirs = array_diff(scandir($base_dir), array('.', '..', '.git', 'assets', 'files'));\n\n foreach ($dirs as $k => $dir) {\n // Remove inactive if requested.\n if (substr($dir, 0, 1) == $attributes['exclude_dirs']) {\n unset ($dirs[$k]);\n }\n\n if (isset($attributes['symlinks']) && $attributes['symlinks'] == 'no' && is_link($base_dir . '/' . $dir)) {\n unset ($dirs[$k]);\n }\n else if (isset($attributes['symlinks']) && $attributes['symlinks'] == 'only' && !is_link($base_dir . '/' . $dir)) {\n unset ($dirs[$k]);\n }\n\n if ($attributes['type'] == self::DIR_DIRS && !is_dir($base_dir . '/' . $dir)) {\n unset ($dirs[$k]);\n }\n elseif ($attributes['type'] == self::DIR_FILES && !is_file($base_dir . '/' . $dir)) {\n unset ($dirs[$k]);\n }\n elseif ($attributes['type'] == self::DIR_MODULES &&\n (!is_dir($base_dir . '/' . $dir))\n ) {\n unset ($dirs[$k]);\n }\n }\n\n return $dirs;\n }", "public function &getFolders($folder)\n\t{\n\t\t$registry =& AEFactory::getConfiguration();\n\t\t$breakflag_before_process = $registry->get('volatile.breakflag', false);\n\n\t\t// Reset break flag before continuing\n\t\t$breakflag = false;\n\n\t\t// Initialize variables\n\t\t$arr = array();\n\t\t$false = false;\n\n\t\tif(!is_dir($folder) && !is_dir($folder.'/')) return $false;\n\n\t\t$counter = 0;\n\t\t$registry =& AEFactory::getConfiguration();\n\t\t$maxCounter = $registry->get('engine.scan.smart.large_dir_threshold',100);\n\n\t\t$allowBreakflag = ($registry->get('volatile.operation_counter', 0) != 0) && !$breakflag_before_process;\n\n\t\t$handle = @opendir($folder);\n\t\t/* If opening the directory doesn't work, try adding a trailing slash. This is useful in cases\n\t\t * like this: open_basedir=/home/user/www/ and the root is /home/user/www. Trying to scan\n\t\t * /home/user/www results in error, trying to scan /home/user/www/ succeeds. Duh!\n\t\t */\n\t\tif ($handle === FALSE) {\n\t\t\t$handle = @opendir($folder.'/');\n\t\t}\n\t\t// If directory is not accessible, just return FALSE\n\t\tif ($handle === FALSE) {\n\t\t\t$this->setWarning('Unreadable directory '.$folder);\n\t\t\treturn $false;\n\t\t}\n\n\t\twhile ( (($file = @readdir($handle)) !== false) && (!$breakflag) )\n\t\t{\n\t\t\tif (($file != '.') && ($file != '..'))\n\t\t\t{\n\t\t\t\t// # Fix 2.4: Do not add DS if we are on the site's root and it's an empty string\n\t\t\t\t$ds = ($folder == '') || ($folder == '/') || (@substr($folder, -1) == '/') || (@substr($folder, -1) == DIRECTORY_SEPARATOR) ? '' : DIRECTORY_SEPARATOR;\n\t\t\t\t$dir = $folder . $ds . $file;\n\t\t\t\t$isDir = is_dir($dir);\n\t\t\t\tif ($isDir) {\n\t\t\t\t\t$data = _AKEEBA_IS_WINDOWS ? AEUtilFilesystem::TranslateWinPath($dir) : $dir;\n\t\t\t\t\tif($data) $arr[] = $data;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$counter++;\n\t\t\tif($counter >= $maxCounter) $breakflag = $allowBreakflag;\n\t\t}\n\t\t@closedir($handle);\n\n\t\t// Save break flag status\n\t\t$registry->set('volatile.breakflag', $breakflag);\n\n\t\treturn $arr;\n\t}", "function scan_directory($directory) {\n $dir = scandir($directory);\n foreach ($dir as $d) {\n if ($d === '.' or $d === '..')\n continue;\n\n if (is_dir($directory . '/' . $d)) {\n //code to use if directory\n scan_directory($directory . '/' . $d);\n } else {\n //code to use if file \n $type = pathinfo($directory . '/' . $d, PATHINFO_EXTENSION);\n if ($type == \"mp4\" || $type == \"html\") {\n //do nothing \n continue;\n } else {\n if (unlink($directory . '/' . $d)) {\n echo '<strong>Deleted</strong>'.$directory . '/' . $d . '<br/><br/>';\n }\n }\n }\n }\n}", "function searchFolder( $current_folder, $folder_to_find, &$matches )\n{\n if ( !( $handle = opendir( $current_folder ) ) ) die( \"Cannot open $current_folder.\" );\n\n while ( $entry = readdir( $handle ) ) {\n if ( is_dir( \"$current_folder/$entry\" ) ) {\n if ( $entry != \".\" && $entry != \"..\" ) {\n\n // This entry is a valid folder\n // If it matches our folder name, add it to the list of matches\n if ( $entry == $folder_to_find ) $matches[] = \"$current_folder/$entry\";\n\n // Search this folder\n searchFolder( \"$current_folder/$entry\", $folder_to_find, $matches );\n }\n }\n }\n closedir( $handle );\n}", "function find($dir, $pattern){\n // escape any character in a string that might be used to trick\n // a shell command into executing arbitrary commands\n $dir = escapeshellcmd($dir);\n // get a list of all matching files in the current directory\n $files = glob(\"$dir/$pattern\");\n // find a list of all directories in the current directory\n // directories beginning with a dot are also included\n foreach (glob(\"$dir/{.[^.]*,*}\", GLOB_BRACE|GLOB_ONLYDIR) as $sub_dir){\n $arr = find($sub_dir, $pattern); // resursive call\n $files = array_merge($files, $arr); // merge array with files from subdirectory\n }\n // return all found files\n return $files;\n}", "private function recSearchFiles($dir)\n {\n $ffs = scandir($dir);\n\n foreach ($ffs as $ff) {\n\n if ($ff != '.' && $ff != '..') {\n\n if (is_dir($dir . '/' . $ff)) {\n $this->recSearchFiles($dir . $ff . '/');\n } else if (strlen($ff) >= 5) {\n $this->searchedFiles[] = $dir . $ff;\n }\n }\n }\n }", "protected function parseDirectory($rootPath, $seperator=\"/\"){\n $fileArray=array();\n $handle = opendir($rootPath);\n while( ($file = @readdir($handle))!==false) {\n if($file !='.' && $file !='..'){\n if (is_dir($rootPath.$seperator.$file)){\n $array=$this->parseDirectory($rootPath.$seperator.$file);\n $fileArray=array_merge($array,$fileArray);\n }\n else {\n $fileArray[]=$rootPath.$seperator.$file;\n }\n }\n } \n return $fileArray;\n }", "function rd_do_dir($dir)\n{\n\t$out=array();\n\t$_dir=($dir=='')?'.':$dir;\n\t$dh=@opendir($_dir);\n\tif ($dh!==false)\n\t{\n\t\twhile (($file=readdir($dh))!==false)\n\t\t{\n\t\t\tif (!in_array($file,array('.','..','git','.svn','CVS','_vti_cnf')))\n\t\t\t{\n\t\t\t\tif (is_file($_dir.'/'.$file))\n\t\t\t\t{\n\t\t\t\t\t$path=$dir.(($dir!='')?'/':'').$file;\n\t\t\t\t\t$out[]=$path;\n\t\t\t\t} elseif (is_dir($_dir.'/'.$file))\n\t\t\t\t{\n\t\t\t\t\t$out=array_merge($out,rd_do_dir($dir.(($dir!='')?'/':'').$file));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn $out;\n}", "public function scan($directories)\n\t{\n\t\tif (!is_array($directories)) {\n\t\t\t$directories = [$directories];\n\t\t}\n\n\t\tforeach ($directories as $directory) {\n\t\t\tforeach (Finder::findFiles('*.latte', '*.php')->from($directory) as $file) {\n\t\t\t\t$this->extract($file, $directory);\n\t\t\t}\n\t\t}\n\t\treturn $this->compactMessages();\n\t}", "function _ft_search_find_files($dir, $q){\r\n\t$output = array();\r\n\tif (ft_check_dir($dir) && $dirlink = @opendir($dir)) {\r\n\t\twhile(($file = readdir($dirlink)) !== false){\r\n\t\t\tif($file != \".\" && $file != \"..\" && ((ft_check_file($file) && ft_check_filetype($file)) || (is_dir($dir.\"/\".$file) && ft_check_dir($file)))){\r\n\t\t\t\t$path = $dir.'/'.$file;\r\n\t\t\t\t// Check if filename/directory name is a match.\r\n\t\t\t\tif(stristr($file, $q)) {\r\n\t\t\t\t\t$new['name'] = $file;\r\n\t\t\t\t\t$new['shortname'] = ft_get_nice_filename($file, 20);\r\n\t\t\t\t\t$new['dir'] = substr($dir, strlen(ft_get_root()));\r\n\t\t\t\t\tif (is_dir($path)) {\r\n if (ft_check_dir($path)) {\r\n \t\t\t\t\t\t$new['type'] = \"dir\";\t\t\t\t\t \r\n \t\t\t\t\t$output[] = $new;\r\n }\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t $new['type'] = \"file\";\r\n \t\t\t\t\t$output[] = $new;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Check subdirs for matches.\r\n\t\t\t\tif(is_dir($path)) {\r\n\t\t\t\t\t$dirres = _ft_search_find_files($path, $q);\r\n\t\t\t\t\tif (is_array($dirres) && count($dirres) > 0) {\r\n\t\t\t\t\t\t$output = array_merge($dirres, $output);\r\n\t\t\t\t\t\tunset($dirres);\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tsort($output);\r\n\t\tclosedir($dirlink);\r\n\t\treturn $output;\r\n\t} else {\r\n\t\treturn FALSE;\r\n\t}\r\n}", "public function test_scan_sort_desc()\n {\n $content = array('.','..','application','.git','.gitignore','.htaccess','index.php','nbproject','README','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_DESC);\n \n $output = array();\n foreach($res as $f) $output[] = $f->get_base_name();\n $this->assertEquals(array_reverse($content), $output);\n }", "function scandir(string $directory, int $sorting_order = SCANDIR_SORT_ASCENDING, $context = null): array\n{\n error_clear_last();\n if ($context !== null) {\n $safeResult = \\scandir($directory, $sorting_order, $context);\n } else {\n $safeResult = \\scandir($directory, $sorting_order);\n }\n if ($safeResult === false) {\n throw DirException::createFromPhpError();\n }\n return $safeResult;\n}", "public function recursivelyIterateDirectory()\n\t{\n\t\treturn new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->getPath()));\n\t}", "function searchFiles($search, $path, $video){\n $searchFiles = scandir($path);\n foreach($searchFiles as $sFile){\n if(($sFile!=\".\")&&($sFile!=\"..\")){\n if(is_dir($path.$sFile)){\n $search = glob($path.$sFile.'/'.$video);\n if(!empty($search)){\n return $search;\n }\n }\n }\n }\n return array('did', 'not', 'work');\n}", "private function listFolderFiles($dir){\n $children = false;\n $isRoot = false;\n if($dir==$this->file_storage){\n $isRoot = true;\n }\n\n $folderName = $this->getFolderName($dir);\n if(!$isRoot){\n //$this->info('Directory Name: '.$folderName['child']);\n //$this->info('Parent Name: '.$folderName['parent']);\n }\n\n //$this->info('Folder: '.$dir);\n\n foreach (new \\DirectoryIterator($dir) as $fileInfo) {\n if (!$fileInfo->isDot()) {\n if ($fileInfo->isDir()) {\n $this->listFolderFiles($fileInfo->getPathname());\n }else{\n $rename = false;\n //$this->info('File: '.$fileInfo->getFilename());\n //$info = new SplFileInfo($dir.'/'.$fileInfo->getFilename());\n $ext = \".\".pathinfo($fileInfo->getFilename(), PATHINFO_EXTENSION);\n //$ext = \".\"$info->getExtension();\n //$this->info('File: extension '.$ext);\n $filebreak = str_replace($ext,\"\",$fileInfo->getFilename());\n if (strpos($filebreak, '.') !== false || strpos($filebreak, \"'\") !== false || strpos($filebreak, \"#\") !== false) {\n $rename = true;\n }\n if($rename){\n $replace = array(\".\", \"'\", \"#\", \";\", \"/\", \"?\", \":\", \"@\", \"=\", \"&\", \",\");\n //“;”, “/”, “?”, “:”, “@”, “=” and “&\n $fileraw = str_replace($replace,\" \",$filebreak);\n //$this->info('File: raw '.$fileraw);\n $newfilename = $fileraw . $ext;\n //$this->info('File: new '.$newfilename);\n $prod_filename = $newfilename;\n rename($dir.'/'.$fileInfo->getFilename(),$dir.'/'.$newfilename);\n }else{\n $prod_filename = $fileInfo->getFilename();\n }\n $this->checkFileExtension($dir.'/'.$prod_filename, $prod_filename, $dir);\n }\n $children = true;\n }else{\n $children = false;\n }\n }\n //$this->info('Children: '.$children);\n\n if(!$isRoot){\n $this->folders[$this->count]['name'] \t\t\t= $folderName['child'];\n $this->folders[$this->count]['parent'] \t\t= $folderName['parent'];\n $this->folders[$this->count]['full_path']\t= $dir;\n $this->folders[$this->count]['children']\t= $children;\n $this->count++;\n }\n //$this->info('#################');\n }", "protected function scan_directory($target) {\n $files = array();\n $target_images = $this->get_target_images();\n $target_components = explode(DIRECTORY_SEPARATOR, $target);\n $target = implode(DIRECTORY_SEPARATOR, $target_components);\n $target_length = strlen($target) + 1;\n\n $patterns = array(\n $target,\n '.xml'\n );\n $datatypes = array(\n '-01.tif',\n '-01.jpg',\n );\n\n $images = file_scan_directory($target_images, '/.*-01.*/');\n $xml = file_scan_directory($target, '/.*.xml$/');\n foreach ($xml as $uri => $value) {\n if (strpos($uri, '.xml') !== FALSE) {\n foreach ($datatypes as $datatype) {\n $replacements = array($target_images, $datatype);\n // Only process xml if there is a matching image to go with it.\n $matching_image = str_replace($patterns, $replacements, $value->uri);\n if (!empty($images[$matching_image])) {\n $files[substr($uri, $target_length)] = $value;\n }\n }\n }\n }\n return $files;\n }", "function fs_get_tree($dir_path) {\n #echo \"top of fs_get_tree, dir_path=$dir_path\\n\";\n { $old_cwd = getcwd();\n chdir($dir_path);\n #echo \" did chdir to '$dir_path'\\n\";\n\n {\n $fh = opendir('.');\n #echo \" opendir\\n\";\n\n $results = array();\n $n = 0;\n $dirs_to_crawl = array();\n while (true) {\n #echo \" loop\\n\";\n if ($n > 500) {\n #echo \"--- n > LIMIT (n=$n), break\\n\";\n break;\n }\n $n++;\n $file = readdir($fh);\n #echo \" file = '$file'\\n\";\n if (!$file) {\n break;\n }\n if ($file == '.'\n || $file == '..'\n || $file == '.git' #todo #fixme don't assume\n ) {\n #echo \"--- . or .., continuing\\n\";\n continue;\n }\n if (is_dir($file)) {\n #echo \"--- adding $file to dirs, n=$n\\n\";\n $dirs_to_crawl[] = $file;\n }\n $results[$file] = null;\n }\n closedir($fh);\n }\n\n #echo \"\\nnow looping thru dirs_to_crawl\\n\";\n foreach ($dirs_to_crawl as $dir) {\n #echo \" dir = $dir\\n\";\n $results[$dir] = fs_get_tree($dir);\n }\n\n chdir($old_cwd);\n }\n\n return $results;\n }", "private function checkDir()\n {\n $this->init = $this->url[0].'/';\n\n for ($i=0; $i < $this->count; $i++) { \n if (is_dir($this->init)) {\n if ($i == 0) {\n $this->dir .= $this->init;\n } elseif (is_dir($this->dir.$this->url[$i])) {\n $this->dir .= $this->url[$i].'/';\n } else {\n $this->file = $this->url[$i];\n break;\n }\n } else {\n if ($i == 0) {\n $this->dir .= 'views/';\n }\n \n if (is_dir($this->dir.$this->url[$i])) {\n $this->dir .= $this->url[$i].'/';\n } else {\n $this->file = $this->url[$i];\n break;\n }\n \n }\n }\n\n $this->dir = str_replace(\"//\", \"/\", $this->dir);\n $this->checkFile();\n }", "private function recurseThroughDirectory($baseDir, $lookingFor = \"/(.*)\\.php$/i\")\n {\n $results = array();\n $di = new RecursiveDirectoryIterator($baseDir);\n\n $this->output->writeLn(\"Scanning $baseDir...\");\n\n foreach (new RecursiveIteratorIterator($di) as $filename => $file) {\n if (preg_match($lookingFor, $filename)) {\n $results[] = $this->extractFrom($filename);\n }\n }\n\n return $results;\n }", "public function accept()\n {\n /**\n * @var \\SplFileInfo $current\n */\n $current = parent::current();\n if (!$current->isDir()) {\n return false;\n }\n }", "static function getDirectoryListing();", "function list_directories($path) {\n\tglobal $root_directory, $gmz_directories, $ignore_folders;\n if ($handle = @opendir($path)) { \n while (false !== ($filename = readdir($handle))) { \n if ($filename != '.' && $filename != '..') {\n\t\t\t\t$file_path = substr($path.'/'.$filename, strlen($root_directory)+1, strlen($path.'/'.$filename));\n\t\t\t\t$file_folder = substr($file_path, 0, -(strlen($filename)+1));\n\t\t\t\tif(is_dir($path.'/'.$filename)) {\n\t\t\t\t\tif(!in_array($file_path, $ignore_folders)) {\n\t\t\t\t\t\t$gmz_directories[] = $file_path;\n\t\t\t\t\t}\n\t\t\t\t\tlist_directories($path.'/'.$filename);\n\t\t\t\t}\n } \n } \n closedir($handle); \n } else {\n\t\tdisplay_error('Invalid Directory');\n\t}\n}", "function getSubfolders() ;", "static function AJAX_Scan() {\n\t\t$list = RecursiveScanDir(__DIR__);\n\t\tusort($list, \"strnatcasecmp\");\n\t\t\n\t\t// No files?\n\t\tif (!$list || !count($list)) die(\"No .php files located in this<br />folder and/or subfolders\");\n\t\t\n\t\t// For each file we'll present something nice\n\t\t$out = \"\";\n\t\tforeach($list as $file) {\n\t\t\t\n\t\t\t// If Mode is set to 1, we need to parse the file and check the completion\n\t\t\t$analysis = \"\";\n\t\t\tif ($_POST['Mode']) {\n\t\t\t\t$analysis = DocBlock::AnalyzeFile($file);\n\t\t\t}\n\t\t\t\n\t\t\t$out .= \"\n\t\t\t\t$analysis<a href='#' data-filename='\".rawurlencode($file).\"' class='filelink'>$file</a><br />\n\t\t\t\";\n\t\t}\n\t\t\n\t\t// Ouptut\n\t\techo $out;\n\t\t\n\t\t// Exit \"Gracefully\"\n\t\texit(0);\n\t}", "public function findAvailablePlugins($root) {\n $globIter = new \\GlobIterator($root . D_S . \"Plugins\" . D_S . \"*\" . D_S . \"plugin.yml\");\n foreach($globIter as $pluginFile) {\n $pluginInfo = yaml_parse_file($pluginFile->getRealPath());\n $pluginInfo['root'] = $pluginFile->getPath();\n $this->availablePlugins[$pluginInfo['name']] = $pluginInfo;\n }\n }", "function get_files($instructor=False, $sources=array('class', 'lab', 'project', 'exam', 'review', 'capstone', 'continued-lab'), $file_path = '.', $access=array(), $virtual=array(), $categories=array(), $secret='really') {\n $results = array();\n $basedir = scandir($file_path);\n foreach ($sources as $i => $l0) {\n if (in_array($l0, $basedir) && is_dir($file_path . '/' . $l0)) {\n $level1 = scandir($file_path . '/' . $l0);\n sort($level1);\n foreach ($level1 as $i => $l1) {\n if (substr($l1, 0, 1) != '.' && is_dir($file_path . '/' . $l0 . '/' . $l1)) {\n // The following code allows the system recursively look through the Directory\n // structure within a class, and the system can now process RELATIVE links\n // that go into those subordinate directories\n $level2 = array();\n try {\n $Iterator = new RecursiveIteratorIterator(\n new RecursiveDirectoryIterator($file_path . '/' . $l0 . '/' . $l1),\n RecursiveIteratorIterator::LEAVES_ONLY,\n RecursiveIteratorIterator::CATCH_GET_CHILD);\n foreach($Iterator as $name => $object) {\n $name = explode(\"/\", $name);\n unset($name[2]);\n unset($name[1]);\n unset($name[0]);\n $name = implode(\"/\", $name);\n $level2[] = $name;\n }\n } catch (Exception $e) {\n // Unable to recurse, so don't bother...\n }\n //$level2 = scandir($file_path . '/' . $l0 . '/' . $l1);\n $results[$l0][$l1] = array();\n sort($level2);\n foreach ($level2 as $i => $l2) {\n $key = sha1($secret.$l0.$l1.$l2);\n if (substr($l2, 0, 1) != '.' && validate_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $access)[0]) {\n if (is_link($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2)) {\n if (validate_file($instructor, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $access)[0]) {\n $vf = validate_file($instructor, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $access);\n $category = categorize_file($instructor, $l2, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $vf[5], $categories);\n $results[$l0][$l1][$l2] = array('actual' => $file_path . '/' . $l0 . '/' . $l1 . '/' . readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2),\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n } else {\n $vf = validate_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $access);\n $category = categorize_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $vf[5], $categories);\n $results[$l0][$l1][$l2] = array('actual' => $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2,\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n }\n }\n }\n }\n }\n }\n # Add Virtual files, format like array('class'=>array(1 => array(array('answers.html', 'homework/answers05.html'))))\n foreach ($virtual as $l0 => $l1array) {\n if (isset($results[$l0])) {\n $classes = array_keys($results[$l0]);\n foreach ($l1array as $day => $l2array) {\n if (isset($classes[$day-1])) {\n foreach ($l2array as $i => $values) {\n $virt_file = $values[0];\n $real_file = $values[1];\n if (validate_file($instructor, $real_file, $real_file, $access)[0]) {\n $key = sha1($secret.$real_file.$virt_file);\n $vf = validate_file($instructor, $real_file, $real_file, $access);\n $category = categorize_file($instructor, $virt_file, $real_file, $vf[5], $categories);\n $results[$l0][$classes[$day-1]][$virt_file] = array('actual' => $real_file,\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n }\n }\n }\n }\n }\n #####################################################\n # Verify that the class is not blocked by security...\n $today = getdate();\n foreach ($results as $l0 => $classes) {\n $counter = 1;\n foreach ($classes as $l1 => $data) {\n foreach ($data as $filename => $fdata) {\n if ($fdata['year'] == 1 && $fdata['month'] == 1 && $fdata['day'] == 1) {\n $cate = $fdata['category'];\n if (isset($access[$l0.\"_\".$counter]) && $cate == 'title') {\n $sspec = $l0.\"_\".$counter;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/\".$cate])) {\n $sspec = $l0.\"_\".$counter.\"/\".$cate;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/\".$filename])) {\n $sspec = $l0.\"_\".$counter.\"/\".$filename;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/all\"])) {\n $sspec = $l0.\"_\".$counter.\"/all\";\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n }\n }\n }\n $counter++;\n }\n }\n return $results;\n }", "public function findFiles();", "public function scanDirNames(callable $filter = null): Generator\n {\n /**\n * @var Generator<string>\n */\n return $this->scanRaw(false, true, $filter, null);\n }", "function dir_list($file)\n{\n $file_list = scandir($file);\n foreach($file_list as $item)\n {\n if($item == '.' || $item == '..')continue;\n \n $file_path = $file . '/' . $item;\n if(is_dir($file_path))\n {\n echo \"<font color='red'>$file_path</font><br/>\";\n dir_list($file_path);\n }\n else{\n echo $file_path . \"<br>\";\n }\n }\n}", "function logonscreener_source_scan() {\n global $source;\n $source = str_replace('\\\\', '/', rtrim($source, '/\\\\'));\n\n if (!$files = @scandir($source)) {\n if ($GLOBALS['debug_mode'] && is_file($source)) {\n // Debug mode let us set one specific image file as a source.\n $files = array(basename($source));\n $source = dirname($source);\n }\n else {\n logonscreener_log(\"$source not found.\");\n return FALSE;\n }\n }\n\n while (!empty($files)) {\n $key = array_rand($files);\n if (logonscreener_file_change($source . '/' . $files[$key])) {\n break;\n }\n unset($files[$key]);\n }\n\n return TRUE;\n}", "function discoverExistingClasses($recursive = FALSE);", "public function testListDirectory()\n {\n $temp = BASE_FOLDER . '/.dev/Tests/Data/Testcases';\n\n $this->options = array(\n 'recursive' => false,\n 'exclude_files' => false,\n 'exclude_folders' => false,\n 'extension_list' => array(),\n 'name_mask' => null\n );\n $this->path = BASE_FOLDER . '/.dev/Tests/Data/Testcases/';\n\n $adapter = new fsAdapter($this->action, $this->path, $this->filesystem_type, $this->options);\n\n $this->assertEquals(1, count($adapter->fs->data));\n\n return;\n }", "function parseDir($dir) {\r\n global $zoom;\r\n // start the scan...(open the local dir)\r\n $images = array();\r\n $handle = $zoom->platform->opendir($dir);\r\n while (($file = $zoom->platform->readdir($handle)) != false) {\r\n if ($file != \".\" && $file != \"..\") {\r\n $tag = ereg_replace(\".*\\.([^\\.]*)$\", \"\\\\1\", $file);\r\n $tag = strtolower($tag);\r\n if ($zoom->acceptableFormat($tag)) {\r\n // Tack it onto images...\r\n $images[] = $file;\r\n }\r\n }\r\n }\r\n $zoom->platform->closedir($handle);\r\n return $images;\r\n }", "function buscar($dir,&$archivo_buscar) \n{ // Funcion Recursiva \n // Autor DeeRme \n // http://deerme.org \n if ( is_dir($dir) ) \n { \n // Recorremos Directorio \n $d=opendir($dir); \n while( $archivo = readdir($d) ) \n { \n if ( $archivo!=\".\" AND $archivo!=\"..\" ) \n { \n \n if ( is_file($dir.'/'.$archivo) ) \n { \n // Es Archivo \n if ( $archivo == $archivo_buscar ) \n { \n return ($dir.'/'.$archivo); \n } \n \n } \n \n if ( is_dir($dir.'/'.$archivo) ) \n { \n // Es Directorio \n // Volvemos a llamar \n $r=buscar($dir.'/'.$archivo,$archivo_buscar); \n if ( basename($r) == $archivo_buscar ) \n { \n return $r; \n } \n \n \n } \n \n \n \n \n \n } \n \n } \n \n } \n return FALSE; \n}" ]
[ "0.7312299", "0.7297761", "0.7171603", "0.71259856", "0.7107098", "0.70851773", "0.6768123", "0.65986484", "0.6514543", "0.63404167", "0.63298833", "0.63052875", "0.6296188", "0.62949747", "0.6283482", "0.6276984", "0.6272302", "0.6215177", "0.6211419", "0.61895525", "0.6150548", "0.6124031", "0.61190265", "0.6081099", "0.6054076", "0.6038476", "0.60114694", "0.5985352", "0.5979156", "0.59587705", "0.5932144", "0.5928079", "0.59242207", "0.59219456", "0.59042704", "0.5884478", "0.58809125", "0.5867759", "0.5840785", "0.5807623", "0.5796964", "0.5749939", "0.5746181", "0.57365316", "0.57328254", "0.5724502", "0.571715", "0.5699528", "0.56825715", "0.5663", "0.56619585", "0.5657845", "0.5651757", "0.562381", "0.5614439", "0.5612743", "0.560864", "0.55832374", "0.55665", "0.5543549", "0.5536948", "0.55062634", "0.5502585", "0.549989", "0.5493424", "0.5474884", "0.54715943", "0.5463822", "0.5462994", "0.54508764", "0.5442152", "0.54414666", "0.54355854", "0.54223555", "0.53773046", "0.53763986", "0.53662026", "0.5363906", "0.5359299", "0.5355201", "0.5349027", "0.5335029", "0.5320991", "0.5288279", "0.5287722", "0.5278198", "0.52703786", "0.5256006", "0.5249355", "0.5247868", "0.5244338", "0.5243392", "0.52425104", "0.5238733", "0.5230971", "0.5220683", "0.52190673", "0.5213706", "0.5213479", "0.5211324" ]
0.7933779
0
Test for Directory::scan() Scan only the files inside ROOT directory
Тест для Directory::scan() Сканирование только файлов внутри корневой директории
public function test_scan_files() { $content = array('.gitignore','.htaccess','index.php','README'); $object = Directory::factory(ROOT); $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_FILES); $this->assertEquals(count($content), count($res)); foreach($res as $path=>$dir){ $this->assertTrue(in_array($dir->get_base_name(), $content)); $this->assertInstanceOf('\Kaili\File', $dir); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_scan_directories()\n {\n $content = array('.','..','application','.git','nbproject','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_DIRS);\n \n $this->assertEquals(count($content), count($res));\n foreach($res as $path=>$dir){\n $this->assertTrue(in_array($dir->get_base_name(), $content));\n $this->assertInstanceOf('\\Kaili\\Directory', $dir);\n }\n }", "private function scanFolder()\n {\n return scandir($this->currentPath);\n }", "public function test_scan()\n {\n $content = array('.','..','application','.git','.gitignore','.htaccess','index.php','nbproject','README','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC);\n \n $output = array();\n foreach($res as $f) $output[] = $f->get_base_name();\n $this->assertEquals($content, $output);\n }", "function rScanDir($scanMe) {\r\n\t\tglobal $path, $tmpPath, $cur_folder, $tags2;\r\n\t\tforeach($scanMe as $folder)\r\n\t\t{\r\n\t\t\tif(is_dir($path.$tmpPath.$folder) && $folder !=\".\" && $folder !=\"..\")\r\n\t\t\t{\r\n\t\t\t\t$cur_folder[] = $tmpPath.$folder;\r\n\t\t\t\techo \"getTagString input:\".$tmpPath.$folder.\"<br/>\";\r\n\t\t\t\t$tags2[] = getTagString($tmpPath.$folder);\r\n\t\t\t\t$tmpPath .= $folder.\"/\";\r\n\t\t\t\trScanDir(scandir($path.$tmpPath));\r\n\t\t\t}\r\n\t\t}\r\n\t\t$tmpPath = substr($tmpPath, 0, strrpos($tmpPath, \"/\"));\r\n\t\t$tmpPath = substr($tmpPath, 0, strrpos($tmpPath, \"/\")+1);\r\n\t}", "function DNUI_scan_dir($dirBase) {\r\n return array_diff(scandir($dirBase), array('..', '.'));\r\n}", "private function __scanDir($dir) {\n\n if ($dir == '/') {\n $dir = $this->startDirectory;\n $this->__currentDirectory = $dir;\n }\n\n $strippedDir = str_replace('/', '', $dir);\n\n $dir = ltrim($dir, \"/\");\n\n // Prevent listing blacklisted directories\n if (in_array($strippedDir, $this->ignoredDirectories)) {\n return false;\n }\n\n if (! file_exists($dir) || !is_dir($dir)) {\n return false;\n }\n\n return scandir($dir);\n }", "function scanDir() {\r\n $returnArray = array();\r\n \r\n if ($handle = opendir($this->uploadDirectory)) {\r\n \r\n while (false !== ($file = readdir($handle))) {\r\n if (is_file($this->uploadDirectory.\"/\".$file)) {\r\n $returnArray[] = $file;\r\n }\r\n }\r\n \r\n closedir($handle);\r\n }\r\n else {\r\n die(\"<b>ERROR: </b> No se puede leer el directorio <b>\". $this->uploadDirectory.'</b>');\r\n }\r\n return $returnArray; \r\n }", "protected function scanDir()\n {\n $this->moduleList = [];\n foreach ($this->getVendorList() as $vendorName) {\n $this->moduleList[$vendorName] = [];\n }\n\n $this->readModules();\n }", "function dirscan_files($rootFolder){\n $fileNames=[]; // will get filled\n foreach (scandir($rootFolder) as $name){\n if ($name=='.' || $name=='..') continue;\n if (!is_dir($rootFolder.\"/\".$name)) $fileNames[]=$name;\n }\n sort($fileNames);\n return $fileNames;\n}", "private function scan_directory($dir, $scan = \"\", &$nb_files = 0, &$nb_errors = 0){\n\t\t//Si c est la ou on etait , alors on reprend\n\t\tif ($dir == $scan or $scan == \"\"){\n\t\t\t$scan = \"\";\n\t\t\tDB::delete(\"delete from movies where directory = ?\",array($dir));\n\t\t\t$files = scandir($dir);\n\t\t\tforeach ($files as $file){\n\t\t\t\tif ($file != \"..\" and $file != \".\"){\n\t\t\t\t\tif (is_dir($dir.\"/\".$file)){\n\t\t\t\t\t\t$this->scan_directory($dir.\"/\".$file, $scan, $nb_files, $nb_errors);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tforeach (config(\"app.MOVIES_FILES\") as $ext){\n\t\t\t\t\t\t\tif (stripos($file,\".\".$ext) !== false){\n\t\t\t\t\t\t\t\t//Analyse du fichier\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$movie = new Movie();\n\t\t\t\t\t\t\t\t//On rajoute le fichier en base\t\t\t\t\t\n\t\t\t\t\t\t\t\t$movie->directory = $dir;\n\t\t\t\t\t\t\t\t$movie->filename = $file;\n\t\t\t\t\t\t\t\t$movie->status = -1;\n\t\t\t\t\t\t\t\t$movie->save();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t$movie->name = $this->remove($file);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$movie->status = 1;\n\t\t\t\t\t\t\t\t\t$movie->save();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$nb_files++;\n\t\t\t\t\t\t\t\t}catch(\\Exception $e){\n\t\t\t\t\t\t\t\t\t//Next...\n\t\t\t\t\t\t\t\t\t$nb_errors++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$json = [];\n\t\t\t$json[\"updated\"] = date(\"Y-m-d H:i:s\");\n\t\t\t$json[\"nb_files\"] = $nb_files;\n\t\t\t$json[\"nb_errors\"] = $nb_errors;\n\t\t\t$json[\"scan\"] = $scan;\n\t\t\tfile_put_contents(storage_path().\"/scan_movies.txt\",json_encode($json));\n\t\t}else{\n\t\t\t//Sinon, on reparcourt a partir de l'endroit, ou on etait\n\t\t\t$files = scandir($dir);\n\t\t\tforeach ($files as $file){\n\t\t\t\tif ($file != \"..\" and $file != \".\"){\n\t\t\t\t\tif (is_dir($dir.\"/\".$file)){\n\t\t\t\t\t\t$this->scan_directory($dir.\"/\".$file, $scan, $nb_files, $nb_errors);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function scanFiles($dir){\n $path = __DIR__ . DIRECTORY_SEPARATOR . $dir; /** Nurodomas kelias iki jsons folderio */\n $files = scandir($path); /** Nuskenuoja folderi pagal kelia($path) ir grazina esanciu failu masyva */\n\n return $files;\n}", "function scan_directory($dir, $ext = '*', $recurse = true) {\n $files = array ();\n if ($handle = opendir($dir)) {\n while (false !== ($file = readdir($handle))) {\n if ($file == '.' || $file == '..' ||\n $file == 'CVS' || preg_match('|^\\.|', $file)) {\n continue;\n }\n if (is_link($dir . '/' . $file)) {\n continue;\n }\n if (is_dir ($dir . '/' . $file)) {\n if ($recurse == true)\n $files = array_merge($files, scan_directory ($dir . '/' . $file, $ext));\n } else {\n if($ext == get_file_extension($file) || $ext == '*') {\n $files[] = $dir . '/' . $file;\n }\n }\n }\n closedir($handle);\n }\n return $files;\n}", "function scan(SplFileInfo $fileInfo, $repository)\n{\n $baseName = $fileInfo->getBasename();\n if ($baseName === '.' || $baseName === '..') {\n return;\n }\n\n $file = new File($fileInfo);\n $repository->save($file);\n if ($fileInfo->isDir()) {\n foreach (new RecursiveDirectoryIterator($fileInfo) as $child) {\n scan($child, $repository);\n }\n }\n}", "private function directoryScan($dir) {\n\t\t\n\t\t// check for the validity of input / working directory\n\t\t\n\t\tif (!is_dir($dir)) {\n\t\t\tdie(\"'$dir' is not a directory.\".LE);\n\t\t}\n\t\t\n\t\t// listing directory contents\n\t\t\n\t\t$result = [];\n\t\t\n\t\t$root = scandir($dir);\n\t\tforeach($root as $value)\n\t\t{\n\t\t\t// removing dots & output directory\n\t\t\t\n\t\t\tif($value === '.' || $value === '..') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// listing only files\n\t\t\t\n\t\t\tif(is_file(\"$dir\".DS.\"$value\")) {\n\t\t\t\t$result[$value]=\"$dir\".DS.\"$value\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// recursive call to self(this method) so we can get files listing recursively\n\t\t\t\n\t\t\tforeach($this->directoryScan(\"$dir\".DS.\"$value\") as $value1)\n\t\t\t{\n\t\t\t\t$result[basename($value1)]=$value1;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "function scan_dir($dir, $type=array(),$only=FALSE, $allFiles=FALSE, $recursive=TRUE, $onlyDir=\"\", &$files){\n\t$handle = @opendir($dir);\n\tif(!$handle)\n\t\treturn false;\n\twhile ($file = @readdir ($handle))\n\t{\n\t\tif (eregi(\"^\\.{1,2}$\",$file) || $file == 'index.html')\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\t\tif(!$recursive && $dir != $dir.$file.\"/\")\n\t\t{\n\t\t\tif(is_dir($dir.$file))\n\t\t\t\tcontinue;\n\t\t}\n\t\tif(is_dir($dir.$file))\n\t\t{\n\t\t\tscan_dir($dir.$file.\"/\", $type, $only, $allFiles, $recursive, $file, $files);\n\t\t}\n\t\telse\n\t\t{\n if($only)\n\t\t\t\t$onlyDir = $dir;\n\n\t\t\t$files = buildArray($dir,$file,$onlyDir,$type,$allFiles,$files);\n\t\t}\n\t}\n\t@closedir($handle);\n\treturn $files;\n}", "function scan($dir){\n\n\t$files = array();\n\n\t// Is there actually such a folder/file?\n\n\tif(file_exists($dir)){\n\t\n\t\tforeach(scandir($dir) as $f) {\n\t\t\n\t\t\tif(!$f || $f[0] == '.') {\n\t\t\t\tcontinue; // Ignore hidden files\n\t\t\t}\n\n\t\t\tif(is_dir($dir . '/' . $f)) {\n\n\t\t\t\t// The path is a folder\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"folder\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"items\" => scan($dir . '/' . $f) // Recursively get the contents of the folder\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\n\t\t\t\t// It is a file\n\t\t\t\t$path_info = pathinfo($f);\n\t\t\t\t//if ($path_info && $path_info.extension )\n\t\t\t\t$ext = $path_info['extension'];\n\t\t\t\tif($ext =='html'||$ext =='jpg' || $ext ==='png' || $ext == 'pdf'){\n\t\t\t\t\t$text = ($ext =='html') ?'doc':'image';\n\t\t\t\t\t$files[] = array(\n\t\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\t\"type\" => \"file\",\n\t\t\t\t\t\t\"text\" => $text,\n\t\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\t\"size\" => filesize($dir . '/' . $f) // Gets the size of this file\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t}\n\n\treturn $files;\n}", "function scanfiles( $path = '' ) {\n\t\t\t\n\t\t\tglobal $bwpsoptions;\n\t\t\t\n\t\t\t$tz = get_option( 'gmt_offset' ) * 60 * 60;\n\n $data = array();\n\n\t\t\tif ( $dirHandle = @opendir( ABSPATH . $path ) ) { //get the directory\n\t\t\t\n\t\t\t\twhile ( ( $item = readdir( $dirHandle ) ) !== false ) { // loop through dirs\n\t\t\t\t\t\n\t\t\t\t\tif ( $item != '.' && $item != '..' ) { //don't scan parent/etc\n\n\t\t\t\t\t\t$relname = $path . $item;\n \n\t\t\t\t\t\t$absname = ABSPATH . $relname;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( $this->checkFile( $relname ) == true ) { //make sure the user wants this file scanned\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( filetype( $absname ) == 'dir' ) { //if directory scan it\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$data = array_merge( $data, $this->scanfiles( $relname . '/' ) );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} else { //is file so add to array\n\n\t\t\t\t\t\t\t\t$data[$relname] = array();\n\t\t\t\t\t\t\t\t$data[$relname]['mod_date'] = @filemtime( $absname ) + $tz;\n\t\t\t\t\t\t\t\t$data[$relname]['hash'] = @md5_file( $absname );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} \n\t\t\t\t\n\t\t\t\t@closedir( $dirHandle ); //close the directory we're working with\n \n\t\t\t} \n\t\t\t\n\t\t\treturn $data; // return the files we found in this dir\n\t\t\t\n\t\t}", "function open_and_scan($SCAN_DIRECTORY,$prev_files){\n\tglobal $files,$exempt_files,$prev_files,$exempt_directory;\n\t$changed_files = '';\n\t$file_details = stat($SCAN_DIRECTORY);\n\t$dt = array();\n\tforeach($file_details as $key=>$info){\n\t\t$dt[$key] = $info;\n\t}\n\t$data = array(\n\t\t'file'=>$SCAN_DIRECTORY,\n\t\t'info'=>$dt\n\t);\n\tarray_push($files,$data);\n\t$changed_files .= get_prev_stats($SCAN_DIRECTORY,$prev_files);\n\t\t\t\t\t\n\t$handle = opendir($SCAN_DIRECTORY);\n\twhile($f = readdir($handle)){\n\t\tif($f != '.' && $f != '..'){\n\t\t\tif(!is_dir($SCAN_DIRECTORY.$f)){\n\t\t\t\t$file_array = explode('.',$f);\n\t\t\t\t$count = count($file_array);\n\t\t\t\t$extension = $file_array[$count-1];\n\t\t\t\tif($count > 1 && !in_array($extension,$exempt_files)){\n\t\t\t\t\t$file_details = stat($SCAN_DIRECTORY.$f);\n\t\t\t\t\t$dt = array();\n\t\t\t\t\tforeach($file_details as $key=>$info){\n\t\t\t\t\t\t$dt[$key] = $info;\n\t\t\t\t\t}\n\t\t\t\t\t$data = array(\n\t\t\t\t\t\t'file'=>$SCAN_DIRECTORY.$f,\n\t\t\t\t\t\t'info'=>$dt\n\t\t\t\t\t);\n\t\t\t\t\tarray_push($files,$data);\n\t\t\t\t\t$changed_files .= get_prev_stats($SCAN_DIRECTORY.$f,$prev_files);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif(!in_array($f,$exempt_directory)){\n\t\t\t\t\topen_and_scan($SCAN_DIRECTORY.$f.'/',$prev_files);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn array(\n\t\t'changed'=>$changed_files,\n\t\t'files'=>$files\n\t);\n}", "function scan($dir){\n\n\t$files = array();\n\n\t// Is there actually such a folder/file?\n\n\tif(file_exists($dir)){\n\t\n\t\tforeach(scandir($dir) as $f) { // scandir() accepts the full path of the folder to be scanned\n\t\t\n\t\t\tif(!$f || $f[0] == '.') {\n\n\t\t\t\t// It is a hidden file\n\t\t\t\t\n\t\t\t\tcontinue; \n\t\t\t}\n\n\t\t\tif(is_dir($dir . '/' . $f)) {\n\n\t\t\t\t// The path is a folder\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"folder\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"items\" => scan($dir . '/' . $f) // Recursively get the contents of the folder\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\n\t\t\t\t// It is a file\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"file\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"size\" => filesize($dir . '/' . $f) // Gets the size of this file\n\t\t\t\t);\n\t\t\t}\n\n\t\t}\n\t\n\t}\n\n\treturn $files;\n}", "function scan_files( ){\n\n // List of all the audio files found in the directory and sub-directories\n $audioFileArray = array();\n\n // List of filenames already handled during the scan. To detect dupe filenames.\n $alreadyhandledFileArray = array();\n\n // Make list of all files in db to remove non existent files\n $DBaudioFileArray = array();\n foreach ( $this->get_list_of_files()->fetchAll() as $row ) {\n $DBaudioFileArray[] = $row['filename'];\n }\n\n // Prepare variables for file urls\n //$base_dir = dirname(dirname(realpath($this->filedirectorypath))); // Absolute path to your installation, ex: /var/www/mywebsite\n $doc_root = preg_replace(\"!{$_SERVER['SCRIPT_NAME']}$!\", '', $_SERVER['SCRIPT_FILENAME']); # ex: /var/www\n $protocol = empty($_SERVER['HTTPS']) ? 'http' : 'https';\n $port = $_SERVER['SERVER_PORT'];\n $disp_port = ($protocol == 'http' && $port == 80 || $protocol == 'https' && $port == 443) ? '' : \":$port\";\n $domain = $_SERVER['SERVER_NAME'];\n // variables for file urls\n\n // Create recursive dir iterator which skips dot folders\n $dir = new RecursiveDirectoryIterator( $this->filedirectorypath , FilesystemIterator::SKIP_DOTS);\n\n // Flatten the recursive iterator, consider only files, no directories\n $it = new RecursiveIteratorIterator($dir);\n\n // Find all the mp3 files\n foreach ($it as $fileinfo) {\n if ($fileinfo->isFile() && !strcmp($fileinfo->getExtension(), \"mp3\")) {\n $audioFileArray[] = $fileinfo;\n\n //Warning: files with same md5key in different folders will not be inserted into the db.\n //print md5_file($fileinfo) . \"<br />\\n\";\n }\n }\n\n foreach ($audioFileArray as $key => $fileinfo) {\n\n $filename = $fileinfo->getFilename();\n\n //For each file found on disk remove entry from list from DB\n // if any left at the end, they are files that no longer are present on the drive.\n //print \"unsetting: \" . $filename . \"<br>\";\n unset($DBaudioFileArray[array_search($filename,$DBaudioFileArray,true)]);\n\n // check file not in db\n if( !$this->is_file_in_db( $filename ) ) {\n\n //decode filename date if named according to our naming scheme\n $date = $this->decode_filename($filename);\n\n // Build file url based on server path\n $filepath = realpath($fileinfo->getRealPath());\n $base_url = preg_replace(\"!^{$doc_root}!\", '', $filepath); # ex: '' or '/mywebsite'\n $full_url = \"$protocol://{$domain}{$disp_port}{$base_url}\"; # Ex: 'http://example.com', 'https://example.com/mywebsite', etc.\n\n //print $filename . \" - \" . $full_url . \"<br />\\n\";\n\n //insert audiofile in db for first time\n $this->insert_new_file_into_db( $filename, $full_url, $fileinfo->getRealPath(), $fileinfo->getSize(), $date );\n\n $alreadyhandledFileArray[$key] = $filename;\n\n } else {\n // if file in alreadyhandled array, then duplicate named files have been found\n // how to check for duplicate file names?\n // if we're here then the name has already ben added to the db (but maybe during a previous run)\n //we still need to look for the file in the alreadyhandledFileArray\n if( in_array($filename, $alreadyhandledFileArray) ){\n // flag file\n $this->flag_file($filename, \"Il y a 2 ou plusieurs fichiers audio avec le même nom dans le dossier audio du serveur ftp. Veuillez changer les noms ou supprimer les doublons.\");\n }\n }\n\n\n }\n\n // If there are files from the database that weren't found in the audio folder,\n // flag them and add a comment stating that the file can no longer be found.\n if( count($DBaudioFileArray) ){\n //print_r($DBaudioFileArray);\n foreach($DBaudioFileArray as $key => $fn){\n $this->flag_file($fn, \"Le fichier en question n'est plus présent dans le dossier audio du serveur ftp. Il faut le supprimer de la base de données.\");\n $this->set_file_not_new($fn);\n }\n }\n\n return true;\n }", "public function scan($filename){ }", "function scanDir($cfg) //$view, $tdir , $subdir='', $match)\n {\n $ff = HTML_FlexyFramework::get();\n \n $subdir = $cfg['subdir'];\n $scandir = $cfg['tdir']. (empty($subdir) ? '' : '/') . $subdir;\n \n if (in_array($subdir, $cfg['skipdir'])) {\n return array();\n }\n // skip dom_templates\n \n if (!file_exists($scandir)) {\n return array();\n }\n $dh = opendir($scandir);\n if(!$dh){\n return array(); // something went wrong!?\n }\n $ret = array();\n \n while (($fn = readdir($dh)) !== false) {\n // do we care that it will try and parse the template directory??? - not really..\n // as we are only looking for php files..\n if(empty($fn) || $fn[0] == '.'){\n continue;\n }\n \n $fullpath = $scandir.(empty($scandir) ? '' : \"/\").$fn;\n // echo \"filename: $fullpath \\n\";\n \n if (is_link($fullpath)) {\n continue;\n }\n \n if(is_dir($fullpath)){\n // then recursively call self...\n $cfg['subdir'] = $subdir . (empty($subdir) ? '' : '/') . $fn;\n $children = $this->scanDir($cfg);\n if (count($children)) {\n $ret = array_merge($ret, $children);\n \n }\n continue;\n \n }\n \n if (!preg_match($cfg['match'], $fn) || !is_file($fullpath)) {\n continue;\n }\n \n \n \n $ret[] = $subdir . (empty($subdir) ? '' : '/'). $fn; /// this used to be strtolower?? why???\n\n \n \n }\n// print_r($ret);\n \n return $ret;\n \n \n \n \n }", "function RecursiveScanDir($dir, $prefix = '') {\n\t$dir = rtrim($dir, '\\\\/');\n\t$result = array();\n\tforeach (scandir($dir) as $f) {\n if (\n preg_match('`/tmp/`', \"$dir/$f\")\n || preg_match('`/fpdf.php$`', \"$dir/$f\")\n || preg_match('`/libs/pi_barcode.php$`', \"$dir/$f\")\n || preg_match('`/libs/phpmailer/`', \"$dir/$f\")\n || preg_match('`/libs/securimage/`', \"$dir/$f\")\n || preg_match('`/libs/Smarty/`', \"$dir/$f\")\n )\n continue;\n\t\tif ($f !== '.' and $f !== '..') {\n\t\t\tif (is_dir(\"$dir/$f\")) {\n\t\t\t\t$result = array_merge($result, RecursiveScanDir(\"$dir/$f\", \"$prefix$f/\"));\n\t\t\t} else {\n\t\t\t\tif ( strtolower(substr(pathinfo($f,PATHINFO_EXTENSION),0,3)) == \"php\" && pathinfo(__FILE__,PATHINFO_BASENAME ) != pathinfo($f,PATHINFO_BASENAME ) )\n\t\t\t\t\t$result[] = $prefix.$f;\n\t\t\t}\n\t\t}\n\t}\n\treturn $result;\n}", "static private function scan_dir( $dir ) {\n\t\t$ignored = array( '.', '..', '.svn', '.htaccess', 'test-log.log' );\n\n\t\t$files = array();\n\t\tforeach ( scandir( $dir ) as $file ) {\n\t\t\tif ( in_array( $file, $ignored ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$files[ $file ] = filemtime( $dir . '/' . $file );\n\t\t}\n\t\tarsort( $files );\n\t\t$files = array_keys( $files );\n\n\t\treturn ( $files ) ? $files : false;\n\t}", "public function scan($regex_filter=NULL)\n\t{\n\t\t$this->tossIfException();\n\t\t\n\t\t$files = array_diff(scandir($this->directory), array('.', '..'));\n\t\t$objects = array();\n\t\t\n\t\tforeach ($files as $file) {\n\t\t\t$file = $this->directory . $file;\n\t\t\t\n\t\t\tif ($regex_filter) {\n\t\t\t\t$test_path = (is_dir($file)) ? $file . '/' : $file;\n\t\t\t\tif (!preg_match($regex_filter, $test_path)) {\n\t\t\t\t\tcontinue;\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$objects[] = fFilesystem::createObject($file);\n\t\t}\n\t\t\n\t\treturn $objects;\n\t}", "function l10n_drupal_files_scan($source = NULL, $automated = FALSE) {\n\n // We look for projects in the working directory.\n $workdir = variable_get('l10n_server_connector_l10n_drupal_files_directory', '');\n\n if (!is_dir($workdir)) {\n drupal_set_message(t('The configured directory (%workdir) cannot be found. <a href=\"@configure\">Check your configuration</a>.', array('%workdir' => $workdir, '@configure' => url('admin/l10n_server/connectors/config/l10n_drupal/files'))));\n }\n else {\n // define a list of allowed extensions, we will use it later on file_scan_directory\n // and further regular expression buildung processing. Thanks to EugenMayer\n $allowed_file_extensions = array('.tar.gz', '.tgz');\n // build the regular expression\n foreach($allowed_file_extensions as $key => $extension) {\n // escape the file extensions for later regular expression usage\n $allowed_file_extensions[$key] = preg_quote($extension);\n }\n $file_extension_pattern = '(' . implode('|', $allowed_file_extensions) . ')$';\n\n // Packages are always .tar.gz files.\n $files = file_scan_directory($workdir, $file_extension_pattern);\n if (count($files)) {\n foreach ($files as $path => $file) {\n\n if (!l10n_drupal_is_supported_version($path)) {\n // Skip files for unsupported versions.\n continue;\n }\n\n // Get rid of $workdir prefix on file names, eg.\n // drupal-6.x-6.19.tar.gz\n // Drupal/drupal-4.6.7.tar.gz or\n // files/Ubercart/ubercart-5.x-1.0-alpha8.tar.gz.\n $path = $package = trim(preg_replace('!(^' . preg_quote($workdir, '!') . ')(.+)\\.tar\\.gz!', '\\2', $path), '/');\n\n // split the filename into parts to $filename_splitted\n // [0] = the full string\n // [1] = the subdirectory and filename with extension\n // [1] = the subdirectory and filename without extension\n // [2] = the extension .tar.gz or .tgz\n $file_splitted = array(); // ensure to be a array....\n // the regular expression pattern (i put it in a var because i can better handle it with dpm for debugging, move if you want...)\n $file_split_pattern = '!^'. preg_quote($workdir, '!') .'((.+)'. $file_extension_pattern .')!';\n preg_match( $file_split_pattern, $path, $file_splitted );\n // put the result in vars for better handling\n list($file_fullpath, $file_subpath_ext, $file_subpath, $file_extension) = $file_splitted;\n\n // redefine the path to subpath without slash at beginning\n $path = trim($file_subpath, '/');\n // same on package\n $package = trim($file_subpath, '/');\n $project_title = '';\n if (strpos($path, '/')) {\n // We have a slash, so this package is in a subfolder.\n // Eg. Drupal/drupal-4.6.7 or Ubercart/ubercart-5.x-1.0-alpha8.\n // Grab the directory name as project title.\n list($project_title, $package) = explode('/', $path);\n }\n if (strpos($package, '-')) {\n // Only remaining are the project uri and release,\n // eg. drupal-4.6.7 or ubercart-5.x-1.0-alpha8.\n list($project_uri, $release_version) = explode('-', $package, 2);\n\n l10n_drupal_save_data($project_uri, ($project_title ? $project_title : $project_uri), $release_version, trim($file_subpath_ext, '/'), filemtime($file->filename));\n }\n else {\n // File name not formatted properly.\n $result['error'] = t('File name should have project codename and version number included separated with hyphen, such as drupal-5.2.tar.gz.');\n }\n }\n }\n }\n\n $user_feedback = FALSE;\n $results = db_query_range(\"SELECT * FROM {l10n_server_release} WHERE pid IN (SELECT pid FROM {l10n_server_project} WHERE connector_module = 'l10n_drupal_files' AND status = 1) ORDER BY last_parsed ASC\", 0, variable_get('l10n_server_connector_l10n_drupal_files_limit', 1));\n while ($release = db_fetch_object($results)) {\n\n // Only parse file if something changed since we last parsed it.\n $file_name = $workdir . '/' . $release->download_link;\n\n if (file_exists($file_name)) {\n if (filemtime($file_name) > $release->last_parsed) {\n $result = l10n_drupal_parse_package($file_name, $release);\n\n // User feedback, if not automated. Log messages are already done.\n if (isset($result['error']) && !$automated) {\n $user_feedback = TRUE;\n drupal_set_message($result['error'], 'error');\n }\n elseif (isset($result['message']) && !$automated) {\n $user_feedback = TRUE;\n drupal_set_message($result['message']);\n }\n }\n else {\n if (!$automated) {\n $user_feedback = TRUE;\n drupal_set_message(t('@release was already parsed, no need to scan again.', array('@release' => $release->download_link)));\n }\n }\n }\n // Hackish update of last parsed time so other tarballs will get into the queue too.\n // @todo: work on something better for this.\n db_query(\"UPDATE {l10n_server_release} SET last_parsed = %d WHERE rid = %d\", time(), $release->rid);\n }\n if (!$automated && !$user_feedback) {\n drupal_set_message(t('No (new) local Drupal files found to scan in %workdir.', array('%workdir' => $workdir)));\n }\n\n // Ensure that a Drupal page will be displayed with the messages.\n return '';\n}", "function scan_directory_recursively($directory, $filter=FALSE)\n{\n\tif(substr($directory,-1) == '/')\n\t{\n\t\t$directory = substr($directory,0,-1);\n\t}\n\tif(!file_exists($directory) || !is_dir($directory))\n\t{\n\t\treturn FALSE;\n\t}elseif(is_readable($directory))\n\t{\n\t\t$directory_list = opendir($directory);\n\t\twhile($file = readdir($directory_list))\n\t\t{\n\t\t\tif($file != '.' && $file != '..' && $file != '.DS_Store' && $file != '.svn')\n\t\t\t{\n\t\t\t\t$path = $directory.'/'.$file;\n\t\t\t\tif(is_readable($path))\n\t\t\t\t{\n\t\t\t\t\t$subdirectories = explode('/',$path);\n\t\t\t\t\tif(is_dir($path))\n\t\t\t\t\t{\n\t\t\t\t\t\t$directory_tree[] = array(\n\t\t\t\t\t\t\t'path' => $path,\n\t\t\t\t\t\t\t'name' => end($subdirectories),\n\t\t\t\t\t\t\t'modified'\t=> filemtime($path),\n\t\t\t\t\t\t\t'kind' => 'directory',\n\t\t\t\t\t\t\t'content' => scan_directory_recursively($path, $filter));\n\t\t\t\t\t}elseif(is_file($path))\n\t\t\t\t\t{\n\t\t\t\t\t\t$extension = end(explode('.',end($subdirectories)));\n\t\t\t\t\t\tif($filter === FALSE || $filter == $extension)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Get metadata and image dimensions\n\t\t\t\t\t\t\t$size = getimagesize($path, $info);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Get containing directory of file\n\t\t\t\t\t\t\t$directory_array = explode('/', $path);\n\t\t\t\t\t\t\t$parent_folder = min($directory_array);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Reset title, caption, tags\n\t\t\t\t\t\t\t$title = $caption = $taglist = $tags = '';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$directory_tree[] = array(\n\t\t\t\t\t\t\t'path'\t\t=> dirname($path),\n\t\t\t\t\t\t\t'group'\t\t=> $parent_folder,\n\t\t\t\t\t\t\t'file'\t\t=> end($subdirectories),\n\t\t\t\t\t\t\t'extension' => $extension,\n\t\t\t\t\t\t\t'size'\t\t=> filesize($path),\n\t\t\t\t\t\t\t'width'\t\t=> $size[0],\n\t\t\t\t\t\t\t'height'\t=> $size[1],\n\t\t\t\t\t\t\t'modified'\t=> filemtime($path),\n\t\t\t\t\t\t\t'title'\t\t=> $title,\n\t\t\t\t\t\t\t'caption'\t=> $caption,\n\t\t\t\t\t\t\t'tags'\t\t=> $tags,\n\t\t\t\t\t\t\t'kind'\t\t=> '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\t\tclosedir($directory_list); \n\t\treturn $directory_tree;\n\t}else{\n\t\treturn FALSE;\t\n\t}\n}", "protected function scanDirectory($dir, $include_tests) {\n $files = array();\n\n // In order to scan top-level directories, absolute directory paths have to\n // be used (which also improves performance, since any configured PHP\n // include_paths will not be consulted). Retain the relative originating\n // directory being scanned, so relative paths can be reconstructed below\n // (all paths are expected to be relative to $this->root).\n $dir_prefix = ($dir == '' ? '' : \"$dir/\");\n $absolute_dir = ($dir == '' ? $this->root : $this->root . \"/$dir\");\n\n if (!is_dir($absolute_dir)) {\n return $files;\n }\n // Use Unix paths regardless of platform, skip dot directories, follow\n // symlinks (to allow extensions to be linked from elsewhere), and return\n // the RecursiveDirectoryIterator instance to have access to getSubPath(),\n // since SplFileInfo does not support relative paths.\n $flags = \\FilesystemIterator::UNIX_PATHS;\n $flags |= \\FilesystemIterator::SKIP_DOTS;\n $flags |= \\FilesystemIterator::FOLLOW_SYMLINKS;\n $flags |= \\FilesystemIterator::CURRENT_AS_SELF;\n $directory_iterator = new \\RecursiveDirectoryIterator($absolute_dir, $flags);\n\n // Filter the recursive scan to discover extensions only.\n // Important: Without a RecursiveFilterIterator, RecursiveDirectoryIterator\n // would recurse into the entire filesystem directory tree without any kind\n // of limitations.\n $filter = new RecursiveExtensionFilterIterator($directory_iterator);\n $filter->acceptTests($include_tests);\n\n // The actual recursive filesystem scan is only invoked by instantiating the\n // RecursiveIteratorIterator.\n $iterator = new \\RecursiveIteratorIterator($filter,\n \\RecursiveIteratorIterator::LEAVES_ONLY,\n // Suppress filesystem errors in case a directory cannot be accessed.\n \\RecursiveIteratorIterator::CATCH_GET_CHILD\n );\n\n foreach ($iterator as $key => $fileinfo) {\n $name = $fileinfo->getBasename('.info.yml');\n\n if ($this->fileCache && $cached_extension = $this->fileCache->get($fileinfo->getPathName())) {\n $files[$cached_extension->getType()][$key] = $cached_extension;\n continue;\n }\n\n // Determine extension type from info file.\n $type = FALSE;\n $file = $fileinfo->openFile('r');\n while (!$type && !$file->eof()) {\n preg_match('@^type:\\s*(\\'|\")?(\\w+)\\1?\\s*$@', $file->fgets(), $matches);\n if (isset($matches[2])) {\n $type = $matches[2];\n }\n }\n if (empty($type)) {\n continue;\n }\n $name = $fileinfo->getBasename('.info.yml');\n $pathname = $dir_prefix . $fileinfo->getSubPathname();\n\n $filename = $name . '.' . $type;\n\n if (!file_exists(dirname($pathname) . '/' . $filename)) {\n $filename = NULL;\n }\n\n $extension = new Extension($this->root, $type, $pathname, $filename);\n\n // Track the originating directory for sorting purposes.\n $extension->subpath = $fileinfo->getSubPath();\n $extension->origin = $dir;\n\n $files[$type][$key] = $extension;\n\n if ($this->fileCache) {\n $this->fileCache->set($fileinfo->getPathName(), $extension);\n }\n }\n return $files;\n }", "public function findFiles();", "private static function __fordeepscan($dir, $file)\n {\n $path = \"\";\n $scan = glob($dir.'/*');\n $q = preg_quote($file, '\\\\');\n\n if (is_array($scan))\n {\n foreach ($scan as $d => $f)\n {\n if ($f != '.' && $f != '..')\n {\n $f = preg_replace(\"/[\\/]{1,}/\", '/', $f);\n\n if (!is_dir($f))\n {\n $base = basename($f);\n\n if (($base == $file) && strrpos($f, $file) !== false)\n {\n $path = $f;\n }\n\n $base = null;\n }\n\n if ($path == \"\")\n {\n $path = self::__fordeepscan($f, $file);\n if ($path !== \"\"){\n if (strrpos($path, $file) !== false){\n break;\n }\n }\n }\n\n $f = null;\n }\n }\n\n $scan = null;\n }\n\n return $path;\n }", "function searchDir($root,$path,&$data)\n\t{\n\t\t$full_path = $root.$path;\n\t\tif(is_dir($full_path))\n\t\t{\n\t\t\t$dp=dir($full_path);\n\t\t\twhile($file=$dp->read())\n\t\t\t{\n\t\t\t\tif($file!='.'&& $file!='..')\n\t\t\t\t{\n\t\t\t\t\tsearchDir($root,$path.'/'.$file,$data);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$dp->close();\n\t\t}\n\t\tif(is_file($full_path))\n\t\t{\n\t\t\t$data[]=$path;\n\t\t}\n\t}", "function bob_scandir($root_path, $bad_path, $recursive) {\n $output = array();\n if (file_exists($root_path)){\n $paths = scandir($root_path);\n if ($paths === False)\n return False;\n foreach ($paths as $path) {\n $potential_path = \"${root_path}/${path}\";\n\n // Ignore any files in the bad (admin) path or files that begin with a period.\n if ($potential_path == $bad_path or $path[0] == '.')\n continue;\n\n $output[] = $potential_path;\n $bad_folder = ''; // not sure what this is for\n if ($recursive and is_dir($potential_path)) // Recursively descend and print out files.\n $output = array_merge($output, bob_scandir($potential_path, $bad_folder, $recursive));\n }\n }\n return $output;\n}", "public function scanSourceFolders() {\n $this->addons = [];\n foreach ($this->sources as $sourceDir) {\n $this->scanSource($sourceDir);\n }\n }", "public function backgroundScan() {\n\t\t$lastPath = null;\n\t\twhile (($path = $this->cache->getIncomplete()) !== false && $path !== $lastPath) {\n\t\t\t$this->scan($path, self::SCAN_RECURSIVE, self::REUSE_ETAG);\n\t\t\t$this->cache->correctFolderSize($path);\n\t\t\t$lastPath = $path;\n\t\t}\n\t}", "public function scanSrc($dir, $total = array())\n {\n if ($handle = opendir($dir)) {\n while (($file = readdir($handle)) !== false) {\n if ($file != \"..\" && $file != \".\") {\n if (is_dir($dir . \"/\" . $file))\n // Do DFS\n $total += $this->scanSrc($dir . \"/\" . $file, $total);\n else\n array_push($total, $dir . '/' . $file);\n }\n }\n closedir($handle);\n return $total;\n }\n }", "function scan_dir($dir){\n\tif( !is_dir( $dir ) )\n\t\treturn false;\n\n\t$files=scandir($dir);\n\n\t$dirs=array();\n\tforeach($files as $file){\n\t\tif($file=='.'||$file=='..'||substr($file,0,1)=='.')\n\t\t\tcontinue;\n\t\tif(is_dir($dir.'/'.$file))\n\t\t\tarray_push($dirs,$file);\n\t}\n\n\treturn $dirs;\n}", "public function dir_readdir() {}", "public function test_search()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search('/(index.php|.htaccess)/');\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n $this->assertArrayHasKey(ROOT.DS.'.htaccess', $res);\n }", "function scan_students()\n {\n $current_students = [];\n $di = new RecursiveDirectoryIterator('students/');\n foreach (new RecursiveIteratorIterator($di) as $filename => $file) {\n $path_info = pathinfo($filename);\n if($path_info['extension']=='json'){\n array_push($current_students,$path_info['filename']);\n }\n }\n // echo print_r($current_students);\n return $current_students;\n }", "static function AJAX_Scan() {\n\t\t$list = RecursiveScanDir(__DIR__);\n\t\tusort($list, \"strnatcasecmp\");\n\t\t\n\t\t// No files?\n\t\tif (!$list || !count($list)) die(\"No .php files located in this<br />folder and/or subfolders\");\n\t\t\n\t\t// For each file we'll present something nice\n\t\t$out = \"\";\n\t\tforeach($list as $file) {\n\t\t\t\n\t\t\t// If Mode is set to 1, we need to parse the file and check the completion\n\t\t\t$analysis = \"\";\n\t\t\tif ($_POST['Mode']) {\n\t\t\t\t$analysis = DocBlock::AnalyzeFile($file);\n\t\t\t}\n\t\t\t\n\t\t\t$out .= \"\n\t\t\t\t$analysis<a href='#' data-filename='\".rawurlencode($file).\"' class='filelink'>$file</a><br />\n\t\t\t\";\n\t\t}\n\t\t\n\t\t// Ouptut\n\t\techo $out;\n\t\t\n\t\t// Exit \"Gracefully\"\n\t\texit(0);\n\t}", "protected static function _scanForPlugins(){\n\t\t$directory = __DIR__ . Config::$pluginsDirectory;\n\t\t$handle = opendir( $directory );\n\n\t\t// check to make sure we could open the directory handle\n\t\tif( !$handle )\n\t\t\treturn;\n\n\t\t// now begin looping through all of the contents of the plugin directory\n\t\twhile( ( $dir = readdir( $handle ) ) !== false ){\n\t\t\tif( $dir === '.' || $dir === '..' )\n\t\t\t\tcontinue;\n\n\t\t\t// now we need to verify that the current \"file\" is a directory before continuing\n\t\t\tif( !is_dir( $directory . $dir ) )\n\t\t\t\tcontinue;\n\n\t\t\t// expect a class file to exist in the format \"class-<DirectoryName>.php\"\n\t\t\t$classFile = $directory . $dir . '/' . $dir . '.php';\n\t\t\tif( !file_exists( $classFile ) )\n\t\t\t\tcontinue;\n\n\t\t\t// now actually include the code\n\t\t\trequire_once( $classFile );\n\n\t\t\t// now expect the class name to match whatever the $dir name was\n\t\t\tif( !class_exists( $dir ) )\n\t\t\t\tcontinue;\n\n\t\t\t// now we can instantiate the class name and store it now\n\t\t\tself::$_plugins[] = new $dir();\n\t\t}\n\t}", "private function scanDir(string $path, array &$files, bool $recursion = false): void\n {\n $handler = opendir($path);\n\n while ($item = readdir($handler)) {\n if (in_array($item, ['.', '..'])) {\n continue;\n }\n\n $itemPath = sprintf('%s/%s', $path, $item);\n\n if (is_file($itemPath)) {\n $files[] = $itemPath;\n continue;\n }\n\n if ($recursion && is_dir($itemPath)) {\n $this->scanDir($itemPath, $files, $recursion);\n }\n }\n }", "private function recSearchFiles($dir)\n {\n $ffs = scandir($dir);\n\n foreach ($ffs as $ff) {\n\n if ($ff != '.' && $ff != '..') {\n\n if (is_dir($dir . '/' . $ff)) {\n $this->recSearchFiles($dir . $ff . '/');\n } else if (strlen($ff) >= 5) {\n $this->searchedFiles[] = $dir . $ff;\n }\n }\n }\n }", "public function scanPath(Path $path)\n\t{\n\t\treturn @scandir($path->getPath());\n\t}", "function searchDir($base_dir=\"./\",$p=\"\",$f=\"\",$allowed_depth=-1){\n\t$contents=array();\n\n\t# trim all input arguments for whitespace\n\t$base_dir=trim($base_dir);\n\t$p=trim($p);\n\t$f=trim($f);\n\n # if base dir is not given, use the this\n\tif($base_dir==\"\")$base_dir=\"./\";\n\n\t# if last character of basedir lacks a \"/\" then add one\n\tif(substr($base_dir,-1)!=\"/\")$base_dir.=\"/\";\n\n\t# remove the \"../\" and \"./\" directories, and trim all \"./\"\n\t$p=str_replace(array(\"../\",\"./\"),\"\",trim($p,\"./\"));\n\n\t# add the requested path to the base directory string\n\t$p=$base_dir.$p;\n\n\t#if p is not a directory, meaning it is a file, get the path to it\n\tif(!is_dir($p))$p=dirname($p);\n\n\t#if the last character of p is not a \"/\" then add one\n\tif(substr($p,-1)!=\"/\")$p.=\"/\";\n\n\t# if caps are set on allowed depth (allowed depth>-1) count the dirs\n\tif($allowed_depth>-1){\n\t\t$allowed_depth=count(explode(\"/\",$base_dir))+ $allowed_depth-1;\n\t\t$p=implode(\"/\",array_slice(explode(\"/\",$p),0,$allowed_depth));\n\t\tif(substr($p,-1)!=\"/\")$p.=\"/\";\n\t}\n\n\t# if f is empty, create an empty array, if not explode and store elements\n\t$filter=($f==\"\")?array():explode(\",\",strtolower($f));\n\n\t# store the files in the files array, and shut up while scanning\n\t$files=@scandir($p);\n\n\t# if there are no files after scan, return an empty array and the path\n\tif(!$files)return array(\"contents\"=>array(),\"currentPath\"=>$p);\n\n\t# iterate through all files found\n\tfor ($i=0;$i<count($files);$i++){\n\n\t\t# gather name and path of each file\n\t\t$fName=$files[$i];\n\t\t$fPath=$p.$fName;\n\n\t\t# check if the file is a directory and tag it as directory\n\t\t# each file is tagged as a folder by default\n\t\t$isDir=is_dir($fPath);\n\t\t$add=false;\n\t\t$fType=\"folder\";\n\n\t\t# if the file is a file\n\t\tif(!$isDir){\n\n\t\t\t# extract extension from filename\n\t\t\t$ft=strtolower(substr($files[$i],strrpos($files[$i],\".\")+1));\n\t\t\t$fType=$ft;\n\n\t\t\t# if there is anything in the filter that matches, add it\n\t\t\tif($f!=\"\"){\n\t\t\t\tif(in_array($ft,$filter))$add=true;\n\t\t\t}else{\n\t\t\t\t$add=true;\n\t\t\t}\n\t\t# if the file is a folder\n\t\t}else{\n\t\t\tif($fName==\".\")continue;\n\t\t\t$add=true;\n\n\t\t\t# filter it, and discard if bad\n\t\t\tif($f!=\"\"){\n\t\t\t\tif(!in_array($fType,$filter))$add=false;\n\t\t\t}\n\n\t\t\t# if the file is the \"..\" folder\n\t\t\tif($fName==\"..\"){\n\t\t\t\t# if we are in the base dir, no not add upper directory option\n\t\t\t\tif($p==$base_dir){\n\t\t\t\t\t$add=false;\n\t\t\t\t}else $add=true;\n\n\t\t\t\t# explode the path by path steps\n\t\t\t\t$tempar=explode(\"/\",$fPath);\n\t\t\t\t# remove last two elements, so the file references parent dir\n\t\t\t\tarray_splice($tempar,-2);\n\t\t\t\t# implode the array, to recreate the path string\n\t\t\t\t$fPath=implode(\"/\",$tempar);\n\t\t\t\t# if for some reason, this reference is shorter than basedir, deny it!\n\t\t\t\tif(strlen($fPath)<= strlen($base_dir))$fPath=\"\";\n\t\t\t}\n\t\t}\n\n\t\t# if the created fPath is non-zero, append to basedir\n\t\tif($fPath!=\"\")$fPath=substr($fPath,strlen($base_dir));\n\t\t# if approved to add, add path, name and type to contents[] array\n\t\tif($add)$contents[]=array(\"fPath\"=>$fPath,\"fName\"=>$fName,\"fType\"=>$fType);\n\t}\n\n\t# if p is shorter than base_dir, deny it! Else, cut away base_dir and use it\n\t$p=(strlen($p)<= strlen($base_dir))?$p=\"\":substr($p,strlen($base_dir));\n\t# return the final contents and its respective path\n\treturn array(\"contents\"=>$contents,\"currentPath\"=>$p);\n}", "function dirscan_folders($rootFolder){\n $folderNames=[]; // will get filled\n foreach (scandir($rootFolder) as $name){\n if ($name=='.' || $name=='..') continue;\n if (is_dir($rootFolder.\"/\".$name)) \n $folderNames[]=$name;\n }\n sort($folderNames);\n return $folderNames;\n}", "function dynamik_skins_folder_scan( $skin_check = false )\n{\n\tif( dynamik_dir_check( dynamik_get_skins_folder_path() ) )\n\t{\n\t\t$skin_folder_names = scandir( dynamik_get_skins_folder_path() );\n\t\tif( false != $skin_check )\n\t\t{\n\t\t\tif( in_array( $skin_check, $skin_folder_names ) )\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t}\n\telse\n\t{\n\t\treturn;\n\t}\t\n}", "function check_dir($dir)\n {\n global $docdir, $lang;\n \n // Collect files and diretcories in these arrays\n $directories = array();\n $files = array();\n \n // Open and traverse the directory\n $handle = @opendir($dir);\n while ($file = @readdir($handle)) {\n if (preg_match(\"/^\\.{1,2}/\",$file) || $file == 'CVS')\n continue;\n\n // Collect files and directories\n if (is_dir($dir.$file)) { $directories[] = $file; }\n else { $files[] = $file; }\n\n }\n @closedir($handle);\n \n // Sort files and directories\n sort($directories);\n sort($files);\n \n // Files first...\n $file_cnt = 0;\n foreach ($files as $file) {\n if (check_file($dir.$file, $file_cnt)) { $file_cnt++; }\n }\n\n // than the subdirs\n foreach ($directories as $file) {\n check_dir($dir.$file.\"/\");\n }\n }", "protected function getFilesInDirCreateTestDirectory() {}", "function directory_scan($directory, $withfiles) {\n\t$scanned_directory = array_diff(scandir($directory), array(\"..\", \".\")); //This removes all of the unessesary results\n\n\tfor ($i = 0; ($i < count(scandir($directory))) && $withfiles == true; $i = $i + 1) {\n\t\tif (isset($scanned_directory[$i]) && (is_dir($directory . \"/\" . $scanned_directory[$i]) == FALSE)) { // If current item is a file, make it a download link\n\t\t\techo \"<div class='fileDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='movefrom[\" . $scanned_directory[$i] . \"]' form='moveto'>\";\n\t\t\techo \"<img src='Assets/SVG/file.svg' class='foldersvg'/>\";\n\t\t\techo \"<p class='fileLink'>\" . $scanned_directory[$i] . \"</p>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='fileinfo'><b>Type</b>: \" . mime_content_type($directory. \"/\" . $scanned_directory[$i]) . \" <b>Size</b>: \" . getfilesize($directory . \"/\" . $scanned_directory[$i], 0) . \" <b>Last Modified</b>: \" . date(\"F d Y H:i:s.\",filectime($directory. \"/\" . $scanned_directory[$i])) . \"</p> \";\t\t\t\n\t\t\techo \"</div>\";\n\t\t} else if (isset($scanned_directory[$i]) && $directory . \"/\" . $scanned_directory[$i] != \"uploads/\" . $_SESSION[\"username\"] . \"/Trash\") { // Makes this a special dir box if a item is folder\n\t\t\techo \"<div class='folderDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='movefrom[\" . $scanned_directory[$i] . \"]' form='moveto'>\";\n\t\t\techo \"<img src='Assets/SVG/folder.svg' class='foldersvg'/>\";\n\t\t\techo \"<input type='button' class='folderButton' value='\" . $scanned_directory[$i] . \"' name='directory[\" . $i . \"]'>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='folderinfo'><b>Type</b>: Folder <b>Size</b>: \" . getfilesize($directory . \"/\" . $scanned_directory[$i], 1) . \" <b>Last Modified</b>: \" . date(\"F d Y H:i:s.\",filectime($directory. \"/\" . $scanned_directory[$i])) . \"</p> \";\n\t\t\techo \"</div>\"; \n\t\t}\n\t}\n\t\n\tfor ($i = 0; ($i < count(scandir($directory))) && $withfiles == false; $i = $i + 1) { //$withfiles only outputs files when true. when false, it will output files and folders. This is for the right-side of the page\n\t\tif ($i==0 && $directory != \"uploads/\" . $_SESSION[\"username\"]) { //when $i gets to its first iteration, output the \"back a directory\" folder\n\t\t\techo \"<div class='folderDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='moveto[../]' form='moveto'>\";\n\t\t\techo \"<img src='Assets/SVG/folder.svg' class='foldersvg'/>\";\n\t\t\techo \"<input type='button' class='folderButton' value='../' name='directory[\" . $i . \"]'>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='folderinfo'><b>Info</b>: Selecting this will move your selection back a folder.</p> \";\n\t\t\techo \"</div>\";\n\t\t}\n\t\t\n\t\tif (isset($scanned_directory[$i]) && is_dir($directory . \"/\" . $scanned_directory[$i])) { // Makes this a special dir box if an item is folder\n\t\t\techo \"<div class='folderDiv'>\";\n\t\t\techo \"<div>\";\n\t\t\techo \"<input type='checkbox' class='modify' name='moveto[\" . $scanned_directory[$i] . \"]' form='moveto'>\";\n\t\t\tif ($directory . \"/\" . $scanned_directory[$i] == \"uploads/\" . $_SESSION[\"username\"] . \"/Trash\") {\n\t\t\t\techo \"<img src='Assets/SVG/bin.svg' class='foldersvg'/>\";\n\t\t\t} else {\n\t\t\t\techo \"<img src='Assets/SVG/folder.svg' class='foldersvg'/>\";\n\t\t\t}\n\t\t\techo \"<input type='button' class='folderButton' value='\" . $scanned_directory[$i] . \"' name='directory[\" . $i . \"]'>\";\n\t\t\techo \"</div>\";\n\t\t\techo \"<p class='folderinfo'><b>Type</b>: Folder <b>Size</b>: \" . getfilesize($directory . \"/\" . $scanned_directory[$i], 1) . \" <b>Last Modified</b>: \" . date(\"F d Y H:i:s.\",filectime($directory. \"/\" . $scanned_directory[$i])) . \"</p> \";\n\t\t\techo \"</div>\";\n\t\t}\n\t}\n\n}", "public function scanRecursive($regex_filter=NULL)\n\t{\n\t\t$this->tossIfException();\n\t\t\n\t\t$files = $this->scan();\n\t\t$objects = $files;\n\t\t\n\t\t$total_files = sizeof($files);\n\t\tfor ($i=0; $i < $total_files; $i++) {\n\t\t\tif ($files[$i] instanceof fDirectory) {\n\t\t\t\tarray_splice($objects, $i+1, 0, $files[$i]->scanRecursive());\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($regex_filter) {\n\t\t\t$new_objects = array();\n\t\t\tforeach ($objects as $object) {\n\t\t\t\t$test_path = ($object instanceof fDirectory) ? substr($object->getPath(), 0, -1) . '/' : $object->getPath();\n\t\t\t\tif (!preg_match($regex_filter, $test_path)) {\n\t\t\t\t\tcontinue;\t\n\t\t\t\t}\t\n\t\t\t\t$new_objects[] = $object;\n\t\t\t}\n\t\t\t$objects = $new_objects;\n\t\t}\n\t\t\n\t\treturn $objects;\n\t}", "function searchFiles($search, $path, $video){\n $searchFiles = scandir($path);\n foreach($searchFiles as $sFile){\n if(($sFile!=\".\")&&($sFile!=\"..\")){\n if(is_dir($path.$sFile)){\n $search = glob($path.$sFile.'/'.$video);\n if(!empty($search)){\n return $search;\n }\n }\n }\n }\n return array('did', 'not', 'work');\n}", "function _ft_search_find_files($dir, $q){\r\n\t$output = array();\r\n\tif (ft_check_dir($dir) && $dirlink = @opendir($dir)) {\r\n\t\twhile(($file = readdir($dirlink)) !== false){\r\n\t\t\tif($file != \".\" && $file != \"..\" && ((ft_check_file($file) && ft_check_filetype($file)) || (is_dir($dir.\"/\".$file) && ft_check_dir($file)))){\r\n\t\t\t\t$path = $dir.'/'.$file;\r\n\t\t\t\t// Check if filename/directory name is a match.\r\n\t\t\t\tif(stristr($file, $q)) {\r\n\t\t\t\t\t$new['name'] = $file;\r\n\t\t\t\t\t$new['shortname'] = ft_get_nice_filename($file, 20);\r\n\t\t\t\t\t$new['dir'] = substr($dir, strlen(ft_get_root()));\r\n\t\t\t\t\tif (is_dir($path)) {\r\n if (ft_check_dir($path)) {\r\n \t\t\t\t\t\t$new['type'] = \"dir\";\t\t\t\t\t \r\n \t\t\t\t\t$output[] = $new;\r\n }\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t $new['type'] = \"file\";\r\n \t\t\t\t\t$output[] = $new;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Check subdirs for matches.\r\n\t\t\t\tif(is_dir($path)) {\r\n\t\t\t\t\t$dirres = _ft_search_find_files($path, $q);\r\n\t\t\t\t\tif (is_array($dirres) && count($dirres) > 0) {\r\n\t\t\t\t\t\t$output = array_merge($dirres, $output);\r\n\t\t\t\t\t\tunset($dirres);\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tsort($output);\r\n\t\tclosedir($dirlink);\r\n\t\treturn $output;\r\n\t} else {\r\n\t\treturn FALSE;\r\n\t}\r\n}", "function logonscreener_source_scan() {\n global $source;\n $source = str_replace('\\\\', '/', rtrim($source, '/\\\\'));\n\n if (!$files = @scandir($source)) {\n if ($GLOBALS['debug_mode'] && is_file($source)) {\n // Debug mode let us set one specific image file as a source.\n $files = array(basename($source));\n $source = dirname($source);\n }\n else {\n logonscreener_log(\"$source not found.\");\n return FALSE;\n }\n }\n\n while (!empty($files)) {\n $key = array_rand($files);\n if (logonscreener_file_change($source . '/' . $files[$key])) {\n break;\n }\n unset($files[$key]);\n }\n\n return TRUE;\n}", "public function scanFilesRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, File>\n */\n return $this->scanRawRecursive(true, false, $filter, true);\n }", "public function scanDirPaths(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, string>\n */\n return $this->scanRaw(false, true, $filter, false);\n }", "function searchFile($directory, $file)\n{\n // Blacklisted directory names - not doing so will provoke an endless loop\n $blacklist = array ( '.idea', '.git', '.', '..');\n\n // Getting a handle on the directory\n $dir_handle = opendir($directory);\n\n // Looping on all the directorie's entry to find the right file\n while(false !== ($entry = readdir($dir_handle)))\n {\n //if($entry != '.' && $entry != '..' && $entry != '.idea' && $entry != '.git')\n if(!in_array($entry, $blacklist))\n {\n // if it's a directory - call back the same function recursively\n if(is_dir($directory. DIRECTORY_SEPARATOR .$entry))\n {\n searchFile($directory . DIRECTORY_SEPARATOR . $entry, $file);\n }\n // If it's a file, test against class name to know if it is the right file\n else if(str_replace(\".php\", \"\", $entry) == get_class_name($file))\n {\n $path = $directory . DIRECTORY_SEPARATOR . $entry;\n add_to_cache($file, $path);\n\n return;\n }\n }\n }\n\n closedir($dir_handle);\n\n\n}", "function searchForFile($dir, $searchfile)\r\n{\r\n\tglobal $total_loops;\r\n\t// Make sure we do not exceed 80% memory usage. If so, return false to prevent hitting memory limit.\r\n\t// if (memory_get_usage()/1048576 > (int)ini_get('memory_limit')*0.8) return false;\r\n\t// Set max number of loops we'll do\r\n\t$max_loops = 20000;\r\n\t// Trim $dir and make sure it ends with directory separator\r\n\t$dir = rtrim(trim($dir), DS) . DS;\r\n\t// Loop through all files and subdirectories\r\n\tforeach (getDirFiles($dir) as $thisFileOrDir) \r\n\t{\r\n\t\t// Increment loop\r\n\t\t$total_loops++;\r\n\t\t// Stop if we've done over $max_loops loops and reset $total_loops for other processes\r\n\t\tif ($total_loops > $max_loops) {\r\n\t\t\t$total_loops = 0;\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// Set full path of file/dir we're looking at\r\n\t\t$fullPath = $dir.$thisFileOrDir;\r\n\t\t// If it's a file, check if it's the one we're looking for\r\n\t\tif (isFile($fullPath)) {\r\n\t\t\t// Found the file! Return the current directory.\r\n\t\t\tif ($thisFileOrDir == $searchfile) return $dir;\r\n\t\t}\r\n\t\t// If it's a directory, then recursively check all files in that subdirectory\r\n\t\telseif (is_dir($fullPath)) {\r\n\t\t\t// Get return value for this directory\r\n\t\t\t$returnedDir = searchForFile($fullPath, $searchfile);\r\n\t\t\t// If returned a filename and it matches teh search file, return the returned directory\r\n\t\t\tif ($returnedDir !== false) return $returnedDir;\r\n\t\t}\r\n\t}\r\n\t// If didn't find it, return false\r\n\treturn false;\r\n}", "public function scanRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, Dir|File>\n */\n return $this->scanRawRecursive(true, true, $filter, true);\n }", "protected function scan_directory($target) {\n $files = array();\n $target_images = $this->get_target_images();\n $target_components = explode(DIRECTORY_SEPARATOR, $target);\n $target = implode(DIRECTORY_SEPARATOR, $target_components);\n $target_length = strlen($target) + 1;\n\n $patterns = array(\n $target,\n '.xml'\n );\n $datatypes = array(\n '-01.tif',\n '-01.jpg',\n );\n\n $images = file_scan_directory($target_images, '/.*-01.*/');\n $xml = file_scan_directory($target, '/.*.xml$/');\n foreach ($xml as $uri => $value) {\n if (strpos($uri, '.xml') !== FALSE) {\n foreach ($datatypes as $datatype) {\n $replacements = array($target_images, $datatype);\n // Only process xml if there is a matching image to go with it.\n $matching_image = str_replace($patterns, $replacements, $value->uri);\n if (!empty($images[$matching_image])) {\n $files[substr($uri, $target_length)] = $value;\n }\n }\n }\n }\n return $files;\n }", "public function crawl() {\n\t\t$sDirectories = BsConfig::get( 'MW::ExtendedSearch::ExternalRepo' );\n\t\tif ( $sDirectories === '' ) return $sDirectories;\n\n\t\t$aDirectories = explode( ',', $sDirectories );\n\t\tforeach ( $aDirectories as $sDirectory ) {\n\t\t\t$sDir = trim ( $sDirectory );\n\t\t\tif( !is_dir( $sDir ) ) continue;\n\t\t\t$this->readInFiles( $sDir );\n\t\t}\n\t\treturn $this->aFiles;\n\t}", "function m_walk_dir( $root, $callback, $recursive = true, $level = 0 ) {\r\n $dh = @opendir( $root );\r\n if( false === $dh ) {\r\n return false;\r\n }\r\n while( $file = readdir( $dh )) {\r\n if( \".\" == $file || \"..\" == $file ){\r\n continue;\r\n }\r\n //echo \"## DEBUG:$level - $file<br/>\"; \r\n\r\n //echo \"Level: $level\";\r\n call_user_func( $callback,$level, \"{$root}/{$file}\", $file );\r\n if( false !== $recursive && is_dir( \"{$root}/{$file}\" )) {\r\n m_walk_dir( \"{$root}/{$file}\", $callback, $recursive, $level+1 );\r\n }\r\n }\r\n closedir( $dh );\r\n return true;\r\n}", "public function scanDirPathsRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, string>\n */\n return $this->scanRawRecursive(false, true, $filter, false);\n }", "public function test_search_by_name()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search_by_name('index.php');\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n }", "public function testReadingFiles()\n {\n $dir = __DIR__;\n $f = $this->adapter->java('java.io.File', $dir);\n $paths = $f->listFiles();\n foreach ($paths as $path) {\n self::assertFileExists((string) $path);\n }\n }", "function enumerateFiles($callback) { if (!$this->isInitialized()) { // NO: Initialize before use...\n throw new \\Exception('File System has not been initialize');\n }\n\n if (!isset($callback) || !is_callable($callback)) {\n throw new \\Exception('Missing or Invalid Callback Function');\n }\n\n // Create an Iterator for the Input Path\n $iterator = new \\RecursiveIteratorIterator(\n new \\RecursiveDirectoryIterator($this->inputPath), \\RecursiveIteratorIterator::SELF_FIRST\n );\n\n // Iterate Files in Directory\n $break = false;\n $inputPathLength = strlen($this->inputPath) + 1;\n foreach ($iterator as $name => $element) {\n if ($element->isFile() && $element->isReadable()) {\n // Return Relative Path Only\n $name = substr($name, $inputPathLength);\n $break = !$callback($name);\n if ($break) {\n break;\n }\n }\n }\n }", "function scan_directory($directory) {\n $dir = scandir($directory);\n foreach ($dir as $d) {\n if ($d === '.' or $d === '..')\n continue;\n\n if (is_dir($directory . '/' . $d)) {\n //code to use if directory\n scan_directory($directory . '/' . $d);\n } else {\n //code to use if file \n $type = pathinfo($directory . '/' . $d, PATHINFO_EXTENSION);\n if ($type == \"mp4\" || $type == \"html\") {\n //do nothing \n continue;\n } else {\n if (unlink($directory . '/' . $d)) {\n echo '<strong>Deleted</strong>'.$directory . '/' . $d . '<br/><br/>';\n }\n }\n }\n }\n}", "public function scanFilePathsRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, string>\n */\n return $this->scanRawRecursive(true, false, $filter, false);\n }", "private function fileSearchAux($dir, $pattern, &$files) {\n $handle = opendir($dir);\n if ($handle) {\n while (($file = readdir($handle)) !== false) {\n\n if ($file == '.' || $file == '..') {\n continue;\n }\n\n $filePath = $dir == '.' ? $file : $dir . '/' . $file;\n\n if (is_link($filePath)) {\n continue;\n }\n\n if (is_file($filePath)) {\n if (preg_match($pattern, $filePath)) {\n $files[] = $filePath;\n }\n }\n\n if (is_dir($filePath) && !$this->isBlacklisted($file)) {\n $this->fileSearchAux($filePath, $pattern, $files);\n }\n }\n closedir($handle);\n }\n }", "public function watch() {\n\t\t\t$totalFiles = 0;\n\n\t\t\twhile(true) {\n\t\t\t\t$dir = new DirectoryIterator(realpath($this->input_dir));\n\t\t\t\t$numFiles = iterator_count($dir);\n\n\t\t\t\tif($numFiles != $totalFiles) {\n\t\t\t\t\t$totalFiles = $numFiles;\n\n\t\t\t\t\tforeach($dir as $fileinfo) {\n\t\t\t\t\t if(!$fileinfo->isDot() && $fileinfo->isFile()) {\n\t\t\t\t\t \t$filename = $fileinfo->getFilename();\n\t\t\t\t\t \t$ext = pathinfo($filename, PATHINFO_EXTENSION);\n\n\t\t\t\t\t \tif(in_array($ext, array('dat')))\n\t\t\t\t\t \t\t$this->extractInfo($filename);\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsleep(3);\n\t\t\t}\n\t\t}", "public function scanDir($dir)\n {\n $objects = scandir($dir);\n\n // unset 2 first elements\n unset($objects[0], $objects[1]);\n\n return $objects;\n }", "function find_all_files($dir) \n{ \n $files = array();\n foreach (glob($dir) as $file) {\n $files[] = $file;\n }\n return $files;\n}", "public function scanDirsRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, Dir>\n */\n return $this->scanRawRecursive(false, true, $filter, true);\n }", "function find($dir, $pattern){\n // escape any character in a string that might be used to trick\n // a shell command into executing arbitrary commands\n $dir = escapeshellcmd($dir);\n // get a list of all matching files in the current directory\n $files = glob(\"$dir/$pattern\");\n // find a list of all directories in the current directory\n // directories beginning with a dot are also included\n foreach (glob(\"$dir/{.[^.]*,*}\", GLOB_BRACE|GLOB_ONLYDIR) as $sub_dir){\n $arr = find($sub_dir, $pattern); // resursive call\n $files = array_merge($files, $arr); // merge array with files from subdirectory\n }\n // return all found files\n return $files;\n}", "private function listFolderFiles($dir){\n $children = false;\n $isRoot = false;\n if($dir==$this->file_storage){\n $isRoot = true;\n }\n\n $folderName = $this->getFolderName($dir);\n if(!$isRoot){\n //$this->info('Directory Name: '.$folderName['child']);\n //$this->info('Parent Name: '.$folderName['parent']);\n }\n\n //$this->info('Folder: '.$dir);\n\n foreach (new \\DirectoryIterator($dir) as $fileInfo) {\n if (!$fileInfo->isDot()) {\n if ($fileInfo->isDir()) {\n $this->listFolderFiles($fileInfo->getPathname());\n }else{\n $rename = false;\n //$this->info('File: '.$fileInfo->getFilename());\n //$info = new SplFileInfo($dir.'/'.$fileInfo->getFilename());\n $ext = \".\".pathinfo($fileInfo->getFilename(), PATHINFO_EXTENSION);\n //$ext = \".\"$info->getExtension();\n //$this->info('File: extension '.$ext);\n $filebreak = str_replace($ext,\"\",$fileInfo->getFilename());\n if (strpos($filebreak, '.') !== false || strpos($filebreak, \"'\") !== false || strpos($filebreak, \"#\") !== false) {\n $rename = true;\n }\n if($rename){\n $replace = array(\".\", \"'\", \"#\", \";\", \"/\", \"?\", \":\", \"@\", \"=\", \"&\", \",\");\n //“;”, “/”, “?”, “:”, “@”, “=” and “&\n $fileraw = str_replace($replace,\" \",$filebreak);\n //$this->info('File: raw '.$fileraw);\n $newfilename = $fileraw . $ext;\n //$this->info('File: new '.$newfilename);\n $prod_filename = $newfilename;\n rename($dir.'/'.$fileInfo->getFilename(),$dir.'/'.$newfilename);\n }else{\n $prod_filename = $fileInfo->getFilename();\n }\n $this->checkFileExtension($dir.'/'.$prod_filename, $prod_filename, $dir);\n }\n $children = true;\n }else{\n $children = false;\n }\n }\n //$this->info('Children: '.$children);\n\n if(!$isRoot){\n $this->folders[$this->count]['name'] \t\t\t= $folderName['child'];\n $this->folders[$this->count]['parent'] \t\t= $folderName['parent'];\n $this->folders[$this->count]['full_path']\t= $dir;\n $this->folders[$this->count]['children']\t= $children;\n $this->count++;\n }\n //$this->info('#################');\n }", "function lscan($scat, $param)\n{\n if(isset($param[1][0]) == FALSE)\n {\n $scat[1][0] = '.';\n }\n $c = 0;\n if (file_exists($scat[1][0]) == TRUE && is_dir($scat[1][0]) == TRUE && is_readable($scat[1][0]) == TRUE && is_executable($scat[1][0]) == TRUE && $fh = fopen($scat[1][0], 'r'))\n {\n while(isset(scandir($scat[1][0])[$c]))\n {\n $tab[$c] = scandir($scat[1][0])[$c];\n $c++;\n }\n $c = 0;\n sort($tab);\n while(isset($tab[$c]))\n {\n if (is_dir($tab[$c]))\n {\n echo(\"\\033[34m{$tab[$c]}\");\n echo (\"/\");\n }\n else if(is_executable($tab[$c]) && is_dir($tab[$c]) == FALSE)\n {\n echo(\"\\033[32m{$tab[$c]}\");\n echo (\"*\");\n }\n else if(is_link($tab[$c]))\n {\n echo($tab[$c]);\n echo (\"@\");\n }\n else\n echo($tab[$c]);\n echo (\" \");\n $c++;\n }\n echo (\"\\n\");\n }\n else if (is_file($scat[1][0]) == TRUE)\n echo (\"Is a file\\n\");\n else if (file_exists($scat[1][0]) == TRUE && (is_readable($scat[1][0]) == FALSE || is_executable($scat[1][0]) == FALSE))\n echo (\"Permission denied\\n\");\n else if (file_exists($scat[1][0]) == FALSE && is_dir($scat[1][0]) == FALSE)\n echo (\"No such file or directory\\n\");\n else\n echo (\"Cannot open folder\\n\");\n}", "abstract protected function yieldSearchPaths(): Generator;", "function dir_enter($entry_dir='/', $depth=0)\r\n{\r\n\t$found = 0;\r\n\r\n\t# Remove the last trailing slash and void dual writing\r\n\t$entry_dir = preg_replace('/\\/$/i', '', $entry_dir);\r\n\r\n\t$skip_list = array(\r\n\t\t'.', # self\r\n\t\t'..', # parent\r\n\t);\r\n\r\n\tif($dir_handle = opendir($entry_dir))\r\n\t{\r\n\t\twhile(false !== ($filename = readdir($dir_handle)))\r\n\t\t{\r\n\t\t\tif(in_array($filename, $skip_list))\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$full_file_path = \"{$entry_dir}/{$filename}\";\r\n\t\t\t\r\n\t\t\tif(is_dir($full_file_path))\r\n\t\t\t{\r\n\t\t\t\t# Need to loop here inside the directory\r\n\r\n\t\t\t\tfecho(str_repeat(' ', $depth)); # depth marker\r\n\t\t\t\t#fecho(\"{$full_file_path}\");\r\n\t\t\t\tfecho(\"{$filename}\");\r\n\r\n\t\t\t\t\r\n\t\t\t\t# Recurse through the file\r\n\t\t\t\t$function = __FUNCTION__;\r\n\t\t\t\t$found += $function($full_file_path, $depth+1);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t#fecho(str_repeat(' ', $depth)); # depth marker\r\n\t\t\t\t#fecho(\"{$full_file_path}\");\r\n\t\t\t\t#fecho(\"{$filename}\");\r\n\r\n\t\t\t\t++$found;\r\n\t\t\t\tprocess_file($full_file_path, $depth);\r\n\t\t\t}\r\n\t\t}\r\n\t\tclosedir($dir_handle);\r\n\t}\r\n\t\r\n\treturn $found;\r\n}", "protected function scanTarget($path,$recursive=false) {\n $newpaths = [];\n $dir = $this->cache->getDestination();\n\n $stream = new \\qio\\Directory\\Stream($dir);\n $reader = new \\qio\\Directory\\Reader($stream);\n $list = $reader->scan();\n\n foreach($list as $item) {\n $fullItemPath = $path.DIRECTORY_SEPARATOR.$item;\n if(is_file($fullItemPath)) {\n $newpaths[] = $fullItemPath;\n } elseif($recursive && \n is_dir($fullItemPath)) {\n $newpaths = array_merge($newpaths, $this->scanTarget($fullItemPath,$recursive));\n }\n }\n\n return $newpaths;\n }", "function get_files($instructor=False, $sources=array('class', 'lab', 'project', 'exam', 'review', 'capstone', 'continued-lab'), $file_path = '.', $access=array(), $virtual=array(), $categories=array(), $secret='really') {\n $results = array();\n $basedir = scandir($file_path);\n foreach ($sources as $i => $l0) {\n if (in_array($l0, $basedir) && is_dir($file_path . '/' . $l0)) {\n $level1 = scandir($file_path . '/' . $l0);\n sort($level1);\n foreach ($level1 as $i => $l1) {\n if (substr($l1, 0, 1) != '.' && is_dir($file_path . '/' . $l0 . '/' . $l1)) {\n // The following code allows the system recursively look through the Directory\n // structure within a class, and the system can now process RELATIVE links\n // that go into those subordinate directories\n $level2 = array();\n try {\n $Iterator = new RecursiveIteratorIterator(\n new RecursiveDirectoryIterator($file_path . '/' . $l0 . '/' . $l1),\n RecursiveIteratorIterator::LEAVES_ONLY,\n RecursiveIteratorIterator::CATCH_GET_CHILD);\n foreach($Iterator as $name => $object) {\n $name = explode(\"/\", $name);\n unset($name[2]);\n unset($name[1]);\n unset($name[0]);\n $name = implode(\"/\", $name);\n $level2[] = $name;\n }\n } catch (Exception $e) {\n // Unable to recurse, so don't bother...\n }\n //$level2 = scandir($file_path . '/' . $l0 . '/' . $l1);\n $results[$l0][$l1] = array();\n sort($level2);\n foreach ($level2 as $i => $l2) {\n $key = sha1($secret.$l0.$l1.$l2);\n if (substr($l2, 0, 1) != '.' && validate_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $access)[0]) {\n if (is_link($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2)) {\n if (validate_file($instructor, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $access)[0]) {\n $vf = validate_file($instructor, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $access);\n $category = categorize_file($instructor, $l2, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $vf[5], $categories);\n $results[$l0][$l1][$l2] = array('actual' => $file_path . '/' . $l0 . '/' . $l1 . '/' . readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2),\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n } else {\n $vf = validate_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $access);\n $category = categorize_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $vf[5], $categories);\n $results[$l0][$l1][$l2] = array('actual' => $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2,\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n }\n }\n }\n }\n }\n }\n # Add Virtual files, format like array('class'=>array(1 => array(array('answers.html', 'homework/answers05.html'))))\n foreach ($virtual as $l0 => $l1array) {\n if (isset($results[$l0])) {\n $classes = array_keys($results[$l0]);\n foreach ($l1array as $day => $l2array) {\n if (isset($classes[$day-1])) {\n foreach ($l2array as $i => $values) {\n $virt_file = $values[0];\n $real_file = $values[1];\n if (validate_file($instructor, $real_file, $real_file, $access)[0]) {\n $key = sha1($secret.$real_file.$virt_file);\n $vf = validate_file($instructor, $real_file, $real_file, $access);\n $category = categorize_file($instructor, $virt_file, $real_file, $vf[5], $categories);\n $results[$l0][$classes[$day-1]][$virt_file] = array('actual' => $real_file,\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n }\n }\n }\n }\n }\n #####################################################\n # Verify that the class is not blocked by security...\n $today = getdate();\n foreach ($results as $l0 => $classes) {\n $counter = 1;\n foreach ($classes as $l1 => $data) {\n foreach ($data as $filename => $fdata) {\n if ($fdata['year'] == 1 && $fdata['month'] == 1 && $fdata['day'] == 1) {\n $cate = $fdata['category'];\n if (isset($access[$l0.\"_\".$counter]) && $cate == 'title') {\n $sspec = $l0.\"_\".$counter;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/\".$cate])) {\n $sspec = $l0.\"_\".$counter.\"/\".$cate;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/\".$filename])) {\n $sspec = $l0.\"_\".$counter.\"/\".$filename;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/all\"])) {\n $sspec = $l0.\"_\".$counter.\"/all\";\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n }\n }\n }\n $counter++;\n }\n }\n return $results;\n }", "function CheckDir($dir, $startWith = '')\n{\n global $count;\n global $pruned;\n $count++;\n \n echo \"\\r$count ($pruned): Checking $dir \";\n \n $started = false;\n if( !strlen($startWith) )\n $started = true;\n\n // see if this is a directory we need to prune\n if( $started && is_dir(\"$dir/video_2\") )\n {\n PruneDir($dir);\n }\n else\n {\n // recurse into any directories\n $f = scandir($dir);\n foreach( $f as $file )\n {\n if( !$started && $file == $startWith )\n $started = true;\n \n if( $started && is_dir(\"$dir/$file\") && $file != '.' && $file != '..' )\n CheckDir(\"$dir/$file\");\n }\n unset($f);\n }\n}", "public function scanDirs(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, Dir>\n */\n return $this->scanRaw(false, true, $filter, true);\n }", "function parseDir($dir) {\r\n global $zoom;\r\n // start the scan...(open the local dir)\r\n $images = array();\r\n $handle = $zoom->platform->opendir($dir);\r\n while (($file = $zoom->platform->readdir($handle)) != false) {\r\n if ($file != \".\" && $file != \"..\") {\r\n $tag = ereg_replace(\".*\\.([^\\.]*)$\", \"\\\\1\", $file);\r\n $tag = strtolower($tag);\r\n if ($zoom->acceptableFormat($tag)) {\r\n // Tack it onto images...\r\n $images[] = $file;\r\n }\r\n }\r\n }\r\n $zoom->platform->closedir($handle);\r\n return $images;\r\n }", "protected function auto_register_files()\r\n\t\t{\r\n\t\t\t// initialize variables\r\n\t\t\t$level = 0;\r\n\t\t\t\r\n\t\t\t// look through each director\r\n\t\t\tforeach( $this->paths as $i => $path )\r\n\t\t\t{\r\n\t\t\t\t// initialize variables\r\n\t\t\t\t$j \t\t= $level + 1001;\r\n\t\t\t\t$files \t= glob( \"{$path}*\" . self::REAL_EXT );\r\n\t\t\t\t$len \t= strlen( self::REAL_EXT );\r\n\t\t\t\t\r\n\t\t\t\tforeach( $files as $f )\r\n\t\t\t\t{\r\n\t\t\t\t\t// determine handle\r\n\t\t\t\t\t$file_name \t= substr( $f, 0, strlen( $f ) - $len );\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( strpos( $file_name, $this->local ) !== false )\r\n\t\t\t\t\t\t$file_name = substr( $file_name, strlen( $this->local ) );\r\n\t\t\t\t\t\r\n\t\t\t\t\t$handle \t= $i == self::ROOT_PATH ? strtoupper( self::ROOT_PATH ) . \"_\" : \"\";\r\n\t\t\t\t\t$handle \t.= preg_replace( \"/[^\\w]/\", \"_\", strtoupper( $file_name ) );\r\n\t\t\t\t\tdefine( $handle, $handle );\r\n\t\t\t\t\t/* The old page id number define( $handle . '_PAGEID', $j );*/\r\n\t\t\t\t\t\r\n\t\t\t\t\t// get rid of system directories\r\n\t\t\t\t\tif ( strpos( $file_name, $this->local ) !== false )\r\n\t\t\t\t\t\t$file_name = substr( $file_name, strlen( $this->local ) );\r\n\t\t\t\t\t\r\n\t\t\t\t\t// define properties\r\n\t\t\t\t\t$this->files[ $handle ] = $file_name;\r\n\t\t\t\t\t$this->urls[ $handle ] = $this->url . str_replace( \"\\\\\", \"/\", $file_name );\r\n\t\t\t\t\t$j++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// increment for next path\r\n\t\t\t\t$level += 1000;\r\n\t\t\t\t$j = 1;\r\n\t\t\t}\r\n\t\t}", "function toIterator($root) {\n $root = realpath($root);\n $iterator = new \\AppendIterator();\n\n if(!file_exists($root))\n die('The components folder could not be found');\n\n $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($root));\n //$directoryIterator->setFlags(\\RecursiveDirectoryIterator::SKIP_DOTS);\n\n return $iterator;\n }", "static private function find_contents($dir)\n {\n $result = array();\n $root = scandir($dir);\n foreach ($root as $value) {\n if ($value === '.' || $value === '..') {\n continue;\n }\n if (is_file($dir . DIRECTORY_SEPARATOR . $value)) {\n if (! self::$ext_filter || in_array(strtolower(pathinfo($dir . DIRECTORY_SEPARATOR . $value, PATHINFO_EXTENSION)), self::$ext_filter)) {\n self::$files[] = $result[] = $dir . DIRECTORY_SEPARATOR . $value;\n }\n continue;\n }\n if (self::$recursive) {\n foreach (self::find_contents($dir . DIRECTORY_SEPARATOR . $value) as $value) {\n self::$files[] = $result[] = $value;\n }\n }\n }\n // Return required for recursive search\n return $result;\n }", "function get_all_image_codes($base_path, $search_under, $recurse = true)\n{\n $out = array();\n\n require_code('images');\n require_code('files');\n\n if (!file_exists($base_path . '/' . $search_under)) {\n return array();\n }\n $handle = @opendir($base_path . '/' . $search_under);\n if ($handle !== false) {\n while (false !== ($file = readdir($handle))) {\n if (!should_ignore_file($file, IGNORE_ACCESS_CONTROLLERS)) {\n $full_path = $base_path . '/' . $search_under . '/' . $file;\n if (is_file($full_path)) {\n if (is_image($file)) {\n $dot_pos = strrpos($file, '.');\n if ($dot_pos === false) {\n $dot_pos = strlen($file);\n }\n $_file = substr($file, 0, $dot_pos);\n $short_path = ($search_under == '') ? $_file : ($search_under . '/' . $_file);\n $out[$short_path] = 1;\n }\n } elseif ((strlen($file) != 2) || (strtoupper($file) != $file)) {\n if ($recurse) {\n $out += get_all_image_codes($base_path, $search_under . '/' . $file);\n }\n }\n }\n }\n closedir($handle);\n }\n\n return $out;\n}", "private function scan_registry_dir($directory, &$message = '') {\n \tglobal $dbKITregistryFiles;\n \tglobal $dbKITregistryCfg;\n\n \t$sub_dirs = $dbKITregistryCfg->getValue(dbKITregistryCfg::cfgRegistryListTabs);\n\n $handle = opendir($directory);\n while ($file = readdir($handle)) {\n if ($file != \".\" && $file != \"..\") {\n if (is_dir($directory.$file)) {\n // Erneuter Funktionsaufruf, um das aktuelle Verzeichnis auszulesen\n $this->scan_registry_dir($directory.$file.'/');\n }\n else {\n // Wenn Verzeichnis-Eintrag eine Datei ist, diese ausgeben\n $actual_file = page_filename(utf8_encode($file));\n $actual_file = $directory.$actual_file;\n $where = array(dbKITregistryFiles::field_filepath_registry => $actual_file);\n $data = array();\n if (!$dbKITregistryFiles->sqlSelectRecord($where, $data)) {\n \t$this->setError($dbKITregistryFiles->getError());\n \treturn false;\n }\n if (count($data) > 0) {\n \t// Datensatz existiert\n \t$data = $data[0];\n \t$update = array();\n \t// Vergleichen, ob sich etwas veraendert hat\n \tif (filemtime($actual_file) != $data[dbKITregistryFiles::field_filemtime]) {\n \t\t$update[dbKITregistryFiles::field_filemtime] = filemtime($actual_file);\n \t}\n \tif (filesize($actual_file) != $data[dbKITregistryFiles::field_filesize]) {\n \t\t$update[dbKITregistryFiles::field_filesize] = filesize($actual_file);\n \t}\n \tif ($data[dbKITregistryFiles::field_status] == dbKITregistryFiles::status_deleted) {\n \t\t$update[dbKITregistryFiles::field_status] = dbKITregistryFiles::status_active;\n \t\t$message .= sprintf(reg_msg_registry_file_undeleted, $data[dbKITregistryFiles::field_filename_registry]);\n \t}\n \tif (count($update) > 0) {\n \t\t$where = array(dbKITregistryFiles::field_id => $data[dbKITregistryFiles::field_id]);\n \t\tif (!$dbKITregistryFiles->sqlUpdateRecord($update, $where)) {\n \t\t\t$this->setError($dbKITregistryFiles->getError());\n \t\t\treturn false;\n \t\t}\n \t\t$message .= sprintf(reg_msg_registry_file_updated, $data[dbKITregistryFiles::field_filename_registry]);\n \t}\n }\n else {\n \t// es existiert noch kein Eintrag\n \tif (!file_exists($actual_file)) {\n \t\t// Datei muss noch umbenannt werden\n \t\tif (!rename($directory.$file, $actual_file)) {\n \t\t\t$this->setError(sprintf(reg_error_rename_file, basename($directory.$file), basename($actual_file)));\n \t\t\treturn false;\n \t\t}\n \t\t$message .= sprintf(reg_msg_registry_file_renamed, basename($directory.$file), basename($actual_file));\n \t}\n \t$sub_dir = substr(basename($actual_file), 0, 1);\n \tif (!in_array($sub_dir, $sub_dirs)) $sub_dir = '#';\n \tif (!file_exists($this->registry_path.$sub_dir)) {\n \t\tif (!mkdir($this->registry_path.$sub_dir)) {\n \t\t\t$this->setError(sprintf(reg_error_mkdir, $this->registry_path.$sub_dir));\n \t\t\treturn false;\n \t\t}\n \t\t$message .= sprintf(reg_msg_mkdir, '/'.$sub_dir);\n \t}\n \t$check_file = page_filename(utf8_encode($file));\n \t$check_file = $this->registry_path.$sub_dir.'/'.$check_file;\n \t// pruefen, ob sich die Datei im richtigen Verzeichnis befindet\n \tif ($actual_file != $check_file) {\n \t\tif (!rename($actual_file, $check_file)) {\n \t\t\t$this->setError(sprintf(reg_error_rename_file, basename($actual_file), '/'.$sub_dir.'/'.basename($check_file)));\n \t\t\treturn false;\n \t\t}\n \t\t$message .= sprintf(reg_msg_registry_file_moved, basename($actual_file), $sub_dir);\n \t\t$actual_file = $check_file;\n \t}\n \t$data = array(\n \t\tdbKITregistryFiles::field_filename_original\t\t\t=> utf8_encode(basename($directory.$file)),\n \t\tdbKITregistryFiles::field_filename_registry\t\t\t=> basename($actual_file),\n \t\tdbKITregistryFiles::field_filepath_registry\t\t\t=> $actual_file,\n \t\tdbKITregistryFiles::field_filemtime\t\t\t\t\t\t\t=> filemtime($actual_file),\n \t\tdbKITregistryFiles::field_filesize\t\t\t\t\t\t\t=> filesize($actual_file),\n \t\tdbKITregistryFiles::field_filetype\t\t\t\t\t\t\t=> pathinfo($actual_file, PATHINFO_EXTENSION),\n \t\tdbKITregistryFiles::field_status\t\t\t\t\t\t\t\t=> dbKITregistryFiles::status_active,\n \t\tdbKITregistryFiles::field_sub_dir\t\t\t\t\t\t\t\t=> $sub_dir\n \t);\n \t$id = -1;\n \tif (!$dbKITregistryFiles->sqlInsertRecord($data, $id)) {\n \t\t$this->setError($dbKITregistryFiles->getError());\n \t\treturn false;\n \t}\n \t$message .= sprintf(reg_msg_registry_file_added, $data[dbKITregistryFiles::field_filename_registry]);\n }\n }\n }\n }\n closedir($handle);\n }", "public function test_scan_sort_desc()\n {\n $content = array('.','..','application','.git','.gitignore','.htaccess','index.php','nbproject','README','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_DESC);\n \n $output = array();\n foreach($res as $f) $output[] = $f->get_base_name();\n $this->assertEquals(array_reverse($content), $output);\n }", "public function discoverPlugins() {\n foreach($this->fs->roots(false) as $root) {\n $this->findAvailablePlugins($root);\n }\n }", "private function recurseThroughDirectory($baseDir, $lookingFor = \"/(.*)\\.php$/i\")\n {\n $results = array();\n $di = new RecursiveDirectoryIterator($baseDir);\n\n $this->output->writeLn(\"Scanning $baseDir...\");\n\n foreach (new RecursiveIteratorIterator($di) as $filename => $file) {\n if (preg_match($lookingFor, $filename)) {\n $results[] = $this->extractFrom($filename);\n }\n }\n\n return $results;\n }", "function scandir_recursive($directory, $format = null, $excludes = array()){\n $format = ($format == null) ? 'absolute' : $format;\n $paths = array();\n $stack[] = $directory;\n while($stack){\n $this_resource = array_pop($stack);\n if ($resource = scandir($this_resource)){\n $i = 0;\n while (isset($resource[$i])){\n if ($resource[$i] != '.' && $resource[$i] != '..'){\n $current = array(\n 'absolute' => \"{$this_resource}/{$resource[$i]}\",\n 'relative' => preg_replace('/' . preg_quote($directory, '/') . '/', '', \"{$this_resource}/{$resource[$i]}\")\n );\n if (is_file($current['absolute'])){\n $paths[] = $current[$format];\n } elseif (is_dir($current['absolute'])){\n $paths[] = $current[$format];\n $stack[] = $current['absolute'];\n }\n }\n $i++;\n }\n }\n }\n if (count($excludes) > 0){\n $clean = array();\n foreach($paths as $path){\n $remove = false;\n foreach($excludes as $exclude){\n $exclude = preg_quote($exclude, '/');\n $exclude = str_replace('\\*', '.*', $exclude);\n if (preg_match('/' . $exclude . '/', $path)){\n $remove = true;\n }\n }\n if (!$remove) $clean[] = $path;\n }\n $paths = $clean;\n }\n return $paths;\n}", "public function browse_files()\n {\n // Scan file directory, render the images.\n if (is_dir($this->file_path)) {\n $files = preg_grep('/^([^.])/', scandir($this->file_path));\n return $files;\n }\n \n }", "public function scan(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, Dir|File>\n */\n return $this->scanRaw(true, true, $filter, true);\n }", "function directory_mapper($path)\n{\n $maxDepth = 3;\n $minDepth = 3;\n $iterator = new RecursiveIteratorIterator(\n new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::SKIP_DOTS),\n RecursiveIteratorIterator::SELF_FIRST,\n RecursiveIteratorIterator::CATCH_GET_CHILD// Ignore \"Permission denied\"\n );\n $iterator->setMaxDepth($maxDepth);\n\n $paths = array($path);\n foreach ($iterator as $path => $dir) {\n if ($iterator->getDepth() >= $minDepth) {\n if ($dir->isDir()) {\n if (file_exists($dir . DIRECTORY_SEPARATOR . \"meta\")) {\n $paths[] = $path;\n }\n }\n }\n }\n array_shift($paths);\n return $paths;\n}", "public function scanIniDir($dir) {\n\n //prevent ../../../ attach\n $full_data_dir = realpath($this->configuration['base_ini_dir']);\n $full_dir_unsafe = realpath($full_data_dir . '/' . $dir);\n $full_dir = $full_data_dir . str_replace($full_data_dir, '', $full_dir_unsafe);\n\n $a_out = array();\n if (!is_dir($full_dir_unsafe)) {\n die(\"pqz.class.php: Directory $dir Not Found / full dir $full_dir\");\n }\n\n $scanned_directory = array_diff(scandir($full_dir), array('..', '.'));\n $index = 0;\n foreach ($scanned_directory as $entry) {\n\n if (is_dir(\"$full_dir/$entry\")) {\n $a_out[$index]['type'] = \"dir\";\n $a_out[$index]['path'] = $dir . $entry . '/';\n $a_out[$index]['name'] = $entry;\n $index ++;\n } else {\n // is a file\n\n $filename = $full_dir . '/' . $entry;\n\n $file_parts = pathinfo($filename);\n if (strtolower($file_parts['extension']) == 'ini') {\n \n } else {\n if ($this->debug) {\n echo \"$filename NOT an ini file\";\n }\n }\n $ini_array = parse_ini_file($filename);\n\n if (isset($ini_array['title'])) {\n $a_out[$index] = $ini_array;\n $a_out[$index]['type'] = \"file\";\n $a_out[$index]['path'] = $dir . $entry;\n $a_out[$index]['name'] = $entry;\n $index ++;\n }\n }\n }\n\n // --- sort the multidimensional array ---\n // Obtain a list of columns\n foreach ($a_out as $key => $row) {\n $type[$key] = $row['type'];\n $name[$key] = $row['name'];\n $path[$key] = $row['path'];\n }\n\n// Sort the data with volume descending, edition ascending\n// Add $data as the last parameter, to sort by the common key\n array_multisort($type, SORT_ASC, $name, SORT_ASC, $path, SORT_ASC, $a_out);\n\n return $a_out;\n }", "protected function _scan_files()\n\t{\n\t\t$terms = array();\n\n\t\t$parser = new PHPParser_Parser(new PHPParser_Lexer);\n\n\t\tforeach ($this->_list_files(array('views', 'classes')) as $file)\n\t\t{\n\t\t\t$statements = $parser->parse(file_get_contents($file));\n\n\t\t\t$terms = Arr::merge($terms, $this->_get_terms_from_statements($statements));\n\t\t}\n\n\t\treturn $terms;\n\t}", "public function scanDirNamesRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string>\n */\n return $this->scanRawRecursive(false, true, $filter, null);\n }", "public function accept()\n {\n /**\n * @var \\SplFileInfo $current\n */\n $current = parent::current();\n if (!$current->isDir()) {\n return false;\n }\n }", "public function scanDirectory($directory) {\n global $database;\n\n $check = self::getDirectoryTree($directory, array(\n 'php',\n 'lte'\n ));\n $translation = array();\n foreach ($check as $file_path) {\n $path_info = pathinfo($file_path);\n if ($path_info['extension'] == 'php') {\n if (!$this->parseSourceFile($file_path, $translation)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $this->getError()));\n return false;\n }\n }\n elseif ($path_info['extension'] == 'lte') {\n if (!$this->parseTemplateFile($file_path, $translation)) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $this->getError()));\n return false;\n }\n }\n else {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__,\n $this->I18n('The file type <b>{{ file_type }}</b> is not supported!',\n array('file_type' => $path_info['extension']))));\n return false;\n }\n }\n\n foreach ($translation as $entry) {\n $key = self::sanitize($entry['key']);\n $SQL = \"SELECT `i18n_id`, `i18n_key` FROM `\".dbManufakturI18n::getTableName() .\n \"` WHERE `i18n_key`='$key' AND (`i18n_status`='ACTIVE' OR `i18n_status`='IGNORE')\";\n if (null == ($query = $database->query($SQL))) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $database->get_error()));\n return false;\n }\n\n $add_only_source = false;\n if ($query->numRows() > 0) {\n $result = $query->fetchRow(MYSQL_ASSOC);\n $add_only_source = ($result['i18n_key'] == $key) ? true : false;\n }\n\n if ($add_only_source) {\n // entry already exists, keep only the source usage\n $SQL = \"INSERT INTO `\".dbManufakturI18nSources::getTableName().\n \"` (`i18n_id`, `src_path`, `src_file`, `src_line`, `src_module`) VALUES (\".\n \"'{$result[dbManufakturI18n::FIELD_ID]}','{$entry['path']}',\".\n \"'{$entry['file']}','{$entry['line']}','{$entry['module']}')\";\n if (null == ($database->query($SQL))) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $database->get_error()));\n return false;\n }\n }\n else {\n // create a new entry\n $SQL = \"INSERT INTO `\".dbManufakturI18n::getTableName().\"` \".\n \"(`i18n_description`, `i18n_key`, `i18n_last_sync`, `i18n_status`) VALUES ( \".\n \"'', '$key', '\".date(\"Y-m-d H:i:s\", time()).\"', \".\n \"'\".dbManufakturI18n::STATUS_ACTIVE.\"')\";\n if (null == ($database->query($SQL))) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $database->get_error()));\n return false;\n }\n // get the ID for the new entry\n $id = mysql_insert_id();\n // add the standard EN translation\n $author = (isset($_SESSION['DISPLAY_NAME'])) ? $_SESSION['DISPLAY_NAME'] : dbManufakturI18n::AUTHOR_UNKNOWN;\n $SQL = \"INSERT INTO `\".dbManufakturI18nTranslations::getTableName().\"` (\".\n \"`trans_author`, `i18n_id`, `trans_language`, `trans_translation`, \".\n \"`trans_usage`, `trans_type`, `trans_status`) VALUES (\".\n \"'$author','$id','EN','$key','TEXT','REGULAR','ACTIVE')\";\n if (null == ($database->query($SQL))) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $database->get_error()));\n return false;\n }\n // add source usage...\n $SQL = \"INSERT INTO `\".dbManufakturI18nSources::getTableName().\"` (\".\n \"`i18n_id`, `src_path`, `src_file`, `src_line`, `src_module`) VALUES (\".\n \"'$id', '{$entry['path']}', '{$entry['file']}', '{$entry['line']}', '{$entry['module']}')\";\n if (null == ($database->query($SQL))) {\n $this->setError(sprintf('[%s - %s] %s', __METHOD__, __LINE__, $database->get_error()));\n return false;\n }\n }\n }\n return true;\n }" ]
[ "0.7491994", "0.7418604", "0.7250043", "0.71842724", "0.7012226", "0.688901", "0.6712443", "0.66900235", "0.6572419", "0.65611196", "0.6556684", "0.6530685", "0.65249497", "0.64954686", "0.6491414", "0.64674044", "0.64471996", "0.6423127", "0.64098424", "0.6407863", "0.63425076", "0.63254446", "0.63068134", "0.62684846", "0.62645704", "0.6242374", "0.62012523", "0.61859655", "0.6183164", "0.6182636", "0.61544687", "0.6125214", "0.61195093", "0.60808647", "0.60739344", "0.6052474", "0.6049237", "0.60448027", "0.60307676", "0.5994695", "0.5986685", "0.594655", "0.5932649", "0.5926633", "0.5906375", "0.5904675", "0.58696854", "0.58676755", "0.5865345", "0.586406", "0.5862259", "0.5838986", "0.58232176", "0.5796079", "0.5766722", "0.5730146", "0.57218903", "0.5719166", "0.57155037", "0.57032275", "0.5699769", "0.5693498", "0.5689411", "0.56783915", "0.56553394", "0.5653359", "0.5647607", "0.5645989", "0.56299514", "0.5620454", "0.56146276", "0.56144124", "0.5601091", "0.5594189", "0.55926573", "0.55917454", "0.5588802", "0.5576779", "0.5575044", "0.55505025", "0.55466133", "0.5525539", "0.5524566", "0.5509517", "0.5481452", "0.54728067", "0.5469863", "0.5459185", "0.54591405", "0.5452974", "0.5450035", "0.5446679", "0.5429731", "0.54216176", "0.5418222", "0.5416231", "0.5409062", "0.5396358", "0.5391819", "0.53903013" ]
0.7820266
0
Test for Directory::search() Search file 'index.php' inside the ROOT directory
Тест для Directory::search() Поиск файла 'index.php' внутри корневой директории
public function test_search() { $object = Directory::factory(ROOT); $res = $object->search('/(index.php|.htaccess)/'); $this->assertArrayHasKey(ROOT.DS.'index.php', $res); $this->assertArrayHasKey(ROOT.DS.'.htaccess', $res); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_search_by_name()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search_by_name('index.php');\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n }", "public function test_search_by_extension()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search_by_extension(array('php'));\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n }", "public function test_scan_files()\n {\n $content = array('.gitignore','.htaccess','index.php','README');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_FILES);\n \n $this->assertEquals(count($content), count($res));\n foreach($res as $path=>$dir){\n $this->assertTrue(in_array($dir->get_base_name(), $content));\n $this->assertInstanceOf('\\Kaili\\File', $dir);\n }\n }", "public function hasIndexDirectoryPath();", "public function test_scan()\n {\n $content = array('.','..','application','.git','.gitignore','.htaccess','index.php','nbproject','README','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC);\n \n $output = array();\n foreach($res as $f) $output[] = $f->get_base_name();\n $this->assertEquals($content, $output);\n }", "function searchFiles($search, $path, $video){\n $searchFiles = scandir($path);\n foreach($searchFiles as $sFile){\n if(($sFile!=\".\")&&($sFile!=\"..\")){\n if(is_dir($path.$sFile)){\n $search = glob($path.$sFile.'/'.$video);\n if(!empty($search)){\n return $search;\n }\n }\n }\n }\n return array('did', 'not', 'work');\n}", "protected function getSearchPaths() {}", "function searchFile($directory, $file)\n{\n // Blacklisted directory names - not doing so will provoke an endless loop\n $blacklist = array ( '.idea', '.git', '.', '..');\n\n // Getting a handle on the directory\n $dir_handle = opendir($directory);\n\n // Looping on all the directorie's entry to find the right file\n while(false !== ($entry = readdir($dir_handle)))\n {\n //if($entry != '.' && $entry != '..' && $entry != '.idea' && $entry != '.git')\n if(!in_array($entry, $blacklist))\n {\n // if it's a directory - call back the same function recursively\n if(is_dir($directory. DIRECTORY_SEPARATOR .$entry))\n {\n searchFile($directory . DIRECTORY_SEPARATOR . $entry, $file);\n }\n // If it's a file, test against class name to know if it is the right file\n else if(str_replace(\".php\", \"\", $entry) == get_class_name($file))\n {\n $path = $directory . DIRECTORY_SEPARATOR . $entry;\n add_to_cache($file, $path);\n\n return;\n }\n }\n }\n\n closedir($dir_handle);\n\n\n}", "function searchForFile($dir, $searchfile)\r\n{\r\n\tglobal $total_loops;\r\n\t// Make sure we do not exceed 80% memory usage. If so, return false to prevent hitting memory limit.\r\n\t// if (memory_get_usage()/1048576 > (int)ini_get('memory_limit')*0.8) return false;\r\n\t// Set max number of loops we'll do\r\n\t$max_loops = 20000;\r\n\t// Trim $dir and make sure it ends with directory separator\r\n\t$dir = rtrim(trim($dir), DS) . DS;\r\n\t// Loop through all files and subdirectories\r\n\tforeach (getDirFiles($dir) as $thisFileOrDir) \r\n\t{\r\n\t\t// Increment loop\r\n\t\t$total_loops++;\r\n\t\t// Stop if we've done over $max_loops loops and reset $total_loops for other processes\r\n\t\tif ($total_loops > $max_loops) {\r\n\t\t\t$total_loops = 0;\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// Set full path of file/dir we're looking at\r\n\t\t$fullPath = $dir.$thisFileOrDir;\r\n\t\t// If it's a file, check if it's the one we're looking for\r\n\t\tif (isFile($fullPath)) {\r\n\t\t\t// Found the file! Return the current directory.\r\n\t\t\tif ($thisFileOrDir == $searchfile) return $dir;\r\n\t\t}\r\n\t\t// If it's a directory, then recursively check all files in that subdirectory\r\n\t\telseif (is_dir($fullPath)) {\r\n\t\t\t// Get return value for this directory\r\n\t\t\t$returnedDir = searchForFile($fullPath, $searchfile);\r\n\t\t\t// If returned a filename and it matches teh search file, return the returned directory\r\n\t\t\tif ($returnedDir !== false) return $returnedDir;\r\n\t\t}\r\n\t}\r\n\t// If didn't find it, return false\r\n\treturn false;\r\n}", "public function test_scan_directories()\n {\n $content = array('.','..','application','.git','nbproject','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_DIRS);\n \n $this->assertEquals(count($content), count($res));\n foreach($res as $path=>$dir){\n $this->assertTrue(in_array($dir->get_base_name(), $content));\n $this->assertInstanceOf('\\Kaili\\Directory', $dir);\n }\n }", "public function testFind()\n {\n $stack = Solar::factory('Solar_Path_Stack');\n \n // now reset the include_path\n $old_path = set_include_path($this->_support_path);\n \n // use the testing directory to look for files\n $path = array(\n \"a\",\n \"b\",\n \"c\",\n );\n \n $stack->add($path[0]);\n $stack->add($path[1]);\n $stack->add($path[2]);\n \n // should find it at a\n $actual = $stack->find('target1');\n $expect = Solar_Dir::fix($path[0]) . 'target1';\n $this->assertSame($expect, $actual);\n \n // should find it at b\n $actual = $stack->find('target2');\n $expect = Solar_Dir::fix($path[1]) . 'target2';\n $this->assertSame($expect, $actual);\n \n // should find it at c\n $actual = $stack->find('target3');\n $expect = Solar_Dir::fix($path[2]) . 'target3';\n $this->assertSame($expect, $actual);\n \n // should not find it at all\n $actual = $stack->find('no_such_file');\n $this->assertFalse($actual);\n \n // put the include_path back\n set_include_path($old_path);\n }", "abstract public function search($files, array $includedFiles);", "public function testFindFiles()\n {\n\n }", "public function findFiles();", "public function getSearchDir() {\r\n\t\treturn $this->searchDir;\r\n\t}", "function search() {}", "function _ft_search_find_files($dir, $q){\r\n\t$output = array();\r\n\tif (ft_check_dir($dir) && $dirlink = @opendir($dir)) {\r\n\t\twhile(($file = readdir($dirlink)) !== false){\r\n\t\t\tif($file != \".\" && $file != \"..\" && ((ft_check_file($file) && ft_check_filetype($file)) || (is_dir($dir.\"/\".$file) && ft_check_dir($file)))){\r\n\t\t\t\t$path = $dir.'/'.$file;\r\n\t\t\t\t// Check if filename/directory name is a match.\r\n\t\t\t\tif(stristr($file, $q)) {\r\n\t\t\t\t\t$new['name'] = $file;\r\n\t\t\t\t\t$new['shortname'] = ft_get_nice_filename($file, 20);\r\n\t\t\t\t\t$new['dir'] = substr($dir, strlen(ft_get_root()));\r\n\t\t\t\t\tif (is_dir($path)) {\r\n if (ft_check_dir($path)) {\r\n \t\t\t\t\t\t$new['type'] = \"dir\";\t\t\t\t\t \r\n \t\t\t\t\t$output[] = $new;\r\n }\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t $new['type'] = \"file\";\r\n \t\t\t\t\t$output[] = $new;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Check subdirs for matches.\r\n\t\t\t\tif(is_dir($path)) {\r\n\t\t\t\t\t$dirres = _ft_search_find_files($path, $q);\r\n\t\t\t\t\tif (is_array($dirres) && count($dirres) > 0) {\r\n\t\t\t\t\t\t$output = array_merge($dirres, $output);\r\n\t\t\t\t\t\tunset($dirres);\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tsort($output);\r\n\t\tclosedir($dirlink);\r\n\t\treturn $output;\r\n\t} else {\r\n\t\treturn FALSE;\r\n\t}\r\n}", "function hasIndex($path, $filename)\n {\n $abs = $path.'\\\\'.$filename;\n\n if(file_exists($abs))\n {\n $info = pathinfo($abs);\n\n if (is_dir($abs)) {\n $dir = new DirectoryIterator($abs);\n foreach ($dir as $file) {\n if (!$file->isDot()) {\n $info = pathinfo($file);\n if ( strtolower($info['filename']) == 'index' && !$file->isDir()) { return true; } \n }\n }\n }\n else { if (strtolower($info['filename']) == 'index') { return true; } }\n }\n return false;\n }", "public function hasDefaultIndexDirectoryPath();", "public function testSearchMods()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function find($file);", "function searchDir($base_dir=\"./\",$p=\"\",$f=\"\",$allowed_depth=-1){\n\t$contents=array();\n\n\t# trim all input arguments for whitespace\n\t$base_dir=trim($base_dir);\n\t$p=trim($p);\n\t$f=trim($f);\n\n # if base dir is not given, use the this\n\tif($base_dir==\"\")$base_dir=\"./\";\n\n\t# if last character of basedir lacks a \"/\" then add one\n\tif(substr($base_dir,-1)!=\"/\")$base_dir.=\"/\";\n\n\t# remove the \"../\" and \"./\" directories, and trim all \"./\"\n\t$p=str_replace(array(\"../\",\"./\"),\"\",trim($p,\"./\"));\n\n\t# add the requested path to the base directory string\n\t$p=$base_dir.$p;\n\n\t#if p is not a directory, meaning it is a file, get the path to it\n\tif(!is_dir($p))$p=dirname($p);\n\n\t#if the last character of p is not a \"/\" then add one\n\tif(substr($p,-1)!=\"/\")$p.=\"/\";\n\n\t# if caps are set on allowed depth (allowed depth>-1) count the dirs\n\tif($allowed_depth>-1){\n\t\t$allowed_depth=count(explode(\"/\",$base_dir))+ $allowed_depth-1;\n\t\t$p=implode(\"/\",array_slice(explode(\"/\",$p),0,$allowed_depth));\n\t\tif(substr($p,-1)!=\"/\")$p.=\"/\";\n\t}\n\n\t# if f is empty, create an empty array, if not explode and store elements\n\t$filter=($f==\"\")?array():explode(\",\",strtolower($f));\n\n\t# store the files in the files array, and shut up while scanning\n\t$files=@scandir($p);\n\n\t# if there are no files after scan, return an empty array and the path\n\tif(!$files)return array(\"contents\"=>array(),\"currentPath\"=>$p);\n\n\t# iterate through all files found\n\tfor ($i=0;$i<count($files);$i++){\n\n\t\t# gather name and path of each file\n\t\t$fName=$files[$i];\n\t\t$fPath=$p.$fName;\n\n\t\t# check if the file is a directory and tag it as directory\n\t\t# each file is tagged as a folder by default\n\t\t$isDir=is_dir($fPath);\n\t\t$add=false;\n\t\t$fType=\"folder\";\n\n\t\t# if the file is a file\n\t\tif(!$isDir){\n\n\t\t\t# extract extension from filename\n\t\t\t$ft=strtolower(substr($files[$i],strrpos($files[$i],\".\")+1));\n\t\t\t$fType=$ft;\n\n\t\t\t# if there is anything in the filter that matches, add it\n\t\t\tif($f!=\"\"){\n\t\t\t\tif(in_array($ft,$filter))$add=true;\n\t\t\t}else{\n\t\t\t\t$add=true;\n\t\t\t}\n\t\t# if the file is a folder\n\t\t}else{\n\t\t\tif($fName==\".\")continue;\n\t\t\t$add=true;\n\n\t\t\t# filter it, and discard if bad\n\t\t\tif($f!=\"\"){\n\t\t\t\tif(!in_array($fType,$filter))$add=false;\n\t\t\t}\n\n\t\t\t# if the file is the \"..\" folder\n\t\t\tif($fName==\"..\"){\n\t\t\t\t# if we are in the base dir, no not add upper directory option\n\t\t\t\tif($p==$base_dir){\n\t\t\t\t\t$add=false;\n\t\t\t\t}else $add=true;\n\n\t\t\t\t# explode the path by path steps\n\t\t\t\t$tempar=explode(\"/\",$fPath);\n\t\t\t\t# remove last two elements, so the file references parent dir\n\t\t\t\tarray_splice($tempar,-2);\n\t\t\t\t# implode the array, to recreate the path string\n\t\t\t\t$fPath=implode(\"/\",$tempar);\n\t\t\t\t# if for some reason, this reference is shorter than basedir, deny it!\n\t\t\t\tif(strlen($fPath)<= strlen($base_dir))$fPath=\"\";\n\t\t\t}\n\t\t}\n\n\t\t# if the created fPath is non-zero, append to basedir\n\t\tif($fPath!=\"\")$fPath=substr($fPath,strlen($base_dir));\n\t\t# if approved to add, add path, name and type to contents[] array\n\t\tif($add)$contents[]=array(\"fPath\"=>$fPath,\"fName\"=>$fName,\"fType\"=>$fType);\n\t}\n\n\t# if p is shorter than base_dir, deny it! Else, cut away base_dir and use it\n\t$p=(strlen($p)<= strlen($base_dir))?$p=\"\":substr($p,strlen($base_dir));\n\t# return the final contents and its respective path\n\treturn array(\"contents\"=>$contents,\"currentPath\"=>$p);\n}", "function searchDir($root,$path,&$data)\n\t{\n\t\t$full_path = $root.$path;\n\t\tif(is_dir($full_path))\n\t\t{\n\t\t\t$dp=dir($full_path);\n\t\t\twhile($file=$dp->read())\n\t\t\t{\n\t\t\t\tif($file!='.'&& $file!='..')\n\t\t\t\t{\n\t\t\t\t\tsearchDir($root,$path.'/'.$file,$data);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$dp->close();\n\t\t}\n\t\tif(is_file($full_path))\n\t\t{\n\t\t\t$data[]=$path;\n\t\t}\n\t}", "function searchFolder( $current_folder, $folder_to_find, &$matches )\n{\n if ( !( $handle = opendir( $current_folder ) ) ) die( \"Cannot open $current_folder.\" );\n\n while ( $entry = readdir( $handle ) ) {\n if ( is_dir( \"$current_folder/$entry\" ) ) {\n if ( $entry != \".\" && $entry != \"..\" ) {\n\n // This entry is a valid folder\n // If it matches our folder name, add it to the list of matches\n if ( $entry == $folder_to_find ) $matches[] = \"$current_folder/$entry\";\n\n // Search this folder\n searchFolder( \"$current_folder/$entry\", $folder_to_find, $matches );\n }\n }\n }\n closedir( $handle );\n}", "private static function search()\r\n\t{\r\n\t\t$dir = 'plugins';\r\n\t\t// search for plugin modules in the plugins directory\t\t \r\n\t\t$modules = model_Utils_ModuleHelper::searchDirectoryForModules($dir);\r\n\t\tforeach ($modules as $module)\r\n\t\t{\r\n\t\t\t// save found module paths to the db so we can auto-load them in the future\r\n\t\t\tmodel_Utils_ModuleHelper::saveModule($module);\r\n\t\t\t// add matching paths to Kohana's module paths\t\t\r\n\t\t\tmodel_Utils_ModuleHelper::addModulePath($module);\r\n\t\t}\r\n\t\treturn Model_Admin_EventsAdmin::searchForListeners($dir,'Interface_iPCPPlugin');\t\r\n\t}", "public function requires_search() {\n\t\treturn false;\n\t}", "public function getIndexDirectoryPath();", "function search()\n\t{}", "function search()\n\t{}", "static public function searchFirst($dirList)\n {\n if (!is_array($dirList))\n {\n $dirList = array($dirList);\n }\n\n // this is what we'll be adding to the search path when we're done\n $searchPathList = array();\n\n // iterate through the list of folders\n foreach ($dirList as $dir)\n {\n // get the absolute path\n $dir = realpath($dir);\n\n // remove the folder if it is already in the search list\n static::dontSearchIn($dir);\n\n // add it to the end of the new list\n $searchPathList[] = $dir;\n }\n\n // add the new list to the front of the path\n set_include_path(implode(PATH_SEPARATOR, $searchPathList) . PATH_SEPARATOR . get_include_path());\n }", "public function func_search() {}", "public function search();", "public function search();", "function DNUI_scan_dir($dirBase) {\r\n return array_diff(scandir($dirBase), array('..', '.'));\r\n}", "public function run()\r\r\n\t{\r\r\n\t\t$arrPages = array();\r\r\n\t\t$strCache = md5('search_index' . session_id());\r\r\n\r\r\n\t\t// Get cache file\r\r\n\t\tif (file_exists(TL_ROOT . '/system/tmp/' . $strCache))\r\r\n\t\t{\r\r\n\t\t\t$objFile = new File('system/tmp/' . $strCache);\r\r\n\r\r\n\t\t\tif ($objFile->mtime < time() + 3600)\r\r\n\t\t\t{\r\r\n\t\t\t\t$arrPages = deserialize($objFile->getContent());\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\r\r\n\t\t// Get all searchable pages\r\r\n\t\tif (count($arrPages) < 1)\r\r\n\t\t{\r\r\n\t\t\t$arrPages = $this->getSearchablePages();\r\r\n\r\r\n\t\t\t// HOOK: take additional pages\r\r\n\t\t\tif (array_key_exists('getSearchablePages', $GLOBALS['TL_HOOKS']) && is_array($GLOBALS['TL_HOOKS']['getSearchablePages']))\r\r\n\t\t\t{\r\r\n\t\t\t\tforeach ($GLOBALS['TL_HOOKS']['getSearchablePages'] as $callback)\r\r\n\t\t\t\t{\r\r\n\t\t\t\t\t$this->import($callback[0]);\r\r\n\t\t\t\t\t$arrPages = $this->$callback[0]->$callback[1]($arrPages);\r\r\n\t\t\t\t}\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\t$objFile = new File('system/tmp/' . $strCache);\r\r\n\t\t\t$objFile->write(serialize($arrPages));\r\r\n\t\t\t$objFile->close();\r\r\n\t\t}\r\r\n\r\r\n\t\t$intStart = $this->Input->get('start') ? $this->Input->get('start') : 0;\r\r\n\t\t$intPages = $this->Input->get('ppc') ? $this->Input->get('ppc') : 10;\r\r\n\r\r\n\t\t// Rebuild search index\r\r\n\t\tif ($intPages && count($arrPages))\r\r\n\t\t{\r\r\n\t\t\t$this->import('Search');\r\r\n\r\r\n\t\t\tif ($intStart < 1)\r\r\n\t\t\t{\r\r\n\t\t\t\t$this->Database->execute(\"TRUNCATE TABLE tl_search\");\r\r\n\t\t\t\t$this->Database->execute(\"TRUNCATE TABLE tl_search_index\");\r\r\n\t\t\t\t$this->Database->execute(\"TRUNCATE TABLE tl_cache\");\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\techo '<div style=\"font-family:Verdana, sans-serif; font-size:11px; line-height:16px; margin-bottom:12px;\">';\r\r\n\r\r\n\t\t\tfor ($i=$intStart; $i<$intStart+$intPages && $i<count($arrPages); $i++)\r\r\n\t\t\t{\r\r\n\t\t\t\techo 'File <strong>' . $arrPages[$i] . '</strong> has been indexed<br />';\r\r\n\r\r\n\t\t\t\t$objRequest = new Request();\r\r\n\t\t\t\t$objRequest->send($this->Environment->base . $arrPages[$i]);\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\techo '<div style=\"margin-top:12px;\">';\r\r\n\r\r\n\t\t\t// Redirect to the next cycle\r\r\n\t\t\tif ($i < (count($arrPages) - 1))\r\r\n\t\t\t{\r\r\n\t\t\t\t$url = $this->Environment->base . 'typolight/indexer.php?start=' . ($intStart + $intPages) . '&ppc=' . $intPages;\r\r\n\r\r\n\t\t\t\techo '<script type=\"text/javascript\">setTimeout(\\'window.location=\"' . $url . '\"\\', 1000);</script>';\r\r\n\t\t\t\techo '<a href=\"' . $url . '\">Please click here to proceed if you are not using JavaScript</a>';\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\t// Redirect back home\r\r\n\t\t\telse\r\r\n\t\t\t{\r\r\n\t\t\t\t$url = $this->Environment->base . 'typolight/main.php?do=maintenance';\r\r\n\r\r\n\t\t\t\t// Delete temporary file\r\r\n\t\t\t\t$objFile = new File('system/tmp/' . $strCache);\r\r\n\t\t\t\t$objFile->delete();\r\r\n\t\t\t\t$objFile->close();\r\r\n\r\r\n\t\t\t\techo '<script type=\"text/javascript\">setTimeout(\\'window.location=\"' . $url . '\"\\', 1000);</script>';\r\r\n\t\t\t\techo '<a href=\"' . $url . '\">Please click here to proceed if you are not using JavaScript</a>';\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\techo '</div></div>';\r\r\n\t\t}\r\r\n\t}", "public function search($key)\n {\n return $this->root->search($key);\n }", "public function test_admin_search_keyword()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/SearchResult', 'index']);\n $this->assertResponseCode(404);\n }", "public function testRequestRootIsAndIndex() {\n\n\t\t$r1 = new Nether\\Avenue\\Router(static::$RequestData['Root']);\n\t\t$r2 = new Nether\\Avenue\\Router(static::$RequestData['Index']);\n\n\t\t(new Verify(\n\t\t\t'path / request runs as /index',\n\t\t\t$r1->GetPath()\n\t\t))->equals('/index');\n\n\t\t(new Verify(\n\t\t\t'path /index runs as /index',\n\t\t\t$r2->GetPath()\n\t\t))->equals('/index');\n\n\n\t\treturn;\n\t}", "protected function search()\n\t{\n\t\treturn Phpfox::getLib('search');\t\n\t}", "function is_search()\n {\n }", "public function searchAction()\n {\n $user_id = $this->getSecurityContext()->getUser()->getId();\n $drive = $this->_driveHelper->getRepository()->getDriveByUserId($user_id);\n\n $q = $this->getScalarParam('q');\n // $hits = $this->getResource('drive.file_indexer')->searchInDrive($q, $drive->drive_id);\n $hits = $this->getResource('drive.file_indexer')->search($q);\n\n echo '<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />';\n echo '<strong>', $hits->hitCount, '</strong> hits<br/>';\n foreach ($hits->hits as $hit) {\n $file = $this->_driveHelper->getRepository()->getFile($hit->document->file_id);\n if (empty($file)) {\n echo 'Invalid file ID: ', $hit->document->file_id;\n }\n if ($file && $this->_driveHelper->isFileReadable($file)) {\n echo '<div>', '<strong>', $file->name, '</strong> ', $this->view->fileSize($file->size), '</div>';\n }\n }\n exit;\n }", "public function search()\n\t{\n\t\t\n\t}", "public function testMediaFilesSearchGet()\n {\n $client = static::createClient();\n\n $path = '/media/files/search';\n\n $crawler = $client->request('GET', $path);\n }", "static function AJAX_Scan() {\n\t\t$list = RecursiveScanDir(__DIR__);\n\t\tusort($list, \"strnatcasecmp\");\n\t\t\n\t\t// No files?\n\t\tif (!$list || !count($list)) die(\"No .php files located in this<br />folder and/or subfolders\");\n\t\t\n\t\t// For each file we'll present something nice\n\t\t$out = \"\";\n\t\tforeach($list as $file) {\n\t\t\t\n\t\t\t// If Mode is set to 1, we need to parse the file and check the completion\n\t\t\t$analysis = \"\";\n\t\t\tif ($_POST['Mode']) {\n\t\t\t\t$analysis = DocBlock::AnalyzeFile($file);\n\t\t\t}\n\t\t\t\n\t\t\t$out .= \"\n\t\t\t\t$analysis<a href='#' data-filename='\".rawurlencode($file).\"' class='filelink'>$file</a><br />\n\t\t\t\";\n\t\t}\n\t\t\n\t\t// Ouptut\n\t\techo $out;\n\t\t\n\t\t// Exit \"Gracefully\"\n\t\texit(0);\n\t}", "function includedByAdminScript() {\n global $path_to_root_dir;\n if((eregi('index\\.php', $_SERVER['SCRIPT_NAME']) and $path_to_root_dir == \"..\")\n or(eregi('edit\\.php', $_SERVER['SCRIPT_NAME']))) \n return true;\n else {\n return false;\n }\n}", "public function getTestDirectory();", "private function includeAll( $path, $search ){\n\n \tforeach ( glob( $path . $search ) as $file ) {\n\t\t \n\t\t \tinclude_once $file;\n\n\t\t \t$fileParts = pathinfo($file);\n\n\t\t \t$fileFolder = $fileParts[\"filename\"];\n\n\t\t \tif(is_dir($path . $fileFolder) && is_readable($path . $fileFolder)){\n\n\t\t \t\tforeach ( glob( $path . $fileFolder . \"/\" . $search ) as $otherFile ) { \n\n\t\t \t\t\t\tinclude_once $otherFile;\n\t\t \t\t}\n\n\t\t \t}\n\n\t\t \n\t\t}\n }", "public function runOnDirectories(): bool;", "public static function search($dir, $file, $ext = 'php', $multiple = false, $cache = true)\n\t{\n\t\t$finder = static::forge(array($dir), trim($ext, '.'));\n\n\t\tif (($result = $finder->findCached($multiple?'all':'one', $file)) === null)\n\t\t{\n\t\t\t$result = $multiple ? $finder->findAll($file, false, false, 'file') : $finder->find($file, false, false, 'file');\n\t\t}\n\n\t\tif ($cache and $result)\n\t\t{\n\t\t\t$finder->cache($multiple?'all':'one', $file, false, $result, array($dir));\n\t\t}\n\n\t\treturn $result;\n\t}", "function scanDir($cfg) //$view, $tdir , $subdir='', $match)\n {\n $ff = HTML_FlexyFramework::get();\n \n $subdir = $cfg['subdir'];\n $scandir = $cfg['tdir']. (empty($subdir) ? '' : '/') . $subdir;\n \n if (in_array($subdir, $cfg['skipdir'])) {\n return array();\n }\n // skip dom_templates\n \n if (!file_exists($scandir)) {\n return array();\n }\n $dh = opendir($scandir);\n if(!$dh){\n return array(); // something went wrong!?\n }\n $ret = array();\n \n while (($fn = readdir($dh)) !== false) {\n // do we care that it will try and parse the template directory??? - not really..\n // as we are only looking for php files..\n if(empty($fn) || $fn[0] == '.'){\n continue;\n }\n \n $fullpath = $scandir.(empty($scandir) ? '' : \"/\").$fn;\n // echo \"filename: $fullpath \\n\";\n \n if (is_link($fullpath)) {\n continue;\n }\n \n if(is_dir($fullpath)){\n // then recursively call self...\n $cfg['subdir'] = $subdir . (empty($subdir) ? '' : '/') . $fn;\n $children = $this->scanDir($cfg);\n if (count($children)) {\n $ret = array_merge($ret, $children);\n \n }\n continue;\n \n }\n \n if (!preg_match($cfg['match'], $fn) || !is_file($fullpath)) {\n continue;\n }\n \n \n \n $ret[] = $subdir . (empty($subdir) ? '' : '/'). $fn; /// this used to be strtolower?? why???\n\n \n \n }\n// print_r($ret);\n \n return $ret;\n \n \n \n \n }", "public function search(){}", "abstract protected function yieldSearchPaths(): Generator;", "public function test_admin_search_keyword_b()\n {\n $this->request('GET', ['pages/SearchResult', 'index']);\n $this->assertResponseCode(404);\n }", "function startedIndexPhp() {return true; }", "public static function searchDirectory($path, $file = '')\n {\n $incpath = explode(PATH_SEPARATOR, get_include_path());\n\n for ($i = 0; $i < count($incpath); $i++)\n {\n if (is_dir($incpath[$i] . '/' . $path)) {\n set_include_path(get_include_path() . PATH_SEPARATOR . $incpath[$i] . '/' . $path. '/');\n return true;\n }\n\n // also try plurals\n if (is_dir($incpath[$i] . '/' . $path . 's/')) {\n set_include_path(get_include_path() . PATH_SEPARATOR . $incpath[$i] . '/' . $path. 's/');\n return true;\n }\n }\n\n return false;\n }", "protected function getFileIndexRepository() {}", "protected function getFileIndexRepository() {}", "protected function getFileIndexRepository() {}", "protected function getFileIndexRepository() {}", "protected function getFileIndexRepository() {}", "private function createFolderIndex(){\n //Just testing the command\n //$this->info('Starting to search the folder: '.$this->file_storage);\n $this->folders = array();\n $this->invalid_files = array();\n $this->count = 0;\n\n //Tagging all files to be able to find removed files at the end\n $SQL = \"UPDATE files SET found = '0'\";\n DB::connection('mysql')->update($SQL);\n $SQL = \"UPDATE folders SET found = '0'\";\n DB::connection('mysql')->update($SQL);\n\n //Checking if cache file exist, if not just create all the index on ES\n $this->checkCacheFolder();\n //Loop through the directories to get files ad folders\n $this->listFolderFiles($this->file_storage);//$_ENV['EBT_FILE_STORAGE']);\n //Check if any folder is missing from cache and try to create on ES\n $this->compareCacheFolders();\n\n //Remove files/folders that hasn't been found\n //if ($this->confirm('Do you wish to remove missing files? [y|N]')) {\n $this->removeMissingFiles();\n //}\n }", "function index($dir = '.') {\n\t\t$index = array();\n\t\tif ($handle = opendir($dir)) {\n\t\t\twhile (false !== ($file = readdir($handle))) {\n\t\t\t\tif ($file != \".\" && $file != \"..\") {\n\t\t\t\t\tif (isAllowedFile($dir.'/'.$file)) $index[preg_replace(\"/^\\.\\//i\",\"\",$dir.'/'.$file)] = filemtime($dir.'/'.$file);\n\t\t\t\t\telseif (is_dir($dir.'/'.$file)) $index = array_merge($index, index($dir.'/'.$file));\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($handle);\n\t\t}\n\t\treturn $index;\n\t}", "function search($expression) {\n $this->set_error('search is not implemented');\n return false;\n }", "public function action_search_internal()\n\t{\n\t\tglobal $context, $txt;\n\n\t\t// Try to get some more memory.\n\t\tdetectServer()->setMemoryLimit('128M');\n\n\t\t// Load a lot of language files.\n\t\t$language_files = array(\n\t\t\t'Help', 'ManageMail', 'ManageSettings', 'ManageBoards', 'ManagePaid', 'ManagePermissions', 'Search',\n\t\t\t'Login', 'ManageSmileys', 'Maillist', 'Mentions'\n\t\t);\n\n\t\t// All the files we need to include to search for settings\n\t\t$include_files = array();\n\n\t\t// This is a special array of functions that contain setting data\n\t\t// - we query all these to simply pull all setting bits!\n\t\t$settings_search = array(\n\t\t\tarray('settings_search', 'area=logs;sa=pruning', '\\\\ElkArte\\\\AdminController\\\\AdminLog'),\n\t\t\tarray('config_vars', 'area=corefeatures', '\\\\ElkArte\\\\AdminController\\\\CoreFeatures'),\n\t\t\tarray('basicSettings_search', 'area=featuresettings;sa=basic', '\\\\ElkArte\\\\AdminController\\\\ManageFeatures'),\n\t\t\tarray('layoutSettings_search', 'area=featuresettings;sa=layout', '\\\\ElkArte\\\\AdminController\\\\ManageFeatures'),\n\t\t\tarray('karmaSettings_search', 'area=featuresettings;sa=karma', '\\\\ElkArte\\\\AdminController\\\\ManageFeatures'),\n\t\t\tarray('likesSettings_search', 'area=featuresettings;sa=likes', '\\\\ElkArte\\\\AdminController\\\\ManageFeatures'),\n\t\t\tarray('mentionSettings_search', 'area=featuresettings;sa=mention', '\\\\ElkArte\\\\AdminController\\\\ManageFeatures'),\n\t\t\tarray('signatureSettings_search', 'area=featuresettings;sa=sig', '\\\\ElkArte\\\\AdminController\\\\ManageFeatures'),\n\t\t\tarray('settings_search', 'area=addonsettings;sa=general', '\\\\ElkArte\\\\AdminController\\\\AddonSettings'),\n\t\t\tarray('settings_search', 'area=manageattachments;sa=attachments', '\\\\ElkArte\\\\AdminController\\\\ManageAttachments'),\n\t\t\tarray('settings_search', 'area=manageattachments;sa=avatars', '\\\\ElkArte\\\\AdminController\\\\ManageAvatars'),\n\t\t\tarray('settings_search', 'area=postsettings;sa=bbc', '\\\\ElkArte\\\\AdminController\\\\ManageEditor'),\n\t\t\tarray('settings_search', 'area=manageboards;sa=settings', '\\\\ElkArte\\\\AdminController\\\\ManageBoards'),\n\t\t\tarray('settings_search', 'area=languages;sa=settings', '\\\\ElkArte\\\\AdminController\\\\ManageLanguages'),\n\t\t\tarray('settings_search', 'area=mailqueue;sa=settings', '\\\\ElkArte\\\\AdminController\\\\ManageMail'),\n\t\t\tarray('settings_search', 'area=maillist;sa=emailsettings', '\\\\ElkArte\\\\AdminController\\\\ManageMaillist'),\n\t\t\tarray('settings_search', 'area=membergroups;sa=settings', '\\\\ElkArte\\\\AdminController\\\\ManageMembergroups'),\n\t\t\tarray('settings_search', 'area=news;sa=settings', '\\\\ElkArte\\\\AdminController\\\\ManageNews'),\n\t\t\tarray('settings_search', 'area=paidsubscribe;sa=settings', '\\\\ElkArte\\\\AdminController\\\\ManagePaid'),\n\t\t\tarray('settings_search', 'area=permissions;sa=settings', '\\\\ElkArte\\\\AdminController\\\\ManagePermissions'),\n\t\t\tarray('settings_search', 'area=postsettings;sa=posts', '\\\\ElkArte\\\\AdminController\\\\ManagePosts'),\n\t\t\tarray('settings_search', 'area=regcenter;sa=settings', '\\\\ElkArte\\\\AdminController\\\\ManageRegistration'),\n\t\t\tarray('settings_search', 'area=managesearch;sa=settings', '\\\\ElkArte\\\\AdminController\\\\ManageSearch'),\n\t\t\tarray('settings_search', 'area=sengines;sa=settings', '\\\\ElkArte\\\\AdminController\\\\ManageSearchEngines'),\n\t\t\tarray('securitySettings_search', 'area=securitysettings;sa=general', '\\\\ElkArte\\\\AdminController\\\\ManageSecurity'),\n\t\t\tarray('spamSettings_search', 'area=securitysettings;sa=spam', '\\\\ElkArte\\\\AdminController\\\\ManageSecurity'),\n\t\t\tarray('moderationSettings_search', 'area=securitysettings;sa=moderation', '\\\\ElkArte\\\\AdminController\\\\ManageSecurity'),\n\t\t\tarray('generalSettings_search', 'area=serversettings;sa=general', '\\\\ElkArte\\\\AdminController\\\\ManageServer'),\n\t\t\tarray('databaseSettings_search', 'area=serversettings;sa=database', '\\\\ElkArte\\\\AdminController\\\\ManageServer'),\n\t\t\tarray('cookieSettings_search', 'area=serversettings;sa=cookie', '\\\\ElkArte\\\\AdminController\\\\ManageServer'),\n\t\t\tarray('cacheSettings_search', 'area=serversettings;sa=cache', '\\\\ElkArte\\\\AdminController\\\\ManageServer'),\n\t\t\tarray('balancingSettings_search', 'area=serversettings;sa=loads', '\\\\ElkArte\\\\AdminController\\\\ManageServer'),\n\t\t\tarray('settings_search', 'area=smileys;sa=settings', '\\\\ElkArte\\\\AdminController\\\\ManageSmileys'),\n\t\t\tarray('settings_search', 'area=postsettings;sa=topics', '\\\\ElkArte\\\\AdminController\\\\ManageTopics'),\n\t\t);\n\n\t\t// Allow integration to add settings to search\n\t\tcall_integration_hook('integrate_admin_search', array(&$language_files, &$include_files, &$settings_search));\n\n\t\t// Allow active modules to add settings for internal search\n\t\t$this->_events->trigger('search', array('language_files' => &$language_files, 'include_files' => &$include_files, 'settings_search' => &$settings_search));\n\n\t\t// Go through all the search data trying to find this text!\n\t\t$search_term = strtolower(un_htmlspecialchars($context['search_term']));\n\t\t$search = new AdminSettingsSearch($language_files, $include_files, $settings_search);\n\t\t$search->initSearch($context['admin_menu_name'], array(\n\t\t\tarray('COPPA', 'area=regcenter;sa=settings'),\n\t\t\tarray('CAPTCHA', 'area=securitysettings;sa=spam'),\n\t\t));\n\n\t\t$context['page_title'] = $txt['admin_search_results'];\n\t\t$context['search_results'] = $search->doSearch($search_term);\n\t}", "public function searchDir($dir) {\r\n\t\t$pages = array();\r\n\t\t// array to hold directories to recurse into\r\n\t\t$dirs = array();\r\n\t\t// mark this directory as seen so we don't look in it again\r\n\t\t$this->seen[realpath($dir)] = true;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tforeach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir)) as $file) {\r\n\t\t\t\tif($file->isFile() && $file->isReadable() && (!isset($this->seen[$file->getPathname()]))) {\r\n\t\t\t\t\t/*mark this as seen so we skip it if we come to it again*/\r\n\t\t\t\t\t$this->seen[$file->getPathname()] = true;\r\n\t\t\t\t\t// load the contents of the file into $text\r\n\t\t\t\t\t$text = file_get_contents($file->getPathname());\r\n\t\t\t\t\t\r\n\t\t\t\t\t// if the search term is inside the body delimiters\r\n\t\t\t\t\tif(preg_match($this->bodyRegex, $text)) {\r\n\t\t\t\t\t\t/*construct the relative URI of the file by removing\r\n\t\t\t\t\t\tthe document root from the full path*/\r\n\t\t\t\t\t\t$uri = substr_replace($file->getPathname(), '', 0, strlen($_SERVER['DOCUMENT_ROOT']));\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// if the page has a title, find it\r\n\t\t\t\t\tif(preg_match('#<title>(.*?)</title>#Sis', $text, $match)) {\r\n\t\t\t\t\t\t// and add the title and URI to $pages\r\n\t\t\t\t\t\tarray_push($pages, array($uri, $match[1]));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tarray_push($pages, array($uri, $uri));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception $e) {\r\n\t\t\t// There was a problem opening the directory\r\n\t\t}\r\n\t\t\r\n\t\treturn $pages;\r\n\t}", "public function crawl() {\n\t\t$sDirectories = BsConfig::get( 'MW::ExtendedSearch::ExternalRepo' );\n\t\tif ( $sDirectories === '' ) return $sDirectories;\n\n\t\t$aDirectories = explode( ',', $sDirectories );\n\t\tforeach ( $aDirectories as $sDirectory ) {\n\t\t\t$sDir = trim ( $sDirectory );\n\t\t\tif( !is_dir( $sDir ) ) continue;\n\t\t\t$this->readInFiles( $sDir );\n\t\t}\n\t\treturn $this->aFiles;\n\t}", "public function test_default_search_dir_is_config()\n {\n $reader = new Bootphp_Config_File_Reader;\n\n $this->assertAttributeSame('config', '_directory', $reader);\n }", "public function testIndex()\n {\n $this->getBrowser()->\n getAndCheck('partenaire', 'index', '/partenaire/index', 404)\n ;\n }", "function swpf_plugin_search($path) {\n\n\t$swpf_plugins = array();\n\n\t$dir = opendir ($path);\n\n\twhile ($file = readdir ($dir))\n\t{\n\t\tif (($file == \".\") or ($file == \"..\"))\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (filetype (\"$path/$file\") == \"dir\")\n\t\t{\n\t\t\t$swpf_file = \"$path/$file/swpf.php\";\n\n\t\t\tif (is_file($swpf_file)) {\n\t\t\t\trequire($swpf_file);\n\t\t\t\tif ($options) $swpf_plugins[] = $options;\n\t\t\t}\n\t\t}\n\n\t} //End of while\n\n\tclosedir($dir);\n\n\treturn $swpf_plugins;\n\n}", "abstract public function directoryLocation();", "function testPackageIndex() {\n\t\t$result = $this->ApiPackage->getPackageIndex();\n\n\t\t$this->assertFalse(isset($result[0]['ApiClass']), 'ApiClass has snuck in, big queries are happening %s');\n\t\t$this->assertTrue(isset($result[0]['children']), 'No children, might not be a tree %s');\n\t}", "public function executeIndex ()\n {\n// $loader->load();\n $tree = array();\n /*$added_tests = array();\n foreach ($this->_getTests($loader->suite()) as $test) {\n $reflection = new ReflectionClass($test);\n $test = $reflection->getFileName();\n $test = substr($test, strpos($test, 'phpunit/') + 8, strlen($test));\n $path = dirname($reflection->getFileName());\n $path = substr($path, strpos($path, 'phpunit/') + 8, strlen($path));\n $path = implode('\"][\"', explode('/', $path));\n if (! in_array($test, $added_tests)) {\n eval(\"\\$tree[\\\"{$path}\\\"][] = \\$test;\");\n $added_tests[] = $test;\n }\n }*/\n $this->tree = $tree;\n \n \n $this->fixtureslist = $this->_getFixturesList();\n }", "public function testSearch()\n\t{\n\t\t$this->call('GET', '/api/posts/search');\n\t}", "public function is_search()\n {\n }", "public function getAdditionalSearchPath() {}", "public static function search()\n {\n return new DIndexSearch(get_called_class());\n }", "public static function getIndexPage() {\n chdir(ROOTDIR);\n\n //FIXME: move to Request class\n $queryString = $_SERVER['REQUEST_URI'];\n $filePath = realpath(ROOTDIR . parse_url($queryString)['path']);\n\n $res = [];\n if ($filePath && is_dir($filePath)){\n // attempt to find an index file\n// function getRendererName($rendererName) { return \"index.$rendererName\";};\n $availableRenderers = array_values(array_intersect(\n Renderer::getRenderersPriority(),\n Renderer::getRenderersNames()\n ));\n// $renderers = array_map(function($rendererName) { return \"index.$rendererName\";}, $availableRenderers);\n foreach ($availableRenderers as $rname){\n if ($indexFilePath = realpath($filePath . DIRECTORY_SEPARATOR . \"index.\" . $rname)){\n $res['renderer'] = $rname;\n $res['path'] = $indexFilePath;\n break;\n }\n }\n }\n return $res;\n }", "public function check_conditions() \n\t{\n\t\t$ok = true;\n\t\tif( !is_writable( $this->_root_path ) ) {\n\t\t\tSession::error( 'Init failed, Search index directory is not writeable. Please update configuration with a writeable directiory.', 'Multi Search' );\n\t\t\t$ok = false;\n\t\t}\n\t\tif( !class_exists(\"Zend_Search_Lucene\") ) {\n\t\t\tSession::error( 'Init failed, Zend Framework or Zend Search Lucene not installed.', 'Multi Search' );\n\t\t\t$ok = false;\n\t\t}\n\n\t\treturn $ok;\n\t}", "public function testSearch()\n {\n $manager = new Manager($this->minimal, $this->driver);\n\n // Exception handling\n $this->assertBindingFirst($manager, 'search');\n $manager->connect();\n $this->assertBindingFirst($manager, 'search');\n $manager->bind();\n\n $this->driver->getConnection()->setFailure(Connection::ERR_MALFORMED_FILTER);\n try {\n $res = $manager->search();\n $this->fail('Filter malformed, query shall fail');\n } catch (MalformedFilterException $e) {\n $this->assertRegExp('/Malformed filter/', $e->getMessage());\n }\n\n // Basic search\n $set = array(new Entry('a'), new Entry('b'), new Entry('c'));\n $this->driver->getConnection()->stackResults($set);\n $result = $manager->search();\n\n $this->assertSearchLog(\n $this->driver->getConnection()->shiftLog(),\n 'dc=example,dc=com',\n '(objectclass=*)',\n SearchInterface::SCOPE_ALL,\n null,\n $set\n );\n\n $this->assertInstanceOf('Toyota\\Component\\Ldap\\Core\\SearchResult', $result);\n\n $data = array();\n foreach ($result as $key => $value) {\n $this->assertInstanceOf('Toyota\\Component\\Ldap\\Core\\Node', $value);\n $data[$key] = $value->getAttributes();\n }\n\n $this->assertArrayHasKey('a', $data);\n $this->assertArrayHasKey('b', $data);\n $this->assertArrayHasKey('c', $data);\n $this->assertEquals(\n 3,\n count($data),\n 'The right search result got retrieved'\n );\n\n // Empty result set search\n $this->driver->getConnection()->setFailure(Connection::ERR_NO_RESULT);\n $this->driver->getConnection()->stackResults($set);\n $result = $manager->search();\n $this->assertInstanceOf(\n 'Toyota\\Component\\Ldap\\Core\\SearchResult',\n $result,\n 'Query did not fail - Exception got handled'\n );\n\n $data = array();\n foreach ($result as $key => $value) {\n $data[$key] = $value->getAttributes();\n }\n $this->assertEquals(\n 0,\n count($data),\n 'The exception got handled and the search result set has not been set in the query'\n );\n\n // Alternative parameters search\n $result = $manager->search(\n 'ou=other,dc=example,dc=com',\n '(objectclass=test)',\n false,\n array('attr1', 'attr2')\n );\n $this->assertSearchLog(\n $this->driver->getConnection()->shiftLog(),\n 'ou=other,dc=example,dc=com',\n '(objectclass=test)',\n SearchInterface::SCOPE_ONE,\n array('attr1', 'attr2'),\n $set\n );\n $this->assertInstanceOf('Toyota\\Component\\Ldap\\Core\\SearchResult', $result);\n }", "public function actionIndexFiles()\n {\n $manager = new Manager(['module' => $this->module]);\n $manager->indexAll();\n }", "function filewalk($file, $search, $counter, $webpath) {\n if (strtolower(substr($file, stripos($file, \".htm\"))) == \".htm\"\n || strtolower(substr($file, stripos($file, \".html\"))) == \".html\"\n || strtolower(substr($file, stripos($file, \".asp\"))) == \".asp\"\n || strtolower(substr($file, stripos($file, \".php\"))) == \".php\") {\n $all = file_get_contents($file);\n $body = substr($all, stripos($all,\"<body\"),stripos($all,\"</body>\") - stripos($all,\"<body\"));\n $body = preg_replace('/<br \\/>/i', ' ', $body);\n $body = preg_replace('/<br>/i', ' ', $body);\n $body = compress($body,\"<noscript\",\"</noscript>\");\n $body = compress($body,\"<script\",\"</script>\");\n $body = compress($body,\"<iframe\",\"</iframe>\");\n $body = compress($body,\"<noframe\",\"</noframe>\");\n $body = strip_tags($body);\n $body = html_entity_decode($body, ENT_QUOTES);\n $body = preg_replace('/\\s+/', ' ', $body);\n // Scans and displays the results\n if (stripos($body, $search)) {\n $title = substr($all, stripos($all,\"<title>\") + 7,stripos($all,\"</title>\") - stripos($all,\"<title>\") - 7);\n $title = html_entity_decode($title, ENT_QUOTES);\n $title = preg_replace('/\\s+/', ' ', $title); \n echo '<p><a style=\"color:#202073;\" href=\"' . $file . '\">' . $title . '</a></br>';\n echo '<span id=\"webpath\">' . $webpath . substr($file, stripos($file, \"/\")) . '</span><br />';\n // echo textpart($body, $search) .. '</p>';\n $counter = $counter + 1;\n }\n }\n return $counter;\n}", "function grep($path, $pattern, &$results)\n{\n // find all files in the path (incl folders)\n $items = glob($path . '/*'); // */\n\n for ($i = 0; $i < count($items); $i++)\n {\n if (is_dir($items[$i]))\n {\n $add = glob($items[$i] . '/*'); // */\n $items = array_merge($items, $add);\n }\n }\n\n // search through the files.\n $results = array();\n foreach($items as $f)\n {\n if (filetype($f) == 'file')\n {\n if (preg_match($pattern, file_get_contents($f), $matches))\n $results = array_merge($results, $matches);\n }\n }\n\n return (count($results) > 0);\n}", "function getsearch($site,$n,$from,$auth) {\n $this->auth=$auth;\n $this->sitenumber=$site;\n $this->n=$n;\n $this->home=getenv(\"DOCUMENT_ROOT\");\n $this->from=$from;\n $this->path=substr($this->from,1,4);\n if ($this->sitenumber==1) {$this->path='';}\n if ($this->sitenumber==2) {$this->path='eng/';}\n if ($this->sitenumber==3) {$this->path='cons/';}\n if ($this->sitenumber==4) {$this->path='cons/eng/';}\n }", "public function findFirstWebFolder() {}", "function search_index_search($search_for, $type, $user, $page = 1, $per_page = 30) {\n \treturn call_user_func_array(array(SEARCH_ENGINE, 'search'), array($search_for, $type, $user, $page, $per_page));\n }", "function search_theme_directories($force = \\false)\n {\n }", "protected function getFilesInDirCreateTestDirectory() {}", "public function directory();", "function searchForAny($source,$search)(\n if(strpos($source,$search) !== FALSE){\n return true;\n }", "public function getSearchIndex();", "private function scanFolder()\n {\n return scandir($this->currentPath);\n }", "private function recSearchFiles($dir)\n {\n $ffs = scandir($dir);\n\n foreach ($ffs as $ff) {\n\n if ($ff != '.' && $ff != '..') {\n\n if (is_dir($dir . '/' . $ff)) {\n $this->recSearchFiles($dir . $ff . '/');\n } else if (strlen($ff) >= 5) {\n $this->searchedFiles[] = $dir . $ff;\n }\n }\n }\n }", "private function __scanDir($dir) {\n\n if ($dir == '/') {\n $dir = $this->startDirectory;\n $this->__currentDirectory = $dir;\n }\n\n $strippedDir = str_replace('/', '', $dir);\n\n $dir = ltrim($dir, \"/\");\n\n // Prevent listing blacklisted directories\n if (in_array($strippedDir, $this->ignoredDirectories)) {\n return false;\n }\n\n if (! file_exists($dir) || !is_dir($dir)) {\n return false;\n }\n\n return scandir($dir);\n }", "public function indexCrawledDocuments() {\n\t\tforeach ( $this->aFiles as $sFile ) {\n\t\t\t$oRepoFile = new SplFileInfo( $sFile );\n\t\t\tif ( !$oRepoFile->isFile() ) continue;\n\n\t\t\t$sFileName = $oRepoFile->getFilename();\n\t\t\t$sDocType = $this->mimeDecoding( $oRepoFile->getExtension() );\n\t\t\tif ( !$this->checkDocType( $sDocType, $sFileName ) ) continue;\n\n\t\t\tif ( !$this->oMainControl->bCommandLineMode ) set_time_limit( $this->iTimeLimit );\n\n\t\t\tif ( $this->sizeExceedsMaxDocSize( $oRepoFile->getSize(), $sFileName ) ) continue;\n\n\t\t\t//Insert URL to Filename\n\t\t\t$rURL = BsConfig::get( 'MW::ExtendedSearch::ExternalRepo' );\n\t\t\t$sURL = BsConfig::get( 'MW::ExtendedSearch::ExternalRepoUrl' );\n\t\t\t//Replace realpath with webserver url only if $sUrl is set, otherwise work as before\n\t\t\tif($sURL == \"\"){\n\t\t\t $sRepoFileRealPath = \"file:///\" . $oRepoFile->getRealPath();\n\t\t\t}else{\n\t\t\t $sRepoFileRealPath = $this->getFilePath( $rURL, $sURL, $oRepoFile );\n\t\t\t}\n\n\t\t\t$timestampImage = wfTimestamp( TS_ISO_8601, $oRepoFile->getMTime() );\n\n\t\t\tif ( $this->checkExistence( $oRepoFile->getRealPath(), 'external', $timestampImage, $sFileName ) ) continue;\n\n\t\t\t$text = $this->getFileText( $oRepoFile->getRealPath(), $sFileName );\n\n\t\t\t$doc = $this->makeRepoDocument( $sDocType, utf8_encode( $sFileName ), $text, utf8_encode( $sRepoFileRealPath ), $timestampImage );\n\t\t\t$this->writeLog( $sFileName );\n\n\t\t\twfRunHooks( 'BSExtendedSearchBeforeAddExternalFile', array( $this, $oRepoFile, &$doc ) );\n\n\t\t\tif ( $doc ) {\n\t\t\t\t// mode and ERROR_MSG_KEY are only passed for the case when addsFile fails\n\t\t\t\t$this->oMainControl->addDocument( $doc, $this->mode, self::S_ERROR_MSG_KEY );\n\t\t\t}\n\t\t}\n\t}", "function Search()\n{\n\tglobal $txt, $settings, $context;\n\n\t// Search may be disabled if they're softly banned.\n\tsoft_ban('search');\n\n\t// Is the load average too high to allow searching just now?\n\tif (!empty($context['load_average']) && !empty($settings['loadavg_search']) && $context['load_average'] >= $settings['loadavg_search'])\n\t\tfatal_lang_error('loadavg_search_disabled', false);\n\n\tloadLanguage('Search');\n\tloadTemplate('Search');\n\n\t// Popup mode?\n\tif (AJAX)\n\t{\n\t\twetem::load('search_ajax');\n\t\treturn;\n\t}\n\n\t// Check the user's permissions.\n\tisAllowedTo('search_posts');\n\n\t// Link tree....\n\t// !!! If we've come back here because of an error, we're going to have: Site > Search > Search Results > Search in the linktree. Is this what we want?\n\tadd_linktree($txt['search'], '<URL>?action=search');\n\n\t// This is hard coded maximum string length.\n\t$context['search_string_limit'] = 100;\n\n\t$context['require_verification'] = we::$is_guest && !empty($settings['search_enable_captcha']) && empty($_SESSION['ss_vv_passed']);\n\tif ($context['require_verification'])\n\t{\n\t\tloadSource('Subs-Editor');\n\t\t$verificationOptions = array(\n\t\t\t'id' => 'search',\n\t\t);\n\t\t$context['require_verification'] = create_control_verification($verificationOptions);\n\t\t$context['visual_verification_id'] = $verificationOptions['id'];\n\t}\n\n\t// If you got back from search2 by using the linktree, you get your original search parameters back.\n\tif (isset($_REQUEST['params']))\n\t{\n\t\t// Due to IE's 2083 character limit, we have to compress long search strings\n\t\t$temp_params = base64_decode(str_replace(array('-', '_', '.'), array('+', '/', '='), $_REQUEST['params']));\n\t\t// Test for gzuncompress failing\n\t\t$temp_params2 = @gzuncompress($temp_params);\n\t\t$temp_params = explode('|\"|', !empty($temp_params2) ? $temp_params2 : $temp_params);\n\n\t\t$context['search_params'] = array();\n\t\tforeach ($temp_params as $i => $data)\n\t\t{\n\t\t\t@list ($k, $v) = explode('|\\'|', $data);\n\t\t\t$context['search_params'][$k] = $v;\n\t\t}\n\t\tif (!empty($context['search_params']['brd']))\n\t\t\tloadSource('Search2');\n\t\t$context['search_params']['brd'] = empty($context['search_params']['brd']) ? array() : wedge_ranged_explode(',', $context['search_params']['brd']);\n\t}\n\n\tif (isset($_REQUEST['search']))\n\t\t$context['search_params']['search'] = un_htmlspecialchars($_REQUEST['search']);\n\n\tif (isset($context['search_params']['search']))\n\t\t$context['search_params']['search'] = westr::htmlspecialchars($context['search_params']['search']);\n\tif (isset($context['search_params']['userspec']))\n\t\t$context['search_params']['userspec'] = htmlspecialchars($context['search_params']['userspec']);\n\tif (!empty($context['search_params']['searchtype']))\n\t\t$context['search_params']['searchtype'] = 2;\n\tif (!empty($context['search_params']['minage']))\n\t\t$context['search_params']['minage'] = (int) $context['search_params']['minage'];\n\tif (!empty($context['search_params']['maxage']))\n\t\t$context['search_params']['maxage'] = (int) $context['search_params']['maxage'];\n\n\t$context['search_params']['show_complete'] = !empty($context['search_params']['show_complete']);\n\t$context['search_params']['subject_only'] = !empty($context['search_params']['subject_only']);\n\n\t// Load the error text strings if there were errors in the search.\n\tif (!empty($context['search_errors']))\n\t{\n\t\tloadLanguage('Errors');\n\t\t$context['search_errors']['messages'] = array();\n\t\tforeach ($context['search_errors'] as $search_error => $dummy)\n\t\t{\n\t\t\tif ($search_error === 'messages')\n\t\t\t\tcontinue;\n\n\t\t\t$context['search_errors']['messages'][] = $txt['error_' . $search_error];\n\t\t}\n\t}\n\n\t// Find all the boards this user is allowed to see.\n\t$request = wesql::query('\n\t\tSELECT b.id_cat, c.name AS cat_name, b.id_board, b.name, b.child_level\n\t\tFROM {db_prefix}boards AS b\n\t\t\tLEFT JOIN {db_prefix}categories AS c ON (c.id_cat = b.id_cat)\n\t\tWHERE {query_see_board}\n\t\t\tAND redirect = {string:empty_string}\n\t\tORDER BY b.board_order',\n\t\tarray(\n\t\t\t'empty_string' => '',\n\t\t)\n\t);\n\t$context['num_boards'] = wesql::num_rows($request);\n\t$context['boards_check_all'] = true;\n\t$context['categories'] = array();\n\twhile ($row = wesql::fetch_assoc($request))\n\t{\n\t\t// This category hasn't been set up yet...\n\t\tif (!isset($context['categories'][$row['id_cat']]))\n\t\t\t$context['categories'][$row['id_cat']] = array(\n\t\t\t\t'id' => $row['id_cat'],\n\t\t\t\t'name' => $row['cat_name'],\n\t\t\t\t'boards' => array()\n\t\t\t);\n\n\t\t// Set this board up, and let the template know when it's a child, so it can indent them.\n\t\t$context['categories'][$row['id_cat']]['boards'][$row['id_board']] = array(\n\t\t\t'id' => $row['id_board'],\n\t\t\t'name' => $row['name'],\n\t\t\t'child_level' => $row['child_level'],\n\t\t\t'selected' => (empty($context['search_params']['brd']) && (empty($settings['recycle_enable']) || $row['id_board'] != $settings['recycle_board']) && !in_array($row['id_board'], we::$user['ignoreboards'])) || (!empty($context['search_params']['brd']) && in_array($row['id_board'], $context['search_params']['brd']))\n\t\t);\n\n\t\t// If a board wasn't checked that probably should have been, ensure the board selection is selected!\n\t\tif (!$context['categories'][$row['id_cat']]['boards'][$row['id_board']]['selected'] && (empty($settings['recycle_enable']) || $row['id_board'] != $settings['recycle_board']))\n\t\t\t$context['boards_check_all'] = false;\n\t}\n\twesql::free_result($request);\n\n\t// Now, let's sort the list of categories into the boards for templates that like that.\n\t$temp_boards = array();\n\tforeach ($context['categories'] as $category)\n\t{\n\t\t$temp_boards[] = array(\n\t\t\t'name' => $category['name'],\n\t\t\t'child_ids' => array_keys($category['boards'])\n\t\t);\n\t\t$temp_boards = array_merge($temp_boards, array_values($category['boards']));\n\n\t\t// Include a list of boards per category for easy toggling.\n\t\t$context['categories'][$category['id']]['child_ids'] = array_keys($category['boards']);\n\t}\n\n\t$max_boards = ceil(count($temp_boards) / 2);\n\tif ($max_boards == 1)\n\t\t$max_boards = 2;\n\n\t// Now, alternate them so they can be shown left and right ;).\n\t$context['board_columns'] = array();\n\tfor ($i = 0; $i < $max_boards; $i++)\n\t{\n\t\t$context['board_columns'][] = $temp_boards[$i];\n\t\tif (isset($temp_boards[$i + $max_boards]))\n\t\t\t$context['board_columns'][] = $temp_boards[$i + $max_boards];\n\t\telse\n\t\t\t$context['board_columns'][] = array();\n\t}\n\n\tif (!empty($_REQUEST['topic']))\n\t{\n\t\t$context['search_params']['topic'] = (int) $_REQUEST['topic'];\n\t\t$context['search_params']['show_complete'] = true;\n\t}\n\tif (!empty($context['search_params']['topic']))\n\t{\n\t\t$context['search_params']['topic'] = (int) $context['search_params']['topic'];\n\n\t\t$context['search_topic'] = array(\n\t\t\t'id' => $context['search_params']['topic'],\n\t\t\t'href' => '<URL>?topic=' . $context['search_params']['topic'] . '.0',\n\t\t);\n\n\t\t$request = wesql::query('\n\t\t\tSELECT ms.subject\n\t\t\tFROM {db_prefix}topics AS t\n\t\t\t\tINNER JOIN {db_prefix}boards AS b ON (b.id_board = t.id_board)\n\t\t\t\tINNER JOIN {db_prefix}messages AS ms ON (ms.id_msg = t.id_first_msg)\n\t\t\tWHERE t.id_topic = {int:search_topic_id}\n\t\t\t\tAND {query_see_board}\n\t\t\t\tAND {query_see_topic}\n\t\t\tLIMIT 1',\n\t\t\tarray(\n\t\t\t\t'search_topic_id' => $context['search_params']['topic'],\n\t\t\t)\n\t\t);\n\n\t\tif (wesql::num_rows($request) == 0)\n\t\t\tfatal_lang_error('topic_gone', false);\n\n\t\tlist ($context['search_topic']['subject']) = wesql::fetch_row($request);\n\t\twesql::free_result($request);\n\n\t\t$context['search_topic']['link'] = '<a href=\"' . $context['search_topic']['href'] . '\">' . $context['search_topic']['subject'] . '</a>';\n\t}\n\n\t$context['page_title'] = $txt['search'];\n}", "function getSearchResults($mediaSourcePath, $relPath, $query, $recurse)\n{\n\t$relPath = normalisePath($relPath);\n\t$path = $mediaSourcePath.\"/\".$relPath.\"/\";\n\n\tif(!is_dir($path))\n\t{\t\n\t\treportError(\"path is not a directory: \".$path, 400);\n\t\treturn false;\n\t}\n\t\n\t$fileResults = array();\n\t$dirResults = array();\n\t\n\t$dirHandle = opendir($path);\n\t\n\t//loop through all \"files\" in the dir\n\twhile($dirHandle && ($FSObj = readdir($dirHandle)) !== false)\n\t{\n\t\t$filepath = $path.$FSObj;\n\t\t\n\t\t//handle directories in current dir\n\t\tif(is_dir($filepath) && $FSObj != \".\" && $FSObj != \"..\") \n\t\t{\n\t\t\tif($recurse)// recurse into subdirs\n\t\t\t{\n\t\t\t\t$subResults = getSearchResults($mediaSourcePath, $relPath.\"/\".$FSObj, $query, $recurse); // do subdir search\n\t\t\t\t\n\t\t\t\t// merge sub-file and sub-directory results into our local results array\n\t\t\t\t$dirResults = array_merge($dirResults, $subResults[\"dirs\"]);\n\t\t\t\t$fileResults = array_merge($fileResults, $subResults[\"files\"]);\n\t\t\t}\n\t\t\t// after recursing, check the dir name for match against query\n\t\t\tif(stristr($FSObj, $query) !== false)\n\t\t\t{\n\t\t\t\t//add it to results if it matched\n\t\t\t\t$dirResults[] = array( \n\t\t\t\t\t\"path\"\t=> $relPath,\n\t\t\t\t\t\"name\"\t=> $FSObj,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t//handle files in current dir\n\t\telseif(is_file($filepath)) \n\t\t{\t//match filename against query\n\t\t\tif(stristr($FSObj, $query) !== false)\n\t\t\t{\n\t\t\t\t//add to result set\n\t\t\t\t$fileResults[] = array(\n\t\t\t\t\t\"path\" \t=> $relPath,\n\t\t\t\t\t\"fileObject\" => getFileObject($filepath),\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\t$dirHandle && closedir($dirHandle);\t\n\treturn array(\"dirs\" => $dirResults, \"files\" => $fileResults);\n}", "function testFindSearchcontentSco() {\n\t}", "function run_search_maintain($fromIndexer = false) {\r\n\tif(SERIA_COMPATIBILITY >= 3) return;\r\n\ttry\r\n\t{\r\n\t\tif(start_maintain(\"search_maintain\", SERIA_INSTALL||SERIA_DEBUG?1:60))\r\n\t\t{\r\n\t\t\tinclude_once(dirname(__FILE__).\"/maintain/search_maintain.php\");\r\n\t\t\tSERIA_Base::debug(\"Search maintain: \".search_maintain($fromIndexer));\r\n\t\t\tstop_maintain(\"search_maintain\");\r\n\t\t}\r\n\t}\r\n\tcatch (Exception $e)\r\n\t{\r\n\t\tSERIA_Base::debug(\"Error: \".$e->getMessage());\r\n\t\tstop_maintain(\"search_maintain\");\r\n\t\tthrow $e;\r\n\t}\r\n}", "function scanDir() {\r\n $returnArray = array();\r\n \r\n if ($handle = opendir($this->uploadDirectory)) {\r\n \r\n while (false !== ($file = readdir($handle))) {\r\n if (is_file($this->uploadDirectory.\"/\".$file)) {\r\n $returnArray[] = $file;\r\n }\r\n }\r\n \r\n closedir($handle);\r\n }\r\n else {\r\n die(\"<b>ERROR: </b> No se puede leer el directorio <b>\". $this->uploadDirectory.'</b>');\r\n }\r\n return $returnArray; \r\n }", "public function getDefaultIndexDirectoryPath();" ]
[ "0.7856435", "0.7526942", "0.6122159", "0.61114746", "0.60262454", "0.59891254", "0.58569324", "0.5847987", "0.582122", "0.58177185", "0.58087236", "0.5745908", "0.57202494", "0.5702491", "0.5669456", "0.5634786", "0.56143713", "0.5592482", "0.55711865", "0.5551054", "0.5540601", "0.54777735", "0.54679066", "0.5465722", "0.54523486", "0.54522336", "0.545068", "0.5450039", "0.5450039", "0.5443696", "0.54075855", "0.5386398", "0.5386398", "0.5378917", "0.536304", "0.5356087", "0.5339754", "0.5329766", "0.5324381", "0.5318922", "0.5314151", "0.5313711", "0.5299859", "0.5273109", "0.52721506", "0.5223148", "0.5192722", "0.5183534", "0.51781136", "0.5173183", "0.5164216", "0.5155431", "0.5126271", "0.51214105", "0.5119218", "0.5112971", "0.5112971", "0.51117325", "0.51117325", "0.51117325", "0.5111688", "0.5099847", "0.507939", "0.5072502", "0.5072207", "0.506749", "0.5060909", "0.50439084", "0.50406545", "0.50376195", "0.5031618", "0.5026476", "0.50246644", "0.50226617", "0.5001214", "0.49984446", "0.49830672", "0.49794552", "0.49729884", "0.49708146", "0.49610335", "0.49604362", "0.4955277", "0.49455458", "0.49431124", "0.4940284", "0.49364877", "0.49354556", "0.49334976", "0.4926271", "0.49174", "0.49167418", "0.491111", "0.49096945", "0.49060497", "0.49026063", "0.4885073", "0.48820928", "0.48756877", "0.4863771" ]
0.8318728
0
Test for Directory::search_by_name() Search file 'index.php' inside the ROOT directory
Тест для Directory::search_by_name() Поиск файла 'index.php' внутри корневой директории
public function test_search_by_name() { $object = Directory::factory(ROOT); $res = $object->search_by_name('index.php'); $this->assertArrayHasKey(ROOT.DS.'index.php', $res); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_search()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search('/(index.php|.htaccess)/');\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n $this->assertArrayHasKey(ROOT.DS.'.htaccess', $res);\n }", "public function test_search_by_extension()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search_by_extension(array('php'));\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n }", "public function hasIndexDirectoryPath();", "function hasIndex($path, $filename)\n {\n $abs = $path.'\\\\'.$filename;\n\n if(file_exists($abs))\n {\n $info = pathinfo($abs);\n\n if (is_dir($abs)) {\n $dir = new DirectoryIterator($abs);\n foreach ($dir as $file) {\n if (!$file->isDot()) {\n $info = pathinfo($file);\n if ( strtolower($info['filename']) == 'index' && !$file->isDir()) { return true; } \n }\n }\n }\n else { if (strtolower($info['filename']) == 'index') { return true; } }\n }\n return false;\n }", "public function test_scan_files()\n {\n $content = array('.gitignore','.htaccess','index.php','README');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_FILES);\n \n $this->assertEquals(count($content), count($res));\n foreach($res as $path=>$dir){\n $this->assertTrue(in_array($dir->get_base_name(), $content));\n $this->assertInstanceOf('\\Kaili\\File', $dir);\n }\n }", "public function test_scan()\n {\n $content = array('.','..','application','.git','.gitignore','.htaccess','index.php','nbproject','README','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC);\n \n $output = array();\n foreach($res as $f) $output[] = $f->get_base_name();\n $this->assertEquals($content, $output);\n }", "function searchFile($directory, $file)\n{\n // Blacklisted directory names - not doing so will provoke an endless loop\n $blacklist = array ( '.idea', '.git', '.', '..');\n\n // Getting a handle on the directory\n $dir_handle = opendir($directory);\n\n // Looping on all the directorie's entry to find the right file\n while(false !== ($entry = readdir($dir_handle)))\n {\n //if($entry != '.' && $entry != '..' && $entry != '.idea' && $entry != '.git')\n if(!in_array($entry, $blacklist))\n {\n // if it's a directory - call back the same function recursively\n if(is_dir($directory. DIRECTORY_SEPARATOR .$entry))\n {\n searchFile($directory . DIRECTORY_SEPARATOR . $entry, $file);\n }\n // If it's a file, test against class name to know if it is the right file\n else if(str_replace(\".php\", \"\", $entry) == get_class_name($file))\n {\n $path = $directory . DIRECTORY_SEPARATOR . $entry;\n add_to_cache($file, $path);\n\n return;\n }\n }\n }\n\n closedir($dir_handle);\n\n\n}", "function searchFiles($search, $path, $video){\n $searchFiles = scandir($path);\n foreach($searchFiles as $sFile){\n if(($sFile!=\".\")&&($sFile!=\"..\")){\n if(is_dir($path.$sFile)){\n $search = glob($path.$sFile.'/'.$video);\n if(!empty($search)){\n return $search;\n }\n }\n }\n }\n return array('did', 'not', 'work');\n}", "function searchForFile($dir, $searchfile)\r\n{\r\n\tglobal $total_loops;\r\n\t// Make sure we do not exceed 80% memory usage. If so, return false to prevent hitting memory limit.\r\n\t// if (memory_get_usage()/1048576 > (int)ini_get('memory_limit')*0.8) return false;\r\n\t// Set max number of loops we'll do\r\n\t$max_loops = 20000;\r\n\t// Trim $dir and make sure it ends with directory separator\r\n\t$dir = rtrim(trim($dir), DS) . DS;\r\n\t// Loop through all files and subdirectories\r\n\tforeach (getDirFiles($dir) as $thisFileOrDir) \r\n\t{\r\n\t\t// Increment loop\r\n\t\t$total_loops++;\r\n\t\t// Stop if we've done over $max_loops loops and reset $total_loops for other processes\r\n\t\tif ($total_loops > $max_loops) {\r\n\t\t\t$total_loops = 0;\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// Set full path of file/dir we're looking at\r\n\t\t$fullPath = $dir.$thisFileOrDir;\r\n\t\t// If it's a file, check if it's the one we're looking for\r\n\t\tif (isFile($fullPath)) {\r\n\t\t\t// Found the file! Return the current directory.\r\n\t\t\tif ($thisFileOrDir == $searchfile) return $dir;\r\n\t\t}\r\n\t\t// If it's a directory, then recursively check all files in that subdirectory\r\n\t\telseif (is_dir($fullPath)) {\r\n\t\t\t// Get return value for this directory\r\n\t\t\t$returnedDir = searchForFile($fullPath, $searchfile);\r\n\t\t\t// If returned a filename and it matches teh search file, return the returned directory\r\n\t\t\tif ($returnedDir !== false) return $returnedDir;\r\n\t\t}\r\n\t}\r\n\t// If didn't find it, return false\r\n\treturn false;\r\n}", "public function testFind()\n {\n $stack = Solar::factory('Solar_Path_Stack');\n \n // now reset the include_path\n $old_path = set_include_path($this->_support_path);\n \n // use the testing directory to look for files\n $path = array(\n \"a\",\n \"b\",\n \"c\",\n );\n \n $stack->add($path[0]);\n $stack->add($path[1]);\n $stack->add($path[2]);\n \n // should find it at a\n $actual = $stack->find('target1');\n $expect = Solar_Dir::fix($path[0]) . 'target1';\n $this->assertSame($expect, $actual);\n \n // should find it at b\n $actual = $stack->find('target2');\n $expect = Solar_Dir::fix($path[1]) . 'target2';\n $this->assertSame($expect, $actual);\n \n // should find it at c\n $actual = $stack->find('target3');\n $expect = Solar_Dir::fix($path[2]) . 'target3';\n $this->assertSame($expect, $actual);\n \n // should not find it at all\n $actual = $stack->find('no_such_file');\n $this->assertFalse($actual);\n \n // put the include_path back\n set_include_path($old_path);\n }", "public function hasDefaultIndexDirectoryPath();", "function _ft_search_find_files($dir, $q){\r\n\t$output = array();\r\n\tif (ft_check_dir($dir) && $dirlink = @opendir($dir)) {\r\n\t\twhile(($file = readdir($dirlink)) !== false){\r\n\t\t\tif($file != \".\" && $file != \"..\" && ((ft_check_file($file) && ft_check_filetype($file)) || (is_dir($dir.\"/\".$file) && ft_check_dir($file)))){\r\n\t\t\t\t$path = $dir.'/'.$file;\r\n\t\t\t\t// Check if filename/directory name is a match.\r\n\t\t\t\tif(stristr($file, $q)) {\r\n\t\t\t\t\t$new['name'] = $file;\r\n\t\t\t\t\t$new['shortname'] = ft_get_nice_filename($file, 20);\r\n\t\t\t\t\t$new['dir'] = substr($dir, strlen(ft_get_root()));\r\n\t\t\t\t\tif (is_dir($path)) {\r\n if (ft_check_dir($path)) {\r\n \t\t\t\t\t\t$new['type'] = \"dir\";\t\t\t\t\t \r\n \t\t\t\t\t$output[] = $new;\r\n }\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t $new['type'] = \"file\";\r\n \t\t\t\t\t$output[] = $new;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Check subdirs for matches.\r\n\t\t\t\tif(is_dir($path)) {\r\n\t\t\t\t\t$dirres = _ft_search_find_files($path, $q);\r\n\t\t\t\t\tif (is_array($dirres) && count($dirres) > 0) {\r\n\t\t\t\t\t\t$output = array_merge($dirres, $output);\r\n\t\t\t\t\t\tunset($dirres);\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tsort($output);\r\n\t\tclosedir($dirlink);\r\n\t\treturn $output;\r\n\t} else {\r\n\t\treturn FALSE;\r\n\t}\r\n}", "public function test_scan_directories()\n {\n $content = array('.','..','application','.git','nbproject','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_DIRS);\n \n $this->assertEquals(count($content), count($res));\n foreach($res as $path=>$dir){\n $this->assertTrue(in_array($dir->get_base_name(), $content));\n $this->assertInstanceOf('\\Kaili\\Directory', $dir);\n }\n }", "public function getIndexDirectoryPath();", "public function testFindFiles()\n {\n\n }", "public function findFiles();", "abstract public function search($files, array $includedFiles);", "public function find($file);", "function searchFolder( $current_folder, $folder_to_find, &$matches )\n{\n if ( !( $handle = opendir( $current_folder ) ) ) die( \"Cannot open $current_folder.\" );\n\n while ( $entry = readdir( $handle ) ) {\n if ( is_dir( \"$current_folder/$entry\" ) ) {\n if ( $entry != \".\" && $entry != \"..\" ) {\n\n // This entry is a valid folder\n // If it matches our folder name, add it to the list of matches\n if ( $entry == $folder_to_find ) $matches[] = \"$current_folder/$entry\";\n\n // Search this folder\n searchFolder( \"$current_folder/$entry\", $folder_to_find, $matches );\n }\n }\n }\n closedir( $handle );\n}", "function search() {}", "function includedByAdminScript() {\n global $path_to_root_dir;\n if((eregi('index\\.php', $_SERVER['SCRIPT_NAME']) and $path_to_root_dir == \"..\")\n or(eregi('edit\\.php', $_SERVER['SCRIPT_NAME']))) \n return true;\n else {\n return false;\n }\n}", "function find_file($file) {\n if($results = glob($file)) {\n if($file = array_shift($results)) {\n return $file;\n } else {\n return false;\n }\n } else {\n return false;\n }\n}", "function searchDir($base_dir=\"./\",$p=\"\",$f=\"\",$allowed_depth=-1){\n\t$contents=array();\n\n\t# trim all input arguments for whitespace\n\t$base_dir=trim($base_dir);\n\t$p=trim($p);\n\t$f=trim($f);\n\n # if base dir is not given, use the this\n\tif($base_dir==\"\")$base_dir=\"./\";\n\n\t# if last character of basedir lacks a \"/\" then add one\n\tif(substr($base_dir,-1)!=\"/\")$base_dir.=\"/\";\n\n\t# remove the \"../\" and \"./\" directories, and trim all \"./\"\n\t$p=str_replace(array(\"../\",\"./\"),\"\",trim($p,\"./\"));\n\n\t# add the requested path to the base directory string\n\t$p=$base_dir.$p;\n\n\t#if p is not a directory, meaning it is a file, get the path to it\n\tif(!is_dir($p))$p=dirname($p);\n\n\t#if the last character of p is not a \"/\" then add one\n\tif(substr($p,-1)!=\"/\")$p.=\"/\";\n\n\t# if caps are set on allowed depth (allowed depth>-1) count the dirs\n\tif($allowed_depth>-1){\n\t\t$allowed_depth=count(explode(\"/\",$base_dir))+ $allowed_depth-1;\n\t\t$p=implode(\"/\",array_slice(explode(\"/\",$p),0,$allowed_depth));\n\t\tif(substr($p,-1)!=\"/\")$p.=\"/\";\n\t}\n\n\t# if f is empty, create an empty array, if not explode and store elements\n\t$filter=($f==\"\")?array():explode(\",\",strtolower($f));\n\n\t# store the files in the files array, and shut up while scanning\n\t$files=@scandir($p);\n\n\t# if there are no files after scan, return an empty array and the path\n\tif(!$files)return array(\"contents\"=>array(),\"currentPath\"=>$p);\n\n\t# iterate through all files found\n\tfor ($i=0;$i<count($files);$i++){\n\n\t\t# gather name and path of each file\n\t\t$fName=$files[$i];\n\t\t$fPath=$p.$fName;\n\n\t\t# check if the file is a directory and tag it as directory\n\t\t# each file is tagged as a folder by default\n\t\t$isDir=is_dir($fPath);\n\t\t$add=false;\n\t\t$fType=\"folder\";\n\n\t\t# if the file is a file\n\t\tif(!$isDir){\n\n\t\t\t# extract extension from filename\n\t\t\t$ft=strtolower(substr($files[$i],strrpos($files[$i],\".\")+1));\n\t\t\t$fType=$ft;\n\n\t\t\t# if there is anything in the filter that matches, add it\n\t\t\tif($f!=\"\"){\n\t\t\t\tif(in_array($ft,$filter))$add=true;\n\t\t\t}else{\n\t\t\t\t$add=true;\n\t\t\t}\n\t\t# if the file is a folder\n\t\t}else{\n\t\t\tif($fName==\".\")continue;\n\t\t\t$add=true;\n\n\t\t\t# filter it, and discard if bad\n\t\t\tif($f!=\"\"){\n\t\t\t\tif(!in_array($fType,$filter))$add=false;\n\t\t\t}\n\n\t\t\t# if the file is the \"..\" folder\n\t\t\tif($fName==\"..\"){\n\t\t\t\t# if we are in the base dir, no not add upper directory option\n\t\t\t\tif($p==$base_dir){\n\t\t\t\t\t$add=false;\n\t\t\t\t}else $add=true;\n\n\t\t\t\t# explode the path by path steps\n\t\t\t\t$tempar=explode(\"/\",$fPath);\n\t\t\t\t# remove last two elements, so the file references parent dir\n\t\t\t\tarray_splice($tempar,-2);\n\t\t\t\t# implode the array, to recreate the path string\n\t\t\t\t$fPath=implode(\"/\",$tempar);\n\t\t\t\t# if for some reason, this reference is shorter than basedir, deny it!\n\t\t\t\tif(strlen($fPath)<= strlen($base_dir))$fPath=\"\";\n\t\t\t}\n\t\t}\n\n\t\t# if the created fPath is non-zero, append to basedir\n\t\tif($fPath!=\"\")$fPath=substr($fPath,strlen($base_dir));\n\t\t# if approved to add, add path, name and type to contents[] array\n\t\tif($add)$contents[]=array(\"fPath\"=>$fPath,\"fName\"=>$fName,\"fType\"=>$fType);\n\t}\n\n\t# if p is shorter than base_dir, deny it! Else, cut away base_dir and use it\n\t$p=(strlen($p)<= strlen($base_dir))?$p=\"\":substr($p,strlen($base_dir));\n\t# return the final contents and its respective path\n\treturn array(\"contents\"=>$contents,\"currentPath\"=>$p);\n}", "private function searchFile( $fileName )\r\n\t{\r\n\t\t$index = -1;\r\n\t\tfor($fileIndex = 0; $fileIndex < $this->filesCollection->size(); $fileIndex++)\r\n\t\t{\r\n\t\t\tif( strcasecmp( $fileName, $this->filesCollection->get( $fileIndex )->getName( ) ) == 0 )\r\n\t\t\t{\r\n\t\t\t\t$index = $fileIndex;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $index;\r\n\t}", "static public function searchFirst($dirList)\n {\n if (!is_array($dirList))\n {\n $dirList = array($dirList);\n }\n\n // this is what we'll be adding to the search path when we're done\n $searchPathList = array();\n\n // iterate through the list of folders\n foreach ($dirList as $dir)\n {\n // get the absolute path\n $dir = realpath($dir);\n\n // remove the folder if it is already in the search list\n static::dontSearchIn($dir);\n\n // add it to the end of the new list\n $searchPathList[] = $dir;\n }\n\n // add the new list to the front of the path\n set_include_path(implode(PATH_SEPARATOR, $searchPathList) . PATH_SEPARATOR . get_include_path());\n }", "function searchDir($root,$path,&$data)\n\t{\n\t\t$full_path = $root.$path;\n\t\tif(is_dir($full_path))\n\t\t{\n\t\t\t$dp=dir($full_path);\n\t\t\twhile($file=$dp->read())\n\t\t\t{\n\t\t\t\tif($file!='.'&& $file!='..')\n\t\t\t\t{\n\t\t\t\t\tsearchDir($root,$path.'/'.$file,$data);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$dp->close();\n\t\t}\n\t\tif(is_file($full_path))\n\t\t{\n\t\t\t$data[]=$path;\n\t\t}\n\t}", "protected function getSearchPaths() {}", "public static function find($file) {\n foreach(self::$directories as $path) {\n if(file_exists($path . $file . '.php')) {\n return $path . $file . '.php';\n }\n }\n\n return false;\n }", "public function test_admin_search_keyword()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/SearchResult', 'index']);\n $this->assertResponseCode(404);\n }", "function startedIndexPhp() {return true; }", "static function AJAX_Scan() {\n\t\t$list = RecursiveScanDir(__DIR__);\n\t\tusort($list, \"strnatcasecmp\");\n\t\t\n\t\t// No files?\n\t\tif (!$list || !count($list)) die(\"No .php files located in this<br />folder and/or subfolders\");\n\t\t\n\t\t// For each file we'll present something nice\n\t\t$out = \"\";\n\t\tforeach($list as $file) {\n\t\t\t\n\t\t\t// If Mode is set to 1, we need to parse the file and check the completion\n\t\t\t$analysis = \"\";\n\t\t\tif ($_POST['Mode']) {\n\t\t\t\t$analysis = DocBlock::AnalyzeFile($file);\n\t\t\t}\n\t\t\t\n\t\t\t$out .= \"\n\t\t\t\t$analysis<a href='#' data-filename='\".rawurlencode($file).\"' class='filelink'>$file</a><br />\n\t\t\t\";\n\t\t}\n\t\t\n\t\t// Ouptut\n\t\techo $out;\n\t\t\n\t\t// Exit \"Gracefully\"\n\t\texit(0);\n\t}", "function scanDir($cfg) //$view, $tdir , $subdir='', $match)\n {\n $ff = HTML_FlexyFramework::get();\n \n $subdir = $cfg['subdir'];\n $scandir = $cfg['tdir']. (empty($subdir) ? '' : '/') . $subdir;\n \n if (in_array($subdir, $cfg['skipdir'])) {\n return array();\n }\n // skip dom_templates\n \n if (!file_exists($scandir)) {\n return array();\n }\n $dh = opendir($scandir);\n if(!$dh){\n return array(); // something went wrong!?\n }\n $ret = array();\n \n while (($fn = readdir($dh)) !== false) {\n // do we care that it will try and parse the template directory??? - not really..\n // as we are only looking for php files..\n if(empty($fn) || $fn[0] == '.'){\n continue;\n }\n \n $fullpath = $scandir.(empty($scandir) ? '' : \"/\").$fn;\n // echo \"filename: $fullpath \\n\";\n \n if (is_link($fullpath)) {\n continue;\n }\n \n if(is_dir($fullpath)){\n // then recursively call self...\n $cfg['subdir'] = $subdir . (empty($subdir) ? '' : '/') . $fn;\n $children = $this->scanDir($cfg);\n if (count($children)) {\n $ret = array_merge($ret, $children);\n \n }\n continue;\n \n }\n \n if (!preg_match($cfg['match'], $fn) || !is_file($fullpath)) {\n continue;\n }\n \n \n \n $ret[] = $subdir . (empty($subdir) ? '' : '/'). $fn; /// this used to be strtolower?? why???\n\n \n \n }\n// print_r($ret);\n \n return $ret;\n \n \n \n \n }", "function swpf_plugin_search($path) {\n\n\t$swpf_plugins = array();\n\n\t$dir = opendir ($path);\n\n\twhile ($file = readdir ($dir))\n\t{\n\t\tif (($file == \".\") or ($file == \"..\"))\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (filetype (\"$path/$file\") == \"dir\")\n\t\t{\n\t\t\t$swpf_file = \"$path/$file/swpf.php\";\n\n\t\t\tif (is_file($swpf_file)) {\n\t\t\t\trequire($swpf_file);\n\t\t\t\tif ($options) $swpf_plugins[] = $options;\n\t\t\t}\n\t\t}\n\n\t} //End of while\n\n\tclosedir($dir);\n\n\treturn $swpf_plugins;\n\n}", "function index($dir = '.') {\n\t\t$index = array();\n\t\tif ($handle = opendir($dir)) {\n\t\t\twhile (false !== ($file = readdir($handle))) {\n\t\t\t\tif ($file != \".\" && $file != \"..\") {\n\t\t\t\t\tif (isAllowedFile($dir.'/'.$file)) $index[preg_replace(\"/^\\.\\//i\",\"\",$dir.'/'.$file)] = filemtime($dir.'/'.$file);\n\t\t\t\t\telseif (is_dir($dir.'/'.$file)) $index = array_merge($index, index($dir.'/'.$file));\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($handle);\n\t\t}\n\t\treturn $index;\n\t}", "public function testRequestRootIsAndIndex() {\n\n\t\t$r1 = new Nether\\Avenue\\Router(static::$RequestData['Root']);\n\t\t$r2 = new Nether\\Avenue\\Router(static::$RequestData['Index']);\n\n\t\t(new Verify(\n\t\t\t'path / request runs as /index',\n\t\t\t$r1->GetPath()\n\t\t))->equals('/index');\n\n\t\t(new Verify(\n\t\t\t'path /index runs as /index',\n\t\t\t$r2->GetPath()\n\t\t))->equals('/index');\n\n\n\t\treturn;\n\t}", "private static function search()\r\n\t{\r\n\t\t$dir = 'plugins';\r\n\t\t// search for plugin modules in the plugins directory\t\t \r\n\t\t$modules = model_Utils_ModuleHelper::searchDirectoryForModules($dir);\r\n\t\tforeach ($modules as $module)\r\n\t\t{\r\n\t\t\t// save found module paths to the db so we can auto-load them in the future\r\n\t\t\tmodel_Utils_ModuleHelper::saveModule($module);\r\n\t\t\t// add matching paths to Kohana's module paths\t\t\r\n\t\t\tmodel_Utils_ModuleHelper::addModulePath($module);\r\n\t\t}\r\n\t\treturn Model_Admin_EventsAdmin::searchForListeners($dir,'Interface_iPCPPlugin');\t\r\n\t}", "function search()\n\t{}", "function search()\n\t{}", "public function testIndexAssetSearchByName()\n {\n // 1. Mock data\n $admin = $this->admin;\n // 2. Hit Api Endpoint\n $response = $this->actingAs($admin)->get(route('asset.index', ['name' => 'zoom']));\n // 3. Verify and Assertion\n $response->assertStatus(Response::HTTP_OK);\n }", "public function runOnDirectories(): bool;", "public function findFirstWebFolder() {}", "public function searchAction()\n {\n $user_id = $this->getSecurityContext()->getUser()->getId();\n $drive = $this->_driveHelper->getRepository()->getDriveByUserId($user_id);\n\n $q = $this->getScalarParam('q');\n // $hits = $this->getResource('drive.file_indexer')->searchInDrive($q, $drive->drive_id);\n $hits = $this->getResource('drive.file_indexer')->search($q);\n\n echo '<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />';\n echo '<strong>', $hits->hitCount, '</strong> hits<br/>';\n foreach ($hits->hits as $hit) {\n $file = $this->_driveHelper->getRepository()->getFile($hit->document->file_id);\n if (empty($file)) {\n echo 'Invalid file ID: ', $hit->document->file_id;\n }\n if ($file && $this->_driveHelper->isFileReadable($file)) {\n echo '<div>', '<strong>', $file->name, '</strong> ', $this->view->fileSize($file->size), '</div>';\n }\n }\n exit;\n }", "function DNUI_scan_dir($dirBase) {\r\n return array_diff(scandir($dirBase), array('..', '.'));\r\n}", "public function executeIndex ()\n {\n// $loader->load();\n $tree = array();\n /*$added_tests = array();\n foreach ($this->_getTests($loader->suite()) as $test) {\n $reflection = new ReflectionClass($test);\n $test = $reflection->getFileName();\n $test = substr($test, strpos($test, 'phpunit/') + 8, strlen($test));\n $path = dirname($reflection->getFileName());\n $path = substr($path, strpos($path, 'phpunit/') + 8, strlen($path));\n $path = implode('\"][\"', explode('/', $path));\n if (! in_array($test, $added_tests)) {\n eval(\"\\$tree[\\\"{$path}\\\"][] = \\$test;\");\n $added_tests[] = $test;\n }\n }*/\n $this->tree = $tree;\n \n \n $this->fixtureslist = $this->_getFixturesList();\n }", "public static function getIndexPage() {\n chdir(ROOTDIR);\n\n //FIXME: move to Request class\n $queryString = $_SERVER['REQUEST_URI'];\n $filePath = realpath(ROOTDIR . parse_url($queryString)['path']);\n\n $res = [];\n if ($filePath && is_dir($filePath)){\n // attempt to find an index file\n// function getRendererName($rendererName) { return \"index.$rendererName\";};\n $availableRenderers = array_values(array_intersect(\n Renderer::getRenderersPriority(),\n Renderer::getRenderersNames()\n ));\n// $renderers = array_map(function($rendererName) { return \"index.$rendererName\";}, $availableRenderers);\n foreach ($availableRenderers as $rname){\n if ($indexFilePath = realpath($filePath . DIRECTORY_SEPARATOR . \"index.\" . $rname)){\n $res['renderer'] = $rname;\n $res['path'] = $indexFilePath;\n break;\n }\n }\n }\n return $res;\n }", "function filewalk($file, $search, $counter, $webpath) {\n if (strtolower(substr($file, stripos($file, \".htm\"))) == \".htm\"\n || strtolower(substr($file, stripos($file, \".html\"))) == \".html\"\n || strtolower(substr($file, stripos($file, \".asp\"))) == \".asp\"\n || strtolower(substr($file, stripos($file, \".php\"))) == \".php\") {\n $all = file_get_contents($file);\n $body = substr($all, stripos($all,\"<body\"),stripos($all,\"</body>\") - stripos($all,\"<body\"));\n $body = preg_replace('/<br \\/>/i', ' ', $body);\n $body = preg_replace('/<br>/i', ' ', $body);\n $body = compress($body,\"<noscript\",\"</noscript>\");\n $body = compress($body,\"<script\",\"</script>\");\n $body = compress($body,\"<iframe\",\"</iframe>\");\n $body = compress($body,\"<noframe\",\"</noframe>\");\n $body = strip_tags($body);\n $body = html_entity_decode($body, ENT_QUOTES);\n $body = preg_replace('/\\s+/', ' ', $body);\n // Scans and displays the results\n if (stripos($body, $search)) {\n $title = substr($all, stripos($all,\"<title>\") + 7,stripos($all,\"</title>\") - stripos($all,\"<title>\") - 7);\n $title = html_entity_decode($title, ENT_QUOTES);\n $title = preg_replace('/\\s+/', ' ', $title); \n echo '<p><a style=\"color:#202073;\" href=\"' . $file . '\">' . $title . '</a></br>';\n echo '<span id=\"webpath\">' . $webpath . substr($file, stripos($file, \"/\")) . '</span><br />';\n // echo textpart($body, $search) .. '</p>';\n $counter = $counter + 1;\n }\n }\n return $counter;\n}", "public function resolve ($file, $exactMatch = false)\n {\n foreach ($this->languages as $lang)\n {\n $filename = \"$lang/$file\";\n\n // if $file is a directory, we try find an index file inside\n if (!$exactMatch && $this->directoryExists ($filename) && $this->fileExists ($filename.'/index'))\n return $filename.'/index';\n\n // if $file is a file we've got what we were searching for !\n else if ($this->fileExists ($filename))\n return $filename;\n }\n\n // If we want an exact match there is no need to continue\n if ($exactMatch)\n return null;\n\n // if we reached the documentation root dir it means that there is no documentation\n if (in_array (dirname ($file), array('.','/')) && basename ($file) == 'index')\n return null;\n\n // if we are here we didn't find a file in the current directory, let's go up !\n return $this->resolve (dirname ($this->getParentDirectory ($file)).'/index');\n }", "public function func_search() {}", "private function _htmlDir($path = '') {\n\t\tif (!$path) $path = g($this->conf, 'type');\n\t\t\n\t\t$rpath = $this->_path($path);\n\t\tif (!file_exists($rpath) || !is_dir($rpath)) return '';\n\t\t\n\t\t//AUUTO CREATE [index.html]\n\t\t$findex = $this->_sanitize($rpath.'/index.html');\n\t\tif (!file_exists($findex)) {\n\t\t\t$hnd = fopen($findex, 'w');\n\t\t\tfwrite($hnd, 'No direct access allowed');\n\t\t\tfclose($hnd);\n\t\t}\t\n\t\t\n\t\t$html = '<ul>';\n\t\t\n\t\t$hnd = opendir($rpath);\n\t\twhile ($read = readdir($hnd)) {\n\t\t\tif ($read == '.' || $read == '..') continue;\n\t\t\t\n\t\t\t$mypath = $this->_sanitize($path.'/'.$read);\n\t\t\t\n\t\t\tif (!is_dir($this->_path($mypath))) {\n\t\t\t\t\n\t\t\t\t//AUTO REMOVE UN-EXPECTED FILES\n\t\t\t\t$ext = pathinfo($mypath, PATHINFO_EXTENSION);\n\t\t\t\tif (!in_array(strtolower($ext), (array) g($this->conf, 'ext')) && $read != 'index.html') {\n\t\t\t\t\t$this->quarantine($this->_path($mypath));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//try searching for match (file type)\n\t\t\t\tif ($this->is_search && $this->_match($this->is_search, $read)) {\n\t\t\t\t\tarray_push($this->founds, [\n\t\t\t\t\t\t\t\t'type' => 'file',\n\t\t\t\t\t\t\t\t'path' => $path,\n\t\t\t\t\t\t\t\t'name' => $read\n\t\t\t\t\t\t\t\t]);\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t//try searching for match (folder type)\n\t\t\tif ($this->is_search && $this->_match($this->is_search, $read)) {\n\t\t\t\tarray_push($this->founds, [\n\t\t\t\t\t\t\t'type' => 'folder',\n\t\t\t\t\t\t\t'path' => $path,\n\t\t\t\t\t\t\t'name' => $read\n\t\t\t\t\t\t\t]);\n\t\t\t}\n\t\t\t\n\t\t\t$spath = g($this->conf, 'path'); //original path (by request)\n\t\t\t\n\t\t\t$html .= '<li '.((substr($spath.'/', 0, strlen($mypath.'/')) == $mypath.'/') ? 'class=\"active\"' : '').'>\n\t\t\t\t\t\t<a href=\"'.$this->_url(array('path' => $mypath)).'\">'.htmlspecialchars(strtolower($read)).'</a>';\n\t\t\t\n\t\t\t$html .= $this->_htmlDir($mypath);\n\t\t\t$html .= '</li>';\n\t\t}\n\t\tclosedir($hnd);\n\t\t\n\t\t$html .= '</ul>';\n\t\t\n\t\treturn (string) $html;\n\t}", "function grep($path, $pattern, &$results)\n{\n // find all files in the path (incl folders)\n $items = glob($path . '/*'); // */\n\n for ($i = 0; $i < count($items); $i++)\n {\n if (is_dir($items[$i]))\n {\n $add = glob($items[$i] . '/*'); // */\n $items = array_merge($items, $add);\n }\n }\n\n // search through the files.\n $results = array();\n foreach($items as $f)\n {\n if (filetype($f) == 'file')\n {\n if (preg_match($pattern, file_get_contents($f), $matches))\n $results = array_merge($results, $matches);\n }\n }\n\n return (count($results) > 0);\n}", "public static function find($file) {\n\t\tforeach(static::$directories as $path) {\n\t\t\tif(is_readable($path . $file . '.php')) {\n\t\t\t\treturn $path . $file . '.php';\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public function search($key)\n {\n return $this->root->search($key);\n }", "public function actionIndexFiles()\n {\n $manager = new Manager(['module' => $this->module]);\n $manager->indexAll();\n }", "public function getTestDirectory();", "public function searchDir($dir) {\r\n\t\t$pages = array();\r\n\t\t// array to hold directories to recurse into\r\n\t\t$dirs = array();\r\n\t\t// mark this directory as seen so we don't look in it again\r\n\t\t$this->seen[realpath($dir)] = true;\r\n\t\t\r\n\t\ttry {\r\n\t\t\tforeach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir)) as $file) {\r\n\t\t\t\tif($file->isFile() && $file->isReadable() && (!isset($this->seen[$file->getPathname()]))) {\r\n\t\t\t\t\t/*mark this as seen so we skip it if we come to it again*/\r\n\t\t\t\t\t$this->seen[$file->getPathname()] = true;\r\n\t\t\t\t\t// load the contents of the file into $text\r\n\t\t\t\t\t$text = file_get_contents($file->getPathname());\r\n\t\t\t\t\t\r\n\t\t\t\t\t// if the search term is inside the body delimiters\r\n\t\t\t\t\tif(preg_match($this->bodyRegex, $text)) {\r\n\t\t\t\t\t\t/*construct the relative URI of the file by removing\r\n\t\t\t\t\t\tthe document root from the full path*/\r\n\t\t\t\t\t\t$uri = substr_replace($file->getPathname(), '', 0, strlen($_SERVER['DOCUMENT_ROOT']));\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t// if the page has a title, find it\r\n\t\t\t\t\tif(preg_match('#<title>(.*?)</title>#Sis', $text, $match)) {\r\n\t\t\t\t\t\t// and add the title and URI to $pages\r\n\t\t\t\t\t\tarray_push($pages, array($uri, $match[1]));\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tarray_push($pages, array($uri, $uri));\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch(Exception $e) {\r\n\t\t\t// There was a problem opening the directory\r\n\t\t}\r\n\t\t\r\n\t\treturn $pages;\r\n\t}", "public function search();", "public function search();", "public static function searchDirectory($path, $file = '')\n {\n $incpath = explode(PATH_SEPARATOR, get_include_path());\n\n for ($i = 0; $i < count($incpath); $i++)\n {\n if (is_dir($incpath[$i] . '/' . $path)) {\n set_include_path(get_include_path() . PATH_SEPARATOR . $incpath[$i] . '/' . $path. '/');\n return true;\n }\n\n // also try plurals\n if (is_dir($incpath[$i] . '/' . $path . 's/')) {\n set_include_path(get_include_path() . PATH_SEPARATOR . $incpath[$i] . '/' . $path. 's/');\n return true;\n }\n }\n\n return false;\n }", "public static function search($dir, $file, $ext = 'php', $multiple = false, $cache = true)\n\t{\n\t\t$finder = static::forge(array($dir), trim($ext, '.'));\n\n\t\tif (($result = $finder->findCached($multiple?'all':'one', $file)) === null)\n\t\t{\n\t\t\t$result = $multiple ? $finder->findAll($file, false, false, 'file') : $finder->find($file, false, false, 'file');\n\t\t}\n\n\t\tif ($cache and $result)\n\t\t{\n\t\t\t$finder->cache($multiple?'all':'one', $file, false, $result, array($dir));\n\t\t}\n\n\t\treturn $result;\n\t}", "public function getSearchDir() {\r\n\t\treturn $this->searchDir;\r\n\t}", "public function test_admin_search_keyword_b()\n {\n $this->request('GET', ['pages/SearchResult', 'index']);\n $this->assertResponseCode(404);\n }", "public function testIndex()\n {\n $this->getBrowser()->\n getAndCheck('partenaire', 'index', '/partenaire/index', 404)\n ;\n }", "public function run()\r\r\n\t{\r\r\n\t\t$arrPages = array();\r\r\n\t\t$strCache = md5('search_index' . session_id());\r\r\n\r\r\n\t\t// Get cache file\r\r\n\t\tif (file_exists(TL_ROOT . '/system/tmp/' . $strCache))\r\r\n\t\t{\r\r\n\t\t\t$objFile = new File('system/tmp/' . $strCache);\r\r\n\r\r\n\t\t\tif ($objFile->mtime < time() + 3600)\r\r\n\t\t\t{\r\r\n\t\t\t\t$arrPages = deserialize($objFile->getContent());\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\r\r\n\t\t// Get all searchable pages\r\r\n\t\tif (count($arrPages) < 1)\r\r\n\t\t{\r\r\n\t\t\t$arrPages = $this->getSearchablePages();\r\r\n\r\r\n\t\t\t// HOOK: take additional pages\r\r\n\t\t\tif (array_key_exists('getSearchablePages', $GLOBALS['TL_HOOKS']) && is_array($GLOBALS['TL_HOOKS']['getSearchablePages']))\r\r\n\t\t\t{\r\r\n\t\t\t\tforeach ($GLOBALS['TL_HOOKS']['getSearchablePages'] as $callback)\r\r\n\t\t\t\t{\r\r\n\t\t\t\t\t$this->import($callback[0]);\r\r\n\t\t\t\t\t$arrPages = $this->$callback[0]->$callback[1]($arrPages);\r\r\n\t\t\t\t}\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\t$objFile = new File('system/tmp/' . $strCache);\r\r\n\t\t\t$objFile->write(serialize($arrPages));\r\r\n\t\t\t$objFile->close();\r\r\n\t\t}\r\r\n\r\r\n\t\t$intStart = $this->Input->get('start') ? $this->Input->get('start') : 0;\r\r\n\t\t$intPages = $this->Input->get('ppc') ? $this->Input->get('ppc') : 10;\r\r\n\r\r\n\t\t// Rebuild search index\r\r\n\t\tif ($intPages && count($arrPages))\r\r\n\t\t{\r\r\n\t\t\t$this->import('Search');\r\r\n\r\r\n\t\t\tif ($intStart < 1)\r\r\n\t\t\t{\r\r\n\t\t\t\t$this->Database->execute(\"TRUNCATE TABLE tl_search\");\r\r\n\t\t\t\t$this->Database->execute(\"TRUNCATE TABLE tl_search_index\");\r\r\n\t\t\t\t$this->Database->execute(\"TRUNCATE TABLE tl_cache\");\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\techo '<div style=\"font-family:Verdana, sans-serif; font-size:11px; line-height:16px; margin-bottom:12px;\">';\r\r\n\r\r\n\t\t\tfor ($i=$intStart; $i<$intStart+$intPages && $i<count($arrPages); $i++)\r\r\n\t\t\t{\r\r\n\t\t\t\techo 'File <strong>' . $arrPages[$i] . '</strong> has been indexed<br />';\r\r\n\r\r\n\t\t\t\t$objRequest = new Request();\r\r\n\t\t\t\t$objRequest->send($this->Environment->base . $arrPages[$i]);\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\techo '<div style=\"margin-top:12px;\">';\r\r\n\r\r\n\t\t\t// Redirect to the next cycle\r\r\n\t\t\tif ($i < (count($arrPages) - 1))\r\r\n\t\t\t{\r\r\n\t\t\t\t$url = $this->Environment->base . 'typolight/indexer.php?start=' . ($intStart + $intPages) . '&ppc=' . $intPages;\r\r\n\r\r\n\t\t\t\techo '<script type=\"text/javascript\">setTimeout(\\'window.location=\"' . $url . '\"\\', 1000);</script>';\r\r\n\t\t\t\techo '<a href=\"' . $url . '\">Please click here to proceed if you are not using JavaScript</a>';\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\t// Redirect back home\r\r\n\t\t\telse\r\r\n\t\t\t{\r\r\n\t\t\t\t$url = $this->Environment->base . 'typolight/main.php?do=maintenance';\r\r\n\r\r\n\t\t\t\t// Delete temporary file\r\r\n\t\t\t\t$objFile = new File('system/tmp/' . $strCache);\r\r\n\t\t\t\t$objFile->delete();\r\r\n\t\t\t\t$objFile->close();\r\r\n\r\r\n\t\t\t\techo '<script type=\"text/javascript\">setTimeout(\\'window.location=\"' . $url . '\"\\', 1000);</script>';\r\r\n\t\t\t\techo '<a href=\"' . $url . '\">Please click here to proceed if you are not using JavaScript</a>';\r\r\n\t\t\t}\r\r\n\r\r\n\t\t\techo '</div></div>';\r\r\n\t\t}\r\r\n\t}", "function on_page($page,$partial_match = false) {\n if(!is_array($page)) {\n $page = array($page);\n }\n $current_page = substr($_SERVER['SCRIPT_FILENAME'],\n strpos($_SERVER['SCRIPT_FILENAME'], PMDROOT) + strlen(PMDROOT)\n );\n foreach($page AS $name) {\n if($partial_match) {\n if(strstr($current_page,$name)) {\n return true;\n }\n } elseif(ltrim($name,'/') == ltrim($current_page,'/')) {\n return true;\n }\n }\n return false;\n}", "public static function find($name);", "public static function find($name);", "public function esiste($file){\n\t\tif($file[0]!=='/') $file='/'.$file;\n\t\tif(file_exists($_SERVER['DOCUMENT_ROOT'].$file)){\n\t\t\treturn TRUE;\n\t\t}else{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "public function addIndexPhp ($sCurrentFolder = null) {\n $iCount = 0;\n if ($sCurrentFolder === null) {\n $sCurrentFolder = $this->getPath('staging').'/__plugin';\n }\n if (!file_exists($sCurrentFolder.'/index.php')) {\n $iCount ++;\n MLHelper::getFilesystemInstance()->write(\n $sCurrentFolder.'/index.php', \n \"<?php\\n\" .\n \"header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');\\n\".\n \"header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');\\n\" .\n \"header('Cache-Control: no-store, no-cache, must-revalidate');\\n\" .\n \"header('Cache-Control: post-check=0, pre-check=0', false);\\n\" .\n \"header('Pragma: no-cache');\\n\" .\n \"header('Location: ../');\\n\" .\n \"exit;\\n\"\n );\n }\n foreach (MLFilesystem::gi()->glob($sCurrentFolder.'/*', GLOB_ONLYDIR) as $sSubFolder) {\n $iCount += $this->addIndexPhp($sSubFolder);\n }\n return $iCount;\n }", "public function getDefaultIndexDirectoryPath();", "public function testSearchMods()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "protected function getFileIndexRepository() {}", "protected function getFileIndexRepository() {}", "protected function getFileIndexRepository() {}", "protected function getFileIndexRepository() {}", "protected function getFileIndexRepository() {}", "function findWebloc($path) {\n\t$retval = false;\n\n\t$dir = opendir($path);\n\tif ($dir === FALSE) {\n\t\tdie('Unable to opendir(): ' . htmlspecialchars($path) . \"\\n\");\n\t}\n\twhile (false !== ($name = readdir($dir))) {\n\n\t\t# Skip junk\n\t\tif (isJunk($name)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t# We only care about *.webloc files\n\t\tif (!preg_match('/\\.webloc$/', $name)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t# The file must be readable to be useful\n\t\t$file = $path . '/' . $name;\n\t\tif (is_readable($file)) {\n\t\t\t$retval = $file;\n\t\t\tlast;\n\t\t}\n\t}\n\tclosedir($dir);\n\n\treturn $retval;\n}", "public function find($name)\n {\n if (isset($this->fileNames[$name])) {\n return $this->fileNames[$name];\n }\n\n $result = self::hasNamespace($name = trim($name))\n ? $this->findInNamespace($name)\n : $this->findInPaths($name, $this->paths);\n\n // No exceptions, so we found the file. Cache the filename and return it.\n return $this->fileNames[$name] = $result;\n }", "function is_search()\n {\n }", "public function test_default_search_dir_is_config()\n {\n $reader = new Bootphp_Config_File_Reader;\n\n $this->assertAttributeSame('config', '_directory', $reader);\n }", "function get_subj_index($data_dir) {\n $filename = SUBJ_IDX_INDEX_NAME . '.idx';\n if (is_dir($data_dir)) {\n $index_file = $data_dir . '/' . $filename;\n } else {\n $index_file = SUBJ_IDX_DEFAULT_DIR . $filename;\n }\n // create if missing\n if ( ! is_file($index_file)) {\n fclose(fopen($index_file, 'w'));\n }\n return $index_file;\n}", "public function run() {\r\n\t\t$i = 1;\r\n\t\twhile ($i < self::NBR_OF_FILES) {\r\n\t\t\t$this->explore_path[0] = $this->get_path(0, $i);\r\n\t\t\t$j = 0;\r\n\t\t\twhile ($j < self::NBR_OF_FILES) {\r\n\t\t\t\t$this->explore_path[1] = $this->get_path(1, $j);\r\n\t\t\t\t$k = 0;\r\n\t\t\t\twhile ($k < self::NBR_OF_FILES) {\r\n\t\t\t\t\t$this->explore_path[2] = $this->get_path(2, $k);\r\n\t\t\t\t\tif (is_numeric(file_get_contents(self::FULL_URL.implode(\"\", $this->explore_path).'README')[0])) {\r\n\t\t\t\t\t\techo \"flag : \".file_get_contents(self::FULL_URL.implode(\"\", $this->explore_path).'README'). \"was found at path \".self::FULL_URL.implode(\"\", $this->explore_path);\r\n\t\t\t\t\t\treturn (0);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$k++;\r\n\t\t\t\t}\r\n\t\t\t\t$j++;\r\n\t\t\t}\r\n\t\t\t$i++;\r\n\t\t}\r\n\t}", "private function checkFile()\n {\n $absDir = DIRREQ.$this->dir;\n if (file_exists($absDir.$this->file.'.php')) {\n $this->page = $absDir.$this->file.'.php';\n } elseif (file_exists($absDir.'index.php')) {\n $this->page = $absDir.'index.php';\n } else {\n $this->page = DIRREQ.'views/404.php'; \n }\n }", "abstract public function directoryLocation();", "public function testReadingFiles()\n {\n $dir = __DIR__;\n $f = $this->adapter->java('java.io.File', $dir);\n $paths = $f->listFiles();\n foreach ($paths as $path) {\n self::assertFileExists((string) $path);\n }\n }", "public function testMediaFilesSearchGet()\n {\n $client = static::createClient();\n\n $path = '/media/files/search';\n\n $crawler = $client->request('GET', $path);\n }", "public function search()\n\t{\n\t\t\n\t}", "public function testMatchesFilesWithEngineOnRegistry()\n {\n $filePrefix = '/foo/Namespace/Representation/FooResource.POST.xml';\n $foundFiles = array($filePrefix . '.php', $filePrefix . '.foo');\n $engine = $this->quickMock('Asar\\Template\\Engine\\EngineInterface');\n\n $this->registry->register('foo', $engine);\n\n $assembly = $this->commonFindingTemplate(array(\n 'resourceName' => $this->resourceName,\n 'options' => array('type' => 'xml', 'method' => 'POST', 'status' => 200),\n 'foundFiles' => $foundFiles\n ));\n $this->assertEquals($engine, $assembly->getEngine());\n }", "function find_file($filename, $required = true)\n\t{\n\t\t$file_locations = array($filename);\n\t\t\n\t\t// check system folder first\n\t\t\n\t\tforeach($file_locations as $file) {\n\t\t\t$file .= '.php';\n\t\t\tif (file_exists(APP_PATH . $file))\n\t\t\t\treturn APP_PATH . $file;\n\t\t}\n\t\t\n\t\t// then check app folder\n\t\t\n\t\tforeach($file_locations as $file) {\n\t\t\t$file .= '.php';\n\t\t\tif (file_exists(SYS_PATH . $file))\n\t\t\t\treturn SYS_PATH . $file;\n\t\t}\n\t\t\n\t\tif ($required)\n\t\t\tthrow new Exception(\"File ($file) does not exist\");\n\t\treturn false;\n\t}", "public function locate();", "function dir_tree($dir,$search_string=\"0000\") {\r\n global $debug_jon,$dir_to_search;\r\n if($string_to_search==\"000\") return \"NoFile\";\r\n $path = '';\r\n $stack[] = $dir;\r\n while ($stack) {\r\n $thisdir = array_pop($stack);\r\n if ($dircont = scandir($thisdir)) {\r\n $i=0;\r\n while (isset($dircont[$i])) {\r\n if ($dircont[$i] !== '.' && $dircont[$i] !== '..') {\r\n $current_file = \"{$thisdir}/{$dircont[$i]}\";\r\n\t\t\t\t \r\n if (is_file($current_file)) {\r\n\t\t\t\t\t\t//$current_file=mb_convert_encoding($current_file,\"utf8\",\"8859-1\");\r\n\t\t\t\t\t\t$current_file= iconv( \"iso-8859-7\",\"utf-8\", $current_file );\r\n\t\t\t\t\t\t$dircont[$i]= iconv( \"iso-8859-7\",\"utf-8\", $dircont[$i] );\r\n\t\t\t\t\t if (strpos($current_file,$search_string)) {\r\n\t\t\t\t\t\t\t\techo \"<h3><a href='$current_file' target=_blank >$dircont[$i]</a></h3>\";\r\n\t\t\t\t\t\t\t\t//if($debug_jon) \r\n\t\t\t\t\t\t\t\t//echo \"<h2>smartDOWNLOADFILE ONLY<a href='../$dir_to_search/download.php?f=\". urlencode(\"$current_file\").\"' target=_blank >$dircont[$i]</a></h2>\";\r\n\t\t\t\t\t\t}\t\t\t\t \r\n $path[] = \"{$thisdir}/{$dircont[$i]}\";\r\n\t\t\t\t\t \r\n } elseif (is_dir($current_file)) {\r\n $path[] = \"{$thisdir}/{$dircont[$i]}\";\r\n $stack[] = $current_file;\r\n }\r\n }\r\n $i++;\r\n }\r\n }\r\n }\r\n return $path;\r\n}", "function find($dir, $pattern){\n // escape any character in a string that might be used to trick\n // a shell command into executing arbitrary commands\n $dir = escapeshellcmd($dir);\n // get a list of all matching files in the current directory\n $files = glob(\"$dir/$pattern\");\n // find a list of all directories in the current directory\n // directories beginning with a dot are also included\n foreach (glob(\"$dir/{.[^.]*,*}\", GLOB_BRACE|GLOB_ONLYDIR) as $sub_dir){\n $arr = find($sub_dir, $pattern); // resursive call\n $files = array_merge($files, $arr); // merge array with files from subdirectory\n }\n // return all found files\n return $files;\n}", "public function uses_file_indexing() {\n return true;\n }", "function _load($name, $_page=[]){\n if(strpos($name, '.php') === false)\n\t include_once(ROOT.\"/html/$name/.index.php\");\n else\n include_once(ROOT.\"/html/$name\");\n}", "function searchForAny($source,$search)(\n if(strpos($source,$search) !== FALSE){\n return true;\n }", "private function recSearchFiles($dir)\n {\n $ffs = scandir($dir);\n\n foreach ($ffs as $ff) {\n\n if ($ff != '.' && $ff != '..') {\n\n if (is_dir($dir . '/' . $ff)) {\n $this->recSearchFiles($dir . $ff . '/');\n } else if (strlen($ff) >= 5) {\n $this->searchedFiles[] = $dir . $ff;\n }\n }\n }\n }", "public function locate($file, $first = true);", "private function includeAll( $path, $search ){\n\n \tforeach ( glob( $path . $search ) as $file ) {\n\t\t \n\t\t \tinclude_once $file;\n\n\t\t \t$fileParts = pathinfo($file);\n\n\t\t \t$fileFolder = $fileParts[\"filename\"];\n\n\t\t \tif(is_dir($path . $fileFolder) && is_readable($path . $fileFolder)){\n\n\t\t \t\tforeach ( glob( $path . $fileFolder . \"/\" . $search ) as $otherFile ) { \n\n\t\t \t\t\t\tinclude_once $otherFile;\n\t\t \t\t}\n\n\t\t \t}\n\n\t\t \n\t\t}\n }", "public function testFind() {\n\t\t$this->assertEquals('3.txt', $this->_object->find()->getFilename());\n\t}", "function wsod_detect_drupal_path(&$output, $start_dir = __FILE__) {\n $drupal_path = FALSE; // set init variable\n $path_arr = wsod_pathposall(dirname($start_dir));\n $bootstrap_file = '/includes/bootstrap.inc';\n $buff_output = '';\n foreach ($path_arr as $path) {\n if (file_exists($path.$bootstrap_file)) {\n $drupal_path = $path;\n return $drupal_path;\n } else {\n $buff_output .= \"Couldn't find $path$bootstrap_file!<br>\\n\";\n }\n // FIXME: file_exists() [function.file-exists]: open_basedir restriction in effect. File(//includes/bootstrap.inc) is not within the allowed path(s)\n }\n $output .= $buff_output;\n return NULL;\n}", "function testPackageIndex() {\n\t\t$result = $this->ApiPackage->getPackageIndex();\n\n\t\t$this->assertFalse(isset($result[0]['ApiClass']), 'ApiClass has snuck in, big queries are happening %s');\n\t\t$this->assertTrue(isset($result[0]['children']), 'No children, might not be a tree %s');\n\t}" ]
[ "0.7803914", "0.74054193", "0.6096329", "0.59778947", "0.59626746", "0.5898367", "0.58588976", "0.5772092", "0.57219416", "0.56567097", "0.56024987", "0.55696607", "0.5523678", "0.55153424", "0.54849744", "0.5467967", "0.5423201", "0.5414956", "0.53814286", "0.5311357", "0.5280912", "0.5272394", "0.5249707", "0.52242994", "0.51921105", "0.5186701", "0.5185987", "0.5172958", "0.51714766", "0.5167635", "0.5087272", "0.50854886", "0.5084022", "0.50565434", "0.50532657", "0.50507236", "0.50504214", "0.50504214", "0.504479", "0.50277525", "0.5018499", "0.5007424", "0.50064117", "0.50016224", "0.49939823", "0.49845394", "0.49837652", "0.49819773", "0.49769664", "0.49735433", "0.4964994", "0.49586537", "0.49424663", "0.4924515", "0.49141452", "0.490651", "0.490651", "0.49012545", "0.48916537", "0.48867452", "0.48817155", "0.48781228", "0.48770925", "0.48706478", "0.4868394", "0.4868394", "0.48654026", "0.48638743", "0.48624426", "0.4857496", "0.48514947", "0.48514947", "0.48502338", "0.48502338", "0.48502338", "0.48489234", "0.48356178", "0.48342437", "0.4832856", "0.48288974", "0.48232678", "0.48180765", "0.48115063", "0.47978356", "0.47957173", "0.47914854", "0.47898835", "0.47881967", "0.47827002", "0.47725734", "0.47691163", "0.4766129", "0.47624817", "0.4760177", "0.4759259", "0.47519475", "0.47453842", "0.47399533", "0.47301444", "0.47291973" ]
0.8326893
0
Test for Directory::search_by_extension() Search files with 'php' extension inside the ROOT directory
Тест для Directory::search_by_extension() Поиск файлов с расширением 'php' внутри директории ROOT
public function test_search_by_extension() { $object = Directory::factory(ROOT); $res = $object->search_by_extension(array('php')); $this->assertArrayHasKey(ROOT.DS.'index.php', $res); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _findExtensionFiles() {\r\n\t\r\n\t\t\tif (empty($this->_extensionsPath)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\r\n\t\t\t//make sure we only get the package files in that directory\r\n\t\t\t$zipFiles = JFolder::files($this->_extensionsPath, '\\.zip$', false, false);\r\n\t\t\t$gzFiles = JFolder::files($this->_extensionsPath, '\\.gz$', false, false);\r\n\t\t\t$bz2Fies = JFolder::files($this->_extensionsPath, '\\.bz2$', false, false);\r\n\t\t\t$files = array_merge($zipFiles, $gzFiles, $bz2Fies);\r\n\t\r\n\t\t\tif (count($files) > 0) {\r\n\t\t\t\t$this->_packageFiles = $files;\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}", "public function test_search()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search('/(index.php|.htaccess)/');\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n $this->assertArrayHasKey(ROOT.DS.'.htaccess', $res);\n }", "function _ft_search_find_files($dir, $q){\r\n\t$output = array();\r\n\tif (ft_check_dir($dir) && $dirlink = @opendir($dir)) {\r\n\t\twhile(($file = readdir($dirlink)) !== false){\r\n\t\t\tif($file != \".\" && $file != \"..\" && ((ft_check_file($file) && ft_check_filetype($file)) || (is_dir($dir.\"/\".$file) && ft_check_dir($file)))){\r\n\t\t\t\t$path = $dir.'/'.$file;\r\n\t\t\t\t// Check if filename/directory name is a match.\r\n\t\t\t\tif(stristr($file, $q)) {\r\n\t\t\t\t\t$new['name'] = $file;\r\n\t\t\t\t\t$new['shortname'] = ft_get_nice_filename($file, 20);\r\n\t\t\t\t\t$new['dir'] = substr($dir, strlen(ft_get_root()));\r\n\t\t\t\t\tif (is_dir($path)) {\r\n if (ft_check_dir($path)) {\r\n \t\t\t\t\t\t$new['type'] = \"dir\";\t\t\t\t\t \r\n \t\t\t\t\t$output[] = $new;\r\n }\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t $new['type'] = \"file\";\r\n \t\t\t\t\t$output[] = $new;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Check subdirs for matches.\r\n\t\t\t\tif(is_dir($path)) {\r\n\t\t\t\t\t$dirres = _ft_search_find_files($path, $q);\r\n\t\t\t\t\tif (is_array($dirres) && count($dirres) > 0) {\r\n\t\t\t\t\t\t$output = array_merge($dirres, $output);\r\n\t\t\t\t\t\tunset($dirres);\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tsort($output);\r\n\t\tclosedir($dirlink);\r\n\t\treturn $output;\r\n\t} else {\r\n\t\treturn FALSE;\r\n\t}\r\n}", "public function getFilesInDirDoesNotFindDotfiles() {}", "public function get_test_php_extensions()\n {\n }", "public function checkExtensions()\n {\n $extensions = array(\n 'fileinfo',\n 'pdo',\n 'mbstring',\n 'tokenizer',\n 'openssl',\n 'json',\n 'curl',\n 'xml'\n );\n\n $results = array();\n\n foreach ($extensions as $extension) {\n $results[$extension] = extension_loaded($extension);\n }\n\n return $results;\n }", "function list_php_files($path){\n\t\t\t// to remove any (.) and (..) from the directory list\n\t\t\t$files = array_diff(scandir($path), array('.', '..'));\n\t\t\treturn $files;\n\t\t}", "function searchFile($directory, $file)\n{\n // Blacklisted directory names - not doing so will provoke an endless loop\n $blacklist = array ( '.idea', '.git', '.', '..');\n\n // Getting a handle on the directory\n $dir_handle = opendir($directory);\n\n // Looping on all the directorie's entry to find the right file\n while(false !== ($entry = readdir($dir_handle)))\n {\n //if($entry != '.' && $entry != '..' && $entry != '.idea' && $entry != '.git')\n if(!in_array($entry, $blacklist))\n {\n // if it's a directory - call back the same function recursively\n if(is_dir($directory. DIRECTORY_SEPARATOR .$entry))\n {\n searchFile($directory . DIRECTORY_SEPARATOR . $entry, $file);\n }\n // If it's a file, test against class name to know if it is the right file\n else if(str_replace(\".php\", \"\", $entry) == get_class_name($file))\n {\n $path = $directory . DIRECTORY_SEPARATOR . $entry;\n add_to_cache($file, $path);\n\n return;\n }\n }\n }\n\n closedir($dir_handle);\n\n\n}", "public function findFiles();", "public function test_search_by_name()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search_by_name('index.php');\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n }", "function searchFiles($search, $path, $video){\n $searchFiles = scandir($path);\n foreach($searchFiles as $sFile){\n if(($sFile!=\".\")&&($sFile!=\"..\")){\n if(is_dir($path.$sFile)){\n $search = glob($path.$sFile.'/'.$video);\n if(!empty($search)){\n return $search;\n }\n }\n }\n }\n return array('did', 'not', 'work');\n}", "protected function _findFiles($extensions = '') {\n\t\t$this->_files = [];\n\t\tforeach ($this->_paths as $path) {\n\t\t\tif (!is_dir($path)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$Iterator = new RegexIterator(\n\t\t\t\tnew RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)),\n\t\t\t\t'/^.+\\.(' . $extensions . ')$/i',\n\t\t\t\tRegexIterator::MATCH\n\t\t\t);\n\t\t\tforeach ($Iterator as $file) {\n\t\t\t\t$excludes = ['Config'];\n\t\t\t\t//Iterator processes plugins even if not asked to\n\t\t\t\tif (empty($this->params['plugin'])) {\n\t\t\t\t\t$excludes = array_merge($excludes, ['Plugin', 'plugins']);\n\t\t\t\t}\n\t\t\t\tif (empty($this->params['vendor'])) {\n\t\t\t\t\t$excludes = array_merge($excludes, ['Vendor', 'vendors']);\n\t\t\t\t}\n\t\t\t\tif (!empty($excludes)) {\n\t\t\t\t\t$isIllegalPluginPath = false;\n\t\t\t\t\tforeach ($excludes as $exclude) {\n\t\t\t\t\t\tif (strpos($file, $path . $exclude . DS) === 0) {\n\t\t\t\t\t\t\t$isIllegalPluginPath = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ($isIllegalPluginPath) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($file->isFile()) {\n\t\t\t\t\t$this->_files[] = $file->getPathname();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function scan_directory($dir, $ext = '*', $recurse = true) {\n $files = array ();\n if ($handle = opendir($dir)) {\n while (false !== ($file = readdir($handle))) {\n if ($file == '.' || $file == '..' ||\n $file == 'CVS' || preg_match('|^\\.|', $file)) {\n continue;\n }\n if (is_link($dir . '/' . $file)) {\n continue;\n }\n if (is_dir ($dir . '/' . $file)) {\n if ($recurse == true)\n $files = array_merge($files, scan_directory ($dir . '/' . $file, $ext));\n } else {\n if($ext == get_file_extension($file) || $ext == '*') {\n $files[] = $dir . '/' . $file;\n }\n }\n }\n closedir($handle);\n }\n return $files;\n}", "public function testPhpExtensionsAreValid()\n {\n $this->assert->php->extensions\n ->isLoaded('simplexml')\n ->isLoaded('fileinfo')\n ->isLoaded('xsl');\n // validate that fileinfo is loaded and configured properly\n $this->assert->php->extensions->fileinfo->isAlive();\n }", "function swpf_plugin_search($path) {\n\n\t$swpf_plugins = array();\n\n\t$dir = opendir ($path);\n\n\twhile ($file = readdir ($dir))\n\t{\n\t\tif (($file == \".\") or ($file == \"..\"))\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (filetype (\"$path/$file\") == \"dir\")\n\t\t{\n\t\t\t$swpf_file = \"$path/$file/swpf.php\";\n\n\t\t\tif (is_file($swpf_file)) {\n\t\t\t\trequire($swpf_file);\n\t\t\t\tif ($options) $swpf_plugins[] = $options;\n\t\t\t}\n\t\t}\n\n\t} //End of while\n\n\tclosedir($dir);\n\n\treturn $swpf_plugins;\n\n}", "public function findAllClassFiles($extension = NULL) {\n $classmap = [];\n $namespaces = $this->registerTestNamespaces();\n if (isset($extension)) {\n // Include tests in the \\Drupal\\Tests\\{$extension} namespace.\n $pattern = \"/Drupal\\\\\\(Tests\\\\\\)?$extension\\\\\\/\";\n $namespaces = array_intersect_key($namespaces, array_flip(preg_grep($pattern, array_keys($namespaces))));\n }\n foreach ($namespaces as $namespace => $paths) {\n foreach ($paths as $path) {\n if (!is_dir($path)) {\n continue;\n }\n $classmap += static::scanDirectory($namespace, $path);\n }\n }\n return $classmap;\n }", "function get_php_files(string $path)\n{\n $matches = [];\n $folders = [rtrim($path, DIRECTORY_SEPARATOR)];\n\n while( $folder = array_shift($folders) )\n {\n $matches = array_merge($matches, glob($folder . DIRECTORY_SEPARATOR . '*.php', GLOB_MARK));\n $childFolders = glob($folder . DIRECTORY_SEPARATOR . '*', GLOB_ONLYDIR);\n $folders = array_merge($folders, $childFolders);\n }\n return $matches;\n}", "protected function extensions() \n {\n return ['php'];\n }", "public function hasExtension($name);", "public function checkExtension($fileName){\n \t\t$extName = explode(\".\", $fileName);\n \t\t$extension = end($extName);\n \t\tif ($extension == \"java\"){\n \t\t\treturn true;\n \t\t}else{\n \t\t\treturn false;\n \t\t}\n \t}", "public function test_scan_files()\n {\n $content = array('.gitignore','.htaccess','index.php','README');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_FILES);\n \n $this->assertEquals(count($content), count($res));\n foreach($res as $path=>$dir){\n $this->assertTrue(in_array($dir->get_base_name(), $content));\n $this->assertInstanceOf('\\Kaili\\File', $dir);\n }\n }", "public function getExtensionsFromSingleInstance($file) {\n\t\tif($file{strlen($file)-1} != DIRECTORY_SEPARATOR ) $file .= DIRECTORY_SEPARATOR;\n\t\treturn glob($file.'typo3conf'.DIRECTORY_SEPARATOR.'ext'.DIRECTORY_SEPARATOR.'*', GLOB_ONLYDIR);\n\t}\n\n}", "public function fileDenyPatternMatchesPhpExtensionDataProvider() {}", "public function extension($filePath);", "protected function findExtension($ext)\n {\n $ext = strtolower(trim($ext, ' .'));\n if (isset($this->extensions[$ext])) {\n return '.' . $this->extensions[$ext];\n }\n\n return '.html';\n }", "public function phpExt(): array\n {\n return \\get_loaded_extensions();\n }", "public function phpExt(): array\n {\n return \\get_loaded_extensions();\n }", "public function testGetPhpFiles()\n {\n // Files arrays\n $files = [];\n $phpFiles = [];\n\n // For every specified folder\n foreach ($this->phpFolders as $folder) {\n\n // Get files from directory\n $files = array_merge($files, FileHelper::directoryFiles($folder));\n }\n\n // Select php only files\n foreach ($files as $file) {\n if (substr($file, -4) === '.php') {\n $phpFiles[] = $file;\n }\n }\n\n // Check that we have at least 10 php files across all collected\n $count = count($phpFiles);\n $this->assertTrue($count > 10, json_encode([\n 'count' => $count,\n 'expected' => 'total number of php files must exceed 10 files',\n ], JSON_UNESCAPED_SLASHES));\n\n // Return end point data\n return $phpFiles;\n }", "public function find_extension_file($slug)\n\t{\n\t\t// We'll search the root dir first\n\t\t$files = glob(path('extensions').$slug.DS.'extension'.EXT);\n\n\t\tif (empty($files))\n\t\t{\n\t\t\t// We couldn't find the extension file in the first path, so we'll try the 2nd\n\t\t\t$files = glob(path('extensions').'*'.DS.$slug.DS.'extension'.EXT);\n\t\t}\n\n\t\treturn ( ! empty($files)) ? $files[0] : false;\n\t}", "public function getFiles()\n {\n $dir = $this->getDir();\n\n return array_filter(array_map(function ($file) use ($dir) {\n if (is_file($dir.$file) && pathinfo($file, PATHINFO_EXTENSION) == 'php') {\n return $dir.$file;\n }\n }, scandir($dir)));\n }", "abstract protected function getFileExtension();", "private function _get_files($ext=false)\n\t{\n\t\t\n\t\t$files = PerchUtil::get_dir_contents(PERCH_RESFILEPATH);\n\n\t\t$returnfiles = array();\n\t\tif(PerchUtil::count($files) > 0) {\n\t\t\tforeach($files as $file) {\n\t\t\t\t// if a file extension has been provided only add files with that extension\n\t\t\t\tif($ext) {\n\t\t\t\t\tif(strtolower(trim($ext)) == strtolower(PerchUtil::file_extension($file))) {\n\t\t\t\t\t\t$returnfiles[] = array('label'=>$file, 'value'=>$file);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// prepare all files for display\n\t\t\t\t\t$returnfiles[] = array('label'=>$file, 'value'=>$file);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(PerchUtil::count($returnfiles) > 0) {\n\t\t\treturn $returnfiles;\n\t\t} else {\t\n\t\t\treturn false;\n\t\t}\n\t}", "public function testFindFiles()\n {\n\n }", "function getextension($path)\n{\n\t$extension = null;\n if (preg_match('/\\.([a-z0-9]+)$/', $path, $found)){\n\t\t$extension = $found[1];\n\t}\n\treturn $extension;\n}", "public function scan($type, $include_tests = NULL) {\n\n // Search the legacy sites/all directory.\n $searchdirs[static::PDB_SITES_ALL] = 'modules/pdb';\n\n $files = array();\n foreach ($searchdirs as $dir) {\n // Discover all extensions in the directory, unless we did already.\n if (!isset(static::$files[$dir][$include_tests])) {\n static::$files[$dir][$include_tests] = $this->scanDirectory($dir, $include_tests);\n }\n // Only return extensions of the requested type.\n if (isset(static::$files[$dir][$include_tests][$type])) {\n $files += static::$files[$dir][$include_tests][$type];\n }\n }\n\n // Sort the discovered extensions by their originating directories.\n $origin_weights = array_flip($searchdirs);\n $files = $this->sort($files, $origin_weights);\n\n // Process and return the list of extensions keyed by extension name.\n return $this->process($files);\n }", "private function findFiles($directory, $extensions = array())\r\n {\r\n $directory = ROOT_DIR_NAME;\r\n\r\n if($this->check_search_directory($directory))\r\n {\r\n $search = $this->filter_search_str($this->search);\r\n $directories = array();//\"\";\r\n function glob_recursive($directory, &$directories = array(), $search)\r\n {\r\n foreach(glob($directory, GLOB_ONLYDIR | GLOB_NOSORT) as $folder)\r\n {\r\n $directories[] = $folder;\r\n glob_recursive(\"{$folder}/*\", $directories, $search);\r\n }\r\n }\r\n @glob_recursive($directory, $directories, $search);\r\n $files = array ();\r\n foreach($directories as $directory)\r\n {\r\n $slashes = \"../\";\r\n if(strpos($directory, \"..//\") !== FALSE)\r\n {\r\n $slashes = \"..//\";\r\n }\r\n if (in_array(str_replace($slashes, \"\", $directory), $this->ignored)) continue;\r\n $this->find_all_files($directory, $extensions, $search);\r\n /*foreach($extensions as $extension)\r\n {\r\n foreach(glob(\"{$directory}/{$search}.{$extension}\") as $file)\r\n {\r\n $files[$extension][] = $file;\r\n $filename = str_replace(\"..//\", \"\", $file);\r\n $this->root_files_folders[$filename] = filemtime($file);\r\n }\r\n }*/\r\n }\r\n @arsort($this->root_files_folders);\r\n if($this->sort != 'date')\r\n {\r\n @$this->root_files_folders = $this->sort_with_name($this->root_files_folders);\r\n }\r\n }\r\n @$this->root_files_folders = array_keys($this->root_files_folders);\r\n }", "public function checkExt($f) {\r\n $ext = pathinfo($f, PATHINFO_EXTENSION);\r\n return $ext;\r\n }", "protected function php_grep($q, $path){\n\t\t$fp = opendir($path);\n\t\t$ret = '';\n\t\twhile($f = readdir($fp)){\n\t\t\tif($this->ignoreFile($f)) continue;\n\t\t\tif( preg_match('#^\\.+$#', $f) ) continue; // ignore symbolic links\n\t\t\t$file_full_path = $path.DIRECTORY_SEPARATOR.$f;\n\t\t\tif(is_dir($file_full_path)) {\n\t\t\t\t$ret .= $this->php_grep($q, $file_full_path);\n\t\t\t} else if( stristr(file_get_contents($file_full_path), $q) ) {\n\t\t\t\t$ret .= $file_full_path.PHP_EOL;\n\t\t\t}\n\t\t}\n\t\treturn $ret;\n\t}", "function grep($path, $pattern, &$results)\n{\n // find all files in the path (incl folders)\n $items = glob($path . '/*'); // */\n\n for ($i = 0; $i < count($items); $i++)\n {\n if (is_dir($items[$i]))\n {\n $add = glob($items[$i] . '/*'); // */\n $items = array_merge($items, $add);\n }\n }\n\n // search through the files.\n $results = array();\n foreach($items as $f)\n {\n if (filetype($f) == 'file')\n {\n if (preg_match($pattern, file_get_contents($f), $matches))\n $results = array_merge($results, $matches);\n }\n }\n\n return (count($results) > 0);\n}", "function get_files($images_dir,$exts = array('jpg')) {\n $files = array();\n if($handle = opendir($images_dir)) {\n while(false !== ($file = readdir($handle))) {\n $extension = strtolower(get_file_extension($file));\n if($extension && in_array($extension,$exts)) {\n $files[] = $file;\n }\n }\n closedir($handle);\n } else { echo \"Unable to read $images_dir directory!\"; }\n return $files;\n}", "function getAllFiles($dir, $ext)\n {\n $dirIterator = new RecursiveDirectoryIterator($dir);\n $fileIterator = new RecursiveIteratorIterator($dirIterator);\n $files = array();\n foreach ($fileIterator as $file) {\n if ($file->isFile() && strrpos($file->getPathname(), \".{$ext}\")) {\n $filename = str_replace('\\\\', '/', $file->getPathname());\n $files[] = str_replace(\"{$dir}/\", '', $filename);\n }\n }\n return $files;\n }", "protected function getExtensions() {\n $listing = new ExtensionDiscovery($this->root);\n // Ensure that tests in all profiles are discovered.\n $listing->setProfileDirectories([]);\n $extensions = $listing->scan('module', TRUE);\n $extensions += $listing->scan('profile', TRUE);\n $extensions += $listing->scan('theme', TRUE);\n return $extensions;\n }", "abstract public function search($files, array $includedFiles);", "public static function getPHPExtensionRequired(){\n\t\treturn 'java';\n\t}", "public function extens(){\n $this->typefl = pathinfo($this->filename, PATHINFO_EXTENSION);\n\n if(!in_array($this->typefl, $this->type)){\n echo \"Wrong extension!!!\";\n return false;\n }\n else{\n return true;\n }\n }", "public static function find_file($dir, $file, $ext = NULL)\n\t{\n\t\tif (self::$profile === TRUE AND class_exists('Profiler', FALSE))\n\t\t{\n\t\t\t// Start a new benchmark\n\t\t\t$benchmark = Profiler::start(__CLASS__, __FUNCTION__);\n\t\t}\n\n\t\t// Use the defined extension by default\n\t\t$ext = ($ext === NULL) ? EXT : '.'.$ext;\n\n\t\t// Create a partial path of the filename\n\t\t$path = $dir.'/'.$file.$ext;\n\n\t\tif ($dir === 'config' OR $dir === 'i18n')\n\t\t{\n\t\t\t// Include paths must be searched in reverse\n\t\t\t$paths = array_reverse(self::$_paths);\n\n\t\t\t// Array of files that have been found\n\t\t\t$found = array();\n\n\t\t\tforeach ($paths as $dir)\n\t\t\t{\n\t\t\t\tif (is_file($dir.$path))\n\t\t\t\t{\n\t\t\t\t\t// This path has a file, add it to the list\n\t\t\t\t\t$found[] = $dir.$path;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// The file has not been found yet\n\t\t\t$found = FALSE;\n\n\t\t\tforeach (self::$_paths as $dir)\n\t\t\t{\n\t\t\t\tif (is_file($dir.$path))\n\t\t\t\t{\n\t\t\t\t\t// A path has been found\n\t\t\t\t\t$found = $dir.$path;\n\n\t\t\t\t\t// Stop searching\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (isset($benchmark))\n\t\t{\n\t\t\t// Stop the benchmark\n\t\t\tProfiler::stop($benchmark);\n\t\t}\n\n\t\treturn $found;\n\t}", "function findImageTypeInDir( $dir, $fileTypes )\n{\n\t// If the directory is not there, throw exception.\n\tif ( !file_exists( $dir ) ) {\n\t\tthrow new Exception(\" $dir does not exist.\");\n\t}\n\t\n\t// Find a file extension in this directory. There may be more than one, \n\t// but let's at least start with a type that we know exists\n\t$foundtype = False;\n\t$files = scandir($dir);\n\tforeach ( $files as $file ) {\n\t\tforeach ( $fileTypes as $type ) {\n\t\t\tif ( substr($file, -strlen($type)) == $type ) {\n\t\t\t\t$foundtype = $type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\t\n\treturn $foundtype;\n}", "protected function getMissingPhpModulesOfExtensions() {}", "public function collectFile($dir, $ext)\n {\n if (false !== ($dir = opendir(plugins_path('/samubra/training/classes/'.$dir)))) {\n $files = array();\n while (false !== ($file = readdir($dir))) {\n if (preg_match(\"/\\\\.$ext\\$/i\", $file)) {\n $files[] = $file;\n }\n }\n return $files;\n }\n return false;\n }", "function rex_com_mediaaccess_getExtensionsSendfile()\n{\n global $REX;\n\n $classes = array();\n\n foreach($REX['ADDON']['community']['plugin_mediaaccess']['extension_sendfile_dir'] as $path)\n {\n if($dir = opendir($path))\n {\n while($file = readdir($dir))\n {\n if(!is_dir($file))\n {\n $classname = explode(\".\", $file);\n $class = $classname[1];\n\n if(file_exists($path.$file))\n {\n include_once($path.$file);\n $classes[] = $class;\n }\n }\n }\n closedir($dir);\n }\n }\n\n return $classes;\n}", "function PMA_getDirContent($dir, $expression = '')\n{\n if (file_exists($dir) && $handle = @opendir($dir)) {\n $result = array();\n if (substr($dir, -1) != '/') {\n $dir .= '/';\n }\n while ($file = @readdir($handle)) {\n // for PHP < 5.2.4, is_file() gives a warning when using open_basedir\n // and verifying '..' or '.'\n if ('.' != $file && '..' != $file && is_file($dir . $file) && ($expression == '' || preg_match($expression, $file))) {\n $result[] = $file;\n }\n }\n @closedir($handle);\n asort($result);\n return $result;\n } else {\n return FALSE;\n }\n}", "public function getFileExtension();", "function getExtension() ;", "function getextension($path){\n return strtolower(pathinfo($path, PATHINFO_EXTENSION)); // extension only, no period\n}", "public function getSupportedFileExtensions() {}", "function resolve_extension_dir() {\n\t\t// proper extension_dir is available in php.ini or passed via\n\t\t// cmd-line, explicitly or automagically inside run-tests.php\n\t\t$extension_dir = ini_get(\"extension_dir\");\n\n\t\t// may make life easier while testing at development stage for php\n\t\t// built from sources, but rather not on end-user machines\n\t\tif (!strlen($extension_dir)) {\n\t\t\t// while building for win modules (like php_mysql_xdevapi.dll) are\n\t\t\t// located in the same dir as php binary\n\t\t\t$extension_dir = pathinfo(PHP_BINARY, PATHINFO_DIRNAME);\n\t\t\tif (!is_running_on_windows()) {\n\t\t\t\t// for Linux\n\t\t\t\t// php binary located in\n\t\t\t\t//\t\tconnector-php/sapi/cli or connector-php/sapi/cgi\n\t\t\t\t// while mysql_xdevapi.so in\n\t\t\t\t//\t\tconnector-php/modules\n\t\t\t\t$extension_dir .= \"/../../modules\";\n\t\t\t}\n\t\t}\n\n\t\treturn $extension_dir;\n\t}", "protected function determineTargetFileExtension() {}", "protected function findExtensionDirectories($root) {\n $extension_roots = \\drupal_phpunit_contrib_extension_directory_roots($root);\n\n $extension_directories = array_map('drupal_phpunit_find_extension_directories', $extension_roots);\n return array_reduce($extension_directories, 'array_merge', []);\n }", "function setupExtensionsInstall() {\r\n\t\t\t// We need to find the files to install\r\n\t\t\tif (!$this->_findExtensionFiles()) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}", "function extension_path($extension = '')\n\t{ \n\t\treturn base_path(\"extensions\").($extension ? DS.$extension : $extension);\n\t}", "function getExtension($filePath){\n\t\t$lastDot = strrpos($filePath, '.');\n\t\tif($lastDot === false)\n\t\t\treturn false;\n\t\treturn substr($filePath, $lastDot+1);\n\t}", "function getInstalledExtensions()\r\n\t{\r\n\t\tglobal $sourcedir, $smcFunc, $modSettings;\r\n\t\r\n\t\t$extensions = array();\r\n\t\tif ($dh = opendir($sourcedir . '/ProjectTools/'))\r\n\t\t{\r\n\t\t\twhile (($file = readdir($dh)) !== false)\r\n\t\t\t{\r\n\t\t\t\tif ($file[0] == '.')\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t\r\n\t\t\t\tif (is_dir($sourcedir . '/ProjectTools/' . $file . '/') && file_exists($sourcedir . '/ProjectTools/' . $file . '/Extension.php'))\r\n\t\t\t\t{\r\n\t\t\t\t\t$extension = self::loadExtension($file, false);\r\n\t\t\t\t\t\r\n\t\t\t\t\t$extInfo = $extension->getExtensionInfo();\r\n\t\t\t\t\t\r\n\t\t\t\t\t$extensions[$file] = array(\r\n\t\t\t\t\t\t'id' => $file,\r\n\t\t\t\t\t\t'name' => $extInfo['title'],\r\n\t\t\t\t\t\t'version' => $extInfo['version'],\r\n\t\t\t\t\t\t'api_version' => $extInfo['api_version'],\r\n\t\t\t\t\t\t'filename' => $file,\r\n\t\t\t\t\t\t'enabled' => in_array($file, $modSettings['projectExtensions']),\r\n\t\t\t\t\t\t'can_enable' => $extInfo['api_version'] === 2,\r\n\t\t\t\t\t\t'can_disable' => true, // Todo: check if it's in use\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tclosedir($dh);\r\n\t\t\r\n\t\treturn $extensions;\r\n\t}", "public function findFile($class);", "function getTargetFileExtension() ;", "static private function find_contents($dir)\n {\n $result = array();\n $root = scandir($dir);\n foreach ($root as $value) {\n if ($value === '.' || $value === '..') {\n continue;\n }\n if (is_file($dir . DIRECTORY_SEPARATOR . $value)) {\n if (! self::$ext_filter || in_array(strtolower(pathinfo($dir . DIRECTORY_SEPARATOR . $value, PATHINFO_EXTENSION)), self::$ext_filter)) {\n self::$files[] = $result[] = $dir . DIRECTORY_SEPARATOR . $value;\n }\n continue;\n }\n if (self::$recursive) {\n foreach (self::find_contents($dir . DIRECTORY_SEPARATOR . $value) as $value) {\n self::$files[] = $result[] = $value;\n }\n }\n }\n // Return required for recursive search\n return $result;\n }", "function fileExtension($nameFile) {\n\t$format = substr($nameFile, -4);\n\treturn ($format == \".pat\");\n}", "function find($dir, $pattern){\n // escape any character in a string that might be used to trick\n // a shell command into executing arbitrary commands\n $dir = escapeshellcmd($dir);\n // get a list of all matching files in the current directory\n $files = glob(\"$dir/$pattern\");\n // find a list of all directories in the current directory\n // directories beginning with a dot are also included\n foreach (glob(\"$dir/{.[^.]*,*}\", GLOB_BRACE|GLOB_ONLYDIR) as $sub_dir){\n $arr = find($sub_dir, $pattern); // resursive call\n $files = array_merge($files, $arr); // merge array with files from subdirectory\n }\n // return all found files\n return $files;\n}", "abstract function list_files($path = '.');", "function findexts ($filename) \n{ \n\t$filename = strtolower($filename) ; \n\t$exts = split(\"[/\\\\.]\", $filename) ; \n\t$n = count($exts)-1; \n\n\t// Write any scripts that check for unwanted extensions here!\n\tif ($n > 1) // Check for evil double-barreled extensions like \"yourfile.php.jpg\" or \"yourfile.exe.jpg\" and eliminate extensions you don't allow.\n\t{\n\t\techo \"Double-Barreled file extension(s) are not allowed.<br>\";\n\t\t$ok=0;\n\t}\n\t$exts = $exts[$n]; \n\treturn $exts; \n}", "protected function checkPhpExtensions()\n\t{\n\t\tif (!extension_loaded('pcntl'))\n\t\t{\n\t\t\techo \"Extension pcntl not loaded\";\n\t\t\texit(1);\n\t\t}\n\n\t\t// This is used to kill processes\n\t\tif (!extension_loaded('posix'))\n\t\t{\n\t\t\techo \"Extension posix not loaded\";\n\t\t\texit(1);\n\t\t}\n\t}", "protected function scanDirectory($dir, $include_tests) {\n $files = array();\n\n // In order to scan top-level directories, absolute directory paths have to\n // be used (which also improves performance, since any configured PHP\n // include_paths will not be consulted). Retain the relative originating\n // directory being scanned, so relative paths can be reconstructed below\n // (all paths are expected to be relative to $this->root).\n $dir_prefix = ($dir == '' ? '' : \"$dir/\");\n $absolute_dir = ($dir == '' ? $this->root : $this->root . \"/$dir\");\n\n if (!is_dir($absolute_dir)) {\n return $files;\n }\n // Use Unix paths regardless of platform, skip dot directories, follow\n // symlinks (to allow extensions to be linked from elsewhere), and return\n // the RecursiveDirectoryIterator instance to have access to getSubPath(),\n // since SplFileInfo does not support relative paths.\n $flags = \\FilesystemIterator::UNIX_PATHS;\n $flags |= \\FilesystemIterator::SKIP_DOTS;\n $flags |= \\FilesystemIterator::FOLLOW_SYMLINKS;\n $flags |= \\FilesystemIterator::CURRENT_AS_SELF;\n $directory_iterator = new \\RecursiveDirectoryIterator($absolute_dir, $flags);\n\n // Filter the recursive scan to discover extensions only.\n // Important: Without a RecursiveFilterIterator, RecursiveDirectoryIterator\n // would recurse into the entire filesystem directory tree without any kind\n // of limitations.\n $filter = new RecursiveExtensionFilterIterator($directory_iterator);\n $filter->acceptTests($include_tests);\n\n // The actual recursive filesystem scan is only invoked by instantiating the\n // RecursiveIteratorIterator.\n $iterator = new \\RecursiveIteratorIterator($filter,\n \\RecursiveIteratorIterator::LEAVES_ONLY,\n // Suppress filesystem errors in case a directory cannot be accessed.\n \\RecursiveIteratorIterator::CATCH_GET_CHILD\n );\n\n foreach ($iterator as $key => $fileinfo) {\n $name = $fileinfo->getBasename('.info.yml');\n\n if ($this->fileCache && $cached_extension = $this->fileCache->get($fileinfo->getPathName())) {\n $files[$cached_extension->getType()][$key] = $cached_extension;\n continue;\n }\n\n // Determine extension type from info file.\n $type = FALSE;\n $file = $fileinfo->openFile('r');\n while (!$type && !$file->eof()) {\n preg_match('@^type:\\s*(\\'|\")?(\\w+)\\1?\\s*$@', $file->fgets(), $matches);\n if (isset($matches[2])) {\n $type = $matches[2];\n }\n }\n if (empty($type)) {\n continue;\n }\n $name = $fileinfo->getBasename('.info.yml');\n $pathname = $dir_prefix . $fileinfo->getSubPathname();\n\n $filename = $name . '.' . $type;\n\n if (!file_exists(dirname($pathname) . '/' . $filename)) {\n $filename = NULL;\n }\n\n $extension = new Extension($this->root, $type, $pathname, $filename);\n\n // Track the originating directory for sorting purposes.\n $extension->subpath = $fileinfo->getSubPath();\n $extension->origin = $dir;\n\n $files[$type][$key] = $extension;\n\n if ($this->fileCache) {\n $this->fileCache->set($fileinfo->getPathName(), $extension);\n }\n }\n return $files;\n }", "function include_all_php($folder)\n{\n foreach (glob(\"{$folder}/*.php\") as $filename)\n {\n require_once $filename;\n }\n\n foreach (glob(\"{$folder}/*\") as $foldername)\n {\n \tif(is_dir($foldername))\n \t{\n\t\t\tinclude_all_php($foldername);\n \t}\n }\n}", "public static function search($dir, $file, $ext = 'php', $multiple = false, $cache = true)\n\t{\n\t\t$finder = static::forge(array($dir), trim($ext, '.'));\n\n\t\tif (($result = $finder->findCached($multiple?'all':'one', $file)) === null)\n\t\t{\n\t\t\t$result = $multiple ? $finder->findAll($file, false, false, 'file') : $finder->find($file, false, false, 'file');\n\t\t}\n\n\t\tif ($cache and $result)\n\t\t{\n\t\t\t$finder->cache($multiple?'all':'one', $file, false, $result, array($dir));\n\t\t}\n\n\t\treturn $result;\n\t}", "public function extensions_directories()\n\t{\n\t\t$grouped_extensions = (array) glob(path('extensions').'*'.DS.'*'.DS.'extension'.EXT, GLOB_NOSORT);\n\t\t$top_level_extensions = (array) glob(path('extensions').'*'.DS.'extension'.EXT, GLOB_NOSORT);\n\n\t\treturn $this->cascade_extensions_directories($top_level_extensions, $grouped_extensions);\n\t}", "function get_files($route) {\n\tif (is_dir($route)) {\n\t\t$array_files = array();\n\t\t$files = opendir($route);\n\t\twhile ($file = readdir($files)) {\n\t\t\tif ($file != '.' && $file != '..' && !is_dir($route . '/' . $file)) {\n\t\t\t\t$extention = substr($file, -4);\n\t\t\t\t$file = substr($file, 0, -4);\n\t\t\t\tif ($file != 'index' && $extention == '.php') {\n\t\t\t\t\t$array_files[] = $file;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tclosedir($files);\n\t\treturn $array_files;\n\t} else {\n\t\treturn false;\n\t}\n}", "protected static function checkFileinfoExtension()\n {\n // Make sure that the \"fileinfo\" extension is loaded/enabled\n if (!extension_loaded('fileinfo')) {\n throw new RuntimeException('Required \"fileinfo\" extension not loaded');\n }\n }", "private function _has_extension($filename) {\n\t\t$exploded = explode(\".\", $filename);\n\t\tif(sizeof($exploded) > 1)\n\t\t\treturn $exploded;\n\t\telse\n\t\t\treturn false;\n\t}", "public static function hasExtension($path)\r\n\t{\r\n\t\t$file=self::getFilename($path);\r\n\t\t$posDot=strrpos($file, \".\");\r\n\t\tif ($posDot===false) return false;\r\n\t\telse return true;\r\n\t}", "public function testGettingExtensionsFromConfigurationFile(): void\n {\n $mock = m::mock(\n sprintf('%s[%s]', ServiceProvider::class, $what = 'getConfigExtensionsClassesNames'),\n [$this->app]\n );\n\n $mock->shouldReceive($what)->once()->andReturn([ExtensionStub::class])->getMock();\n\n /* @var ServiceProvider $mock */\n $this->assertContains(ExtensionStub::class, $mock->getExtensionsClassesNames());\n }", "public function all_available()\n\t{\n\t\t$available = array();\n\t\tif (!is_dir($this->phpbb_root_path . 'ext/'))\n\t\t{\n\t\t\treturn $available;\n\t\t}\n\n\t\t$iterator = new \\RecursiveIteratorIterator(\n\t\t\tnew \\phpbb\\recursive_dot_prefix_filter_iterator(\n\t\t\t\tnew \\RecursiveDirectoryIterator($this->phpbb_root_path . 'ext/', \\FilesystemIterator::NEW_CURRENT_AND_KEY | \\FilesystemIterator::FOLLOW_SYMLINKS)\n\t\t\t),\n\t\t\t\\RecursiveIteratorIterator::SELF_FIRST\n\t\t);\n\t\t$iterator->setMaxDepth(2);\n\n\t\tforeach ($iterator as $file_info)\n\t\t{\n\t\t\tif ($file_info->isFile() && $file_info->getFilename() == 'composer.json')\n\t\t\t{\n\t\t\t\t$ext_name = $iterator->getInnerIterator()->getSubPath();\n\t\t\t\t$ext_name = str_replace(DIRECTORY_SEPARATOR, '/', $ext_name);\n\t\t\t\tif ($this->is_available($ext_name))\n\t\t\t\t{\n\t\t\t\t\t$available[$ext_name] = $this->get_extension_path($ext_name, true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tksort($available);\n\t\treturn $available;\n\t}", "public function testReadingFiles()\n {\n $dir = __DIR__;\n $f = $this->adapter->java('java.io.File', $dir);\n $paths = $f->listFiles();\n foreach ($paths as $path) {\n self::assertFileExists((string) $path);\n }\n }", "function get_extension($file)\n{\n return substr(strrchr($file, '.'), 1);\n}", "protected function findFilesWithExtension(string $dir, string $extension)\n {\n if(! Str::startsWith($extension, '.')) $extension = \".$extension\";\n\n return array_filter($this->findFiles($dir), function($file) use($extension){\n return Str::endsWith($file, $extension);\n });\n }", "function gttn_tpps_get_path_extension($path) {\n preg_match('/\\.([a-zA-Z0-9]*)$/', $path, $matches);\n return $matches[1];\n}", "public static function isHaveExtension($path)\n {\n if (!is_string($path)) {\n return false;\n }\n $parts = pathinfo($path);\n return array_key_exists('extension', $parts);\n }", "function getPhpExecutable()\r\n{\r\n\tglobal $isWindowsServer;\r\n\t// Set filename of actual php executable file\r\n\t$phpexe = \"php\" . ($isWindowsServer ? \".exe\" : \"\");\r\n\t// LINUX ONLY (use \"exec\")\r\n\tif (!$isWindowsServer) \r\n\t{\r\n\t\t// Use \"which php\"\r\n\t\t$php_executable = @exec(\"which php\");\r\n\t\tif (isFile($php_executable)) return $php_executable;\r\n\t\t// Gets the PID of the current executable\r\n\t\tif (function_exists('posix_getpid')) {\r\n\t\t\t$pid = @posix_getpid();\r\n\t\t\t$php_executable = @exec(\"readlink -f /proc/$pid/exe\");\r\n\t\t\tif (isFile($php_executable)) return $php_executable;\r\n\t\t}\r\n\t}\r\n\t// Try paths found in PATH\r\n\tforeach (explode(PATH_SEPARATOR, getenv('PATH')) as $path) {\r\n\t\t$path = trim($path);\r\n\t\tif (substr($path, -1) == DS) $path = substr($path, 0, -1);\r\n\t\t$php_executable = $path . DS . $phpexe;\r\n\t\tif (isFile($php_executable)) return $php_executable;\r\n\t}\r\n\t// Use extension directory location to find it\r\n\t$php_executable = str_replace(DS . 'ext', '', ini_get('extension_dir')) . DS . $phpexe;\r\n\tif (isFile($php_executable)) return $php_executable;\r\n\t// Search directory containing PHP.INI (use \"loaded config file\" location from phpinfo()) \r\n\t$phpinfo_array = phpinfo_array();\r\n\tif (isset($phpinfo_array['General']['Loaded Configuration File'])) {\r\n\t\t// First try in this same directory\r\n\t\t$php_executable = dirname($phpinfo_array['General']['Loaded Configuration File']) . DS . $phpexe;\r\n\t\tif (isFile($php_executable)) return $php_executable;\r\n\t\t// Now try all subdirectories\r\n\t\t$php_ini_dir = dirname($phpinfo_array['General']['Loaded Configuration File']);\r\n\t\t$php_executable = searchForFile($php_ini_dir, $phpexe) . $phpexe;\r\n\t\tif ($php_executable !== false && $php_executable !== null && isFile($php_executable)) return $php_executable;\r\n\t}\r\n\t// Try ALL paths listed in phpinfo that contain \"/php\"\r\n\t$pathsPhpInfo = array();\r\n\tforeach ($phpinfo_array as $array) {\r\n\t\tforeach ($array as $val) {\r\n\t\t\t// If we found a match for \"/php\"\r\n\t\t\tif (!is_array($val) && strpos($val, DS.\"php\") !== false) {\r\n\t\t\t\t// Trim the value\r\n\t\t\t\t$val = trim(label_decode($val));\r\n\t\t\t\t// Check if value is a file\r\n\t\t\t\tif (isFile($val)) {\r\n\t\t\t\t\t$pathsPhpInfo[] = dirname($val);\r\n\t\t\t\t} \r\n\t\t\t\t// Check if a directory\r\n\t\t\t\telseif (is_dir($val)) {\r\n\t\t\t\t\t$pathsPhpInfo[] = $val;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t// Loop through all directories collected that are listed in phpinfo that contain \"/php\" and search ALL their subdirectories for PHP executable file\r\n\t$pathsParentPhpInfo = array();\r\n\tforeach (array_unique($pathsPhpInfo) as $path) \r\n\t{\r\n\t\t$php_executable = searchForFile($path, $phpexe) . $phpexe;\r\n\t\tif ($php_executable !== false && $php_executable !== null && isFile($php_executable)) return $php_executable;\r\n\t\t$pathsParentPhpInfo[] = dirname($path);\r\n\t}\r\n\t// If didn't find it in $pathsPhpInfo, now try parent folders of each in $pathsPhpInfo\r\n\tforeach (array_unique($pathsParentPhpInfo) as $path) \r\n\t{\r\n\t\t$php_executable = searchForFile($path, $phpexe) . $phpexe;\r\n\t\tif ($php_executable !== false && $php_executable !== null && isFile($php_executable)) return $php_executable;\r\n\t}\r\n\t// Couldn't find it\r\n\treturn false;\r\n}", "function frame_load_files($folder, $include = false, $extension = true)\n{\n $path = locate_template($folder);\n $files = array();\n\n if (is_dir($path))\n {\n $path_items = new DirectoryIterator($path);\n\n foreach ($path_items as $item)\n {\n if (!$item->isDot() && $item->isFile())\n {\n if (substr($item->getFilename(), 0, 1) !== '.' &&\n substr($item->getFilename(), 0, 1) !== '_')\n {\n if ($include === true) include($item->getPathname());\n $files[] = ($extension === true) ? $item->getFilename() : $item->getBasename('.'.$item->getExtension());\n }\n }\n // Recursive\n else if (!$item->isDot() && $item->isDir())\n {\n if (substr($item->getBasename(), 0, 1) !== '.' &&\n substr($item->getBasename(), 0, 1) !== '_')\n {\n $files = frame_load_files($folder.'/'.$item->getBasename(), $include, $extension);\n }\n }\n }\n }\n\n return $files;\n}", "public function checkExtensions()\r\n\t{\r\n\t\treturn (strcasecmp(pathinfo($this->targetFile, PATHINFO_EXTENSION), pathinfo($this->referenceFile, PATHINFO_EXTENSION)) === 0);\r\n\t}", "function dir_include($dir, $listen = false, $path = null)\n{\n /**\n * This is some pretty narly code but so far the fastest I have been able \n * to get this to run.\n */\n $iterator = new \\RegexIterator(\n new \\RecursiveIteratorIterator(\n new \\RecursiveDirectoryIterator($dir)\n ), '/^.+\\.php$/i', \\RecursiveRegexIterator::GET_MATCH\n );\n foreach ($iterator as $_file) {\n array_map(function($i) use ($path, $listen){\n include $i;\n if (!$listen) {\n return false;\n }\n if (WINDOWS) {\n $x = '\\\\';\n } else {\n $x = '/';\n }\n $data = explode($x, str_replace([$path, '.php'], '', $i));\n $class = array_pop($data);\n $namespace = implode('\\\\', $data);\n $process = $namespace.'\\\\'.ucfirst($class);\n if (class_exists($process, false) && \n is_subclass_of($process, '\\XPSPL\\Listener')) {\n listen(new $process());\n }\n }, $_file);\n }\n}", "function checkLanguage($lang) {\n global $DIR_LANG;\n # important note that '\\' must be matched with '\\\\\\\\' in preg* expressions\n\n return file_exists($DIR_LANG . remove_all_directory_separator($lang) . '.php');\n}", "function searchForFile($dir, $searchfile)\r\n{\r\n\tglobal $total_loops;\r\n\t// Make sure we do not exceed 80% memory usage. If so, return false to prevent hitting memory limit.\r\n\t// if (memory_get_usage()/1048576 > (int)ini_get('memory_limit')*0.8) return false;\r\n\t// Set max number of loops we'll do\r\n\t$max_loops = 20000;\r\n\t// Trim $dir and make sure it ends with directory separator\r\n\t$dir = rtrim(trim($dir), DS) . DS;\r\n\t// Loop through all files and subdirectories\r\n\tforeach (getDirFiles($dir) as $thisFileOrDir) \r\n\t{\r\n\t\t// Increment loop\r\n\t\t$total_loops++;\r\n\t\t// Stop if we've done over $max_loops loops and reset $total_loops for other processes\r\n\t\tif ($total_loops > $max_loops) {\r\n\t\t\t$total_loops = 0;\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// Set full path of file/dir we're looking at\r\n\t\t$fullPath = $dir.$thisFileOrDir;\r\n\t\t// If it's a file, check if it's the one we're looking for\r\n\t\tif (isFile($fullPath)) {\r\n\t\t\t// Found the file! Return the current directory.\r\n\t\t\tif ($thisFileOrDir == $searchfile) return $dir;\r\n\t\t}\r\n\t\t// If it's a directory, then recursively check all files in that subdirectory\r\n\t\telseif (is_dir($fullPath)) {\r\n\t\t\t// Get return value for this directory\r\n\t\t\t$returnedDir = searchForFile($fullPath, $searchfile);\r\n\t\t\t// If returned a filename and it matches teh search file, return the returned directory\r\n\t\t\tif ($returnedDir !== false) return $returnedDir;\r\n\t\t}\r\n\t}\r\n\t// If didn't find it, return false\r\n\treturn false;\r\n}", "function findexts ($filename) \n { \n $filename = strtolower($filename) ; \n $exts = split(\"[/\\\\.]\", $filename) ; \n $n = count($exts)-1; \n $exts = $exts[$n]; \n return $exts; \n }", "public static function find_json_php_file($path, $key, $search)\n\t{\n\t\t$files = self::read_dir_contents($path, 'files');\n\t\tif (empty($files)) return;\n\n\t\tforeach ($files as $file)\n\t\t{\n\t\t\t// do pre search to speed things up\n\t\t\tif (stripos(self::read_file_contents(\"{$path}/{$file}\", 'string'), $search) === false) continue;\n\n\t\t\t// we have some kind of match, so find it\n\t\t\t$data = self::read_file_contents(\"{$path}/{$file}\", 'json.php');\n\n\t\t\tif (isset($data->$key) && $data->$key === $search) return $data;\n\t\t}\n\t}", "function is_valid_file_extension($value, $set){\n if (in_array($value, $set)) {\n return true;\n }\n}", "function findexts ($filename){\n $filename = strtolower($filename) ;\n $exts = split(\"[/\\\\.]\", $filename) ;\n $n = count($exts)-1;\n $exts = $exts[$n];\n return $exts;\n }", "function loadFiles($folder){\n $files = scandir($folder);\n foreach ($files as $filename)\n {\n if($filename != \".\" && $filename != \"..\") {\n if (is_dir($filename)) {\n //handle nesting\n loadFiles($filename);\n } else {\n if (strpos($filename, '.php') !== false) {\n require $folder.\"/\".$filename;\n }\n }\n }\n\n }\n}", "public function test_scan()\n {\n $content = array('.','..','application','.git','.gitignore','.htaccess','index.php','nbproject','README','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC);\n \n $output = array();\n foreach($res as $f) $output[] = $f->get_base_name();\n $this->assertEquals($content, $output);\n }", "protected function _getFiles($path) {\n\t\tif (!$path = realpath($path)) {\n\t\t\t$this->error('Not a valid path.');\n\t\t\treturn false;\n\t\t}\n\t\tif (is_file($path)) {\n\t\t\treturn array(array($path));\n\t\t}\n\t\t$iterator = new \\RecursiveIteratorIterator(new \\RecursiveDirectoryIterator($path));\n\t\treturn new \\RegexIterator($iterator, '/^.+\\.php$/i', \\RecursiveRegexIterator::GET_MATCH);\n\t}", "private function fileTest($file) {\n $test_result = strripos($file, USER_FILE_EXT);\n return $test_result;\n }", "public function guessExtension();" ]
[ "0.6378908", "0.62099826", "0.61495525", "0.6130767", "0.6104926", "0.6008885", "0.59576637", "0.5952251", "0.593186", "0.59039265", "0.58814347", "0.58732206", "0.5866185", "0.5841527", "0.584152", "0.58406514", "0.57603306", "0.5739005", "0.57352954", "0.572393", "0.5692", "0.5666368", "0.56465465", "0.56244814", "0.561077", "0.5556108", "0.5556108", "0.55429935", "0.5534276", "0.55272704", "0.55266476", "0.55185014", "0.5518301", "0.5492787", "0.54859436", "0.5469135", "0.5468554", "0.5444711", "0.5442208", "0.5395075", "0.5381218", "0.53709215", "0.53634715", "0.5360786", "0.5356698", "0.53523874", "0.5343189", "0.53377223", "0.5334597", "0.5331389", "0.53235006", "0.53078467", "0.5297038", "0.52919954", "0.52842873", "0.5281901", "0.5261235", "0.525926", "0.52508026", "0.5249299", "0.52403134", "0.52272135", "0.5211944", "0.5203711", "0.51922005", "0.5184537", "0.51838386", "0.51785713", "0.517762", "0.5176928", "0.51766187", "0.51761985", "0.51742345", "0.516971", "0.51583004", "0.5145612", "0.5145242", "0.5144576", "0.514379", "0.514163", "0.5140255", "0.51386917", "0.51330054", "0.5120946", "0.5120173", "0.511334", "0.51066333", "0.51055443", "0.510546", "0.5104425", "0.5101519", "0.50978774", "0.50953", "0.50913084", "0.50828576", "0.50794894", "0.5072404", "0.5064763", "0.50587916", "0.50562483" ]
0.84767115
0
Set a row attribute
Установить атрибут строки
public function set_row_attr($row, $attr_name, $attr_val) { $row = (int)$row; $attr_name = (string)$attr_name; $attr_val = (string)$attr_val; if ($attr_name == '' || $attr_val == '') { return false; } if (isset($this->row_attrs[$row][$attr_name])) { $this->row_attrs[$row][$attr_name] .= ' ' . $attr_val; } else { $this->row_attrs[$row][$attr_name] = $attr_val; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setTrTdAttr ($attr, $row=null) {\n if (is_numeric ($row))\n $this->_setAttr ($attr, $this->trtdAttr[$row]);\n else\n $this->_setAttr ($attr, $this->trtdAttr[]);\n }", "public function setRow($row)\n {\n $this->row = $row;\n }", "public function setViaTableAttributesValue($value);", "protected function setRow($name, Common $element, $attribute = '')\n {\n $prop = empty($attribute) ? $element->$name : $element->$attribute;\n $this->setData($name, empty($prop) ? '' : $prop);\n }", "function setRowDatas(&$row) {\r\n\t\t\r\n }", "public function setAttribute($attribute, $value) {\n\t\tif (!$this->attributes) {\n\t\t\t$this->attributes = tx_newspaper::selectOneRow(\n\t\t\t\t\t'*', tx_newspaper::getTable($this), $this->condition\n\t\t\t);\n\t\t}\n\t\t\n\t\t$this->attributes[$attribute] = $value;\n\t}", "public function setRow(int $row): void\n {\n $this->row = $row;\n }", "abstract protected function updateSpecificProperties($row);", "public function setRow($row)\n\t{\n\t\t$this->cells[] = new Hypertable_ThriftGen_Cell(array('key' => new Hypertable_ThriftGen_Key( array('row'=> $row, 'flag' => 0))));\n\t\treturn $this;\n\t}", "function setRowDatas(&$row) {\r\n\t\t/* for optimization reason, do not save row. save just needed parameters */\r\n\r\n\t\t//$this->_specific_data\t= isset($row->specific) ? $row->specific : '';\r\n\t}", "public function set($rowData)\n {\n $this->rawRowData = $rowData;\n }", "function setCellAttribute($name, $value)\n\t{\n\t\t$this->attrs[$name] = $value;\n\t\treturn $this;\n\t}", "function setCellAttribute($name, $value)\n\t{\n\t\t$this->attrs[$name] = $value;\n\t\treturn $this;\n\t}", "public function __SET($attr, $value){ //Establece valor y atributo\n\n\t\t\t$this->$attr=$value;\n\t\t}", "public function setRow($row)\n {\n $this->row = $row;\n return $this;\n }", "function setAttribute ($attribute, $value) {\n return $this->dbH->setAttribute($attribute, $value);\n }", "function setRowDatas(&$row) {\r\n\t\t/* for optimization reason, do not save row. save just needed parameters */\r\n\t}", "public function setAttributes();", "function set_attr($attr=array()) {\n $this->other_attr = $attr;\n }", "public function set($column,$value);", "public function setRow($Row) \n \t{\n \t\treturn false;\n \t\t//parent::setRow($Row);\n \t}", "public function changeRowData(&$row){}", "function set($attr, $value)\r\n\t{\r\n\t\t$this->$attr = $value;\r\n\t}", "function setCellAttributes(array $values)\n\t{\n\t\t$this->attrs = $values;\n\t\treturn $this;\n\t}", "function setCellAttributes(array $values)\n\t{\n\t\t$this->attrs = $values;\n\t\treturn $this;\n\t}", "public function updateRow($row);", "public function setAttribute($attribute, $value)\n {\n }", "public function setAttribute($attribute, $value)\r\n\t{\r\n\t\t\r\n\t}", "public static function updateAttributes($bill, $row){\n $bill->setId($row['id']);\n $bill->setDate($row['date']);\n $bill->setUser($row['user']);\n $bill->setPayment($row['payment']);\n $bill->setPaid($row['paid']);\n }", "function setRowPrototype($row) {\n\t\t$this->row = $row;\n\t\treturn $this;\n\t}", "public function __set($atrib, $value){\n\t\t$this->$atrib = $value;\n\t}", "function diy_table_row_attr($str_value, $attributes) {\n\t\t$attr = $attributes;\n\t\tif (is_array($attributes)) {\n\t\t\t$attribute = [];\n\t\t\tforeach ($attributes as $key => $value) {\n\t\t\t\t$attribute[] = \"{$key}=\\\"{$value}\\\"\";\n\t\t\t}\n\t\t\t$attr = implode(' ', $attribute);\n\t\t}\n\t\t\n\t\treturn \"{$str_value}{:}$attr\";\n\t}", "abstract public function setAttribute($key, $value);", "public static function populateRecord($record, $row)\n {\n $columns = array_flip($record->attributes());\n foreach ($row as $name => $type_value) {\n $value=current($type_value);\n if (isset($columns[$name])) {\n $record->setAttribute($name, $value);\n $record->setOldAttribute($name,$value);\n } elseif ($record->canSetProperty($name)) {\n $record->$name = $value;\n }\n }\n\n\n }", "public function setAttr($attr) {\n\t\t$this->attr = $attr;\n\t\treturn $this;\n\t}", "public function setTd ($text, $attr='', $row=null, $col=null) {\n if (is_numeric ($row)) {\n if (is_numeric ($col))\n $this->_setTextAndAttr ($text, $attr, $this->tdData[(int)$row][(int)$col]);\n else\n $this->_setTextAndAttr ($text, $attr, $this->tdData[(int)$row][]);\n }\n else {\n if (is_numeric ($col))\n $this->_setTextAndAttr ($text, $attr, $this->tdData[][(int)$row]);\n else\n $this->_setTextAndAttr ($text, $attr, $this->tdData[][]);\n }\n }", "public function setAttr($attribute, $value) {\n $this->attributes[$attribute] = $value;\n }", "public function __SET($att, $valor){\r\n $this->$att = $valor;\r\n}", "function __construct($row, AttributeGroup $grp){\n\n\t\t\n\t\t$this->Group = $grp;\n\t\t\n\t\tif($grp->UseRealTable){\n\t\t\t$this->fieldName = $row['name'];\n\t\t\t$this->tableName = $grp->RealTableName;\n\t\t\t$this->AsTableName = $grp->RealTableName;\n\t\t} else {\n\t\t\t$this->fieldName = 'value';\n\t\t\t$this->tableName = $GLOBALS['attribute_type_tables'][$row['type']];\n\t\t\t$this->AsTableName = 'tbl'.$grp->Id.'_'.$row['id'];\n\t\t}\n\t\tif($row['php_data']){\n\t\t\t$row['php_data']=unserialize($row['php_data']);\n\t\t}\n\t\t\n\t\t$this->Id = $row['id'];\n\t\t$this->Name = $row['name'];\n\t\t$this->Type = $row['type'];\n\t\t$this->LabelPrefix = $row['prefix'];\n\t\t$this->LabelSuffix = $row['suffix'];\n\t\t$this->PHPData = $row['php_data'];\n\t\t\n\t\t\n\t\t//$row['value'] = '';\n\t\t//$row['orig_value'] = '';\n\t\t/*\n\t\tIMPORTANT FEAttribute extends ArrayObject\n\t\t\nMnogo neiasen bug. Kogato dobavih v getBeValue na ManagedImages da vrashta i $this[\"value\"][\"sizes\"]=$this->ImageSizes;\nVsichko se pochupi, vsichki FEAttr instancii poluciha i te taia stoinost. Tova e pri situacia che predi tova ne im e izvikano izrichno $this['value'] = neshtosi.\nNe se izvikva, ako ne sme zaredili danni prez loadData.\nIzglezda niakade copy on write mehanizma se pochupva pri naslediavane na ArrayObject\n\t\t\n\t\t*/\n\t\t\n//\t\tparent::__construct($row);\n\t}", "public function setAttribute(string $attribute, string $value);", "public function __set($attri, $value) {\n if (in_array($attri, self::DYN_ATTRIBUTES)) {\n $this->{$attri} = $value;\n }\n }", "public function __set($attr, $value)\n\t{\n\t\t$this->$attr = $value;\n\t}", "public function setAttribute($key, $value);", "public function setAttribute($key, $value);", "public function __set($attribute, $value){\n\t\t$this->$attribute = $value;\n\t}", "public function __set($attribute, $param) {\n $this->$attribute = $param;\n }", "private function setTaxAttributes($row, $element, $value)\n {\n (array_key_exists('dan2', $row) && $row['dan2'] != 0) ? $element->setAttribute('dan2', str_replace(',', '', $row['dan2']) * $value) : '';\n (array_key_exists('zakl_dane2', $row) && $row['zakl_dane2'] != 0) ? $element->setAttribute('zakl_dane2', str_replace(',', '', $row['zakl_dane2']) * $value) : '';\n (array_key_exists('dan3', $row) && $row['dan3'] != 0) ? $element->setAttribute('dan3', str_replace(',', '', $row['dan3']) * $value) : '';\n (array_key_exists('zakl_dane3', $row) && $row['zakl_dane3'] != 0) ? $element->setAttribute('zakl_dane3', str_replace(',', '', $row['zakl_dane3']) * $value) : '';\n }", "function initRow( $row ) {\r\n\t\t$this->oid = $row['id'];\n\t\t$this->uid = $row['uid'];\n\t\t$this->name = $row['name'];\n\t\t$this->description = $row['description'];\n\t\t\r\n\t}", "public function setRow($value)\n {\n return $this->set('Row', $value);\n }", "public function setRow($value)\n {\n return $this->set('Row', $value);\n }", "public function setHeader($attribute, $value);", "public function populate($row){\n foreach ($row as $key => $value){\n $this->$key = $value;\n }\n }", "function addRow($row, $attributes = null)\n {\n $key = sizeof($this->_rows);\n $this->_rows[$key] = $row;\n\n //if updateValue has been called make sure to update the values of each added element\n foreach (array_keys($this->_rows[$key]) as $key2) {\n if (isset($this->_form)) {\n $this->_rows[$key][$key2]->onQuickFormEvent('updateValue', null, $this->_form);\n }\n if ($this->isFrozen()) {\n $this->_rows[$key][$key2]->freeze();\n }\n }\n \n if (isset($attributes)) $this->_rowAttributes[$key] = $attributes;\n }", "protected function setAttribute($dataArray, $attribute)\n {\n if (isset($dataArray[$attribute])) {\n if (in_array($attribute, self::$validAttributes)) {\n $this->$attribute = $dataArray[$attribute];\n }\n }\n }", "public function set_dataAttributes($inputObject, $row)\n {\n $this->id = $row[\"id\"];\n $this->rewrite = $row[\"Process_Rewrite\"];\n $this->extension = $row[\"Process_Extension\"];\n $this->stranglerPattern = $row[\"Process_StranglerPattern\"];\n $this->continuousEvolution = $row[\"Process_ContinuousEvolution\"];\n $this->split = $row[\"Process_Split\"];\n $this->processStrategyOthers = $row[\"Process_Others\"];\n $this->ddd = $row[\"Decomposition_DDD\"];\n $this->functionalDecomposition = $row[\"Decomposition_FunctionalDecomposition\"];\n $this->existingStructure = $row[\"Decomposition_ExistingStructure\"];\n $this->decompositionStrategyOthers = $row[\"Decomposition_Others\"];\n $this->SCA = $row[\"Technique_SCA\"];\n $this->MDA = $row[\"Technique_MDA\"];\n $this->WDA = $row[\"Technique_WDA\"];\n $this->DMC = $row[\"Technique_DMC\"];\n $this->techniqueOthers = $row[\"Technique_Others\"];\n $this->GR = $row[\"Applicability_GR\"];\n $this->MO = $row[\"Applicability_MO\"];\n $this->sourceCode = $row[\"Input_SourceCode\"];\n $this->useCase = $row[\"Input_UseCase\"];\n $this->systemSpecification = $row[\"Input_SystemSpecification\"];\n $this->API = $row[\"Input_API\"];\n $this->inputOthers = $row[\"Input_Others\"];\n $this->list = $row[\"Output_List\"];\n $this->archi = $row[\"Output_Archi\"];\n $this->outputOthers = $row[\"Output_Others\"];\n $this->experiment = $row[\"Validation_Experiment\"];\n $this->example = $row[\"Validation_Example\"];\n $this->caseStudy = $row[\"Validation_CaseStudy\"];\n $this->noValidation = $row[\"Validation_NoValidation\"];\n $this->maintainability = $row[\"Quality_Maintainability\"];\n $this->performance = $row[\"Quality_Performance\"];\n $this->reliability = $row[\"Quality_Reliability\"];\n $this->scalability = $row[\"Quality_Scalability\"];\n $this->security = $row[\"Quality_Security\"];\n $this->qualityOthers = $row[\"Quality_Others\"];\n $this->score = $row[\"Score\"];\n $this->matchScore = set_matchScore($inputObject, $row);\n $this->misMatch = set_misMatch($inputObject, $row);\n }", "public function setAttribute($name, $value);", "public function setData($data)\n {\n $this->rowData = $data;\n }", "public function set_attribute($name, $value)\n {\n }", "public function getRowAttributes(RenderWalker $walker, int $index, array $row): array;", "public function setRowAlt($rowAlt)\n {\n $this->rowAlt = $this->checkRowAltRange($rowAlt);\n $this->childNodes = [];\n $this->append($this->makeTableRows());\n }", "public function __set($atributo, $valor) {\n\t\t\t// $this->modelo = $valor;\n\t\t\t$this->$atributo = $valor;\n\t\t}", "public function setAttrs($attrs);", "public function setCell($row, $column)\n\t{\n\t\t$this->cells[] = new Hypertable_ThriftGen_Cell(array('key' => new Hypertable_ThriftGen_Key( array('row'=> $row, 'column_family'=> $column, 'flag' => 1))));\n\t\treturn $this;\n\t}", "public function setIdentifier($record){\n\t\t$record->writeAttribute($this->_identityColumn, $this->generateUUID());\n\t}", "public function __set($attribute, $value) {\n $this->setAttribute($attribute, $value);\n }", "function editRow($table_name, $key_column_name, $key_value, $row)\n {\n foreach($row as $column_name=>$column_value)\n {\n $this->editValue(\n $table_name,\n $key_column_name,\n $key_value,\n $column_name,\n $column_value);\n }\n }", "function __set($attr_name, $value) {\n // in $attr_name, replace _ with \" \"\n $attr_name = str_replace('_', ' ', $attr_name);\n $attr_name = ucwords($attr_name);\n $attr_name = str_replace(' ', '', $attr_name);\n $function = \"set$attr_name\";\n //var_dump($function);\n $this->$function($value);\n }", "public function setAttributes($attributes){ }", "public function setRowspan($num)\n {\n parent::setAttr(\"rowspan\", $num);\n }", "private function set($row, $column, $value) {\n if (!$this->invalid($row, $column)) {\n $this->matrix[$row][$column] = $value;\n }\n }", "protected function _set_row_id($id) {\r\n $this->row_id = $id;\r\n }", "public function setRow($key, $value = null)\n {\n // We cache the row data for subsequent uses\n if (! is_array($this->rowData)) {\n $this->rowData = $this->getRowArray();\n }\n\n if (is_array($key)) {\n foreach ($key as $k => $v) {\n $this->rowData[$k] = $v;\n }\n\n return;\n }\n\n if ($key !== '' && $value !== null) {\n $this->rowData[$key] = $value;\n }\n }", "private function addAtrributesToCRUD() {\r\n if (!empty($this->__attributes)) {\r\n $this->myCRUD()->setAtributes($this->__attributes);\r\n }\r\n }", "function setRowClasses($field, $map)\n\t{\n\t\t$this->table->rowclasses['field'] = $field;\n\t\t$this->table->rowclasses['classes'] = $map;\n\t}", "function load_db_values($row)\n\t{\n\t\tforeach($row as $prop => $val)\n\t\t\t$this->{$prop} = $val;\n\t}", "public function __set($variable, $value)\n {\n $this->rowData[$variable] = $value;\n if ($this->persisted) {\n $this->persisted = false;\n }\n }", "public function setRowId($val) {\n if ($val === null || is_integer($val)) {\n $this->_row_id = $val;\n } else {\n require_once 'Scenario/Exception.php';\n throw new Scenario_Exception('Row ID must be an integer or null.');\n }\n }", "public function setTrasient($attribute){\n\t\tEntityManager::addTrasientAttribute(get_class($this), $attribute);\n\t}", "public function setColumn($set, $val)\n\t{\n\t\t//ignore bogus data\n\t\tif (!array_key_exists($set, $this->row))\n\t\t\tthrow new InternalException(\"row $set doesn't exist\");\n\t\t$this->isChanged[$set] = true;\n\t\t$this->row[$set] = $val;\n\t}", "public function getRow($row){\n\t\t\t$this->groupId = $row['groupId'];\n\t\t\t$this->name = $row['name'];\n\t\t\t$this->description = $row['description'];\n\t\t\t\n\t\t\t$this->isLoaded = true;\n\t\t}", "public function __set($attribute, $value) {\n\t\tif (strpos($attribute, '_') === 0) {\n\t\t\t$this->{$attribute} = $value;\n\t\t\treturn;\n\t\t}\n\n\t\t$this->setData($attribute, $value);\n\t}", "public function __set($attribute, $value)\n {\n array_set($this->attributes, $attribute, $value);\n }", "public function setHeader($rowHeader){\n array_unshift($this->data,$rowHeader);\n return $this;\n }", "public function setEntity( $entity )\n {\n\n $this->entity = $entity;\n $this->rowid = $entity->getId();\n \n }", "public function setAttribute($name, $value)\n\t{\n\t\t// If value is valid timestamp and the underlying column type is datetime, convert to datetime object\n\t\tif (DateTimeHelper::isValidTimeStamp($value))\n\t\t{\n\t\t\t$table = blx()->db->schema->getTable(\"{{{$this->getTableName()}}}\");\n\t\t\t$column = $table->getColumn($name);\n\t\t\tif ($column->dbType == ColumnType::DateTime)\n\t\t\t{\n\t\t\t\t$dt = new DateTime('@'.$value);\n\t\t\t\t$value = $dt;\n\t\t\t}\n\t\t}\n\n\t\tif (property_exists($this, $name))\n\t\t{\n\t\t\t$this->$name = $value;\n\t\t}\n\t\telse if (isset($this->getMetaData()->columns[$name]))\n\t\t{\n\t\t\t$this->_attributes[$name] = $value;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public function setRow(string $data, $value): DataTablesResponseInterface;", "public function setAttributes($attributes);", "public function setAttributeMetadata($attributeName, $definition){\n\t\tActiveRecordMetaData::setAttributeMetadata($this->_source, $this->_schema, $attributeName, $definition);\n\t}", "protected function _cacheSet($id, $row) {\n//SERIA_Base::db()->dbLog(\"_cacheSet(\".$this->table.\", $id)\");\n\t\t\treturn $this->_cache()->set($this->_cache->get('generation').'_'.$id, $row, 10);\n\t\t}", "public function setFromRow( $rec ){\r\n \r\n if (isset($rec['badge_categories_id']))\r\n $this->id = $rec['badge_categories_id'];\r\n \r\n if (isset($rec['badge_categories_name']))\r\n $this->name = $rec['badge_categories_name'];\r\n }", "public function setTh ($text , $attr='', $col=null) {\n if (is_numeric ($col))\n $this->_setTextAndAttr ($text, $attr, $this->thData[$col]);\n else\n $this->_setTextAndAttr ($text, $attr, $this->thData[]);\n }", "public function setRow($index, array $row)\n {\n if (null === $this->nbColumns) {\n $this->nbColumns = count($row);\n } elseif (count($row) !== $this->nbColumns) {\n throw new LogicException(sprintf(\n 'Expected the row to contain %s cells, but got %s.',\n $this->nbColumns,\n count($row)\n ));\n }\n\n $this->rows[$index] = array_values($row);\n\n return $this;\n }", "function __construct($row = null) {\n $this->_data = array();\n $this->_extra = array();\n if (!isset(self::$_defaults[$this->getObjectName()])) {\n // maintain the default data (column values) separately\n self::$_defaults[$this->getObjectName()] = array();\n $this->loadDefaults();\n }\n\n // clone from the default data. much faster than reloading the column values every time\n $def =& self::$_defaults[$this->getObjectName()];\n foreach ($def as $k => &$d) {\n $this->_data[$k] = clone $d;\n }\n\n if (is_array($row)) {\n $this->loadFromRow($row);\n } else if (is_int($row)) {\n $this->setValue('id', $row);\n }\n }", "public function set($atributo, $valor) {\r\n\t\t\t $this->$atributo = $valor;\r\n\t\t}", "public function setAttribute($key, $value = null);", "public function __set($name, $value)\n {\n // does table have such row?\n if (!array_key_exists($name, $this->_fields)) {\n throw new Cms_Model_Exception(\n get_class($this) . \" doesn't have the '{$name}' field\"\n );\n }\n\n // we should parse the name of arg to get function\n $func = 'set' . @preg_replace('~_([a-z])~e', 'ucfirst(\"$1\")', ucfirst($name));\n if (!is_callable(array($this, $func))) {\n throw new Cms_Model_Exception(\"The '{$func}' method not found\");\n }\n\n // updating marker of changed fields\n if ($this->_isVirgin) {\n $this->_fields[$name] = $value;\n } else {\n $this->_changedFields[$name] = $value;\n }\n }", "public function set($column, $value)\n {\n $this->initialize();\n if (array_key_exists($column, $this->columns)) {\n $mutator = '__set' . str_replace(' ', '', ucwords(str_replace(array('-', '_'), ' ', $column)));\n if (method_exists($this, $mutator)) {\n $this->{$mutator}($value);\n } else {\n $this->data[$column] = $value;\n }\n return;\n }\n throw new Exception\\InvalidArgumentException('Not a valid column in this row: ' . $column);\n }", "public function update(){\n if(empty($this->attributes)){\n return;\n }\n if ($this->isAutoInc) {\n $fieldsList = \" SET \";\n foreach ($this->attributes as $column => $value) {\n $fieldsList.=$column.\"=\".'\\''.$value.'\\''.\", \";\n }\n $fieldsList = str_last_replace(\", \", \"\", $fieldsList);\n $sqlQuery = \"UPDATE \".$this->table.$fieldsList.\" WHERE \".$this->idName.\"=\".$this->attributes[$this->idName];\n\n Db::instance()->execute($sqlQuery,$this->attributes);\n }\n }", "protected function _setAttributeValue($object, $valueRow)\n {\n $attribute = $this->getAttribute($valueRow['attribute_id']);\n if ($attribute) {\n $attributeCode = $attribute->getAttributeCode();\n $isDefaultStore = $valueRow['store_id'] == $this->getDefaultStoreId();\n if (isset($this->_attributes[$valueRow['attribute_id']])) {\n if ($isDefaultStore) {\n $object->setAttributeDefaultValue($attributeCode, $valueRow['value']);\n } else {\n $object->setAttributeDefaultValue(\n $attributeCode,\n $this->_attributes[$valueRow['attribute_id']]['value']\n );\n }\n } else {\n $this->_attributes[$valueRow['attribute_id']] = $valueRow;\n }\n\n $value = $valueRow['value'];\n $valueId = $valueRow['value_id'];\n\n $object->setData($attributeCode, $value);\n if (!$isDefaultStore) {\n $object->setExistsStoreValueFlag($attributeCode);\n }\n $attribute->getBackend()->setEntityValueId($object, $valueId);\n }\n\n return $this;\n }", "public function set()\n {\n $args = func_get_args();\n\n if ( count($args) == 2 )\n {\n $this->attributes[$args[0]] = $args[1];\n }\n elseif ( count($args) == 1 && is_array($args[0]) ) \n {\n $this->attributes = ( array_merge($this->attributes, $args[0]) );\n }\n\n return $this;\n }" ]
[ "0.7184818", "0.69530857", "0.6781479", "0.67430913", "0.65449625", "0.6439724", "0.64035505", "0.6400028", "0.6385595", "0.6361818", "0.6347521", "0.63459355", "0.63459355", "0.634324", "0.6320215", "0.6309764", "0.62964934", "0.6223196", "0.6202105", "0.6145299", "0.61203045", "0.60466707", "0.5993699", "0.5934689", "0.5934689", "0.59293437", "0.5921092", "0.5912191", "0.59064496", "0.588355", "0.58738035", "0.58373564", "0.5832105", "0.5831291", "0.58083105", "0.5805045", "0.5800787", "0.5793569", "0.57914436", "0.57834333", "0.5776747", "0.57728064", "0.5769495", "0.5769495", "0.57621115", "0.57551634", "0.5754459", "0.57423645", "0.57237524", "0.57223487", "0.57030404", "0.5701949", "0.5667969", "0.5650234", "0.5642859", "0.5596685", "0.5593988", "0.55934846", "0.557135", "0.5566251", "0.55510306", "0.55361366", "0.5522793", "0.55159646", "0.5499802", "0.5487595", "0.54603714", "0.5450252", "0.5443582", "0.5442586", "0.54408705", "0.5424501", "0.5417506", "0.5406075", "0.5406057", "0.5402152", "0.54002714", "0.5400169", "0.53978974", "0.53777057", "0.5366746", "0.5365693", "0.5362192", "0.535996", "0.5355047", "0.5349031", "0.5347711", "0.5343784", "0.5339654", "0.53286266", "0.5320371", "0.5317915", "0.53121436", "0.53110623", "0.5300198", "0.5292945", "0.52904457", "0.5288603", "0.5278796", "0.5271086" ]
0.71445227
1
End a fieldset in the form
Завершить поле набора в форме
public function end_fieldset() { $fs_attrs = array('marker' => 'end'); $fieldset = new GenElement('fieldset', '', $fs_attrs); array_push($this->form_elements, array($fieldset->render(1), 0, 'fieldset')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function end_fieldset()\n\t{\n\t\tif( $this->has_fieldset )\n\t\t\t$this->buffer.= '</fieldset>';\n\t\t$this->has_fieldset = false;\n\t}", "public static function fieldset_close() {\n\t\t\treturn '</fieldset>';\n\t\t}", "static function closeFieldset()\n {\n echo '</ul>';\n echo '</fieldset>'.PHP_EOL;\n }", "public function create_fieldset_end()\n\t{\n\t\treturn '</fieldset>'.\"\\n\";\n\t}", "public function endFieldset() {\n $this->_currentFieldset = NULL;\n }", "public static function renderCloseFieldset();", "public static function endForm(){\n\t\treturn '</form>';\n\t}", "public function RenderFormEnd() {\n\n return '</form>';\n }", "abstract public function closeFieldset();", "public function end()\n {\n $this->associatedEntity = null;\n\n return \"</form>\";\n }", "public function close()\n {\n $this->form = null;\n $this->fields = null;\n\n return '</form>';\n }", "public static function form_close() {\n\t\t\treturn '</form>';\n\t\t}", "static function closeForm()\n {\n echo '</form>'.PHP_EOL;\n }", "abstract public function closeEmptyFieldset();", "public static function end_form_tag()\n {\n return '</form>';\n }", "public static function close(){\n\t\t\treturn '</form>';\n\t\t}", "public function close()\n {\n return '</form>';\n }", "public function close()\n {\n return '</form>';\n }", "public function closeForm()\n {\n return \"</form>\";\n }", "public function close()\n\t{\n\t\treturn '</form>';\n\t}", "function formFooter(){\r\n\r\n\t\t$ret = '</form>';\r\n\r\n\t\treturn $ret;\r\n\t}", "public function divEnd(): FormHelper\n {\n $this->html .= \"</div>\";\n\n return $this;\n }", "function field_close() {\n\t\t\t\n\t\t\treturn $this->form['markup'] === 'xhtml' ? ' />' : '>';\n\t\t\t\n\t}", "public static function close()\n\t{\n\t\treturn '</form>';\n\t}", "public static function easyFormEnd($closeDiv = true)\n {\n echo '<input type=\"hidden\" name=\"task\" value=\"\" />'.NL;\n echo '<input type=\"hidden\" name=\"controller\" '\n .'value=\"'.JRequest::getCmd('controller').'\" />'.NL;\n echo '<input type=\"hidden\" name=\"view\" '\n .'value=\"'.JRequest::getCmd('view').'\" />'.NL;\n echo '<input type=\"hidden\" name=\"file_name\" id=\"file_name\" '\n .'value=\"'.JRequest::getVar('file_name').'\" />'.NL;\n echo '<input type=\"hidden\" name=\"file_path\" id=\"file_path\" '\n . 'value=\"'.JRequest::getVar('file_path').'\" />'.NL;\n echo '</form>'.NL;\n\t echo($closeDiv) ? '</div>'.NL : '';\n echo '<div style=\"clear: both\"></div>'.NL;\n }", "function closeForm()\r\n\t\t{\r\n\t\t\t# Open form and configure\r\n\t\t\techo \"</form>\";\r\n\t\t}", "public function closeTag()\n {\n return '</form> </div></div>';\n }", "function form_end($text = '') {\n $output = '';\n if(!empty($text)) {\n $output .= form_submit($text);\n }\n\n $output .= '</form>';\n\n return html__output($output);\n}", "function formEnd(){\n \n $form = '</form>';\n\n echo $form;\n}", "public function endForm()\r\n {\r\n echo '<div class=\"panel-footer\">\r\n <input type=\"submit\" class=\"btn btn-primary btn-sm\" value=\"Vote\" />\r\n </div>\r\n </form>';\r\n }", "public function addElementAtEnd(IElement $element): IFormBuilder;", "function ninja_forms_display_close_fields_wrap( $form_id ){\n\t?>\n\t</div>\n\t<?php\n}", "public static function formEnd($options = array()) {\n\n\t\tif (self::_hasAdapter(get_class(), __FUNCTION__))\n\t\t\treturn self::_callAdapter(get_class(), __FUNCTION__, $options);\n\n\t\t$options = self::_applyFilter(get_class(), __FUNCTION__, $options, array('event' => 'args'));\n\n\t\t$input = '</form>';\n\n\t\treturn $input;\n\t}", "function finish_form($force_stage = false)\n\t{\n\t\tglobal $e_forms;\n\t\tif($this->previous_steps)\n\t\t{\n\t\t\t$e_forms->add_hidden_data(\"previous_steps\", base64_encode(serialize($this->previous_steps)));\n\t\t}\n\t\t$e_forms->add_hidden_data(\"stage\", ($force_stage ? $force_stage : ($this->stage + 1)));\n\t}", "function close_form($tabs = 0)\n{\n close_tag('form', Tab($tabs), true) ;\n}", "private function addEditFormAfterContent() {\n\t\t// this div is opened when encapsulating the default editor in addEditFormBeforeContent.\n\t\treturn '</div><div style=\"clear: both\"></div>';\n\t}", "public function finForm(): self\n {\n $this->formCode .= '</form>';\n return $this;\n }", "public function renderFormClose()\n {\n if ( !empty( $this->viewState ) )\n $this->renderInput( 'hidden', '__viewState', $this->saveViewState() );\n echo \"</div></form>\\n\";\n }", "public function blockEnd() {\n $this->outputEditmode('</div>');\n }", "public function generateFormClose() {\n\t\t$form = '';\n\t\t// add hidden fields\n\t\t$hidden_fields = $this->getHiddenFields();\n\t\tforeach ( $hidden_fields as $field => $value ) {\n\t\t\t$form .= Html::hidden( $field, $value );\n\t\t}\n\n\t\t$form .= Xml::closeElement( 'form' ); // close form 'payment'\n\t\t$form .= $this->generateDonationFooter();\n\t\t$form .= Xml::closeElement( 'td' );\n\t\t$form .= Xml::closeElement( 'tr' );\n\t\t$form .= Xml::closeElement( 'table' );\n\t\treturn $form;\n\t}", "function section_close() {\n $this->doc .= DOKU_LF.'</div>'.DOKU_LF;\n }", "public function end()\n {\n $name = 'contentFor' . Horde_String::ucfirst($this->_name);\n $this->_view->$name = parent::end();\n }", "function section_end()\n\t\t{\n\t\t\t$output = '</div>'; // <!--end ace_control-->\n\t\t\t$output .= '<div class=\"ace_clear\"></div>';\n\t\t\t$output .= '</div>'; //<!--end ace_control_container-->\n\t\t\t$output .= '</div>'; //<!--end ace_section-->\n\t\t\treturn $output;\n\t\t}", "public function end ( \\r8\\Form $form )\n {\n $formTpl = clone $this->formTpl;\n\n $formTpl->set( \"form\", $form->__toString() );\n $formTpl->set( \"hidden\", $form->getHiddenHTML() );\n $formTpl->set( \"fields\", $this->fields );\n $formTpl->set( \"isValid\", $form->isValid() );\n $formTpl->set( \"isFormValid\", $form->isFormValid() );\n $formTpl->set( \"showErrors\", $this->showErrors );\n $formTpl->set( \"errors\", $this->getErrorTpl( $form->validateForm() ) );\n\n return $formTpl;\n }", "function do_delete(){\n\t\t// remove from fieldset:\n\t\t$fieldset = jcf_fieldsets_get( $this->fieldset_id );\n\t\tif( isset($fieldset['fields'][$this->id]) )\n\t\t\tunset($fieldset['fields'][$this->id]);\n\t\tjcf_fieldsets_update( $this->fieldset_id, $fieldset );\n\t\t\n\t\t// remove from fields array\n\t\tjcf_field_settings_update($this->id, NULL);\n\t}", "public function control_close()\n\t{\n\t\t$this->controls_opened = $this->line_opened = false;\n\t\treturn \"</div>\\n</div>\"; // close .controls div\n\t}", "public function stepEnd($data, $form)\n {\n $btnPrev = $this->compileButtons($data['settings']);\n ?>\n <div class=\"ff-t-container ff-inner_submit_container ff-column-container ff_columns_total_2\">\n <div class=\"ff-t-cell ff-t-column-1\"><?php echo $btnPrev; ?></div>\n <div class=\"ff-t-cell ff-t-column-2\"><?php do_action('fluentform_render_item_submit_button', $form->fields['submitButton'], $form); ?></div>\n </div>\n </div></div></div>\n <?php\n }", "public function end() {\n\n $this->current = 0;\n\n // remove the suffix which was set by self::start()\n $suffixes = Zend_Registry::get(\"pimcore_tag_block_current\");\n array_pop($suffixes);\n Zend_Registry::set(\"pimcore_tag_block_current\", $suffixes);\n\n $this->outputEditmode(\"</div>\");\n }", "function close_form($no_link_back=false, $equery=false) {\r\n\t\tparent::close_form($no_link_back,$equery);\r\n\t\tglobal $percorso;\r\n\t\t$percorso.=$this->percorso_agg;\r\n\t}", "public function BuildEndForm($action) {\n echo \"<INPUT TYPE='hidden' NAME='action' VALUE='$action'>\"; // this is coded in \n echo \"<p class='submit'> <input type='submit' value='Submit' /></p>\"; \n echo \"</fieldset>\"; \n echo \"</FORM>\"; \n }", "public function break(): FormHelper\n {\n $this->html .= \"<br>\";\n return $this;\n }", "public function finishSectionEdit($end = null) {\n list($id, $start, $type, $title) = array_pop($this->sectionedits);\n if(!is_null($end) && $end <= $start) {\n return;\n }\n $this->doc .= \"<!-- EDIT$id \".strtoupper($type).' ';\n if(!is_null($title)) {\n $this->doc .= '\"'.str_replace('\"', '', $title).'\" ';\n }\n $this->doc .= \"[$start-\".(is_null($end) ? '' : $end).'] -->';\n }", "function visual_group_end()\n\t\t{\t\t\t\n\t\t\t$output = '</div>';\n\t\t\treturn $output;\n\t\t}", "public function close() {\n\t\treturn Kohana_Form::close();\n\t}", "static function end_html( $html, $meta, $field )\r\n\t\t{\r\n\t\t\t$html = '';\r\n\r\n\t\t\treturn $html;\r\n\t\t}", "static function end_html( $html, $meta, $field )\r\n\t\t{\r\n\t\t\t$html = '';\r\n\r\n\t\t\treturn $html;\r\n\t\t}", "function _field_grouped_fieldset ($fval) {\n\n $res = '';\n $setName = $this->name;\n\n // how many sets to show to begin w/?\n if (!empty($fval) and is_array($fval))\n $numsets = count($fval);\n\t\telse\n\t\t\t$numsets = (isset($this->attribs['numsets']))? $this->attribs['numsets'] : 1;\n\n $hiddens = '';\n $res .= \"<div id=\\\"proto_{$setName}\\\" data-numsets=\\\"{$numsets}\\\" data-setname=\\\"{$setName}\\\" class=\\\"formex_group\\\" style=\\\"display: none; margin:0; padding: 0\\\">\n <fieldset class=\\\"formex_grouped_fieldset {$this->element_class}\\\"><ul>\";\n\t\t\t\t\t\n\n foreach ($this->opts as $name => $parms) {\n\t\t\t$newelem = new formex_field($this->fex, $name, $parms);\n\n\t\t\t$res .= '<li>';\n\t\t\tif ($newelem->type != 'hidden') {\n\t\t\t\t$res .= $this->fex->field_label($newelem);\n\t\t\t\t$res .= $newelem->get_html('');\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$hiddens = $newelem->get_html('');\n\t\t\t}\n\t\t\t$res .= '</li>';\n }\n\n $res .= \"</ul>$hiddens</fieldset></div>\";\n\n $labelclass = (!empty($this->attribs['enable_showhide']))? 'enable_showhide' : '';\n\n /* \"+\" and \"-\" controls for adding and removing sets */\n $res .= \"<span id=\\\"fieldsetControl$setName\\\" data-setname=\\\"$setName\\\" class=\\\"controls {$this->element_class}\\\">\";\n\t\t$res .= \"<label class=\\\"$labelclass\\\">{$this->descrip}</label>\";\n\t\t$res .= '<a href=\"#\" class=\"add\">+</a> <a href=\"#\" class=\"sub\">&ndash;</a></span>';\n\n\t\t$res .= \"<script type=\\\"text/javascript\\\">\n\t\t\t\t\t\tvar formex_groupvalues = formex_groupvalues || [];\n\t\t\t\t\t\tformex_groupvalues['{$setName}'] = \".json_encode($fval).\";\n\t\t\t\t</script>\";\n return $res;\n }", "static function end_html( $meta, $field )\n\t\t{\n\t\t\treturn '';\n\t\t}", "public function _end_block()\n\t{\n\t\t//echo '</table>';\n\t}", "function structure()\n {\n $form = new Apeform(0, 0, false);\n $form->hidden(\"structure\", \"method\");\n $form->hidden($this->table->tablename(), \"table\");\n $field = &$form->hidden($this->GET('method') == \"structure\" ? $this->GET('field') : \"\");\n $newField = &$form->text(\"<u>F</u>ield name\", \"\", $field);\n\n foreach ($this->table->fields as $key)\n $positions[$key] = \"After \" . $key;\n $keys = array_keys($positions);\n $defaultValue = ($field && in_array($field, $keys)) ? $keys[array_search($field, $keys) - 1] : \"\";\n if ($field)\n unset($positions[$field]);\n array_pop($positions);\n $positions[''] = \"At end of table\";\n $label = $field ? \"Move to <u>p</u>osition\" : \"Add at <u>p</u>osition\";\n $afterField = $form->select($label, \"\", $positions, $defaultValue);\n\n $button = $field ? \"Rename/move field\" : \"Add new field\";\n $form->submit($button);\n\n if ($form->isValid()) {\n if (! $field) {\n if ($this->table->add_field($newField, $afterField))\n $this->table->write();\n else\n $form->error(\"Invalid field name\", 3);\n } else {\n while ($row = $this->table->each()) {\n // Copy all the moved values to their new field name.\n $this->table->data[$row['id']][$newField] = $row[$field];\n }\n $newFields = array();\n foreach ($this->table->fields as $oldField) {\n // Copy any unchanged field to the new fields array.\n if ($oldField != $field)\n $newFields[] = $oldField;\n if ($oldField == $afterField)\n $newFields[] = $newField;\n }\n // Add field if position '' (\"At end of table\") was selected.\n if (! $afterField)\n $newFields[] = $newField;\n $this->table->fields = $newFields;\n $this->table->write();\n }\n $field = \"\";\n $newField = \"\";\n }\n\n $formOrder = new Apeform(0, 0, \"order\", false);\n $formOrder->hidden(\"structure\", \"method\");\n $formOrder->hidden($this->table->tablename(), \"table\");\n $order = $formOrder->select(\"Permanently <u>o</u>rder table by\", \"\", $this->table->fields);\n $formOrder->submit(\"Order\");\n\n if ($formOrder->isValid()) {\n $this->table->sort($this->table->fields[$order]);\n $this->table->write();\n }\n\n $this->displayHead();\n\n echo '<table>';\n echo '<tr><th>Field</th><th><small>Guessed type</small></th><th colspan=\"2\">Action</th></tr>';\n foreach ($this->table->fields as $i => $f) {\n echo '<tr><td';\n if (! $i)\n echo ' class=\"primary\" title=\"Row identifier\"';\n echo '>' . $f . '</td>';\n echo '<td><small>' . (isset($this->types[$f]) ? $this->types[$f] : \"\") . '</small></td>';\n echo '<td>';\n if ($i && $this->priv & PRIV_ALTER)\n echo '<a href=\"' . $this->SELF . '?method=structure&table=' . $this->table->tablename() . '&field=' . $f . '\">Change</a>';\n echo '</td><td>';\n if ($i && $this->priv & PRIV_ALTER)\n echo '<a class=\"danger\" href=\"' . $this->SELF . '?method=drop&table=' . $this->table->tablename() . '&field=' . $f . '\">Drop</a>';\n echo '</td></tr>';\n }\n echo '</table>';\n\n if ($this->priv & PRIV_ALTER)\n $form->display();\n if ($this->priv & PRIV_UPDATE)\n $formOrder->display();\n\n echo '<p><table>';\n echo '<tr><th>Statement</th><th>Value</th></tr>';\n echo '<tr><td>Rows</td><td align=\"right\">' . $this->table->num_rows() . '</td></tr>';\n echo '<tr><td>Next autoindex</td><td align=\"right\">' . ($this->table->num_rows() ? max($this->table->ids()) + 1 : 1) . '</td></tr>';\n $filesize = $this->table->exists() ? filesize($this->table->filename) : 0;\n $filemtime = $this->table->exists() ? date(\"Y-m-d H:i\", filemtime($this->table->filename)) : \"\";\n echo '<tr><td>File size</td><td align=\"right\">' . number_format($filesize) . ' Bytes</td></tr>';\n $size = $this->table->num_rows() ? (int) round(($filesize - strlen(implode(\",\", $this->table->fields)) - 2) / $this->table->num_rows()) : 0;\n echo '<tr><td>Average row size</td><td align=\"right\">' . $size . ' Bytes</td></tr>';\n echo '<tr><td>Delimiter</td><td align=\"right\">' . $this->table->delimiter . '</td></tr>';\n echo '<tr><td>Last update</td><td align=\"right\">' . $filemtime . '</td></tr>';\n echo '</table>';\n }", "public function removeFieldSet($index) {\n\t\t$this->fieldsets[$index] = null;\n\t}", "public function finish()\n {\n parent::finish();\n \n $form_entry_list_method = sprintf( 'get_%s_entry_list', $this->get_subject() );\n $session = lib::create( 'business\\session' );\n $db_user = $session->get_user();\n $db_role = $session->get_role();\n\n foreach( $this->get_record_list() as $record )\n {\n // determine who has worked on the form\n $typist_1 = 'n/a';\n $typist_1_submitted = false;\n $typist_2 = 'n/a';\n $typist_2_submitted = false;\n\n $form_entry_list = $record->$form_entry_list_method();\n $db_form_entry = current( $form_entry_list );\n if( $db_form_entry )\n {\n $typist_1 = $db_form_entry->get_user()->name;\n $typist_1_submitted = !$db_form_entry->deferred;\n }\n $db_form_entry = next( $form_entry_list );\n if( $db_form_entry )\n {\n $typist_2 = $db_form_entry->get_user()->name;\n $typist_2_submitted = !$db_form_entry->deferred;\n }\n\n // if both typists have submitted and this form is still in the list then there is a conflict\n $conflict = $typist_1_submitted && $typist_2_submitted;\n\n $this->add_row( $record->id,\n array( 'id' => $record->id,\n 'date' => $record->date,\n 'typist_1' => $typist_1,\n 'typist_1_submitted' => $typist_1_submitted,\n 'typist_2' => $typist_2,\n 'typist_2_submitted' => $typist_2_submitted,\n 'conflict' => $conflict ) );\n }\n\n $this->finish_setting_rows();\n }", "function section_end(){\n\techo '</div>';\n\techo '</div>';\n}", "public function drawEndOptionsPanel()\r\n {\r\n echo ' </ul>\r\n </div>';\r\n }", "function accordion_end($label = '', $section = 'themify_options') {\n\t\t\treturn array();\n\t\t}", "function close()\n\t{\n\t echo <<< FORMCLOSE\n\t \n\t </form>\nFORMCLOSE;\n\t}", "function endForm($send){\n $out = '';\n if ($send) $out .= '<input type=\"submit\" value=\"'.$send.'\" name=\"submit\" >';\n $out .= \"</form>\";\n return $out;\n }", "function end ($options=NULL) {\n $this->set_options($options);\n print $this->bottom_html();\n if ($this->notes_area)\n print $this->notes_area_html();\n }", "public function end()\n\t{\n\t\t$this->show('</ul>' . LF);\n\t}", "public function endContent()\n\t{\n\t\t$this->endWidget('CContentDecorator');\n\t}", "public function drawFooter (\n\t)\t\t\t\t\t// RETURNS <void>\n\t\n\t// $contentForm->drawFooter();\n\t{\n\t\t// Show Segment-Creation Modules\n\t\tforeach($this->segments as $module => $bool)\n\t\t{\n\t\t\tswitch($module)\n\t\t\t{\n\t\t\t\tcase \"Text\":\n\t\t\t\t\t$icon = \"newspaper\";\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase \"Image\":\n\t\t\t\t\t$icon = \"image\";\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase \"Video\":\n\t\t\t\t\t$icon = \"video\";\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\t$icon = \"circle-exclaim\";\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\techo '\n\t\t\t<div class=\"newsegment-wrap\">\n\t\t\t\t<div class=\"newsegment\"><span class=\"newsegment-text\">Add<br /><span class=\"icon-' . $icon . '\" style=\"font-size:32px;\"></span><br />' . $module . ' Block</span></div>\n\t\t\t\t<input class=\"newsegment-sub\" type=\"submit\" name=\"add_module[' . $module . ']\" value=\"\" style=\"background:none;\" />\n\t\t\t</div>';\n\t\t}\n\t\t\n\t\techo '\n\t\t<hr class=\"separate-div\"/>';\n\t\t\n\t\t// Display Submission Options\n\t\techo '\n\t\t<p>';\n\t\t\n\t\t// Make official post\n\t\tif($this->contentData['status'] < Content::STATUS_OFFICIAL and Me::$clearance >= 6)\n\t\t{\n\t\t\techo '\n\t\t\t<input type=\"submit\" name=\"save_official\" value=\"Save and Make Official Post\" style=\"background-color:#56ccc8;\" />';\n\t\t}\n\t\t\n\t\t// Save and Publish option\n\t\tif($this->contentData['status'] < Content::STATUS_GUEST)\n\t\t{\n\t\t\techo '\n\t\t\t<input type=\"submit\" name=\"save_publish\" value=\"Save and Publish\" style=\"background-color:#56ccc8;\" />';\n\t\t}\n\t\t\n\t\t// Official Post Option\n\t\tif($this->contentData['status'] >= Content::STATUS_OFFICIAL and Me::$clearance >= 6)\n\t\t{\n\t\t\techo '\n\t\t\t<input type=\"submit\" name=\"save_standard\" value=\"Live Update\" style=\"background-color:#56ccc8;\" />\n\t\t\t<input type=\"submit\" name=\"save_guest\" value=\"Set as Guest Post\" style=\"background-color:#aa2222;\" />';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Save / Update Option\n\t\t\techo '\n\t\t\t<input type=\"submit\" name=\"save_standard\" value=\"Save and Update\" />';\n\t\t}\n\t\t\n\t\t// Display the Submit Button\n\t\techo '\n\t\t\t<input type=\"submit\" name=\"deletePost\" value=\"Delete Post\" onclick=\"return confirm(\\'Are you sure you want to delete this post?\\');\" />\n\t\t</p>';\n\t}", "public function sectionEnd() {}", "public function sectionEnd() {}", "public static function close()\n {\n\n echo \"<input type=\\\"hidden\\\" name=\\\"csrf\\\" value=\\\"\" . \\Jet\\App\\Engine\\Tools\\Utils::generateToken() . \"\\\">\";\n\n if (self::$name) {\n\n echo \"<input type=\\\"hidden\\\" name=\\\"\" . self::$name . \"\\\" value=\\\"\" . self::$check . \"\\\">\";\n }\n\n echo \"<input type=\\\"hidden\\\" name=\\\"check\\\" value=\\\"\" . self::$check . \"\\\">\";\n\n echo \"</form>\";\n\n self::$check = null;\n self::$name = null;\n }", "function definition_after_data() {\n global $CFG, $COURSE;\n $mform =& $this->_form;\n\n if ($id = $mform->getElementValue('update')) {\n $modulename = $mform->getElementValue('modulename');\n $instance = $mform->getElementValue('instance');\n\n if ($this->_features->gradecat) {\n $gradecat = false;\n if (!empty($CFG->enableoutcomes) and $this->_features->outcomes) {\n if ($outcomes = grade_outcome::fetch_all_available($COURSE->id)) {\n $gradecat = true;\n }\n }\n if ($items = grade_item::fetch_all(array('itemtype'=>'mod', 'itemmodule'=>$modulename,\n 'iteminstance'=>$instance, 'courseid'=>$COURSE->id))) {\n foreach ($items as $item) {\n if (!empty($item->outcomeid)) {\n $elname = 'outcome_'.$item->outcomeid;\n if ($mform->elementExists($elname)) {\n $mform->hardFreeze($elname); // prevent removing of existing outcomes\n }\n }\n }\n foreach ($items as $item) {\n if (is_bool($gradecat)) {\n $gradecat = $item->categoryid;\n continue;\n }\n if ($gradecat != $item->categoryid) {\n //mixed categories\n $gradecat = false;\n break;\n }\n }\n }\n\n if ($gradecat === false) {\n // items and outcomes in different categories - remove the option\n // TODO: it might be better to add a \"Mixed categories\" text instead\n if ($mform->elementExists('gradecat')) {\n $mform->removeElement('gradecat');\n }\n }\n }\n }\n\n if ($COURSE->groupmodeforce) {\n if ($mform->elementExists('groupmode')) {\n $mform->hardFreeze('groupmode'); // groupmode can not be changed if forced from course settings\n }\n }\n\n if ($mform->elementExists('groupmode') and !$mform->elementExists('groupmembersonly') and empty($COURSE->groupmodeforce)) {\n $mform->disabledIf('groupingid', 'groupmode', 'eq', NOGROUPS);\n\n } else if (!$mform->elementExists('groupmode') and $mform->elementExists('groupmembersonly')) {\n $mform->disabledIf('groupingid', 'groupmembersonly', 'notchecked');\n\n } else if (!$mform->elementExists('groupmode') and !$mform->elementExists('groupmembersonly')) {\n // groupings have no use without groupmode or groupmembersonly\n if ($mform->elementExists('groupingid')) {\n $mform->removeElement('groupingid');\n }\n }\n }", "public function formClose()\n {\n return $this->renderHtmlForm('CloseStub');\n }", "public function definition_after_data() {\n parent::definition_after_data();\n $this->_form->freeze(['type']);\n $this->tool->form_definition_after_data($this->_form);\n }", "public function finish()\n {\n parent::finish();\n\n // set the view's items\n $this->set_item( 'first_name', $this->get_record()->first_name );\n $this->set_item( 'last_name', $this->get_record()->last_name );\n $this->set_item( 'association', $this->get_record()->association );\n $this->set_item( 'alternate', $this->get_record()->alternate );\n $this->set_item( 'informant', $this->get_record()->informant );\n $this->set_item( 'proxy', $this->get_record()->proxy );\n\n $this->finish_setting_items();\n\n if( !is_null( $this->address_list ) )\n {\n $this->address_list->finish();\n $this->set_variable( 'address_list', $this->address_list->get_variables() );\n }\n\n if( !is_null( $this->phone_list ) )\n {\n $this->phone_list->finish();\n $this->set_variable( 'phone_list', $this->phone_list->get_variables() );\n }\n }", "public function endTabs() {\n\t\t\treturn \"\"; \n\t\t}", "static public function endTag(Field $field)\n {\n\t\tif ($field instanceof Field\\Submit) {\n\t\t\treturn '';\n\t\t}\n\n return '\t\t\t\t\t</div>\n\t\t\t</div>';\n }", "function rd_do_footer()\n{\n\techo <<<END\n\t\t</form>\n\t</div></body>\n</html>\nEND;\n}", "public function end_field_resolver_trace()\n {\n }", "public function createFinaliseRepairFields()\r\n {\r\n echo \"\r\n <fieldset>\r\n <legend> Finalise Repair </legend>\r\n <div class=\\\"input-wrapper\\\">\r\n <div class=\\\"left-wrapper\\\">\r\n <label>Repair Cost: </label>\r\n <input type=\\\"text\\\" class=\\\"input-text-fifty\\\" name=\\\"repair-cost-input\\\" id=\\\"repair-cost-input\\\"\r\n value=\\\"\".$this->checkRepairCost().\"\\\">\r\n </div>\r\n\r\n <div class=\\\"right-wrapper\\\">\r\n <label>Authorised By: </label>\r\n <input type=\\\"text\\\" class=\\\"input-text-fifty\\\" name=\\\"return-authorized-name-input\\\" id=\\\"return-authorized-name-input\\\"\r\n value=\\\"\".$this->queryResult[\"ReturnAuthorizedName\"].\"\\\">\r\n </div>\r\n </div>\r\n\r\n <div class=\\\"input-wrapper\\\">\r\n <div class=\\\"left-wrapper\\\" style=\\\"width:330px\\\">\r\n <input type=\\\"checkbox\\\" name=\\\"print-checkbox\\\" value=\\\"print-checkbox\\\"\r\n \".$this->checkPrintCondition().\">\r\n <label>Print Repair Order Form/s </label>\r\n\r\n </div>\r\n </div>\r\n\r\n <div class=\\\"input-wrapper\\\">\r\n <div class=\\\"left-wrapper\\\" style=\\\"width:100%\\\">\r\n <input type=\\\"checkbox\\\" name=\\\"ra-checkbox\\\" value=\\\"ra-checkbox\\\" id=\\\"ra-checkbox\\\" \".$this->checkRACondition().\">\r\n <label> Send request for \\\"Return Authorisation Number\\\" now (recommended) </label>\r\n </div>\r\n </div>\r\n </fieldset> \";\r\n }", "function end_table() {\n if ($this->_cellopen) {\n $this->end_cell();\n }\n // Close any open table rows\n if ($this->_rowopen) {\n $this->end_row();\n }\n ?></table><?php\n echo \"\\n\";\n\n $this->reset_table();\n }", "public function addForm()\n {\n $this->getState()->template = 'displaygroup-form-add';\n $this->getState()->setData([\n 'help' => $this->getHelp()->link('DisplayGroup', 'Add')\n ]);\n }", "function admin_fieldset( $fieldset, $legend = '' )\n{\n\t$eol = \"\\n\";\n\t$html = '<fieldset class=\"admin_fieldset\">'.$eol;\n\n\tif ($legend != '')\n\t{\n\t\t$html .= \"<legend>$legend</legend>$eol\";\n\t}\n\t$html .= $fieldset;\n\n\t$html .= '</fieldset>'.$eol;\n\n\treturn $html;\n}", "private function endBlock()\n {\n end($this->_blocks);\n\n // grab key of that last element and fill it with rendered data\n $this->_blocks[key($this->_blocks)] = ob_get_clean();\n }", "function nc__dlg__end(){\n\n\t\t//output function name\n\t\tnc__util__func('class', 'nc__dlg__end');\n\n\t\t\t\t\t\t//end dialog for content body (starts in another function)\n\t\t\t\t\t\techo \"</div>\" .\n\n\t\t\t\t\t//end dialog content window (starts in another function)\n\t\t\t\t\t\"</div>\" .\n\n\t\t\t\t//end dialog body (starts in another function)\n\t\t\t\t\"</div>\" .\n\n\t\t\t//end end dialog bounding DIV (starts in another function)\n\t\t\t\"</div>\";\n\n\t}", "public function modify(Fieldset $fieldset);", "function endMainBlock() {\n $bte =& $this->blockTab[0];\n $bte['tPosContentsEnd'] = strlen($this->template);\n $bte['tPosEnd'] = strlen($this->template);\n $bte['definitionIsOpen'] = false;\n $this->currentNestingLevel -= 1; }", "public function after_editor() {\n echo '</div>';\n $this->render_builder();\n }", "protected function _prepareForm()\n {\n $form = new Varien_Data_Form(array(\n 'id' => 'edit_form',\n // 'action' => $this->getUrl('*/*/courseOrder'),\n 'method' => 'post',\n 'enctype' => 'multipart/form-data'\n )\n );\n\n\n\n $fieldset = $form->addFieldset('base_fieldset', array('legend' => Mage::helper('adminhtml')->__('导出报表')));\n $dateFormatIso = 'yyyy-MM-dd';\n $fieldset->addField('begin_time', 'date', array(\n 'name' => 'begin_time',\n 'label' => Mage::helper('adminhtml')->__('订单开始时间'),\n 'time' => true,\n 'image' => $this->getSkinUrl('images/grid-cal.gif'),\n 'format' => $dateFormatIso,\n 'note' => '格式(0000-00-00)'\n ));\n\n $fieldset->addField('end_time', 'date', array(\n 'name' => 'end_time',\n 'label' =>Mage::helper('adminhtml')->__('订单结束时间'),\n 'time' => true,\n 'image' => $this->getSkinUrl('images/grid-cal.gif'),\n 'format' => $dateFormatIso,\n 'note' => '格式(0000-00-00)'\n ));\n /* $fieldset->addField('startDate', 'text', array(\n 'name' => 'startDate',\n 'label' => Mage::helper('adminhtml')->__('开始日期'),\n 'title' => Mage::helper('adminhtml')->__('开始日期'),\n //'style' => 'width:600px;height:350px;',\n 'required' => true,\n 'after_element_html' => '<br/>请选择一个开始日期',\n )\n );\n\n $fieldset->addField('endtDate', 'text', array(\n 'name' => 'endtDate',\n 'label' => Mage::helper('adminhtml')->__('结束日期'),\n 'title' => Mage::helper('adminhtml')->__('结束日期'),\n //'style' => 'width:600px;height:350px;',\n 'required' => true,\n 'after_element_html' => '<br/>请选择一个开结束日期',\n )\n );*/\n /* $fieldset->addField('psubmit', 'submit', array(\n 'name' => 'psubmit',\n 'label' => '',\n 'value' => '检查数据',\n 'after_element_html' => '',\n )\n );*/\n // $form->setMethod('post');\n\n $form->setUseContainer(true);\n // $form->setAction(true);\n // $form->setEnctype('multipart/form-data');\n\n $this->setForm($form);\n\n return parent::_prepareForm();\n\n }", "public function close() {\n\t\t\n\t\t// Render close tag\n\t\t\n\t\t$this->_post_render();\n\t\t\n\t\techo true === $this->options['render_tag'] ? $this->_render_tag( true ) : '';\n\t\t\n\t\techo $this->options['after'];\n\t\t\n\t}", "public function setEndFieldName($fieldName) {\n $this->endFieldName = $fieldName;\n $this->id = md5($this->id . $fieldName);\n }", "abstract protected function _setNewForm();", "function _prepareForm() {\n\t\t\t$this->getFieldset( );\n\t\t\t$fieldset = parent::_prepareForm( );\n\n\t\t\tif ($fieldset) {\n\t\t\t\t$this->getTextHelper( );\n\t\t\t\t$model = $helper = $this->getModel( );\n\t\t\t\t$isElementDisabled = !$this->isSaveAllowed( );\n\t\t\t\t$fieldset->addField( 'country_id', 'select', array( 'name' => 'country_id', 'label' => $helper->__( 'Country' ), 'title' => $helper->__( 'Country' ), 'required' => false, 'value' => $model->getCountryId( ), 'default' => '0', 'values' => $this->getCountryValues( ), 'disabled' => $isElementDisabled ) );\n\t\t\t\t$fieldset->addField( 'region_id', 'select', array( 'name' => 'region_id', 'label' => $helper->__( 'Region/State' ), 'title' => $helper->__( 'Region/State' ), 'required' => false, 'value' => $model->getRegionId( ), 'default' => '0', 'values' => $this->getRegionValues( ), 'disabled' => $isElementDisabled ) );\n\t\t\t\t$fieldset->addField( 'zip', 'text', array( 'name' => 'zip', 'label' => $helper->__( 'Zip/Postal Code' ), 'title' => $helper->__( 'Zip/Postal Code' ), 'note' => $helper->__( '* or blank - matches any' ), 'required' => false, 'value' => $this->getZipValue( ), 'default' => '', 'disabled' => $isElementDisabled ) );\n\t\t\t}\n\n\t\t\treturn $this;\n\t\t}", "static public function endTag(Filter $filter)\n {\n\t\treturn '\n\t\t</form>\n\t\t<!-- /. grid filter form -->\n\t</div>';\n }", "public function GoToEnd()\n {\n $this->setItemPointer(($this->Length() - 1));\n }", "protected function _prepareForm()\n {\n $form = new Varien_Data_Form(array(\n 'id' => 'add_form',\n 'action' => $this->getUrl('*/faq/save', array(\n 'ret' => Mage::registry('ret'),\n 'id' => $this->getRequest()->getParam('id')\n )\n ),\n 'method' => 'post'\n ));\n\n $fieldset = $form->addFieldset('faq_new_question', array(\n 'legend' => $this->__('New Question'),\n 'class' => 'fieldset-wide'\n ));\n\n $fieldset->addField('new_question', 'text', array(\n 'label' => Mage::helper('inchoo_faq')->__('New Question'),\n 'required' => true,\n 'name' => 'question'\n ));\n\n $fieldset->addField('new_answer', 'textarea', array(\n 'label' => Mage::helper('inchoo_faq')->__('Answer'),\n 'required' => false,\n 'name' => 'answer',\n 'style' => 'height:12em;',\n ));\n\n $form->setUseContainer(true);\n// $form->setValues();\n $this->setForm($form);\n\n// echo \"_prepareForm()\";\n\n return parent::_prepareForm();\n\n\n }", "public static function end_block()\n\t{\n\t\tself::$nivel_cabecalho -= 1;\n\t}" ]
[ "0.8683747", "0.7981708", "0.79485416", "0.7723414", "0.72680134", "0.7240373", "0.7168367", "0.7066881", "0.6913539", "0.6906262", "0.66773194", "0.66431904", "0.66132414", "0.65945315", "0.65435416", "0.651934", "0.6514329", "0.6514329", "0.65118724", "0.6454397", "0.6404884", "0.63327813", "0.62775", "0.62706536", "0.62546194", "0.6173254", "0.61599535", "0.60949916", "0.6075579", "0.6025077", "0.6003873", "0.5948766", "0.5883096", "0.5868224", "0.5846247", "0.5834369", "0.5820444", "0.57566315", "0.5743426", "0.5728728", "0.57125366", "0.5711984", "0.5664361", "0.5652172", "0.5629305", "0.56156963", "0.5613551", "0.560257", "0.5602348", "0.5581814", "0.5580095", "0.5565587", "0.54975", "0.5479923", "0.54789793", "0.54789793", "0.54620445", "0.5457568", "0.5447837", "0.54411566", "0.5435768", "0.54005176", "0.5398854", "0.539617", "0.53721666", "0.5370341", "0.53585035", "0.53467107", "0.5345964", "0.5340607", "0.53243446", "0.5322774", "0.5322774", "0.532062", "0.5288075", "0.5277151", "0.5257229", "0.5252275", "0.5251519", "0.5250264", "0.5247999", "0.52152956", "0.52107435", "0.5205592", "0.5204703", "0.52028656", "0.51967096", "0.51915765", "0.51911783", "0.5189899", "0.5178399", "0.5177741", "0.51742506", "0.51512253", "0.5143835", "0.5141952", "0.5131968", "0.51303244", "0.51279145", "0.5098389" ]
0.88671374
0
Set alternating row class "alt"
Установить альтернативный класс строки "alt"
public function set_alt_rows() { $this->alt_rows = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fancy_altrows($rows) {\r\n\tif(is_array($rows)) {\r\n\t\t$i = 0;\r\n\t\tforeach($rows as $text) { $i++; ?>\r\n\t\t\t\t\t<li class=\"<?php tablealt($i); ?>\"><?php echo $text; ?></li>\r\n<?php\r\n\t\t}\r\n\t}\r\n}", "function boxGetAltRowStyle($i, $classonly = false) {\n\t\tif ($i % 2 == 0)\n\t\t\t$ret = 'bgcolor-white';\n\t\telse\n\t\t\t$ret = 'bgcolor-grey';\n\t\tif ($classonly)\n\t\t\treturn $ret;\n\t\telse\n\t\t\treturn 'class=\"'.$ret.'\"';\n\t}", "public function setRowAlt($rowAlt)\n {\n $this->rowAlt = $this->checkRowAltRange($rowAlt);\n $this->childNodes = [];\n $this->append($this->makeTableRows());\n }", "function alternate_color($count)\n\t{\n\t\tif(($count%2) == 1)\n\t\t\techo 'class=\"row1\"';\n\t\telse\n\t\t\techo 'class=\"row2\"';\n\t}", "function tablealt($i) {\r\n\techo ($i%2 == 0) ? \" alt\" : \"\";\r\n}", "function rowcolor()\n {\n static $rowclass;\n\n if (empty($rowclass)) {\n $rowclass = 1;\n }\n\n if ($rowclass == 2) {\n $rowclass = 1;\n return \"row2\";\n } else {\n $rowclass = 2;\n return \"row1\";\n }\n }", "public function setElementRowClass(string $class)\n {\n $this->rowClass = $class;\n return $this;\n }", "function single_row( $item ) {\r\n\t\tstatic $row_class = '';\r\n\r\n\t\t// WP 4.2+ uses \"striped\" CSS styles to implement \"alternate\"\r\n\t\tif ( version_compare( get_bloginfo( 'version' ), '4.2', '<' ) ) {\r\n\t\t\t$row_class = ( $row_class == '' ? ' class=\"alternate\"' : '' );\r\n\t\t}\r\n\r\n\t\techo '<tr id=\"attachment-' . $item->ID . '\"' . $row_class . '>';\r\n\t\techo parent::single_row_columns( $item );\r\n\t\techo '</tr>';\r\n\t}", "public function setRowClasses($arrClasses){\n\t\t$this->arrClasses = $arrClasses;\n\t}", "public function setAlt($alt)\n {\n $this->alt = $alt;\n $this->setAttributes(\"Alt\");\n }", "public static function row_classes($classes, $row, $builder_id) {\n return !empty($row['styling'])?self::get_classes($row['styling'], $classes, 'row'):$classes;\n }", "function addRow($klass = '', $attr_ar = array())\n {\n $this->cur_section['rows'][] = array(\n 'klass' => $klass,\n 'atts' => $attr_ar,\n 'cells' => array()\n );\n\n }", "public function laratablesRowClass()\n\t\t{\n\t\t\t// $coa = Coa::find($this->id);\n\t\t\t//\tStorage::download('coapath/' . $this->coa_name);\n\n\t\t\treturn $this->active ? 'text-success' : '';\n\t\t}", "public function setAlternates(array $alternates = []): void\n {\n $this->writeAlternates($alternates, false);\n }", "private function checkRowAltRange($rowAlt)\n {\n return ($rowAlt > 0) ? $rowAlt : $this->rowAlt;\n }", "function SetClassesForDisplay( $class_4_odd, $class_4_even )\r\n\t\t{\r\n\t\t\t$this->class_display_odd = $class_4_odd;\r\n\t\t\t$this->class_display_even = $class_4_even;\r\n\t\t}", "public function get_row_class($series) {\n if ($series->finished) {\n return 'dimmed_text';\n }\n }", "function kdw_row_img($i){ \r\n \r\n if ($i == 'intro'){\r\n $options = get_field('kdw_page_intro_img_options'); \r\n $imgID = get_field('kdw_page_intro_img'); \r\n } else {\r\n $options = get_sub_field('options');\r\n $imgID = get_sub_field('img');\r\n }\r\n \r\n if ($options == 'large' ){\r\n $wrapper_class = 'row-inline-image-large';\r\n $size = 'wrapper-large';\r\n $img_size = 'large';\r\n \r\n } else if ( $options == 'medium'){\r\n $wrapper_class = 'row-inline-image-content';\r\n $size = 'wrapper-content';\r\n $img_size = 'medium';\r\n } else {\r\n // default = small\r\n $wrapper_class = 'row-inline-image-small';\r\n $size = 'wrapper-small';\r\n $img_size = 'medium';\r\n }\r\n \r\n if( $imgID && $options == 'bg1' || $options == 'bg2'){\r\n \r\n $bg_img = wp_get_attachment_image_src( $imgID , 'large' );\r\n \r\n // css styles for .row'$i'\r\n \r\n echo '<div class=\"row-bg-image row-bg-image-'.$options.' wrapper-outer row-margin row'.$i.' clearfix\" style=\"background-image: url('.$bg_img[0].');\">';\r\n echo '<div></div>';\r\n echo '</div>';\r\n \r\n } else if ($imgID){\r\n echo '<div class=\"row-inline-image wrapper-outer '.$wrapper_class.' row'.$i.' clearfix row-padding\">';\r\n echo '<div class=\"'.$wrapper_class.'\">';\r\n echo wp_get_attachment_image($imgID, $img_size);\r\n echo '</div>';\r\n echo '</div>';\r\n }\r\n}", "public function setRowsClasses($class1, $class2){\n\t\t$this->_class1 = $class1;\n\t\t$this->_class2 = $class2;\n\t}", "public function setRowsetClass($rowsetClass)\n {\n $this->_rowsetClass = (string)$rowsetClass;\n\n return $this;\n }", "function multiTableRow($row_attrs, $cell_data, $istitle = false) {\n\t\t$ap = html_ap();\n\t\t(isset($row_attrs['class'])) ? $row_attrs['class'] .= ' ff' : $row_attrs['class'] = 'ff';\n\t\tif ( $istitle ) {\n\t\t\t$row_attrs['class'] .= ' align-center';\n\t\t}\n\t\t$return = html_ao('tr', $row_attrs);\n\t\tfor ( $c = 0; $c < count($cell_data); $c++ ) {\n\t\t\t$locAp = html_ap();\n\t\t\t$cellAttrs = array();\n\t\t\tforeach (array_slice($cell_data[$c],1) as $k => $v) {\n\t\t\t\t$cellAttrs[$k] = $v;\n\t\t\t}\n\t\t\t(isset($cellAttrs['class'])) ? $cellAttrs['class'] .= ' ff' : $cellAttrs['class'] = 'ff';\n\t\t\t$return .= html_ao('td', $cellAttrs);\n\t\t\tif ( $istitle ) {\n\t\t\t\t$return .= html_ao('strong');\n\t\t\t}\n\t\t\t$return .= $cell_data[$c][0];\n\t\t\tif ( $istitle ) {\n\t\t\t\t$return .= html_ac(html_ap() -1);\n\t\t\t}\n\t\t\t$return .= html_ac($locAp);\n\t\t}\n\t\t$return .= html_ac($ap);\n\t\treturn $return;\n\t}", "function setRowClasses($field, $map)\n\t{\n\t\t$this->table->rowclasses['field'] = $field;\n\t\t$this->table->rowclasses['classes'] = $map;\n\t}", "function changeRowColor($pos)\n{\n\t\n\tif($pos % 2 == 1)\n\t{\n\t\techo \"#FFFFFF\";\n\t}\n\telse\n\t{\n\t\techo \"#D6E6F3\";\n\t}\n\n}", "public function setRowspan($num)\n {\n parent::setAttr(\"rowspan\", $num);\n }", "function RenderRow() {\r\r\tglobal $conn, $Security, $ratings;\r\r\r\r\t// Call Row Rendering event\r\r\t$ratings->Row_Rendering();\r\r\r\r\t// Common render codes for all row types\r\r\t// id\r\r\r\r\t$ratings->id->CellCssStyle = \"\";\r\r\t$ratings->id->CellCssClass = \"\";\r\r\r\r\t// rating\r\r\t$ratings->rating->CellCssStyle = \"\";\r\r\t$ratings->rating->CellCssClass = \"\";\r\r\r\r\t// domain\r\r\t$ratings->domain->CellCssStyle = \"\";\r\r\t$ratings->domain->CellCssClass = \"\";\r\r\tif ($ratings->RowType == EW_ROWTYPE_VIEW) { // View row\r\r\t} elseif ($ratings->RowType == EW_ROWTYPE_ADD) { // Add row\r\r\r\r\t\t// id\r\r\t\t$ratings->id->EditCustomAttributes = \"\";\r\r\t\t$ratings->id->EditValue = ew_HtmlEncode($ratings->id->CurrentValue);\r\r\r\r\t\t// rating\r\r\t\t$ratings->rating->EditCustomAttributes = \"\";\r\r\t\t$ratings->rating->EditValue = ew_HtmlEncode($ratings->rating->CurrentValue);\r\r\r\r\t\t// domain\r\r\t\t$ratings->domain->EditCustomAttributes = \"\";\r\r\t\t$ratings->domain->EditValue = ew_HtmlEncode($ratings->domain->CurrentValue);\r\r\t} elseif ($ratings->RowType == EW_ROWTYPE_EDIT) { // Edit row\r\r\t} elseif ($ratings->RowType == EW_ROWTYPE_SEARCH) { // Search row\r\r\t}\r\r\r\r\t// Call Row Rendered event\r\r\t$ratings->Row_Rendered();\r\r}", "public function getRowClass()\n {\n return ( $this->_end_date != $this->_begin_date && $this->_is_cotis) ?\n 'cotis-normal' :\n 'cotis-give';\n }", "public function addAlternates(array $alternates = []): void\n {\n $this->writeAlternates($alternates, true);\n }", "public function setAltText($alt)\n {\n $this->_alt = $alt;\n }", "function Row_Rendering() {\n\n\t\t// Enter your code here\t\n\t}", "function Row_Rendering() {\n\n\t\t// Enter your code here\t\n\t}", "public function setRowClass($rowClass)\n {\n $this->_rowClass = (string)$rowClass;\n\n return $this;\n }", "public function equalizeByRow(bool $flag = true) {\n if ($flag) {\n $this->getComponent()->attributes()->setAttribute('data-equalize-by-row', 'true');\n } else {\n $this->getComponent()->attributes()->remove('data-equalize-by-row');\n }\n return $this;\n }", "function update_row($selector, $i = 1, $row = \\false, $post_id = \\false)\n{\n}", "function startrow_func( $atts ){\n // Check if row name was provided\n if(!empty($atts['class'])){\n\n\treturn '<div class=\"X-row '.$atts['class'].'\">'; \n }\n else {\n\treturn '<div class=\"X-row\">';\n }\n\n}", "function oddeven_post_class ( $classes ) {\n global $current_class;\n $classes[] = $current_class;\n $current_class = ($current_class == 'odd') ? 'even' : 'odd';\n return $classes;\n}", "public function calculateRowClass($row)\n {\n return \"\";\n }", "public function getRowsetClass()\n {\n return $this->_rowsetClass;\n }", "public function getRowsetClass()\n {\n return $this->_rowsetClass;\n }", "public function getAlt()\n {\n return $this->alt;\n }", "function Event_Config_Cell_Rows($group,$text,$class)\n {\n return\n array\n (\n array\n (\n $this->Event_Config_Cell($group,$text,$class),\n \"\"\n ),\n );\n }", "public function rowWrapperClasses($classes)\n {\n $this->rowWrapperClasses = $classes;\n\n return $this;\n }", "public function storagemethod_row_multi($classes, $header, $contents) {\n\t\t?>\n\t\t\t<tr class=\"<?php echo $classes;?>\">\n\t\t\t\t<th><?php echo $header;?></th>\n\t\t\t\t<td><?php echo $contents;?></td>\n\t\t\t</tr>\n\t\t<?php\n\t}", "function table_highlight($counter)\r\n{\r\n if (($counter % 2) == 0) return TABLE_LIGHT;\r\n else return TABLE_DARK;\r\n}", "function give_linked_images_class($html, $id, $caption, $title, $align, $url, $size, $alt = '' ){\n\t\t$classes = '';\n\t\tif (has_term('','att_tax',$id)) {\n\t\t\t$terms = wp_get_post_terms($id, 'att_tax');\n\t\t\tif ($terms) {\n\t\t\t\tforeach ($terms as $term) {\n\t\t\t\t\t$classes .= $term->slug.' '; // separated by spaces, e.g. 'img image-link'\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// check if there are already classes assigned to the anchor\n\t\tif ( preg_match('/<a.*? class=\".*?\">/', $html) ) {\n\t\t$html = preg_replace('/(<a.*? class=\".*?)(\".*?>)/', '$1 ' . $classes . '$2', $html);\n\t\t} else {\n\t\t\t$html = preg_replace('/(<a.*?)>/', '$1 class=\"' . $classes . '\" >', $html);\n\t\t}\n\t\treturn $html;\n\t}", "function shortcode_row( $atts, $content = null ) {\n\t\textract( shortcode_atts( array(\n\t\t\t'class' => ''\n\t\t), $atts ) );\n\n\t\t$class = empty( $class )?'':( ' ' . $class );\n\t\t$result = '<div class=\"row' . esc_attr( $class ) . '\">';\n\t\t$result .= do_shortcode( $content );\n\t\t$result .= '</div>';\n\t\treturn $result;\n\t}", "function column_alt_text( $item ) {\r\n\t\tif ( isset( $item->mla_wp_attachment_image_alt ) ) {\r\n\t\t\tif ( is_array( $item->mla_wp_attachment_image_alt ) ) {\r\n\t\t\t\t$alt_text = $item->mla_wp_attachment_image_alt[0];\r\n\t\t\t} else {\r\n\t\t\t\t$alt_text = $item->mla_wp_attachment_image_alt;\r\n\t\t\t}\r\n\r\n\t\t\treturn sprintf( '<a href=\"%1$s\" title=\"' . __( 'Filter by', 'media-library-assistant' ) . ' &#8220;%2$s&#8221;\">%3$s</a>', esc_url( add_query_arg( array_merge( array(\r\n\t\t\t\t'page' => MLACore::ADMIN_PAGE_SLUG,\r\n\t\t\t\t'mla-metakey' => '_wp_attachment_image_alt',\r\n\t\t\t\t'mla-metavalue' => urlencode( $alt_text ),\r\n\t\t\t\t'heading_suffix' => urlencode( __( 'ALT Text', 'media-library-assistant' ) . ': ' . $alt_text ) \r\n\t\t\t), self::mla_submenu_arguments( false ) ), 'upload.php' ) ), esc_html( $alt_text ), esc_html( $alt_text ) );\r\n\t\t}\r\n\r\n\t\treturn '';\r\n\t}", "public function setTrTdAttr ($attr, $row=null) {\n if (is_numeric ($row))\n $this->_setAttr ($attr, $this->trtdAttr[$row]);\n else\n $this->_setAttr ($attr, $this->trtdAttr[]);\n }", "function presscore_tpl_masonry_item_wrap_class( $class = array() ) {\n\t\tif ( ! is_array( $class ) ) {\n\t\t\t$class = explode( ' ', $class );\n\t\t}\n\n\t\t$class[] = 'wf-cell';\n\n\t\t$config = presscore_config();\n\t\t// wide posts\n\t\tif ( ! $config->get( 'all_the_same_width' ) && 'wide' == $config->get( 'post.preview.width' ) ) {\n\t\t\t$class[] = 'double-width';\n\t\t}\n\n\t\t// masonry layout\n\t\tif ( 'masonry' == $config->get( 'layout' ) ) {\n\t\t\t$class[] = 'iso-item';\n\t\t}\n\n\t\t// if filter enabled\n\t\tif (\n\t\t\t$config->get( 'template.posts_filter.terms.enabled' ) ||\n\t\t\t$config->get( 'template.posts_filter.orderby.enabled' ) ||\n\t\t\t$config->get( 'template.posts_filter.order.enabled' )\n\t\t)\n\t\t{\n\t\t\t// add terms to class\n\t\t\t$taxonomy = apply_filters( 'presscore_before_post_masonry-filter_taxonomy', 'category', get_post_type() );\n\t\t\t$terms = get_the_terms( get_the_ID(), $taxonomy );\n\t\t\tif ( $terms && ! is_wp_error( $terms ) ) {\n\n\t\t\t\tforeach ( $terms as $term ) {\n\t\t\t\t\t$class[] = 'category-' . $term->term_id;\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\t$class[] = 'category-0';\n\t\t\t}\n\t\t}\n\n\t\t$class = apply_filters( 'presscore_before_post_masonry-wrap_class', $class );\n\n\t\treturn 'class=\"' . presscore_esc_implode( ' ', $class ) . '\" ';\n\t}", "public function new_row($css = '', $extras='') {\n\n if ($this->_cellopen) {\n $this->end_cell();\n }\n\n if ($this->_rowopen) {\n $this->end_row();\n }\n\n if ($this->_newid != '') {\n $extras .= ' id=\"'.$this->_newid.'\"';\n\n $this->_newid = '';\n }\n\n echo '<tr'.($css != '' ? ' class=\"'.$css.'\"' : '').($extras != '' ? ' '.$extras : '').'>';\n $this->_rowopen = true;\n }", "function skin_sets_overview_row( $r, $forums, $hidden, $default, $menulist, $i_sets, $no_sets, $folder_icon, $line_image, $css_extra ) {\n\n$IPBHTML = \"\";\n//--starthtml--//\n\n$IPBHTML .= <<<EOF\n<tr>\n <td class='tablerow1'>\n <!--$i_sets,$no_sets-->{$line_image}<!--ID:{$r['set_skin_set_id']}--><img src='{$this->ipsclass->skin_acp_url}/images/{$folder_icon}' border='0' alt='Стиль' style='vertical-align:middle' />\n <strong style='{$css_extra}'>{$r['set_name']}</strong>\n </td>\n <td class='tablerow1' width='5%' nowrap='nowrap' align='center'>{$forums} {$hidden} {$default}</td>\n <td class='tablerow1' width='5%'><img id=\"menu{$r['set_skin_set_id']}\" src='{$this->ipsclass->skin_acp_url}/images/filebrowser_action.gif' border='0' alt='Опции' class='ipd' /></td>\n</tr>\n<script type=\"text/javascript\">\n menu_build_menu(\n \"menu{$r['set_skin_set_id']}\",\n new Array(\n\t\t\t$menulist\n \t\t ) );\n </script>\nEOF;\n\n//--endhtml--//\nreturn $IPBHTML;\n}", "private function makeTableRows($rowAttr = [])\n {\n // Reshape array $this->tableData such that each array entry contains\n // $this->nCols nodes. => Each array entry corresponds to one\n // row of table elements.\n $tableData = array_chunk(\n $this->makeTableData($this->inputData),\n $this->nCols\n );\n // Set up table content\n $rowCount = 0;\n $altRowCount = 0;\n $tr = new HtmlNode(kind: 'tr');\n foreach ($tableData as $nodesPerRow) {\n $tr_tmp = clone $tr;\n // Set (imported) row attributes\n if (isset($rowAttr[$rowCount])) {\n $tr_tmp->setAttributes($rowAttr[$rowCount]);\n }\n // Label alternative rows\n if (($rowCount >= $this->rowOffset)) {\n if (($altRowCount % $this->rowAlt) === 0) {\n $tr_tmp->setAttributes(['class' => 'alt'], 'add');\n }\n ++$altRowCount;\n }\n ++$rowCount;\n $tr_tmp->append($nodesPerRow);\n $tableRows[] = $tr_tmp;\n }\n return $tableRows;\n }", "public function setPrintRepeatRows($row_start, $row_end) {\n\t}", "function be_display_post_class( $classes, $post, $listing, $atts ) {\r\n\tif( !isset( $atts['columns'] ) )\r\n\t\treturn $classes;\r\n\t\t\r\n\t$columns = array( '', '', 'one-half', 'one-third', 'one-fourth', 'one-fifth', 'one-sixth' );\r\n\t$classes[] = $columns[$atts['columns']];\r\n\tif( 0 == $listing->current_post || 0 == $listing->current_post % $atts['columns'] )\r\n\t\t$classes[] = 'first';\r\n\treturn $classes;\r\n}", "function latto_preprocess_views_view_unformatted(&$vars) {\n \n // Class names for overwriting\n $row_first = \"first\";\n $row_last = \"last\";\n\n $view = $vars['view'];\n $rows = $vars['rows'];\n \n // Set arrays\n $vars['classes_array'] = array();\n $vars['classes'] = array();\n\n // Variables\n $count = 0;\n $max = count($rows);\n \n // Loop through the rows and overwrite the classes\n foreach ($rows as $id => $row) {\n $count++; \n \n $vars['classes'][$id][] = $count % 2 ? 'odd' : 'even';\n \n if ($count == 1) {\n $vars['classes'][$id][] = $row_first;\n }\n if ($count == $max) {\n $vars['classes'][$id][] = $row_last;\n }\n\n if ($row_class = $view->style_plugin->get_row_class($id)) {\n $vars['classes'][$id][] = $row_class;\n }\n\n if ( $vars['classes'] && $vars['classes'][$id] ){\n $vars['classes_array'][$id] = implode(' ', $vars['classes'][$id]);\n } else {\n $vars['classes_array'][$id] = '';\n }\n }\n}", "public function addRow() {\n if ($this->linesCount >= 0)\n $this->addContent('</div>');\n $this->linesCount ++;\n $this->colunsCount = 0;\n $this->addContent('<div class=\"row\" >');\n }", "function CalculateDisplayClass()\r\n\t\t{\r\n\t\t\t$this->class_for_display = \"\";\r\n\t\t\t\r\n\t\t\tif( $this->class_display_even != \"\" )\r\n\t\t\t{\r\n\t\t\t\t $this->class_for_display = $this->class_display_odd;\r\n\t\t\t\t \r\n\t\t\t\t if( $this->numRows % 2 == 1 )\r\n\t\t\t\t\t$this->class_for_display = $this->class_display_even;\r\n\t\t\t}\r\n\t\t}", "public function getRowClass()\n {\n return $this->_rowClass;\n }", "function setclass($row, $column, $value){\n\t$class='';\n\tif($row==4||$row==7){\n\t\t$class='top';\n\t}\n\tif($column==4||$column==7){\n\t\t$class.=' left';\n\t}\n\tif(strlen($value)<=1){\n\t\t$class.=' single';\n\t}\n\treturn $class;\n}", "public function RenderThumbs_forRow(array $arImRow) {\n\t$rcImg = $this->ImageInfoQuery()->SpawnRecordset();\n\t$htImg = NULL;\n\t$sTitle = $this->RenderSummary_text();\n\tforeach ($arImRow as $idImg => $arImg) {\n\t $rcImg->SetFieldValues($arImg);\n\t $htImg .= $rcImg->RenderInline_row($sTitle,vctImages::SIZE_THUMB);\n\t}\n\t$htHref = $this->TitleHREF();\n\treturn $htHref.$htImg.'</a>';\n }", "function class_odd_or_even( $num ) {\n echo ($num%2) ? ' item-odd' : ' item-even';\n}", "public function renderListRow($table, $row, $cc, $titleCol, $thumbsCol, $indent = 0)\n { \n if (!is_array($row)) {\n return '';\n } \n \n $this->fieldArray[] = '_CONTROL_';\n $this->fieldArray[] = '_CLIPBOARD_';\n $rowOutput = '';\n $id_orig = null;\n // If in search mode, make sure the preview will show the correct page\n if ((string)$this->searchString !== '') {\n $id_orig = $this->id;\n $this->id = $row['pid'];\n }\n \n $tagAttributes = [\n 'class' => ['t3js-entity'],\n 'data-table' => $table,\n 'title' => 'id=' . $row['uid'],\n ];\n \n // Add special classes for first and last row\n if ($cc == 1 && $indent == 0) {\n $tagAttributes['class'][] = 'firstcol';\n }\n if ($cc == $this->totalRowCount || $cc == $this->iLimit) {\n $tagAttributes['class'][] = 'lastcol';\n }\n // Overriding with versions background color if any:\n if (!empty($row['_CSSCLASS'])) {\n $tagAttributes['class'] = [$row['_CSSCLASS']];\n }\n // Incr. counter.\n $this->counter++;\n // The icon with link\n $toolTip = BackendUtility::getRecordToolTip($row, $table);\n\n \n\n $additionalStyle = $indent ? ' style=\"margin-left: ' . $indent . 'px;\"' : '';\n $iconImg = '<span ' . $toolTip . ' ' . $additionalStyle . '>'\n . $this->iconFactory->getIconForRecord($table, $row, Icon::SIZE_SMALL)->render()\n . '</span>'; \n $theIcon = $this->clickMenuEnabled ? BackendUtility::wrapClickMenuOnIcon($iconImg, $table, $row['uid']) : $iconImg;\n // Preparing and getting the data-array\n $theData = [];\n $localizationMarkerClass = '';\n foreach ($this->fieldArray as $fCol) {\n \n if ($fCol == $titleCol) {\n $recTitle = BackendUtility::getRecordTitle($table, $row, false, true);\n $warning = '';\n // If the record is edit-locked\tby another user, we will show a little warning sign:\n $lockInfo = BackendUtility::isRecordLocked($table, $row['uid']);\n if ($lockInfo) {\n $warning = '<span data-toggle=\"tooltip\" data-placement=\"right\" data-title=\"' . htmlspecialchars($lockInfo['msg']) . '\">'\n . $this->iconFactory->getIcon('status-warning-in-use', Icon::SIZE_SMALL)->render() . '</span>';\n }\n $theData[$fCol] = $theData['__label'] = $warning . $this->linkWrapItems($table, $row['uid'], $recTitle, $row);\n // Render thumbnails, if:\n // - a thumbnail column exists\n // - there is content in it\n // - the thumbnail column is visible for the current type\n $type = 0;\n if (isset($GLOBALS['TCA'][$table]['ctrl']['type'])) {\n $typeColumn = $GLOBALS['TCA'][$table]['ctrl']['type'];\n $type = $row[$typeColumn];\n }\n // If current type doesn't exist, set it to 0 (or to 1 for historical reasons,\n // if 0 doesn't exist)\n if (!isset($GLOBALS['TCA'][$table]['types'][$type])) {\n $type = isset($GLOBALS['TCA'][$table]['types'][0]) ? 0 : 1;\n }\n $visibleColumns = $GLOBALS['TCA'][$table]['types'][$type]['showitem'];\n \n if ($this->thumbs &&\n trim($row[$thumbsCol]) &&\n preg_match('/(^|(.*(;|,)?))' . $thumbsCol . '(((;|,).*)|$)/', $visibleColumns) === 1\n ) {\n $thumbCode = '<br />' . $this->thumbCode($row, $table, $thumbsCol);\n $theData[$fCol] .= $thumbCode;\n $theData['__label'] .= $thumbCode;\n }\n if (isset($GLOBALS['TCA'][$table]['ctrl']['languageField'])\n && $row[$GLOBALS['TCA'][$table]['ctrl']['languageField']] != 0\n && $row[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']] != 0\n ) {\n // It's a translated record with a language parent\n $localizationMarkerClass = ' localization';\n }\n } elseif ($fCol === 'pid') {\n $theData[$fCol] = $row[$fCol];\n } elseif ($fCol === '_PATH_') {\n $theData[$fCol] = $this->recPath($row['pid']);\n } elseif ($fCol === '_REF_') {\n $theData[$fCol] = $this->createReferenceHtml($table, $row['uid']);\n } elseif ($fCol === '_CONTROL_') {\n $theData[$fCol] = $this->makeControl($table, $row);\n } elseif ($fCol === '_CLIPBOARD_') {\n $theData[$fCol] = $this->makeClip($table, $row);\n } elseif ($fCol === '_LOCALIZATION_') {\n list($lC1, $lC2) = $this->makeLocalizationPanel($table, $row);\n $theData[$fCol] = $lC1;\n $theData[$fCol . 'b'] = '<div class=\"btn-group\">' . $lC2 . '</div>';\n } elseif ($fCol === '_LOCALIZATION_b') {\n // deliberately empty\n } else {\n $pageId = $table === 'pages' ? $row['uid'] : $row['pid'];\n $tmpProc = BackendUtility::getProcessedValueExtra($table, $fCol, $row[$fCol], 100, $row['uid'], true, $pageId);\n $theData[$fCol] = $this->linkUrlMail(htmlspecialchars($tmpProc), $row[$fCol]);\n if ($this->csvOutput) {\n $row[$fCol] = BackendUtility::getProcessedValueExtra($table, $fCol, $row[$fCol], 0, $row['uid']);\n }\n }\n }\n // Reset the ID if it was overwritten\n if ((string)$this->searchString !== '') {\n $this->id = $id_orig;\n }\n // Add row to CSV list:\n if ($this->csvOutput) {\n $this->addToCSV($row);\n }\n // Add classes to table cells\n $this->addElement_tdCssClass[$titleCol] = 'col-title col-responsive' . $localizationMarkerClass;\n $this->addElement_tdCssClass['__label'] = $this->addElement_tdCssClass[$titleCol];\n $this->addElement_tdCssClass['_CONTROL_'] = 'col-control';\n if ($this->getModule()->MOD_SETTINGS['clipBoard']) {\n $this->addElement_tdCssClass['_CLIPBOARD_'] = 'col-clipboard';\n }\n $this->addElement_tdCssClass['_PATH_'] = 'col-path';\n $this->addElement_tdCssClass['_LOCALIZATION_'] = 'col-localizationa';\n $this->addElement_tdCssClass['_LOCALIZATION_b'] = 'col-localizationb';\n // Create element in table cells:\n $theData['uid'] = $row['uid'];\n if (isset($GLOBALS['TCA'][$table]['ctrl']['languageField'])\n && isset($GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'])\n && $table !== 'pages_language_overlay'\n ) {\n $theData['_l10nparent_'] = $row[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']];\n }\n \n $tagAttributes = array_map(\n function ($attributeValue) {\n if (is_array($attributeValue)) {\n return implode(' ', $attributeValue);\n }\n return $attributeValue;\n },\n $tagAttributes\n );\n \n $rowOutput .= $this->addElement(1, $theIcon, $theData, GeneralUtility::implodeAttributes($tagAttributes, true));\n // Finally, return table row element:\n return $rowOutput;\n }", "public function addRowButtonClasses($classes)\n {\n $this->addRowButtonClasses = $classes;\n\n return $this;\n }", "public function addRowClass($field, $map) {\n\t\t$js = '';\n\t\tforeach($map as $v => $c) {$js .= sprintf('case \"%s\" : jQuery(r).addClass(\"%s\");break;',$v, $c);}\n\t\t$js = sprintf('function(r,d,i) {switch(d[%d]) {%s}}', $this->getColumnIdByLabel($field), $js);\n\t\t$this->setJqueryParam('fnRowCallback', new Zend_Json_Expr($js));\n\t}", "function add_class_to_image($html, $id, $alt, $title, $align, $url, $size) {\n\t$border = true;\n\t$border = get_field('border', $id);\n\tif (!$border) {\n\t\treturn str_replace('class=\"', 'class=\"no-border ', $html);\n\t} else {\n\t\treturn $html;\n\t}\n}", "function RenderRow() {\r\n\t\tglobal $conn, $Security, $Language, $fs_multijoin_v;\r\n\r\n\t\t// Initialize URLs\r\n\t\t$this->ViewUrl = $fs_multijoin_v->ViewUrl();\r\n\t\t$this->EditUrl = $fs_multijoin_v->EditUrl();\r\n\t\t$this->InlineEditUrl = $fs_multijoin_v->InlineEditUrl();\r\n\t\t$this->CopyUrl = $fs_multijoin_v->CopyUrl();\r\n\t\t$this->InlineCopyUrl = $fs_multijoin_v->InlineCopyUrl();\r\n\t\t$this->DeleteUrl = $fs_multijoin_v->DeleteUrl();\r\n\r\n\t\t// Call Row_Rendering event\r\n\t\t$fs_multijoin_v->Row_Rendering();\r\n\r\n\t\t// Common render codes for all row types\r\n\t\t// id\r\n\r\n\t\t$fs_multijoin_v->id->CellCssStyle = \"\"; $fs_multijoin_v->id->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->id->CellAttrs = array(); $fs_multijoin_v->id->ViewAttrs = array(); $fs_multijoin_v->id->EditAttrs = array();\r\n\r\n\t\t// mount\r\n\t\t$fs_multijoin_v->mount->CellCssStyle = \"\"; $fs_multijoin_v->mount->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->mount->CellAttrs = array(); $fs_multijoin_v->mount->ViewAttrs = array(); $fs_multijoin_v->mount->EditAttrs = array();\r\n\r\n\t\t// path\r\n\t\t$fs_multijoin_v->path->CellCssStyle = \"\"; $fs_multijoin_v->path->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->path->CellAttrs = array(); $fs_multijoin_v->path->ViewAttrs = array(); $fs_multijoin_v->path->EditAttrs = array();\r\n\r\n\t\t// parent\r\n\t\t$fs_multijoin_v->parent->CellCssStyle = \"\"; $fs_multijoin_v->parent->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->parent->CellAttrs = array(); $fs_multijoin_v->parent->ViewAttrs = array(); $fs_multijoin_v->parent->EditAttrs = array();\r\n\r\n\t\t// deprecated\r\n\t\t$fs_multijoin_v->deprecated->CellCssStyle = \"\"; $fs_multijoin_v->deprecated->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->deprecated->CellAttrs = array(); $fs_multijoin_v->deprecated->ViewAttrs = array(); $fs_multijoin_v->deprecated->EditAttrs = array();\r\n\r\n\t\t// name\r\n\t\t$fs_multijoin_v->name->CellCssStyle = \"\"; $fs_multijoin_v->name->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->name->CellAttrs = array(); $fs_multijoin_v->name->ViewAttrs = array(); $fs_multijoin_v->name->EditAttrs = array();\r\n\r\n\t\t// snapshot\r\n\t\t$fs_multijoin_v->snapshot->CellCssStyle = \"\"; $fs_multijoin_v->snapshot->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->snapshot->CellAttrs = array(); $fs_multijoin_v->snapshot->ViewAttrs = array(); $fs_multijoin_v->snapshot->EditAttrs = array();\r\n\r\n\t\t// tapebackup\r\n\t\t$fs_multijoin_v->tapebackup->CellCssStyle = \"\"; $fs_multijoin_v->tapebackup->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->tapebackup->CellAttrs = array(); $fs_multijoin_v->tapebackup->ViewAttrs = array(); $fs_multijoin_v->tapebackup->EditAttrs = array();\r\n\r\n\t\t// diskbackup\r\n\t\t$fs_multijoin_v->diskbackup->CellCssStyle = \"\"; $fs_multijoin_v->diskbackup->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->diskbackup->CellAttrs = array(); $fs_multijoin_v->diskbackup->ViewAttrs = array(); $fs_multijoin_v->diskbackup->EditAttrs = array();\r\n\r\n\t\t// type\r\n\t\t$fs_multijoin_v->type->CellCssStyle = \"\"; $fs_multijoin_v->type->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->type->CellAttrs = array(); $fs_multijoin_v->type->ViewAttrs = array(); $fs_multijoin_v->type->EditAttrs = array();\r\n\r\n\t\t// CONTACT\r\n\t\t$fs_multijoin_v->CONTACT->CellCssStyle = \"\"; $fs_multijoin_v->CONTACT->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->CONTACT->CellAttrs = array(); $fs_multijoin_v->CONTACT->ViewAttrs = array(); $fs_multijoin_v->CONTACT->EditAttrs = array();\r\n\r\n\t\t// CONTACT2\r\n\t\t$fs_multijoin_v->CONTACT2->CellCssStyle = \"\"; $fs_multijoin_v->CONTACT2->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->CONTACT2->CellAttrs = array(); $fs_multijoin_v->CONTACT2->ViewAttrs = array(); $fs_multijoin_v->CONTACT2->EditAttrs = array();\r\n\r\n\t\t// RESCOMP\r\n\t\t$fs_multijoin_v->RESCOMP->CellCssStyle = \"\"; $fs_multijoin_v->RESCOMP->CellCssClass = \"\";\r\n\t\t$fs_multijoin_v->RESCOMP->CellAttrs = array(); $fs_multijoin_v->RESCOMP->ViewAttrs = array(); $fs_multijoin_v->RESCOMP->EditAttrs = array();\r\n\t\tif ($fs_multijoin_v->RowType == EW_ROWTYPE_VIEW) { // View row\r\n\r\n\t\t\t// id\r\n\t\t\t$fs_multijoin_v->id->ViewValue = $fs_multijoin_v->id->CurrentValue;\r\n\t\t\t$fs_multijoin_v->id->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->id->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->id->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// mount\r\n\t\t\t$fs_multijoin_v->mount->ViewValue = $fs_multijoin_v->mount->CurrentValue;\r\n\t\t\t$fs_multijoin_v->mount->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->mount->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->mount->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// path\r\n\t\t\t$fs_multijoin_v->path->ViewValue = $fs_multijoin_v->path->CurrentValue;\r\n\t\t\t$fs_multijoin_v->path->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->path->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->path->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// parent\r\n\t\t\t$fs_multijoin_v->parent->ViewValue = $fs_multijoin_v->parent->CurrentValue;\r\n\t\t\t$fs_multijoin_v->parent->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->parent->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->parent->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// deprecated\r\n\t\t\t$fs_multijoin_v->deprecated->ViewValue = $fs_multijoin_v->deprecated->CurrentValue;\r\n\t\t\t$fs_multijoin_v->deprecated->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->deprecated->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->deprecated->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// name\r\n\t\t\t$fs_multijoin_v->name->ViewValue = $fs_multijoin_v->name->CurrentValue;\r\n\t\t\t$fs_multijoin_v->name->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->name->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->name->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// snapshot\r\n\t\t\t$fs_multijoin_v->snapshot->ViewValue = $fs_multijoin_v->snapshot->CurrentValue;\r\n\t\t\t$fs_multijoin_v->snapshot->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->snapshot->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->snapshot->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// tapebackup\r\n\t\t\t$fs_multijoin_v->tapebackup->ViewValue = $fs_multijoin_v->tapebackup->CurrentValue;\r\n\t\t\t$fs_multijoin_v->tapebackup->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->tapebackup->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->tapebackup->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// diskbackup\r\n\t\t\t$fs_multijoin_v->diskbackup->ViewValue = $fs_multijoin_v->diskbackup->CurrentValue;\r\n\t\t\t$fs_multijoin_v->diskbackup->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->diskbackup->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->diskbackup->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// type\r\n\t\t\t$fs_multijoin_v->type->ViewValue = $fs_multijoin_v->type->CurrentValue;\r\n\t\t\t$fs_multijoin_v->type->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->type->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->type->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// CONTACT\r\n\t\t\t$fs_multijoin_v->CONTACT->ViewValue = $fs_multijoin_v->CONTACT->CurrentValue;\r\n\t\t\t$fs_multijoin_v->CONTACT->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->CONTACT->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->CONTACT->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// CONTACT2\r\n\t\t\t$fs_multijoin_v->CONTACT2->ViewValue = $fs_multijoin_v->CONTACT2->CurrentValue;\r\n\t\t\t$fs_multijoin_v->CONTACT2->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->CONTACT2->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->CONTACT2->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// RESCOMP\r\n\t\t\t$fs_multijoin_v->RESCOMP->ViewValue = $fs_multijoin_v->RESCOMP->CurrentValue;\r\n\t\t\t$fs_multijoin_v->RESCOMP->CssStyle = \"\";\r\n\t\t\t$fs_multijoin_v->RESCOMP->CssClass = \"\";\r\n\t\t\t$fs_multijoin_v->RESCOMP->ViewCustomAttributes = \"\";\r\n\r\n\t\t\t// id\r\n\t\t\t$fs_multijoin_v->id->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->id->TooltipValue = \"\";\r\n\r\n\t\t\t// mount\r\n\t\t\t$fs_multijoin_v->mount->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->mount->TooltipValue = \"\";\r\n\r\n\t\t\t// path\r\n\t\t\t$fs_multijoin_v->path->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->path->TooltipValue = \"\";\r\n\r\n\t\t\t// parent\r\n\t\t\t$fs_multijoin_v->parent->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->parent->TooltipValue = \"\";\r\n\r\n\t\t\t// deprecated\r\n\t\t\t$fs_multijoin_v->deprecated->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->deprecated->TooltipValue = \"\";\r\n\r\n\t\t\t// name\r\n\t\t\t$fs_multijoin_v->name->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->name->TooltipValue = \"\";\r\n\r\n\t\t\t// snapshot\r\n\t\t\t$fs_multijoin_v->snapshot->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->snapshot->TooltipValue = \"\";\r\n\r\n\t\t\t// tapebackup\r\n\t\t\t$fs_multijoin_v->tapebackup->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->tapebackup->TooltipValue = \"\";\r\n\r\n\t\t\t// diskbackup\r\n\t\t\t$fs_multijoin_v->diskbackup->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->diskbackup->TooltipValue = \"\";\r\n\r\n\t\t\t// type\r\n\t\t\t$fs_multijoin_v->type->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->type->TooltipValue = \"\";\r\n\r\n\t\t\t// CONTACT\r\n\t\t\t$fs_multijoin_v->CONTACT->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->CONTACT->TooltipValue = \"\";\r\n\r\n\t\t\t// CONTACT2\r\n\t\t\t$fs_multijoin_v->CONTACT2->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->CONTACT2->TooltipValue = \"\";\r\n\r\n\t\t\t// RESCOMP\r\n\t\t\t$fs_multijoin_v->RESCOMP->HrefValue = \"\";\r\n\t\t\t$fs_multijoin_v->RESCOMP->TooltipValue = \"\";\r\n\t\t}\r\n\r\n\t\t// Call Row Rendered event\r\n\t\tif ($fs_multijoin_v->RowType <> EW_ROWTYPE_AGGREGATEINIT)\r\n\t\t\t$fs_multijoin_v->Row_Rendered();\r\n\t}", "function tfuse_row($atts, $content = null)\n{\n extract(shortcode_atts(array('class' => ''), $atts));\n if($class) $class = ' ' . $class;else $class = '';\n\n return '<div class=\"row clearfix ' . $class . '\">' . do_shortcode($content) . '</div>';\n}", "function addRow($rowData, $options = array()) {\r\n\r\n\t $this->rowCount++;\r\n\r\n\t $rowalign = _get_option($options, \"align\", false);\r\n\r\n\t // Start the row, indicate even/oneven\r\n\t $html = \" <tr class=\\\"\";\r\n\t if ( _get_option($options, \"static\", false)) {\r\n\t\t\t$html .= \"static\";\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$html .= (($this->rowCount % 2) == 0) ? \"even\" : \"oneven\";\r\n\t\t}\r\n\r\n\t\t$html .= \" \" . _get_option($options, \"rowClass\", \"\");\r\n\r\n\t\t$html .= \"\\\"\";\r\n\r\n\t\t$style = _get_option($options, \"style\", \"\");\r\n\r\n\t if ( $style != \"\") {\r\n\t $html .= \" style=\\\"$style\\\"\";\r\n\t }\r\n\r\n // Insert user defined attributes for the tr tag\r\n foreach(_get_option($options, \"trAttributes\", array()) as $attribute => $value)\r\n {\r\n $html .= \" \" . $attribute . '=\"' . addslashes($value) . '\"';\r\n }\r\n\r\n\t\t$html .= \">\\n\";\r\n\r\n\t // Draw each cell in the row\r\n\t\tfor($i = 0; $i < $this->colCount; $i++) {\r\n\r\n\t\t // Opening td tag with options\r\n \t\t$html .= \" <td\";\r\n\r\n\t\t\t$html .= \" id='cell_\" . $this->rowCount . \"_$i'\";\r\n\r\n \t\tif ($rowalign) {\r\n\t\t\t $html .= \" align=\\\"$rowalign\\\"\";\r\n\t\t\t}\r\n\t\t else if ( isset($this->columnInfo[$i][\"align\"])) {\r\n\t\t\t $html .= \" align=\\\"\" . $this->columnInfo[$i][\"align\"] . \"\\\"\";\r\n\t\t\t}\r\n\r\n\t\t\tif ( is_array($rowData[$i]) && isset($rowData[$i][\"style\"]) ) {\r\n \t\t\t $html .= \" style=\\\"\" . $rowData[$i][\"style\"] . \"\\\"\";\r\n\t\t\t}\r\n\r\n // Insert user defined attributes for the td tag\r\n\t\t\tif (is_array($rowData[$i]) && isset($rowData[$i]['tdAttributes']))\r\n\t\t\t{\r\n foreach($rowData[$i]['tdAttributes'] as $attribute => $value)\r\n {\r\n $html .= \" \" . $attribute . '=\"' . addslashes($value) . '\"';\r\n }\r\n\t\t\t}\r\n\r\n\t\t\t$html .= \">\";\r\n\r\n\r\n\t\t\t$cellContent = '';\r\n\r\n\t\t\t$html .=\"<div style='overflow:hidden' \";\r\n\r\n\t\t\t// Cell content or empty\r\n\t\t\tif ( ! is_array($rowData[$i]) ){\r\n\t\t\t $cellContent = $rowData[$i];\r\n\r\n if (is_object($cellContent) && method_exists($cellContent, '__toString'))\r\n {\r\n $html .= \" title=\\\"\" . htmlentities(html_entity_decode(strip_tags((string) $cellContent)));\r\n }\r\n elseif (! is_object($cellContent))\r\n {\r\n $html .= \" title=\\\"\" . htmlentities(html_entity_decode(strip_tags($cellContent)));\r\n }\r\n\r\n $html .= '\"';\r\n\t\t\t}\r\n\t\t\telse if ( is_array($rowData[$i]) && isset($rowData[$i][\"content\"]) ) {\r\n\t\t\t\t$cellContent = $rowData[$i][\"content\"];\r\n if (! isset($rowData[$i]['divAttributes']['title']))\r\n {\r\n $html .= \" title=\\\"\" . htmlentities(html_entity_decode(strip_tags($cellContent)));\r\n }\r\n $html .= '\"';\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t $cellContent = \"&nbsp;\";\r\n\t\t\t}\r\n\r\n // Insert user defined attributes for the td tag\r\n\t\t\tif (is_array($rowData[$i]) && isset($rowData[$i]['divAttributes']))\r\n\t\t\t{\r\n foreach($rowData[$i]['divAttributes'] as $attribute => $value)\r\n {\r\n $html .= \" \" . $attribute . '=\"' . addslashes($value) . '\"';\r\n }\r\n\t\t\t}\r\n\r\n\t\t\t$html .= \">\";\r\n\r\n\t\t\t$html .= $cellContent;\r\n\r\n\t\t\t// End of cell\r\n\t\t\t$html .= \"</div>\";\r\n\t\t\t$html .= \" </td>\\n\";\r\n\t\t}\r\n\r\n\t\t// End of row\r\n\t\t$html .= \" </tr>\\n\";\r\n\t\t$this->rowDataHtml .= $html;\r\n\t}", "function naked_before_row( $data, $grid_attributes = null) {\n if ( isset($grid_attributes['style']['class']) ) {\n $id_html = \"id='\" . $grid_attributes['style']['class'] . \"'\";\n } else {\n $id_html = '';\n }\n $html = '<div class=\"offset section about\"' . $id_html . '><div class=\"container\">';\n\n return $html;\n }", "function row_shortcode( $atts, $content = null ) {\n\n\t$attribute = shortcode_atts( array(\n\t\t'align_items' => '',\n\t\t'align_content' => '',\n\t\t'justify_content' => '',\n\t\t'class' => '',\n\t\t'style' => ''\n\t), $atts );\n\n\t$attribute['style'] = $attribute['style'] ? 'style=\"'.$attribute['style'].'\"' : '';\n\t$attribute['class'] = $attribute['class'] ? ' '.$attribute['class'] : '';\n\t$attribute['align_items'] = $attribute['align_items'] ? ' align-items-'.$attribute['align_items'] : '';\n\t$attribute['align_content'] = $attribute['align-content'] ? ' align-content-'.$attribute['align_content'] : '';\n\t$attribute['justify_content'] = $attribute['justify_content'] ? ' justify-content-'.$attribute['justify_content'] : '';\n\n\treturn '<div '.$attribute['style']\n\t\t .' class=\"row'.$attribute['class']\n\t\t .$attribute['align_items']\n\t\t .$attribute['align_content']\n\t\t .$attribute['justify_content'].'\">'\n\t\t . do_shortcode($content) . '</div>';\n}", "protected function evaluateRowCssClass($row, $data)\n {\n $classes = array();\n\n $classes[] = $row % 2 ? 'even' : 'odd';\n $classes[] = 'daemon' . ($data->daemon->id % 8 + 1);\n\n return implode(' ', $classes);\n }", "function setZebra($zebra) {\n\t if($zebra == 'odd' || $zebra == 'even') $this->zebra = $zebra;\n\t else user_error(\"setZebra passed '$zebra'. It should be passed 'odd' or 'even'\", E_USER_WARNING);\n \t}", "public function resetExpandedRows()\n\t{\n\t\t$this->setExpandedRows();\n\t}", "function SetRowAlignment()\n\t{\n\t\tif ((!func_num_args()) || (!isset($this->_intCurrentRow)))\n\t\t{\n\t\t\t// no parameters were passed or there is no current row\n\t\t\treturn NULL;\n\t\t}\n\t\t\n\t\t// retrieve the alignment values\n\t\t$arrRowAlignments = func_get_args();\n\t\t\n\t\t$this->_arrRows[$this->_intCurrentRow]['Alignments'] = $arrRowAlignments;\n\n\t\treturn $this->_intCurrentRow;\n\t}", "protected function rowStyleOptions() {\n // Get all available row plugins by default.\n $options = Views::fetchPluginNames('row', 'normal', [$this->base_table]);\n return $options;\n }", "public function updateClassNames(&$classes)\n {\n if ($this->owner->isNoGutters()) {\n $classes[] = $this->style('row.no-gutters');\n }\n }", "function Row($data)\r\n{\r\n\t$nb=0;\r\n\tfor($i=0;$i<count($data);$i++)\r\n $nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\r\n\t$h=5*$nb;\r\n\t//Issue a page break first if needed\r\n\t$this->CheckPageBreak($h);\r\n\t//Draw the cells of the row\r\n\tfor($i=0;$i<count($data);$i++)\r\n\t{\r\n\t\t$w=$this->widths[$i];\r\n\t\t$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\r\n\t\t//Save the current position\r\n\t\t$x=$this->GetX();\r\n\t\t$y=$this->GetY();\r\n\t\t//Draw the border\r\n\r\n\t\t$this->Rect($x,$y,$w,$h);\r\n\r\n\t\t$this->MultiCell($w,5,$data[$i],0,$a,'true');\r\n\t\t//Put the position to the right of the cell\r\n\t\t$this->SetXY($x+$w,$y);\r\n\t}\r\n\t//Go to the next line\r\n\t$this->Ln($h);\r\n}", "function pixelgrade_blog_grid_class( $class = '', $location = '' ) {\n\t// Separates classes with a single space, collates classes\n\techo 'class=\"' . esc_attr( join( ' ', pixelgrade_get_blog_grid_class( $class, $location ) ) ) . '\"';\n}", "function getColumnClasses($count)\n {\n $itemclass = '';\n if ($count % 2 == 0) {\n $itemclass = 'even';\n } else {\n $itemclass = 'odd';\n }\n if ($count % 3 == 0) {\n $itemclass .= ' third';\n } else if (($count - 1) % 3 == 0) {\n $itemclass .= ' after-third';\n }\n if ($count % 4 == 0) {\n $itemclass .= ' fourth';\n } else if (($count - 1) % 4 == 0) {\n $itemclass .= ' after-fourth';\n }\n if ($count % 5 == 0) {\n $itemclass .= ' fifth';\n } else if (($count - 1) % 5 == 0) {\n $itemclass .= ' after-fifth';\n }\n return $itemclass;\n }", "function give_linked_images_class($html, $id, $caption, $title, $align, $url, $size, $alt = '' ){\n\t$rel = \"prettyPhoto\";\n \n\t// check if there are already rel assigned to the anchor\n\tif ( preg_match('/<a.*? rel=\".*?\">/', $html) ) {\n\t $html = preg_replace('/(<a.*? rel=\".*?)(\".*?>)/', '$1 ' . $rel . '$2', $html);\n\t} else {\n\t $html = preg_replace('/(<a.*?)>/', '$1 rel=\"' . $rel . '\" >', $html);\n\t}\n\treturn $html;\n }", "protected function getDesignAlternatingColor($methodName,$rowCounter,$type='BACKGROUND_COLOR'){\n\t\tif( !isset($this->settings['design'][$methodName]) ){\n\t\t\t$this->settings['design'][$methodName] = array($type=>array() );\n\t\t}\n\t\telseif( !isset($this->settings['design'][$methodName][$type]) ){\n\t\t\t$this->settings['design'][$methodName][$type] = array();\n\t\t}\n\n\t\t$count = count($this->settings['design'][$methodName][$type]);\n\t\t$count = $count == 0 ? 1 : $count;\n\n\t\t$mod = $rowCounter % $count;\n\t\treturn isset($this->settings['design'][$methodName][$type][$mod]) ? $this->settings['design'][$methodName][$type][$mod] : '';\n\n\t}", "public function getRowAttributes(RenderWalker $walker, int $index, array $row): array;", "private function mapHorizontal()\n {\n for ($i = $this->myRowPos; $i <= $this->totalNumCells; ($i+=$this->boardWidth)){\n $this->disabledCells[] = $i;\n }\n }", "function formatRow(){\n $this->hook('formatRow');\n }", "public function alt(){\n\t\tif( $this->alt ) {\n\t\t\treturn $this->alt;\n\t\t}//end if\n\n\t\t$this->alt = @file_get_contents( $this->base_dir.'/'.$this->dir . $this->filename . '.alt');\n\n\t\treturn $this->alt;\n\t}", "function RenderRow() {\n\t\tglobal $conn, $Security, $Language, $tbl_slide;\n\n\t\t// Initialize URLs\n\t\t$this->ViewUrl = $tbl_slide->ViewUrl();\n\t\t$this->EditUrl = $tbl_slide->EditUrl();\n\t\t$this->InlineEditUrl = $tbl_slide->InlineEditUrl();\n\t\t$this->CopyUrl = $tbl_slide->CopyUrl();\n\t\t$this->InlineCopyUrl = $tbl_slide->InlineCopyUrl();\n\t\t$this->DeleteUrl = $tbl_slide->DeleteUrl();\n\n\t\t// Call Row_Rendering event\n\t\t$tbl_slide->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// title\n\n\t\t$tbl_slide->title->CellCssStyle = \"\"; $tbl_slide->title->CellCssClass = \"\";\n\t\t$tbl_slide->title->CellAttrs = array(); $tbl_slide->title->ViewAttrs = array(); $tbl_slide->title->EditAttrs = array();\n\n\t\t// images\n\t\t$tbl_slide->images->CellCssStyle = \"\"; $tbl_slide->images->CellCssClass = \"\";\n\t\t$tbl_slide->images->CellAttrs = array(); $tbl_slide->images->ViewAttrs = array(); $tbl_slide->images->EditAttrs = array();\n\n\t\t// order_by\n\t\t$tbl_slide->order_by->CellCssStyle = \"\"; $tbl_slide->order_by->CellCssClass = \"\";\n\t\t$tbl_slide->order_by->CellAttrs = array(); $tbl_slide->order_by->ViewAttrs = array(); $tbl_slide->order_by->EditAttrs = array();\n\t\tif ($tbl_slide->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t\t// banner_id\n\t\t\t$tbl_slide->banner_id->ViewValue = $tbl_slide->banner_id->CurrentValue;\n\t\t\t$tbl_slide->banner_id->CssStyle = \"\";\n\t\t\t$tbl_slide->banner_id->CssClass = \"\";\n\t\t\t$tbl_slide->banner_id->ViewCustomAttributes = \"\";\n\n\t\t\t// title\n\t\t\t$tbl_slide->title->ViewValue = $tbl_slide->title->CurrentValue;\n\t\t\t$tbl_slide->title->CssStyle = \"\";\n\t\t\t$tbl_slide->title->CssClass = \"\";\n\t\t\t$tbl_slide->title->ViewCustomAttributes = \"\";\n\n\t\t\t// images\n\t\t\tif (!ew_Empty($tbl_slide->images->Upload->DbValue)) {\n\t\t\t\t$tbl_slide->images->ViewValue = $tbl_slide->images->Upload->DbValue;\n\t\t\t\t$tbl_slide->images->ImageWidth = 300;\n\t\t\t\t$tbl_slide->images->ImageHeight = 180;\n\t\t\t\t$tbl_slide->images->ImageAlt = $tbl_slide->images->FldAlt();\n\t\t\t} else {\n\t\t\t\t$tbl_slide->images->ViewValue = \"\";\n\t\t\t}\n\t\t\t$tbl_slide->images->CssStyle = \"\";\n\t\t\t$tbl_slide->images->CssClass = \"\";\n\t\t\t$tbl_slide->images->ViewCustomAttributes = \"\";\n\n\t\t\t// order_by\n\t\t\t$tbl_slide->order_by->ViewValue = $tbl_slide->order_by->CurrentValue;\n\t\t\t$tbl_slide->order_by->CssStyle = \"\";\n\t\t\t$tbl_slide->order_by->CssClass = \"\";\n\t\t\t$tbl_slide->order_by->ViewCustomAttributes = \"\";\n\n\t\t\t// title\n\t\t\t$tbl_slide->title->HrefValue = \"\";\n\t\t\t$tbl_slide->title->TooltipValue = \"\";\n\n\t\t\t// images\n\t\t\t$tbl_slide->images->HrefValue = \"\";\n\t\t\t$tbl_slide->images->TooltipValue = \"\";\n\n\t\t\t// order_by\n\t\t\t$tbl_slide->order_by->HrefValue = \"\";\n\t\t\t$tbl_slide->order_by->TooltipValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($tbl_slide->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$tbl_slide->Row_Rendered();\n\t}", "private function cssAut()\n {\n $this->active_class = explode(' ',$this->active_class);\n $this->active_class = $this->active_class[0];\n }", "public function classButtons($iterator) {\n\t\t$usedPrimary = false;\n\n\t\tif ($iterator instanceof Nette\\Application\\UI\\Form) {\n\t\t\t$iterator = $iterator->getComponents(true, '\\Nette\\Forms\\Controls\\Button');\n\t\t}\n\n\t\tforeach ($iterator as $button) {\n\t\t\t$button->setAttribute('class', empty($usedPrimary) ? 'btn btn-primary' : 'btn btn-inverse');\n\n\t\t\tif (!$button->getOption('notPrimary')) {\n\t\t\t\t$usedPrimary = TRUE;\n\t\t\t}\n\t\t}\n\t}", "protected function replacePluginForRows()\n {\n $this->newRow(new Row); // NOVA LINHA\n $col = new Col($this->currentRow); // CRIANDO COLUNA\n $this->currentRow->newCol($col); // ADICIONANDO COLUNA NA LINHA ATUAL\n $col->newPlugin($this->plugins[0]); // ADICIONANDO PLUGIN ATUAL NA COLUNA\n $this->plugins = null; // EXCLUINDO PLUGIN ANTIGO DA COLUNA\n }", "public function advanceLabelRow ()\r\n {\r\n $return = '';\r\n $this->label_column = 1;\r\n $return .= '\r\n </div>\r\n </div>';\r\n if (++$this->label_row > $this->number_of_rows)\r\n {\r\n $this->label_row =1;\r\n ++$this->label_page;\r\n $return .= '\r\n </div>\r\n <div class=\"labelpage\">';\r\n }\r\n $return .= '\r\n <div class=\"labelrow\">\r\n <div class=\"labelbody\">';\r\n return $return;\r\n }", "function tablerow_open($classes = null) {\n // initialize the cell counter used for classes\n $this->_counter['cell_counter'] = 0;\n $class = 'row'.$this->_counter['row_counter']++;\n if($classes !== null) {\n if(is_array($classes)) $classes = join(' ', $classes);\n $class .= ' ' . $classes;\n }\n $this->doc .= DOKU_TAB.'<tr class=\"'.$class.'\">'.DOKU_LF.DOKU_TAB.DOKU_TAB;\n }", "function be_portfolio_post_class( $classes ) {\n\t$columns = 3; // Set the number of columns here\n\t$column_classes = array( '', '', 'one-half', 'one-third', 'one-fourth', 'one-fifth', 'one-sixth' );\n\t$classes[] = $column_classes[$columns];\n\tglobal $wp_query;\n\tif( 0 == $wp_query->current_post || 0 == $wp_query->current_post % $columns )\n\t\t$classes[] = 'first';\n\treturn $classes;\n}", "function RenderRow() {\n\t\tglobal $conn, $Security, $planilla;\n\n\t\t// Call Row_Rendering event\n\t\t$planilla->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// idPlanilla\n\n\t\t$planilla->idPlanilla->CellCssStyle = \"\";\n\t\t$planilla->idPlanilla->CellCssClass = \"\";\n\n\t\t// Nombre\n\t\t$planilla->Nombre->CellCssStyle = \"\";\n\t\t$planilla->Nombre->CellCssClass = \"\";\n\t\tif ($planilla->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t\t// idPlanilla\n\t\t\t$planilla->idPlanilla->ViewValue = $planilla->idPlanilla->CurrentValue;\n\t\t\t$planilla->idPlanilla->CssStyle = \"\";\n\t\t\t$planilla->idPlanilla->CssClass = \"\";\n\t\t\t$planilla->idPlanilla->ViewCustomAttributes = \"\";\n\n\t\t\t// Nombre\n\t\t\t$planilla->Nombre->ViewValue = $planilla->Nombre->CurrentValue;\n\t\t\t$planilla->Nombre->CssStyle = \"\";\n\t\t\t$planilla->Nombre->CssClass = \"\";\n\t\t\t$planilla->Nombre->ViewCustomAttributes = \"\";\n\n\t\t\t// idPlanilla\n\t\t\t$planilla->idPlanilla->HrefValue = \"\";\n\n\t\t\t// Nombre\n\t\t\t$planilla->Nombre->HrefValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\t$planilla->Row_Rendered();\n\t}", "function Row($data){\r\n \t$nb=0;\r\n \tfor($i=0;$i<count($data);$i++)\r\n \t\t$nb=max($nb,$this->NbLines($this->widths[$i],$data[$i]));\r\n \t$h=5*$nb;\r\n \t//Issue a page break first if needed\r\n \t$this->CheckPageBreak($h);\r\n \t//Draw the cells of the row\r\n \tfor($i=0;$i<count($data);$i++)\r\n \t{\r\n \t\t$w=$this->widths[$i];\r\n \t\t//$a=isset($this->aligns[$i]) ? $this->aligns[$i] : 'L';\r\n $a=$this->aligns[$i];\r\n \t\t//Save the current position\r\n \t\t$x=$this->GetX();\r\n \t\t$y=$this->GetY();\r\n \t\t//Draw the border\r\n \t\t\r\n \t\t$this->Rect($x,$y,$w,$h);\r\n //$this->SetLineStyle(0);\r\n //$this->SetLineWidth($dash);\r\n \t\t$this->MultiCell($w,5,$data[$i],0,$a,'true');\r\n \t\t//Put the position to the right of the cell\r\n \t\t$this->SetXY($x+$w,$y);\r\n \t}\r\n \t//Go to the next line\r\n \t$this->Ln($h);\r\n }", "private function establishOtherRows()\n {\n for ($i = 1; $i <= $this->boardWidth; $i++) {\n if ($i == $this->myRowNum) {\n continue;\n }\n\n if ($i < $this->myRowNum) {\n $this->rowsAboveMe[] = $i;\n }\n\n if ($i > $this->myRowNum) {\n $this->rowsBelowMe[] = $i;\n }\n }\n }", "function RenderRow() {\n\t\tglobal $conn, $Security, $Language, $archv_finished;\n\n\t\t// Initialize URLs\n\t\t$this->ExportPrintUrl = $this->PageUrl() . \"export=print&\" . \"ID=\" . urlencode($archv_finished->ID->CurrentValue);\n\t\t$this->ExportHtmlUrl = $this->PageUrl() . \"export=html&\" . \"ID=\" . urlencode($archv_finished->ID->CurrentValue);\n\t\t$this->ExportExcelUrl = $this->PageUrl() . \"export=excel&\" . \"ID=\" . urlencode($archv_finished->ID->CurrentValue);\n\t\t$this->ExportWordUrl = $this->PageUrl() . \"export=word&\" . \"ID=\" . urlencode($archv_finished->ID->CurrentValue);\n\t\t$this->ExportXmlUrl = $this->PageUrl() . \"export=xml&\" . \"ID=\" . urlencode($archv_finished->ID->CurrentValue);\n\t\t$this->ExportCsvUrl = $this->PageUrl() . \"export=csv&\" . \"ID=\" . urlencode($archv_finished->ID->CurrentValue);\n\t\t$this->AddUrl = $archv_finished->AddUrl();\n\t\t$this->EditUrl = $archv_finished->EditUrl();\n\t\t$this->CopyUrl = $archv_finished->CopyUrl();\n\t\t$this->DeleteUrl = $archv_finished->DeleteUrl();\n\t\t$this->ListUrl = $archv_finished->ListUrl();\n\n\t\t// Call Row_Rendering event\n\t\t$archv_finished->Row_Rendering();\n\n\t\t// Common render codes for all row types\n\t\t// ID\n\n\t\t$archv_finished->ID->CellCssStyle = \"\"; $archv_finished->ID->CellCssClass = \"\";\n\t\t$archv_finished->ID->CellAttrs = array(); $archv_finished->ID->ViewAttrs = array(); $archv_finished->ID->EditAttrs = array();\n\n\t\t// strjrfnum\n\t\t$archv_finished->strjrfnum->CellCssStyle = \"\"; $archv_finished->strjrfnum->CellCssClass = \"\";\n\t\t$archv_finished->strjrfnum->CellAttrs = array(); $archv_finished->strjrfnum->ViewAttrs = array(); $archv_finished->strjrfnum->EditAttrs = array();\n\n\t\t// strquarter\n\t\t$archv_finished->strquarter->CellCssStyle = \"\"; $archv_finished->strquarter->CellCssClass = \"\";\n\t\t$archv_finished->strquarter->CellAttrs = array(); $archv_finished->strquarter->ViewAttrs = array(); $archv_finished->strquarter->EditAttrs = array();\n\n\t\t// strmon\n\t\t$archv_finished->strmon->CellCssStyle = \"\"; $archv_finished->strmon->CellCssClass = \"\";\n\t\t$archv_finished->strmon->CellAttrs = array(); $archv_finished->strmon->ViewAttrs = array(); $archv_finished->strmon->EditAttrs = array();\n\n\t\t// stryear\n\t\t$archv_finished->stryear->CellCssStyle = \"\"; $archv_finished->stryear->CellCssClass = \"\";\n\t\t$archv_finished->stryear->CellAttrs = array(); $archv_finished->stryear->ViewAttrs = array(); $archv_finished->stryear->EditAttrs = array();\n\n\t\t// strdate\n\t\t$archv_finished->strdate->CellCssStyle = \"\"; $archv_finished->strdate->CellCssClass = \"\";\n\t\t$archv_finished->strdate->CellAttrs = array(); $archv_finished->strdate->ViewAttrs = array(); $archv_finished->strdate->EditAttrs = array();\n\n\t\t// strtime\n\t\t$archv_finished->strtime->CellCssStyle = \"\"; $archv_finished->strtime->CellCssClass = \"\";\n\t\t$archv_finished->strtime->CellAttrs = array(); $archv_finished->strtime->ViewAttrs = array(); $archv_finished->strtime->EditAttrs = array();\n\n\t\t// strusername\n\t\t$archv_finished->strusername->CellCssStyle = \"\"; $archv_finished->strusername->CellCssClass = \"\";\n\t\t$archv_finished->strusername->CellAttrs = array(); $archv_finished->strusername->ViewAttrs = array(); $archv_finished->strusername->EditAttrs = array();\n\n\t\t// strusereadd\n\t\t$archv_finished->strusereadd->CellCssStyle = \"\"; $archv_finished->strusereadd->CellCssClass = \"\";\n\t\t$archv_finished->strusereadd->CellAttrs = array(); $archv_finished->strusereadd->ViewAttrs = array(); $archv_finished->strusereadd->EditAttrs = array();\n\n\t\t// strcompany\n\t\t$archv_finished->strcompany->CellCssStyle = \"\"; $archv_finished->strcompany->CellCssClass = \"\";\n\t\t$archv_finished->strcompany->CellAttrs = array(); $archv_finished->strcompany->ViewAttrs = array(); $archv_finished->strcompany->EditAttrs = array();\n\n\t\t// strdepartment\n\t\t$archv_finished->strdepartment->CellCssStyle = \"\"; $archv_finished->strdepartment->CellCssClass = \"\";\n\t\t$archv_finished->strdepartment->CellAttrs = array(); $archv_finished->strdepartment->ViewAttrs = array(); $archv_finished->strdepartment->EditAttrs = array();\n\n\t\t// strloc\n\t\t$archv_finished->strloc->CellCssStyle = \"\"; $archv_finished->strloc->CellCssClass = \"\";\n\t\t$archv_finished->strloc->CellAttrs = array(); $archv_finished->strloc->ViewAttrs = array(); $archv_finished->strloc->EditAttrs = array();\n\n\t\t// strposition\n\t\t$archv_finished->strposition->CellCssStyle = \"\"; $archv_finished->strposition->CellCssClass = \"\";\n\t\t$archv_finished->strposition->CellAttrs = array(); $archv_finished->strposition->ViewAttrs = array(); $archv_finished->strposition->EditAttrs = array();\n\n\t\t// strtelephone\n\t\t$archv_finished->strtelephone->CellCssStyle = \"\"; $archv_finished->strtelephone->CellCssClass = \"\";\n\t\t$archv_finished->strtelephone->CellAttrs = array(); $archv_finished->strtelephone->ViewAttrs = array(); $archv_finished->strtelephone->EditAttrs = array();\n\n\t\t// strcostcent\n\t\t$archv_finished->strcostcent->CellCssStyle = \"\"; $archv_finished->strcostcent->CellCssClass = \"\";\n\t\t$archv_finished->strcostcent->CellAttrs = array(); $archv_finished->strcostcent->ViewAttrs = array(); $archv_finished->strcostcent->EditAttrs = array();\n\n\t\t// strsubject\n\t\t$archv_finished->strsubject->CellCssStyle = \"\"; $archv_finished->strsubject->CellCssClass = \"\";\n\t\t$archv_finished->strsubject->CellAttrs = array(); $archv_finished->strsubject->ViewAttrs = array(); $archv_finished->strsubject->EditAttrs = array();\n\n\t\t// strnature\n\t\t$archv_finished->strnature->CellCssStyle = \"\"; $archv_finished->strnature->CellCssClass = \"\";\n\t\t$archv_finished->strnature->CellAttrs = array(); $archv_finished->strnature->ViewAttrs = array(); $archv_finished->strnature->EditAttrs = array();\n\n\t\t// strdescript\n\t\t$archv_finished->strdescript->CellCssStyle = \"\"; $archv_finished->strdescript->CellCssClass = \"\";\n\t\t$archv_finished->strdescript->CellAttrs = array(); $archv_finished->strdescript->ViewAttrs = array(); $archv_finished->strdescript->EditAttrs = array();\n\n\t\t// strarea\n\t\t$archv_finished->strarea->CellCssStyle = \"\"; $archv_finished->strarea->CellCssClass = \"\";\n\t\t$archv_finished->strarea->CellAttrs = array(); $archv_finished->strarea->ViewAttrs = array(); $archv_finished->strarea->EditAttrs = array();\n\n\t\t// strattach\n\t\t$archv_finished->strattach->CellCssStyle = \"\"; $archv_finished->strattach->CellCssClass = \"\";\n\t\t$archv_finished->strattach->CellAttrs = array(); $archv_finished->strattach->ViewAttrs = array(); $archv_finished->strattach->EditAttrs = array();\n\n\t\t// strpriority\n\t\t$archv_finished->strpriority->CellCssStyle = \"\"; $archv_finished->strpriority->CellCssClass = \"\";\n\t\t$archv_finished->strpriority->CellAttrs = array(); $archv_finished->strpriority->ViewAttrs = array(); $archv_finished->strpriority->EditAttrs = array();\n\n\t\t// strduedate\n\t\t$archv_finished->strduedate->CellCssStyle = \"\"; $archv_finished->strduedate->CellCssClass = \"\";\n\t\t$archv_finished->strduedate->CellAttrs = array(); $archv_finished->strduedate->ViewAttrs = array(); $archv_finished->strduedate->EditAttrs = array();\n\n\t\t// strstatus\n\t\t$archv_finished->strstatus->CellCssStyle = \"\"; $archv_finished->strstatus->CellCssClass = \"\";\n\t\t$archv_finished->strstatus->CellAttrs = array(); $archv_finished->strstatus->ViewAttrs = array(); $archv_finished->strstatus->EditAttrs = array();\n\n\t\t// strlastedit\n\t\t$archv_finished->strlastedit->CellCssStyle = \"\"; $archv_finished->strlastedit->CellCssClass = \"\";\n\t\t$archv_finished->strlastedit->CellAttrs = array(); $archv_finished->strlastedit->ViewAttrs = array(); $archv_finished->strlastedit->EditAttrs = array();\n\n\t\t// strcategory\n\t\t$archv_finished->strcategory->CellCssStyle = \"\"; $archv_finished->strcategory->CellCssClass = \"\";\n\t\t$archv_finished->strcategory->CellAttrs = array(); $archv_finished->strcategory->ViewAttrs = array(); $archv_finished->strcategory->EditAttrs = array();\n\n\t\t// strassigned\n\t\t$archv_finished->strassigned->CellCssStyle = \"\"; $archv_finished->strassigned->CellCssClass = \"\";\n\t\t$archv_finished->strassigned->CellAttrs = array(); $archv_finished->strassigned->ViewAttrs = array(); $archv_finished->strassigned->EditAttrs = array();\n\n\t\t// strdatecomplete\n\t\t$archv_finished->strdatecomplete->CellCssStyle = \"\"; $archv_finished->strdatecomplete->CellCssClass = \"\";\n\t\t$archv_finished->strdatecomplete->CellAttrs = array(); $archv_finished->strdatecomplete->ViewAttrs = array(); $archv_finished->strdatecomplete->EditAttrs = array();\n\n\t\t// strwithpr\n\t\t$archv_finished->strwithpr->CellCssStyle = \"\"; $archv_finished->strwithpr->CellCssClass = \"\";\n\t\t$archv_finished->strwithpr->CellAttrs = array(); $archv_finished->strwithpr->ViewAttrs = array(); $archv_finished->strwithpr->EditAttrs = array();\n\n\t\t// strremarks\n\t\t$archv_finished->strremarks->CellCssStyle = \"\"; $archv_finished->strremarks->CellCssClass = \"\";\n\t\t$archv_finished->strremarks->CellAttrs = array(); $archv_finished->strremarks->ViewAttrs = array(); $archv_finished->strremarks->EditAttrs = array();\n\n\t\t// sap_num\n\t\t$archv_finished->sap_num->CellCssStyle = \"\"; $archv_finished->sap_num->CellCssClass = \"\";\n\t\t$archv_finished->sap_num->CellAttrs = array(); $archv_finished->sap_num->ViewAttrs = array(); $archv_finished->sap_num->EditAttrs = array();\n\n\t\t// work_days\n\t\t$archv_finished->work_days->CellCssStyle = \"\"; $archv_finished->work_days->CellCssClass = \"\";\n\t\t$archv_finished->work_days->CellAttrs = array(); $archv_finished->work_days->ViewAttrs = array(); $archv_finished->work_days->EditAttrs = array();\n\t\tif ($archv_finished->RowType == EW_ROWTYPE_VIEW) { // View row\n\n\t\t\t// ID\n\t\t\t$archv_finished->ID->ViewValue = $archv_finished->ID->CurrentValue;\n\t\t\t$archv_finished->ID->CssStyle = \"\";\n\t\t\t$archv_finished->ID->CssClass = \"\";\n\t\t\t$archv_finished->ID->ViewCustomAttributes = \"\";\n\n\t\t\t// strjrfnum\n\t\t\t$archv_finished->strjrfnum->ViewValue = $archv_finished->strjrfnum->CurrentValue;\n\t\t\t$archv_finished->strjrfnum->CssStyle = \"\";\n\t\t\t$archv_finished->strjrfnum->CssClass = \"\";\n\t\t\t$archv_finished->strjrfnum->ViewCustomAttributes = \"\";\n\n\t\t\t// strquarter\n\t\t\t$archv_finished->strquarter->ViewValue = $archv_finished->strquarter->CurrentValue;\n\t\t\t$archv_finished->strquarter->CssStyle = \"\";\n\t\t\t$archv_finished->strquarter->CssClass = \"\";\n\t\t\t$archv_finished->strquarter->ViewCustomAttributes = \"\";\n\n\t\t\t// strmon\n\t\t\t$archv_finished->strmon->ViewValue = $archv_finished->strmon->CurrentValue;\n\t\t\t$archv_finished->strmon->CssStyle = \"\";\n\t\t\t$archv_finished->strmon->CssClass = \"\";\n\t\t\t$archv_finished->strmon->ViewCustomAttributes = \"\";\n\n\t\t\t// stryear\n\t\t\t$archv_finished->stryear->ViewValue = $archv_finished->stryear->CurrentValue;\n\t\t\t$archv_finished->stryear->CssStyle = \"\";\n\t\t\t$archv_finished->stryear->CssClass = \"\";\n\t\t\t$archv_finished->stryear->ViewCustomAttributes = \"\";\n\n\t\t\t// strdate\n\t\t\t$archv_finished->strdate->ViewValue = $archv_finished->strdate->CurrentValue;\n\t\t\t$archv_finished->strdate->CssStyle = \"\";\n\t\t\t$archv_finished->strdate->CssClass = \"\";\n\t\t\t$archv_finished->strdate->ViewCustomAttributes = \"\";\n\n\t\t\t// strtime\n\t\t\t$archv_finished->strtime->ViewValue = $archv_finished->strtime->CurrentValue;\n\t\t\t$archv_finished->strtime->CssStyle = \"\";\n\t\t\t$archv_finished->strtime->CssClass = \"\";\n\t\t\t$archv_finished->strtime->ViewCustomAttributes = \"\";\n\n\t\t\t// strusername\n\t\t\t$archv_finished->strusername->ViewValue = $archv_finished->strusername->CurrentValue;\n\t\t\t$archv_finished->strusername->CssStyle = \"\";\n\t\t\t$archv_finished->strusername->CssClass = \"\";\n\t\t\t$archv_finished->strusername->ViewCustomAttributes = \"\";\n\n\t\t\t// strusereadd\n\t\t\t$archv_finished->strusereadd->ViewValue = $archv_finished->strusereadd->CurrentValue;\n\t\t\t$archv_finished->strusereadd->CssStyle = \"\";\n\t\t\t$archv_finished->strusereadd->CssClass = \"\";\n\t\t\t$archv_finished->strusereadd->ViewCustomAttributes = \"\";\n\n\t\t\t// strcompany\n\t\t\t$archv_finished->strcompany->ViewValue = $archv_finished->strcompany->CurrentValue;\n\t\t\t$archv_finished->strcompany->CssStyle = \"\";\n\t\t\t$archv_finished->strcompany->CssClass = \"\";\n\t\t\t$archv_finished->strcompany->ViewCustomAttributes = \"\";\n\n\t\t\t// strdepartment\n\t\t\t$archv_finished->strdepartment->ViewValue = $archv_finished->strdepartment->CurrentValue;\n\t\t\t$archv_finished->strdepartment->CssStyle = \"\";\n\t\t\t$archv_finished->strdepartment->CssClass = \"\";\n\t\t\t$archv_finished->strdepartment->ViewCustomAttributes = \"\";\n\n\t\t\t// strloc\n\t\t\t$archv_finished->strloc->ViewValue = $archv_finished->strloc->CurrentValue;\n\t\t\t$archv_finished->strloc->CssStyle = \"\";\n\t\t\t$archv_finished->strloc->CssClass = \"\";\n\t\t\t$archv_finished->strloc->ViewCustomAttributes = \"\";\n\n\t\t\t// strposition\n\t\t\t$archv_finished->strposition->ViewValue = $archv_finished->strposition->CurrentValue;\n\t\t\t$archv_finished->strposition->CssStyle = \"\";\n\t\t\t$archv_finished->strposition->CssClass = \"\";\n\t\t\t$archv_finished->strposition->ViewCustomAttributes = \"\";\n\n\t\t\t// strtelephone\n\t\t\t$archv_finished->strtelephone->ViewValue = $archv_finished->strtelephone->CurrentValue;\n\t\t\t$archv_finished->strtelephone->CssStyle = \"\";\n\t\t\t$archv_finished->strtelephone->CssClass = \"\";\n\t\t\t$archv_finished->strtelephone->ViewCustomAttributes = \"\";\n\n\t\t\t// strcostcent\n\t\t\t$archv_finished->strcostcent->ViewValue = $archv_finished->strcostcent->CurrentValue;\n\t\t\t$archv_finished->strcostcent->CssStyle = \"\";\n\t\t\t$archv_finished->strcostcent->CssClass = \"\";\n\t\t\t$archv_finished->strcostcent->ViewCustomAttributes = \"\";\n\n\t\t\t// strsubject\n\t\t\t$archv_finished->strsubject->ViewValue = $archv_finished->strsubject->CurrentValue;\n\t\t\t$archv_finished->strsubject->CssStyle = \"\";\n\t\t\t$archv_finished->strsubject->CssClass = \"\";\n\t\t\t$archv_finished->strsubject->ViewCustomAttributes = \"\";\n\n\t\t\t// strnature\n\t\t\t$archv_finished->strnature->ViewValue = $archv_finished->strnature->CurrentValue;\n\t\t\t$archv_finished->strnature->CssStyle = \"\";\n\t\t\t$archv_finished->strnature->CssClass = \"\";\n\t\t\t$archv_finished->strnature->ViewCustomAttributes = \"\";\n\n\t\t\t// strdescript\n\t\t\t$archv_finished->strdescript->ViewValue = $archv_finished->strdescript->CurrentValue;\n\t\t\t$archv_finished->strdescript->CssStyle = \"\";\n\t\t\t$archv_finished->strdescript->CssClass = \"\";\n\t\t\t$archv_finished->strdescript->ViewCustomAttributes = \"\";\n\n\t\t\t// strarea\n\t\t\t$archv_finished->strarea->ViewValue = $archv_finished->strarea->CurrentValue;\n\t\t\t$archv_finished->strarea->CssStyle = \"\";\n\t\t\t$archv_finished->strarea->CssClass = \"\";\n\t\t\t$archv_finished->strarea->ViewCustomAttributes = \"\";\n\n\t\t\t// strattach\n\t\t\t$archv_finished->strattach->ViewValue = $archv_finished->strattach->CurrentValue;\n\t\t\t$archv_finished->strattach->CssStyle = \"\";\n\t\t\t$archv_finished->strattach->CssClass = \"\";\n\t\t\t$archv_finished->strattach->ViewCustomAttributes = \"\";\n\n\t\t\t// strpriority\n\t\t\t$archv_finished->strpriority->ViewValue = $archv_finished->strpriority->CurrentValue;\n\t\t\t$archv_finished->strpriority->CssStyle = \"\";\n\t\t\t$archv_finished->strpriority->CssClass = \"\";\n\t\t\t$archv_finished->strpriority->ViewCustomAttributes = \"\";\n\n\t\t\t// strduedate\n\t\t\t$archv_finished->strduedate->ViewValue = $archv_finished->strduedate->CurrentValue;\n\t\t\t$archv_finished->strduedate->CssStyle = \"\";\n\t\t\t$archv_finished->strduedate->CssClass = \"\";\n\t\t\t$archv_finished->strduedate->ViewCustomAttributes = \"\";\n\n\t\t\t// strstatus\n\t\t\t$archv_finished->strstatus->ViewValue = $archv_finished->strstatus->CurrentValue;\n\t\t\t$archv_finished->strstatus->CssStyle = \"\";\n\t\t\t$archv_finished->strstatus->CssClass = \"\";\n\t\t\t$archv_finished->strstatus->ViewCustomAttributes = \"\";\n\n\t\t\t// strlastedit\n\t\t\t$archv_finished->strlastedit->ViewValue = $archv_finished->strlastedit->CurrentValue;\n\t\t\t$archv_finished->strlastedit->CssStyle = \"\";\n\t\t\t$archv_finished->strlastedit->CssClass = \"\";\n\t\t\t$archv_finished->strlastedit->ViewCustomAttributes = \"\";\n\n\t\t\t// strcategory\n\t\t\t$archv_finished->strcategory->ViewValue = $archv_finished->strcategory->CurrentValue;\n\t\t\t$archv_finished->strcategory->CssStyle = \"\";\n\t\t\t$archv_finished->strcategory->CssClass = \"\";\n\t\t\t$archv_finished->strcategory->ViewCustomAttributes = \"\";\n\n\t\t\t// strassigned\n\t\t\t$archv_finished->strassigned->ViewValue = $archv_finished->strassigned->CurrentValue;\n\t\t\t$archv_finished->strassigned->CssStyle = \"\";\n\t\t\t$archv_finished->strassigned->CssClass = \"\";\n\t\t\t$archv_finished->strassigned->ViewCustomAttributes = \"\";\n\n\t\t\t// strdatecomplete\n\t\t\t$archv_finished->strdatecomplete->ViewValue = $archv_finished->strdatecomplete->CurrentValue;\n\t\t\t$archv_finished->strdatecomplete->CssStyle = \"\";\n\t\t\t$archv_finished->strdatecomplete->CssClass = \"\";\n\t\t\t$archv_finished->strdatecomplete->ViewCustomAttributes = \"\";\n\n\t\t\t// strwithpr\n\t\t\t$archv_finished->strwithpr->ViewValue = $archv_finished->strwithpr->CurrentValue;\n\t\t\t$archv_finished->strwithpr->CssStyle = \"\";\n\t\t\t$archv_finished->strwithpr->CssClass = \"\";\n\t\t\t$archv_finished->strwithpr->ViewCustomAttributes = \"\";\n\n\t\t\t// strremarks\n\t\t\t$archv_finished->strremarks->ViewValue = $archv_finished->strremarks->CurrentValue;\n\t\t\t$archv_finished->strremarks->CssStyle = \"\";\n\t\t\t$archv_finished->strremarks->CssClass = \"\";\n\t\t\t$archv_finished->strremarks->ViewCustomAttributes = \"\";\n\n\t\t\t// sap_num\n\t\t\t$archv_finished->sap_num->ViewValue = $archv_finished->sap_num->CurrentValue;\n\t\t\t$archv_finished->sap_num->CssStyle = \"\";\n\t\t\t$archv_finished->sap_num->CssClass = \"\";\n\t\t\t$archv_finished->sap_num->ViewCustomAttributes = \"\";\n\n\t\t\t// work_days\n\t\t\t$archv_finished->work_days->ViewValue = $archv_finished->work_days->CurrentValue;\n\t\t\t$archv_finished->work_days->CssStyle = \"\";\n\t\t\t$archv_finished->work_days->CssClass = \"\";\n\t\t\t$archv_finished->work_days->ViewCustomAttributes = \"\";\n\n\t\t\t// ID\n\t\t\t$archv_finished->ID->HrefValue = \"\";\n\t\t\t$archv_finished->ID->TooltipValue = \"\";\n\n\t\t\t// strjrfnum\n\t\t\t$archv_finished->strjrfnum->HrefValue = \"\";\n\t\t\t$archv_finished->strjrfnum->TooltipValue = \"\";\n\n\t\t\t// strquarter\n\t\t\t$archv_finished->strquarter->HrefValue = \"\";\n\t\t\t$archv_finished->strquarter->TooltipValue = \"\";\n\n\t\t\t// strmon\n\t\t\t$archv_finished->strmon->HrefValue = \"\";\n\t\t\t$archv_finished->strmon->TooltipValue = \"\";\n\n\t\t\t// stryear\n\t\t\t$archv_finished->stryear->HrefValue = \"\";\n\t\t\t$archv_finished->stryear->TooltipValue = \"\";\n\n\t\t\t// strdate\n\t\t\t$archv_finished->strdate->HrefValue = \"\";\n\t\t\t$archv_finished->strdate->TooltipValue = \"\";\n\n\t\t\t// strtime\n\t\t\t$archv_finished->strtime->HrefValue = \"\";\n\t\t\t$archv_finished->strtime->TooltipValue = \"\";\n\n\t\t\t// strusername\n\t\t\t$archv_finished->strusername->HrefValue = \"\";\n\t\t\t$archv_finished->strusername->TooltipValue = \"\";\n\n\t\t\t// strusereadd\n\t\t\t$archv_finished->strusereadd->HrefValue = \"\";\n\t\t\t$archv_finished->strusereadd->TooltipValue = \"\";\n\n\t\t\t// strcompany\n\t\t\t$archv_finished->strcompany->HrefValue = \"\";\n\t\t\t$archv_finished->strcompany->TooltipValue = \"\";\n\n\t\t\t// strdepartment\n\t\t\t$archv_finished->strdepartment->HrefValue = \"\";\n\t\t\t$archv_finished->strdepartment->TooltipValue = \"\";\n\n\t\t\t// strloc\n\t\t\t$archv_finished->strloc->HrefValue = \"\";\n\t\t\t$archv_finished->strloc->TooltipValue = \"\";\n\n\t\t\t// strposition\n\t\t\t$archv_finished->strposition->HrefValue = \"\";\n\t\t\t$archv_finished->strposition->TooltipValue = \"\";\n\n\t\t\t// strtelephone\n\t\t\t$archv_finished->strtelephone->HrefValue = \"\";\n\t\t\t$archv_finished->strtelephone->TooltipValue = \"\";\n\n\t\t\t// strcostcent\n\t\t\t$archv_finished->strcostcent->HrefValue = \"\";\n\t\t\t$archv_finished->strcostcent->TooltipValue = \"\";\n\n\t\t\t// strsubject\n\t\t\t$archv_finished->strsubject->HrefValue = \"\";\n\t\t\t$archv_finished->strsubject->TooltipValue = \"\";\n\n\t\t\t// strnature\n\t\t\t$archv_finished->strnature->HrefValue = \"\";\n\t\t\t$archv_finished->strnature->TooltipValue = \"\";\n\n\t\t\t// strdescript\n\t\t\t$archv_finished->strdescript->HrefValue = \"\";\n\t\t\t$archv_finished->strdescript->TooltipValue = \"\";\n\n\t\t\t// strarea\n\t\t\t$archv_finished->strarea->HrefValue = \"\";\n\t\t\t$archv_finished->strarea->TooltipValue = \"\";\n\n\t\t\t// strattach\n\t\t\t$archv_finished->strattach->HrefValue = \"\";\n\t\t\t$archv_finished->strattach->TooltipValue = \"\";\n\n\t\t\t// strpriority\n\t\t\t$archv_finished->strpriority->HrefValue = \"\";\n\t\t\t$archv_finished->strpriority->TooltipValue = \"\";\n\n\t\t\t// strduedate\n\t\t\t$archv_finished->strduedate->HrefValue = \"\";\n\t\t\t$archv_finished->strduedate->TooltipValue = \"\";\n\n\t\t\t// strstatus\n\t\t\t$archv_finished->strstatus->HrefValue = \"\";\n\t\t\t$archv_finished->strstatus->TooltipValue = \"\";\n\n\t\t\t// strlastedit\n\t\t\t$archv_finished->strlastedit->HrefValue = \"\";\n\t\t\t$archv_finished->strlastedit->TooltipValue = \"\";\n\n\t\t\t// strcategory\n\t\t\t$archv_finished->strcategory->HrefValue = \"\";\n\t\t\t$archv_finished->strcategory->TooltipValue = \"\";\n\n\t\t\t// strassigned\n\t\t\t$archv_finished->strassigned->HrefValue = \"\";\n\t\t\t$archv_finished->strassigned->TooltipValue = \"\";\n\n\t\t\t// strdatecomplete\n\t\t\t$archv_finished->strdatecomplete->HrefValue = \"\";\n\t\t\t$archv_finished->strdatecomplete->TooltipValue = \"\";\n\n\t\t\t// strwithpr\n\t\t\t$archv_finished->strwithpr->HrefValue = \"\";\n\t\t\t$archv_finished->strwithpr->TooltipValue = \"\";\n\n\t\t\t// strremarks\n\t\t\t$archv_finished->strremarks->HrefValue = \"\";\n\t\t\t$archv_finished->strremarks->TooltipValue = \"\";\n\n\t\t\t// sap_num\n\t\t\t$archv_finished->sap_num->HrefValue = \"\";\n\t\t\t$archv_finished->sap_num->TooltipValue = \"\";\n\n\t\t\t// work_days\n\t\t\t$archv_finished->work_days->HrefValue = \"\";\n\t\t\t$archv_finished->work_days->TooltipValue = \"\";\n\t\t}\n\n\t\t// Call Row Rendered event\n\t\tif ($archv_finished->RowType <> EW_ROWTYPE_AGGREGATEINIT)\n\t\t\t$archv_finished->Row_Rendered();\n\t}", "function superfood_elated_woocommerce_thumbnails_per_row() {\n\t\t\n\t\t$product_single_layout = superfood_elated_get_meta_field_intersect('single_product_layout');\n\t\t$product_thumbnail_position = superfood_elated_get_meta_field_intersect('woo_set_thumb_images_position');\n\t\t\n\t\tif ($product_single_layout === 'standard' && $product_thumbnail_position === 'on-left-side') {\n\t\t\treturn 4;\n\t\t} else {\n\t\t\treturn 3;\n\t\t}\n\t}", "public function setTableClass($class) {\r\n $this->tableClass = \"class=\\\"$class\\\"\";\r\n }", "abstract public function getAdminThClass($align = 'center');", "function add_class_for_form_grid( $class, $id, $args ) {\n\t$class[] = 'give-form-grid-wrap';\n\n\tforeach ( $class as $index => $item ) {\n\t\tif ( false !== strpos( $item, 'give-display-' ) ) {\n\t\t\tunset( $class[ $index ] );\n\t\t}\n\t}\n\n\treturn $class;\n}", "public function setTableClass($class) {\n $this->tableClass = \"class=\\\"$class\\\"\";\n }" ]
[ "0.65590525", "0.64634025", "0.6176579", "0.60998696", "0.5913443", "0.591332", "0.5154975", "0.51529646", "0.514892", "0.51306105", "0.50625557", "0.49814966", "0.4877604", "0.48713368", "0.48532298", "0.48380193", "0.47815675", "0.47287244", "0.4720446", "0.46988484", "0.46727753", "0.4663638", "0.46462485", "0.4635826", "0.46277225", "0.46150765", "0.46089387", "0.4603318", "0.45942858", "0.45942858", "0.45930853", "0.45844865", "0.45835096", "0.45748445", "0.45525575", "0.45362613", "0.45125255", "0.45125255", "0.45013183", "0.44985798", "0.44897905", "0.44880638", "0.44768", "0.44684133", "0.44626236", "0.4449798", "0.4441436", "0.4440634", "0.4439706", "0.44375622", "0.44365188", "0.44317234", "0.44239813", "0.44140992", "0.4398872", "0.43971986", "0.43903813", "0.4389345", "0.43845773", "0.43836167", "0.4382446", "0.43709698", "0.436643", "0.43593237", "0.43508968", "0.4348982", "0.4331752", "0.43224585", "0.43212625", "0.4319159", "0.4315338", "0.43138286", "0.43095738", "0.4303561", "0.42913863", "0.42909625", "0.4287287", "0.42857194", "0.4273393", "0.42707044", "0.42686936", "0.426707", "0.42534375", "0.42344698", "0.4232536", "0.42282698", "0.42258167", "0.4224526", "0.4215886", "0.4210864", "0.42093825", "0.4205184", "0.42045397", "0.41938746", "0.4184583", "0.418343", "0.4180575", "0.41795093", "0.41724527", "0.4169372" ]
0.75887257
0
Turn off xsl transformation
Отключить преобразование XSL
public function no_xsl() { $this->xsl_template = ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function transformToXmlReturnsTransformedXml(): void\n {\n $this->baseXsltProcessor->returns(['transformToXml' => '<foo>']);\n assertThat($this->xslProcessor->toXML(), equals('<foo>'));\n }", "public function doXHTML_cleaning() {}", "protected function transform()\n {\n // Check if the XSL file exists\n if (!file_exists($this->config['xsl'])) {\n $this->logger->debugTranslate(\n 'htmlconversion.converter.xslFileNotFoundLog'\n );\n return false;\n }\n\n $xsl = new DOMDocument;\n if (!$xsl->load($this->config['xsl'])) {\n $this->logger->debugTranslate(\n 'htmlconversion.converter.xslLoadErrorLog',\n $this->libxmlErrors()\n );\n return false;\n }\n\n $xslt = new XSLTProcessor;\n $xslt->importStylesheet($xsl);\n\n // Transform the document\n if (!($this->htmlDom = $xslt->transformToDoc($this->nlmxmlDom))) {\n $this->logger->debugTranslate(\n 'htmlconversion.converter.transformErrorLog',\n $this->libxmlErrors()\n );\n\n return false;\n };\n\n $this->logger->debugTranslate(\n 'htmlconversion.converter.transformsSuccessLog',\n $this->htmlDom->saveHTML()\n );\n\n return true;\n }", "public function transform() {\n $input = DATABASE_XML;\t// default initial input\n for ($i = 0; $i < count($this->xslt); $i++) {\n $this->xslTransform($this->xslt[$i][\"xsl\"], $this->xslt[$i][\"param\"], $input);\n $input = TRANSFORMED_XML;\t// use result of last xsl transform for all subsequent inputs\n // if debugging is turned on, display transform information & output result\n // (particularly important for debugging more than one transform in a row)\n if ($this->debug) {\n\tprint \"XSLT transform with stylesheet \" . $this->xslt[$i][\"xsl\"];\n\tif (count($this->xslt[$i][\"param\"])) {\n\t print \"<br>\\nParameters: \\n\";\n\t foreach ($this->xslt[$i][\"param\"] as $key => $val) print \"$key => $val \\n\";\n\t}\n\tprint \"<br>\\n\";\n\tprint \"Result of transformation:<br>\\n\";\n\tprint $this->displayXML(TRANSFORMED_XML);\n }\n }\n // unbind used xslts\n unset($this->xslt);\n $this->xslt = array();\n }", "public function withoutTransformer();", "public function transformToXmlReturnsTransformedXml()\n {\n $this->mockXSLTProcessor->expects($this->exactly(2))\n ->method('transformToXml')\n ->with($this->equalTo($this->document))\n ->will($this->onConsecutiveCalls('<foo>', ''));\n $this->assertEquals('<foo>', $this->xslProcessor->toXML());\n $this->assertEquals('', $this->xslProcessor->toXML());\n }", "private function parseToXhtml()\n\t{\n\t\t$this->_generic->_time_checkpoint = microtime(true);\n\t\t\n\t\t// Xml\n\t\t$xmlDoc = new DOMDocument();\n\t\ttry \n\t\t{\n\t\t\t$xmlDoc->loadXML($this->_xml); \n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tSLS_Tracing::addTrace(new Exception(\"Error during XML Parsing\"), true, \"<h2>\".$e->getMessage().\"</h2><div style=\\\"margin: 0 30px;padding: 10px;\\\"><pre name=\\\"code\\\" class=\\\"brush:xml\\\">\".htmlentities($this->_xml, ENT_QUOTES).\"</pre></div>\");\n\t\t}\n\t\t\n\t\t// Xsl\n\t\t$xslDoc = new DOMDocument();\t\t\n\t\ttry \n\t\t{\n\t\t\t$xslDoc->loadXML($this->constructGenericXsl()); \n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tSLS_Tracing::addTrace(new Exception($e->getMessage()));\n\t\t}\n\t\t\n\t\t// Parsing\n\t\t$proc = new XSLTProcessor();\n\t\t$proc->registerPHPFunctions();\n\t\ttry \n\t\t{ \n\t\t\t$proc->importStyleSheet($xslDoc); \n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tSLS_Tracing::addTrace(new Exception($e->getMessage()));\t\t\t\n\t\t}\n\t\t\n\t\t// If errors in dev\n\t\tif (!SLS_Generic::getInstance()->isProd() && SLS_Tracing::$_exceptionThrown)\n\t\t\tSLS_Tracing::displayTraces();\n\t\telse\n\t\t{\n\t\t\t// Show xml in source in dev\n\t\t\t/*if ($this->_generic->getSiteConfig(\"isProd\") == 0)\t\t\t\t\t\t\t\n\t\t\t\techo \"<!--[if lt IE 5]><!--<![CDATA[<pre style='display:none;'>\\n\".$this->_xml.\" \\n</pre>]]>--><![endif]-->\\n\";*/\n\t\t\t\n\t\t\t// Parse XML/XSL\n\t\t\t$html = $proc->transformToXML($xmlDoc);\t\t\t\n\t\t\t$this->_generic->logTime($this->_generic->monitor($this->_generic->_time_checkpoint),\"Parsing XML/XSL\",\"\",\"XML/XSL Parsing\");\n\t\t\t$this->_generic->_time_checkpoint = microtime(true);\n\t\t\t\n\t\t\t// Parse HTML with SLS_Dtd\n\t\t\t$html = $this->parseHtml($html);\n\t\t\t\n\t\t\t// Sls cached enabled and Action cache enabled ?\n\t\t\t$cacheOptions = $this->_cache->getAction();\n\t\t\t$actionCache = false;\n\t\t\tif ($this->_generic->isCache() && \n\t\t\t\t$this->_generic->getSide() == \"user\" && \n\t\t\t\t$this->_generic->getGenericControllerName() != \"Default\" &&\n\t\t\t\tis_array($cacheOptions) && \n\t\t\t\tcount($cacheOptions) == 4)\n\t\t\t{\n\t\t\t\t$actionCache\t\t\t= true; \n\t\t\t\t$actionCacheVisibility \t= $cacheOptions[0];\n\t\t\t\t$actionCacheScope \t\t= $cacheOptions[1];\n\t\t\t\t$actionCacheResponsive\t= $cacheOptions[2];\n\t\t\t\t$actionCacheExpiration \t= $cacheOptions[3];\n\t\t\t\t\n\t\t\t\t// Save Full HTML cached\n\t\t\t\tif ($actionCacheScope == \"full\")\t\t\t\t\n\t\t\t\t\t$this->_cache->saveCacheFull($html,$actionCacheVisibility,$actionCacheResponsive);\t\t\t\t\n\t\t\t}\n\n\t\t\t// Show flash button to copy Xml if developer on user side and not on Bo\n\t\t\tif (SLS_BoRights::isLogged() && SLS_BoRights::getAdminType() == \"developer\" && $this->_generic->getSide() == \"user\" && $this->_generic->getGenericControllerName() != $this->_generic->getBo())\n\t\t\t\t$html = preg_replace('/\\<\\/head\\>/i', \"\\n\".\n\t\t\t\t\t\t\t\t\t\t\t\t\t t(1).'<!-- Sls developer Toolbar -->'.\"\\n\".\n\t\t\t\t\t\t\t\t\t\t\t\t\t t(1).'<script type=\"text/javascript\" src=\"'.$this->_generic->getProtocol().'://'.$this->_generic->getSiteConfig(\"domainName\").\"/\".$this->_generic->getPathConfig(\"coreJsDyn\").'ZeroClipboard/ZeroClipboard.js\"></script>'.\"\\n\".\n\t\t\t\t\t\t\t\t\t\t\t\t\t t(1).'<script type=\"text/javascript\">'.\"\\n\".\n\t\t\t\t\t\t\t\t\t\t\t\t\t t(2).'window.slsBuild.xml = \"'.htmlentities(str_replace(array('\"',\"\\n\"),array('\\\"',''),$this->_xml),ENT_COMPAT,\"UTF-8\").'\";'.\"\\n\".\n\t\t\t\t\t\t\t\t\t\t\t\t\t t(1).'</script>'.\"\\n\".\n\t\t\t\t\t\t\t\t\t\t\t\t\t t(1).'<!-- /Sls developer Toolbar -->'.\"\\n\\n\".\n\t\t\t\t\t\t\t\t\t\t\t\t\t t(1).'</head>', $html);\n\n\t\t\techo $html;\n\t\t\t\n\t\t\t$this->_generic->logTime($this->_generic->monitor($this->_generic->_time_checkpoint),\"Parsing HTML\",\"\",\"HTML Parsing\");\n\t\t}\t\t\n\t}", "function _runXslTransformWithParam($info) {\n\n $xsl = new DOMDocument();\n $xsl->load($info['xsl']);\n $input = new DOMDocument();\n $input->loadXML($info['input']);\n\n $processor = new XSLTProcessor();\n $processor->importStylesheet($xsl);\n if (isset($info['param_name']) && isset($info['param_value'])) {\n $processor->setParameter('', $info['param_name'], $info['param_value']);\n }\n\n if (isset($info['php_functions'])) {\n $processor->registerPHPFunctions($info['php_functions']);\n }\n\n // XXX: Suppressing warnings regarding unregistered prefixes.\n return $processor->transformToXML($input);\n}", "protected function transform ( $xml, $path_to_xsl, $output_type = null, array $params = array(), array $import_array = array(), $to_string = true )\r\n\t{\r\n\t\tif ( $path_to_xsl == \"\") throw new \\Exception(\"no stylesheet supplied\");\r\n\t\t\r\n\t\t// make sure we have a domdocument\r\n\t\t\r\n\t\tif ( is_string($xml) )\r\n\t\t{\r\n\t\t\t$xml = Parser::convertToDOMDocument($xml);\r\n\t\t}\r\n\t\t\r\n\t\t// create xslt processor\r\n\t\t\r\n\t\t$processor = new \\XsltProcessor();\r\n\t\t$processor->registerPhpFunctions();\r\n\r\n\t\t// add parameters\r\n\t\t\r\n\t\tforeach ($params as $key => $value)\r\n\t\t{\r\n\t\t\t$processor->setParameter(null, $key, $value);\r\n\t\t}\r\n\t\t\t\r\n\t\t// add stylesheet\r\n\t\t\r\n\t\t$xsl = $this->generateBaseXsl($path_to_xsl, $import_array, $output_type);\r\n\t\t\r\n\t\t$processor->importStylesheet($xsl);\r\n\t\t\r\n\t\t// transform\r\n\t\t\r\n\t\tif ( $to_string == true )\r\n\t\t{\r\n\t\t\treturn $processor->transformToXml($xml);\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\treturn $processor->transformToDoc($xml);\r\n\t\t}\r\n\t}", "function tidy_xml( $xml ) {\n \t\n\t $dom = new DOMDocument();\n\t $dom->preserveWhiteSpace = false;\n\t $dom->formatOutput = true;\n\t $dom->loadXML( $xml->asXML() );\n\t return $dom->saveXML();\n \t\n\t}", "function transformWithProcessor(XSLTProcessor $proc, DOMDocument $doc)\n{\n $doc = $proc->transformToDoc($doc);\n\n // With current logic, only menu tags can be left unprocessed the first pass\n // Check if there are any left before doing a second pass\n if ($doc->getElementsByTagName('menu')->length === 0) {\n return $doc;\n }\n\n return $proc->transformToDoc($doc);\n}", "public function xslTransformResult ($xsl_file, $xsl_params = NULL) {\n // call default xslTransform with option to specify xml input\n $this->xslTransform($xsl_file, $xsl_params, TRANSFORMED_XML);\n }", "protected function parseXslText(DOMElement $ir, DOMElement $node)\n\t{\n\t\t$this->appendLiteralOutput($ir, $node->textContent);\n\t\tif ($node->getAttribute('disable-output-escaping') === 'yes')\n\t\t{\n\t\t\t$ir->lastChild->setAttribute('disable-output-escaping', 'yes');\n\t\t}\n\t}", "public function xslTransform ($xsl_file, $xsl_params = NULL, $input = DATABASE_XML) {\n /* load xsl & xml as DOM documents */\n $xsl = new DomDocument();\n $rval = $xsl->load($xsl_file);\n if (!($rval)) {\n print \"Error! unable to load xsl file $xsl_file.<br>\";\n } \n\n /* create processor & import stylesheet */\n $proc = new XsltProcessor();\n $xsl = $proc->importStylesheet($xsl);\n if ($xsl_params) {\n foreach ($xsl_params as $name => $val) {\n $proc->setParameter(null, $name, $val);\n }\n }\n /* transform the xml document and store the result */\n\n // transform xml retrieved from the database (default)\n if ($input == DATABASE_XML && $this->xmldb->xml) \t // make sure data exists\n $this->xsl_result = $proc->transformToDoc($this->xmldb->xml);\n // transform xml resulting from prior xsl transform (make sure input data exists)\n else if ($input == TRANSFORMED_XML && $this->xsl_result)\n $this->xsl_result = $proc->transformToDoc($this->xsl_result);\n }", "function testClientXSL() {\n $this->get('/');\n $this->assertPattern('#<\\?xml-stylesheet#', $this->responseDom->saveXML());\n $this->get('/test');\n $this->assertPattern('#<\\?xml-stylesheet#', $this->responseDom->saveXML());\n \n $this->get('/?NOXSL');\n $this->assertNoPattern('#<\\?xml-stylesheet#', $this->responseDom->saveXML());\n $this->get('/test?NOXSL');\n $this->assertNoPattern('#<\\?xml-stylesheet#', $this->responseDom->saveXML());\n }", "protected function transform($xml, $path_to_xsl, array $params = array())\r\n\t{\r\n\t\t$registry = Registry::getInstance();\r\n\r\n\t\t$import_array = array();\r\n\t\t\r\n\t\t// the xsl lives here\r\n\r\n\t\t$distro_xsl_dir = $this->_script_path . \"/\";\r\n\t\t$local_xsl_dir = realpath(getcwd()) . \"/views/\";\r\n\t\t\r\n\t\t// language file\r\n\t\t\r\n\t\t$request = new Request();\r\n\t\t$language = $request->getParam(\"lang\");\r\n\t\t\r\n\t\tif ( $language == \"\" )\r\n\t\t{\r\n\t\t\t$language = $registry->defaultLanguage();\r\n\t\t}\r\n\t\t\r\n\t\t// english file is included by default (as a fallback)\r\n\t\t\r\n\t\tarray_push($import_array, \"labels/eng.xsl\");\r\n\t\t\r\n\t\t// if language is set to something other than english\r\n\t\t// then include that file to override the english labels\r\n\t\t\r\n\t\tif ( $language != \"eng\" && $language != '') \r\n\t\t{\r\n\t\t\tarray_push($import_array, \"labels/$language.xsl\");\r\n\t\t}\t\t\r\n\t\t\r\n\t\t// make sure we've got a reference to the local includes too\r\n\t\t\r\n\t\tarray_push($import_array, \"includes.xsl\");\r\n\t\t\r\n\t\t// transform\r\n\t\t\r\n\t\t$xsl = new Xsl($distro_xsl_dir, $local_xsl_dir);\r\n\t\t\r\n\t\treturn $xsl->transformToXml($xml, $path_to_xsl, $this->format, $params, $import_array);\r\n\t}", "public function xss_clean_on()\n\t{\n\t\t$this->_xss_on = TRUE;\n\t}", "protected function useXMLInternalErrors()\n {\n \\libxml_clear_errors();\n $this->initialUseInternalErrorsValue = \\libxml_use_internal_errors(true);\n }", "function set_xsl($xsl)\n\t{\n\t\t$this->xsl_proyecto = $xsl;\n\t}", "public static function xhtml($xhtml)\n {\n self::$useXhtml = $xhtml === true ? ' /' : '';\n }", "function transformDOM(DOMDocument $doc)\n{\n return transformWithProcessor(createInkyProcessor(), $doc);\n}", "public function setXSLDocument($xsl) {\n libxml_get_last_error() && libxml_clear_errors();\n $this->stylesheet= $xsl;\n strlen($this->_base) && $this->stylesheet->documentURI= $this->_base;\n \n $this->_checkErrors($xsl);\n }", "protected function renderAsXML() {}", "static function processXSLT($xml, $xsl, $params = null)\n {\n // Create the domXSL\n $domXsl = new DOMDocument;\n if (!@$domXsl->load($xsl))\n {\n wcmProject::getInstance()->logger->logError('Invalid XSL: ' . $xsl);\n throw new Exception('Invalid XSL');\n }\n\n // Create the domXML\n $domXml = new DOMDocument();\n if (!@$domXml->loadXML($xml))\n {\n wcmProject::getInstance()->logger->logError('Invalid XML: ' . $xml);\n throw new Exception('Invalid XML');\n }\n\n // Process the XSL with optional parameters\n $proc = new XSLTProcessor;\n $proc->registerPHPFunctions();\n $proc->importStyleSheet($domXsl);\n if (is_array($params))\n {\n foreach($params as $param => $value)\n {\n $proc->setParameter(\"\", $param, $value);\n }\n }\n\n return ($proc->transformToXML($domXml));\n }", "protected function handle_route_sitemap_xsl() {\n\n\t\t$yoast_sitemap = $this->get_yoast_sitemap_instance();\n\t\t$yoast_sitemap->xsl_output( 'main' );\n\n\t\tdie;\n\n\t}", "function outputEntitiesOff()\n\t{\n\t\t$this->bOutputEntities = false;\n\t}", "protected function transform(DOMDocument $document)\n {\n if (!$this->toDir->exists()) {\n throw new BuildException(\"Directory '\" . $this->toDir . \"' does not exist\");\n }\n\n $xslfile = $this->getStyleSheet();\n\n $xsl = new DOMDocument();\n $xsl->load($xslfile->getAbsolutePath());\n\n $proc = new XSLTProcessor();\n if (defined('XSL_SECPREF_WRITE_FILE')) {\n if (version_compare(PHP_VERSION, '5.4', \"<\")) {\n ini_set(\"xsl.security_prefs\", XSL_SECPREF_WRITE_FILE | XSL_SECPREF_CREATE_DIRECTORY);\n } else {\n $proc->setSecurityPrefs(XSL_SECPREF_WRITE_FILE | XSL_SECPREF_CREATE_DIRECTORY);\n }\n }\n\n $proc->importStylesheet($xsl);\n $proc->setParameter('', 'output.sorttable', (string) $this->useSortTable);\n\n if ($this->format == \"noframes\") {\n $writer = new FileWriter(new PhingFile($this->toDir, \"phpunit-noframes.html\"));\n $writer->write($proc->transformToXml($document));\n $writer->close();\n } else {\n ExtendedFileStream::registerStream();\n\n $toDir = (string) $this->toDir;\n\n // urlencode() the path if we're on Windows\n if (FileSystem::getFileSystem()->getSeparator() == '\\\\') {\n $toDir = urlencode($toDir);\n }\n\n // no output for the framed report\n // it's all done by extension...\n $proc->setParameter('', 'output.dir', $toDir);\n $proc->transformToXml($document);\n\n ExtendedFileStream::unregisterStream();\n }\n }", "public function initalise()\n\t{\n\t\tSettings::singleton()->overwrite_setting('cache_xslt_transformation', false);\n\t\treturn true;\n\t}", "public function setXSL($xsl){\r\n\t\t$this->xsl_file = $xsl;\r\n\t}", "private function runSaxon(){\r\n\t\t$this->execWrapper(\t$this->saxon_command.\r\n\t\t\t\t\t\t\t\" -o:\".$this->workingdir.$this->target.\r\n\t\t\t\t\t\t\t\" -xsl:\".$this->xsl_path.$this->xsl_file.\r\n\t\t\t\t\t\t\t\" -s:\".$this->workingdir.$this->source);\r\n\t}", "public function disableAutoTranslations()\r\n\t{\r\n\t\t$this->autoTranslations = false;\r\n\t}", "public function applyXslStyleSheet(&$xslDOMDocument, $xslOptions = array(), $xslOptionsURI = '')\n {\n $processor = new XSLTProcessor();\n\n $processor->importStylesheet($xslDOMDocument);\n\n if ($processor->setParameter($xslOptionsURI, $xslOptions) === false) {\n throw new Exception('Could not set values for the given XSL style sheet parameters.');\n }\n\n $xmlDOMDocument = new DOMDocument();\n if ($xmlDOMDocument->loadXML($this->_documentXML) === false) {\n throw new Exception('Could not load XML from the given template.');\n }\n\n $xmlTransformed = $processor->transformToXml($xmlDOMDocument);\n if ($xmlTransformed === false) {\n throw new Exception('Could not transform the given XML document.');\n }\n\n $this->_documentXML = $xmlTransformed;\n }", "private function generateBaseXsl( $path_to_file, $import_array = array(), $output_type)\r\n\t{\r\n\t\t$files_to_import = array();\r\n\t\t\r\n\t\t### first, set up the paths to the distro and local directories\r\n\r\n\t\t$distro_path = $this->distro_xsl_dir . '/' . $path_to_file;\r\n\t\t$local_path = $this->local_xsl_dir . '/' . $path_to_file;\r\n\t\t \r\n\r\n\t\t### check to make sure at least one of the files exists\r\n\t\t\r\n\t\t$distro_exists = file_exists($distro_path);\r\n\t\t$local_exists = file_exists($local_path);\r\n\r\n\t\t// if we don't have either a local or a distro copy, that's a problem.\r\n\t\t\r\n\t\tif (! ( $local_exists || $distro_exists) )\r\n\t\t{\r\n\t\t\t// throw new Exception(\"No xsl stylesheet found: $local_path || $distro_path\");\r\n\t\t\tthrow new \\Exception(\"No xsl stylesheet found: $path_to_file\");\r\n\t\t}\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t### now create the skeleton XSLT file that will hold references to both\r\n\t\t### the distro and the local files\r\n\t\t\r\n\t\t$generated_xsl = new \\DOMDocument();\r\n\t\t\r\n\t\t$xml = \"\r\n\t\t\t<xsl:stylesheet \r\n\t\t\t\tversion=\\\"1.0\\\"\r\n\t\t\t\txmlns:xsl=\\\"http://www.w3.org/1999/XSL/Transform\\\"\r\n\t\t\t\txmlns:php=\\\"http://php.net/xsl\\\" \r\n\t\t\t\texclude-result-prefixes=\\\"php\\\">\t\t\r\n\t\t\t</xsl:stylesheet>\";\r\n\t\t\r\n\t\t$generated_xsl->loadXML(trim($xml));\r\n\t\t\r\n\t\t// dynamically create the output type\r\n\t\r\n\t\t$output = $generated_xsl->createElementNS('http://www.w3.org/1999/XSL/Transform', \"output\");\r\n\t\t$generated_xsl->documentElement->appendChild($output);\r\n\t\t\r\n\t\t// html 4\r\n\t\t\r\n\t\tif ( $output_type == \"html\")\r\n\t\t{\r\n\t\t\t$output->setAttribute(\"method\", \"html\");\r\n\t\t\t$output->setAttribute(\"doctype-public\", \"-//W3C//DTD HTML 4.01 Transitional//EN\");\r\n\t\t\t$output->setAttribute(\"doctype-system\", \"http://www.w3.org/TR/html4/loose.dtd\");\r\n\t\t}\r\n\t\t\r\n\t\t// always include distro includes\r\n\t\t\r\n\t\t$files_to_import[] = $this->distro_xsl_dir . '/' .'includes.xsl';\r\n\t\t\r\n\t\t\r\n\t\t### add a reference to the distro file\r\n\r\n\t\tif ( $distro_exists == true )\r\n\t\t{\t\r\n\t\t\tarray_push($files_to_import, $distro_path);\r\n\t\t}\r\n\t\t\r\n\t\t### add a refence for files programatically added\r\n\t\t\r\n\t\tif ( $import_array != null )\r\n\t\t{\r\n\t\t\tforeach ( $import_array as $strInclude )\r\n\t\t\t{\r\n\t\t\t\t// but only if a distro copy exists\r\n\t\t\t\t\r\n\t\t\t\t$distro_include = $this->distro_xsl_dir . '/' . $strInclude;\r\n\t\t\t\t$local_include = $this->local_xsl_dir . '/' . $strInclude;\r\n\t\t\t\t\r\n\t\t\t\t// don't include the distro includes.xsl, since this messes things up!\r\n\t\t\t\t// @todo: figure out why includes.xsl is this weird exception\r\n\t\t\t\t\r\n\t\t\t\tif ( file_exists($distro_include) && $strInclude != \"includes.xsl\")\r\n\t\t\t\t{\r\n\t\t\t\t\tarray_push($files_to_import, $distro_include);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// see if there is a local version, and include it too\r\n\t\t\t\t\r\n\t\t\t\tif ( file_exists($local_include) )\r\n\t\t\t\t{\r\n\t\t\t\t\tarray_push($files_to_import, $local_include);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t### add a refence to the local file\r\n\t\t\r\n\t\tif ( $local_exists )\r\n\t\t{\r\n\t\t\t$this->addIncludeReference( $generated_xsl, $local_path );\r\n\t\t}\r\n\t\t\r\n\r\n\t\t### if the distro file xsl:includes or xsl:imports other files\r\n\t\t### check if there is a corresponding local file, and import it too\r\n\t\t\r\n\t\t// We import instead of include in case the local stylesheet does erroneously \r\n\t\t// 'include', to avoid a conflict. We import LAST to make sure it takes \r\n\t\t// precedence over distro. \r\n\t\t\r\n\t\tif ( $distro_exists )\r\n\t\t{\r\n\t\t\t$distroXml = simplexml_load_file( $distro_path );\r\n\t\t\r\n\t\t\t$distroXml->registerXPathNamespace( 'xsl', 'http://www.w3.org/1999/XSL/Transform' );\r\n\t\t\t\r\n\t\t\t// find anything include'd or import'ed in original base file\r\n\t\t\t\r\n\t\t\t$array_merged = array_merge( $distroXml->xpath( \"//xsl:include\" ), $distroXml->xpath ( \"//xsl:import\" ) );\r\n\t\t\t\r\n\t\t\tforeach ( $array_merged as $extra )\r\n\t\t\t{\r\n\t\t\t\t// path to local copy\r\n\t\t\t\t\r\n\t\t\t\t$local_candidate = $this->local_xsl_dir . '/' . dirname ( $path_to_file ) . '/' . $extra['href'];\r\n\t\t\t\t\r\n\t\t\t\t// path to distro copy as a check\r\n\t\t\t\t\r\n\t\t\t\t$distro_check = $this->distro_xsl_dir . '/' . dirname ( $path_to_file ) . '/' . $extra['href'];\r\n\t\t\t\t\r\n\t\t\t\t// make sure local copy exists, and they are both not pointing at the same file \r\n\t\t\t\t\r\n\t\t\t\tif ( file_exists( $local_candidate ) && realpath($distro_check) != realpath($local_candidate) )\r\n\t\t\t\t{\r\n\t\t\t\t\tarray_push($files_to_import, $local_candidate);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// now make sure no dupes\r\n\t\t\r\n\t\t$files_to_import = array_unique($files_to_import);\r\n\t\t\r\n\t\t\r\n\t\t### now the actual mechanics of the import\r\n\t\tforeach ( $files_to_import as $import )\r\n\t\t{\r\n\t\t\t$this->addImportReference ( $generated_xsl, $import, $output );\r\n\t\t}\r\n\t\t\r\n\t\t//header(\"Content-type: text/xml\"); echo $generated_xsl->saveXML(); exit;\r\n\t\t\r\n\t\treturn $generated_xsl;\r\n\t}", "function _quail_server_cleanup_xpath($query) {\n\t$remove = array(\n\t\t\t '[@class=\"\"]',\n\t\t\t '[@class=\"ac_template_selected\"]',\n\t\t\t '[1]',\n\t);\n\t\n\t$query = str_replace('html[@class=\"js\"]', 'html', $query);\n\t$query = str_replace($remove, '', $query);\n\treturn $query;\n}", "public function transform($xml, $outPath = null) {\n // define output directory\n if(!isset($outPath)) {\n $outPath = env('XSLT_OUT_PATH');\n }\n\n $this->transformUsingBuiltInXslt($xml, $outPath);\n }", "public function disableConcatenateCss() {}", "private function transformUsingBuiltInXslt($filePath, $outPath){\n\t$source = file_get_contents($filePath);\n \n $version = $this->getDDIVersion($source);\n \n if($version){\n $xml = new \\DOMDocument;\n $xml->loadXML($source);\n\n $xsl = new \\DOMDocument;\n\n $xsl->load('resources/xslt/'.$version.'_json.xsl');\n\n $proc = new \\XSLTProcessor;\n $proc->importStyleSheet($xsl); \n\n $json_xml = $proc->transformToXML($xml);\n\n $json = json_encode(simplexml_load_string($json_xml));\n\n file_put_contents($outPath . basename($filePath).'.json', $json);\n }else{\n //TODO: Handle non suported documents\n }\n }", "protected function parseXslValueOf(DOMElement $ir, DOMElement $node)\n\t{\n\t\t$this->appendXPathOutput($ir, $node->getAttribute('select'));\n\t\tif ($node->getAttribute('disable-output-escaping') === 'yes')\n\t\t{\n\t\t\t$ir->lastChild->setAttribute('disable-output-escaping', 'yes');\n\t\t}\n\t}", "static function clean4xml($xml) {\n\t\t$xml = self::makeUTF8($xml);\n\t\t$xml = self::str_replace_array(array(\n\t\t\t'&' => '&amp;',\n\t\t\t'<' => '&lt;',\n\t\t\t'>' => '&gt;',\n\t\t\t'\"' => '&quot;',\n\t\t\t\"'\" => '&apos;',\n\t\t\t),$xml);\n\t\t$xml = self::str_replace_array(array(\n\t\t\t'&amp;amp;' => '&amp;',\n\t\t\t),$xml);\n\t\t$xml = preg_replace('`\\n\\t+`',\"\\n\",$xml);\n\t\t$xml = preg_replace('`>\\t+`',\">\\n\",$xml);\n\t\t$xml = preg_replace('`>\\s?\\t?<`',\">\\n<\",$xml);\n\t\t$xml = preg_replace('`\\n\\n++`',\"\\n\",$xml);\n\t\treturn $xml;\n\t}", "public function forceStrip()\n {\n return $this->addAction(Flag::forceStrip());\n }", "public function removeXss()\n {\n static $antiXss = null;\n\n if ($antiXss === null) {\n $antiXss = new AntiXSS();\n }\n\n $str = $antiXss->xss_clean($this->str);\n\n return static::create($str, $this->encoding);\n }", "static function cleanXml($xml, $encoding = 'UTF-8')\n {\n static $mapping = null;\n if (!$mapping) {\n $list1 = get_html_translation_table(HTML_ENTITIES, ENT_NOQUOTES, $encoding);\n $list2 = get_html_translation_table(HTML_SPECIALCHARS, ENT_NOQUOTES, $encoding);\n $list = array_merge($list1, $list2);\n $mapping = array();\n foreach ($list as $char => $entity) {\n $mapping[strtolower($entity)] = '&#' . self::ord($char) . ';';\n }\n //$extras = array('&times;' => '&#215;', '&copy;' => '&#169;', '&nbsp;' => '&#160;', '&raquo;' => '&#187;', '&laquo;' => '&#171;');\n $extras = array('&times;' => '&#215;');\n $mapping = array_merge($mapping, $extras);\n }\n $xml = str_replace(array_keys($mapping), $mapping, $xml);\n $xml = preg_replace ('/[^\\x{0009}\\x{000a}\\x{000d}\\x{0020}-\\x{D7FF}\\x{E000}-\\x{FFFD}]+/u', ' ', $xml);\n return $xml;\n }", "private function runSalbatron(){\r\n\r\n\t\tob_start();\r\n\t\t//load the xsl stylesheet as domDocument\r\n\t\t$xslt_doc = new domDocument();\r\n\t\t$file = $this->xsl_path.'/'.$this->xsl_file;\r\n\t\t$xslt_doc->load($file);\r\n\r\n\t\t//load the source XML Document as domDocument\r\n\t\t$xml_doc = new domDocument();\r\n\t\t$abs_source = $this->workingdir.'/'.$this->source;\r\n\t\t$xml_doc->load($abs_source);\r\n\r\n\t\t$proc = new xsltprocessor;\r\n\t\t$xsl = $proc->importStylesheet($xslt_doc);\r\n\r\n\t\tt3lib_div::writeFile($this->workingdir.$this->target,$proc->transformToXml($xml_doc));\r\n\t\t$res = ob_get_contents();\r\n\t\tob_end_clean();\r\n\r\n\t\tif ($this->debug) t3lib_div::devLog ('XSL Trafo: '.$res,'tx_bridge_lib');\r\n\t}", "protected static function parseXslText(DOMElement $ir, DOMElement $node)\n\t{\n\t\tself::appendOutput($ir, 'literal', $node->textContent);\n\t}", "public function XmlObjAsHtml($xmlObj, $view = null) {\r\n $result = '';\r\n $view = $view == null ? (string) $xmlObj['id'] : $view;\r\n $xslFile = XSLT_PATH . $view . '.xsl';\r\n if(file_exists($xslFile)){\r\n // transform xsl file content into DOM object\r\n $this->dom->load($xslFile);\r\n // import xsl DOM to processor\r\n $this->xslt->importStyleSheet($this->dom);\r\n // load xml source into DOM\r\n $this->dom->loadXML($xmlObj->asXML());\r\n // execute XSLT\r\n $result = $this->xslt->transformToXML($this->dom);\r\n }\r\n return $result;\r\n }", "public static function disableHtmlExtension()\r\n {\r\n self::$html = false;\r\n }", "public function setXSLPath($path){\r\n\t\t$this->xsl_path = t3lib_div::getFileAbsFileName($path);\r\n\t}", "public function disablePrettyHTML() {\n\t\t$this->prettyHTML = false;\n\t}", "private function _preprocessDocument()\n {\n $xml = $this->getDocument();\n $xml = preg_replace('/<w:bookmarkStart w:id=\"[0-9]\" w:name=\"([0-9 A-Z _]*)\"/',\n self::$_templateSymbol . '${1}' . self::$_templateSymbol, $xml);\n return $xml;\n }", "function get_noko($source=false)\r\n{\r\n if ($source===false)\r\n return g('xparser');\r\n\r\n //if (is_string($source)) $source='<?xml encoding=\"UTF-8\">'.$source;\r\n return new nokogiri($source);\r\n}", "public function ssml();", "public function disableCompressCss() {}", "function xss_html_clean( $html )\n\t{\n\t\t//-----------------------------------------\n\t\t// Opening script tags...\n\t\t// Check for spaces and new lines...\n\t\t//-----------------------------------------\n\t\t\n\t\t$html = preg_replace( \"#<(\\s+?)?s(\\s+?)?c(\\s+?)?r(\\s+?)?i(\\s+?)?p(\\s+?)?t#is\" , \"&lt;script\" , $html );\n\t\t$html = preg_replace( \"#<(\\s+?)?/(\\s+?)?s(\\s+?)?c(\\s+?)?r(\\s+?)?i(\\s+?)?p(\\s+?)?t#is\", \"&lt;/script\", $html );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Basics...\n\t\t//-----------------------------------------\n\t\t\n\t\t$html = preg_replace( \"/javascript/i\" , \"j&#097;v&#097;script\", $html );\n\t\t$html = preg_replace( \"/alert/i\" , \"&#097;lert\" , $html );\n\t\t$html = preg_replace( \"/about:/i\" , \"&#097;bout:\" , $html );\n\t\t$html = preg_replace( \"/onmouseover/i\", \"&#111;nmouseover\" , $html );\n\t\t$html = preg_replace( \"/onclick/i\" , \"&#111;nclick\" , $html );\n\t\t$html = preg_replace( \"/onload/i\" , \"&#111;nload\" , $html );\n\t\t$html = preg_replace( \"/onsubmit/i\" , \"&#111;nsubmit\" , $html );\n\t\t$html = preg_replace( \"/<body/i\" , \"&lt;body\" , $html );\n\t\t$html = preg_replace( \"/<html/i\" , \"&lt;html\" , $html );\n\t\t$html = preg_replace( \"/document\\./i\" , \"&#100;ocument.\" , $html );\n\t\t\n\t\treturn $html;\n\t}", "public function initXlsContext() {\n $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');\n $view = $viewRenderer->view;\n if ($view instanceof Zend_View_Interface) {\n //$viewRenderer->setNoRender(true);\n }\n }", "public function __construct() {\n // Laravel. This line explicitly disables those errors for this single conversion process.\n libxml_use_internal_errors(true);\n }", "function createInkyProcessor()\n{\n $xslDoc = new DOMDocument();\n $xslDoc->load(__DIR__ . \"/inky.xsl\");\n\n $security = XSL_SECPREF_READ_FILE | XSL_SECPREF_READ_NETWORK | XSL_SECPREF_DEFAULT;\n $proc = new XSLTProcessor();\n $proc->setSecurityPrefs($security);\n $proc->importStylesheet($xslDoc);\n\n return $proc;\n}", "private function buildTempXslForThemes(){\n\t\t$arrayThemes = Theme::getAllThemes();\n\t\tforeach ($arrayThemes as $theme) {\n\t\t\t$theme->buildTempResources();\n\t\t\t$theme->project->buildCompressFile($theme->_shortname);\n\t\t\techo($theme->_shortname.\" theme installed\\r\\n\");\n\t\t}\t\t\n\t}", "protected function applyTransformation() {\n // no transformation for index\n }", "public function getDocTypeXHTMLStrict()\n {\n return self::DOC_TYPE_XHMTL_STRICT;\n }", "function _transxml($text) {\n \n //first replace allready translated text to original symbols\n\t $preout = str_replace(\"&amp;\",\"&\",$text);\n\t $preout1 = str_replace(\"&lt;\",\"<\",$preout);\n\t $preout2 = str_replace(\"&gt;\",\">\",$preout1);\n\t $preout3 = str_replace(\"&apos;\",\"'\",$preout2); \t \t \n\t $preout4 = str_replace(\"&quot\",\"\\\"\",$preout3);\n\t \n\t //next set original symbols to its equal symbols\t \n\t $out4 = str_replace(\"\\\"\",\"&quot;\",$preout4);\n\t $out3 = str_replace(\"'\",\"&apos;\",$preout4);\n\t $out2 = str_replace(\">\",\"&gt;\",$preout4);\n\t $out1 = str_replace(\"<\",\"&lt;\",$preout4);\n\t $out = str_replace(\"&\",\"&amp;\",$preout4);\t \t \t \t \n\t \n\t return ($out);\n }", "private function applyTransformation() {\n if($this->transform !== NULL) {\n $xsl = new DOMDocument();\n $xsl->load($this->transform);\n $xslt = new XSLTProcessor();\n $xslt->importStyleSheet($xsl);\n $document = $xslt->transformToDoc($this->document);\n if ($document) {\n $xpath = new DOMXPath($document);\n // Set the Label\n $results = $xpath->query(\"*[local-name()='title']\");\n $results->item(0)->nodeValue = $this->label;\n // Set the Pid\n $results = $xpath->query(\"*[local-name()='identifier']\");\n $results->item(0)->nodeValue = $this->pid;\n if (isset($document->documentElement)) {\n return $this->importNode($document->documentElement, TRUE);\n }\n }\n }\n return NULL;\n }", "public function run() {\n libxml_get_last_error() && libxml_clear_errors();\n \n $this->processor= new XSLTProcessor();\n $this->processor->importStyleSheet($this->stylesheet);\n $this->processor->setParameter('', $this->params);\n \n // If we have registered instances, register them in XSLCallback\n if (sizeof($this->_instances)) {\n $cb= XSLCallback::getInstance();\n foreach ($this->_instances as $name => $instance) {\n $cb->registerInstance($name, $instance);\n }\n }\n $this->processor->registerPHPFunctions(array('XSLCallback::invoke'));\n \n // Start transformation\n $this->output= $this->processor->transformToXML($this->document);\n\n // Check for errors\n $this->_checkErrors('<transformation>');\n\n // Perform cleanup when necessary (free singleton for further use)\n sizeof($this->_instances) && XSLCallback::getInstance()->clearInstances();\n \n return TRUE;\n }", "function jn_htmlInUrl_deactive() {\r\n\t\tglobal $wp_rewrite;\r\n\t\tif ( in_array( 'page', $this->selected_post_type ) ) {\r\n\t\t\t$wp_rewrite->page_structure = str_replace( '.html','',$wp_rewrite->page_structure );\r\n\t\t\t$wp_rewrite->flush_rules();\r\n\t\t}\r\n\t}", "function remove_sl(){\n\t\t\n\t}", "function deactivate() {\r\n global $wp_rewrite;\r\n\r\n $wp_rewrite->page_structure = str_replace(\".\" . $this->options->extension, \"\", $wp_rewrite->page_structure);\r\n $wp_rewrite->flush_rules();\r\n }", "public function setUp()\n {\n libxml_clear_errors();\n $this->mockXSLTProcessor = $this->getMock('\\XSLTProcessor');\n TestXslProcessor::$mockXsltProcessor = $this->mockXSLTProcessor;\n $this->xslProcessor = new TestXslProcessor(new XslCallbacks());\n $this->document = new \\DOMDocument();\n $this->document->loadXML('<?xml version=\"1.0\" encoding=\"UTF-8\"?><foo><bar/></foo>');\n $this->xslProcessor->onDocument($this->document);\n }", "function remove_word_styles() {\r\n\t\t$this->code = preg_replace('/<style[^<>]*?>(.*?)<\\/style>/is', '<style type=\"text/css\"></style>', $this->code);\r\n\t}", "function trans_off()\r\n\t{\r\n\t\t$this->db->trans_enabled = FALSE;\r\n\t}", "public function disableOutput()\n {\n $this->output = null;\n }", "public function isStylesheet()\n {\n return ! $this->isJavascript();\n }", "function first_edition_deregister_styles() {\n\tif ( '' != get_option( 'first_edition_font_pair' ) ) {\n\t\twp_dequeue_style( 'quattrocento' );\n\t\twp_dequeue_style( 'quattrocento-sans' );\n\t}\n}", "function transformString($xml)\n{\n return transformDOM(loadTemplateString($xml));\n}", "private function cleanForXML($string)\n {\n $string = strip_tags($string);\n $string = htmlentities($string, ENT_QUOTES, \"UTF-8\");\n $string = preg_replace(\"/&#?[a-z0-9]{2,8};/i\", \"\", $string);\n return $string;\n }", "private function cleanForXML($string)\n {\n $string = strip_tags($string);\n $string = htmlentities($string, ENT_QUOTES, \"UTF-8\");\n $string = preg_replace(\"/&#?[a-z0-9]{2,8};/i\", \"\", $string);\n return $string;\n }", "public function hideXLabels() {\n\t\t$this->Options['xaxis']['show'] = false;\n\t}", "private function restoreMathAndLocale()\n {\n ILess_Math::restore();\n ILess_UnitConversion::restore();\n }", "private static function check_xsl_loaded()\n {\n if (!defined('PHPOPENFW_XSL_LOADED')) {\n if (extension_loaded('xsl') && extension_loaded('dom')) {\n define('PHPOPENFW_XSL_LOADED', true);\n }\n else {\n define('PHPOPENFW_XSL_LOADED', false);\n }\n }\n return PHPOPENFW_XSL_LOADED;\n }", "private static function check_xsl_loaded()\n {\n if (!defined('PHPOPENFW_XSL_LOADED')) {\n if (extension_loaded('xsl') && extension_loaded('dom')) {\n define('PHPOPENFW_XSL_LOADED', true);\n }\n else {\n define('PHPOPENFW_XSL_LOADED', false);\n }\n }\n return PHPOPENFW_XSL_LOADED;\n }", "function unformatted($text) {\n $this->doc .= $this->_xmlEntities($text);\n }", "public static function clearOutput(): void\n {\n rex_extension::register('OUTPUT_FILTER', static function (rex_extension_point $ep) {\n $ep->setSubject(false);\n });\n }", "public function render($xml)\n\t{\n\t\t// Fast path for plain text\n\t\tif (substr($xml, 0, 4) === '<pt>')\n\t\t{\n\t\t\treturn substr($xml, 4, -5);\n\t\t}\n\n\t\t$dom = new DOMDocument;\n\t\t$dom->loadXML($xml);\n\n\t\tif (!isset($this->proc))\n\t\t{\n\t\t\t$xsl = new DOMDocument;\n\t\t\t$xsl->loadXML($this->stylesheet);\n\n\t\t\t$this->proc = new XSLTProcessor;\n\t\t\t$this->proc->importStylesheet($xsl);\n\t\t}\n\n\t\t// Remove the \\n that XSL adds at the end of the output\n\t\treturn substr($this->proc->transformToXml($dom), 0, -1);\n\t}", "public function transpile($template)\n\t{\n\t\t$replacements = [\n\t\t\t'(\\\\{\\\\{)' => '&#123;',\n\t\t\t'(\\\\}\\\\})' => '&#125;',\n\t\t\t'(\\\\{\\\\$([A-Z]\\\\w+)\\\\})' => '{{$xf.options.s9e_MediaSites_$1}}',\n\t\t\t'(\\\\{@(\\\\w+)\\\\})' => '{$$1}',\n\t\t\t'(<xsl:value-of select=\"@(\\\\w+)\"/>)' => '{$$1}',\n\t\t\t'(<xsl:value-of select=\"\\\\$(\\\\w+)\"/>)' => '{{$xf.options.s9e_MediaSites_$1}}',\n\t\t\t'((<iframe[^>]+?)/>)' => '$1></iframe>',\n\t\t\t'( data-s9e-livepreview[^=]*=\"[^\"]*\")' => '',\n\t\t\t\"(\\\\{translate\\\\(@id,'(.)','(.)'\\\\)\\\\})\" => \"{\\$id|replace('\\$1','\\$2')}\",\n\n\t\t\t'(<xsl:if test=\"([^\"]++)\">)' => '<xf:if is=\"$1\">',\n\t\t\t'(</xsl:if>)' => '</xf:if>',\n\t\t\t'(<xsl:choose><xsl:when test=\"([^\"]++)\">)' => '<xf:if is=\"$1\">',\n\t\t\t'(</xsl:when><xsl:when test=\"([^\"]++)\">)' => '<xf:elseif is=\"$1\"/>',\n\t\t\t'(</xsl:when><xsl:otherwise>)' => '<xf:else/>',\n\t\t\t'(</xsl:otherwise></xsl:choose>)' => '</xf:if>',\n\t\t];\n\t\t$template = preg_replace('((<xsl:when[^>]*)/>)', '$1></xsl:when>', $template);\n\t\t$template = preg_replace(array_keys($replacements), array_values($replacements), $template);\n\t\t$template = preg_replace_callback(\n\t\t\t'(<xf:(?:else)?if is=\"\\\\K[^\"]++)',\n\t\t\tfunction ($m)\n\t\t\t{\n\t\t\t\treturn $this->convertXPath($m[0]);\n\t\t\t},\n\t\t\t$template\n\t\t);\n\t\t$template = preg_replace_callback(\n\t\t\t'(<xsl:value-of select=\"(.*?)\"/>)',\n\t\t\tfunction ($m)\n\t\t\t{\n\t\t\t\treturn '{{ ' . $this->convertXPath($m[1]) . ' }}';\n\t\t\t},\n\t\t\t$template\n\t\t);\n\n\t\t// Replace xf:if with inline ternaries in attributes\n\t\t$template = preg_replace_callback(\n\t\t\t'(<xsl:attribute[^>]+>\\\\K.*?(?=</xsl:attribute))',\n\t\t\tfunction ($m)\n\t\t\t{\n\t\t\t\treturn $this->convertTernaries($m[0]);\n\t\t\t},\n\t\t\t$template\n\t\t);\n\n\t\t// Inline xsl:attribute elements in HTML elements\n\t\t$template = $this->loopReplace(\n\t\t\t'((<(?!\\\\w+:)[^>]*)><xsl:attribute name=\"(\\\\w+)\">(.*?)</xsl:attribute>)',\n\t\t\t'$1 $2=\"$3\">',\n\t\t\t$template\n\t\t);\n\n\t\t// Test whether we've been able to transpile everything\n\t\tif (strpos($template, '<xsl:') !== false)\n\t\t{\n\t\t\tthrow new RuntimeException('Cannot transpile XSL element');\n\t\t}\n\t\tif (preg_match('((?<!\\\\{)\\\\{(?![{$])[^}]*\\\\}?)', $template, $m))\n\t\t{\n\t\t\tthrow new RuntimeException(\"Cannot transpile attribute value template '\" . $m[0] . \"'\");\n\t\t}\n\n\t\t// Unescape braces\n\t\t$template = strtr($template, ['&#123;' => '{', '&#125;' => '}']);\n\n\t\t// Replace the $MEDIAEMBED_THEME parameter with the XenForo style property\n\t\t$template = str_replace('$xf.options.s9e_MediaSites_MEDIAEMBED_THEME', \"property('styleType')\", $template);\n\n\t\treturn $template;\n\t}", "public function disableTypeChecks() {\n $this->doTypeChecks = false;\n }", "function XML(){\n\t\t\t\t$this->parser = &xml_parser_create();\n\t\t\t\txml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, false);\n\t\t\t\txml_set_object($this->parser, $this);\n\t\t\t\txml_set_element_handler($this->parser, 'open','close');\n\t\t\t\txml_set_character_data_handler($this->parser, 'data');\n\t\t\t}", "private function render($template, $xml)\r\n\t{\r\n\t\tif(get::variable('xml','isset') or Settings::singleton()->get_setting('send_as_xml') or class_exists('xsltProcessor') === false)\r\n\t\t{\r\n\t\t\t//Just send the XML\r\n\t\t\tCommon::send_mime_type('text/xml');\r\n\r\n\t\t\t$search = '<?xml version=\"1.0\"?>';\r\n\t\t\t$replace = '<?xml version=\"1.0\" encoding=\"'. Settings::singleton()->get_setting('char_set').'\" ?><?xml-stylesheet type=\"text/xsl\" href=\"'. Settings::singleton()->get_setting('document_root').'/xslt\" ?>';\r\n\t\t\tif(get::variable('xml') == 1) { $replace = '<?xml version=\"1.0\" encoding=\"'. Settings::singleton()->get_setting('char_set').'\" ?>'; }\r\n\r\n\t\t\t$this->render_this(str_replace($search, $replace, $xml));\r\n\t\t\texit;\r\n\t\t}\r\n\r\n\t\t$this->html = $this->transform_xml_with_xslt($xml, $template);\r\n\r\n\t\t/* hack to clean html */\r\n\t\t$this->clean_html();\r\n\r\n\t\t/* output the html */\r\n\t\t$this->send_html();\r\n\t\texit;\r\n\t}", "function unset_template()\r\n\t{\r\n\t\t$this->_template = null;\r\n\t\t$this->set_mode(self::OUTPUT_MODE_NORMAL);\r\n\t}", "public function setDefaultTransformer($transformer);", "protected function resetNamespaceFilter() {\n\t\t$this->lookup->clearFilter( 'namespace_text' );\n\t}", "function regexcleanhtml($text){\n\t//get rid of unneeded spaces\n\t$text=regexspacecleaner($text);\n\t\n\t//lets get rid of weird spacing first so we can make simpler quearies later\n\t$regex_pattern=\"/<\\s/\"; //makes < followed by a space just < (e.g. slkj < slkj = slkj <slkj)\n\t$text = preg_replace($regex_pattern, \"<\", $text);\n\t$regex_pattern=\"/\\s>/\"; //makes > preceded by a space just > (e.g. slkj > slkj = slkj> slkj)\n\t$text = preg_replace($regex_pattern, \">\", $text);\n\t$regex_pattern=\"/<\\/\\s/\";\n\t$text = preg_replace($regex_pattern, \"</\", $text); //makes </ followed by a space just </ (e.g. slkj </ slkj = slkj </slkj)\n\t\n\treturn $text;\n}", "public function removeStyleDec() {\n\t}", "private function outputXml()\n {\n $stringXML = $this->dom->saveXML();\n\n $stringXML = str_replace('<?xml version=\"999\"?>', '', $stringXML);\n\n //dd(trim($stringXML));\n\n return trim($stringXML);\n }", "public function transformToUri(): void\n {\n $this->baseXsltProcessor->returns(['transformToUri' => 4555]);\n assertThat($this->xslProcessor->toUri('foo'), equals(4555));\n }", "function _make_safe_for_xml( $t )\n \t{\n \t\treturn str_replace( '&amp;#39;', '&#39;', htmlspecialchars( $t ) );\n \t}", "public function clearXmlPlugins()\n {\n $this->collXmlPlugins = null; // important to set this to NULL since that means it is uninitialized\n }", "public static function OptimizeXml($xml){\r\n\t\tself::Debug('Optimize XML');\r\n\t\treturn preg_replace('/[\\n|\\t]/','',$xml);\r\n\t}", "public function transform($xmlFile, $xslFile) {\r\n # load the xsl as DOM object\r\n $this->dom->load($xslFile);\r\n # import xsl DOM to processor\r\n $this->xslt->importStyleSheet($this->dom);\r\n # load xml DOM\r\n $this->dom->load($xmlFile);\r\n # execute XSLT\r\n return $this->xslt->transformToXML($this->dom);\r\n }", "public static function removeXmlEntities($xml)\n {\n return preg_replace('#\\s*<!ENTITY .*?>#is', '', $xml);\n }", "function _fly_transform($new_source) {\n $tempFilename = tempnam(\"/tmp\", \"MODS_xml_initial_\");\n $data = str_replace(\n array('{|', '|}', '}', '{'), \n array('?', '?', '>', '<'), '{{|xml version=\"1.0\" |}}\n{xsl:stylesheet version=\"1.0\"\n xmlns:mods=\"http://www.loc.gov/mods/v3\"\n xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"}\n {xsl:template match=\"/ | @* | node()\"}\n {xsl:copy}\n {xsl:apply-templates select=\"@* | node()\" /}\n {/xsl:copy}\n {/xsl:template}\n {xsl:template match=\"/mods:mods/mods:relatedItem[@type=\\'host\\']/mods:titleInfo\"}{mods:titleInfo}{mods:title}' . $new_source . '{/mods:title}{/mods:titleInfo}{/xsl:template}\n{/xsl:stylesheet}');\n\n file_put_contents($tempFilename, $data);\n return $tempFilename;\n}", "function clearTransformers()\n {\n $this->getTransformerContainer()->clearTransformers();\n }", "function cleanup() {\n\n\t\t// reset language\n\t\tif ( Language::is_multilingual() ) {\n\t\t\tLanguage::set_original();\n\t\t}\n\n\t\tremove_filter( 'woocommerce_get_tax_location', [ $this, 'filter_tax_location' ] );\n\n\t\t$this->is_setup = false;\n\t}" ]
[ "0.58941406", "0.56895256", "0.5678719", "0.5654335", "0.55474824", "0.5529772", "0.552298", "0.5462376", "0.54589814", "0.5355058", "0.5347424", "0.53075933", "0.5186075", "0.511506", "0.5105281", "0.50885534", "0.50488853", "0.5037611", "0.5032306", "0.5014301", "0.49986935", "0.49383342", "0.4936689", "0.489528", "0.4886625", "0.48816037", "0.48599315", "0.4842243", "0.48146942", "0.47613004", "0.47576204", "0.4748905", "0.47381786", "0.47294012", "0.4723768", "0.47212395", "0.46672878", "0.46515664", "0.46432865", "0.46248618", "0.46192554", "0.46079838", "0.46034878", "0.45886433", "0.45871106", "0.45747665", "0.45633703", "0.45503274", "0.451535", "0.45135573", "0.45107773", "0.45071593", "0.44953254", "0.4486224", "0.4485979", "0.44829005", "0.4468981", "0.44677025", "0.4461049", "0.4459076", "0.44515267", "0.44456217", "0.4439435", "0.44379622", "0.44340676", "0.44290105", "0.44099602", "0.44095084", "0.44066724", "0.43998352", "0.43988255", "0.4395684", "0.4387753", "0.4387753", "0.4378999", "0.43762952", "0.4375828", "0.4375828", "0.4375143", "0.43740568", "0.43730068", "0.43707487", "0.43647963", "0.43616024", "0.43439806", "0.43436557", "0.43382424", "0.4319731", "0.43168548", "0.43133312", "0.43104246", "0.42967054", "0.42928156", "0.4292566", "0.42914006", "0.42880824", "0.42858818", "0.42827788", "0.4254456", "0.4253131" ]
0.7720259
0
Creates a new Uptime check configuration. (uptimeCheckConfigs.create)
Создает новую конфигурацию проверки доступности. (uptimeCheckConfigs.create)
public function create($parent, UptimeCheckConfig $postBody, $optParams = []) { $params = ['parent' => $parent, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('create', [$params], UptimeCheckConfig::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function CreateUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\CreateUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/CreateUptimeCheckConfig',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig', 'decode'],\n $metadata, $options);\n }", "public function setUptimeCheckConfig($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig::class);\n $this->uptime_check_config = $var;\n\n return $this;\n }", "public function get($name, $optParams = [])\n {\n $params = ['name' => $name];\n $params = array_merge($params, $optParams);\n return $this->call('get', [$params], UptimeCheckConfig::class);\n }", "public function ListUptimeCheckConfigs(\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckConfigsRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/ListUptimeCheckConfigs',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckConfigsResponse', 'decode'],\n $metadata, $options);\n }", "public function getUptimeCheckConfig()\n {\n return $this->uptime_check_config;\n }", "public function patch($name, UptimeCheckConfig $postBody, $optParams = [])\n {\n $params = ['name' => $name, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('patch', [$params], UptimeCheckConfig::class);\n }", "public function listProjectsUptimeCheckConfigs($parent, $optParams = [])\n {\n $params = ['parent' => $parent];\n $params = array_merge($params, $optParams);\n return $this->call('list', [$params], ListUptimeCheckConfigsResponse::class);\n }", "public function UpdateUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\UpdateUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/UpdateUptimeCheckConfig',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig', 'decode'],\n $metadata, $options);\n }", "public function createConfig()\n\t{\n\t}", "public function GetUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\GetUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/GetUptimeCheckConfig',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig', 'decode'],\n $metadata, $options);\n }", "public function DeleteUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\DeleteUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/DeleteUptimeCheckConfig',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function checkConfig();", "public function ListUptimeCheckIps(\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckIpsRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/ListUptimeCheckIps',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckIpsResponse', 'decode'],\n $metadata, $options);\n }", "private function createConfigsTable()\n {\n $fields = array(\n 'id' => array('type' => 'int', 'constraint' => '10', 'unsigned' => true, 'auto_increment' => true),\n 'site_id' => array('type' => 'int', 'constraint' => '10', 'unsigned' => true),\n 'client_id' => array('type' => 'varchar', 'constraint' => '250'),\n 'client_secret' => array('type' => 'varchar', 'constraint' => '250'),\n 'api_endpoint' => array('type' => 'varchar', 'constraint' => '1000', 'null' => true),\n 'log_searches' => array('type' => 'tinyint', 'constraint' => '10', 'unsigned' => true),\n );\n\n ee()->dbforge->add_field($fields);\n ee()->dbforge->add_key('id', true);\n\n ee()->dbforge->create_table('rets_rabbit_v2_configs');\n }", "public function createFromConfig()\n { \n // Begin transation\n $this->pdo->beginTransaction();\n\n // Create tables\n foreach ($this->schema['create'] as $name => $schema) {\n $table = $this->tables[$name];\n $this->pdo->exec($this->getDropTable($table));\n $sql = $this->getCreateTable($table, $schema);\n $this->pdo->exec($sql);\n }\n\n // Commit changes\n $this->pdo->commit();\n }", "public function createConfig(array $nodes);", "function recurringdowntime_check_cfg()\n{\n if (!file_exists(RECURRINGDOWNTIME_CFG)) {\n $fh = @fopen(RECURRINGDOWNTIME_CFG, \"w+\");\n fclose($fh);\n }\n}", "public function create_table_config(){\n $sql = \" CREATE TABLE IF NOT EXISTS {$this->table_config} (\n `id` varchar(100),\n `day` varchar(50) DEFAULT NULL,\n `range` varchar(50) DEFAULT NULL,\n `qty` smallint DEFAULT 0,\n `type` varchar(50) DEFAULT NULL,\n `order` smallint DEFAULT 0,\n PRIMARY KEY (`id`)\n )\";\n\n require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n dbDelta($sql);\n }", "private function createConfiguration()\n {\n $this->createVrpayecommercePluginConfig();\n $this->Form();\n }", "public static function checkConfig() {\n\t\tlog::add('surveillanceStation', 'debug', ' ┌──── Verification des configurations du plugin');\n\t\t// Checking snapLocation\n\t\tif (config::byKey('snapLocation', 'surveillanceStation') == 'synology') {\n\t\t\tconfig::save('snapRetention', '', 'surveillanceStation');\n\t\t\tlog::add('surveillanceStation', 'debug', ' │ checkConfig::snapRetention Nettoyage des valeurs');\n\t\t}\n\t\t// Checking Integer fields\n\t\tforeach (array('port', 'snapRetention') as $field) {\n\t\t\tif ( ! empty(config::byKey($field, 'surveillanceStation'))) {\n\t\t\t\tswitch($field) {\n\t\t\t\t\tcase 'port':\n\t\t\t\t\t\t$min_range = 1;\n\t\t\t\t\t\t$max_range = 65535;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$min_range = 0;\n\t\t\t\t\t\t$max_range = 9999;\n\t\t\t\t}\n\t\t\t\tif(!filter_var(config::byKey($field, 'surveillanceStation'), FILTER_VALIDATE_INT, array('options' => array('min_range' => $min_range, 'max_range' => $max_range)))){\n\t\t\t\t\tlog::add('surveillanceStation', 'debug', ' │ ERROR : checkConfig::'.$field.' est invalide. La configuration doit être un nombre (entier) compris entre '.$min_range.' et '.$max_range);\n\t\t\t\t\tlog::add('surveillanceStation', 'debug', ' └────────────');\n\t\t\t\t\tthrow new Exception(__($field.' est invalide. La configuration doit être un nombre (entier) compris entre '.$min_range.' et '.$max_range, __FILE__));\n\t\t\t\t} else {\n\t\t\t\t\tlog::add('surveillanceStation', 'debug', ' │ checkConfig::'.$field.' OK with value ' . config::byKey($field, 'surveillanceStation'));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tlog::add('surveillanceStation', 'debug', ' └────────────');\n }", "public static function create(array $config = [])\n {\n }", "protected function setUpFromConfig()\n\t{\n\t\t$timeLimit = 4 * 60 * 60;\n\n\t\t$parameters = $this->container->getParameters();\n\t\tif (is_array($parameters) and array_key_exists(\"taskManager\", $parameters)) {\n\t\t\t/// ***** TIMELIMIT ****** //\n\t\t\tif (isset($parameters[\"taskManager\"][\"timeLimit\"])) {\n\t\t\t\t$timeLimit = $parameters[\"taskManager\"][\"timeLimit\"];\n\t\t\t}\n\t\t\t/// ***** MAX HISTORY DAYS ****** //\n\t\t\tif (isset($parameters[\"taskManager\"][\"history\"][\"maxDays\"])) {\n\t\t\t\t$this->maxHistoryDays = (int)$parameters[\"taskManager\"][\"history\"][\"maxDays\"];\n\t\t\t}\n\t\t\t/// ***** MAX HISTORY RECORDS ****** //\n\t\t\tif (isset($parameters[\"taskManager\"][\"history\"][\"maxRecords\"])) {\n\t\t\t\t$this->maxHistoryRecords = (int)$parameters[\"taskManager\"][\"history\"][\"maxRecords\"];\n\t\t\t}\n\t\t}\n\n\t\tset_time_limit($timeLimit);\n\t}", "public static function addConfig($data) {\n\t\tif (!is_array($data)) return false;\n\t\t$data['create_time'] = Common::getTime();\n $data['update_time'] = Common::getTime();\n\t\t$data = self::_cookData($data);\n\t\treturn self::_getDao()->insert($data);\n\t}", "public static function configCheckTime($interval) {\n return time()+$interval;\n }", "public function createUser(array $config = []);", "abstract public static function createConfig(): Config;", "protected function validateCreating()\r\n {\r\n $rules = config('taki.validator.create', []);\r\n\r\n if (config('taki.username.required') && !array_get($rules, config('taki.field.username'))) {\r\n $rules[config('taki.field.username')] = config('taki.username.validator', 'required');\r\n }\r\n\r\n return $rules;\r\n }", "public static function createFromConfig(array $config);", "public function create()\n {\n return view('system_configs.create');\n }", "public function testCreate()\n {\n VCR::insertCassette('pickups/create.yml');\n\n $shipment = Shipment::create(Fixture::oneCallBuyShipment());\n\n $pickupData = Fixture::basicPickup();\n $pickupData['shipment'] = $shipment;\n\n $pickup = Pickup::create($pickupData);\n\n $this->assertInstanceOf('\\EasyPost\\Pickup', $pickup);\n $this->assertStringMatchesFormat('pickup_%s', $pickup->id);\n $this->assertNotNull($pickup->pickup_rates);\n }", "private function _uptime()\n {\n if (CommonFunctions::executeProgram('uptime', '', $buf)) {\n if (preg_match(\"/up (\\d+) days,\\s*(\\d+):(\\d+),/\", $buf, $ar_buf) || preg_match(\"/up (\\d+) day,\\s*(\\d+):(\\d+),/\", $buf, $ar_buf)) {\n $min = $ar_buf[3];\n $hours = $ar_buf[2];\n $days = $ar_buf[1];\n $this->sys->setUptime($days * 86400 + $hours * 3600 + $min * 60);\n }\n }\n }", "public function create()\n {\n return $this->check;\n }", "public function createCfg() {\n global $hostlist;\n $hostinfo = $hostlist[$this->host];\n $this->prepareCfg();\n $src = PATH . '/serverdata';\n $dest = GAMEPATH . '/users/ts' . $this->sid;\n if($ssh = new SSH($hostinfo)) {\n $ret1 = $ssh->sendFile($src . '/server' . $this->sid . '.cfg', $dest . '/server.cfg');\n $ret2 = $ssh->sendFile($src . '/mapcycle' . $this->sid . '.txt', $dest . '/mapcycle.txt');\n return $ret1 && $ret2;\n }\n }", "private function runConfig()\n {\n $configs = [\n [\n 'name' => 'sub_title',\n 'alias_name' => 'SubTitle',\n 'value' => 'SubTitle',\n ],\n [\n 'name' => 'title',\n 'alias_name' => 'Title',\n 'value' => 'Title',\n ],\n ];\n\n foreach ($configs as $config) {\n factory(Config::class)->create($config);\n }\n }", "public function CreateUserConfiguration($request)\n {\n return $this->makeRequest(__FUNCTION__, $request);\n }", "public function getCheckups()\n {\n $scheduledCheckups = User::find(auth()->id())->checkups->reverse();\n\n return api_resource('mobile\\CheckupSchedule')->make($scheduledCheckups);\n }", "function prepConfig() {\n\n global $db;\n global $lang;\n\n if($report = $db->query(\"CREATE DATABASE IF NOT EXISTS \".$lang[\"config_db_name\"].\"\")) {\n\n // Generate safety table\n if($report = $db->query(\"CREATE TABLE IF NOT EXISTS `\".$lang[\"config_db_name\"].\"`.`\".$lang[\"config_table_name\"].\"` ( `id` INT(6) NOT NULL AUTO_INCREMENT, `key` VARCHAR(100) NOT NULL, UNIQUE (`key`), `val` VARCHAR(100) NOT NULL , PRIMARY KEY (`id`)) ENGINE = InnoDB;\")) {\n\n return \"Ready\";\n\n } else {\n\n return \"Failed to create table. Error: \".$db->error;\n\n }\n\n } else {\n\n return \"Failed to create database. Error: \".$db->error;\n\n }\n\n }", "public function actionCreate() {\n $model = new Configuration();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "protected function createConfiguration($sf_user)\n {\n $conf = new mtAlertMessageUserConfiguration();\n $conf->setmtAlertMessageId($this->getId());\n $conf->setUsername(mtAlertUserHelper::getUsername($sf_user));\n\n return $conf;\n }", "public function run()\n {\n printf(\"Adding hauling configuration.\\r\\n\");\n\n if(HaulingConfig::where(['load_size' => 'small'])->count() == 0) {\n HaulingConfig::insert([\n 'load_size' => 'small',\n 'min_load_size' => 0,\n 'max_load_size' => 8000,\n 'price_per_jump' => 600000.00,\n ]);\n }\n \n if(HaulingConfig::where(['load_size' => 'medium'])->count() == 0) {\n HaulingConfig::insert([\n 'load_size' => 'medium',\n 'min_load_size' => 8000,\n 'max_load_size' => 57500,\n 'price_per_jump' => 800000.00,\n ]);\n }\n\n if(HaulingConfig::where(['load_size' => 'large'])->count() == 0) {\n HaulingConfig::insert([\n 'load_size' => 'large',\n 'min_load_size' => 57500,\n 'max_load_size' => 800000,\n 'price_per_jump' => 1000000.00,\n ]);\n }\n\n printf(\"Finished adding hauling configuration.\\r\\n\");\n }", "public function create()\n\t{\n\t\t//\n\t\treturn view('checkup_shedules.create');\n\t}", "public function setCheckCount($checkcount) {\n\t\t$this->checkcount = $checkcount;\n\t}", "function Dataface_ConfigTool_createConfigTable(){\n\t$self =& Dataface_ConfigTool::getInstance();\n\tif ( !Dataface_Table::tableExists($self->configTableName, false) ){\n\t\t$sql = \"CREATE TABLE `\".$self->configTableName.\"` (\n\t\t\t\t\tconfig_id int(11) NOT NULL auto_increment primary key,\n\t\t\t\t\t`file` varchar(255) NOT NULL,\n\t\t\t\t\t`section` varchar(128),\n\t\t\t\t\t`key` varchar(128) NOT NULL,\n\t\t\t\t\t`value` text NOT NULL,\n\t\t\t\t\t`lang` varchar(2),\n\t\t\t\t\t`username` varchar(32),\n\t\t\t\t\t`priority` int(5) default 5\n\t\t\t\t\t)\";\n\t\t$res = mysql_query($sql, df_db());\n\t\tif ( !$res ){\n\t\t\ttrigger_error(mysql_error(df_db()), E_USER_ERROR);\n\t\t\texit;\n\t\t}\n\t}\n\n}", "public function createNewConfig() { \n\n\t\t/** \n\t\t * Start by creating the top of the php file\n\t\t *\n\t\t */\n\t\t$this->newFileStr = \"<?php\\n\\n\";\n\n\t\t/** \n\t\t * We want to loop through the new config variables\n\t\t * and concatenate the variable\n\t\t *\n\t\t * @var string stores new variables.\n\t\t */\n\n\t\tforeach ($this->fileSettings as $name => $val) {\n\n\t\t/** \n\t\t * Output our config variables comment\n\t\t * and concatenate the variable\n\t\t *\n\t\t * @var string stores new config comment\n\t\t */\n\n\t\t$this->newFileStr .= \"\\n\\n//\" . $val['1'] . \"\\n\";\n\t\t\n\n\t\t/** \n\t\t *\n\t\t * Using var_export() allows you to set complex values \n\t\t * such as arrays and also ensures types will be correct\n\t\t *\n\t\t * @var string stores new config setting\n\t\t */\n\t\t\n\t\t$this->newFileStr .= \"$\".$name.\" = \".var_export($val['0'], TRUE).\";\\n\";\n\n\n\t\t} // end of foreach\n\n\t\t/** \n\t\t *\n\t\t * End our php file\n\t\t *\n\t\t */\n\n\t\t$this->newFileStr .= \"\\n?>\";\n\n\t\t/** \n\t\t *\n\t\t * Create out new config\n\t\t *\n\t\t */\n\t\tfile_put_contents($this->filePath, $this->newFileStr, LOCK_EX);\n\n\t}", "public function create()\n {\n return view('checks.create', [\n 'tags' => $this->getTags(),\n 'check' => (new Check())\n ]);\n }", "private function check_conf() {\n ConfigChecker::check();\n }", "public function configuredChecks() {\n if ($this->checks === null) {\n $this->checks = [];\n foreach( $this->config as $driver => $checkConfig ) {\n // check if multiple or just one\n if (is_array($checkConfig)) {\n foreach( $checkConfig as $key => $config ) {\n $instance = $this->createInstance( $driver, $config );\n $instance->setInstanceName(is_string($key)?$key:$config);\n $this->checks[] = $instance;\n }\n } else {\n $instance = $this->createInstance( $driver, $checkConfig );\n $this->checks[] = $instance;\n }\n }\n }\n return $this->checks;\n }", "public function setUp()\n {\n $this->config = array(\n 's1' => 'string',\n 's2' => 'str',\n 'i1' => 'integer',\n 'i2' => 'int',\n 'i3' => '+integer',\n 'i4' => '+int',\n 'i5' => '-integer',\n 'i6' => '-int',\n 'f1' => 'float',\n 'f2' => '+float',\n 'f3' => '-float',\n 'b' => 'boolean',\n 'a' => 'array',\n 'm' => array(true, 'false'),\n 'r' => '/^member/',\n );\n $this->helper = new ConfigValidator($this->config);\n }", "public function __construct() {\n $base_class_name = 'SiteAuditCheck' . $this->getReportName();\n $percent_override = NULL;\n\n $checks_to_skip = array();\n if (drush_get_option('skip')) {\n $checks_to_skip = explode(',', drush_get_option('skip'));\n }\n\n $checks_to_perform = $this->getCheckNames();\n\n foreach ($checks_to_perform as $key => $check_name) {\n if (in_array($this->getReportName() . $check_name, $checks_to_skip)) {\n unset($checks_to_perform[$key]);\n }\n }\n\n if (empty($checks_to_perform)) {\n // No message for audit_all.\n $command = drush_parse_command();\n if ($command['command'] == 'audit_all') {\n return FALSE;\n }\n return drush_set_error('SITE_AUDIT_NO_CHECKS', dt('No checks are available!'));\n }\n $config = \\Drupal::config('site_audit');\n foreach ($checks_to_perform as $check_name) {\n $class_name = $base_class_name . $check_name;\n $opt_out = $config->get('opt_out.' . $this->getReportName() . $check_name) != NULL;\n $check = new $class_name($this->registry, $opt_out);\n\n // Calculate score.\n if ($check->getScore() != SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_INFO) {\n // Mark if there's a major failure.\n if ($check->getScore() == SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_FAIL) {\n $this->hasFail = TRUE;\n }\n // Total.\n $this->scoreTotal += $check->getScore();\n // Maximum.\n $this->scoreMax += SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_PASS;\n }\n // Allow Report percentage to be overridden.\n if ($check->getPercentOverride()) {\n $percent_override = $check->getPercentOverride();\n }\n // Combine registry.\n $this->registry = array_merge($this->registry, $check->getRegistry());\n // Store all checks.\n $this->checks[$class_name] = $check;\n // Abort the loop if the check says to bail.\n if ($check->shouldAbort()) {\n break;\n }\n }\n if ($percent_override) {\n $this->percent = $percent_override;\n }\n else {\n if ($this->scoreMax != 0) {\n $this->percent = round(($this->scoreTotal / $this->scoreMax) * 100);\n }\n else {\n $this->percent = SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_INFO;\n }\n }\n }", "public function run()\n {\n App\\Models\\UserStatus::create(\n ['user_id' => 1,\n 'lesson_id' => 1,\n 'question_ids' => '2 3 4',\n 'current_position' => -1,\n 'count_true_answers' => 0,\n 'attempt' => 0,\n 'max_attempt' => 3,\n 'threshold' => 80,\n 'is_success' => false\n ]\n );\n }", "public function run()\n {\n $walletConfig = new WalletConfig;\n $walletConfig->wallet_validity_period = 30;\n $walletConfig->save();\n }", "public function run()\n {\n Configuration::create([\n \"KEY_\" => \"business.name\",\n \"VALUE_\" => \"Zawiyah dental\"\n ]);\n\n Configuration::create([\n \"KEY_\" => \"business.address1\",\n \"VALUE_\" => \"Jalan Tok Kiah\"\n ]);\n\n Configuration::create([\n \"KEY_\" => \"business.address2\",\n \"VALUE_\" => \"Kemaman\"\n ]);\n\n Configuration::create([\n \"KEY_\" => \"business.address2\",\n \"VALUE_\" => \"Terengganu\"\n ]);\n\n }", "public function create()\n {\n $this->createApply();\n $this->createNginx();\n }", "public function Create()\n\t\t{\n\t\t\tparent::Create();\n \n\t\t\t$this->RegisterPropertyBoolean(\"cbxGS\", true);\n $this->RegisterPropertyBoolean(\"cbxHM\", true);\n $this->RegisterPropertyBoolean(\"cbxPP\", true);\n $this->RegisterPropertyBoolean(\"cbxBO\", false);\n $this->RegisterPropertyBoolean(\"cbxPT\", false);\n $this->RegisterVariableString(\"RestTimesHTML\", $this->Translate(\"Waste dates\"), \"~HTMLBox\");\n\n $this->RegisterPropertyInteger(\"PushInstanceID\", 0);\n $this->RegisterPropertyInteger(\"MailInstanceID\", 0);\n\n $this->RegisterPropertyInteger(\"IntervalUpdateTimer\", 0);\n $this->RegisterPropertyInteger(\"IntervalNotificationTimer\", 19);\n $this->RegisterPropertyInteger(\"IntervalUpdateTimerMinute\", 1);\n $this->RegisterPropertyInteger(\"IntervalHtmlResetColorTodayTimer\", 9);\n $this->RegisterPropertyInteger(\"IntervalNotificationTimerMinute\", 50);\n $this->RegisterPropertyInteger(\"TableFontSize\", 100);\n\n //HTML Defaults:\n $this->RegisterPropertyInteger(\"selColHtmlDefault\", 16777215);\n $this->RegisterPropertyInteger(\"selColHtmlPickupDayTomorrow\", 16744448);\n $this->RegisterPropertyInteger(\"selColHtmlPickupDayToday\", 16711680);\n $this->RegisterPropertyBoolean(\"cbxHtmlShowDay\", false);\n $this->RegisterPropertyBoolean(\"cbxHtmlResetColorToday\", false);\n\n //Create timers\n $this->RegisterTimer(\"UpdateTimer\", 0, 'AFK_UpdateWasteTimes('.$this->InstanceID.', false);');\n $this->RegisterTimer(\"NotificationTimer\", 0, 'AFK_UpdateWasteTimes('.$this->InstanceID.', false);');\n $this->RegisterTimer(\"ResetFontTimer\", 0, 'AFK_UpdateWasteTimes('.$this->InstanceID.', true);');\n\t\t}", "public function create()\n {\n return view('categoryConfig.create', ['actFlag' => 'categoryConf']);\n }", "public function create($parent, Configuration $postBody, $optParams = [])\n {\n $params = ['parent' => $parent, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('create', [$params], Configuration::class);\n }", "public function create()\n\t{\n\t\tlog::info('inside create method of user-notifications controller');\n\t}", "protected function setupConfig()\n\t{\n\t\tparent::setupConfig();\n\t\t\n\t\tunset($this->config->event_log);\n\t\t$this->config->event_log = new EventLogTemp(\n\t\t\t$this->config->olp_db,\n\t\t\t$this->config->olp_db->db_info['db'],\n\t\t\t$this->config_data->application_id,\n\t\t\t'event_log_new_bbx'\n\t\t);\n\t}", "public function actionCreate()\n {\n $model = new ActivityConfig();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new ConfigConstant();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "function heartbeat_install() {\n global $wpdb;\n global $heartbeat_db_version;\n $table_name = $wpdb->prefix . 'heartbeattimelogger';\n $table_name_logs = $wpdb->prefix . 'heartbeattimelogger_logs';\n \n $charset_collate = $wpdb->get_charset_collate();\n\n $sql_log = \"CREATE TABLE $table_name_logs (\n id int NOT NULL AUTO_INCREMENT,\n userid int NOT NULL,\n ip_add VARCHAR(64) default '0.0.0.0',\n datetime DATETIME,\n PRIMARY KEY (id),\n KEY SEC (userid, datetime)\n ) $charset_collate;\";\n\n $sql = \"CREATE TABLE $table_name (\n id int NOT NULL AUTO_INCREMENT,\n userid int NOT NULL,\n minutes int default 0,\n pageid int NOT NULL,\n PRIMARY KEY (id),\n KEY SEC (userid, pageid)\n ) $charset_collate;\";\n\n require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n dbDelta( $sql );\n dbDelta( $sql_log );\n\n add_option( 'heartbeattimelogger_db_version', $heartbeat_db_version );\n }", "public function run(): void\n {\n UsersCommissionConfig::insert(\n [\n [\n 'id' => 1,\n 'platform_sign' => 'JHHY',\n 'game_type_sign' => 'live',\n 'game_vendor_sign' => 'VR',\n 'bet' => 100,\n ],\n [\n 'id' => 2,\n 'platform_sign' => 'JHHY',\n 'game_type_sign' => 'sport',\n 'game_vendor_sign' => 'IM',\n 'bet' => 100,\n ],\n ],\n );\n }", "public function run()\n {\n SystemConfiguration::create([\n 'site_name' => 'Ediyt',\n 'site_motto' => 'Let\\'s Get your job done',\n 'site_address' => 'In ut dolore adipisc',\n 'site_phone' => '+1 (918) 126-5336',\n 'site_email' => 'admin@ediyt.com',\n 'freelancer_policy' => 'Copyright laws can vary from one country to the next; thus, it is vitally important that you acknowledge the differences in the laws no matter where your staff members are located.SPELL OUT COMPLIANCE PROCEDURES……including whom employees should contact within your organization with copyright questions. Explain how employees can determine if they need copyright permission and how to obtain permissions from rightsholders (publishers and authors).INFORM EMPLOYEES ABOUT THE USE OF YOUR ORGANIZATION’S OWN COPYRIGHTED MATERIALSFor example: How should employees handle the issue of works for hire with contractors and other non-employees who produce work for your organization? When is it okay to distribute your organization’s own materials?ADVISE EMPLOYEES ON THE PROPER HANDLING OF INFRINGEMENTEncourage employees to do the right thing, and to follow specific procedures when they witness instances of copyright infringement within your organization. Also, identify procedures for how employees should handle infringement of your company’s own works that they discover online or in the marketplace.&nbsp;Once you have developed your policy, be sure to formally introduce these guidelines to employees and issue periodic reminders. You may also consider including copyright compliance in your new employee orientation as well as in trainingfor existing staff.',\n 'client_policy' => '6 Tips for Creating an Effective Copyright PolicyDemonstrate respect for the copyrights of others and reduce the risk of infringementEach day employees share copyrighted content with one another in emails, in sales presentations, in response to clients and business partners and in many other ways — it’s just the normal course of doing business. But in the rush to get things done, even well-intentioned employees may unknowingly share copyrighted material without permission to do so, exposing your organization to the risk of copyright infringement.By developing a corporate copyright policy, you can provide clear guidelines to employees around the use of published materials and demonstrate your company’s commitment to respecting the copyrights of others. Here are six steps to help you craft a policy that meets your company’s needs and decreases your infringement risk.SOLICIT INPUT FROM&nbsp;COPYRIGHT EXPERTS……in your organization who may have suggestions for issues to address in your policy. Outside of library/information services, legal and compliance staff,you might expand the group to include Marketing and Corporate Communications. For example, should you address the subject of clients’ or business partners’ requests for information? And what about guidance for Marketing and Sales teams on the use of images or video content in sales materials?PROVIDE INFORMATION ON COPYRIGHT LAWYour colleagues may lack even a basic understanding of copyright law and how it affects them. Provide foundational information on copyright law in your policy. Refer to the Copyright Basics section on copyright.com to get started. You can also make it easy for employees to get up-to-speed by including a link to the informative and fun Copyright Basics video from Copyright Clearance Center.ADDRESS GLOBAL COPYRIGHT ISSUESIf your organization employs workers in multiple countries, provide information to ensure that employees share content responsibly both domestically and across borders. Copyright laws can vary from one country to the next; thus, it is vitally important that you acknowledge the differences in the laws no matter where your staff members are located.SPELL OUT COMPLIANCE PROCEDURES……including whom employees should contact within your organization with copyright questions. Explain how employees can determine if they need copyright permission and how to obtain permissions from rightsholders (publishers and authors).INFORM EMPLOYEES ABOUT THE USE OF YOUR ORGANIZATION’S OWN COPYRIGHTED MATERIALSFor example: How should employees handle the issue of works for hire with contractors and other non-employees who produce work for your organization? When is it okay to distribute your organization’s own materials?ADVISE EMPLOYEES ON THE PROPER HANDLING OF INFRINGEMENTEncourage employees to do the right thing, and to follow specific procedures when they witness instances of copyright infringement within your organization. Also, identify procedures for how employees should handle infringement of your company’s own works that they discover online or in the marketplace.&nbsp;Once you have developed your policy, be sure to formally introduce these guidelines to employees and issue periodic reminders. You may also consider including copyright compliance in your new employee orientation as well as in trainingfor existing staff.',\n 'privacy_policy'=>'<p><b>6 Tips for Creating an Effective Copyright</b></p><p>PolicyDemonstrate respect for the copyrights of others and reduce the risk of infringementEach day employees share copyrighted content with one another in emails, in sales presentations, in response to clients and business partners and in many other ways — it’s just the normal course of doing business.</p><p>But in the rush to get things done, even well-intentioned employees may unknowingly share copyrighted material without permission to do so, exposing your organization to the risk of copyright infringement.By developing a corporate copyright policy, you can provide clear guidelines to employees around the use of published materials and demonstrate your company’s commitment to respecting the copyrights of others. Here are six steps to help you craft a policy that meets your company’s needs and decreases your infringement risk.SOLICIT INPUT FROM&nbsp;COPYRIGHT EXPERTS……in your organization who may have suggestions for issues to address in your policy. Outside of library/information services, legal and compliance staff,you might expand the group to include Marketing and Corporate Communications. For example, should you address the subject of clients’ or business partners’ requests for information? And what about guidance for Marketing and Sales teams on the use of images or video content in sales materials?PROVIDE INFORMATION ON COPYRIGHT LAWYour colleagues may lack even a basic understanding of copyright law and how it affects them. Provide foundational information on copyright law in your policy. Refer to the Copyright Basics section on copyright.com to get started. You can also make it easy for employees to get up-to-speed by including a link to the informative and fun Copyright Basics video from Copyright Clearance Center.ADDRESS GLOBAL COPYRIGHT ISSUESIf your organization employs workers in multiple countries, provide information to ensure that employees share content responsibly both domestically and across borders. Copyright laws can vary from one country to the next; thus, it is vitally important that you acknowledge the differences in the laws no matter where your staff members are located.SPELL OUT COMPLIANCE PROCEDURES……including whom employees should contact within your organization with copyright questions. Explain how employees can determine if they need copyright permission and how to obtain permissions from rightsholders (publishers and authors).INFORM EMPLOYEES ABOUT THE USE OF YOUR ORGANIZATION’S OWN COPYRIGHTED MATERIALSFor example: How should employees handle the issue of works for hire with contractors and other non-employees who produce work for your organization?</p><p>When is it okay to distribute your organization’s own materials?ADVISE EMPLOYEES ON THE PROPER HANDLING OF INFRINGEMENTEncourage employees to do the right thing, and to follow specific procedures when they witness instances of copyright infringement within your organization. Also, identify procedures for how employees should handle infringement of your company’s own works that they discover online or in the marketplace.&nbsp;Once you have developed your policy, be sure to formally introduce these guidelines to employees and issue periodic reminders. You may also consider including copyright compliance in your new employee orientation as well as in trainingfor existing staff.<br></p>',\n 'conditions_copytright_policy' => '<header class=\"entry-header\" style=\"box-sizing: inherit; font-family: &quot;Myriad W01&quot;, myriad-pro, &quot;Myriad Pro&quot;, &quot;Lucida Grande&quot;, &quot;Lucida Sans Unicode&quot;, sans-serif; font-size: 18px;\"><h1 class=\"entry-title page-title\" style=\"box-sizing: inherit; border: 0px; font-family: inherit; font-size: 3.9rem; font-style: inherit; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(64, 64, 64); line-height: 39px;\"><span style=\"font-family: inherit; font-size: 2.6rem; font-style: inherit;\">Demonstrate respect for the copyrights of others and reduce the risk of infringement</span><br></h1></header><div class=\"entry-content\" style=\"box-sizing: inherit; border: 0px; font-family: &quot;Myriad W01&quot;, myriad-pro, &quot;Myriad Pro&quot;, &quot;Lucida Grande&quot;, &quot;Lucida Sans Unicode&quot;, sans-serif; font-size: 18px; margin: 1.5em 0px 0px; outline: 0px; padding: 0px; vertical-align: baseline;\"><p style=\"box-sizing: inherit; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; outline: 0px; padding: 0px; vertical-align: baseline;\">Each day employees share copyrighted content with one another in emails, in sales presentations, in response to clients and business partners and in many other ways — it’s just the normal course of doing business. But in the rush to get things done, even well-intentioned employees may unknowingly share copyrighted material without permission to do so, exposing your organization to the risk of copyright infringement.</p><p style=\"box-sizing: inherit; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; outline: 0px; padding: 0px; vertical-align: baseline;\">By developing a corporate copyright policy, you can provide clear guidelines to employees around the use of published materials and demonstrate your company’s commitment to respecting the copyrights of others. Here are six steps to help you craft a policy that meets your company’s needs and decreases your infringement risk.</p><h2 style=\"box-sizing: inherit; border: 0px; font-family: inherit; font-size: 2.6rem; font-style: inherit; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(64, 64, 64); line-height: normal;\">SOLICIT INPUT FROM&nbsp;COPYRIGHT EXPERTS…</h2><p style=\"box-sizing: inherit; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; outline: 0px; padding: 0px; vertical-align: baseline;\">…in your organization who may have suggestions for issues to address in your policy. Outside of library/information services, legal and compliance staff,<br style=\"box-sizing: inherit;\">you might expand the group to include Marketing and Corporate Communications. For example, should you address the subject of clients’ or business partners’ requests for information? And what about guidance for Marketing and Sales teams on the use of images or video content in sales materials?</p><h2 style=\"box-sizing: inherit; border: 0px; font-family: inherit; font-size: 2.6rem; font-style: inherit; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(64, 64, 64); line-height: normal;\">PROVIDE INFORMATION ON COPYRIGHT LAW</h2><p style=\"box-sizing: inherit; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; outline: 0px; padding: 0px; vertical-align: baseline;\">Your colleagues may lack even a basic understanding of copyright law and how it affects them. Provide foundational information on copyright law in your policy. Refer to the Copyright Basics section on copyright.com to get started. You can also make it easy for employees to get up-to-speed by including a link to the informative and fun Copyright Basics video from Copyright Clearance Center.</p><h2 style=\"box-sizing: inherit; border: 0px; font-family: inherit; font-size: 2.6rem; font-style: inherit; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(64, 64, 64); line-height: normal;\">ADDRESS GLOBAL COPYRIGHT ISSUES</h2><p style=\"box-sizing: inherit; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; outline: 0px; padding: 0px; vertical-align: baseline;\">If your organization employs workers in multiple countries, provide information to ensure that employees share content responsibly both domestically and across borders. Copyright laws can vary from one country to the next; thus, it is vitally important that you acknowledge the differences in the laws no matter where your staff members are located.</p><h2 style=\"box-sizing: inherit; border: 0px; font-family: inherit; font-size: 2.6rem; font-style: inherit; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(64, 64, 64); line-height: normal;\">SPELL OUT COMPLIANCE PROCEDURES…</h2><p style=\"box-sizing: inherit; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; outline: 0px; padding: 0px; vertical-align: baseline;\">…including whom employees should contact within your organization with copyright questions. Explain how employees can determine if they need copyright permission and how to obtain permissions from rightsholders (publishers and authors).</p><h2 style=\"box-sizing: inherit; border: 0px; font-family: inherit; font-size: 2.6rem; font-style: inherit; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(64, 64, 64); line-height: normal;\">INFORM EMPLOYEES ABOUT THE USE OF YOUR ORGANIZATION’S OWN COPYRIGHTED MATERIALS</h2><p style=\"box-sizing: inherit; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; outline: 0px; padding: 0px; vertical-align: baseline;\">For example: How should employees handle the issue of works for hire with contractors and other non-employees who produce work for your organization? When is it okay to distribute your organization’s own materials?</p><h2 style=\"box-sizing: inherit; border: 0px; font-family: inherit; font-size: 2.6rem; font-style: inherit; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline: 0px; padding: 0px; vertical-align: baseline; color: rgb(64, 64, 64); line-height: normal;\">ADVISE EMPLOYEES ON THE PROPER HANDLING OF INFRINGEMENT</h2><p style=\"box-sizing: inherit; border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-right: 0px; margin-bottom: 1.5em; margin-left: 0px; outline: 0px; padding: 0px; vertical-align: baseline;\">Encourage employees to do the right thing, and to follow specific procedures when they witness instances of copyright infringement within your organization. Also, identify procedures for how employees should handle infringement of your company’s own works that they discover online or in the marketplace.&nbsp;Once you have developed your policy, be sure to formally introduce these guidelines to employees and issue periodic reminders. You may also consider including copyright compliance in your new employee orientation as well as in training<br style=\"box-sizing: inherit;\">for existing staff.</p></div>'\n\n\n ]);\n }", "public function get_delay_between_checks(): int {\n $period = get_config('realtimeplugin_phppoll', 'checkinterval');\n return max($period, 200);\n }", "function addWorkweekConfigOptions() {\n try {\n DB::execute('INSERT INTO ' . TABLE_PREFIX . \"config_options (name, module, value) VALUES ('effective_work_hours', 'globalization', 'i:40;')\");\n } catch(Exception $e) {\n return $e->getMessage();\n } // try\n\n return true;\n }", "public static function register_config( $file ) {\n\t\tif ( ! is_file( $file ) ) {\n\t\t\tWP_CLI::error( 'Invalid configuration file.' );\n\t\t}\n\n\t\t$check_data = \\Mustangostang\\Spyc::YAMLLoad( file_get_contents( $file ) );\n\n\t\tif ( ! empty( $check_data['_']['inherit'] ) ) {\n\t\t\t$inherited = $check_data['_']['inherit'];\n\t\t\tif ( 'default' === $inherited ) {\n\t\t\t\t$inherited = dirname( dirname( __FILE__ ) ) . '/doctor.yml';\n\t\t\t}\n\t\t\t$inherited = self::absolutize( $inherited, dirname( $file ) );\n\t\t\tif ( isset( $check_data['_']['skipped_checks'] ) ) {\n\t\t\t\tself::get_instance()->skipped_checks[ $inherited ] = $check_data['_']['skipped_checks'];\n\t\t\t}\n\t\t\tself::register_config( $inherited );\n\t\t}\n\n\t\tunset( $check_data['_'] );\n\n\t\t$skipped_checks = isset( self::get_instance()->skipped_checks[ $file ] ) ? self::get_instance()->skipped_checks[ $file ] : array();\n\t\tforeach ( $check_data as $check_name => $check_args ) {\n\t\t\tif ( ! empty( $check_args['require'] ) ) {\n\t\t\t\t$required_file = self::absolutize( $check_args['require'], dirname( $file ) );\n\t\t\t\tif ( ! file_exists( $required_file ) ) {\n\t\t\t\t\t$required_file = basename( $required_file );\n\t\t\t\t\tWP_CLI::error( \"Required file '{$required_file}' doesn't exist (from '{$check_name}').\" );\n\t\t\t\t}\n\t\t\t\trequire_once $required_file;\n\t\t\t}\n\n\t\t\tif ( empty( $check_args['class'] ) && empty( $check_args['check'] ) ) {\n\t\t\t\tWP_CLI::error( \"Check '{$check_name}' is missing 'class' or 'check'. Verify check registration.\" );\n\t\t\t}\n\n\t\t\t$class = ! empty( $check_args['check'] ) ? 'runcommand\\Doctor\\Checks\\\\' . $check_args['check'] : $check_args['class'];\n\t\t\tif ( ! class_exists( $class ) ) {\n\t\t\t\tWP_CLI::error( \"Class '{$class}' for check '{$check_name}' doesn't exist. Verify check registration.\" );\n\t\t\t}\n\t\t\tif ( $skipped_checks && in_array( $check_name, $skipped_checks, true ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$options = ! empty( $check_args['options'] ) ? $check_args['options'] : array();\n\t\t\t$obj = new $class( $options );\n\t\t\tself::add_check( $check_name, $obj );\n\t\t}\n\t}", "public function create()\n {\n return view('config.create');\n }", "public function run()\n {\n DB::table('system_settings')->insert([\n \t\t\"percentage\"=>30,\n \"days\"=>3,\n \"daily_reserves\"=>2,\n \"expiry_hours\"=>4,\n \"start_help_time\"=>\"10:00:00\",\n \"end_help_time\"=>\"10:30:00\",\n \t\t\"count_down_hours\"=>4,\n \t\t\"is_active\"=>1,\n ]);\n DB::table('system_settings')->insert([\n \t\t\"percentage\"=>60,\n \"days\"=>3,\n \t\t\"daily_reserves\"=>2,\n \"expiry_hours\"=>4,\n \"start_help_time\"=>\"03:00:00\",\n \"end_help_time\"=>\"00:00:00\",\n \"count_down_hours\"=>4,\n \t\t\"is_active\"=>0,\n ]);\n DB::table('system_settings')->insert([\n \t\t\"percentage\"=>100,\n \"days\"=>12,\n \t\t\"daily_reserves\"=>2,\n \"expiry_hours\"=>4,\n \"start_help_time\"=>\"03:00:00\",\n \"end_help_time\"=>\"00:00:00\",\n \"count_down_hours\"=>4,\n \t\t\"is_active\"=>0,\n ]);\n }", "public function setChecks ( array $checks ) {\n\t\tif ( !is_array ( $checks ) || count ( $checks ) < 1 ) {\n\t\t\tthrow new \\InvalidArgumentException('Invalid checks');\n\t\t}\n\t\t$this->config['checks'] = $checks;\n\t}", "public function create()\n {\n\n $email_id = date('Y-m-d_H-i-s') . '.' . $this->template;\n $email_data = [\n 'title' => $this->template, \n 'data' => serialize($this->data), \n 'email' => $this->to,\n 'id' => $email_id,\n 'date' => date('Y-m-d H:i:s')\n ];\n\n Storage::putYAML('statamify/emails/' . $email_id, $email_data);\n\n }", "public function actionCreate()\n {\n $model = new WeichatPushSetTemplatePushList();\n\n $date_tiem = date(\"Y-m-d H:i:s\",time());\n $model->created_time = $date_tiem;\n $model->updated_time = $date_tiem;\n $model->status = 1;\n $model->create_user = Yii::$app->user->id;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function testTimeBeforePruningUsersCanBeConfigured(): void\n {\n Config::set('hydrofon.prune_models_after_days.users', 1);\n\n $user = User::factory()->create([\n 'created_at' => now()->subDay(),\n ]);\n\n $this->artisan('model:prune');\n\n $this->assertModelMissing($user);\n }", "function checkConfig(){\n global $ugenome_list_file; global $loadscript;global $dir; \n if(!file_exists(\"$ugenome_list_file\")){exec(\"$perl $loadscript $dir\");}\n $Diff = (time() - filectime(\"$ugenome_list_file\"))/60/60/24;\n if ($Diff > 21) exec(\"$perl $loadscript $dir\");//also check the last mod date < 21 days\n}", "public function safeUp()\n\t{\n $this->insert('options', array('name'=>'user_activity_period','value'=>30));\t \n\t}", "protected function setUpCheck()\n {\n $this->getOldTable()->createColumn('foo', Type::INTEGER);\n $this->getOldTable()->createColumn('bar', Type::INTEGER);\n $this->getOldTable()->createCheck('foo > 0', 'ck_foo');\n\n $this->createOldTable();\n }", "public function create()\n {\n $ostObj = $this->instantiateOSTSDKForV2Api();\n $usersService = $ostObj->services->users;\n $params = array();\n $response = $usersService->create($params)->wait();\n $this->isSuccessResponse($response);\n }", "public function run()\n {\n \n Config::create([\n 'title'=>'Công ty Cổ phần Dịch vụ Thiết bị đo và Hệ thống điều khiển',\n 'description'=>'Công ty Cổ phần Dịch vụ Thiết bị đo và Hệ thống điều khiển',\n 'keywords'=>'Công ty, Cổ phần, Dịch vụ, Thiết bị, đo lường, hệ thống điều khiển',\n 'facebook'=>'http://facebook.com',\n 'youtube'=>'https://youtube.com/',\n 'twitter'=>'https://twitter.com/',\n 'google'=>'https://google.com/',\n 'email'=>'nam.ngo@vietcis.com.vn',\n 'phone'=>'+84 4 3540 2685',\n 'timeword' =>'08:00 - 18:00',\n 'office' =>'2',\n 'staff' =>'86',\n 'born' =>'2000',\n 'introleft' =>'Nhà phân phối chính thức của các nhà sản xuất thiết bị hàng đầu thế giới',\n 'introright' =>'Bạn cần được tư vấn để hiểu rõ hơn về dịch vụ và sản phẩm mình quan tâm?',\n 'copyright'=>'Copyright © 2016 VietCIS.,JSC. All rights reserved.',\n 'address' => 'dia chi',\n 'countdown'=>date('Y-m-d H:i:s'),\n ]);\n }", "private function _createConfigs()\r\n {\r\n $languages = $this->context->language->getLanguages();\r\n\r\n foreach ($languages as $language){\r\n $title[$language['id_lang']] = '';\r\n }\r\n $response = Configuration::updateValue($this->name . '_TITLE', $title);\r\n $response &= Configuration::updateValue($this->name . '_MAXITEM', 5);\r\n $response &= Configuration::updateValue($this->name . '_MINITEM', 2);\r\n $response &= Configuration::updateValue($this->name . '_AUTOSCROLL', 0);\r\n $response &= Configuration::updateValue($this->name . '_AUTOSCROLLDELAY', 5000);\r\n $response &= Configuration::updateValue($this->name . '_PAUSEONHOVER', 0);\r\n $response &= Configuration::updateValue($this->name . '_PAGINATION', 0);\r\n $response &= Configuration::updateValue($this->name . '_NAVIGATION', 0);\r\n $response &= Configuration::updateValue($this->name . '_MANTITLE', 0);\r\n\r\n return $response;\r\n }", "function newConfigOptions() {\n $insert = $this->utility->db->execute(\"INSERT INTO \" . TABLE_PREFIX . \"config_options (name, module, type, value) VALUES \n ('last_frequently_activity', 'system', 'system', 'N;'),\n ('last_hourly_activity', 'system', 'system', 'N;'),\n ('last_daily_activity', 'system', 'system', 'N;')\n \");\n \t\n \t if(is_error($insert)) {\n \t return $insert->getMessage();\n \t } // if\n \t\n \treturn true;\n }", "public function store(CreateConfigRequest $request)\n {\n $input = $request->all();\n\n $config = $this->configRepository->create($input);\n\n Flash::success(Lang::get('validation.save_success'));\n\n return redirect(route('configs.index'));\n }", "public function store(CreateSystemConfigRequest $request)\n {\n $input = $request->all();\n\n $systemConfig = $this->systemConfigRepository->create($input);\n\n Flash::success('System Config saved successfully.');\n\n return redirect(route('systemConfigs.index'));\n }", "public function run()\n {\n DB::table('settings')->insert([\n 'currency' => 'Bs',\n 'time_jwt' => 1,\n 'last_user' => 1,\n 'is_deleted' => 1,\n 'created_at' => date('Y-m-d'),\n 'updated_at' => date('Y-m-d'),\n ]);\n\n factory(\\App\\Setting::class, 20)->create();\n }", "protected function preInstCheck()\n {\n // PHP Version\n if(!version_compare(PHP_VERSION,$this->prereqs['phpversion'],'>=')) {\n $this->errors[] = array(\n 'check' => 'PHP-Version',\n 'required' => $this->prereqs['phpversion'],\n 'actual' => PHP_VERSION\n );\n }\n if(!version_compare(PHP_VERSION,$this->suggested['phpversion'],\">=\")) {\n $this->warnings[] = array(\n 'check' => 'PHP-Version',\n 'suggestion' => ( isset($suggestion_text['phpversion'][$lang]) ? $suggestion_text['phpversion'][$lang] : 'en'),\n 'actual' => PHP_VERSION\n );\n }\n // PHP Settings\n foreach($this->prereqs['phpsettings'] as $key => $value) {\n $actual_setting = ($temp=ini_get($key)) ? $temp : 0;\n if($actual_setting !== $value) {\n $this->errors[] = array(\n 'check' => 'PHP-Settings -&gt; '.$key,\n 'required' => $value,\n 'actual' => $actual_setting,\n );\n }\n }\n // Check if AddDefaultCharset is set\n $sapi = php_sapi_name();\n if(strpos($sapi,'apache') !== false || strpos($sapi,'nsapi') !== false ) {\n \tflush();\n \t$apache_rheaders = apache_response_headers();\n \tforeach($apache_rheaders as $h) {\n \t\tif(strpos($h,'html; charset') !== false && (!strpos(strtolower($h),'utf-8')) ) {\n \t\t\tpreg_match( '/charset\\s*=\\s*([a-zA-Z0-9- _]+)/', $h, $match );\n \t\t\t$apache_charset = $match[1];\n \t\t\t$this->errors[] = array(\n 'check' => 'Apache-Settings',\n 'required' => 'unset',\n 'actual' => $apache_charset,\n );\n \t\t}\n \t}\n }\n // check installer\n $seen = array();\n foreach($this->installdata as $file) {\n if(file_exists(__dir__.'/../data/'.$file)) {\n $seen[] = $file;\n }\n }\n if(count($seen)!=count($this->installdata)) {\n $this->errors[] = array(\n 'check' => $this->t('Installation data'),\n 'required' => implode(\"<br />\",$this->installdata),\n 'actual' => implode(\"<br />\",$seen)\n );\n }\n\n }", "public function runConfig():Create {\n\n # Set config\n Config::setup();\n\n # Return instance\n return $this;\n\n }", "public function vxUserCreateCheck() {\n\t\t$rt = array();\n\t\t\n\t\t$rt['errors'] = 0;\n\t\t\n\t\t$rt['usr_email_value'] = '';\n\t\t/* usr_email_error:\n\t\t0 => no error\n\t\t1 => empty\n\t\t2 => overflow (100 sbs)\n\t\t3 => mismatch\n\t\t4 => conflict\n\t\t999 => unspeicific */\n\t\t$rt['usr_email_error'] = 0;\n\t\t$rt['usr_email_error_msg'] = array(1 => '你忘记填写电子邮件地址了', 2 => '你的电子邮件地址太长了', 3 => '你的电子邮件地址看起来有问题', 4 => '这个电子邮件地址已经注册过了');\n\t\t\n\t\t$rt['usr_nick_value'] = '';\n\t\t/* usr_nick_error:\n\t\t0 => no error\n\t\t1 => empty\n\t\t2 => overflow (20 mbs)\n\t\t3 => invalid characters\n\t\t4 => conflict\n\t\t999 => unspecific */\n\t\t$rt['usr_nick_error'] = 0;\n\t\t$rt['usr_nick_error_msg'] = array(1 => '你忘记填写昵称了', 2 => '你的昵称太长了,精简一下吧', 3 => '你的昵称中包含了不被允许的字符', 4 => '你填写的这个昵称被别人用了');\n\t\t\n\t\t$rt['usr_password_value'] = '';\n\t\t$rt['usr_confirm_value'] = '';\n\t\t/* usr_password_error:\n\t\t0 => no error\n\t\t1 => empty\n\t\t2 => overflow (32 sbs)\n\t\t3 => invalid characters\n\t\t4 => not identical\n\t\t999 => unspecific */\n\t\t$rt['usr_password_error'] = 0;\n\t\t$rt['usr_password_error_msg'] = array(1 => '你忘记填写密码了', 2 => '你的这个密码太长了,缩减一下吧', 3 => '你填写的密码中包含了不被允许的字符', 4 => '你所填写的两个密码不匹配');\n\t\t/* usr_confirm_error:\n\t\t0 => no error\n\t\t1 => empty\n\t\t2 => overflow (32 sbs)\n\t\t3 => invalid characters(should not reach here in final rendering)\n\t\t4 => not identical\n\t\t999 => unspecific */\n\t\t$rt['usr_confirm_error'] = 0;\n\t\t$rt['usr_confirm_error_msg'] = array(1 => '你忘记填写密码确认了', 2 => '你的这个密码确认太长了,缩减一下吧', 3 => '你填写的密码中包含了不被允许的字符', 4 => '你所填写的两个密码不匹配');\n\t\t\n\t\t$rt['c_value'] = 0;\n\t\t$rt['c_error'] = 0;\n\t\t$rt['c_error_msg'] = array(1 => '你忘记填写确认码了', 4 => '你填写的确认码是错的');\n\t\t\n\t\t/* check: c */\n\t\tif (isset($_POST['c'])) {\n\t\t\t$rt['c_value'] = strtolower(trim($_POST['c']));\n\t\t\tif (strlen($rt['c_value']) > 0) {\n\t\t\t\tif ($rt['c_value'] != strtolower($_SESSION['c'])) {\n\t\t\t\t\t$rt['c_error'] = 4;\n\t\t\t\t\t$rt['errors']++;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$rt['c_error'] = 1;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t} else {\n\t\t\t$rt['c_error'] = 1;\n\t\t\t$rt['errors']++;\n\t\t\t\n\t\t}\n\t\t\n\t\t/* check: usr_email */\n\t\t\n\t\tif (isset($_POST['usr_email'])) {\n\t\t\t$rt['usr_email_value'] = strtolower(make_single_safe($_POST['usr_email']));\n\t\t\tif (strlen($rt['usr_email_value']) == 0) {\n\t\t\t\t$rt['usr_email_error'] = 1;\n\t\t\t\t$rt['errors']++;\n\t\t\t} else {\n\t\t\t\tif (strlen($rt['usr_email_value']) > 100) {\n\t\t\t\t\t$rt['usr_email_error'] = 2;\n\t\t\t\t\t$rt['errors']++;\n\t\t\t\t} else {\n\t\t\t\t\tif (!is_valid_email($rt['usr_email_value'])) {\n\t\t\t\t\t\t$rt['usr_email_error'] = 3;\n\t\t\t\t\t\t$rt['errors']++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$rt['usr_email_error'] = 1;\n\t\t\t$rt['errors']++;\n\t\t}\n\t\t\n\t\t\n\t\tif ($rt['usr_email_error'] == 0) {\n\t\t\t$sql = \"SELECT usr_email FROM babel_user WHERE usr_email = '\" . $rt['usr_email_value'] . \"'\";\n\t\t\t$rs = mysql_query($sql, $this->db);\n\t\t\tif (mysql_num_rows($rs) > 0) {\n\t\t\t\t$rt['usr_email_error'] = 4;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t\tmysql_free_result($rs);\n\t\t}\n\t\t\n\t\t/* check: usr_nick */\n\t\t\n\t\tif (isset($_POST['usr_nick'])) {\n\t\t\t$rt['usr_nick_value'] = make_single_safe($_POST['usr_nick']);\n\t\t\tif (strlen($rt['usr_nick_value']) == 0) {\n\t\t\t\t$rt['usr_nick_error'] = 1;\n\t\t\t\t$rt['errors']++;\n\t\t\t} else {\n\t\t\t\tif (mb_strlen($rt['usr_nick_value']) > 20) {\n\t\t\t\t\t$rt['usr_nick_error'] = 2;\n\t\t\t\t\t$rt['errors']++;\n\t\t\t\t} else {\n\t\t\t\t\tif (!is_valid_nick($rt['usr_nick_value'])) {\n\t\t\t\t\t\t$rt['usr_nick_error'] = 3;\n\t\t\t\t\t\t$rt['errors']++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$rt['usr_nick_error'] = 1;\n\t\t\t$rt['errors']++;\n\t\t}\n\t\t\n\t\tif ($rt['usr_nick_error'] == 0) {\n\t\t\t$sql = \"SELECT usr_nick FROM babel_user WHERE usr_nick = '\" . $rt['usr_nick_value'] . \"'\";\n\t\t\t$rs = mysql_query($sql, $this->db);\n\t\t\tif (mysql_num_rows($rs) > 0) {\n\t\t\t\t$rt['usr_nick_error'] = 4;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t\tmysql_free_result($rs);\n\t\t}\n\t\t\n\t\t/* check: usr_gender */\n\t\tif (isset($_POST['usr_gender'])) {\n\t\t\t$rt['usr_gender_value'] = intval($_POST['usr_gender']);\n\t\t\tif (!in_array($rt['usr_gender_value'], array(0,1,2,5,6,9))) {\n\t\t\t\t$rt['usr_gender_value'] = 9;\n\t\t\t}\n\t\t} else {\n\t\t\t$rt['usr_gender_value'] = 9;\n\t\t}\n\t\t\n\t\t/* check: usr_password and usr_confirm */\n\t\t\n\t\tif (isset($_POST['usr_password'])) {\n\t\t\t$rt['usr_password_value'] = $_POST['usr_password'];\n\t\t\tif (strlen($rt['usr_password_value']) == 0) {\n\t\t\t\t$rt['usr_password_error'] = 1;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t} else {\n\t\t\t$rt['usr_password_error'] = 1;\n\t\t\t$rt['errors']++;\n\t\t}\n\t\t\n\t\tif (isset($_POST['usr_confirm'])) {\n\t\t\t$rt['usr_confirm_value'] = $_POST['usr_confirm'];\n\t\t\tif (strlen($rt['usr_confirm_value']) == 0) {\n\t\t\t\t$rt['usr_confirm_error'] = 1;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t} else {\n\t\t\t$rt['usr_confirm_error'] = 1;\n\t\t\t$rt['errors']++;\n\t\t}\n\t\t\n\t\tif (($rt['usr_password_error'] == 0) && ($rt['usr_confirm_error'] == 0)) {\n\t\t\tif (strlen($rt['usr_password_value']) > 32) {\n\t\t\t\t$rt['usr_password_error'] = 2;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t\tif (strlen($rt['usr_confirm_value']) > 32) {\n\t\t\t\t$rt['usr_confirm_error'] = 2;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (($rt['usr_password_error'] == 0) && ($rt['usr_confirm_error'] == 0)) {\n\t\t\tif ($rt['usr_password_value'] != $rt['usr_confirm_value']) {\n\t\t\t\t$rt['usr_confirm_error'] = 4;\n\t\t\t\t$rt['errors']++;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $rt;\n\t}", "public function initialize(bool $reCreate = false) {\n $cfgNs = self::CONFIG_NS;\n\n if ($reCreate) {\n $cFile = new File(self::CONFIG_FILE_PATH);\n $cFile->remove();\n $this->initDefaultConfig();\n }\n\n if (!class_exists($cfgNs)) {\n $this->writeAppConfig();\n } else {\n //$cfg is of type [APP_DIR]\\config\\AppConfig\n $cfg = new $cfgNs();\n $this->configVars = [\n 'smtp-connections' => $cfg->getAccounts(),\n 'database-connections' => $cfg->getDBConnections(),\n 'scheduler-password' => $cfg->getSchedulerPassword(),\n 'version-info' => [\n 'version' => $cfg->getVersion(),\n 'version-type' => $cfg->getVersionType(),\n 'release-date' => $cfg->getReleaseDate()\n ],\n 'env-vars' => $cfg->getConstants(),\n 'site' => [\n 'base-url' => $cfg->getBaseURL(),\n 'primary-lang' => $cfg->getPrimaryLanguage(),\n 'title-sep' => $cfg->getTitleSep(),\n 'home-page' => $cfg->getHomePage(),\n 'base-theme' => $cfg->getBaseThemeName(),\n 'descriptions' => [\n 'AR' => $cfg->getDescription('AR'),\n 'EN' => $cfg->getDescription('EN')\n ],\n 'website-names' => [\n 'AR' => $cfg->getWebsiteName('AR'),\n 'EN' => $cfg->getWebsiteName('EN')\n ],\n 'titles' => [\n 'AR' => $cfg->getTitle('AR'),\n 'EN' => $cfg->getTitle('EN')\n ],\n ]\n ];\n }\n }", "public function postcreate(Request $request)\n {\n \t$attendance = Attendance::whereEmployeeId(Auth::user()->id)->whereCheckOut(null)->first();\n\n \t$now \t\t\t= Carbon::now();\n\n\t $now->toTimeString();\n\n \tif($attendance)\n \t{\n \t\t$attendance->update([\n \t\t\t'check_out' \t\t=> $now,\n \t\t]);\n\n \t\t$message = 'You have checked out successfully!';\n \t} else {\n \t\t$user \t\t\t= Auth::user()->id; \n\n\t \t$checkin_time = Carbon::today();\n $checkin_time->addHours(8);\n\n\t \tif(Carbon::parse($checkin_time)->lt($now))\n\t \t{\n\t \t\t$lateness_status = 1;\n\t \t} else {\n\t \t\t$lateness_status = 0;\n\t \t}\n\t \t\n\t \tAttendance::create([\n\t \t\t'employee_id' \t => $user,\n\t \t\t'check_in' \t\t\t=> $now, \n\t \t\t'lateness_status' \t=> $lateness_status,\n\t \t]);\n\n\t \t$message = 'You have checked in successfully!';\n \t} \n\n \treturn redirect('/attendances/view/')->with('success', $message);\n }", "public function run()\n {\n // Сотрудник\n User::create([\n 'name' => config('test.employee.name'),\n 'email' => config('test.employee.email'),\n 'email_verified_at' => config('test.employee.email_verified_at'),\n 'password' => config('test.employee.password'),\n ]);\n\n // Рандомные сотрудники\n factory(App\\User::class, 7)->create();\n }", "public function create(array $values = array()) {\n // Add values that are specific to our timetracking\n $values += array( \n 'timetracking_id' => '',\n 'is_new' => true,\n 'type' => 'timetracking', //allways fixed because we have no bundles \n 'created' => time(),\n 'changed' => time(),\n 'time_start' => 0,\n 'time_end' => 0,\n 'duration' => 0,\n 'description' => '',\n 'subject_id' => 0,\n 'uid' => 0,\n );\n \n $timetracking = parent::create($values);\n return $timetracking;\n }", "public function create()\n {\n //Valida se usuário possui permissão para acessar esta opção\n if(App\\Models\\User::getPermission('configs_add',Auth::user()->user_type_code)){\n\n return view('configs.create');\n\n }else{\n //Sem permissão\n Flash::error(Lang::get('validation.permission'));\n return redirect(route('configs.index'));\n }\n }", "public function create()\n\t{ \n\t\t# Return if just the countoff is needed\n\t\tif ($this->countoff<2) return;\n\t\t\n\t\t# Add a note on and note off for each beat in the click track\n\t\tfor($i=0; $i<$this->beatsTotal; $i++) { \n\t\t\t$vol = (($i%$this->timeSig)==0) ? 127 : 70;\n\t\t\t$this->addEvent(0,153,37,$vol);\n\t\t\t$this->addEvent($this->ticksPerBeat,153,37,0);\n\t\t}\n\t}", "public function __construct() {\n $this->_configPassword = $this->parseConfig(2);\n $this->_configClass = $this->parseConfig(5);\n $this->_time = time();\n\t}", "public function setCreating()\n {\n $this->update(['status' => static::STATUS_CREATING]);\n }", "public function testComAdobeAemUpgradePrechecksTasksImplConsistencyCheckTaskImpl()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.adobe.aem.upgrade.prechecks.tasks.impl.ConsistencyCheckTaskImpl';\n\n $crawler = $client->request('POST', $path);\n }", "public function create()\n\t{\n\t\t//\n\t\tif(!$this->permit->crud_configs_create)\n return redirect('accessDenied');\n\t\treturn view(\"configs.create\");\n\t}", "public static function fromArray(array $data): Configuration\n {\n $ConfigurationObject = new Configuration();\n\n if(isset($data['openblu']))\n {\n $ConfigurationObject->OpenBlu = OpenBlu::fromArray($data['openblu']);\n }\n\n if(isset($data['balance']))\n {\n $ConfigurationObject->Balance = (float)$data['balance'];\n }\n\n return $ConfigurationObject;\n }", "public function run(){\n \tforeach (range(0, 30) as $value) {\n\t DB::table('configs')->insert([\n\t 'uid' => 'key-'.$value,\n\t 'value' => $value,\n\t ]);\n \t}\n }", "public function up(Kohana_Database $db)\n\t{\n\t\t$db->query(NULL, 'ALTER TABLE `forum_categories` ADD `topics_count` INT(10) UNSIGNED NOT NULL AFTER `created`;');\n\t}", "public function setCheck ( $name, $value ) {\n\t\tif ( empty ( $name ) ) {\n\t\t\tthrow new \\InvalidArgumentException(sprintf('The field \"%s\" is invalid.', $field) );\n\t\t}\n\t\t$this->config['checks'][$name] = $value;\n\t}", "protected function setupConfig()\n\t{\n\t\t$this->config = OLPBlackbox_Config::getInstance();\n\t\t$site_config = SiteConfig::getInstance()->asObject();\n\n\t\t//Add site config data to the OLPBlackbox_Config\n\t\tforeach ($site_config as $key => $value)\n\t\t{\n\t\t\t$this->config->$key = $value;\n\t\t}\n\n\t\t$this->config->blackbox_mode = $this->mode;\n\t\t$this->config->debug = new OLPBlackbox_DebugConf();\n\t\t$this->config->title_loan = $this->config_data->title_loan;\n\t\t$this->config->olp_db = $this->config_data->sql;\n\t\t$this->config->event_log = $this->config_data->log;\n\t\t$this->config->session = $this->config_data->session;\n\t\t$this->config->allowSnapshot = TRUE;\n\t\t$this->config->allow_datax_rework = $this->config_data->config->enable_rework;\n\t\t$this->config->do_datax_rework = !empty($_SESSION['do_datax_rework']);\n\t\t$this->config->return_visitor = !empty($_SESSION['return_visitor']);\n\t\t$this->config->track_key = $_SESSION['statpro']['track_key'];\n\t\t$this->config->space_key = $_SESSION['statpro']['space_key'];\n\t\t$this->config->hit_stats_bb = defined('STAT_SYSTEM_2') ? STAT_SYSTEM_2 : FALSE;\n\t\t$this->config->hit_stats_site = TRUE;\n\n\t\t// whether we're on the enterprise site; the actual\n\t\t// enterprise company is available via bb_force_winner?\n\t\t$this->config->is_enterprise = $this->config_data->is_enterprise;\n\t\t$this->config->react_company = $this->getReactCompany();\n\n\t\t$this->config->applog = OLP_Applog_Singleton::Get_Instance(\n\t\t\t'blackbox',\n\t\t\t1000000000,\n\t\t\t20,\n\t\t\tNULL,\n\t\t\tFALSE,\n\t\t\t002\n\t\t);\n\t}" ]
[ "0.7086295", "0.66852397", "0.5832289", "0.58181393", "0.5645919", "0.5617374", "0.55739444", "0.53473675", "0.51100296", "0.5091077", "0.49437207", "0.47102794", "0.46942794", "0.45402044", "0.44555312", "0.44000417", "0.43998283", "0.4356518", "0.43465766", "0.43297982", "0.42961174", "0.42895743", "0.42807662", "0.42666212", "0.42645094", "0.42463478", "0.4237371", "0.4225576", "0.42216444", "0.42121655", "0.4211638", "0.4210855", "0.42033026", "0.41963193", "0.4190039", "0.41854003", "0.41837573", "0.4171433", "0.41710886", "0.4124325", "0.41188604", "0.41028145", "0.41006547", "0.40974623", "0.40771905", "0.40589848", "0.40577096", "0.40539536", "0.4048206", "0.4039039", "0.40260884", "0.40117544", "0.4007773", "0.40001553", "0.39886343", "0.39853027", "0.3943187", "0.39361277", "0.3935054", "0.39348543", "0.39339924", "0.39198506", "0.3918118", "0.38941127", "0.38842857", "0.38811663", "0.38699153", "0.38682544", "0.38630003", "0.38564187", "0.3850456", "0.38456792", "0.38453498", "0.38421056", "0.38416848", "0.38311145", "0.38285762", "0.38277438", "0.38224086", "0.3822383", "0.381839", "0.38131058", "0.3811959", "0.3809777", "0.38027874", "0.38008097", "0.38000277", "0.37950957", "0.37936312", "0.37934533", "0.378937", "0.37881076", "0.37841323", "0.3783908", "0.37836412", "0.37740517", "0.37727004", "0.37716788", "0.37681043", "0.37650472" ]
0.80216384
0
Gets a single Uptime check configuration. (uptimeCheckConfigs.get)
Получает одну конфигурацию проверки времени работы. (uptimeCheckConfigs.get)
public function get($name, $optParams = []) { $params = ['name' => $name]; $params = array_merge($params, $optParams); return $this->call('get', [$params], UptimeCheckConfig::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUptimeCheckConfig()\n {\n return $this->uptime_check_config;\n }", "public function GetUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\GetUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/GetUptimeCheckConfig',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig', 'decode'],\n $metadata, $options);\n }", "public function setUptimeCheckConfig($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig::class);\n $this->uptime_check_config = $var;\n\n return $this;\n }", "public function get($key){\r\n\t\tif(key_exists($key, $this->config)){\r\n\t\t\treturn $this->config[$key];\r\n\t\t}\r\n\t\tdie('Index is out of range');\r\n\t}", "public function get()\r\n {\r\n $this->ensureLoaded();\r\n return $this->config;\r\n }", "public function config_get(){\n\t\treturn $this->fb->exec('dhcp.config_get');\n\t}", "public function get($key)\r\n {\r\n return $this->config[$key];\r\n }", "public function ListUptimeCheckConfigs(\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckConfigsRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/ListUptimeCheckConfigs',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckConfigsResponse', 'decode'],\n $metadata, $options);\n }", "protected function get(string $key)\n {\n if (!array_key_exists($key, $this->config)) throw new InvalidConfigException(\"Your configuration doesn't have a value for the key `$key`\");\n return $this->config[$key];\n }", "public static function get( $key ) {\n\t\tif ( ! static::$config ) {\n\t\t\tstatic::_set_config_data();\n\t\t}\n\n\t\tif ( array_key_exists( $key, static::$config ) ) {\n\t\t\treturn static::$config[ $key ];\n\t\t}\n\t}", "function getConfig($key = '')\n {\n return isset($this->config[$key]) ? $this->config[$key] : null;\n }", "public function __get($name): mixed {\n if (isset($this->data[$name]))\n return $this->data[$name];\n\n trigger_error(\n __(\"Requested configuration setting not found.\"),\n E_USER_NOTICE\n );\n\n return null;\n }", "public static function get($key)\n\t{\n\t\tif (is_array(self::$_CONF) AND array_key_exists($key, self::$_CONF))\n\t\t\treturn self::$_CONF[$key];\n\t\telseif($value = Db::getInstance()->getValue('SELECT `value` FROM `'.DB_PREFIX.'configuration` WHERE `name` = \\''.pSQL($key).'\\'')){\n\t\t\tself::$_CONF[$key] = $value;\n\t\t\treturn $value;\n\t\t}\n\t\treturn false;\n\t}", "public function get_config()\n\t{\n\t\treturn $this->cfg;\n\t}", "public function patch($name, UptimeCheckConfig $postBody, $optParams = [])\n {\n $params = ['name' => $name, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('patch', [$params], UptimeCheckConfig::class);\n }", "public function get($key)\n {\n if (array_key_exists($key, $this->config)) {\n $value = $this->config[ $key ];\n } elseif ($this->offsetExists($key)) {\n $value = $this->defaults[ $key ];\n } else {\n throw new Exception(\"Config entry «{$key}» doesn't exists. \");\n }\n\n return $value;\n }", "public function getCfg()\n {\n return $this->get(self::_CFG);\n }", "public static function get($key)\n {\n return Arr::get(static::$config, $key);\n }", "public static function getCfg($key) {\r\n\t\treturn self::$cfg->get($key);\r\n\t}", "function getConfigValue($name) {\n return UserConfigOptions::getValue($name, $this);\n }", "public final function getConfig($key = false)\n {\n return $key ? $this->config->get($key) : $this->config;\n }", "public function listProjectsUptimeCheckConfigs($parent, $optParams = [])\n {\n $params = ['parent' => $parent];\n $params = array_merge($params, $optParams);\n return $this->call('list', [$params], ListUptimeCheckConfigsResponse::class);\n }", "protected function get($name) {\n return $this->configuration->get($name);\n }", "function recurringdowntime_get_cfg()\n{\n recurringdowntime_check_cfg();\n $cfg = file_get_contents(RECURRINGDOWNTIME_CFG);\n return recurringdowntime_cfg_to_array($cfg);\n}", "public function getConfig($key)\n {\n return Config::get($key);\n }", "public static function get($key)\r\n {\r\n require_once ROOT . \"/app/config/{$key}.php\";\r\n return isset(self::$settings[$key]) ? self::$settings[$key] : null;\r\n }", "public function get($key)\n\t{\n\t\t$default = array_key_exists($key, $this->defaultConfig) ? $this->defaultConfig[$key] : null;\n\n\t\treturn $this->componentConfig->get($key, $default);\n\t}", "public function get ( $name ) {\n\t\tif( !$this->has ( $name ) ) {\n\t\t\tthrow new \\InvalidArgumentException(sprintf('The name \"%s\" is invalid.', $name));\n\t\t}\n\t\treturn $this->config[$name];\n\t}", "private function getConfig($key)\n {\n return $this->config->get($key);\n }", "public static function config($key) {\n\t\t\tif (isset(self::$config[$key])) {\n\t\t\t\treturn self::$config[$key];\n\t\t\t} else {\n\t\t\t\t// Should we throw an exception or return null?\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}", "public function get($name)\n {\n $config = $this->fromCache();\n return isset($config[$name]) ? $config[$name] : null;\n }", "public function getConfig($name) {\n\t\t$this->loadConfig();\n\t\treturn isset($this->_config[$name]) ? $this->_config[$name] : null;\n\t}", "public function get( $key ) {\n\t\tif ( isset( $this->config[ $key ] ) ) {\n\t\t\treturn $this->config[ $key ];\n\t\t}\n\t\treturn null;\n\t}", "public function getConfig($key=NULL) {\r\n return is_null($key) ? $this->config : (isset($this->config[$key]) ? $this->config[$key] : NULL);\r\n }", "public function __get($key)\n {\n if (is_object($this->config)) {\n $value = $this->config->where('key', $key)->first();\n\n return $value ? $value->value : null;\n }\n }", "public static function get($key=null){\n\t\t $connection = MyActiveRecord::getDb();\n\t\t if(empty(self::$psconfig_values))\n\t\t {\n\t\t\t $query = \"SELECT name, value FROM \" . SITE_CONFIG;\n\t\t\t $rst = $connection->createCommand($query)->queryAll();\n\t\t\t foreach($rst as $v){\n\t\t\t\t self::$psconfig_values[$v['name']] = $v['value'];\n\t\t\t }\n\t\t }\n \t\treturn self::$psconfig_values[$key];\n\t\t}", "protected function config($name) {\n return $this->configFactory->get($name);\n }", "protected function config($key)\n {\n return $this->app['config']->get($key);\n }", "public function get($name, $optParams = [])\n {\n $params = ['name' => $name];\n $params = array_merge($params, $optParams);\n return $this->call('get', [$params], Configuration::class);\n }", "public function getConfig($item = null) {\n\t\treturn isset($item) ? $this->config->get($item) : $this->config;\n\t}", "protected function config($key)\n {\n return $this->utility->getConfig($key);\n }", "public static function read()\n {\n return self::$config;\n }", "function getConfig()\n {\n return $this->_api->doRequest(\"GET\", \"{$this->getBaseApiPath()}/config\");\n }", "static function getValue($name) {\r\n if (isset(self::$config[$name])) \r\n return self::$config[$name];\r\n else {\r\n return DB::getConfig($name);\r\n }\r\n }", "public static function getConfig()\n {\n return self::$config;\n }", "public function getConfig($name)\n {\n return $this->config->get(self::CONFIG_PATH.'.'.$name);\n }", "function get_setting() {\n return get_config(NULL, $this->name);\n }", "public function getConfigValue($key)\n {\n return $this->config[$key];\n }", "public function configOffsetGet($name)\n {\n return $this->settings[$name];\n }", "static function getConfig() {\n\t\treturn self::getRegistry()->get(self::REGISTRY_CONFIG);\n\t}", "public function create($parent, UptimeCheckConfig $postBody, $optParams = [])\n {\n $params = ['parent' => $parent, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('create', [$params], UptimeCheckConfig::class);\n }", "static public function get($key) {\n if (!property_exists(self::getConfig(), $key))\n return null;\n else\n return self::getConfig()->$key;\n }", "public function getConfig()\n {\n return $this->get('config');\n }", "public static function getInstance() {\n return self::getConfig();\n }", "public function getConfig($path) {\n return Config::getInstance()->getElementByPath($path);\n }", "public static function getConf(){\n $conf = Configuration::first();\n return $conf;\n }", "function getConfigValue($key) {\r\n\t\t$db = & JFactory::getDBO() ;\r\n\t\t$sql = 'SELECT config_value FROM #__osmembership_configs WHERE config_key=\"'.$key.'\"';\r\n\t\t$db->setQuery($sql) ;\t\t\r\n\t\treturn $db->loadResult();\r\n\t}", "public static function config($name) {\n\t\treturn isset(self::$config[$name]) ? self::$config[$name] : null;\n\t}", "public static function config($key)\n\t{\n\t\treturn (TC::$config !== NULL) ? TC::$config->get($key) : false;\n\t}", "public static function get($name)\n {\n self::loadConfiguration();\n\n return self::$configuration[$name] ?? null;\n }", "protected function getConfig($name)\n {\n return $this->core->getConfig()->get($name, '');\n }", "public function getValue($key = NULL) {\n return isset($this->config[$key]) ? $this->config[$key] : NULL;\n }", "public function getCfg($path = null)\n {\n return $this->config->getCfg($path);\n }", "public function get() {\n\n\t\tif (is_multisite()) {\n\t\t\t$config = get_site_option('wpo_cache_config', $this->get_defaults());\n\t\t} else {\n\t\t\t$config = get_option('wpo_cache_config', $this->get_defaults());\n\t\t}\n\n\t\treturn wp_parse_args($config, $this->get_defaults());\n\t}", "protected function _get_config()\n {\n $config = Spyc::YAMLLoad(\"config.yaml\");\n return $config;\n }", "public function getConfig()\n {\n return $this->config ?: $this->setConfig()->getConfig();\n }", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfig();", "public function getConfigurationValue($key) {\n return $this->configuration[$key] ?? NULL;\n }", "public function getCurrentUserConfig();", "public static function get_configuration()\n\t{\n\t\tif (empty(self::$_configuration))\n\t\t{\n\t\t\tself::check();\n\t\t}\n\t\treturn self::$_configuration;\n\t}", "public static function get($path = null)\r\n\t{\r\n\t\tif($path)\r\n\t\t{\r\n\t\t\t$config = $GLOBALS['config'];\t\t//ARRAY NAME for configurations \r\n\t\t\t$path = explode('/', $path);\r\n\r\n\t\t\tforeach ($path as $bit) {\r\n\t\t\t\tif(isset($config[$bit]))\r\n\t\t\t\t{\r\n\t\t\t\t\t$config = $config[$bit]; //To access to second level of config\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn $config;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public function get($key=null)\n {\n if (is_null($key)) {\n return $this->getConfig();\n } elseif (isset($this->config[$key])) {\n return $this->config[$key];\n }\n\n throw new \\InvalidArgumentException(\n sprintf('Config for \"%s\" does not exists.', $key)\n );\n }", "public function get($name)\n {\n return (isset($this->settings[$name]) ? $this->settings[$name] : null);\n }", "public function getSetting() {}", "public function getSetting() {}", "public function getConfig($key);", "public function getConfig($key);", "public static function getConfig () {\n\n\t\treturn parse_ini_file(APPPATH . '/config/config.ini');\n\t}", "static public function getConfig() {\n return Application::$config;\n }", "public function getConfig() {\n $configFiles = [\n 4 => 'laravel-haml::config',\n 5 => 'laravel-haml',\n 6 => 'haml'\n ];\n\n\t\t$key = $configFiles[$this->version()];\n\t\treturn $this->app->make('config')->get($key);\n\t}", "public function retrieveSystemConfiguration()\n {\n return $this->start()->uri(\"/api/system-configuration\")\n ->get()\n ->go();\n }", "protected function getConfig($key = null)\n {\n if ($this->config === null) {\n $this->setConfig();\n }\n\n if (null === $key) {\n return $this->config;\n }\n\n if (!array_key_exists($key, $this->config)) {\n throw new InvalidArgumentException(\"key: '\" . $key . \"' is not set in configuration options.\");\n }\n\n return $this->config[$key];\n }", "public static function get ($key = null)\n\t{\n\t\t// load config file here\n\t\tself::check_config();\n\n\t\tif ($key != null)\n\t\t{\n\t\t\tif (isset(self::$_config[$key]))\n\t\t\t{\n\t\t\t\treturn self::$_config[$key];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn self::$_config;\n\t\t}\n\t}", "public function getConfig($config_key)\n {\n if(array_key_exists(strtolower($config_key), self::$config_array)) \n {\n return self::$config_array[strtolower($config_key)];\n }\n\n try \n {\n return self::getDefaultValue($config_key);\n }\n catch(\\Exception $e) \n {\n printf(\"Unable to prepare configs: %s\", $e->getMessage());\n }\n }", "public function getConfig()\n {\n return $this['config'];\n }", "public static function get(string $key): mixed\n {\n if (!isset(static::$config[$key])) {\n throw new Exception(\n sprintf(\n 'Configuration with key %s not found!',\n $key\n )\n );\n }\n\n return static::$config[$key];\n }", "public function getConfig() {\n return $this->container->offsetGet('config');\n }", "public function getStatusLEDConfig()\n {\n $payload = '';\n\n $data = $this->sendRequest(self::FUNCTION_GET_STATUS_LED_CONFIG, $payload);\n\n $payload = unpack('C1config', $data);\n\n return $payload['config'];\n }", "public function getConfig() {}", "public function getConfig(){\n\t\t$request = $this->_sendPacketToController(self::GET_CONFIG);\n\t\tif ($request->getState() == self::STATE_OK) // If the packet is send sucefully\n\t\t\treturn $this->_getResponse(); // TODO mettre en forme la sortie\n\t\telse\n\t\t\treturn $request;\n\t}", "public function getConfig()\n\t{\n\t\treturn $this->config;\n\t}", "public function getConfig()\n\t{\n\t\treturn $this->config;\n\t}", "public function getConfig()\n\t{\n\t\treturn $this->config;\n\t}" ]
[ "0.78731394", "0.6626676", "0.5898211", "0.5777897", "0.5675747", "0.56366116", "0.55743366", "0.5553726", "0.5539036", "0.5508878", "0.54915833", "0.54881966", "0.5483576", "0.5481618", "0.54761094", "0.5475268", "0.545728", "0.5454844", "0.5446216", "0.54440486", "0.5430929", "0.5429014", "0.54239666", "0.54177505", "0.54138714", "0.5400217", "0.53720516", "0.53720003", "0.5368049", "0.53411704", "0.53378063", "0.53311574", "0.5321453", "0.53207344", "0.53044724", "0.5291597", "0.5286985", "0.52808183", "0.5276731", "0.52762103", "0.5264876", "0.52620095", "0.52510804", "0.5246018", "0.52400327", "0.52399975", "0.52092195", "0.52031326", "0.520193", "0.5185591", "0.51818055", "0.518003", "0.51719016", "0.51566625", "0.5153598", "0.51483047", "0.51416016", "0.51387364", "0.51315784", "0.5123802", "0.511924", "0.5114502", "0.5114303", "0.50945777", "0.50832236", "0.5079989", "0.5076274", "0.5076274", "0.5076274", "0.5076274", "0.5076274", "0.5076274", "0.5076274", "0.5076274", "0.50757384", "0.5074405", "0.50723803", "0.50711346", "0.5071127", "0.50650144", "0.50638455", "0.50638455", "0.50635284", "0.50635284", "0.5063209", "0.5062018", "0.50609916", "0.50514656", "0.5049276", "0.50426954", "0.5035866", "0.5032544", "0.5019685", "0.5009644", "0.50091195", "0.4997159", "0.49916437", "0.4987622", "0.4987622", "0.4987622" ]
0.79686177
0
Lists the existing valid Uptime check configurations for the project (leaving out any invalid configurations). (uptimeCheckConfigs.listProjectsUptimeCheckConfigs)
Перечисляет существующие действительные конфигурации проверок доступности для проекта (исключая любые недействительные конфигурации). (uptimeCheckConfigs.listProjectsUptimeCheckConfigs)
public function listProjectsUptimeCheckConfigs($parent, $optParams = []) { $params = ['parent' => $parent]; $params = array_merge($params, $optParams); return $this->call('list', [$params], ListUptimeCheckConfigsResponse::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ListUptimeCheckConfigs(\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckConfigsRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/ListUptimeCheckConfigs',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckConfigsResponse', 'decode'],\n $metadata, $options);\n }", "public function ListUptimeCheckIps(\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckIpsRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/ListUptimeCheckIps',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckIpsResponse', 'decode'],\n $metadata, $options);\n }", "public function getUptimeCheckConfig()\n {\n return $this->uptime_check_config;\n }", "public function get($name, $optParams = [])\n {\n $params = ['name' => $name];\n $params = array_merge($params, $optParams);\n return $this->call('get', [$params], UptimeCheckConfig::class);\n }", "function getProjectList() {\n global $logger;\n\n $projects = Project::getProjects();\n if($projects != NULL) {\n $extproj_id = Config::getInstance()->getValue(Config::id_externalTasksProject);\n $smartyProjects = array();\n foreach($projects as $id => $name) {\n // exclude ExternalTasksProject\n if ($extproj_id == $id) {\n echo \"<script type=\\\"text/javascript\\\">console.log(\\\" getProjectList - project $id: ExternalTasksProject is excluded\\\");</script>\";\n continue;\n }\n\n // exclude SideTasksProjects\n try {\n $p = ProjectCache::getInstance()->getProject($id);\n if ($p->isSideTasksProject()) {\n echo \"<script type=\\\"text/javascript\\\">console.log(\\\" getProjectList - project $id: sideTaskProjects are excluded\\\");</script>\";\n continue;\n }\n } catch (Exception $e) {\n // could not determinate, so the project should be included in the list\n echo \"<script type=\\\"text/javascript\\\">console.log(\\\" getProjectList - project $id: Unknown type, project included anyway\\\");</script>\";\n // nothing to do.\n }\n $smartyProjects[$id] = $name;\n }\n return $smartyProjects;\n } else {\n return NULL;\n }\n}", "public function getCheckups()\n {\n $scheduledCheckups = User::find(auth()->id())->checkups->reverse();\n\n return api_resource('mobile\\CheckupSchedule')->make($scheduledCheckups);\n }", "public function setUptimeCheckConfig($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig::class);\n $this->uptime_check_config = $var;\n\n return $this;\n }", "function GetProjectStatuses()\n\t{\n\t\t$result = $this->sendRequest(\"GetProjectStatuses\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function getProjectsList($hint, $uacc_uid=''){\r\n\t\t$list = array();\r\n\r\n\t\tif($uacc_uid != '')\r\n\t\t\t$query = $this->db->select(\"project_id,project_name\")->like(\"project_name\", $hint)->where(array(\"created_by\"=>$uacc_uid,\"deleted\"=>0, \"archived\"=>0))->order_by(\"project_name\", \"asc\")->get(\"sc_projects\");\r\n\t\telse\r\n\t\t\t$query = $this->db->select(\"project_id,project_name\")->like(\"project_name\", $hint)->where(array(\"deleted\"=>0, \"archived\"=>0))->order_by(\"project_name\", \"asc\")->get(\"sc_projects\");\r\n\r\n\t if ($query->num_rows() > 0){\r\n\t\t\tforeach($query->result() as $row){\r\n\r\n\t\t\t\t$list[] = array(\"name\"=>$row->project_name, \"label\"=>$row->project_name, \"id\"=>$row->project_id);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $list;\r\n\t}", "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n if (!is_null($this->container['localNetworkPort']) && (mb_strlen($this->container['localNetworkPort']) > 36)) {\r\n $invalidProperties[] = \"invalid value for 'localNetworkPort', the character length must be smaller than or equal to 36.\";\r\n }\r\n if (!is_null($this->container['localNetworkPort']) && (mb_strlen($this->container['localNetworkPort']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'localNetworkPort', the character length must be bigger than or equal to 0.\";\r\n }\r\n $allowedValues = $this->getNotifyStatusAllowableValues();\r\n if (!is_null($this->container['notifyStatus']) && !in_array($this->container['notifyStatus'], $allowedValues, true)) {\r\n $invalidProperties[] = sprintf(\r\n \"invalid value for 'notifyStatus', must be one of '%s'\",\r\n implode(\"', '\", $allowedValues)\r\n );\r\n }\r\n\r\n if (!is_null($this->container['notifyStatus']) && (mb_strlen($this->container['notifyStatus']) > 36)) {\r\n $invalidProperties[] = \"invalid value for 'notifyStatus', the character length must be smaller than or equal to 36.\";\r\n }\r\n if (!is_null($this->container['notifyStatus']) && (mb_strlen($this->container['notifyStatus']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'notifyStatus', the character length must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['createTime']) && (mb_strlen($this->container['createTime']) > 64)) {\r\n $invalidProperties[] = \"invalid value for 'createTime', the character length must be smaller than or equal to 64.\";\r\n }\r\n if (!is_null($this->container['createTime']) && (mb_strlen($this->container['createTime']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'createTime', the character length must be bigger than or equal to 0.\";\r\n }\r\n $allowedValues = $this->getCreateSourceAllowableValues();\r\n if (!is_null($this->container['createSource']) && !in_array($this->container['createSource'], $allowedValues, true)) {\r\n $invalidProperties[] = sprintf(\r\n \"invalid value for 'createSource', must be one of '%s'\",\r\n implode(\"', '\", $allowedValues)\r\n );\r\n }\r\n\r\n if (!is_null($this->container['createSource']) && (mb_strlen($this->container['createSource']) > 36)) {\r\n $invalidProperties[] = \"invalid value for 'createSource', the character length must be smaller than or equal to 36.\";\r\n }\r\n if (!is_null($this->container['createSource']) && (mb_strlen($this->container['createSource']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'createSource', the character length must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['ecsId']) && (mb_strlen($this->container['ecsId']) > 36)) {\r\n $invalidProperties[] = \"invalid value for 'ecsId', the character length must be smaller than or equal to 36.\";\r\n }\r\n if (!is_null($this->container['ecsId']) && (mb_strlen($this->container['ecsId']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'ecsId', the character length must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['lockStatus']) && (mb_strlen($this->container['lockStatus']) > 36)) {\r\n $invalidProperties[] = \"invalid value for 'lockStatus', the character length must be smaller than or equal to 36.\";\r\n }\r\n if (!is_null($this->container['lockStatus']) && (mb_strlen($this->container['lockStatus']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'lockStatus', the character length must be bigger than or equal to 0.\";\r\n }\r\n $allowedValues = $this->getFreezedStatusAllowableValues();\r\n if (!is_null($this->container['freezedStatus']) && !in_array($this->container['freezedStatus'], $allowedValues, true)) {\r\n $invalidProperties[] = sprintf(\r\n \"invalid value for 'freezedStatus', must be one of '%s'\",\r\n implode(\"', '\", $allowedValues)\r\n );\r\n }\r\n\r\n if (!is_null($this->container['freezedStatus']) && (mb_strlen($this->container['freezedStatus']) > 36)) {\r\n $invalidProperties[] = \"invalid value for 'freezedStatus', the character length must be smaller than or equal to 36.\";\r\n }\r\n if (!is_null($this->container['freezedStatus']) && (mb_strlen($this->container['freezedStatus']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'freezedStatus', the character length must be bigger than or equal to 0.\";\r\n }\r\n return $invalidProperties;\r\n }", "public function getProjectTasksForSelectProjects($projectIdList) {\n if (count($projectIdList) < 1) return [];\n $fieldNames = [];\n $sql = \"SELECT \n p.category as category, \n p.name as ProjectName,\n pt.name as TaskName, \n u.username, \n pt.`start_date`,\n pt.`due_date`,\n pt.status \n FROM projects AS p \n LEFT JOIN project_has_tasks as pt on pt.project_id = p.id \n LEFT JOIN users as u on pt.user_id=u.id\n WHERE p.id IN (\" . implode(\",\", $projectIdList) . \")\n ORDER BY p.category, p.name;\";\n /** @var CI_DB_mysql_result $result */\n $result = $this->_primaryDatabase->query($sql, []);\n $resultArray = $result->result();\n if ($result->num_rows() > 0) {\n foreach ((array) $resultArray[0] as $fieldName => $fieldValue) $fieldNames[] = $fieldName;\n $resultArray = array_merge([(object) $fieldNames], $resultArray);\n }\n return $resultArray;\n }", "public function getCheckInTaskListList(){\n return $this->_get(2);\n }", "public function listProjects(ProjectListRequest $request)\n {\n $sorting = $request->getSortKey();\n $friendly = $request->getSortKeyFriendly();\n $order = $request->getSortOrderFriendly();\n \n return $request->renderViewOrEmpty('projects', compact(['sorting', 'friendly', 'order']));\n }", "public static function projectList() {\n\t\tif(!Authenticate::isAuthorized()) {\n \t\t throw new NotifyException(\"You are not authorized for this method\", 1);\n \t}\n else {\n\t\t\t$api_end_point = \"project\";\n\t\t\t$request_data=[];\n\t\t\treturn Request::sendRequest($api_end_point, $request_data);\n\t\t}\n\t}", "public function getTaskList($params = [])\n {\n $this->sendRequest(\n [\n 'methodName' => 'project.list',\n 'pool_id' => $params['pool_id'] ?? 0,\n 'limit' => $params['limit'] ?? 10,\n 'status' => $params['status'] ?? 'ACTIVE',\n 'sort' => $params['sort'] ?? '-id',\n ]\n );\n\n return $this->result;\n }", "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n if ($this->container['clusterVersion'] === null) {\r\n $invalidProperties[] = \"'clusterVersion' can't be null\";\r\n }\r\n if ($this->container['clusterName'] === null) {\r\n $invalidProperties[] = \"'clusterName' can't be null\";\r\n }\r\n if ((mb_strlen($this->container['clusterName']) > 64)) {\r\n $invalidProperties[] = \"invalid value for 'clusterName', the character length must be smaller than or equal to 64.\";\r\n }\r\n if ((mb_strlen($this->container['clusterName']) < 1)) {\r\n $invalidProperties[] = \"invalid value for 'clusterName', the character length must be bigger than or equal to 1.\";\r\n }\r\n if ($this->container['clusterType'] === null) {\r\n $invalidProperties[] = \"'clusterType' can't be null\";\r\n }\r\n if ($this->container['region'] === null) {\r\n $invalidProperties[] = \"'region' can't be null\";\r\n }\r\n if ($this->container['vpcName'] === null) {\r\n $invalidProperties[] = \"'vpcName' can't be null\";\r\n }\r\n if ($this->container['subnetName'] === null) {\r\n $invalidProperties[] = \"'subnetName' can't be null\";\r\n }\r\n if ($this->container['components'] === null) {\r\n $invalidProperties[] = \"'components' can't be null\";\r\n }\r\n if ($this->container['availabilityZone'] === null) {\r\n $invalidProperties[] = \"'availabilityZone' can't be null\";\r\n }\r\n if ($this->container['safeMode'] === null) {\r\n $invalidProperties[] = \"'safeMode' can't be null\";\r\n }\r\n if ($this->container['managerAdminPassword'] === null) {\r\n $invalidProperties[] = \"'managerAdminPassword' can't be null\";\r\n }\r\n if ($this->container['loginMode'] === null) {\r\n $invalidProperties[] = \"'loginMode' can't be null\";\r\n }\r\n $allowedValues = $this->getLogCollectionAllowableValues();\r\n if (!is_null($this->container['logCollection']) && !in_array($this->container['logCollection'], $allowedValues, true)) {\r\n $invalidProperties[] = sprintf(\r\n \"invalid value for 'logCollection', must be one of '%s'\",\r\n implode(\"', '\", $allowedValues)\r\n );\r\n }\r\n\r\n if ($this->container['nodeGroups'] === null) {\r\n $invalidProperties[] = \"'nodeGroups' can't be null\";\r\n }\r\n return $invalidProperties;\r\n }", "public function callProjectList(array $params = array())\n {\n return $this->call('projekt/list', $params);\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['app_name'] === null) {\n $invalidProperties[] = \"'app_name' can't be null\";\n }\n if ($this->container['app_display_name'] === null) {\n $invalidProperties[] = \"'app_display_name' can't be null\";\n }\n if ($this->container['release_id'] === null) {\n $invalidProperties[] = \"'release_id' can't be null\";\n }\n if ($this->container['platform'] === null) {\n $invalidProperties[] = \"'platform' can't be null\";\n }\n if ($this->container['uploaded_at'] === null) {\n $invalidProperties[] = \"'uploaded_at' can't be null\";\n }\n if ($this->container['version'] === null) {\n $invalidProperties[] = \"'version' can't be null\";\n }\n if ($this->container['short_version'] === null) {\n $invalidProperties[] = \"'short_version' can't be null\";\n }\n if ($this->container['size'] === null) {\n $invalidProperties[] = \"'size' can't be null\";\n }\n if ($this->container['bundle_identifier'] === null) {\n $invalidProperties[] = \"'bundle_identifier' can't be null\";\n }\n if ($this->container['install_link'] === null) {\n $invalidProperties[] = \"'install_link' can't be null\";\n }\n return $invalidProperties;\n }", "public function getListSchemaChecking() {\n\t\treturn $this->_getConfigValueArray('schemaCheckingList');\n\t}", "private function get_raw_messages() {\n\t\t$jetpack_setup_url = $this->generate_admin_url(\n\t\t\tarray(\n\t\t\t\t'page' => 'jetpack',\n\t\t\t\t'#/setup' => '',\n\t\t\t)\n\t\t);\n\n\t\t$messages = array(\n\t\t\tarray(\n\t\t\t\t'id' => 'jpsetup-upload',\n\t\t\t\t'message_path' => '/wp:upload:admin_notices/',\n\t\t\t\t'message' => __( 'Do you want lightning-fast images?', 'jetpack' ),\n\t\t\t\t'description' => __( 'Set up Jetpack, enable Site Accelerator, and start serving your images lightning fast, for free.', 'jetpack' ),\n\t\t\t\t'button_link' => $jetpack_setup_url,\n\t\t\t\t'button_caption' => __( 'Set up Jetpack', 'jetpack' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id' => 'jpsetup-widgets',\n\t\t\t\t'message_path' => '/wp:widgets:admin_notices/',\n\t\t\t\t'message' => __( 'Looking for even more widgets?', 'jetpack' ),\n\t\t\t\t'description' => __( 'Set up Jetpack for great additional widgets that display business contact info and maps, blog stats, and top posts.', 'jetpack' ),\n\t\t\t\t'button_link' => $jetpack_setup_url,\n\t\t\t\t'button_caption' => __( 'Set up Jetpack', 'jetpack' ),\n\t\t\t),\n\t\t);\n\n\t\tif ( wp_count_posts()->publish >= 5 ) {\n\t\t\t$messages[] = array(\n\t\t\t\t'id' => 'jpsetup-posts',\n\t\t\t\t'message_path' => '/wp:edit-post:admin_notices/',\n\t\t\t\t'message' => __( 'Do you know which of these posts gets the most traffic?', 'jetpack' ),\n\t\t\t\t'description' => __( 'Set up Jetpack to get in-depth stats about your content and visitors.', 'jetpack' ),\n\t\t\t\t'button_link' => $jetpack_setup_url,\n\t\t\t\t'button_caption' => __( 'Set up Jetpack', 'jetpack' ),\n\t\t\t);\n\t\t}\n\n\t\treturn $messages;\n\t}", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['pkiSystemconfigurationID'] === null) {\n $invalidProperties[] = \"'pkiSystemconfigurationID' can't be null\";\n }\n if (($this->container['pkiSystemconfigurationID'] > 1)) {\n $invalidProperties[] = \"invalid value for 'pkiSystemconfigurationID', must be smaller than or equal to 1.\";\n }\n\n if (($this->container['pkiSystemconfigurationID'] < 1)) {\n $invalidProperties[] = \"invalid value for 'pkiSystemconfigurationID', must be bigger than or equal to 1.\";\n }\n\n if ($this->container['fkiSystemconfigurationtypeID'] === null) {\n $invalidProperties[] = \"'fkiSystemconfigurationtypeID' can't be null\";\n }\n if (($this->container['fkiSystemconfigurationtypeID'] < 1)) {\n $invalidProperties[] = \"invalid value for 'fkiSystemconfigurationtypeID', must be bigger than or equal to 1.\";\n }\n\n if ($this->container['sSystemconfigurationtypeDescriptionX'] === null) {\n $invalidProperties[] = \"'sSystemconfigurationtypeDescriptionX' can't be null\";\n }\n if ($this->container['eSystemconfigurationNewexternaluseraction'] === null) {\n $invalidProperties[] = \"'eSystemconfigurationNewexternaluseraction' can't be null\";\n }\n if ($this->container['eSystemconfigurationLanguage1'] === null) {\n $invalidProperties[] = \"'eSystemconfigurationLanguage1' can't be null\";\n }\n if ($this->container['eSystemconfigurationLanguage2'] === null) {\n $invalidProperties[] = \"'eSystemconfigurationLanguage2' can't be null\";\n }\n if ($this->container['eSystemconfigurationEzsign'] === null) {\n $invalidProperties[] = \"'eSystemconfigurationEzsign' can't be null\";\n }\n if ($this->container['bSystemconfigurationEzsignpersonnal'] === null) {\n $invalidProperties[] = \"'bSystemconfigurationEzsignpersonnal' can't be null\";\n }\n if ($this->container['bSystemconfigurationSspr'] === null) {\n $invalidProperties[] = \"'bSystemconfigurationSspr' can't be null\";\n }\n// if (!is_null($this->container['dtSystemconfigurationReadonlyexpirationstart']) && !preg_match(\"/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/\", $this->container['dtSystemconfigurationReadonlyexpirationstart'])) {\n if (!is_null($this->container['dtSystemconfigurationReadonlyexpirationstart']) && !preg_match(\"/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/\", $this->container['dtSystemconfigurationReadonlyexpirationstart'])) {\n $invalidProperties[] = \"invalid value for 'dtSystemconfigurationReadonlyexpirationstart', must be conform to the pattern /^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/.\";\n }\n\n// if (!is_null($this->container['dtSystemconfigurationReadonlyexpirationend']) && !preg_match(\"/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/\", $this->container['dtSystemconfigurationReadonlyexpirationend'])) {\n if (!is_null($this->container['dtSystemconfigurationReadonlyexpirationend']) && !preg_match(\"/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/\", $this->container['dtSystemconfigurationReadonlyexpirationend'])) {\n $invalidProperties[] = \"invalid value for 'dtSystemconfigurationReadonlyexpirationend', must be conform to the pattern /^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/.\";\n }\n\n return $invalidProperties;\n }", "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n if (!is_null($this->container['taskId']) && !preg_match(\"/^[A-Za-z0-9]{32}$/\", $this->container['taskId'])) {\r\n $invalidProperties[] = \"invalid value for 'taskId', must be conform to the pattern /^[A-Za-z0-9]{32}$/.\";\r\n }\r\n if (!is_null($this->container['appId']) && !preg_match(\"/^[A-Za-z0-9]{32}$/\", $this->container['appId'])) {\r\n $invalidProperties[] = \"invalid value for 'appId', must be conform to the pattern /^[A-Za-z0-9]{32}$/.\";\r\n }\r\n if (!is_null($this->container['appName']) && !preg_match(\"/^deploy_[A-Za-z0-9]{6}$/\", $this->container['appName'])) {\r\n $invalidProperties[] = \"invalid value for 'appName', must be conform to the pattern /^deploy_[A-Za-z0-9]{6}$/.\";\r\n }\r\n if (!is_null($this->container['compId']) && !preg_match(\"/^[A-Za-z0-9]{32}$/\", $this->container['compId'])) {\r\n $invalidProperties[] = \"invalid value for 'compId', must be conform to the pattern /^[A-Za-z0-9]{32}$/.\";\r\n }\r\n if (!is_null($this->container['compName']) && (mb_strlen($this->container['compName']) > 128)) {\r\n $invalidProperties[] = \"invalid value for 'compName', the character length must be smaller than or equal to 128.\";\r\n }\r\n if (!is_null($this->container['compName']) && (mb_strlen($this->container['compName']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'compName', the character length must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['domainId']) && !preg_match(\"/^[A-Za-z0-9]{32}$/\", $this->container['domainId'])) {\r\n $invalidProperties[] = \"invalid value for 'domainId', must be conform to the pattern /^[A-Za-z0-9]{32}$/.\";\r\n }\r\n if (!is_null($this->container['region']) && (mb_strlen($this->container['region']) > 256)) {\r\n $invalidProperties[] = \"invalid value for 'region', the character length must be smaller than or equal to 256.\";\r\n }\r\n if (!is_null($this->container['region']) && (mb_strlen($this->container['region']) < 1)) {\r\n $invalidProperties[] = \"invalid value for 'region', the character length must be bigger than or equal to 1.\";\r\n }\r\n if (!is_null($this->container['state']) && (mb_strlen($this->container['state']) > 32)) {\r\n $invalidProperties[] = \"invalid value for 'state', the character length must be smaller than or equal to 32.\";\r\n }\r\n if (!is_null($this->container['state']) && (mb_strlen($this->container['state']) < 1)) {\r\n $invalidProperties[] = \"invalid value for 'state', the character length must be bigger than or equal to 1.\";\r\n }\r\n if (!is_null($this->container['state']) && !preg_match(\"/^[0-1]{1}$/\", $this->container['state'])) {\r\n $invalidProperties[] = \"invalid value for 'state', must be conform to the pattern /^[0-1]{1}$/.\";\r\n }\r\n return $invalidProperties;\r\n }", "function getProjectList()\n\t{\n\t\t//Update Project List\n\t\t$this->Project_List = null;\n\t\t$assigned_projects_rows = returnRowsDeveloperAssignments($this->getUsername(), 'Project');\n\t\tforeach($assigned_projects_rows as $assigned_project)\n\t\t\t$this->Project_List[] = new Projects( $assigned_project['ClientProjectTask'] );\n\t\treturn $this->Project_List;\n\t}", "public function getProjects()\n\t{\n\t\t$query = $this->db->getQuery(true);\n\t\t$query->select('id, name, alias')\n\t\t\t->from('#__monitor_projects');\n\n\t\t$this->countItems($query);\n\n\t\tif ($this->list !== null && isset($this->list['fullordering']) && in_array($this->list['fullordering'], $this->orderOptions))\n\t\t{\n\t\t\t$query->order($this->list['fullordering']);\n\t\t}\n\n\t\t$this->db->setQuery($query);\n\n\t\treturn $this->db->loadObjectList();\n\t}", "public function getProjects(){\n $projects = Project::all()->sortBy('dead');\n return $projects;\n }", "function getProjects(){\n\t\t \n\t\t $db = $this->startDB();\n\t\t $result = false;\n\t\t \n\t\t $sql = \"SELECT count(actTab.uuid) AS recCount, project_list.project_id, project_list.project_name\n\t\t FROM \".$this->penelopeTabID.\" AS actTab\n\t\t JOIN space ON actTab.uuid = space.uuid\n\t\t JOIN project_list ON space.project_id = project_list.project_id\n\t\t GROUP BY space.project_id \n\t\t \";\n\t\t \n\t\t $result = $db->fetchAll($sql);\n\t\t if($result){\n\t\t\t\t$projects = array();\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t $name = $row[\"project_name\"];\n\t\t\t\t\t $count = $row[\"recCount\"] + 0;\n\t\t\t\t\t $uuid = $row[\"project_id\"];\n\t\t\t\t\t $uri = self::projectBaseURI.$uuid;\n\t\t\t\t\t $projects[$uri] = array(\"name\" => $name, \"count\" => $count);\n\t\t\t\t}//end loop\n\t\t\t\t\n\t\t\t\t$projects = $this->orderURIs($projects);\n\t\t\t\t$this->projects = $projects;\n\t\t }//end case with results\n\t \n\t }", "function VM_projects() { return bList::getListInstance(myOrg_ID,'bList_vm_projects'); }", "public function worklogsReporting()\n {\n \t//\n \t// by developer\n //\n // by hours\n\n $worklogs_segmented_by_proj = [];\n $company_projects = $this->getAllProjects();\n\n foreach ($company_projects as $ndx => $company_project)\n {\n $worklogs_by_user = Werklog::with('user')\n ->selectRaw('user_id, COUNT(user_id) as user_occurrences, SUM(minutes) as user_project_total_time')\n ->where('project_id', $company_project->id)\n ->groupBy('user_id')\n ->orderBy('user_project_total_time', 'DESC')\n ->take(static::$_numrows)\n ->get();\n\n $worklogs_segmented_by_proj[$company_project->id] = $worklogs_by_user;\n }\n\n\t\tDebugbar::info($worklogs_segmented_by_proj);\n\n\t\treturn $worklogs_segmented_by_proj;\n }", "public function configuredChecks() {\n if ($this->checks === null) {\n $this->checks = [];\n foreach( $this->config as $driver => $checkConfig ) {\n // check if multiple or just one\n if (is_array($checkConfig)) {\n foreach( $checkConfig as $key => $config ) {\n $instance = $this->createInstance( $driver, $config );\n $instance->setInstanceName(is_string($key)?$key:$config);\n $this->checks[] = $instance;\n }\n } else {\n $instance = $this->createInstance( $driver, $checkConfig );\n $this->checks[] = $instance;\n }\n }\n }\n return $this->checks;\n }", "public function findHostDowntimesForAdminUser(): array;", "public function getProjectList($params = [])\n {\n $this->sendRequest(\n [\n 'methodName' => 'project.list',\n 'parameters' => [\n\n 'limit' => $params['limit'] ?? 10,\n 'status' => $params['status'] ?? 'ACTIVE',\n 'sort' => $params['sort'] ?? '-id',\n ]\n ]\n );\n\n return $this->result;\n }", "public function listAction()\r\n {\r\n $pid = $this->_getParam('projectid');\r\n $where = array();\r\n if ($pid) {\r\n $where['projectid='] = $pid;\r\n }\r\n $cid = $this->_getParam('clientid');\r\n if ($cid) {\r\n $where['clientid='] = $cid;\r\n }\r\n \r\n $this->view->timesheets = $this->projectService->getTimesheets($where);\r\n \r\n $this->renderView('timesheet/list.php');\r\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['applications'] === null) {\n $invalidProperties[] = \"'applications' can't be null\";\n }\n if ($this->container['liveApplications'] === null) {\n $invalidProperties[] = \"'liveApplications' can't be null\";\n }\n if ($this->container['sandboxApplications'] === null) {\n $invalidProperties[] = \"'sandboxApplications' can't be null\";\n }\n if ($this->container['campaigns'] === null) {\n $invalidProperties[] = \"'campaigns' can't be null\";\n }\n if ($this->container['activeCampaigns'] === null) {\n $invalidProperties[] = \"'activeCampaigns' can't be null\";\n }\n if ($this->container['liveActiveCampaigns'] === null) {\n $invalidProperties[] = \"'liveActiveCampaigns' can't be null\";\n }\n if ($this->container['coupons'] === null) {\n $invalidProperties[] = \"'coupons' can't be null\";\n }\n if ($this->container['activeCoupons'] === null) {\n $invalidProperties[] = \"'activeCoupons' can't be null\";\n }\n if ($this->container['expiredCoupons'] === null) {\n $invalidProperties[] = \"'expiredCoupons' can't be null\";\n }\n if ($this->container['referralCodes'] === null) {\n $invalidProperties[] = \"'referralCodes' can't be null\";\n }\n if ($this->container['activeReferralCodes'] === null) {\n $invalidProperties[] = \"'activeReferralCodes' can't be null\";\n }\n if ($this->container['expiredReferralCodes'] === null) {\n $invalidProperties[] = \"'expiredReferralCodes' can't be null\";\n }\n if ($this->container['activeRules'] === null) {\n $invalidProperties[] = \"'activeRules' can't be null\";\n }\n if ($this->container['users'] === null) {\n $invalidProperties[] = \"'users' can't be null\";\n }\n if ($this->container['roles'] === null) {\n $invalidProperties[] = \"'roles' can't be null\";\n }\n if ($this->container['customAttributes'] === null) {\n $invalidProperties[] = \"'customAttributes' can't be null\";\n }\n if ($this->container['webhooks'] === null) {\n $invalidProperties[] = \"'webhooks' can't be null\";\n }\n if ($this->container['loyaltyPrograms'] === null) {\n $invalidProperties[] = \"'loyaltyPrograms' can't be null\";\n }\n if ($this->container['liveLoyaltyPrograms'] === null) {\n $invalidProperties[] = \"'liveLoyaltyPrograms' can't be null\";\n }\n return $invalidProperties;\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['name'] === null) {\n $invalidProperties[] = \"'name' can't be null\";\n }\n if ($this->container['status'] === null) {\n $invalidProperties[] = \"'status' can't be null\";\n }\n $allowedValues = $this->getStatusAllowableValues();\n if (!in_array($this->container['status'], $allowedValues)) {\n $invalidProperties[] = sprintf(\n \"invalid value for 'status', must be one of '%s'\",\n implode(\"', '\", $allowedValues)\n );\n }\n\n if ($this->container['poolname'] === null) {\n $invalidProperties[] = \"'poolname' can't be null\";\n }\n if ($this->container['template_name'] === null) {\n $invalidProperties[] = \"'template_name' can't be null\";\n }\n if ($this->container['utm'] === null) {\n $invalidProperties[] = \"'utm' can't be null\";\n }\n if ($this->container['body'] === null) {\n $invalidProperties[] = \"'body' can't be null\";\n }\n if ($this->container['sender'] === null) {\n $invalidProperties[] = \"'sender' can't be null\";\n }\n if ($this->container['attachments'] === null) {\n $invalidProperties[] = \"'attachments' can't be null\";\n }\n return $invalidProperties;\n }", "public static function setQueuedFetchStatusAllProjects() \r\n\t{\r\n\t\tglobal $realtime_webservice_data_fetch_interval, $realtime_webservice_stop_fetch_inactivity_days;\r\n\t\t\r\n\t\t// Make sure we have a value for $realtime_webservice_data_fetch_interval\r\n\t\tif (!(is_numeric($realtime_webservice_data_fetch_interval) && $realtime_webservice_data_fetch_interval >= 1)) {\r\n\t\t\t$realtime_webservice_data_fetch_interval = 24;\r\n\t\t}\r\n\t\t\r\n\t\t// Set fetch interval as specific timestamp in the past\r\n\t\t$fetchIntervalTime = date(\"Y-m-d H:i:s\", (strtotime(NOW)-(3600*$realtime_webservice_data_fetch_interval)));\r\n\t\t// Validate value of $realtime_webservice_stop_fetch_inactivity_days\r\n\t\tif (!is_numeric($realtime_webservice_stop_fetch_inactivity_days) || $realtime_webservice_stop_fetch_inactivity_days < 1) {\r\n\t\t\t$realtime_webservice_stop_fetch_inactivity_days = 7;\r\n\t\t}\r\n\t\t// Get timestamp of time limit of inactivity for a project\r\n\t\t$x_days_ago = date(\"Y-m-d H:i:s\", mktime(date(\"H\"),date(\"i\"),date(\"s\"),date(\"m\"),date(\"d\")-$realtime_webservice_stop_fetch_inactivity_days,date(\"Y\")));\r\n\t\t\t\t\r\n\t\t// Get list of records that are ready to be queued (ignore any records where the value is blank for the source ID field).\r\n\t\t// Make sure that we still check records with datetime reference fields with values in the future, even if the project or record has\r\n\t\t// not been modified in the past X days of inactivity.\r\n\t\t$project_mrid_list = array();\r\n\t\t$sql = \"select r.project_id, r.record, r.mr_id from \r\n\t\t\t\tredcap_projects p, redcap_ddp_mapping m, redcap_data d, redcap_ddp_records r \r\n\t\t\t\twhere p.status <= 1 and p.realtime_webservice_enabled = 1 and p.date_deleted is null\r\n\t\t\t\tand ((p.last_logged_event is not null and p.last_logged_event > '$x_days_ago') \r\n\t\t\t\t\tor (select count(1) from redcap_ddp_records r2 where r2.project_id = p.project_id and r2.future_date_count > 0) > 0)\r\n\t\t\t\tand p.project_id = m.project_id and m.is_record_identifier = 1 and d.project_id = m.project_id \r\n\t\t\t\tand d.event_id = m.event_id and d.field_name = m.field_name and r.project_id = m.project_id \r\n\t\t\t\tand r.record = d.record and d.value != '' and r.fetch_status is null \r\n\t\t\t\tand (r.updated_at is null or r.updated_at <= '$fetchIntervalTime')\";\r\n\t\t$q = db_query($sql);\t\t\r\n\t\twhile ($row = db_fetch_assoc($q)) {\r\n\t\t\t// Add to array\r\n\t\t\t$project_mrid_list[$row['project_id']][$row['record']] = $row['mr_id'];\r\n\t\t}\r\n\t\t\r\n\t\t// Keep count of number of records queued\r\n\t\t$numRecordsQueued = 0;\r\n\t\t// Loop through records and return only those modified in past X days (based upon $realtime_webservice_stop_fetch_inactivity_days)\r\n\t\tforeach ($project_mrid_list as $this_project_id=>$records_mrids) {\r\n\t\t\t// If there are more records than max records per batch, then do in several batches\r\n\t\t\t$records_log_query = array_chunk($records_mrids, self::RECORD_LIMIT_PER_LOG_QUERY, true);\r\n\t\t\t// Query log_event table for each batch\r\n\t\t\tforeach ($records_log_query as $records_mrids_this_batch) {\r\n\t\t\t\t// Return a list of records in this batch that have dates of service that exist in the future\r\n\t\t\t\t$records_mrids_this_batch_future_dates = self::checkRecordsFutureDates($this_project_id, $records_mrids_this_batch);\r\n\t\t\t\t// Return a list of records in this batch that have been modified in past X days \r\n\t\t\t\t// (exclude those already found that have future dates - reduces query time)\r\n\t\t\t\t$records_mrids_this_batch_NO_future_dates = array_diff_assoc($records_mrids_this_batch, $records_mrids_this_batch_future_dates);\r\n\t\t\t\t$records_mrids_this_batch_modified = self::checkRecordsModifiedRecently($this_project_id, $records_mrids_this_batch_NO_future_dates, $x_days_ago);\r\n\t\t\t\t// Merge the mr_id arrays to build the ones that we need to queue in this batch\r\n\t\t\t\t$mr_ids_to_queue_this_batch = array_unique(array_merge($records_mrids_this_batch_modified, $records_mrids_this_batch_future_dates));\r\n\t\t\t\t// Set the fetch status of the records returned to QUEUED\r\n\t\t\t\tif (!empty($mr_ids_to_queue_this_batch)) \r\n\t\t\t\t{\r\n\t\t\t\t\t$sql = \"update redcap_ddp_records set fetch_status = 'QUEUED' \r\n\t\t\t\t\t\t\twhere mr_id in (\" . prep_implode($mr_ids_to_queue_this_batch) . \")\";\r\n\t\t\t\t\tif (db_query($sql)) {\r\n\t\t\t\t\t\t// Increment queued record count\r\n\t\t\t\t\t\t$numRecordsQueued += db_affected_rows();\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Return number of recrods queued\r\n\t\treturn $numRecordsQueued;\r\n\t}", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n $allowedValues = $this->getEssTimesheetSettingAllowableValues();\n if (!is_null($this->container['ess_timesheet_setting']) && !in_array($this->container['ess_timesheet_setting'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value '%s' for 'ess_timesheet_setting', must be one of '%s'\",\n $this->container['ess_timesheet_setting'],\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }", "public function testBackgroundCheckStatusesList()\n {\n $r = self::$f1->get('/v1/requirements/backgroundcheckstatuses.json');\n $this->assertEquals('200', $r['http_code'] );\n $this->assertNotEmpty($r['body'], \"No Response Body\");\n return $r['body']['backgroundCheckStatuses'];\n }", "public static function getAll() {\n self::checkConnection();\n $sql = \"SELECT p.*, (p.start_date+p.duration) AS end_date, (p.goal - COALESCE(SUM(d.amount), 0)) AS rem FROM project p LEFT JOIN donation d ON d.project_id = p.id GROUP BY p.id ORDER BY end_date DESC, rem DESC;\"; //coalesce similar with isnull;\n if(isset($_GET['_category'])) {\n $category_id = $_GET['_category'];\n settype($category_id, 'integer');\n $sql = sprintf(\"SELECT p.*,(p.start_date+p.duration) AS end_date, (p.goal - COALESCE(SUM(d.amount), 0)) AS rem FROM project p LEFT JOIN donation d ON d.project_id = p.id WHERE p.id IN (SELECT c.project_id FROM project_category c WHERE c.category_id = %d) GROUP BY p.id ORDER BY end_date DESC, rem DESC;\", $category_id);\n }\n $results = self::$connection->execute($sql);\n $projects = array();\n foreach ($results as $project_arr) {\n array_push($projects, new Project($project_arr));\n }\n return $projects;\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['busy_status'] === null) {\n $invalidProperties[] = \"'busy_status' can't be null\";\n }\n if ($this->container['end_date_time'] === null) {\n $invalidProperties[] = \"'end_date_time' can't be null\";\n }\n if ($this->container['has_attachment'] === null) {\n $invalidProperties[] = \"'has_attachment' can't be null\";\n }\n if ($this->container['meeting_type'] === null) {\n $invalidProperties[] = \"'meeting_type' can't be null\";\n }\n if ($this->container['original_start_date'] === null) {\n $invalidProperties[] = \"'original_start_date' can't be null\";\n }\n if ($this->container['reminder_delta'] === null) {\n $invalidProperties[] = \"'reminder_delta' can't be null\";\n }\n if ($this->container['reminder_set'] === null) {\n $invalidProperties[] = \"'reminder_set' can't be null\";\n }\n if ($this->container['start_date_time'] === null) {\n $invalidProperties[] = \"'start_date_time' can't be null\";\n }\n if ($this->container['sub_type'] === null) {\n $invalidProperties[] = \"'sub_type' can't be null\";\n }\n return $invalidProperties;\n }", "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n if (!is_null($this->container['resourceId']) && (mb_strlen($this->container['resourceId']) > 256)) {\r\n $invalidProperties[] = \"invalid value for 'resourceId', the character length must be smaller than or equal to 256.\";\r\n }\r\n if (!is_null($this->container['resourceId']) && (mb_strlen($this->container['resourceId']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'resourceId', the character length must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['version']) && (mb_strlen($this->container['version']) > 64)) {\r\n $invalidProperties[] = \"invalid value for 'version', the character length must be smaller than or equal to 64.\";\r\n }\r\n if (!is_null($this->container['version']) && (mb_strlen($this->container['version']) < 1)) {\r\n $invalidProperties[] = \"invalid value for 'version', the character length must be bigger than or equal to 1.\";\r\n }\r\n if (!is_null($this->container['quotaStatus']) && (mb_strlen($this->container['quotaStatus']) > 64)) {\r\n $invalidProperties[] = \"invalid value for 'quotaStatus', the character length must be smaller than or equal to 64.\";\r\n }\r\n if (!is_null($this->container['quotaStatus']) && (mb_strlen($this->container['quotaStatus']) < 1)) {\r\n $invalidProperties[] = \"invalid value for 'quotaStatus', the character length must be bigger than or equal to 1.\";\r\n }\r\n if (!is_null($this->container['usedStatus']) && (mb_strlen($this->container['usedStatus']) > 64)) {\r\n $invalidProperties[] = \"invalid value for 'usedStatus', the character length must be smaller than or equal to 64.\";\r\n }\r\n if (!is_null($this->container['usedStatus']) && (mb_strlen($this->container['usedStatus']) < 1)) {\r\n $invalidProperties[] = \"invalid value for 'usedStatus', the character length must be bigger than or equal to 1.\";\r\n }\r\n if (!is_null($this->container['hostId']) && (mb_strlen($this->container['hostId']) > 64)) {\r\n $invalidProperties[] = \"invalid value for 'hostId', the character length must be smaller than or equal to 64.\";\r\n }\r\n if (!is_null($this->container['hostId']) && (mb_strlen($this->container['hostId']) < 1)) {\r\n $invalidProperties[] = \"invalid value for 'hostId', the character length must be bigger than or equal to 1.\";\r\n }\r\n if (!is_null($this->container['hostName']) && (mb_strlen($this->container['hostName']) > 128)) {\r\n $invalidProperties[] = \"invalid value for 'hostName', the character length must be smaller than or equal to 128.\";\r\n }\r\n if (!is_null($this->container['hostName']) && (mb_strlen($this->container['hostName']) < 1)) {\r\n $invalidProperties[] = \"invalid value for 'hostName', the character length must be bigger than or equal to 1.\";\r\n }\r\n if (!is_null($this->container['chargingMode']) && (mb_strlen($this->container['chargingMode']) > 64)) {\r\n $invalidProperties[] = \"invalid value for 'chargingMode', the character length must be smaller than or equal to 64.\";\r\n }\r\n if (!is_null($this->container['chargingMode']) && (mb_strlen($this->container['chargingMode']) < 1)) {\r\n $invalidProperties[] = \"invalid value for 'chargingMode', the character length must be bigger than or equal to 1.\";\r\n }\r\n if (!is_null($this->container['expireTime']) && ($this->container['expireTime'] > 2147483647)) {\r\n $invalidProperties[] = \"invalid value for 'expireTime', must be smaller than or equal to 2147483647.\";\r\n }\r\n if (!is_null($this->container['expireTime']) && ($this->container['expireTime'] < 0)) {\r\n $invalidProperties[] = \"invalid value for 'expireTime', must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['sharedQuota']) && (mb_strlen($this->container['sharedQuota']) > 64)) {\r\n $invalidProperties[] = \"invalid value for 'sharedQuota', the character length must be smaller than or equal to 64.\";\r\n }\r\n if (!is_null($this->container['sharedQuota']) && (mb_strlen($this->container['sharedQuota']) < 1)) {\r\n $invalidProperties[] = \"invalid value for 'sharedQuota', the character length must be bigger than or equal to 1.\";\r\n }\r\n if (!is_null($this->container['enterpriseProjectId']) && (mb_strlen($this->container['enterpriseProjectId']) > 256)) {\r\n $invalidProperties[] = \"invalid value for 'enterpriseProjectId', the character length must be smaller than or equal to 256.\";\r\n }\r\n if (!is_null($this->container['enterpriseProjectId']) && (mb_strlen($this->container['enterpriseProjectId']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'enterpriseProjectId', the character length must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['enterpriseProjectName']) && (mb_strlen($this->container['enterpriseProjectName']) > 256)) {\r\n $invalidProperties[] = \"invalid value for 'enterpriseProjectName', the character length must be smaller than or equal to 256.\";\r\n }\r\n if (!is_null($this->container['enterpriseProjectName']) && (mb_strlen($this->container['enterpriseProjectName']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'enterpriseProjectName', the character length must be bigger than or equal to 0.\";\r\n }\r\n return $invalidProperties;\r\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['third_party_app_id'] === null) {\n $invalidProperties[] = \"'third_party_app_id' can't be null\";\n }\n if ($this->container['install_url'] === null) {\n $invalidProperties[] = \"'install_url' can't be null\";\n }\n if ($this->container['name'] === null) {\n $invalidProperties[] = \"'name' can't be null\";\n }\n if ($this->container['os'] === null) {\n $invalidProperties[] = \"'os' can't be null\";\n }\n $allowedValues = $this->getOsAllowableValues();\n if (!is_null($this->container['os']) && !in_array($this->container['os'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value '%s' for 'os', must be one of '%s'\",\n $this->container['os'],\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }", "function index(){\n\t\t$user = $this->Auth->user('id');\n\t\t\n\t\t$user = $this->Auth->user('id');\n\t\t//get user's projects.\n\t\t$result = $this->Project->find('all', array(\n\t\t\t'recursive' => -1,\n\t\t\t'fields' => array('Project.id', 'Project.name'),\n\t\t\t'joins' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'table' => 'admins_projects',\n\t\t\t\t\t'alias' => 'AdminProject',\n\t\t\t\t\t'type' => 'LEFT',\n\t\t\t\t\t'foreignKey' => false,\n\t\t\t\t\t'conditions'=> array('Project.id = AdminProject.project_id','AdminProject.user_id =' . $user) \n\t\t\t\t)\n\t\t\t)\n\t\t));\n\t\t$list = Set::classicExtract($result,'{n}.Project.id');\n\t\t\n\t\t//set all other projects.\n\t\t$currProjects = $this->Project->find('all', array(\n\t\t\t'recursive' => -1,\n\t\t\t'conditions' => array(\n\t\t\t\t'Project.status NOT' => array(PROJECT_SEED, PROJECT_ARCHIVE),\n\t\t\t\t'Project.id' => $list\t\t\t\t\n\t\t\t)\n\t\t));\n\t\t$projects = Set::combine($currProjects, '{n}.Project.id', '{n}.Project', '{n}.Project.status');\n\t\t\t\n\t\t//sort phase 2 projects by their cut-off date\n\t\tif(array_key_exists(PROJECT_COLLECT, $projects))\n\t\t\t$projects[PROJECT_COLLECT] = Set::sort(array_values($projects[PROJECT_COLLECT]), '{n}.collection_end', 'asc');\n\t\t\t\n\t\t//sort phase 3 projects by their cut-off date\n\t\tif(array_key_exists(PROJECT_FEEDBACK, $projects))\n\t\t\t$projects[PROJECT_FEEDBACK] = Set::sort(array_values($projects[PROJECT_FEEDBACK]), '{n}.feedback_end', 'asc');\n\t\t\n\t\t//set archived projects.\n\t\t$this->Project->recursive = 0;\n\t\t$this->paginate['Project']['order'] = \"Project.feedback_end DESC\";\n\t\t$projects[PROJECT_ARCHIVE] = $this->paginate(array('Project.status' => PROJECT_ARCHIVE, 'Project.id' => $list));\n\t\t\n\t\t$this->set(compact('projects'));\n\t}", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['task_uid'] === null) {\n $invalidProperties[] = \"'task_uid' can't be null\";\n }\n if ($this->container['resource_uid'] === null) {\n $invalidProperties[] = \"'resource_uid' can't be null\";\n }\n if ($this->container['uid'] === null) {\n $invalidProperties[] = \"'uid' can't be null\";\n }\n if ($this->container['percent_work_complete'] === null) {\n $invalidProperties[] = \"'percent_work_complete' can't be null\";\n }\n if ($this->container['actual_cost'] === null) {\n $invalidProperties[] = \"'actual_cost' can't be null\";\n }\n if ($this->container['actual_finish'] === null) {\n $invalidProperties[] = \"'actual_finish' can't be null\";\n }\n if ($this->container['actual_overtime_cost'] === null) {\n $invalidProperties[] = \"'actual_overtime_cost' can't be null\";\n }\n if ($this->container['actual_overtime_work'] === null) {\n $invalidProperties[] = \"'actual_overtime_work' can't be null\";\n }\n if ($this->container['actual_start'] === null) {\n $invalidProperties[] = \"'actual_start' can't be null\";\n }\n if ($this->container['actual_work'] === null) {\n $invalidProperties[] = \"'actual_work' can't be null\";\n }\n if ($this->container['acwp'] === null) {\n $invalidProperties[] = \"'acwp' can't be null\";\n }\n if ($this->container['confirmed'] === null) {\n $invalidProperties[] = \"'confirmed' can't be null\";\n }\n if ($this->container['cost'] === null) {\n $invalidProperties[] = \"'cost' can't be null\";\n }\n if ($this->container['cost_rate_table_type'] === null) {\n $invalidProperties[] = \"'cost_rate_table_type' can't be null\";\n }\n if ($this->container['cost_variance'] === null) {\n $invalidProperties[] = \"'cost_variance' can't be null\";\n }\n if ($this->container['cv'] === null) {\n $invalidProperties[] = \"'cv' can't be null\";\n }\n if ($this->container['delay'] === null) {\n $invalidProperties[] = \"'delay' can't be null\";\n }\n if ($this->container['finish'] === null) {\n $invalidProperties[] = \"'finish' can't be null\";\n }\n if ($this->container['finish_variance'] === null) {\n $invalidProperties[] = \"'finish_variance' can't be null\";\n }\n if ($this->container['work_variance'] === null) {\n $invalidProperties[] = \"'work_variance' can't be null\";\n }\n if ($this->container['has_fixed_rate_units'] === null) {\n $invalidProperties[] = \"'has_fixed_rate_units' can't be null\";\n }\n if ($this->container['fixed_material'] === null) {\n $invalidProperties[] = \"'fixed_material' can't be null\";\n }\n if ($this->container['leveling_delay'] === null) {\n $invalidProperties[] = \"'leveling_delay' can't be null\";\n }\n if ($this->container['leveling_delay_format'] === null) {\n $invalidProperties[] = \"'leveling_delay_format' can't be null\";\n }\n if ($this->container['linked_fields'] === null) {\n $invalidProperties[] = \"'linked_fields' can't be null\";\n }\n if ($this->container['milestone'] === null) {\n $invalidProperties[] = \"'milestone' can't be null\";\n }\n if ($this->container['overallocated'] === null) {\n $invalidProperties[] = \"'overallocated' can't be null\";\n }\n if ($this->container['overtime_cost'] === null) {\n $invalidProperties[] = \"'overtime_cost' can't be null\";\n }\n if ($this->container['overtime_work'] === null) {\n $invalidProperties[] = \"'overtime_work' can't be null\";\n }\n if ($this->container['peak_units'] === null) {\n $invalidProperties[] = \"'peak_units' can't be null\";\n }\n if ($this->container['regular_work'] === null) {\n $invalidProperties[] = \"'regular_work' can't be null\";\n }\n if ($this->container['remaining_cost'] === null) {\n $invalidProperties[] = \"'remaining_cost' can't be null\";\n }\n if ($this->container['remaining_overtime_cost'] === null) {\n $invalidProperties[] = \"'remaining_overtime_cost' can't be null\";\n }\n if ($this->container['remaining_overtime_work'] === null) {\n $invalidProperties[] = \"'remaining_overtime_work' can't be null\";\n }\n if ($this->container['remaining_work'] === null) {\n $invalidProperties[] = \"'remaining_work' can't be null\";\n }\n if ($this->container['response_pending'] === null) {\n $invalidProperties[] = \"'response_pending' can't be null\";\n }\n if ($this->container['start'] === null) {\n $invalidProperties[] = \"'start' can't be null\";\n }\n if ($this->container['stop'] === null) {\n $invalidProperties[] = \"'stop' can't be null\";\n }\n if ($this->container['resume'] === null) {\n $invalidProperties[] = \"'resume' can't be null\";\n }\n if ($this->container['start_variance'] === null) {\n $invalidProperties[] = \"'start_variance' can't be null\";\n }\n if ($this->container['summary'] === null) {\n $invalidProperties[] = \"'summary' can't be null\";\n }\n if ($this->container['sv'] === null) {\n $invalidProperties[] = \"'sv' can't be null\";\n }\n if ($this->container['units'] === null) {\n $invalidProperties[] = \"'units' can't be null\";\n }\n if ($this->container['update_needed'] === null) {\n $invalidProperties[] = \"'update_needed' can't be null\";\n }\n if ($this->container['vac'] === null) {\n $invalidProperties[] = \"'vac' can't be null\";\n }\n if ($this->container['work'] === null) {\n $invalidProperties[] = \"'work' can't be null\";\n }\n if ($this->container['work_contour'] === null) {\n $invalidProperties[] = \"'work_contour' can't be null\";\n }\n if ($this->container['bcws'] === null) {\n $invalidProperties[] = \"'bcws' can't be null\";\n }\n if ($this->container['bcwp'] === null) {\n $invalidProperties[] = \"'bcwp' can't be null\";\n }\n if ($this->container['booking_type'] === null) {\n $invalidProperties[] = \"'booking_type' can't be null\";\n }\n if ($this->container['actual_work_protected'] === null) {\n $invalidProperties[] = \"'actual_work_protected' can't be null\";\n }\n if ($this->container['actual_overtime_work_protected'] === null) {\n $invalidProperties[] = \"'actual_overtime_work_protected' can't be null\";\n }\n if ($this->container['creation_date'] === null) {\n $invalidProperties[] = \"'creation_date' can't be null\";\n }\n if ($this->container['budget_cost'] === null) {\n $invalidProperties[] = \"'budget_cost' can't be null\";\n }\n if ($this->container['budget_work'] === null) {\n $invalidProperties[] = \"'budget_work' can't be null\";\n }\n if ($this->container['rate_scale'] === null) {\n $invalidProperties[] = \"'rate_scale' can't be null\";\n }\n return $invalidProperties;\n }", "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n if ($this->container['start_time'] === null) {\n $invalid_properties[] = \"'start_time' can't be null\";\n }\n if ($this->container['last_update_time'] === null) {\n $invalid_properties[] = \"'last_update_time' can't be null\";\n }\n if ($this->container['avg_cpu_percentage'] === null) {\n $invalid_properties[] = \"'avg_cpu_percentage' can't be null\";\n }\n if ($this->container['avg_memory_gi_b'] === null) {\n $invalid_properties[] = \"'avg_memory_gi_b' can't be null\";\n }\n if ($this->container['peak_memory_gi_b'] === null) {\n $invalid_properties[] = \"'peak_memory_gi_b' can't be null\";\n }\n if ($this->container['avg_disk_gi_b'] === null) {\n $invalid_properties[] = \"'avg_disk_gi_b' can't be null\";\n }\n if ($this->container['peak_disk_gi_b'] === null) {\n $invalid_properties[] = \"'peak_disk_gi_b' can't be null\";\n }\n if ($this->container['disk_read_i_ops'] === null) {\n $invalid_properties[] = \"'disk_read_i_ops' can't be null\";\n }\n if ($this->container['disk_write_i_ops'] === null) {\n $invalid_properties[] = \"'disk_write_i_ops' can't be null\";\n }\n if ($this->container['disk_read_gi_b'] === null) {\n $invalid_properties[] = \"'disk_read_gi_b' can't be null\";\n }\n if ($this->container['disk_write_gi_b'] === null) {\n $invalid_properties[] = \"'disk_write_gi_b' can't be null\";\n }\n if ($this->container['network_read_gi_b'] === null) {\n $invalid_properties[] = \"'network_read_gi_b' can't be null\";\n }\n if ($this->container['network_write_gi_b'] === null) {\n $invalid_properties[] = \"'network_write_gi_b' can't be null\";\n }\n return $invalid_properties;\n }", "function getAllSubProjectTasks()\n {\n\t\t$projectTasksBeans = array();\n\n if (!empty($this->project_task_id) && !empty($this->project_id))\n\t\t{\n //select all tasks from a project\n $query = \"SELECT id, project_task_id, parent_task_id FROM project_task WHERE project_id = '{$this->project_id}' AND deleted = 0 ORDER BY project_task_id\";\n\n $result = $this->db->query($query, true, \"Error retrieving child project tasks\");\n\n $projectTasks=array();\n while($row = $this->db->fetchByAssoc($result))\n {\n $projectTasks[$row['id']]['project_task_id'] = $row['project_task_id'];\n $projectTasks[$row['id']]['parent_task_id'] = $row['parent_task_id'];\n }\n\n $potentialParentTaskIds[$this->project_task_id] = $this->project_task_id;\n $actualParentTaskIds=array();\n $subProjectTasks=array();\n\n $startProjectTasksCount=0;\n $endProjectTasksCount=0;\n\n //get all child tasks\n $run = true;\n while ($run)\n {\n $count=0;\n\n foreach ($projectTasks as $id=>$values)\n {\n if (in_array($values['parent_task_id'], $potentialParentTaskIds))\n {\n $potentialParentTaskIds[$values['project_task_id']] = $values['project_task_id'];\n $actualParentTaskIds[$values['parent_task_id']] = $values['parent_task_id'];\n\n $subProjectTasks[$id]=$values;\n $count=$count+1;\n }\n }\n\n $endProjectTasksCount = count($subProjectTasks);\n\n if ($startProjectTasksCount == $endProjectTasksCount)\n {\n $run = false;\n }\n else\n {\n $startProjectTasksCount = $endProjectTasksCount;\n }\n }\n\n foreach($subProjectTasks as $id=>$values)\n {\n //ignore tasks that are parents\n if(!in_array($values['project_task_id'], $actualParentTaskIds))\n {\n $projectTaskBean = BeanFactory::getBean('ProjectTask', $id);\n array_push($projectTasksBeans, $projectTaskBean);\n }\n }\n\t\t}\n\n\t\treturn $projectTasksBeans;\n\t}", "public function run()\n\t{\n\t\t$projects = [\n\t\t\t[\n\t\t\t\t\"status_id\" => 1,\n\t\t\t\t\"name\" => 'Caerus',\n\t\t\t\t\"description\" => 'Caerus is a free service to job seekers, where you can upload a resume, search for jobs, save them and apply to them directly. Employers may also keep track of their candidates and maintain a history of the interview progress.',\n\t\t\t\t\"photo\" => 'projects/caerus.png',\n\t\t\t],\n\t\t\t[\n\t\t\t\t\"status_id\" => 1,\n\t\t\t\t\"name\" => 'Hermes',\n\t\t\t\t\"description\" => 'Hermes is a free instant messaging app available on the web. It allows you to send text messages to other users one-on-one.',\n\t\t\t\t\"photo\" => 'projects/hermes.png',\n\t\t\t],\n\t\t\t[\n\t\t\t\t\"status_id\" => 1,\n\t\t\t\t\"name\" => 'SiSr',\n\t\t\t\t\"description\" => 'SiSr is a web app that allows you to order your food at your favorite restaurant without the need of interacting with the waiters, simply choose your grub, confirm and await!',\n\t\t\t\t\"photo\" => 'projects/sisr.png',\n\t\t\t],\n\t\t\t[\n\t\t\t\t\"status_id\" => 1,\n\t\t\t\t\"name\" => 'Agora',\n\t\t\t\t\"description\" => 'An online marketplace where you can buy and sell anything, anywhere at anytime!',\n\t\t\t\t\"photo\" => 'projects/agora.png',\n\t\t\t],\n\t\t\t[\n\t\t\t\t\"status_id\" => 1,\n\t\t\t\t\"name\" => 'Artemis',\n\t\t\t\t\"description\" => 'A bug tracking software meant for software development companies',\n\t\t\t\t\"photo\" => 'projects/artemis.png',\n\t\t\t],\n\t\t\t[\n\t\t\t\t\"status_id\" => 1,\n\t\t\t\t\"name\" => 'Aletheia',\n\t\t\t\t\"description\" => 'No information provided',\n\t\t\t\t\"photo\" => 'projects/aletheia.png',\n\t\t\t],\n\t\t\t[\n\t\t\t\t\"status_id\" => 1,\n\t\t\t\t\"name\" => 'UI Basa Capital',\n\t\t\t\t\"description\" => 'The static version of the website of Basa Capital (https://portalweb.basacapital.com.py)',\n\t\t\t\t\"photo\" => 'projects/ui-basa-capital.png',\n\t\t\t],\n\t\t\t[\n\t\t\t\t\"status_id\" => 1,\n\t\t\t\t\"name\" => 'UI Raices',\n\t\t\t\t\"description\" => 'The static version of the website of Raices (https://usuarios.raices.com.py/login)',\n\t\t\t\t\"photo\" => 'projects/ui-raices.png',\n\t\t\t],\n\t\t\t//\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"status_id\" => 1,\n\t\t\t//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\" => 'Merkto',\n\t\t\t//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"description\" => 'A business-to-business (B2B) ecommerce, purchase goods from anywhere in Paraguay!',\n\t\t\t//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"photo\" => 'projects/merkto.png',\n\t\t\t//\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t//\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"status_id\" => 1,\n\t\t\t//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\" => 'Gymmer',\n\t\t\t//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"description\" => 'Manage your customers data such as routines, schedules, muscle priorities, monthly payments/installments and more!',\n\t\t\t//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"photo\" => 'projects/gymmer.png',\n\t\t\t//\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t//\t\t\t\t\t\t\t\t\t\t\t\t[\n\t\t\t//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"status_id\" => 1,\n\t\t\t//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\" => 'Matse',\n\t\t\t//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"description\" => 'Software meant to manage all the real estate properties of Matse S.A.',\n\t\t\t//\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"photo\" => 'projects/matse.png',\n\t\t\t//\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t];\n\n\t\tforeach ($projects as $project) {\n\t\t\t$new_project = new Project();\n\t\t\t$new_project->status_id = $project['status_id'];\n\t\t\t$new_project->name = $project['name'];\n\t\t\t$new_project->description = $project['description'];\n\t\t\t$new_project->photo = $project['photo'];\n\t\t\t$new_project->name = $project['name'];\n\t\t\t$new_project->started_at = now()->subDays(rand(30, 120));\n\t\t\t$new_project->save();\n\t\t}\n\n\t}", "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n if (!is_null($this->container['appId']) && !preg_match(\"/^[a-zA-Z0-9_-]{1,36}$/\", $this->container['appId'])) {\r\n $invalidProperties[] = \"invalid value for 'appId', must be conform to the pattern /^[a-zA-Z0-9_-]{1,36}$/.\";\r\n }\r\n if (!is_null($this->container['name']) && !preg_match(\"/^[一-龥a-zA-Z0-9_?'#().,&%@!-]{1,64}$/\", $this->container['name'])) {\r\n $invalidProperties[] = \"invalid value for 'name', must be conform to the pattern /^[一-龥a-zA-Z0-9_?'#().,&%@!-]{1,64}$/.\";\r\n }\r\n if (!is_null($this->container['deviceType']) && !preg_match(\"/^[一-龥a-zA-Z0-9_?'#().,&%@!-]{1,32}$/\", $this->container['deviceType'])) {\r\n $invalidProperties[] = \"invalid value for 'deviceType', must be conform to the pattern /^[一-龥a-zA-Z0-9_?'#().,&%@!-]{1,32}$/.\";\r\n }\r\n if (!is_null($this->container['protocolType']) && !preg_match(\"/(MQTT|CoAP|HTTP|HTTPS|Modbus|ONVIF|OPC-UA|OPC-DA|Other)/\", $this->container['protocolType'])) {\r\n $invalidProperties[] = \"invalid value for 'protocolType', must be conform to the pattern /(MQTT|CoAP|HTTP|HTTPS|Modbus|ONVIF|OPC-UA|OPC-DA|Other)/.\";\r\n }\r\n if (!is_null($this->container['dataFormat']) && !preg_match(\"/(json|binary)/\", $this->container['dataFormat'])) {\r\n $invalidProperties[] = \"invalid value for 'dataFormat', must be conform to the pattern /(json|binary)/.\";\r\n }\r\n if (!is_null($this->container['manufacturerName']) && !preg_match(\"/^[一-龥a-zA-Z0-9_?'#().,&%@!-]{1,32}$/\", $this->container['manufacturerName'])) {\r\n $invalidProperties[] = \"invalid value for 'manufacturerName', must be conform to the pattern /^[一-龥a-zA-Z0-9_?'#().,&%@!-]{1,32}$/.\";\r\n }\r\n if (!is_null($this->container['industry']) && !preg_match(\"/^[一-龥a-zA-Z0-9_?'#().,&%@!-]{1,64}$/\", $this->container['industry'])) {\r\n $invalidProperties[] = \"invalid value for 'industry', must be conform to the pattern /^[一-龥a-zA-Z0-9_?'#().,&%@!-]{1,64}$/.\";\r\n }\r\n if (!is_null($this->container['description']) && !preg_match(\"/^[\\\\s一-龥a-zA-Z0-9_?'#().,;&%@!\\\\- ,、:;。¥$!【】’‘“”()?…~\\/]{1,128}$/\", $this->container['description'])) {\r\n $invalidProperties[] = \"invalid value for 'description', must be conform to the pattern /^[\\\\s一-龥a-zA-Z0-9_?'#().,;&%@!\\\\- ,、:;。¥$!【】’‘“”()?…~\\/]{1,128}$/.\";\r\n }\r\n return $invalidProperties;\r\n }", "protected function PopulateProjects()\n\t{\n\t\tif (!($fp = fopen($this->projectConfig, 'r'))) {\n\t\t\tthrow new Exception('Failed to open project list file ' . $this->projectConfig);\n\t\t}\n\n\t\t$projectRoot = GitPHP_Config::GetInstance()->GetValue('projectroot');\n\n\t\twhile (!feof($fp) && ($line = fgets($fp))) {\n\t\t\t$pinfo = explode(' ', $line);\n\t\t\t$ppath = trim($pinfo[0]);\n\t\t\tif (is_file($projectRoot . $ppath . '/HEAD')) {\n\t\t\t\ttry {\n\t\t\t\t\t$projObj = new GitPHP_Project($ppath);\n\t\t\t\t\tif (isset($pinfo[1])) {\n\t\t\t\t\t\t$projOwner = trim($pinfo[1]);\n\t\t\t\t\t\tif (!empty($projOwner)) {\n\t\t\t\t\t\t\t$projObj->SetOwner($projOwner);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$this->projects[] = $projObj;\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\terror_log($e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfclose($fp);\n\t}", "public function listInvalidProperties()\n {\n $invalid_properties = [];\n\n if ($this->container['code'] === null) {\n $invalid_properties[] = \"'code' can't be null\";\n }\n if ($this->container['settings'] === null) {\n $invalid_properties[] = \"'settings' can't be null\";\n }\n if ($this->container['deeplink'] === null) {\n $invalid_properties[] = \"'deeplink' can't be null\";\n }\n if ($this->container['enrollment'] === null) {\n $invalid_properties[] = \"'enrollment' can't be null\";\n }\n if ($this->container['courses'] === null) {\n $invalid_properties[] = \"'courses' can't be null\";\n }\n if ($this->container['id'] === null) {\n $invalid_properties[] = \"'id' can't be null\";\n }\n if ($this->container['create_date'] === null) {\n $invalid_properties[] = \"'create_date' can't be null\";\n }\n if ($this->container['subscription'] === null) {\n $invalid_properties[] = \"'subscription' can't be null\";\n }\n if ($this->container['ecommerce'] === null) {\n $invalid_properties[] = \"'ecommerce' can't be null\";\n }\n if ($this->container['status'] === null) {\n $invalid_properties[] = \"'status' can't be null\";\n }\n $allowed_values = [\"not_subscribed\", \"subscribed\", \"in_progress\", \"completed\"];\n if (!in_array($this->container['status'], $allowed_values)) {\n $invalid_properties[] = \"invalid value for 'status', must be one of 'not_subscribed', 'subscribed', 'in_progress', 'completed'.\";\n }\n\n if ($this->container['name'] === null) {\n $invalid_properties[] = \"'name' can't be null\";\n }\n if ($this->container['complete_percent'] === null) {\n $invalid_properties[] = \"'complete_percent' can't be null\";\n }\n return $invalid_properties;\n }", "function GetProjectList()\n\t{\n\t\t$qry=$this->db->query(\"select DISTINCT rp_projects.projectKey,rp_projects.projectID,rp_projects.projectAddedDate,rp_projects.projectStatus,rp_user_plan_details.planTitle,rp_projects.projectKey,rp_project_details.projectName,rp_users.userEmail,rp_user_details.userFirstName,rp_user_types.userTypeStatus,rp_user_type_details.userTypeName from rp_dbho_user_plans_subdetail,rp_dbho_plan_mapping,rp_projects,rp_project_details,rp_users,rp_user_plan_details,rp_user_details,rp_user_to_type,rp_user_types,rp_user_type_details where rp_projects.projectID=rp_project_details.projectID and rp_projects.projectID=rp_dbho_plan_mapping.objectID and rp_dbho_plan_mapping.objectType='project' and rp_dbho_plan_mapping.planID=rp_dbho_user_plans_subdetail.planID and rp_dbho_user_plans_subdetail.listingType='Project' and rp_user_plan_details.planID=rp_dbho_plan_mapping.planID and rp_projects.userID=rp_users.userID and rp_users.userID=rp_user_details.userID and rp_projects.userID=rp_user_to_type.userID and rp_user_to_type.userTypeID =rp_user_types.userTypeID and rp_user_types.userTypeStatus='Active' and rp_user_types.userTypeID=rp_user_type_details.userTypeID and rp_projects.projectStatus!='Deleted' and rp_user_type_details.languageID=1 and rp_project_details.languageID=1 and rp_project_details.versionID=0 and rp_user_details.languageID=1 ORDER BY rp_projects.projectID DESC \"); \n\t\treturn $qry->result(); \n\t}", "function grabListProjectCount()\n{\n\tglobal $smcFunc;\n\n\t// As we requested that we might also need it...\n\t$request = $smcFunc['db_query']('', '\n\t\tSELECT COUNT(id) AS project_count\n\t\tFROM {db_prefix}bugtracker_projects',\n\t\tarray()\n\t);\n\n\t// Countin' our way up.\n\tlist ($count) = $smcFunc['db_fetch_row']($request);\n\n\t// And give us some free space.\n\t$smcFunc['db_free_result']($request);\n\n\t// This is how many we have.\n\treturn $count;\n}", "private function loadProjects() {\n $result = $this->database()->query('\n SELECT\n tracking_projects.project_id,\n tracking_projects.project_name,\n tracking_projects.project_path,\n tracking_projects.project_branch,\n tracking_projects.repository_ignore,\n (\n SELECT\n tracking_revisions.revision_sha\n FROM\n tracking_revisions\n WHERE\n tracking_revisions.project_id = tracking_projects.project_id\n ORDER BY\n tracking_revisions.revision_date DESC\n LIMIT\n 1\n ) AS revision_sha\n FROM\n tracking_projects\n WHERE\n project_path <> \"\"');\n\n if ($result === false) {\n Error('RepositoryTracker: Unable to retrieve a list of projects from the database.');\n return false;\n }\n\n $projects = array();\n while ($row = $result->fetch_assoc()) {\n $projects[] = array(\n 'id' => $row['project_id'],\n 'name' => $row['project_name'],\n 'path' => $row['project_path'],\n 'ignore' => $row['repository_ignore'],\n 'branch' => $row['project_branch'],\n 'rev' => $row['revision_sha'],\n );\n }\n\n if (!count($projects)) {\n Error('RepositoryTracker: No projects have been specified in the database.');\n return false;\n }\n\n return $projects;\n }", "public function findDowntimesForAdminUser(): array;", "public static function index(Project $project): array\n {\n $company = $project->company;\n $tasks = $project->tasks()\n ->with('list')\n ->with('assignee')\n ->with('author')\n ->with('timeTrackingEntries')\n ->get();\n\n // the goal of the following is to first display tasks without lists,\n // and after this, tasks with lists, grouped by lists.\n // the trick is to do this with a single query, as we don’t want to do\n // multiple queries to slow down the loading speed of the page.\n\n $tasksWithoutLists = $tasks->filter(function ($task) {\n return is_null($task->project_task_list_id);\n });\n $tasksWithoutListsCollection = collect([]);\n foreach ($tasksWithoutLists as $task) {\n $tasksWithoutListsCollection->push(self::getTaskInfo($task, $company));\n }\n\n $tasksWithLists = $tasks->diff($tasksWithoutLists);\n\n // get the list of unique task list ids\n $taskLists = $project->lists;\n $tasksListCollection = collect([]);\n foreach ($taskLists as $taskList) {\n $tasksWithListsCollection = collect([]);\n\n $tasks = $tasksWithLists->filter(function ($task) use ($taskList) {\n return $task->project_task_list_id == $taskList->id;\n });\n\n foreach ($tasks as $task) {\n $tasksWithListsCollection->push(self::getTaskInfo($task, $company));\n }\n\n $tasksListCollection->push([\n 'id' => $taskList->id,\n 'title' => $taskList->title,\n 'description' => $taskList->description,\n 'tasks' => $tasksWithListsCollection,\n ]);\n }\n\n return [\n 'tasks_without_lists' => $tasksWithoutListsCollection,\n 'task_lists' => $tasksListCollection,\n ];\n }", "public function getCheckNames() {\n $commands = drush_get_commands();\n\n // Guess the name of the Drush command.\n $command_name_pieces = preg_split('/(?=[A-Z])/', get_called_class());\n unset($command_name_pieces[0], $command_name_pieces[1], $command_name_pieces[3]);\n $command_name = strtolower(implode('-', $command_name_pieces));\n $command = $commands[$command_name];\n\n drush_command_invoke_all_ref('drush_command_alter', $command);\n\n $checks = array();\n foreach ($command['checks'] as $check) {\n if (is_array($check)) {\n $checks[] = $check['name'];\n require_once $check['location'];\n }\n else {\n $checks[] = $check;\n $base_class_name = 'SiteAuditCheck' . $this->getReportName();\n $class_name = $base_class_name . $check;\n if (!class_exists($class_name)) {\n require_once SITE_AUDIT_BASE_PATH . \"/Check/{$this->getReportName()}/$check.php\";\n }\n }\n }\n\n return $checks;\n }", "function get_projects($connect){\n\t$sql = \"SELECT * FROM projects WHERE status='' OR status=0 OR status=1\";\n\t$result = $connect->query($sql);\n\t\treturn $result;\n}", "function monitor_list_statuses() {\n $query = \"select distinct(`wf_status`) from `\".GALAXIA_TABLE_PREFIX.\"instances`\";\n $result = $this->query($query);\n $ret = Array();\n while($res = $result->fetchRow()) {\n $ret[] = $res['wf_status'];\n }\n return $ret;\n }", "public function renderList($project)\n {\n $vp = new \\VisualPaginator($this, 'vp');\n $paginator = $vp->getPaginator();\n $paginator->itemsPerPage = 30;\n $paginator->itemCount = $this->context->svnHelper->getLogSize();\n $this->template->vpPage = $paginator->page;\n\n $this->template->mailTo = \"\";\n if (isset($this->context->parameters['projects'][$this->project]['sendTo'])) {\n $this->template->mailTo = $this->context->parameters['projects'][$this->project]['sendTo'];\n }\n\n try {\n $logList = $this->context->svnHelper->getLog(\n $this->context->svnHelper->getCurrentBranch(),\n $paginator->offset,\n $paginator->itemsPerPage\n );\n } catch (\\Exception $e) {\n $logList = array();\n $this->flashMessage($e->getMessage(), 'error');\n }\n\n//\t\t$this->template->ticketLog = false;\n $this->template->logTpl = \"\";\n\n // generating log for confluence\n $selectedLogs = array();\n $log = $this->getParameter('log');\n if (!empty($log)) {\n\n $changeLogList = array();\n foreach ($log as $revision) {\n $changeLogList[$revision] = $logList[$revision];\n $selectedLogs[] = $revision;\n }\n\n if ($this->getParameter('emailSend') == 'email') {\n $this->context->mailHelper->getMail(\n $this->formatLog($changeLogList),\n $this->template->projectName,\n $this->project,\n $this->getParameter('toReleaseNote'),\n 'Line'\n );\n $this->flashMessage('Mail was sent!', 'success');\n }\n\n $this->template->logTpl = $this->getChangelogTemplate(\n $this->getTemplateForProject($project),\n $this->getLogGenerator()->generateTicketLog($changeLogList)\n );\n }\n\n \\Nette\\Diagnostics\\Debugger::barDump($logList, \"Log list\");\n\n $logTable = new \\DixonsCz\\Chuck\\Log\\Table($this, 'logTable');\n $logTable->setLog($this->formatLog($logList));\n $logTable->setSelectedLogs($selectedLogs);\n\n $this->template->log = array();\n }", "public function list()\n {\n $properties = Properties::all();\n\n foreach ($properties as $key => $property) {\n $property->connection_error = true;\n\n $heartbeat = new DateTime($property->device->heartbeat);\n $interval = $heartbeat->diff(new DateTime());\n $totalSeconds = ($interval->format('%h') * 60 + $interval->format('%i'));\n\n if ($totalSeconds < $property->device->sleep) {\n $property->connection_error = false;\n }\n\n $property->connection_ago = Carbon::parse($heartbeat, 'Europe/Prague')->diffForHumans();\n }\n\n return view('properties.list', [\"properties\" => $properties]);\n }", "public function playlists()\n\t{\n\t\treturn $this->CLI->arrayQuery(\"alarm playlists\");\n\t}", "public function listTasks()\n\t{\n\t\t$this->import('BackendUser', 'User');\n\n\t\t$tasksReg = 0;\n\t\t$tasksNew = 0;\n\t\t$tasksDue = 0;\n\t\t$arrReturn = array();\n\n\t\t$objTask = $this->Database->prepare(\"SELECT t.deadline, s.status, s.assignedTo FROM tl_task t LEFT JOIN tl_task_status s ON t.id=s.pid AND s.tstamp=(SELECT MAX(tstamp) FROM tl_task_status ts WHERE ts.pid=t.id)\" . (!$this->User->isAdmin ? \" WHERE (t.createdBy=? OR s.assignedTo=?)\" : \"\"))\n\t\t\t\t\t\t\t\t ->execute($this->User->id, $this->User->id);\n\n\t\tif ($objTask->numRows) \n\t\t{\n\t\t\t$time = time();\n\n\t\t\twhile ($objTask->next())\n\t\t\t{\n\t\t\t\tif ($objTask->status == 'completed')\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ($objTask->deadline <= $time)\n\t\t\t\t{\n\t\t\t\t\t++$tasksDue;\n\t\t\t\t}\n\t\t\t\telseif ($objTask->status == 'created' && $objTask->assignedTo == $this->User->id)\n\t\t\t\t{\n\t\t\t\t\t++$tasksNew;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t++$tasksReg;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($tasksReg > 0)\n\t\t\t{\n\t\t\t\t$arrReturn[] = '<p class=\"tl_info\">' . sprintf($GLOBALS['TL_LANG']['MSC']['tasksCur'], $tasksReg) . '</p>';\n\t\t\t}\n\n\t\t\tif ($tasksNew > 0)\n\t\t\t{\n\t\t\t\t$arrReturn[] = '<p class=\"tl_new\">' . sprintf($GLOBALS['TL_LANG']['MSC']['tasksNew'], $tasksNew) . '</p>';\n\t\t\t}\n\n\t\t\tif ($tasksDue > 0)\n\t\t\t{\n\t\t\t\t$arrReturn[] = '<p class=\"tl_error\">' . sprintf($GLOBALS['TL_LANG']['MSC']['tasksDue'], $tasksDue) . '</p>';\n\t\t\t}\n\t\t}\n\n\t\treturn implode(\"\\n\", $arrReturn);\n\t}", "public function get_wiki_enabled_projects() {\n\n\t\t// Get a list of namespaces.\n\t\t$groups = $this->_get_groups();\n\t\t$projecttable = $this->_create_table();\n\n\t\t$projecttable->setHeaders(\n\t\t\t[\n\t\t\t\t'ID',\n\t\t\t\t'Name',\n\t\t\t\t'Wiki Count',\n\t\t\t]\n\t\t);\n\n\t\tforeach ( $groups as $group ) {\n\n\t\t\t// Get projects in namespace.\n\t\t\t$projects = $this->_get_group_projects( $group['id'] );\n\n\t\t\tforeach ( $projects as $project ) {\n\n\t\t\t\tif ( true === $project['wiki_enabled'] ) {\n\n\t\t\t\t\t$wikis = $this->_get_project_wikis( $project['id'] );\n\n\t\t\t\t\tif ( count( $wikis ) > 0 ) {\n\n\t\t\t\t\t\t$this->_write_log( sprintf( 'Adding %s with %d wiki(s) to list', $project['path'], count( $wikis ) ) );\n\n\t\t\t\t\t\t$projecttable->addRow(\n\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t$project[\"id\"],\n\t\t\t\t\t\t\t\t$project[\"name\"],\n\t\t\t\t\t\t\t\tcount( $wikis ),\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t);\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t\t$projecttable->sort( 1 );\n\t\t$projecttable->display();\n\n\t}", "public function create($parent, UptimeCheckConfig $postBody, $optParams = [])\n {\n $params = ['parent' => $parent, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('create', [$params], UptimeCheckConfig::class);\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if (!is_null($this->container[self::VERSION]) && ($this->container[self::VERSION] < 1)) {\n $invalidProperties[] = \"invalid value for 'version', must be bigger than or equal to 1.\";\n }\n\n return $invalidProperties;\n }", "public function findHostDowntimesForNonAdminUser(): array;", "public function testComDayCqCompatCodeupgradeImplVersionRangeTaskIgnorelist()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.day.cq.compat.codeupgrade.impl.VersionRangeTaskIgnorelist';\n\n $crawler = $client->request('POST', $path);\n }", "public function executeChangeStatusProjectForm()\n {\n $this->statusProjectList = StatusProjectPeer::getStatusProjectList();\n }", "public function getChecks()\n {\n $result = (version_compare(phpversion(), '5.2.8', '>=')) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'PHP version', $result, \"PHP version 5.2.8 or higher is needed. A latest PHP version is always recommended.\");\n\n $current = ini_get('memory_limit');\n $result = (version_compare($current, '255M', '>')) ? self::CHECK_OK : self::CHECK_WARNING;\n $this->addResult('system', 'PHP memory', $result, \"The minimum requirement for Magento itself is 256Mb. Current memory: \".$current);\n\n $result = (function_exists('json_decode')) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'JSON', $result, 'The JSON-extension for PHP is needed');\n\n $result = (function_exists('curl_init')) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'CURL', $result, 'The CURL-extension for PHP is needed');\n\n $result = (function_exists('simplexml_load_string')) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'SimpleXML', $result, 'The SimpleXML-extension for PHP is needed');\n\n $result = (in_array('ssl', stream_get_transports())) ? self::CHECK_OK : self::CHECK_WARNING;\n $this->addResult('system', 'OpenSSL', $result, 'PHP support for OpenSSL is needed if you want to use HTTPS');\n\n $result = (function_exists('iconv')) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'iconv', $result, 'The iconv-extension for PHP is needed');\n\n $result = (ini_get('safe_mode')) ? self::CHECK_ERROR : self::CHECK_OK;\n $this->addResult('system', 'Safe Mode', $result, 'PHP Safe Mode is strongly outdated and not supported by either Joomla! or Magento');\n\n $result = (ini_get('magic_quotes_gpc')) ? self::CHECK_ERROR : self::CHECK_OK;\n $this->addResult('system', 'Magic Quotes GPC', $result, 'Magic Quotes GPC is outdated and should be disabled');\n\n $remote_domain = 'api.yireo.com';\n $result = (@fsockopen($remote_domain, 80, $errno, $errmsg, 5)) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'Firewall', $result, 'Firewall needs to allow outgoing access on port 80.');\n\n $logfile = Mage::helper('vm2mage')->getDebugLog();\n $result = (@is_writable($logfile)) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'Logfile', $result, 'Logfile \"'.$logfile.'\" should be writable');\n\n $import_dir = Mage::getBaseDir('media').DS.'import';\n if(!is_dir($import_dir)) @mkdir($import_dir);\n $result = (@is_writable($import_dir)) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'Import folder', $result, 'Import-folder \"'.$import_dir.'\" should be writable');\n\n $catalog_dir = Mage::getBaseDir('media').DS.'catalog';\n if(!is_dir($catalog_dir)) @mkdir($catalog_dir);\n $result = (@is_writable($catalog_dir)) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'Catalog folder', $result, 'Catalog-folder \"'.$catalog_dir.'\" should be writable');\n\n $collection = Mage::getResourceModel('api/user_collection');\n $result = ($collection->count() > 0) ? self::CHECK_OK : self::CHECK_ERROR;\n $this->addResult('system', 'API-user', $result, 'You should create an API-user with API resource-access');\n\n return $this->system_checks;\n }", "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n if ($this->container['status'] === null) {\r\n $invalidProperties[] = \"'status' can't be null\";\r\n }\r\n $allowedValues = $this->getStatusAllowableValues();\r\n if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) {\r\n $invalidProperties[] = sprintf(\r\n \"invalid value for 'status', must be one of '%s'\",\r\n implode(\"', '\", $allowedValues)\r\n );\r\n }\r\n\r\n if ($this->container['reason'] === null) {\r\n $invalidProperties[] = \"'reason' can't be null\";\r\n }\r\n if ($this->container['message'] === null) {\r\n $invalidProperties[] = \"'message' can't be null\";\r\n }\r\n if ($this->container['currentVersion'] === null) {\r\n $invalidProperties[] = \"'currentVersion' can't be null\";\r\n }\r\n return $invalidProperties;\r\n }", "function list_of_available_project_titles()\n{\n\t$output = \"\";\n\t//$static_url = \"https://static.fossee.in/cfd/project-titles/\";\n\t$preference_rows = array();\n\t\t$i = 1;\n\t$query = db_query(\"SELECT * from list_of_project_titles WHERE {project_title_name} NOT IN( SELECT project_title from case_study_proposal WHERE approval_status = 0 OR approval_status = 1 OR approval_status = 3)\");\n\twhile($result = $query->fetchObject()) {\n\t\t$preference_rows[] = array(\n\t\t\t\t$i,\n\t\t\t\t//print_r(array_keys($case_studies_list))\n\t\t\t\tl($result->project_title_name, 'case-study-project/download/project-title-file/' .$result->id)\n\t\t\t\t);\n\t\t\t$i++;\n\t}\n\t\t$preference_header = array(\n\t\t\t'No',\n\t\t\t'List of available projects'\n\t\t);\n\t\t$output .= theme('table', array(\n\t\t\t'header' => $preference_header,\n\t\t\t'rows' => $preference_rows\n\t\t));\n\t\n\treturn $output;\n}", "private function getAllConfig() {\n $this->user_panel->checkAuth();\n $this->config->findAll();\n }", "static function getAllProjects($status)\n {\n $projects = [];\n global $db;\n try {\n $db->where('deleted_at', NULL, 'IS');\n\n if ($status && in_array($status, ['opened', 'closed', 'progress', 'archived'])) {\n $db->where('status', $status);\n }\n\n $projects = $db->get('project');\n } catch (\\Exception $exception) {\n Log::write($exception, $db->getLastError());\n }\n\n return $projects;\n }", "function recurringdowntime_get_cfg()\n{\n recurringdowntime_check_cfg();\n $cfg = file_get_contents(RECURRINGDOWNTIME_CFG);\n return recurringdowntime_cfg_to_array($cfg);\n}", "public function GetUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\GetUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/GetUptimeCheckConfig',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig', 'decode'],\n $metadata, $options);\n }", "public function getGroupList() {\n\t\t$thisUser = Auth::user();\n\n\t\t$groups = ProjectHandler::listProjects();\n\t\t$projects = [];\n\t\t\n\t\t$isAdmin = PermissionHandler::checkAdmin($thisUser, Permissions::ALLOW_ALL);\n\t\t\n\t\tforeach ($groups as $group) {\n\t\t\t$canView = PermissionHandler::checkProject($thisUser, $group, Permissions::PROJECT_READ);\n\t\t\t\n\t\t\t$users = 0;\n\t\t\tforeach(Roles::$PROJECT_ROLE_NAMES as $role) {\n\t\t\t\t// List userts with $role in this group -- make [] when none\n\t\t\t\t$projectRole = Sentry::findGroupByName($group.':'.$role);\n\t\t\t\t$users += sizeOf($projectRole['user_agent_ids']);\n\t\t\t}\n\t\t\t\n\t\t\t// if user is not admin, do not show the admin group\n\t\t\tif($group != 'admin') {\n\t\t\t\tarray_push($projects, [\n\t\t\t\t\t'name' => $group,\n\t\t\t\t\t'canview' => $canView,\n\t\t\t\t\t'users' => $users\n\t\t\t\t]);\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\treturn View::make('projects.list')\n\t\t\t->with('projects', $projects)\n\t\t\t->with('isAdmin', $isAdmin);\n\t}", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['owner_id'] === null) {\n $invalidProperties[] = \"'owner_id' can't be null\";\n }\n if ($this->container['brand_id'] === null) {\n $invalidProperties[] = \"'brand_id' can't be null\";\n }\n if ($this->container['group_id'] === null) {\n $invalidProperties[] = \"'group_id' can't be null\";\n }\n if ($this->container['token'] === null) {\n $invalidProperties[] = \"'token' can't be null\";\n }\n if ($this->container['count'] === null) {\n $invalidProperties[] = \"'count' can't be null\";\n }\n if ($this->container['video_count'] === null) {\n $invalidProperties[] = \"'video_count' can't be null\";\n }\n if ($this->container['when_unix'] === null) {\n $invalidProperties[] = \"'when_unix' can't be null\";\n }\n return $invalidProperties;\n }", "public function listBuildConfigForAllNamespaces(\n $fieldSelector = null,\n $labelSelector = null,\n $resourceVersion = null,\n $timeoutSeconds = null,\n $watch = null,\n $pretty = null\n ) {\n\n //the base uri for api requests\n $_queryBuilder = Configuration::$BASEURI;\n \n //prepare query string for API call\n $_queryBuilder = $_queryBuilder.'/oapi/v1/buildconfigs';\n\n //process optional query parameters\n APIHelper::appendUrlWithQueryParameters($_queryBuilder, array (\n 'fieldSelector' => $fieldSelector,\n 'labelSelector' => $labelSelector,\n 'resourceVersion' => $resourceVersion,\n 'timeoutSeconds' => $timeoutSeconds,\n 'watch' => var_export($watch, true),\n 'pretty' => $pretty,\n ));\n\n //validate and preprocess url\n $_queryUrl = APIHelper::cleanUrl($_queryBuilder);\n\n //prepare headers\n $_headers = array (\n 'user-agent' => 'APIMATIC 2.0',\n 'Accept' => 'application/json'\n );\n\n //call on-before Http callback\n $_httpRequest = new HttpRequest(HttpMethod::GET, $_headers, $_queryUrl);\n if ($this->getHttpCallBack() != null) {\n $this->getHttpCallBack()->callOnBeforeRequest($_httpRequest);\n }\n\n //and invoke the API call request to fetch the response\n $response = Request::get($_queryUrl, $_headers);\n\n $_httpResponse = new HttpResponse($response->code, $response->headers, $response->raw_body);\n $_httpContext = new HttpContext($_httpRequest, $_httpResponse);\n\n //call on-after Http callback\n if ($this->getHttpCallBack() != null) {\n $this->getHttpCallBack()->callOnAfterRequest($_httpContext);\n }\n\n //handle errors defined at the API level\n $this->validateResponse($_httpResponse, $_httpContext);\n\n $mapper = $this->getJsonMapper();\n\n return $mapper->mapClass($response->body, 'OpenShiftAPIWithKubernetesLib\\\\Models\\\\V1BuildConfigList');\n }", "function getTestFilesForAllProjects(): array\n {\n $ret = array();\n foreach (config::$projects as $project) {\n $testFiles = $this->getDirContents($project[\"dir\"], config::$excludeFiles);\n foreach ($testFiles as $idx => $testFile) {\n $tests = $this->getTestClassMethodsFromFile($testFile[\"dir\"] . $testFile[\"file\"]);\n $asserts=0;\n foreach ($tests as $count) {\n $asserts +=$count;\n }\n $testFiles[$idx][\"tests\"] = sizeof($tests);\n $testFiles[$idx][\"asserts\"] = $asserts;\n $testFiles[$idx][\"name\"] = $project[\"name\"];\n }\n $ret=array_merge($ret, $testFiles);\n }\n return $ret;\n }", "private function _listSyncConfigs()\n {\n if (null === $this->_syncConfigListCache) {\n $store = Erfurt_App::getInstance()->getStore();\n\n require_once 'Erfurt/Sparql/SimpleQuery.php';\n $query = new Erfurt_Sparql_SimpleQuery();\n $query->setProloguePart('SELECT ?s ?p ?o');\n $query->addFrom($this->_syncModelUri);\n $where = 'WHERE {\n ?s ?p ?o .\n ?s <' . EF_RDF_TYPE . '> <' . $this->_properties['syncConfigClass'] . '> . }';\n $query->setWherePart($where);\n $result = $store->sparqlQuery($query, array('use_ac' => false));\n\n if (count($result) === 0) {\n return false;\n }\n\n $retVal = array();\n foreach ($result as $row) {\n if (!isset($retVal[$row['s']])) {\n $retVal[$row['s']] = array(\n 'uri' => $row['s']\n );\n }\n\n switch ($row['p']) {\n case $this->_properties['targetModel']:\n $retVal[$row['s']]['targetModel'] = $row['o'];\n break;\n case $this->_properties['syncResource']:\n $retVal[$row['s']]['syncResource'] = $row['o'];\n break;\n case $this->_properties['wrapperName']:\n $retVal[$row['s']]['wrapperName'] = $row['o'];\n break;\n case $this->_properties['lastSyncPayload']:\n $retVal[$row['s']]['lastSyncPayload'] = unserialize($row['o']);\n break;\n case $this->_properties['lastSyncDateTime']:\n $retVal[$row['s']]['lastSyncDateTime'] = $row['o'];\n break;\n case $this->_properties['syncQuery']:\n $retVal[$row['s']]['syncQuery'] = $row['o'];\n break;\n case $this->_properties['checkHasChanged']:\n $retVal[$row['s']]['checkHasChanged'] = (bool)$row['o'];\n break;\n }\n }\n\n $cacheVal = array();\n foreach ($retVal as $s=>$valueArray) {\n $hash = $this->_getHash(\n $valueArray['syncResource'],\n $valueArray['wrapperName'],\n $valueArray['targetModel']\n );\n $cacheVal[$hash] = $valueArray;\n }\n\n $this->_syncConfigListCache = $cacheVal;\n }\n\n return $this->_syncConfigListCache;\n }", "public function cleanUpOldRunningConfigurations() {}", "protected function getAceprojectStatus($aceForm) {\r\n $data = $aceForm->getData();\r\n $em = $this->getDoctrine()->getManager();\r\n $qb = $em->createQueryBuilder();\r\n $aceNameEntityArr = $data['ace']->toArray();\r\n $aceIdArr = array();\r\n $aceNumberEntityArr = $data['acenumber']->toArray();\r\n $aceNumberArr = array();\r\n $buEntityArr = $data['bu']->toArray();\r\n $buArr = array();\r\n $countryEntityArr = $data['country']->toArray();\r\n $countryArr = array();\r\n $pmEntityArr = $data['pm']->toArray();\r\n $pmArr = array();\r\n $brandEntityArr = $data['brand']->toArray();\r\n $brandArr = array();\r\n $final = array();\r\n $qb->select('opproj', 'proj')\r\n ->from('AlbatrossOperationBundle:OperationProject', 'opproj')\r\n ->leftJoin('opproj.bu', 'bu')\r\n ->leftJoin('opproj.customclient', 'client')\r\n ->leftJoin('opproj.country', 'country')\r\n ->leftJoin('opproj.project', 'proj')\r\n ->leftJoin('proj.tasks', 'task')\r\n ->where('proj.percent < 100');\r\n if (!empty($aceNameEntityArr)) {\r\n foreach ($aceNameEntityArr as $aceEntity) {\r\n $aceIdArr[] = $aceEntity->getId();\r\n }\r\n $qb->andWhere('proj.id IN (:projArr)');\r\n $qb->setParameter('projArr', $aceIdArr);\r\n }\r\n if (!empty($aceNumberEntityArr)) {\r\n foreach ($aceNumberEntityArr as $acenumEntity) {\r\n $aceNumberArr[] = $acenumEntity->getId();\r\n }\r\n $qb->andWhere('task.number > 100 AND task.number < 117 AND task.projectNumber IN (:projNumArr)');\r\n $qb->setParameter('projNumArr', $aceNumberArr);\r\n }\r\n if (!empty($buEntityArr)) {\r\n $buNameArr = array();\r\n foreach ($buEntityArr as $bu) {\r\n $buArr[] = $bu->getId();\r\n $buNameArr[] = $bu->getName();\r\n };\r\n $qb->andWhere('bu.id IN (:buArr)');\r\n $qb->setParameter('buArr', $buArr);\r\n } else {\r\n $buNameArr = '';\r\n }\r\n if (!empty($countryEntityArr)) {\r\n foreach ($countryEntityArr as $country) {\r\n $countryArr[] = $country->getId();\r\n }\r\n $qb->andWhere('country.id IN (:countryArr)');\r\n $qb->setParameter('countryArr', $countryArr);\r\n }\r\n if (!empty($pmEntityArr)) {\r\n foreach ($pmEntityArr as $pm) {\r\n $pmArr[] = $pm->getUsername();\r\n }\r\n $qb->andWhere('opproj.pm IN (:pmArr)');\r\n $qb->setParameter('pmArr', $pmArr);\r\n }\r\n if (!empty($brandEntityArr)) {\r\n foreach ($brandEntityArr as $brand) {\r\n $brandArr[] = $brand->getId();\r\n }\r\n $qb->andWhere('client.id IN (:brandArr)');\r\n $qb->setParameter('brandArr', $brandArr);\r\n }\r\n //date filter part\r\n if ($data['fw_s_f'] != null) {\r\n $qb->andWhere('opproj.fwsdate >= :fwsf');\r\n $qb->andWhere(\"opproj.fwsdate != 'none'\");\r\n $qb->setParameter('fwsf', $data['fw_s_f']);\r\n }\r\n if ($data['fw_s_t'] != null) {\r\n $qb->andWhere('opproj.fwsdate <= :fwst');\r\n $qb->andWhere(\"opproj.fwsdate != 'none'\");\r\n $qb->setParameter('fwst', $data['fw_s_t']);\r\n }\r\n if ($data['fw_e_f'] != null) {\r\n $qb->andWhere('opproj.fwedate >= :fwef');\r\n $qb->andWhere(\"opproj.fwedate != 'none'\");\r\n $qb->setParameter('fwef', $data['fw_e_f']);\r\n }\r\n if ($data['fw_e_t'] != null) {\r\n $qb->andWhere('opproj.fwedate <= :fwet');\r\n $qb->andWhere(\"opproj.fwedate != 'none'\");\r\n $qb->setParameter('fwet', $data['fw_e_t']);\r\n }\r\n if ($data['due_f'] != null) {\r\n $qb->andWhere('opproj.reportdate >= :duef');\r\n $qb->andWhere(\"opproj.reportdate != 'none'\");\r\n $qb->setParameter('duef', $data['due_f']);\r\n }\r\n if ($data['due_t'] != null) {\r\n $qb->andWhere('opproj.reportdate <= :duet');\r\n $qb->andWhere(\"opproj.reportdate != 'none'\");\r\n $qb->setParameter('duet', $data['due_t']);\r\n }\r\n $query = $qb->getQuery();\r\n $result = $query->getArrayResult();\r\n foreach ($result as $r) {\r\n $projId = $r['project']['id'];\r\n $final[$projId]['firstDate'] = $r['first_visit_date'];\r\n $final[$projId]['lastDate'] = $r['last_visit_date'];\r\n $final[$projId]['aceprojectname'] = $r['project']['name'];\r\n $final[$projId]['num'] = $r['survey_num'];\r\n $final[$projId]['fwsdate'] = $r['fwsdate'];\r\n $final[$projId]['fwedate'] = $r['fwedate'];\r\n $final[$projId]['reportdate'] = $r['reportdate'];\r\n $final[$projId]['assigned'] = $r['survey_num'] != 0 ? floor(($r['assigned_num'] / $r['survey_num']) * 100) : 0;\r\n $final[$projId]['done'] = $r['survey_num'] != 0 ? floor(($r['fw_num'] / $r['survey_num']) * 100) : 0;\r\n $final[$projId]['validationPercent'] = $r['survey_num'] != 0 ? floor(($r['editing_num'] / $r['survey_num']) * 100) : 0;\r\n $final[$projId]['assignnum'] = $r['assigned_num'];\r\n $final[$projId]['fwdonenum'] = $r['fw_num'];\r\n $final[$projId]['edit'] = $r['editing_num'];\r\n\r\n if ($data['assign_f'] != null && (float) $data['assign_f'] > $final[$projId]['assigned']) {\r\n unset($final[$projId]);\r\n }\r\n if ($data['assign_t'] != null && (float) $data['assign_t'] < $final[$r['id']]['assigned']) {\r\n unset($final[$r['id']]);\r\n }\r\n if ($data['fw_done_f'] != null && (float) $data['fw_done_f'] > $final[$r['id']]['done']) {\r\n unset($final[$r['id']]);\r\n }\r\n if ($data['fw_done_t'] != null && (float) $data['fw_done_t'] < $final[$r['id']]['done']) {\r\n unset($final[$r['id']]);\r\n }\r\n if ($data['editing_done_f'] != null && (float) $data['editing_done_f'] > $final[$r['id']]['validationPercent']) {\r\n unset($final[$r['id']]);\r\n }\r\n if ($data['editing_done_t'] != null && (float) $data['editing_done_t'] < $final[$r['id']]['validationPercent']) {\r\n unset($final[$r['id']]);\r\n }\r\n }\r\n $result_merge['result'] = $final;\r\n $result_merge['buArr'] = $buNameArr;\r\n return $result_merge;\r\n }", "static public function getStatusList() {\n return array(\n self::STATUS_SHOW => Yii::t('main', 'Show'),\n self::STATUS_HIDE => Yii::t('main', 'Hide'),\n );\n }", "static public function getStatusList() {\n return array(\n self::STATUS_SHOW => Yii::t('main', 'Show'),\n self::STATUS_HIDE => Yii::t('main', 'Hide'),\n );\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['id_import_file'] === null) {\n $invalidProperties[] = \"'id_import_file' can't be null\";\n }\n if ($this->container['uri'] === null) {\n $invalidProperties[] = \"'uri' can't be null\";\n }\n if ($this->container['status'] === null) {\n $invalidProperties[] = \"'status' can't be null\";\n }\n if ($this->container['note'] === null) {\n $invalidProperties[] = \"'note' can't be null\";\n }\n if ($this->container['total_lines'] === null) {\n $invalidProperties[] = \"'total_lines' can't be null\";\n }\n if ($this->container['current_line'] === null) {\n $invalidProperties[] = \"'current_line' can't be null\";\n }\n if ($this->container['ts_created'] === null) {\n $invalidProperties[] = \"'ts_created' can't be null\";\n }\n if ($this->container['ts_updated'] === null) {\n $invalidProperties[] = \"'ts_updated' can't be null\";\n }\n if ($this->container['ts_last_row_updated'] === null) {\n $invalidProperties[] = \"'ts_last_row_updated' can't be null\";\n }\n if ($this->container['ts_completed'] === null) {\n $invalidProperties[] = \"'ts_completed' can't be null\";\n }\n if ($this->container['error_count'] === null) {\n $invalidProperties[] = \"'error_count' can't be null\";\n }\n if ($this->container['async_import_done'] === null) {\n $invalidProperties[] = \"'async_import_done' can't be null\";\n }\n return $invalidProperties;\n }", "private static function print_log_configs() {\n\t//--\n\tglobal $configs;\n\t//--\n\t$log = '<div class=\"smartframework_debugbar_status smartframework_debugbar_status_head\"><font size=\"4\"><b>Application :: CONFIGURATION Log</b></font></div>';\n\t//-- vars\n\t$log .= '<div class=\"smartframework_debugbar_status smartframework_debugbar_status_highlight\" style=\"width:450px;\"><b>App CONFIG VARIABLES</b></div>';\n\t$arr = (array) $configs;\n\tksort($arr);\n\t$i=0;\n\t$j=0;\n\tforeach((array)$arr as $key => $val) {\n\t\t//--\n\t\t$i++;\n\t\t//--\n\t\t$log .= '<table cellspacing=\"0\" cellpadding=\"2\" width=\"100%\">';\n\t\t$log .= '<tr valign=\"top\" title=\"#'.$i.'\"><td width=\"195\"><div class=\"smartframework_debugbar_inforow\">';\n\t\t$log .= '<b>'.Smart::escape_html((string)$key).'</b>';\n\t\t$log .= '</div></td><td><div class=\"smartframework_debugbar_inforow\">';\n\t\tif(is_array($val)) {\n\t\t\t$log .= '<table width=\"100%\" cellpadding=\"1\" cellspacing=\"0\" border=\"0\" style=\"font-size:13px;\">';\n\t\t\t$j=0;\n\t\t\tforeach($val as $k => $v) {\n\t\t\t\t$j++;\n\t\t\t\tif($j % 2) {\n\t\t\t\t\t$color = '#FFFFFF';\n\t\t\t\t} else {\n\t\t\t\t\t$color = '#FAFAFA';\n\t\t\t\t} //end if else\n\t\t\t\t$log .= '<tr bgcolor=\"'.$color.'\" valign=\"top\" title=\"#'.$i.'.'.$j.'\"><td width=\"290\"><b>'.Smart::escape_html((string)$k).'</b></td><td>'.SmartMarkersTemplating::prepare_nosyntax_html_template(Smart::nl_2_br(Smart::escape_html(self::print_value_by_type($v))), true).'</td></tr>';\n\t\t\t} //end foreach\n\t\t\t$log .= '</table>';\n\t\t} else {\n\t\t\t$log .= '<pre>'.SmartMarkersTemplating::prepare_nosyntax_html_template(Smart::escape_html((string)$val), true).'</pre>';\n\t\t} //end if else\n\t\t$log .= '</div></td></tr>';\n\t\t$log .= '</table>';\n\t\t//--\n\t} //end while\n\t//-- constants\n\t$log .= '<div class=\"smartframework_debugbar_status smartframework_debugbar_status_highlight\" style=\"width:450px;\"><b>App SETTING CONSTANTS</b></div>';\n\t$arr = (array) get_defined_constants(true);\n\t$arr = (array) $arr['user'];\n\tksort($arr);\n\t$i=0;\n\t$j=0;\n\tforeach((array)$arr as $key => $val) {\n\t\t//--\n\t\t$i++;\n\t\t//--\n\t\tif(((string)$key == 'SMART_FRAMEWORK_CHMOD_DIRS') OR ((string)$key == 'SMART_FRAMEWORK_CHMOD_FILES')) {\n\t\t\tif(is_numeric($val)) {\n\t\t\t\t$val = (string) '0'.@decoct($val).' (octal)';\n\t\t\t} else {\n\t\t\t\t$val = (string) $val.' (!!! Warning, Invalid ... Must be OCTAL !!!)';\n\t\t\t} //end if\n\t\t} //end if\n\t\t//--\n\t\t$log .= '<table cellspacing=\"0\" cellpadding=\"2\" width=\"100%\">';\n\t\t$log .= '<tr valign=\"top\" title=\"#'.$i.'\"><td width=\"375\"><div class=\"smartframework_debugbar_inforow\"><b>'.Smart::escape_html((string)$key).'</b></div></td><td><div class=\"smartframework_debugbar_inforow\">'.SmartMarkersTemplating::prepare_nosyntax_html_template(Smart::nl_2_br(Smart::escape_html(self::print_value_by_type($val))), true).'</div></td></tr>';\n\t\t$log .= '</table>';\n\t\t//--\n\t} //end while\n\t//--\n\treturn $log;\n\t//--\n}", "public function getActiveProjectList() {\n\t\treturn $this->getProjectDao()->getActiveProjectList();\n\t}", "public function getHealthChecks(): Collection\n {\n return $this->healthChecks;\n }", "public function getListOfProjectsMissingInfo($where = null)\n {\n $projectList = $this->project\n ->select('u2.name AS manager_name','users.id AS user_id','users.name','projects.id','customers.name AS customer_name','projects.project_name','projects.otl_project_code','projects.project_type',\n 'projects.activity_type','projects.project_status','projects.meta_activity','projects.region',\n 'projects.country','projects.technology','projects.description','projects.estimated_start_date','projects.estimated_end_date',\n 'projects.comments','projects.LoE_onshore','projects.LoE_nearshore',\n 'projects.LoE_offshore', 'projects.LoE_contractor', 'projects.gold_order_number', 'projects.product_code', 'projects.revenue', 'projects.win_ratio');\n $projectList->leftjoin('activities', 'project_id', '=', 'projects.id');\n $projectList->leftjoin('users', 'user_id', '=', 'users.id');\n $projectList->leftjoin('users_users', 'users.id', '=', 'users_users.user_id');\n $projectList->leftjoin('users AS u2', 'u2.id', '=', 'users_users.manager_id');\n $projectList->leftjoin('customers', 'projects.customer_id', '=', 'customers.id');\n $projectList->whereRaw(\"(project_type = '' or activity_type = '' or project_status = '')\");\n $projectList->groupBy('users.name', 'projects.id');\n\n $data = Datatables::of($projectList)->make(true);\n\n return $data;\n }", "public function getProjectTasks() {\n $fieldNames = [];\n $sql = \"SELECT \n p.name as ProjectName,\n pt.name as TaskName, \n u.username, \n pt.`start_date`,\n pt.`due_date`,\n pt.status \n FROM projects AS p \n LEFT JOIN project_has_tasks as pt on pt.project_id = p.id \n LEFT JOIN users as u on pt.user_id=u.id;\";\n /** @var CI_DB_mysql_result $result */\n $result = $this->_primaryDatabase->query($sql, []);\n $resultArray = $result->result();\n if ($result->num_rows() > 0) {\n foreach ((array) $resultArray[0] as $fieldName => $fieldValue) $fieldNames[] = $fieldName;\n $resultArray = array_merge([(object) $fieldNames], $resultArray);\n }\n\n return $resultArray;\n }", "static function getAllPlans(){\n global $configClass;\n if($configClass['integrate_membership'] == 1){\n $db = JFactory::getDbo();\n $nullDate = $db->quote($db->getNullDate());\n $nowDate = $db->quote(JHtml::_('date', 'now', 'Y-m-d H:i:s', false));\n $query = $db->getQuery(true);\n $query->select('tbl.*')->from('#__osmembership_plans as tbl');\n $query->where('tbl.published = 1')\n ->where('tbl.access IN (' . implode(',', JFactory::getUser()->getAuthorisedViewLevels()) . ')')\n ->where('(tbl.publish_up = ' . $nullDate . ' OR tbl.publish_up <= ' . $nowDate . ')')\n ->where('(tbl.publish_down = ' . $nullDate . ' OR tbl.publish_down >= ' . $nowDate . ')');\n $db->setQuery($query);\n $allPlans = $db->loadObjectList();\n return $allPlans;\n }\n }", "public function getTimeoutList()\n {\n $value = $this->get(self::TIMEOUTLIST);\n return $value === null ? (string)$value : $value;\n }", "public function index()\n {\n //\n //Projects with schedules\n\n $projectsWithSchedulesIds = DB::select(\"\n SELECT DISTINCT tblproject.intProjectId\n FROM tblproject\n LEFT JOIN tblschedules ON tblproject.intProjectId = tblschedules.intProjectId\n WHERE tblschedules.intProjectId IS NOT NULL AND tblproject.strProjectStatus = 'on going' AND tblproject.intActive = 1\n \");\n\n $finishedProjectSchedules = array();\n foreach($projectsWithSchedulesIds as $projectId){\n $projectDetails = DB::table('tblproject')\n ->where('tblproject.intProjectId','=',$projectId->intProjectId)\n ->where('tblproject.intActive','=',1)\n ->first();\n\n array_push($finishedProjectSchedules,$projectDetails);\n }\n\n //dd($pendingProjectSchedules);\n\n return view ('Admin/project-progress',compact(\n 'finishedProjectSchedules'\n ));\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['architecture'] === null) {\n $invalidProperties[] = \"'architecture' can't be null\";\n }\n if ($this->container['boot_id'] === null) {\n $invalidProperties[] = \"'boot_id' can't be null\";\n }\n if ($this->container['container_runtime_version'] === null) {\n $invalidProperties[] = \"'container_runtime_version' can't be null\";\n }\n if ($this->container['kernel_version'] === null) {\n $invalidProperties[] = \"'kernel_version' can't be null\";\n }\n if ($this->container['kube_proxy_version'] === null) {\n $invalidProperties[] = \"'kube_proxy_version' can't be null\";\n }\n if ($this->container['kubelet_version'] === null) {\n $invalidProperties[] = \"'kubelet_version' can't be null\";\n }\n if ($this->container['machine_id'] === null) {\n $invalidProperties[] = \"'machine_id' can't be null\";\n }\n if ($this->container['operating_system'] === null) {\n $invalidProperties[] = \"'operating_system' can't be null\";\n }\n if ($this->container['os_image'] === null) {\n $invalidProperties[] = \"'os_image' can't be null\";\n }\n if ($this->container['system_uuid'] === null) {\n $invalidProperties[] = \"'system_uuid' can't be null\";\n }\n return $invalidProperties;\n }", "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n $allowedValues = $this->getTaskModeAllowableValues();\r\n if (!is_null($this->container['taskMode']) && !in_array($this->container['taskMode'], $allowedValues, true)) {\r\n $invalidProperties[] = sprintf(\r\n \"invalid value for 'taskMode', must be one of '%s'\",\r\n implode(\"', '\", $allowedValues)\r\n );\r\n }\r\n\r\n return $invalidProperties;\r\n }", "public static function checkConf()\n\t{\n\t\treturn array();\n\t}", "public static function checkConf()\n\t{\n\t\treturn array();\n\t}", "public function getMaintainedProjects()\n {\n return array(\n 'etiennemarais/lumen-starter-api' => 'https://github.com/etiennemarais/lumen-starter-api',\n 'laravel-notification-channels/clickatell' => 'https://github.com/laravel-notification-channels/clickatell',\n 'etiennemarais/hubot-yesnowtf' => 'https://github.com/etiennemarais/hubot-yesnowtf',\n );\n }", "function admin_index() {\n\t\t$user = $this->Auth->user('id');\n\t\t//get user's projects.\n\t\t$result = $this->Project->find('all', array(\n\t\t\t'recursive' => -1,\n\t\t\t'conditions' => array('AdminProject.user_id' => $user), \n\t\t\t'fields' => array('Project.id', 'Project.name'),\n\t\t\t'joins' => array(\n\t\t\t\tarray(\n\t\t\t\t\t\t'table' => 'admins_projects',\n\t\t\t\t\t\t'alias' => 'AdminProject',\n\t\t\t\t\t\t'type' => 'LEFT',\n\t\t\t\t\t\t'foreignKey' => false,\n\t\t\t\t\t\t'conditions'=> 'Project.id = AdminProject.project_id'\n\t\t\t\t)\n\t\t\t)\n\t\t));\n\t\t$list = Set::classicExtract($result,'{n}.Project.id');\n\t\t\n\t\t//set all other projects.\n\t\t$currProjects = $this->Project->find('all', array(\n\t\t\t'recursive' => -1,\n\t\t\t'conditions' => array(\n\t\t\t\t'Project.status <>' => PROJECT_ARCHIVE,\n\t\t\t\t'Project.id' => $list\t\t\t\t\n\t\t\t)\n\t\t));\n\t\t$projects = Set::combine($currProjects, '{n}.Project.id', '{n}.Project', '{n}.Project.status');\n\t\t\t\t\n\t\t//sort phase 1 projects by their modified date\n\t\tif(array_key_exists(PROJECT_SEED, $projects))\n\t\t\t$projects[PROJECT_SEED] = Set::sort(array_values($projects[PROJECT_SEED]), '{n}.modified', 'desc'); \n\t\t\t\n\t\t//sort phase 2 projects by their cut-off date\n\t\tif(array_key_exists(PROJECT_COLLECT, $projects))\n\t\t\t$projects[PROJECT_COLLECT] = Set::sort(array_values($projects[PROJECT_COLLECT]), '{n}.collection_end', 'asc');\n\t\t\t\n\t\t//sort phase 3 projects by their cut-off date\n\t\tif(array_key_exists(PROJECT_FEEDBACK, $projects))\n\t\t\t$projects[PROJECT_FEEDBACK] = Set::sort(array_values($projects[PROJECT_FEEDBACK]), '{n}.feedback_end', 'asc');\n\t\t\n\t\t//set archived projects.\n\t\t$this->Project->recursive = 0;\n\t\t$this->paginate['Project']['order'] = \"Project.feedback_end DESC\";\n\t\t$projects[PROJECT_ARCHIVE] = $this->paginate(array('Project.status' => PROJECT_ARCHIVE, 'Project.id' => $list));\n\t\t\n\t\t$this->set(compact('projects'));\n\t}", "public function listAll() : array\n {\n return \\Cache::remember('query_list_all_config', 60 * 60, function () {\n return $this->config->all()->pluck('value', 'name')->all();\n });\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['http_status_code'] === null) {\n $invalidProperties[] = \"'http_status_code' can't be null\";\n }\n if (($this->container['http_status_code'] > 599)) {\n $invalidProperties[] = \"invalid value for 'http_status_code', must be smaller than or equal to 599.\";\n }\n\n if (($this->container['http_status_code'] < 200)) {\n $invalidProperties[] = \"invalid value for 'http_status_code', must be bigger than or equal to 200.\";\n }\n\n if ($this->container['message'] === null) {\n $invalidProperties[] = \"'message' can't be null\";\n }\n if ($this->container['request_data'] === null) {\n $invalidProperties[] = \"'request_data' can't be null\";\n }\n if ($this->container['runtime'] === null) {\n $invalidProperties[] = \"'runtime' can't be null\";\n }\n if ($this->container['public_key_credential_request_options'] === null) {\n $invalidProperties[] = \"'public_key_credential_request_options' can't be null\";\n }\n if ($this->container['status'] === null) {\n $invalidProperties[] = \"'status' can't be null\";\n }\n $allowedValues = $this->getStatusAllowableValues();\n if (!is_null($this->container['status']) && !in_array($this->container['status'], $allowedValues, true)) {\n $invalidProperties[] = sprintf(\n \"invalid value '%s' for 'status', must be one of '%s'\",\n $this->container['status'],\n implode(\"', '\", $allowedValues)\n );\n }\n\n return $invalidProperties;\n }" ]
[ "0.6722513", "0.5504905", "0.53350157", "0.52022237", "0.5178261", "0.49790195", "0.49472752", "0.47796518", "0.4686594", "0.4643526", "0.46052107", "0.4591228", "0.45873624", "0.4557695", "0.4524556", "0.45164093", "0.44967884", "0.4488663", "0.44674298", "0.44586378", "0.4431005", "0.4423921", "0.44209892", "0.4416442", "0.43963835", "0.43871763", "0.43789434", "0.43751073", "0.43725982", "0.43678504", "0.43591407", "0.4352613", "0.43304077", "0.43285057", "0.43213448", "0.4304429", "0.42917377", "0.4286736", "0.42810297", "0.42764172", "0.42708978", "0.42701063", "0.42670023", "0.42622983", "0.42612702", "0.42556816", "0.42527357", "0.42479327", "0.42449", "0.42359203", "0.4235662", "0.423367", "0.4222153", "0.42220768", "0.4217217", "0.42166185", "0.4211634", "0.421012", "0.4207254", "0.42045307", "0.419361", "0.4189219", "0.4188586", "0.41853225", "0.41818655", "0.41763404", "0.41751423", "0.41739368", "0.4166176", "0.41658974", "0.41580397", "0.41566414", "0.4154721", "0.41525692", "0.4133897", "0.4133353", "0.41320068", "0.4129886", "0.41298652", "0.41264933", "0.412542", "0.4122838", "0.4122838", "0.4121163", "0.4120634", "0.41185597", "0.41175705", "0.4116866", "0.41092002", "0.41079223", "0.41078532", "0.41077203", "0.41075343", "0.4107492", "0.41025653", "0.41025653", "0.40956327", "0.40950188", "0.40903696", "0.40897867" ]
0.7945477
0
Updates an Uptime check configuration. You can either replace the entire configuration with a new one or replace only certain fields in the current configuration by specifying the fields to be updated via updateMask. Returns the updated configuration. (uptimeCheckConfigs.patch)
Обновляет конфигурацию проверки времени работы. Вы можете либо полностью заменить конфигурацию новой, либо обновить только определенные поля текущей конфигурации, указав поля для обновления через updateMask. Возвращает обновленную конфигурацию. (uptimeCheckConfigs.patch)
public function patch($name, UptimeCheckConfig $postBody, $optParams = []) { $params = ['name' => $name, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('patch', [$params], UptimeCheckConfig::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function UpdateUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\UpdateUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/UpdateUptimeCheckConfig',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig', 'decode'],\n $metadata, $options);\n }", "public function setUptimeCheckConfig($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig::class);\n $this->uptime_check_config = $var;\n\n return $this;\n }", "public function get($name, $optParams = [])\n {\n $params = ['name' => $name];\n $params = array_merge($params, $optParams);\n return $this->call('get', [$params], UptimeCheckConfig::class);\n }", "public function create($parent, UptimeCheckConfig $postBody, $optParams = [])\n {\n $params = ['parent' => $parent, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('create', [$params], UptimeCheckConfig::class);\n }", "public function listProjectsUptimeCheckConfigs($parent, $optParams = [])\n {\n $params = ['parent' => $parent];\n $params = array_merge($params, $optParams);\n return $this->call('list', [$params], ListUptimeCheckConfigsResponse::class);\n }", "public function getUptimeCheckConfig()\n {\n return $this->uptime_check_config;\n }", "public function ListUptimeCheckConfigs(\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckConfigsRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/ListUptimeCheckConfigs',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckConfigsResponse', 'decode'],\n $metadata, $options);\n }", "public function testUpdate(): void {\n $configObject = $this->configUpdateManager->getConfig();\n\n $this->configUpdateManager->update();\n foreach ($configObject->getTargetConfigFilepaths() as $filepath) {\n self::assertFileExists($filepath);\n }\n\n $targetConfigFilepath = $configObject->getTargetConfigFilepath(Config::TARGET_CONFIG_FILENAME);\n /**\n * @var array{\n * draft: array{\n * last_applied_update: int,\n * },\n * } $config\n */\n $config = $configObject->readAndParseConfigFromTheFile($targetConfigFilepath);\n self::assertSame(App::LAST_AVAILABLE_UPDATE_WEIGHT, $config['draft']['last_applied_update']);\n }", "public function updateFromConfig()\n {\n // Begin transation\n $this->pdo->beginTransaction();\n\n // Update tables\n foreach ($this->schema['update'] as $schema) {\n $sql = false;\n\n // validate table to update\n if (isset($this->tables[$schema['table']])) {\n $table = $this->tables[$schema['table']];\n $columns = $table->getColumns(false);\n if (isset($schema['drop'])) {\n $sql = $this->getDropColumn($table, $schema['drop']);\n } elseif (isset($schema['add'])) {\n $sql = $this->getAddColumn(\n $table, $schema['add'], $schema['type']\n );\n } elseif (isset($schema['modify'])) {\n $sql = $this->getModifyColumn(\n $table, $columns[$schema['modify']], $schema['type']\n );\n }\n }\n\n // Finally run query if exists\n if (!empty($sql)) {\n $this->pdo->exec($sql);\n }\n }\n\n // Commit changes\n $this->pdo->commit();\n }", "public function update_beamtime_config($config) {\n $this->connect();\n $old_config = $this->beamtime_config();\n foreach( $config as $param => $value ) {\n\n $param_trimmed = strtolower(trim($param));\n $param_escaped = $this->escape_string($param_trimmed);\n\n $value_escaped = '';\n\n switch($param_trimmed) {\n\n case 'min_gap_width_sec':\n if(!$value)\n throw new DataPortalException (\n __METHOD__,\n \"configuration parameter {$param_trimmed} must have a non-empty value\");\n $value_escaped = intval($value);\n break;\n\n case 'last_run_begin_time':\n if(!$value)\n throw new DataPortalException (\n __METHOD__,\n \"configuration parameter {$param_trimmed} must have a non-empty value\");\n $value_escaped = $value->to64();\n break;\n\n default:\n $value_escaped = is_null($value) ? \"NULL\" : \"'\".$this->escape_string(\"{$value}\").\"'\";\n break;\n }\n $this->query(\n array_key_exists($param_trimmed, $old_config) ?\n \"UPDATE beamtime_config SET value={$value_escaped} WHERE param='{$param_escaped}'\" :\n \"INSERT INTO beamtime_config VALUES('{$param_escaped}',{$value_escaped})\"\n );\n }\n }", "public function GetUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\GetUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/GetUptimeCheckConfig',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig', 'decode'],\n $metadata, $options);\n }", "public function update_beamtime_config($config) {\n $old_config = $this->beamtime_config();\n foreach( $config as $param => $value ) {\n\n $param_trimmed = strtolower(trim($param));\n $param_escaped = $this->escape_string($param_trimmed);\n\n $value_escaped = '';\n\n switch($param_trimmed) {\n\n case 'min_gap_width_sec':\n if(!$value)\n throw new DataPortalException (\n __METHOD__,\n \"configuration parameter {$param_trimmed} must have a non-empty value\");\n $value_escaped = intval($value);\n break;\n\n case 'last_run_begin_time':\n if(!$value)\n throw new DataPortalException (\n __METHOD__,\n \"configuration parameter {$param_trimmed} must have a non-empty value\");\n $value_escaped = $value->to64();\n break;\n\n default:\n $value_escaped = is_null($value) ? \"NULL\" : \"'\".$this->escape_string(\"{$value}\").\"'\";\n break;\n }\n $this->query(\n array_key_exists($param_trimmed, $old_config) ?\n \"UPDATE beamtime_config SET value={$value_escaped} WHERE param='{$param_escaped}'\" :\n \"INSERT INTO beamtime_config VALUES('{$param_escaped}',{$value_escaped})\"\n );\n }\n }", "public function DeleteUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\DeleteUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/DeleteUptimeCheckConfig',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "function crpTalk_admin_updateconfig()\n{\n\t// Security check\n\tif (!SecurityUtil :: checkPermission('crpTalk::', '::', ACCESS_ADMIN))\n\t{\n\t\treturn LogUtil :: registerPermissionError();\n\t}\n\n\t$talk= new crpTalk();\n\treturn $talk->updateConfig();\n}", "public function UpdateUserConfiguration($request)\n {\n return $this->makeRequest(__FUNCTION__, $request);\n }", "public function CreateUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\CreateUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/CreateUptimeCheckConfig',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig', 'decode'],\n $metadata, $options);\n }", "public function patchSystemConfiguration($request)\n {\n return $this->start()->uri(\"/api/system-configuration\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->patch()\n ->go();\n }", "public function updateSystemConfiguration($request)\n {\n return $this->start()->uri(\"/api/system-configuration\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->put()\n ->go();\n }", "public function updateUser(array $config = []);", "public function testUpdate() {\n $legacy_tour_config = $this->container->get('config.factory')->get('tour.tour.views-ui');\n $tips = $legacy_tour_config->get('tips');\n\n // Confirm the existing tour tip configurations match expectations.\n $this->assertFalse(isset($tips['views-ui-view-admin']['selector']));\n $this->assertEquals('views-display-extra-actions', $tips['views-ui-view-admin']['attributes']['data-id']);\n $this->assertEquals('views-ui-display-tab-bucket.format', $tips['views-ui-format']['attributes']['data-class']);\n $this->assertSame('left', $tips['views-ui-view-admin']['location']);\n $this->assertArrayNotHasKey('position', $tips['views-ui-view-admin']);\n\n $this->runUpdates();\n\n $updated_legacy_tour_config = $this->container->get('config.factory')->get('tour.tour.views-ui');\n $updated_tips = $updated_legacy_tour_config->get('tips');\n\n // Confirm that views-ui-view-admin uses `selector` instead of `data-id`.\n $this->assertSame('#views-display-extra-actions', $updated_tips['views-ui-view-admin']['selector']);\n\n // Confirm that views-ui-format uses `selector` instead of `data-class`.\n $this->assertSame('.views-ui-display-tab-bucket.format', $updated_tips['views-ui-format']['selector']);\n\n // Assert that the deprecated attributes key has been removed now that it is\n // empty.\n $this->assertArrayNotHasKey('attributes', $updated_tips['views-ui-view-admin']);\n\n $this->assertSame('left-start', $updated_tips['views-ui-view-admin']['position']);\n $this->assertArrayNotHasKey('location', $updated_tips['views-ui-view-admin']);\n }", "public function UpdateConfig($config = []) {\n\n $config = array_intersect_key($config, $this->\n config);\n\n $this->\n config = array_replace_recursive($this->\n config, $config);\n\n if (!is_int($this->\n config['expire'])) {\n\n $this->\n config['expire'] = intval($this->\n config['expire']);\n }\n\n $this->\n Upgrade();\n\n \\FluitoPHP\\Events\\Events::GetInstance()->\n Run('FluitoPHP.Authentication.GC', $this->\n database->\n Conn($this->\n GetConn())->\n Helper()->\n Select($this->\n GetPrefix() . 'usersalt', '*', array(\n array(\n 'column' => \"&DateAdd(last_access, {$this->\n config['expire']}, S)\",\n 'operator' => '<',\n 'rightcolumn' => '&CurrDTTM'\n )\n ))->\n GetResults(), $this->\n config);\n\n $this->\n database->\n Conn($this->\n GetConn())->\n Helper()->\n Delete($this->\n GetPrefix() . 'usersalt', array(\n array(\n 'column' => \"&DateAdd(last_access, {$this->\n config['expire']}, S)\",\n 'operator' => '<',\n 'rightcolumn' => '&CurrDTTM'\n )\n ))->\n Query();\n }", "public function updateSetupConfig($request)\n {\n $runtime = new RuntimeOptions([]);\n $headers = [];\n\n return $this->updateSetupConfigEx($request, $headers, $runtime);\n }", "public function ListUptimeCheckIps(\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckIpsRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/ListUptimeCheckIps',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckIpsResponse', 'decode'],\n $metadata, $options);\n }", "public function update($data = array (), $condition = array())\n {\n return DB::table('hawthorne_configuration')->where($condition)->update($data);\n }", "public function updateSettings(Request $request)\n {\n\n $configFilePath = dirname(__DIR__) . '/../../../build/configs/pirrot_default.conf';\n if (file_exists('/etc/pirrot.conf')) {\n $configFilePath = '/etc/pirrot.conf';\n }\n\n // Get setting values from the configuration file.\n $config = new ConfManagerService($configFilePath);\n $currentSettings = $config->read();\n $updateSettings = $request->json();\n $newSettings = [];\n foreach ($updateSettings as $setting) {\n $newSettings[$setting['name']] = $setting['value'];\n }\n\n // Set all \"boolean\" type config items to \"false\" if the checkbox is not checked.\n $falseBooleanValues = array_diff_key($currentSettings, $newSettings);\n foreach ($falseBooleanValues as $key => $value) {\n // Ignore settings that are on the \"blacklist\"/ignored list (to prevent them being overwritten with \"false\")\n if (!in_array($key, $this->ignoredSettings)) {\n $newSettings[$key] = \"false\"; // Yes, really set this to a string and NOT a boolean type (as we're witting it to a text file)\n }\n }\n $updatedConfig = $config->update($newSettings);\n\n // Get the current request URL so we can manipulate it for the auto-refresh after the service has been restarted.\n $url = parse_url(request()->root());\n $response =\n [\n 'check_url' => $url['scheme'] . \"://\" . $url['host'] . ':' . $newSettings['web_interface_port'] . '/up',\n 'after_url' => $url['scheme'] . \"://\" . $url['host'] . ':' . $newSettings['web_interface_port'] . '/settings',\n ];\n\n // We will only write the new configuration file and attempt to restart the Pirrot daemon ONLY if it's actually running on a RPi.\n if (env('APP_ENV') !== 'production') {\n $response =\n [\n 'check_url' => request()->root() . '/up',\n 'after_url' => request()->root() . '/settings',\n ];\n return response($response, 200);\n }\n\n // Backup the old configuration file and then write the new file...\n system(\"cp \" . $configFilePath . \" /opt/pirrot/storage/backups/pirrot-\" . date(\"dmYHis\") . \".conf\");\n file_put_contents('/etc/pirrot.conf', $updatedConfig);\n\n // Trigger a daemon restart (after two seconds to give us enough time to respond to the HTTP request)\n system('sudo /opt/pirrot/web/resources/scripts/restart-pirrot.sh > /dev/null &');\n\n return response($response, 200);\n }", "public function patch($name, Configuration $postBody, $optParams = [])\n {\n $params = ['name' => $name, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('patch', [$params], Configuration::class);\n }", "public function batchUpdateConfigs()\n {\n foreach ($this->fields_form as $k => $f) {\n foreach ($f['form']['input'] as $i => $input) {\n $input['name'] = str_replace(array('[]'), array(''), $input['name']);\n\n if (isset($input['ignore']) && $input['ignore'] == true) {\n continue;\n }\n\n if (isset($input['lang']) && $input['lang'] == true) {\n $data = array();\n foreach (Language::getLanguages(false) as $lang) {\n $val = Tools::getValue($input['name'].'_'.$lang['id_lang'], $input['default']);\n $data[$lang['id_lang']] = $val;\n }\n\n if (isset($input['callback']) && method_exists($this, $input['callback'])) {\n $data[$lang['id_lang']] = $this->{$input['callback']}($data[$lang['id_lang']]);\n }\n\n Configuration::updateValue(trim($input['name']), $data, true);\n } else {\n $val = Tools::getValue($input['name'], $input['default']);\n if (isset($input['callback']) && method_exists($this, $input['callback'])) {\n $val = $this->{$input['callback']}($val);\n }\n Configuration::updateValue($input['name'], $val, true);\n }\n }\n }\n\n $this->batchUpdateCustomConfigs();\n\n return true;\n }", "public function UpdateMuteConfig(\\Google\\Cloud\\SecurityCenter\\V1\\UpdateMuteConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/UpdateMuteConfig',\n $argument,\n ['\\Google\\Cloud\\SecurityCenter\\V1\\MuteConfig', 'decode'],\n $metadata, $options);\n }", "public static function updateConfigBy($data, $params) {\n\t\tif (!is_array($data)) return false;\n if (!is_array($params)) return false; \n $data['update_time'] = Common::getTime();\n\t\t$data = self::_cookData($data);\n\t\treturn self::_getDao()->updateBy($data, $params);\n\t}", "abstract protected function _updateConfiguration();", "public function setUpdateMask($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\FieldMask::class);\n $this->update_mask = $var;\n\n return $this;\n }", "public function setUpdateMask($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\FieldMask::class);\n $this->update_mask = $var;\n\n return $this;\n }", "public function setUpdateMask($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\FieldMask::class);\n $this->update_mask = $var;\n\n return $this;\n }", "public function setUpdateMask($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\FieldMask::class);\n $this->update_mask = $var;\n\n return $this;\n }", "public function setUpdateMask($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\FieldMask::class);\n $this->update_mask = $var;\n\n return $this;\n }", "public function setUpdateMask($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\FieldMask::class);\n $this->update_mask = $var;\n\n return $this;\n }", "public function setUpdateMask($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\FieldMask::class);\n $this->update_mask = $var;\n\n return $this;\n }", "public function setUpdateMask($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\FieldMask::class);\n $this->update_mask = $var;\n\n return $this;\n }", "public function setUpdateMask($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\FieldMask::class);\n $this->update_mask = $var;\n\n return $this;\n }", "public function action_update_check()\n\t{\n\t\tUpdate::add( 'StatusNet', '8676A858-E4B1-11DD-9968-131C56D89593', $this->info->version );\n\t}", "private function upgradeConfig(): void\n\t{\n\t\tDB::table('configs')\n\t\t\t->where('key', '=', 'sorting_Photos_col')\n\t\t\t->update(['type_range' => 'created_at|taken_at|title|description|is_public|is_starred|type']);\n\t\tDB::table('configs')\n\t\t\t->where('key', '=', 'sorting_Photos_col')\n\t\t\t->where('value', '=', 'id')\n\t\t\t->update(['value' => 'created_at']);\n\t\tDB::table('configs')\n\t\t\t->where('key', '=', 'sorting_Photos_col')\n\t\t\t->where('value', '=', 'public')\n\t\t\t->update(['value' => 'is_public']);\n\t\tDB::table('configs')\n\t\t\t->where('key', '=', 'sorting_Photos_col')\n\t\t\t->where('value', '=', 'star')\n\t\t\t->update(['value' => 'is_starred']);\n\t\tDB::table('configs')\n\t\t\t->where('key', '=', 'sorting_Albums_col')\n\t\t\t->update(['type_range' => 'created_at|title|description|is_public|max_taken_at|min_taken_at']);\n\t\tDB::table('configs')\n\t\t\t->where('key', '=', 'sorting_Albums_col')\n\t\t\t->where('value', '=', 'id')\n\t\t\t->update(['value' => 'created_at']);\n\t\tDB::table('configs')\n\t\t\t->where('key', '=', 'sorting_Albums_col')\n\t\t\t->where('value', '=', 'public')\n\t\t\t->update(['value' => 'is_public']);\n\t\tDB::table('configs')\n\t\t\t->insert([\n\t\t\t\t'key' => 'legacy_id_redirection',\n\t\t\t\t'value' => '1',\n\t\t\t\t'cat' => 'config',\n\t\t\t\t'confidentiality' => 0,\n\t\t\t\t'type_range' => '0|1',\n\t\t\t\t'description' => 'Enables/disables the redirection support for legacy IDs',\n\t\t\t]);\n\t}", "public static function update_all($config)\n\t{\n\t\treturn self::new_instance_records()->update_all($config);\n\t}", "public static function check_for_updates() {\n global $wpdb;\n\n $current_version = get_option('h5p_version');\n if ($current_version === self::VERSION) {\n return; // Same version as before\n }\n\n // We have a new version!\n if (!$current_version) {\n // Never installed before\n $current_version = '0.0.0';\n }\n\n // Split version number\n $v = self::split_version($current_version);\n\n $between_1710_1713 = ($v->major === 1 && $v->minor === 7 && $v->patch >= 10 && $v->patch <= 13); // Target 1.7.10, 1.7.11, 1.7.12, 1.7.13\n if ($between_1710_1713) {\n // Fix tmpfiles table manually :-)\n $wpdb->query(\"ALTER TABLE {$wpdb->prefix}h5p_tmpfiles ADD COLUMN id INT UNSIGNED NOT NULL AUTO_INCREMENT FIRST, DROP PRIMARY KEY, ADD PRIMARY KEY(id)\");\n }\n\n // Check and update database\n self::update_database();\n\n $pre_120 = ($v->major < 1 || ($v->major === 1 && $v->minor < 2)); // < 1.2.0\n $pre_180 = ($v->major < 1 || ($v->major === 1 && $v->minor < 8)); // < 1.8.0\n $pre_1102 = ($v->major < 1 || ($v->major === 1 && $v->minor < 10) ||\n ($v->major === 1 && $v->minor === 10 && $v->patch < 2)); // < 1.10.2\n $pre_1110 = ($v->major < 1 || ($v->major === 1 && $v->minor < 11)); // < 1.11.0\n $pre_1113 = ($v->major < 1 || ($v->major === 1 && $v->minor < 11) ||\n ($v->major === 1 && $v->minor === 11 && $v->patch < 3)); // < 1.11.3\n $pre_1150 = ($v->major < 1 || ($v->major === 1 && $v->minor < 15)); // < 1.15.0\n\n // Run version specific updates\n if ($pre_120) {\n // Re-assign all permissions\n self::upgrade_120();\n }\n else {\n // Do not run if upgrade_120 runs (since that remaps all the permissions)\n if ($pre_180) {\n // Does only add new permissions\n self::upgrade_180();\n }\n if ($pre_1150) {\n // Does only add new permissions\n self::upgrade_1150();\n }\n }\n\n if ($pre_180) {\n // Force requirements check when hub is introduced.\n update_option('h5p_check_h5p_requirements', TRUE);\n }\n\n if ($pre_1102 && $current_version !== '0.0.0') {\n update_option('h5p_has_request_user_consent', TRUE);\n }\n\n if ($pre_1110) {\n // Remove unused columns\n self::drop_column(\"{$wpdb->prefix}h5p_contents\", 'author');\n self::drop_column(\"{$wpdb->prefix}h5p_contents\", 'keywords');\n self::drop_column(\"{$wpdb->prefix}h5p_contents\", 'description');\n }\n\n if ($pre_1113 && !$pre_1110) { // 1.11.0, 1.11.1 or 1.11.2\n // There are no tmpfiles in content folders, cleanup\n $wpdb->query($wpdb->prepare(\n \"DELETE FROM {$wpdb->prefix}h5p_tmpfiles\n WHERE path LIKE '%s'\",\n \"%/h5p/content/%\"));\n }\n\n // Keep track of which version of the plugin we have.\n if ($current_version === '0.0.0') {\n add_option('h5p_version', self::VERSION);\n }\n else {\n update_option('h5p_version', self::VERSION);\n }\n }", "function check_update( $_, $assoc_args ) {\n\t\tself::run( 'core check-update', $_, $assoc_args );\n\t}", "public function update(Request $request)\n {\n $rules = [];\n if(count((array) $request->centers) > 0){\n foreach ($request->centers as $key => $value) {\n if ($request->filled('centers.'.$key.'.emails')) {\n $rules['centers.'.$key.'.emails'] = [\n function($attribute, $value, $fail){\n $values = explode(',', $value);\n foreach($values as $email){\n if(!filter_var($email, FILTER_VALIDATE_EMAIL)){\n $fail('Email to receive notifications contains invalid email addresses.');\n }\n }\n }\n ];\n }\n }\n }\n if(count((array) $request->centers) > 0){\n foreach ($request->centers as $key => $value) {\n if ($request->filled('centers.'.$key.'.mobiles')) {\n $rules['centers.'.$key.'.mobiles'] = [\n function($attribute, $value, $fail){\n $values = explode(',', $value);\n foreach($values as $mobile){\n if(!preg_match('/(09)[0-9]{9}$|(\\+63)[0-9]{10}$/', $mobile)){\n $fail('Mobile to receive notifications contains invalid mobile numbers.');\n }\n }\n }\n ];\n }\n }\n }\n $data = $request->validate($rules);\n\n if(count((array) $request->centers) > 0){\n foreach($request->centers as $key => $value){\n $center = ServiceCategory::find($key);\n if($center){\n $center->email_to_receive_notifications = $value['emails'];\n $center->mobile_to_receive_notifications = $value['mobiles'];\n $center->save();\n }\n }\n }\n\n return redirect()->back()\n ->with('success', 'Successfully updated settings!');\n }", "private function checkUpdate() {\n\n $doupdate = false;\n\n foreach(array_values($this->checkUpdateVersion) AS $package) {\n $match = explode(':', $package);\n // always set and extract if not match\n if ($this->get_config('last_'.$match[0].'_version') == $match[1]) {\n $doupdate = false;\n } else {\n $this->set_config('last_'.$match[0].'_version', $match[1]);\n $doupdate = true;\n break; // this is possibly needed to force install upgrade routines\n }\n }\n\n return $doupdate ? true : false;\n }", "function _update_config($new_values = array(), $remove_values = array())\n\t{\n\t\tif ( ! is_array($new_values) && count($remove_values) == 0)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\t// Is the config file writable?\n\t\tif ( ! is_really_writable($this->config_path))\n\t\t{\n\t\t\tshow_error(lang('unwritable_config_file'), 503);\n\t\t}\n\n\t\t// Read the config file as PHP\n\t\trequire $this->config_path;\n\n\t\t// Read the config data as a string\n\t\t// Really no point in loading file_helper to do this one\n\t\t$config_file = file_get_contents($this->config_path);\n\n\t\t// Trim it\n\t\t$config_file = trim($config_file);\n\n\t\t// Remove values if needed\n\t\tif (count($remove_values) > 0)\n\t\t{\n\t\t\tforeach ($remove_values as $key => $val)\n\t\t\t{\n\t\t\t\t$config_file = preg_replace(\n\t\t\t\t\t'#\\$'.\"config\\[(\\042|\\047)\".$key.\"\\\\1\\].*?;\\n#is\",\n\t\t\t\t\t\"\",\n\t\t\t\t\t$config_file\n\t\t\t\t);\n\t\t\t\tunset($config[$key]);\n\t\t\t}\n\t\t}\n\n\t\t// Cycle through the newconfig array and swap out the data\n\t\t$to_be_added = array();\n\t\tif (is_array($new_values))\n\t\t{\n\t\t\tforeach ($new_values as $key => $val)\n\t\t\t{\n\t\t\t\tif (is_array($val))\n\t\t\t\t{\n\t\t\t\t\t$val = var_export($val, TRUE);\n\t\t\t\t}\n\t\t\t\telseif (is_bool($val))\n\t\t\t\t{\n\t\t\t\t\t$val = ($val == TRUE) ? 'TRUE' : 'FALSE';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$val = str_replace(\"\\\\\\\"\", \"\\\"\", $val);\n\t\t\t\t\t$val = str_replace(\"\\\\'\", \"'\", $val);\n\t\t\t\t\t$val = str_replace('\\\\\\\\', '\\\\', $val);\n\n\t\t\t\t\t$val = str_replace('\\\\', '\\\\\\\\', $val);\n\t\t\t\t\t$val = str_replace(\"'\", \"\\\\'\", $val);\n\t\t\t\t\t$val = str_replace(\"\\\"\", \"\\\\\\\"\", $val);\n\t\t\t\t}\n\n\t\t\t\t// Are we adding a brand new item to the config file?\n\t\t\t\tif ( ! isset($config[$key]))\n\t\t\t\t{\n\t\t\t\t\t$to_be_added[$key] = $val;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$base_regex = '#(\\$config\\[(\\042|\\047)'.$key.'\\\\2\\]\\s*=\\s*)';\n\n\t\t\t\t\t// Here we need to determine which regex to use for matching\n\t\t\t\t\t// the config varable's value; if we're replacing an array,\n\t\t\t\t\t// use regex that spans multiple lines until hitting a\n\t\t\t\t\t// semicolon\n\t\t\t\t\tif (is_array($new_values[$key]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$config_file = preg_replace(\n\t\t\t\t\t\t\t$base_regex.'(.*?;)#s',\n\t\t\t\t\t\t\t\"\\${1}{$val};\",\n\t\t\t\t\t\t\t$config_file\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\telse // Otherwise, use the one-liner match\n\t\t\t\t\t{\n\t\t\t\t\t\t$config_file = preg_replace(\n\t\t\t\t\t\t\t$base_regex.'((\\042|\\047)[^\\\\4]*?\\\\4);#',\n\t\t\t\t\t\t\t\"\\${1}\\${4}{$val}\\${4};\",\n\t\t\t\t\t\t\t$config_file\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$this->config[$key] = $val;\n\t\t\t}\n\t\t}\n\n\t\t// Do we need to add totally new items to the config file?\n\t\tif (count($to_be_added) > 0)\n\t\t{\n\t\t\t// First we will determine the newline character used in the file\n\t\t\t// so we can use the same one\n\t\t\t$newline = (preg_match(\"#(\\r\\n|\\r|\\n)#\", $config_file, $match)) ? $match[1] : \"\\n\";\n\n\t\t\t$new_data = '';\n\t\t\tforeach ($to_be_added as $key => $val)\n\t\t\t{\n\t\t\t\tif (is_array($new_values[$key]))\n\t\t\t\t{\n\t\t\t\t\t$new_data .= \"\\$config['\".$key.\"'] = \".$val.\";\".$newline;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$new_data .= \"\\$config['\".$key.\"'] = '\".$val.\"';\".$newline;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// First we look for our comment marker in the config file. If found, we'll swap\n\t\t\t// it out with the new config data\n\t\t\tif (preg_match(\"#.*// END EE config items.*#i\", $config_file))\n\t\t\t{\n\t\t\t\t$new_data .= $newline.'// END EE config items'.$newline;\n\n\t\t\t\t$config_file = preg_replace(\"#\\n.*// END EE config items.*#i\", $new_data, $config_file);\n\t\t\t}\n\t\t\t// If we didn't find the marker we'll remove the opening PHP line and\n\t\t\t// add the new config data to the top of the file\n\t\t\telseif (preg_match(\"#<\\?php.*#i\", $config_file, $match))\n\t\t\t{\n\t\t\t\t// Remove the opening PHP line\n\t\t\t\t$config_file = str_replace($match[0], '', $config_file);\n\n\t\t\t\t// Trim it\n\t\t\t\t$config_file = trim($config_file);\n\n\t\t\t\t// Add the new data string along with the opening PHP we removed\n\t\t\t\t$config_file = $match[0].$newline.$newline.$new_data.$config_file;\n\t\t\t}\n\t\t\t// If that didn't work we'll add the new config data to the bottom of the file\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Remove the closing PHP tag\n\t\t\t\t$config_file = preg_replace(\"#\\?>$#\", \"\", $config_file);\n\n\t\t\t\t$config_file = trim($config_file);\n\n\t\t\t\t// Add the new data string\n\t\t\t\t$config_file .= $newline.$newline.$new_data.$newline;\n\n\t\t\t\t// Add the closing PHP tag back\n\t\t\t\t$config_file .= '?>';\n\t\t\t}\n\t\t}\n\n\t\tif ( ! $fp = fopen($this->config_path, FOPEN_WRITE_CREATE_DESTRUCTIVE))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\tflock($fp, LOCK_EX);\n\t\tfwrite($fp, $config_file, strlen($config_file));\n\t\tflock($fp, LOCK_UN);\n\t\tfclose($fp);\n\n\t\tif ( ! empty($this->_config_path_errors))\n\t\t{\n\t\t\treturn $this->_config_path_errors;\n\t\t}\n\n\t\t$this->clear_opcache($this->config_path);\n\t\treturn TRUE;\n\t}", "public function update($args = null) {\n\t\tglobal $config;\n\t\t\n\t\t$updates = array();\n\t\tforeach($args as $key => $val){\n\t\t\tif($this->data[$key] != $val){\n\t\t\t\tif(!get_magic_quotes_gpc()){\n\t\t\t\t\tif(is_string($val))\n\t\t\t\t\t\t$val = $config['database']->real_escape_string($val);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$updates[$key] = $val;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$count = 0;\n\t\t$len = count($updates);\n\t\tforeach($updates as $key => $val){\n\t\t\t$count++;\n\t\t\tif($key == 'options')\n\t\t\t\t$val = json_encode($val);\n\t\t\n\t\t\tif($count != $len){\n\t\t\t\tif(is_int($val) || is_float($val)) $values .= $key.' = '.$val.', ';\n\t\t\t\telseif(is_string($val)) $values .= $key.\" = '\".$val.\"', \";\n\t\t\t}else{\n\t\t\t\tif(is_int($val) || is_float($val)) $values .= $key.' = '.$val;\n\t\t\t\telseif(is_string($val)) $values .= $key.\" = '\".$val.\"'\";\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!empty($updates)){\n\t\t\t$result = $config['database']->query(\"\n\t\t\t\tUPDATE nuusers\n\t\t\t\tSET $values\n\t\t\t\tWHERE id = {$this->data['id']}\n\t\t\t\tLIMIT 1\n\t\t\t\");\n\t\t\t\n\t\t\tif($result){\n\t\t\t\tforeach($updates as $key => $val){\n\t\t\t\t\t$this->data[$key] = $val;\n\t\t\t\t\tif($key == 'level_pts'){\n\t\t\t\t\t\t$this->data['level'] = $this->loadLevel();\n\t\t\t\t\t\t$this->data['levelProgress'] = $this->loadLevelProgress();\n\t\t\t\t\t\t$this->data['rank'] = $this->loadRank();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $result;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t}", "public function update(Request $request)\n {\n $this->validate($request, [\n 'admission_open_date' => 'required|date_format:Y-m-d',\n 'admission_close_date' => 'required|date_format:Y-m-d',\n 'current_session' => 'required|regex:/\\d{4}\\/\\d{4}/',\n 'late_payment_fee' => 'required|numeric',\n 'admission_payment_fee' => 'required|numeric',\n 'acceptance_payment_fee' => 'required|numeric',\n ]);\n\n foreach ($request->post() as $name => $value) {\n SystemSetting::where('name', $name)->update(['value' => $value]);\n }\n\n return redirect()->route('settings.index')->with('success', 'Settings updated');\n }", "private function downgradeConfig(): void\n\t{\n\t\tDB::table('configs')\n\t\t\t->where('key', '=', 'sorting_Photos_col')\n\t\t\t->update(['type_range' => 'id|taken_at|title|description|public|star|type']);\n\t\tDB::table('configs')\n\t\t\t->where('key', '=', 'sorting_Photos_col')\n\t\t\t->where('value', '=', 'created_at')\n\t\t\t->update(['value' => 'id']);\n\t\tDB::table('configs')\n\t\t\t->where('key', '=', 'sorting_Photos_col')\n\t\t\t->where('value', '=', 'is_public')\n\t\t\t->update(['value' => 'public']);\n\t\tDB::table('configs')\n\t\t\t->where('key', '=', 'sorting_Photos_col')\n\t\t\t->where('value', '=', 'is_starred')\n\t\t\t->update(['value' => 'star']);\n\t\tDB::table('configs')\n\t\t\t->where('key', '=', 'sorting_Albums_col')\n\t\t\t->update(['type_range' => 'id|title|description|public|max_taken_at|min_taken_at']);\n\t\tDB::table('configs')\n\t\t\t->where('key', '=', 'sorting_Albums_col')\n\t\t\t->where('value', '=', 'created_at')\n\t\t\t->update(['value' => 'id']);\n\t\tDB::table('configs')\n\t\t\t->where('key', '=', 'sorting_Albums_col')\n\t\t\t->where('value', '=', 'is_public')\n\t\t\t->update(['value' => 'public']);\n\t\tDB::table('configs')\n\t\t\t->where('key', '=', 'legacy_id_redirection')\n\t\t\t->delete();\n\t}", "static function updatePaperConfig($PaperConfig = null)\r\n {\r\n if ($PaperConfig === null)\r\n {\r\n return false;\r\n }\r\n\r\n $tablePaperConfig = DatabaseManager::getNameTable('TABLE_PAPER_CONFIG');\r\n\r\n $id = $PaperConfig->getId();\r\n\r\n $baptismCertX = $PaperConfig->getBaptismCertX();\r\n $baptismCertY = $PaperConfig->getBaptismCertY();\r\n $copyBaptismCertX = $PaperConfig->getCopyBaptismCertX();\r\n $copyBaptismCertY = $PaperConfig->getCopyBaptismCertY();\r\n \r\n $communionCertX = $PaperConfig->getCommunionCertX();\r\n $communionCertY = $PaperConfig->getCommunionCertY();\r\n $copyCommunionCertX = $PaperConfig->getCopyCommunionCertX();\r\n $copyCommunionCertY = $PaperConfig->getCopyCommunionCertY();\r\n \r\n $confirmationCertX = $PaperConfig->getConfirmationCertX();\r\n $confirmationCertY = $PaperConfig->getConfirmationCertY();\r\n $copyConfirmationCertX= $PaperConfig->getCopyConfirmationCertX();\r\n $copyConfirmationCertY= $PaperConfig->getCopyConfirmationCertY();\r\n\r\n $marriageCertX = $PaperConfig->getMarriageCertX();\r\n $marriageCertY = $PaperConfig->getMarriageCertY();\r\n $marriageConstancyX = $PaperConfig->getMarriageConstancyX();\r\n $marriageConstancyY = $PaperConfig->getMarriageConstancyY();\r\n $marriageNoticeX = $PaperConfig->getMarriageNoticeX();\r\n $marriageNoticeY = $PaperConfig->getMarriageNoticeY();\r\n $marriageExhortX = $PaperConfig->getMarriageExhortX();\r\n $marriageExhortY = $PaperConfig->getMarriageExhortY(); \r\n $marriageTraslationX = $PaperConfig->getMarriageTraslationX();\r\n $marriageTraslationY = $PaperConfig->getMarriageTraslationY();\r\n\r\n $query = \"UPDATE $tablePaperConfig\r\n SET baptismCertX = $baptismCertX, \r\n baptismCertY = $baptismCertY, \r\n copyBaptismCertX = $copyBaptismCertX, \r\n copyBaptismCertY = $copyBaptismCertY,\r\n communionCertX = $communionCertX,\r\n communionCertY = $communionCertY,\r\n copyCommunionCertX = $copyCommunionCertX,\r\n copyCommunionCertY = $copyCommunionCertY,\r\n confirmationCertX = $confirmationCertX,\r\n confirmationCertY = $confirmationCertY,\r\n copyConfirmationCertX = $copyConfirmationCertX,\r\n copyConfirmationCertY = $copyConfirmationCertY,\r\n marriageCertX = $marriageCertX,\r\n marriageCertY = $marriageCertY,\r\n marriageConstancyX = $marriageConstancyX,\r\n marriageConstancyY = $marriageConstancyY,\r\n marriageNoticeX = $marriageNoticeX,\r\n marriageNoticeY = $marriageNoticeY,\r\n marriageExhortX = $marriageExhortX,\r\n marriageExhortY = $marriageExhortY,\r\n marriageTraslationX = $marriageTraslationX,\r\n marriageTraslationY = $marriageTraslationY\r\n WHERE $tablePaperConfig.id = $id\";\r\n\r\n return DatabaseManager::singleAffectedRow($query);\r\n }", "public function update(Request $request)\n {\n\n var_dump($request);\n config('app.name', 'TestName');\n // $request->validate([\n // 'siteName' => 'required',\n // 'siteDescription' => 'required',\n // 'adminEmail' => 'required|email',\n // 'titleTag' => 'required',\n // 'allowLogin' => 'required|boolean',\n // 'allowRegistration' => 'required|boolean',\n // 'maintenanceMode' => 'required|boolean'\n // ]);\n // Configuration::whereId(1)->update([\n // 'siteName' => $request->name,\n // 'siteDescription' => $request->email,\n // 'titleTag' => $request->titleTag,\n // 'allowLogin' => $request->allowLogin,\n // 'allowRegistration' => $request->allowRegistration,\n // 'maintenanceMode' => $request->maintenanceMode,\n // 'adminEmail' => $request->adminEmail,\n // ]);\n }", "function Admin_Messages_admin_updateconfig()\n{\n // Security check - important to do this as early as possible to avoid\n // potential security holes or just too much wasted processing\n if (!pnSecAuthAction(0, 'Admin_Messages::', '::', ACCESS_ADMIN)) {\n return pnVarPrepHTMLDisplay(_MODULENOAUTH);\n }\n\n // Get parameters from whatever input we need. All arguments to this\n // function should be obtained from pnVarCleanFromInput(), getting them\n // from other places such as the environment is not allowed, as that makes\n // assumptions that will not hold in future versions of PostNuke\n $itemsperpage = pnVarCleanFromInput('itemsperpage');\n\n // Confirm authorisation code. This checks that the form had a valid\n // authorisation code attached to it. If it did not then the function will\n // proceed no further as it is possible that this is an attempt at sending\n // in false data to the system\n if (!pnSecConfirmAuthKey()) {\n pnSessionSetVar('errormsg', _BADAUTHKEY);\n pnRedirect(pnModURL('Admin_Messages', 'admin', 'view'));\n return true;\n }\n\n // Update module variables. Note that depending on the HTML structure used\n // to obtain the information from the user it is possible that the values\n // might be unset, so it is important to check them all and assign them\n // default values if required\n if (empty($itemsperpage)) {\n $itemsperpage = 10;\n }\n pnModSetVar('Admin_Messages', 'itemsperpage', $itemsperpage);\n\n // Let any other modules know that the modules configuration has been updated\n pnModCallHooks('module','updateconfig','Admin_Messages', array('module' => 'Admin_Messages'));\n\n\t// the module configuration has been updated successfuly\n\tpnSessionSetVar('statusmsg', _CONFIGUPDATED);\n\n // This function generated no output, and so now it is complete we redirect\n // the user to an appropriate page for them to carry on their work\n pnRedirect(pnModURL('Admin_Messages', 'admin', 'view'));\n\n // Return\n return true;\n}", "public function UpdateNotificationConfig(\\Google\\Cloud\\SecurityCenter\\V1\\UpdateNotificationConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/UpdateNotificationConfig',\n $argument,\n ['\\Google\\Cloud\\SecurityCenter\\V1\\NotificationConfig', 'decode'],\n $metadata, $options);\n }", "function updateConfig($settings) {\n try {\n global $db_table_prefix;\n\n $results = array();\n\n $db = pdoConnect();\n\n $query = \"UPDATE \".$db_table_prefix.\"configuration\n SET\n value = :value\n WHERE\n name = :name\";\n\n $stmt = $db->prepare($query);\n\n foreach ($settings as $name => $value){\n $sqlVars = array(':name' => $name, ':value' => $value);\n $stmt->execute($sqlVars);\n }\n\n return true;\n\n } catch (PDOException $e) {\n addAlert(\"danger\", \"Oops, looks like our database encountered an error.\");\n error_log(\"Error in \" . $e->getFile() . \" on line \" . $e->getLine() . \": \" . $e->getMessage());\n return false;\n } catch (ErrorException $e) {\n addAlert(\"danger\", \"Oops, looks like our server might have goofed. If you're an admin, please check the PHP error logs.\");\n return false;\n }\n}", "public function updateSettings(User $user, array $data);", "public function action_update_check()\n\t{\n\t\tUpdate::add( $this->info->name, '9bfb17aa-f8f0-4638-a549-af4f86a9d412', $this->info->version );\n\t}", "private function set_to_be_updated()\n {\n if ( !$this->presence_in_db ){\n $this->to_be_updated = true;\n return;\n }\n $orig_db_check = ($this->value === $this->new_value) ? false : true;\n\n $wle_definition = $this->get_wpconfig_by_name();\n $pattern = $this->build_wle_pattern_by_name();\n\n preg_match($pattern, $wle_definition, $matches);\n\n if ( !$orig_db_check && !empty($matches[1]) ) {\n $this->to_be_updated = ($this->value === $matches[1]) ? false : true;\n }\n else {\n $this->to_be_updated = $orig_db_check;\n }\n }", "public function updateSetupConfigEx($request, $headers, $runtime)\n {\n Utils::validateModel($request);\n\n return UpdateSetupConfigResponse::fromMap($this->doRequest('1.0', 'antcloud.monitor.setup.config.update', 'HTTPS', 'POST', '/gateway.do', Tea::merge($request), $headers, $runtime));\n }", "private function _uptime()\n {\n if (CommonFunctions::executeProgram('uptime', '', $buf)) {\n if (preg_match(\"/up (\\d+) days,\\s*(\\d+):(\\d+),/\", $buf, $ar_buf) || preg_match(\"/up (\\d+) day,\\s*(\\d+):(\\d+),/\", $buf, $ar_buf)) {\n $min = $ar_buf[3];\n $hours = $ar_buf[2];\n $days = $ar_buf[1];\n $this->sys->setUptime($days * 86400 + $hours * 3600 + $min * 60);\n }\n }\n }", "public function update($data)\n\t{\n\t\tforeach($data as $key=>$value)\n\t\t{\n\t\t\t$result['flag']=$this->where(array('key'=>$key))->save(array(\n\t\t\t\t'value'=>$value,\n\t\t\t));\n\t\t\tif(!$result['flag'])\n\t\t\t{\n\t\t\t\t$result['message']='修改配置失败';\n\t\t\t\treturn $result;\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "function updateConfig() {\n global $db;\n global $lang;\n\n if(configEnabled() == true) {\n if($res = $db->query(\"INSERT IGNORE INTO `\".$lang[\"config_db_name\"].\"`.`\".$lang[\"config_table_name\"].\"` (`id`, `key`, `val`) VALUES \".getKeys())) {\n return \"Updated\";\n } else {\n return \"Cannot insert rows. Error: \".$db->error;\n }\n } else {\n return \"Config never been initialized\";\n }\n }", "protected function updateConfig() {\n $config_factory = \\Drupal::configFactory();\n $settings = $config_factory->getEditable('message_subscribe.settings');\n $settings->set('use_queue', TRUE);\n $settings->save(TRUE);\n\n $settings = $config_factory->getEditable('mailsystem.settings');\n $settings->set('defaults', [\n 'sender' => 'swiftmailer',\n 'formatter' => 'swiftmailer',\n ]);\n $settings->set('modules', [\n 'swiftmailer' => [\n 'none' => [\n 'formatter' => 'swiftmailer',\n 'sender' => 'swiftmailer',\n ],\n ],\n 'message_notify' => [\n 'none' => [\n 'formatter' => 'swiftmailer',\n 'sender' => 'swiftmailer',\n ],\n ],\n ]);\n $settings->save(TRUE);\n\n $settings = $config_factory->getEditable('swiftmailer.message');\n $settings->set('format', 'text/html');\n $settings->set('respect_format', FALSE);\n $settings->save(TRUE);\n\n $settings = $config_factory->getEditable('flag.flag.subscribe_node');\n $settings->set('status', TRUE);\n $settings->save(TRUE);\n\n $settings = $config_factory->getEditable('user.role.authenticated');\n $permissions = $settings->get('permissions');\n foreach ([\n 'flag subscribe_node',\n 'unflag subscribe_node',\n ] as $perm) {\n if (!in_array($perm, $permissions)) {\n $permissions[] = $perm;\n }\n }\n $settings->set('permissions', $permissions);\n $settings->save(TRUE);\n\n }", "public function updateUsersSettings(Request $request)\n {\n $err = array();\n $this->validate($request, [\n 'users_paginate' => 'required|numeric|min:1',\n 'default_user_status' => 'required',\n 'allows_registration' => 'required',\n 'allow_reset_password' => 'required',\n 'allow_remember' => 'required'\n ]);\n $set_names = [\n 'paginate'=>'users_paginate',\n 'default_groups'=>'group_selection',\n 'default_user_status'=>'default_user_status',\n 'allows_registration'=>'allows_registration',\n 'allow_reset_password'=>'allow_reset_password',\n 'allow_remember'=>'allow_remember'\n ];\n foreach ($set_names as $name => $value) {\n if($name != 'default_groups'){\n $users = Setting::where(['group' => 'users','name' =>$name])\n ->update(['value' => $request->input($value)]);\n }else{\n if($request->input('group_selection')){\n $default_groups = implode(\",\", $request->input('group_selection'));\n }else{\n $default_groups = \"\";\n }\n $users = Setting::where(['group' => 'users','name' =>$name])\n ->update(['value' => $default_groups]);\n }\n if(!$users){\n $err[] = $users;\n }\n }\n\n if(empty($err)){\n return redirect()->back()->with('success', 'Settings Updated!');\n }else{\n return redirect()->back()->with('error', 'Error Updating!: ' . implode(', ', $err));\n }\n\n }", "function updateConfig($configParams) {\n\t\t// Update config file\n\t\t$configParser = new ConfigParser();\n\t\tif (!$configParser->updateConfig(Config::getConfigFileName(), $configParams)) {\n\t\t\t// Error reading config file\n\t\t\t$this->setError(INSTALLER_ERROR_GENERAL, 'installer.configFileError');\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->configContents = $configParser->getFileContents();\n\t\tif (!$configParser->writeConfig(Config::getConfigFileName())) {\n\t\t\t$this->wroteConfig = false;\n\t\t}\n\n\t\treturn true;\n\t}", "function update_v10_to_v11() {\n\n // add default issue tooltips\n $customField_type = Config::getInstance()->getValue(Config::id_customField_type);\n $backlogField = Config::getInstance()->getValue(Config::id_customField_backlog);\n $fieldList = array('project_id', 'category_id', 'custom_'.$customField_type,\n 'codevtt_elapsed', 'custom_'.$backlogField, 'codevtt_drift');\n $serialized = serialize($fieldList);\n Config::setValue('issue_tooltip_fields', $serialized, Config::configType_string, 'fields to be displayed in issue tooltip');\n\n $query = \"UPDATE `codev_config_table` SET `value`='11' WHERE `config_id`='database_version';\";\n $result = execQuery($query);\n\n}", "function update_v10_to_v11() {\n\n // add default issue tooltips\n $customField_type = Config::getInstance()->getValue(Config::id_customField_type);\n $backlogField = Config::getInstance()->getValue(Config::id_customField_backlog);\n $fieldList = array('project_id', 'category_id', 'custom_'.$customField_type,\n 'codevtt_elapsed', 'custom_'.$backlogField, 'codevtt_drift');\n $serialized = serialize($fieldList);\n Config::setValue('issue_tooltip_fields', $serialized, Config::configType_string, 'fields to be displayed in issue tooltip');\n\n $query = \"UPDATE `codev_config_table` SET `value`='11' WHERE `config_id`='database_version';\";\n $result = execQuery($query);\n\n}", "public function update()\n\t{\n\t\tif (!is_numeric($this->get('uidNumber')))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$db = \\App::get('db');\n\n\t\t$modifiedDate = gmdate('Y-m-d H:i:s');\n\n\t\t$this->set('modifiedDate', $modifiedDate);\n\n\t\t$query = \"UPDATE `#__xprofiles` SET \";\n\n\t\t$classvars = get_class_vars(__CLASS__);\n\n\t\t$first = true;\n\t\t$affected = 0;\n\n\t\tforeach ($classvars as $property => $value)\n\t\t{\n\t\t\tif ('_' == substr($property, 0, 1))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (!$first)\n\t\t\t{\n\t\t\t\t$query .= ',';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$first = false;\n\t\t\t}\n\n\t\t\tif ($property == 'params')\n\t\t\t{\n\t\t\t\tif (is_object($this->_params))\n\t\t\t\t{\n\t\t\t\t\t$query .= \"params='\".str_replace(\"\", \"\", $this->_params->toString()).\"'\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$query .= \"params=''\";\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ($this->get($property) === null)\n\t\t\t{\n\t\t\t\t$query .= \"$property=NULL\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$query .= \"$property=\" . $db->quote($this->get($property));\n\t\t\t}\n\t\t}\n\n\t\t$query .= \" WHERE uidNumber=\" . $db->quote($this->get('uidNumber')) . \";\";\n\n\t\t$db->setQuery($query);\n\n\t\tif (!$db->query())\n\t\t{\n\t\t\t$this->setError('Error updating data in xprofiles table: ' . $db->getErrorMsg());\n\t\t}\n\n\t\t$affected = $db->getAffectedRows();\n\n\t\tforeach ($classvars as $property => $value)\n\t\t{\n\t\t\tif (('_auxv_' != substr($property, 0, 6)) && ('_auxs_' != substr($property, 0, 6)))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$property = substr($property, 6);\n\n\t\t\t$first = true;\n\n\t\t\t$query = \"REPLACE INTO #__xprofiles_\" . $property . \" (uidNumber, \" . $property . \") VALUES \";\n\t\t\t$query_values = \"\";\n\n\t\t\t$list = $this->get($property);\n\n\t\t\tif (!is_array($list))\n\t\t\t{\n\t\t\t\t$list = array($list);\n\t\t\t}\n\n\t\t\tforeach ($list as $value)\n\t\t\t{\n\t\t\t\tif (!$first)\n\t\t\t\t{\n\t\t\t\t\t$query_values .= ',';\n\t\t\t\t}\n\n\t\t\t\t$first = false;\n\n\t\t\t\t$query_values .= '(' . $db->quote($this->get('uidNumber')) . ',' . $db->quote($value) . ')';\n\t\t\t}\n\n\t\t\tif ($query_values != '')\n\t\t\t{\n\t\t\t\t$db->setQuery($query . $query_values);\n\n\t\t\t\tif (!$db->query())\n\t\t\t\t{\n\t\t\t\t\t$this->setError(\"Error updating data in xprofiles $property table: \" . $db->getErrorMsg());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$affected += $db->getAffectedRows();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (property_exists(__CLASS__, '_auxv_' . $property))\n\t\t\t{\n\t\t\t\tforeach ($list as $key => $value)\n\t\t\t\t{\n\t\t\t\t\t$list[$key] = $db->quote($value);\n\t\t\t\t}\n\n\t\t\t\t$valuelist = implode($list, \",\");\n\n\t\t\t\tif (empty($valuelist))\n\t\t\t\t{\n\t\t\t\t\t$valuelist = \"''\";\n\t\t\t\t}\n\n\t\t\t\t$query = \"DELETE FROM #__xprofiles_\" . $property . \" WHERE uidNumber=\" . $this->get('uidNumber') . \" AND $property NOT IN ($valuelist);\";\n\n\t\t\t\t$db->setQuery($query);\n\n\t\t\t\tif (!$db->query())\n\t\t\t\t{\n\t\t\t\t\t$this->setError(\"Error deleting data in xprofiles $property table: \" . $db->getErrorMsg());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$affected += $db->getAffectedRows();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($affected > 0)\n\t\t{\n\t\t\tEvent::trigger('user.onAfterStoreProfile', array($this));\n\t\t}\n\n\t\treturn true;\n\t}", "public function updateTopPicks(array $data)\n {\n return $this->call(\n 'POST',\n '/api/v1/top_picks/update',\n $data\n );\n }", "public function update(Request $request, $id)\n {\n $uptime = Uptime::find($id);\n $uptime->morningFrom = $request->morningFrom;\n $uptime->morningTo = $request->morningTo;\n $uptime->afternoonFrom = $request->afternoonFrom;\n $uptime->afternoonTo = $request->afternoonTo;\n $uptime->eveningFrom = $request->eveningFrom;\n $uptime->eveningTo = $request->eveningTo;\n $uptime->days = implode('|', $request->days);\n\n $save = $uptime->save();\n\n return back()->withInput();\n }", "public static function update($input)\n\t{\t\n\t\ttry\n\t\t{\n\t\t$success = DB::table('devices')\n\t\t\t->where('id', '=', $input['id'])\n\t\t\t->update(array(\n\t\t\t'name' => $input['name'],\n\t\t\t'ip_address' => $input['ip_address'],\n\t\t\t'warning_threshold' => $input['warning_threshold'],\n\t\t\t'alert_threshold' => $input['alert_threshold'],\n\t\t\t'critical_threshold' => $input['critical_threshold'],\n\t\t\t'type' => $input['type'],\n\t\t\t'ports' => $input['ports'],\n\t\t\t'room_id' => $input['room_id'],\n\t\t\t'updated_at' => date(\"Y-m-d H:i:s\")\n\t\t\t));\n\n\t\treturn $success;\n\t\t}\n\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tLog::write('error', $e->getMessage());\n\t\t\tthrow $e;\n\t\t}\n\t}", "public static function update_all_and_use($config)\n\t{\n\t\treturn self::new_instance_records()->update_all_and_use($config);\n\t}", "public function updateUserSettings($data, $where){\n\n\t\t$this->db->where($where)->update(\"user_settings\", $data);\n\t\treturn $this->db->affected_rows();\n\t}", "public function update_check ( $transient ) {\n\t // Check if the transient contains the 'checked' information\n\t // If no, just return its value without hacking it\n\t if( empty( $transient->checked ) )\n\t return $transient;\n\t \n\t // The transient contains the 'checked' information\n\t // Now append to it information form your own API\n\t $args = array(\n\t 'action' => 'pluginupdatecheck',\n\t 'plugin_name' => $this->file,\n\t 'version' => $transient->checked[$this->file]\n\t );\n\n\t // Send request checking for an update\n\t $response = $this->request( $args );\n\n\t // If response is false, don't alter the transient\n\t if( false !== $response ) {\n\t $transient->response[$this->file] = $response;\n\t }\n\t return $transient;\n\t}", "public function testAPIUpdateMonitoredAddress() {\n $sample_user = $this->app->make('\\UserHelper')->createSampleUser();\n\n $helper = $this->app->make('\\MonitoredAddressHelper');\n $created_address = $helper->createSampleMonitoredAddress($sample_user);\n $update_vars = [\n 'monitorType' => 'send',\n 'active' => false,\n ];\n $api_tester = $this->getAPITester();\n $loaded_address_from_api = $api_tester->testUpdateResource($created_address, $update_vars);\n PHPUnit::assertEquals(false, $loaded_address_from_api['active']);\n\n $update_vars = [\n 'webhookEndpoint' => 'http://xchain.tokenly.dev/notifyme2',\n ];\n $api_tester = $this->getAPITester();\n $loaded_address_from_api = $api_tester->testUpdateResource($created_address, $update_vars);\n PHPUnit::assertEquals('http://xchain.tokenly.dev/notifyme2', $loaded_address_from_api['webhookEndpoint']);\n }", "public static function configCheckTime($interval) {\n return time()+$interval;\n }", "public function updateConfig(Request $request) {\n $title = $request->input('title');\n $description = $request->input('description');\n\n if ($title && $description){\n $configModel = new Config();\n\n $result = $configModel->updateConfig(['title' => $title, 'description' => $description]);\n return $result;\n }\n return 0;\n }", "public function update_settings($data) {\n\n\t\tif(function_exists('update_option')) { \n\t\t\t$data = array_merge($this->settings, (array)$data); \n\t\t\tupdate_option('wpu-settings', $data);\n\t\t\t$this->settings = $data;\n\t\t}\n\t}", "public function setUpdateMask($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Firestore\\V1beta1\\DocumentMask::class);\n $this->update_mask = $var;\n\n return $this;\n }", "protected function updateSettings($companyId, $postdata, $app) {\n\t\t\n\t\t$setting_id = self::getSettingID($companyId, $app);\n\t\t$where = \"id = '{$setting_id}'\";\n\t\t$row = $this->fetchRow($where);\n\t\t\n\t\t$option = self::getSubmittedSettings($app, $postdata);\n\t\t\n\t\tif($app == self::MAIN){\n\t\t\t$current = (array)json_decode($row->defined_settings)->current_settings;\n\t\t\t$default = $this->getDefaultSettings($app);\n\t\t\t$option = array_merge($current, $option);\n \n\t\t\t$opt = array('default' => $default, 'current_settings' => $option, 'previous_settings' => $current);\n\t\t}else if($app == self::NOTIFICATIONS) {\n\t\t\t$current = json_decode($row->defined_settings,true);\n\t\t\t$app_changed = false;\n\t\t\t$e_content_changed = false;\n\t\t\t$main_email_address = $current['main_email_address'];\n\t\t\tif($postdata['add_main_email']!='') {\n\t\t\t\tunset($current['main_email_address']);\n\t\t\t\t$current['main_email_address'] = $postdata['main_email_add'];\n\t\t\t\t$app_changed = true;\n\t\t\t}else{\n\t\t\t\tforeach($current['notifications'] as $k => $i) {\n\t\t\t\t\tif($k == $postdata['application_type']){\n\t\t\t\t\t\tforeach($i as $ks => $j) {\n\t\t\t\t\t\t\tif(($ks+1) == $postdata['notification_for']) {\n\t\t\t\t\t\t\t\tunset($current['notifications'][$k][$ks][$postdata['notification_for']]);\n\t\t\t\t\t\t\t\t$current['notifications'][$k][$ks] = array($postdata['notification_for'] => array('email_content' => $postdata['email_template']));\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$app_changed = true;\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\tif(!$app_changed) {\n\t\t\t\t$opt = $current['notifications'] + $option['notifications'];\n\t\t\t\t$opt = array('main_email_address' => $main_email_address,'notifications' => $opt);\n\t\t\t}else{\n\t\t\t\t$opt = $current;\n\t\t\t}\n\t\t}\n\t\t$row->defined_settings = json_encode($opt);\n\t\t$row->last_updated = date('Y-m-d H:i:s');\n\t\t$row->save();\n\t}", "public function modifyFBMessengerConfigFile(UpdateSystemConfigRequest $request)\n {\n $file_content = file_get_contents(base_path('.fb_messenger'));\n\n return view('admin.system.modify_fb_messenger_config_file', compact('file_content'));\n }", "public function action_update_check()\n\t{\n\t \tUpdate::add( 'DateNinja', 'e64e02e0-38f8-11dd-ae16-0800200c9a66', $this->info->version );\n\t}", "public function action_update_check()\n\t{\n\t \tUpdate::add('Atom Threading Extensions', 'a413fa7e-76cf-4edf-b7c5-53b8aa648eef', $this->info->version);\n\t}", "public function checkUpdate()\n {\n if (($this->getFrequency() + $this->getLastUpdate()) > time()) {\n return $this;\n }\n\n $feedData = array();\n\n $feedXml = $this->getFeedData();\n\n if ($feedXml && $feedXml->channel && $feedXml->channel->item) {\n foreach ($feedXml->channel->item as $item) {\n $feedData[] = array(\n 'severity' => (int)$item->severity,\n 'date_added' => $this->getDate((string)$item->pubDate),\n 'title' => (string)$item->title,\n 'description' => (string)$item->description,\n 'url' => (string)$item->link,\n );\n }\n\n if ($feedData) {\n Mage::getModel('adminnotification/inbox')->parse(array_reverse($feedData));\n }\n\n }\n $this->setLastUpdate();\n\n return $this;\n }", "public function update()\n {\n // $this->ajaxRequest();\n\n // Validate the submitted data\n $this->validateInput();\n\n // Preparing the data before update\n $data = (object) $this->input->post();\n \n // Execute update function from model\n $query = $this->m_setting->update($data);\n \n // Check if query was success\n if ($query === true) {\n $results = array('status' => true, 'action' => 'Success', 'message' => 'Settings updated sucessfully');\n } else {\n $results = array('status' => false, 'action' => 'Failed', 'message' => $query);\n }\n\n // Return the result to the view\n return response($results);\n }", "public function updatePassword(array $params)\n {\n $params['action'] = 'udp';\n return $this->apiRequest('changepass', $params);\n }", "function wp_schedule_update_checks()\n {\n }", "function modifyPuppetConfiguration( $puppetinfo ) {\n\t\tglobal $wgAuth;\n\t\tglobal $wgOpenStackManagerPuppetOptions;\n\n\t\t$hostEntry = array();\n\t\tif ( $wgOpenStackManagerPuppetOptions['enabled'] ) {\n\t\t\tforeach ( $wgOpenStackManagerPuppetOptions['defaultclasses'] as $class ) {\n\t\t\t\t$hostEntry['puppetclass'][] = $class;\n\t\t\t}\n\t\t\tforeach ( $wgOpenStackManagerPuppetOptions['defaultvariables'] as $variable => $value ) {\n\t\t\t\t$hostEntry['puppetvar'][] = $variable . '=' . $value;\n\t\t\t}\n\t\t\tif ( isset( $puppetinfo['classes'] ) ) {\n\t\t\t\tforeach ( $puppetinfo['classes'] as $class ) {\n\t\t\t\t\t$hostEntry['puppetclass'][] = $class;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( isset( $puppetinfo['variables'] ) ) {\n\t\t\t\tforeach ( $puppetinfo['variables'] as $variable => $value ) {\n\t\t\t\t\t$hostEntry['puppetvar'][] = $variable . '=' . $value;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$oldpuppetinfo = $this->getPuppetConfiguration();\n\t\t\tif ( isset( $oldpuppetinfo['puppetvar'] ) ) {\n\t\t\t\t$wgAuth->printDebug( \"Checking for preexisting variables\", NONSENSITIVE );\n\t\t\t\tforeach ( $oldpuppetinfo['puppetvar'] as $variable => $value ) {\n\t\t\t\t\t$wgAuth->printDebug( \"Found $variable\", NONSENSITIVE );\n\t\t\t\t\tif ( $variable == \"instancecreator_email\" || $variable == \"instancecreator_username\"\n\t\t\t\t\t\t|| $variable == \"instancecreator_lang\" || $variable == \"instanceproject\" || $variable == \"instancename\" ) {\n\t\t\t\t\t\t$hostEntry['puppetvar'][] = $variable . '=' . $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( $hostEntry ) {\n\t\t\t\t$success = LdapAuthenticationPlugin::ldap_modify( $wgAuth->ldapconn, $this->hostDN, $hostEntry );\n\t\t\t\tif ( $success ) {\n\t\t\t\t\t$this->fetchHostInfo();\n\t\t\t\t\t$wgAuth->printDebug( \"Successfully modified puppet configuration for host\", NONSENSITIVE );\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\t$wgAuth->printDebug( \"Failed to modify puppet configuration for host\", NONSENSITIVE );\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$wgAuth->printDebug( \"No hostEntry when trying to modify puppet configuration\", NONSENSITIVE );\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function updateSettings(){\n\t\tuser_login_required();\n\n\t\t//Get conversationID\n\t\t$conversationID = $this->getSafePostConversationID(\"conversationID\");\n\n\t\t//Check if user want to update its follow state\n\t\tif(isset($_POST['following'])){\n\t\t\t$follow = $_POST[\"following\"] === \"true\" ? true : false;\n\n\t\t\t//Try to update follow state\n\t\t \tif(!CS::get()->components->conversations->changeFollowState(userID, $conversationID, $follow))\n\t\t \t\tRest_fatal_error(500, \"Couldn't update user follow state !\");\n\t\t}\n\t\t\n\t\t//Check if user asked to change moderation settings\n\t\tif(isset($_POST['members']) OR isset($_POST['name'])){\n\n\t\t\t//Check if user is allowed to change such settings\n\t\t\tif(!CS::get()->components->conversations->userIsModerator(userID, $conversationID))\n\t\t\t\tRest_fatal_error(401, \"The user isn't a moderator, he can't updates such settings !\");\n\t\t\t\n\t\t\t//Update conversation name (if required)\n\t\t\tif(isset($_POST[\"name\"])){\n\t\t\t\t$conversationName = $_POST['name'] == \"false\" ? \"\" : $_POST['name'];\n\n\t\t\t\t//Update conversation name\n\t\t\t\tif(!CS::get()->components->conversations->changeName($conversationID, $conversationName))\n\t\t\t\t\tRest_fatal_error(500, \"Couldn't update conversation name !\");\n\t\t\t}\n\n\t\t\t//Update conversation users (if required)\n\t\t\tif(isset($_POST[\"members\"])){\n\t\t\t\t//Get user list\n\t\t\t\t$conversationMembers = numbers_list_to_array($_POST['members']);\n\n\t\t\t\t//Make sure current user is in the list\n\t\t\t\t$conversationMembers[userID] = userID;\n\n\t\t\t\t//Try to update conversation members\n\t\t\t\tif(!CS::get()->components->conversations->updateMembers($conversationID, $conversationMembers))\n\t\t\t\t\tRest_fatal_error(500, \"Couldn't update conversation members list !\");\n\t\t\t}\n\n\t\t}\n\t\t\t\n\t\t//Success\n\t\treturn array(\"success\" => \"Conversation informations were successfully updated !\");\n\t}", "public function updater() {\n\n\t\t// Bail if current user cannot manage plugins.\n\t\tif ( ! current_user_can( 'install_plugins' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Bail if plugin updater is not loaded.\n\t\tif ( ! class_exists( 'Puc_v4_Factory' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Setup the updater.\n\t\t// $updater = Puc_v4_Factory::buildUpdateChecker( 'https://github.com/maithemewp/mai-grid-entries/', __FILE__, 'mai-grid' );\n\t}", "public function vxUserPasswordUpdateCheck() {\n\t\t$rt = array();\n\t\t\n\t\t$rt['errors'] = 0;\n\t\t\n\t\t$rt['pswitch'] = 'a';\n\t\t\n\t\t$rt['usr_password_value'] = '';\n\t\t$rt['usr_confirm_value'] = '';\n\t\t/* usr_password_error:\n\t\t0 => no error\n\t\t1 => empty\n\t\t2 => overflow (32 sbs)\n\t\t3 => invalid characters\n\t\t4 => not identical\n\t\t5 => modify empty\n\t\t999 => unspecific */\n\t\t$rt['usr_password_error'] = 0;\n\t\t$rt['usr_password_touched'] = 0;\n\t\t$rt['usr_password_error_msg'] = array(1 => '你忘记填写密码了', 2 => '你的这个密码太长了,缩减一下吧', 3 => '你填写的密码中包含了不被允许的字符', 4 => '你所填写的两个密码不匹配', 5 => '你修改密码时需要将新密码输入两遍');\n\t\t/* usr_confirm_error:\n\t\t0 => no error\n\t\t1 => empty\n\t\t2 => overflow (32 sbs)\n\t\t3 => invalid characters(should not reach here in final rendering)\n\t\t4 => not identical\n\t\t5 => modify empty\n\t\t999 => unspecific */\n\t\t$rt['usr_confirm_error'] = 0;\n\t\t$rt['usr_confirm_touched'] = 0;\n\t\t$rt['usr_confirm_error_msg'] = array(1 => '你忘记填写密码确认了', 2 => '你的这个密码确认太长了,缩减一下吧', 3 => '你填写的密码中包含了不被允许的字符', 4 => '你所填写的两个密码不匹配', 5 => '你修改密码时需要将新密码输入两遍');\n\n\t\t/* S check: usr_password and usr_confirm */\n\t\t\n\t\tif (isset($_POST['usr_password'])) {\n\t\t\t$rt['usr_password_value'] = $_POST['usr_password'];\n\t\t\tif (strlen($rt['usr_password_value']) == 0) {\n\t\t\t\t$rt['usr_password_touched'] = 0;\n\t\t\t\t$rt['usr_password_error'] = 1;\n\t\t\t\t$rt['errors']++;\n\t\t\t} else {\n\t\t\t\t$rt['usr_password_touched'] = 1;\n\t\t\t}\n\t\t} else {\n\t\t\t$rt['usr_password_touched'] = 0;\n\t\t\t$rt['usr_password_error'] = 1;\n\t\t\t$rt['errors']++;\n\t\t}\n\t\t\n\t\tif (isset($_POST['usr_confirm'])) {\n\t\t\t$rt['usr_confirm_value'] = $_POST['usr_confirm'];\n\t\t\tif (strlen($rt['usr_confirm_value']) == 0) {\n\t\t\t\t$rt['usr_confirm_touched'] = 0;\n\t\t\t\t$rt['usr_confirm_error'] = 1;\n\t\t\t\t$rt['errors']++;\n\t\t\t} else {\n\t\t\t\t$rt['usr_confirm_touched'] = 1;\n\t\t\t}\n\t\t} else {\n\t\t\t$rt['usr_confirm_touched'] = 0;\n\t\t\t$rt['usr_confirm_error'] = 1;\n\t\t\t$rt['errors']++;\n\t\t}\n\t\t\n\t\tif (($rt['usr_password_touched'] == 0) && ($rt['usr_confirm_touched'] == 0)) {\n\t\t\t$rt['pswitch'] = 'a'; /* both blank */\n\t\t}\n\t\t\n\t\tif (($rt['usr_password_touched'] == 1) && ($rt['usr_confirm_touched'] == 1)) {\n\t\t\t$rt['pswitch'] = 'b'; /* both touched */\n\t\t}\n\t\t\n\t\tif (($rt['usr_password_touched'] == 1) && ($rt['usr_confirm_touched'] == 0)) {\n\t\t\t$rt['pswitch'] = 'c'; /* first touched */\n\t\t}\n\t\t\t\n\t\tif (($rt['usr_password_touched'] == 0) && ($rt['usr_confirm_touched'] == 1)) {\n\t\t\t$rt['pswitch'] = 'd'; /* second touched */\n\t\t}\n\t\t\n\t\tswitch ($rt['pswitch']) {\n\t\t\tdefault:\n\t\t\tcase 'a':\n\t\t\t\t/* nothing will happen */\n\t\t\t\tbreak;\n\t\t\tcase 'b':\n\t\t\t\t/* a lot check here */\n\t\t\t\tif (strlen($rt['usr_password_value']) > 32) {\n\t\t\t\t\t$rt['usr_password_error'] = 2;\n\t\t\t\t\t$rt['errors']++;\n\t\t\t\t}\n\t\t\t\n\t\t\t\tif (strlen($rt['usr_confirm_value']) > 32) {\n\t\t\t\t\t$rt['usr_confirm_error'] = 2;\n\t\t\t\t\t$rt['errors']++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (($rt['usr_password_error'] == 0) && ($rt['usr_confirm_error'] == 0)) {\n\t\t\t\t\tif ($rt['usr_password_value'] != $rt['usr_confirm_value']) {\n\t\t\t\t\t\t$rt['usr_confirm_error'] = 4;\n\t\t\t\t\t\t$rt['errors']++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'c':\n\t\t\t\t$rt['usr_confirm_error'] = 5;\n\t\t\t\t$rt['errors']++;\n\t\t\t\tbreak;\n\t\t\tcase 'd':\n\t\t\t\t$rt['usr_password_error'] = 5;\n\t\t\t\t$rt['errors']++;\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn $rt;\n\t}", "public function update(UserSettingsRequest $request)\n {\n $input = $request->except(['_method', '_token']);\n\n foreach ($input as $key => $value) {\n\n setting()->set(\n $key,\n $value\n );\n setting()->setExtraColumns(['user_id' => auth()->user()->id]);\n }\n setting()->save();\n\n return redirect(route('settings.index'))->with('message', 'Settings have been saved!');\n }", "public function applyPatch($name)\n {\n // Check if this patch is valid first, before applying.\n Channels::includeSystem('Patching');\n $valid = Patching::wsValidateUpdate($name);\n if ($valid === FALSE) {\n return FALSE;\n }\n\n Patching::extractPatch($name);\n\n $dataDir = BaseSystem::getDataDir('Patching');\n $patchDir = $dataDir.'/'.$name;\n if (is_dir($patchDir) === FALSE) {\n return FALSE;\n }\n\n $rootDir = dirname(dirname(dirname(dirname(__FILE__))));\n\n $patchResultPath = $patchDir.'/patch.result';\n\n // Turn off the system cron service before we apply.\n file_put_contents($patchResultPath, '[Turn off the system cron service.]'.\"\\n\", FILE_APPEND);\n exec('/etc/init.d/cron stop');\n\n file_put_contents($patchResultPath, '[Applying Patch Begins]'.\"\\n\", FILE_APPEND);\n file_put_contents($patchResultPath, '[Start running Pre upgrade scripts]'.\"\\n\", FILE_APPEND);\n self::runUpgradeScripts('pre', $rootDir, $patchDir);\n\n // Add new files and delete old files.\n file_put_contents($patchResultPath, '[Start running patch.sh]'.\"\\n\", FILE_APPEND);\n if (file_exists($patchDir.'/patch.sh') === TRUE) {\n $script = 'cd '.$rootDir.' && ';\n $script .= 'cp '.$patchDir.'/patch.sh . && ';\n $script .= 'sh patch.sh >> '.$patchResultPath;\n exec($script);\n }\n\n // Applies the patch.\n if (file_exists($patchDir.'/patch.diff') === TRUE) {\n // Do a dry run to check for error.\n file_put_contents($patchResultPath, '[Start running dry run]'.\"\\n\", FILE_APPEND);\n $dryRun = 'patch --dry-run -d '.$rootDir.' -p1 -i '.$patchDir.'/patch.diff';\n $output = array();\n $retval = 0;\n exec($dryRun, $output, $retval);\n if ($retval !== 0) {\n file_put_contents($patchResultPath, '[Patch file dry run failed]'.\"\\n\", FILE_APPEND);\n // Patch's exit status is 0 if all hunks are applied\n // successfully, 1 if some hunks cannot be applied, and 2 if\n // there is more serious trouble.\n $error = implode(\"\\n\", $output);\n file_put_contents($patchResultPath, $error.\"\\n\", FILE_APPEND);\n return $error;\n } else {\n file_put_contents($patchResultPath, '[Start running patch command with patch.diff]'.\"\\n\", FILE_APPEND);\n $script = 'patch -d '.$rootDir.' -p1 -i '.$patchDir.'/patch.diff >> '.$patchResultPath;\n exec($script);\n }\n }//end if\n\n file_put_contents($patchResultPath, '[Start running Post upgrade scripts]'.\"\\n\", FILE_APPEND);\n self::runUpgradeScripts('post', $rootDir, $patchDir);\n if (file_exists($rootDir.'/web/Skins/defaultSkin') === TRUE) {\n // Remove cached css files in the web dir.\n file_put_contents($patchResultPath, '[Removing cached CSS files in Web directory]'.\"\\n\", FILE_APPEND);\n $cachedCss = glob($rootDir.'/web/Skins/defaultSkin/*.css');\n foreach ($cachedCss as $file) {\n unlink($file);\n }\n }\n\n // Re-generate Help documentation.\n file_put_contents($patchResultPath, '[Re-generate Help documentation]'.\"\\n\", FILE_APPEND);\n $helpScriptCommand = 'php '.$rootDir.'/Systems/Help/Scripts/generate_docs.php';\n exec($helpScriptCommand);\n\n // Re-generate API.\n file_put_contents($patchResultPath, '[Re-generate API]'.\"\\n\", FILE_APPEND);\n Channels::includeSystem('API');\n API::removeAPI();\n include_once 'Systems/API/APISystem.inc';\n $system = new APISystem();\n $system->install();\n\n // Minify Javascript and CSS files.\n file_put_contents($patchResultPath, '[Minify Javascript and CSS files]'.\"\\n\", FILE_APPEND);\n Channels::includeSystem('GUI');\n GUI::minifyGzipJSFiles();\n GUI::minifyCSSFiles();\n system($rootdir.'/Scripts/fix_perms.sh');\n\n // Update the *_create_wizard.xml file for asset type wizards.\n if (Channels::systemExists('Wizard') === TRUE) {\n file_put_contents($patchResultPath, '[Remove *_create_wizard.xml files.]'.\"\\n\", FILE_APPEND);\n Channels::includeSystem('Wizard');\n $wPath = Wizard::getWizardsPath();\n foreach (glob($wPath.'/*php') as $phpWizardFile) {\n unlink($phpWizardFile);\n }\n }\n\n // Clear Firefox cache.\n file_put_contents($patchResultPath, '[Clean up firefox cache.]'.\"\\n\", FILE_APPEND);\n exec('rm /root/.mozilla/firefox/squiz/Cache/*');\n\n // Turn the system cron back on.\n exec('/etc/init.d/cron start');\n file_put_contents($patchResultPath, '[Turn on the system cron service]'.\"\\n\", FILE_APPEND);\n file_put_contents($patchResultPath, '[applyPatch() function returning TRUE]'.\"\\n\", FILE_APPEND);\n\n return TRUE;\n\n }", "public function fixedUpdate($data)\n {\n if (!$this->settings) {\n $this->settings = $this->initDefaultSettings();\n }\n $lastCheckedBlock = $this->settings['lastCheckedBlock'];\n $filters = $this->settings['filters'];\n if ($filters) {\n // Luckily we had filter active. It should have all new transactions\n $pending = $filters['pending'];\n if ($pending) {\n $this->checkPending($pending);\n }\n } else {\n // No filters found. Need to install one and manually check everything from last update\n // Let's hope we will end here only once after first start or long downtime of system\n // Still, better to send notification that something can be wrong here\n }\n $this->checkFilter();\n return 0;\n }", "public function check_for_updates() {\n $current_version = get_option( 'laterpay_version' );\n if ( version_compare( $current_version, $this->config->version, '!=' ) ) {\n $this->install();\n }\n }", "public function postUpdate()\n\t{\n $input = Input::only('global_prefix','panel_path', 'domain_limit', 'phone_number_limit', 'mail_address', 'sender_name', 'sip_server','reserved_extension','reserved_domain_prefix');\n\n $rules = array(\n 'global_prefix' => 'required|min:1|max:10',\n 'panel_path' => 'required|min:1',\n 'domain_limit' => 'required|numeric',\n 'phone_number_limit' => 'required|numeric',\n 'mail_address' => 'required|email',\n 'sender_name' => 'required|min:1',\n 'sip_server' => 'required|min:3',\n 'reserved_extension' => 'required|min:3',\n 'reserved_domain_prefix' => 'required|min:3',\n );\n $v = Validator::make($input, $rules);\n if ($v->fails()) {\n return Output::push(array('path' => 'main_config', 'errors' => $v, 'input' => TRUE));\n }\n\n $panel_path = Setting::whereName('global_prefix')->first();\n $panel_path->value = $input['global_prefix'];\n $panel_path->save();\n\n $panel_path = Setting::whereName('panel_path')->first();\n $panel_path->value = $input['panel_path'];\n $panel_path->save();\n\n $domain_limit = Setting::whereName('domain_limit')->first();\n $domain_limit->value = $input['domain_limit'];\n $domain_limit->save();\n\n $phone_number_limit = Setting::whereName('phone_number_limit')->first();\n $phone_number_limit->value = $input['phone_number_limit'];\n $phone_number_limit->save();\n\n $mail_address = Setting::whereName('mail_address')->first();\n $mail_address->value = $input['mail_address'];\n $mail_address->save();\n\n $sender_name = Setting::whereName('sender_name')->first();\n $sender_name->value = $input['sender_name'];\n $sender_name->save();\n\n $sip_server = Setting::whereName('sip_server')->first();\n $sip_server->value = $input['sip_server'];\n $sip_server->save();\n\n $reserved_extension = Setting::whereName('reserved_extension')->first();\n $reserved_extension->value = $input['reserved_extension'];\n $reserved_extension->save();\n\n $reserved_domain_prefix = Setting::whereName('reserved_domain_prefix')->first();\n $reserved_domain_prefix->value = $input['reserved_domain_prefix'];\n $reserved_domain_prefix->save();\n\n if ($panel_path->id && $domain_limit->id && $phone_number_limit && $mail_address && $sender_name && $sip_server && $reserved_domain_prefix &&$reserved_extension) {\n return Output::push(array(\n 'path' => 'main_config',\n 'messages' => array('success' => _('You have updated main configuration successfully')),\n ));\n } else {\n return Output::push(array(\n 'path' => 'main_config',\n 'messages' => array('fail' => _('Fail to update main configuration')),\n 'input' => TRUE,\n ));\n }\n\t}", "public function updateConfigData(array $data): void\n {\n foreach ($data as $key => $value) {\n $this->db->update('settings', array('value'), array($value), \"setting_name = '{$key}'\");\n }\n }", "protected function prepareConfig($request)\n {\n $this->config = array_merge($this->config, $this->container->make('config')->get('api::rate_limiting'));\n\n if ($this->isAuthenticatedRequest()) {\n $this->config = array_merge(['exceeded' => $this->config['exceeded']], $this->config['authenticated']);\n } else {\n $this->config = array_merge(['exceeded' => $this->config['exceeded']], $this->config['unauthenticated']);\n }\n\n $this->config['keys']['requests'] = sprintf('dingo:api:requests:%s', $request->getClientIp());\n $this->config['keys']['reset'] = sprintf('dingo:api:reset:%s', $request->getClientIp());\n }", "public function autoupdate() {\n\t\t$uC = new PluginUpdateChecker( $this->autoupdate_endpoint, $this->path . $this->slug . '.php', $this->slug );\n\t}", "public function update(Request $request, User $user)\n {\n $this->authorize('update', $user);\n\n $request->merge(['settings' => [\n 'email_notifications' => $request->has('settings.email_notifications')\n ]]);\n\n $this->validate($request, [\n 'name' => 'required|max:255',\n 'email' => 'required|email|max:255|unique:users,email,' . $user->id,\n 'password' => 'nullable|min:6|confirmed',\n 'settings.email_notifications' => 'boolean'\n ]);\n\n $data = $request->all();\n\n if ($request->has('password')) {\n $data['password'] = bcrypt($request->password);\n } else {\n unset($data['password']);\n unset($data['password_confirmation']);\n }\n\n $this->users->update($data, $user);\n\n return redirect($user->url() . '/settings')->with('flash', 'Settings updated.');\n }" ]
[ "0.6711495", "0.66990566", "0.5914926", "0.582598", "0.5785443", "0.56012374", "0.5382435", "0.49926636", "0.49801952", "0.48861706", "0.48679906", "0.48537675", "0.48073092", "0.47214732", "0.47213593", "0.46373323", "0.46329278", "0.46152425", "0.45887405", "0.45285544", "0.45094183", "0.4492244", "0.4484791", "0.44004205", "0.4363516", "0.4291372", "0.42812952", "0.42679954", "0.42587674", "0.42550412", "0.42433596", "0.42433596", "0.42433596", "0.42433596", "0.42433596", "0.42433596", "0.42433596", "0.42433596", "0.42433596", "0.42349467", "0.41198036", "0.4116388", "0.41150165", "0.40992296", "0.4086519", "0.40662593", "0.40585062", "0.40376398", "0.40333453", "0.4014005", "0.39967433", "0.39963534", "0.39886168", "0.3988507", "0.39880818", "0.39806738", "0.39776763", "0.3975896", "0.39698672", "0.39659426", "0.39648283", "0.3964437", "0.39631104", "0.39582774", "0.3942749", "0.3930401", "0.3930401", "0.3920529", "0.39152828", "0.39143753", "0.39105618", "0.3907216", "0.39002278", "0.38994595", "0.38847497", "0.38842037", "0.3880911", "0.38796622", "0.38663262", "0.3859757", "0.38521257", "0.38495266", "0.3834346", "0.3826381", "0.38247132", "0.3822459", "0.38218358", "0.38207316", "0.3817141", "0.38139102", "0.38117704", "0.3810006", "0.3796836", "0.37923542", "0.3791943", "0.3789035", "0.37811992", "0.37791973", "0.37713513", "0.3769058" ]
0.77980983
0
test getting WP profile no relation
тест получения профиля WP без отношения
public function testGetProfileWPNoRel() { $url = "http://127.0.0.1/app_test.php/profile/view/natasha-romanov"; $username = 'profileBucky@gmail.com'; $password = 'password'; $response = \Httpful\Request::get($url)->basicAuth($username, $password)->send(); $this->assertEquals('success', $response->body->status); $this->assertEquals('Natasha Romanov', $response->body->data->user->name); $this->assertNotEquals(0, $response->body->data->user->isWellnessPro); $this->assertEquals(0, $response->body->data->relationships->isSupporter); $this->assertEquals(0, $response->body->data->relationships->isSupportee); $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWPGetProfileOtherUserNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = 'profileNatasha@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testDestiny2GetProfile()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testProfileExistsGetProfilesidExists()\n {\n\n }", "public function testProfileExistsHeadProfilesid()\n {\n\n }", "function have_profile(){\n\treturn ( get_profile('enabled') === true && get_profile() !== -1 );\n}", "public function testProfileCheckIfUserExists()\n {\n\n }", "public function _assertProfileExists($profile_uid)\n {\n }", "public function testWPGetProfileOtherUserPatientRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = 'profileVision@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(1, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testGetProfileOtherUserNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/steve-rogers\";\r\n\r\n $username = 'profileBucky@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Steve Rogers', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->relationships->isFriend);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testGetInvalidProfileByProfileName() : void {\n\t\t// get a profile name that doesn't exist\n\t\t$profile = Profile::getProfileByProfileName($this->getPDO(), \"Invalid Profile Name\");\n\t\t$this->assertCount(0, $profile);\n\t}", "public function testProfileFindOne()\n {\n\n }", "public function testGetOwnProfile()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = 'profileBucky@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->relationships->isFriend);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n\r\n }", "public function test_can_view_profile_of_any_user()\n {\n // When i access his profile\n // Then i can see his name\n $user = create(User::class);\n\n $response = $this->get(\"/profiles/{$user->name}\");\n\n $response->assertStatus(200);\n $response->assertSeeText($user->name);\n }", "public function checkForProfile()\n\t\t{\n\t\t\treturn (!Auth::user()->profiles) ? false : true;\n\t\t}", "public function testGETProfile()\n\t{\n\t\t$request = new ERestTestRequestHelper();\n\n\t\t$request['config'] = [\n\t\t\t'url'\t\t\t=> 'http://api/profile/2',\n\t\t\t'type'\t\t=> 'GET',\n\t\t\t'data'\t\t=> null,\n\t\t\t'headers' => [\n\t\t\t\t'X_REST_USERNAME' => 'admin@restuser',\n\t\t\t\t'X_REST_PASSWORD' => 'admin@Access',\n\t\t\t],\n\t\t];\n\n\t\t$request_response = $request->send();\n\t\t$expected_response = '{\"success\":true,\"message\":\"Record Found\",\"data\":{\"totalCount\":1,\"profile\":{\"id\":\"2\",\"user_id\":\"2\",\"photo\":\"0\",\"website\":\"mysite2.com\",\"owner\":{\"id\":\"2\",\"username\":\"username2\",\"password\":\"password2\",\"email\":\"email@email2.com\"}}}}';\n\t\t$this->assertJsonStringEqualsJsonString($request_response, $expected_response);\n\t}", "public function testGetInvalidProfileByProfileEmail() : void {\n\t\t// get an email that doesn't exist\n\t\t$profile = Profile::getProfileByProfileEmail($this->getPDO(), \"eye@dont.exist\");\n\t\t$this->assertNull($profile);\n\t}", "public function testProfileInvalid()\n {\n $email = new Notification();\n $email->profile('derp');\n }", "abstract protected function getUserProfile();", "public function testGetInvalidProfileByProfileId () : void {\n\t\t// grab a profile id that doesn't exist?\n\t\t$invalidProfileId = generateUuidV4();\n\n\t\t$profile = Profile::getProfileByProfileId($this->getPDO() , \"$invalidProfileId\");\n\t\t$this->assertNull($profile);\n\t}", "public function check_for_profile(){\n\t\t\n\t\t//get username for logged in user\n\t\t$user_name = $_SESSION['username'];\n\t\t// get user id for the logged in user\n\t\t$user_id = Database::user_id_query($user_name);\n\t\t//call static fucntion to check if user profile already exists\n\t\t$result = UserProfileHelper::check_profile($user_id);\n\t\t//var_dump($result);\n\t\treturn $result;\n\t}", "function at_follow_is_pro_user() {\n $isPro = false;\n $options = get_option('addthis_settings');\n $profile = $options['profile'];\n if ($profile) {\n $request = wp_remote_get( \"http://q.addthis.com/feeds/1.0/config.json?pubid=\" . $profile );\n $server_output = wp_remote_retrieve_body( $request );\n $array = json_decode($server_output);\n // check for pro user\n if (array_key_exists('_default',$array)) {\n $isPro = true;\n } else {\n $isPro = false;\n }\n }\n return $isPro;\n}", "public function testProfilePrototypeGetPosts()\n {\n\n }", "public function testProfileCheckIfDisplayNameIsTaken()\n {\n\n }", "function a_user_has_a_profile()\n {\n $user = create('App\\User');\n\n $this->get(\"/profiles/{$user->name}\")\n ->assertSee($user->name);\n }", "private function checkProfile($profile)\n {\n if ($profile === null) {\n $profile = $this->getProfile();\n return $profile;\n } elseif ($this->getProfile()->getUsername() === $profile || $this->getDoorman()->isKitchenStaff() === true) {\n $profileRepository = $this->getDoctrine()->getRepository('MealzUserBundle:Profile');\n $profile = $profileRepository->find($profile);\n return $profile;\n }\n\n return null;\n }", "public function testProfileFind()\n {\n\n }", "public function testGetProfileWPPatientRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/vision-jones\";\r\n\r\n $username = 'profileBucky@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Vision Jones', $response->body->data->user->name);\r\n $this->assertNotEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(1, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testProfileView()\n {\n $this->loginReader();\n\n $response = $this->get('api/user/profile/1');\n\n $response->assertStatus(200);\n }", "public function testGetProfileUserNotExist()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/thor\";\r\n\r\n $username = 'profileBucky@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n //AppBundle:User object not found. (404 Not Found)\r\n $this->assertTrue($response->code === 404);\r\n\r\n }", "function get_profile($field, $user = \\false)\n {\n }", "public function testQuarantineCheckIfProfileIsQuarantined()\n {\n\n }", "public static function getUserNoProfile()\n {\n $user = static::get();\n if (isset($user->noPerfil)) {\n return $user->noPerfil;\n }\n }", "public function testProfilePrototypeFindByIdPosts()\n {\n\n }", "public function testProfilePrototypeExistsCommunityRoles()\n {\n\n }", "function hasProfilePicture()\n\t{\n\t\treturn $this->ppic;\n\t}", "public function testUserProfile() {\n\t\tif (!$this->_hasTrigger('userProfile')) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$expected = $this->_manualCall('userProfile', $this->ViewtEvent);\n\n\t\t$result = $this->Event->trigger($this->ViewObject, $this->plugin . '.userProfile');\n\t\t$this->assertEquals($expected, $result);\n\t}", "public function testCheckProfile()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('http://localhost:8000/user/12/profile')\n ->assertSee('My Profile');\n });\n }", "public function getUserProfile();", "function ds_get_social_profiles() {\n\n // Return a filterable social profile.\n return apply_filters(\n 'ds_social_profiles',\n array()\n );\n \n}", "public function hasProfilePreLoaded()\n {\n return property_exists($this, 'profile') && ! is_null($this->profile);\n }", "public function testGuestNotAccessProfilePage()\n\t{\n\t\t$this->open('/user/edit/' . $this->users['sample1']['intUserID']);\n\t\t$this->assertTextNotPresent('Edit');\n\n\t\t$this->open('/user/edit/' . $this->users['sample2']['intUserID']);\n\t\t$this->assertTextNotPresent('Edit');\n\t}", "public function testGetCustomerProfile()\n {\n self::testCreateCustomerProfile();\n\n $response = $this->gateway->getCustomerProfile($this->customerProfileId);\n\n $this->assertTrue($response->isSuccess());\n }", "public function testProfileIndexFound()\n {\n $profileService = $this->createProfileServiceMock();\n\n $profileService\n ->method('getProfile')\n ->willReturn(new BlokkrUser());\n\n $client = static::createClient();\n $client->getContainer()->set(\"blokkr.service.profile\", $profileService);\n $client->request(\"GET\", \"/profile/1\");\n\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n }", "public function testProfilePrototypeFindByIdQuarantines()\n {\n\n }", "public function testProfilePrototypeGetQuarantines()\n {\n\n }", "public function testProfilePrototypeGetLikes()\n {\n\n }", "private function getProfile() {\n if(!$this->profile = $this->getNikePlusFile('http://nikerunning.nike.com/nikeplus/v2/services/app/get_user_data.jsp?_plus=true')) {\n throw new Exception($this->feedErrorMessage);\n }\n }", "public function testProfileUnilogin()\n {\n\n }", "public function testDestiny2GetLinkedProfiles()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testProfilePrototypeGetCommunityRoles()\n {\n\n }", "public function testProfileIndexNotFound()\n {\n $profileService = $this->createProfileServiceMock();\n\n $profileService\n ->method('getProfile')\n ->willReturn(null);\n\n $client = static::createClient();\n $client->getContainer()->set(\"blokkr.service.profile\", $profileService);\n $client->request(\"GET\", \"/profile/1\");\n\n\n $this->assertEquals(404, $client->getResponse()->getStatusCode());\n }", "public function testManagerNotAccessProfileUser()\n\t{\n\t\t$this->login($this->users['sample2']['varName'], $this->passwordManager);\n\t\t$this->open('/user/edit/' . $this->users['sample1']['intUserID']);\n\t\t$this->assertTextPresent('You don\\'t have access to this section.');\n\t}", "public function testProfile() {\n $profile = <<<PROFILE_TEST\ncore_version_requirement: '*'\nname: The Perfect Profile\ntype: profile\ndescription: 'This profile makes Drupal perfect. You should have no complaints.'\nPROFILE_TEST;\n\n vfsStream::setup('profiles');\n vfsStream::create([\n 'fixtures' => [\n 'invalid_profile.info.txt' => $profile,\n ],\n ]);\n $info = $this->infoParser->parse(vfsStream::url('profiles/fixtures/invalid_profile.info.txt'));\n $this->assertFalse($info['core_incompatible']);\n }", "public function testProfilePrototypeFindByIdCommunityRoles()\n {\n\n }", "public function badPaymentProfile()\n {\n\n $payment_profile = $this->payment_profile()->first();\n\n if ($payment_profile === NULL)\n return TRUE;\n\n if (empty($payment_profile->stripe_customer))\n return TRUE;\n\n return FALSE;\n\n }", "public function testGetProfileNotLoggedIn()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $response = \\Httpful\\Request::get($url)->send();\r\n\r\n //ERROR Call to a member function getWellnessProfessional() on string (500 Internal Server Error)\r\n $this->assertEquals(302, $response->code);\r\n\r\n }", "public function testProfilePrototypeFindByIdLikes()\n {\n\n }", "private function checkingApiCanFetchAProfile($profile_id)\n {\n $api_profile=$this->api_request->get(\"profile\",\"single_profile\",$params=array('profile_id'=>$profile_id));\n return ($api_profile['user_id']==$profile_id);\n }", "public function getProfile()\n {\n ProfileResource::withoutWrapping();\n MinistryResource::withoutWrapping();\n\n if (request()->has('complete') && request()->complete) {\n return new ProfileResource(auth()->user());\n } else {\n return new MinistryResource(auth()->user());\n }\n }", "public function testGetValidProfileByProfileName() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"profile\");\n\n\t\t// create a new Profile and insert into mySQL\n\t\t$profileId = generateUuidV4();\n\n\t\t$profile = new Profile($profileId, $this->VALID_ACTIVATION_TOKEN, $this->VALID_PROFILE_EMAIL, $this->VALID_PROFILE_HASH, $this->VALID_PROFILE_IS_OWNER, $this->VALID_PROFILE_NAME);\n\t\t$profile->insert($this->getPDO());\n\n\t\t// get Profile form database using profile name\n\t\t$results = Profile::getProfileByProfileName($this->getPDO(), $this->VALID_PROFILE_NAME);\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"profile\"));\n\n\t\t// make sure no other objects are contaminating the profile\n\t\t$this->assertContainsOnlyInstancesOf(\"Edu\\\\Cnm\\\\FoodTruckFinder\\\\Profile\", $results);\n\n\t\t// make sure results are same as expected\n\t\t$pdoProfile = $results[0];\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"profile\"));\n\t\t$this->assertEquals($pdoProfile->getProfileId(), $profileId);\n\t\t$this->assertEquals($pdoProfile->getProfileActivationToken(), $this->VALID_ACTIVATION_TOKEN);\n\t\t$this->assertEquals($pdoProfile->getProfileEmail(), $this->VALID_PROFILE_EMAIL);\n\t\t$this->assertEquals($pdoProfile->getProfileHash(), $this->VALID_PROFILE_HASH);\n\t\t$this->assertEquals($pdoProfile->getProfileIsOwner(), $this->VALID_PROFILE_IS_OWNER);\n\t\t$this->assertEquals($pdoProfile->getProfileName(), $this->VALID_PROFILE_NAME);\n\t}", "function wp_get_users_with_no_role($site_id = \\null)\n {\n }", "public function testProfilePrototypeCountPosts()\n {\n\n }", "public function public_profile_get() {\n $this->response(App\\Auth::profile(), REST_Controller::HTTP_OK);\n }", "public function testProfileEmptySkillsMatrix()\n {\n factory(App\\Models\\Profile::class, 'withAUser', 1)->create();\n $user = DB::table('users')->first();\n $this->visit(route('profile.view', ['name'=>$user->username]))\n ->see('seeInElement', '.skills', trans('profile.show.no_skills'));\n }", "public function testProfileCount()\n {\n\n }", "public function testHasPage() {\n $this->assertEquals(1, $this->users->page());\n }", "public function testProfileFindById()\n {\n\n }", "function getProfile(){\n $profile = $this->loadUser();\n return $profile;\n }", "public function hasProfilePicture()\n {\n $file = public_path('/images/players/') . $this->id . '.webp';\n return ( file_exists($file) ) ? true : false;\n }", "function yz_profile() {\n\treturn Youzer_Profile::get_instance();\n}", "public function testProfilePersonalInfo()\n {\n // Create a user with the username 'johndoe'\n $user = factory(User::class)->create(['username'=>'johndoe']);\n // Add a profile record to the user\n $profile = factory(Profile::class)->make(['country_id'=>4]);\n // Save the user\n $user->profile()->save($profile);\n // Goto the profile browse page\n $this->visit(route('profile.view', ['name'=>'johndoe']))\n ->see('seeInElement', '.country', DB::table('countries')->where('id', 4)->first()->full_name);\n }", "public function getProfile()\n {\n return $this->profile;\n }", "public function getProfile()\n {\n return $this->profile;\n }", "public function getProfile()\n {\n return $this->profile;\n }", "public function testListSiteMembershipsForPerson()\n {\n }", "public function testGetOneUserInformation()\n {\n $response = $this->json('GET', $this->userEndpoint.'/prostoalex');\n\n // It should return a valid user json with all the basic attributes filled\n $response\n ->assertStatus(200)\n ->assertJsonStructure([\n 'created',\n 'id',\n 'karma',\n 'submitted',\n 'about',\n ])\n ->assertJsonFragment([\n 'id' => 'prostoalex'\n ]);\n }", "public function getProfile()\n {\n return $this->hasOne(Profile::className(), ['id' => 'profile_id']);\n }", "public function existing_profiles()\n {\n if ($this->db->table_exists('profiles'))\n {\n $this->db->select('id, temperatureopt, temperaturemax, lighthours, moisture, phvaluemin, phvaluemax');\n $this->db->where('is_default', '1');\n $query = $this->db->get('profiles');\n return $query;\n }\n }", "private function generateProfile()\n {\n \t$profile = new Profile();\n \t$profile->firstname = $this->user_name_prefix . '_' . $this->faker->firstName;\n \t$profile->lastname = $this->faker->lastName;\n \t$profile->user_id = $this->userId;\n \t$profile->save(false);\n \treturn true;\n }", "public function testExample()\n {\n $user = User::count();\n $profile = Profile:: count();\n $this->assertEquals($user,$profile);\n }", "public function getProfile()\n {\n $res = $this->getEntity()->getProfile();\n\t\tif($res === null)\n\t\t{\n\t\t\t$this->setProfile(SDIS62_Model_DAO_Abstract::getInstance($this::$type_objet)->findByCriteria('Profile', array('primary' => $this::getPrimary())));\n\t\t\treturn $this->getEntity()->getProfile();\n\t\t}\n return $res;\n }", "public function hasWpUserId(){\n return $this->_has(7);\n }", "public function testProfilePrototypeFindByIdOwnedGroups()\n {\n\n }", "public function testProfilePrototypeLinkCommunityRoles()\n {\n\n }", "public function testProfilePrototypeCreatePosts()\n {\n\n }", "function pullRemoteProfile()\n {\n $this->profile_uri = $this->trimmed('profile');\n try {\n if (Validate::email($this->profile_uri)) {\n $this->oprofile = Ostatus_profile::ensureWebfinger($this->profile_uri);\n } else if (Validate::uri($this->profile_uri)) {\n $this->oprofile = Ostatus_profile::ensureProfileURL($this->profile_uri);\n } else {\n // TRANS: Error message in OStatus plugin. Do not translate the domain names example.com\n // TRANS: and example.net, as these are official standard domain names for use in examples.\n $this->error = _m(\"Sorry, we could not reach that address. Please make sure that the OStatus address is like nickname@example.com or http://example.net/nickname.\");\n common_debug('Invalid address format.', __FILE__);\n return false;\n }\n return true;\n } catch (FeedSubBadURLException $e) {\n // TRANS: Error message in OStatus plugin. Do not translate the domain names example.com\n // TRANS: and example.net, as these are official standard domain names for use in examples.\n $this->error = _m('Sorry, we could not reach that address. Please make sure that the OStatus address is like nickname@example.com or http://example.net/nickname.');\n common_debug('Invalid URL or could not reach server.', __FILE__);\n } catch (FeedSubBadResponseException $e) {\n // TRANS: Error text.\n $this->error = _m('Sorry, we could not reach that feed. Please try that OStatus address again later.');\n common_debug('Cannot read feed; server returned error.', __FILE__);\n } catch (FeedSubEmptyException $e) {\n // TRANS: Error text.\n $this->error = _m('Sorry, we could not reach that feed. Please try that OStatus address again later.');\n common_debug('Cannot read feed; server returned an empty page.', __FILE__);\n } catch (FeedSubBadHTMLException $e) {\n // TRANS: Error text.\n $this->error = _m('Sorry, we could not reach that feed. Please try that OStatus address again later.');\n common_debug('Bad HTML, could not find feed link.', __FILE__);\n } catch (FeedSubNoFeedException $e) {\n // TRANS: Error text.\n $this->error = _m(\"Sorry, we could not reach that feed. Please try that OStatus address again later.\");\n common_debug('Could not find a feed linked from this URL.', __FILE__);\n } catch (FeedSubUnrecognizedTypeException $e) {\n // TRANS: Error text.\n $this->error = _m(\"Sorry, we could not reach that feed. Please try that OStatus address again later.\");\n common_debug('Not a recognized feed type.', __FILE__);\n } catch (Exception $e) {\n // Any new ones we forgot about\n // TRANS: Error message in OStatus plugin. Do not translate the domain names example.com\n // TRANS: and example.net, as these are official standard domain names for use in examples.\n $this->error = _m(\"Sorry, we could not reach that address. Please make sure that the OStatus address is like nickname@example.com or http://example.net/nickname.\");\n common_debug(sprintf('Bad feed URL: %s %s', get_class($e), $e->getMessage()), __FILE__);\n }\n\n return false;\n }", "public function testProfilePrototypeExistsOwnedGroups()\n {\n\n }", "public function profile()\n {\n return $this->belongsTo(UserProfile::class);\n }", "public function testProfilePrototypeUnlinkCommunityRoles()\n {\n\n }", "public function GetProfile()\n {\n return $this->profile;\n }", "function usr_has_profile($db, $uid) {\n $rv=0;\n $q='SELECT flags from user WHERE id='.intval($uid).';';\n $res=$db->query($q);\n if ($res) {\n $d=$res->fetch(PDO::FETCH_ASSOC);\n if ($d['flags'] & 1 ) $rv|=2;\n }\n $q='SELECT ukey from auth WHERE user_id='.intval($uid).';';\n $res=$db->query($q);\n if ($res) {\n $d=$res->fetch(PDO::FETCH_ASSOC);\n if (!empty($d['ukey'])) $rv|=1;\n }\n return $rv;\n }", "public function testProfilePrototypeExistsGroups()\n {\n\n }", "public function testGetProfileOtherUserSupporter()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/tony-stark\";\r\n\r\n $username = 'profileBucky@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Tony Stark', $response->body->data->user->name);\r\n\r\n $this->assertEquals(1, $response->body->data->relationships->isSupportee);\r\n\r\n }", "public function userProfile()\n {\n return $this->hasOne(config('aggregator.namespace').'UserProfile');\n }", "public function testProfilePrototypeCountCommunityRoles()\n {\n\n }", "public function testGetSiteMembershipForPerson()\n {\n }", "public function testGetInvalidAdultUsername() : void {\n// grab an email that does not exist\n$profile = Adult::getAdultByAdultUsername($this->getPDO(), \"yourmom\");\n$this->assertNull($profile);\n}", "public function get_profile($username = '')\n {\n\n\n if($username) $this->username = $username;\n\n $details = (Object) $this->user_details($this->username);\n\n $profile = $details->profile;\n\n $not_valid = !(!empty($profile) and FILE::isExist($profile,\"profile\"));\n\n if($not_valid) return;\n\n return $profile;\n\n\n }", "public function getProfile() {\n\t\treturn $this->profile;\n\t}", "public function testGetAccountProfileIn($auth)\n {\n // Grab Page\n $result = $this->actingAs($auth)\n ->visit('account/profile')\n ->see('Account Privacy')\n ->see('SPONSORED')\n ->see('ADS')\n ->see('CALENDAR')\n ->see('Edit Profile Image')\n ->seePageIs('account/profile');\n }" ]
[ "0.7313183", "0.67644936", "0.6726738", "0.6717151", "0.6700389", "0.6694808", "0.65982246", "0.6515449", "0.6451861", "0.64039105", "0.63828796", "0.6347496", "0.633259", "0.62712973", "0.6269025", "0.6254397", "0.62381446", "0.62373203", "0.62109494", "0.6209512", "0.6182171", "0.61310464", "0.6123738", "0.61198866", "0.6104943", "0.60860723", "0.60764086", "0.6075769", "0.6061719", "0.60556525", "0.60330427", "0.60301334", "0.60262096", "0.6014576", "0.59970134", "0.5974442", "0.59577775", "0.59378994", "0.5933619", "0.59253734", "0.5905219", "0.58967644", "0.5878251", "0.5864204", "0.58561033", "0.58307725", "0.58231246", "0.5813854", "0.5785119", "0.57788926", "0.57758206", "0.5765962", "0.5761275", "0.5739738", "0.5731471", "0.5729835", "0.5726196", "0.5722767", "0.570885", "0.5689173", "0.5685643", "0.5683209", "0.56806386", "0.5669352", "0.5658494", "0.5642854", "0.5639504", "0.56308156", "0.56286156", "0.56187075", "0.56121975", "0.56077445", "0.56077445", "0.56077445", "0.5599683", "0.5586813", "0.55718744", "0.55559206", "0.55537915", "0.5543303", "0.5537626", "0.5536351", "0.5535563", "0.5531081", "0.55289346", "0.5523531", "0.55232054", "0.55208796", "0.55164826", "0.5514662", "0.55105966", "0.5502623", "0.5502499", "0.5501695", "0.5498554", "0.5498328", "0.5492072", "0.5490036", "0.54815406", "0.54786175" ]
0.7236867
1
tests WP getting other user profile
тестирование получения профиля другого пользователя
public function testWPGetProfileOtherUserNoRel() { $url = "http://127.0.0.1/app_test.php/profile/view/bucky-barnes"; $username = 'profileNatasha@gmail.com'; $password = 'password'; $response = \Httpful\Request::get($url)->basicAuth($username, $password)->send(); $this->assertEquals('success', $response->body->status); $this->assertEquals('Bucky Barnes', $response->body->data->user->name); $this->assertEquals(0, $response->body->data->user->isWellnessPro); $this->assertEquals(0, $response->body->data->relationships->isSupporter); $this->assertEquals(0, $response->body->data->relationships->isSupportee); $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testDestiny2GetProfile()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "abstract protected function getUserProfile();", "public function testWPGetProfileOtherUserPatientRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = 'profileVision@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(1, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testGetOwnProfile()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = 'profileBucky@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->relationships->isFriend);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n\r\n }", "public function getUserProfile();", "public function testGetProfileOtherUserNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/steve-rogers\";\r\n\r\n $username = 'profileBucky@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Steve Rogers', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->relationships->isFriend);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testGetProfileOtherUserSupporter()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/tony-stark\";\r\n\r\n $username = 'profileBucky@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Tony Stark', $response->body->data->user->name);\r\n\r\n $this->assertEquals(1, $response->body->data->relationships->isSupportee);\r\n\r\n }", "public function testGetProfileWPNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/natasha-romanov\";\r\n\r\n $username = 'profileBucky@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Natasha Romanov', $response->body->data->user->name);\r\n $this->assertNotEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testGETProfile()\n\t{\n\t\t$request = new ERestTestRequestHelper();\n\n\t\t$request['config'] = [\n\t\t\t'url'\t\t\t=> 'http://api/profile/2',\n\t\t\t'type'\t\t=> 'GET',\n\t\t\t'data'\t\t=> null,\n\t\t\t'headers' => [\n\t\t\t\t'X_REST_USERNAME' => 'admin@restuser',\n\t\t\t\t'X_REST_PASSWORD' => 'admin@Access',\n\t\t\t],\n\t\t];\n\n\t\t$request_response = $request->send();\n\t\t$expected_response = '{\"success\":true,\"message\":\"Record Found\",\"data\":{\"totalCount\":1,\"profile\":{\"id\":\"2\",\"user_id\":\"2\",\"photo\":\"0\",\"website\":\"mysite2.com\",\"owner\":{\"id\":\"2\",\"username\":\"username2\",\"password\":\"password2\",\"email\":\"email@email2.com\"}}}}';\n\t\t$this->assertJsonStringEqualsJsonString($request_response, $expected_response);\n\t}", "public function test_can_view_profile_of_any_user()\n {\n // When i access his profile\n // Then i can see his name\n $user = create(User::class);\n\n $response = $this->get(\"/profiles/{$user->name}\");\n\n $response->assertStatus(200);\n $response->assertSeeText($user->name);\n }", "public function testProfileCheckIfUserExists()\n {\n\n }", "public function testGetProfileOtherUserFriends()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bruce-banner\";\r\n\r\n $username = 'profileBucky@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bruce Banner', $response->body->data->user->name);\r\n $this->assertEquals(1, $response->body->data->relationships->isFriend);\r\n\r\n }", "public function testProfileView()\n {\n $this->loginReader();\n\n $response = $this->get('api/user/profile/1');\n\n $response->assertStatus(200);\n }", "public function testCheckProfile()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('http://localhost:8000/user/12/profile')\n ->assertSee('My Profile');\n });\n }", "public function testUserProfile() {\n\t\tif (!$this->_hasTrigger('userProfile')) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$expected = $this->_manualCall('userProfile', $this->ViewtEvent);\n\n\t\t$result = $this->Event->trigger($this->ViewObject, $this->plugin . '.userProfile');\n\t\t$this->assertEquals($expected, $result);\n\t}", "public function check_for_profile(){\n\t\t\n\t\t//get username for logged in user\n\t\t$user_name = $_SESSION['username'];\n\t\t// get user id for the logged in user\n\t\t$user_id = Database::user_id_query($user_name);\n\t\t//call static fucntion to check if user profile already exists\n\t\t$result = UserProfileHelper::check_profile($user_id);\n\t\t//var_dump($result);\n\t\treturn $result;\n\t}", "public function testGuestNotAccessProfilePage()\n\t{\n\t\t$this->open('/user/edit/' . $this->users['sample1']['intUserID']);\n\t\t$this->assertTextNotPresent('Edit');\n\n\t\t$this->open('/user/edit/' . $this->users['sample2']['intUserID']);\n\t\t$this->assertTextNotPresent('Edit');\n\t}", "public function testGetAccountProfileIn($auth)\n {\n // Grab Page\n $result = $this->actingAs($auth)\n ->visit('account/profile')\n ->see('Account Privacy')\n ->see('SPONSORED')\n ->see('ADS')\n ->see('CALENDAR')\n ->see('Edit Profile Image')\n ->seePageIs('account/profile');\n }", "function getProfile(){\n $profile = $this->loadUser();\n return $profile;\n }", "public function testProfileUnilogin()\n {\n\n }", "function get_profile($field, $user = \\false)\n {\n }", "public function public_profile_get() {\n $this->response(App\\Auth::profile(), REST_Controller::HTTP_OK);\n }", "function at_follow_is_pro_user() {\n $isPro = false;\n $options = get_option('addthis_settings');\n $profile = $options['profile'];\n if ($profile) {\n $request = wp_remote_get( \"http://q.addthis.com/feeds/1.0/config.json?pubid=\" . $profile );\n $server_output = wp_remote_retrieve_body( $request );\n $array = json_decode($server_output);\n // check for pro user\n if (array_key_exists('_default',$array)) {\n $isPro = true;\n } else {\n $isPro = false;\n }\n }\n return $isPro;\n}", "public function testProfilePersonalInfo()\n {\n // Create a user with the username 'johndoe'\n $user = factory(User::class)->create(['username'=>'johndoe']);\n // Add a profile record to the user\n $profile = factory(Profile::class)->make(['country_id'=>4]);\n // Save the user\n $user->profile()->save($profile);\n // Goto the profile browse page\n $this->visit(route('profile.view', ['name'=>'johndoe']))\n ->see('seeInElement', '.country', DB::table('countries')->where('id', 4)->first()->full_name);\n }", "public function testGetProfileWPPatientRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/vision-jones\";\r\n\r\n $username = 'profileBucky@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Vision Jones', $response->body->data->user->name);\r\n $this->assertNotEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(1, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function InitOtherUser()\n {\n $login = trim( strip_tags( _v('login', '') ) );\n //if link has login\n if ($login)\n {\n if ($this->IsAuth() && $login==$this->mUserInfo['Name'])\n {\n //show current user profile\n $this->mOtherUserId = 0;\n return false; \n }\n else\n {\n $this->mOtherUserInfo = UserQuery::create()\n ->Select(array('Id', 'Email', 'Status', 'Pass', 'LastReload', 'FirstName', 'LastName', 'Name', 'Blocked', 'BlockReason', 'Country',\n 'Avatar', 'Location', 'HideLoc', 'About', 'BandName', 'Likes', 'Dob', 'Gender', 'YearsActive', 'Genres', 'Members', 'Website', 'Bio', 'RecordLabel', 'RecordLabelLink', 'UserPhone', 'State', 'HashTag', 'FbOn', 'TwOn', 'InOn'))\n ->where('LOWER(Name) = \"' . ToLower( $login ) . '\"')\n\t\t\t\t\t->filterByEmailConfirmed(1)\n\t\t\t\t\t->filterByBlocked(0)\n ->filterByStatus(1, '>=')->findOne();\n\n if (!empty($this->mOtherUserInfo)) \n {\n $this->mOtherUserId = $this->mOtherUserInfo['Id'];\n\n\t\t\t\t\t$genres_list = User::GetGenresList();\n\t\t\t\t\t\n\t\t\t\t\t$genresListArr = explode(',',$this->mOtherUserInfo['Genres']);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tforeach($genresListArr as $key=> $val)\n\t\t\t\t\t{\n\t\t\t\t\t\t$userGenres .= $genres_list[$val].'/';\n\t\t\t\t\t}\n\t\t\t\t\t$this->mOtherUserInfo['GenresList'] = trim($userGenres, '/');\t\n\n\t\t\t\t//Fellow count\n\t\t\t\t$this->mOtherUserInfo['FollowersCount'] = UserFollow::GetFollowersUserListCount($this->mOtherUserInfo['Id'], USER_FAN);\n\t\t\t\t\n\t\t\t\t$memTrack = unserialize($this->mOtherUserInfo['Members']);\t\t\t\n\t\t\t\t$this->mOtherUserInfo['Members'] = $memTrack[0];\n\t\t\t\t$this->mOtherUserInfo['Tracks'] = $memTrack[1];\n\n\t\t\t\t\t\t\t\t\t\t\n } else {\n\t\t\t\t\t$this->mOtherUserId = -1;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n return true;\n }\n }\n }", "function wpcom_vip_get_user_profile( $email_or_id ) {\n\n\tif ( is_numeric( $email_or_id ) ) {\n\t\t$user = get_user_by( 'id', $email_or_id );\n\t\tif ( ! $user )\n\t\t\treturn false;\n\n\t\t$email = $user->user_email;\n\t} elseif ( is_email( $email_or_id ) ) {\n\t\t$email = $email_or_id;\n\t} else {\n\t\t$user_login = sanitize_user( $email_or_id, true );\n\t\t$user = get_user_by( 'login', $user_login );\n\t\tif ( ! $user )\n\t\t\treturn;\n\n\t\t$email = $user->user_email;\n\t}\n\n\t$hashed_email = md5( strtolower( trim( $email ) ) );\n\t$profile_url = esc_url_raw( sprintf( '%s.gravatar.com/%s.php', ( is_ssl() ? 'https://secure' : 'http://www' ), $hashed_email ), array( 'http', 'https' ) );\n\n\t$profile = wpcom_vip_file_get_contents( $profile_url, 1, 900 );\n\tif ( $profile ) {\n\t\t$profile = unserialize( $profile );\n\n\t\tif ( is_array( $profile ) && ! empty( $profile['entry'] ) && is_array( $profile['entry'] ) ) {\n\t\t\t$profile = $profile['entry'][0];\n\t\t} else {\n\t\t\t$profile = false;\n\t\t}\n\t}\n\treturn $profile;\n}", "function a_user_has_a_profile()\n {\n $user = create('App\\User');\n\n $this->get(\"/profiles/{$user->name}\")\n ->assertSee($user->name);\n }", "function getUserProfile()\n\t{\n\t\t// refresh tokens if needed \n\t\t$this->refreshToken();\n\n\t\ttry{\n\t\t\t$authTest = $this->api->api( \"auth.test\" );\n\t\t\t$response = $this->api->get( \"users.info\", array( \"user\" => $authTest->user_id ) );\n\t\t}\n\t\tcatch( SlackException $e ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an error: $e\", 6 );\n\t\t}\n\n\t\t// check the last HTTP status code returned\n\t\tif ( $this->api->http_code != 200 ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an error. \" . $this->errorMessageByStatus( $this->api->http_code ), 6 );\n\t\t}\n\n\t\tif ( ! is_object( $response ) || ! isset( $response->user->id ) ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} api returned an invalid response.\", 6 );\n\t\t}\n\t\t# store the user profile. \n\t\t$this->user->profile->identifier\t\t=\t@$response->user->id;\n\t\t$this->user->profile->profileURL\t\t=\t\"\";\n\t\t$this->user->profile->webSiteURL\t\t=\t\"\";\n\t\t$this->user->profile->photoURL\t\t\t=\t@$response->user->profile->image_original;\n\t\t$this->user->profile->displayName\t\t=\t@$response->user->profile->real_name;\n\t\t$this->user->profile->description\t\t=\t\"\";\n\t\t$this->user->profile->firstName\t\t\t=\t@$response->user->profile->first_name;\n\t\t$this->user->profile->lastName\t\t\t=\t@$response->user->profile->last_name;\n\t\t$this->user->profile->gender\t\t\t=\t\"\";\n\t\t$this->user->profile->language\t\t\t=\t\"\";\n\t\t$this->user->profile->age\t\t\t\t=\t\"\";\n\t\t$this->user->profile->birthDay\t\t\t=\t\"\";\n\t\t$this->user->profile->birthMonth\t\t=\t\"\";\n\t\t$this->user->profile->birthYear\t\t\t=\t\"\";\n\t\t$this->user->profile->email\t\t\t\t=\t@$response->user->profile->email;\n\t\t$this->user->profile->emailVerified\t =\t\"\";\n\t\t$this->user->profile->phone\t\t\t\t=\t\"\";\n\t\t$this->user->profile->address\t\t\t=\t\"\";\n\t\t$this->user->profile->country\t\t\t=\t\"\";\n\t\t$this->user->profile->region\t\t\t=\t\"\";\n\t\t$this->user->profile->city\t\t\t\t=\t\"\";\n\t\t$this->user->profile->zip\t\t\t\t=\t\"\";\n\n\t\treturn $this->user->profile;\n\t}", "public function testManagerNotAccessProfileUser()\n\t{\n\t\t$this->login($this->users['sample2']['varName'], $this->passwordManager);\n\t\t$this->open('/user/edit/' . $this->users['sample1']['intUserID']);\n\t\t$this->assertTextPresent('You don\\'t have access to this section.');\n\t}", "public function testProfileApp()\n {\n $client = static::createClient();\n $client->request('GET', '/candidate/profile');\n $this->assertEquals(301, $client->getResponse()->getStatusCode());\n\n //authenticated users are allowed\n $client = $this->createAuthClient('user@example.com', 'user');\n $crawler = $client->request('GET', '/candidate/profile');\n $response = $client->getResponse();\n $this->assertEquals(301, $response->getStatusCode());\n $this->assertTrue(0 === strpos($response->getTargetUrl(), 'https'));\n\n //https and authentication loads page\n $client = $this->createAuthClient('user@example.com', 'user');\n $crawler = $client->request('GET', '/candidate/profile', [], [], ['HTTPS' => true]);\n $this->assertTrue($crawler->filter('html:contains(\"Loading ...\")')->count() > 0);\n }", "public function testGetCustomerProfile()\n {\n self::testCreateCustomerProfile();\n\n $response = $this->gateway->getCustomerProfile($this->customerProfileId);\n\n $this->assertTrue($response->isSuccess());\n }", "private function getProfile() {\n if(!$this->profile = $this->getNikePlusFile('http://nikerunning.nike.com/nikeplus/v2/services/app/get_user_data.jsp?_plus=true')) {\n throw new Exception($this->feedErrorMessage);\n }\n }", "public function testProfileExistsGetProfilesidExists()\n {\n\n }", "public function testProfileCheckIfDisplayNameIsTaken()\n {\n\n }", "function getProfile(){\n\t\t\t\t$this->__dataDecode();\n\t\t\t\t$data=$this->data;\n\t\t\t\t$playerId = $data['User']['playerId'];\n\t\t\t\t$token = $data['User']['secToken'];\n\t\t\t\t//pr($token);die('ok');\n\t\t\t\t$playerdetails = $this->User->find('first', array('conditions' => array('User.id' => $playerId,'User.secToken' => $token)));\n\t\t\t\t\t\t//pr($playerdetails);die;\t\n\t\t\t\t\t\tif($playerdetails)\n\t\t\t\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t\t$response['error']\t\t\t= 0;\n\t\t\t\t\t\t$response['response']['firstName'] \t= $playerdetails['User']['firstname'];\n\t\t\t\t\t\t$response['response']['wieght'] \t= $playerdetails['User']['wieght'];\n\t\t\t\t\t\t$response['response']['school'] \t= $playerdetails['User']['school'];\n\t\t\t\t\t\t$response['response']['profilePicture'] = LIVE_SITE.'/img/upload_userImages/'.$playerdetails['User']['image'];\n\t\t\t\t\t\t$this->set('response', $response);\n\t\t\t\t\t\techo json_encode($response);\n\t\t\t\t\t\tdie();\n\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$response['error']\t\t\t= 1;\n\t\t\t\t\t\t\t$response['response']['result'] \t= 'failure';\n\t\t\t\t\t\t\t$response['response']['message']\t= 'UnAuthorized User';\n\t\t\t\t\t\t\t$this->set('response', $response);\n\t\t\t\t\t\t\techo json_encode($response);\n\t\t\t\t\t\t\tdie();\n\n}\n}", "public function testDestiny2GetLinkedProfiles()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function getProfile($userid);", "public function testProfileFind()\n {\n\n }", "public function twitter_user_profile() {\n $current_uid = isset($_GET['team']) ? $_GET['muid'] : \\Drupal::currentUser()->id();\n $TwitterHelper = new TwitterHelperFunction();\n $properties = ['token_access'];\n $response_token = \\Drupal::service('social_media.social_media_controller')->getKabbodeNetworkStatusProperty(174, $current_uid, $properties);\n $connection = new TwitterOAuth($TwitterHelper->getTwitterApiKey(), $TwitterHelper->getTwitterSecretKey(), $response_token['token_access']->oauth_token, $response_token['token_access']->oauth_token_secret);\n $verify_account = $connection->get('account/verify_credentials');\n return $verify_account;\n }", "abstract function getUserProfileProperty($user, $property_name);", "public function getProfileAction()\n\t{\n\t\t// Find own profile by authorisation token\n\t\tif ($this->request->hasPost('token')) {\n\t\t\tif ($auth = AuthTokens::findFirstByToken($this->request->getPost('token'))) {\n\t\t\t\treturn $this->reply->asJson([\n\t\t\t\t\t'success' => true,\n\t\t\t\t\t'message' => '',\n\t\t\t\t\t'user' => [\n\t\t\t\t\t\t'firstname' => $auth->users->userFirstname,\n\t\t\t\t\t\t'lastname' => $auth->users->userLastname,\n\t\t\t\t\t\t'prefix' => $auth->users->userPrefix,\n\t\t\t\t\t\t'phone' => $auth->users->userPhone,\n\t\t\t\t\t\t'email' => $auth->users->userEmail,\n\t\t\t\t\t\t'points' => $auth->users->userPoints,\n\t\t\t\t\t]\n\t\t\t\t]);\n\t\t\t} else {\n\t\t\t\treturn $this->reply->withFail(Response::ERROR_INVALID_AUTH);\n\t\t\t}\n\n\t\t// Find another profile by user id\n\t\t} else if (\n\t\t\t$this->request->hasPost('id') &&\n\t\t\tis_numeric($this->request->getPost('id'))\n\t\t) {\n\t\t\tif ($user = Users::findFirst($this->request->getPost('id'))) {\n\t\t\t\treturn $this->reply->asJson([\n\t\t\t\t\t'success' => true,\n\t\t\t\t\t'message' => '',\n\t\t\t\t\t'user' => [\n\t\t\t\t\t\t'firstname' => $user->userFirstname,\n\t\t\t\t\t\t'lastname' => $user->userLastname,\n\t\t\t\t\t\t'prefix' => $user->userPrefix,\n\t\t\t\t\t\t'points' => $user->userPoints,\n\t\t\t\t\t]\n\t\t\t\t]);\n\t\t\t} else {\n\t\t\t\treturn $this->reply->asJson([\n\t\t\t\t\t'success' => false,\n\t\t\t\t\t'message' => 'Invalid user id.'\n\t\t\t\t]);\n\t\t\t}\n\n\t\t// Invalid parameters\n\t\t} else {\n\t\t\treturn $this->reply->withFail(Response::ERROR_INVALID_PARAMS);\n\t\t}\n\t}", "public function testProfileFindOne()\n {\n\n }", "function requestProfile() {\n $username = $_GET['username'];\n\n $response = retrieveProfile($username);\n\n if ($response['status'] == 'SUCCESS') {\n echo json_encode($response['response']);\n } else {\n errorHandler($response['status'], $response['code']);\n }\n }", "function have_profile(){\n\treturn ( get_profile('enabled') === true && get_profile() !== -1 );\n}", "public function getProfile()\n {\n return $this->request('me');\n }", "public function profile(){\n\t\t$this->common_lib->profile($this->user,$this->menu,$this->group->name);\n\t}", "public function testGetOneUserInformation()\n {\n $response = $this->json('GET', $this->userEndpoint.'/prostoalex');\n\n // It should return a valid user json with all the basic attributes filled\n $response\n ->assertStatus(200)\n ->assertJsonStructure([\n 'created',\n 'id',\n 'karma',\n 'submitted',\n 'about',\n ])\n ->assertJsonFragment([\n 'id' => 'prostoalex'\n ]);\n }", "public function getInfoProfile(){\n return $this->get_user_by_id($this->getAccountID());\n }", "public function testProfileExistsHeadProfilesid()\n {\n\n }", "public static function getProfile($gotuser) {\n $assocprofile = User::with('profile')->find($gotuser->id)->profile;\n return $assocprofile;\n }", "public function getProfile()\n {\n return $this->profile;\n }", "public function getProfile()\n {\n return $this->profile;\n }", "public function getProfile()\n {\n return $this->profile;\n }", "private function checkProfile($profile)\n {\n if ($profile === null) {\n $profile = $this->getProfile();\n return $profile;\n } elseif ($this->getProfile()->getUsername() === $profile || $this->getDoorman()->isKitchenStaff() === true) {\n $profileRepository = $this->getDoctrine()->getRepository('MealzUserBundle:Profile');\n $profile = $profileRepository->find($profile);\n return $profile;\n }\n\n return null;\n }", "public function getUserProfile(){\n\n\t\treturn $this->cnuser->getUserProfile($this->request->header('Authorization'));\n\t}", "public function get_profile($user_profile_data){\n\t\t$user_name = $_SESSION['username'];\n\t\t// get user id for the logged in user\n\t\t$user_id = Database::user_id_query($user_name);\n\t\t//call static fucntion to get contents of user profile\n\t\t$user_profile_data = UserProfileHelper::get_user_profile($user_id);\n\t\treturn $user_profile_data;\n\t}", "function getUserProfile()\n\t{\n\t\t// ask kakao api for user infos\n\t\t$data = $this->api->api( \"user/me\" ); \n \n\t\tif ( ! isset( $data->id ) || isset( $data->error ) ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an invalid response.\", 6 );\n\t\t}\n\n\t\t$this->user->profile->identifier = @ $data->id; \n\t\t$this->user->profile->displayName = @ $data->properties->nickname;\n\t\t$this->user->profile->photoURL = @ $data->properties->thumbnail_image;\n\n\t\treturn $this->user->profile;\n\t}", "public function testGetProfileUserNotExist()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/thor\";\r\n\r\n $username = 'profileBucky@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n //AppBundle:User object not found. (404 Not Found)\r\n $this->assertTrue($response->code === 404);\r\n\r\n }", "public function testUserMeGet()\n {\n }", "public function testGetAccountProfileOut()\n {\n // Grab Page\n $result = $this->visit('account/profile')\n ->see('create your suaray account')\n ->see('welcome to suaray')\n ->seePageIs('/account/register');\n }", "function yz_profile() {\n\treturn Youzer_Profile::get_instance();\n}", "function getUserProfile()\n\t{\n\t\t$data = $this->api->api( \"v1/market/private/user/account.json\" );\n\t\tif ( ! isset( $data->account ) ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an invalid response.\", 6 );\n\t\t}\n\n\t\t$this->user->profile->identifier = @ $data->account->surname;\n\t\t$this->user->profile->displayName = @ $data->account->firstname . ' ' . $data->account->surname;\n\t\t$this->user->profile->photoURL = @ $data->account->image;\n\t\t$this->user->profile->profileURL = @ $data->account->image;\n\n\t\t// request user emails from envato api\n\t\ttry{\n\t\t\t$email = $this->api->api(\"v1/market/private/user/email.json\");\n\t\t\t$this->user->profile->email = @ $email->email;\n\t\t}\n\t\tcatch( Exception $e ){\n\t\t\tthrow new Exception( \"User email request failed! {$this->providerId} returned an error: $e\", 6 );\n\t\t}\n\n\t\treturn $this->user->profile;\n\t}", "function user_user_profile($CI,$user){\n\t\t$CI->user->head($user);\n\t}", "protected function getSimulatingUser()\n {\n // Ideally, return Profile\n }", "public function profile(){\n // using the auth() helper we are returning the authenticated user info\n return auth('api')->user();\n }", "public function profile()\n\t{\n\t\t// echo $this->fungsi->user_login()->nik;\n\t\t$query = $this->user_m->get($this->fungsi->user_login()->nik);\n\t\t$data['data'] = $query->row();\n\t\t$this->template->load('template2', 'profile', $data);\n\t}", "function ds_get_social_profiles() {\n\n // Return a filterable social profile.\n return apply_filters(\n 'ds_social_profiles',\n array()\n );\n \n}", "public function testProfileIndexFound()\n {\n $profileService = $this->createProfileServiceMock();\n\n $profileService\n ->method('getProfile')\n ->willReturn(new BlokkrUser());\n\n $client = static::createClient();\n $client->getContainer()->set(\"blokkr.service.profile\", $profileService);\n $client->request(\"GET\", \"/profile/1\");\n\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n }", "public function testGetProfileNotLoggedIn()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $response = \\Httpful\\Request::get($url)->send();\r\n\r\n //ERROR Call to a member function getWellnessProfessional() on string (500 Internal Server Error)\r\n $this->assertEquals(302, $response->code);\r\n\r\n }", "function owa_wpAuthUser($auth_status) {\r\n\r\n\t$current_user = wp_get_current_user();\r\n\t\r\n if ( $current_user instanceof WP_User ) { \r\n \t// logged in, authenticated\r\n \t$cu = owa_coreAPI::getCurrentUser();\r\n \t\r\n \t$cu->setAuthStatus(true);\r\n \t\r\n \tif (isset($current_user->user_login)) {\r\n\t\t\t$cu->setUserData('user_id', $current_user->user_login);\r\n\t\t\towa_coreAPI::debug(\"Wordpress User_id: \".$current_user->user_login);\r\n\t\t}\r\n\t\t\r\n\t\tif (isset($current_user->user_email)) {\t\r\n\t\t\t$cu->setUserData('email_address', $current_user->user_email);\r\n\t\t}\r\n\t\t\r\n\t\tif (isset($current_user->first_name)) {\r\n\t\t\t$cu->setUserData('real_name', $current_user->first_name.' '.$current_user->last_name);\r\n\t\t\t$cu->setRole(owa_translate_role($current_user->roles));\r\n\t\t}\r\n\t\t\r\n\t\towa_coreAPI::debug(\"Wordpress User Role: \".print_r($current_user->roles, true));\r\n\t\towa_coreAPI::debug(\"Wordpress Translated OWA User Role: \".$cu->getRole());\r\n\t\t\r\n\t\t// fetch the list of allowed blogs from WP\r\n\t\t$domains = array();\r\n\t\t$allowedBlogs = get_blogs_of_user($current_user->ID);\r\n\t\r\n\t\tforeach ( $allowedBlogs as $blog) {\r\n\t\t\t$domains[] = $blog->siteurl;\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// check to see if we are installing before trying to load sites\r\n\t\t// other wise you run into a race condition as config file\r\n\t\t// might not be created.\r\n\t\tif (! defined('OWA_INSTALLING') ) {\r\n\t\t\t// load assigned sites list by domain\r\n \t\t$cu->loadAssignedSitesByDomain($domains);\r\n \t}\r\n \t\r\n\t\t$cu->setInitialized();\r\n \r\n \treturn true;\r\n \r\n } else {\r\n \t// not logged in to WP and therefor not authenticated\r\n \treturn false;\r\n }\t\r\n}", "public function GetProfile()\n {\n return $this->profile;\n }", "public function _assertProfileExists($profile_uid)\n {\n }", "public function testProfile() {\n $profile = <<<PROFILE_TEST\ncore_version_requirement: '*'\nname: The Perfect Profile\ntype: profile\ndescription: 'This profile makes Drupal perfect. You should have no complaints.'\nPROFILE_TEST;\n\n vfsStream::setup('profiles');\n vfsStream::create([\n 'fixtures' => [\n 'invalid_profile.info.txt' => $profile,\n ],\n ]);\n $info = $this->infoParser->parse(vfsStream::url('profiles/fixtures/invalid_profile.info.txt'));\n $this->assertFalse($info['core_incompatible']);\n }", "public function testVisitUserAccountProfilePageRedirectsToLogin()\n {\n $response = $this->call('GET', $this->accountProfilePageUrl);\n $response->assertRedirect('login');\n }", "public function getProfile() {\n\t\treturn $this->profile;\n\t}", "public function testProfilePrototypeGetCommunityRoles()\n {\n\n }", "function yz_hide_profile_settings_page_for_other_users() {\n\n if ( apply_filters( 'yz_hide_profile_settings_page_for_other_users', true ) ) {\n if ( bp_is_user() && ! is_super_admin() && ! bp_is_my_profile() ) {\n bp_core_remove_nav_item( bp_get_profile_slug() );\n }\n }\n\n}", "public function testUser1() {\n // Load the user 1 profile page.\n $this->drupalGet('/user/1');\n // Confirm the page title is correct.\n $this->assertRaw('<title>Access denied | ');\n $this->assertNoRaw('<title>admin | ');\n $this->assertNoRaw('<title>Site under maintenance | ');\n\n // Put the site into maintenance mode.\n \\Drupal::state()->set('system.maintenance_mode', TRUE);\n Cache::invalidateTags(['rendered']);\n\n // Load the user 1 profile page again.\n $this->drupalGet('/user/1');\n // Confirm the page title has changed.\n $this->assertNoRaw('<title>Access denied | ');\n $this->assertNoRaw('<title>admin | ');\n $this->assertRaw('<title>Site under maintenance | ');\n }", "function userdetail_callback() {\n\tif ( isset( $_REQUEST['security'] ) ) {\n\t\t$nonce = strval( wp_unslash( $_REQUEST['security'] ) );\n\t\tif ( wp_verify_nonce( $nonce, 'nonce_custom_endpoint' ) ) {\n\t\t\t$userid = isset( $_REQUEST['userid'] ) ? intval( $_REQUEST['userid'] ) : 0;\n\t\t\tif ( 0 !== $userid ) {\n\t\t\t\t$response = wp_remote_get( API_CALL_URL . 'users/' . $userid );\n\t\t\t\t$data['data']['error'] = '';\n\t\t\t\t$data['data'] = json_decode( $response['body'] );\n\n\t\t\t\techo wp_json_encode( $data );\n\t\t\t} else {\n\t\t\t\t$data['data'] = array( 'error' );\n\t\t\t\techo wp_json_encode( $data );\n\t\t\t}\n\t\t\twp_die();\n\t\t} else {\n\t\t\twp_die();\n\t\t}\n\t} else {\n\t\twp_die();\n\t}\n}", "function fetch_user_profile($data)\n {\n // $data['is_logged_in'] = 1;\n // $data = array('username' => $data);\n $this->load->library('encrypt');\n $profile = $this->db->get_where('user', array('email' => $data));\n if ($profile->num_rows() > 0) {\n $profile = $profile->row_array();\n $profile['avatar'] = ($profile['avatar'] != '' && file_exists('./uploads/ava/' . $profile['avatar'])) ? base_url() . 'uploads/ava/' . $profile['avatar'] : '';\n $profile['expire_date'] = ($profile['expire_date']) ? date('Y-m-d', $profile['expire_date']) : '';\n $profile['password'] = $this->encrypt->decode($profile['password']);\n $profile['city_name'] = db_get_one('ref_city', 'name', \"id = '\" . $profile['city'] . \"'\");;\n $profile['workshop_name'] = db_get_one('ref_location', 'location',\n \"id_ref_location = '\" . $profile['nearest_workshop'] . \"'\");;\n } else {\n $profile = false;\n }\n return $profile;\n }", "function action_profile_show() {\n // Process request with using of models\n $user = get_authorized_user();\n // Make Response Data\n if ($user !== NULL) {\n $data = [\n 'profile' => $user,\n ];\n return ['view' => 'user/show', 'data' => $data];\n } else {\n return error403();\n }\n}", "function GetUserProfileInfo($access_token) {\t\n\t\t$url = 'https://www.googleapis.com/plus/v1/people/me';\t\t\t\n\t\t\n\t\t$ch = curl_init();\t\t\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\t\t\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\t\tcurl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: Bearer '. $access_token));\n\t\t$data = json_decode(curl_exec($ch), true);\n\t\t$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\t\t\n\t\tif($http_code != 200) \n\t\t\tthrow new Exception('Error : Failed to get user information');\n\t\t\t\n\t\treturn $data;\n\t}", "public function index(){\n $this->existing_profile=$this->profile_model->read_highest_rank_profiles(1);\n \n //Fetch this profile with the api and ensure it matches\n $test_name=\"Checking API can be used to fetch the top profile\";\n $test1=$this->checkingApiCanFetchAProfile($this->existing_profile[0]['user_id']);\n $expected_result=TRUE;\n echo $this->unit->run($test1,$expected_result,$test_name,$notes=\"Assumes atleast 1 account is created\");\n\n //Fetch the same profile by searching for it using its first_name\n $test_name=\"Checking API can be used to fetch same profile using search\";\n $test2=$this->checkingApiCanFetchProfileUsingSearch($this->existing_profile[0]['first_name']);\n $expected_result=TRUE;\n echo $this->unit->run($test2,$expected_result,$test_name,$notes=\"Assumes first result found has identical first name\");\n \n }", "public function testProfilePrototypeGetPosts()\n {\n\n }", "function cacap_get_commons_profile_url( $user_id ) {\n\t$url = trailingslashit( bp_core_get_user_domain( $user_id ) . buddypress()->profile->slug );\n\t$url = add_query_arg( 'commons-profile', '1', $url );\n\treturn apply_filters( 'cacap_get_commons_profile_url', $url, $user_id );\n}", "public function forceProfilePage() {\n\t\t$user = wp_get_current_user();\n\t\tif ( ! is_object( $user ) ) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$settings = Auth_Settings::instance();\n\t\tif ( $settings->force_auth != true ) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//not enable for this role oass\n\t\tif ( ! Auth_API::isEnableForCurrentRole( $user ) ) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//check if this role is forced\n\t\tif ( ! Auth_API::isForcedRole( $user ) ) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//user already enable OTP\n\t\tif ( Auth_API::isUserEnableOTP( $user->ID ) ) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$screen = get_current_screen();\n\t\tif ( $screen->id != 'profile' ) {\n\t\t\twp_safe_redirect( admin_url( 'profile.php' ) . '#show2AuthActivator' );\n\t\t\texit;\n\t\t}\n\t}", "function display_user_profile_fields() {\r\n global $wpdb, $user_id, $wpi_settings;\r\n $profileuser = get_user_to_edit($user_id);\r\n\r\n include($wpi_settings['admin']['ui_path'] . '/profile_page_content.php');\r\n }", "public function get_profile_details_view() {\n $html = '';\n if ( $this->get_access_token() ) {\n $uri = 'https://www.googleapis.com/oauth2/v2/userinfo';\n $params = array(\n 'sslverify' => false,\n 'timeout' => 60,\n 'headers' => array(\n 'Content-Type' => 'application/json',\n 'Authorization' => 'Bearer ' . $this->get_access_token(),\n ),\n );\n\n $response = wp_remote_get( $uri, $params );\n\n if ( !is_wp_error( $response ) && 200 == $response[ 'response' ][ 'code' ] && 'OK' == $response[ 'response' ][ 'message' ] ) {\n $body = json_decode( $response[ 'body' ] );\n $html = $this->get_view( 'profile-details.php', array( 'name' => $body->name, 'picture' => $body->picture ) );\n\n $this->debug( 'Profile Details retrieved successfully', $body );\n } else {\n $this->error( 'Error while retrieving user information: ', $response );\n }\n }\n\n return $html;\n }", "function do_personal()\r\n\t{\r\n\r\n\t\t$this->lib->do_profile();\r\n\r\n\t}", "function url_profile_user(int $wordpress_id): string\n{\n return \\admin_url(\"user-edit.php?user_id=$wordpress_id\");\n}", "public function get_profile($username = '')\n {\n\n\n if($username) $this->username = $username;\n\n $details = (Object) $this->user_details($this->username);\n\n $profile = $details->profile;\n\n $not_valid = !(!empty($profile) and FILE::isExist($profile,\"profile\"));\n\n if($not_valid) return;\n\n return $profile;\n\n\n }", "function is_pro_user($user_id = false) {\r\n\t\tglobal $wpdb, $current_user, $current_site;\r\n\r\n\t\tif ( !$user_id ) {\r\n\t\t\t$user_id = $current_user->ID;\r\n\t\t}\r\n $user_id = intval($user_id);\r\n\r\n\t\tif ( is_super_admin($user_id) )\r\n\t\t\treturn true;\r\n\r\n\t\t//very db intensive, so we cache (1 hour)\r\n\t\t$expire_time = time()-3600;\r\n\t\t@list($expire, $is_pro) = get_user_meta($user_id, 'psts_user', true);\r\n\t\tif ($expire && $expire >= $expire_time) {\r\n\t return $is_pro;\r\n\t }\r\n\r\n\t\t//TODO - add option to select which user levels from supporter blog will be supporter user. Right now it's all (>= Subscriber)\r\n\t\t//$results = $wpdb->get_results(\"SELECT * FROM `$wpdb->usermeta` WHERE `user_id` = $user_id AND `meta_key` LIKE 'wp_%_capabilities' AND `meta_value` LIKE '%administrator%'\");\r\n\t\t$results = $wpdb->get_results(\"SELECT * FROM `$wpdb->usermeta` WHERE `user_id` = $user_id AND `meta_key` LIKE '{$wpdb->base_prefix}%_capabilities'\");\r\n\t if (!$results) {\r\n\t //update cache\r\n\t update_user_meta($user_id, 'psts_user', array(time(), 0));\r\n\t return false;\r\n\t }\r\n\r\n\t foreach ($results as $row) {\r\n\t\t $tmp = explode('_', $row->meta_key);\r\n\t\t //skip main blog\r\n\t\t if ($tmp[1] != $current_site->blogid)\r\n\t $blog_ids[] = $tmp[1];\r\n\t }\r\n\t $blog_ids = implode(',',$blog_ids);\r\n\r\n\t $count = $wpdb->get_var(\"SELECT COUNT(*) FROM {$wpdb->base_prefix}pro_sites WHERE expire > '\" . time() . \"' AND blog_ID IN ($blog_ids)\");\r\n\t if ($count) {\r\n\t update_user_meta($user_id, 'psts_user', array(time(), 1)); //update cache\r\n\t return true;\r\n\t } else {\r\n\t //update cache\r\n\t update_user_meta($user_id, 'psts_user', array(time(), 0)); //update cache\r\n\t return false;\r\n\t }\r\n\t}", "private function getUser()\n {\n $userObj = new Core_Model_Users;\n return $userObj->profile();\n }", "function wponion_user_profile( $instance_id_or_args = array(), $fields = array() ) {\n\t\tif ( is_string( $instance_id_or_args ) && empty( $fields ) ) {\n\t\t\treturn wponion_user_profile_registry( $instance_id_or_args );\n\t\t}\n\t\treturn new User_Profile( $instance_id_or_args, $fields );\n\t}", "public function test_auth_code_redemption_with_profile() {\n\t\tstatic::$test_auth_code['scope'] = 'profile';\n\t\t$code = $this->set_auth_code();\n\t\t$response = $this->create_form( 'POST', \n\t\t\t\tarray(\n\t\t\t\t\t'grant_type' => 'authorization_code',\n\t\t\t\t\t'code' => $code,\n\t\t\t\t\t'client_id' => 'https://app.example.com',\n\t\t\t\t\t'redirect_uri' => 'https://app.example.com/redirect',\n\t\t\t\t)\n\t\t);\n\t\t$this->assertEquals( 200, $response->get_status(), 'Response: ' . wp_json_encode( $response ) );\n\t\t$data = $response->get_data();\n\t\t$this->assertArrayNotHasKey( 'access_token', $data );\n\t\t$this->assertEquals( \n\t\t\tarray( \n\t\t\t\t'me' => get_author_posts_url( static::$author_id ),\n\t\t\t\t'profile' => indieauth_get_user( static::$author_id )\n\t\t\t), \n\t\t\t$data, \n\t\t\t'Response: ' . wp_json_encode( $data ) \n\t\t);\n\t\t// Reset Just in Case.\n\t\tunset( static::$test_auth_code['scope'] );\n\t}", "function getProfileInfo($user){\n\t\tglobal $db;\n\t\t$sql = \"SELECT * from personalinfo WHERE user_email ='$user'\";\n\t\t$result =$db->query($sql);\n\t\t$infotable = $result->fetch_assoc();\n\t\treturn $infotable;\n\t}", "function get_user()\n{\n$response = $GLOBALS['http']->request('GET', '/api/users/@me', [\n 'headers' => [\n 'Authorization' => 'Bearer ' . $_SESSION['auth_token']\n ]\n]);\n\n$responseBody = $response->getBody(true); \n$response = json_decode($responseBody, true);\n$_SESSION['username'] = $response['username'];\n$_SESSION['discrim'] = $response['discriminator'];\n$_SESSION['user_id'] = $response['id'];\n$_SESSION['user_avatar'] = $response['avatar'];\n}", "function get_user_profile_image_url($user_id){\n\t$image_url = THEME_URI.'/images/profile_placeholder.png';\n\tif($image_relative_path = get_user_meta($user_id, 'profile_image_url', true))\n\t{\n\t\t$image_url = $image_relative_path;\n\t}\n\treturn $image_url;\n}", "public function getProfile(){\n\t\treturn (new Profile($this->userName));\n\t}" ]
[ "0.7305726", "0.71837515", "0.7180283", "0.6933108", "0.68574077", "0.68501556", "0.677595", "0.6709536", "0.6694701", "0.6604053", "0.65933204", "0.6558116", "0.6557394", "0.65279", "0.63662887", "0.6222691", "0.62009585", "0.61989343", "0.61876166", "0.6178911", "0.61762846", "0.61620325", "0.61465234", "0.6114763", "0.6111513", "0.6109977", "0.6102795", "0.60959315", "0.607483", "0.60731614", "0.60644037", "0.6050501", "0.60295177", "0.60130143", "0.5999232", "0.5998012", "0.5996617", "0.5984902", "0.5983627", "0.5949577", "0.594888", "0.5944818", "0.59386945", "0.59330493", "0.5929517", "0.59206", "0.59201735", "0.59052324", "0.5888426", "0.5884268", "0.5882399", "0.5882332", "0.5882332", "0.5882332", "0.5882027", "0.58777475", "0.5859091", "0.5851809", "0.5850241", "0.58486986", "0.58303773", "0.5825635", "0.5823502", "0.5822003", "0.5818719", "0.5814187", "0.58113754", "0.58104575", "0.58046734", "0.58024716", "0.5802376", "0.57812977", "0.5776509", "0.5749566", "0.5749254", "0.5745833", "0.57433534", "0.57422614", "0.57340956", "0.5727083", "0.5718133", "0.5709912", "0.5704769", "0.5698479", "0.5694637", "0.5691343", "0.56812066", "0.5680195", "0.5676245", "0.5675002", "0.567254", "0.56603354", "0.56517035", "0.56468356", "0.5637612", "0.5637378", "0.5631102", "0.56288964", "0.56203645", "0.5612358" ]
0.77301717
0
test WP getting patient profile
тестирование получения профиля пациента WP
public function testWPGetProfileOtherUserPatientRel() { $url = "http://127.0.0.1/app_test.php/profile/view/bucky-barnes"; $username = 'profileVision@gmail.com'; $password = 'password'; $response = \Httpful\Request::get($url)->basicAuth($username, $password)->send(); $this->assertEquals('success', $response->body->status); $this->assertEquals('Bucky Barnes', $response->body->data->user->name); $this->assertEquals(0, $response->body->data->user->isWellnessPro); $this->assertEquals(0, $response->body->data->relationships->isSupporter); $this->assertEquals(0, $response->body->data->relationships->isSupportee); $this->assertEquals(1, $response->body->data->relationships->isWellnessProRel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testProfilePersonalInfo()\n {\n // Create a user with the username 'johndoe'\n $user = factory(User::class)->create(['username'=>'johndoe']);\n // Add a profile record to the user\n $profile = factory(Profile::class)->make(['country_id'=>4]);\n // Save the user\n $user->profile()->save($profile);\n // Goto the profile browse page\n $this->visit(route('profile.view', ['name'=>'johndoe']))\n ->see('seeInElement', '.country', DB::table('countries')->where('id', 4)->first()->full_name);\n }", "public function testGetProfileWPPatientRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/vision-jones\";\r\n\r\n $username = 'profileBucky@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Vision Jones', $response->body->data->user->name);\r\n $this->assertNotEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(1, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testDestiny2GetProfile()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testGetProfileWPNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/natasha-romanov\";\r\n\r\n $username = 'profileBucky@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Natasha Romanov', $response->body->data->user->name);\r\n $this->assertNotEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testProfileView()\n {\n $this->loginReader();\n\n $response = $this->get('api/user/profile/1');\n\n $response->assertStatus(200);\n }", "public function testWPGetProfileOtherUserNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = 'profileNatasha@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testGetOwnProfile()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = 'profileBucky@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->relationships->isFriend);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n\r\n }", "public function testProfileFind()\n {\n\n }", "public function testCheckProfile()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('http://localhost:8000/user/12/profile')\n ->assertSee('My Profile');\n });\n }", "public function testProfileExistsHeadProfilesid()\n {\n\n }", "public function testProfileUnilogin()\n {\n\n }", "public function testProfileFindOne()\n {\n\n }", "abstract protected function getUserProfile();", "public function testProfileExistsGetProfilesidExists()\n {\n\n }", "public function testGETProfile()\n\t{\n\t\t$request = new ERestTestRequestHelper();\n\n\t\t$request['config'] = [\n\t\t\t'url'\t\t\t=> 'http://api/profile/2',\n\t\t\t'type'\t\t=> 'GET',\n\t\t\t'data'\t\t=> null,\n\t\t\t'headers' => [\n\t\t\t\t'X_REST_USERNAME' => 'admin@restuser',\n\t\t\t\t'X_REST_PASSWORD' => 'admin@Access',\n\t\t\t],\n\t\t];\n\n\t\t$request_response = $request->send();\n\t\t$expected_response = '{\"success\":true,\"message\":\"Record Found\",\"data\":{\"totalCount\":1,\"profile\":{\"id\":\"2\",\"user_id\":\"2\",\"photo\":\"0\",\"website\":\"mysite2.com\",\"owner\":{\"id\":\"2\",\"username\":\"username2\",\"password\":\"password2\",\"email\":\"email@email2.com\"}}}}';\n\t\t$this->assertJsonStringEqualsJsonString($request_response, $expected_response);\n\t}", "public function test_can_view_profile_of_any_user()\n {\n // When i access his profile\n // Then i can see his name\n $user = create(User::class);\n\n $response = $this->get(\"/profiles/{$user->name}\");\n\n $response->assertStatus(200);\n $response->assertSeeText($user->name);\n }", "public function testProfileCheckIfDisplayNameIsTaken()\n {\n\n }", "public function testProfilePrototypeGetPosts()\n {\n\n }", "public function public_profile_get() {\n $this->response(App\\Auth::profile(), REST_Controller::HTTP_OK);\n }", "public function testProfileCheckIfUserExists()\n {\n\n }", "public function testProfilePrototypeFindByIdAccessTokens()\n {\n\n }", "public function testProfilePrototypeFindByIdPosts()\n {\n\n }", "public function testProfilePrototypeGetQuarantines()\n {\n\n }", "function do_personal()\r\n\t{\r\n\r\n\t\t$this->lib->do_profile();\r\n\r\n\t}", "public function testWebinarRegistrantGet()\n {\n }", "public function testProfileFindById()\n {\n\n }", "public function testGetSiteMembershipRequestForPerson()\n {\n }", "function get_profile_usrid($usrid){\r\n\t\r\n}", "public function getUserProfile();", "protected static function profilePageProvider()\n {\n $config = \\Codeception\\Configuration::config();\n $civiRemoteApi = new \\CiviRemoteApi($config['modules']['config']['CiviRemoteApi']);\n\n $params = [\n 'entity' => 'UFGroup',\n 'action' => 'get',\n 'is_active' => 1,\n 'is_reserved' => 0,\n // 'id' => 12,\n // group_type (comma separated list of contact types)\n //\n 'options' => [\n // 'limit' => 1,\n ],\n ];\n $profiles = $civiRemoteApi->CiviRemote($params);\n $examples = [];\n\n if (!empty($profiles['values'])) {\n // Iterate over pages to pick up payment processors.\n foreach ($profiles['values'] as $profile) {\n $example = [\n 'profile_id' => $profile['id'],\n 'profile_title' => $profile['title'],\n 'profile_url' => \"civicrm/profile/create?gid={$profile['id']}\",\n ];\n\n // Other profile setup?\n $examples[] = $example;\n }\n\n }\n return $examples;\n }", "public function testGetSelfServiceBrowserProfileManagementRequest()\n {\n }", "public function testFillProfile() {\n $user = factory(\\App\\Models\\User::class)->make();\n\n // Register with factory credentials\n $this->browse(function ($browser) use ($user) {\n $browser->visit('/register')\n ->type('name', $user->name)\n ->type('email', $user->email)\n ->type('password', $user->password)\n ->type('password_confirmation', $user->password)\n ->press('Register')\n // Should be able to see My Profile after authentication\n ->assertSee('My Profile');\n\n // Go to profile\n $browser->clickLink('My Profile')\n ->assertSee('About Me');\n\n // Go to My Experience, open accordion\n $browser->clickLink('My Experience')\n ->assertSee('My Experience')\n ->press('Add Diploma/Degree')\n ->assertSee('New Diploma/Degree');\n\n // Add a diploma\n $browser->select('#degrees\\5b new\\5d \\5b 1\\5d degreeType', '4')\n ->type('#degrees\\5b new\\5d \\5b 1\\5d degreeArea', 'Test area of study')\n ->type('#degrees\\5b new\\5d \\5b 1\\5d degreeInstitution', 'Test institution');\n // TODO: Selectors for date picker\n //->click('#degrees\\5b new\\5d \\5b 1\\5d degreeStartDate')\n //->type('#degrees\\5b new\\5d \\5b 1\\5d degreeStartDate', ['2017'], ['{tab}'], ['0717']);\n //->type('#degrees\\5b new\\5d \\5b 1\\5d degreeEndDate', '2018', ['{tab}'], '08', ['{tab}'], '18');\n\n $browser->script('window.scrollTo(0, 1000);');\n\n // Saved work sample name should be visible\n $browser->assertSee('Save Diploma/Degree')\n ->pause(777) // Fails without a short pause\n ->press('Save Diploma/Degree')\n ->assertSee('Phd, Test area of study');\n\n // TODO: Repeat for certification / equivalent experience\n //$browser->press('Add Course/Certification')\n // ->assertSee('New Course/Certification');\n\n // Go to My Skills page\n $browser->clickLink('My Skills')\n ->assertSee('My Skills')\n ->press('Add Skill')\n ->assertSee('New Skill');\n\n // Add a soft skill\n $browser->select('#skill_declarations\\5b new\\5d \\5b soft\\5d \\5b 1\\5d skillSelection', '24') // Select dropdown by value\n ->keys('#skill_declarations\\5b new\\5d \\5b soft\\5d \\5b 1\\5d skillSelection',\n ['{tab}'], ['{tab}'], ['{arrow_right}']) // Keyboard controls were necessary to select skill level properly\n ->type('#skill_declarations\\5b new\\5d \\5b soft\\5d \\5b 1\\5d skillDescription', 'Test skill description');\n\n $browser->script('window.scrollTo(0, 1000);');\n\n // Text corresponding to skill selection value should be visible\n $browser->assertSee('Save Skill')\n ->pause(777)\n ->press('Save Skill')\n ->assertSee('Passion');\n\n // TODO: Repeat for hard skill\n\n // Go to My References, open accordion\n $browser->clickLink('My References')\n ->assertSee('My References')\n ->press('Add Reference')\n ->assertSee('New Reference');\n\n // Add a reference\n $browser->type('#references\\5b new\\5d \\5b 1\\5d referenceName', 'Test Reference')\n ->select('#references\\5b new\\5d \\5b 1\\5d referenceRelationship') // Selects random if not specified\n ->type('#references\\5b new\\5d \\5b 1\\5d referenceEmail', 'grant.d.barnes@gmail.com')\n ->type('#references\\5b new\\5d \\5b 1\\5d referenceDescription', 'Test reference description');\n\n // Scroll down (button click will fail if not visible on test browser screen)\n $browser->script('window.scrollTo(0, 1000);');\n\n // Saved work sample name should be visible\n $browser->assertSee('Save Reference')\n ->pause(777) // Fails without a short pause\n ->press('Save Reference')\n ->assertSee('Test Reference');\n\n // Go to My Work Samples, open accordion\n $browser->clickLink('My Work Samples')\n ->assertSee('My Work Samples')\n ->press('Add Sample')\n ->assertSee('New Work Sample');\n\n // Add work sample data, wouln't work without copying the full selector\n $browser->type('#work_samples\\5b new\\5d \\5b 1\\5d sampleName', 'Test Sample')\n ->select('#work_samples\\5b new\\5d \\5b 1\\5d sampleType') // Selects random if not specified\n ->type('#work_samples\\5b new\\5d \\5b 1\\5d sampleLink', 'http://talent.canada.ca')\n ->type('#work_samples\\5b new\\5d \\5b 1\\5d sampleDescription', 'Test sample description');\n\n $browser->script('window.scrollTo(0, 1000);');\n\n // Saved work sample name should be visible\n $browser->assertSee('Save Sample')\n ->pause(777) // Fails without a short pause\n ->press('Save Sample')\n ->assertSee('Test Sample');\n\n });\n }", "public function testProfileInvalid()\n {\n $email = new Notification();\n $email->profile('derp');\n }", "private function GetFakeInstructorProfile()\n\t{\n\t\t# Creates a fake instructor profile since database does not \n\t\t# currently have instructor information in it.\n\t\t\n\t\t$record = array(\n\t\t\t'name' => 'Selma Louise',\n 'picture' => 'instructor_53456.gif',\n //'location' => 'Boston, MA',\n //'experience' => '5',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque bibendum metus vitae urna interdum faucibus. Proin euismod faucibus purus, dapibus luctus mi tincidunt sit amet. Mauris consectetur tincidunt molestie. Aliquam erat volutpat. Quisque nulla libero, tincidunt sed convallis at, tincidunt vitae diam. Nulla nibh arcu, viverra a consectetur sed, facilisis aliquam orci. Ut ullamcorper lectus eget odio ullamcorper mattis. Phasellus ac turpis leo, vel porttitor ipsum. Aliquam facilisis est vel tellus vulputate id faucibus risus gravida. Sed ut nisl id ante hendrerit aliquam.',\n 'types' => '',\n\t\t);\n\t\t\n\t\t$this->profile = $record;\n\t}", "public function testProfilePrototypeFindByIdQuarantines()\n {\n\n }", "public function testProfileCreate()\n {\n\n }", "public function testGetOneUserInformation()\n {\n $response = $this->json('GET', $this->userEndpoint.'/prostoalex');\n\n // It should return a valid user json with all the basic attributes filled\n $response\n ->assertStatus(200)\n ->assertJsonStructure([\n 'created',\n 'id',\n 'karma',\n 'submitted',\n 'about',\n ])\n ->assertJsonFragment([\n 'id' => 'prostoalex'\n ]);\n }", "public function testGetInstitutionsUsingGET()\n {\n }", "public function _assertProfileExists($profile_uid)\n {\n }", "public function testListSiteMembershipsForPerson()\n {\n }", "public function testGetCustomerProfile()\n {\n self::testCreateCustomerProfile();\n\n $response = $this->gateway->getCustomerProfile($this->customerProfileId);\n\n $this->assertTrue($response->isSuccess());\n }", "public function testGetSiteMembershipForPerson()\n {\n }", "public function testGetProfileOtherUserSupporter()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/tony-stark\";\r\n\r\n $username = 'profileBucky@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Tony Stark', $response->body->data->user->name);\r\n\r\n $this->assertEquals(1, $response->body->data->relationships->isSupportee);\r\n\r\n }", "function get_profile($field, $user = \\false)\n {\n }", "public function testProfilePrototypeGetReviews()\n {\n\n }", "public function testProfileApp()\n {\n $client = static::createClient();\n $client->request('GET', '/candidate/profile');\n $this->assertEquals(301, $client->getResponse()->getStatusCode());\n\n //authenticated users are allowed\n $client = $this->createAuthClient('user@example.com', 'user');\n $crawler = $client->request('GET', '/candidate/profile');\n $response = $client->getResponse();\n $this->assertEquals(301, $response->getStatusCode());\n $this->assertTrue(0 === strpos($response->getTargetUrl(), 'https'));\n\n //https and authentication loads page\n $client = $this->createAuthClient('user@example.com', 'user');\n $crawler = $client->request('GET', '/candidate/profile', [], [], ['HTTPS' => true]);\n $this->assertTrue($crawler->filter('html:contains(\"Loading ...\")')->count() > 0);\n }", "private function getProfile() {\n if(!$this->profile = $this->getNikePlusFile('http://nikerunning.nike.com/nikeplus/v2/services/app/get_user_data.jsp?_plus=true')) {\n throw new Exception($this->feedErrorMessage);\n }\n }", "public function testInfoUser()\n {\n }", "public function profile(){\n\t\t$this->common_lib->profile($this->user,$this->menu,$this->group->name);\n\t}", "public function testProfile() {\n $profile = <<<PROFILE_TEST\ncore_version_requirement: '*'\nname: The Perfect Profile\ntype: profile\ndescription: 'This profile makes Drupal perfect. You should have no complaints.'\nPROFILE_TEST;\n\n vfsStream::setup('profiles');\n vfsStream::create([\n 'fixtures' => [\n 'invalid_profile.info.txt' => $profile,\n ],\n ]);\n $info = $this->infoParser->parse(vfsStream::url('profiles/fixtures/invalid_profile.info.txt'));\n $this->assertFalse($info['core_incompatible']);\n }", "public function controlProfile(){\n\t\t$profilePage = \\Utility\\Singleton::getInstance('\\View\\Main');\n\t\t$data=\"\";\n\t\t\n\t\tswitch($profilePage->get('profileAction'))\n\t\t{\t\n\t\t\tcase 'hasAlreadyVoted':\n\t\t\t\t$data=$this->hasVoted();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'getProfilePage':\n\t\t\t\t$data=$this->setProfileInformation();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'rateUser':\n\t\t\t\t$data=$this->rateUser();\n\t\t\t\tbreak;\n\n\t\t}\n\t\n\t\treturn $data;\n\t\t\n\t}", "public function testProfilePrototypeGetAccessTokens()\n {\n\n }", "public function setProfileInformation()\n {\n $view = \\Utility\\Singleton::getInstance(\"\\View\\Main\");\n\t\t$username=$view->get('userProfile');\n\t\t$this->getUserInformations($view,$username);\n\t\t$this->setResourcesUploaded($view,$username);\n\t\treturn $view->fetch('profile.tpl');\n\t}", "public function renderMemberProfile($string) {\r\n\t$ids = explode('-', $string);\r\n\t$kid = $ids[0];\r\n\ttry {\r\n\t $userData = $this->getUserModel()->getUserByKid((int) $kid);\r\n\t $profileData = $this->getUserModel()->getWebProfilesFluent((int) $kid)->execute()->fetch();\r\n\t} catch (Exception $ex) {\r\n\t $this->flashMessage('Omlouváme se, ale požadovaná data nelze získat. Zkuste to prosím znovu nebo později.', 'error');\r\n\t Debugger::log($ex->getMessage(), Debugger::ERROR);\r\n\t $this->redirect('Homepage:default');\r\n\t}\r\n\r\n\tdump(\"PICTURE\");\r\n\r\n\t$this->template->profile_req = $userData->profile_required;\r\n\r\n\r\n\t$this->template->publicData = array('name' => $userData->name,\r\n\t 'surname' => $userData->surname,\r\n\t 'year' => $userData->year,\r\n\t 'nick' => $userData->nick,\r\n\t 'signature' => $userData->signature,\r\n\t 'city' => $userData->city);\r\n\t$profileData->offsetUnset('kid');\r\n\t$profileData->offsetUnset('city');\r\n\t$profileData->offsetUnset('job');\r\n\t$profileData->offsetUnset('last_updated');\r\n\t$profileData->offsetUnset('contact');\r\n\t$this->template->profileData = $profileData;\r\n\r\n\t// TODO rights 0 1 2\r\n\t$this->template->levelOneData = array('job' => $userData->job,\r\n\t 'phone' => $userData->phone);\r\n\r\n\t// TODO rights 3 4\r\n\t$this->template->levelTwoData = array('address' => $userData->address,\r\n\t 'postalCode' => $userData->postal_code,\r\n\t 'contName' => $userData->contperson_name,\r\n\t 'contPhone' => $userData->contperson_phone,\r\n\t 'contEmail' => $userData->contperson_email);\r\n }", "public function testListSiteMembershipRequestsForPerson()\n {\n }", "public function profile()\n\t{\n\t\t// echo $this->fungsi->user_login()->nik;\n\t\t$query = $this->user_m->get($this->fungsi->user_login()->nik);\n\t\t$data['data'] = $query->row();\n\t\t$this->template->load('template2', 'profile', $data);\n\t}", "public function testProfileCount()\n {\n\n }", "public function testProfilePrototypeGetComments()\n {\n\n }", "public function testProfilePrototypeCreatePosts()\n {\n\n }", "public function testProfilePrototypeGetGroups()\n {\n\n }", "public function tutorPublicProfile() {\n\t\t$this->isLoggedIn();\n\t\t//assign public class values to function variable\n\t\t$data = $this->data;\n\t\t$data['common_data'] = $this->common_data;\n\t\t$data['page'] = 'tutor_public_profile';\n\t\t$data['pageName'] = 'My Tutor Profile (Public)';\n\t\t$tutor_id = $data['common_data']['user_id'];\n/*\t\tif($tutor_id != $data['common_data']['user_id']){\n\t\t\tshow_404();\n\t\t\tdie();\n\t\t}*/\n\t\t// get tutor details\n\t\t$data['tutor_details'] = $this->profile_model->getTutorDetailsById($tutor_id);\n\t\tif($data['common_data']['user_data']['role'] == INACTIVE_STATUS_ID){\n\t\t\theader(\"Location: \".ROUTE_PROFILE);\n\t\t\tdie();\n\t\t}\n\t\t// get main subjects and sub subjects\n\t\t$data['main_subjects'] = $this->profile_model->getMainSubjects();\n\t\tif(!empty($data['main_subjects'])){\n\t\t\tforeach($data['main_subjects'] as $key=>$row){\n\t\t\t\t$data['main_subjects'][$key]['subjects'] = $this->profile_model->getSubjectsByMainId($row['id']);\n\t\t\t}\n\t\t}\n\t\tif(empty($data['tutor_details'])){\n\t\t\t$level_type = ($data['common_data']['user_data']['role'] == STUDENT)? OPEN_STAR:TIER;\n\t\t\t// get level\n\t\t\t$data['tutor_level'] = $this->profile_model->getTutorFirstLevel($level_type);\n\t\t\tif(!empty($data['tutor_level'])){\n\t\t\t\t$this->profile_model->saveTutorLevel($data['common_data']['user_id'],$data['tutor_level']['id']);\n\t\t\t\t$this->profile_model->saveTutorLevelinDetail($data['common_data']['user_id'],$data['tutor_level']['id']);\n\t\t\t}\n\t\t} else {\n\t\t\t// get level\n\t\t\t$data['tutor_level'] = $this->profile_model->getLevelById($data['tutor_details']['level_id']);\n\t\t\t// get subjects\n\t\t\t$data['tutor_details']['subjects'] = $this->profile_model->getSubjectsByTutorId($tutor_id);\n\t\t\t// get avaiability\n\t\t\t$availability = $this->profile_model->getAvailabilityByTutorId($tutor_id);\n\t\t\t$index = 0;\n\t\t\tforeach ($availability as $row){\n//\t\t\t\t$data['tutor_details']['availability'][$row['day_available']]['times'][$index] = $row['time_available'];\n\t\t\t\t$data['tutor_details']['availability'][$row['day_available']]['times'][$row['id']] = $row['time_available'];\n\t\t\t\t$index++;\n\t\t\t}\n\t\t\t// get avaiability\n\t\t\t$group_availability = $this->profile_model->getGroupAvailabilityByTutorId($tutor_id);\n\t\t\t$g_index = 0;\n\t\t\tforeach ($group_availability as $row){\n//\t\t\t\t$data['tutor_details']['group_availability'][$row['day_available']]['times'][$g_index] = $row['time_available'];\n\t\t\t\t$data['tutor_details']['group_availability'][$row['day_available']]['times'][$row['id']] = $row['time_available'];\n\t\t\t\t$data['tutor_details']['group_availability'][$row['day_available']]['no_of_students'] = $row['seats'];\n\t\t\t\t$data['tutor_details']['group_availability'][$row['day_available']]['syllabus'] = $row['syllabus'];\n\t\t\t\t$g_index++;\n\t\t\t}\n\t\t}\n\t\t//Getting all payment details\n\t\t$data['payment_details'] = $this->payment_model->getPaymentDetailsById($data['common_data']['user_id']);\n\t\t$data['teaching_levels'] = $this->profile_model->getTeachingLevels();\n\t\t$data['tutor_badges'] = $this->user_model->getTutorBadges($data['common_data']['user_id']);\n\t\t$data['badges'] = $this->user_model->getBadges();\n\n\t\t$data['page'] = 'tutor-public-profile';\n\t\t$data['countries'] = $this->user_model->getCountries();\n\t\t$template['body_content'] = $this->load->view('frontend/profile/tutor-public-profile', $data, true);\t\n\t\t$this->load->view('frontend/layouts/template', $template, false);\t\t\n\t}", "public function testGetInstitutionUsingGET()\n {\n }", "public function testProfilePrototypeFindByIdReviews()\n {\n\n }", "function requestProfile() {\n $username = $_GET['username'];\n\n $response = retrieveProfile($username);\n\n if ($response['status'] == 'SUCCESS') {\n echo json_encode($response['response']);\n } else {\n errorHandler($response['status'], $response['code']);\n }\n }", "public function getPersonal();", "public function testGetVoicemailUserpolicy()\n {\n }", "public function testGetInvalidAdultUsername() : void {\n// grab an email that does not exist\n$profile = Adult::getAdultByAdultUsername($this->getPDO(), \"yourmom\");\n$this->assertNull($profile);\n}", "function personal()\r\n\t{\r\n\t\tglobal $ibforums, $std, $print;\r\n\r\n\t\t//-----------------------------------------------\r\n\t\t// Check to make sure that we can edit profiles..\r\n\t\t//-----------------------------------------------\r\n\r\n\t\tif (empty($ibforums->member['g_edit_profile']))\r\n\t\t{\r\n\t\t\t$std->Error(array('LEVEL' => 1, 'MSG' => 'cant_use_feature'));\r\n\t\t}\r\n\r\n\t\t//-----------------------------------------------\r\n\t\t// Format the birthday drop boxes..\r\n\t\t//-----------------------------------------------\r\n\r\n\t\t$date = getdate();\r\n\r\n\t\t$day = \"<option value='0'>--</option>\";\r\n\t\t$mon = \"<option value='0'>--</option>\";\r\n\t\t$year = \"<option value='0'>--</option>\";\r\n\r\n\t\tfor ($i = 1; $i < 32; $i++)\r\n\t\t{\r\n\t\t\t$day .= \"<option value='$i'\";\r\n\r\n\t\t\t$day .= $i == $this->member['bday_day']\r\n\t\t\t\t? \"selected>$i</option>\"\r\n\t\t\t\t: \">$i</option>\";\r\n\t\t}\r\n\r\n\t\tfor ($i = 1; $i < 13; $i++)\r\n\t\t{\r\n\t\t\t$mon .= \"<option value='$i'\";\r\n\r\n\t\t\t$mon .= $i == $this->member['bday_month']\r\n\t\t\t\t? \"selected>{$ibforums->lang['month'.$i]}</option>\"\r\n\t\t\t\t: \">{$ibforums->lang['month'.$i]}</option>\";\r\n\t\t}\r\n\r\n\t\tfor ($i = $date['year'] - 1, $j = $date['year'] - 100; $j < $i; $i--)\r\n\t\t{\r\n\t\t\t$year .= \"<option value='$i'\";\r\n\r\n\t\t\t$year .= $i == $this->member['bday_year']\r\n\t\t\t\t? \"selected>$i</option>\"\r\n\t\t\t\t: \">$i</option>\";\r\n\t\t}\r\n\r\n\t\t//-----------------------------------------------\r\n\t\t// Custom profile fields stuff\r\n\t\t//-----------------------------------------------\r\n\r\n\t\t$required_output = \"\";\r\n\t\t$optional_output = \"\";\r\n\t\t$field_data = array();\r\n\r\n\t\t$stmt = $ibforums->db->query(\r\n\t\t \"SELECT *\r\n\t\t\tFROM ibf_pfields_content\r\n WHERE member_id='\" . $ibforums->member['id'] . \"'\"\r\n );\r\n\r\n\t\twhile ($content = $stmt->fetch())\r\n\t\t{\r\n\t\t\tforeach ($content as $k => $v)\r\n\t\t\t{\r\n\t\t\t\tif (preg_match(\"/^field_(\\d+)$/\", $k, $match))\r\n\t\t\t\t{\r\n\t\t\t\t\t$field_data[$match[1]] = $v;\r\n\t\t\t\t\t//break;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$stmt = $ibforums->db->query(\r\n\t\t \"SELECT *\r\n\t\t\tFROM ibf_pfields_data\r\n WHERE fedit=1\r\n\t\t\tORDER BY forder\"\r\n );\r\n\r\n\t\twhile ($row = $stmt->fetch())\r\n\t\t{\r\n\t\t\t$form_element = \"\";\r\n\r\n\t\t\tif ($row['freq'] == 1)\r\n\t\t\t{\r\n\t\t\t\t$ftype = 'required_output';\r\n\t\t\t} else\r\n\t\t\t{\r\n\t\t\t\t$ftype = 'optional_output';\r\n\t\t\t}\r\n\r\n\t\t\tif ($row['ftype'] == 'drop')\r\n\t\t\t{\r\n\t\t\t\t$carray = explode('|', trim($row['fcontent']));\r\n\r\n\t\t\t\t$d_content = \"\";\r\n\r\n\t\t\t\tforeach ($carray as $entry)\r\n\t\t\t\t{\r\n\t\t\t\t\t$value = explode('=', $entry);\r\n\r\n\t\t\t\t\t$ov = trim($value[0]);\r\n\t\t\t\t\t$td = trim($value[1]);\r\n\r\n\t\t\t\t\tif ($ov != \"\" and $td != \"\")\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$d_content .= ($field_data[$row['fid']] == $ov)\r\n\t\t\t\t\t\t\t? \"<option value='$ov' selected>$td</option>\\n\"\r\n\t\t\t\t\t\t\t: \"<option value='$ov'>$td</option>\\n\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ($d_content != \"\")\r\n\t\t\t\t{\r\n\t\t\t\t\t$form_element = View::make(\r\n\t\t\t\t\t\t\"ucp.field_dropdown\",\r\n\t\t\t\t\t\t['name' => 'field_' . $row['fid'], 'options' => $d_content]\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 ($row['ftype'] == 'area')\r\n\t\t\t\t{\r\n\t\t\t\t\t$form_element = View::make(\r\n\t\t\t\t\t\t\"ucp.field_textarea\",\r\n\t\t\t\t\t\t['name' => 'field_' . $row['fid'], 'value' => $field_data[$row['fid']]]\r\n\t\t\t\t\t);\r\n\t\t\t\t} else\r\n\t\t\t\t{\r\n\t\t\t\t\t$form_element = View::make(\r\n\t\t\t\t\t\t\"ucp.field_textinput\",\r\n\t\t\t\t\t\t['name' => 'field_' . $row['fid'], 'value' => $field_data[$row['fid']]]\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t${$ftype} .= View::make(\r\n\t\t\t\t\"ucp.field_entry\",\r\n\t\t\t\t['title' => $row['ftitle'], 'desc' => $row['fdesc'], 'content' => $form_element]\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\t//-----------------------------------------------\r\n\t\t// Format the interest / location boxes\r\n\t\t//-----------------------------------------------\r\n\r\n\t\t$this->member['location'] = $this->parser->unconvert($this->member['location']);\r\n\t\t$this->member['interests'] = $this->parser->unconvert($this->member['interests']);\r\n\r\n\t\t$this->member['key'] = $this->md5_check;\r\n\r\n\t\t//-----------------------------------------------\r\n\t\t// Suck up the HTML and swop some tags if need be\r\n\t\t//-----------------------------------------------\r\n\r\n\t\t$this->output .= View::make(\"ucp.personal_panel\", ['Profile' => $this->member]);\r\n\r\n\t\tif (($ibforums->vars['post_titlechange'] and $this->member['posts'] > $ibforums->vars['post_titlechange']) or\r\n\t\t ($ibforums->vars['rep_titlechange'] and $this->member['rep'] >= $ibforums->vars['rep_titlechange'])\r\n\t\t)\r\n\t\t{\r\n\t\t\t$t_html = View::make(\"ucp.member_title\", ['title' => $this->member['title']]);\r\n\t\t\t$this->output = preg_replace(\"/<!--\\{MEMBERTITLE\\}-->/\", $t_html, $this->output);\r\n\t\t}\r\n\r\n\t\t$t_html = View::make(\"ucp.birthday\", ['day' => $day, 'month' => $mon, 'year' => $year]);\r\n\r\n\t\t$this->output = preg_replace(\"/<!--\\{BIRTHDAY\\}-->/\", $t_html, $this->output);\r\n\r\n\t\t//-----------------------------------------------\r\n\t\t// Format the Gender radio buttons..\r\n\t\t//-----------------------------------------------\r\n\r\n\t\t$t_html = View::make(\"ucp.gender\", ['gender' => $this->member['gender']]);\r\n\r\n\t\t$this->output = preg_replace(\"/<!--\\{GENDER\\}-->/\", $t_html, $this->output);\r\n\r\n\t\t//-----------------------------------------------\r\n\t\t// Add in the custom fields if we need to.\r\n\t\t//-----------------------------------------------\r\n\r\n\t\t//echo \"required_output =\".$required_output.\"<br>\";\r\n\r\n\t\tif ($required_output != \"\")\r\n\t\t{\r\n\t\t\t$this->output = str_replace(\"<!--{REQUIRED.FIELDS}-->\", View::make(\r\n\t\t\t\t\t\"ucp.required_title\"\r\n\t\t\t\t) . \"\\n\" . View::make(\r\n\t\t\t\t\t\"ucp.personal_panel_username\",\r\n\t\t\t\t\t['name' => $this->member['name']]\r\n\t\t\t\t) . \"\\n\" . $required_output . View::make(\"ucp.required_end\"), $this->output);\r\n\t\t}\r\n\r\n\t\tif ($optional_output != \"\")\r\n\t\t{\r\n\t\t\t$this->output = str_replace(\"<!--{OPTIONAL.FIELDS}-->\", \"\\n\" . $optional_output, $this->output);\r\n\t\t}\r\n\r\n\t\t$this->page_title = $ibforums->lang['t_welcome'];\r\n\r\n\t\t$this->nav = array(\"<a href='\" . $this->base_url . \"act=UserCP&amp;CODE=00'>\" . $ibforums->lang['t_title'] . \"</a>\");\r\n\t}", "public function testQuarantineCheckIfProfileIsQuarantined()\n {\n\n }", "public function testGuestNotAccessProfilePage()\n\t{\n\t\t$this->open('/user/edit/' . $this->users['sample1']['intUserID']);\n\t\t$this->assertTextNotPresent('Edit');\n\n\t\t$this->open('/user/edit/' . $this->users['sample2']['intUserID']);\n\t\t$this->assertTextNotPresent('Edit');\n\t}", "public function testGetAccountProfileIn($auth)\n {\n // Grab Page\n $result = $this->actingAs($auth)\n ->visit('account/profile')\n ->see('Account Privacy')\n ->see('SPONSORED')\n ->see('ADS')\n ->see('CALENDAR')\n ->see('Edit Profile Image')\n ->seePageIs('account/profile');\n }", "public function testProfilePrototypeFindByIdGroups()\n {\n\n }", "function profile_info() {\n $parameters = array(\n 'method' => __FUNCTION__\n );\n return $this->get_data($parameters);\n }", "public function testGetInvalidProfileByProfileId () : void {\n\t\t// grab a profile id that doesn't exist?\n\t\t$invalidProfileId = generateUuidV4();\n\n\t\t$profile = Profile::getProfileByProfileId($this->getPDO() , \"$invalidProfileId\");\n\t\t$this->assertNull($profile);\n\t}", "public function testGetProfileNotLoggedIn()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $response = \\Httpful\\Request::get($url)->send();\r\n\r\n //ERROR Call to a member function getWellnessProfessional() on string (500 Internal Server Error)\r\n $this->assertEquals(302, $response->code);\r\n\r\n }", "public function get_profile_details_view() {\n $html = '';\n if ( $this->get_access_token() ) {\n $uri = 'https://www.googleapis.com/oauth2/v2/userinfo';\n $params = array(\n 'sslverify' => false,\n 'timeout' => 60,\n 'headers' => array(\n 'Content-Type' => 'application/json',\n 'Authorization' => 'Bearer ' . $this->get_access_token(),\n ),\n );\n\n $response = wp_remote_get( $uri, $params );\n\n if ( !is_wp_error( $response ) && 200 == $response[ 'response' ][ 'code' ] && 'OK' == $response[ 'response' ][ 'message' ] ) {\n $body = json_decode( $response[ 'body' ] );\n $html = $this->get_view( 'profile-details.php', array( 'name' => $body->name, 'picture' => $body->picture ) );\n\n $this->debug( 'Profile Details retrieved successfully', $body );\n } else {\n $this->error( 'Error while retrieving user information: ', $response );\n }\n }\n\n return $html;\n }", "public function testProfilePrototypeUpdateByIdAccessTokens()\n {\n\n }", "public function testWebinarRegistrantsQuestionsGet()\n {\n }", "public function test_admin_monitoring()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Home', 'member_dsc_summary']);\n $this->assertResponseCode(404);\n }", "public function index(){\n $this->existing_profile=$this->profile_model->read_highest_rank_profiles(1);\n \n //Fetch this profile with the api and ensure it matches\n $test_name=\"Checking API can be used to fetch the top profile\";\n $test1=$this->checkingApiCanFetchAProfile($this->existing_profile[0]['user_id']);\n $expected_result=TRUE;\n echo $this->unit->run($test1,$expected_result,$test_name,$notes=\"Assumes atleast 1 account is created\");\n\n //Fetch the same profile by searching for it using its first_name\n $test_name=\"Checking API can be used to fetch same profile using search\";\n $test2=$this->checkingApiCanFetchProfileUsingSearch($this->existing_profile[0]['first_name']);\n $expected_result=TRUE;\n echo $this->unit->run($test2,$expected_result,$test_name,$notes=\"Assumes first result found has identical first name\");\n \n }", "public function testProfileTitle()\n {\n // Create a user with the username 'johndoe'\n $user = factory(User::class)->create(['username'=>'johndoe']);\n // Add a profile record to the user\n $profile = factory(Profile::class)->make(['country_id'=>4]);\n // Save the user\n $user->profile()->save($profile);\n // Goto the profile browse page\n $this->visit(route('profile.view', ['name'=>'johndoe']))\n ->see(trans('profile.title', ['username'=>'johndoe']));\n }", "public function testGetAccountProfileOut()\n {\n // Grab Page\n $result = $this->visit('account/profile')\n ->see('create your suaray account')\n ->see('welcome to suaray')\n ->seePageIs('/account/register');\n }", "public function testProfilePrototypeGetImage()\n {\n\n }", "public function testUserProfile() {\n\t\tif (!$this->_hasTrigger('userProfile')) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$expected = $this->_manualCall('userProfile', $this->ViewtEvent);\n\n\t\t$result = $this->Event->trigger($this->ViewObject, $this->plugin . '.userProfile');\n\t\t$this->assertEquals($expected, $result);\n\t}", "public function testGetInvalidProfileByProfileName() : void {\n\t\t// get a profile name that doesn't exist\n\t\t$profile = Profile::getProfileByProfileName($this->getPDO(), \"Invalid Profile Name\");\n\t\t$this->assertCount(0, $profile);\n\t}", "function callSample(): void\n{\n $formattedParent = ProfileServiceClient::tenantName('[PROJECT]', '[TENANT]');\n\n search_profiles_sample($formattedParent);\n}", "public function testGetInvalidProfileByProfileEmail() : void {\n\t\t// get an email that doesn't exist\n\t\t$profile = Profile::getProfileByProfileEmail($this->getPDO(), \"eye@dont.exist\");\n\t\t$this->assertNull($profile);\n\t}", "public function testGetProfileOtherUserNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/steve-rogers\";\r\n\r\n $username = 'profileBucky@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Steve Rogers', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->relationships->isFriend);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n }", "function a_user_has_a_profile()\n {\n $user = create('App\\User');\n\n $this->get(\"/profiles/{$user->name}\")\n ->assertSee($user->name);\n }", "public function testUserMeGet()\n {\n }", "public function test_admin_certified_member()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/MemberSkills', 'certified_member']);\n $this->assertResponseCode(404);\n }", "function user_user_profile($CI,$user){\n\t\t$CI->user->head($user);\n\t}", "public function getProfile()\n {\n ProfileResource::withoutWrapping();\n MinistryResource::withoutWrapping();\n\n if (request()->has('complete') && request()->complete) {\n return new ProfileResource(auth()->user());\n } else {\n return new MinistryResource(auth()->user());\n }\n }", "public function testProfileIndexFound()\n {\n $profileService = $this->createProfileServiceMock();\n\n $profileService\n ->method('getProfile')\n ->willReturn(new BlokkrUser());\n\n $client = static::createClient();\n $client->getContainer()->set(\"blokkr.service.profile\", $profileService);\n $client->request(\"GET\", \"/profile/1\");\n\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n }", "public function testProfilePrototypeFindByIdComments()\n {\n\n }", "function get_profile_fname($fname){\r\n\t\r\n}", "function getProfile(){\n\t\t\t\t$this->__dataDecode();\n\t\t\t\t$data=$this->data;\n\t\t\t\t$playerId = $data['User']['playerId'];\n\t\t\t\t$token = $data['User']['secToken'];\n\t\t\t\t//pr($token);die('ok');\n\t\t\t\t$playerdetails = $this->User->find('first', array('conditions' => array('User.id' => $playerId,'User.secToken' => $token)));\n\t\t\t\t\t\t//pr($playerdetails);die;\t\n\t\t\t\t\t\tif($playerdetails)\n\t\t\t\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\t\t$response['error']\t\t\t= 0;\n\t\t\t\t\t\t$response['response']['firstName'] \t= $playerdetails['User']['firstname'];\n\t\t\t\t\t\t$response['response']['wieght'] \t= $playerdetails['User']['wieght'];\n\t\t\t\t\t\t$response['response']['school'] \t= $playerdetails['User']['school'];\n\t\t\t\t\t\t$response['response']['profilePicture'] = LIVE_SITE.'/img/upload_userImages/'.$playerdetails['User']['image'];\n\t\t\t\t\t\t$this->set('response', $response);\n\t\t\t\t\t\techo json_encode($response);\n\t\t\t\t\t\tdie();\n\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$response['error']\t\t\t= 1;\n\t\t\t\t\t\t\t$response['response']['result'] \t= 'failure';\n\t\t\t\t\t\t\t$response['response']['message']\t= 'UnAuthorized User';\n\t\t\t\t\t\t\t$this->set('response', $response);\n\t\t\t\t\t\t\techo json_encode($response);\n\t\t\t\t\t\t\tdie();\n\n}\n}", "function testProfileTitle() {\n $this->drupalGet(Url::fromRoute('entity.linkit_profile.edit_form', [\n 'linkit_profile' => $this->linkitProfile->id(),\n ]));\n\n $this->assertText('Edit ' . $this->linkitProfile->label() . ' profile');\n }", "function have_profile(){\n\treturn ( get_profile('enabled') === true && get_profile() !== -1 );\n}", "public function testExample()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/user/profile')\n ->assertSee('Profile');\n \n });\n }" ]
[ "0.66872036", "0.6682553", "0.66458416", "0.6529471", "0.6407498", "0.640187", "0.6374029", "0.636708", "0.63409925", "0.625468", "0.6236356", "0.62344956", "0.62273055", "0.622525", "0.62183315", "0.6185998", "0.61758316", "0.60946333", "0.6046463", "0.59812826", "0.59422874", "0.59221506", "0.59202784", "0.5871911", "0.5845557", "0.584265", "0.582566", "0.58224124", "0.5807709", "0.5790517", "0.57825243", "0.57757974", "0.57728785", "0.57505465", "0.57381284", "0.5736225", "0.5718288", "0.5709593", "0.5700811", "0.5686015", "0.56826335", "0.56810904", "0.56782365", "0.56731546", "0.5667867", "0.5661563", "0.56598014", "0.56589776", "0.56514275", "0.5651079", "0.5631558", "0.56269", "0.5612086", "0.56091577", "0.5601424", "0.5598176", "0.5580572", "0.55703646", "0.5569048", "0.55588895", "0.55573386", "0.5550063", "0.55383945", "0.55290717", "0.55251473", "0.55180764", "0.5512654", "0.5508647", "0.55076605", "0.5507092", "0.5502788", "0.54998434", "0.54982007", "0.5497429", "0.54973006", "0.5493541", "0.54857767", "0.5483532", "0.5483381", "0.54794246", "0.54757303", "0.547506", "0.5470067", "0.5464233", "0.5459989", "0.54578507", "0.5456744", "0.54520136", "0.54470974", "0.5444634", "0.544131", "0.5437542", "0.54363", "0.53966707", "0.5388154", "0.5378279", "0.5370899", "0.53690886", "0.536868", "0.5362669" ]
0.7107858
0
sg_map_meta_cap function to add Meta Capability Handling.
Функция sg_map_meta_cap для добавления обработки мета-возможностей.
public function sg_map_meta_cap( $caps, $cap, $user_id, $args ) { $capability_type = 'small_group'; if ( 'edit_' . $capability_type == $cap || 'delete_' . $capability_type == $cap || 'read_' . $capability_type == $cap ) { $post = get_post( $args[0] ); $post_type = get_post_type_object( $post->post_type ); /* Set an empty array for the caps. */ $caps = array( ); } /* If editing a help note, assign the required capability. */ if ( "edit_{$capability_type}" == $cap ) { if( $user_id == $post->post_author ) $caps[] = $post_type->cap->edit_posts; else $caps[] = $post_type->cap->edit_others_posts; } /* If deleting a help note, assign the required capability. */ elseif( "delete_{$capability_type}" == $cap ) { if( isset( $post->post_author ) && $user_id == $post->post_author && isset( $post_type->cap->delete_posts ) ) $caps[] = $post_type->cap->delete_posts; elseif ( isset( $post_type->cap->delete_others_posts ) ) $caps[] = $post_type->cap->delete_others_posts; } /* If reading a private help note, assign the required capability. */ elseif( "read_{$capability_type}" == $cap ) { if( 'private' != $post->post_status ) $caps[] = 'read'; elseif ( $user_id == $post->post_author ) $caps[] = 'read'; else $caps[] = $post_type->cap->read_private_posts; } /* Return the capabilities required by the user. */ return $caps; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setMapMetaCap($metaCap = true){\n\t\t$this->mapMetaCap = $metaCap;\n\t}", "function map_meta_cap($cap, $user_id, ...$args)\n {\n }", "function erp_map_meta_caps( $caps = array(), $cap = '', $user_id = 0, $args = array() ) {\n return apply_filters( 'erp_map_meta_caps', $caps, $cap, $user_id, $args );\n}", "function my_map_meta_cap( $caps, $cap, $user_id, $args ) {\n\tif ( 'edit_game' == $cap || 'delete_game' == $cap || 'read_game' == $cap ) {\n\t\t$post = get_post( $args[0] );\n\t\t$post_type = get_post_type_object( $post->post_type );\n\n\t\t/* Set an empty array for the caps. */\n\t\t$caps = array();\n\t}\n\t\n\t/* If editing, deleting, or reading a resource, get the post and post type object. */\n\tif ( 'edit_resouce' == $cap || 'delete_resource' == $cap || 'read_resouce' == $cap ) {\n\t\t$post = get_post( $args[0] );\n\t\t$post_type = get_post_type_object( $post->post_type );\n\n\t\t/* Set an empty array for the caps. */\n\t\t$caps = array();\n\t}\n\t\n\tif ( 'edit_person' == $cap || 'delete_person' == $cap || 'read_person' == $cap ) {\n\t\t$post = get_post( $args[0] );\n\t\t$post_type = get_post_type_object( $post->post_type );\n\n\t\t/* Set an empty array for the caps. */\n\t\t$caps = array();\n\t}\n\n\t/* If editing a game, assign the required capability. */\n\tif ( 'edit_game' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->edit_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->edit_others_posts;\n\t}\n\t\n\n\t\n\t/* If editing a resource, assign the required capability. */\n\tif ( 'edit_resource' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->edit_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->edit_others_posts;\n\t}\n\t\n\n\t\n\tif ( 'edit_person' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->edit_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->edit_others_posts;\n\t}\n\n\t/* If deleting a game, assign the required capability. */\n\telseif ( 'delete_game' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->delete_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->delete_others_posts;\n\t}\n\t\n\t/* If deleting a resource, assign the required capability. */\n\telseif ( 'delete_resouce' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->delete_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->delete_others_posts;\n\t}\n\t\n\telseif ( 'delete_person' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->delete_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->delete_others_posts;\n\t}\n\n\t/* If reading a private game, assign the required capability. */\n\telseif ( 'read_game' == $cap ) {\n\n\t\tif ( 'private' != $post->post_status )\n\t\t\t$caps[] = 'read';\n\t\telseif ( $user_id == $post->post_author )\n\t\t\t$caps[] = 'read';\n\t\telse\n\t\t\t$caps[] = $post_type->cap->read_private_posts;\n\t}\n\t\n\t/* If reading a private resource, assign the required capability. */\n\telseif ( 'read_resouce' == $cap ) {\n\n\t\tif ( 'private' != $post->post_status )\n\t\t\t$caps[] = 'read';\n\t\telseif ( $user_id == $post->post_author )\n\t\t\t$caps[] = 'read';\n\t\telse\n\t\t\t$caps[] = $post_type->cap->read_private_posts;\n\t}\n\t\n\telseif ( 'read_person' == $cap ) {\n\n\t\tif ( 'private' != $post->post_status )\n\t\t\t$caps[] = 'read';\n\t\telseif ( $user_id == $post->post_author )\n\t\t\t$caps[] = 'read';\n\t\telse\n\t\t\t$caps[] = $post_type->cap->read_private_posts;\n\t}\n\n\t/* Return the capabilities required by the user. */\n\treturn $caps;\n}", "public function mapMetaCaps($caps, $cap, $user_id, $args) {\n global $post;\n\n $objectId = (isset($args[0]) ? $args[0] : null);\n\n // First of all delete all artificial capabilities from the $caps\n foreach($caps as $i => $capability) {\n if (strpos($capability, 'aam|') === 0) {\n // Remove this capability from the mapped array and let WP Core\n // handle the correct mapping\n $capability = null; \n }\n\n if (in_array($capability, AAM_Backend_Feature_Main_Capability::$groups['aam'], true)) {\n if (!AAM_Core_API::capabilityExists($capability)) {\n $capability = AAM_Core_Config::get(\n 'page.capability', 'administrator'\n );\n }\n }\n\n if ($capability === null) {\n unset($caps[$i]);\n } else {\n $caps[$i] = $capability;\n }\n }\n\n switch($cap) {\n case 'edit_user':\n case 'delete_user':\n // Some plugins or themes simply do not provide the the user ID for\n // these capabilities. I did not find in WP core any place were they\n // violate this rule\n if (!empty($objectId)) {\n $caps = $this->authorizeUserUpdate($caps, $objectId);\n }\n break;\n \n case 'install_plugins':\n case 'delete_plugins':\n case 'edit_plugins':\n case 'update_plugins':\n $action = explode('_', $cap);\n $caps = $this->checkPluginsAction($action[0], $caps, $cap);\n break;\n \n case 'activate_plugin':\n case 'deactivate_plugin':\n $action = explode('_', $cap);\n $caps = $this->checkPluginAction($objectId, $action[0], $caps, $cap);\n break;\n\n // This part needs to stay to cover scenarios where WP_Post_Type->cap->...\n // is not used but rather the hardcoded capability \n case 'edit_post':\n $caps = $this->authorizePostEdit($caps, $objectId);\n break;\n \n case 'delete_post':\n $caps = $this->authorizePostDelete($caps, $objectId);\n break;\n \n case 'read_post':\n $caps = $this->authorizePostRead($caps, $objectId);\n break;\n \n \n case 'publish_post':\n case 'publish_posts':\n case 'publish_pages':\n // There is a bug in WP core that instead of checking if user has\n // ability to publish_post, it checks for edit_post. That is why\n // user has to be on the edit\n if (is_a($post, 'WP_Post')) {\n $caps = $this->authorizePublishPost($caps, $post->ID);\n }\n break;\n \n default:\n if (strpos($cap, 'aam|') === 0) {\n if (!$this->skipMetaCheck) {\n $this->skipMetaCheck = true;\n $caps = $this->checkPostTypePermission($caps, $cap, $objectId);\n $this->skipMetaCheck = false;\n }\n } else {\n $caps = apply_filters('aam-map-meta-caps-filter', $caps, $cap, $args);\n }\n break;\n }\n \n return $caps;\n }", "function map_meta_cap( $caps, $cap, $user_id, $args ){\n\n switch( $cap ){\n case 'edit_user':\n case 'remove_user':\n case 'promote_user':\n if( isset($args[0]) && $args[0] == $user_id )\n break;\n elseif( !isset($args[0]) )\n $caps[] = 'do_not_allow';\n $other = new WP_User( absint($args[0]) );\n if( $other->has_cap( 'administrator' ) ){\n if(!current_user_can('administrator')){\n $caps[] = 'do_not_allow';\n }\n }\n break;\n case 'delete_user':\n case 'delete_users':\n if( !isset($args[0]) )\n break;\n $other = new WP_User( absint($args[0]) );\n if( $other->has_cap( 'administrator' ) ){\n if(!current_user_can('administrator')){\n $caps[] = 'do_not_allow';\n }\n }\n break;\n default:\n break;\n }\n return $caps;\n }", "function servicio_meta_cap( $caps, $cap, $user_id, $args ) {\n\tif ( 'edit_servicio' == $cap || 'delete_servicio' == $cap || 'read_servicio' == $cap ) {\n\t\t$post = get_post( $args[0] );\n\t\t$post_type = get_post_type_object( $post->post_type );\n\n\t\t/* Set an empty array for the caps. */\n\t\t$caps = array();\n\t}\n\n\t/* If editing a servicio, assign the required capability. */\n\tif ( 'edit_servicio' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->edit_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->edit_others_posts;\n\t}\n\n\t/* If deleting a servicio, assign the required capability. */\n\telseif ( 'delete_servicio' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->delete_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->delete_others_posts;\n\t}\n\n\t/* If reading a private servicio, assign the required capability. */\n\telseif ( 'read_servicio' == $cap ) {\n\n\t\tif ( 'private' != $post->post_status )\n\t\t\t$caps[] = 'read';\n\t\telseif ( $user_id == $post->post_author )\n\t\t\t$caps[] = 'read';\n\t\telse\n\t\t\t$caps[] = $post_type->cap->read_private_posts;\n\t}\n\n\t/* Return the capabilities required by the user. */\n\treturn $caps;\n}", "function _post_type_meta_capabilities($capabilities = \\null)\n {\n }", "public function map_meta_cap($caps, $cap, $user_id, $args)\n {\n switch ($cap) {\n case 'edit_user':\n case 'remove_user':\n case 'promote_user':\n if (isset($args[0]) && $args[0] == $user_id) {\n break;\n } elseif (!isset($args[0])) {\n $caps[] = 'do_not_allow';\n }\n\n $other = new WP_User(absint($args[0]));\n if ($other->has_cap('administrator')) {\n if (!current_user_can('administrator')) {\n $caps[] = 'do_not_allow';\n }\n }\n break;\n case 'delete_user':\n case 'delete_users':\n if (!isset($args[0])) {\n break;\n }\n\n $other = new WP_User(absint($args[0]));\n if ($other->has_cap('administrator')) {\n if (!current_user_can('administrator')) {\n $caps[] = 'do_not_allow';\n }\n }\n break;\n default:\n break;\n }\n return $caps;\n }", "function wck_add_meta(){\n\t\tparent::wck_add_meta();\n\t}", "function convocatoria_meta_cap( $caps, $cap, $user_id, $args ) {\n\tif ( 'edit_convocatoria' == $cap || 'delete_convocatoria' == $cap || 'read_convocatoria' == $cap ) {\n\t\t$post = get_post( $args[0] );\n\t\t$post_type = get_post_type_object( $post->post_type );\n\n\t\t/* Set an empty array for the caps. */\n\t\t$caps = array();\n\t}\n\n\t/* If editing a convocatoria, assign the required capability. */\n\tif ( 'edit_convocatoria' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->edit_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->edit_others_posts;\n\t}\n\n\t/* If deleting a convocatoria, assign the required capability. */\n\telseif ( 'delete_convocatoria' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->delete_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->delete_others_posts;\n\t}\n\n\t/* If reading a private convocatoria, assign the required capability. */\n\telseif ( 'read_convocatoria' == $cap ) {\n\n\t\tif ( 'private' != $post->post_status )\n\t\t\t$caps[] = 'read';\n\t\telseif ( $user_id == $post->post_author )\n\t\t\t$caps[] = 'read';\n\t\telse\n\t\t\t$caps[] = $post_type->cap->read_private_posts;\n\t}\n\n\t/* Return the capabilities required by the user. */\n\treturn $caps;\n}", "function banner_meta_cap( $caps, $cap, $user_id, $args ) {\n\tif ( 'edit_banner' == $cap || 'delete_banner' == $cap || 'read_banner' == $cap ) {\n\t\t$post = get_post( $args[0] );\n\t\t$post_type = get_post_type_object( $post->post_type );\n\n\t\t/* Set an empty array for the caps. */\n\t\t$caps = array();\n\t}\n\n\t/* If editing a banner, assign the required capability. */\n\tif ( 'edit_banner' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->edit_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->edit_others_posts;\n\t}\n\n\t/* If deleting a banner, assign the required capability. */\n\telseif ( 'delete_banner' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->delete_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->delete_others_posts;\n\t}\n\n\t/* If reading a private banner, assign the required capability. */\n\telseif ( 'read_banner' == $cap ) {\n\n\t\tif ( 'private' != $post->post_status )\n\t\t\t$caps[] = 'read';\n\t\telseif ( $user_id == $post->post_author )\n\t\t\t$caps[] = 'read';\n\t\telse\n\t\t\t$caps[] = $post_type->cap->read_private_posts;\n\t}\n\n\t/* Return the capabilities required by the user. */\n\treturn $caps;\n}", "function producto_meta_cap( $caps, $cap, $user_id, $args ) {\n\tif ( 'edit_producto' == $cap || 'delete_producto' == $cap || 'read_producto' == $cap ) {\n\t\t$post = get_post( $args[0] );\n\t\t$post_type = get_post_type_object( $post->post_type );\n\n\t\t/* Set an empty array for the caps. */\n\t\t$caps = array();\n\t}\n\n\t/* If editing a producto, assign the required capability. */\n\tif ( 'edit_producto' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->edit_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->edit_others_posts;\n\t}\n\n\t/* If deleting a producto, assign the required capability. */\n\telseif ( 'delete_producto' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->delete_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->delete_others_posts;\n\t}\n\n\t/* If reading a private producto, assign the required capability. */\n\telseif ( 'read_producto' == $cap ) {\n\n\t\tif ( 'private' != $post->post_status )\n\t\t\t$caps[] = 'read';\n\t\telseif ( $user_id == $post->post_author )\n\t\t\t$caps[] = 'read';\n\t\telse\n\t\t\t$caps[] = $post_type->cap->read_private_posts;\n\t}\n\n\t/* Return the capabilities required by the user. */\n\treturn $caps;\n}", "public function add_meta( &$object, $meta );", "function directorio_meta_cap( $caps, $cap, $user_id, $args ) {\n\tif ( 'edit_directorio' == $cap || 'delete_directorio' == $cap || 'read_directorio' == $cap ) {\n\t\t$post = get_post( $args[0] );\n\t\t$post_type = get_post_type_object( $post->post_type );\n\n\t\t/* Set an empty array for the caps. */\n\t\t$caps = array();\n\t}\n\n\t/* If editing a directorio, assign the required capability. */\n\tif ( 'edit_directorio' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->edit_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->edit_others_posts;\n\t}\n\n\t/* If deleting a directorio, assign the required capability. */\n\telseif ( 'delete_directorio' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->delete_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->delete_others_posts;\n\t}\n\n\t/* If reading a private directorio, assign the required capability. */\n\telseif ( 'read_directorio' == $cap ) {\n\n\t\tif ( 'private' != $post->post_status )\n\t\t\t$caps[] = 'read';\n\t\telseif ( $user_id == $post->post_author )\n\t\t\t$caps[] = 'read';\n\t\telse\n\t\t\t$caps[] = $post_type->cap->read_private_posts;\n\t}\n\n\t/* Return the capabilities required by the user. */\n\treturn $caps;\n}", "private static function map_capability($role, $role_info, $existing_cap, $new_cap) {\n if (isset($role_info['capabilities'][$new_cap])) {\n // Already has new cap…\n if (!self::has_capability($role_info, $existing_cap)) {\n // But shouldn't have it!\n $role->remove_cap($new_cap);\n }\n }\n else {\n // Doesn't have new cap…\n if (self::has_capability($role_info, $existing_cap)) {\n // But should have it!\n $role->add_cap($new_cap);\n }\n }\n }", "public function addMeta(Meta $meta) {\n $this->meta[$meta->getName()] = $meta;\n }", "public function add_meta( &$object, $meta ) {\n\t\t}", "protected function set_meta( $meta ) {\n\t\t$this->meta = wp_parse_args( $meta, $this->meta );\n\t}", "function documento_meta_cap( $caps, $cap, $user_id, $args ) {\n\tif ( 'edit_documento' == $cap || 'delete_documento' == $cap || 'read_documento' == $cap ) {\n\t\t$post = get_post( $args[0] );\n\t\t$post_type = get_post_type_object( $post->post_type );\n\n\t\t/* Set an empty array for the caps. */\n\t\t$caps = array();\n\t}\n\n\t/* If editing a documento, assign the required capability. */\n\tif ( 'edit_documento' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->edit_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->edit_others_posts;\n\t}\n\n\t/* If deleting a documento, assign the required capability. */\n\telseif ( 'delete_documento' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->delete_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->delete_others_posts;\n\t}\n\n\t/* If reading a private documento, assign the required capability. */\n\telseif ( 'read_documento' == $cap ) {\n\n\t\tif ( 'private' != $post->post_status )\n\t\t\t$caps[] = 'read';\n\t\telseif ( $user_id == $post->post_author )\n\t\t\t$caps[] = 'read';\n\t\telse\n\t\t\t$caps[] = $post_type->cap->read_private_posts;\n\t}\n\n\t/* Return the capabilities required by the user. */\n\treturn $caps;\n}", "protected function save_meta() {}", "public function add_meta( &$object, $meta ) {\n\t\t// TODO: Implement add_meta() method.\n\t}", "protected function add_VcMap($params, $name='', $shortcode='', $show_settings=true){\n\t\t// \t$name = str_replace($namespace. '\\\\','', get_class($this) );\n if(!$name) $name = 'Magiccart ' . ucfirst($this->_class);\n \tif(!$shortcode) $shortcode = 'magiccart_' . strtolower($this->_class);\n // $html_template = plugin_dir_path(__DIR__) . 'Magiccart/Composer/view/frontend/templates/vc_template.php';\n \t$this->_vcSetting = array(\n \t\t\t'name' => $name,\n \t\t\t'base' => $shortcode,\n \t\t\t'category' => __( 'Magiccart', 'alothemes' ),\n 'is_container' => false,\n \t\t\t'params'\t => $params,\n 'icon' => get_template_directory_uri() . \"/images/logo.png\",\n 'show_settings_on_create' => $show_settings,\n // 'html_template' => locate_template('templates/vc_row-header.php') ,\n\n \t);\n \n vc_map($this->_vcSetting);\n }", "function add_metadata($meta_type, $object_id, $meta_key, $meta_value, $unique = \\false)\n {\n }", "public static function set_meta($meta,$movabl_type,$movabl_guid) {\n global $mvs_db;\n\n $sanitized_meta = self::sanitize_data('meta',$meta);\n $sanitized_guid = $mvs_db->real_escape_string($movabl_guid);\n $sanitized_type = $mvs_db->real_escape_string($movabl_type);\n\n foreach ($sanitized_meta as $k => $v)\n Movabls_Data::data_query(\"REPLACE INTO `mvs_meta` (`movabls_GUID`,`movabls_type`,`key`,`value`) VALUES ('$sanitized_guid','$sanitized_type','$k','$v')\");\n\n \n return true;\n\n }", "public function setCAPMedico($cap) {\n $this->_CAP = $cap;\n }", "protected function addMeta() {\n foreach ($this->meta_info as $key => $meta) {\n $this->header.=\"<meta name='\" . $key . \"' content='\" . $meta . \"' /> \\n\";\n }\n }", "function mars_video_meta() {}", "function addMeta() {\n\t\n\tif( class_exists('acf') ) {\n\n\t$meta_description = get_field('meta_description', 'option');\n\t$meta_keywords = get_field('meta_keywords', 'option');\n\t$meta_author = get_field('meta_author', 'option');\n\t$meta_og_image = get_field('meta_og_img', 'option');\n\t$meta_img_full = $meta_og_image['url'];\n\n\t}\n\n\tif ( $meta_description ) {\n\t\techo '<meta name=\"description\" content=\"'.$meta_description.'\">'; \n\t}\n\n\tif ( $meta_keywords ) {\n\t\techo '<meta name=\"keywords\" content=\"'.$meta_keywords.'\">'; \n\t}\n\n\tif ( $meta_author ) {\n\t\techo '<meta name=\"author\" content=\"'.$meta_author.'\">'; \n\t}\n\n\tif ( $meta_og_image ) {\n\t\techo '<meta name=\"twitter:card\" content=\"summary\" />';\n\t\techo '<meta property=\"og:image\" content=\"'.$meta_img_full.'\" />';\n\t}\n\n}", "public function add_meta() {\n\t\techo \"\\n<meta data-plugin='a04_vertical_button' name='description' content='a sample meta description for this website'/>\\n\\n\";\n\t}", "public function add_meta( $key, $value, $unique = false );", "public function setMeta($var)\n {\n $arr = GPBUtil::checkMapField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->Meta = $arr;\n\n return $this;\n }", "public function onMetaParsed(&$meta)\n {\n $meta['tags'] = PicoTags::parseTags($meta['tags']);\n $meta['filter'] = PicoTags::parseTags($meta['filter']);\n }", "public function addMeta(string $key, $value): void\n {\n $this->addMetaHook(function (RequestDetails $requestDetails) use ($key, $value) {\n return [\n 'key' => $key,\n 'value' => $value,\n ];\n });\n }", "public function initializeByMeta($meta)\n {\n }", "public function setMeta(array $meta): Mapping\n {\n return $this->setParam('_meta', $meta);\n }", "function mpfy_shortcode_custom_mapping($atts, $content) {\n\tglobal $mpfy_footer_scripts;\n\tstatic $mpfy_instances = -1;\n\t$mpfy_instances ++;\n\n\tif (!defined('MPFY_LOAD_ASSETS')) {\n\t\tdefine('MPFY_LOAD_ASSETS', true);\n\t}\n\n\textract( shortcode_atts( array(\n\t\t'width'=>0,\n\t\t'height'=>300,\n\t\t'map_id'=>0,\n\t), $atts));\n\n\tif (!stristr($width, '%')) {\n\t\t$width = intval($width);\n\t\t$width = ($width < 1) ? 0 : $width . 'px';\n\t}\n\n\tif (!stristr($height, '%')) {\n\t\t$height = intval($height);\n\t\t$height = ($height < 1) ? 300 : $height . 'px';\n\t}\n\n\tif ($map_id == 0) {\n\t\t$map_id = Mpfy_Map::get_first_map_id();\n\t}\n\n\t$map = get_post(intval($map_id));\n\tif (!$map || is_wp_error($map) || $map->post_type != 'map') {\n\t\treturn 'Invalid or no map_id specified.';\n\t}\n\n\t$map = new Mpfy_Map($map->ID);\n\n\t$template = include('templates/map.php');\n\t$mpfy_footer_scripts .= $template['script'];\n\treturn $template['html'];\n}", "public function add_cap($cap, $grant = \\true)\n {\n }", "public function add_cap($cap, $grant = \\true)\n {\n }", "public function add_custom_capabilities(){\n\t\t$roles = array( 'editor', 'administrator' );\n\t\t// Loop through each role and assign capabilities\n\t\tforeach($roles as $the_role) { \n\t\t\t$role = get_role($the_role);\n\t\t\t// Post Type\n\t\t\t$role->add_cap( 'edit_person' );\n\t\t\t$role->add_cap( 'read_person' );\n\t\t\t$role->add_cap( 'delete_person' );\n\t\t\t$role->add_cap( 'edit_people' );\n\t\t\t$role->add_cap( 'edit_others_people' );\n\t\t\t$role->add_cap( 'publish_people' );\n\t\t\t$role->add_cap( 'read_private_people' );\n\t\t\t// Taxonomy\n\t\t\t$role->add_cap( 'manage_person_roles' );\n\t\t}\n\t}", "function htheme_map_shortcode( $atts ) {\r\n\r\n\t\t#SETUP CONTENT CLASS\r\n\t\t$htheme_data = $this->htheme_content->htheme_get_map($atts);\r\n\r\n\t\t#RETURN DATA/HTML\r\n\t\treturn $htheme_data;\r\n\r\n\t}", "function ps_imagemanager_add_capabilities($caps) {\n\tunset($caps[array_search('ImageManager Upload', $caps)]);\n\tunset($caps[array_search('ImageManager MkDir', $caps)]);\n\n\t// add role\n\t$upload_files = array_search('upload_files', $caps); //Prior to PHP 4.2.0, array_search() returns NULL on failure instead of FALSE.\n\tif ($upload_files == FALSE || $upload_files == NULL) {\n\t\t$caps[] = 'upload_files';\n\t}\n\t$make_directory = array_search('make_directory', $caps);\n\tif ($make_directory == FALSE || $make_directory == NULL) {\n\t\t$caps[] = 'make_directory';\n\t}\n\t$edit_image = array_search('edit_image', $caps);\n\tif ($edit_image == FALSE || $edit_image == NULL) {\n\t\t$caps[] = 'edit_image';\n\t}\t\n\t$delete_image = array_search('delete_image', $caps);\n\tif ($delete_image == FALSE || $delete_image == NULL) {\n\t\t$caps[] = 'delete_image';\n\t}\n\treturn $caps;\n}", "protected function applyMeta(): void\n {\n $this->state->mergeIntoArray('tca.meta', $this->cache->get(static::TCA_META_CACHE_KEY, []));\n }", "protected function processMeta($control, $meta)\n\t {\n\t\tif($control instanceof TextInput && isset($meta['length'])) {\n\t\t $control->maxLenght = $meta['length'];\n\t\t}\n\t }", "public function addMeta($key, $value)\n {\n $this->meta[$key] = $value;\n }", "public function addMetaTag($name,$desc){\n $this->_metaTags[$name] = $desc;\n }", "public function setMeta($meta)\n {\n $this->setValue('meta', $meta);\n }", "public function setMeta($meta)\n {\n $this->setValue('meta', $meta);\n }", "function add_capability( $capabilities ) {\n\n $capabilities[ self::$capability ] = __( 'Manage Admin Tools', 'wpp' );\n\n return $capabilities;\n }", "function is_site_meta_supported()\n {\n }", "private function import_metas() {\n\t\tWPSEO_Meta::replace_meta( '_aioseop_description', WPSEO_Meta::$meta_prefix . 'metadesc', $this->replace );\n\t\tWPSEO_Meta::replace_meta( '_aioseop_keywords', WPSEO_Meta::$meta_prefix . 'metakeywords', $this->replace );\n\t\tWPSEO_Meta::replace_meta( '_aioseop_title', WPSEO_Meta::$meta_prefix . 'title', $this->replace );\n\t}", "protected function _init_caps($cap_key = '')\n {\n }", "private function import_metas() {\n\t\tWPSEO_Meta::replace_meta( '_aioseop_description', WPSEO_Meta::$meta_prefix . 'metadesc', false );\n\t\tWPSEO_Meta::replace_meta( '_aioseop_keywords', WPSEO_Meta::$meta_prefix . 'metakeywords', false );\n\t\tWPSEO_Meta::replace_meta( '_aioseop_title', WPSEO_Meta::$meta_prefix . 'title', false );\n\t}", "function construction_realestate_posttype_cs_custom_meta() {\n add_meta_box( 'cs_meta', __( 'Settings', 'construction-realestate-posttype' ), 'construction_realestate_posttype_cs_meta_callback' , 'agents');\n}", "public function add_capabilties_to_roles()\n {\n $post_type_object = get_post_type_object($this->name);\n global $wp_roles;\n $roles = array('administrator');\n foreach( (array)$post_type_object->cap as $capability ){\n foreach( $roles as $role_name ){\n $role = get_role($role_name);\n $role->add_cap($capability);\n }\n }\n }", "protected function update_attribute_meta( $meta_key, $meta_value ) {\n\t\tif ( $attribute = $this->get_mapping_attribute( $meta_key ) ) {\n\t\t\t$this->set_attribute( $attribute, $meta_value );\n\t\t}\n\t}", "public function setMetas($meta)\n {\n if (empty($meta)) {\n return;\n }\n\n foreach ($meta as $key => $value) {\n if (is_callable($value) && !is_string($value)) {\n $value = $value($this);\n }\n\n $this->setMeta($key, $value);\n }\n }", "public function setMetaAttribute($name, $value)\n {\n $this->metaAttributes[$name] = $value;\n }", "public function add_cap( $cap, $grant = true ) {\n\t\t$this->capabilities[ $cap ] = $grant;\n\t\twp_roles()->add_cap( $this->name, $cap, $grant );\n\t}", "function the_meta()\n {\n }", "public function setMeta($key, $value)\n {\n }", "function add_meta($post_id)\n {\n }", "function wp_ajax_add_meta()\n {\n }", "protected function saveMeta($meta){\r\n\t//System::dump($meta);\r\n\t\r\n\tforeach($meta as $item){\r\n\t\t\r\n\t\tif((string)$item->row->attributes()->system_type=='bool'){\r\n\t\t\t$postvalue = !isset($this->sourceData['meta_value_'.(string)$item->row->name]) ? 0: 1;\r\n\t\t}elseif((string)$item->row->attributes()->system_type=='text' || ( (string)$item->row->attributes()->system_type=='blob' && (string)$item->row->attributes()->cleanup==1 ) ){\r\n\t\t\t$postvalue = Filter::makeSafeString($this->sourceData['meta_value_'.(string)$item->row->name]);\r\n\t\t}else{\r\n\t\t\t$postvalue = $this->sourceData['meta_value_'.(string)$item->row->name];\r\n\t\t}\r\n\t\t\r\n\t\t$value = DataValidator::saveData($postvalue, (string)$item->row->attributes()->system_type);\r\n\t\t\r\n\t\t$metaEx = $this->metaRowExists((int)$item->row->name);\r\n\r\n\t\tif($this->id==0 || $metaEx==0){\r\n\t\t\t$id_connect = $this->id==0 ? (int)$this->lastInsert: (int)$this->id;\r\n\t\t\t$q = \"INSERT INTO \"._SQLPREFIX_.$this->metaDataTableName.\" (\".$this->metaConnectId.\", id_meta, \".(string)$item->row->attributes()->system_type.\"_value ) VALUES (\";\r\n\t\t\t$q .= \"'\".Db::escapeField($id_connect).\"', '\".(int)$item->row->name.\"'\".\", '\".Db::escapeField($value).\"')\";\r\n\t\t\r\n\t\t}else{\r\n\t\t\t$id_connect = (int)$this->id;\r\n\t\t\t$q = \"UPDATE \"._SQLPREFIX_.$this->metaDataTableName.\" SET \";\r\n\t\t\t$q .= (string)$item->row->attributes()->system_type.\"_value = '\".Db::escapeField($value).\"' WHERE \".$this->metaConnectId.\" = '\".$id_connect.\"' AND id_meta = '\".(string)$item->row->name.\"'\";\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//echo $q.'<br />'; \r\n\t\tDb::query($q);\r\n\t}\r\n}", "function setMeta($meta, $key, $value, $ignoreExistingKey = false)\n{\n if (!$meta)\n $meta = (object) array();\n\n //Ignore existing key\n if ($ignoreExistingKey) {\n if (isset($meta->{$key}))\n return $meta;\n }\n\n\n $meta->{$key} = $value;\n return $meta;\n}", "public function addMetaHook($callback): void\n {\n $this->metaHooks[] = $callback;\n }", "public function createMediaMeta($bind)\n{\n\n $this->create(\"tbl_mediameta\", [\n\n 'media_id' => $bind['media_id'],\n 'meta_key' => $bind['meta_key'],\n 'meta_value' => $bind['meta_value']\n\n ]);\n\n}", "public function options_capability( $cap ) {\n \treturn 'manage_fonts';\n\t}", "function m_custom_meta() {\r\n add_meta_box( 'sm_meta', __( 'Featured Posts', 'sm-textdomain' ), 'sm_meta_callback', 'post' );\r\n add_meta_box( 'mm_meta', __( 'Main Posts', 'sm-textdomain' ), 'mm_meta_callback', 'post' );\r\n\r\n}", "protected function setMeta(array $meta)\n\t{\n\t\t$this->meta = $meta;\n\n\t\tforeach ($this->meta as $key => $value)\n\t\t{\n\t\t\t$this->router->setGlobal(sprintf('route_%d_%s', $this->index, $key), $value);\n\t\t}\n\t}", "protected function saveMeta() {\n if (empty($this->_metaModified)) {\n // no dirty attributes, nothing to deal with\n return;\n }\n\n $owner = static::tableName();\n $owner_id = $this->{static::meta_id_field()};\n $metaBatchInsert = [];\n\n $mpLen = strlen(static::meta_prefix());\n\n foreach ($this->_metaModified as $key => $mode) {\n // get key without prefix\n $db_key = substr($key, $mpLen);\n\n switch ($mode) {\n case self::META_ADDED:\n $attrs = [\n 'owner' => $owner,\n 'owner_id' => $owner_id,\n 'meta_key' => $db_key,\n 'meta_value' => (string)$this->_meta->$key\n ];\n // the code below is very slow\n $um = new Meta($attrs);\n if ($um->validate()) {\n $metaBatchInsert[] = $attrs;\n } else {\n throw new Exception('Failed to save invalid meta key: ' . $db_key . ' ' . json_encode($um->getFirstErrors(),\n JSON_PRETTY_PRINT));\n }\n// $um->insert();\n break;\n case self::META_MODIFIED:\n Meta::updateAll(\n [\n 'meta_value' => (string)$this->_meta->$key\n ],\n [\n 'owner' => $owner,\n 'owner_id' => $owner_id,\n 'meta_key' => $db_key\n ]);\n break;\n case self::META_UNSET:\n Meta::deleteAll([\n 'owner' => $owner,\n 'owner_id' => $owner_id,\n 'meta_key' => $db_key\n ]);\n break;\n }\n }\n\n if (!empty($metaBatchInsert)) {\n Meta::getDb()->createCommand()->batchInsert(Meta::tableName(),\n ['owner', 'owner_id', 'meta_key', 'meta_value'], $metaBatchInsert)->execute();\n }\n\n $this->_metaModified = [];\n\n $this->trigger(self::EVENT_META_SAVE);\n }", "function add_site_meta($site_id, $meta_key, $meta_value, $unique = \\false)\n {\n }", "protected function initMeta($attr)\n {\n if (isset($attr[\"id\"])) {\n $this->meta[\"id\"] = $attr[\"id\"];\n }\n\n if (isset($attr[\"class\"])) {\n $this->meta[\"class\"] = $attr[\"class\"];\n }\n\n if (isset($attr[\"html\"])) {\n $this->meta[\"html\"] = $attr[\"html\"];\n }\n\n if (isset($attr[\"properties\"])) {\n $this->meta[\"properties\"] = $attr[\"properties\"];\n if (is_array($this->meta[\"properties\"])) {\n foreach ($this->meta[\"properties\"] as $att => $val) {\n $this->meta[\"prop\"] .= \" {$att} = '{$val}'\";\n }\n }\n }\n\n }", "public function vc_map_shortcode() {\n\t\t\tvc_map( array(\n\t\t\t\t'name' => _x( 'Social Icons', 'backend', 'vc-elements-pt' ),\n\t\t\t\t'base' => $this->shortcode_name(),\n\t\t\t\t'category' => _x( 'Content', 'backend', 'vc-elements-pt' ),\n\t\t\t\t'icon' => get_template_directory_uri() . '/vendor/proteusthemes/visual-composer-elements/assets/images/pt.svg',\n\t\t\t\t'as_parent' => array( 'only' => 'pt_vc_social_icon' ),\n\t\t\t\t'content_element' => true,\n\t\t\t\t'js_view' => 'VcColumnView',\n\t\t\t\t'params' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'heading' => _x( 'Open link in new tab', 'backend', 'vc-elements-pt' ),\n\t\t\t\t\t\t'param_name' => 'new_tab',\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t) );\n\t\t}", "function vw_hospital_cs_savecustom_meta() {\n add_meta_box( 'cs_meta', __( 'Settings', 'vw-hospital' ), 'w_hospital_cs_appoint_callback' , 'Appointment','normal', 'high' ); \n}", "public function addMeta($name, $content) {\n\t\t\n\t\t\t$newMeta = new StdClass();\n\t\t\t$newMeta->name = $name;\n\t\t\t$newMeta->content = $content;\n\t\t\t\n\t\t\tforeach ($this->_meta as $meta) {\n\t\t\t\tif ($meta->name == $name) {\n\t\t\t\t\t$meta->content = $content;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->_meta[] = $newMeta;\n\t\t\t\n\t\t}", "function carton_add_order_item_meta( $item_id, $meta_key, $meta_value, $unique = false ){\n\treturn add_metadata( 'order_item', $item_id, $meta_key, $meta_value, $unique );\n}", "function _display_maps_meta( $post ) {\n\t\tinclude( 'includes/metaboxes/maps.php' );\n\t}", "function ahr_add_meta_box() {\r\n \r\n add_meta_box( 'ahr', 'Advaned https redirect', 'ahr_render_meta_box', null, 'normal', 'high', null );\r\n \r\n}", "public function add_caps() {\n global $wp_roles;\n\n // TODO: see easy-digital-downloads plugin source codes for example implementation.\n }", "public function add_meta($name, $content = null)\n {\n if (is_array($name))\n {\n foreach ($name as $key => $val)\n {\n $key = htmlspecialchars($key, ENT_QUOTES, 'UTF-8');\n $val = htmlspecialchars($val, ENT_QUOTES, 'UTF-8');\n $this->metatag[$key] = $val;\n }\n }\n else\n {\n $name = htmlspecialchars($name, ENT_QUOTES, 'UTF-8');\n $content = htmlspecialchars($content, ENT_QUOTES, 'UTF-8');\n $this->metatag[$name] = $content;\n }\n return $this;\n }", "public function addMeta(array $metas, string $outputPath): void;", "public function setMeta($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Protobuf\\Any::class);\n $this->meta = $var;\n\n return $this;\n }", "function fiorello_mikado_user_scalable_meta() {\n\t\t//is responsiveness option is chosen?\n\t\tif ( fiorello_mikado_is_responsive_on() ) { ?>\n\t\t\t<meta name=\"viewport\" content=\"width=device-width,initial-scale=1,user-scalable=yes\">\n\t\t<?php } else { ?>\n\t\t\t<meta name=\"viewport\" content=\"width=1200,user-scalable=yes\">\n\t\t<?php }\n\t}", "public function render_screen_meta()\n {\n }", "public static function meta();", "public function register_meta() {\r\n\t\t\tforeach($this->customFields as $customField){\r\n\t\t\t\tadd_meta_box( 'ecf-'.$customField['name'], __( $customField['title'], 'exlist' ), $customField['callback'], $postTypes , 'advanced', 'high', $type = array($customField['name'], $customField['title'], $customField['type']) );\r\n\t\t\t}\r\n }", "public function do_meta_tags() {\n\t\tglobal $posts;\n\t\t$post = null;\n\t\tif ( ! is_array( $posts ) || ! isset( $posts[0] ) || ! is_a( $posts[0], 'WP_Post' ) ) {\n\t\t\treturn;\n\t\t}\n\t\t$post = $posts[0];\n\n\t\t$options = $this->get_saved_options();\n\t\t$site_wide_meta = '';\n\t\tif ( isset( $options['site_wide_meta'] ) ) {\n\t\t\t$site_wide_meta = $options['site_wide_meta'];\n\t\t}\n\n\t\t$cmpvalues = $this->get_enabled_singular_options( $post->post_type );\n\t\t$metatags = array();\n\n\t\t// Add META tags to Singular pages.\n\t\tif ( is_singular() ) {\n\t\t\tif ( ! in_array( '1', $cmpvalues, true ) && ! empty( $options['site_wide_meta'] ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$mt_seo_title = (string) get_post_meta( $post->ID, 'mt_seo_title', true );\n\t\t\t$mt_seo_description = (string) get_post_meta( $post->ID, 'mt_seo_description', true );\n\t\t\t$mt_seo_keywords = (string) get_post_meta( $post->ID, 'mt_seo_keywords', true );\n\t\t\t$mt_seo_google_news_meta = (string) get_post_meta( $post->ID, 'mt_seo_google_news_meta', true );\n\t\t\t$mt_seo_meta = (string) get_post_meta( $post->ID, 'mt_seo_meta', true );\n\n\t\t\tif ( '' === $mt_seo_title ) {\n\t\t\t\t$mt_seo_title = (string) get_post_meta( $post->ID, '_yoast_wpseo_title', true );\n\t\t\t}\n\n\t\t\tif ( '' === $mt_seo_description ) {\n\t\t\t\t$mt_seo_description = (string) get_post_meta( $post->ID, '_yoast_wpseo_metadesc', true );\n\t\t\t}\n\n\t\t\t/*\n\t\t\tDescription. Order of preference:\n\t\t\t1. The post meta value for 'mt_seo_description'\n\t\t\t2. The post excerpt\n\t\t\t*/\n\t\t\tif ( '1' === $cmpvalues['mt_seo_description'] ) {\n\t\t\t\t$meta_description = '';\n\n\t\t\t\tif ( ! empty( $mt_seo_description ) ) {\n\t\t\t\t\t$meta_description = $mt_seo_description;\n\t\t\t\t} elseif ( is_single() ) {\n\t\t\t\t\t$meta_description = $this->get_the_excerpt( $post );\n\t\t\t\t}\n\n\t\t\t\t/**\n\t\t\t\t * Filter the description for a singular post.\n\t\t\t\t *\n\t\t\t\t * @param string Contents of the post description field.\n\t\t\t\t */\n\t\t\t\t$meta_description = apply_filters( 'amt_meta_description', $meta_description );\n\n\t\t\t\tif ( ! empty( $meta_description ) ) {\n\t\t\t\t\t$metatags['description'] = $meta_description;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Custom Meta Tags. This is a fully-rendered META tag, so no need to build it up.\n\t\t\tif ( ! empty( $mt_seo_meta ) && '1' === $cmpvalues['mt_seo_meta'] ) {\n\t\t\t\t// This is a potential difference; no escaping was done on this value in previous versions.\n\t\t\t\t$metatags['custom'] = $mt_seo_meta;\n\t\t\t}\n\n\t\t\t// Google News Meta. From post meta field \"mt-seo-google-news-meta.\n\t\t\tif ( ! empty( $mt_seo_google_news_meta ) && '1' === $cmpvalues['mt_seo_google_news_meta'] ) {\n\t\t\t\t$metatags['news_keywords'] = $mt_seo_google_news_meta;\n\t\t\t}\n\n\t\t\t/*\n\t\t\tTitle is handled using filters\n\t\t\t*/\n\n\t\t\t/*\n\t\t\tKeywords. Created in the following order\n\t\t\t1. The post meta value for 'mt_seo_keywords'\n\t\t\t2. The post's categories and tags.\n\t\t\t*/\n\t\t\tif ( '1' === $cmpvalues['mt_seo_keywords'] ) {\n\t\t\t\tif ( ( self::INCLUDE_KEYWORDS_IN_SINGLE_POSTS && is_single() ) || is_page() ) {\n\t\t\t\t\tif ( ! empty( $mt_seo_keywords ) ) {\n\t\t\t\t\t\t// If there is a custom field, use it.\n\t\t\t\t\t\tif ( is_single() ) {\n\t\t\t\t\t\t\t// For single posts, the %cat% tag is replaced by the post's categories.\n\t\t\t\t\t\t\t$mt_seo_keywords = str_replace( '%cats%', $this->get_post_categories(), $mt_seo_keywords );\n\t\t\t\t\t\t\t// Also, the %tags% tag is replaced by the post's tags.\n\t\t\t\t\t\t\t$mt_seo_keywords = str_replace( '%tags%', $this->get_post_tags(), $mt_seo_keywords );\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$metatags['keywords'] = $mt_seo_keywords;\n\t\t\t\t\t} elseif ( is_single() ) {\n\t\t\t\t\t\t// Add categories and tags for keywords.\n\t\t\t\t\t\t$post_keywords = strtolower( $this->get_post_categories() );\n\t\t\t\t\t\t$post_tags = strtolower( $this->get_post_tags() );\n\n\t\t\t\t\t\t$metatags['keywords'] = $post_keywords . ', ' . $post_tags;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} elseif ( is_home() ) {\n\t\t\t// Add META tags to Home Page.\n\t\t\t// Get set values.\n\t\t\t$site_description = $options['site_description'];\n\t\t\t$site_keywords = $options['site_keywords'];\n\n\t\t\t/*\n\t\t\tDescription\n\t\t\t*/\n\t\t\tif ( empty( $site_description ) ) {\n\t\t\t\t// If $site_description is empty, then use the blog description from the options.\n\t\t\t\t$metatags['description'] = get_bloginfo( 'description' );\n\t\t\t} else {\n\t\t\t\t// If $site_description has been set, then use it in the description meta-tag.\n\t\t\t\t$metatags['description'] = $site_description;\n\t\t\t}\n\n\t\t\t// Keywords.\n\t\t\tif ( empty( $site_keywords ) ) {\n\t\t\t\t// If $site_keywords is empty, then all the blog's categories are added as keywords.\n\t\t\t\t$metatags['keywords'] = $this->get_site_categories();\n\t\t\t} else {\n\t\t\t\t// If $site_keywords has been set, then these keywords are used.\n\t\t\t\t$metatags['keywords'] = $site_keywords;\n\t\t\t}\n\t\t} elseif ( is_tax() || is_tag() || is_category() ) {\n\t\t\t// taxonomy archive page.\n\t\t\t$term_desc = term_description();\n\t\t\tif ( $term_desc ) {\n\t\t\t\t$metatags['description'] = $term_desc;\n\t\t\t}\n\n\t\t\t// The keyword is the term name.\n\t\t\t$term_name = single_term_title( '', false );\n\t\t\tif ( $term_name ) {\n\t\t\t\t$metatags['keywords'] = $term_name;\n\t\t\t}\n\t\t}\n\n\t\tif ( $site_wide_meta ) {\n\t\t\t$metatags['site_wide'] = $site_wide_meta;\n\t\t}\n\n\t\t/**\n\t\t * Filter the generated meta tags. New filter to allow for easier use by passing an array\n\t\t * instead of a string.\n\t\t *\n\t\t * @param array $metatags Contains metatag key->value pairs.\n\t\t */\n\t\t$metatags = apply_filters( 'amt_metatags_array', $metatags );\n\n\t\tif ( is_array( $metatags ) && ! empty( $metatags ) ) {\n\t\t\t$actual_metatags = $this->create_metatags( $metatags );\n\t\t\t$metatags_as_string = implode( PHP_EOL, $actual_metatags );\n\n\t\t\t/**\n\t\t\t * Filter the generated meta tags. Preserved filter from old code that sends the metatags\n\t\t\t * as a string.\n\t\t\t *\n\t\t\t * @param array $metatags_as_string Contains each derived metatag as a return-separated string.\n\t\t\t */\n\t\t\t$metatags_as_string = apply_filters( 'amt_metatags', $metatags_as_string );\n\n\t\t\tif ( is_string( $metatags_as_string ) ) {\n\t\t\t\techo wp_kses( $metatags_as_string . PHP_EOL, $this->get_kses_valid_tags__metatags() );\n\t\t\t}\n\t\t}\n\t}", "public function modifyMeta(array $meta)\n {\n $this->meta = $meta;\n $this->addCustomFieldset();\n\n return $this->meta;\n }", "function fiorello_mikado_meta_boxes_map_after_setup_theme() {\n\t\tdo_action( 'fiorello_mikado_action_before_meta_boxes_map' );\n\t\t\n\t\tforeach ( glob( MIKADO_FRAMEWORK_ROOT_DIR . '/admin/meta-boxes/*/map.php' ) as $meta_box_load ) {\n\t\t\tinclude_once $meta_box_load;\n\t\t}\n\t\t\n\t\tdo_action( 'fiorello_mikado_action_meta_boxes_map' );\n\t\t\n\t\tdo_action( 'fiorello_mikado_action_after_meta_boxes_map' );\n\t}", "function custom_capabilities( $allcaps ) {\n\t// If you can manage options, you can use SST.\n\tif ( ! empty( $allcaps['manage_options'] ) ) {\n\t\t$allcaps['authenticate_sst'] = true;\n\t}\n\n\treturn $allcaps;\n}", "public function get_capability($cap) {\n\n $cap = strtoupper($cap);\n\n /*\n * Supported capability?\n */\n if (!in_array($cap, $this->imap_capabilities)) {\n /*\n * Not found!\n */\n return FALSE;\n } elseif (is_array($this->imap_capabilities[$cap]) && count($this->imap_capabilities[$cap]) > 0) {\n /*\n * Key / value pairs found: return supported capability properties\n */\n return $this->imap_capabilities[$cap];\n } else {\n /*\n * Supported\n */\n return TRUE;\n }\n }", "function metaInit () {\n $this->imageMeta = new ImageMeta($this->getImagePath());\n $this->imageMeta->getMeta();\n }", "function list_meta($meta)\n {\n }", "public function setMeta(array $meta=null) {\n\t\t$this->meta = $meta;\n\t}", "function AP_Meta_Box_Setup() {\n\tadd_action('add_meta_boxes','AP_Meta_Box_Add');\n\n\tadd_action( 'save_post', 'AP_Meta_Box_Save', 10, 2 );\n}", "public function handleShortcodes($attr, $content)\r\n {\r\n $this->mapNum++;\r\n $mapInfo = $this->getMapDetails($attr, $content);\r\n if (function_exists('json_encode')) {\r\n \t$json = json_encode($mapInfo);\r\n } else {\r\n\t\t\trequire_once('json_encode.php');\r\n \t$json = Zend_Json_Encoder::encode($mapInfo);\r\n\t\t}\r\n\r\n return <<<mapCode\r\n<div id='map_{$this->mapNum}' style='width:{$mapInfo->width}; height:{$mapInfo->height};' class='googleMap'></div>\r\n<div id='dir_{$this->mapNum}'></div>\r\n<script type=\"text/javascript\">\r\n//<![CDATA[\r\nif (GBrowserIsCompatible()) {\r\n wpGMaps.wpNewMap({$this->mapNum}, {$json});\r\n}\r\n//]]>\r\n</script>\r\nmapCode;\r\n }", "public function apb_add_meta_boxes() {\r\n\t}", "private function parseMeta( $data ) {\n $regex = $this->regex;\n \n // Extract\n preg_match($regex['meta'], $data, $match);\n \n // Save the raw data.\n $this->raw = $raw = $match[0];\n \n // Remove data boundaries, and create a basic array from the data.\n $raw = preg_split($regex['break'], trim(preg_replace($regex['bound'], '', $raw)));\n \n // Interpret the raw data.\n $raw = array_map(function($pair) use ($regex){\n \n $array = array_map('trim', preg_split($regex['data'], $pair, 2));\n\n return $array;\n \n }, array_filter($raw, function($item){\n \n return isset($item);\n \n }));\n \n // Format the raw data.\n foreach( $raw as &$meta ) { \n \n $meta[1] = $this->formatMeta( $meta[1] );\n \n }\n \n // Reduce the raw data.\n for( $i = count($raw) - 1; $i > -1; $i-- ) { \n \n $meta = $raw[$i];\n \n $raw[$meta[0]] = $meta[1];\n \n unset($raw[$i]);\n \n }\n\n // Return the real meta data.\n return array_merge( $raw );\n \n }", "public function addMeta($name, $content)\n\t{\n\t\t$this->meta[$name] = '<META name=\"' . $name . '\" content=\"'. $content .'\">' . PHP_EOL;\n\t}" ]
[ "0.7113233", "0.68950325", "0.68331647", "0.6664682", "0.6118787", "0.6091864", "0.5811714", "0.58066976", "0.5763529", "0.56482375", "0.56384635", "0.55844116", "0.5581189", "0.55544406", "0.55460584", "0.5411758", "0.5384209", "0.5345685", "0.51998556", "0.5140477", "0.5113", "0.50718355", "0.5050998", "0.50498456", "0.50450104", "0.50308925", "0.5025702", "0.5025236", "0.50238335", "0.5016762", "0.5006111", "0.49913162", "0.49803284", "0.49747914", "0.49743465", "0.49665195", "0.49570587", "0.49538136", "0.49538136", "0.4953636", "0.4935872", "0.4931291", "0.49252367", "0.49175173", "0.48655346", "0.48614365", "0.48227575", "0.48227575", "0.48172048", "0.48139763", "0.48042884", "0.47980604", "0.4784453", "0.47796887", "0.47723404", "0.47705042", "0.47501418", "0.47420278", "0.47419277", "0.47387823", "0.47320595", "0.47254887", "0.47230995", "0.4715082", "0.47128803", "0.4686677", "0.46800196", "0.46783733", "0.4671121", "0.46700782", "0.46651977", "0.46591923", "0.46587166", "0.46548703", "0.4652047", "0.46499768", "0.46485126", "0.46472883", "0.4639253", "0.4625807", "0.46187752", "0.4614877", "0.46145403", "0.46072423", "0.45991036", "0.459864", "0.45931524", "0.45919487", "0.4591288", "0.45900947", "0.4590002", "0.45871124", "0.4586391", "0.45828557", "0.4578823", "0.4576898", "0.45698863", "0.45671302", "0.45663923", "0.45634013" ]
0.7116632
0
Creates a demand object from settings
Создает объект спроса из настроек
public function createFromSettings(array $settings) { /** @var ReservationDemand $demand */ $demand = $this->objectManager->get(static::DEMAND_CLASS); if ($demand instanceof PeriodAwareDemandInterface) { $this->setPeriodConstraints($demand, $settings); } $this->applySettings($demand, $settings); return $demand; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createDemandFromSettings ($settings) {\n\t\t/** @var PlaceDemand $demand */\n\t\t$demand = $this->objectManager->get('DWenzel\\\\Ajaxmap\\\\Domain\\\\Model\\\\Dto\\\\PlaceDemand');\n\t\tif (isset($settings['orderBy']) && isset($settings['orderDirection'])) {\n\t\t\t$demand->setOrder($settings['orderBy'] . '|' . $settings['orderDirection']);\n\t\t}\n\t\t(isset($settings['map']))? $demand->setMap($settings['map']) : NULL;\n\t\t(isset($settings['locationTypes'])) ? $demand->setLocationTypes($settings['locationTypes']) : NULL;\n\t\t(isset($settings['placeGroups'])) ? $demand->setPlaceGroups($settings['placeGroups']) : NULL;\n\t\tif(isset($settings['constraintsConjunction']) AND $settings['constraintsConjunction'] !== '') {\n\t\t\t$demand->setConstraintsConjunction($settings['constraintsConjunction']);\n\t\t}\n\t\tif(isset($settings['placeGroupConjunction']) AND $settings['placeGroupConjunction'] !== '') {\n\t\t\t$demand->setPlaceGroupConjunction($settings['placeGroupConjunction']);\n\t\t}\n\t\t(isset($settings['limit'])) ? $demand->setLimit($settings['limit']) : NULL;\n\t\treturn $demand;\n\t}", "public function createDemandFromSettings($settings) {\n\t\t$demand = $this->objectManager->get('Webfox\\\\Placements\\\\Domain\\\\Model\\\\Dto\\\\OrganizationDemand');\n\t\t$settableProperties = \\TYPO3\\CMS\\Extbase\\Reflection\\ObjectAccess::getSettablePropertyNames($demand);\n\t\tforeach($settableProperties as $property) {\n\t\t\tif (isset($settings[$property])) {\n\t\t\t\t\\TYPO3\\CMS\\Extbase\\Reflection\\ObjectAccess::setProperty(\n\t\t\t\t\t$demand,\n\t\t\t\t\t$property,\n\t\t\t\t\t$settings[$property]);\n\t\t\t}\n\t\t}\n\t\tif(isset($settings['clientsOrganizationsOnly'])) {\n\t\t\t// we set clientOrganizationsOnly directly since Reflection ObjectAccess seem to miss boolean values (TRUE is cast to 1?)\n\t\t\t$demand->setClientsOrganizationsOnly($settings['clientsOrganizationsOnly']);\n\t\t\tif($this->accessControlService->hasLoggedInClient()) {\n\t\t\t\t$clientId = $this->accessControlService->getFrontendUser()\n\t\t\t\t\t\t\t\t\t\t->getClient()->getUid();\n\t\t\t\t$demand->setClients((string)$clientId);\n\t\t\t} else {\n\t\t\t\t$demand->setClients('');\n\t\t\t}\n\t\t}\n\t\t// @todo implement OrderDemand to get rid of this string juggling\n\t\tif((isset($settings['orderBy'])) AND (isset($settings['orderDirection']))) {\n\t\t\t$demand->setOrder($settings['orderBy'] . '|' . $settings['orderDirection']);\n\t\t}\n\t\treturn $demand;\n\t}", "public function createFromSettings(array $settings);", "function create_object_settings() {\n if (!isset($this->settings)) {\n require_once($this->addon->dir . 'include/class.widget.settings.php');\n $this->settings = new SLPWidget_Legacy_Settings( array( 'addon' => $this->addon ) );\n }\n }", "public function __construct($settings='') \n\t{\t\n\t\t$this->settings = $this->_settings(); \n\t}", "public function __construct()\n {\n $this->settings = new Settings();\n }", "public function __construct()\n {\n $this->settings = new Settings();\n }", "public function __construct()\n {\n $this->settings = new Settings();\n }", "public static function Create() {\n\t\t$s = new WP_United_Settings();\n\t\tif(!$s->load_from_wp()) {\n\t\t\treturn($s->load_from_phpbb());\n\t\t}\n\t\treturn $s;\n\t}", "public function instantiate($task);", "public function __construct()\n {\n $this->setting = new Setting();\n }", "public function __construct()\n {\n $this->branche = new Settings();\n }", "static public function factory($config) {}", "public function __construct( array $settings ) {\n\t\t$this->settings = $settings;\n\t}", "public function __construct(array $settings = array())\n {\n }", "public function run()\n { \n factory(Deputy::class, 25)->create();\n }", "public function run()\n {\n PraticalInfos::factory(1)->create();\n }", "public function initialize() {\r\n\t\tparent::initialize();\r\n\t\t$this->settings = $this->pluginSettingsDemandService->getSettings();\r\n\t}", "function __construct($settings = array()){\n\t\t$config = Configure::read('Bitly');\n\t\tif (empty($config)) {\n\t\t\t$config = array();\n\t\t}\n\n\t\t$this->_set($config);\n\t\t$this->_set($settings);\n\t}", "public function __construct(array $settings) {\n $this->settings = $settings;\n }", "public function run()\n {\n prodecyt::factory(50)->create();\n }", "private function prepare(){\r\n \r\n $autoload = &$this->settings->autoload; \r\n \r\n if(isset($autoload)){\r\n \r\n foreach($autoload AS $key => $class){\r\n \r\n $settings = &$this->settings->{$key};\r\n \r\n if(isset($settings)){\r\n\r\n $this->{$key} = new $class($settings);\r\n }\r\n }\r\n }\r\n }", "public function __construct( $settings ) {\n\t\t$this->settings = (array) $settings;\n\t}", "public function createSetting(): Setting\n {\n return Setting::create('cache://double-backup');\n }", "static public function factory($config)\n\t{\n\t\t$config = self::_parseConfig($config);\n\t\t$config = array_merge(array(\n 'stream' => null,\n 'mode' => null,\n 'timestamp' => 'Y-m-d',\n\t\t), $config);\n\n\t\tif(is_string($config['stream'])) {\n\t\t\t$config['stream'] = str_replace('%timestamp%', date($config['timestamp']), $config['stream']);\n\t\t}\n\t\t$streamOrUrl = isset($config['url']) ? $config['url'] : $config['stream'];\n\n\t\treturn new self(\n\t\t$streamOrUrl,\n\t\t$config['mode']\n\t\t);\n\t}", "public static function factory()\n {\n $class = get_called_class();\n $object = new $class();\n foreach (static::getDefaults() as $field => $value) {\n $object->{$field} = $value;\n }\n return $object;\n }", "private function __construct() {\r\n\t\t// proc will grab a different column of settings values.\r\n\t\t$testing = (int) $this->config()->testing;\r\n\t\t\r\n\t\t$sql = \"CALL settings_get($testing)\";\r\n $rs = $this->query($sql);\r\n \r\n if ($this->hasError()) {\r\n error_log($this->getError());\r\n $this->error = \"Unable to load settings\";\r\n }\r\n \r\n if ($rs->hasRecords()) {\r\n\t\t\twhile ($row = $rs->fetchArray()) {\r\n\t\t\t\t$this->{$row['label']} = $row['value'];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Handle secure cookies\r\n\t\t\tif (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']) {\r\n\t\t\t\t$this->cookiesecure = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function __construct() {\n $this->settings = craft()->plugins->getPlugin('Mobi2Go')->getSettings();\n }", "protected function _make_preview_settings ($obj)\n {\n return new SHIP_RELEASE_PREVIEW_SETTINGS ($this);\n }", "public final function make(): void\n {\n if (!$this->config) {\n parent::__construct([\n 'description' => $this->description ?: $this->description(),\n 'values' => $this->values ?: $this->values()\n ]);\n $this->setInstance($this);\n }\n }", "static public function factory( $config )\n\t{\n\t\t$config = self::_parseConfig( $config );\n\t\t$config = array_merge( array(\n\t\t\t'stream' => null,\n\t\t\t'mode' => null ), $config );\n\n\t\t$streamOrUrl = isset( $config[ 'url' ] ) ? $config[ 'url' ] : $config[ 'stream' ];\n\n\t\treturn new self( $streamOrUrl, $config[ 'mode' ] );\n\t}", "public function __construct() {\r\n $this->template = new Template();\r\n $this->settingsModel = new settingsModel();\r\n $this->dbUtil = new DBUtil();\r\n $this->combovalue = $this->settingsModel->populatetypeValues();\r\n $this->logger = Logger::getLogger(\"========= Metadata Controller =========== \");\r\n }", "public function runConfig():Create {\n\n # Set config\n Config::setup();\n\n # Return instance\n return $this;\n\n }", "public function __construct()\n {\n return $this->drone = new Drone;\n }", "public static function run_on_demand()\n {\n $obj = new self();\n $obj->verbose = true;\n $obj->run(null);\n }", "public function __construct()\n {\n $this->_settings = $this->getQuickviewSettings();\n }", "public function __construct() {\n $data = Ensure::Input(func_get_args());\n return parent::_init($data, new DependsResource(array(\n array(\"term\" => \"domains\", \"plural\" => TRUE)\n )), \n new LoadsResource(\n array(\"parent\" => false, \"primary\" => \"create\", \"init\" => array(\"domainId\"), \"id\" => \"id\", \"silent\"=> TRUE)\n ), \n new SchemaResource(array(\n \"fields\" => array('id', 'name', 'description', 'applicationId', 'domainId', 'sipUri', 'enabled', 'credentials'), \n \"needs\" => array('name', 'domainId', 'credentials')\n ))\n );\n }", "public static function create() {}", "public static function create() {}", "public static function create() {}", "public function init()\n {\n $templates = $this->getConfig($this->getConfigFiles());\n $view = $this->prepare($this->getView());\n return $this->createFactory($templates, $view);\n }", "public function newInstance();", "public function newInstance();", "public function __construct($setting)\n {\n $this->setting = $setting;\n }", "public static function getInstance(string $type)\n\t{\n\t\t$instance = new static();\n\t\t$instance->type = $type;\n\t\t$instance->loadConfig();\n\t\treturn $instance;\n\t}", "public function run()\n {\n $items = [\n [ 'meta_key'=>'site_title','meta_title' => 'Hamro Jutta','meta_value'=>'Hamro Jutta'],\n [ 'meta_key'=>'site_email','meta_title' => 'email','meta_value'=>'example@hamrojutta.com'],\n [ 'meta_key'=>'site_phone','meta_title' => 'phone','meta_value'=>'01-24567'],\n [ 'meta_key'=>'header_settings','meta_title' => 'header','meta_value'=>''],\n\n ];\n\n foreach ($items as $item) {\n Setting::create($item);\n }\n }", "public function make();", "protected function instantiate()\n\t{\n\t\t$class = get_class($this);\n\t\t$model = new $class(null);\n\t\treturn $model;\n\t}", "public function run()\n {\n Setting::query()->create([\n 'exp_rate' => 'x150',\n 'drop_rate' => 'x50',\n 'penyas_rate' => 'x750',\n ]);\n }", "function grab_db_settings(){\n\t\n\t\treturn new pfagos_settings();\n\t}", "public function make() {}", "public function __construct() {\n $this->config = \\Drupal::config('lesson3.settings');\n }", "public function __construct(Settings $settings)\n {\n $this->settings = $settings;\n }", "public function __construct(Settings $settings)\n {\n $this->settings = $settings;\n }", "public function __construct()\n\t{\n\t\t$codeigniter =& get_instance();\n\t\t$codeigniter->benchmark->mark('Model\\Data\\Settings_class_construct_start');\n\t\t\n\t\t// Set the cache time from the config file\n\t\t$codeigniter->config->load('ionize', TRUE);\n\t\t$this->cache_time = $codeigniter->config->config['ionize']['data_model_cache'];\n\t\t\n\t\tif($codeigniter->session->language != \"\")\n\t\t{\n\t\t\t$cache = $codeigniter->cache->file->get(md5($codeigniter->session->language).'.Settings');\n\t\t\tif($cache != FALSE)\n\t\t\t{\n\t\t\t\t$settings = unserialize($cache);\n\t\t\t\t\n\t\t\t\t// Restore datas from cached class\n\t\t\t\t$this->_data \t\t= $settings->_data;\n\t\t\t\t$this->_raw_data \t= $settings->_raw_data;\n\t\t\t\t$this->_lang_data \t= $settings->_lang_data;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$codeigniter->benchmark->mark('Model\\Data\\Settings_class_construct_end');\n\t\t\n\t\t// Generating class\n\t\t$this->initialize();\n\t\t\n\t\t// Saving instance reference\n\t\tself::$instance = $this;\n\t}", "public function __construct(Order $order)\n\t{\n\t\t$this->Order = $order;\n \t$setting = DB::table('setting')->select()->where('id',1)->get()->first();\n \t\n \t\n \tCache::forever('setting', $setting);\n \n\t}", "public function run()\n {\n TipoMedicamento::factory(7)->create();\n }", "static public function factory($config)\n {\n $config = self::_parseConfig($config);\n $config = array_merge(array(\n 'stream' => null,\n 'mode' => null,\n ), $config);\n\n $streamOrUrl = isset($config['url']) ? $config['url'] : $config['stream'];\n\n return new self(\n $streamOrUrl,\n $config['mode']\n );\n }", "static function make($type)\n {\n $scraper = null;\n\n switch ($type) {\n case 'ElAderezo':\n $scraper = new ScraperElAderezo;\n break; \n case 'GastronomiaYCia':\n $scraper = new ScraperGastronomiaYCia;\n break;\n case 'UtensiliosDeCocina':\n $scraper = new ScraperUtensiliosDeCocina;\n break;\n } \n return $scraper;\n }", "public function __construct()\n {\n $this->st = site_settings::find(1);\n $this->middleware('guest');\n }", "public function run()\n {\n Setting::create([\n 'key' => 'title',\n 'value' => [\n 'en' => 'Galaxy of Drones Online',\n ],\n ]);\n\n Setting::create([\n 'key' => 'description',\n 'value' => [\n 'en' => 'An open source multiplayer space strategy game.',\n ],\n ]);\n\n Setting::create([\n 'key' => 'author',\n 'value' => [\n 'en' => 'Koodilab',\n ],\n ]);\n }", "static function make($settings, $port = 1080) {\n return new static($settings);\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }", "public static function &factory(array $config = array()) {\n\t\t$default = array('source' => null, 'adapter' => null);\n\t\textract($config + $default);\n\n\t\tif (!$source) {\n\t\t\tthrow new BadMethodCallException(\"No source given.\");\n\t\t}\n\t\t$name = Mime_Type::guessName($source);\n\n\t\tif (!$adapter) {\n\t\t\tif (!isset(self::$_config[$name])) {\n\t\t\t\tthrow new Exception(\"No adapter configured for media name `{$name}`.\");\n\t\t\t}\n\t\t\t$adapter = self::$_config[$name];\n\t\t}\n\n\t\t$name = ucfirst($name);\n\t\t$class = \"Media_Process_{$name}\";\n\n\t\tif (!class_exists($class)) { // Allows for injecting arbitrary classes.\n\t\t\trequire_once \"Media/Process/{$name}.php\";\n\t\t}\n\n\t\t$media = new $class(compact('source', 'adapter'));\n\t\treturn $media;\n\t}", "abstract protected function define_my_settings();", "public function create()\n {\n //\n// $demand = Demand::where('id',0)->get();\n// print_r($demand);\n// die;\n\n return view('demand.create', ['theme' => 'default']);\n }", "private function initSiteSettings($di, $config) {\n\t\t\t$di->set('siteSettings', function () use ($config) {\n\t\t\t\n\t\t\t\t$siteSettingObj = new \\SiteSettings();\n\t\t\t\t\n\t\t\t\treturn $siteSettingObj;\n\t\t\t\t\n\t\t\t}, true);\n\t\t\t\n\t\t}", "public function __construct()\n {\n $this->plan = new Plan();\n }", "abstract public function get_settings();", "public function run()\n {\n factory(CarOption::class, 5)->create();\n }", "public function create(){\r\n\treturn new $this->class();\r\n }", "public static function create($config) {\n if(isset($config['type']) && class_exists($config['type'])) {\n $item = new $config['type'];\n $item->config = $config;\n return $item;\n }\n return null;\n }", "public static function init() {\n\t\treturn Factory::get_instance( self::class );\n\t}", "public function run()\n {\n factory(Setting::class)->create(['settings_name' => 'Instagram_url']);\n factory(Setting::class)->create(['settings_name' => 'Calendar_url']);\n factory(Setting::class)->create(['settings_name' => 'Map_url']);\n factory(Setting::class)->create(['settings_name' => 'Plate_url']);\n factory(Setting::class)->create(['settings_name' => 'Rocks_url']);\n factory(Setting::class)->create(['settings_name' => 'Facebook_url']);\n factory(Setting::class)->create(['settings_name' => 'Checkbox_popup_de', 'settings_value' => 'Wenn Sie mit den Nutzungsbedingungen einverstanden sind, füllen Sie bitte die Kontrollkästchen aus']);\n factory(Setting::class)->create(['settings_name' => 'Checkbox_popup_en', 'settings_value' => 'If you agree with terms of use please fill checkboxes']);\n factory(Setting::class)->create(['settings_name' => 'Link_popup_de', 'settings_value' => \"<h2>Lorem ipsum Karotten Rabatte erhöht. Pentax Optio durch lobten die Prinzipien der Wahrheit geblendet und sie zu bezahlen.</h2>\n\t\t\t <p>Lorem ipsum dolor sitzen amet consectetur adipisicing elit. Voluptatem fugit cum dolorem suscipit molestias sapiente!</p>\n\n\t\t\t <h2>Lorem ipsum dolor sitzt amet</h2>\n\t\t\t <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem fugit cum dolorem suscipit molestias sapiente!</p>\n\t\t\t <p>Lorem ipsum dolor sitzen amet consectetur adipisicing elit. Voluptatem fugit cum dolorem suscipit molestias sapiente!</p>\n\t\t\t <p>Lorem ipsum dolor sitzen amet consectetur adipisicing elit. Voluptatem fugit cum dolorem suscipit molestias sapiente!</p>\n\t\t\t <p>Lorem ipsum dolor sitzen amet consectetur adipisicing elit. Voluptatem fugit cum dolorem suscipit molestias sapiente!</p>\n\t\t\t <p>Lorem ipsum dolor sitzen amet consectetur adipisicing elit. Voluptatem fugit cum dolorem suscipit molestias sapiente!</p>\n\n\t\t\t <h2>Lorem Ipsum Dolor sitzen</h2>\n\t\t\t <p>Lorem ipsum dolor sitzen amet consectetur adipisicing elit. Voluptatem fugit cum dolorem suscipit molestias sapiente!</p>\n\t\t\t <p>Lorem ipsum dolor sitzen amet consectetur adipisicing elit. Voluptatem fugit cum dolorem suscipit molestias sapiente!</p>\"]);\n\n\n\n factory(Setting::class)->create(['settings_name' => 'Link_popup_en', 'settings_value' => \"<h2>Lorem ipsum dolor sit amet consectetur adipisicing elit. Optio veritatis atque pariatur obcaecati laudantium eos.</h2>\n\t\t\t <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem fugit cum dolorem suscipit molestias sapiente!</p>\n\n\t\t\t <h2>Lorem ipsum dolor sit amet</h2>\n\t\t\t <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem fugit cum dolorem suscipit molestias sapiente!</p>\n\t\t\t <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem fugit cum dolorem suscipit molestias sapiente!</p>\n\t\t\t <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem fugit cum dolorem suscipit molestias sapiente!</p>\n\t\t\t <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem fugit cum dolorem suscipit molestias sapiente!</p>\n\t\t\t <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem fugit cum dolorem suscipit molestias sapiente!</p>\n\n\t\t\t <h2>Lorem ipsum dolor sit</h2>\n\t\t\t <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem fugit cum dolorem suscipit molestias sapiente!</p>\n\t\t\t <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem fugit cum dolorem suscipit molestias sapiente!</p>\"\n ]);\n }", "public function __construct(\n\t\tSettings $settings\n )\n\t{\n\t\t$this->settings = $settings;\n\t}", "static public function factory($config)\n {\n }", "function construct() {\n if (!$this->cacheGet()) {\n $this->prepare();\n $this->build();\n $this->expand();\n $this->populate();\n }\n }", "public function newInstance($uri);", "public function newInstance(): object;", "public static function create(): Deferred {\n return new Deferred();\n }", "static public function factory($config)\n {\n return new self();\n }", "public function run()\n {\n $this->createSettings($this->settings());\n }", "public function __construct($settings) {\n\t\t$this->setting['length'] = $settings['length'];\n\t\t$this->setting['width'] = $settings['width'];\n\t\t$this->setting['height'] = $settings['height'];\n\t}", "public function make(array $config);", "public function run()\n {\n Propuestas::factory(50)->create();\n }", "function drush_dslm_new() {\n // Pull the args\n $args = drush_get_arguments();\n if (!isset($args[1])) {\n return drush_set_error('DSLM: Please provide a site destination');\n }\n else {\n $site_dest = $args[1];\n }\n\n // Bootstrap dslm, this grabs the instantiated and configured Dslm library object\n if (!$dslm = _dslm_bootstrap()) {\n return FALSE;\n }\n\n // Set the profile and core, either supplied on the CLI, set with --latest, or will prompt\n if (drush_get_option('latest', FALSE)) {\n $latest = $dslm->latestCores();\n $core = $latest['release'];\n }\n elseif (drush_get_option('dev', FALSE)) {\n $latest = $dslm->latestCores();\n $core = $latest['dev'];\n }\n else {\n $core = isset($args[2]) ? $args[2] : FALSE;\n }\n\n // If we still don't have a core string try to get on iteractively\n if (!$core) {\n $core_list = $dslm->getCores();\n $pick_core = drush_choice($core_list['all']);\n if (!$pick_core) {\n return FALSE;\n }\n $core = $core_list['all'][$pick_core];\n }\n\n if (!$res = $dslm->newSite($site_dest, $core)) {\n return drush_set_error($dslm->lastError());\n }\n else {\n drush_log(dt('Your site has been linked in !dir', array('!dir' => $site_dest)), 'ok');\n return TRUE;\n }\n}", "public function __construct($type)\n {\n $this->plant = new PlantFactory($type);\n }", "public function newInstance(): object\n {\n return $this->instantiator->instantiate($this->name);\n }", "public function run()\n {\n factory(Spare::class, 20)->create();\n }", "public static function factory() {\n\t\tstatic $instance;\n\n\t\tif ( ! $instance ) {\n\t\t\t$instance = new self();\n\t\t\t$instance->setup();\n\t\t}\n\n\t\treturn $instance;\n\t}", "function &factory($type)\n {\n $classfile = \"format/{$type}.class.php\";\n if (include_once $classfile) {\n $class = \"{$type}_format\";\n if (class_exists($class)) {\n $object = & new $class($options);\n return $object;\n } else {\n COM_errorLog(\"report.class - Unable to instantiate class $class from $classfile\");\n }\n } else {\n COM_errorLog(\"report.class - Unable to include file: $classfile\");\n }\n\n }", "public static function factory($type)\n\t{\n\t\t$class = 'MHTTPD_'.ucfirst($type);\n\t\treturn new $class;\n\t}", "function buddyexpressdesk_settings(){\n $settings = new stdClass;\n\t$GET = new BDESK_DB;\n $GET->statement('SELECT * FROM bdesk_site LIMIT 1');\n $GET->execute();\n\t$defaults = $GET->fetch();\n\tforeach ($defaults as $name => $value) {\n\t\tif (empty($paths->$name)) {\n\t\t\t$settings->$name = $value;\n\t\t}\n\t}\n\treturn $settings;\n}", "public function prepare()\n {\n $this->timeTracker = $this->getInjector()->inject('TimeTracker');\n $this->env = $this->getInjector()->inject('Environment');\n $this->env->parseFile(__DIR__.'/../environment.json');\n $this->toggleShowErrors();\n return $this;\n }", "function __construct() {\n\n\t\t$this->factory = new cftp_analytics_factory();\n\t\t$this->model = new cftp_analytics_option_model();\n\n\t\t$analytics = $this->factory->googleAnalyticsSource();\n\t\t$this->model->addSource( $analytics );\n\n\t\t$twitter = $this->factory->twitterSharesSource();\n\t\t$this->model->addSource( $twitter );\n\n\t\t//$fblikes = $this->factory->facebookLikesSource();\n\t\t//$this->model->addSource( $fblikes );\n\n\t\t$fbshares = $this->factory->facebookSharesSource();\n\t\t$this->model->addSource( $fbshares );\n\n\t\t$totalshares = $this->factory->totalSharesSource();\n\t\t$this->model->addSource( $totalshares );\n\n\t\t$decayshares = $this->factory->decaySharesSource();\n\t\t$this->model->addSource( $decayshares );\n\n\t\t$decayviews = $this->factory->decayViewsSource();\n\t\t$this->model->addSource( $decayviews );\n\n\t\t$this->popular = new cftp_analytics( $this->factory, $this->model );\n\t}", "public function make($class)\n {\n return Kant::createObject($class);\n }", "function __compatConstruct($settings) {\n\t\tif (is_array(current($settings))) {\n\t\t\t$this->_map = array_merge($this->_map, (array)$settings);\n\t\t}\n\n\t\tforeach ($this->_map as $key => $value) {\n\t\t\t$this->_directories[basename(key($value))] = key($value);\n\t\t}\n\t\tforeach (Configure::read('Media.filter') as $type) {\n\t\t\t$this->_versions += $type;\n\t\t}\n\t\t$this->_versions = array_keys($this->_versions);\n\n\t\tif (!$this->__cached = Cache::read('media_found', '_cake_core_')) {\n\t\t\t$this->__cached = array();\n\t\t}\n\t}", "public function run()\n {\n factory(Sponser::class, 5)->create();\n }", "public function __construct($settings = [])\n {\n $this->settings = \\HC\\Core::parseOptions($settings, $this->settings);\n \n spl_autoload_register('\\HCMC\\Core::autoLoader');\n \n return true;\n }", "function __construct() {\n $this->EE =& get_instance(); \n $this->EE->lang->loadfile('design');\n $this->EE->lang->loadfile('snippet_editor');\n $this->EE->db->select('settings')\n ->from('exp_modules')\n ->where('module_name', 'Snippet_editor')\n ->limit(1);\n $query = $this->EE->db->get();\n $this->settings = unserialize($query->row('settings')); \n }" ]
[ "0.7201751", "0.7110685", "0.6074803", "0.5508471", "0.53642505", "0.535256", "0.535256", "0.535256", "0.5309225", "0.5165147", "0.5156386", "0.5149077", "0.5134196", "0.5104301", "0.5065539", "0.50389946", "0.50341195", "0.502032", "0.49730998", "0.49667892", "0.4958916", "0.4929555", "0.49272177", "0.49185604", "0.49090183", "0.48914078", "0.48839906", "0.48698458", "0.48537064", "0.48432952", "0.48310953", "0.4812785", "0.48040977", "0.47910425", "0.4773527", "0.4771972", "0.47625285", "0.4758593", "0.4758593", "0.4758593", "0.47516754", "0.47407672", "0.47407672", "0.47388092", "0.4735173", "0.4727045", "0.472647", "0.47258073", "0.47250366", "0.47208664", "0.47194532", "0.47157553", "0.4713941", "0.4713941", "0.47113448", "0.47036386", "0.47001755", "0.46965635", "0.46963635", "0.46944746", "0.46934155", "0.46921602", "0.4677982", "0.4672397", "0.46720168", "0.46699026", "0.46595237", "0.465829", "0.46521306", "0.4649812", "0.46484172", "0.46461925", "0.46428156", "0.46425727", "0.46364468", "0.46360394", "0.46345332", "0.46189636", "0.4618126", "0.46063745", "0.46034133", "0.45983058", "0.4597912", "0.45964104", "0.45849773", "0.45838535", "0.4581401", "0.4578255", "0.4578077", "0.45772246", "0.45742613", "0.45741162", "0.4571913", "0.45689481", "0.45685664", "0.45672604", "0.45657045", "0.45615247", "0.45601702", "0.4556081" ]
0.714715
1
TODO: Implement deleteStatement() method.
TODO: Реализовать метод deleteStatement().
public function deleteStatement() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract function getDeleteStatement();", "public function walkDeleteStatement(AST\\DeleteStatement $deleteStatement): void;", "public function testDeleteStmt()\n {\n $delete = $this->getConnection()\n ->delete()\n ('dummy_posts')\n ('blog_id = :id');\n return $this->assertEquals($delete, \"DELETE FROM dummy_posts WHERE blog_id = :id\");\n }", "public function delete()\n {\n $this->execute(\n $this->syntax->deleteSyntax(get_object_vars($this))\n );\n }", "abstract protected function platformDeleteStatement($table);", "public function delete()\r\n {\r\n $this->sql = 'DELETE FROM ' . $this->table .' '.$this->alias. ' '. $this->sql;\r\n $query = R::exec($this->sql, $this->params);\r\n $this->sql = null;\r\n $this->params = [];\r\n return $query;\r\n }", "public function delete() {\n\n\t\t// Database\n\t\t$db = $this->db;\n\n\t\t// SQL code for deletion\n\t\t$sql = $this->sql_for_delete();\n\n\t\t// Deletion execution\n\t\treturn $db::execute($sql);\n\t}", "public function __doDelete()\n {\n $strSQL = $this->getDeleteSql();\n $result = $this->query($strSQL);\n }", "public function delete() {\n\t\t$dbh = App::getDatabase()->connect();\n\n\t\t$query = \"DELETE FROM \".$this->getTableName();\n\n\t\t$fl = true;\n\t\tforeach($this as $column => $val) {\n\t\t\tif(in_array($column, $this->getPrimaries())) {\n\t\t\t\t$query .= \"\\n\".(($fl) ? \"WHERE\" : \"AND\").\" \".$column.\" = '\".$val.\"'\";\n\t\t\t\t$fl = false;\n\t\t\t}\n\t\t}\n\n\t\t$res = $dbh->exec($query);\n\t\t$dbh = null;\n\t\treturn $res;\n\t}", "public function delete($records = '')/*# : DeleteStatementInterface */;", "function is_delete_statement()\n {\n return $this->object->_delete_clause ? TRUE : FALSE;\n }", "public function sql_for_delete() {\n\t\t// Check if model is writable\n\t\t$this->assertModelIsWritable();\n\n\t\t// Destination model\n\t\t$model = $this->model;\n\n\t\t// Cascade deletion calculation for model $model\n\t\tforeach ($model::metaGetRelationships() as $relationshipName => $relationship) {\n\t\t\t// Nexii tuples and children tuple deletion\n\t\t\tif (\n\t\t\t\t($relationship[\"type\"] == \"OneToMany\" or $relationship[\"type\"] == \"ManyToMany\") and\n\t\t\t\tisset($relationship[\"on_master_deletion\"]) and\n\t\t\t\t$relationship[\"on_master_deletion\"] == \"delete\"\n\t\t\t) {\n\t\t\t\t$this->addRelatedModel($relationshipName);\n\t\t\t}\n\t\t}\n\n\t\t// SQL code generation\n\t\t$sqlT = \\lulo\\twig\\TwigTemplate::factoryHtmlResource(\\lulo\\query\\Query::PATH . \"/delete/query.twig.sql\");\n\t\t$sql = $sqlT->render([\"query\" => $this]);\n\n\t\t// Return DELETE statement SQL code\n\t\treturn $sql;\n\t}", "public function testDeleteFinancialStatementUsingDelete()\n {\n }", "public function delete()\n\t{\n\t\t$sql = $this->grammar->delete($this);\n\n\t\treturn $this->connection->query($sql, $this->bindings, $this->options);\n\t}", "public function delete(){\n if (isset($this->content[$this->idField])) {\n\n $sql = \"DELETE FROM {$this->table} WHERE {$this->idField} = {$this->content[$this->idField]};\";\n $delet = new \\AR\\BD\\Delete();\n $delet->ExeDelete($this->table, \"WHERE {$this->idField} = {$this->content[$this->idField]}\", \"\");\n \n }\n }", "function getDeleteStatement($model,&$args);", "function delete($table, $clause) {\t\t\r\n\t\treturn $this->query(\"delete from $table where $clause\");\r\n\t}", "function delete()\n\t{\n\t\tSQL::query(\"delete from {$this->_table} where id = {$this->_data['id']}\");\n\t}", "public function delete()\n {\n $class = strtolower(get_called_class());\n $table = self::$_table_name != null ? self::$_table_name : $class . 's';\n\n $pdo = PDOS::getInstance();\n\n $whereClause = '';\n foreach (static::$_primary_keys as $pk)\n $whereClause .= $pk . ' = :' . $pk . ' AND ';\n $whereClause = substr($whereClause, 0, -4);\n $sql = 'DELETE FROM ' . $table . ' WHERE ' . $whereClause;\n $query = $pdo->prepare($sql);\n $attributes = $this->getAttributes(new \\ReflectionClass($this));\n foreach ($attributes as $k => $v)\n {\n if (in_array($k, static::$_primary_keys))\n $query->bindValue(':' . $k, $v);\n }\n $query->execute();\n }", "protected function RetDelete() {\n\n if (!isset($this->\n tables[0])) {\n\n throw new \\Exception(\"Error: Table not properly provided in QueryHelper.\");\n }\n\n $return = \"DELETE FROM `{$this->\n tables[0]}`\";\n\n if (count($this->\n where)) {\n\n $return .= $this->\n WhereClause($this->\n where);\n }\n\n return $return . \";\";\n }", "public function testDelete()\n {\n // test data\n $this->fixture->query('INSERT INTO <http://example.com/> {\n <http://s> <http://p1> \"baz\" .\n <http://s> <http://xmlns.com/foaf/0.1/name> \"label1\" .\n }');\n\n $res = $this->fixture->query('SELECT * WHERE {?s ?p ?o.}');\n $this->assertEquals(2, \\count($res['result']['rows']));\n\n // remove graph\n $this->fixture->delete(false, 'http://example.com/');\n\n $res = $this->fixture->query('SELECT * WHERE {?s ?p ?o.}');\n $this->assertEquals(0, \\count($res['result']['rows']));\n }", "abstract public function delete();", "abstract public function delete();", "abstract public function delete();", "abstract public function delete();", "public function testWriteDeleteQuery()\n\t{\n\t\t$queryWriter = R::getWriter();\n\t\tasrt( ( $queryWriter instanceof SQLiteT ), TRUE );\n\t\tR::nuke();\n\t\t$bean = R::dispense( 'bean' );\n\t\t$bean->name = 'a';\n\t\t$id = R::store( $bean );\n\t\tasrt( R::count( 'bean' ), 1 );\n\t\t$queryWriter->deleteRecord( 'bean', array(), $addSql = ' id = :id ', $bindings = array( ':id' => $id ) );\n\t\tasrt( R::count( 'bean' ), 0 );\n\t}", "function delete () {\n\t\t$stm = DB::$pdo->prepare(\"delete from `generated_object` where `id`=:id\");\n\t\t$stm->bindParam(':id', $this->id);\n\t\t$stm->execute();\n\t}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete() {}", "public function delete()\n {\n return $this->connection->delete($this->grammar->compileDelete($this));\n }", "function executeDelete($script) {\n\t\t$queryRes = mysqli_query($this->connectionString, $script);\n\t}", "function delete(){\n // Delete subclauses\n foreach($this->subClause as $clause){\n $clause->delete();\n }\n \n mysql_query(\"DELETE FROM resolution WHERE id='$this->clauseId'\") or die(mysql_error());\n }", "public function delete( ) {\n\t $query = \"DELETE FROM stat WHERE id=?\";\n\t return $this->db->execute( $query, array($this->id) ); \t\n\t }", "public function delete($id) {\r\n $sql= \"delete from bestelling where id=? limit 1\";\r\n $args=func_get_args();\r\n parent::execPreppedStmt($sql,$args);\r\n }", "function delete($condition = NULL)\n {\n $db_table = $this->model2table();\n $c2 = isset($this->id) ? \" WHERE id=\" . $this->id : \"\";\n $c = isset($condition) ? \"WHERE $condition\" : $c2;\n\n $sql = \"DELETE FROM $db_table $c\";\n\n if (!$this->getDonotLog()) {\n $this->logDeletedData(\"$db_table $c\");\n }\n\n $this->varifysql($sql);\n $stmt = $this->get_conn()\n ->prepare(\"$sql\");\n\n $this->_beforeDelete($this);\n $stmt->execute();\n $this->_afterDelete($this);\n\n return $stmt->rowCount();\n }", "public function deleteFrom($where)\n\t\t{\n\t\t\t$this->setType(self::$TYPE_DELETE);\t\t\t\n\t\t\tif(is_null($this->tables))\n\t\t\t{\n\t\t\t\t$this->tables = $where;\n\t\t\t\treturn $this;\n\t\t\t}\n\t\t\tthrow new \\Exception('Statement.deleteFrom(): This method can only be called once for a Statement.');\n\t\t}", "public final function delete() {\n\t\t$sql = \"\n\tDELETE FROM\n\t\t\" . $this->table . \"\n\tWHERE\n\t\t\" . $this->primaryField . \" = ?\n\t;\";\n\n\t\t$db = new MySQL();\n\t\t$statement = $db->prepare($sql);\n\t\t$status = $statement->execute(array($this->{$this->primaryField}));\n\t\t$statement = NULL;\n\n\t\treturn $status;\n\t}", "public function deleteQuestion()\r\n {\r\n $query_string = \"DELETE FROM questions \";\r\n $query_string .= \"WHERE questionid= :questionid\";\r\n\r\n return $query_string;\r\n}", "public function deleteQuestions()\r\n{\r\n $query_string = \"DELETE FROM questions \";\r\n $query_string .= \"WHERE quizid = :quizid\";\r\n\r\n return $query_string;\r\n}", "public function delete()\n {\n self::deleteById( $this->db, $this->id, $this->prefix );\n\n if( $this->inTransaction )\n {\n //$this->db->commit();\n $this->inTransaction = false;\n }\n }", "public function queryDelete($table, $where) : int;", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "function delete()\n {\n }", "function delete_student($studentID) {\n global $db;\n $query = 'DELETE FROM students \n WHERE studentID = :studentID';\n $statement = $db->prepare($query);\n $statement->bindValue(':studentID', $studentID);\n $statement->execute();\n $statement->closeCursor();\n }", "public function deleteBySql($table, $sql, $bind = []);", "public function DELETE() {\n\t\t$this->scriptForceHint('DELETE');\n\t}", "public function delete() {\n global $db;\n $this->_predelete();\n $result = $db->query(\"DELETE FROM \".$this->table.\" WHERE \".$this->id_field.\"=?\", array($this->{$this->id_field}));\n $this->_postdelete($result);\n return $result;\n }", "public function deleteSql(){\n\n $sql = \"DELETE FROM {$this->table} WHERE id = {$this->updateId}\";\n \n return $sql;\n }", "public abstract function delete();", "public function delete() {\n // Create query\n $query = \"DELETE FROM \" . $this->table .\n \" WHERE MID = :mid AND Spot = :spot \";\n \n // Prepare the statement\n $stmt = $this->conn->prepare($query);\n\n // Clean the query\n $this->attr[\"mid\"] = htmlspecialchars(strip_tags($this->attr[\"mid\"]));\n $this->attr[\"spot\"] = htmlspecialchars(strip_tags($this->attr[\"spot\"]));\n\n // Bind the data\n $stmt->bindValue(\":mid\", $this->attr[\"mid\"]);\n $stmt->bindValue(\":spot\", $this->attr[\"spot\"]);\n \n // Execute the prepared statement and check for errors in running it\n return $this->runPrepStmtChkErr($stmt);\n }", "public function delete(){\n\t if(!isset($this->attributes['id'])) \n\t\t\tthrow new Exception(\"Cannot delete new objects\");\n\t\t$this->do_callback(\"before_delete\");\n\t\treturn self::do_query(\"DELETE FROM \".self::table_for(get_class($this)).\n\t\t \" WHERE id=\".self::make_value($this->attributes['id']));\t\n\t}", "public function delete($conn, $where){\n\t\t$sql_where = $this->getWhereClause($conn, $where);\n\t\t$sql=\"DELETE FROM `\" . $this->table_name . \"`\";\n\t\tif ($sql_where!=\"\"){\n\t\t\t$sql = $sql . \" WHERE \" . $sql_where;\n\t\t}\n\t\treturn $conn->exec($sql);\n\t}", "public function deleteQuiz()\r\n{\r\n $query_string = \"DELETE FROM quizzes \";\r\n $query_string .= \"WHERE quizid = :quizid\";\r\n\r\n return $query_string;\r\n}", "public function delete()\n {\n $stmt = $this->_db->prepare(\"DELETE FROM score;\");\n $stmt->execute();\n }", "public function deleteRecord ($sqlString);", "function is_delete_statement()\n {\n return isset($this->object->_query_args['is_delete']) && $this->object->_query_args['is_delete'];\n }", "public function delete()\n {\n $query = $this->db->getQuery(true);\n\n $query\n ->delete($this->db->quoteName(\"#__crowdf_intentions\"))\n ->where($this->db->quoteName(\"id\") .\"=\". (int)$this->id);\n\n $this->db->setQuery($query);\n $this->db->execute();\n\n $this->reset();\n }", "function dbDelete($table, $where = null, $insertId = false){\n //$table = DB_PREFIX.'_'.$table; //para pegar o prefixo da tabela caso use\n $where = ($where) ? \" WHERE {$where}\" : null;\n $query = \"DELETE FROM {$table}{$where}\";\n return qExecute($query, $insertId);\n }", "protected function _delete()\n\t{\n\t}", "public function destroy(Statement $statement)\n {\n $statement->delete();\n\n return Redirect::back()->with('success', 'SOA deleted.');\n }", "public function delete()\n\t{\n\t \tif (!Validate::isTableOrIdentifier($this->identifier) OR !Validate::isTableOrIdentifier($this->table))\n\t \t\tdie(Tools::displayError());\n\n\t\t$this->clearCache();\n\n\t\t/* Database deletion */\n\t\t$result = Db::getInstance()->Execute('DELETE FROM `'.pSQL($this->table).'` WHERE `'.pSQL($this->identifier).'` = '.(int)($this->id));\n\t\tif (!$result)\n\t\t\treturn false;\n\t\t\n\t\treturn $result;\n\t}", "public function delete() {\n\t\tif ($this->checkDependencies() == true ) {\n\t\t\t$sql = \"DELETE FROM \".$this->tablename.\" where \".$this->idcol.\" = \".$this->page->ctrl['record'];\n\t\t\t$this->dbc->exec($sql);\n\t\t}\n\t}", "public function delete($whereCondition) \n\t{\n\t\t$sql = \"DELETE FROM `\" . $this->table . \"` \";\n\n\t\t$sql .= $this->_whereCondition($whereCondition). ';';\n\n\t\t$this->query($sql);\n\t}", "public function deleteDefinition()\r\n{\r\n $query_string = \"DELETE FROM glossary \";\r\n $query_string .= \"WHERE wordid = :wordid \";\r\n\r\n return $query_string;\r\n}", "public static function delete($id){\n $conexion = new Conexion();\n $sql = $conexion->prepare('DELETE FROM'. self::TABLA .' WHERE id = :id');\n $sql->bindValue(':id', $id);\n $sql->execute();\n return $sql; \n}", "private function Delete()\n {\n $return = false;\n $action = $this->Action();\n $table = $this->Table();\n $where = $this->Where();\n if($action && $table && Checker::isArray($where, false) && isset($where[Where::VALUES]))\n {\n $return[Where::QUERY] = \"$action FROM $table\".$where[Where::QUERY];\n $return[Where::VALUES] = $where[Where::VALUES];\n }\n return $return;\n }", "public function delete(){\n\t\tglobal $db;\n\t\t$response = array('success' => false);\n\t\t$response['success']=$db->delete($this->table, \"id = $this->id\");\n\t return $response;\n\t}", "public function deleteReply()\r\n{\r\n $query_string = \"DELETE FROM replies \";\r\n $query_string .= \"WHERE replyid = :replyid\";\r\n\r\n return $query_string;\r\n}", "public function delete()\r\n\t{\r\n\t}", "public function disableDeleteClause() {}", "public function delete($opt) {\n\t\t\t\n\t\t\t$statement = $this->buildDelete($opt);\n\t\t\t$pdoStatement = $this->prepare($statement);\n\t\t\t$this->__bindValues($pdoStatement);\n\t\t\t\n\t\t\t$pdoStatement->execute();\n\t\t\t$pdoStatement->closeCursor();\n\t\t\t$this->__reset();\n\t\t}", "public function deletePost()\r\n{\r\n $query_string = \"DELETE FROM posts \";\r\n $query_string .= \"WHERE postid= :postid\";\r\n\r\n return $query_string;\r\n}", "public static function delete() {\n\n\n\t\t}", "public function DELETE() {\n #\n }", "abstract function delete();", "function delete() ;", "function delete() ;", "public function delete( $table, $where=NULL, $order=NULL, $limit=NULL, $statementColumn=NULL )\n\t{\n\t\t/* TRUNCATE is faster, so use that if appropriate */\n\t\tif ( $where === NULL and $limit === NULL )\n\t\t{\n\t\t\t$stmt = $this->preparedQuery( \"TRUNCATE `{$this->prefix}{$table}`\", array() );\n\t\t\treturn $stmt->affected_rows;\n\t\t}\n\t\t\n\t\t/* Basic query */\n\t\t$query = \"DELETE FROM `{$this->prefix}{$table}`\";\n\n\t\t/* Is a statement? */\n\t\tif ( $where instanceof \\IPS\\Db\\Statement )\n\t\t{\n\t\t\t$query .= ' WHERE ' . $statementColumn . ' IN(' . $where->query . ')';\n\t\t\t$binds = $where->binds;\n\t\t}\n\n\t\t/* Add where clause */\n\t\telse\n\t\t{\n\t\t\t$binds = array();\n\t\t\tif ( $where !== NULL )\n\t\t\t{\n\t\t\t\t$_where = $this->compileWhereClause( $where );\n\t\t\t\t$query .= ' WHERE ' . $_where['clause'];\n\t\t\t\t$binds = $_where['binds'];\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* Order? */\n\t\tif( $order !== NULL )\n\t\t{\n\t\t\t$query .= ' ORDER BY ' . $order;\n\t\t}\n\t\t\n\t\t/* Limit */\n\t\tif( $limit !== NULL )\n\t\t{\n\t\t\t$query .= $this->compileLimitClause( $limit );\n\t\t}\n\t\t\n\t\t/* Run it */\n\t\t$stmt = $this->preparedQuery( $query, $binds );\n\t\treturn $stmt->affected_rows;\n\t}", "function delete() {\n\t\t$sqlStatements = array();\n\t\t$sqlStatements[] = \"DROP TABLE IF EXISTS tags\";\n\t\t$sqlStatements[] = \"DROP TABLE IF EXISTS siteViews\";\n\t\texecuteSqlStatements($sqlStatements);\n\t}", "public function delete()\n\t{\n\t}", "public function delete() {\n\t\t\t$query = \"DELETE FROM $this->table_name WHERE id=?\";\n\n\t\t\t// prepare biatch\n\t\t\t$stmt = $this->conn->prepare($query);\n\n\t\t\t// bind id biatch\n\t\t\t$stmt->bindParam(1, $this->id);\n\n\t\t\t// execute query\n\t\t\tif ($stmt->execute()) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "function delete() {\n $fetchPrimary = $this->mysqlConnection->query(\"SHOW INDEX FROM \".$this->table);\n $arrayIndex = $fetchPrimary->fetch(PDO::FETCH_ASSOC);\n $kolomIndex = $arrayIndex['Column_name'];\n\n\t\t\t// Delete het huidige record.\n\n\t\t\t$deleteQuery = \"DELETE FROM \".$this->table.\" WHERE \".$kolomIndex.\" = \".$this->originalValues[$kolomIndex];\n\t\t\t$this->lastQuery = $deleteQuery;\n\n $deleteTable = $this->mysqlConnection->prepare($this->lastQuery);\n $deleteTable->execute();\n\n\t\t}", "protected function delete() {\n\t}", "public final function delete() {\n }" ]
[ "0.8400239", "0.70125234", "0.6945524", "0.6887968", "0.6805836", "0.67936546", "0.6769431", "0.67364323", "0.66977626", "0.66763014", "0.6607683", "0.6605072", "0.65323144", "0.65315753", "0.64970666", "0.6473081", "0.64414334", "0.6420754", "0.64002836", "0.63570464", "0.63160414", "0.6283418", "0.6283418", "0.6283418", "0.6283418", "0.62548846", "0.6253139", "0.62503386", "0.62503386", "0.6250314", "0.62490183", "0.62453157", "0.62448746", "0.6242355", "0.6237492", "0.6232513", "0.62290674", "0.6226709", "0.6221848", "0.6220701", "0.6210764", "0.6190414", "0.6173799", "0.6158174", "0.6158174", "0.6158174", "0.6158174", "0.6158174", "0.6158174", "0.6158174", "0.6158174", "0.6158174", "0.6158174", "0.6158174", "0.6158174", "0.6158174", "0.6158174", "0.6158174", "0.6142402", "0.614088", "0.61399335", "0.6135079", "0.6133386", "0.61266977", "0.6126639", "0.6124081", "0.6123563", "0.6122761", "0.6113282", "0.6103763", "0.6101881", "0.6100214", "0.60834146", "0.6070376", "0.60676926", "0.6067599", "0.6067388", "0.606158", "0.60522515", "0.6047812", "0.60464305", "0.6043229", "0.6040812", "0.6040354", "0.60370034", "0.6035892", "0.6028996", "0.6016333", "0.60152537", "0.601292", "0.60093915", "0.6007353", "0.6007353", "0.5994368", "0.5981766", "0.59814334", "0.597376", "0.5973095", "0.5972083", "0.5971423" ]
0.8804365
0
bridges Get form bridge instance for ADT
bridges Получает экземпляр моста для ADT
public function getFormBridgeForInstance(ilADT $a_adt) { $class = $this->initTypeClass($a_adt->getType(), "FormBridge"); return new $class($a_adt); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _getBridge() {}", "private function get_bridge()\n\t{\n\t\treturn $this->m_bridge;\n\t}", "function getBridgeModel() {\n return $this->bridgeModel;\n }", "public function getDBBridgeForInstance(ilADT $a_adt)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_adt->getType(), \"DBBridge\");\t\t\r\n\t\treturn new $class($a_adt);\t\r\n\t}", "public function getActiveRecordBridgeForInstance(ilADT $a_adt)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_adt->getType(), \"ActiveRecordBridge\");\t\t\r\n\t\treturn new $class($a_adt);\r\n\t}", "public function getPresentationBridgeForInstance(ilADT $a_adt)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_adt->getType(), \"PresentationBridge\");\t\t\r\n\t\treturn new $class($a_adt);\t\r\n\t}", "abstract function getForm();", "abstract protected function getForm();", "function getBridgeGateway() {\n return $this->bridgeGateway;\n }", "abstract public function getForm() : void;", "abstract public function get_gateway_form_fields();", "function getBridgeName() {\n return $this->bridgeName;\n }", "public function getBp($bp=null)\n {\n if ($bp != null && is_array($this->entity) && count($this->entity)!=0) {\n $table_name = strtolower(get_class($this));\n $query = \"SELECT * FROM $table_name WHERE bp = ?\";\n $req = Manager::bdd()->prepare($query);\n $req->execute([$bp]);\n $data = \"\";\n if ($data = $req->fetchAll(PDO::FETCH_ASSOC)) {\n$d=$data[0];\n$this->setId_entity($d['id_entity']);\n$this->setLabel($d['label']);\n$this->setDomaine($d['domaine']);\n$this->setEmail($d['email']);\n$this->setPhone_number($d['phone_number']);\n$this->setBp($d['bp']);\n$this->setLocalisation($d['localisation']);\n$this->setVille($d['ville']);\n$this->setUniqueId($d['uniqueId']);\n$this->setCreated_at($d['created_at']);\n$this->setCreated_by($d['created_by']);\n$this->setUpdate_at($d['update_at']);\n$this->setUpdate_by($d['update_by']);\n$this->entity =$data; \n return $this;\n }\n \n } else {\n return $this->bp;\n }\n \n }", "public function getForm();", "function getBridgeDhcp() {\n return $this->bridgeDhcp;\n }", "public function getForm(): FormInterface;", "abstract public function get_instance();", "public function getFormInObject()\n {\n $sExKey = null;\n\n if ($this->_iIdEntity > 0 && $this->_sSynchronizeEntity !== null && count($_POST) < 1) {\n\n $sModelName = str_replace('Entity', 'Model', $this->_sSynchronizeEntity);\n $oModel = new $sModelName;\n\n $oEntity = new $this->_sSynchronizeEntity;\n $sPrimaryKey = LibEntity::getPrimaryKeyNameWithoutMapping($oEntity);\n $sMethodName = 'findOneBy'.$sPrimaryKey;\n $oCompleteEntity = call_user_func_array(array(&$oModel, $sMethodName), array($this->_iIdEntity));\n\n if (is_object($oCompleteEntity)) {\n\n foreach ($this->_aElement as $sKey => $sValue) {\n\n\t\t\t\t\tif ($sValue instanceof \\Venus\\lib\\Form\\Input && $sValue->getType() == 'submit') {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n if ($sValue instanceof \\Venus\\lib\\Form\\Radio) {\n\n $sExKey = $sKey;\n $sKey = substr($sKey, 0, -6);\n }\n\n if ($sValue instanceof Form) {\n\n ;\n } else {\n\n $sMethodNameInEntity = 'get_'.$sKey;\n\t\t\t\t\t\tif (method_exists($oCompleteEntity, $sMethodNameInEntity)) {\n\t\t\t\t\t\t\t$mValue = $oCompleteEntity->$sMethodNameInEntity();\n\t\t\t\t\t\t}\n\n if ($sValue instanceof \\Venus\\lib\\Form\\Radio && method_exists($this->_aElement[$sExKey], 'setValueChecked')) {\n\n $this->_aElement[$sExKey]->setValueChecked($mValue);\n } else if (isset($mValue) && method_exists($this->_aElement[$sKey], 'setValue')) {\n\n $this->_aElement[$sKey]->setValue($mValue);\n }\n }\n }\n }\n }\n\n $oForm = new \\StdClass();\n $oForm->start = '<form name=\"form'.$this->_iFormNumber.'\" method=\"post\" enctype=\"multipart/form-data\"><input type=\"hidden\" value=\"1\" name=\"validform'.$this->_iFormNumber.'\">';\n $oForm->form = array();\n\n foreach ($this->_aElement as $sKey => $sValue) {\n\n if ($sValue instanceof Container) {\n\n $oForm->form[$sKey] = $sValue;\n } else {\n\n $oForm->form[$sKey] = $sValue->fetch();\n }\n }\n\n $oForm->end = '</form>';\n\n return $oForm;\n }", "function getMbrid() {\n return $this->_mbrid;\n }", "public static function getForm();", "abstract public function bindForm();", "abstract public function bindForm();", "protected function getVictoireForm_Form_Type_VicLinkService()\n {\n return $this->services['victoire_form.form.type.vic_link'] = new \\Victoire\\Bundle\\FormBundle\\Form\\Type\\LinkType(array(), $this->get('victoire_view_reference.repository'), array(0 => 'fr', 1 => 'en'), $this->get('request_stack'), array(0 => 'modal'));\n }", "protected function form()\n {\n $Adv=new Adv();\n $form = new Form($Adv);\n $platform= $Adv->platform;\n $type= $Adv->type;\n $status= $Adv->status;\n $list_array=[\n array(\"field\"=>\"title\",\"title\"=>\"标题\",\"type\"=>\"text\"),\n array(\"field\"=>\"platform\",\"title\"=>\"平台\",\"type\"=>\"select\",\"array\"=>$platform),\n array(\"field\"=>\"type\",\"title\"=>\"类型\",\"type\"=>\"select\",\"array\"=>$type),\n array(\"field\"=>\"image\",\"title\"=>\"图片\",\"type\"=>\"image\"),\n array(\"field\"=>[\"start_time\",\"end_time\"],\"title\"=>\"活动时间\",\"type\"=>\"datetimeRange\"),\n array(\"field\"=>\"font1\",\"title\"=>\"字段1\",\"type\"=>\"text\"),\n array(\"field\"=>\"font2\",\"title\"=>\"字段2\",\"type\"=>\"text\"),\n array(\"field\"=>\"font3\",\"title\"=>\"字段3\",\"type\"=>\"text\"),\n array(\"field\"=>\"font4\",\"title\"=>\"字段4\",\"type\"=>\"text\"),\n array(\"field\"=>\"font5\",\"title\"=>\"字段5\",\"type\"=>\"text\"),\n array(\"field\"=>\"status\",\"title\"=>\"状态\",\"type\"=>\"switch\",\"array\"=>$status),\n array(\"field\"=>\"created_at\",\"title\"=>\"创建时间\",\"type\"=>\"value\")\n ];\n BaseControllers::set_form($form,$list_array);\n return $form;\n }", "public function getAcroForm() {}", "public function getAcroForm() {}", "function getBridgeNetmask() {\n return $this->bridgeNetmask;\n }", "abstract protected function instantiateForm(): FormInterface;", "public function makeBridge()\n {\n //Return the bridge\n return app('PersonalityInsightsBridge', ['credentialsName' => $this->getCredentialsName()])->appendHeaders($this->getHeaders());\n }", "public function getIndirectObject() {}", "public function getIndirectObject() {}", "function dennis_client_field_client_instance($bundle, $entity_type) {\n return array(\n 'bundle' => $bundle,\n 'default_value' => NULL,\n 'deleted' => '0',\n 'description' => 'Changes the targeting of adverts to the selected client.',\n 'display' => array(\n 'default' => array(\n 'label' => 'above',\n 'settings' => array(),\n 'type' => 'hidden',\n 'weight' => 0,\n ),\n ),\n 'entity_type' => $entity_type,\n 'field_name' => 'field_client',\n 'label' => 'Client',\n 'required' => 0,\n 'settings' => array(\n 'user_register_form' => FALSE,\n ),\n 'widget' => array(\n 'active' => 1,\n 'module' => 'options',\n 'settings' => array(),\n 'type' => 'options_select',\n 'weight' => '2.5',\n ),\n );\n}", "public function bridge()\n {\n return new Bridge($this->talker);\n }", "abstract protected function getBusClass(): string;", "function getBdd()\n{\n\treturn $bdd;\n}", "function make_form_row(){\n\t\tswitch($this->fieldType){\n\t\t\tcase 'id':\n\t\t\t\treturn $this->obo_id();\n\t\t\t\tbreak;\n\t\t\tcase 'term':\n\t\t\t\treturn $this->obo_term();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$form = parent::make_form_row();\n\t\t\n\t\t}\n\t\treturn $form;\n\t\n\t}", "function get_instance()\r\n{\r\n\t\r\n}", "function bounce_tab_connection() {\n $form_fields = array();\n $form_fields['bounce_email'] = array(\n 'type' => 'input',\n 'size' => 38,\n 'label' => __('Bounce Email', WYSIJA));\n\n $form_fields['bounce_host'] = array(\n 'type' => 'input',\n 'size' => 38,\n 'label' => __('Hostname', WYSIJA));\n\n $form_fields['bounce_login'] = array(\n 'type' => 'input',\n 'size' => 38,\n 'label' => __('Login', WYSIJA));\n $form_fields['bounce_password'] = array(\n 'type' => 'password',\n 'size' => 38,\n 'label' => __('Password', WYSIJA));\n $form_fields['bounce_port'] = array(\n 'type' => 'input',\n 'label' => __('Port', WYSIJA),\n 'size' => '4',\n 'style' => 'width:10px;');\n $form_fields['bounce_connection_method'] = array(\n 'type' => 'dropdown',\n 'values' => array('pop3' => 'POP3', 'imap' => 'IMAP', 'pear' => __('POP3 without imap extension', WYSIJA), 'nntp' => 'NNTP'),\n 'label' => __('Connection method', WYSIJA));\n $form_fields['bounce_connection_secure'] = array(\n 'type' => 'radio',\n 'values' => array('' => __('No', WYSIJA), 'ssl' => __('Yes', WYSIJA)),\n 'label' => __('Secure connection(SSL)', WYSIJA));\n $form_fields['bounce_selfsigned'] = array(\n 'type' => 'selfsigned',\n 'label' => __('Self-signed certificates', WYSIJA));\n\n $multisite_prefix = '';\n if (is_multisite()) {\n $temp_array = array();\n $multisite_prefix = 'ms_';\n foreach ($form_fields as $key => $field) {\n $field['id'] = $key;\n $temp_array[$multisite_prefix . $key] = $field;\n }\n $form_fields = $temp_array;\n }\n\n $html_content = '<table class=\"form-table\"><tbody>';\n $html_content .= $this->viewObj->buildMyForm($form_fields, '', 'config');\n\n $name = $multisite_prefix . 'bouncing_emails_each';\n $id = str_replace('_', '-', $name);\n\n $value = $this->viewObj->model->getValue($name);\n $helper_forms = WYSIJA::get('forms', 'helper');\n $field = $helper_forms->dropdown(array('name' => 'wysija[config][' . $name . ']', 'id' => $id), array('fifteen_min' => __('15 minutes', WYSIJA),\n 'thirty_min' => __('30 minutes', WYSIJA),\n 'hourly' => __('1 hour', WYSIJA),\n 'two_hours' => __('2 hours', WYSIJA),\n 'twicedaily' => __('Twice daily', WYSIJA),\n 'daily' => __('Day', WYSIJA)), $value);\n\n $checked = '';\n if ($this->viewObj->model->getValue($multisite_prefix . 'bounce_process_auto'))\n $checked = ' checked=\"checked\" ';\n $html_content .= '<tr><td><label for=\"bounce-process-auto\"><input type=\"checkbox\" ' . $checked . ' id=\"bounce-process-auto\" value=\"1\" name=\"wysija[config][' . $multisite_prefix . 'bounce_process_auto]\" />\n ' . __('Activate bounce and check every...', WYSIJA) . '</label></td><td id=\"bounce-frequency\">' . $field . '</td></tr>';\n\n // try to connect button\n $html_content .= '<tr><td><a class=\"button-secondary\" id=\"bounce-connector\">' . __('Does it work? Try to connect.', WYSIJA) . '</a></td><td></td></tr>';\n\n\n $html_content .= '</tbody></table>';\n return $html_content;\n }", "abstract protected function getBusClass();", "protected function form()\n {\n return Form::make(new Linkman(), function (Form $form) {\n $form->display('id');\n $form->text('name');\n $form->text('mobile')->saving(function ($value) {\n return (string) $value;\n });\n $form->text('gender');\n $form->text('birthday')->saving(function ($value) {\n return (string) $value;\n });\n $form->text('province_id');\n $form->text('city_id');\n $form->text('area_id');\n $form->text('address')->saving(function ($value) {\n return (string) $value;\n });\n $form->text('description');\n $form->text('nickname')->saving(function ($value) {\n return (string) $value;\n });\n \n $form->display('created_at');\n $form->display('updated_at');\n });\n }", "public function get_active_instance() { \n\n\n\t}", "abstract function form();", "function B_M() {\n\treturn Bonster_Management::instance();\n}", "public function generateMergeBaseFormAction()\n {\n $options = $this->_getParam('bases');\n $site = \\Fisdap\\EntityUtils::getEntity(\"SiteLegacy\", $this->_getParam(\"site_id\"));\n\n foreach ($options as $id => $text) {\n $base = \\Fisdap\\EntityUtils::getEntity(\"BaseLegacy\", $id);\n if ($base->getAddressString() != '') {\n $options[$id] .= \": \".$base->getAddressString();\n } else {\n $options[$id] .= \": no address entered\";\n }\n }\n \n $form = new Account_Form_Modal_MergeBasesModal($options, $site->id);\n $this->_helper->json($form->__toString());\n }", "public function get_active_instance() {\n\n\n }", "function getInputForm() {\n\t\treturn new \\Flux\\Lead();\n\t}", "abstract protected function getDefaultViewForm();", "public static function get_model_dba() {\n $model_dba_id = Doggy_Config::get('app.model.dba');\n return self::get_dba(empty($model_dba_id)?'default':$model_dba_id);\n\t}", "public function model()\n {\n return Rba::class;\n }", "function _erpal_contract_helper_config_basic() {\n $form = drupal_get_form('erpal_contract_helper_config_form');\n\n return $form;\n}", "public function getForm()\n {\n RETURN $this->strategy->getForm();\n }", "public function bridgeLoad( $class_name ){\r\n\t!defined('BAY_OMIT_CONTROLLER_CONSTRUCT') && define('BAY_OMIT_CONTROLLER_CONSTRUCT',true);\r\n\tif( !isset($this->bridge) ){\r\n\t require_once 'iSellBase.php';\r\n\t $this->bridge=new iSellBase();\r\n\t}\r\n\treturn $this->bridge->LoadClass($class_name);\r\n }", "public function getFormFieldBuilder(): FormFieldBuilder;", "public function\tgetReferidoInfo(){\r\t\t\r\t\t$model_ref = $this->getModel( 'referido' );\r\t\t$idref = JRequest::getInt( 'idref' );\r\t\t\r\t\t$model_ref->instance( $idref );\r\t\t$inf_ref = $model_ref->getReferidoInf();\r\t\t\r\t\tif( !empty($inf_ref) ){\r\t\t\t\r\t\t\t$model_ref\r\t\t}\r\t\t\r\t}", "protected function form()\n {\n $form = new Form(new BackPeopleInfo());\n\n $form->text('name', __('姓名'));\n $form->text('id_num', __('身份证号码'));\n $form->mobile('phone', __('手机号码'));\n $form->text('address', __('楼栋房号'));\n $form->text('originatin', __('始发地'));\n $form->date('back_date', __('返回日期'))->default(date('Y-m-d'));\n $form->date('isolate_date', __('隔离日期'))->default(date('Y-m-d'));\n $form->text('isolate_flag', __('解除隔离'))->default('否');\n $form->text('isolate_level', __('隔离等级'))->default('普通');\n $form->text('qrcode_flag', __('网格化管理'))->default('否');\n $form->text('vehicle_info', __('交通工具'));\n $form->text('remarks', __('备注'));\n\n return $form;\n }", "public function getAfraModel()\n {\n return $this->_aframark;\n }", "public static function & GetInstance ();", "public function getForm($object = null) : \\Dms\\Core\\Form\\IForm;", "protected function form()\n {\n $form = new Form(new Advertisement);\n\n $form->text('title', 'العنوان')->rules('required');\n $form->text('slug')->disable();\n $form->textarea('details', 'التفاصيل')->rules('required');\n $form->select('user_id', 'المستخدم')->options(User::pluck('mobile', 'id')->all())->rules('required');\n $form->select('category_id', 'القسم')->options(Category::pluck('title_ar', 'id')->all())->rules('required');\n // $form->select('city_id', 'المدينة')->options(City::pluck('title', 'id')->all())->rules('required');\n $form->multipleImage('images', 'الصور')->removable();\n $form->radio('status', 'الحالة')->options(\n [\n -1 => 'قيد المراجعة',\n 1 => 'مقبول',\n 0 => 'مرفوض',\n ]\n )->rules('required');\n $form->radio('type', 'النوع')->options(\n [\n 'sell' => 'بيع',\n 'rental' => 'إيجار',\n ]\n )->rules('required');\n $form->radio('featured', 'مميز')->options(\n [\n 1 => 'نعم',\n -1 => 'لا',\n ]\n )->rules('required');\n \n $form->number('area', 'المساحة')->rules('required');\n $form->currency('price', 'السعر')->symbol('ر.س')->rules('required');\n $form->map('ad_lat', 'ad_long', 'الخريطة')->useGoogleMap();\n $form->text('location', 'الموقع الجغرافي');\n return $form;\n }", "function getBridgeMacAddress() {\n return $this->bridgeMacAddress;\n }", "function getBackend() ;", "public function getConfigForm() {\n $rooms = array();\n\n $rooms['0'] = 'None';\n\n $regions = array();\n\n //die($this->getHouse());\n\n $housesService = new HomeNet_Model_House_Service();\n $house = $housesService->getObjectByIdWithRooms($this->getHouse());\n\n $r = $housesService->getHouseRegionNames($this->getHouse());\n\n foreach($r as $region){\n $regions[$region['id']] = $region['name'];\n }\n\n foreach($house->rooms as $room){\n $region = $regions[$room->region];\n $rooms[$region][$room->id] = $room->name;\n }\n\n $form = new Zend_Form();\n\n $subdevices = $this->getSubdevices();\n\n //debugArray($this->settings);\n // die(debugArray($subdevices));\n\n foreach ($subdevices as $position => $subdevice) {\n\n $sub = $subdevice->getConfigForm();\n\n \n if (!empty($subdevice)) {\n \n //set default name\n $name = $sub->getElement('name');//\n if(empty($subdevice->name) && !empty($this->settings['subdevice'.$position.'name'])){\n $name->setValue($this->settings['subdevice'.$position.'name']); \n } \n \n $room = $sub->getElement('room');\n $room->setMultiOptions($rooms);\n\n if(empty($subdevice->room)){\n $room->setValue($this->getRoom());\n }\n\n $sub->setLegend('Subdevice ' . $position . ': ' . $subdevice->name);\n\n $form->addSubForm($sub, 'subdevice' . $position);\n }\n }\n\n //die(debugArray($sub));\n\n return $form;\n }", "protected function getDatabaseTransferObjectAssembler()\n {\n return $this->databaseTransferObjectAssembler;\n }", "protected function getGateway($name) {\n\t\t$class = get_class($this);\n\t\t\n\t\tif($name === $this->getName())\n\t\t\treturn $this;\n\t\t\n\t\t// load in the model if it hasn't been loaded yet\n\t\t$this->_model_dict[$name];\n\t\t\n\t\t$temp = class_name(\"{$name} gateway\");\n\t\t\n\t\tif(class_exists($temp, FALSE))\n\t\t\t$class = $temp;\n\t\t\n\t\treturn new $class(\n\t\t\t$this->_resource, \n\t\t\t$this->_type_handler\n\t\t);\n\t}", "public function get_form() {\n\t\treturn $this;\n\t}", "abstract public function createForm();", "abstract public function createForm();", "private function getBoundTarget()\n {\n return $this->getFormDataBinder()->get();\n }", "public function accessForm(): IFormElement;", "public abstract function getBackend();", "function GetForm($state, $curchild = null)\r\n\t{\r\n\t\tif ($this->state == STATE_CREATE && !$this->Behavior->AllowCreate)\r\n\t\t\treturn;\r\n\r\n\t\t$fullname = $this->Name;\r\n\t\tif ($curchild != null) $fullname .= '_'.$curchild;\r\n\t\t$ci = Server::GetState($this->Name.'_ci');\r\n\r\n\t\tif ($this->type == CONTROL_BOUND)\r\n\t\t{\r\n\t\t\tif ($this->state == STATE_CREATE)\r\n\t\t\t{\r\n\t\t\t\tif (!empty($this->ds->FieldInputs))\r\n\t\t\t\tforeach ($this->ds->FieldInputs as $k => $fi)\r\n\t\t\t\t\tif (is_object($fi) && $fi->attr('TYPE') == 'label')\r\n\t\t\t\t\t\tunset($this->ds->FieldInputs[$k]);\r\n\t\t\t}\r\n\t\t\t$context = isset($curchild) ? $this->ds->children[$curchild] :\r\n\t\t\t\t$this;\r\n\r\n\t\t\tif (!isset($this->ds)) Error(\"<br />What: Dataset is not set.\r\n\t\t\t\t<br />Where: EditorData({$this->Name})::GetForm.\r\n\t\t\t\t<br />Why: This editor was not created with a proper dataset.\");\r\n\r\n\t\t\tforeach ($this->handlers as $handler)\r\n\t\t\t{\r\n\t\t\t\t$joins = $handler->GetJoins();\r\n\t\t\t\tif (!empty($joins))\r\n\t\t\t\tforeach ($joins as $ix => $j) $this->ds->joins[$ix] = $j;\r\n\t\t\t\t\t//$joins = array_merge($joins, $join);\r\n\t\t\t}\r\n\r\n\t\t\t$sel = $state == STATE_EDIT ? $context->ds->Get(array(\r\n\t\t\t\t'match' => array($context->ds->id => $ci),\r\n\t\t\t\t\t'joins' => @$joins)) : null;\r\n\r\n\t\t\t$ds = $context->ds;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$ds = $this->ds;\r\n\t\t\tif (!empty($ds->FieldInputs))\r\n\t\t\tforeach (array_keys($ds->FieldInputs) as $n)\r\n\t\t\t{\r\n\t\t\t\tif (isset($this->values[$n]))\r\n\t\t\t\t\t$ds->FieldInputs[$n]->attr('VALUE', $this->values[$n]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (!empty($ds->FieldInputs))\r\n\t\t{\r\n\t\t\t$frm = new Form($fullname, null, false);\r\n\r\n\t\t\tif (isset($ds->Validation))\r\n\t\t\t{\r\n\t\t\t\t$frm->Validation = $ds->Validation;\r\n\t\t\t\t$frm->Errors = $ds->Errors;\r\n\t\t\t}\r\n\r\n\t\t\tif ($state == STATE_EDIT || $this->type != CONTROL_BOUND)\r\n\t\t\t{\r\n\t\t\t\t$frm->AddHidden('ci', $ci);\r\n\t\t\t\tif (!empty($this->assoc))\r\n\t\t\t\t\t$frm->AddHidden($this->assoc, $this->Name);\r\n\t\t\t}\r\n\r\n\t\t\tglobal $PERSISTS;\r\n\t\t\tif (!empty($PERSISTS))\r\n\t\t\t\tforeach ($PERSISTS as $key => $val)\r\n\t\t\t\t\t$frm->AddHidden($key, $val);\r\n\r\n\t\t\tif (isset($curchild))\r\n\t\t\t{\r\n\t\t\t\t$frm->AddHidden('parent', $ci);\r\n\t\t\t\t$frm->AddHidden('child', $curchild);\r\n\t\t\t}\r\n\r\n\t\t\tforeach ($ds->FieldInputs as $col => $in)\r\n\t\t\t{\r\n\t\t\t\tif (is_object($in))\r\n\t\t\t\t{\r\n\t\t\t\t\tif ($in->attr('TYPE') == 'custom') //Callback\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$cb = $in->attr('VALUE');\r\n\t\t\t\t\t\tcall_user_func($cb, isset($sel) ? $sel : null,\r\n\t\t\t\t\t\t\t$frm, $col);\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ($in->attr('TYPE') == 'select' || $in->attr('TYPE') == 'radios')\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$val = $in->attr('VALUE');\r\n\t\t\t\t\t\tif (isset($sel) && isset($val[$sel[0][$col]]))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$val[$sel[0][$col]]->selected = true;\r\n\t\t\t\t\t\t\t$in->attr('VALUE', $val);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if ($in->attr('TYPE') == 'file')\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif (!empty($in->atrs['EXTRA']))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$vp = new VarParser();\r\n\t\t\t\t\t\t\t$glob = $vp->ParseVars($in->attr('VALUE'), $sel[0]);\r\n\t\t\t\t\t\t\t$files = glob($glob.'.*');\r\n\r\n\t\t\t\t\t\t\tswitch ($in->atrs['EXTRA'])\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tcase 'thumb':\r\n\t\t\t\t\t\t\t\t\t$in->help = '<img src=\"'\r\n\t\t\t\t\t\t\t\t\t.(empty($files) ? 'xedlib/images/cross.png'\r\n\t\t\t\t\t\t\t\t\t: $files[0]).'\" />';\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\tcase 'exists':\r\n\t\t\t\t\t\t\t\t\t$in->help = '<img src=\"xedlib/images/'.\r\n\t\t\t\t\t\t\t\t\t(empty($files) ? 'cross.png' : 'tick.png').\r\n\t\t\t\t\t\t\t\t\t'\" />';\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif ($in->attr('TYPE') == 'password') $in->attr('VALUE', '');\r\n\t\t\t\t\t\telse if (isset($sel[0][$col]))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif ($in->attr('TYPE') == 'date')\r\n\t\t\t\t\t\t\t\t$in->attr('VALUE', strftime('%x',\r\n\t\t\t\t\t\t\t\t\tDatabase::MyDateTimestamp($sel[0][$col])));\r\n\t\t\t\t\t\t\telse if ($in->attr('TYPE') == 'datetime')\r\n\t\t\t\t\t\t\t\t$in->attr('VALUE', Database::MyDateTimestamp($sel[0][$col], true));\r\n\t\t\t\t\t\t\telse $in->attr('VALUE', $sel[0][$col]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$in->attr('NAME', $this->Name.'_'.$col);\r\n\r\n\t\t\t\t\tif (isset($this->Errors[$in->attr('NAME')]))\r\n\t\t\t\t\t\t$in->help = $this->Errors[$in->atrs['NAME']];\r\n\t\t\t\t\t$in->attr('CLASS', 'editor_input');\r\n\r\n\t\t\t\t\t$frm->AddInput($in);\r\n\t\t\t\t}\r\n\t\t\t\telse if (is_numeric($col)) $frm->AddInput('&nbsp;');\r\n\t\t\t}\r\n\r\n\t\t\tforeach ($this->handlers as $handler)\r\n\t\t\t{\r\n\t\t\t\t//Use plural objects to compliment the joins property.\r\n\t\t\t\t//For some reason I change this to a single item when\r\n\t\t\t\t//it can be multiple.\r\n\r\n\t\t\t\t$handler->GetFields($this, $frm,\r\n\t\t\t\tisset($sel) ? $sel[0][$this->ds->id] : null,\r\n\t\t\t\tisset($sel) ? $sel : null);\r\n\t\t\t}\r\n\r\n\t\t\t$frm->State = $state == STATE_EDIT || $this->type != CONTROL_BOUND\r\n\t\t\t\t? 'Update' : 'Create';\r\n\t\t\t$frm->Description = $ds->Description;\r\n\t\t\t$frm->AddInput(\r\n\t\t\t\t$frm->GetSubmitButton($this->Name.'_action', $frm->State).\r\n\t\t\t\t($state == STATE_EDIT && $this->type == CONTROL_BOUND ?\r\n\t\t\t\t'<input type=\"submit\" name=\"'.$this->Name.'_action\" value=\"Cancel\" class=\"btn\" />'\r\n\t\t\t\t: null)\r\n\t\t\t);\r\n\r\n\t\t\treturn $frm;\r\n\t\t}\r\n\t}", "function guifi_radio_add_link2ap_submit(&$form,&$form_state) {\n $radio_id =$form_state['clicked_button']['#parents'][1];\n $interface_id=$form_state['clicked_button']['#parents'][2];\n guifi_log(GUIFILOG_TRACE,\n sprintf(\"function guifi_radio_add_link2ap_submit(Radio: %d, Interface: %d)\",\n $radio_id, $interface_id),\n $form_state['clicked_button']['#parents']);\n\n $form_state['rebuild'] = TRUE;\n $form_state['action'] = 'guifi_radio_add_link2ap_form';\n\n // initialize the filters\n $form_state['filters'] = array(\n 'dmin' => 0,\n 'dmax' => 10,\n 'search' => NULL,\n 'type' => 'ap/client',\n 'mode' => $form_state['values']['radios'][$radio_id]['mode'],\n 'from_node' => $form_state['values']['nid'],\n 'from_device' => $form_state['values']['id'],\n 'from_radio' => $radio_id,\n 'azimuth' => \"0,360\",\n );\n\n $form_state['link2apInterface'] =\n &$form_state['values']['radios'][$radio_id]['interfaces'][$interface_id];\n\n return;\n}", "public function getFieldInstanceByName($name)\n\t{\n\t\t$moduleName = $this->getModule()->getName(true);\n\t\t$fieldsLabel = $this->getEditFields();\n\t\t$params = ['uitype' => 1, 'column' => $name, 'name' => $name, 'label' => $fieldsLabel[$name], 'displaytype' => 1, 'typeofdata' => 'V~M', 'presence' => 0, 'isEditableReadOnly' => false];\n\t\tswitch ($name) {\n\t\t\tcase 'crmid':\n\t\t\t\t$params['uitype'] = 10;\n\t\t\t\t$params['referenceList'] = ['Contacts'];\n\t\t\t\tbreak;\n\t\t\tcase 'istorage':\n\t\t\t\t$params['uitype'] = 10;\n\t\t\t\t$params['referenceList'] = ['IStorages'];\n\t\t\t\t$params['typeofdata'] = 'V~O';\n\t\t\t\tbreak;\n\t\t\tcase 'status':\n\t\t\t\t$params['uitype'] = 16;\n\t\t\t\t$params['picklistValues'] = [1 => \\App\\Language::translate('PLL_ACTIVE', $moduleName), 0 => \\App\\Language::translate('PLL_INACTIVE', $moduleName)];\n\t\t\t\tbreak;\n\t\t\tcase 'server_id':\n\t\t\t\t$servers = Settings_WebserviceApps_Module_Model::getActiveServers($this->getModule()->typeApi);\n\t\t\t\t$params['uitype'] = 16;\n\t\t\t\tforeach ($servers as $key => $value) {\n\t\t\t\t\t$params['picklistValues'][$key] = $value['name'];\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'type':\n\t\t\t\t$params['uitype'] = 16;\n\t\t\t\t$params['picklistValues'] = [];\n\t\t\t\tforeach ($this->getTypeValues() as $key => $value) {\n\t\t\t\t\t$params['picklistValues'][$key] = \\App\\Language::translate($value, $moduleName);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'language':\n\t\t\t\t$params['typeofdata'] = 'V~O';\n\t\t\t\t$params['uitype'] = 32;\n\t\t\t\t$params['picklistValues'] = \\App\\Language::getAll();\n\t\t\t\tbreak;\n\t\t\tcase 'user_id':\n\t\t\t\t$params['uitype'] = 16;\n\t\t\t\t$params['picklistValues'] = \\App\\Fields\\Owner::getInstance($moduleName)->getAccessibleUsers('', 'owner');\n\t\t\t\tbreak;\n\t\t\tcase 'password_t':\n\t\t\t\t$params['typeofdata'] = 'P~M';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t\treturn Settings_Vtiger_Field_Model::init($moduleName, $params);\n\t}", "function lib4ridora_citation_subtype_form_options() {\n module_load_include('inc', 'xml_form_builder', 'includes/associations');\n $forms = array();\n foreach (xml_form_builder_get_associations(array(), array(), array('MODS')) as $id => $association) {\n $forms[$association['form_name']] = $association['form_name'];\n }\n return $forms;\n}", "public function getFormFiller() {}", "public function getFormFiller() {}", "function form( $instance )\n { \n }", "public function buildUnmanagedForm(FormBuilderInterface $builder)\n {\n $builder\n // Client fields\n ->add('idastro', 'text', [\n 'required' => false,\n 'label' => 'ID Astro',\n ])\n ->add('phones', 'text', [\n 'required' => false,\n 'label' => 'Téléphone',\n ])\n ->add('name', 'text', [\n 'required' => false,\n 'label' => 'Prénom',\n ])\n ->add('mail', 'text', [\n 'required' => false,\n 'label' => 'Adresse mail',\n ])\n ->add('birthdate', 'date', [\n 'label' => 'Date de naissance',\n ] + $this->getDatetimeConfig())\n ->add('page', 'hidden', [\n 'attr' => ['class' => 'js-page-target'],\n ])\n ->add('dateBegin', 'date', [\n 'label' => 'Date d\\'inscription',\n ] + $this->getDatetimeConfig());\n }", "protected function form()\n {\n return Admin::form(Banner::class, function (Form $form) {\n\n $form->display('id', 'ID');\n $form->radio('place','广告类型')->options(['wx'=>'微信公众号二维码','wap_banner'=>'手机端首页轮播图','banner'=>'电脑端首页轮播图'])->default('banner');\n $form->text('sort','广告显示权重')->placeholder('显示权重越大,该广告越靠前显示');\n $form->image('src', '广告图片');\n $form->saving(function(Form $form){\n if(!$form->sort){\n $form->sort=0;\n }\n });\n });\n }", "function ga_formulario_instancia() {\n // ID del metabox\n $metabox_id = 'ga_enviar_receta';\n \n // No aplica el object_id ya que se va a generar automaticamente al crearlo.\n $object_id = 'fake-object-id';\n \n return cmb2_get_metabox($metabox_id, $object_id);\n}", "protected function form()\n {\n $form = new Form(new Banner);\n\n $form->text('title', 'Title');\n $form->image('image', 'Image')->rules('required')->move('images/banners');\n $form->switch('status', 'Published')->default(1);\n\n $form->footer(function ($footer) {\n // disable `View` checkbox\n $footer->disableViewCheck();\n\n // disable `Continue editing` checkbox\n $footer->disableEditingCheck();\n\n // disable `Continue Creating` checkbox\n $footer->disableCreatingCheck();\n\n });\n return $form;\n }", "public function form( $instance ){\n }", "protected abstract function _getBackend();", "public function _loadRealInstance() {}", "protected function form()\n {\n // 创建一个表单\n return Admin::form(Banner::class, function (Form $form) {\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`删除`按钮\n $tools->disableDelete();\n // 去掉`查看`按钮\n $tools->disableView();\n });\n\n $form->text('title', 'banner名称')->rules('required');\n $form->text('link', 'PC 端链接')->rules('required');\n $form->text('mini_link', '小程序链接');\n\n $form->image('image', 'banner图片')->rules('required');\n $form->image('app_image', '移动端banner图片');\n\n $form->text('sort', '排序(数字越小越靠前)')->default(0);\n });\n }", "abstract public function getForm($formId);", "public function get()\n {\n $object = $this->_object;\n $this->_object = $this->_form;\n return $object;\n }", "public function transactionGetForm ();", "abstract protected function getFormType(): string;", "public function getObject() {\n return $this->form->getObject();\n }", "public function loadTheInstance();", "public function model()\n {\n return Farmer_c::class;\n }", "public function driver_bus(){\n return $this->hasOne('App\\Models\\Bus','assistant_1');\n }", "static function _getLibrary() {\n\t\treturn self::webiny()->getConfig()->get('bridges.image', self::$_library);\n\t}", "public function get_instance() {\r\n\t\treturn $this->obj;\r\n\t}", "function form( $instance ) {\r\n\t}", "function form( $instance ) {\r\n\t}", "function dennis_client_field_exclude_client_branding_instance($bundle, $entity_type) {\n return array(\n 'bundle' => $bundle,\n 'default_value' => array(\n 0 => array(\n 'value' => 0,\n ),\n ),\n 'deleted' => '0',\n 'description' => '',\n 'display' => array(\n 'default' => array(\n 'label' => 'above',\n 'settings' => array(),\n 'type' => 'hidden',\n 'weight' => 0,\n ),\n ),\n 'entity_type' => $entity_type,\n 'field_name' => 'field_exclude_client_branding',\n 'label' => 'Exclude client branding on this ' . str_replace('_', ' ', $entity_type),\n 'required' => 0,\n 'settings' => array(\n 'user_register_form' => FALSE,\n ),\n 'widget' => array(\n 'active' => 1,\n 'module' => 'options',\n 'settings' => array(\n 'display_label' => 1,\n ),\n 'type' => 'options_onoff',\n 'weight' => '2.8',\n ),\n );\n}", "public function newAction()\n {\n\n $request=$this->getRequest();\n\n $tipo = $request->get('tipo'); // tipo de contratacion = 1- nombramiento, 2-contrato\n $tipocontratacion = $request->get('tipocontratacion'); // quien se contrata = 1- aspirante, 2- empleado\n $idexp = $request->get('idexp');\n\n $var = $request->get('tipogrid');\n if(isset($var)){$tipogrid=$var;}else{$tipogrid=0;}\n\n $entity = new RefrendaAct();\n $form = $this->createForm(new RefrendaActType(), $entity);\n\n //Camino de migas\n if ($tipogrid == 2){\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem(\"Inicio\", $this->get(\"router\")->generate(\"hello_page\"));\n $breadcrumbs->addItem(\"Expediente\", $this->get(\"router\")->generate(\"pantalla_modulo\",array('id'=>1)));\n $breadcrumbs->addItem(\"Empleado activo\", $this->get(\"router\")->generate(\"pantalla_empleadoactivo\"));\n $breadcrumbs->addItem(\"Nuevo puesto\", $this->get(\"router\")->generate(\"refrendaact\"));\n }\n else{\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem(\"Inicio\", $this->get(\"router\")->generate(\"hello_page\"));\n $breadcrumbs->addItem(\"Expediente\", $this->get(\"router\")->generate(\"pantalla_modulo\",array('id'=>1)));\n if ($tipocontratacion == 1) {//aspirante\n $breadcrumbs->addItem(\"Aspirante\", $this->get(\"router\")->generate(\"pantalla_aspirante\"));\n $breadcrumbs->addItem(\"Registrar aspirante como empleado\", $this->get(\"router\")->generate(\"contratacion\"));\n }\n else { //empleado \n $breadcrumbs->addItem(\"Empleado activo\", $this->get(\"router\")->generate(\"pantalla_empleadoactivo\"));\n $breadcrumbs->addItem(\"Registrar contratación\", $this->get(\"router\")->generate(\"contratacion_empleado\"));\n }\n if ($tipo == 1){ //Ley de salarios\n $breadcrumbs->addItem(\"Registrar nombramiento\", $this->get(\"router\")->generate(\"contratacion_tipo\",array('tipo'=>$tipo,'tipogrid'=>$tipocontratacion,'idexp'=>$idexp)));\n $breadcrumbs->addItem(\"Nuevo puesto\", $this->get(\"router\")->generate(\"contratacion_new\"));\n }\n else if ($tipo == 2){ //Contrato\n $breadcrumbs->addItem(\"Registrar contrato\", $this->get(\"router\")->generate(\"contratacion_tipo\",array('tipo'=>$tipo,'tipogrid'=>$tipocontratacion,'idexp'=>$idexp)));\n $breadcrumbs->addItem(\"Nuevo puesto\", $this->get(\"router\")->generate(\"contratacion_new\"));\n }\n }\n return $this->render('ExpedienteBundle:RefrendaAct:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'tipo' => $tipo,\n 'tipocontratacion' => $tipocontratacion,\n 'idexp' => $idexp,\n 'tipogrid' => $tipogrid\n ));\n }", "static function add_bod_form(): void {\r\n\t\tself::add_acf_inner_field(self::bods, self::bod_form, [\r\n\t\t\t'label' => 'Nomination form',\r\n\t\t\t'type' => 'file',\r\n\t\t\t'instructions' => 'Upload the nomination form as a pdf.',\r\n\t\t\t'required' => 1,\r\n\t\t\t'conditional_logic' => [\r\n\t\t\t\t[\r\n\t\t\t\t\t[\r\n\t\t\t\t\t\t'field' => self::qualify_field(self::bod_finished),\r\n\t\t\t\t\t\t'operator' => '!=',\r\n\t\t\t\t\t\t'value' => '1',\r\n\t\t\t\t\t],\r\n\t\t\t\t],\r\n\t\t\t],\r\n\t\t\t'wrapper' => [\r\n\t\t\t\t'width' => '',\r\n\t\t\t\t'class' => '',\r\n\t\t\t\t'id' => '',\r\n\t\t\t],\r\n\t\t\t'return_format' => 'id',\r\n\t\t\t'library' => 'all',\r\n\t\t\t'min_size' => '',\r\n\t\t\t'max_size' => '',\r\n\t\t\t'mime_types' => '.pdf',\r\n\t\t]);\r\n\t}" ]
[ "0.6226911", "0.6221184", "0.60709274", "0.5868567", "0.5578884", "0.5485785", "0.5461808", "0.5460027", "0.5388528", "0.53154093", "0.52404904", "0.5183814", "0.5161728", "0.5161465", "0.5150575", "0.5140566", "0.5127729", "0.509111", "0.50733495", "0.5071981", "0.50525117", "0.50525117", "0.5032811", "0.5029093", "0.4979572", "0.4979572", "0.49746278", "0.49717042", "0.49485838", "0.49383625", "0.49383625", "0.49236372", "0.49199477", "0.4872483", "0.48722467", "0.4851354", "0.48430336", "0.4827458", "0.48206246", "0.4781119", "0.47424906", "0.47397995", "0.473961", "0.4717821", "0.4713776", "0.47125188", "0.47108066", "0.47040373", "0.46941572", "0.46935362", "0.46621475", "0.46611437", "0.46608388", "0.46508333", "0.4638074", "0.46267897", "0.46246544", "0.4617689", "0.46164748", "0.46090156", "0.4606629", "0.46054688", "0.45945072", "0.45879763", "0.4584929", "0.45809963", "0.45809963", "0.4577518", "0.45759562", "0.45738047", "0.45734861", "0.4572376", "0.45707172", "0.45693892", "0.4568539", "0.4568539", "0.45654956", "0.4564933", "0.45576367", "0.45565474", "0.45558792", "0.45539752", "0.4552691", "0.4544209", "0.45420817", "0.4540773", "0.45395583", "0.45353672", "0.45273414", "0.45261344", "0.45220166", "0.45212805", "0.45212427", "0.45202106", "0.45188075", "0.4515064", "0.4515064", "0.45121446", "0.45116523", "0.4508809" ]
0.7022916
0
Get DB bridge instance for ADT
Получить экземпляр моста БД для ADT
public function getDBBridgeForInstance(ilADT $a_adt) { $class = $this->initTypeClass($a_adt->getType(), "DBBridge"); return new $class($a_adt); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getActiveRecordBridgeForInstance(ilADT $a_adt)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_adt->getType(), \"ActiveRecordBridge\");\t\t\r\n\t\treturn new $class($a_adt);\r\n\t}", "private function getDBA() {\n\t\tif ( $this->dba != null ) {\n\t\t\treturn $this->dba;\n\t\t}\n\t\tswitch ( $this->backend ) {\n\t\t\tcase 'mysql' :\n\t\t\t\t$this->dba = ORM::for_table($this->table);\n\t\t\tbreak;\n\t\t\tcase 'mongodb' :\n\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\tthrow new Exception(\"Invalid backend data store specified.\");\n\t\t\tbreak;\n\t\t}\n\t\treturn $this->dba;\n\t}", "public static function get($db_type='')\n {\n if ($db_type == \"master\")\n {\n static $mdb = null;\n if ( $mdb == null )\n $mdb = new DBConnection($db_type);\n return $mdb;\n }\n else\n {\n static $sdb = null;\n if ( $sdb == null )\n $sdb = new DBConnection($db_type);\n return $sdb;\n }\n\n }", "public function dbInstance();", "public static function getInstance()\n {\n return Doctrine_Core::getTable('AdvertNetwork');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Alerte_bpi');\n }", "public function getDatabase(): DatabaseInterface;", "function establish_connection() {\n\t \t\tself::$db = Registry()->db = SqlFactory::factory(Config()->DSN);\n\t \t\tself::$has_update_blob = method_exists(self::$db, 'UpdateBlob');\n\t\t\treturn self::$db;\n\t\t}", "public function getInstance(): self\r\n {\r\n if (self::$DB_link === null) {\r\n self::$DB_link = new self();\r\n }\r\n return self::$DB_link;\r\n }", "public static function obtenerint(){\n if (self::$db === null){\n \tself::$db = new self();\n }\n return self::$db;\n }", "public static function conn()\n {\n return (static::inst())::$_db;\n }", "public static function get_dba($dba_id='default') {\n\t if (isset(self::$_dba_pool[$dba_id])) {\n return self::$_dba_pool[$dba_id];\n\t }\n\t \n $key = isset(Doggy_Config::$vars['app.dba.'.$dba_id])? 'app.dba.'.$dba_id: 'app.dba.default';\n $dsn = Doggy_Config::get($key);\n if (empty($dsn)) {\n throw new Doggy_Dba_Exception(\"factroy dba failed,unknown dba_id < $dba_id >\");\n }\n \n $driver = false !== ($i = strpos($dsn, ':')) ? substr($dsn, 0, $i) : $dsn;\n $class = Doggy_Util_Inflector::doggyClassify('Doggy_Dba_Adapter_'.$driver);\n if(!class_exists($class) ){\n throw new Doggy_Dba_Exception('factroy dba failed.<unknow database adpater:'.$driver);\n }\n return self::$_dba_pool[$dba_id] = new $class($dsn);\n\t}", "function &atkGetDb($conn='default', $reset=false, $mode=\"r\")\n{\n\tatkimport(\"atk.db.atkdb\");\n\t$db = &atkDb::getInstance($conn, $reset, $mode);\n\treturn $db;\n}", "public function getDb(int $key = 0) : ?DboInterface\n {\n return $this->getDbFactory()->getConnection($key);\n }", "public static function getDb()\n {\n return Yii::$app->get(\"ddb\");\n }", "public function getDb();", "public function getDbAdapter();", "protected function getDbal_ConnService()\n {\n return $this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this);\n }", "public function getDbalConnection();", "public function db () : Connection {\n return Manager::connection($this->connection());\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Assemblage');\n }", "function blightDB()\n{\n\tstatic $db;\n\tif (!isset($db))\n\t{\n\t\tif (false === ($db = gdo_db_instance('localhost', BLIGHT_USER, BLIGHT_PASS, BLIGHT_DB)))\n\t\t{\n\t\t\tdie('Cannot connect to db!');\n\t\t}\n\t\t$db->setVerbose(false);\n\t\t$db->setLogging(false);\n\t\t$db->setDieOnError(false);\n\t\t$db->setEMailOnError(false);\n\t}\n\treturn $db;\n}", "public static function getDBO() {\n\t\t/*\n\t\t * Check for the required DB configuration parameters\n\t\t */\n\t\tif(!defined('ETH_CONF_DB_HOST')) {\n\t\t\tthrow new Exception('ETH_CONF_DB_HOST configuration not set');\n\t\t}\n\t\tif(!defined('ETH_CONF_DB_USERNAME')) {\n\t\t\tthrow new Exception('ETH_CONF_DB_USERNAME configuration not set');\n\t\t}\n\t\tif(!defined('ETH_CONF_DB_PASSWORD')) {\n\t\t\tthrow new Exception('ETH_CONF_DB_PASSWORD configuration not set');\n\t\t}\n\t\tif(!defined('ETH_CONF_DB_DBNAME')) {\n\t\t\tthrow new Exception('ETH_CONF_DB_DBNAME configuration not set');\n\t\t}\n\n\t\t$db = new mysqli(ETH_CONF_DB_HOST, ETH_CONF_DB_USERNAME,\n\t\t\t\tETH_CONF_DB_PASSWORD, ETH_CONF_DB_DBNAME);\n\t\t\t\t\n\t\tif($db->connect_error){\n\t\t\tthrow new Exception(\n\t\t\t\t\tsprintf('DB Connect Error %d: %s',\n\t\t\t\t\t\t\t$db->connect_errno, $db->connect_error));\n\t\t}\n\n\t\tself::$db = $db;\n\t\treturn self::$db;\n\t}", "public function getDatabaseAdaper()\n {\n return $this->oDatabase;\n }", "public static function getInstance($type = 'base')\n\t{\n\t\tif (isset(self::$cache[$type])) {\n\t\t\treturn self::$cache[$type];\n\t\t}\n\t\t$db = new self(self::getConfig($type));\n\t\t$db->dbType = $type;\n\t\tself::$cache[$type] = $db;\n\t\treturn $db;\n\t}", "protected function getDb()\n\t{\n\t\treturn (new League)->getConnection();\n\t}", "public static function instance() {\n\t\t$classe = get_called_class();\n\t\t$table = str_replace(\"db_\", \"\", $classe);\n\t\t$instance = db::instance(db::table($table));\n\t\treturn $instance;\n\t}", "private function get_bridge()\n\t{\n\t\treturn $this->m_bridge;\n\t}", "public static function getInstance()\r\n {\r\n return Doctrine_Core::getTable('UtoconsultAdvertisement');\r\n }", "public function getConnection() {\n\t\t$db = Config::get('librarydirectory::database.default');\n return static::resolveConnection($db);\n }", "public function get_db_instance() {\n\t\treturn ( ! empty( $this->db ) && $this->db->db_connect() ) ? $this->db : false;\n\t}", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Type_alerte_bpi');\n }", "public function getDBobject(){\r\n return $this->db;\r\n }", "protected function getBdd()\n {\n if (self::$_bdd == null) {\n self::setBdd();\n return self::$_bdd;\n }\n }", "public static function get_instance()\n {\n if (! is_null(self::$db)) {\n return self::$db;\n }\n self::$db = new DB();\n return self::$db;\n }", "public function connectorObj()\n {\n return $this->sdb;\n }", "public static function getInstance()\n {\n if(!isset(self::$_dbObjectInstance))\n {\n $className = get_class();\n self::$_dbObjectInstance = new $className;\n }\n\n return self::$_dbObjectInstance;\n }", "public function getDatabaseConnectorInstance() {\n return new DatabaseConnector($this->config['general']['db']);\n }", "public static function getInstance(){\r\n if (!(self::$instanciaBD instanceof self)){\r\n self::$instanciaBD=new self();\r\n }\r\n return self::$instanciaBD;\r\n }", "public static function get_model_dba() {\n $model_dba_id = Doggy_Config::get('app.model.dba');\n return self::get_dba(empty($model_dba_id)?'default':$model_dba_id);\n\t}", "public function db()\n {\n return $this->getConnection();\n }", "public static function getDb()\r\n\t{\r\n\t\t/* Author -ptr.nov- : HRD */\r\n\t\treturn \\Yii::$app->db2; \r\n\t}", "function get_gdb_resource()\n {\n\treturn DatabaseManager::getInstance();\n }", "static function getDbConnection() {\n\n if (empty(static::$db)) {\n $pdo = Service::get('pdo');\n static::$db = new \\PDO($pdo['dns'], $pdo['user'], $pdo['password']);\n }\n return static::$db;\n }", "function &getDBO() {\n\t\treturn $this->_app->getDBO();\n\t}", "public function getDatabase()\r\n {\r\n return $this->connector->getBusinessDatabase();\r\n }", "private function getDbConnection()\n {\n $config = $this->config;\n $connectionParams = array(\n 'path' => $this->appRoot . '/vpu.db',\n 'driver' => $config['config']['database']['driver']\n );\n return DriverManager::getConnection($connectionParams, new Configuration());\n }", "public static function getDb()\n {\n return Yii::$app->get('tarantool');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('GeneLink');\n }", "public static function getInstance() {\n return Doctrine_Core::getTable('adHotel');\n }", "protected function db()\n\t\t{\n\t\t\tif( !$this->_db ) {\n\t\t\t\t$this->_db = \\Kalibri::db()->getConnection( $this->connectName );\n\t\t\t}\n\n\t\t\treturn $this->_db;\n\t\t}", "public static function getInstancia() {\n\t\tif (empty(self::$instancia)) {\n\t\t\tself::$instancia = new BD();\n\t\t}\n\t\n\t\treturn self::$instancia;\n\t}", "static public function getDatabaseObject()\n {\n if (getenv(\"OPENSHIFT_MYSQL_DB_HOST\") === false) {\n $_host = \"localhost\";\n $_username = \"root\";\n $_password = \"mantis5c\";\n $_database = \"startbwtracker\";\n } else {\n $_host = getenv(\"OPENSHIFT_MYSQL_DB_HOST\");\n $_username = getenv(\"OPENSHIFT_MYSQL_DB_USERNAME\");\n $_password = getenv(\"OPENSHIFT_MYSQL_DB_PASSWORD\");\n $_database = \"startbwtracker\";\n }\n\n $db = new \\PDO(\n \"mysql:host=$_host;dbname=$_database;\", $_username, $_password\n );\n // set the PDO error mode to exception\n $db->setAttribute(\\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n\n return $db;\n }", "public function getDb()\n\t{\n\t\t$this->getPDO();\n\t\treturn $this->db;\n\t}", "public static function getInstance()\n {\n return Doctrine_Core::getTable('BetyoloSide');\n }", "public function getConnection(): \\codename\\core\\database\r\n {\r\n return $this->db;\r\n }", "public function getDbConnection()\n {\n $this->conn = Registry::get('db');\n }", "protected function getActiveRecordAdapter() {\n\t\treturn new WSAL_Adapters_MySQL_ActiveRecord( $this->connection );\n\t}", "static public function GetInstance()\n\t{\n\t\tif ( null == self::$m_dbconnection )\n\t\t{\n\t\t\tself::$m_dbconnection = NewADOConnection(self::$ado_db_type);\n\t\t\ttry\n\t\t\t{\n\t\t\t\tself::$m_dbconnection->Connect(self::$db_host,self::$db_user, self::$db_pwd, self::$db_name) ;\n\t\t\t}catch (Exception $e)\n\t\t\t{\n\t\t\t\tdie(\"Could Not Connect Database!\".$e->getMessage());\n\t\t\t}\n\t\t}\n\t\treturn self::$m_dbconnection;\n\t}", "public function getDatabaseHandle() {}", "function get_db( $db = null ) {\n\n\t\tif ( $db == null && !is_null($this->db) ) {\n\t\t\treturn $this->db;\n\t\t}\n\n\t\tif ( is_object( $db ) ) {\n\t\t\t$db = $db->name;\n\t\t}\n\t\t\n\t\t\n\t\tif ( !array_key_exists( $db, $this->dbs ) ) {\n\t\t\t$this->error( 'Invalid Database', 404 );\n\t\t}\n\n\t\treturn $this->dbs[$db];\n\n\t}", "public static function getInstance()\n {\n return Doctrine_Core::getTable('AppInfo');\n }", "public function getDb()\n {\n if ($this->db === null) {\n $this->db = \\Dit\\Database::instance();\n }\n return $this->db;\n }", "protected static function db(){\n\t\treturn DatabasePDO::getCurrentpdo();\n\t}", "public static function getConnection($dsn) {\n\t\tif (isset(self::$_instances[$dsn]))\n\t\t\treturn self::$_instances[$dsn];\n\t\t$driver = false !== ($i = strpos($dsn, ':')) ? substr($dsn, 0, $i) : $dsn;\n\t\t$class = Doggy_Util_Inflector::doggyClassify('Doggy_Dba_Adapter_'.$driver);\n\t\tif(!class_exists($class) ){\n\t\t throw new Doggy_Dba_Exception('Unknow database adpater:'.$driver);\n\t\t}\n\t\treturn self::$_instances[$dsn] = new $class($dsn);\n\t}", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Palabra');\n }", "public function getDb()\r\n {\r\n return $this->db;\r\n }", "public function getDb()\n {\n return $this->db;\n }", "public function getDb()\n {\n return $this->db;\n }", "public function getDb()\n {\n return $this->db;\n }", "function &getDatabase( $id )\n {\n $db =& SynkHelperSynchronizations::getDatabase( $id );\n return $db;\n }", "private function getDB() {\n if ($this->link === false) {\n $connection = $this->connect($this->config[\"host\"], $this->config[\"user\"], $this->config[\"pass\"], $this->config[\"name\"], $this->config[\"port\"]);\n if ($this->isMysqli($connection) AND $connection->errno === 0) {\n $connection->query(\"SET CHARACTER SET \" . $this->config[\"charset\"] . \";\");\n $this->link = $connection;\n }\n }\n\n return $this->link;\n }", "public function updraftplus_get_database_handle() {\n\t\treturn $this->dbh;\n\t}", "function get_pdo_object() {\n return $this->db;\n }", "protected function getAdapter()\n {\n return $this->getConnection()->getConnection();\n }", "protected function getAdapter()\n {\n return $this->getConnection()->getConnection();\n }", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}", "protected function getDatabaseConnection() {}" ]
[ "0.7011467", "0.66538334", "0.6570967", "0.6403578", "0.63902646", "0.6369858", "0.6368706", "0.62863606", "0.625861", "0.62197703", "0.61985743", "0.619759", "0.61788714", "0.61603236", "0.61416847", "0.61349", "0.6133471", "0.61327225", "0.61229753", "0.6114849", "0.6108568", "0.60917103", "0.60905254", "0.60904616", "0.6080808", "0.6074531", "0.60634756", "0.6057663", "0.60540384", "0.6051446", "0.60248166", "0.6019597", "0.6018821", "0.6018039", "0.60091084", "0.59904015", "0.5984391", "0.59733534", "0.5970268", "0.5966952", "0.5961582", "0.5943809", "0.59401387", "0.5918929", "0.59120905", "0.59074867", "0.59053487", "0.59021807", "0.58936334", "0.5893216", "0.5888626", "0.5887793", "0.5887243", "0.5882667", "0.5879395", "0.5878542", "0.5873057", "0.5871792", "0.58683765", "0.58530927", "0.58520895", "0.58516", "0.5842379", "0.58411485", "0.5826347", "0.5818976", "0.5813236", "0.58068", "0.58068", "0.58068", "0.5803966", "0.58000475", "0.57990634", "0.5798966", "0.57949567", "0.57949567", "0.5794387", "0.5794387", "0.5794387", "0.5793767", "0.5793767", "0.5793767", "0.5793767", "0.5793767", "0.5793767", "0.5793767", "0.5793767", "0.5793767", "0.5793767", "0.5793767", "0.5793767", "0.5793767", "0.5793767", "0.5793767", "0.5793767", "0.5793767", "0.5793767", "0.5793767", "0.5793296", "0.5793296" ]
0.79595876
0
Get presentation bridge instance for ADT
Получить экземпляр представления моста для ADT
public function getPresentationBridgeForInstance(ilADT $a_adt) { $class = $this->initTypeClass($a_adt->getType(), "PresentationBridge"); return new $class($a_adt); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getActiveRecordBridgeForInstance(ilADT $a_adt)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_adt->getType(), \"ActiveRecordBridge\");\t\t\r\n\t\treturn new $class($a_adt);\r\n\t}", "public function getDBBridgeForInstance(ilADT $a_adt)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_adt->getType(), \"DBBridge\");\t\t\r\n\t\treturn new $class($a_adt);\t\r\n\t}", "public function getPresentation();", "protected function _getBridge() {}", "private function get_bridge()\n\t{\n\t\treturn $this->m_bridge;\n\t}", "public function getFormBridgeForInstance(ilADT $a_adt)\r\n\t{\t\t\r\n\t\t$class = $this->initTypeClass($a_adt->getType(), \"FormBridge\");\t\t\r\n\t\treturn new $class($a_adt);\r\n\t}", "public function bridge()\n {\n return new Bridge($this->talker);\n }", "function getBridgeModel() {\n return $this->bridgeModel;\n }", "abstract public function get_instance();", "function getBridgeDhcp() {\n return $this->bridgeDhcp;\n }", "public function makeBridge()\n {\n //Return the bridge\n return app('PersonalityInsightsBridge', ['credentialsName' => $this->getCredentialsName()])->appendHeaders($this->getHeaders());\n }", "public function get_active_instance() {\n\n\n }", "public function getViewInterface(): ViewInterface\n \n {\n// on cherche l'équivalant de ça mais en mode bonne pratique\n \n \n// reflective class\n return (new \\ReflectionClass(PackageView:: class))\n ->newInstanceArgs([]);\n\n }", "public function blueprint()\n {\n return $this->belongsTo('App\\Models\\Blueprint');\n }", "public function activo()\n\t{\n\t\treturn $this->morphOne(\n\t\t\tActivo::class,\n\t\t\t'Activo'\n\t\t);\n\t}", "public function getDisplay();", "public function createDiagramInstance();", "public function obtainable()\n {\n return $this->morphTo();\n }", "public function getOrientClass();", "function &getRepresentative() {\n\t\treturn $this->_representative;\n\t}", "public function displayType(): object\n {\n return $this->displayType;\n }", "public function representer() {\n return $this->belongsTo('Rockit\\Models\\Representer');\n }", "public function present()\n {\n if (! isset($this->presenterInstance)) {\n $this->presenterInstance = (new ReflectionClass($this->presenter))\n ->newInstanceArgs([$this]);\n }\n\n return $this->presenterInstance;\n }", "public function get_active_instance() { \n\n\n\t}", "public function viewable(): MorphTo;", "public function get_display() {\n return $this->view->display_handler;\n }", "function getBridgeGateway() {\n return $this->bridgeGateway;\n }", "static public function getView() {\n\t\treturn self::$defaultInstance;\n\t}", "public function component()\n {\n return $this->morphTo();\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Assemblage');\n }", "public function linkable()\n {\n \treturn $this->morphTo();\n }", "function getBridgeName() {\n return $this->bridgeName;\n }", "public function attachable()\n {\n return $this->morphTo();\n }", "public function getInterface();", "function getDisplay() {\n return $this->display;\n }", "public function get_instance() {\r\n\t\treturn $this->obj;\r\n\t}", "public function getView()\n\t{\n\t\tif(NULL === $this->_view) {\n\t\t\t$this->_view = agoractu_view::getInstance();\n\t\t}\n\t\treturn $this->_view;\n\t}", "public function getInstance(): object;", "protected function _getAppearanceReference() {}", "public static function getInstance()\n {\n return Doctrine_Core::getTable('AdvertNetwork');\n }", "protected function _getAppearanceReference() {}", "protected function _getAppearanceReference() {}", "protected function _getAppearanceReference() {}", "abstract protected function getAdapter();", "abstract protected function getAdapter();", "public function getIndirectObject() {}", "public function getIndirectObject() {}", "public function getMorphClass();", "public function getMorphClass();", "public function getMorphClass();", "public function getDisplay() {\n\t\treturn parent::getDisplay();\n\t}", "protected function newConverterInstance()\n {\n if($this->__converter instanceof IBaseConverter)\n {\n return $this->__converter->newInstance();\n }\n return null;\n }", "public function entity()\n\t{\n\t\treturn $this->morphTo();\n\t}", "public function invoicable()\n {\n return $this->morphTo();\n }", "public function getAdapter();", "public function getAdapter();", "function getOGActor();", "function getOGActor();", "public static function getInstance()\r\n {\r\n return Doctrine_Core::getTable('UtoconsultAdvertisement');\r\n }", "public static function get() {\n if (!isset(Airplane::$airplane))\n Airplane::$airplane = new Airplane();\n return Airplane::$airplane;\n }", "public function toActivityObject();", "public function mediable()\n {\n return $this->morphTo();\n }", "public function getPresentationById($id)\n\t{\n\t\treturn $this->find((int) $id)->current();\n\t}", "function getDisplayManager()\n {\n return $this->displayManager;\n }", "public static function getInstance() {\n return Doctrine_Core::getTable('ReelVideoRecordingFormatType');\n }", "function _wp_oembed_get_object()\n {\n }", "public function getForWebserviceExport()\n {\n $el = parent::getForWebserviceExport();\n if ($this->data[\"internal\"]) {\n if (intval($this->data[\"internalId\"]) > 0) {\n if ($this->data[\"internalType\"] == \"document\") {\n $referencedDocument = Document::getById($this->data[\"internalId\"]);\n if (!$referencedDocument instanceof Document) {\n //detected broken link\n $document = Document::getById($this->getDocumentId());\n }\n } else if ($this->data[\"internalType\"] == \"asset\") {\n $referencedAsset = Asset::getById($this->data[\"internalId\"]);\n if (!$referencedAsset instanceof Asset) {\n //detected broken link\n $document = Document::getById($this->getDocumentId());\n }\n }\n }\n }\n\n $el->data = $this->data;\n return $el;\n }", "public function addressable()\n {\n return $this->morphTo();\n }", "public function addressable()\n {\n return $this->morphTo();\n }", "public function getTemplateBridge()\n {\n return $this->templateBridge;\n }", "public function hybrid() {\n return new OctaHybrid();\n }", "public function item()\n {\n return $this->morphTo();\n }", "public function getSearchBridgeForDefinitionInstance(ilADTDefinition $a_adt_def, $a_range = true, $a_multi = true)\r\n\t{\r\n\t\tif($a_range)\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\t$class = $this->initTypeClass($a_adt_def->getType(), \"SearchBridgeRange\");\t\r\n\t\t\t\treturn new $class($a_adt_def);\t\r\n\t\t\t}\r\n\t\t\tcatch(Exception $e)\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// multi enum search (single) == enum search (multi)\t\t\r\n\t\tif(!$a_multi &&\r\n\t\t\t$a_adt_def->getType() == \"MultiEnum\")\r\n\t\t{\r\n\t\t\t$class = $this->initTypeClass(\"Enum\", \"SearchBridgeMulti\");\t\r\n\t\t\treturn new $class($a_adt_def);\t\r\n\t\t}\t\r\n\t\t\r\n\t\tif($a_multi)\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t$class = $this->initTypeClass($a_adt_def->getType(), \"SearchBridgeMulti\");\t\r\n\t\t\t\treturn new $class($a_adt_def);\t\r\n\t\t\t}\r\n\t\t\tcatch(Exception $e)\r\n\t\t\t{\r\n\r\n\t\t\t}\r\n\t\t}\t\t\t\r\n\t\t$class = $this->initTypeClass($a_adt_def->getType(), \"SearchBridgeSingle\");\t\r\n\t\treturn new $class($a_adt_def);\t\t\t\t\t\r\n\t}", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Designaciones');\n }", "public function model(){\n return $this->morphTo();\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Alerte_bpi');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('PilotVideo');\n }", "public function ref()\n {\n return $this->morphTo();\n }", "public function format()\n {\n \treturn $this->belongsTo('App\\MatchFormat', 'format_id');\n }", "public function model()\r\n {\r\n return $this->morphTo();\r\n }", "public function presenter()\n {\n return null;\n }", "public function presenter()\n {\n\n return AudioPresenter::class;\n }", "public function getPersona()\n {\n return $this->hasOne(Personas::className(), ['id' => 'persona_id']);\n }", "public function imageable() {\n \treturn $this->morphTo();\n }", "public function model()\n {\n return $this->morphTo();\n }", "public function model()\n {\n return $this->morphTo();\n }", "public function getWidget();", "public function getAutoPresenter()\n {\n return $this->autoPresenter;\n }", "public function locatable()\n {\n return $this->morphTo();\n }", "public function entry()\n {\n return $this->morphTo('entry');\n }", "public function instance();", "public function getInstanceDetail()\n {\n return $this->get(self::_INSTANCE_DETAIL);\n }", "abstract protected function doGetAdapter();", "public abstract function getApiObjectClass();", "public function loadTheInstance();", "public function getDyna()\n {\n return $this->get(self::_DYNA);\n }", "public function getDyna()\n {\n return $this->get(self::_DYNA);\n }", "public function getDyna()\n {\n return $this->get(self::_DYNA);\n }", "public function getDyna()\n {\n return $this->get(self::_DYNA);\n }", "public function getDyna()\n {\n return $this->get(self::_DYNA);\n }" ]
[ "0.6440561", "0.6297715", "0.6102629", "0.6033755", "0.5811633", "0.57800436", "0.5729517", "0.56088495", "0.52797216", "0.5263347", "0.5245963", "0.51340455", "0.5122018", "0.51195294", "0.5107162", "0.51070225", "0.5100116", "0.50740755", "0.5073153", "0.5071852", "0.5071066", "0.5061156", "0.5055176", "0.5047071", "0.5019112", "0.50017077", "0.4986562", "0.49808192", "0.4969646", "0.4963779", "0.49611467", "0.49552613", "0.49462244", "0.49426705", "0.48946738", "0.48670596", "0.4850007", "0.48484045", "0.48364425", "0.4834937", "0.48345986", "0.48345986", "0.48345986", "0.48173845", "0.48173845", "0.48166397", "0.48166397", "0.47968173", "0.47968173", "0.47968173", "0.47816756", "0.4780536", "0.47781476", "0.47664294", "0.47657475", "0.47657475", "0.4757867", "0.4757867", "0.47570717", "0.4754624", "0.47333157", "0.47171256", "0.46976689", "0.46976376", "0.4694745", "0.46896836", "0.46890244", "0.46885476", "0.46885476", "0.46801916", "0.4674139", "0.46702063", "0.46611035", "0.4649719", "0.4637569", "0.4634832", "0.46331114", "0.46284944", "0.4623973", "0.4616641", "0.46116647", "0.45998183", "0.4598415", "0.45965436", "0.45945483", "0.45945483", "0.45938054", "0.45857918", "0.4585646", "0.4579866", "0.45743704", "0.45695555", "0.45686218", "0.45666066", "0.45658827", "0.45658708", "0.45658708", "0.45658708", "0.45658708", "0.45658708" ]
0.78331214
0
Init active record by type
Инициализация активного записи по типу
public static function initActiveRecordByType() { require_once "Services/ADT/classes/ActiveRecord/class.ilADTActiveRecordByType.php"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function __init(string $type = \"PDO\") {\n $this -> __createAdapter($type, static::$table);\n }", "public function __construct(){\n\n\t\t$this->types_model = new Types();\n\t}", "protected function initDatabaseRecord() {}", "private function init() {\r\n settype($this->id, \"int\");\r\n settype($this->name, \"string\");\r\n settype($this->max_players, \"int\");\r\n settype($this->is_over_yet, \"boolean\");\r\n settype($this->players, \"array\");\r\n }", "public function init(string $model_type): Repository;", "public function __construct($modelType, Storage $storage);", "private function init() {\n\t\tlist(, $this->db, $this->table) = explode('_', get_called_class(), 3);\n\t\t$this->db = defined('static::DB') ? static::DB : $this->db;\n\t\t$this->table = defined('static::TABLE') ? static::TABLE : $this->table;\n\t\t$this->pk = defined('static::PK') ? static::PK : 'id';\n\t}", "public function __construct($type = 'mysql')\n {\n $this->conn = \\DbConn::initConnection($type);\n }", "public function initialize()\n {\n $this->setSource('custom_fields_types');\n\n $this->hasMany(\n 'id',\n 'Canvas\\Models\\CustomFieldsTypesSettings',\n 'custom_fields_types_id',\n ['alias' => 'typesSetting']\n );\n }", "public function __construct($type)\n {\n }", "public function __construct($type_row = null)\n {\n if( !is_null($type_row)) {\n $this->id = $type_row instanceof Zend_Db_Table_Row ? $type_row->ID : $type_row['ID'];\n\t\t\t$this->name = $type_row instanceof Zend_Db_Table_Row ? $type_row->NAME : $type_row['NAME'];\n\t\t\t$this->is_show = $type_row instanceof Zend_Db_Table_Row ? $type_row->IS_SHOW : $type_row['IS_SHOW'];\n\t\t\t$this->is_difficult = $type_row instanceof Zend_Db_Table_Row ? $type_row->IS_DIFFICULT : $type_row['IS_DIFFICULT'];\n }\n \n }", "public function init()\r\n {\r\n $this->_helper->db->setDefaultModelName('Item');\r\n }", "function __construct($type='simple')\n {\n $this->type = $type;\n }", "function __construct($type) {\n\t$this->type = $type;\n\t}", "public function __construct()\n\t\t{\n\t\t\t$this->_db_table = new Application_Model_DbTable_TourType();\n\t\t}", "public function init()\n {\n\n // load the utility class name\n $utilityClassName = $this->getUtilityClassName();\n\n // initialize the prepared statements\n $this->eavEntityTypeStmt = $this->getConnection()->prepare($utilityClassName::EAV_ENTITY_TYPES);\n }", "public function init()\n {\n $this->_helper->db->setDefaultModelName('BatchUpload_MappingSet');\n }", "public function __construct($type) {\n $this->type = $type;\n }", "public function __construct($type)\n {\n $this->type=$type;\n }", "public function __construct($type)\n\t{\n\t\t$this->type = $type;\n\t\t$this->cache_time = Kohana::config($this->type.'.cache_time');\n\t}", "protected abstract function initializeEntityType(): string;", "public function __construct($type)\n {\n $this->type = $type;\n }", "public function __construct() {\n\n $this->tableName = \"re_event_type\";\n $this->setColumnsInfo(\"id\", \"int(11)\", 0);\n $this->setColumnsInfo(\"name\", \"varchar(250)\", \"\");\n $this->setColumnsInfo(\"id_space\", \"int(11)\", 0);\n $this->primaryKey = \"id\";\n }", "abstract protected function initializeMappedTypes();", "public static function initModel($modelType){\n $m=new $modelType();\n unset($m);\n }", "public function withType($type)\n {\n $this->_model['type'] = $type;\n return $this;\n }", "public function init()\r\n {\r\n $this->_helper->db->setDefaultModelName('DefaultMetadataValue');\r\n }", "public function __construct($obj = null)\n {\n if( !is_null($obj) && $obj instanceof Zend_Db_Table_Row ) {\n $this->id = $obj->ID;\n $this->name = $obj->NAME;\n }\n \n if(is_array($obj)){\n //echo $obj['TOUR_TYPE_ID'];die;\n $this->id = $obj['ID'];\n if(isset($obj['name'])) $this->name = $obj['NAME'];\n }\n }", "function backup_migrate_crud_type_load($type) {\n $out = NULL;\n $types = backup_migrate_crud_types();\n if (!empty($types[$type])) {\n $info = $types[$type];\n if ($info['include']) {\n backup_migrate_include($info['include']);\n }\n $out = new $info['class'];\n }\n return $out;\n}", "public function __construct ($init)\n {\n if(is_string($init)) //this is suppose to be a table name\n {\n $init = $this->add_table($init);\n $this->base_table = $this->base_models[$init]->_table;\n }\n }", "public static function initialise() {\n \t// We can't modify it in place, else we'll break any logging done inside the SihnonFramework tree\n \t// or other subclass trees.\n \tstatic::$types = parent::$types;\n \t\n \t// Add the new data types for this subclass\n static::$types['job_id'] = 'int'; \n }", "function __construct($id='', $type='current'){\r\n\t\tGLOBAL $strLocal;\r\n\t\tGLOBAL $arrUsrData;\r\n\t\t\r\n\t\t$this->gridName = self::GridName;\t\t\r\n\t\t$this->gridClass = 'headcount_record';\t\t\r\n\t\t$this->register = self::Register;\r\n\t\t\r\n\t\tswitch($type){\r\n\t\t\tcase 'new':\r\n\t\t\t\t$this->table = 'tbl_new_employee';\r\n\t\t\t\t$this->prefix = 'nem';\r\n\t\t\tbreak;\r\n\t\t\tcase 'current':\r\n\t\t\tdefault:\r\n\t\t\t\t$this->table = 'tbl_current_employee';\r\n\t\t\t\t$this->prefix = 'cem';\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\t$this->type = $type;\r\n\t\t\r\n\t\tparent::__construct($id);\r\n\t\t\r\n\t}", "protected function init()\r\n {\r\n $this->table_name = 'libelles';\r\n $this->table_type = 'system';\r\n $this->table_gateway_alias = 'Sbm\\Db\\SysTableGateway\\Libelles';\r\n $this->id_name = array(\r\n 'nature',\r\n 'code'\r\n );\r\n }", "public static function getInstance($type = 'base')\n\t{\n\t\tif (isset(self::$cache[$type])) {\n\t\t\treturn self::$cache[$type];\n\t\t}\n\t\t$db = new self(self::getConfig($type));\n\t\t$db->dbType = $type;\n\t\tself::$cache[$type] = $db;\n\t\treturn $db;\n\t}", "public function __construct($table, $type = null)\n {\n $this->type = null;\n $this->table = $table;\n $this->on = array();\n $this->using = array();\n\n if (null !== $type) {\n $this->type = (string) $type;\n }\n\n $this->quoter = Quoter::instance();\n }", "public function __construct() {\n $this->db = new Database();\n // no need to set $accountType since\n // this is an abstract base class\n }", "protected static function init()\n\t{\n\t\tif( static::$table === null )\n\t\t{\n\t\t\t// set the table name by Model name\n\t\t\t// Ex: UserModel -> users\n\t\t\tstatic::$table = strtolower( preg_replace('/Model$/', '', get_called_class()) ) . \"s\";\n\t\t}\n\t}", "function __construct( $class )\n\t{\n\t\t$this->activeRecord = $class;\n\t}", "public function initialize()\n {\n $this->setSource('tblEntry');\n\n $this->hasOne('userId', '\\Soul\\Model\\User', 'userId', ['alias' => 'user']);\n $this->belongsTo('eventId', '\\Soul\\Model\\Event', 'eventId', ['alias' => 'event']);\n $this->hasOne('paymentId', '\\Soul\\Model\\Payment', 'paymentId', ['alias' => 'payment']);\n }", "private function initActiveRecord() {\n \n require_once (Quantum::QUANTUM_ROOT.'system/lib/activerecord/ActiveRecord.php');\n \n ActiveRecord\\Config::initialize(function($cfg)\n {\n $cfg->set_model_directory(Quantum::QUANTUM_ROOT.'system/models');\n $cfg->set_connections(array('development' => 'mysql://'.Quantum::DATABASE_USER.':'.Quantum::DATABASE_PASS.'@'.Quantum::DATABASE_HOST.'/'.Quantum::DATABASE_NAME.''));\n });\n \n \n }", "public function setType($type)\n {\n $this->model->_type = $type;\n return $this;\n }", "private static function init_active_record() {\n // $config = include(self::file('Config', 'database.php'));\n // $capsule->addConnection($config);\n // $capsule->bootEloquent();\n }", "public function init()\n {\n $this->yatimsModel = new Admin_Model_DbTable_GestYatims();\n $this->dateImpl = new Default_Model_DateImpl();\n }", "protected function init()\n {\n if (!isset($this['fields'])) {\n $model = $base = [];\n if (isset($this->options['base_model']) && $this->options['base_model']) {\n $base = static::getTableInfo($this->options['base_model']) ? : [];\n }\n if (isset($this->options['table_name']) && (!$base || $this->options['table_name'] != $base['table_name'])) {\n $model = $this->getTableInfo($this->options['table_name']) ? : [];\n }\n \n if ($model && $base) {\n $model['ext_table'] = $model['table_name'];\n $model['ext_fields'] = isset($model['master_fields']) ? $model['master_fields'] : array_keys($model['fields']);\n \n $model['master_table'] = $base['table_name'];\n $model['master_fields'] = isset($base['master_fields']) ? $base['master_fields'] : array_keys($base['fields']);\n }\n \n // merge\n $model = ArrayHelper::merge($base, $model);\n $this->setOption($model);\n }\n }", "private static function loadItems($type)\n {\n \tself::$_items[$type]=array();\n \t$models=self::model()->findAll();\n \tforeach($models as $model)\n \t\tself::$_items[$type][$model->id]=$model->name;\n }", "public function init() {\n foreach ($this->_hidden as $col => $name) {\n if ($col == \"transaction_type_id\") {\n parent::createHidden($col);\n }\n }\n\n // Generating fields \n // for Form_Iadmin_TransactionTypeAdd\n foreach ($this->_fields as $col => $name) {\n switch ($col) {\n case \"transaction_type_name\":\n parent::createText($col);\n break;\n case \"nature\":\n parent::createRadioWithoutMultioptions($col);\n break;\n case \"is_adjustment\":\n parent::createCheckbox1($col);\n break;\n default:\n break;\n }\n\n //Generating radio\n // for Form_Iadmin_TransactionTypeAdd\n if (in_array($col, array_keys($this->_radio))) {\n parent::createRadio($col, $this->_radio[$col]);\n }\n }\n }", "private static function instantiate($record) {\n $class_name = get_called_class();\n $object = new $class_name;\n foreach($record as $attribute=>$value) {\n if($object->has_attribute($attribute)) {\n $object->$attribute = $value;\n }\n }\n return $object;\n }", "public function create($type = '') {\n return (object) array(\n 'aid' => '',\n 'type' => $type,\n 'title' => '',\n );\n }", "public function initialize()\n {\n $this->hasMany('id', 'app\\common\\models\\base\\UserProfile', 'user_id', array('alias' => 'UserProfile'));\n $this->hasMany('id', 'app\\common\\models\\base\\UserRoles', 'user_id', array('alias' => 'UserRoles'));\n $this->belongsTo('type_id', 'app\\common\\models\\base\\UserType', 'id', array('alias' => 'UserType'));\n }", "public function __construct()\n {\n $this->typeRepo = new TypesRepository();\n }", "public function setType($type)\n{\n$this->type = $type;\n\nreturn $this;\n}", "public function __construct() {\n $this->Types;\n }", "private static function loadItems($type)\n\t{\n\t\tself::$_items[$type]=array();\n\t\t$models=self::model()->findAll();\n\t\tforeach($models as $model)\n\t\t\tself::$_items[$type][$model->id]=$model->productType->name;\n\t}", "public function make($type);", "function fromDB($value, $type) {\n\t\t//everything is nullable\n\t\tif($value === null) return null;\n\t\t\n\t\tswitch($type) {\n\t\t\tcase 'datetime': // ISO-8601\n\t\t\tcase 'date':\n\t\t\t\treturn new DateTime($value);\n\t\t\tcase 'integer':\n\t\t\t\treturn (int) $value;\n\t\t\tcase 'boolean':\n\t\t\t\treturn (bool) $value;\n\t\t}\n\t\treturn $value;\n\t}", "public function _init($entity_type)\n {\n return TRUE;\n }", "public static function getFromType($type, $params) {\n\t\t$class = implode('', array_map('ucfirst', explode('_', $type))).'DataSource';\n\t\tif(!class_exists($class)) return null;\n\t\t\n\t\treturn new $class($params);\n\t}", "abstract public function setDAO($type);", "public function __construct(){\n $this->db = new Base;\n }", "public function __construct($type = null, $newInfo = null)\n {\n $this->dbInfo = Config::DBInfo();\n $this->connect();\n if (! is_null($type)) {\n $this->type = $type;\n }\n }", "public function __construct() {\n parent::__construct();\n //setting attribute types.\n settype($this->id, \"integer\");\n settype($this->name, \"string\");\n settype($this->question_type_id, \"integer\");\n }", "function __construct()\n {\n if (empty($this->table)) {\n $this->table = get_called_class();\n }\n }", "public function init(BaseModule\\Record $record): void\n\t{\n\t\t$this->appId = $record->controller->app['id'];\n\t\t$this->record = $record->recordModel;\n\t}", "public function init()\r\n {\r\n $dbTable = new Application_Model_DbTable_Fournisseur();\r\n $this->mapper = new Application_Model_Mapper_Fournisseur($dbTable);\r\n }", "private function initializeMappedTypes()\n {\n $property = new \\ReflectionProperty('Fridge\\DBAL\\Platform\\AbstractPlatform', 'mappedTypes');\n $property->setAccessible(true);\n\n $property->setValue($this->platform, array('foo' => Type::INTEGER));\n }", "public function __construct($data, RecordType $recordType = null)\n {\n $this->data = $data;\n $this->recordType = $recordType;\n }", "function init(){\n\t\t/*\n\t\t * Redefine this object, call parent then use addField to specify which fields\n\t\t * you are going to use\n\t\t */\n\t\tparent::init();\n\t\t$this->table_name = get_class($this);\n\t}", "public function __construct($type, $data = null, $connectionName = 'default')\n {\n // Set connection name\n $this->connectionName = $connectionName;\n\n $this->query['type'] = $type;\n\n // Set the prefix\n $this->prefix = $this->connection()->prefix;\n\n // Figure out what to do with the\n // $data parameter.\n switch ($type) {\n case \"SELECT\":\n case \"SELECT DISTINCT\":\n $this->query['select'] = ($data) ? $data : array('*');\n break;\n\n case \"INSERT INTO\":\n $this->query['data'] = $data;\n break;\n\n case \"UPDATE\":\n $this->tableName($data);\n break;\n }\n }", "public function setType($type){ }", "public function initialize()\n {\n $this->setSchema(\"animedb\");\n $this->setSource(\"episodes\");\n $this->hasMany('id', 'Videos', 'episode_id', ['alias' => 'Videos']);\n $this->belongsTo('anime_id', '\\Anime', 'id', ['alias' => 'Anime', 'reusable' => true]);\n $this->allowEmptyStringValues(['title', 'description']);\n $this->skipAttributes(['date']);\n }", "abstract protected function initDataTypes();", "public function init()\n {\n \theader('content-type: text/html; charset=utf8');\n \tdefined('BASE_URL')\t|| define('BASE_URL', Zend_Controller_Front::getInstance()->getBaseUrl());\n \t\r\n \t$db=new Application_Model_DbTable_DbGlobal();\n \t$sql = \"SELECT u.user_type_id,u.user_type FROM `rms_acl_user_type` u where u.`status`=1\";\n \t$results = $db->getGlobalDb($sql);\n\t\tforeach ($results as $key => $r){\n\t\t\t$this->user_typelist[$r['user_type_id']] = $r['user_type']; \n\t\t}\t\t\n }", "public function setType($type)\r\n\t{\r\n\t\t// Check the type\r\n\t\t$type = strtolower($type);\r\n\t\tif(!in_array($type, $this->allowed_types))\r\n\t\t{\r\n\t\t\t$type = 'varchar'; // default to varchar\r\n\t\t}\r\n\t\t\r\n\t\t$name \t\t= 'tienda';\r\n\t\t$eav_suffix = 'eavvalues';\r\n\t\t$this->type = $type;\r\n\t\t\r\n\t\t// Set the correct suffix\r\n\t\t$this->set( '_suffix', $eav_suffix.$type );\r\n\t\t$tbl_name = \"#__{$name}_{$eav_suffix}{$type}\";\r\n\t\t$this->_tbl = $tbl_name;\r\n\t\t\r\n\t\t// Now set the properties!\r\n\t\t$this->setTableProperties();\r\n\t\t\r\n\t\t// Table Type defined: Activate the table\r\n\t\t$this->active = true;\r\n\t}", "public function __construct( string$type='' )\n\t{\n\t\t$this->type= $type;\n\t}", "public function init()\n {\n\t\t$this->user_model = new Application_Model_Users;\n\t\t$this->request_model = new Application_Model_Requests;\n\t\t$this->material_model = new Application_Model_Materials;\n\t\t$this->course_model = new Application_Model_Courses;\n\t\t$this->comment_model = new Application_Model_Comments;\n\t\t$this->category_model = new Application_Model_Categories;\n \t$this->assoc_rules_model = new Application_Model_Assocrules;\n }", "static function init($table = null){\n\t\tif(static::$object_inited){\n\t\t\treturn;\n\t\t}\n if(!static::$db){\n static::$db = DB::get();\n }\n\t\tif($table){\n\t\t\tstatic::$table = $table;\n\t\t}else{\n\t\t\t$class = get_called_class();\n\t\t\tstatic::$table = strtolower(preg_replace('/.+\\\\\\/si', '', $class).'s');\n\t\t}\n self::initFields();\n\t\tstatic::$object_inited = true;\n\t}", "function __construct()\n {\n $this->_table = \"products_locations_type\"; \n }", "public function initialize()\n {\n parent::initialize();\n\n // Create config strings\n $this->config = [\n 'models' => [\n 'Files' => __d('elabs', 'File'),\n 'Notes' => __d('elabs', 'Note'),\n 'Posts' => __d('elabs', 'Article'),\n 'Projects' => __d('elabs', 'Project'),\n 'Albums' => __d('elabs', 'Album'),\n ]\n ];\n\n // Load models\n foreach (array_keys($this->config['models']) as $model) {\n $this->$model = TableRegistry::get($model);\n }\n }", "public function __construct()\n {\n $this->primaryKey = 'ROOM_ID'; // The primary key for the model.\n $this->table = env('DB_ROOM'); // The table associated with the model.\n $this->casts = [ // The attributes that should be cast to native types.\n 'ROOM_MAP_DATA' => 'array'\n ];\n }", "function initiateType()\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n return $this->InitiateType;\n }", "public function setup_types()\n {\n }", "public function create($type)\n {\n //\n }", "public function setType($type) {}", "function __construct($TableName = 'item_type') {\r\n $this->idItem_Type = new DB_Field('idItem_Type', 0, new DbIntSanitizer(), TRUE, TRUE);\r\n $this->Category_Type = new DB_Field('Category_Type', 0, new DbIntSanitizer(), TRUE, TRUE);\r\n $this->Type_Description = new DB_Field('Type_Description', '', new DbStrSanitizer(100), TRUE, TRUE);\r\n $this->Order_Line_Type_Id = new DB_Field('Order_Line_Type_Id', 0, new DbIntSanitizer(), TRUE, TRUE);\r\n\r\n parent::__construct($TableName);\r\n }", "public function initialize()\n {\n parent::initialize();\n $this->setSchema(\"salesDB\");\n $this->setSource(\"questionnaire\");\n $this->hasMany('id', 'App\\Models\\Question', 'questionnaire_id', ['alias' => 'Question']);\n $this->belongsTo('itinerary_type_id', 'App\\Models\\ItineraryType', 'id', ['alias' => 'ItineraryType']);\n $this->belongsTo('client_id', 'App\\Models\\Client', 'id', ['alias' => 'Client']);\n $this->belongsTo('user_created', 'App\\Models\\User', 'id', ['alias' => 'UserCreated']);\n $this->belongsTo('user_updated', 'App\\Models\\User', 'id', ['alias' => 'UserUpdated']);\n $this->belongsTo('questionnaire_type_id', 'App\\Models\\QuestionnaireType', 'id', ['alias' => 'QuestionnaireType']);\n $this->belongsTo('sync_status_id', 'App\\Models\\SyncStatus', 'id', ['alias' => 'SyncStatus']);\n }", "public function __construct(){\n $this->db = new Base;\n }", "function ActiveRecord($table)\n\t\t{\n\t\t\tparent::Model();\n\t\t\t$this->record = $table;\n\t\t}", "public function setType(string $type): self;", "public function setType(string $type): self;", "public function __construct($type=null,$encoding=null){\n $this->handler = new RSALib();\n $this->mode($encoding);\n $this->key($type);\n }", "public function __construct($type, $id = null, $url = null);", "private static function instantiate($record) {\r\n $object = new self;\r\n\t\t\r\n\t// More dynamic, short-form approach:\r\n\tforeach($record as $attribute=>$value){\r\n if($object->has_attribute($attribute)) {\r\n\t $object->$attribute = $value;\r\n }\r\n\t}\r\n\r\n return $object;\r\n }", "private static function instantiate($record) {\r\n $object = new self;\r\n\t\t\r\n\t// More dynamic, short-form approach:\r\n\tforeach($record as $attribute=>$value){\r\n if($object->has_attribute($attribute)) {\r\n\t $object->$attribute = $value;\r\n }\r\n\t}\r\n\r\n return $object;\r\n }", "public static function createModel($type)\n {\n $className = 'app'.d_S.'models'.d_S.ucfirst($type).\"Model\";\n if($className!=NULL)\n {\n return new $className($type);\n }\n else\n {\n echo \"$className Not Found!\";\n }\n }", "public function __construct()\n {\n $this->table = 'tag';\n\t\t$this->model = $db = DB::table($this->table);\n }", "protected function initialize()\n {\n parent::initialize();\n\n $version = \\SQLite3::version();\n $version = $version['versionString'];\n\n $this->relationSupport = version_compare($version, '3.6.19') >= 0;\n\n $this->setSchemaDomainMapping(new Domain(PropelTypes::NUMERIC, 'DECIMAL'));\n $this->setSchemaDomainMapping(new Domain(PropelTypes::LONGVARCHAR, 'MEDIUMTEXT'));\n $this->setSchemaDomainMapping(new Domain(PropelTypes::DATE, 'DATETIME'));\n $this->setSchemaDomainMapping(new Domain(PropelTypes::BINARY, 'BLOB'));\n $this->setSchemaDomainMapping(new Domain(PropelTypes::VARBINARY, 'MEDIUMBLOB'));\n $this->setSchemaDomainMapping(new Domain(PropelTypes::LONGVARBINARY, 'LONGBLOB'));\n $this->setSchemaDomainMapping(new Domain(PropelTypes::BLOB, 'BLOB'));\n $this->setSchemaDomainMapping(new Domain(PropelTypes::CLOB, 'LONGTEXT'));\n $this->setSchemaDomainMapping(new Domain(PropelTypes::OBJECT, 'BLOB'));\n $this->setSchemaDomainMapping(new Domain(PropelTypes::PHP_ARRAY, 'MEDIUMTEXT'));\n $this->setSchemaDomainMapping(new Domain(PropelTypes::ENUM, 'TINYINT'));\n }", "private static function new_instance_records()\n\t{\n\t\t\n\t\t$ClassModel = get_called_class();\n\t\t$model = self::$configs[$ClassModel];\n\n\t\tif(!isset(self::$queryBuilder[$model]))\n\t\t{\n\t\t\tself::$queryBuilder[$model] = new FastReqQueryBuilder(\n\t\t\t\tself::$configs[$model][\"columns\"][\"structures\"],\n\t\t\t\tself::$configs[$model][\"columns\"][\"default_config\"],\n\t\t\t\t$model,\n\t\t\t\tself::$configs[$model][\"relations\"]\n\t\t\t);\n\t\t}\n\n\t\treturn new FastReqScope($model, self::$configs[$model]);\n\t}", "private static function instantiate($record) {\r\r\n $object = new self;\r\r\n\t\tforeach($record as $attribute=>$value){\r\r\n\t\t if($object->has_attribute($attribute)) {\r\r\n\t\t $object->$attribute = $value;\r\r\n\t\t }\r\r\n\t\t}\r\r\n\t\treturn $object;\r\r\n\t}", "public function __construct($table) {\n if(strcmp($table, \"user\") == 0){\n $this->_dbTable = new Application_Model_DbTable_User();\n }\n else{\n $this->_dbTable = new Application_Model_DbTable_Organization();\n }\n \n }", "public function init(){\n $s = $this->schema();\n\n $s->hasMany('roles')\n ->className('net\\mediaslave\\authentication\\app\\models\\Role', true)\n ->thru('net\\mediaslave\\authentication\\app\\models\\UserSettingThruRole', true);\n\n $s->hasMany('users')\n ->className('net\\mediaslave\\authentication\\app\\models\\User', true)\n ->thru('net\\mediaslave\\authentication\\app\\models\\UserSettingThruUser', true);\n\n\n }" ]
[ "0.71986485", "0.6576926", "0.6419527", "0.62899625", "0.62655044", "0.6261549", "0.62429035", "0.6198593", "0.6197844", "0.61652935", "0.6157843", "0.6111789", "0.6106766", "0.60818005", "0.6047299", "0.60472363", "0.6037188", "0.60242766", "0.6020157", "0.6000934", "0.59628344", "0.59450656", "0.59361017", "0.59320444", "0.5907737", "0.58808124", "0.5845206", "0.58125323", "0.57917625", "0.57735366", "0.57704896", "0.57587254", "0.5755641", "0.5751958", "0.5749399", "0.5727391", "0.5715907", "0.570978", "0.568241", "0.5680117", "0.5676399", "0.5674354", "0.5668402", "0.5652789", "0.5645329", "0.5626424", "0.5601548", "0.55984646", "0.55972564", "0.55886984", "0.55770785", "0.5572495", "0.55723816", "0.5571588", "0.55700594", "0.556459", "0.55596876", "0.5558488", "0.55538994", "0.5551761", "0.5550004", "0.5546455", "0.5543656", "0.55340546", "0.5526546", "0.5523024", "0.5522007", "0.55189556", "0.55189323", "0.55091584", "0.55077326", "0.5507236", "0.55017686", "0.550107", "0.5494773", "0.5493236", "0.5478488", "0.54712397", "0.5468053", "0.54670167", "0.54663527", "0.5451748", "0.54428107", "0.54426885", "0.54359305", "0.5433573", "0.54334027", "0.5431255", "0.5431255", "0.54170865", "0.54065907", "0.53901094", "0.53901094", "0.5384251", "0.53806597", "0.53792065", "0.5376455", "0.5370574", "0.53668976", "0.536478" ]
0.75186765
0
Test that pagination parameters are passed to the endpoint.
Тестирование передачи параметров пагинации на эндпоинт.
public function testGetWithPagination() { $expected_count = 2; $results_1 = self::$api->getAll([], 0, $expected_count); usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP); $this->assertCount($expected_count, $results_1); $expected_page = 1; $results_2 = self::$api->getAll([], $expected_page, 1); usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP); $this->assertCount(1, $results_2); $this->assertEquals($results_1[$expected_page]['client_id'], $results_2[0]['client_id']); $this->assertEquals($results_1[$expected_page]['audience'], $results_2[0]['audience']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testPagination()\n {\n\n // Set public page length to 2.\n set_option('per_page_public', 2);\n\n $item1 = $this->_item(true, 'Item 1');\n $item2 = $this->_item(true, 'Item 2');\n $item3 = $this->_item(true, 'Item 3');\n $item4 = $this->_item(true, 'Item 4');\n $item5 = $this->_item(true, 'Item 5');\n $item6 = $this->_item(true, 'Item 6');\n\n // --------------------------------------------------------------------\n\n // Page 1.\n $this->dispatch('solr-search');\n\n // Should just list items 1-2.\n $this->assertXpath('//a[@href=\"'.record_url($item1).'\"]');\n $this->assertXpath('//a[@href=\"'.record_url($item2).'\"]');\n $this->assertNotXpath('//a[@href=\"'.record_url($item3).'\"]');\n $this->assertNotXpath('//a[@href=\"'.record_url($item4).'\"]');\n $this->assertNotXpath('//a[@href=\"'.record_url($item5).'\"]');\n $this->assertNotXpath('//a[@href=\"'.record_url($item6).'\"]');\n\n // Should link to page 2.\n $next = public_url('solr-search?page=2');\n $this->assertXpath('//a[@href=\"'.$next.'\"]');\n\n $this->resetResponse();\n $this->resetRequest();\n\n // --------------------------------------------------------------------\n\n // Page 2.\n $_GET['page'] = '2';\n $this->dispatch('solr-search');\n\n // Should just list items 3-4.\n $this->assertNotXpath('//a[@href=\"'.record_url($item1).'\"]');\n $this->assertNotXpath('//a[@href=\"'.record_url($item2).'\"]');\n $this->assertXpath('//a[@href=\"'.record_url($item3).'\"]');\n $this->assertXpath('//a[@href=\"'.record_url($item4).'\"]');\n $this->assertNotXpath('//a[@href=\"'.record_url($item5).'\"]');\n $this->assertNotXpath('//a[@href=\"'.record_url($item6).'\"]');\n\n // Should link to page 3.\n $next = public_url('solr-search?page=3');\n $this->assertXpath('//a[@href=\"'.$next.'\"]');\n\n $this->resetResponse();\n $this->resetRequest();\n\n // --------------------------------------------------------------------\n\n // Page 3.\n $_GET['page'] = '3';\n $this->dispatch('solr-search');\n\n // Should just list items 5-6.\n $this->assertNotXpath('//a[@href=\"'.record_url($item1).'\"]');\n $this->assertNotXpath('//a[@href=\"'.record_url($item2).'\"]');\n $this->assertNotXpath('//a[@href=\"'.record_url($item3).'\"]');\n $this->assertNotXpath('//a[@href=\"'.record_url($item4).'\"]');\n $this->assertXpath('//a[@href=\"'.record_url($item5).'\"]');\n $this->assertXpath('//a[@href=\"'.record_url($item6).'\"]');\n\n // Should link back to page 2.\n $prev = public_url('solr-search?page=2');\n $this->assertXpath('//a[@href=\"'.$prev.'\"]');\n\n // --------------------------------------------------------------------\n\n }", "public function testGETProductsCollectionPaginated()\n {\n $this->assertEquals(\n 4,\n $this->crawler->filter('span:contains(\"Title\")')->count()\n );\n //in the last page have 2 product\n $crawler = $this->client->request('GET', '/?page=8');\n $this->assertEquals(\n 2,\n $crawler->filter('span:contains(\"Title\")')->count()\n );\n }", "public function testGetPositionsWithPagination()\n {\n $client = new Client(['base_uri' => 'http://localhost:8000/api/']);\n $token = $this->getAuthenticationToken();\n $headers = [\n 'Authorization' => 'Bearer ' . $token,\n 'Accept' => 'application/json'\n ];\n $params = [\n 'page' => 2\n ];\n $response = $client->request('GET', 'positions', [\n 'headers' => $headers,\n 'query' => $params\n ]);\n\n $this->assertEquals(200, $response->getStatusCode());\n $this->assertEquals(['application/json; charset=utf-8'], $response->getHeader('Content-Type'));\n $data = json_decode($response->getBody(), true);\n $this->assertEquals(30, count($data));\n\n }", "public function testWithPaginationLimitListPosts()\n {\n $response = $this->jsonUser('GET', '/api/users/posts?limit=8&page=2');\n $response->assertJson([\n 'current_page' => 2,\n 'per_page' => 8,\n 'from' => 9,\n 'to' => 16,\n 'last_page' => 3,\n 'total' => 21,\n ]);\n }", "public function testThatGetAllUsersWithPerPageIsFormattedProperly()\n {\n $api = new MockManagementApi( [\n new Response( 200, self::$headers ),\n new Response( 200, self::$headers ),\n ] );\n\n $api->call()->users()->getAll( [], [], null, null, 10 );\n\n $query = $api->getHistoryQuery();\n $this->assertContains( 'per_page=10', $query );\n\n $api->call()->users()->getAll( [], [], null, null, -10 );\n\n $query = $api->getHistoryQuery();\n $this->assertContains( 'per_page=10', $query );\n }", "public function testGetPagesAndCreatePaginator()\n {\n $i = 0;\n $pageFrom = 1;\n $perPage = 20;\n $totalItems = 400;\n\n $link = $this->createMock(HalLink::class);\n $link\n ->expects($this->once())\n ->method('get')\n ->willReturn($this->getPaginatedResource($i, $pageFrom, $perPage, $totalItems));\n\n $instance = new DomainResourceMock($link);\n\n $count = 0;\n $criterias = ['page' => $pageFrom, 'limit' => $perPage];\n foreach ($instance->getPages($criterias) as $collection) {\n $count++;\n $this->assertInstanceOf(PaginatedResourceCollection::class, $collection);\n }\n\n // NumberItem / ItemPerPage = NumberOfPages,\n // NumberOfPages - (PageToStartAt - 1) = AwaitedNumberOfPages (-1 because page 0 does no exists)\n $this->assertEquals(($totalItems / $perPage) - ($pageFrom - 1), $count);\n }", "public function testThatGetAllUsersWithPageIsFormattedProperly()\n {\n $api = new MockManagementApi( [\n new Response( 200, self::$headers ),\n new Response( 200, self::$headers ),\n ] );\n\n $api->call()->users()->getAll( [], [], null, 10 );\n\n $query = $api->getHistoryQuery();\n $this->assertContains( 'page=10', $query );\n\n $api->call()->users()->getAll( [], [], null, -10 );\n\n $query = $api->getHistoryQuery();\n $this->assertContains( 'page=10', $query );\n }", "public function testPage()\n {\n $index = new Index();\n $query = new Query($index);\n $this->assertSame($query, $query->page(10));\n $elasticQuery = $query->compileQuery()->toArray();\n $this->assertSame(225, $elasticQuery['from']);\n $this->assertSame(25, $elasticQuery['size']);\n\n $this->assertSame($query, $query->page(20, 50));\n $elasticQuery = $query->compileQuery()->toArray();\n $this->assertSame(950, $elasticQuery['from']);\n $this->assertSame(50, $elasticQuery['size']);\n\n $query->limit(15);\n $this->assertSame($query, $query->page(20));\n $elasticQuery = $query->compileQuery()->toArray();\n $this->assertSame(285, $elasticQuery['from']);\n $this->assertSame(15, $elasticQuery['size']);\n }", "public function testCompanyApiPagination()\n {\n $params = [\n 'page' => 2,\n 'limit' => 10,\n ];\n $this->call('GET', '/companies', $params);\n\n $this->seeStatusCode(200);\n $this->seeJsonContains([\n \"from\" => 11,\n \"current_page\" => 2,\n \"per_page\" => 10,\n ]);\n }", "public function test_searchByPage() {\n\n }", "public function testListPagination()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs(User::find(1))\n ->visit('admin/users')\n ->assertSee('Users Gestion')\n ->clickLink('3')\n ->assertSee('GreatRedactor');\n });\n }", "function getPagingParameters()\n {\n }", "abstract public function preparePagination();", "public function testSearchParams()\n {\n $guid = 'TestingGUID';\n $count = 105;\n $pageSize = 100;\n\n $apiResponse = APISuccessResponses::search($guid, $count, $pageSize);\n\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, $apiResponse, 15);\n\n $sw->search();\n $sw->search('testing123');\n $sw->search('', '2017-01-01');\n $sw->search('', '', '2017-01-02');\n $sw->search('', '2017-01-01', '2017-01-02');\n $sw->search('', '', '', 'Kyle');\n $sw->search('', '', '', '', 'Smith');\n $sw->search('', '', '', 'Kyle', 'Smith');\n $sw->search('', '', '', '', '', true);\n $sw->search('', '', '', '', '', false);\n $sw->search('', '', '', '', '', null);\n $sw->search('', '', '', '', '', null, true);\n $sw->search('', '', '', '', '', null, false);\n $sw->search('', '', '', '', '', null, true, 'testing');\n $sw->search('testing123', '', '', '', '', true);\n\n $this->checkGetRequests($container, [\n '/v4/search',\n '/v4/search?templateId=testing123',\n '/v4/search?fromDts=2017-01-01',\n '/v4/search?toDts=2017-01-02',\n '/v4/search?fromDts=2017-01-01&toDts=2017-01-02',\n '/v4/search?firstName=Kyle',\n '/v4/search?lastName=Smith',\n '/v4/search?firstName=Kyle&lastName=Smith',\n '/v4/search?verified=true',\n '/v4/search?verified=false',\n '/v4/search',\n '/v4/search',\n '/v4/search?sort=asc',\n '/v4/search?tag=testing',\n '/v4/search?templateId=testing123&verified=true'\n ]);\n }", "public function test_can_get_all_todos_paginated()\n {\n $this->withoutExceptionHandling();\n\n $response = $this->get('/api/todos');\n $response->assertJson($response->decodeResponseJson());\n $response->assertStatus(200);\n }", "public function testClientsPaginationAsVisitor() {\n\n $this->visit('/clients/get')\n ->seePageIs('/login');\n\n }", "public function testSearchParams() {\n $this->get('/api/VideoTags/search.json?tag_name=frontside');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?rider_id=1');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?sport_id=1');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?tag_id=1');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?trick-slug=frontside-360');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?order=invalidorder');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?order=begin_time');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?order=created');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?order=modified');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?order=best');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?video_tag_id=1');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?tag_slug=myslug');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?trick_slug=1');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?video_tag_ids=1,2,3');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?status=pending,invalidstatus');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?sport_name=snowboard');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?sport_name=snowboard&category_name=jib');\n $this->assertResponseOk();\n }", "function pagination(){}", "public function test119DisplayBookingListAfterClickOnEachLinkOfPagination()\n {\n $ssoData = $this->getSSOData();\n\n // current bookings\n $this->createBookings(20, date('Y-m-d'), 15);\n\n //$this->mockApi($data, 'empty_ok');\n\n $responseBefore = $this->ajax($this->getUrlByParams(['page' => 1, 'per_page' => 10]))->json();\n $responseAfter = $this->ajax($this->getUrlByParams(['page' => 2, 'per_page' => 10]))->json();\n\n $listBefore = $responseBefore['current_list'];\n $listAfter = $responseAfter['current_list'];\n\n $this->assertFalse($listBefore == $listAfter);\n }", "function results_are_paged()\n {\n }", "public function testItemsPerPage()\n {\n $feed = $this->eventFeed;\n\n // Assert that the feed's itemsPerPage is correct\n $this->assertTrue($feed->getItemsPerPage() instanceof Zend_Gdata_Extension_OpenSearchItemsPerPage);\n $this->verifyProperty2($feed, \"itemsPerPage\", \"text\", \"25\");\n }", "public function testIndexAssetPerPage()\n {\n // 1. Mock data\n $admin = $this->admin;\n // 2. Hit Api Endpoint\n $response = $this->actingAs($admin)->get(route('asset.index', ['perPage' => 50]));\n // 3. Verify and Assertion\n $response->assertStatus(Response::HTTP_OK);\n }", "public function testPaginationSimpleBeforeLastPage()\n {\n // init\n $oPagination = new \\Pagination();\n $oPagination->setUrl('http://www.st.ro');\n $oPagination->setPage(19);\n $oPagination->setPerPage(10);\n $oPagination->setItemsNo(200);\n \n //run the test\n $this->invokeMethod($oPagination, 'compute');\n \n // asserts\n $this->assertEquals(20, $oPagination->getMaxPage());\n $this->assertEquals(2, $oPagination->getPrevPages());\n $this->assertEquals(1, $oPagination->getNextPages());\n $this->assertTrue($oPagination->getFirstPage());\n $this->assertFalse($oPagination->getLastPage());\n }", "public function testFacebookPagesRequest()\n {\n $stream = $this->getStream('FacebookPages', '27469195051');\n $response = $stream->getResponse();\n\n $this->checkResponseIntegrity('FacebookPages', $response);\n\n $errors = $stream->getErrors();\n $this->assertTrue(empty($errors));\n }", "public function testPagination()\n {\n $this->browse(function (Browser $browser) {\n $page1_entry = $browser->text('table tr:nth-child(1) td:nth-child(1)');\n\n // move to page 2\n $browser->click('.pagination li:nth-child(3) a');\n\n // verify we are on page 2\n $browser->waitFor('.pagination li:nth-child(3) span');\n $browser->assertSeeIn('.pagination li:nth-child(3) span', '2');\n\n $page2_entry = $browser->text('table tr:nth-child(1) td:nth-child(1)');\n\n // verify content is different\n $this->assertNotEquals($page1_entry, $page2_entry);\n\n // move to page 3 using the next button instead of the page number link\n $browser->click('.pagination li:nth-child(8) a');\n\n // verify we are on page 3\n $browser->waitFor('.pagination li:nth-child(4) span');\n $browser->assertSeeIn('.pagination li:nth-child(4) span', '3');\n\n $page3_entry = $browser->text('table tr:nth-child(1) td:nth-child(1)');\n\n // verify content is different\n $this->assertNotEquals($page2_entry, $page3_entry);\n\n // move back one page using the back button\n $browser->click('.pagination li:nth-child(1) a');\n\n //verify the content is the same since our last visit to this page\n $page2back_entry = $browser->text('table tr:nth-child(1) td:nth-child(1)');\n $this->assertEquals($page2_entry, $page2back_entry);\n });\n }", "public function testPaginationWrongData()\n {\n // init\n $oPagination = new \\Pagination();\n $oPagination->setUrl('abc');\n $oPagination->setPage(20);\n $oPagination->setPerPage(10);\n $oPagination->setItemsNo(200);\n \n $this->assertFalse($this->invokeMethod($oPagination, 'compute'));\n \n // init\n $oPagination = new \\Pagination();\n $oPagination->setUrl('http://www.st.ro');\n $oPagination->setPage(-1);\n $oPagination->setPerPage(10);\n $oPagination->setItemsNo(200);\n \n $this->assertFalse($this->invokeMethod($oPagination, 'compute'));\n \n // init\n $oPagination = new \\Pagination();\n $oPagination->setUrl('http://www.st.ro');\n $oPagination->setPage(20);\n $oPagination->setPerPage(null);\n $oPagination->setItemsNo(200);\n \n $this->assertFalse($this->invokeMethod($oPagination, 'compute'));\n \n // init\n $oPagination = new \\Pagination();\n $oPagination->setUrl('http://www.st.ro');\n $oPagination->setPage(20);\n $oPagination->setPerPage(10);\n $oPagination->setItemsNo('abc');\n \n $this->assertFalse($this->invokeMethod($oPagination, 'compute'));\n }", "public function testGetGetParams()\n {\n $expected = array('document' => array('filesize' => 100),\n 'get_test1' => 'true', 'get_test2' => 'go mets');\n $this->assertEquals($expected, $this->_req->getGetParams());\n }", "public function testPaginationSimpleBeforeBeforeLastPage()\n {\n // init\n $oPagination = new \\Pagination();\n $oPagination->setUrl('http://www.st.ro');\n $oPagination->setPage(18);\n $oPagination->setPerPage(10);\n $oPagination->setItemsNo(200);\n \n //run the test\n $this->invokeMethod($oPagination, 'compute');\n \n // asserts\n $this->assertEquals(20, $oPagination->getMaxPage());\n $this->assertEquals(2, $oPagination->getPrevPages());\n $this->assertEquals(2, $oPagination->getNextPages());\n $this->assertTrue($oPagination->getFirstPage());\n $this->assertTrue($oPagination->getLastPage());\n }", "public function test118DisplayPaginationLinksWhenTotalRecordsHigherThan10()\n {\n $ssoData = $this->getSSOData();\n\n // current bookings\n $this->createBookings(11, date('Y-m-d'), 11);\n\n //$this->mockApi($data, 'empty_ok');\n\n $params = [\n 'page' => 1,\n 'per_page' => 10,\n ];\n $response = $this->ajax($this->getUrlByParams($params))->json();\n\n $this->assertTrue(is_array($response));\n $this->assertArrayHasKey('current_list', $response);\n\n $list = $response['current_list'];\n $totalRowsInList = substr_count($list, '<ul class=\"pagination\"');\n\n $this->assertEquals(1, $totalRowsInList);\n }", "public function testGetOrdersWithCorrectParams()\n {\n echo \"\\n ***** Valid test - param value (page=4 and limit=2) - should get 200 ***** \\n \";\n $params = '{\"origin\": [\"-33.865143\",\"151.209900\"], \"destination\": [\"-37.663712\",\"144.844788\"]}';\n $params = json_decode($params, true);\n $response = $this->json('POST', '/orders', $params);\n \n $params = '{\"origin\": [\"-33.865143\",\"151.209900\"], \"destination\": [\"-37.663712\",\"144.844788\"]}';\n $params = json_decode($params, true);\n $response = $this->json('POST', '/orders', $params);\n \n $params = 'page=1&limit=2';\n $response = $this->json('GET', '/orders?'.$params);\n $response_data = $response->getContent();\n $response->assertStatus(200);\n\n echo \"\\n ***** Valid test - Number or count of response should be less than 2 - should get 200 ***** \\n \";\n $this->assertLessThan(3, count($response_data));\n \n echo \"\\n ***** Valid test - Get Order - Response should contain id, distance and status keys only ***** \\n\";\n $response_data = json_decode($response_data);\n\n foreach ($response_data as $order) {\n $order = (array) $order;\n $this->assertArrayHasKey('id', $order);\n $this->assertArrayHasKey('distance', $order);\n $this->assertArrayHasKey('status', $order);\n }\n }", "public function testGetVesselStatusesWithPagination()\n {\n $client = new Client(['base_uri' => 'http://localhost:8000/api/']);\n $token = $this->getAuthenticationToken();\n $headers = [\n 'Authorization' => 'Bearer ' . $token,\n 'Accept' => 'application/json'\n ];\n $params = [\n 'page' => 1\n ];\n $response = $client->request('GET', 'vessel_statuses', [\n 'headers' => $headers,\n 'query' => $params\n ]);\n\n $this->assertEquals(200, $response->getStatusCode());\n $this->assertEquals(['application/json; charset=utf-8'], $response->getHeader('Content-Type'));\n $data = json_decode($response->getBody(), true);\n $this->assertEquals(7, count($data));\n\n }", "public function testThatGetAllUsersAdditionalParamsAreSent()\n {\n $api = new MockManagementApi( [ new Response( 200, self::$headers ) ] );\n\n $api->call()->users()->getAll( [ '__test_parameter__' => '__test_value__' ] );\n\n $query = $api->getHistoryQuery();\n $this->assertEquals( '__test_parameter__=__test_value__', $query );\n }", "public function paginate_payments_of_the_contract()\n {\n $this->assertEquals(\n self::$contract->payment_paginate(self::$contract, $paginate = 10),\n self::$contract->payment()->paginate($paginate)\n );\n }", "protected function buildPagination() {}", "protected function buildPagination() {}", "public function testGetPages() : void {\n $expected = 0;\n $this->assertEquals($expected, count($this->dataManager->getPages()));\n }", "function testPageQuery() {\n\t$config = getConfig();\n\t$root = getRootPath();\n\t\n\t$http = new \\AutoHttp\\Http($config);\n\t\n\t// Load the test page as a GET using a param array.\n\t$page = $http->getPage($root . '/test/pages/http/params.php', null, array('foo' => 'bar'));\n\t\t\n\t// Make sure the test page received our GET params.\n\tif (strpos($page['body'], '<li>GET foo=bar</li>') === false)\n\t\treturn 'Test page should list the GET parameters from our array.';\n\t\n\t// Load the test page as a GET using a param string.\n\t$page = $http->getPage($root .'/test/pages/http/params.php', null, 'hi=there');\n\t\t\n\t// Make sure the test page received our GET params.\n\tif (strpos($page['body'], '<li>GET hi=there</li>') === false)\n\t\treturn 'Test page should list the GET parameters from our string.';\n\t\n\t// Load the test page as a POST using a param array.\n\t$page = $http->getPage($root .'/test/pages/http/params.php', null, null, array('createUser' => '1'));\n\t\t\n\t// Make sure the test page received our POST params.\n\tif (strpos($page['body'], '<li>POST createUser=1</li>') === false)\n\t\treturn 'Test page should list the POST parameters from our array.';\n\t\n\t// Load the test page as a POST using a param string.\n\t$page = $http->getPage($root .'/test/pages/http/params.php', null, null, 'username=johndoe');\n\t\t\n\t// Make sure the test page received our POST params.\n\tif (strpos($page['body'], '<li>POST username=johndoe</li>') === false)\n\t\treturn 'Test page should list the POST parameters from our string.';\n\t\t\n\treturn true;\t\n}", "public function test_paginator_resolves_correct_page(): void\n {\n $page = 2;\n $perPage = 15;\n\n $expected = new Paginator(new Collection([\n new User(['id' => 1, 'name' => 'Robbie']),\n new User(['id' => 2, 'name' => 'Michael']),\n ]), $perPage, $page);\n\n $this->manager->paginator()->withName(User::class)\n ->remember(10, function () use ($expected): Paginator {\n return $expected;\n });\n\n $this->assertTrue($this->manager->paginator()->has($this->hash(\"paginator:users:$perPage:$page\")));\n\n Paginator::currentPageResolver(function () use ($page) {\n return $page;\n });\n\n $this->assertInstanceOf(Paginator::class, $this->manager->paginator(User::class)->get());\n }", "public function testListingWithFilters()\n {\n $filters[] = ['limit' => 30, 'page' => 30];\n $filters[] = ['listing_type' => 'public'];\n foreach ($filters as $k => $v) {\n $client = static::createClient();\n $client->request('GET', '/v2/story', $v, [], $this->headers);\n $this->assertStatusCode(200, $client);\n\n $response = json_decode($client->getResponse()->getContent(), true);\n $this->assertTrue(is_array($response));\n }\n }", "public function testPathPagination()\n {\n $this->makeData(self::NUMBER_RECORD_CREATE);\n $this->browse(function (Browser $browser) {\n $browser->loginAs($this->user)\n ->visit('/admin/qrcodes?page=' . ceil((self::NUMBER_RECORD_CREATE + 1) / (config('define.qrcodes.limit_rows'))));\n $elements = $browser->elements('#list-qrcodes tbody tr');\n $browser->assertPathIs('/admin/qrcodes')\n ->assertQueryStringHas('page', ceil((self::NUMBER_RECORD_CREATE + 1) / (config('define.qrcodes.limit_rows'))));\n });\n }", "public function testThatGetAllUsersDoesNotOverwritePerPageValue()\n {\n $api = new MockManagementApi( [ new Response( 200, self::$headers ) ] );\n\n $api->call()->users()->getAll( [ 'per_page' => 8 ], [], null, null, 9 );\n\n $query = $api->getHistoryQuery();\n $this->assertContains( 'per_page=8', $query );\n }", "public function test_list_stores_pagination()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs($this->user)\n ->visit(new ListStores());\n $number_page = count($browser->elements('.pagination li')) - 2;\n $this->assertEquals($number_page, ceil((self::NUMBER_RECORD) / (self::ROW_LIMIT)));\n });\n }", "public function get_in_progress_contracts_pagination_returns_in_progress_contracts_by_pagination()\n {\n $this->assertEquals(\n self::$contract->get_in_progress_contracts_pagination($paginate = 10),\n Contract::where('contract_status_id', 2)->paginate($paginate)\n );\n }", "public function getIdsShouldPaginate()\n {\n // Given\n $filter = array(\"sku\" => \"sku1\", \"test\" => \"test1\");\n $sortConfig = new SortConfig(\"under_value\", \"desc\");\n $response1 = array(\n \"meta\" => array(\n \"name\" => \"vendors\",\n \"display_name\" => \"vendors\",\n \"total\" => 150,\n \"count\" => 100,\n \"limit\" => VendorProvider::$PAGINATION_LIMIT,\n \"page\" => 0,\n \"start\" => 0,\n \"end\" => 0\n ),\n \"vendors\" => array(\n array(\"id\" => \"v1\"),\n array(\"id\" => \"v2\"),\n )\n );\n $response2 = array(\n \"meta\" => array(\n \"name\" => \"vendors\",\n \"display_name\" => \"vendors\",\n \"total\" => 150,\n \"count\" => 50,\n \"limit\" => VendorProvider::$PAGINATION_LIMIT,\n \"page\" => 1,\n \"start\" => 0,\n \"end\" => 1\n ),\n \"vendors\" => array(\n array(\"id\" => \"po3\"),\n array(\"id\" => \"po4\"),\n )\n );\n $expectedUrl1 = \"vendors?fields=id&sku=sku1&test=test1&under_value_sort=desc&limit=\".VendorProvider::$PAGINATION_LIMIT.\"&page=0\";\n $expectedUrl2 = \"vendors?fields=id&sku=sku1&test=test1&under_value_sort=desc&limit=\".VendorProvider::$PAGINATION_LIMIT.\"&page=1\";\n $this->_mockApi->expects($this->exactly(2))\n ->method('getResource')\n ->will(\n $this->returnValueMap(\n array(\n array($expectedUrl1, $response1),\n array($expectedUrl2, $response2),\n )\n )\n );\n\n // When\n $result = $this->_vendorProvider->getIds($filter, $sortConfig);\n\n // Then\n $this->assertEquals($result, array(\"v1\", \"v2\", \"po3\", \"po4\"));\n }", "public function paginate_participants_of_the_contract()\n {\n $this->assertEquals(\n self::$contract->participant_paginate(self::$contract, $paginate = 10),\n self::$contract->participant()->paginate($paginate)\n );\n }", "public function testPathPagination()\n { \n $this->makeData(12);\n $this->browse(function (Browser $browser) {\n $browser->visit('/admin/comment?page=2');\n $elements = $browser->elements('#list-table tbody tr');\n $this->assertCount(2, $elements);\n $browser->assertPathIs('/admin/comment');\n $browser->assertQueryStringHas('page', 2);\n });\n }", "public function testCreatePaginatedList(): void\n {\n // given\n $page = 1;\n $dataSetSize = 3;\n $expectedResultSize = 3;\n\n $counter = 0;\n while ($counter < $dataSetSize) {\n $category = new Category();\n $category->setName('Test Category #'.$counter);\n $this->categoryService->save($category);\n\n ++$counter;\n }\n\n // when\n $result = $this->categoryService->createPaginatedList($page);\n\n // then\n $this->assertEquals($expectedResultSize, $result->count());\n }", "public function testFirstPageOnEdge() {\n\t\tAssert::same(\n\t\t\t'|first|1||last|1||prev|1||next|1|',\n\t\t\t(new UI\\AttainablePagination(\n\t\t\t\t1,\n\t\t\t\t50,\n\t\t\t\t50\n\t\t\t))->print(new Output\\FakeFormat(''))->serialization()\n\t\t);\n\t}", "public function testThatGetAllUsersDoesNotOverwritePageValue()\n {\n $api = new MockManagementApi( [ new Response( 200, self::$headers ) ] );\n\n $api->call()->users()->getAll( [ 'page' => 11 ], [], null, 22 );\n\n $query = $api->getHistoryQuery();\n $this->assertContains( 'page=11', $query );\n }", "public function test_list_all_offices_paginated() {\n Office::factory(3)->create();\n\n $response = $this->get('/api/offices');\n\n $response->assertOk();\n\n // Assert the returned json data has 3 items - the ones we created above\n $response->assertJsonCount(3, 'data');\n\n // Assert atleast the ID of the first item is not null\n $this->assertNotNull($response->json('data')[0]['id']);\n\n // Assert there is meta for the paginated results. You can include links as well\n $this->assertNotNull($response->json('meta'));\n\n //dd($response->json());\n\n }", "public function testModSelectCountPages()\n {\n $this->todo('stub');\n }", "public function testSearchUsingGET()\n {\n\n }", "public function testPaginationSimpleLastPage()\n {\n // init\n $oPagination = new \\Pagination();\n $oPagination->setUrl('http://www.st.ro');\n $oPagination->setPage(20);\n $oPagination->setPerPage(10);\n $oPagination->setItemsNo(200);\n \n //run the test\n $this->invokeMethod($oPagination, 'compute');\n \n // asserts\n $this->assertEquals(20, $oPagination->getMaxPage());\n $this->assertEquals(2, $oPagination->getPrevPages());\n $this->assertEquals(0, $oPagination->getNextPages());\n $this->assertTrue($oPagination->getFirstPage());\n $this->assertFalse($oPagination->getLastPage());\n }", "public function testPageIndex()\n {\n $response = $this->actingAs(User::inRandomOrder()->first(), 'api')->json('GET', '/api/pages');\n $response\n ->assertStatus(200)\n ->assertJsonStructure([\n 'meta',\n 'links',\n 'data' => [\n '*' => [\n \"name\",\n \"id\",\n \"slug\",\n ],\n ],\n ]);\n }", "public function parseUrlUsingLimitEnabled()\n {\n $query = new ControllerQuery($this->enabledFilters, '/test');\n $url = $query->setLimit(39)\n ->build();\n\n $this->assertEquals(\n 'http://www.comicvine.com/api/test/?limit=39&offset=0',\n $url\n );\n }", "public function allowPaginate()\n {\n $this->page = $this->dataProvider->getPaginationParams();\n }", "public function paginate()\n {\n }", "public function testIndex()\n {\n Item::factory()->count(20)->create();\n\n $this->call('GET', '/items')\n ->assertStatus(200)\n ->assertJsonStructure([\n 'data' => [\n '*' => [\n 'id',\n 'guid',\n 'name',\n 'email',\n 'created_dates',\n 'updated_dates',\n ]\n ]\n ])\n ->assertJsonPath('meta.current_page', 1);\n\n //test paginate\n $parameters = array(\n 'per_page' => 10,\n 'page' => 2,\n );\n\n $this->call('GET', '/items', $parameters)\n ->assertStatus(200)\n ->assertJsonStructure([\n 'data' => [\n '*' => [\n 'id',\n 'guid',\n 'name',\n 'email',\n 'created_dates',\n 'updated_dates',\n ]\n ]\n ])\n ->assertJsonPath('meta.current_page', $parameters['page'])\n ->assertJsonPath('meta.per_page', $parameters['per_page']);\n }", "public function testClientsPagination() {\n\n // Number of clients to generate\n $numberOfClients = 45;\n\n // Generate one user\n $user = factory(App\\User::class)->create();\n\n // Generate clients\n for ($i = 0; $i < $numberOfClients; $i++) {\n $user->clients()->save(factory(App\\Client::class)->make());\n }\n\n // Get expected results\n $pagination = \\App\\Client::where('user_id', $user->id)->orderby('created_at', 'desc')->paginate(10);\n\n $this->actingAs($user)\n ->get('/clients/get')\n ->seeJson([\n 'total' => $pagination->total(),\n 'per_page' => $pagination->perPage(),\n 'current_page' => $pagination->currentPage(),\n ]);\n\n }", "public function get_paginate(Request $request)\n {\n }", "public function testGetNewStoriesPaginatedFromTheFirstPage()\n {\n $response = $this->json('GET', $this->newStoriesEndpoint.'?page=1');\n\n // It should return a paginated json the same as the baseJsonStructure\n $response\n ->assertStatus(200)\n ->assertJsonStructure($this->baseJsonStructure)\n ->assertJsonFragment($this->baseJsonFragment);\n }", "public function canPaginate(): bool;", "public function testCreatePaginatedListEmptyList(): void\n {\n // given\n $page = 1;\n $expectedResultSize = 0;\n\n $user = $this->simpleUser();\n\n // when\n $result = $this->eventService->createPaginatedList($page, $user);\n\n // then\n $this->assertEquals($expectedResultSize, $result->count());\n }", "public function getPerPage();", "public function youCanUseAPaginatorAsData()\n {\n // Arrange...\n $fruit = $this->createTestModel()->newQuery()->paginate( 1 );\n\n // Act...\n $response = $this->responder->success( $fruit );\n\n // Assert...\n $this->assertEquals( $response->getData( true ), [\n 'status' => 200,\n 'success' => true,\n 'data' => [\n [\n 'name' => 'Mango',\n 'price' => 10,\n 'isRotten' => false\n ]\n ],\n 'pagination' => [\n 'total' => 1,\n 'count' => 1,\n 'perPage' => 1,\n 'currentPage' => 1,\n 'totalPages' => 1\n ]\n ] );\n }", "public function testClientsPaginationFromThirdPageAsVisitor() {\n\n $page = 3;\n\n $this->visit('/clients/get?page=' . $page)\n ->seePageIs('/login');\n\n }", "public function is_paged()\n {\n }", "public function testSetAndGetParams()\n {\n $page = new Zym_Navigation_Page_Mvc(array(\n 'label' => 'foo',\n 'action' => 'index',\n 'controller' => 'index'\n ));\n \n $params = array('foo' => 'bar', 'baz' => 'bat');\n \n $page->setParams($params);\n $this->assertEquals($params, $page->getParams());\n \n $page->setParams();\n $this->assertEquals(array(), $page->getParams());\n \n $page->setParams($params);\n $this->assertEquals($params, $page->getParams());\n \n $page->setParams(array());\n $this->assertEquals(array(), $page->getParams());\n }", "public function paginate($limit, array $params = null);", "public function testPaginationAndESSorting()\n {\n $response = Article::search('*', [\n 'sort' => [\n 'title',\n ],\n ]);\n\n /*\n * Just so it's clear these are in the expected title order,\n */\n $this->assertEquals([\n 'Fast black dogs',\n 'Quick brown fox',\n 'Swift green frogs',\n ], $response->map(function ($a) {\n return $a->title;\n })->all());\n\n /* Response can be used as an array (of the results) */\n $response = $response->perPage(1)->page(2);\n\n $this->assertEquals(1, count($response));\n\n $this->assertInstanceOf(Result::class, $response[0]);\n\n $article = $response[0];\n $this->assertEquals('Quick brown fox', $article->title);\n\n $this->assertEquals('<ul class=\"pagination\">'.\n '<li><a href=\"/?page=1\" rel=\"prev\">&laquo;</a></li> '.\n '<li><a href=\"/?page=1\">1</a></li>'.\n '<li class=\"active\"><span>2</span></li>'.\n '<li><a href=\"/?page=3\">3</a></li> '.\n '<li><a href=\"/?page=3\" rel=\"next\">&raquo;</a></li>'.\n '</ul>', $response->render());\n\n $this->assertEquals(3, $response->total());\n $this->assertEquals(1, $response->perPage());\n $this->assertEquals(2, $response->currentPage());\n $this->assertEquals(3, $response->lastPage());\n }", "public function getPaginated();", "public function get_collection_params() {\n\t\t$params = array();\n\t\t$params['context'] = $this->get_context_param( array( 'default' => 'view' ) );\n\t\t$params['page'] = array(\n\t\t\t'description' => __( 'Current page of the collection.', 'woocommerce' ),\n\t\t\t'type' => 'integer',\n\t\t\t'default' => 1,\n\t\t\t'sanitize_callback' => 'absint',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t\t'minimum' => 1,\n\t\t);\n\t\t$params['per_page'] = array(\n\t\t\t'description' => __( 'Maximum number of items to be returned in result set.', 'woocommerce' ),\n\t\t\t'type' => 'integer',\n\t\t\t'default' => 10,\n\t\t\t'minimum' => 0,\n\t\t\t'maximum' => 100,\n\t\t\t'sanitize_callback' => 'absint',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\t\t$params['after'] = array(\n\t\t\t'description' => __( 'Limit response to resources published after a given ISO8601 compliant date.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'format' => 'date-time',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\t\t$params['before'] = array(\n\t\t\t'description' => __( 'Limit response to resources published before a given ISO8601 compliant date.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'format' => 'date-time',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\t\t$params['order'] = array(\n\t\t\t'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'default' => 'desc',\n\t\t\t'enum' => array( 'asc', 'desc' ),\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\t\t$params['orderby'] = array(\n\t\t\t'description' => __( 'Sort collection by object attribute.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'default' => 'date',\n\t\t\t'enum' => array(\n\t\t\t\t'date',\n\t\t\t\t'num_items_sold',\n\t\t\t\t'net_total',\n\t\t\t),\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\t\t$params['product_includes'] = array(\n\t\t\t'description' => __( 'Limit result set to items that have the specified product(s) assigned.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'integer',\n\t\t\t),\n\t\t\t'default' => array(),\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\t\t$params['product_excludes'] = array(\n\t\t\t'description' => __( 'Limit result set to items that don\\'t have the specified product(s) assigned.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'integer',\n\t\t\t),\n\t\t\t'default' => array(),\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t);\n\t\t$params['variation_includes'] = array(\n\t\t\t'description' => __( 'Limit result set to items that have the specified variation(s) assigned.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'integer',\n\t\t\t),\n\t\t\t'default' => array(),\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\t\t$params['variation_excludes'] = array(\n\t\t\t'description' => __( 'Limit result set to items that don\\'t have the specified variation(s) assigned.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'integer',\n\t\t\t),\n\t\t\t'default' => array(),\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t);\n\t\t$params['coupon_includes'] = array(\n\t\t\t'description' => __( 'Limit result set to items that have the specified coupon(s) assigned.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'integer',\n\t\t\t),\n\t\t\t'default' => array(),\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\t\t$params['coupon_excludes'] = array(\n\t\t\t'description' => __( 'Limit result set to items that don\\'t have the specified coupon(s) assigned.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'integer',\n\t\t\t),\n\t\t\t'default' => array(),\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t);\n\t\t$params['tax_rate_includes'] = array(\n\t\t\t'description' => __( 'Limit result set to items that have the specified tax rate(s) assigned.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'integer',\n\t\t\t),\n\t\t\t'default' => array(),\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\t\t$params['tax_rate_excludes'] = array(\n\t\t\t'description' => __( 'Limit result set to items that don\\'t have the specified tax rate(s) assigned.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'integer',\n\t\t\t),\n\t\t\t'default' => array(),\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t);\n\t\t$params['status_is'] = array(\n\t\t\t'description' => __( 'Limit result set to items that have the specified order status.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'sanitize_callback' => 'wp_parse_slug_list',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t\t'items' => array(\n\t\t\t\t'enum' => $this->get_order_statuses(),\n\t\t\t\t'type' => 'string',\n\t\t\t),\n\t\t);\n\t\t$params['status_is_not'] = array(\n\t\t\t'description' => __( 'Limit result set to items that don\\'t have the specified order status.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'sanitize_callback' => 'wp_parse_slug_list',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t\t'items' => array(\n\t\t\t\t'enum' => $this->get_order_statuses(),\n\t\t\t\t'type' => 'string',\n\t\t\t),\n\t\t);\n\t\t$params['customer_type'] = array(\n\t\t\t'description' => __( 'Limit result set to returning or new customers.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'default' => '',\n\t\t\t'enum' => array(\n\t\t\t\t'',\n\t\t\t\t'returning',\n\t\t\t\t'new',\n\t\t\t),\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\t\t$params['refunds'] = array(\n\t\t\t'description' => __( 'Limit result set to specific types of refunds.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'default' => '',\n\t\t\t'enum' => array(\n\t\t\t\t'',\n\t\t\t\t'all',\n\t\t\t\t'partial',\n\t\t\t\t'full',\n\t\t\t\t'none',\n\t\t\t),\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\t\t$params['extended_info'] = array(\n\t\t\t'description' => __( 'Add additional piece of info about each coupon to the report.', 'woocommerce' ),\n\t\t\t'type' => 'boolean',\n\t\t\t'default' => false,\n\t\t\t'sanitize_callback' => 'wc_string_to_bool',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\t\t$params['order_includes'] = array(\n\t\t\t'description' => __( 'Limit result set to items that have the specified order ids.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'integer',\n\t\t\t),\n\t\t);\n\t\t$params['order_excludes'] = array(\n\t\t\t'description' => __( 'Limit result set to items that don\\'t have the specified order ids.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'integer',\n\t\t\t),\n\t\t);\n\t\t$params['attribute_is'] = array(\n\t\t\t'description' => __( 'Limit result set to orders that include products with the specified attributes.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'array',\n\t\t\t),\n\t\t\t'default' => array(),\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\t\t$params['attribute_is_not'] = array(\n\t\t\t'description' => __( 'Limit result set to orders that don\\'t include products with the specified attributes.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'array',\n\t\t\t),\n\t\t\t'default' => array(),\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\treturn $params;\n\t}", "public function testGetTopStoriesPaginatedFromTheFirstPage()\n {\n $response = $this->json('GET', $this->topStoriesEndpoint.'?page=1');\n\n // It should return a paginated json the same as the baseJsonStructure\n $response\n ->assertStatus(200)\n ->assertJsonStructure($this->baseJsonStructure)\n ->assertJsonFragment($this->baseJsonFragment);\n }", "public function testGetNumberOfItems()\n {\n $pu = new Pager(0, 10, 1);\n $this->assertEquals($pu->getNumberOfItems(), 0);\n\n $pu = new Pager(-1, 10, 1);\n $this->assertEquals($pu->getNumberOfItems(), 0);\n\n $pu = new Pager(1, 10, 1);\n $this->assertEquals($pu->getNumberOfItems(), 1);\n }", "public function testGettingParametersFromRoute(): void\n {\n // setup\n $requestParams = $this->getRequestParamsMock();\n\n // test body\n /** @var int $param */\n $param = $requestParams->getParam('rparam');\n\n // assertions\n $this->assertEquals(111, $param);\n }", "public function testTotalPagesGreaterThanDisplayPages()\n {\n $pagination = new Pagination(2,170,10,10);\n $pages = $pagination->getIterator();\n $this->assertEquals(9, $pages->count());\n $pages->seek($pages->count() - 1);\n $this->assertEquals(9, $pages->current());\n $pages->rewind();\n $this->assertEquals(1, $pages->current());\n\n //1 2 3 4 5 6 7 8 9 10 11\n $pagination = new Pagination(6,170,10,12);\n $pages = $pagination->getIterator();\n $this->assertEquals(11, $pages->count());\n $pages->seek($pages->count() - 1);\n $this->assertEquals(11, $pages->current());\n $pages->rewind();\n $this->assertEquals(1, $pages->current());\n\n //3 4 5 6 7 8 9 10 11 12 13\n $pagination = new Pagination(8,170,10,12);\n $pages = $pagination->getIterator();\n $this->assertEquals(11, $pages->count());\n $pages->seek($pages->count() - 1);\n $this->assertEquals(13, $pages->current());\n $pages->rewind();\n $this->assertEquals(3, $pages->current());\n\n //7 8 9 10 11 12 13 14 15 16 17\n $pagination = new Pagination(14,170,10,12);\n $pages = $pagination->getIterator();\n $this->assertEquals(11, $pages->count());\n $pages->seek($pages->count() - 1);\n $this->assertEquals(17, $pages->current());\n $pages->rewind();\n $this->assertEquals(7, $pages->current());\n }", "public function testHasPage() {\n $this->assertEquals(1, $this->users->page());\n }", "public function testSearchApiParams(): void\n {\n $response = $this->getJson('/api/search/stats?searchDate=2030-04-26&searchTerm=l');\n $response->assertStatus(200);\n $response->assertExactJson([\n 'commentsPoints' => [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n 'commitsPoints' => [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n 'pullsPoints' => [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]\n ]);\n }", "public function test117NoDisplayPaginationLinksWhenTotalRecordsLessThan10()\n {\n $ssoData = $this->getSSOData();\n\n // current bookings\n $this->createBookings(9, date('Y-m-d'), 9);\n\n //$this->mockApi($data, 'empty_ok');\n\n $params = [\n 'page' => 1,\n 'per_page' => 10,\n ];\n $response = $this->ajax($this->getUrlByParams($params))->json();\n\n $this->assertTrue(is_array($response));\n $this->assertArrayHasKey('current_list', $response);\n\n $list = $response['current_list'];\n $totalRowsInList = substr_count($list, '<div class=\"contract_item\"');\n\n $this->assertLessThan(10, $totalRowsInList);\n }", "public function paginate(Request $request);", "public function testBookSearchMustOK()\n {\n $dataSearch = [];\n $dataSearch['search'] = 'TestBook';\n $dataSearch['limit'] = 100;\n $buildParams = http_build_query($dataSearch, PHP_QUERY_RFC1738);\n $url = route('book.index');\n $fullUrl = \"$url?$buildParams\";\n $response = $this->getJson($fullUrl);\n\n $response\n ->assertStatus(200)\n ->assertJsonPath('page_info.total', 1);\n }", "public function testListCategoriesHavePagination()\n {\n $this->makeDataOfListCategories(15);\n $user = $this->makeAdminToLogin();\n $this->browse(function (Browser $browser) use ($user) {\n $browser->loginAs($user)\n ->visit('/admin/categories')\n ->resize(900, 1600)\n ->assertSee('List Categories')\n ->click('.pagination li:nth-child(3) a');\n $elements = $browser->elements('#table-categories tbody tr');\n $this->assertCount(5, $elements);\n $browser->assertQueryStringHas('page', 2);\n $this->assertNotNull($browser->element('.pagination'));\n });\n }", "public function test_search_apartment()\n {\n $response = $this->getJson('/apartments?per_page=5');\n $response->assertStatus(200);\n }", "public function testFetchPageIntegerOffset(){\n $str_gql = \"SELECT * FROM Kind\";\n $obj_request = $this->getBasicFetchRequest();\n $obj_gql_query = $obj_request->mutableGqlQuery();\n $obj_gql_query->setAllowLiteral(TRUE);\n $obj_gql_query->setQueryString($str_gql . \" LIMIT @intPageSize OFFSET @intOffset\");\n\n $obj_arg = $obj_gql_query->addNameArg();\n $obj_arg->setName('intPageSize');\n $obj_arg->mutableValue()->setIntegerValue(11);\n\n $obj_arg_offset = $obj_gql_query->addNameArg();\n $obj_arg_offset->setName('intOffset');\n $obj_arg_offset->mutableValue()->setIntegerValue(22);\n\n $this->apiProxyMock->expectCall('datastore_v4', 'RunQuery', $obj_request, new \\google\\appengine\\datastore\\v4\\RunQueryResponse());\n\n $obj_store = $this->createBasicStore();\n $obj_result = $obj_store->query($str_gql)->fetchPage(11, 22);\n\n $this->assertEquals($obj_result, []);\n $this->apiProxyMock->verify();\n }", "public function testShowRecordPaginate()\n {\n $this->makeData(21);\n $this->browse(function (Browser $browser) {\n $browser->visit('/admin/comment')\n ->resize(1920, 2000)\n ->assertSee('List comment & rating');\n //Count row number in one page \n $elements = $browser->elements('#list-table tbody tr');\n $this->assertCount(10, $elements);\n $this->assertNotNull($browser->element('.pagination'));\n\n //Count page number of pagination\n $paginate_element = $browser->elements('.pagination li');\n $number_page = count($paginate_element)- 2;\n $this->assertTrue($number_page == 3);\n });\n }", "public function testHasPages() {\n $this->assertEquals(1, $this->users->pages());\n }", "public function testLastPageOnEdge() {\n\t\tAssert::same(\n\t\t\t'|first|1||last|2||prev|1||next|2|',\n\t\t\t(new UI\\AttainablePagination(\n\t\t\t\t2,\n\t\t\t\t50,\n\t\t\t\t100\n\t\t\t))->print(new Output\\FakeFormat(''))->serialization()\n\t\t);\n\t}", "public function testTotalPagesLessThanDisplayPagesBeginningPageOne()\n {\n $pagination = new Pagination(1,100,10,12);\n $pages = $pagination->getIterator();\n $this->assertEquals(10, $pages->count());\n $pages->seek($pages->count() - 1);\n $this->assertEquals(10, $pages->current());\n $pages->rewind();\n $this->assertEquals(1, $pages->current());\n\n //1 2 3 4 5 6 7\n $pagination = new Pagination(2,70,10,10);\n $pages = $pagination->getIterator();\n $this->assertEquals(7, $pages->count());\n $pages->seek($pages->count() - 1);\n $this->assertEquals(7, $pages->current());\n $pages->rewind();\n $this->assertEquals(1, $pages->current());\n }", "public function withPagination(LengthAwarePaginator $paginator): void;", "public function testPaginationSimpleThirdPage()\n {\n // init\n $oPagination = new \\Pagination();\n $oPagination->setUrl('http://www.st.ro');\n $oPagination->setPage(3);\n $oPagination->setPerPage(10);\n $oPagination->setItemsNo(100);\n \n //run the test\n $this->invokeMethod($oPagination, 'compute');\n \n // asserts\n $this->assertEquals(10, $oPagination->getMaxPage());\n $this->assertEquals(2, $oPagination->getPrevPages());\n $this->assertEquals(2, $oPagination->getNextPages());\n $this->assertTrue($oPagination->getFirstPage());\n $this->assertTrue($oPagination->getLastPage());\n }", "public function testGetBestStoriesPaginatedFromFirstThePage()\n {\n $response = $this->json('GET', $this->bestStoriesEndpoint.'?page=1');\n\n // It should return a paginated json the same as the baseJsonStructure\n $response\n ->assertStatus(200)\n ->assertJsonStructure($this->baseJsonStructure)\n ->assertJsonFragment($this->baseJsonFragment);\n }", "protected function populateParams() {\r\n $this->pageNum = isset($_GET['p']) ? (int)$_GET['p'] : 0;\r\n $this->status = isset($_GET['status']) ? (int)$_GET['status'] : 0;\r\n if ($this->pageNum < 1) {\r\n $this->pageNum = 1;\r\n }\r\n }", "public function testGetPostParams()\n {\n // simulate a post\n $expected = array('document' => array('name' => 'hey'),\n 'post_test1' => 'false', 'post_test2' => 'go yanks');\n $this->assertEquals($expected, $this->_req->getPostParams());\n }", "public function testPaginationSimpleSecondPage()\n {\n // init\n $oPagination = new \\Pagination();\n $oPagination->setUrl('http://www.st.ro');\n $oPagination->setPage(2);\n $oPagination->setPerPage(10);\n $oPagination->setItemsNo(100);\n \n //run the test\n $this->invokeMethod($oPagination, 'compute');\n \n // asserts\n $this->assertEquals(10, $oPagination->getMaxPage());\n $this->assertEquals(1, $oPagination->getPrevPages());\n $this->assertEquals(2, $oPagination->getNextPages());\n $this->assertFalse($oPagination->getFirstPage());\n $this->assertTrue($oPagination->getLastPage());\n }", "public function testGetIterator()\n {\n $parameters = ['foo' => 'bar', 'bar' => 'foo'];\n $container = new ParameterBag($parameters);\n\n $elements = 0;\n foreach ($container as $parameter => $value) {\n /* Cycle all the parameters to ensure we have all the expected ones */\n ++$elements;\n\n $this->assertEquals($parameters[$parameter], $value);\n }\n #\n # We will also need to ensure that we have the number of elements matching the expected\n $this->assertEquals(count($parameters), $elements);\n }", "public function get_collection_params() {\n\t\t$params = [];\n\t\t$params['context'] = $this->get_context_param();\n\t\t$params['context']['default'] = 'view';\n\n\t\t$params['page'] = array(\n\t\t\t'description' => __( 'Current page of the collection.', 'woocommerce' ),\n\t\t\t'type' => 'integer',\n\t\t\t'default' => 1,\n\t\t\t'sanitize_callback' => 'absint',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t\t'minimum' => 1,\n\t\t);\n\n\t\t$params['per_page'] = array(\n\t\t\t'description' => __( 'Maximum number of items to be returned in result set. Defaults to no limit if left blank.', 'woocommerce' ),\n\t\t\t'type' => 'integer',\n\t\t\t'default' => 10,\n\t\t\t'minimum' => 0,\n\t\t\t'maximum' => 100,\n\t\t\t'sanitize_callback' => 'absint',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['search'] = array(\n\t\t\t'description' => __( 'Limit results to those matching a string.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['after'] = array(\n\t\t\t'description' => __( 'Limit response to resources created after a given ISO8601 compliant date.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'format' => 'date-time',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['before'] = array(\n\t\t\t'description' => __( 'Limit response to resources created before a given ISO8601 compliant date.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'format' => 'date-time',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['date_column'] = array(\n\t\t\t'description' => __( 'When limiting response using after/before, which date column to compare against.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'default' => 'date',\n\t\t\t'enum' => array(\n\t\t\t\t'date',\n\t\t\t\t'date_gmt',\n\t\t\t\t'modified',\n\t\t\t\t'modified_gmt',\n\t\t\t),\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['exclude'] = array(\n\t\t\t'description' => __( 'Ensure result set excludes specific IDs.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'integer',\n\t\t\t),\n\t\t\t'default' => [],\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t);\n\n\t\t$params['include'] = array(\n\t\t\t'description' => __( 'Limit result set to specific ids.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'integer',\n\t\t\t),\n\t\t\t'default' => [],\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t);\n\n\t\t$params['offset'] = array(\n\t\t\t'description' => __( 'Offset the result set by a specific number of items.', 'woocommerce' ),\n\t\t\t'type' => 'integer',\n\t\t\t'sanitize_callback' => 'absint',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['order'] = array(\n\t\t\t'description' => __( 'Order sort attribute ascending or descending.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'default' => 'desc',\n\t\t\t'enum' => array( 'asc', 'desc' ),\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['orderby'] = array(\n\t\t\t'description' => __( 'Sort collection by object attribute.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'default' => 'date',\n\t\t\t'enum' => array(\n\t\t\t\t'date',\n\t\t\t\t'modified',\n\t\t\t\t'id',\n\t\t\t\t'include',\n\t\t\t\t'title',\n\t\t\t\t'slug',\n\t\t\t\t'price',\n\t\t\t\t'popularity',\n\t\t\t\t'rating',\n\t\t\t\t'menu_order',\n\t\t\t\t'comment_count',\n\t\t\t),\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['parent'] = array(\n\t\t\t'description' => __( 'Limit result set to those of particular parent IDs.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'integer',\n\t\t\t),\n\t\t\t'default' => [],\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t);\n\n\t\t$params['parent_exclude'] = array(\n\t\t\t'description' => __( 'Limit result set to all items except those of a particular parent ID.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'integer',\n\t\t\t),\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t\t'default' => [],\n\t\t);\n\n\t\t$params['type'] = array(\n\t\t\t'description' => __( 'Limit result set to products assigned a specific type.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'enum' => array_merge( array_keys( wc_get_product_types() ), [ 'variation' ] ),\n\t\t\t'sanitize_callback' => 'sanitize_key',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['sku'] = array(\n\t\t\t'description' => __( 'Limit result set to products with specific SKU(s). Use commas to separate.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['featured'] = array(\n\t\t\t'description' => __( 'Limit result set to featured products.', 'woocommerce' ),\n\t\t\t'type' => 'boolean',\n\t\t\t'sanitize_callback' => 'wc_string_to_bool',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['category'] = array(\n\t\t\t'description' => __( 'Limit result set to products assigned a specific category ID.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['category_operator'] = array(\n\t\t\t'description' => __( 'Operator to compare product category terms.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'enum' => [ 'in', 'not in', 'and' ],\n\t\t\t'default' => 'in',\n\t\t\t'sanitize_callback' => 'sanitize_key',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['tag'] = array(\n\t\t\t'description' => __( 'Limit result set to products assigned a specific tag ID.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['tag_operator'] = array(\n\t\t\t'description' => __( 'Operator to compare product tags.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'enum' => [ 'in', 'not in', 'and' ],\n\t\t\t'default' => 'in',\n\t\t\t'sanitize_callback' => 'sanitize_key',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['on_sale'] = array(\n\t\t\t'description' => __( 'Limit result set to products on sale.', 'woocommerce' ),\n\t\t\t'type' => 'boolean',\n\t\t\t'sanitize_callback' => 'wc_string_to_bool',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['min_price'] = array(\n\t\t\t'description' => __( 'Limit result set to products based on a minimum price, provided using the smallest unit of the currency.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['max_price'] = array(\n\t\t\t'description' => __( 'Limit result set to products based on a maximum price, provided using the smallest unit of the currency.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['stock_status'] = array(\n\t\t\t'description' => __( 'Limit result set to products with specified stock status.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'enum' => array_keys( wc_get_product_stock_status_options() ),\n\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['attributes'] = array(\n\t\t\t'description' => __( 'Limit result set to products with selected global attributes.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'object',\n\t\t\t\t'properties' => array(\n\t\t\t\t\t'attribute' => array(\n\t\t\t\t\t\t'description' => __( 'Attribute taxonomy name.', 'woocommerce' ),\n\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t'sanitize_callback' => 'wc_sanitize_taxonomy_name',\n\t\t\t\t\t),\n\t\t\t\t\t'term_id' => array(\n\t\t\t\t\t\t'description' => __( 'List of attribute term IDs.', 'woocommerce' ),\n\t\t\t\t\t\t'type' => 'array',\n\t\t\t\t\t\t'items' => [\n\t\t\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t\t\t\t),\n\t\t\t\t\t'slug' => array(\n\t\t\t\t\t\t'description' => __( 'List of attribute slug(s). If a term ID is provided, this will be ignored.', 'woocommerce' ),\n\t\t\t\t\t\t'type' => 'array',\n\t\t\t\t\t\t'items' => [\n\t\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'sanitize_callback' => 'wp_parse_slug_list',\n\t\t\t\t\t),\n\t\t\t\t\t'operator' => array(\n\t\t\t\t\t\t'description' => __( 'Operator to compare product attribute terms.', 'woocommerce' ),\n\t\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t\t'enum' => [ 'in', 'not in', 'and' ],\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'default' => [],\n\t\t);\n\n\t\t$params['attribute_relation'] = array(\n\t\t\t'description' => __( 'The logical relationship between attributes when filtering across multiple at once.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'enum' => [ 'in', 'and' ],\n\t\t\t'default' => 'and',\n\t\t\t'sanitize_callback' => 'sanitize_key',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['catalog_visibility'] = array(\n\t\t\t'description' => __( 'Determines if hidden or visible catalog products are shown.', 'woocommerce' ),\n\t\t\t'type' => 'string',\n\t\t\t'enum' => array( 'any', 'visible', 'catalog', 'search', 'hidden' ),\n\t\t\t'sanitize_callback' => 'sanitize_key',\n\t\t\t'validate_callback' => 'rest_validate_request_arg',\n\t\t);\n\n\t\t$params['rating'] = array(\n\t\t\t'description' => __( 'Limit result set to products with a certain average rating.', 'woocommerce' ),\n\t\t\t'type' => 'array',\n\t\t\t'items' => array(\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'enum' => range( 1, 5 ),\n\t\t\t),\n\t\t\t'default' => [],\n\t\t\t'sanitize_callback' => 'wp_parse_id_list',\n\t\t);\n\n\t\treturn $params;\n\t}", "public function testListQrcodesPagination()\n {\n $this->makeData(self::NUMBER_RECORD_CREATE);\n $this->browse(function (Browser $browser) {\n $browser->loginAs($this->user)\n ->visit('/admin/qrcodes');\n $elements = $browser->elements('#list-qrcodes tbody tr');\n $this->assertCount(config('define.qrcodes.limit_rows'), $elements);\n $this->assertNotNull($browser->element('.pagination'));\n $paginate_element = $browser->elements('.pagination li');\n $number_page = count($paginate_element) - 2;\n $this->assertTrue($number_page == ceil((self::NUMBER_RECORD_CREATE + 1) / (config('define.qrcodes.limit_rows'))));\n });\n }", "public function getPerPage(): int;", "public function testIfCustomerPrepareApiInfoHasProperFormat()\n {\n $this->assertEquals($this->customersInstance->prepareCustomersApiInfo(), json_encode([\n 'data' => $this->customer,\n 'current_page' => 2,\n 'last_page' => 120,\n 'next_page' => 'https://www.example.com/api/retargetingtracker?page=3',\n 'prev_page' => 'https://www.example.com/api/retargetingtracker?page=1'\n ], JSON_PRETTY_PRINT));\n }", "public function testAllMatchesRequest()\n {\n $expectedValue = [\n '/1.0/profiles/default',\n '/1.0/profiles/docker',\n ];\n\n $returnedValue = [\n 'default',\n 'docker',\n ];\n\n $endpoint = $this->getEndpointMock($this->getEndpointClass());\n\n $endpoint->expects($this->once())\n ->method('get')\n ->with('/profiles/')\n ->will($this->returnValue($expectedValue));\n\n $this->assertEquals($returnedValue, $endpoint->all());\n }" ]
[ "0.70548224", "0.67531145", "0.67249376", "0.6706914", "0.6686927", "0.66857654", "0.6682336", "0.6552432", "0.6549364", "0.6505953", "0.64882123", "0.64774555", "0.6447404", "0.6440942", "0.64331806", "0.641788", "0.64111185", "0.63885736", "0.6384449", "0.63785315", "0.635689", "0.6340595", "0.63320285", "0.63016486", "0.6298573", "0.6283766", "0.62783194", "0.6277655", "0.62769127", "0.62608457", "0.62288016", "0.6216633", "0.6212993", "0.6196827", "0.6196827", "0.61803555", "0.6176404", "0.61350876", "0.6096058", "0.60953027", "0.6074048", "0.6051136", "0.60423845", "0.60300034", "0.60230416", "0.6020456", "0.6013962", "0.60113436", "0.60063106", "0.59906846", "0.5969749", "0.5936849", "0.5934641", "0.5916677", "0.5916373", "0.59045786", "0.59032995", "0.58994335", "0.5876072", "0.58750415", "0.5871783", "0.5868271", "0.58676827", "0.5863236", "0.5861716", "0.5860934", "0.5850065", "0.58486", "0.5846974", "0.5844539", "0.5829511", "0.5819037", "0.5810271", "0.5799853", "0.5790482", "0.57894075", "0.57885325", "0.57861906", "0.578427", "0.57638687", "0.57605636", "0.5760306", "0.57602227", "0.5757061", "0.5756715", "0.575641", "0.5755347", "0.57507175", "0.57487196", "0.5743926", "0.5727614", "0.57230026", "0.5710473", "0.57055724", "0.5703252", "0.56950814", "0.5688013", "0.56796265", "0.56767374", "0.56717175" ]
0.7644956
0
Test that the "include_totals" parameter works.
Тестирование работы параметра "include_totals".
public function testGetAllIncludeTotals() { $expected_page = 0; $expected_count = 2; $results = self::$api->getAll(['include_totals' => true], $expected_page, $expected_count); usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP); $this->assertArrayHasKey('total', $results); $this->assertEquals($expected_page * $expected_count, $results['start']); $this->assertEquals($expected_count, $results['limit']); $this->assertNotEmpty($results['client_grants']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testTotal()\n {\n\n \t$data = [\n \t\t'base_price' => 10,\n \t\t'spacing_cost' => 10,\n \t\t'work_level_cost' => 50,\n \t\t'urgency_cost' => 20,\n \t\t'number_of_pages' => 5,\n \t\t'total_additional_services_cost' => 10\n \t\t// 'vat' => 100\n \t];\n\n $foo = self::getMethod('calculate');\n $cartService = new CartService();\n $response = $foo->invokeArgs($cartService, [$data]);\n\n $this->assertEquals(410, $response);\n }", "public function testTotalAndCoupon()\n {\n $input = [0, 2, 5, 8];\n $coupon = 0.20;\n\n // Execute total() with the array and the additional value of coupon and save to variable\n $output = $this->Receipt->total($input, $coupon);\n $this->assertEquals(\n 12, // Expected value\n $output, // Value returned by total()\n 'When summing the total should equal 12' // Message to return in case of error\n );\n }", "public function hasTotal() {\n return $this->_has(1);\n }", "public function hasTotal() {\n return $this->_has(1);\n }", "public function hasTotal() {\n return $this->_has(1);\n }", "public function hasTotal() {\n return $this->_has(1);\n }", "public function hasTotal() {\n return $this->_has(1);\n }", "public function allowsExactTotals()\n {\n return $this->allowExactTotals ?? false;\n }", "public function testTotalAmountCalculation(): void\n {\n $order = new Order('consumerIdTest123', '845126849', new \\DateTimeImmutable('midnight'), 'OrderNumber123', 7);\n $order->addOrderLine('productIdTest1', 2, 4.9);\n $order->addOrderLine('productIdTest2', 3, 10.5);\n\n static::assertEquals(41.3, $order->getAmount());\n }", "protected function _initTotals()\n {\n $this->_totals = array();\n $this->_totals['subtotal'] = new Varien_Object(array(\n 'code' => 'subtotal',\n 'value' => $this->getSource()->getSubtotal(),\n 'base_value' => $this->getSource()->getBaseSubtotal(),\n 'bluesnap_value' => $this->getSource()->getBluesnapSubtotal(),\n 'label' => $this->helper('sales')->__('Subtotal')\n ));\n\n /**\n * Add shipping\n */\n if (!$this->getSource()->getIsVirtual() && ((float)$this->getSource()->getShippingAmount() || $this->getSource()->getShippingDescription())) {\n $this->_totals['shipping'] = new Varien_Object(array(\n 'code' => 'shipping',\n 'value' => $this->getSource()->getShippingAmount(),\n 'base_value' => $this->getSource()->getBaseShippingAmount(),\n 'bluesnap_value' => $this->getSource()->getBluesnapShippingAmount(),\n 'label' => $this->helper('sales')->__('Shipping & Handling')\n ));\n }\n\n /**\n * Add discount\n */\n if (((float)$this->getSource()->getDiscountAmount()) != 0) {\n if ($this->getSource()->getDiscountDescription()) {\n $discountLabel = $this->helper('sales')->__('Discount (%s)', $this->getSource()->getDiscountDescription());\n } else {\n $discountLabel = $this->helper('sales')->__('Discount');\n }\n $this->_totals['discount'] = new Varien_Object(array(\n 'code' => 'discount',\n 'value' => $this->getSource()->getDiscountAmount(),\n 'base_value' => $this->getSource()->getBaseDiscountAmount(),\n 'bluesnap_value' => $this->getSource()->getBluesnapDiscountAmount(),\n 'label' => $discountLabel\n ));\n }\n\n $this->_totals['grand_total'] = new Varien_Object(array(\n 'code' => 'grand_total',\n 'strong' => true,\n 'value' => $this->getSource()->getGrandTotal(),\n 'base_value' => $this->getSource()->getBaseGrandTotal(),\n 'bluesnap_value' => $this->getSource()->getBluesnapGrandTotal(),\n 'label' => $this->helper('sales')->__('Grand Total'),\n 'area' => 'footer'\n ));\n\n\n //end parent totals\n\n $this->_totals['paid'] = new Varien_Object(array(\n 'code' => 'paid',\n 'strong' => true,\n 'value' => $this->getSource()->getTotalPaid(),\n 'base_value' => $this->getSource()->getBaseTotalPaid(),\n 'bluesnap_value' => $this->getSource()->getBluesnapTotalPaid(),\n 'label' => $this->helper('sales')->__('Total Paid'),\n 'area' => 'footer'\n ));\n $this->_totals['refunded'] = new Varien_Object(array(\n 'code' => 'refunded',\n 'strong' => true,\n 'value' => $this->getSource()->getTotalRefunded(),\n 'base_value' => $this->getSource()->getBaseTotalRefunded(),\n 'bluesnap_value' => $this->getSource()->getBluesnapTotalRefunded(),\n 'label' => $this->helper('sales')->__('Total Refunded'),\n 'area' => 'footer'\n ));\n $this->_totals['due'] = new Varien_Object(array(\n 'code' => 'due',\n 'strong' => true,\n 'value' => $this->getSource()->getTotalDue(),\n 'base_value' => $this->getSource()->getBaseTotalDue(),\n 'bluesnap_value' => $this->getSource()->getBluesnapTotalDue(),\n\n 'label' => $this->helper('sales')->__('Total Due'),\n 'area' => 'footer'\n ));\n return $this;\n }", "public function testTotalMonthlyPrice()\n {\n }", "public function testAroundCollectTotals()\n {\n $quoteItemId = 1;\n $quoteId = 1;\n $productId = 10;\n $sku = 'sku';\n $expectedSkus = [$sku];\n\n $this->quote->expects($this->atLeastOnce())->method('getData')->willReturn(true);\n $quote = $this->quote;\n $closure = function () use ($quote) {\n return $quote;\n };\n $quoteItem = $this->getMockBuilder(\\Magento\\Quote\\Model\\Quote\\Item::class)\n ->disableOriginalConstructor()\n ->setMethods(['getProductId', 'isDeleted', 'getItemId', 'getSku'])\n ->getMock();\n $quoteItem->expects($this->atLeastOnce())->method('getItemId')->willReturn($quoteItemId);\n $quoteItem->expects($this->atLeastOnce())->method('getProductId')->willReturn($productId);\n $quoteItem->expects($this->atLeastOnce())->method('getSku')->willReturn($sku);\n $quoteItem->expects($this->atLeastOnce())->method('isDeleted')->willReturn(true);\n $this->quote->expects($this->atLeastOnce())->method('getItemsCollection')->willReturn([$quoteItem]);\n $this->quote->expects($this->atLeastOnce())->method('getItemById')->with($quoteItemId)->willReturn($quoteItem);\n $this->quote->expects($this->atLeastOnce())->method('getId')->willReturn($quoteId);\n $this->itemRemove->expects($this->atLeastOnce())->method('setNotificationRemove')\n ->with(\n $quoteId,\n $productId,\n $expectedSkus\n );\n\n $this->quotePlugin->aroundCollectTotals($this->quote, $closure);\n }", "private function dataHasTotal()\n {\n return array_key_exists('total', $this->data);\n }", "public function includesExactTotalCountByDefault()\n {\n return $this->includeExactTotalCountByDefault ?? false;\n }", "public function subtotal();", "public function applyTotals ( ) {\n\t\t# Prepare\n\t\t$InvoiceItem = $this;\n\t\t\n\t\t# Apply Totals\n\t\tBal_Payment_Model_InvoiceItem::applyTotalsModel($InvoiceItem);\n\t\t\n\t\t# Return true\n\t\treturn true;\n\t}", "function client_have_transactions($id)\n{\n $total_transactions = 0;\n $total_transactions += total_rows('tblinvoices', array(\n 'clientid' => $id\n ));\n $total_transactions += total_rows('tblestimates', array(\n 'clientid' => $id\n ));\n $total_transactions += total_rows('tblexpenses', array(\n 'clientid' => $id,\n 'billable' => 1\n ));\n $total_transactions += total_rows('tblproposals', array(\n 'rel_id' => $id,\n 'rel_type' => 'client'\n ));\n\n if ($total_transactions > 0) {\n return true;\n }\n\n return false;\n}", "public static function canDisplaySummaryOfTotalsMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_SUMMARY_OF_TOTALS_REPORT);\n\t}", "abstract public function countTotal();", "public function testGetRowsHavingFilterNotSelected() {\n $params = [\n 'report_id' => 'contribution/contributions',\n 'contribution_total_amount_sum_op' => 'lte',\n 'contribution_total_amount_sum_value' => '1000',\n 'group_bys' => [\n 'contribution_financial_type_id' => '1',\n 'contribution_campaign_id' => '1',\n ],\n 'order_bys' => [['column' => 'contribution_source', 'order' => 'ASC']],\n ];\n $this->callAPISuccess('ReportTemplate', 'getrows', $params)['values'];\n }", "public function getGrandTotal();", "protected function _initTotals()\n {\n $source = $this->getSource();\n\n $this->_totals = [];\n $this->_totals['subtotal'] = new \\Magento\\Framework\\DataObject(\n ['code' => 'subtotal', 'value' => $source->getSubtotal(), 'label' => __('Subtotal')]\n );\n\n if ((double)$this->getOrder()->getPayment()->getAdditionalInformation('paypal_custom_fee') != 0) {\n $this->_totals['paypal_fee'] = new \\Magento\\Framework\\DataObject(\n [\n 'code' => 'paypal_fee',\n 'field' => 'paypal_fee',\n 'value' => $this->getOrder()->getPayment()->getAdditionalInformation('paypal_custom_fee'),\n 'label' => $this->getOrder()->getPayment()->getAdditionalInformation('base_paypal_custom_fee_description'),\n ]\n );\n }\n\n\n /**\n * Add discount\n */\n if ((double)$this->getSource()->getDiscountAmount() != 0) {\n if ($this->getSource()->getDiscountDescription()) {\n $discountLabel = __('Discount (%1)', $source->getDiscountDescription());\n } else {\n $discountLabel = __('Discount');\n }\n $this->_totals['discount'] = new \\Magento\\Framework\\DataObject(\n [\n 'code' => 'discount',\n 'field' => 'discount_amount',\n 'value' => $source->getDiscountAmount(),\n 'label' => $discountLabel,\n ]\n );\n }\n\n /**\n * Add shipping\n */\n if (!$source->getIsVirtual() && ((double)$source->getShippingAmount() || $source->getShippingDescription())) {\n $label = __('Shipping & Handling');\n if ($this->getSource()->getCouponCode() && !isset($this->_totals['discount'])) {\n $label = __('Shipping & Handling (%1)', $this->getSource()->getCouponCode());\n }\n\n $this->_totals['shipping'] = new \\Magento\\Framework\\DataObject(\n [\n 'code' => 'shipping',\n 'field' => 'shipping_amount',\n 'value' => $this->getSource()->getShippingAmount(),\n 'label' => $label,\n ]\n );\n }\n\n $this->_totals['grand_total'] = new \\Magento\\Framework\\DataObject(\n [\n 'code' => 'grand_total',\n 'field' => 'grand_total',\n 'strong' => true,\n 'value' => $source->getGrandTotal(),\n 'label' => __('Grand Total'),\n ]\n );\n\n /**\n * Base grandtotal\n */\n if ($this->getOrder()->isCurrencyDifferent()) {\n $this->_totals['base_grandtotal'] = new \\Magento\\Framework\\DataObject(\n [\n 'code' => 'base_grandtotal',\n 'value' => $this->getOrder()->formatBasePrice($source->getBaseGrandTotal()),\n 'label' => __('Grand Total to be Charged'),\n 'is_formated' => true,\n ]\n );\n }\n return $this;\n }", "private function _calculateTotalsIn()\n {\n $inStockStatus = self::$IN_STOCK_STATUS;\n $sql = new SqlStatement();\n $sql->select(array(\n 'af.group_id', \n 'af.product_id', \n 'af.type',\n 'value' => 'IF(type = \\'STOCK_STATUS\\' AND p.quantity > 0, ' . $inStockStatus . ', value)'))\n ->from(array('af' => self::FILTERS_TABLE))\n ->innerJoin(array('p' => 'product'), 'af.product_id = p.product_id')\n ->innerJoin(array('exclude' => self::RESULTS_TABLE), 'af.product_id = exclude.product_id');\n \n if ($this->conditions->price) {\n if ($this->conditions->price->min) {\n $sql->where(\"{$this->subquery->actualPrice} >= ?\", array($this->conditions->price->min));\n }\n if ($this->conditions->price->max) {\n $sql->where(\"{$this->subquery->actualPrice} <= ?\", array($this->conditions->price->max));\n }\n }\n \n if ($this->conditions->rating) {\n $sql->where('ROUND(total) IN ('. implode(',', $this->conditions->rating[0]) . ')');\n }\n \n if ( self::$HIDE_OUT_OF_STOCK ) {\n $sql->leftJoin(array('pov' => 'product_option_value'), 'af.product_id = pov.product_id AND af.value = pov.option_value_id AND af.type = \"OPTION\"')\n ->leftJoin(array('pov1' => 'product_option_value'), 'p.product_id = pov1.product_id')\n ->where('( (pov1.quantity IS NULL AND p.quantity > 0) OR '\n . '(pov1.quantity > 0 AND af.type != \"OPTION\") OR '\n . 'pov.quantity > 0 )')\n ->group(array('af.type', 'group_id', 'value', 'p.product_id'));\n }\n \n $sql2 = new SqlStatement();\n $sql2->select(array(\n 'id' => \"af.group_id\", \n 'val' => 'af.value', \n 'c' => 'COUNT(*)',\n 'type' => 'af.type',\n ))\n ->from(array('af' => $sql))\n ->group(array('af.type', 'af.group_id', 'af.value'));\n \n if (count($this->aggregate)) {\n foreach ($this->aggregate as $type => $group) {\n $sql2->where(\"((af.type = '$type' AND af.group_id NOT IN (\" . implode(',', array_keys($group)) . \")) OR af.type != '$type')\");\n }\n }\n \n $res = $this->db->query($sql2);\n \n return $res->rows;\n }", "public function testCreateFromOrderWithATotalOf10ShouldReturnAnInvoiceWithTotalOf10()\n {\n $order = new Order();\n $order->setTotal(10);\n $invoice = $this->invoiceFactory->createFromOrder($order);\n static::assertEquals(10, $invoice->getTotal());\n }", "function traff_agrupate_subtotals( &$agrupation, $traff_all, $offset, $groupby, $countby)\n{\n\tif( !is_array($countby) ||( count($countby) != 1 && count($countby) != 2))\n\t\treturn false;\n\n\t// Reseteo los contadores de $agrupation.\n\t$agrupation->count = count($countby)==2 ? array(0, 0) : array(0);\n\t$agrupation->subtotal = 0;\n\n\t$c_groupby = $traff_all[ $offset][ $groupby];\n\t\n\tfor( $n = $offset; $n >= 0; $n --)\n\t{\n\t\t$item = $traff_all[ $n];\n\t\n\t\tif( $c_groupby != $item[ $groupby])\n\t\t{\n\t\t\t// Cambio la agrupacion. Este elemento ya no lo consideramos.\n\t\t\tbreak;\n\t\t}\n\n\t\t// Sumamos los contadores.\n\t\t$agrupation->subtotal += ( float)$item['importe'];\n\t\t$agrupation->count[0] += ( float)$item[$countby[0]];\n\t\tif(count($countby) == 2)\n\t\t\t$agrupation->count[1] += ( float)$item[$countby[1]];\n\t}\n\n\treturn true;\n}", "protected function _initTotals()\n {\n $source = $this->getSource();\n\n $this->_totals = array();\n $this->_totals['subtotal'] = new Varien_Object(array(\n 'code' => 'subtotal',\n 'value' => $source->getSubtotal(),\n 'label' => $this->__('Subtotal')\n ));\n\n\n /**\n * Add shipping\n */\n if (!$source->getIsVirtual() && ((float) $source->getShippingAmount() || $source->getShippingDescription()))\n {\n $this->_totals['shipping'] = new Varien_Object(array(\n 'code' => 'shipping',\n 'field' => 'shipping_amount',\n 'value' => $this->getSource()->getShippingAmount(),\n 'label' => $this->__('Shipping & Handling')\n ));\n }\n\n /**\n * Add discount\n */\n if (((float)$this->getSource()->getDiscountAmount()) != 0) {\n if ($this->getSource()->getDiscountDescription()) {\n $discountLabel = $this->__('Discount (%s)', $source->getDiscountDescription());\n } else {\n $discountLabel = $this->__('Discount');\n }\n $this->_totals['discount'] = new Varien_Object(array(\n 'code' => 'discount',\n 'field' => 'discount_amount',\n 'value' => $source->getDiscountAmount(),\n 'label' => $discountLabel\n ));\n }\n\n $this->_totals['grand_total'] = new Varien_Object(array(\n 'code' => 'grand_total',\n 'field' => 'grand_total',\n 'strong'=> true,\n 'value' => $source->getGrandTotal(),\n 'label' => $this->__('Grand Total')\n ));\n\n /**\n * Base grandtotal\n */\n if ($this->getOrder()->isCurrencyDifferent()) {\n $this->_totals['base_grandtotal'] = new Varien_Object(array(\n 'code' => 'base_grandtotal',\n 'value' => $this->getOrder()->formatBasePrice($source->getBaseGrandTotal()),\n 'label' => $this->__('Grand Total to be Charged'),\n 'is_formated' => true,\n ));\n }\n return $this;\n }", "public function testCartTotalAmount()\n {\n $items = new MollieLineItemCollection([\n new MollieLineItem(\n '',\n '',\n 1,\n new LineItemPriceStruct(2.73, 2.73, 0.44, 19),\n '',\n '',\n '',\n ''\n ),\n new MollieLineItem(\n '',\n '',\n 2,\n new LineItemPriceStruct(1, 2, 0.47, 19),\n '',\n '',\n '',\n ''\n ),\n ]);\n\n $this->assertEquals(4.73, $items->getCartTotalAmount());\n }", "final public function addCanMakeATotal(): void\n {\n $this->assertEquals(2, add(1, 1));\n $this->assertEquals(0, add(1, -1));\n $this->assertEquals(-2, add(-1, -1));\n $this->assertEquals(3, add(1, 2));\n $this->assertEquals(-1, add(1, -2));\n $this->assertEquals(1234567940, add(50, 1234567890));\n // Test overflow\n $this->assertEquals(PHP_INT_MIN, add(1, PHP_INT_MAX));\n $this->assertEquals(PHP_INT_MAX, add(-1, PHP_INT_MIN));\n // This add function works on int not floats\n $this->assertEquals(2, add(1.1, 1.1));\n }", "public function testAggregate()\n {\n $client = static::createClient();\n $client->request('GET', '/include.php?part=meta');\n $this->assertContains('href=\"http://localhost/style_', $client->getResponse()->getContent());\n }", "public function testSumAccountBalancePerformsOperation()\n {\n \t//TODO Implement\n// \t$mock = $this->getMock('Financial_Library_Reports_BalanceSheet');\n// \t$mock->expects($this->once())\n// \t\t->method('getSection')\n// \t\t->with($this->equalTo('revenue'));\n\t\t$stubResult = array('fooAccount'=>10.54,'barAccount'=>10,'foobaraccount'=>80);\n\t\t$report = new Financial_Library_Reports_BalanceSheet();\n\t\t$result = $report->sumAccountBalance($stubResult);\n\t\t$this->assertEquals(100.54, $result,'The obtained sum should be the same',0.001);\n }", "public function calculateTotals($ids)\n {\n\n $requestBody = ['purchase_order_ids' => $ids];\n $response = $this->client->request('POST', '/test', ['body' => json_encode($requestBody)]);\n $responseContent = json_decode($response->getBody()->getContents(), true);\n return $responseContent['result'];\n }", "public function get_totals() {\n\t\treturn empty( $this->totals ) ? $this->default_totals : $this->totals;\n\t}", "public function testGroupBySum() {\n $this->groupByTestHelper('sum', [10, 18]);\n }", "public function issetDocumentTotals(): bool\n {\n return isset($this->documentTotals);\n }", "public function calculateTransactionalTotals() \n {\n \treturn 2500;\n }", "public function hasTotalCount() {\n return $this->_has(3);\n }", "public function hasTotalCount() {\n return $this->_has(3);\n }", "public function getTotals($dataObject)\n {\n $totals = array();\n\n $displayWrappingBothPrices = false;\n $displayWrappingIncludeTaxPrice = false;\n $displayCardBothPrices = false;\n $displayCardIncludeTaxPrice = false;\n\n if ($dataObject instanceof Mage_Sales_Model_Order\n || $dataObject instanceof Mage_Sales_Model_Order_Invoice\n || $dataObject instanceof Mage_Sales_Model_Order_Creditmemo) {\n $displayWrappingBothPrices = $this->displaySalesWrappingBothPrices();\n $displayWrappingIncludeTaxPrice = $this->displaySalesWrappingIncludeTaxPrice();\n $displayCardBothPrices = $this->displaySalesCardBothPrices();\n $displayCardIncludeTaxPrice = $this->displaySalesCardIncludeTaxPrice();\n } elseif ($dataObject instanceof Mage_Sales_Model_Quote_Address_Total) {\n $displayWrappingBothPrices = $this->displayCartWrappingBothPrices();\n $displayWrappingIncludeTaxPrice = $this->displayCartWrappingIncludeTaxPrice();\n $displayCardBothPrices = $this->displayCartCardBothPrices();\n $displayCardIncludeTaxPrice = $this->displayCartCardIncludeTaxPrice();\n }\n\n /**\n * Gift wrapping for order totals\n */\n if ($displayWrappingBothPrices || $displayWrappingIncludeTaxPrice) {\n if ($displayWrappingBothPrices) {\n $this->_addTotalToTotals(\n $totals,\n 'gw_order_excl',\n $dataObject->getGwPrice(),\n $dataObject->getGwBasePrice(),\n $this->__('Gift Wrapping for Order (Excl. Tax)')\n );\n }\n $this->_addTotalToTotals(\n $totals,\n 'gw_order_incl',\n $dataObject->getGwPrice() + $dataObject->getGwTaxAmount(),\n $dataObject->getGwBasePrice() + $dataObject->getGwBaseTaxAmount(),\n $this->__('Gift Wrapping for Order (Incl. Tax)')\n );\n } else {\n $this->_addTotalToTotals(\n $totals,\n 'gw_order',\n $dataObject->getGwPrice(),\n $dataObject->getGwBasePrice(),\n $this->__('Gift Wrapping for Order')\n );\n }\n\n /**\n * Gift wrapping for items totals\n */\n if ($displayWrappingBothPrices || $displayWrappingIncludeTaxPrice) {\n $this->_addTotalToTotals(\n $totals,\n 'gw_items_incl',\n $dataObject->getGwItemsPrice() + $dataObject->getGwItemsTaxAmount(),\n $dataObject->getGwItemsBasePrice() + $dataObject->getGwItemsBaseTaxAmount(),\n $this->__('Gift Wrapping for Items (Incl. Tax)')\n );\n if ($displayWrappingBothPrices) {\n $this->_addTotalToTotals(\n $totals,\n 'gw_items_excl',\n $dataObject->getGwItemsPrice(),\n $dataObject->getGwItemsBasePrice(),\n $this->__('Gift Wrapping for Items (Excl. Tax)')\n );\n }\n } else {\n $this->_addTotalToTotals(\n $totals,\n 'gw_items',\n $dataObject->getGwItemsPrice(),\n $dataObject->getGwItemsBasePrice(),\n $this->__('Gift Wrapping for Items')\n );\n }\n\n /**\n * Printed card totals\n */\n if ($displayCardBothPrices || $displayCardIncludeTaxPrice) {\n $this->_addTotalToTotals(\n $totals,\n 'gw_printed_card_incl',\n $dataObject->getGwCardPrice() + $dataObject->getGwCardTaxAmount(),\n $dataObject->getGwCardBasePrice() + $dataObject->getGwCardBaseTaxAmount(),\n $this->__('Printed Card (Incl. Tax)')\n );\n if ($displayCardBothPrices) {\n $this->_addTotalToTotals(\n $totals,\n 'gw_printed_card_excl',\n $dataObject->getGwCardPrice(),\n $dataObject->getGwCardBasePrice(),\n $this->__('Printed Card (Excl. Tax)')\n );\n }\n } else {\n $this->_addTotalToTotals(\n $totals,\n 'gw_printed_card',\n $dataObject->getGwCardPrice(),\n $dataObject->getGwCardBasePrice(),\n $this->__('Printed Card')\n );\n }\n\n return $totals;\n }", "protected function round_at_subtotal() {\n\t\treturn 'yes' === get_option( 'woocommerce_tax_round_at_subtotal' );\n\t}", "public function getSubtotal();", "public function testAroundCollectTotalsForNotNegotiableQuote()\n {\n $this->quote->expects($this->atLeastOnce())->method('getData')->willReturn(false);\n $quote = $this->quote;\n $closure = function () use ($quote) {\n return $quote;\n };\n $this->quote->expects($this->never())->method('getAllItems');\n\n $this->quotePlugin->aroundCollectTotals($this->quote, $closure);\n }", "public function getTotal();", "public function getTotal();", "private function calculate_totals($project='events'){\n \n // Set flag 'something_was_paid', calculate totals\n $this->total = array();\n foreach ($this->rec_visit as $v_id=>$rec){\n foreach($this->money as $item){\n\tif (!($v = (b_posix::is_int(@$rec[$item]) \n\t\t ? $rec[$item]\n\t\t : 0))) continue;\n\tif ((strpos($item,'_r') == (strlen($item)-2)) && ($item != 'total_r')) $this->something_was_paid = True;\n\tif (($project === 'events') || ($project == @$rec['v_projectid'])) @$this->total[$item] += $v;\n }\n }\n }", "public function test_total_products_quantity()\n {\n $order1 = \\App\\Order::find(1);\n $order2 = \\App\\Order::find(2);\n\n $this->assertEquals(9, $this->orders_service->getTotalProductsQuantity($order1));\n $this->assertEquals(3, $this->orders_service->getTotalProductsQuantity($order1, true));\n $this->assertEquals(0, $this->orders_service->getTotalProductsQuantity($order2, false));\n $this->assertEquals(0, $this->orders_service->getTotalProductsQuantity($order2, true));\n }", "public function buildTotals(InvoiceInterface $invoice);", "public function getMinOrderTotal();", "public function testResponseHasTotalCount()\n {\n \t$response = $this->post(route('post-comment.fetch-comments'), [\n \t\t'offset' => 0\n \t]);\n\n \t$response->assertJson(['total_count' => 2], $strict = false);\n }", "public function setGrandTotal($amount);", "public function initTotals() {\n $helper = Mage::helper('cornerdrop_collect');\n\n /** @var Mage_Sales_Block_Order_Totals $parent */\n $parent = $this->getParentBlock();\n $source = $parent->getSource();\n $shipping_address = $source->getShippingAddress();\n if($shipping_address && $helper->isCornerDropAddress($source->getShippingAddress())) {\n $parent->addTotalBefore(\n new Varien_Object(array(\n 'code' => CornerDrop_Collect_Helper_Data::CORNERDROP_FEE_AMOUNT,\n 'value' => $source->getData(CornerDrop_Collect_Helper_Data::CORNERDROP_FEE_AMOUNT),\n 'base_value'=> $source->getData(CornerDrop_Collect_Helper_Data::BASE_CORNERDROP_FEE_AMOUNT),\n 'label' => $helper->getCornerDropFeeLabel()\n )\n ),\n 'shipping'\n );\n }\n }", "function group_totals($data){\n $group_label = $data['record_params']['group_label'];\n $unique_groups = array();\n $sql_records = $data['data'];\n $sub_group_labels = $data['record_params']['sub_group_labels'];\n foreach($sql_records as $record){\n $unique_groups[] = $record->$data['record_params']['group_label'];\n }\n $unique_groups = array_unique($unique_groups);\n $records = array();\n $grand_total = array();\n $grand_total[$group_label] = 'Grand Total';\n foreach($data['record_params']['sub_group_labels'] as $sub_group_label){\n $grand_total[$sub_group_label] = '';\n }\n foreach($data['numeric'] as $numeric_label){\n $grand_total[$numeric_label] = 0;\n }\n foreach($unique_groups as $group){\n $totals = array();\n $totals[$group_label] = ''; \n $record_label = '';\n foreach($data['record_params']['sub_group_labels'] as $sub_group_label){\n $totals[$sub_group_label] = '';\n }\n foreach($data['numeric'] as $numeric_label){\n $totals[$numeric_label] = 0;\n }\n foreach($sql_records as $record){\n if($record->$group_label == $group){\n $records[] = $record;\n foreach($data['numeric'] as $numeric_label){\n if(sizeof($sub_group_labels) > 0)\n $totals[$numeric_label] = $totals[$numeric_label] + $record->$numeric_label;\n $grand_total[$numeric_label] = $grand_total[$numeric_label] + $record->$numeric_label;\n }\n }\n }\n if(sizeof($sub_group_labels) > 0){\n $totals[$group_label] = $group.' Total';\n $records[] = (object)$totals;\n }\n }\n $records[] = (object)$grand_total;\n return $records;\n }", "function calcTotals(){\n\t\t\n\t\tif($this->Review == true){/*\n\t\t\t$getRate = new sql_processor($this->DB,$this->Conn,$this->Gateway);\n\t\t\t$getRate->mysql(\"SELECT `tax_percent` FROM `billship_tax_states` WHERE `tax_state` = '\".$this->CustBill['State'].\"';\");\n\t\t\t$getRate->mssql(\"SELECT tax_percent FROM billship_tax_states WHERE tax_state = '\".$this->CustBill['State'].\"';\");\n\t\t\tif($getRate->TotalRows() != 0){ $getRate = $getRate->Rows();\n\t\t\t\t$this->Totals['Tax'] += $this->Totals['Taxable'] * ($getRate[0]['tax_percent']/100);\n\t\t\t}\n\t\t\t$getRate = new sql_processor($this->DB,$this->Conn,$this->Gateway);\n\t\t\t$getRate->mysql(\"SELECT `tax_count_percent` FROM `billship_tax_county` WHERE `tax_count_zip` = '\".$this->CustBill['Zip'].\"';\");\n\t\t\t$getRate->mssql(\"SELECT tax_count_percent FROM billship_tax_county WHERE tax_count_zip = '\".$this->CustBill['Zip'].\"';\");\n\t\t\tif($getRate->TotalRows() != 0){ $getRate = $getRate->Rows();\n\t\t\t\t$this->Totals['Tax'] += $this->Totals['Taxable'] * ($getRate[0]['tax_count_percent']/100);\n\t\t\t}\n\t\t\t\n\t\t\tif($this->Totals['Ship2'] > 0){\n\t\t\t\t$getRate = new sql_processor($this->DB,$this->Conn,$this->Gateway);\n\t\t\t\t$getRate->mysql(\"SELECT `ship_limit_price`, `ship_limit_percent` FROM `billship_shipping_limits` WHERE `ship_limit_start_price` >= '\".$this->Totals['Total'].\"';\");\n\t\t\t\t$getRate->mssql(\"SELECT ship_limit_price, ship_limit_percent FROM billship_shipping_limits WHERE ship_limit_start_price >= '\".$this->Totals['Total'].\"';\");\n\t\t\t\t\t\t\t\n\t\t\t\tif($getRate->TotalRows() == 0){\n\t\t\t\t\t$getRate->mysql(\"SELECT `ship_limit_price`, `ship_limit_percent` FROM `billship_shipping_limits` WHERE `ship_limit_upper` = 'y';\");\n\t\t\t\t\t$getRate->mssql(\"SELECT ship_limit_price, ship_limit_percent FROM billship_shipping_limits WHERE ship_limit_upper = 'y';\");\n\t\t\t\t}\n\t\t\t\t$getRate = $getRate->Rows();\n\t\t\t\t$test_1 = $getRate[0]['ship_limit_price'];\n\t\t\t\t$test_2 = $this->Totals['Total']*($getRate[0]['ship_limit_percent']/100);\n\t\t\t\t\n\t\t\t\t$getRate = new sql_processor($this->DB,$this->Conn,$this->Gateway);\n\t\t\t\t$getRate->mysql(\"SELECT `ship_limit_price`, `ship_limit_percent` FROM `billship_shipping_limits` WHERE `ship_limit_start_weight` >= '$weight';\");\n\t\t\t\t$getRate->mssql(\"SELECT ship_limit_price, ship_limit_percent FROM billship_shipping_limits WHERE ship_limit_start_weight >= '$weight';\");\n\t\t\t\t$getRate = $getRate->Rows();\n\t\t\t\t\n\t\t\t\t$test_3 = $getRate[0]['ship_limit_price'];\n\t\t\t\t$test_4 = $total*($getRate[0]['ship_limit_percent']/100);\n\t\t\t\t\n\t\t\t\t$this->Totals['Ship2'] = ($test_1 < $test_2) ? $test_2 : $test_1;\n\t\t\t\t$this->Totals['Ship2'] = ($this->Totals['Ship2'] < $test_3) ? $test_3 : $this->Totals['Ship2'];\n\t\t\t\t$this->Totals['Ship2'] = ($this->Totals['Ship2'] < $test_4) ? $test_4 : $this->Totals['Ship2'];\n\t\t\t\tif(strlen(trim($this->Totals['Ship2'])) > 0) $this->Totals['Ship'] = $this->Totals['Ship2'];\n\t\t\t}\n\t\t*/\n\t\t}\n\t\t$this->Totals['Grand'] = $this->Totals['Total']+$this->Totals['Ship']+$this->Totals['Tax']-$this->Totals['Disc']+$this->Totals['Ext']+$this->Totals['Freight'];\n\t}", "protected function _initTotals()\n {\n $this->_totals = array();\n\n //overridden store ship\n $storeship = Bm_Cmon::getWholesalerShipping($this->getOrder()->getRealOrderId());\n\n\n $_subtotal = 0;\n foreach ($this->getOrder()->getAllItems() as $orderItem) {\n\n \tif(Bm_Cmon::checkSkuOwner($orderItem->getSku())){\n \t\t$_subtotal+= $orderItem->getQtyOrdered()*$orderItem->getOriginalPrice();\n\n \t}\n \n \n\n }\n\n $this->_totals['subtotal'] = new Varien_Object(array(\n 'code' => 'subtotal',\n 'value' => $_subtotal,\n 'base_value'=> $this->getSource()->getBaseSubtotal(),\n 'label' => $this->helper('sales')->__('Subtotal')\n ));\n\n /**\n * overridden ship value\n */\n if (!$this->getSource()->getIsVirtual() && ((float) $this->getSource()->getShippingAmount() || $this->getSource()->getShippingDescription()))\n {\n \n $this->_totals['shipping'] = new Varien_Object(array(\n 'code' => 'shipping',\n 'value' => $storeship['value'], //$this->getSource()->getShippingAmount(),\n 'base_value'=> $this->getSource()->getBaseShippingAmount(),\n 'label' => $this->helper('sales')->__('Shipping & Handling')\n ));\n }\n\n /**\n * Add discount\n */\n\n /*\n if (((float)$this->getSource()->getDiscountAmount()) != 0) {\n if ($this->getSource()->getDiscountDescription()) {\n $discountLabel = $this->helper('sales')->__('Discount (%s)', $this->getSource()->getDiscountDescription());\n } else {\n $discountLabel = $this->helper('sales')->__('Discount');\n }\n $this->_totals['discount'] = new Varien_Object(array(\n 'code' => 'discount',\n 'value' => $this->getSource()->getDiscountAmount(),\n 'base_value'=> $this->getSource()->getBaseDiscountAmount(),\n 'label' => $discountLabel\n ));\n }\n\t\t*/\n\n\t\t//FIXME: implements discount logic\n $this->_totals['grand_total'] = new Varien_Object(array(\n 'code' => 'grand_total',\n 'strong' => true,\n 'value' => $_subtotal+$this->getSource()->getDiscountAmount()*(-1)+$storeship['value'],\n 'base_value'=> $this->getSource()->getBaseGrandTotal(),\n 'label' => $this->helper('sales')->__('Grand Total'),\n 'area' => 'footer'\n ));\n\n return $this;\n }", "public function testWithTwoItemsValuedAt10ShouldHaveATotalOf20()\n {\n $item1 = $this->makeStubShoppingCartItemWithPrice(10);\n $item2 = $this->makeStubShoppingCartItemWithPrice(10);\n $this->cart->addItem($item1);\n $this->cart->addItem($item2);\n\n $this->assertEquals(20, $this->cart->total());\n }", "public function isIncludedInDisplayPrice();", "private function initializeSubtotals()\n {\n if (!isset($this->data->subtotals)) {\n $this->data->subtotals = new stdClass();\n }\n }", "public function testAggregateMemberBalances()\n {\n }", "protected function get_is_total(): bool\n\t{\n\t\treturn $this->start === 0 && $this->end === $this->total - 1;\n\t}", "public function formattedTotal(): string;", "public function getBaseGrandTotal();", "private function getTotalsForDisplay()\n {\n\t\tif(\\Cart2Quote\\License\\Model\\License::getInstance()->isValid()) {\n\t\t\t$quote = $this->getQuote();\n $totals = [];\n $store = $this->getSource()->getStore();\n if ($this->_taxConfig->displaySalesTaxWithGrandTotal($store)) {\n return [];\n }\n $tax = 0;\n foreach ($quote->getAllVisibleItems() as $item) {\n $tax = $tax + $item->getTaxAmount();\n }\n //add shipping tax\n if ($quote->getShippingAddress()->getShippingTaxAmount()) {\n $tax = $tax + $quote->getShippingAddress()->getShippingTaxAmount();\n }\n if ($this->_taxConfig->displaySalesFullSummary($store)) {\n $totals = $this->getFullTaxInfo();\n }\n $tax = $quote->formatPriceTxt($tax);\n $totals = array_merge($totals, parent::getTotalsForDisplay());\n $totals[0]['amount'] = $tax;\n return $totals;\n\t\t}\n\t}", "public function total();", "public function total();", "public function total();", "public function isIncludedInPrice();", "function getTotalsForDisplay()\n {\n $amount = $this->getSource()->formatPriceTxt($this->getAmount());\n\n if ($this->getAmountPrefix()) {\n $amount = $this->getAmountPrefix() . $amount;\n }\n\n $title = __($this->getTitle());\n if ($this->getTitleSourceField()) {\n $label = $title . ' (' . $this->getTitleDescription() . '):';\n } else {\n $label = $title . ':';\n }\n\n $fontSize = $this->getFontSize() ? $this->getFontSize() : 7;\n $total = ['amount' => $amount, 'label' => $label, 'font_size' => $fontSize];\n return [$total];\n }", "public function testFindSum()\n {\n\n $json = Scraper::start();\n $array = json_decode($json, true);\n //print_r($array['total']);\n $input = $array['results'];\n $total = $array['total'];\n\n $sumFinder = new SumFinderClass($input);\n $this->assertEquals($total, $sumFinder->findSum());\n }", "abstract public function prepareTotalCount();", "public function ensureTotals($Event, $Event_type){\n\t\t# Check\n\t\tif ( !in_array($Event_type,array('preSave')) ) {\n\t\t\t# Not designed for these events\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t# Fetch\n\t\t$InvoiceItem = $Event->getInvoker();\n\t\t\n\t\t# --------------------------\n\t\t# Ensure\n\t\t\n\t\t# Apply Totals\n\t\t$InvoiceItem->applyTotals();\n\t\t\n\t\t# --------------------------\n\t\t\n\t\t# Return true\n\t\treturn true;\n\t}", "protected function _toHtml()\n {\n /** @var $totalsXmlObj Mage_XmlConnect_Model_Simplexml_Element */\n $totalsXmlObj = Mage::getModel('xmlconnect/simplexml_element', '<totals></totals>');\n\n foreach ($this->getQuote()->getTotals() as $total) {\n $code = $total->getCode();\n if ($code == 'giftwrapping') {\n continue;\n }\n\n $title = '';\n $value = null;\n $renderer = $this->_getTotalRenderer($code)->setTotal($total);\n\n switch ($code) {\n case 'subtotal':\n if ($renderer->displayBoth()) {\n $title = $this->__('Subtotal (Excl. Tax)');\n $this->_addTotalDataToXmlObj(\n $totalsXmlObj, $code . '_excl_tax', $title, $total->getValueExclTax()\n );\n\n $code = $code . '_incl_tax';\n $title = $this->__('Subtotal (Incl. Tax)');\n $value = $total->getValueInclTax();\n }\n break;\n case 'shipping':\n if ($renderer->displayBoth()) {\n $title = $renderer->getExcludeTaxLabel();\n $this->_addTotalDataToXmlObj(\n $totalsXmlObj, $code . '_excl_tax', $title, $renderer->getShippingExcludeTax()\n );\n\n $code = $code . '_incl_tax';\n $title = $renderer->getIncludeTaxLabel();\n $value = $renderer->getShippingIncludeTax();\n } else if ($renderer->displayIncludeTax()) {\n $value = $renderer->getShippingIncludeTax();\n } else {\n $value = $renderer->getShippingExcludeTax();\n }\n break;\n case 'grand_total':\n $grandTotalExlTax = $renderer->getTotalExclTax();\n $displayBoth = $renderer->includeTax() && $grandTotalExlTax >= 0;\n if ($displayBoth) {\n $title = $this->__('Grand Total (Excl. Tax)');\n $this->_addTotalDataToXmlObj(\n $totalsXmlObj, $code . '_excl_tax', $title, $grandTotalExlTax\n );\n $code = $code . '_incl_tax';\n $title = $this->__('Grand Total (Incl. Tax)');\n }\n break;\n case 'giftwrapping':\n foreach ($renderer->getValues() as $title => $value) {\n $this->_addTotalDataToXmlObj($totalsXmlObj, $code, $title, $value);\n }\n continue 2;\n case 'giftcardaccount':\n $cards = $renderer->getTotal()->getGiftCards();\n if (!$cards) {\n $cards = $renderer->getQuoteGiftCards();\n }\n if ($renderer->getTotal()->getValue()) {\n foreach ($cards as $cardCode) {\n $title = $this->__('Gift Card (%s)', $cardCode['c']);\n $value = $cardCode['c'];\n $totalXmlObj = $totalsXmlObj->addChild($code);\n $totalXmlObj->addChild('title', $totalsXmlObj->escapeXml($title));\n $totalXmlObj->addChild('value', $value);\n $value = Mage::helper('xmlconnect')->formatPriceForXml($cardCode['a']);\n $formattedValue = $this->getQuote()->getStore()->formatPrice($value, false);\n $totalXmlObj->addChild('formated_value', '-' . $formattedValue);\n }\n }\n continue 2;\n default:\n break;\n }\n if (empty($title)) {\n $title = $total->getTitle();\n }\n if (null === $value) {\n $value = $total->getValue();\n }\n if (null !== $value) {\n $this->_addTotalDataToXmlObj($totalsXmlObj, $code, $title, $value);\n }\n }\n\n return $this->getReturnObjectFlag() ? $totalsXmlObj : $totalsXmlObj->asNiceXml();\n }", "public function getSummaryOfTotalsReport()\n\t{\n\t\treturn view('reports.summary-of-totals', [\n\t\t\t\t'from_date' => null,\n\t\t\t\t'to_date' => null,\n\t\t\t\t'total_properties' => null,\n\t\t\t\t'totals_per_seller_status' => null,\n\t\t\t\t'totals_per_property_status' => null,\n\t\t\t\t'totals_per_area' => null,\n\t\t\t\t'totals_per_greater_area' => null,\n\t\t\t\t'generated' => false\n\t\t]);\n\t}", "function showTransactionResult()\r\n{\r\n global $config;\r\n $items_subtotal = 0; //init\r\n $extras_subtotal = 0; //init\r\n \r\n /*\r\n echo '<pre>';\r\n var_dump($_POST);\r\n echo'</pre>';\r\n */\r\n \r\n //start ITEMS ordered table\r\n //date format May 13, 2018, 1:16 am\r\n $html = '\r\n\r\n <h2>\r\n <span>Order Details</span>\r\n </h2>\r\n\r\n <p style=\"margin-left:1rem; margin-top:0;\">Order Date: ' . date(\"F j, Y, g:i a\") . '</p>\r\n <div class=\"menuitem\">\r\n <h3 style=\"margin-top:0;\">Items Ordered:</h3>\r\n <table style=\"width:100%\">\r\n <tr>\r\n <th>Item Name</th>\r\n <th>Qty</th>\r\n <th>Price</th>\r\n <th>Item Total</th>\r\n </tr>\r\n ';\r\n \r\n //this foreach block generates the table rows of ITEMS ordered\r\n foreach ($_POST as $key => $value) \r\n {\r\n //check $key is an item or a topping\r\n if (substr($key,0,5) == 'item_') {\r\n \r\n //get qty, cast as int\r\n $quantity = (int)$value;\r\n \r\n //check if there is an order for this item\r\n if ($quantity > 0) {\r\n \r\n //seperate string with _ as the delimiter\r\n $key_array = explode('_',$key);\r\n \r\n //cast item number as an integer\r\n $key_id = (int)$key_array[1];\r\n \r\n //get price, cast as float\r\n $price = (float)$config->items[$key_id - 1]->Price;\r\n \r\n //get name\r\n $name = $config->items[$key_id - 1]->Name;\r\n \r\n //calculate total for this item\r\n $item_total = $quantity * $price;\r\n \r\n //add to over items subtotal\r\n $items_subtotal += $item_total;\r\n \r\n //money format\r\n $price_output = money_format('%.2n', $price);\r\n $item_total_output = money_format('%.2n', $item_total);\r\n \r\n $html .= '\r\n <tr>\r\n <td>' . $name . '</td>\r\n <td>' . $quantity . '</td>\r\n <td>' . $price_output . '</td>\r\n <td>' . $item_total_output . '</td>\r\n </tr>\r\n ';\r\n }\r\n }\r\n }\r\n \r\n //money format\r\n $items_subtotal_output = money_format('%.2n', $items_subtotal);\r\n \r\n //finish ITEMS table\r\n $html .= '\r\n <tr class=\"tabletotal\">\r\n <td colspan=3 class=\"tabletotaltitle\">Items Subtotal: </td>\r\n <td>' . $items_subtotal_output . '</td>\r\n </tr>\r\n </table>\r\n '; \r\n \r\n //start EXTRAS ordered table\r\n $extras_html = '\r\n <h3>Extras Ordered:</h3>\r\n <table style=\"width:100%\">\r\n <tr>\r\n <th>Extra</th>\r\n\r\n <th>Qty</th>\r\n\r\n <th>Price</th>\r\n </tr>\r\n ';\r\n \r\n //this foreach block generates the table rows of EXTRAS ordered\r\n foreach ($_POST as $key => $value) \r\n {\r\n if (substr($key,0,7) == 'extras_') {\r\n \r\n foreach ($value as $extra_key => $extra) {\r\n \r\n //seperate string with _ as the delimiter\r\n $key_array = explode('_',$key);\r\n \r\n //cast item number as an integer\r\n $key_id = (int)$key_array[1];\r\n \r\n $associated_item_key = 'item_' . $key_id;\r\n \r\n $quantity_of_extra = $_POST[$associated_item_key];\r\n \r\n $extra_subtotal = $quantity_of_extra * 0.25; //calculates subtotal of each particular extra\r\n \r\n $extras_subtotal += $extra_subtotal; //adds to overall subtotal of all extras\r\n \r\n $extra_subtotal_output = money_format('%.2n', $extra_subtotal);\r\n\r\n //add row to EXTRAS table\r\n $extras_html .= '\r\n <tr>\r\n <td>' . $extra . '</td>\r\n\r\n <td>' . $quantity_of_extra . '</td>\r\n <td>' . $extra_subtotal_output . '</td>\r\n\r\n </tr>\r\n ';\r\n }\r\n }\r\n }\r\n \r\n //money format\r\n $extras_subtotal_output = money_format('%.2n', $extras_subtotal);\r\n \r\n //finish EXTRAS table\r\n $extras_html .='\r\n <tr class=\"tabletotal\">\r\n\r\n <td colspan=\"2\" class=\"tabletotaltitle\">Extras Subtotal: </td>\r\n\r\n <td>' . $extras_subtotal_output . '</td>\r\n </tr>\r\n </table>\r\n </div>\r\n ';\r\n \r\n if ($extras_subtotal == 0) {\r\n $extras_html = '\r\n <h3>Extras Ordered:</h3>\r\n <p>No extras were ordered.</p>\r\n </div>\r\n ';\r\n }\r\n \r\n $html .= $extras_html;\r\n \r\n //calculate tax & totals\r\n $order_subtotal = $items_subtotal + $extras_subtotal;\r\n $tax = $order_subtotal * .101; //10.1%\r\n $grand_total = $order_subtotal + $tax;\r\n \r\n //money format\r\n $order_subtotal = money_format('%.2n', $order_subtotal);\r\n $tax = money_format('%.2n', $tax);\r\n $grand_total = money_format('%.2n', $grand_total);\r\n\r\n //display order summary\r\n $html .= '\r\n <div class=\"menuitem\">\r\n <h3 style=\"margin-top:0;\">Order Summary:</h3>\r\n <table style=\"width:100%\">\r\n <tr>\r\n <td>Item(s) Subtotal: </td>\r\n <td>' . $items_subtotal_output . '</td>\r\n </tr>\r\n <tr>\r\n <td>Extra(s) Subtotal: </td>\r\n <td>' . $extras_subtotal_output . '</td>\r\n </tr>\r\n <tr>\r\n <td>Order Subtotal: </td>\r\n <td>' . $order_subtotal . '</td>\r\n </tr>\r\n <tr>\r\n <td>Tax: </td>\r\n <td>' . $tax . '</td>\r\n </tr>\r\n <tr class=\"tabletotal\">\r\n <td>Grand Total: </td>\r\n <td>' . $grand_total . '</td>\r\n </tr>\r\n </table>\r\n </div>\r\n ';\r\n\r\n\r\n return $html;\r\n}", "public function testGetPayItems()\n {\n }", "public function testGetBatchStatistics()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testSum()\n {\n $this->assertEquals(6, $this->object->sum(function ($item) {\n return $item;\n }));\n }", "public function assertTotalNumberOfRows($gridId, $expectedNumberOfRows) {\n $this->getTest()->assertEquals($expectedNumberOfRows, $this->getTotalNumberOfRows($gridId));\n }", "public function testGetUserrecordingsSummary()\n {\n }", "public function totals($sums){\r\n\r\n $queryData=$this->queryData;\r\n $queryData['page']=1;\r\n $pageQuery=$this->getPageScope($this, $this->getQueryData($queryData));\r\n\r\n return $this->getTotals($pageQuery, $this->getQueryData($queryData), $sums);\r\n }", "public function testTotalMensalidade()\n {\n $res = (new Client())->request(\n 'GET',\n self::ROUTE_API_TOTAL_MENSALIDADE,\n [\n 'headers' => [\n 'Authorization' => env(\"PERSONAL_AUTH_KEY\"),\n 'Accept' => 'application/json'\n ]\n ]\n );\n $totalMensalidade = json_decode((string) $res->getBody());\n $this->assertGreaterThan(0, $totalMensalidade->total);\n }", "public function __tallyUpInvoice() {\n\n $this->__itemTotals();\n\n $subTotal = $this->__subtotal($this->request->data['items']);\n\n //$taxTotal = $this->__tax($subTotal, $this->request->data['Invoice']['taxRate']);\n\n //$taxTotal = $this->__tax($this->request->data['items']);\n\n //$this->request->data['total'] = $subTotal + $taxTotal;\n $this->request->data['total'] = $subTotal;\n\n //$this->request->data['subTotal'] = $subTotal;\n\n //$this->request->data['taxTotal'] = $taxTotal;\n\n return true;\n }", "public function testBillingInvoices()\n {\n }", "public function hasSummaries() {\n return $this->_has(1);\n }", "public function hasSummaries() {\n return $this->_has(1);\n }", "public function hasSummaries() {\n return $this->_has(1);\n }", "public function testGetListTotalWithArcoToken()\n {\n // Populate data\n $arcoID = $this->_populateArco();\n $tlID = $this->_populateTL();\n $dealerID = $this->_populateDealer();\n $dealerAccountID = $this->_populateDealerAccount();\n $branchID = $this->_populateBranch();\n \n // Create token\n $token = str_random(5);\n $encryptedToken = $this->token->encode($arcoID, $token);\n \n $params = [\n 'token' => $encryptedToken \n ];\n\n // Do request\n $response = $this->call('GET', '/api/1.5.0/news-total', $params);\n $result = json_decode($response->getContent(), true);\n\n // Verify\n $this->assertTrue(array_key_exists('result', $result));\n }", "protected function calculateGrandTotal()\n {\n $this->grandTotal = $this->subTotal + $this->gst + $this->unit->securityDeposit;\n }", "public function calculate_cart_total()\r\n\t{\r\n\t\t$cart_total = 0;\r\n\t\t$cart_total += $this->flexi->cart_contents['summary']['item_summary_total'];\r\n\t\t$cart_total += $this->flexi->cart_contents['summary']['shipping_total'];\r\n\t\t$cart_total += $this->flexi->cart_contents['summary']['surcharge_total'];\r\n\t\t$cart_total += (! $this->flexi_cart->cart_prices_inc_tax()) ? $this->flexi->cart_contents['summary']['tax_total'] : 0; \r\n\t\t\r\n\t\t$this->flexi->cart_contents['summary']['total'] = $this->format_calculation($cart_total);\r\n\t\t\t\t\r\n\t\treturn TRUE; \r\n\t}", "public function get_totals( $in_cents = false ) {\n\t\treturn $in_cents ? $this->totals : wc_remove_number_precision_deep( $this->totals );\n\t}", "public function testSortOrderByTotal()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs($this->user)\n ->visit('/admin/orders')\n ->click('#sort-by-total');\n\n $ordersSortAsc = Order::orderBy('total', 'ASC')->pluck('total')->toArray();\n\n for ($i = 1; $i <= 5; $i++) {\n $selector = \".table tbody tr:nth-child($i) td:nth-child(4)\";\n $this->assertEquals($browser->text($selector), number_format($ordersSortAsc[$i-1]));\n }\n\n $browser->click('#sort-by-total');\n $ordersSortDesc = Order::orderBy('total', 'DESC')->pluck('total')->toArray();\n\n for ($i = 1; $i <= 5; $i++) {\n $selector = \".table tbody tr:nth-child($i) td:nth-child(4)\";\n $this->assertEquals($browser->text($selector), number_format($ordersSortDesc[$i-1]));\n }\n });\n }", "abstract protected function prepareTotalCount();", "public function testThatGetAllUsersIncludeFieldsIsFormattedProperly()\n {\n $api = new MockManagementApi( [ new Response( 200, self::$headers ) ] );\n\n $api->call()->users()->getAll( [], [ 'field3', 'field4' ], true );\n\n $query = $api->getHistoryQuery();\n $this->assertContains( 'fields=field3,field4', $query );\n $this->assertContains( 'include_fields=true', $query );\n }", "public function addBasketGrandTotalParams()\n {\n $oBasket = $this->getBasket();\n $oRequest = $this->getPayPalRequest();\n\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_NAME0\", $this->getLang()->translateString(\"OEPAYPAL_GRAND_TOTAL\"));\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_AMT0\", $this->_formatFloat($oBasket->getSumOfCostOfAllItemsPayPalBasket()));\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_QTY0\", 1);\n }", "public function testPostTaxTotal()\n {\n $items = [1, 2, 5, 8];\n $tax = 0.20;\n $coupon = null;\n\n // Create a mock receipt class\n $Receipt = $this->getMockBuilder('TDD\\Receipt')\n ->setMethods(['tax', 'total'])\n ->getMock();\n\n // Make sure that the total method in mock Receipt will return 10.00\n $Receipt->expects($this->once())// Total assumes it will be called once\n ->method('total')\n ->with($items, $coupon)// Make sure total is called with these values\n ->will($this->returnValue(10.00));\n\n // Make sure that the tax method in mock Receipt will return 1.00\n $Receipt->expects($this->once())// Tax assumes it will be called once\n ->method('tax')\n ->with(10.00, $tax)// Make sure tax is called with these values\n ->will($this->returnValue(1.00));\n\n // Execute postTaxTotal with random values\n $result = $Receipt->postTaxTotal([1, 2, 5, 8], 0.20, null);\n $this->assertEquals(\n 11.00, // Expected value\n $result // Value returned by postTaxTotal() using mocked values 10.00 and 1.00\n );\n }", "public function testGetRowsFilterCustomData() {\n $this->enableAllComponents();\n $ids = $this->createCustomGroupWithField([]);\n $contacts = $this->createContacts(2);\n foreach ($contacts as $contact) {\n $contribution = $this->callAPISuccess('Contribution', 'create', [\n 'total_amount' => 4,\n 'financial_type_id' => 'Donation',\n 'contact_id' => $contact['id'],\n ]);\n $this->callAPISuccess('Contact', 'create', ['id' => $contact['id'], 'custom_' . $ids['custom_field_id'] => $contribution['id']]);\n }\n\n $params = [\n 'report_id' => 'contribution/contributions',\n 'fields' => ['contribution_id'],\n 'custom_' . $ids['custom_field_id'] . '_op' => 'eq',\n 'custom_' . $ids['custom_field_id'] . '_value' => $contribution['id'],\n ];\n $rows = $this->callAPISuccess('ReportTemplate', 'getrows', $params)['values'];\n $this->assertEquals(1, count($rows));\n }", "public function testReportsSummaryGet()\n {\n }", "function totals()\n\t{\n\t\treturn $this->_tour_voucher_contents['totals'];\n\t}", "public function testGetListTotalWithTLToken()\n {\n // Populate data\n $tlID = $this->_populateTL();\n $dealerID = $this->_populateDealer();\n $dealerAccountID = $this->_populateDealerAccount();\n $branchID = $this->_populateBranch();\n\n // Create token\n $token = str_random(5);\n $encryptedToken = $this->token->encode($tlID, $token);\n \n $params = [\n 'token' => $encryptedToken \n ];\n\n // Do request\n $response = $this->call('GET', '/api/1.5.0/news-total', $params);\n $result = json_decode($response->getContent(), true);\n\n // Verify\n $this->assertTrue(array_key_exists('result', $result));\n }", "function recalculatingPaymentTotals() {\n $invoice_objects_table = TABLE_PREFIX . 'invoice_objects';\n $payments_table = TABLE_PREFIX . 'payments';\n\n // set balance due to invoice total\n DB::execute('UPDATE ' . $invoice_objects_table . ' SET balance_due = total');\n\n $total_payments = DB::execute('SELECT parent_id AS invoice_id, SUM(amount) AS paid_amount FROM ' . $payments_table . ' WHERE parent_type = ? AND status = ? GROUP BY parent_id ORDER BY parent_id ASC', 'Invoice', 'Paid');\n if ($total_payments) {\n foreach ($total_payments as $total_payment) {\n $invoice_id = $total_payment['invoice_id'];\n $paid_amount = $total_payment['paid_amount'];\n $invoice_total = DB::executeFirstCell('SELECT total FROM ' . $invoice_objects_table . ' WHERE id = ? AND type = ?', $invoice_id, 'Invoice');\n $balance_due = $invoice_total - $paid_amount;\n DB::execute('UPDATE ' . $invoice_objects_table . ' SET balance_due = ?, paid_amount = ? WHERE id = ? AND type = ?', $balance_due, $paid_amount, $invoice_id, 'Invoice');\n } // foreach\n } // if\n }", "function count_total_filtered()\n {\n $this->_get_datatables_query_payment();\n $query = $this->company_db->get();\n return $query->num_rows();\n }", "public function createTotalsFromSums() {\n $subtotal = $this->ItemSubtotalSum;\n $this->data['Order']['subtotal'] = $subtotal;\n\n $tax = sprintf('%0.2f', $subtotal * $this->ShipmentTaxPercent * $this->Taxable);\n $this->data['Order']['tax'] = $tax;\n\n $this->data['Order']['total'] = $subtotal + $tax + $this->ShipmentSum;\n\n $this->data['Order']['order_item_count'] = $this->ItemCount;\n\n $this->data['Order']['weight'] = $this->ItemWeightSum;\n\n return array_intersect_key(\n $this->data['Order'],\n array(\n 'subtotal' => NULL,\n 'tax' => NULL,\n 'order_item_count' => NULL,\n 'weight' => NULL,\n 'total' => NULL,\n )\n );\n }" ]
[ "0.6468725", "0.61584353", "0.61541104", "0.61541104", "0.61541104", "0.61541104", "0.61541104", "0.6009728", "0.59305", "0.5900423", "0.5868993", "0.58609045", "0.5784935", "0.5773006", "0.57543004", "0.57496685", "0.57306576", "0.5725652", "0.5710329", "0.5680534", "0.56702113", "0.56289095", "0.5623014", "0.56225854", "0.5575959", "0.55566245", "0.55418396", "0.5486859", "0.54719216", "0.54541767", "0.5429237", "0.54192305", "0.5412737", "0.5392911", "0.53755045", "0.5353935", "0.5353935", "0.5352436", "0.5340444", "0.533251", "0.5322978", "0.53212315", "0.53212315", "0.53173745", "0.53065056", "0.53020495", "0.529552", "0.5279334", "0.5270623", "0.5256591", "0.5254979", "0.5254064", "0.5250145", "0.5210911", "0.52094644", "0.5199182", "0.51927614", "0.5184853", "0.5181045", "0.5176208", "0.5173769", "0.5156119", "0.5156119", "0.5156119", "0.5153782", "0.51536155", "0.51520914", "0.5147319", "0.5140326", "0.5133512", "0.5130898", "0.5123876", "0.51157725", "0.51104283", "0.5109244", "0.51076084", "0.5106985", "0.5101034", "0.5100352", "0.5092341", "0.50899845", "0.50877607", "0.50877607", "0.50877607", "0.50752914", "0.50662196", "0.5062367", "0.5052262", "0.5050549", "0.5048485", "0.5046543", "0.50417286", "0.5025984", "0.50250167", "0.5021321", "0.50125206", "0.5010775", "0.5006672", "0.4993069", "0.49874774" ]
0.7849056
0
Test that we can create, update, and delete a Client Grant.
Тестирование возможности создания, обновления и удаления клиентского разрешения.
public function testCreateUpdateDeleteGrant() { $client_id = self::$env['APP_CLIENT_ID']; $audience = self::$apiIdentifier; // Create a Client Grant with just one of the testing scopes. $create_result = self::$api->create($client_id, $audience, [self::$scopes[0]]); usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP); $this->assertArrayHasKey('id', $create_result); $this->assertEquals($client_id, $create_result['client_id']); $this->assertEquals($audience, $create_result['audience']); $this->assertEquals([self::$scopes[0]], $create_result['scope']); $grant_id = $create_result['id']; // Test patching the created Client Grant. $update_result = self::$api->update($grant_id, self::$scopes); usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP); $this->assertEquals(self::$scopes, $update_result['scope']); // Test deleting the created Client Grant. $delete_result = self::$api->delete($grant_id); usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP); $this->assertNull($delete_result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_machine_user_can_perform_client_credentials_grant() {\n\n $user = factory(User::class)->create();\n\n $createdClientResponse = $this->log_in_and_create_client_for_user($user);\n\n // so you can logout for client credentials grant!\n auth()->logout();\n\n $response = $this->json('post', '/oauth/token', [\n 'grant_type' => 'client_credentials',\n 'client_id' => $createdClientResponse->json('id'),\n 'client_secret' => $createdClientResponse->json('secret'),\n 'scope' => '*',\n ])->assertJson([\n 'token_type' => 'Bearer',\n ])->assertJsonStructure([\n 'token_type',\n 'expires_in',\n 'access_token',\n ]);\n\n }", "public function testCreateClient() {\n\n $this->withoutMiddleware();\n\n // Generate one user and one client\n $user = factory(App\\User::class)->create();\n $client = factory(App\\Client::class)->make(['phone_number' => '0725433317']);\n\n $this->actingAs($user)\n ->post('/clients/create', ['name' => $client->name, 'phone' => $client->phone_number])\n ->seeJson(['success' => true]);\n\n }", "public function testDeleteClient() {\n\n // Generate user and client\n $user = factory(App\\User::class)->create();\n $client = $user->clients()->save(factory(App\\Client::class)->make());\n\n $this->actingAs($user)\n ->get('/clients/' . $client->id . '/delete')\n ->seeJson(['success' => true]);\n\n }", "public function testCreateGrantExceptions()\n {\n $throws_missing_client_id_exception = false;\n try {\n self::$api->create('', self::$apiIdentifier, []);\n } catch (CoreException $e) {\n $throws_missing_client_id_exception = $this->errorHasString($e, 'Empty or invalid \"client_id\" parameter');\n }\n\n $this->assertTrue($throws_missing_client_id_exception);\n\n $throws_missing_audience_exception = false;\n try {\n self::$api->create(self::$env['APP_CLIENT_ID'], '', []);\n } catch (CoreException $e) {\n $throws_missing_audience_exception = $this->errorHasString($e, 'Empty or invalid \"audience\" parameter');\n }\n\n $this->assertTrue($throws_missing_audience_exception);\n }", "public function test_SaveClientOK(){\n\t\t// Popula variável com os dados do cliente\n\t\t$cliente = $this->dataGenerator->getCliente();\n\t\t// Popula dados da requisição\n\t\t$this->populateData($cliente['Cliente']['login'], $cliente['Cliente']['raw_password']);\n\t\t// Envia requisição e armazena resposta\n\t\t$response = $this->sendRequest($this->fullURL, 'POST', $this->data);\n\t\t// Valida se os campos de resposta são válidos\n\t\t$this->assertNotNull($response);\n\t\t$this->assertNotEmpty($response);\n\t\t$this->assertNotNull($response['client_id']);\n\t\t$this->assertNotEmpty($response['client_id']);\n\t\t// Extrai os dados do cliente retornados\n\t\t$clientId = $response['client_id'];\n\t\t// Busca na base esse cliente, para compara se a senha foi gerada corretamente\n\t\t$dataBaseClient = $this->Cliente->findById($clientId);\n\t\t// Valida se encontrou o cliente com o id retornado\n\t\t$this->assertNotNull($dataBaseClient);\n\t\t$this->assertNotEmpty($dataBaseClient);\n\t\t// Valida os dados da base com o objeto do cliente \n\t\t$this->assertEquals($cliente['Cliente']['tipo'], $dataBaseClient['Cliente']['tipo']);\n\t\t$this->assertEquals($cliente['Cliente']['login'], $dataBaseClient['Cliente']['login']);\n\t\t$this->assertEquals($cliente['Cliente']['senha'], $dataBaseClient['Cliente']['senha']);\n\t\t$this->assertEquals($cliente['Cliente']['ativo'], $dataBaseClient['Cliente']['ativo']);\n\t}", "public function testCreate(): void\n {\n $factory = new ClientFactory(\n $cache = $this->createMock(CacheItemPoolInterface::class),\n $logger = new BufferingLogger()\n );\n\n $client = $factory->create(\n [\n 'client_id' => uniqid(),\n 'client_secret' => uniqid(),\n 'project' => uniqid(),\n 'scope' => ['manage_project']\n ],\n [\n 'locale' => 'de',\n 'languages' => ['de']\n ]\n );\n\n static::assertInstanceOf(Client::class, $client);\n }", "public function testQuarantineCreate()\n {\n\n }", "public function testAuthenticationsInweboIdPut()\n {\n }", "public function testAdd()\n\t{\n\t\t$client = static::createClient(array(), array(\n\t\t 'PHP_AUTH_USER' => 'jr',\n\t\t 'PHP_AUTH_PW' => 'jr',\n\t\t));\n\t\t$client->followRedirects();\n\n\t\t$crawler = $client->request('GET', '/client/add');\n\n\t\t$form = $crawler->selectButton('flyd_dashboardbundle_client_save')->form();\n\n\t\t// définit certaines valeurs\n\t\t$form['flyd_dashboardbundle_client[name]'] \t\t= 'Entreprise de test';\n\t\t$form['flyd_dashboardbundle_client[job]'] \t\t= 'Job de test';\n\n\t\t// soumet le formulaire\n\t\t$crawler = $client->submit($form);\n\n\n\t\t$this->assertEquals(1, $crawler->filter('html:contains(\"Client bien enregistré.\")')->count());\n\t}", "public function testReAuthoriseAccountUsingPATCH()\n {\n }", "public function testLogin(){\n $client00 = static::createClient();\n $client00->request('POST', '/booking/calendar');\n \n $this->assertEquals(\n 405, //METHOD NOT ALLOWED\n $client00->getResponse()->getStatusCode()\n );\t\t\n \n $client01 = $this->createAuthorizedClient();\n $client01->request('POST','/booking/calendar');\n $this->assertEquals(\n 405, //METHOD NOT ALLOWED\n $client01->getResponse()->getStatusCode()\n );\t\n //Requests con GET\n $client02 = $this->createAuthorizedClient();\n $client02->request('GET','/booking/calendar');\n $this->assertEquals(\n 200, //OK\n $client02->getResponse()->getStatusCode()\n ); \n //Usuario no autorizado\n $client03 = static::createClient();\n $client03->request('GET', '/booking/calendar');\n \n //redireccionado porque no tiene los permisos necesarios\n $this->assertTrue($client03->getResponse()->isRedirect()); \n }", "public function testBaseUserACL() :void\n {\n $generator = Factory::create();\n\n $data = [\n \"params\" => [\n \"name\" => $generator->name\n ],\n \"options\" => [\n \"simplifiedParams\" => true\n ]\n ];\n\n /** Login with right password **/\n $response = $this->json('POST', '/auth/authenticate', ['email' => env('BASE_USER_EMAIL'), 'password' => env('BASE_USER_PASSWORD')]);\n $tokenResult = $response->decodeResponseJson();\n $response->assertResponseStatus(200);\n\n /** Free port acl **/\n $response = $this->json('GET', '/auth/me', [], ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $result = $response->decodeResponseJson();\n $this->assertEquals($result['email'], env('BASE_USER_EMAIL'));\n\n /** Posting artist as a admin **/\n $response = $this->json('POST', '/contexts/admin/artists', $data, ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $result = $response->decodeResponseJson();\n $response->assertResponseStatus(201);\n /** This means the records is to be inserted and admin has access **/\n //$this->assertEquals($result['message'], 'Transaction commit failed because the transaction has been marked for rollback only.');\n }", "public function testGetAuthorizationRoleSubjectgrants()\n {\n }", "public function contract_belongs_to_client()\n {\n $this->assertEquals(self::$contract->client->id, self::$contract->client_id);\n }", "public function testClientIsCreatedWithConstructor(): void\r\n {\r\n $tx = $this->getTx();\r\n $client = $this->client;\r\n\r\n $transaction = new Transaction($tx, $client);\r\n $client = $transaction->getClient();\r\n\r\n $this->assertNotNull($client);\r\n $this->assertEquals(\\FOXRP\\Rippled\\Client::class, \\get_class($client));\r\n }", "public function testValidCredentialsInHeader()\n {\n $server = $this->getTestServer();\n $headers = array('HTTP_AUTHORIZATION' => 'Basic '.base64_encode('Test Client ID:TestSecret'), 'REQUEST_METHOD' => 'POST');\n $params = array('grant_type' => 'client_credentials');\n $request = new Request(array(), $params, array(), array(), array(), $headers);\n $token = $server->grantAccessToken($request, new Response());\n\n $this->assertNotNull($token);\n $this->assertArrayHasKey('access_token', $token);\n $this->assertNotNull($token['access_token']);\n\n // create using PHP Authorization Globals\n $headers = array('PHP_AUTH_USER' => 'Test Client ID', 'PHP_AUTH_PW' => 'TestSecret', 'REQUEST_METHOD' => 'POST');\n $params = array('grant_type' => 'client_credentials');\n $request = new Request(array(), $params, array(), array(), array(), $headers);\n $token = $server->grantAccessToken($request, new Response());\n\n $this->assertNotNull($token);\n $this->assertArrayHasKey('access_token', $token);\n $this->assertNotNull($token['access_token']);\n }", "public function testPutAuthorizationRoleUsersAdd()\n {\n }", "public function run()\n {\n // Default user\n\n $user = User::first();\n\n Client::insert([\n // Authorization Code grant client\n\n [\n 'id' => '229f9dfd-8a91-4dfa-90db-00ba966ed1ef',\n 'user_id' => $user->id,\n 'name' => 'dev-auth-code-grant-client',\n 'secret' => 'BZQVA2FBPNPhAc0BtqCjndQVSA1TQUJMzJADJrdt',\n 'redirect' => '',\n 'personal_access_client' => false,\n 'password_client' => false,\n 'revoked' => false,\n 'created_at' => now(),\n 'updated_at' => now(),\n ],\n\n // Password grant client\n\n [\n 'id' => '1bf0b03e-1c62-45e3-bf18-c5989cb43dde',\n 'user_id' => $user->id,\n 'name' => 'dev-password-grant-client',\n 'secret' => 'S8xqNQxus0L4cCJA8lQ4nKLayIQjfc4YOXz9MSWp',\n 'redirect' => '',\n 'personal_access_client' => false,\n 'password_client' => true,\n 'revoked' => false,\n 'created_at' => now(),\n 'updated_at' => now(),\n ],\n ]);\n\n // Personal access token client\n\n $client = new Client();\n // $client->id = '84031037-7d29-491a-99ac-340ff14e1001';\n $client->user_id = $user->id;\n $client->name = 'dev-personal-client';\n $client->secret = 'ViSqJ6if7ZgUK6ysaBZF61MKb8bYPRIdjOTzK7oT';\n $client->redirect = '';\n $client->personal_access_client = true;\n $client->password_client = false;\n $client->revoked = false;\n $client->save();\n\n $personal_client = new PersonalAccessClient();\n $personal_client->client()->associate($client);\n $client->save();\n }", "public function testEdit()\n\t{\n\t\t$client = static::createClient(array(), array(\n\t\t 'PHP_AUTH_USER' => 'jr',\n\t\t 'PHP_AUTH_PW' => 'jr',\n\t\t));\n\t\t$client->followRedirects();\n\n\t\t// On clique sur le lien entreprise de test\n\t\t$crawler = $client->request('GET', '/clients');\n\t\t$link = $crawler->filter('.bloc__title a:contains(\"Entreprise de test\")')->first()->link();\n\t\t$crawler = $client->click($link);\n\t\t//On vérifie qu'on est bien sur la bonne page\n\t\t$this->assertEquals(1, $crawler->filter('h1:contains(\"Entreprise de test\")')->count());\n\n\t\t// On clique sur le bouton modifier\n\t\t$link = $crawler->filter('.btn--edit')->first()->link();\n\t\t$crawler = $client->click($link);\n\t\t//On vérifie qu'on est bien sur la bonne page\n\t\t$this->assertEquals(1, $crawler->filter('.breadcrumb:contains(\"Modifier\")')->count()); \n\n\t\t// On modifie le métier\n\t\t$form = $crawler->selectButton('Enregistrer')->form();\n\t\t$form['flyd_dashboardbundle_client[job]'] \t= 'Job de test modifié ' . rand(1,4);\n\t\t$crawler = $client->submit($form);\t\n\n\n\t\t//On vérifie que ça a marché\n\t\t$this->assertEquals(1, $crawler->filter('html:contains(\"Client bien enregistré.\")')->count());\n\n\t}", "public function client_setter_and_getter()\n {\n // Arrange\n $service = new Service;\n $client = new Client;\n\n // Act\n $returned = $service->setClient($client)->getClient();\n\n // Assert\n $this->assertEquals($client, $returned);\n }", "public function testGetToken()\n {\n $client = new Client();\n\n $body['grant_type'] = \"client_credentials\";\n $user = 'testclient';\n $pass = 'testpass';\n $res = $client->post($this->baseUrl . '/token', [ \n 'form_params' => $body,\n 'auth' => [$user, $pass] \n ]);\n\n $code = $res->getStatusCode();\n $body = $res->getBody();\n\n $this->assertEquals(200, $code);\n }", "public function testDeleteNotExistentClient() {\n\n // Generate user\n $user = factory(App\\User::class)->create();\n\n $this->actingAs($user)\n ->get('/clients/' . rand(1,999) . '/delete')\n ->seeJson(['success' => false]);\n\n }", "public function setClientId(string $clientId): AuthorizationInterface;", "public function testSetClient()\n {\n $change = new Change($this->p4);\n $change->setDescription('test')->save();\n $oldClient = $change->getClient();\n\n $this->p4->getService('clients')->grab();\n $change->setClient($this->p4->getClient());\n $change->save();\n $this->p4->getService('clients')->release();\n\n $this->assertFalse(\n $oldClient == Change::fetch($change->getId(), $this->p4)->getClient(),\n 'expected client change to have saved.'\n );\n }", "public function testAclMiddleware():void\n {\n $generator = Factory::create();\n $em = $this->em();\n $conn = $em->getConnection();\n $conn->beginTransaction();\n try {\n /** Register user via the guest endpoint **/\n $response = $this->json(\n 'POST', '/contexts/guest/users',\n [\n \"params\" => [\n 'email' => $generator->safeEmail,\n 'firstName'=> $generator->firstName,\n 'middleInitial'=>'X',\n 'lastName'=> $generator->lastName,\n 'age' => $generator->randomNumber(2),\n 'gender' => 1,\n 'weight' => 210,\n 'height' => 180.34,\n 'phoneNumber' => \"+1 757-571-2711\",\n 'lifestyle' => 1,\n 'password' => $this->password,\n 'job' => $generator->jobTitle,\n 'address' => $generator->address,\n 'locale' => \"en\"\n ],\n \"options\" => [\n \"email\" => false,\n \"g-recaptcha-response-omit\" => env('GOOGLE_RECAPTCHA_SKIP_CODE') /** skipping recaptcha with a key **/\n ]\n ]\n );\n $userResult = $response->decodeResponseJson();\n $this->assertArrayHasKey('id', $userResult);\n\n /** Making sure user has email verification entry **/\n $emailVerificationRepository = new EmailVerificationRepository();\n $emailVerification = $emailVerificationRepository->findOneBy([\"user\" => $userResult[\"id\"]]);\n $this->assertEquals( $emailVerification->getUser()->getId(), $userResult['id']);\n $this->assertEquals( $emailVerification->getVerified(), false);\n\n /** Email verification endpoint **/\n $response = $this->json(\n 'PUT', \"/contexts/guest/email-verification/\" . $emailVerification->getId(),\n [\n \"params\" => [ \"verified\" => true ],\n \"options\" => [ \"simplifiedParams\" => true ]\n ]\n );\n $response->assertResponseStatus(200);\n\n /** Making sure user has user has role entry of 'user' **/\n $userRepository = new UserRepository();\n /** @var User $user */\n $user = $userRepository->find($userResult[\"id\"]);\n $this->assertEquals( $user->getId(), $userResult['id']);\n $this->assertEquals( $user->getRoles()[0]->getName(), 'user');\n\n /** Login with wrong password **/\n $response = $this->json('POST', '/auth/authenticate', ['email' => $user->getEmail(), 'password' => 'wrong_password']);\n $response->assertResponseStatus(401);\n\n /** Login with right password **/\n $response = $this->json('POST', '/auth/authenticate', ['email' => $user->getEmail(), 'password' => $this->password]);\n $tokenResult = $response->decodeResponseJson();\n $response->assertResponseStatus(200);\n\n /** Free port acl **/\n $response = $this->json('GET', '/auth/me', [], ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $result = $response->decodeResponseJson();\n $this->assertEquals($result['email'], $user->getEmail());\n\n $data = [\n \"params\" => [\n \"name\" => $generator->name\n ],\n \"options\" => [\n \"simplifiedParams\" => true\n ]\n ];\n\n /** Posting artist as a quest **/\n $response = $this->json('POST', '/contexts/guest/artists', $data, ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $response->assertResponseStatus(405);\n\n /** Posting artist as a user **/\n $response = $this->json('POST', '/contexts/user/artists', $data, ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $result = $response->decodeResponseJson();\n $response->assertResponseStatus(500);\n\n /** Posting artist as a admin **/\n $response = $this->json('POST', '/contexts/admin/artists', $data, ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $response->assertResponseStatus(403);\n\n /** Posting artist as a super-admin **/\n $response = $this->json('POST', '/contexts/super-admin/artists', $data, ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $response->assertResponseStatus(404);\n $conn->rollBack();\n } catch (Exception $e) {\n $conn->rollBack();\n throw $e;\n }\n }", "public function testPutAuthorizationRole()\n {\n }", "public function testAddEditDeleteOffer()\n {\n \t$characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t $charactersLength = strlen($characters);\n\t $name = '';\n\t for ($i = 0; $i < 8; $i++) {\n\t $name .= $characters[rand(0, $charactersLength - 1)];\n\t }\n\n \t$new_offer = array(\n \t\t\"name\" => $name,\n \t\t\"price\" => 123,\n \t\t\"nb_videos\" => 123,\n \t\t\"storage_allowed\" => 123\n \t);\n\n $client = static::createClient();\n $crawler = $client->request(\n \t'POST',\n \t'/offer/add',\n\t\t $new_offer,\n\t\t array(),\n\t\t array(\n\t\t 'HTTP_X-Auth-Token' => 'b9030ce5a6a63aa9afab0ca69dbc7349fce8c1e46c3795d956',\n\t\t 'CONTENT_TYPE' => 'application/json',\n\t\t )\n\t\t);\n\n\t\t$response = $client->getResponse()->getContent();\n\t\t$response = json_decode($response);\n\n // Response must be JSON\n $this->assertTrue(\n\t\t $client->getResponse()->headers->contains(\n\t\t 'Content-Type',\n\t\t 'application/json'\n\t\t ),\n\t\t 'the \"Content-Type\" header is \"application/json\"' // optional message shown on failure\n\t\t);\n\n // The HTTP status code must be 200\n\t\t$this->assertEquals(\n\t\t 201,\n\t\t $client->getResponse()->getStatusCode()\n\t\t);\n\n // Response must be JSON\n $this->assertTrue(\n\t\t isset( $response->{'offer_id'} ),\n\t\t 'the \"offer_id\" data is part of the response' // optional message shown on failure\n\t\t);\n\n\t\t// Get the ID of the newly created offer\n\t\t$offer_id = $response->{'offer_id'};\n\n\n\n\t\t// Test the edition of the offer\n\t\t// Set the new Data\n\t\t// Set a name for the offer\n \t$characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t $charactersLength = strlen($characters);\n\t $name = '';\n\t for ($i = 0; $i < 8; $i++) {\n\t $name .= $characters[rand(0, $charactersLength - 1)];\n\t }\n\n \t$new_data = array(\n \t\t\"name\" => $name,\n \t\t\"price\" => 456,\n \t\t\"nb_videos\" => 0,\n \t\t\"storage_allowed\" => 456\n \t);\n\n $crawler = $client->request(\n \t'PUT',\n \t'/offer/'.$offer_id.'/edit',\n\t\t $new_data,\n\t\t array(),\n\t\t array(\n\t\t 'HTTP_X-Auth-Token' => 'b9030ce5a6a63aa9afab0ca69dbc7349fce8c1e46c3795d956',\n\t\t 'CONTENT_TYPE' => 'application/json',\n\t\t )\n\t\t);\n\n // Response must be JSON\n $this->assertTrue(\n\t\t $client->getResponse()->headers->contains(\n\t\t 'Content-Type',\n\t\t 'application/json'\n\t\t ),\n\t\t 'the \"Content-Type\" header is \"application/json\"' // optional message shown on failure\n\t\t);\n\n // The HTTP status code must be 200\n\t\t$this->assertEquals(\n\t\t 200,\n\t\t $client->getResponse()->getStatusCode()\n\t\t);\n\n\n\n\t\t// Test the deletion of the offer\n $crawler = $client->request(\n \t'DELETE',\n \t'/offer/'.$offer_id.'/delete',\n\t\t array(),\n\t\t array(),\n\t\t array(\n\t\t 'HTTP_X-Auth-Token' => 'b9030ce5a6a63aa9afab0ca69dbc7349fce8c1e46c3795d956',\n\t\t 'CONTENT_TYPE' => 'application/json',\n\t\t )\n\t\t);\n\n\t\t$response = $client->getResponse()->getContent();\n\t\t$response = json_decode($response);\n\n // The HTTP status code must be 200\n\t\t$this->assertEquals(\n\t\t 204,\n\t\t $client->getResponse()->getStatusCode()\n\t\t);\n }", "function testClient()\n{\n\t//adds client to the database\n\tcreateClient('The Business', '1993-06-20', 'LeRoy', 'Jenkins', '1234567890', 'leeroy@gmail.com', 'The streets', 'Las Vegas', 'NV');\n\t\n\t//gets client's information\n\techo \"<h3>Client Info</h3>\";\n\ttest(\"SELECT ClientContact.*, StartDate FROM Client, ClientContact WHERE (Client.clientname=ClientContact.clientname)\");\n\t\n\t//adds client purchase to the database\n\tcreateClientPurchase('The Business','0000-00-00 10-30-00', '2015-02-14');\n\t\n\t//gets client's purchase information\n\techo \"<h3>Client Purchases</h3>\";\n\ttest(\"SELECT * FROM ClientPurchases\");\n\n\t//gets client's information with their purchase information\n\techo \"<h3>Client Info With Purchases</h3>\";\n\ttest(\"SELECT ClientContact.*, StartDate, PurchaseID, HoursPurchased, PurchaseDate FROM Client, ClientContact, ClientPurchases WHERE (Client.clientname=ClientContact.clientname) AND (Client.clientname=ClientPurchases.clientname)\");\n\t\n\t//deletes client's purchase\n\tdeleteClientPurchase('The Business');\n\ttest(\"SELECT * FROM ClientPurchases\");\n\n\t//deletes client\n\tdeleteClient('The Business');\n\ttest(\"SELECT * FROM Client c, ClientPurchases cp, ClientContact cc WHERE (c.ClientName=cp.ClientName)\");\t\n}", "public function testCreateUserGranted()\n {\n $client = $this->createAuthorizedClient('admin');\n $crawler = $client->request('GET', '/issue/view/' . $this->getReference('issue-test')->getCode());\n\n // Page has Comments form\n $this->assertEquals(1, $crawler->filter('html:contains(\"Comments\")')->count());\n\n $form = $crawler->selectButton('Add')->form([\n 'sbts_comment_form[body]' => 'Test comment',\n ]);\n\n $client->followRedirects(true);\n $crawler = $client->submit($form);\n\n // Added comment appear on the page\n $this->assertEquals(1, $crawler->filter('html:contains(\"Test comment\")')->count());\n }", "public function testDeleteClientWithInvalidId() {\n\n // Generate user\n $user = factory(App\\User::class)->create();\n\n $this->actingAs($user)\n ->get('/clients/' . str_shuffle('ab12') . '/delete')\n ->seeJson(['success' => false]);\n\n }", "public function testGetClient()\n {\n $transport = new Transport();\n $this->assertInstanceOf(Client::class, $transport->getClient());\n }", "public function testValidateResourceWithValidToken()\n {\n $client = new OAuth2\\Client(CLIENT_ID, CLIENT_SECRET, OAuth2\\Client::AUTH_TYPE_AUTHORIZATION_BASIC);\n\n // Here you can define any other params that you want to pass.\n $params = array();\n\n // Generating Token\n $tokenResponse = $client->getAccessToken(TOKEN_URI, OAuth2\\Client::GRANT_TYPE_CLIENT_CREDENTIALS, $params);\n $httpCode = $tokenResponse['code'];\n \n $client->setAccessToken($tokenResponse['result']['access_token']);\n // Setting Up the access Token Type to client Object\n $client->setAccessTokenType(OAuth2\\Client::ACCESS_TOKEN_BEARER);\n\n // Finally fetching resource from Resource URL using access token\n $resourceResponse = $client->fetch('https://api.fronter.com/clients/'.CLIENT_ID);\n $checkClientId = $resourceResponse['result']['client_id'];\n\n $this->assertEquals($checkClientId, CLIENT_ID);\n }", "public function testCanGetClientFromResource()\n {\n $invoicesResource = $this->client->Invoices();\n\n $this->assertInstanceOf(\n Client::class,\n $invoicesResource->getClient()\n );\n }", "public function testGetRequest()\n {\n $admin = $this->getAdminUser();\n $user = factory(\\App\\User::class)->create();\n $grade = factory(\\App\\Grade::class)->create();\n $userGrade = UserGrade::create([\n 'user_id' => $user->id,\n 'grade_id' => $grade->id\n ]);\n $response = $this->actingAs($user)->call('GET', \"/api/user/{$user->id}/grade\");\n $this->assertEquals(200, $response->status());\n }", "public function testDeleteAuthorizationRole()\n {\n }", "public function testDeleteChallenge()\n {\n }", "public function testDeleteNetworkMerakiAuthUser()\n {\n }", "public function createUpdateClient(): void\n {\n $ClientEntity = new Client();\n foreach ($this->fieldsToFill as $field) {\n $result = $this->getCreateInput(\n sprintf(self::INSERT_BASE_MESSAGE, $field['label']),\n [ClientValidation::class, sprintf('isValid%s', $field['fieldName'])],\n [$ClientEntity, sprintf('set%s', $field['fieldName'])]\n );\n if (!$result) {\n print \"Returning to the main menu.\";\n\n return;\n }\n }\n $this->repository->persist($ClientEntity);\n print \"New client registered with success!\\n\";\n }", "public function testCreateClientAsVisitor() {\n\n $this->withoutMiddleware();\n\n // Generate client\n $client = factory(App\\Client::class)->make();\n\n $this->post('/clients/create', ['name' => $client->name, 'phone' => $client->phone_number])\n ->seeJson(['success' => false]);\n\n }", "public function testPutAuthorizationDivision()\n {\n }", "public function testSetCreationClient() {\n\n $obj = new Collaborateurs();\n\n $obj->setCreationClient(true);\n $this->assertEquals(true, $obj->getCreationClient());\n }", "public function testDeleteEnrollmentRequest()\n {\n }", "public function testApproveValidIdGetForHrAndAdmin() {\n\t\t$this->setExpectedException('MethodNotAllowedException');\n\t\t$userRoles = [\n\t\t\tUSER_ROLE_USER | USER_ROLE_HUMAN_RESOURCES => 'hr',\n\t\t\tUSER_ROLE_USER | USER_ROLE_ADMIN => 'admin',\n\t\t];\n\t\t$opt = [\n\t\t\t'method' => 'GET',\n\t\t];\n\t\tforeach ($userRoles as $userRole => $userPrefix) {\n\t\t\t$userInfo = [\n\t\t\t\t'role' => $userRole,\n\t\t\t\t'prefix' => $userPrefix,\n\t\t\t];\n\t\t\t$this->applyUserInfo($userInfo);\n\t\t\t$this->generateMockedController();\n\t\t\t$url = [\n\t\t\t\t'controller' => 'deferred',\n\t\t\t\t'action' => 'approve',\n\t\t\t\t'4',\n\t\t\t];\n\t\t\tif (!empty($userPrefix)) {\n\t\t\t\t$url['prefix'] = $userPrefix;\n\t\t\t\t$url[$userPrefix] = true;\n\t\t\t}\n\t\t\t$this->testAction($url, $opt);\n\t\t}\n\t}", "public function testCreateNetworkMerakiAuthUser()\n {\n }", "public function createClient(): Client;", "public function testProjectProjectIDUsersUserIDRolePut()\n {\n }", "public function editclientAction()\n {\n $identity = Zend_Auth::getInstance()->getIdentity();\n $role = $identity->role;\n\n $request = $this->getRequest();\n $service = new App_Service_Member();\n\n // A client is displayed read-only if the user is not a normal member (e.g., if they're a\n // treasurer).\n $this->view->readOnly = ($role === App_Roles::TREASURER);\n\n if ($this->_hasParam('id')) {\n // Editing an existing client.\n $id = $this->_getParam('id');\n\n $this->view->pageTitle = $this->view->readOnly ? 'View Client' : 'Edit Client';\n $this->view->form = new Application_Model_Member_ClientForm($id, $this->view->readOnly);\n\n if (!$request->isPost()) {\n // If the user hasn't submitted the form yet, load client info from the database.\n $this->view->form->setClient($service->getClientById($id));\n $this->view->form->setHouseholders($service->getHouseholdersByClientId($id));\n $this->view->form->setEmployers($service->getEmployersByClientId($id));\n }\n } else {\n // Adding a new client.\n if ($this->view->readOnly) {\n throw new DomainException('Only members can add new clients');\n }\n\n $this->view->pageTitle = 'New Client';\n $this->view->form = new Application_Model_Member_ClientForm();\n\n $client = new Application_Model_Impl_Client();\n\n // Possibly using name information from map action.\n $client\n ->setFirstName(App_Formatting::emptyToNull($this->_getParam('firstName')))\n ->setLastName(App_Formatting::emptyToNull($this->_getParam('lastName')));\n\n if (!$request->isPost() && $this->_hasParam('street') && $this->_hasParam('city')\n && $this->_hasParam('state')) {\n // Using address information from map action.\n $addr = new Application_Model_Impl_Addr();\n $addr\n ->setStreet($this->_getParam('street'))\n ->setApt(App_Formatting::emptyToNull($this->_getParam('apt')))\n ->setCity($this->_getParam('city'))\n ->setState($this->_getParam('state'))\n ->setZip(App_Formatting::emptyToNull($this->_getParam('zip')))\n ->setParish(App_Formatting::emptyToNull($this->_getParam('parish')));\n\n $client->setCurrentAddr($addr);\n }\n\n $this->view->form->setClient($client);\n }\n\n // If this isn't a post request, then we're done.\n if (!$request->isPost()) {\n return;\n }\n\n // Ensure that only members can edit clients.\n if ($this->view->readOnly) {\n throw new DomainException('Only members can edit existing clients');\n }\n\n // Re-add existing form data.\n $data = $request->getPost();\n\n $this->view->form->preValidate($data);\n $this->view->form->populate($data);\n\n // If the user just submitted the form, make some validation goodness happen.\n // If the user requested that we add or remove a household member or employer, or if form\n // validation failed, then we're done here.\n if ($this->view->form->handleAddRemoveRecords($data)\n || !$this->view->form->isValid($data)) {\n return;\n }\n\n // If we passed validation, insert or update the database as required.\n $client = $this->view->form->getClient();\n\n $changedHouseholders = $this->view->form->getChangedHouseholders();\n $changedEmployers = $this->view->form->getChangedEmployers();\n\n $user = new Application_Model_Impl_User();\n $user->setUserId(Zend_Auth::getInstance()->getIdentity()->user_id);\n\n if ($this->_hasParam('id')) {\n // Update an existing client.\n $removedHouseholders = $this->view->form->getRemovedHouseholders();\n $removedEmployers = $this->view->form->getRemovedEmployers();\n\n if ($this->view->form->isMaritalStatusChange() && $client->isMarried()) {\n // If an existing client gets married, then we need to track the creation date and\n // creating user for the newly entered spouse.\n $client->getSpouse()\n ->setUser($user)\n ->setCreatedDate(date('Y-m-d'));\n }\n\n if ($client->isDoNotHelp() && $client->getDoNotHelp()->getUser() === null) {\n // If an existing client was added to the do-not-help list, then we need to track\n // the date added and adding user.\n $client->getDoNotHelp()\n ->setUser($user)\n ->setDateAdded(date('Y-m-d'));\n }\n\n $client = $service->editClient(\n $client,\n $changedHouseholders,\n $changedEmployers,\n $removedHouseholders,\n $removedEmployers,\n $this->view->form->isMove(),\n $this->view->form->isMaritalStatusChange()\n );\n } else {\n // Add a new client.\n $client\n ->setUser($user)\n ->setCreatedDate(date('Y-m-d'));\n\n if ($client->isMarried()) {\n $client->getSpouse()\n ->setUser($user)\n ->setCreatedDate(date('Y-m-d'));\n }\n\n $client = $service->createClient($client, $changedHouseholders, $changedEmployers);\n }\n\n $this->_helper->redirector('viewClient', App_Resources::MEMBER, null, array(\n 'id' => $client->getId(),\n ));\n }", "public function testEditUser()\n {\n }", "public function testEditAuthenticated()\n {\n // cria um usuário\n $user = factory(User::class)->create([\n 'password' => bcrypt('123456'),\n ]);\n\n // cria um contato\n $contact = factory(Contact::class)->make();\n\n // salva um contato para o usuário\n $user->contacts()->save($contact);\n\n // tenta fazer o login\n $response = $this->post('/api/auth/login', [\n 'email' => $user->email,\n 'password' => '123456'\n ]);\n\n // verifica se foi gerado o token\n $response->assertJson([\n \"status\" => \"success\",\n ]);\n\n // pega token de resposta\n $token = $response->headers->get('Authorization');\n\n // tenta salvar o um contato\n $response = $this->withHeaders([\n 'Authorization' => \"Bearer $token\",\n ])->put('/api/v1/contacts/' . $contact->id, [\n 'id' => $contact->id,\n 'name' => 'Testando contatos',\n 'email' => $contact->email,\n 'telephone' => 123456789,\n ]);\n\n $response->assertStatus(200);\n }", "public function testPrivs()\n {\n return true; ///< Every client sees only it's own information\n }", "public function testQuarantineDeleteById()\n {\n\n }", "public function testMembersAndClientsCount()\n {\n $afiveone_id = $this->accounts->insert([\n 'subdomain' => 'afiveone',\n 'url' => 'https://afiveone.activecollab.com',\n 'license_key' => '123',\n ])[0];\n\n $this->assertEquals(1, $this->accounts->count());\n $this->assertEquals(1, $afiveone_id);\n\n list ($owner_id, $member_id, $subcontractor_id, $client1_id, $client2_id) = $this->users->insert(\n [ 'acid' => 1001, 'email' => 'owner@activecollab.com', 'role' => 'Owner' ],\n [ 'acid' => 1002, 'email' => 'member@activecollab.com', 'role' => 'Member' ],\n [ 'acid' => 1003, 'email' => 'subcontractor@activecollab.com', 'role' => 'Subcontractor' ],\n [ 'acid' => 1004, 'email' => 'client1@activecollab.com', 'role' => 'Client' ],\n [ 'acid' => 1005, 'email' => 'client2@activecollab.com', 'role' => 'Client' ]\n );\n\n $this->assertEquals(1, $owner_id);\n $this->assertEquals(2, $member_id);\n $this->assertEquals(3, $subcontractor_id);\n $this->assertEquals(4, $client1_id);\n $this->assertEquals(5, $client2_id);\n\n $afiveone_users = $this->accounts->usersBelongingTo(1);\n\n $this->assertInstanceOf('ActiveCollab\\Resistance\\Storage\\Relationship\\BelongingTo', $afiveone_users);\n\n $this->assertEquals(0, $this->accounts->getFieldValue(1, 'members_count'));\n $this->assertEquals(0, $this->accounts->getFieldValue(1, 'clients_count'));\n\n // ---------------------------------------------------\n // Add members\n // ---------------------------------------------------\n\n $afiveone_users->add($owner_id, $member_id, $subcontractor_id);\n\n $this->assertEquals(3, $this->accounts->getFieldValue(1, 'members_count'));\n $this->assertEquals(0, $this->accounts->getFieldValue(1, 'clients_count'));\n\n // ---------------------------------------------------\n // Add clients\n // ---------------------------------------------------\n\n $afiveone_users->add($client1_id, $client2_id);\n\n $this->assertEquals(3, $this->accounts->getFieldValue(1, 'members_count'));\n $this->assertEquals(2, $this->accounts->getFieldValue(1, 'clients_count'));\n\n // ---------------------------------------------------\n // Remove one member and one client\n // ---------------------------------------------------\n\n $afiveone_users->remove($subcontractor_id);\n $afiveone_users->remove($client1_id);\n\n $this->assertEquals(2, $this->accounts->getFieldValue(1, 'members_count'));\n $this->assertEquals(1, $this->accounts->getFieldValue(1, 'clients_count'));\n\n // ---------------------------------------------------\n // Clear\n // ---------------------------------------------------\n\n $afiveone_users->clear();\n\n $this->assertEquals(0, $this->accounts->getFieldValue(1, 'members_count'));\n $this->assertEquals(0, $this->accounts->getFieldValue(1, 'clients_count'));\n }", "public function testEdit()\n {\n $client = $this->createAuthorizedClient();\n $crawler = $client->request('GET', '/persona/1/edit');\n $form = $crawler->selectButton('Update')->form();\n $form['persona[Apellidos]'] = 'Testy';\n $crawler = $client->submit($form);\n $this->assertTrue($client->getResponse()->isRedirect());\n $crawler = $client->followRedirect();\n\n //edit teniendo en cuenta los datos de una persona\n $persona = self::$kernel->getContainer()->get('doctrine')->getRepository('App\\Entity\\Persona')->findOneBy(array(\n 'Nombre' => 'Celia',\n 'Apellidos' => 'Cruz',\n 'Cargo' => 'Boss',\n 'Correo' => 'celiaDead@gmail.com',\n 'Telefono' => '123456789',\n 'Local_id' => '1',\n 'Departamento' => '1',\n ));\n\n $personaID = $persona->getNumero_Empleado();\n $this->assertNotNull($personaID);\t//El cliente está insertado\n\n $crawler = $client->request('GET', '/persona/'.$personaID.'/edit');\n $form = $crawler->selectButton('Update')->form();\n $form['persona[Nombre]'] = 'Celia';\n $form['persona[Apellidos]'] = 'Cruz';\n $form['persona[Cargo]'] = 'Boss';\n $form['persona[Correo]'] = 'celiaDead@gmail.com';\n $form['persona[Telefono]'] = '123456665';\n $form['persona[Local_id]'] = '1';\n $form['persona[Departamento]'] = '1';\n\n $crawler = $client->submit($form);\n\n //verificacion de que se hayan cambiado los datos\n $personaVerificacion = self::$kernel->getContainer()->get('doctrine')->getRepository('App\\Entity\\Persona')->findOneBy(array(\n 'Nombre' => 'Celia',\n 'Apellidos' => 'Cruz',\n 'Cargo' => 'Boss',\n 'Correo' => 'celiaDead@gmail.com',\n 'Telefono' => '123456665',\n 'Local_id' => '1',\n 'Departamento' => '1',\n ));\n $this->assertNotNull($personaVerificacion);\n\n //persona que no existe\n $crawler = $client->request('GET', '/clientes/1246548788/edit');\n //no encuentra el archivo porque no existe\n $this->assertEquals(404, $client->getResponse()->getStatusCode()\n );\n }", "public function testAuthenticationsInweboIdGet()\n {\n }", "public function testParticipantsMePasswordPut()\n {\n }", "public function testGetClient()\n {\n $client = $this->object->getClient();\n\n $this->assertInstanceOf('GuzzleHttp\\ClientInterface', $client);\n $this->assertSame($this->client, $client);\n }", "public function testAuthorization(){\n $this->client->request('POST', '/api',[\n 'method' => 'createTransaction',\n 'user_id' => '0',\n 'token' => 'xxxxx',\n 'category_id' => '2',\n 'cost' => '123123',\n 'note' => 'asdadasgfa asfas ',\n ]);\n $data = json_decode($this->client->getResponse()->getContent(), true);\n $this->assertEquals(0, $data['success']);\n $this->assertEquals('User not found', $data['message']);\n\n $this->client->request('POST', '/api',[\n 'method' => 'createTransaction',\n 'user_id' => '-1',\n 'token' => 'xxxxx',\n 'category_id' => '2',\n 'cost' => '123123',\n 'note' => '',\n ]);\n $data = json_decode($this->client->getResponse()->getContent(), true);\n $this->assertEquals(0, $data['success']);\n $this->assertEquals('User not found', $data['message']);\n\n $this->client->request('POST', '/api',[\n 'method' => 'createTransaction',\n 'user_id' => '1',\n 'token' => 'xxxxx',\n 'category_id' => '2',\n 'cost' => '123123',\n 'note' => 'Test note',\n ]);\n $data = json_decode($this->client->getResponse()->getContent(), true);\n $this->assertEquals(0, $data['success']);\n $this->assertEquals('Request Fail,logout or sign in again', $data['message']);\n\n //Token of user already in database\n $this->client->request('POST', '/api',[\n 'method' => 'createTransaction',\n 'user_id' => '1',\n 'token' => '73a395f4b62a75ba12512e2d2b3b6dac',\n 'category_id' => '2',\n 'cost' => '123123',\n 'note' => 'Test note',\n ]);\n $data = json_decode($this->client->getResponse()->getContent(), true);\n $this->assertEquals(1, $data['success']);\n }", "public function testHexonetClient1()\n {\n $cl = CF::getClient([\n \"registrar\" => \"HEXONET\"\n ]);\n $this->assertInstanceOf(CL::class, $cl);\n }", "public function testNew()\n {\n $clientNoAuth = static::createClient();\n $clientNoAuth->request('GET', '/clientes/new');\n //redireccion a main\n $this->assertEquals(302, $clientNoAuth->getResponse()->getStatusCode());\n\n //caso con todo bien, redirección a /departamento/ y bien agregado el nuevo departamento.\n $client = $this->createAuthorizedClient();\n $crawler = $client->request('GET', '/persona/new');\n $form = $crawler->selectButton('Guardar')->form();\n $form['persona[Nombre]'] = 'Celia';\n $form['persona[Apellidos]'] = 'Cruz';\n $form['persona[Cargo]'] = 'Boss';\n $form['persona[Correo]'] = 'celiaDead@gmail.com';\n $form['persona[Telefono]'] = '123456789';\n $form['persona[Local_id]'] = '1';\n $form['persona[Departamento]'] = '1';\n\n $crawler = $client->submit($form);\n $this->assertTrue($client->getResponse()->isRedirect());\n $crawler = $client->followRedirect();\n }", "function testDeleteSecurity() \r\n\t{\r\n\t\t$dbh = $this->dbh;\r\n\t\t$anonymous = new AntUser($dbh, USER_ANONYMOUS); // should only be a member of the everyone group\r\n\r\n\t\t$obj = new CAntObject($dbh, \"customer\", null, $this->user);\r\n\t\t$obj->setValue(\"name\", \"my test\");\r\n\t\t$cid = $obj->save(false);\r\n\t\tunset($obj);\r\n\r\n\t\t$obj = new CAntObject($dbh, \"customer\", $cid, $anonymous);\r\n\t\t$this->assertFalse($obj->remove());\r\n\t\tunset($obj);\r\n\r\n\t\t$obj = new CAntObject($dbh, \"customer\", $cid, $this->user);\r\n\t\t$obj->remove();\r\n\t\t$obj->remove();\r\n\t}", "public function testCreateClientWithEmptyFields() {\n\n $this->withoutMiddleware();\n\n // Generate user\n $user = factory(App\\User::class)->create();\n\n $this->actingAs($user)\n ->post('/clients/create')\n ->seeJson(['success' => false]);\n\n }", "public function testCreateClientWithoutName() {\n\n $this->withoutMiddleware();\n\n // Generate user\n $user = factory(App\\User::class)->create();\n\n $this->actingAs($user)\n ->post('/clients/create', ['phone' => '0725433317'])\n ->seeJson(['success' => false]);\n\n }", "public function testDeleteRequest()\n {\n $admin = $this->getAdminUser();\n $userGrade = factory(\\App\\UserGrade::class)->create();\n $response = $this->actingAs($admin)->call(\"DELETE\", \"/api/user/{$userGrade->user_id}/grade/{$userGrade->id}\");\n $this->assertEquals(200, $response->status());\n }", "public function testCNRClient()\n {\n $cl = CF::getClient([\n \"registrar\" => \"CNR\"\n ]);\n $this->assertInstanceOf(CL::class, $cl);\n }", "public function testAuthenticationServiceAuthenticationUpdate()\n {\n }", "public function testAuthenticationsEmailIdPut()\n {\n }", "public function test_auth_code_redemption_with_scope() {\n\t\tstatic::$test_auth_code['scope'] = 'create update';\n\t\t$code = $this->set_auth_code();\n\t\t$response = $this->create_form( 'POST', \n\t\t\t\tarray(\n\t\t\t\t\t'grant_type' => 'authorization_code',\n\t\t\t\t\t'code' => $code,\n\t\t\t\t\t'client_id' => 'https://app.example.com',\n\t\t\t\t\t'redirect_uri' => 'https://app.example.com/redirect',\n\t\t\t\t)\n\t\t);\n\t\t$this->assertEquals( 200, $response->get_status(), 'Response: ' . wp_json_encode( $response ) );\n\t\t$data = $response->get_data();\n\t\t$this->assertArrayNotHasKey( 'access_token', $data );\n\t\t$this->assertEquals( \n\t\t\tarray( \n\t\t\t\t'me' => get_author_posts_url( static::$author_id ),\n\t\t\t), \n\t\t\t$data, \n\t\t\t'Response: ' . wp_json_encode( $data ) \n\t\t);\n\t\t// Reset Just in Case.\n\t\tunset( static::$test_auth_code['scope'] );\n\t}", "public function testGetNetworkMerakiAuthUser()\n {\n }", "public function testSetCodeClient() {\n\n $obj = new FichesControlesEntetes();\n\n $obj->setCodeClient(\"codeClient\");\n $this->assertEquals(\"codeClient\", $obj->getCodeClient());\n }", "public function create_contracts_for_one_legal_client()\n {\n $client_id = factory(Legal::class, 'active')->create()->client_id;\n factory(Contract::class, 'in_progress_legal', 2)->create(['client_id' => $client_id]);\n factory(Contract::class, 'finished_legal', 2)->create(['client_id' => $client_id]);\n }", "public function testEditUser()\n {\n\n }", "function set_laravel_passport_grant_client_token()\n {\n DB::table('oauth_clients')\n ->where('id', 2)\n ->update(['secret' => 'dLdsIf3nPMWJC4gOCNcsUn5pBSv5tTPSaU51Gu2F']);\n }", "public function testGetTokenWithValidClientId()\n {\n $client = new OAuth2\\Client(CLIENT_ID, CLIENT_SECRET, OAuth2\\Client::AUTH_TYPE_AUTHORIZATION_BASIC);\n\n // Here you can define any other params that you want to pass.\n $params = array();\n\n // Generating Token\n $tokenResponse = $client->getAccessToken(TOKEN_URI, OAuth2\\Client::GRANT_TYPE_CLIENT_CREDENTIALS, $params);\n $httpCode = $tokenResponse['code'];\n $this->assertEquals($httpCode, 200);\n }", "public function testGetReplenishmentById()\n {\n }", "public function edit(Client $client)\n {\n //\n }", "public function edit(Client $client)\n {\n //\n }", "public function edit(Client $client)\n {\n //\n }", "public function edit(Client $client)\n {\n //\n }", "public function edit(Client $client)\n {\n //\n }", "public function edit(Client $client)\n {\n //\n }", "public function edit(Client $client)\n {\n //\n }", "public function edit(Client $client)\n {\n //\n }", "public function edit(Client $client)\n {\n //\n }", "public function testGetAuthorizationPermissions()\n {\n }", "public function testCreateClientWithoutPhoneNumber() {\n\n $this->withoutMiddleware();\n\n // Generate one user and one client\n $user = factory(App\\User::class)->create();\n $client = factory(App\\Client::class)->make();\n\n $this->actingAs($user)\n ->post('/clients/create', ['name' => $client->name])\n ->seeJson(['success' => true]);\n\n }", "public function testAuthenticationServiceAuthenticationCreate()\n {\n }", "public function testDeleteRole()\n {\n }", "public function testRequestEnrollment()\n {\n }", "public function testImplicitClient()\n {\n $reqData = [\n 'response_type' => AccessToken::RESPONSE_IMPLICIT,\n 'client_id' => 1,\n 'scope' => 'default',\n 'redirect_uri' => ClientsSeeder::REDIRECT_URI_TEST_CLIENT,\n ];\n /** @var \\Tests\\Functional\\AuthTest $data */\n $data = $this->get('/authorize?'.\\http_build_query($reqData));\n\n $data->seeHeader('location');\n $url = \\parse_url($data->response->headers->get('location'));\n\n $this->assertContains('access_token', $url['fragment'], true);\n $this->assertContains('bearer', \\mb_strtolower($url['fragment']), true);\n $this->assertContains('token_type', $url['fragment'], true);\n $this->assertContains('expires_in', $url['fragment'], true);\n }", "public function actionCreateAdmin($client)\n {\t\t\n\t\tBaseActiveRecord::setClient($client);\n\t\n\t\t//create response\n\t\t$response = Yii::$app->response;\n\t\t\n\t\t//options for bcrypt\n\t\t$options = [\n\t\t\t'cost' => 12,\n\t\t];\n\t\t\n\t\t$password = 'mdavis';\n\t\t$hashedPass = password_hash($password, PASSWORD_BCRYPT, $options);\n\t\t\n\t\t//build user data\n\t\t$userData = [\n\t\t\t'UserCreatedUID' => 'command generated',\n\t\t\t'UserCreatedDate' => BaseActiveController::getDate(),\n\t\t\t'UserComments' => 'Dev Admin',\n\t\t\t'UserActiveFlag' => 1,\n\t\t\t'UserFirstName' => 'Michael',\n\t\t\t'UserLastName' => 'Davis',\n\t\t\t'UserPassword' => $hashedPass,\n\t\t\t'UserEmployeeType' => 'Employee',\n\t\t\t'UserCompanyName' => 'Southern Cross',\n\t\t\t'UserCompanyPhone' => '770-40-1746',\n\t\t\t'UserName' => 'mdavis',\n\t\t\t'UserAppRoleType' => 'Admin',\n\t\t\t'UserPhone' => '706-340-8368',\n\t\t];\n\t\t\n\t\t$scUser = new SCUser();\n\t\t$scUser->attributes = $userData;\n\t\t\n\t\tif($scUser->save())\n\t\t{\n\t\t\t//assign rbac role\n\t\t\t// $auth = Yii::$app->authManager;\n\t\t\t// if($userRole = $auth->getRole($scUser[\"UserAppRoleType\"]))\n\t\t\t// {\n\t\t\t\t// $auth->assign($userRole, $scUser[\"UserID\"]);\n\t\t\t// }\n\t\t\t//TODO add user project relationship\n\t\t}\n }", "public function testPostAuthorizationRole()\n {\n }", "public function testActivateForGuest(): void\n {\n // Request\n $response = $this->put('api/v1/outroCards/activate/1');\n\n // Check response status\n $response->assertStatus(401);\n }", "public function testDeleteUser()\n {\n }", "public function testGetAuthorizationRole()\n {\n }", "public function testCreateClientWithTooShortName() {\n\n $this->withoutMiddleware();\n\n // Generate user\n $user = factory(App\\User::class)->create();\n\n $this->actingAs($user)\n ->post('/clients/create', ['name' => 'ab'])\n ->seeJson(['success' => false]);\n\n }", "public function testAddAuthentication();", "public function testAddAnonymus()\n {\n \t$user = factory(User::class)->create()''\n \t$response = $this->get('add');\n \t$response->assertStatus(200);\n \n }", "public function testPatchAuthorizationRole()\n {\n }", "public function testCanSelfEditUser()\n {\n $faker = \\Faker\\Factory::create();\n $user = factory(User::class)->create();\n $user->activate();\n $newName = $faker->name;\n $newEmail = $faker->email;\n $newPass = bcrypt(\"newsecret\");\n Auth::login($user);\n \n $this->put('/api/v1/user/'.$user->id, ['name' => $newName], ['HTTP_X-Requested-With' => 'XMLHttpRequest'])\n ->assertJson([\n 'user' => [\n 'name' => $newName,\n 'email' => $user->email,\n ]\n ]);\n $this->put('/api/v1/user/'.$user->id, ['name' => $user->name, 'email' => $newEmail], ['HTTP_X-Requested-With' => 'XMLHttpRequest'])\n ->assertJson([\n 'user' => [\n 'name' => $user->name,\n 'email' => $newEmail,\n ]\n ]);\n $this->put('/api/v1/user/'.$user->id, ['password' => $newPass, 'password_confirmation' => $newPass], ['HTTP_X-Requested-With' => 'XMLHttpRequest'])\n ->assertJson([\n 'user' => [\n 'name' => $user->name,\n 'email' => $newEmail,\n ]\n ]);\n $this->assertDatabaseHas('users', [\n 'name' => $user->name,\n 'email' => $newEmail,\n ]);\n }", "public function testPutAuthorizationRoleUsersRemove()\n {\n }" ]
[ "0.6682855", "0.664292", "0.66278887", "0.6474675", "0.63155806", "0.619589", "0.6142597", "0.6067689", "0.6056032", "0.6029367", "0.60248876", "0.5914911", "0.5910681", "0.5909496", "0.5839494", "0.5836691", "0.58031607", "0.5800475", "0.58004636", "0.579917", "0.57944465", "0.5791261", "0.57847905", "0.57840407", "0.5775942", "0.5775267", "0.57692486", "0.5767239", "0.5732625", "0.5727718", "0.5724615", "0.5723401", "0.57201195", "0.57133555", "0.56932217", "0.5681009", "0.5680007", "0.5679698", "0.5678303", "0.5647726", "0.56403446", "0.5637181", "0.56364673", "0.5626028", "0.56191456", "0.56078744", "0.56034636", "0.55986345", "0.5594659", "0.559442", "0.55805075", "0.5579132", "0.5573491", "0.5568753", "0.55644995", "0.5551519", "0.5550813", "0.5549059", "0.5543139", "0.5542668", "0.55392194", "0.55326676", "0.5532142", "0.5528227", "0.5513893", "0.5510468", "0.5504483", "0.5502016", "0.54997134", "0.549944", "0.5495418", "0.5495002", "0.5494353", "0.5483945", "0.54837716", "0.54837716", "0.54837716", "0.54837716", "0.54837716", "0.54837716", "0.54837716", "0.54837716", "0.54837716", "0.54800254", "0.5476037", "0.547538", "0.5471324", "0.54703885", "0.5469755", "0.54696006", "0.54685014", "0.54582995", "0.5454546", "0.54534394", "0.5447338", "0.54438144", "0.5442283", "0.5442166", "0.54303974", "0.5428575" ]
0.7718429
0
/$query = $this>db>get('tb_collection'); return $query>result_array();
/$query = $this>db>get('tb_collection'); return $query>result_array();
public function getAllCollection() { return $this->db->get('tb_collection')->result_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function collection() {\n \t$db = $this->db;\n\t\t$sql = $this->sql();\n\t\t$rows = $db::execute($sql);\n\t\t$model = $this->model;\n\t\treturn new \\Collection($model::arrayFactoryFromRows($rows));\n\t}", "public function getCollection($table)\n {\n $sql = 'SELECT * FROM '.$table;\n $result = $this->db->query($sql);\n if($result){\n $ret = array();\n while($data = $result->fetch_assoc()){\n $ret[] = $data;\n }\n $result->close();\n return $ret;\n }else{\n return false;\n }\n }", "public function get_collections()\n\t{\t\t\n\t\t$query = $this->db->get('collections');\n\t\treturn $query->result_array();\n\t}", "public function getCollection() ;", "public function getAll() : Collection;", "public function fetchAll(){\r\n$table=$this->getTable();\r\nreturn $this->fetch_array($this->query(\"SELECT * FROM {$table}\"));\r\n}", "function get_all()\n {\n return $this->db->get($this->table)->result();\n }", "function dbcollection($query, $start = 0, $count = 20) {\n $resrows = array();\n $ii = 0;\n\n $result = dbquery($query . \" limit %d, %d\", $start, $count);\n while ($result && $row = dbfetch($result, DB_NUM)) {\n if (count($row) == 1) {\n // don't keep arrays\n $row = array_shift($row);\n }\n $resrows[$start + $ii] = $row;\n $ii++;\n }\n\n return $resrows;\n}", "function getTWord() {\n //printVar($idStr);\n $mongo = new MongoDB\\Driver\\Manager();\n $query = new MongoDB\\Driver\\Query([], []);\n $cursor = $mongo->executeQuery('callaut.av_search', $query);\n $posts = [];\n foreach ($cursor as $document) {\n //printVar($document);\n //die();\n array_push($posts, json_decode(MongoDB\\BSON\\toJSON(MongoDB\\BSON\\fromPHP($document))));\n \n }\n return $posts;\n \n }", "function get_all(){\n $this->load();\n return $this->query;\n }", "function db_get($sql) {\n $results = db_query($sql);\n $records = array();\n while($rec=db_fetch($results)) {\n $records[]=$rec;\n }\n return $records;\n}", "static function finda($collection, $query = array(), $options = array()) {\r\n\t\t$result = self::find($collection, $query, $options);\r\n\t\t$array = array();\r\n\t\tforeach ($result as $val) {\r\n\t\t\t$array[] = $val;\r\n\t\t}\r\n\t\treturn $array;\r\n\t}", "function get_data()\n\t{\n\t\t$query = $this->db->get(\"Testing\");\n\n\t\treturn $query;\n\t}", "public function queryselect() {\r\n // we should load the database (autoload)\r\n $this->load->database();\r\n $query = $this->db->query('SELECT * FROM crud');\r\n return $query->result_array();\r\n //$result = $query->result_array();\r\n //return $result;\r\n }", "function db_driver_result($resource)\n{\n global $_db;\n\n $results = array();\n while ($data = pg_fetch_array($resource, null, PGSQL_ASSOC)) {\n $results[] = $data;\n }\n\n return $results;\n}", "public function get()\n {\n return self::fetchAll();\n }", "public function fetchArray();", "public function fetchArray();", "public function fetchAll();", "public function fetchAll();", "public function fetchAll();", "public function fetchAll();", "static function finda($collection, $query = array(), $options = array()) {\n $result = self::find($collection, $query, $options);\n $array = array();\n foreach ($result as $val) {\n $array[] = $val;\n }\n return $array;\n }", "public function getCollection();", "public function getCollection();", "public function getCollection();", "public function getCollection();", "function dbGetAll(){\r\n global $db_query;\r\n return $db_query->fetchAll(PDO::FETCH_ASSOC); \r\n}", "public function query() {\n\t\treturn Documents::instance()->query();\n\t}", "function get_ttcollection_w($id){\n\t\t$sQuery=\"SELECT ttcollection_w.CollectionIdW,clientes.cli_des,ttcollection_w.CollectionTotalPayment,\n ttcollection_w.UserCode,ttcollection_w.CustCode,ttcollection_w.CollectionDate,ttcollection_w.CollectionNote,\n ttcollection_w.fecha_a,usuario.nombre,usuario.apellido\n FROM ttcollection_w\n INNER JOIN clientes ON ttcollection_w.CustCode = clientes.co_cli\n INNER JOIN usuario ON ttcollection_w.UserCode = usuario.usuario\n WHERE ttcollection_w.CollectionStatus = $id\";\n\t\t$result=mysql_query($sQuery) or die(mysql_error());\n\t\t$i=0;\n\t\twhile($row=mysql_fetch_array($result)){\n\t\t\tforeach($row as $key=>$value){\n\t\t\t\t$res_array[$i][$key]=$value;\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\treturn($res_array);\t\n\t}", "public function get(){\n\n if(is_null($this->columns)) $this->columns = ['*'];\n $select_statement = $this->grammer->compileSelect($this);\n \n \n $result = $this->connection->get($select_statement); \n \n if(!empty($this->model)){\n \n return $this->return_results_objects($result);\n\n }else{\n \n return $this->return_result_as_array($result);\n }\n \n }", "function retrieveAllRiver(){\n $data = $this->db->retrieveAllRiver();\n return $data;\n }", "function currentBlogs() {\n global $blogCollection;\n $result = $blogCollection->find()->sort(array(\"blogId\" => -1));\n\n //showMe((iterator_to_array($result)));\n\n $arrayOfBlogs = array();\n\n foreach($result as $key => $val) {\n //showMe($val['blogId']);\n //array_push($arrayOfBlogs, $val['blogId']);\n $arrayOfBlogs[$val['blogId']] = $val['blogId'];\n }\n\n return $arrayOfBlogs;\n}", "public function fetchAllForBase3();", "public function getCollection()\n {\n $collection = trim(str_replace('\\\\', '_', $this->collection), '_');\n return $this->$collection()\n ->setDatabase($this->database)\n ->setTable($this->table)\n ->setModel($this->model)\n ->set($this->getRows());\n }", "function fetch_array()\n {\n return mysql_fetch_array($this->_queryResource, MYSQL_ASSOC);\n }", "public function all(){ \n $arraytoret = array();\n $query='select *\n from Usuario';\n $results = $this->driver->exec($query);\n return $this->factory($results);\n}", "public function resultset(){\n\t\t$this->execute() ;\n\t\treturn $this->statement->fetchAll(PDO::FETCH_ASSOC) ;\n\t}", "public function getCollectionQuery(): Builder;", "public function fetchAll(){\n\t\treturn $this->instance->fetchAll();\n\t}", "public function getCollection()\n {\n\n $State = State::select('tbl_state.*');\n return $State->get();\n }", "function d_getCollectionData($collection) {\n\t$result = array();\n\tforeach($collection as $v) {\n\t\t$item = array();\n\t\tforeach($v as $k2 => $v2) {\n\t\t\t$item[ $k2 ] = $v2;\n\t\t}\n\t\tif (isset($v->fid)) $item['fid'] = $v->fid; \n\t\t$result[] = $item;\n\t}\n\treturn $result;\n}", "public function get_all ();", "public function fetchQuery(){\n $bag=array();\n while($row=$this->select->fetch_assoc()){\n array_push($bag,$row);\n // or $bag[]=$row\n }\n return $bag;\n }", "public function retrieveAll(){\r\n $conn = new ConnectionManager();\r\n $pdo = $conn->getConnection();\r\n \r\n\r\n // Add your codes here\r\n\r\n\r\n return $result;\r\n }", "function getTopics()\n {\n\n $topics = \"SELECT * from topics\";\n $topicsresult = $this->ds->select($topics); \n //print_r($topicsresult);\n return $topicsresult;\n }", "function get_all_records(){\n\t\tglobal $db;\n\t\t$sql=\"SELECT * FROM $this->table order by id asc\";\n\t\t$db->query($sql);\n\t\t$row=$db->fetch_assoc_all();\n\t\treturn $row;\n\t}", "public function resultaSet(){\n $this->execute();\n return $this->statemet->fetchAll(PDO::FETCH_OBJ);\n }", "public function fetch()\n {\n return (array)$this->query();\n }", "function db_fetch($results) {\r\n\r\n\treturn mysql_fetch_array($results);\r\n\t\r\n}", "function all_users()\r\n\t{\r\n\t\t//$this->mongo_db->select('*');\r\n\t\t//$this->mongo_db->from('users');\r\n\t\t// \r\n\t\t//$query = $this->mongo_db->get();\r\n\t\t//return $query->result_array();\r\n\t\t\r\n\t\t//connect to mongodb collection (i.e., table) named as ‘surfinme_index’\r\n\t\t$collection \t= $this->mongo_db->db->selectCollection('settings');\r\n \t//selecting records from the collection - surfinme_index\r\n \t$result\t\t= $collection->find();\r\n\t\tforeach($result as $data) \r\n\t\t{ \r\n\t\t\t//display the records \r\n\t\t\tvar_dump($data);\r\n\t\t} \r\n\t\t\r\n\t}", "function get()\n\t{\n\t\tif (empty($this->use_db)) $this->use_db = false; //use default connection\n\t\t$this->sql = 'SELECT * FROM ' . $this->table;\n\t\t$this->apply_filters();\n\t\t$this->apply_sort();\n\t\treturn $this->fetch_records();\n\t}", "public function getAll(){\n\t\treturn $this->db->get($this->table);\n\t}", "function obtenerArray(){\r\n\t\treturn mysql_fetch_array( $this->rs() );\r\n\t}", "function recuperer_bsm_entier(){\n global $db;\n $sql = \"SELECT * FROM bsm \";\n $req = $db->prepare($sql);\n $req-> execute();\n $results = array();\n while($rows = $req->fetchObject()){\n $results[] = $rows;\n }\n return $results;\n}", "public function results()\r\n\t{\r\n\t\treturn $this->model->get($this->select);\r\n\t}", "public function results(): array;", "function get_all() {\n\t\t\n\t\t$query = $this->db->get('admin');\n $q = $query->result_array();\n\t return $q;\n\t}", "function AllReponces(){\n return $this->db->get($this->reponce)->result();\n }", "public function fetchAll()\n {\n }", "public function fetch_objects($query);", "public function fetchResult();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "public function queryAll();", "protected function getCollection($collection){\r\n return $this->{$this->db}->$collection;\r\n }", "public function get(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n\t\t\t\t\t $condition = array(\"ide\" =>$this->ide);\n return $this->db->getRows(array(\"where\"=>$condition,\"return_type\"=>\"single\"));\n\t\t\t\t\t }", "function FetchIT()\n {\n $sql=\"SELECT * FROM INVT_T_INSP_HEAD\";\n return $this->db->query($sql, $return_object = TRUE)->result_array(); \n }", "public function index()\n {\n $items = DB::collection('crudevolutions')->get();\n return $items;\n\n }", "public function fetch_array($result_set){\n return mysql_fetch_array($result_set);\n \n }", "public function myFindAll(){\n // $queryBuilder = $this->createQueryBuilder('a');\n // $query = $queryBuilder->getQuery();\n // $results = $query->getResult();\n return $this->createQueryBuilder('a')->getQuery()->getResult;\n }", "function get_all(){\r\n\t\t$rows = array();\r\n\t\twhile($row = $this->get_row()){\r\n\t\t\t$rows[] = $row;\r\n\t\t}\r\n\t\treturn $rows;\r\n\t}", "public function get(){\n\t\t\t\t\t $this->db->setTablename($this->tablename);\n\t\t\t\t\t ;\n return $this->db->getRows(array(\"where\"=>$condition,\"return_type\"=>\"single\"));\n\t\t\t\t\t }", "public function fetch_arrays($query);", "public function all(){\n\n $a= parent::bdd()->query(\"SELECT * FROM auteur\");\n $b= $a->fetchall(\\PDO::FETCH_OBJ);\n\n return $b;\n\n }", "public function getAll(){\n\t\t\t//return $this->db->get('item'); \n\t\t}", "public abstract function fetchAll();", "public function getSocialConnectItemsList()\n {\n //collection\n\n //SELECT * FROM MYTABLE\n $collection = $this->_ItemFactory->getCollection();\n $collection->addFieldToFilter(\"status\", 1);\n $collection->setOrder(\"Sort_Order\", 'DESC');\n //$collection->getSelect() use print query\n return ($collection->count()) ? $collection : null;\n }" ]
[ "0.7017653", "0.6901569", "0.67929614", "0.67762166", "0.6691817", "0.6596962", "0.65945613", "0.656072", "0.65531754", "0.6491643", "0.64909357", "0.64734757", "0.6461831", "0.64484036", "0.64322704", "0.64143544", "0.6387219", "0.6387219", "0.6370071", "0.6370071", "0.6370071", "0.6370071", "0.63623214", "0.6361543", "0.6361543", "0.6361543", "0.6361543", "0.63438225", "0.6293875", "0.62910885", "0.6281451", "0.6262955", "0.62409645", "0.62355155", "0.6235351", "0.6230681", "0.62283164", "0.6216061", "0.62063146", "0.61937815", "0.6193704", "0.61829877", "0.61823493", "0.61766", "0.6172874", "0.6169389", "0.6168754", "0.6145155", "0.6139771", "0.6139256", "0.61389476", "0.6137504", "0.61343926", "0.6129058", "0.6128322", "0.6119216", "0.6117046", "0.6109156", "0.6106244", "0.6103591", "0.60930073", "0.60929567", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.6086466", "0.60791487", "0.6069692", "0.60670525", "0.6062191", "0.60595435", "0.60595", "0.60540897", "0.6052989", "0.605116", "0.6049122", "0.60442597", "0.6037334", "0.6034776" ]
0.7420564
0
Builds tabs of the Wizard.
Создает вкладки мастера.
function buildTabs() { $this->_formBuilt = true; // Here we get all page names in the controller $pages = array(); $myName = $current = $this->getAttribute('id'); while (null !== ($current = $this->controller->getPrevName($current))) { $pages[] = $current; } $pages = array_reverse($pages); $pages[] = $current = $myName; while (null !== ($current = $this->controller->getNextName($current))) { $pages[] = $current; } // Here we display buttons for all pages, the current one's is disabled foreach ($pages as $pageName) { $disabled = ($pageName == $myName ? array('disabled' => 'disabled') : array()); $tabs[] = $this->createElement('submit', $this->getButtonName($pageName), ucfirst($pageName), array('class' => 'flat') + $disabled); } $this->addGroup($tabs, 'tabs', null, '&nbsp;', false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createTabs() {}", "private function createTab()\n {\n try {\n if (LengowMain::compareVersion()) {\n $tabParent = new Tab();\n $tabParent->name[Configuration::get('PS_LANG_DEFAULT')] = 'Lengow';\n $tabParent->module = 'lengow';\n $tabParent->class_name = 'AdminLengow';\n $tabParent->id_parent = 0;\n $tabParent->add();\n } else {\n $tabParent = new Tab(Tab::getIdFromClassName('AdminCatalog'));\n $tab = new Tab();\n $tab->name[Configuration::get('PS_LANG_DEFAULT')] = 'Lengow';\n $tab->module = 'lengow';\n $tab->class_name = 'AdminLengowHome14';\n $tab->id_parent = $tabParent->id;\n $tab->add();\n $tabParent = $tab;\n }\n foreach ($this->tabs as $name => $values) {\n if (_PS_VERSION_ < '1.5' && $values['name'] === 'AdminLengowHome') {\n continue;\n }\n $tab = new Tab();\n if (_PS_VERSION_ < '1.5') {\n $tab->class_name = $values['name'] . '14';\n $tab->id_parent = $tabParent->id;\n } else {\n $tab->class_name = $values['name'];\n $tab->id_parent = $tabParent->id;\n $tab->active = $values['active'];\n }\n $tab->module = $this->lengowModule->name;\n $languages = Language::getLanguages(false);\n foreach ($languages as $language) {\n $tab->name[$language['id_lang']] = LengowMain::decodeLogMessage($name, $language['iso_code']);\n }\n $tab->add();\n LengowMain::log(\n LengowLog::CODE_INSTALL,\n LengowMain::setLogMessage('log.install.install_tab', array('class_name' => $tab->class_name))\n );\n }\n return true;\n } catch (Exception $e) {\n return false;\n }\n }", "private function _createTab()\r\n {\r\n $response = true;\r\n\r\n // First check for parent tab\r\n $parentTabID = Tab::getIdFromClassName('AdminFieldMenu');\r\n\r\n if ($parentTabID) {\r\n $parentTab = new Tab($parentTabID);\r\n } else {\r\n $parentTab = new Tab();\r\n $parentTab->active = 1;\r\n $parentTab->name = array();\r\n $parentTab->class_name = \"AdminFieldMenu\";\r\n foreach (Language::getLanguages() as $lang){\r\n $parentTab->name[$lang['id_lang']] = \"FIELDTHEMES\";\r\n }\r\n $parentTab->id_parent = 0;\r\n $parentTab->module = '';\r\n $response &= $parentTab->add();\r\n }\r\n// Check for parent tab2\r\n\t\t\t$parentTab_2ID = Tab::getIdFromClassName('AdminFieldMenuSecond');\r\n\t\t\tif ($parentTab_2ID) {\r\n\t\t\t\t$parentTab_2 = new Tab($parentTab_2ID);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$parentTab_2 = new Tab();\r\n\t\t\t\t$parentTab_2->active = 1;\r\n\t\t\t\t$parentTab_2->name = array();\r\n\t\t\t\t$parentTab_2->class_name = \"AdminFieldMenuSecond\";\r\n\t\t\t\tforeach (Language::getLanguages() as $lang) {\r\n\t\t\t\t\t$parentTab_2->name[$lang['id_lang']] = \"FieldThemes Configure\";\r\n\t\t\t\t}\r\n\t\t\t\t$parentTab_2->id_parent = $parentTab_2->id;\r\n\t\t\t\t$parentTab_2->module = '';\r\n\t\t\t\t$response &= $parentTab_2->add();\r\n\t\t\t}\r\n\t\t\t// Created tab\r\n $tab = new Tab();\r\n $tab->active = 1;\r\n $tab->class_name = \"AdminFieldBrandSlider\";\r\n $tab->name = array();\r\n foreach (Language::getLanguages() as $lang){\r\n $tab->name[$lang['id_lang']] = \"Configuge brands\";\r\n }\r\n $tab->id_parent = $parentTab_2->id;\r\n $tab->module = $this->name;\r\n $response &= $tab->add();\r\n\r\n return $response;\r\n }", "protected function init_tabs() {\r\n\t\t$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'firstrun' ), $_SERVER['REQUEST_URI'] );\r\n\r\n\t\tadd_action( 'qc_settings_head', 'qc_status_colors_css' );\r\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );\r\n\r\n\t\t$this->tabs->add( 'general', __( 'General', APP_TD ) );\r\n\r\n\t\t$this->tab_sections['general']['main'] = array(\r\n\t\t\t'title' => __( 'General Settings', APP_TD ),\r\n\t\t\t'fields' => array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => __( 'Permissions', APP_TD ),\r\n\t\t\t\t\t'type' => 'radio',\r\n\t\t\t\t\t'name' => 'assigned_perms',\r\n\t\t\t\t\t'values' => array(\r\n\t\t\t\t\t\t'protected' => __( 'Users can only view their own tickets and tickets they are assigned to.', APP_TD ),\r\n\t\t\t\t\t\t'read-only' => __( 'Users can view all tickets.', APP_TD ),\r\n\t\t\t\t\t\t'read-write' => __( 'Users can view and updated all tickets.', APP_TD ),\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => __( 'Lock Site from Visitors', APP_TD ),\r\n\t\t\t\t\t'name' => 'lock_site',\r\n\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t'desc' => __( 'Yes', APP_TD ),\r\n\t\t\t\t\t'tip' => __( 'Visitors will be asked to login, and will not be able to browse site. Also content of the sidebars and menus will be hidden.', APP_TD ),\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t);\r\n\r\n\t\t$this->tab_sections['general']['states'] = array(\r\n\t\t\t'title' => __( 'States', APP_TD ),\r\n\t\t\t'fields' => array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => __( 'Default State', APP_TD ),\r\n\t\t\t\t\t'desc' => __( 'This state will be selected by default when creating a ticket.', APP_TD ),\r\n\t\t\t\t\t'type' => 'select',\r\n\t\t\t\t\t'sanitize' => 'absint',\r\n\t\t\t\t\t'name' => 'ticket_status_new',\r\n\t\t\t\t\t'values' => $this->ticket_states(),\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => __( 'Resolved State', APP_TD ),\r\n\t\t\t\t\t'desc' => __( 'Tickets in this state are assumed to no longer need attention.', APP_TD ),\r\n\t\t\t\t\t'type' => 'select',\r\n\t\t\t\t\t'sanitize' => 'absint',\r\n\t\t\t\t\t'name' => 'ticket_status_closed',\r\n\t\t\t\t\t'values' => $this->ticket_states(),\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t);\r\n\t\t$this->tab_sections['general']['colors'] = array(\r\n\t\t\t'fields' => $this->status_colors_options(),\r\n\t\t\t'renderer' => array( $this, 'render_status_colors' ),\r\n\t\t);\r\n\r\n\t\t$this->tab_sections['general']['modules'] = array(\r\n\t\t\t'title' => __( 'Modules', APP_TD ),\r\n\t\t\t'fields' => array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => __( 'Enable Modules', APP_TD ),\r\n\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t'name' => 'modules',\r\n\t\t\t\t\t'values' => array(\r\n\t\t\t\t\t\t'assignment' => __( 'Assignment', APP_TD ),\r\n\t\t\t\t\t\t'attachments' => __( 'Attachments', APP_TD ),\r\n\t\t\t\t\t\t'categories' => __( 'Categories', APP_TD ),\r\n\t\t\t\t\t\t'changesets' => __( 'Changesets', APP_TD ),\r\n\t\t\t\t\t\t'milestones' => __( 'Milestones', APP_TD ),\r\n\t\t\t\t\t\t'priorities' => __( 'Priorities', APP_TD ),\r\n\t\t\t\t\t\t'tags' => __( 'Tags', APP_TD ),\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'tip' => __( 'Choose the modules that you want to use on your site.', APP_TD ),\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t);\r\n\r\n\t}", "public function registerTabs()\n {\n\n Tab::put('promotion.promotion-code', function (TabItem $tab) {\n $tab->key('promotion.promotion-code.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::promotion.promotion-code._fields');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.product.cards._fields');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.image')\n ->label('avored::system.images')\n ->view('avored::catalog.product.cards.images');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.property')\n ->label('avored::system.property')\n ->view('avored::catalog.product.cards.property');\n });\n\n // Tab::put('catalog.product', function (TabItem $tab) {\n // $tab->key('catalog.product.attribute')\n // ->label('avored::system.tab.attribute')\n // ->view('avored::catalog.product.cards.attribute');\n // });\n\n /****** CATALOG CATEGORY TABS *******/\n Tab::put('catalog.category', function (TabItem $tab) {\n $tab->key('catalog.category.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.category._fields');\n });\n\n /****** CATALOG PROPERTY TABS *******/\n Tab::put('catalog.property', function (TabItem $tab) {\n $tab->key('catalog.property.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.property._fields');\n });\n\n /****** CATALOG ATTRIBUTE TABS *******/\n Tab::put('catalog.attribute', function (TabItem $tab) {\n $tab->key('catalog.attribute.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.attribute._fields');\n });\n\n /******CMS PAGES TABS *******/\n Tab::put('cms.page', function (TabItem $tab) {\n $tab->key('cms.page.info')\n ->label('avored::system.basic_info')\n ->view('avored::cms.page._fields');\n });\n\n /******ORDER ORDER STATUS TABS *******/\n Tab::put('order.order-status', function (TabItem $tab) {\n $tab->key('order.order-status.info')\n ->label('avored::system.basic_info')\n ->view('avored::order.order-status._fields');\n });\n\n /****** CUSTOMER GROUPS TABS *******/\n Tab::put('user.customer-group', function (TabItem $tab) {\n $tab->key('user.customer-group.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer-group._fields');\n });\n\n Tab::put('user.customer', function (TabItem $tab) {\n $tab->key('user.customer.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer._fields');\n });\n\n Tab::put('user.customer', function (TabItem $tab) {\n $tab->key('user.customer.address')\n ->label('avored::system.addresses')\n ->view('avored::user.customer._addresses');\n });\n\n Tab::put('user.address', function (TabItem $tab) {\n $tab->key('user.customer.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer.show');\n });\n Tab::put('user.address', function (TabItem $tab) {\n $tab->key('user.customer.address')\n ->label('avored::system.addresses')\n ->view('avored::user.address._fields');\n });\n\n /******USER ADMIN USER TABS *******/\n Tab::put('user.staff', function (TabItem $tab) {\n $tab->key('user.staff.info')\n ->label('avored::system.basic_info')\n ->view('avored::user.staff._fields');\n });\n Tab::put('user.subscriber', function (TabItem $tab) {\n $tab->key('user.subscriber.info')\n ->label('avored::system.basic_info')\n ->view('avored::user.subscriber._fields');\n });\n\n /******SYSTEM CURRENCY TABS *******/\n Tab::put('system.currency', function (TabItem $tab) {\n $tab->key('system.currency.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.currency._fields');\n });\n\n /******SYSTEM STATE TABS *******/\n Tab::put('system.state', function (TabItem $tab) {\n $tab->key('system.state.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.state._fields');\n });\n\n /******SYSTEM ROLE TABS *******/\n Tab::put('system.role', function (TabItem $tab) {\n $tab->key('system.role.info')\n ->label('avored::system.basic_info')\n ->view('avored::system.role._fields');\n });\n\n /******SYSTEM ROLE TABS *******/\n Tab::put('system.language', function (TabItem $tab) {\n $tab->key('system.language.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.language._fields');\n });\n\n /******SYSTEM CONFIGURATION TABS *******/\n Tab::put('system.configuration', function (TabItem $tab) {\n $tab->key('system.configuration.basic')\n ->label('avored::system.basic_configuration')\n ->view('avored::system.configuration.cards.basic');\n });\n\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.user')\n // ->label('avored::system.tab.user_configuration')\n // ->view('avored::system.configuration.cards.user');\n // });\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.tax')\n // ->label('avored::system.tax_configuration')\n // ->view('avored::system.configuration.cards.tax');\n // });\n\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.shipping')\n // ->label('avored::system.tab.shipping_configuration')\n // ->view('avored::system.configuration.cards.shipping');\n // });\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.payment')\n // ->label('avored::system.tab.payment_configuration')\n // ->view('avored::system.configuration.cards.payment');\n // });\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: border properties');\r\n\r\n $borderpainted[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $borderpainted[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($borderpainted, 'borderpainted', 'Display the border:');\r\n\r\n $this->addElement('text', 'borderclass', 'CSS class:', array('size' => 32));\r\n\r\n $borderstyle['style'] =& $this->createElement('select',\r\n 'style', 'style',\r\n array('solid' => 'Solid',\r\n 'dashed' => 'Dashed',\r\n 'dotted' => 'Dotted',\r\n 'inset' => 'Inset',\r\n 'outset' => 'Outset'));\r\n $borderstyle['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 2));\r\n $borderstyle['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($borderstyle, 'borderstyle', null, ' ');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: run demo');\r\n\r\n $this->addElement('static', 'progressBar',\r\n 'Your progress meter looks like:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('reset','process'));\r\n }", "private function installModuleTabs()\n {\n foreach ($this->admin_tabs as $value) {\n @copy(_PS_MODULE_DIR_ . $this->name . '/logo.png', _PS_IMG_DIR_ . 't/' . $value['class'] . '.png');\n $parent_tab = new Tab();\n $parent_tab->name[$this->context->language->id] = $this->l($value['title']);\n $parent_tab->class_name = $value['class'];\n $parent_tab->id_parent = 0; // Home tab\n $parent_tab->module = $this->name;\n $parent_tab->add();\n \n if (isset($value['children'])) {\n foreach ($value['children'] as $k => $v) {\n $tab = new Tab();\n // Need a foreach for the language\n foreach (Language::getLanguages(true) as $lang)\n $tab->name[$lang['id_lang']] = $this->l($v);\n \n $tab->class_name = $k;\n $tab->id_parent = $parent_tab->id;\n $tab->module = $this->name;\n $tab->add();\n }\n \n foreach ($value['hidden'] as $k => $v) {\n $tab = new Tab();\n // Need a foreach for the language\n foreach (Language::getLanguages(true) as $lang)\n $tab->name[$lang['id_lang']] = $this->l($v);\n \n $tab->class_name = $k;\n $tab->id_parent = - 1;\n $tab->module = $this->name;\n $tab->add();\n }\n }\n }\n \n return true;\n }", "private function _createTab()\r\n {\r\n $response = true;\r\n\r\n // First check for parent tab\r\n $parentTabID = Tab::getIdFromClassName('AdminFieldMenu');\r\n\r\n if ($parentTabID) {\r\n $parentTab = new Tab($parentTabID);\r\n } else {\r\n $parentTab = new Tab();\r\n $parentTab->active = 1;\r\n $parentTab->name = array();\r\n $parentTab->class_name = \"AdminFieldMenu\";\r\n foreach (Language::getLanguages() as $lang){\r\n $parentTab->name[$lang['id_lang']] = \"Fieldthemes\";\r\n }\r\n $parentTab->id_parent = 0;\r\n $parentTab->module = '';\r\n $response &= $parentTab->add();\r\n }\r\n\t// Check for parent tab2\r\n\t\t\t$parentTab_2ID = Tab::getIdFromClassName('AdminFieldMenuSecond');\r\n\t\t\tif ($parentTab_2ID) {\r\n\t\t\t\t$parentTab_2 = new Tab($parentTab_2ID);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$parentTab_2 = new Tab();\r\n\t\t\t\t$parentTab_2->active = 1;\r\n\t\t\t\t$parentTab_2->name = array();\r\n\t\t\t\t$parentTab_2->class_name = \"AdminFieldMenuSecond\";\r\n\t\t\t\tforeach (Language::getLanguages() as $lang) {\r\n\t\t\t\t\t$parentTab_2->name[$lang['id_lang']] = \"FieldThemes Configure\";\r\n\t\t\t\t}\r\n\t\t\t\t$parentTab_2->id_parent = $parentTab->id;\r\n\t\t\t\t$parentTab_2->module = '';\r\n\t\t\t\t$response &= $parentTab_2->add();\r\n\t\t\t}\r\n\t\t\t// Created tab\r\n $tab = new Tab();\r\n $tab->active = 1;\r\n $tab->class_name = \"AdminFieldFeaturedProductSlider\";\r\n $tab->name = array();\r\n foreach (Language::getLanguages() as $lang){\r\n $tab->name[$lang['id_lang']] = \"Configure featured products\";\r\n }\r\n $tab->id_parent = $parentTab_2->id;\r\n $tab->module = $this->name;\r\n $response &= $tab->add();\r\n\r\n return $response;\r\n }", "public function register_tabs() {\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/base-form-tab.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/captcha.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/active-campaign.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/get-response.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/mailchimp.php' );\n\n\t\t$tabs = apply_filters( 'jet-engine/dashboard/form-tabs', array(\n\t\t\tnew Captcha(),\n\t\t\tnew Active_Campaign(),\n\t\t\tnew Get_Response(),\n\t\t\tnew Mailchimp(),\n\t\t) );\n\n\t\tforeach ( $tabs as $tab ) {\n\t\t\tif ( $tab instanceof Base_Form_Tab ) {\n\t\t\t\t$this->register_tab( $tab );\n\t\t\t}\n\t\t}\n\t}", "private function _createTab()\r\n {\r\n $response = true;\r\n\r\n // First check for parent tab\r\n $parentTabID = Tab::getIdFromClassName('AdminFieldMenu');\r\n\r\n if ($parentTabID) {\r\n $parentTab = new Tab($parentTabID);\r\n } else {\r\n $parentTab = new Tab();\r\n $parentTab->active = 1;\r\n $parentTab->name = array();\r\n $parentTab->class_name = \"AdminFieldMenu\";\r\n foreach (Language::getLanguages() as $lang){\r\n $parentTab->name[$lang['id_lang']] = \"Fieldthemes\";\r\n }\r\n $parentTab->id_parent = 0;\r\n $parentTab->module = '';\r\n $response &= $parentTab->add();\r\n }\r\n// Check for parent tab2\r\n\t\t\t$parentTab_2ID = Tab::getIdFromClassName('AdminFieldMenuSecond');\r\n\t\t\tif ($parentTab_2ID) {\r\n\t\t\t\t$parentTab_2 = new Tab($parentTab_2ID);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$parentTab_2 = new Tab();\r\n\t\t\t\t$parentTab_2->active = 1;\r\n\t\t\t\t$parentTab_2->name = array();\r\n\t\t\t\t$parentTab_2->class_name = \"AdminFieldMenuSecond\";\r\n\t\t\t\tforeach (Language::getLanguages() as $lang) {\r\n\t\t\t\t\t$parentTab_2->name[$lang['id_lang']] = \"FieldThemes Configure\";\r\n\t\t\t\t}\r\n\t\t\t\t$parentTab_2->id_parent = $parentTab->id;\r\n\t\t\t\t$parentTab_2->module = '';\r\n\t\t\t\t$response &= $parentTab_2->add();\r\n\t\t\t}\r\n\t\t\t// Created tab\r\n $tab = new Tab();\r\n $tab->active = 1;\r\n $tab->class_name = \"AdminFieldSpecialProduct\";\r\n $tab->name = array();\r\n foreach (Language::getLanguages() as $lang){\r\n $tab->name[$lang['id_lang']] = \"Configure specials products\";\r\n }\r\n $tab->id_parent = $parentTab_2->id;\r\n $tab->module = $this->name;\r\n $response &= $tab->add();\r\n\r\n return $response;\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: save PHP/CSS code');\r\n\r\n $code[] =& $this->createElement('checkbox', 'P', null, 'PHP');\r\n $code[] =& $this->createElement('checkbox', 'C', null, 'CSS');\r\n $this->addGroup($code, 'phpcss', 'PHP and/or StyleSheet source code:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('next','apply'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: main properties');\r\n\r\n $shape[] =& $this->createElement('radio', null, null, 'Horizontal', '1');\r\n $shape[] =& $this->createElement('radio', null, null, 'Vertical', '2');\r\n $this->addGroup($shape, 'shape', 'Shape:');\r\n\r\n $way[] =& $this->createElement('radio', null, null, 'Natural', 'natural');\r\n $way[] =& $this->createElement('radio', null, null, 'Reverse', 'reverse');\r\n $this->addGroup($way, 'way', 'Direction:');\r\n\r\n $autosize[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $autosize[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($autosize, 'autosize', 'Best size:');\r\n\r\n $psize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $psize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $psize['left'] =& $this->createElement('text',\r\n 'left', 'left',\r\n array('size' => 4));\r\n $psize['top'] =& $this->createElement('text',\r\n 'top', 'top',\r\n array('size' => 4));\r\n $psize['position'] =& $this->createElement('text',\r\n 'position', 'position',\r\n array('disabled' => 'true'));\r\n $psize['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'bgcolor',\r\n array('size' => 7));\r\n $this->addGroup($psize, 'progresssize',\r\n 'Size, position and color:', ' ');\r\n\r\n $this->addElement('text', 'rAnimSpeed',\r\n array('Animation speed :',\r\n '(0-1000 ; 0:fast, 1000:slow)'));\r\n $this->addRule('rAnimSpeed',\r\n 'Should be between 0 and 1000',\r\n 'rangelength', array(0,1000), 'client');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('back','apply','process'));\r\n }", "function __construct()\n {\n\t $this->tabs = array( \n//\t array ( 'tab_id' => 'properties',\t\t'tab_op' => 'administration.customization_properties.edit', \t'tab_name' => 'Application properties'),\n\t array ( 'tab_id' => 'fields',\t\t\t'tab_op' => 'administration.customization_fields.edit', \t\t'tab_name' => 'Field properties'),\n\t array ( 'tab_id' => 'searches', \t\t'tab_op' => 'administration.customization_searches.edit',\t\t'tab_name' => 'Search filters'),\n\t array ( 'tab_id' => 'results', \t\t\t'tab_op' => 'administration.customization_results.edit',\t\t'tab_name' => 'Search results'),\n\t array ( 'tab_id' => 'bulk',\t\t\t\t'tab_op' => 'administration.customization_bulk.edit', \t\t\t'tab_name' => 'Bulk form'),\t \n\t array ( 'tab_id' => 'view', \t\t\t'tab_op' => 'administration.customization_view.edit',\t\t\t'tab_name' => 'View form'),\n\t array ( 'tab_id' => 'edit', \t\t\t'tab_op' => 'administration.customization_edit.edit',\t\t\t'tab_name' => 'Edit form'),\n\t array ( 'tab_id' => 'linked', \t\t\t'tab_op' => 'administration.customization_linked.edit',\t\t\t'tab_name' => 'Linked applications'),\n\t array ( 'tab_id' => 'linked_view', \t\t'tab_op' => 'administration.customization_linked_view.edit',\t'tab_name' => 'Linked view form'),\n\t array ( 'tab_id' => 'popup_searches', \t'tab_op' => 'administration.customization_popup_searches.edit',\t'tab_name' => 'Popup search filters'),\n\t array ( 'tab_id' => 'popup_results', \t'tab_op' => 'administration.customization_popup_results.edit',\t'tab_name' => 'Popup search results'),\n\t array ( 'tab_id' => 'popup_view', \t\t'tab_op' => 'administration.customization_popup_view.edit',\t\t'tab_name' => 'Popup view form'),\n\t array ( 'tab_id' => 'popup_edit', \t\t'tab_op' => 'administration.customization_popup_edit.edit',\t\t'tab_name' => 'Popup edit form')\n\t ); \n\n\t\tparent::__construct();\n }", "private function createTablesTab()\n {\n $tab = $this->createTab(\n 'tables_tab',\n '__responsive_tab_tables__',\n [\n 'attributes' => [\n 'autoScroll' => true,\n ],\n ]\n );\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 200]);\n $fieldSetTables = $this->createFieldSet(\n 'tables_fieldset',\n '__responsive_tab_tables_fieldset_tables__',\n ['attributes' => $attributes]\n );\n\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'panel-table-header-bg',\n '@panel-table-header-bg',\n $this->themeColorDefaults['panel-table-header-bg']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'panel-table-header-color',\n '@panel-table-header-color',\n $this->themeColorDefaults['panel-table-header-color']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'table-row-bg',\n '@table-row-bg',\n $this->themeColorDefaults['table-row-bg']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'table-row-color',\n '@table-row-color',\n $this->themeColorDefaults['table-row-color']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'table-row-highlight-bg',\n '@table-row-highlight-bg',\n $this->themeColorDefaults['table-row-highlight-bg']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'table-header-bg',\n '@table-header-bg',\n $this->themeColorDefaults['table-header-bg']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'table-header-color',\n '@table-header-color',\n $this->themeColorDefaults['table-header-color']\n )\n );\n\n $tab->addElement($fieldSetTables);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 200]);\n $fieldSetBadges = $this->createFieldSet(\n 'badges_fieldset',\n '__responsive_tab_tables_fieldset_badges__',\n ['attributes' => $attributes]\n );\n\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-discount-bg',\n '@badge-discount-bg',\n $this->themeColorDefaults['badge-discount-bg']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-discount-color',\n '@badge-discount-color',\n $this->themeColorDefaults['badge-discount-color']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-newcomer-bg',\n '@badge-newcomer-bg',\n $this->themeColorDefaults['badge-newcomer-bg']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-newcomer-color',\n '@badge-newcomer-color',\n $this->themeColorDefaults['badge-newcomer-color']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-recommendation-bg',\n '@badge-recommendation-bg',\n $this->themeColorDefaults['badge-recommendation-bg']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-recommendation-color',\n '@badge-recommendation-color',\n $this->themeColorDefaults['badge-recommendation-color']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-download-bg',\n '@badge-download-bg',\n $this->themeColorDefaults['badge-download-bg']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-download-color',\n '@badge-download-color',\n $this->themeColorDefaults['badge-download-color']\n )\n );\n\n $tab->addElement($fieldSetBadges);\n\n return $tab;\n }", "function setTabs(){\n global $ilTabs, $ilCtrl, $ilAccess, $ilLocator;\n\n // show current quiz round inlcuding link and QR code (deadline)\n if ($ilAccess->checkAccess(\"read\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"showCurrentRound\", $this->txt(\"tabmenu_showCurrentRound\"), $ilCtrl->getLinkTarget($this, \"showCurrentRound\"));\n }\n\n // tab for the \"edit quiz\" command\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"editQuiz\", $this->txt(\"tabmenu_edit_quiz\"), $ilCtrl->getLinkTarget($this, \"editQuiz\"));\n }\n\n // show round results\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"showResults\", $this->txt(\"tabmenu_show_result\"), $ilCtrl->getLinkTarget($this, \"showResults\"));\n }\n\n // a \"properties\" tab\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"properties\", $this->txt(\"tabmenu_properties\"), $ilCtrl->getLinkTarget($this, \"editProperties\"));\n $this->addPermissionTab();\n }\n\n // information Tab\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"info\", $this->txt(\"tabmenu_info\"), $ilCtrl->getLinkTarget($this, \"info\"));\n }\n\n }", "private function get_tabs() {\n return array(\n 'general' => array(\n 'title' => __( 'General', 'jpid' ),\n 'group' => 'jpid_general_settings'\n ),\n 'delivery' => array(\n 'title' => __( 'Delivery', 'jpid' ),\n 'group' => 'jpid_delivery_settings'\n ),\n 'payment' => array(\n 'title' => __( 'Payment', 'jpid' ),\n 'group' => 'jpid_payment_settings'\n )\n );\n }", "abstract protected function tabs();", "function generateTabs($pScreenName, $pRestriction = ''){\n if(0 == count($this->getScreens())){\n return '';\n }\n\n $content = '';\n $tabs = array();\n $Screens =& $this->getScreens();\n\n if (\"List\" == $pScreenName){\n if(empty($this->addNewName)){\n $addNewName = $this->SingularRecordName;\n } else {\n $addNewName = $this->addNewName;\n }\n\t\t\t$content = '';\n if($this->AllowAddRecord){\n if('view' == $pRestriction){\n //$content = \"\\$tabs['New'] = array(\\\"\\\", gettext(\\\"No Add New|You cannot add a new {$addNewName} because you don't have permission\\\"), 'disabled');\";\n } else {\n //get first edit screen and insert a tab link to it as \"new\"\n foreach ($Screens as $Screen){\n if ('editscreen' == strtolower(get_class($Screen))){\n\t\t\t\t\t\t\t$content = \"\\$tabs['New'] = array(\\\"edit.php?mdl={$this->ModuleID}&amp;scr={$Screen->name}\\\", gettext(\\\"Add New|Add a new \\\").gettext(\\\"{$addNewName}\\\"));\";\t\n break; //exits loop\n }\n }\n }\n } else {\n // $content = \"\\$tabs['New'] = array(\\\"\\\", gettext(\\\"No Add New|To add a new {$addNewName} you must go to a parent module\\\"), 'disabled');\";\n }\n \n\n //get search screen and insert a tab link to it\n if(count($Screens)){\n foreach ($Screens as $Screen){\n if ('searchscreen' == strtolower(get_class($Screen))){\n $content .= \"\\$tabs['Search'] = array(\\\"search.php?mdl={$this->ModuleID}\\\", gettext(\\\"Search|Search in \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n //$content .= \"\\$tabs['Reports'] = array(\\\"reports.php?mdl={$this->ModuleID}\\\", gettext(\\\"Reports|Reports for \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\t\t\t\tif( true == $this->areChartsDefined() ){\n\t\t\t\t\t\t\t$content .= \"\\$tabs['Charts'] = array(\\\"charts.php?mdl={$this->ModuleID}\\\", gettext(\\\"Charts|Charts for \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\t\t\t\t}\n } \n }\n }\n if($this->dataCollectionForm){\n $content .= \"\\$tabs['DataCollection'] = array(\\\"dataCollectionForm.php?mdl={$this->ModuleID}\\\", gettext(\\\"Blank Form|Blank form for \\\").gettext(\\\"{$this->PluralRecordName}\\\"), 'download');\";\n }\n } elseif (\"ListCtxTabs\" == $pScreenName){\n\t\t\n//$tabs['List'] = Array(\"list.php?$qs\", gettext(\"List|View the list of /**plural_record_name**/\"));\n\t\t\t$content = \"\\$tabs['List'] = array(\\\"list.php?\\$qs\\\", gettext(\\\"List|View the list of \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\tif(empty($this->addNewName)){\n $addNewName = $this->SingularRecordName;\n } else {\n $addNewName = $this->addNewName;\n }\n\n if($this->AllowAddRecord){\n if('view' == $pRestriction){\n // $content .= \"\\$tabs['New'] = array(\\\"\\\", gettext(\\\"No Add New|You cannot add a new {$addNewName} because you don't have permission\\\"), 'disabled');\";\n } else {\n //get first edit screen and insert a tab link to it as \"new\"\n foreach ($Screens as $Screen){\n if ('editscreen' == strtolower(get_class($Screen))){\n\t\t\t\t\t\t\t$content .= \"\\$tabs['New'] = array(\\\"edit.php?mdl={$this->ModuleID}&amp;scr={$Screen->name}\\\", gettext(\\\"Add New|Add a new \\\").gettext(\\\"{$addNewName}\\\"));\";\t\n\n break; //exits loop\n }\n }\n }\n } else {\n //$content = \"\\$tabs['New'] = array(\\\"\\\", gettext(\\\"No Add New|To add a new {$addNewName} you must go to a parent module\\\"), 'disabled');\";\n }\n \n\n //get search screen and insert a tab link to it\n if(count($Screens)){\n foreach ($Screens as $Screen){\n if ('searchscreen' == strtolower(get_class($Screen))){\n $content .= \"\\$tabs['Search'] = array(\\\"search.php?mdl={$this->ModuleID}\\\", gettext(\\\"Search|Search in \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\t\t\t\t//$content .= \"\\$tabs['Reports'] = array(\\\"reports.php?mdl={$this->ModuleID}\\\", gettext(\\\"Reports|Reports for \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\t\t\t\tif( true == $this->areChartsDefined() ){\n\t\t\t\t\t\t\t$content .= \"\\$tabs['Charts'] = array(\\\"charts.php?mdl={$this->ModuleID}\\\", gettext(\\\"Charts|Charts for \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n }\n }\n if($this->dataCollectionForm){\n $content .= \"\\$tabs['DataCollection'] = array(\\\"dataCollectionForm.php?mdl={$this->ModuleID}\\\", gettext(\\\"Blank Form|Blank form for \\\").gettext(\\\"{$this->PluralRecordName}\\\"), 'download');\";\n }\n\t\t}elseif( \"EditScreenPermissions\" == $pScreenName ){\n\t\t\t$content = '';\n\t\t\tforeach ($Screens as $Screen){\t\t\t\n\t\t\t\tif( 'editscreen' == strtolower(get_class($Screen)) AND isset($Screen->EditPermission) ){\n\t\t\t\t\t$content .= \"\\$EditScrPermission['{$Screen->name}'] = '{$Screen->EditPermission}';\\n\";\t\n\t\t\t\t}\n }\n\t\t\tif( $content != '' ){\n\t\t\t\tforeach ($Screens as $Screen){\t\t\t\n\t\t\t\t\tif( 'editscreen' == strtolower(get_class($Screen)) AND !isset($Screen->EditPermission) ){\n\t\t\t\t\t\t$content .= \"\\$EditScrPermission['{$Screen->name}'] = '{$this->ModuleID}';\\n\";\t\n\t\t\t\t\t}\n }\n\t\t\t}\n\t\t\n\t\t}elseif( \"ListRecordMenu\" == $pScreenName ){ \n\t\t \n\t\t\t$recordMenuCounter = 0;\n\t\t\t\t\n\t\t\tforeach ($Screens as $Screen){\n $linkTo = '';\n $tab = '';\n\t\t\t\t$recordMenu = '';\n\t\t\t\t$recordMenuEntries = '';\n\t\t\t\t\n switch( strtolower(get_class($Screen)) ){\n case \"viewscreen\":\n $handler = \"view.php\"; \n $phrase = \"View|View summary information about a record of type \\\").gettext(\\\"\". $this->SingularRecordName;\n break;\n case \"editscreen\":\n if(!empty($Screen->linkToModuleID)){\n $linkTo = $Screen->linkToModuleID;\n }\n $handler = \"edit.php\";\n\n if (empty($Screen->phrase)){\n $phrase = $Screen->name;\n } else {\n $phrase = $Screen->phrase;\n }\n break;\n case \"searchscreen\":\n $handler = \"search.php\";\n $phrase = \"Search|Search in \\\").' '.gettext(\\\"\". $this->PluralRecordName;\n break;\n case \"listscreen\":\n $handler = \"list.php\";\n $phrase = \"List|View the list of \\\").' '.gettext(\\\"\". $this->PluralRecordName;\n break;\n case \"recordreportscreen\":\n $handler = \"reports.php\";\n $phrase = $Screen->phrase;\n break;\n case \"listreportscreen\":\n $handler = \"reports.php\";\n $phrase = $Screen->phrase;\n break;\n case \"anoneditscreen\":\n continue;\n break;\n default:\n print_r($Screens);\n die(\"unknown screen type: '\".get_class($Screen).\"'\\n\");\n }\n\n\t\t\t\t$recordMenu = '$recordMenuEntries['.$Screen->name.']='.\"'{ text: \\\"'.strip_tags( ShortPhrase( gettext(\\\"{$phrase}\\\") ) ).'\\\" }';\\n\";\n\n $tabConditionModuleID = '';\n if(!empty($Screen->tabConditionModuleID)){\n $tabConditionModuleID = \", '{$Screen->tabConditionModuleID}'\";\n }\n\n\t\t\t\tif( ( \"view\" == $pRestriction && \"viewscreen\" == strtolower(get_class($Screen)) ) \n\t\t\t\t || (\"view\" != $pRestriction) ){\n\t\t\t\t\tif($linkTo == ''){\t\t\t\t\t\t\n\t\t\t\t\t\t$recordMenuURL = '$recordMenuURL['.$Screen->name.']= '.\"\\\"$handler?scr={$Screen->name}&mdl={$this->ModuleID}\\\";\\n\"; \n\t\t\t\t\t} else {\n\t\t\t\t\t\t$recordMenuURL = '$recordMenuURL['.$Screen->name.']= '.\"\\\"$handler?scr={$Screen->name}&mdl=$linkTo\\\";\\n\"; \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\t\t\n if( in_array(strtolower(get_class($Screen)), array('viewscreen', 'editscreen', 'recordreportscreen')) ){ \n\t\t\t\t\t$recordMenuList .= $recordMenu;\n\t\t\t\t\t$recordMenuURLList .= $recordMenuURL;\t\t\t\t\t\n }\n }\t\t\t\n\t\t\t\n\t\t\t$content = $recordMenuList.$recordMenuURLList;\n\t\n\t\t}else {\n print \"m. GenerateTabs: current screen $pScreenName\\n\";\n\n $currentScreen = $this->getScreen($pScreenName);\n\n foreach ($Screens as $Screen){\n $linkTo = '';\n $tab = '';\n switch(strtolower(get_class($Screen))){\n case \"viewscreen\":\n $handler = \"view.php\";\n /* if(in_array($this->SingularRecordName[0], array('a','e','i','o','h','y','A','E','I','O','H','Y'))){\n $a = 'an';\n } else {\n $a = 'a';\n } */\n $phrase = \"View|View summary information about a record of type \\\").gettext(\\\"\". $this->SingularRecordName;\n break;\n case \"editscreen\":\n if(!empty($Screen->linkToModuleID)){\n $linkTo = $Screen->linkToModuleID;\n }\n $handler = \"edit.php\";\n\n if (empty($Screen->phrase)){\n $phrase = $Screen->name;\n } else {\n $phrase = $Screen->phrase;\n }\n break;\n case \"searchscreen\":\n $handler = \"search.php\";\n $phrase = \"Search|Search in \\\").' '.gettext(\\\"\". $this->PluralRecordName;\n break;\n case \"listscreen\":\n $handler = \"list.php\";\n $phrase = \"List|View the list of \\\").' '.gettext(\\\"\". $this->PluralRecordName;\n break;\n case \"recordreportscreen\":\n $handler = \"reports.php\";\n $phrase = $Screen->phrase;\n break;\n case \"listreportscreen\":\n $handler = \"reports.php\";\n $phrase = $Screen->phrase;\n break;\n case \"anoneditscreen\":\n continue;\n break;\n default:\n print_r($Screens);\n die(\"unknown screen type: '\".get_class($Screen).\"'\\n\");\n }\n\n $tabConditionModuleID = '';\n if(!empty($Screen->tabConditionModuleID)){\n $tabConditionModuleID = \", '{$Screen->tabConditionModuleID}'\";\n }\n\n if ($pScreenName != $Screen->name){\n if ( ( \"view\" == $pRestriction \n\t\t\t\t\t && ( \"viewscreen\" == strtolower( get_class($Screen) ) \n\t\t\t\t\t || \"recordreportscreen\" == strtolower( get_class($Screen) ) ) ) \n\t\t\t\t\t || (\"view\" != $pRestriction) ){\n\n //insert link\n if($linkTo == ''){\n $tab = \" \\$tabs['{$Screen->name}'] = array( \\\"$handler?scr={$Screen->name}&amp;\\$tabsQS\\\", gettext(\\\"{$phrase}\\\") $tabConditionModuleID);\\n\";\n } else {\n $tab = \" \\$tabs['{$Screen->name}'] = array( \\\"$handler?mdl=$linkTo&amp;rid=\\$recordID\\\", gettext(\\\"{$phrase}\\\") $tabConditionModuleID);\\n\";\n }\n }\n } else {\n //Current screen: insert name only\n $tab = \" \\$tabs['{$Screen->name}'] = array( \\\"\\\", gettext(\\\"{$phrase}\\\") $tabConditionModuleID);\\n\";\n }\n\n if(in_array(strtolower(get_class($Screen)), array('viewscreen', 'editscreen', 'recordreportscreen'))){\n $content .= $tab;\n }\n }\n }\n\n return $content;\n }", "public function prepare( $tabs ) {\n\t\t$tabs[ $this->key_name ] = array(\n\t\t\t'title' => __( 'Polylang', 'custom-sidebars' ),\n\t\t\t'cat_name' => __( 'Language', 'custom-sidebars' ),\n\t\t);\n\t\treturn $tabs;\n\t}", "public function installTabs()\n {\n TabManager::addTab('AdminTraining', 'Training Menu', 'training', 'AdminTools');\n TabManager::addTab('AdminTrainingIndexClass', 'Controller exemple', 'training', 'AdminTraining');\n TabManager::addTab('AdminTrainingGridClass', 'Grid exemple', 'training', 'AdminTraining');\n\n return true;\n }", "private static function options_page_tabs() {\n $tabs = array(\n 'general' => __('Allgemein', 'fau-cris'),\n 'layout' => __('Darstellung', 'fau-cris'),\n 'sync' => __('Synchronisierung', 'fau-cris')\n );\n return $tabs;\n }", "public function installKbTabs()\n {\n $parentTab = new Tab();\n $parentTab->name = array();\n foreach (Language::getLanguages(true) as $lang) {\n $parentTab->name[$lang['id_lang']] = $this->l('Knowband Web Push Notification');\n }\n\n $parentTab->class_name = self::PARENT_TAB_CLASS;\n $parentTab->module = $this->name;\n $parentTab->active = 1;\n $parentTab->id_parent = Tab::getIdFromClassName(self::SELL_CLASS_NAME);\n $parentTab->icon = 'notifications';\n $parentTab->add();\n\n $id_parent_tab = (int) Tab::getIdFromClassName(self::PARENT_TAB_CLASS);\n $admin_menus = $this->adminSubMenus();\n\n foreach ($admin_menus as $menu) {\n $tab = new Tab();\n foreach (Language::getLanguages(true) as $lang) {\n $tab->name[$lang['id_lang']] = $this->l($menu['name']);\n }\n\n $tab->class_name = $menu['class_name'];\n $tab->module = $this->name;\n $tab->active = $menu['active'];\n $tab->id_parent = $id_parent_tab;\n $tab->add($this->id);\n }\n return true;\n }", "public function create_tabs_script(){\n\t\treturn $this->style.'\n<script>\n\tjQuery(function () {\n\t\tjQuery(\".nav-tab-wrapper a\").click(function (e) {\n\t\t\te.preventDefault();\n\t\t\tvar tab_class = jQuery(this).data(\"tab\"); \n\t\t\tvar target = jQuery(this).data(\"target\");\n\t\t\tvar title = jQuery(this).text();\n\n\t\t\tjQuery(\".tabs-title\").fadeOut(function(){\n\t \tjQuery(\".tabs-title\").text(title).fadeIn();\n\t })\n\n\t\t\tjQuery(this).parent().find(\".nav-tab\").removeClass(\"nav-tab-active\");\n\t\t\tjQuery(this).addClass(\"nav-tab-active\");\n\t\t\n\t\t\tjQuery(\".tab\").not(\".\"+tab_class).parentsUntil(\".cmb-repeat-group-wrap\").fadeOut(600);\n\t\t\tjQuery(\".\"+tab_class).parentsUntil(\".cmb-repeat-group-wrap\").fadeIn(1000);\n\n\t\t});\n\t\tjQuery(\".hide-clone\").parentsUntil(\".cmb-row\").fadeOut();\n\t\tjQuery(\".hide-remove\").parentsUntil(\".cmb-remove-field-row\").fadeOut();\n\t});\n</script>\n<style>\n\t.page, .component{\n\t\tbackground:#6bb1a3;\n\t\tborder-radius: 10px 10px 0px 0px;\n\t\tborder:solid 2px gray;\n\t\tcolor:white;\n\n\t}\n\t.page:hover, .component:hover{\n\t\tbackground:#4b9183;\n\t\tcolor:black;\n\n\t}\n\t.component{\n\t\tbackground:#8bd1c3;\n\t}\n</style>';\n\t}", "private function createFormsTab()\n {\n $tab = $this->createTab(\n 'forms_tab',\n '__responsive_tab_forms__',\n [\n 'attributes' => [\n 'autoScroll' => true,\n ],\n ]\n );\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 90]);\n $fieldSetLabels = $this->createFieldSet(\n 'labels_fieldset',\n '__responsive_tab_forms_fieldset_labels__',\n ['attributes' => $attributes]\n );\n\n $fieldSetLabels->addElement(\n $this->createTextField(\n 'label-font-size',\n '@label-font-size',\n $this->themeFontDefaults['label-font-size']\n )\n );\n $fieldSetLabels->addElement(\n $this->createColorPickerField(\n 'label-color',\n '@label-color',\n $this->themeColorDefaults['label-color']\n )\n );\n\n $tab->addElement($fieldSetLabels);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 160]);\n $fieldSetFormBase = $this->createFieldSet(\n 'form_base_fieldset',\n '__responsive_tab_forms_fieldset_global__',\n ['attributes' => $attributes]\n );\n\n $fieldSetFormBase->addElement(\n $this->createTextField(\n 'input-font-size',\n '@input-font-size',\n $this->themeFontDefaults['input-font-size']\n )\n );\n $fieldSetFormBase->addElement(\n $this->createColorPickerField(\n 'input-bg',\n '@input-bg',\n $this->themeColorDefaults['input-bg']\n )\n );\n $fieldSetFormBase->addElement(\n $this->createColorPickerField(\n 'input-color',\n '@input-color',\n $this->themeColorDefaults['input-color']\n )\n );\n $fieldSetFormBase->addElement(\n $this->createColorPickerField(\n 'input-placeholder-color',\n '@input-placeholder-color',\n $this->themeColorDefaults['input-placeholder-color']\n )\n );\n $fieldSetFormBase->addElement(\n $this->createColorPickerField(\n 'input-border',\n '@input-border',\n $this->themeColorDefaults['input-border']\n )\n );\n\n $tab->addElement($fieldSetFormBase);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 240]);\n $fieldSetFormStates = $this->createFieldSet(\n 'form_states_fieldset',\n '__responsive_tab_forms_fieldset_states__',\n ['attributes' => $attributes]\n );\n\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-focus-bg',\n '@input-focus-bg',\n $this->themeColorDefaults['input-focus-bg']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-focus-border',\n '@input-focus-border',\n $this->themeColorDefaults['input-focus-border']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-focus-color',\n '@input-focus-color',\n $this->themeColorDefaults['input-focus-color']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-error-bg',\n '@input-error-bg',\n $this->themeColorDefaults['input-error-bg']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-error-border',\n '@input-error-border',\n $this->themeColorDefaults['input-error-border']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-error-color',\n '@input-error-color',\n $this->themeColorDefaults['input-error-color']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-success-bg',\n '@input-success-bg',\n $this->themeColorDefaults['input-success-bg']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-success-border',\n '@input-success-border',\n $this->themeColorDefaults['input-success-border']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-success-color',\n '@input-success-color',\n $this->themeColorDefaults['input-success-color']\n )\n );\n\n $tab->addElement($fieldSetFormStates);\n\n return $tab;\n }", "public function set_tabs() {\n\t\t\t$tabs = [\n\t\t\t\t[\n\t\t\t\t\t'id' => 'business_info',\n\t\t\t\t\t'title' => __( 'Business info', 'yoast-local-seo' ),\n\t\t\t\t\t'icon' => 'admin-home',\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'id' => 'opening_hours',\n\t\t\t\t\t'title' => __( 'Opening hours', 'yoast-local-seo' ),\n\t\t\t\t\t'icon' => 'clock',\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'id' => 'maps_settings',\n\t\t\t\t\t'title' => __( 'Map settings', 'yoast-local-seo' ),\n\t\t\t\t\t'icon' => 'location-alt',\n\t\t\t\t],\n\t\t\t];\n\n\t\t\t$tabs = apply_filters( 'wpseo-local-location-meta-tabs', $tabs );\n\n\t\t\t$this->tabs = $tabs;\n\t\t}", "function getTabs(&$tabs_gui)\n\t{\n\t\tglobal $rbacsystem;\n\n\t\t// properties\n\t\tif ($rbacsystem->checkAccess(\"write\", $_GET[\"ref_id\"]))\n\t\t{\n\t\t\t$tabs_gui->addTarget(\"edit_properties\",\n\t\t\t\t\"repository.php?cmd=properties&ref_id=\".$_GET[\"ref_id\"],\n\t\t\t\t\"properties\");\n\t\t}\n\n\t\t// edit permission\n\t\tif ($rbacsystem->checkAccess(\"edit_permission\", $_GET[\"ref_id\"]))\n\t\t{\n\t\t\t$tabs_gui->addTarget(\"perm_settings\",\n\t\t\t\t\"repository.php?cmd=permissions&ref_id=\".$_GET[\"ref_id\"],\n\t\t\t\t\"permissions\");\n\t\t}\n\t}", "private function createGeneralTab()\n {\n $tab = $this->createTab(\n 'general_tab',\n '__responsive_tab_general__',\n [\n 'attributes' => [\n 'autoScroll' => true,\n ],\n ]\n );\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 130]);\n $fieldSetGrey = $this->createFieldSet(\n 'grey_tones',\n '__responsive_tab_general_fieldset_grey__',\n ['attributes' => $attributes]\n );\n\n $fieldSetGrey->addElement(\n $this->createColorPickerField(\n 'gray',\n '@gray',\n $this->themeColorDefaults['gray']\n )\n );\n $fieldSetGrey->addElement(\n $this->createColorPickerField(\n 'gray-light',\n '@gray-light',\n $this->themeColorDefaults['gray-light']\n )\n );\n $fieldSetGrey->addElement(\n $this->createColorPickerField(\n 'gray-dark',\n '@gray-dark',\n $this->themeColorDefaults['gray-dark']\n )\n );\n $fieldSetGrey->addElement(\n $this->createColorPickerField(\n 'border-color',\n '@border-color',\n $this->themeColorDefaults['border-color']\n )\n );\n\n $basicFieldSet = $this->createBasicFieldSet();\n $tab->addElement($basicFieldSet);\n $tab->addElement($fieldSetGrey);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 130]);\n $fieldSetHighlights = $this->createFieldSet(\n 'highlight_colors',\n '__responsive_tab_general_fieldset_highlight__',\n ['attributes' => $attributes]\n );\n\n $fieldSetHighlights->addElement(\n $this->createColorPickerField(\n 'highlight-success',\n '@highlight-success',\n $this->themeColorDefaults['highlight-success']\n )\n );\n $fieldSetHighlights->addElement(\n $this->createColorPickerField(\n 'highlight-error',\n '@highlight-error',\n $this->themeColorDefaults['highlight-error']\n )\n );\n $fieldSetHighlights->addElement(\n $this->createColorPickerField(\n 'highlight-notice',\n '@highlight-notice',\n $this->themeColorDefaults['highlight-notice']\n )\n );\n $fieldSetHighlights->addElement(\n $this->createColorPickerField(\n 'highlight-info',\n '@highlight-info',\n $this->themeColorDefaults['highlight-info']\n )\n );\n\n $tab->addElement($fieldSetHighlights);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 220]);\n $fieldSetScaffolding = $this->createFieldSet(\n 'scaffolding',\n '__responsive_tab_general_fieldset_scaffolding__',\n ['attributes' => $attributes]\n );\n\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'body-bg',\n '@body-bg',\n $this->themeColorDefaults['body-bg']\n )\n );\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'text-color',\n '@text-color',\n $this->themeColorDefaults['text-color']\n )\n );\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'text-color-dark',\n '@text-color-dark',\n $this->themeColorDefaults['text-color-dark']\n )\n );\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'link-color',\n '@link-color',\n $this->themeColorDefaults['link-color']\n )\n );\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'link-hover-color',\n '@link-hover-color',\n $this->themeColorDefaults['link-hover-color']\n )\n );\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'rating-star-color',\n '@rating-star-color',\n $this->themeColorDefaults['rating-star-color']\n )\n );\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'overlay-bg',\n '@overlay-bg',\n $this->themeColorDefaults['overlay-bg']\n )\n );\n\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'overlay-theme-dark-bg',\n '@overlay-theme-dark-bg',\n '@overlay-bg'\n )\n );\n\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'overlay-theme-light-bg',\n '@overlay-theme-light-bg',\n '#FFFFFF'\n )\n );\n\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'overlay-opacity',\n '@overlay-opacity',\n $this->themeColorDefaults['overlay-opacity']\n )\n );\n\n $tab->addElement($fieldSetScaffolding);\n\n return $tab;\n }", "function jquery_create_tabs( $tab_id, $tabs, $callback, $prefix = '' )\n {\n global $page_info;\n\n $page_info['head'][] = _jquery_tabs( $tab_id );\n\n echo ( $prefix . '<div id=\"' . htmlentities( $tab_id ) . '\">' . \"\\n\" );\n\n echo ( $prefix . \"\\t\" . '<ul>' . \"\\n\" );\n foreach ( $tabs as $tk => $tv )\n {\n echo ( $prefix . \"\\t\\t\" . '<li><a href=\"#' . htmlentities( $tk ) . '\">' . htmlentities( $tv ) . '</a></li>' . \"\\n\" );\n }\n echo ( $prefix . \"\\t\" . '</ul>' . \"\\n\" );\n\n foreach ( $tabs as $tk => $tv )\n {\n echo ( $prefix . \"\\t\" . '<div id=\"' . htmlentities( $tk ) . '\">' . \"\\n\" );\n\n call_user_func_array( $callback, array( $tk, ( $prefix . \"\\t\\t\" ) ) );\n\n echo ( $prefix . \"\\t\" . '</div>' . \"\\n\" );\n }\n\n echo ( $prefix . '</div>' . \"\\n\" );\n }", "protected function setup_tabs() {\n\n\t\t// If there's a remote info file give it priority and override any existing parameters.\n\t\tif ( $url = $this->browser_args['remote_info'] ) {\n\t\t\t$info = $this->get_remote_info( $url );\n\n\t\t\tif ( ! empty( $info ) ) {\n\t\t\t\t$this->browser_args = wp_parse_args( $info, $this->browser_args );\n\t\t\t}\n\n\t\t}\n\n\t\t// Display the 'popular' tab if enabled.\n\t\tif ( 'true' == $this->browser_args['show_popular'] ) {\n\n\t\t\t$this->browser_args['tabs']['popular'] = array(\n\t\t\t\t'name' => __( 'Popular', 'wp-shp-browser' ),\n\t\t\t\t'url' => ''\n\t\t\t);\n\n\t\t}\n\n\t\t// Set the default tab if not already set.\n\t\tif ( ! $this->browser_args['default_tab'] ) {\n\t\t\t$default_tab = array_keys( $this->browser_args['tabs'] );\n\t\t\t$default_tab = $default_tab[0];\n\n\t\t\t$this->browser_args['default_tab'] = $default_tab;\n\t\t}\n\n\t}", "private function build_factory_meta_tab_widget($_meta, $_ptype = \"wccpf\") {\r\n \t/* Accordian wrapper starts here */\r\n \t$html = '<div class=\"wcff-factory-tab-container\">';\r\n \t\r\n \t/* Left side header panel starts here */\r\n \t$html .= '<div class=\"wcff-factory-tab-left-panel\">';\r\n \t$html .= '<ul>';\r\n \tforeach ($_meta[\"tabs\"] as $tab) {\r\n \t\t$html .= '<li data-box=\"' . $tab[\"header\"][\"target\"] . '\" class=\"' . $tab[\"header\"][\"css_class\"] . '\">' . $tab[\"header\"][\"title\"] . '</li>';\r\n \t}\r\n \t$html .= '</ul>';\r\n \t$html .= '</div>';\r\n \t/* Left side header anel ends here */\r\n \t\r\n \t/* Left side header panel starts here */\r\n \t$html .= '<div class=\"wcff-factory-tab-right-panel\">';\r\n \tforeach ($_meta[\"tabs\"] as $tab) {\r\n \t\t/* Tab content section starts here */\r\n \t\t$html .= '<div id=\"' . $tab[\"content\"][\"container\"] . '\" class=\"wcff-factory-tab-content\">';\r\n \t\t\r\n \t\tforeach ($tab[\"content\"][\"fields\"] as $field) {\r\n \t\t\t/* Meta field's wrapper starts here */\r\n \t\t\t$html .= '<div class=\"wcff-field-types-meta\" data-type=\"' . $field[\"type\"] . '\" data-param=\"' . $field[\"param\"] . '\">';\r\n \t\t\t$html .= $this->build_factory_meta_field($field, $_ptype);\r\n \t\t\t$html .= '</div>';\r\n \t\t\t/* Meta field's wrapper ends here */\r\n \t\t}\r\n \t\t\r\n \t\t$html .= '</div>';\r\n \t\t/* Tab content section ends here */\r\n \t}\r\n \t$html .= '</div>';\r\n \t/* Left side header anel ends here */\r\n \t\r\n \t$html .= '</div>';\r\n \t/* Accordian wrapper ends here */\r\n \treturn $html;\r\n }", "public function startTabs() {\n\t\t\tglobal $oSecurity; \n\t\t\t$arTabs = array( \n\t\t\t\t\"home\" => array(\n\t\t\t\t\t\"title\" => \"Home\", \n\t\t\t\t\t\"url\" => \"main.php\", \n\t\t\t\t\t\"classes\" => array(\"menu-item\", \"home\"), \n\t\t\t\t) \n\t\t\t); \n\t\t\t$oOwaesTypes = new owaestype(); \n\t\t\tforeach ($oOwaesTypes->getAllTypes() as $strKey=>$strTitle) {\n\t\t\t\t$arTabs[\"market.\" . $strKey] = array(\n\t\t\t\t\t\"title\" => $strTitle, \n\t\t\t\t\t\"url\" => \"index.php?t=\" . $strKey, \n\t\t\t\t\t\"classes\" => array(\"menu-item\", $strKey), \n\t\t\t\t);\n\t\t\t}\n\t\t\t/*$arTabs[\"users\"] = array(\n\t\t\t\t\t\"title\" => \"gebruikers\", \n\t\t\t\t\t\"url\" => \"users.php\", \n\t\t\t\t\t\"classes\" => array(\"users\", \"extratab\"), \n\t\t\t\t);*/\n\t\t\tif ($this->bLoggedInUser) {\n\t\t\t\t/*$oInbox = new inbox();\n\t\t\t\tif (count($oInbox->discussions()) > 0) {\n\t\t\t\t\t$arTabs[\"messages\"] = array(\n\t\t\t\t\t\t\"title\" => \"berichten\", \n\t\t\t\t\t\t\"url\" => \"#\", \n\t\t\t\t\t\t\"classes\" => array(\"extratab\", \"mailbox\"), \n\t\t\t\t\t\t\"sub\" => array(),\n\t\t\t\t\t); \n\t\t\t\t\tforeach ($oInbox->discussions() as $iKey=>$arUser) {\n\t\t\t\t\t\tif ($arUser[\"unread\"] > 0) {\n\t\t\t\t\t\t\t$arTabs[\"messages\"][\"sub\"][$arUser[\"names\"] . \" (\" . $arUser[\"unread\"] . \")\"] = array(\"conversation.php?users=\" . $arUser[\"ids\"], \"conversation unread\"); \n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$arTabs[\"messages\"][\"sub\"][$arUser[\"names\"]] = array(\"conversation.php?users=\" . $arUser[\"ids\"], \"conversation\"); \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} \n */\n $arTabs[\"lijsten\"] = array (\n \"title\" => \"Lijsten\", \n\t\t\t\t\t\"url\" => \"#\", \n\t\t\t\t\t\"classes\" => array(\"dropdown-toggle\", \"lijsten\", \"menu-item\"), \n\t\t\t\t\t\"sub\" => array(),\n );\n \n if (user(me())->levelrights(\"groepslijst\")) $arTabs[\"lijsten\"][\"sub\"][\"Groepen\"] = array(\"groups.php\", \"groups\");\n if (user(me())->levelrights(\"gebruikerslijst\")) $arTabs[\"lijsten\"][\"sub\"][\"Gebruikers\"] = array(\"users.php\", \"gebruikers\");\n $arTabs[\"lijsten\"][\"sub\"][\"Vrienden\"] = array(\"friends.php\", \"friends\");\n\t\t\t\t$arTabs[\"lijsten\"][\"sub\"][\"Badges\"] = array(\"badges.php\", \"badges\");\n\t\t\t\tif ($oSecurity->admin()) {\n\t\t\t\t\t$arTabs[\"lijsten\"][\"sub\"][\"Admin\"] = array(\"admin.php\", \"admin\");\n\t\t\t\t\t$arTabs[\"lijsten\"][\"sub\"][\"Reports\"] = array(\"meldingen.php\", \"meldingen\");\n\t\t\t\t\t$arTabs[\"lijsten\"][\"sub\"][\"Groepen\"] = array(\"admin.groepen.php\", \"groups\");\n\t\t\t\t}\n \n $arTabs[\"account\"] = array (\n \"title\" => \"Account\", \n\t\t\t\t\t\"url\" => \"#\", \n\t\t\t\t\t\"classes\" => array(\"dropdown-toggle\", \"account\", \"menu-item\"), \n\t\t\t\t\t\"sub\" => array(),\n );\n $arTabs[\"account\"][\"sub\"][\"Profiel\"] = array(\"profile.php\", \"profiel\");\t\n\t\t\t\t$arTabs[\"account\"][\"sub\"][\"Berichten\"] = array(\"conversation.php\", \"berichten\");\t\n\t\t\t\t$arTabs[\"account\"][\"sub\"][\"Instellingen\"] = array(\"settings.php\", \"instellingen\");\n\t\t\t\t$arTabs[\"account\"][\"sub\"][\"Paswoord aanpassen\"] = array(\"modal.changepass.php\", \"paswoord domodal\");\n\t\t\t\t$arTabs[\"account\"][\"sub\"][\"Afmelden\"] = array(\"logout.php\", \"afmelden\");\t\n \n\t\t\t\t/*$arTabs[\"settings\"] = array(\n\t\t\t\t\t\"title\" => \"instellingen\", \n\t\t\t\t\t\"url\" => \"settings.php\", \n\t\t\t\t\t\"classes\" => array(\"extratab\", \"settings\"), \n\t\t\t\t\t\"sub\" => array(),\n\t\t\t\t);\n \n\t\t\t\tforeach (user(me())->groups() as $oGroep) {\n\t\t\t\t\t$arTabs[\"settings\"][\"sub\"][$oGroep->naam()] = array(\"group.php?id=\" . $oGroep->id(), \"groep\"); \n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t\t//if ($oSecurity->admin()) $arTabs[\"account\"][\"sub\"][\"admin\"] = array(\"admin.php\", \"admin\"); \n\t\t\t\t/*\n\t\t\t\t$arTabs[\"settings\"][\"sub\"][\"instellingen\"] = array(\"settings.php\", \"settings\");\n\t\t\t\t$arTabs[\"settings\"][\"sub\"][\"profiel\"] = array(\"profile.php\", \"profile\");\n\t\t\t\t$arTabs[\"settings\"][\"sub\"][\"uitloggen\"] = array(\"logout.php\", \"login\");\n */\n\t\t\t} else {\n\t\t\t\t$arTabs[\"login\"] = array(\n\t\t\t\t\t\"url\" => \"login.php?p=\" . urlencode($this->filename()), \n\t\t\t\t\t\"classes\" => array(\"menu-item\", \"login\"), \n\t\t\t\t); \n\t\t\t}\n\t\t\tif (isset($arTabs[$this->tab()][\"classes\"])) $arTabs[$this->tab()][\"classes\"][] = \"active\"; \n \n $strHTML = \"\";\n $strHTML .= \"<nav class=\\\"navbar navbar-default\\\">\";\n $strHTML .= \"<div class=\\\"container\\\"><div class=\\\"row\\\"><div class=\\\"navbar-header\\\">\";\n $strHTML .= \"<a href=\\\"main.php\\\"><h1 class=\\\"navbar-brand\\\">OWAES</h1></a>\";\n $strHTML .= \"<button class=\\\"navbar-toggle\\\" type=\\\"button\\\" data-toggle=\\\"collapse\\\" data-target=\\\"#navbar-main\\\"><span class=\\\"icon-bar\\\"></span><span class=\\\"icon-bar\\\"></span><span class=\\\"icon-bar\\\"></span></button>\";\n\t\t\t$strHTML .= \"</div><div class=\\\"navbar-collapse collapse\\\" id=\\\"navbar-main\\\"><ul class=\\\"nav navbar-nav navbar-right\\\">\"; \n\t\t\tforeach ($arTabs as $strKey => $arDetails) {\n\t\t\t\t$strTitel = isset($arDetails[\"title\"]) ? $arDetails[\"title\"] : $strKey; \n if (!isset($arDetails[\"sub\"])){\n $strHTML .= \"<li>\";\n\t\t\t\t $strHTML .= \"<a href=\\\"\" . fixPath($arDetails[\"url\"]) . \"\\\" class=\\\"\" . implode(\" \", $arDetails[\"classes\"]) . \"\\\">\";\n $strHTML .= \"<span class=\\\"icon\\\"></span>\";\n $strHTML .= \"<span class=\\\"title\\\">$strTitel</span></a>\";\n $strHTML .= \"</li>\";\n } else{\n $strHTML .= \"<li class=\\\"dropdown\\\">\";\n $strHTML .= \"<a href=\\\"\" . fixPath($arDetails[\"url\"]) . \"\\\" class=\\\"\" . implode(\" \", $arDetails[\"classes\"]) . \"\\\" data-toggle=\\\"dropdown\\\">\";\n $strHTML .= \"<span class=\\\"icon\\\"></span>\";\n $strHTML .= \"<span class=\\\"title\\\">$strTitel</span> <span class=\\\"caret\\\"></span></a>\";\n \n $strHTML .= \"<ul class=\\\"dropdown-menu\\\">\"; \n\t\t\t\t\tforeach ($arDetails[\"sub\"] as $strSubTitel => $arSubDetails) {\n\t\t\t\t\t\t$strHTML .= \"<li><a href=\\\"\" . fixPath($arSubDetails[0]) . \"\\\" class=\\\"\" . $arSubDetails[1] . \"\\\"><span class=\\\"icon-\" . $arSubDetails[1] . \"\\\"></span><span>$strSubTitel</span></a></li>\";\n\t\t\t\t\t}\n\t\t\t\t\t$strHTML .= \"</ul>\"; \n $strHTML .= \"</li>\";\n }\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t$strHTML .= \"</ul></div></div></div></nav>\"; \n\t\t\t//$strHTML .= \"<div class=\\\"clock\\\">\" . clock() . \"</div>\"; \n\t\t\t/*$strHTML .= \"<form class=\\\"search\\\" action=\\\"\" . fixPath(\"search.php\") . \"\\\" method=\\\"get\\\">\n\t\t\t\t\t\t\t<input class=\\\"searchfield\\\" type=\\\"text\\\" name=\\\"q\\\" \" . (isset($_GET[\"q\"])?(\"value=\\\"\" . inputfield($_GET[\"q\"]) . \"\\\"\"):\"\") . \" />\n\t\t\t\t\t\t\t<input class=\\\"searchbutton\\\" type=\\\"submit\\\" value=\\\"zoeken\\\" />\n\t\t\t\t\t\t</form>\"; */\n //$strHTML .= \"<ul class=\\\"popupmessages\\\"></ul>\"; \n\t\t\tif (!$this->bLoggedInUser) { \n\t\t\t\t$strHTML .= \"<div class=\\\"loginbar\\\">\n\t\t\t\t\t\t\t\tLog in: \n\t\t\t\t\t\t\t\t<form action=\\\"\" . fixPath(\"login.php\") . \"\\\" method=\\\"post\\\">\n\t\t\t\t\t\t\t\t<input type=\\\"hidden\\\" name=\\\"from\\\" id=\\\"from\\\" value=\\\"\" . $this->filename(TRUE) . \"\\\" />\n\t\t\t\t\t\t\t\t<input type=\\\"text\\\" name=\\\"username\\\" id=\\\"username\\\" />\n\t\t\t\t\t\t\t\t<input type=\\\"password\\\" name=\\\"pass\\\" id=\\\"pass\\\" />\n\t\t\t\t\t\t\t\t<input type=\\\"submit\\\" name=\\\"dologin\\\" value=\\\"inloggen\\\" />\n\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t\tof <a href=\\\"\" . fixPath(\"login.php?p=\" . urlencode($this->filename())) . \"\\\">registreer</a>\n\t\t\t\t\t\t\t</div>\";\n\t\t\t} \n\t\t\t//$strHTML .= \"<div id=\\\"ADMIN\\\">\n\t\t\t//\t\t\t\t\t<ul><a href=\\\"#\\\" rel=\\\"SQL\\\">show/hide SQL</a></ul>\n\t\t\t//\t\t\t\t</div>\";\n\t\t\t\n\t\t\tif(settings(\"analytics\")!=\"\") {\n\t\t\t\t$strHTML = \"<script>\n (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n })(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n\n ga('create', '\" . settings(\"analytics\") . \"', 'auto');\n ga('send', 'pageview');\n\n</script>\" . $strHTML; \t\n\t\t\t}\n\t\t\t\n\t\t\treturn $strHTML; \n\t\t}", "private function createTab() {\n\t\t$moduleToken = t3lib_formprotection_Factory::get()->generateToken('moduleCall', self::MODULE_NAME);\n\t\treturn $this->doc->getTabMenu(\n\t\t\tarray('M' => self::MODULE_NAME, 'moduleToken' => $moduleToken, 'id' => $this->id),\n\t\t\t'tab',\n\t\t\tself::IMPORT_TAB,\n\t\t\tarray(self::IMPORT_TAB => $GLOBALS['LANG']->getLL('import_tab'))\n\t\t\t) . $this->doc->spacer(5);\n\t}", "function mmpm_theme_sections_generator(){\n\t\t$out = '';\n\t\t$out .= mmpm_ntab(4) . '<div class=\"'. MMPM_PREFIX . '_theme_options row bootstrap no_x_margin\">';\n\t\t$out .= mmpm_ntab(5) . '<ul id=\"'. MMPM_PREFIX . '_navigation\" class=\"'. MMPM_PREFIX . '_navigation nav nav-tabs col-lg-2 col-sm-3 col-xs-12\">';\n\t\tforeach ( mmpm_theme_options_array() as $key => $section ) {\n\t\t\t$out .= mmpm_ntab(6) . '<li class=\"menu_item' . ( ( $key == 0) ? ' active' : '' ) . '\">';\n\t\t\t$out .= mmpm_ntab(7) . '<a href=\"#' . $section['key'] . '\" data-toggle=\"tab\"><i class=\"' . ( ( isset( $section['icon'] ) ) ? $section['icon'] : 'empty-icon' ) . '\"></i> ' . $section['title'] . '</a></li>';\n\t\t\t$out .= mmpm_ntab(6) . '</li>';\n\t\t}\n\t\t$out .= mmpm_ntab(5) . '</ul><!-- class=\"'. MMPM_PREFIX . '_navigation\" -->';\n\t\t$out .= mmpm_ntab(5) . '<div id=\"'. MMPM_PREFIX . '_content\" class=\"tab-content '. MMPM_PREFIX . '_content col-lg-10 col-sm-9 col-xs-12\">';\n\t\tforeach ( mmpm_theme_options_array() as $key => $section ) {\n\t\t\t$out .= mmpm_ntab(6) . '<div class=\"tab-pane fade' . ( ( $key == 0) ? ' active in' : '' ) . '\" id=\"' . $section['key'] . '\">';\n\t\t\t$mmpm_saved_theme_options = get_option( MMPM_OPTIONS_DB_NAME, array( 'empty' ) );\n\t\t\tforeach ( $section['options'] as $option ) {\n\t\t\t\t$option['key'] = isset( $option['key'] ) ? $option['key'] : 'key_no_set';\n\t\t\t\t$mmpm_saved_value = isset( $mmpm_saved_theme_options[ $option[ 'key' ] ] ) \n\t\t\t\t\t? $mmpm_saved_theme_options[ $option[ 'key' ] ] \n\t\t\t\t\t: false;\n\t\t\t\t$option['key'] = MMPM_OPTIONS_NAME . '[' . $option['key'] . ']';\n\t\t\t\t$out .= mmpm_options_generator( $option, $mmpm_saved_value );\n\t\t\t}\n\t\t\t$out .= mmpm_ntab(6) . '</div><!-- class=\"tab-pane fade\" id=\"' . $section['key'] . '\" -->';\n\t\t}\n\t\t$out .= mmpm_ntab(5) . '</div><!-- id=\"'. MMPM_PREFIX . '_content\" class=\"tab-content\" -->';\n\t\t$out .= mmpm_ntab(4) . '</div><!-- class=\"'. MMPM_PREFIX . '_theme_options\" -->';\n\t\treturn $out;\n\t}", "function settings_nav( $tabs ) {\n\n $tabs[ 'admin_tools' ] = array(\n 'slug' => 'admin_tools',\n 'title' => __( 'Developer', 'wpp' )\n );\n\n return $tabs;\n\n }", "public function generate()\n\t{\n if (is_array($GLOBALS['TL_JAVASCRIPT']))\n\t\t{\n\t\t\tarray_insert($GLOBALS['TL_JAVASCRIPT'], 1, 'bundles/hschottmtextwizard/js/textwizard.min.js');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$GLOBALS['TL_JAVASCRIPT'] = array('bundles/hschottmtextwizard/js/textwizard.min.js');\n\t\t}\n\n\t\t$arrButtons = array('new', 'copy', 'delete', 'drag');\n\t\t// Make sure there is at least an empty array\n\t\tif (empty($this->varValue) || !\\is_array($this->varValue))\n\t\t{\n\t\t\t$this->varValue = array('');\n\t\t}\n\t\t// Initialize the tab index\n\t\tif (!\\Cache::has('tabindex'))\n\t\t{\n\t\t\t\\Cache::set('tabindex', 1);\n\t\t}\n\n $hasTitles = array_key_exists('buttonTitles', $this->arrConfiguration) && is_array($this->arrConfiguration['buttonTitles']);\n\n $return = ($this->wizard) ? '<div class=\"tl_wizard\">' . $this->wizard . '</div>' : '';\n\t\t$return .= '<ul id=\"ctrl_'.$this->strId.'\" class=\"tl_listwizard tl_textwizard\">';\n\t\t// Add input fields\n\t\tfor ($i=0, $c=\\count($this->varValue); $i<$c; $i++)\n\t\t{\n\t\t\t$return .= '\n <li><input type=\"text\" name=\"'.$this->strId.'[]\" class=\"tl_text\" value=\"'.\\StringUtil::specialchars($this->varValue[$i]).'\"' . $this->getAttributes() . '> ';\n\t\t\t// Add buttons\n\t\t\tforeach ($arrButtons as $button)\n\t\t\t{\n\t\t\t\tif ($button == 'drag')\n\t\t\t\t{\n\t\t\t\t\t$return .= ' <button type=\"button\" class=\"drag-handle\" title=\"' . \\StringUtil::specialchars($GLOBALS['TL_LANG']['MSC']['move']) . '\" aria-hidden=\"true\">' . \\Image::getHtml('drag.svg') . '</button>';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n $buttontitle = ($hasTitles && array_key_exists($button, $this->arrConfiguration['buttonTitles'])) ? $this->arrConfiguration['buttonTitles'][$button] : $GLOBALS['TL_LANG']['MSC']['lw_'.$button];\n\t\t\t\t\t$return .= ' <button type=\"button\" data-command=\"' . $button . '\" title=\"' . \\StringUtil::specialchars($buttontitle) . '\">' . \\Image::getHtml($button.'.svg') . '</button>';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$return .= '</li>';\n\t\t}\n\t\treturn $return.'\n </ul>\n <script>TextWizard.textWizard(\"ctrl_'.$this->strId.'\")</script>';\n\t}", "private function tabs_panels() {\n\t\t\tforeach ( $this->tabs as $key => $tab ) {\n\t\t\t\t$active = ( $key === 0 );\n\n\t\t\t\t$panel_class = [ 'wpseo-local-meta-section' ];\n\t\t\t\tif ( $active ) {\n\t\t\t\t\t$panel_class[] = 'active';\n\t\t\t\t}\n\n\t\t\t\techo '<div role=\"tabpanel\" id=\"wpseo-local-tab-' . $tab['id'] . '\" class=\"' . implode( ' ', $panel_class ) . '\">';\n\t\t\t\techo '<div class=\"wpseo-local-metabox-content\">';\n\t\t\t\tdo_action( 'wpseo-local-panel-content-' . $tab['id'] );\n\t\t\t\techo '</div>';\n\t\t\t\techo '</div>';\n\t\t\t}\n\t\t}", "protected function buildTabs(Request $request)\n {\n $tabs = array();\n $args = $request->query->all();\n $type = $request->attributes->get('type');\n\n $tabs[getlocal('Usage statistics for each date')] = $type != self::TYPE_BY_DATE\n ? $this->generateUrl('statistics', ($args + array('type' => self::TYPE_BY_DATE)))\n : '';\n\n $tabs[getlocal('Threads by operator')] = $type != self::TYPE_BY_OPERATOR\n ? $this->generateUrl('statistics', ($args + array('type' => self::TYPE_BY_OPERATOR)))\n : '';\n\n if (Settings::get('enabletracking')) {\n $tabs[getlocal('Chat threads by page')] = $type != self::TYPE_BY_PAGE\n ? $this->generateUrl('statistics', ($args + array('type' => self::TYPE_BY_PAGE)))\n : '';\n }\n\n return $tabs;\n }", "function tpps_details_tabs(array &$state) {\n $output = '<ul class=\"nav nav-tabs\" role=\"tablist\">\n <li class=\"nav-item\"><a class=\"nav-link active\" role=\"tab\" data-toggle=\"tab\" href=\"#species\">Species</a></li>\n <li class=\"nav-item\"><a class=\"nav-link\" role=\"tab\" data-toggle=\"tab\" href=\"#study\">Study Details</a></li>\n <li class=\"nav-item\"><a class=\"nav-link\" role=\"tab\" data-toggle=\"tab\" href=\"#trees\">Plants</a></li>';\n $p_exist = FALSE;\n $g_exist = FALSE;\n $mass_spectro_exist = FALSE;\n for ($i = 1; $i <= $state['stats']['species_count']; $i++) {\n if (!empty($state['saved_values'][TPPS_PAGE_4][\"organism-$i\"]['phenotype'])) {\n $p_exist = TRUE;\n }\n if (!empty($state['saved_values'][TPPS_PAGE_4][\"organism-$i\"]['genotype'])) {\n $g_exist = TRUE;\n }\n if ($state['saved_values'][TPPS_PAGE_4][\"organism-$i\"]['phenotype']['iso-check'] == TRUE) {\n $mass_spectro_exist = TRUE;\n }\n }\n \n $output .= $p_exist ? '<li class=\"nav-item\"><a class=\"nav-link\" role=\"tab\" data-toggle=\"tab\" href=\"#phenotype\">Phenotypes / Environments</a></li>' : \"\";\n $output .= $g_exist ? '<li class=\"nav-item\"><a class=\"nav-link\" role=\"tab\" data-toggle=\"tab\" href=\"#genotype\">Genotypes</a></li>' : \"\";\n $output .= $mass_spectro_exist ? '<li class=\"nav-item\"><a class=\"nav-link\" role=\"tab\" data-toggle=\"tab\" href=\"#mass_spectrometry\">Mass Spectrometry</a></li>' : \"\";\n $output .= '</ul><div id=\"tab-content\" class=\"tab-content\">';\n\n $output .= \"<div id=\\\"species\\\" role=\\\"tabpanel\\\" class=\\\"tab-pane fade in active\\\"></div>\";\n $output .= \"<div id=\\\"study\\\" role=\\\"tabpanel\\\" class=\\\"tab-pane fade\\\"></div>\";\n $output .= \"<div id=\\\"trees\\\" role=\\\"tabpanel\\\" class=\\\"tab-pane fade\\\"></div>\";\n\n $output .= $p_exist ? \"<div id=\\\"phenotype\\\" role=\\\"tabpanel\\\" class=\\\"tab-pane fade\\\"></div>\" : \"\";\n $output .= $g_exist ? \"<div id=\\\"genotype\\\" role=\\\"tabpanel\\\" class=\\\"tab-pane fade\\\"></div>\" : \"\";\n $output .= $mass_spectro_exist ? \"<div id=\\\"mass_spectrometry\\\" role=\\\"tabpanel\\\" class=\\\"tab-pane fade\\\"></div>\" : \"\";\n\n $output .= '</div>';\n return $output;\n}", "function render_tabs( $attributes ) {\n\t\t\t\tglobal $post;\n\t\t\t\t// If a page, then do split\n\t\t\t\t// Get ids of children\n\t\t\t\t$children = get_pages( array(\n\t\t\t\t\t\t'child_of' => $post->ID\n\t\t\t\t\t\t, 'parent' => $post->ID\n\t\t\t\t\t\t, 'sort_column' => 'menu_order'\n\t\t\t\t) );\n\n\t\t\t\t$child_titles = array();\n\t\t\t\t$child_contents = \"\n\";\n// TODO: start jquery 'loading' action here.\n\n\t\t\t\t$child_tablinks = \"\n<div id='subpage-tabs' class='ui-tabs'>\n\t<ul>\n\";\n\t\t\t\tforeach ( $children as $child ) {\n\t\t\t\t\t$child_tablinks .= \"\t\t<li><a href='#ctab-$child->ID'>$child->post_title</a></li>\n\";\n\t\t\t\t\t// Render any shortcodes\n\t\t\t\t\t$new_content = do_shortcode( $child->post_content );\n\t\t\t\t\t$child_contents .= \"<div id='ctab-$child->ID' class='ui-tabs-hide'>\n$new_content\n</div>\n\";\n\t\t\t\t}\n\t\t\t\t$child_tablinks .= \"\t</ul>\n\";\n\t\t\t\t$child_contents .= \"</div>\n<script type='text/javascript'>\n/*<![CDATA[*/\njQuery(\n\tfunction(){\n\t\tjQuery('#subpage-tabs').tabs();\n }\n);\n/*]]>*/\n</script>\n\";\n// TODO: destroy jquery 'loading' action here.\n\n\t\t\t\t$content = $child_tablinks . $child_contents;\n\t\t\t\treturn $content;\n\t\t}", "private function createMainConfigTab()\n {\n $tab = $this->createTab(\n 'responsiveMain',\n '__responsive_tab_header__',\n [\n 'attributes' => [\n 'layout' => 'anchor',\n 'autoScroll' => true,\n 'padding' => '0',\n 'defaults' => ['anchor' => '100%'],\n ],\n ]\n );\n\n $fieldSet = $this->createFieldSet(\n 'bareGlobal',\n '__global_configuration__',\n [\n 'attributes' => [\n 'padding' => '10',\n 'margin' => '5',\n 'layout' => 'anchor',\n 'defaults' => ['labelWidth' => 155, 'anchor' => '100%'],\n ],\n ]\n );\n\n $fieldSet->addElement(\n $this->createCheckboxField(\n 'offcanvasCart',\n '__offcanvas_cart__',\n true,\n $this->getLabelAttribute(\n 'offcanvas_cart_description'\n )\n )\n );\n\n $fieldSet->addElement(\n $this->createCheckboxField(\n 'offcanvasOverlayPage',\n '__offcanvas_move_method__',\n true,\n $this->getLabelAttribute(\n 'offcanvas_move_method_description'\n )\n )\n );\n\n $fieldSet->addElement(\n $this->createCheckboxField(\n 'focusSearch',\n '__focus_search__',\n false,\n $this->getLabelAttribute(\n 'focus_search_description'\n )\n )\n );\n\n $fieldSet->addElement(\n $this->createCheckboxField(\n 'displaySidebar',\n '__display_sidebar__',\n true,\n $this->getLabelAttribute(\n 'display_sidebar_description'\n )\n )\n );\n\n $fieldSet->addElement(\n $this->createCheckboxField(\n 'sidebarFilter',\n '__show_filter_in_sidebar__',\n false,\n $this->getLabelAttribute(\n 'show_filter_in_sidebar_description'\n )\n )\n );\n\n $fieldSet->addElement(\n $this->createCheckboxField(\n 'checkoutHeader',\n '__checkout_header__',\n true,\n $this->getLabelAttribute(\n 'checkout_header_description'\n )\n )\n );\n\n $fieldSet->addElement(\n $this->createCheckboxField(\n 'checkoutFooter',\n '__checkout_footer__',\n true,\n $this->getLabelAttribute(\n 'checkout_footer_description'\n )\n )\n );\n\n $fieldSet->addElement(\n $this->createCheckboxField(\n 'infiniteScrolling',\n '__enable_infinite_scrolling__',\n true,\n $this->getLabelAttribute(\n 'enable_infinite_scrolling_description'\n )\n )\n );\n\n $fieldSet->addElement(\n $this->createNumberField(\n 'infiniteThreshold',\n '__infinite_threshold__',\n 4,\n $this->getLabelAttribute(\n 'infinite_threshold_description',\n 'supportText'\n )\n )\n );\n\n $fieldSet->addElement(\n $this->createSelectField(\n 'lightboxZoomFactor',\n '__lightbox_zoom_factor__',\n 0,\n [\n ['value' => 0, 'text' => '__lightbox_zoom_factor_auto__'],\n ['value' => 1, 'text' => '__lightbox_zoom_factor_none__'],\n ['value' => 2, 'text' => '__lightbox_zoom_factor_2x__'],\n ['value' => 3, 'text' => '__lightbox_zoom_factor_3x__'],\n ['value' => 5, 'text' => '__lightbox_zoom_factor_5x__'],\n ],\n $this->getLabelAttribute(\n 'lightbox_zoom_factor_description',\n 'supportText'\n )\n )\n );\n\n $fieldSet->addElement(\n $this->createTextField(\n 'appleWebAppTitle',\n '__apple_web_app_title__',\n '',\n ['attributes' => ['lessCompatible' => false]]\n )\n );\n\n $fieldSet->addElement(\n $this->createCheckboxField(\n 'ajaxVariantSwitch',\n '__ajax_variant_switch__',\n true,\n ['attributes' => [\n 'lessCompatible' => false,\n 'boxLabel' => Shopware()->Snippets()->getNamespace('themes/bare/backend/config')->get('ajax_variant_switch_description'),\n ]]\n )\n );\n\n $fieldSet->addElement(\n $this->createCheckboxField(\n 'asyncJavascriptLoading',\n '__async_javascript_loading__',\n true,\n ['attributes' => [\n 'lessCompatible' => false,\n 'boxLabel' => Shopware()->Snippets()->getNamespace('themes/bare/backend/config')->get('async_javascript_loading_description'),\n ]]\n )\n );\n\n $fieldSet->addElement(\n $this->createCheckboxField(\n 'ajaxEmotionLoading',\n '__ajax_emotion_loading__',\n true,\n ['attributes' => [\n 'lessCompatible' => false,\n 'boxLabel' => Shopware()->Snippets()->getNamespace('themes/bare/backend/config')->get('ajax_emotion_loading_description'),\n ]]\n )\n );\n\n $tab->addElement($fieldSet);\n\n $fieldSet = $this->createFieldSet(\n 'responsiveGlobal',\n '__advanced_settings__',\n [\n 'attributes' => [\n 'padding' => '10',\n 'margin' => '5',\n 'layout' => 'anchor',\n 'defaults' => ['anchor' => '100%', 'labelWidth' => 155],\n ],\n ]\n );\n\n $fieldSet->addElement(\n $this->createTextAreaField(\n 'additionalCssData',\n '__additional_css_data__',\n '',\n ['attributes' => ['xtype' => 'textarea', 'lessCompatible' => false], 'help' => '__additional_css_data_description__']\n )\n );\n\n $fieldSet->addElement(\n $this->createTextAreaField(\n 'additionalJsLibraries',\n '__additional_js_libraries__',\n '',\n ['attributes' => ['xtype' => 'textarea', 'lessCompatible' => false], 'help' => '__additional_js_libraries_description__']\n )\n );\n\n $tab->addElement($fieldSet);\n\n return $tab;\n }", "protected function controlleradd_ins_buildinserttabs(&$arLines)\n {\n $this->arTranslation[] = $this->sTranslatePrefix.\"instabs_1\";\n $this->arTranslation[] = $this->sTranslatePrefix.\"instabs_2\"; \n \n $arLines[] = \"\\t\\t\\$arTabs = array();\";\n $arLines[] = \"\\t\\t//\\$sUrlTab = \\$this->build_url(\\$this->sModuleName,NULL,\\\"insert\\\");\";\n $arLines[] = \"\\t\\t//\\$arTabs[\\\"insert1\\\"]=array(\\\"href\\\"=>\\$sUrlTab,\\\"innerhtml\\\"=>$this->sTranslatePrefix\".\"instabs_1);\";\n $arLines[] = \"\\t\\t//\\$sUrlTab = \\$this->build_url(\\$this->sModuleName,NULL,\\\"insert2\\\");\";\n $arLines[] = \"\\t\\t//\\$arTabs[\\\"insert2\\\"]=array(\\\"href\\\"=>\\$sUrlTab,\\\"innerhtml\\\"=>$this->sTranslatePrefix\".\"instabs_2);\";\n $arLines[] = \"\\t\\t\\$oTabs = new AppHelperHeadertabs(\\$arTabs,\\\"insert1\\\");\";\n $arLines[] = \"\\t\\treturn \\$oTabs;\"; \n }", "function cd_status_cake_page(){\n ?>\n <div class=\"wrap\">\n <h2>Client Dash Status Cake</h2>\n <?php\n cd_create_tab_page(array(\n 'tabs' => array(\n 'Status' => 'status',\n 'Settings' => 'settings',\n 'Test' => 'test'\n )\n ));\n ?>\n </div><!--.wrap-->\n <?php\n}", "public function tab_containers()\n\t{\n\t\t$html = '';\n\t\t$tabs = $this->tabs;\n\n\t\tforeach($tabs as $tab)\n\t\t{\n\t\t\tif(isset($tab['render']))\n\t\t\t{\n\t\t\t\t$tpl = $tab['render']();\n\t\t\t\tif(is_object($tpl))\n\t\t\t\t{\n\t\t\t\t\t$renderer = Kostache_Layout::factory();\n\t\t\t\t\t$renderer->set_layout('admin/user/tab');\n\t\t\t\t\t$tpl->id = $tab['id'];\n\n\t\t\t\t\tif(!isset($tpl->title))\n\t\t\t\t\t{\n\t\t\t\t\t\t$tpl->title = $tab['title'];\n\t\t\t\t\t}\n\n\t\t\t\t\t$html .= $renderer->render($tpl);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$html .= $tpl;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $html;\n\t}", "public function add_settings_tabs() {\n\t\t$install_tabs = [ 'git_updater_addons' => esc_html__( 'API Add-Ons', 'git-updater' ) ];\n\t\tadd_filter(\n\t\t\t'gu_add_settings_tabs',\n\t\t\tfunction ( $tabs ) use ( $install_tabs ) {\n\t\t\t\treturn array_merge( $tabs, $install_tabs );\n\t\t\t}\n\t\t);\n\t\tadd_filter(\n\t\t\t'gu_add_admin_page',\n\t\t\tfunction ( $tab, $action ) {\n\t\t\t\t$this->add_admin_page( $tab, $action );\n\t\t\t},\n\t\t\t10,\n\t\t\t2\n\t\t);\n\t}", "function qode_lms_single_course_tabs( $tabs = array() ) {\n\t\tglobal $post;\n\t\t\n\t\t$course_sections = get_post_meta( get_the_ID(), 'qode_course_curriculum', true );\n\t\t$member_list = get_post_meta( get_the_ID(), 'qode_course_members_meta', true );\n\t\t$forum_id = get_post_meta( get_the_ID(), 'qode_course_forum_meta', true );\n\t\t\n\t\t$show_content = $post->post_content ? true : false;\n\t\tif( qode_lms_is_elementor_installed() ){\n if ( \\Elementor\\Plugin::$instance->preview->is_preview_mode() ) {\n $show_content = true;\n }\n }\n\t\t$show_curriculum = ! empty( $course_sections );\n\t\t$show_reviews = qode_lms_show_reviews();\n\t\t$show_members = ! empty( $member_list );\n\t\t$show_forum = ! empty( $forum_id );\n\t\t\n\t\tif ( ! empty( $forum_id ) ) {\n\t\t\t$forum_link = get_permalink( $forum_id );\n\t\t}\n\t\t\n\t\t// Description tab - shows course content\n\t\tif ( $show_content ) {\n\t\t\t$tabs['description'] = array(\n\t\t\t\t'title' => __( 'Description', 'qode-lms' ),\n\t\t\t\t'priority' => 10,\n\t\t\t\t'template' => 'content'\n\t\t\t);\n\t\t}\n\t\t\n\t\t// Curriculum tab - shows course curriculum\n\t\tif ( $show_curriculum ) {\n\t\t\t$tabs['curriculum'] = array(\n\t\t\t\t'title' => __( 'Curriculum', 'qode-lms' ),\n\t\t\t\t'priority' => 20,\n\t\t\t\t'template' => 'curriculum'\n\t\t\t);\n\t\t}\n\t\t\n\t\t// Reviews tab - shows reviews\n\t\tif ( $show_reviews ) {\n\t\t\t$tabs['reviews'] = array(\n\t\t\t\t'title' => __( 'Reviews', 'qode-lms' ),\n\t\t\t\t'priority' => 30,\n\t\t\t\t'template' => 'reviews-list'\n\t\t\t);\n\t\t}\n\t\t\n\t\t// Member tab - shows members\n\t\tif ( $show_members ) {\n\t\t\t$tabs['members'] = array(\n\t\t\t\t'title' => __( 'Members', 'qode-lms' ),\n\t\t\t\t'priority' => 40,\n\t\t\t\t'template' => 'members'\n\t\t\t);\n\t\t}\n\t\t\n\t\t// Forum tab - shows forum\n\t\tif ( $show_forum ) {\n\t\t\t$tabs['forum'] = array(\n\t\t\t\t'title' => __( 'Forum', 'qode-lms' ),\n\t\t\t\t'priority' => 40,\n\t\t\t\t'template' => 'forum',\n\t\t\t\t'link' => $forum_link\n\t\t\t);\n\t\t}\n\t\t\n\t\treturn $tabs;\n\t}", "protected function controlleradd_lst_buildlisttabs(&$arLines)\n {\n $this->arTranslation[] = $this->sTranslatePrefix.\"listtabs_1\";\n $this->arTranslation[] = $this->sTranslatePrefix.\"listtabs_2\";\n \n $arLines[] = \"\\t\\t\\$arTabs = array();\";\n $arLines[] = \"\\t\\t//\\$sUrlTab = \\\"\\$this->build_url(\\$this->sModuleName,NULL,\\\"get_list\\\",\\\"id=\\\".\\$this->get_get(\\\"id_parent_foreign\\\"));\";\n $arLines[] = \"\\t\\t//\\$arTabs[\\\"list\\\"]=array(\\\"href\\\"=>\\$sUrlTab,\\\"innerhtml\\\"=>$this->sTranslatePrefix\".\"listtabs_1);\";\n $arLines[] = \"\\t\\t//\\$sUrlTab = \\$this->build_url(\\$this->sModuleName,NULL,\\\"get_list_by_foreign\\\",\\\"id_foreign=\\\".\\$this->get_get(\\\"id_parent_foreign\\\"));\";\n $arLines[] = \"\\t\\t//\\$arTabs[\\\"listbyforeign\\\"]=array(\\\"href\\\"=>\\$sUrlTab,\\\"innerhtml\\\"=>$this->sTranslatePrefix\".\"listtabs_2);\";\n $arLines[] = \"\\t\\t\\$oTabs = new AppHelperHeadertabs(\\$arTabs,\\\"list\\\");\";\n $arLines[] = \"\\t\\treturn \\$oTabs;\"; \n }", "public function woo_new_product_tab( $tabs ) {\n\n\t\t// Adds the new tab\n\n\t\t$tabs['contents'] = array(\n\t\t\t'title' => __( 'Contents', 'woocommerce' ),\n\t\t\t'priority' => 20,\n\t\t\t'callback' => array( $this, 'contents_tab_content' )\n\t\t);\n\n\t\t$tabs['authors'] = array(\n\t\t\t'title' => __( 'Author(s)', 'woocommerce' ),\n\t\t\t'priority' => 30,\n\t\t\t'callback' => array( $this, 'authors_tab_content' )\n\t\t);\n\n\t\tunset( $tabs['reviews'] ); // Remove the reviews information tab\n\n\t\t$tabs['heweb17reviews'] = array(\n\t\t\t'title' => __( 'Reviews', 'woocommerce' ),\n\t\t\t'priority' => 40,\n\t\t\t'callback' => array( $this, 'reviews_tab_content' )\n\t\t);\n\n\t\tunset( $tabs['additional_information'] ); // Remove the additional information tab\n\n\t\treturn $tabs;\n\n\t}", "public function createTabsHistorique()\n {\n $tab = new Tab();\n $tab->active = 1;\n $names = array(1 => 'Historique CA', 'Historique CA');\n foreach (Language::getLanguages() as $language) {\n $tab->name[$language['id_lang']] = isset($names[$language['id_lang']])\n ? $names[$language['id_lang']] : $names[1];\n }\n $tab->class_name = 'AdminHistorique';\n $tab->module = $this->name;\n $tab->id_parent = Tab::getIdFromClassName('AdminParentStats');\n\n return (bool)$tab->add();\n }", "function render_wizard() {\n\t\t$lines = array();\n\n\t\t$action = explode(':', $this->wizard->modData['wizAction']);\n\t\tif ($action[0] == 'edit') {\n\t\t\t$this->regNewEntry($this->sectionID, $action[1]);\n\t\t\t$lines = $this->catHeaderLines(\n\t\t\t\t$lines, $this->sectionID, $this->wizard->options[$this->sectionID], '&nbsp;', $action[1]\n\t\t\t);\n\t\t\t$piConf = $this->wizard->wizArray[$this->sectionID][$action[1]];\n\t\t\t$ffPrefix = '[' . $this->sectionID . '][' . $action[1] . ']';\n\n\t\t\t// Unique table name:\n\t\t\t$table_suffixes = array();\n\t\t\tif (is_array($this->wizard->wizArray[$this->sectionID])) {\n\t\t\t\tforeach ($this->wizard->wizArray[$this->sectionID] as $kk => $vv) {\n\t\t\t\t\tif (!strcmp($action[1], $kk)) {\n\t\t\t\t\t\tif (count($table_suffixes)\n\t\t\t\t\t\t\t&& t3lib_div::inList(\n\t\t\t\t\t\t\t\timplode(',', $table_suffixes), trim($vv['tablename']) . 'Z'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t$piConf['tablename'] .= $kk;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t$table_suffixes[] = trim($vv['tablename']) . 'Z';\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t// Enter title of the table\n\t\t\t$subContent = '<strong>Tablename:</strong><BR>' .\n\t\t\t\t$this->returnName($this->wizard->extKey, 'tables') . '_' . $this->renderStringBox(\n\t\t\t\t\t$ffPrefix . '[tablename]', trim($piConf['tablename'])\n\t\t\t\t) .\n\t\t\t\t'<BR><strong>Notice:</strong> Use characters a-z0-9 only. Only lowercase, no spaces.<BR>\n\t\t\t\tThis becomes the table name in the database. ';\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\n\t\t\t// Enter title of the table\n\t\t\t$subContent = '<strong>Title of the table:</strong><BR>' .\n\t\t\t\t$this->renderStringBox_lang('title', $ffPrefix, $piConf);\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\n\t\t\t// Fields - overview\n\t\t\t$c = array(0);\n\t\t\t$this->usedNames = array();\n\t\t\tif (is_array($piConf['fields'])) {\n\t\t\t\t$piConf['fields'] = $this->cleanFieldsAndDoCommands(\n\t\t\t\t\t$piConf['fields'], $this->sectionID, $action[1],\n\t\t\t\t\t$piConf['which_table'] ? $piConf['which_table'] : ''\n\t\t\t\t);\n\n\t\t\t\t// Do it for real...\n\t\t\t\t$lines[] = '<tr' . $this->bgCol(1) . '><td><strong> Fields Overview </strong></td></tr>';\n\t\t\t\t$lines[] = '<tr><td></td></tr>';\n\n\t\t\t\t$subContent = '<tr ' . $this->bgCol(2) . '>\n\t\t\t\t\t<td><strong>Name</strong></td>\n\t\t\t\t\t<td><strong>Title</strong></td>\n\t\t\t\t\t<td><strong>Type</strong></td>\n\t\t\t\t\t<td><strong>Exclude?</strong></td>\n\t\t\t\t\t<td><strong>Details</strong></td>\n\t\t\t\t</tr>';\n\t\t\t\tforeach ($piConf['fields'] as $k => $v) {\n\t\t\t\t\t$c[] = $k;\n\t\t\t\t\t$subContent .= $this->renderFieldOverview($ffPrefix . '[fields][' . $k . ']', $v);\n\t\t\t\t}\n\t\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td><table>' . $this->fw($subContent) . '</table></td></tr>';\n\t\t\t}\n\n\t\t\t$lines[] = '<tr' . $this->bgCol(1) . '><td><strong> Edit Fields </strong></td></tr>';\n\t\t\t$lines[] = '<tr><td></td></tr>';\n\n\t\t\t$subContent = '';\n\t\t\t$subContent .=\n\t\t\t\t$this->renderCheckBox($ffPrefix . '[add_deleted]', $piConf['add_deleted'], 1) . 'Add \"Deleted\" field '\n\t\t\t\t. $this->whatIsThis(\n\t\t\t\t\t'Whole system: If a table has a deleted column, records are never really deleted, just \"marked deleted\" . Thus deleted records can actually be restored by clearing a deleted-flag later. Notice that all attached files are also not deleted from the server, so if you expect the table to hold some heavy size uploads, maybe you should not set this...'\n\t\t\t\t) . '<BR>';\n\t\t\t$subContent .=\n\t\t\t\t$this->renderCheckBox($ffPrefix . '[add_hidden]', $piConf['add_hidden'], 1) . 'Add \"Hidden\" flag '\n\t\t\t\t. $this->whatIsThis(\n\t\t\t\t\t'Frontend: The \"Hidden\" flag will prevent the record from being displayed on the frontend.'\n\t\t\t\t) . '<BR>' . $this->resImg('t_flag_hidden.png', 'hspace=20', '', '<BR><BR>');\n\t\t\t$subContent .=\n\t\t\t\t$this->renderCheckBox($ffPrefix . '[add_starttime]', $piConf['add_starttime']) . 'Add \"Starttime\" '\n\t\t\t\t. $this->whatIsThis(\n\t\t\t\t\t'Frontend: If a \"Starttime\" is set, the record will not be visible on the website, before that date arrives.'\n\t\t\t\t) . '<BR>' . $this->resImg('t_flag_starttime.png', 'hspace=20', '', '<BR><BR>');\n\t\t\t$subContent .= $this->renderCheckBox($ffPrefix . '[add_endtime]', $piConf['add_endtime']) . 'Add \"Endtime\" '\n\t\t\t\t. $this->whatIsThis(\n\t\t\t\t\t'Frontend: If a \"Endtime\" is set, the record will be hidden from that date and into the future.'\n\t\t\t\t) . '<BR>' . $this->resImg('t_flag_endtime.png', 'hspace=20', '', '<BR><BR>');\n\t\t\t$subContent .=\n\t\t\t\t$this->renderCheckBox($ffPrefix . '[add_access]', $piConf['add_access']) . 'Add \"Access group\" '\n\t\t\t\t. $this->whatIsThis(\n\t\t\t\t\t'Frontend: If a frontend user group is set for a record, only frontend users that are members of that group will be able to see the record.'\n\t\t\t\t) . '<BR>' . $this->resImg('t_flag_access.png', 'hspace=20', '', '<BR><BR>');\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\t\t\t// Sorting\n\t\t\t$optValues = array(\n\t\t\t\t'crdate' => '[crdate]',\n\t\t\t\t'cruser_id' => '[cruser_id]',\n\t\t\t\t'tstamp' => '[tstamp]',\n\t\t\t);\n\t\t\t$subContent = '';\n\t\t\t$subContent .= $this->renderCheckBox($ffPrefix . '[localization]', $piConf['localization'])\n\t\t\t\t. 'Enabled localization features' . $this->whatIsThis(\n\t\t\t\t\t'If set, the records will have a selector box for language and a reference field which can point back to the original default translation for the record. These features are part of the internal framework for localization.'\n\t\t\t\t) . '<BR>';\n\t\t\t$subContent .=\n\t\t\t\t$this->renderCheckBox($ffPrefix . '[versioning]', $piConf['versioning']) . 'Enable versioning '\n\t\t\t\t. $this->whatIsThis(\n\t\t\t\t\t'If set, you will be able to versionize records from this table. Highly recommended if the records are passed around in a workflow.'\n\t\t\t\t) . '<BR>';\n\t\t\t$subContent .=\n\t\t\t\t$this->renderCheckBox($ffPrefix . '[sorting]', $piConf['sorting']) . 'Manual ordering of records '\n\t\t\t\t. $this->whatIsThis(\n\t\t\t\t\t'If set, the records can be moved up and down relative to each other in the backend. Just like Content Elements. Otherwise they are sorted automatically by any field you specify'\n\t\t\t\t) . '<BR>';\n\t\t\t$subContent .= $this->textSetup(\n\t\t\t\t'', 'If \"Manual ordering\" is not set, order the table by this field:<BR>' .\n\t\t\t\t$this->renderSelectBox(\n\t\t\t\t\t$ffPrefix . '[sorting_field]', $piConf['sorting_field'],\n\t\t\t\t\t$this->currentFields($optValues, $piConf['fields'])\n\t\t\t\t) . '<BR>' .\n\t\t\t\t$this->renderCheckBox($ffPrefix . '[sorting_desc]', $piConf['sorting_desc']) . ' Descending'\n\t\t\t);\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\t\t\t// Type field\n\t\t\t$optValues = array(\n\t\t\t\t'0' => '[none]',\n\t\t\t);\n\t\t\t$subContent = '<strong>\"Type-field\", if any:<BR></strong>' .\n\t\t\t\t$this->renderSelectBox(\n\t\t\t\t\t$ffPrefix . '[type_field]', $piConf['type_field'],\n\t\t\t\t\t$this->currentFields($optValues, $piConf['fields'])\n\t\t\t\t) .\n\t\t\t\t$this->whatIsThis(\n\t\t\t\t\t'A \"type-field\" is the field in the table which determines how the form is rendered in the backend, eg. which fields are shown under which circumstances. For instance the Content Element table \"tt_content\" has a type-field, CType. The value of this field determines if the editing form shows the bodytext field as is the case when the type is \"Text\" or if also the image-field should be shown as when the type is \"Text w/Image\"'\n\t\t\t\t);\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\t\t\t// Header field\n\t\t\t$optValues = array(\n\t\t\t\t'0' => '[none]',\n\t\t\t);\n\t\t\t$subContent = '<strong>Label-field:<BR></strong>' .\n\t\t\t\t$this->renderSelectBox(\n\t\t\t\t\t$ffPrefix . '[header_field]', $piConf['header_field'],\n\t\t\t\t\t$this->currentFields($optValues, $piConf['fields'])\n\t\t\t\t) .\n\t\t\t\t$this->whatIsThis('A \"label-field\" is the field used as record title in the backend.');\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\t\t\t// Icon\n\t\t\t$optValues = array(\n\t\t\t\t'default.gif' => 'Default (white)',\n\t\t\t\t'default_black.gif' => 'Black',\n\t\t\t\t'default_gray4.gif' => 'Gray',\n\t\t\t\t'default_blue.gif' => 'Blue',\n\t\t\t\t'default_green.gif' => 'Green',\n\t\t\t\t'default_red.gif' => 'Red',\n\t\t\t\t'default_yellow.gif' => 'Yellow',\n\t\t\t\t'default_purple.gif' => 'Purple',\n\t\t\t);\n\n\t\t\t$subContent = $this->renderSelectBox($ffPrefix . '[defIcon]', $piConf['defIcon'], $optValues)\n\t\t\t\t. ' Default icon ' . $this->whatIsThis(\n\t\t\t\t\t'All tables have at least one associated icon. Select which default icon you wish. You can always substitute the file with another.'\n\t\t\t\t);\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\t\t\t// Allowed on pages\n\t\t\t$subContent = '<strong>Allowed on pages:<BR></strong>' .\n\t\t\t\t$this->renderCheckBox(\n\t\t\t\t\t$ffPrefix . '[allow_on_pages]', $piConf['allow_on_pages']\n\t\t\t\t) . ' Allow records from this table to be created on regular pages.';\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\t\t\t// Allowed in \"Insert Records\"\n\t\t\t$subContent = '<strong>Allowed in \"Insert Records\" field in content elements:<BR></strong>' .\n\t\t\t\t$this->renderCheckBox(\n\t\t\t\t\t$ffPrefix . '[allow_ce_insert_records]', $piConf['allow_ce_insert_records']\n\t\t\t\t) . ' Allow records from this table to be linked to by content elements.';\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\t\t\t// Add new button\n\t\t\t$subContent = '<strong>Add \"Save and new\" button in forms:<BR></strong>' .\n\t\t\t\t$this->renderCheckBox(\n\t\t\t\t\t$ffPrefix . '[save_and_new]', $piConf['save_and_new']\n\t\t\t\t) . ' Will add an additional save-button to forms by which you can save the item and instantly create the next.';\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\n\t\t\t$subContent = '<strong>Notice on fieldnames:<BR></strong>' .\n\t\t\t\t'Don\\'t use fieldnames from this list of reserved names/words: <BR>\n\t\t\t\t<blockquote><em>' . implode(', ', $this->wizard->reservedWords) . '</em></blockquote>';\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\t\t\t// PRESETS:\n\t\t\t$selPresetBox = $this->presetBox($piConf[\"fields\"]);\n\n\t\t\t// Fields\n\t\t\t$c = array(0);\n\t\t\t$this->usedNames = array();\n\t\t\tif (is_array($piConf['fields'])) {\n\n\t\t\t\t// Do it for real...\n\t\t\t\tforeach ($piConf['fields'] as $k => $v) {\n\t\t\t\t\t$c[] = $k;\n\t\t\t\t\t$subContent = $this->renderField($ffPrefix . '[fields][' . $k . ']', $v);\n\t\t\t\t\t$lines[] = '<tr' . $this->bgCol(2) . '><td>' . $this->fw(\n\t\t\t\t\t\t\t'<strong>FIELD:</strong> <em>' . $v['fieldname'] . '</em>'\n\t\t\t\t\t\t) . '</td></tr>';\n\t\t\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// New field:\n\t\t\t$k = max($c) + 1;\n\t\t\t$v = array();\n\t\t\t$lines[] = '<tr' . $this->bgCol(2) . '><td>' . $this->fw('<strong>NEW FIELD:</strong>') . '</td></tr>';\n\t\t\t$subContent = $this->renderField($ffPrefix . '[fields][' . $k . ']', $v, 1);\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\n\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw(\n\t\t\t\t\t'<BR><BR>Load preset fields: <BR>' . $selPresetBox\n\t\t\t\t) . '</td></tr>';\n\t\t}\n\n\t\t/* HOOK: Place a hook here, so additional output can be integrated */\n\t\tif (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter']['add_cat_tables'])) {\n\t\t\tforeach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter']['add_cat_tables'] as $_funcRef) {\n\t\t\t\t$lines = t3lib_div::callUserFunction($_funcRef, $lines, $this);\n\t\t\t}\n\t\t}\n\n\t\t$content = '<table border=0 cellpadding=2 cellspacing=2>' . implode('', $lines) . '</table>';\n\n\t\treturn $content;\n\t}", "protected function _register_controls() {\n /*-----------------------------------------------------------------------------------*/\n /* Content TAB\n /*-----------------------------------------------------------------------------------*/\n $this->start_controls_section(\n 'title_section',\n array(\n 'label' => __('APR Heading', 'apr-core' ),\n )\n );\n /* Heading 1*/\n $this->add_control(\n 'title',\n array(\n 'label' => __( 'Title', 'apr-core' ),\n 'type' => Controls_Manager::TEXTAREA,\n 'dynamic' => array(\n 'active' => true\n ),\n 'placeholder' => __( 'Enter your title', 'apr-core' ),\n 'default' => __( 'Enter your title', 'apr-core' ),\n 'label_block' => true,\n )\n );\n $this->add_control(\n 'heading_size',\n array(\n 'label' => __( 'HTML Tag', 'apr-core' ),\n 'type' => Controls_Manager::SELECT,\n 'options' => array(\n 'h1' => __( 'H1', 'apr-core' ),\n 'h2' => __( 'H2', 'apr-core' ),\n 'h3' => __( 'H3', 'apr-core' ),\n 'h4' => __( 'H4', 'apr-core' ),\n 'h5' => __( 'H5', 'apr-core' ),\n 'p' => __( 'p', 'apr-core' ),\n ),\n 'default' => 'h3',\n )\n );\n $this->add_control(\n 'link',\n [\n 'label' => __( 'Link', 'elementor' ),\n 'type' => Controls_Manager::URL,\n 'dynamic' => [\n 'active' => true,\n ],\n 'default' => [\n 'url' => '',\n ],\n 'separator' => 'before',\n ]\n );\n $this->add_responsive_control(\n 'alignment',\n array(\n 'label' => __('Alignment', 'apr-core'),\n 'type' => Controls_Manager::CHOOSE,\n 'default' => 'left',\n 'options' => array(\n 'left' => array(\n 'title' => __( 'Left', 'apr-core' ),\n 'icon' => 'fa fa-align-left',\n ),\n 'center' => array(\n 'title' => __( 'Center', 'apr-core' ),\n 'icon' => 'fa fa-align-center',\n ),\n 'right' => array(\n 'title' => __( 'Right', 'apr-core' ),\n 'icon' => 'fa fa-align-right',\n )\n ),\n )\n );\n $this->add_control(\n 'description',\n array(\n 'label' => __( 'Description', 'apr-core' ),\n 'type' => Controls_Manager::TEXTAREA,\n 'dynamic' => array(\n 'active' \t=> true\n ),\n )\n );\n $this->add_control(\n 'description_position',\n [\n 'label' => __( 'Description Position', 'apr-core' ),\n 'type' => Controls_Manager::SELECT,\n 'default' => 'bottom',\n 'options' => [\n 'aside' => __( 'Aside', 'apr-core' ),\n 'bottom' => __( 'Bottom', 'apr-core' ),\n ],\n ]\n );\n $this->add_control(\n 'list_divider',\n [\n 'label' => __( 'Divider', 'apr-core' ),\n 'type' => Controls_Manager::SWITCHER,\n 'default' => 'no',\n 'separator' => 'before',\n ]\n );\n\n $this->add_control(\n 'divider_position',\n [\n 'label' => __( 'Position', 'apr-core' ),\n 'type' => Controls_Manager::SELECT,\n 'options' => [\n 'top' => __( 'Top', 'apr-core' ),\n 'bottom' => __( 'Bottom', 'apr-core' )\n ],\n 'default' => 'bottom',\n 'condition' => [\n 'list_divider' => 'yes',\n ]\n ]\n );\n\n $this->add_control(\n 'divider_color',\n [\n 'label' => __( 'Color', 'apr-core' ),\n 'type' => Controls_Manager::COLOR,\n 'default' => '',\n 'scheme' => [\n 'type' => Scheme_Color::get_type(),\n 'value' => Scheme_Color::COLOR_3,\n ],\n 'condition' => [\n 'list_divider' => 'yes',\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-title:before' => 'background-color: {{VALUE}};',\n ],\n ]\n );\n $this->add_control(\n 'divider_color_hover',\n [\n 'label' => __( 'Color Hover', 'apr-core' ),\n 'type' => Controls_Manager::COLOR,\n 'default' => '',\n 'scheme' => [\n 'type' => Scheme_Color::get_type(),\n 'value' => Scheme_Color::COLOR_3,\n ],\n 'condition' => [\n 'list_divider' => 'yes',\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-title:hover:before' => 'background-color: {{VALUE}};',\n ],\n ]\n );\n $this->add_responsive_control(\n 'divider_top',\n [\n 'label' => __( 'Top Space', 'apr-core' ),\n 'type' => Controls_Manager::SLIDER,\n 'default' => [\n 'size' => '',\n 'unit' => 'px',\n ],\n 'range' => [\n 'px' => [\n 'min' => 0,\n 'max' => 1000,\n ],\n ],\n 'size_units' => [ 'px' ],\n 'condition' => [\n 'list_divider' => 'yes',\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-title:before' => 'top: {{SIZE}}{{UNIT}};',\n ],\n ]\n );\n\n $this->add_responsive_control(\n 'divider_left',\n [\n 'label' => __( 'Left Space', 'apr-core' ),\n 'type' => Controls_Manager::SLIDER,\n 'default' => [\n 'size' => '',\n 'unit' => 'px',\n ],\n 'range' => [\n 'px' => [\n 'min' => 0,\n 'max' => 1000,\n ],\n ],\n 'size_units' => [ 'px' ],\n 'condition' => [\n 'list_divider' => 'yes',\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-title:before' => 'left: {{SIZE}}{{UNIT}};',\n ],\n ]\n );\n\n $this->add_responsive_control(\n 'divider_weight',\n [\n 'label' => __( 'Height', 'apr-core' ),\n 'type' => Controls_Manager::SLIDER,\n 'default' => [\n 'size' => 1,\n 'unit' => 'px',\n ],\n 'range' => [\n 'px' => [\n 'min' => 0,\n 'max' => 1000,\n ],\n '%' => [\n 'min' => 0,\n 'max' => 100,\n ],\n ],\n 'size_units' => [ '%', 'px' ],\n 'condition' => [\n 'list_divider' => 'yes',\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-title:before' => 'height: {{SIZE}}{{UNIT}};',\n ],\n ]\n );\n\n $this->add_responsive_control(\n 'divider_width',\n [\n 'label' => __( 'Width', 'apr-core' ),\n 'type' => Controls_Manager::SLIDER,\n 'condition' => [\n 'list_divider' => 'yes',\n ],\n 'default' => [\n 'size' => 100,\n 'unit' => 'px',\n ],\n 'range' => [\n 'px' => [\n 'min' => 0,\n 'max' => 1000,\n ],\n '%' => [\n 'min' => 0,\n 'max' => 100,\n ],\n ],\n 'size_units' => [ '%', 'px' ],\n 'selectors' => [\n '{{WRAPPER}} .heading-title:before' => 'width: {{SIZE}}{{UNIT}};',\n ],\n ]\n );\n \n $this->end_controls_section();\n /*-----------------------------------------------------------------------------------*/\n /* Style TAB\n /*-----------------------------------------------------------------------------------*/\n $this->start_controls_section(\n 'title_style_section',\n array(\n 'label' => __( 'Color', 'apr-core' ),\n 'tab' => Controls_Manager::TAB_STYLE,\n )\n );\n $this->add_control(\n 'title_color',\n [\n 'label' => __( 'Title Color', 'apr-core' ),\n 'type' => Controls_Manager::COLOR,\n 'scheme' => [\n 'type' => Scheme_Color::get_type(),\n 'value' => Scheme_Color::COLOR_1,\n ],\n 'selectors' => [\n // Stronger selector to avoid section style from overwriting\n '{{WRAPPER}} .heading-modern .heading-title,\n {{WRAPPER}} .heading-modern .heading-title a' => 'color: {{VALUE}};',\n ],\n ]\n );\n $this->add_control(\n 'desc_color',\n [\n 'label' \t=> __( 'Description color', 'apr-core' ),\n 'type' \t\t=> Controls_Manager::COLOR,\n 'scheme' \t=> [\n 'type' \t\t=> Scheme_Color::get_type(),\n 'value' \t=> Scheme_Color::COLOR_1,\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-modern .description' => 'color: {{VALUE}};',\n ],\n ]\n );\n $this->end_controls_section();\n $this->start_controls_section(\n 'desc_style',\n array(\n 'label' => __( 'Typography', 'apr-core' ),\n 'tab' => Controls_Manager::TAB_STYLE,\n )\n );\n\n $this->add_group_control(\n Group_Control_Typography::get_type(),\n [\n 'name' \t\t=> 'title_typo',\n 'label' \t=> __( 'Title', 'apr-core' ),\n 'selector' => '{{WRAPPER}} .heading-modern .heading-title',\n ]\n );\n $this->add_responsive_control(\n 'title_width',\n array(\n 'label' => __('Max width Title','apr-core' ),\n 'type' => Controls_Manager::SLIDER,\n 'size_units' => array('px','%'),\n 'range' => array(\n '%' => array(\n 'min' => 1,\n 'max' => 100,\n ),\n 'px' => array(\n 'min' => 1,\n 'max' => 1600,\n 'step' => 5\n )\n ),\n 'selectors' => array(\n '{{WRAPPER}} .heading-modern .heading-title' => 'max-width:{{SIZE}}{{UNIT}};'\n ),\n )\n );\n $this->add_group_control(\n Group_Control_Typography::get_type(),\n [\n 'name' \t\t=> 'desc_typo',\n 'label' \t=> __( 'Description', 'apr-core' ),\n 'scheme' => Scheme_Typography::TYPOGRAPHY_1,\n 'selector' \t=> '{{WRAPPER}} .heading-modern .description',\n ]\n );\n $this->add_responsive_control(\n 'desc_width',\n array(\n 'label' => __('Max width Description','apr-core' ),\n 'type' => Controls_Manager::SLIDER,\n 'size_units' => array('px','%'),\n 'range' => array(\n '%' => array(\n 'min' => 1,\n 'max' => 100,\n ),\n 'px' => array(\n 'min' => 1,\n 'max' => 1600,\n 'step' => 5\n )\n ),\n 'selectors' => array(\n '{{WRAPPER}} .heading-modern .description' => 'max-width:{{SIZE}}{{UNIT}};'\n ),\n )\n );\n $this->add_responsive_control(\n 'title_margin',\n array(\n 'label' => __( 'Margin Title', 'apr-core' ),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => [ 'px', '%' ],\n 'allowed_dimensions' => 'vertical',\n 'placeholder' => [\n 'top' => '',\n 'right' => 'auto',\n 'bottom' => '',\n 'left' => 'auto',\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-modern .heading-title' => 'margin-top: {{TOP}}{{UNIT}}; margin-bottom: {{BOTTOM}}{{UNIT}};',\n ],\n )\n );\n\n $this->add_responsive_control(\n 'title_padding',\n [\n 'label' => __( 'Padding Title', 'apr-core' ),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => [ 'px', 'em', '%' ],\n 'selectors' => [\n '{{WRAPPER}} .heading-modern .heading-title' => 'padding:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'\n ],\n ]\n );\n $this->add_responsive_control(\n 'desc_margin',\n array(\n 'label' => __( 'Margin Description', 'apr-core' ),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => [ 'px', '%' ],\n 'allowed_dimensions' => 'vertical',\n 'placeholder' => [\n 'top' => '',\n 'right' => 'auto',\n 'bottom' => '',\n 'left' => 'auto',\n ],\n 'selectors' => [\n '{{WRAPPER}} .heading-modern .description' => 'margin-top: {{TOP}}{{UNIT}}; margin-bottom: {{BOTTOM}}{{UNIT}};',\n ],\n )\n );\n $this->add_responsive_control(\n 'description_padding',\n [\n 'label' => __( 'Padding Description', 'apr-core' ),\n 'type' => Controls_Manager::DIMENSIONS,\n 'size_units' => [ 'px', 'em', '%' ],\n 'selectors' => [\n '{{WRAPPER}} .heading-modern .description' => 'padding:{{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};'\n ],\n ]\n );\n $this->add_control(\n 'title_color_hover',\n [\n 'label' => __( 'Title Color Hover', 'apr-core' ),\n 'type' => Controls_Manager::COLOR,\n 'scheme' => [\n 'type' => Scheme_Color::get_type(),\n 'value' => Scheme_Color::COLOR_1,\n ],\n 'selectors' => [\n // Stronger selector to avoid section style from overwriting\n '{{WRAPPER}} .heading-modern .heading-title:hover,\n {{WRAPPER}} .heading-modern .heading-title a:hover' => 'color: {{VALUE}};',\n ],\n ]\n );\n $this->add_control(\n 'desc_color_hover',\n [\n 'label' => __( 'Description Color Hover', 'apr-core' ),\n 'type' => Controls_Manager::COLOR,\n 'scheme' => [\n 'type' => Scheme_Color::get_type(),\n 'value' => Scheme_Color::COLOR_1,\n ],\n 'selectors' => [\n // Stronger selector to avoid section style from overwriting\n '{{WRAPPER}} .heading-modern .description:hover' => 'color: {{VALUE}};',\n ],\n ]\n );\n $this->end_controls_section();\n }", "function dw_index_tab_fields($cf)\n{\n global $post;\n $tab_num = get_post_meta($post->ID, 'guidance_tabs', true);\n if (is_numeric($tab_num)) {\n for ($t = 0; $t < $tab_num; $t++) {\n $cf[] = 'guidance_tabs_' . $t . '_tab_title';\n\n $section_num = get_post_meta($post->ID, 'guidance_tabs_'.$t.'_sections', true);\n\n if (is_numeric($section_num)) {\n for ($s = 0; $s < $section_num; $s++) {\n $cf[] = 'guidance_tabs_' . $t . '_sections_' . $s . '_section_title';\n $cf[] = 'guidance_tabs_' . $t . '_sections_' . $s . '_section_html_content';\n }\n }\n\n $links_num = get_post_meta($post->ID, 'guidance_tabs_'.$t.'_links', true);\n\n if (is_numeric($links_num)) {\n for ($l = 0; $l < $links_num; $l++) {\n $cf[] = 'guidance_tabs_' . $t . '_links_' . $l . '_link_title';\n }\n }\n }\n }\n\n return $cf;\n}", "function bd_custom_tabs_Widget(){\n\n\t\t// Widget settings\n\t\t$ops = array('classname' => 'widget_custom_tabs', 'description' => __('3 tabs: last posts, popular posts, and last comments', 'wolf'));\n\n\t\t/* Create the widget. */\n\t\tparent::__construct( 'widget_custom_tabs', __('Custom tabs', 'wolf'), $ops );\n\t\t\n\t}", "private function include_tabs() {\n\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/tabs.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/general.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/backup.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/ssl.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/cache.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/sftp.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/clone-site.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/copy-to-existing-site.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/site-sync.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/crons.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/php-options.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/change-domain.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/misc.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/tweaks.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/tools.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/theme-and-plugin-updates.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/phpmyadmin.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/6g_firewall.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/7g_firewall.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/statistics.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/logs.php';\n\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/redirect-rules.php';\n\n\t\tif ( defined( 'WPCD_SHOW_SITE_USERS_TAB' ) && WPCD_SHOW_SITE_USERS_TAB ) {\n\t\t\trequire_once wpcd_path . 'includes/core/apps/wordpress-app/tabs/site-system-users.php';\n\t\t}\n\n\t\t/**\n\t\t * Need to add new tabs or add data to existing tabs from an add-on?\n\t\t * Then this action hook MUST be used! Otherwise, weird\n\t\t * stuff will happen and you will not know why!\n\t\t */\n\t\tdo_action( 'wpcd_wpapp_include_app_tabs' );\n\n\t}", "public function describeTabs();", "function woocommerce_settings_tabs_array( $settings_tabs ) {\n $settings_tabs[$this->id] = __('GWP Custom Tabs','GWP');\n return $settings_tabs;\n }", "private function createTabsProspects()\n {\n $tab = new Tab();\n $tab->active = 1;\n $names = array(1 => 'Prospects', 'Prospects');\n foreach (Language::getLanguages() as $language) {\n $tab->name[$language['id_lang']] = isset($names[$language['id_lang']])\n ? $names[$language['id_lang']] : $names[1];\n }\n $tab->class_name = 'AdminProspects';\n $tab->module = $this->name;\n $tab->id_parent = Tab::getIdFromClassName('AdminCustomers');\n\n return (bool)$tab->add();\n }", "public function add_tab( $tabs ) {\n\t$tabs['account']['Billing'] = 'billing';\n\treturn $tabs;\n\t}", "private function createButtonsTab()\n {\n $tab = $this->createTab(\n 'buttons_tab',\n '__responsive_tab_buttons__',\n [\n 'attributes' => [\n 'autoScroll' => true,\n ],\n ]\n );\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 90]);\n $fieldSetButtons = $this->createFieldSet(\n 'buttons_fieldset',\n '__responsive_tab_buttons_fieldset_global__',\n ['attributes' => $attributes]\n );\n\n $fieldSetButtons->addElement(\n $this->createTextField(\n 'btn-font-size',\n '@btn-font-size',\n $this->themeFontDefaults['btn-font-size']\n )\n );\n $fieldSetButtons->addElement(\n $this->createTextField(\n 'btn-icon-size',\n '@btn-icon-size',\n $this->themeFontDefaults['btn-icon-size']\n )\n );\n\n $tab->addElement($fieldSetButtons);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 200]);\n $fieldSetDefaultButtons = $this->createFieldSet(\n 'buttons_default_fieldset',\n '__responsive_tab_buttons_fieldset_default__',\n ['attributes' => $attributes]\n );\n\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-top-bg',\n '@btn-default-top-bg',\n $this->themeColorDefaults['btn-default-top-bg']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-bottom-bg',\n '@btn-default-bottom-bg',\n $this->themeColorDefaults['btn-default-bottom-bg']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-hover-bg',\n '@btn-default-hover-bg',\n $this->themeColorDefaults['btn-default-hover-bg']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-text-color',\n '@btn-default-text-color',\n $this->themeColorDefaults['btn-default-text-color']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-hover-text-color',\n '@btn-default-hover-text-color',\n $this->themeColorDefaults['btn-default-hover-text-color']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-border-color',\n '@btn-default-border-color',\n $this->themeColorDefaults['btn-default-border-color']\n )\n );\n $fieldSetDefaultButtons->addElement(\n $this->createColorPickerField(\n 'btn-default-hover-border-color',\n '@btn-default-hover-border-color',\n $this->themeColorDefaults['btn-default-hover-border-color']\n )\n );\n\n $tab->addElement($fieldSetDefaultButtons);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 170]);\n $fieldSetPrimaryButtons = $this->createFieldSet(\n 'buttons_primary_fieldset',\n '__responsive_tab_buttons_fieldset_primary__',\n ['attributes' => $attributes]\n );\n\n $fieldSetPrimaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-primary-top-bg',\n '@btn-primary-top-bg',\n $this->themeColorDefaults['btn-primary-top-bg']\n )\n );\n $fieldSetPrimaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-primary-bottom-bg',\n '@btn-primary-bottom-bg',\n $this->themeColorDefaults['btn-primary-bottom-bg']\n )\n );\n $fieldSetPrimaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-primary-hover-bg',\n '@btn-primary-hover-bg',\n $this->themeColorDefaults['btn-primary-hover-bg']\n )\n );\n $fieldSetPrimaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-primary-text-color',\n '@btn-primary-text-color',\n $this->themeColorDefaults['btn-primary-text-color']\n )\n );\n $fieldSetPrimaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-primary-hover-text-color',\n '@btn-primary-hover-text-color',\n $this->themeColorDefaults['btn-primary-hover-text-color']\n )\n );\n\n $tab->addElement($fieldSetPrimaryButtons);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 170]);\n $fieldSetSecondaryButtons = $this->createFieldSet(\n 'buttons_secondary_fieldset',\n '__responsive_tab_buttons_fieldset_secondary__',\n ['attributes' => $attributes]\n );\n\n $fieldSetSecondaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-secondary-top-bg',\n '@btn-secondary-top-bg',\n $this->themeColorDefaults['btn-secondary-top-bg']\n )\n );\n $fieldSetSecondaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-secondary-bottom-bg',\n '@btn-secondary-bottom-bg',\n $this->themeColorDefaults['btn-secondary-bottom-bg']\n )\n );\n $fieldSetSecondaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-secondary-hover-bg',\n '@btn-secondary-hover-bg',\n $this->themeColorDefaults['btn-secondary-hover-bg']\n )\n );\n $fieldSetSecondaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-secondary-text-color',\n '@btn-secondary-text-color',\n $this->themeColorDefaults['btn-secondary-text-color']\n )\n );\n $fieldSetSecondaryButtons->addElement(\n $this->createColorPickerField(\n 'btn-secondary-hover-text-color',\n '@btn-secondary-hover-text-color',\n $this->themeColorDefaults['btn-secondary-hover-text-color']\n )\n );\n\n $tab->addElement($fieldSetSecondaryButtons);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 170]);\n $fieldSetPanels = $this->createFieldSet(\n 'panels_fieldset',\n '__responsive_tab_buttons_fieldset_panels__',\n ['attributes' => $attributes]\n );\n\n $fieldSetPanels->addElement(\n $this->createColorPickerField(\n 'panel-header-bg',\n '@panel-header-bg',\n $this->themeColorDefaults['panel-header-bg']\n )\n );\n $fieldSetPanels->addElement(\n $this->createTextField(\n 'panel-header-font-size',\n '@panel-header-font-size',\n $this->themeFontDefaults['panel-header-font-size']\n )\n );\n $fieldSetPanels->addElement(\n $this->createColorPickerField(\n 'panel-header-color',\n '@panel-header-color',\n $this->themeColorDefaults['panel-header-color']\n )\n );\n $fieldSetPanels->addElement(\n $this->createColorPickerField(\n 'panel-border',\n '@panel-border',\n $this->themeColorDefaults['panel-border']\n )\n );\n $fieldSetPanels->addElement(\n $this->createColorPickerField(\n 'panel-bg',\n '@panel-bg',\n $this->themeColorDefaults['panel-bg']\n )\n );\n\n $tab->addElement($fieldSetPanels);\n\n return $tab;\n }", "private function get_inputs_output_html() {\n\t\t$i = 0;\n\t\t$j = 0;\n\n\t\t$addon_title = $this->addon_raw['title'];\n\t\t$fieldsets = array();\n\t\tforeach ($this->options as $key => $option) {\n\t\t\t\t$fieldsets[$key] = $option;\n\t\t}\n\n\t\t$output = '';\n\n\t\tif(count((array) $fieldsets)) {\n\t\t\t$output .= '<div class=\"sp-pagebuilder-fieldset\">';\n\t\t\t$output .= '<ul class=\"sp-pagebuilder-nav sp-pagebuilder-nav-tabs\">';\n\t\t\tforeach ( $fieldsets as $key => $value ) {\n\t\t\t\t$output .= '<li class=\"'. (( $i === 0 )?\"active\":\"\" ) .'\"><a href=\"#sp-pagebuilder-tab-'. $key .'\" aria-controls=\"'. $key .'\" data-toggle=\"tab\">'. ucfirst( $key ) .'</a></li>';\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$output .= '</ul>';\n\t\t\t$output .= '<div class=\"tab-content\">';\n\t\t\tforeach ( $fieldsets as $key => $value ) {\n\t\t\t\t$output .= '<div class=\"tab-pane '. (( $j === 0 )? \"active\":\"\" ) .'\" id=\"sp-pagebuilder-tab-'. $key .'\">';\n\t\t\t\t$output .= $this->get_input_fields( $key, $addon_title );\n\t\t\t\t$output .= '</div>';\n\n\t\t\t\t$j++;\n\t\t\t}\n\t\t\t$output .= '</div>';\n\t\t\t$output .= '</div>';\n\t\t}\n\n\t\treturn $output;\n\t}", "private function tab_navigation() {\n\t\t\techo '<div class=\"wpseo-local-metabox-menu\">';\n\t\t\techo '<ul role=\"tablist\" class=\"yoast-seo-local-aria-tabs\" aria-label=\"Yoast SEO: Local\">';\n\t\t\tforeach ( $this->tabs as $key => $tab ) {\n\t\t\t\t$active = ( $key === 0 );\n\n\t\t\t\t$link_class = [ 'wpseo-local-meta-section-link' ];\n\t\t\t\tif ( $active ) {\n\t\t\t\t\t$link_class[] = 'yoast-active-tab';\n\t\t\t\t}\n\n\t\t\t\techo '<li role=\"presentation\" ' . ( ( $active ) ? 'class=\"active\"' : '' ) . '>';\n\t\t\t\techo '<a role=\"tab\" href=\"#wpseo-local-tab-' . $tab['id'] . '\" class=\"' . implode( ' ', $link_class ) . '\" id=\"wpseo-local-tab-' . $tab['id'] . '-content\">';\n\t\t\t\techo '<span class=\"dashicons dashicons-' . $tab['icon'] . '\"></span>';\n\t\t\t\techo $tab['title'];\n\t\t\t\techo '</a>';\n\t\t\t\techo '</li>';\n\t\t\t}\n\t\t\techo '</ul>';\n\t\t\techo '</div> <!-- .wpseo-metabox-menu -->';\n\t\t}", "function render_wizard() {\n\t\t$lines = array();\n\n\t\t$action = explode(':', $this->wizard->modData['wizAction']);\n\t\tif ($action[0] == 'edit') {\n\t\t\t$this->regNewEntry($this->sectionID, $action[1]);\n\t\t\t$lines = $this->catHeaderLines(\n\t\t\t\t$lines, $this->sectionID, $this->wizard->options[$this->sectionID], '&nbsp;', $action[1]\n\t\t\t);\n\t\t\t$piConf = $this->wizard->wizArray[$this->sectionID][$action[1]];\n\t\t\t$ffPrefix = '[' . $this->sectionID . '][' . $action[1] . ']';\n\n\t\t}\n\n\n\t\t// Header field\n\t\t$optValues = array(\n\t\t\t'tt_content' => 'tt_content (Content)',\n\t\t\t'fe_users' => 'fe_users (Frontend Users)',\n\t\t\t'fe_groups' => 'fe_groups (Frontend Groups)',\n\t\t\t'be_users' => 'be_users (Backend Users)',\n\t\t\t'be_groups' => 'be_groups (Backend Groups)',\n\t\t\t'pages' => 'pages (Pages)',\n\t\t);\n\n\t\tforeach ($GLOBALS['TCA'] as $tablename => $tableTCA) {\n\t\t\tif (!$optValues[$tablename]) {\n\t\t\t\t$optValues[$tablename] = $tablename . ' (' . $GLOBALS['LANG']->sL($tableTCA['ctrl']['title']) . ')';\n\t\t\t}\n\t\t}\n\t\tasort($optValues);\n\n\t\t$subContent = '<strong>Which table:<br /></strong>' .\n\t\t\t$this->renderSelectBox($ffPrefix . '[which_table]', $piConf['which_table'], $optValues) .\n\t\t\t$this->whatIsThis('Select the table which should be extended with these extra fields.');\n\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) .\n\t\t\t'<input type=\"hidden\" name=\"' . $this->piFieldName('wizArray_upd') . $ffPrefix . '[title]\" value=\"'\n\t\t\t. ($piConf['which_table'] ? $optValues[$piConf['which_table']] : '') . '\" /></td></tr>';\n\n\n\t\t// PRESETS:\n\t\t$selPresetBox = $this->presetBox($piConf['fields']);\n\n\t\t// Fields\n\t\t$c = array(0);\n\t\t$this->usedNames = array();\n\t\tif (is_array($piConf['fields'])) {\n\t\t\t$piConf['fields'] = $this->cleanFieldsAndDoCommands(\n\t\t\t\t$piConf['fields'], $this->sectionID, $action[1], $piConf['which_table'] ? $piConf['which_table'] : ''\n\t\t\t);\n\n\t\t\t// Do it for real...\n\t\t\treset($piConf['fields']);\n\t\t\twhile (list($k, $v) = each($piConf['fields'])) {\n\t\t\t\t$c[] = $k;\n\t\t\t\t$subContent = $this->renderField($ffPrefix . '[fields][' . $k . ']', $v);\n\t\t\t\t$lines[] = '<tr' . $this->bgCol(2) . '><td>' . $this->fw(\n\t\t\t\t\t\t'<strong>FIELD:</strong> <em>' . $v['fieldname'] . '</em>'\n\t\t\t\t\t) . '</td></tr>';\n\t\t\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\t\t\t}\n\t\t}\n\n\n\t\t// New field:\n\t\t$k = max($c) + 1;\n\t\t$v = array();\n\t\t$lines[] = '<tr' . $this->bgCol(2) . '><td>' . $this->fw('<strong>NEW FIELD:</strong>') . '</td></tr>';\n\t\t$subContent = $this->renderField($ffPrefix . '[fields][' . $k . ']', $v, 1);\n\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw($subContent) . '</td></tr>';\n\n\n\t\t$lines[] = '<tr' . $this->bgCol(3) . '><td>' . $this->fw(\n\t\t\t\t'<br /><br />Load preset fields: <br />' . $selPresetBox\n\t\t\t) . '</td></tr>';\n\n\t\t/* HOOK: Place a hook here, so additional output can be integrated */\n\t\tif (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter']['add_cat_fields'])) {\n\t\t\tforeach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['kickstarter']['add_cat_fields'] as $_funcRef) {\n\t\t\t\t$lines = t3lib_div::callUserFunction($_funcRef, $lines, $this);\n\t\t\t}\n\t\t}\n\n\t\t$content = '<table border=\"0\" cellpadding=\"2\" cellspacing=\"2\">' . implode('', $lines) . '</table>';\n\t\treturn $content;\n\t}", "private function _tabModelCreateData()\n {\n return [\n 'designTabsModel' => [\n 'containerDesignBlockModel' => [\n 'marginTop' => 10,\n 'borderBottomWidth' => 7,\n 'borderColorHover' => 'rgb(0,255,0)',\n 'backgroundColorFromHover' => 'rgba(255,0,255,0.5)',\n ],\n 'tabDesignBlockModel' => [\n 'marginTop' => 10,\n 'borderBottomWidth' => 7,\n 'borderColorHover' => 'rgb(0,255,0)',\n 'backgroundColorFromHover' => 'rgba(255,0,255,0.5)',\n ],\n 'tabDesignTextModel' => [\n 'size' => 20\n ],\n 'contentDesignBlockModel' => [\n 'marginTop' => 10,\n 'borderBottomWidth' => 7,\n 'borderColorHover' => 'rgb(0,255,0)',\n 'backgroundColorFromHover' => 'rgba(255,0,255,0.5)',\n ],\n ],\n 'textModel' => [\n 'designTextModel' => [\n 'size' => 10\n ],\n 'designBlockModel' => [\n 'marginTop' => 10,\n 'borderBottomWidth' => 7,\n 'borderColorHover' => 'rgb(0,255,0)',\n 'backgroundColorFromHover' => 'rgba(255,0,255,0.5)',\n ],\n 'type' => 1,\n 'hasEditor' => false,\n ],\n 'isShowEmpty' => true,\n 'isLazyLoad' => true,\n ];\n }", "private function metabox_style_tabs() {\n $help_sidebar = $this->get_sidebar();\n\n $help_class = '';\n if ( ! $help_sidebar ) :\n $help_class .= ' no-sidebar';\n endif;\n\n // Time to render!\n ?>\n\n <div class=\"tabbed\">\n <div class=\"tabbed-sections\">\n <ul class=\"tr-tabs alignleft\">\n <?php\n $class = ' class=\"active\"';\n $tabs = $this->get_tabs();\n foreach ( $tabs as $tab ) :\n $link_id = \"tab-link-{$tab['id']}\";\n $panel_id = (!empty($tab['url'])) ? $tab['url'] : \"#tab-panel-{$tab['id']}\";\n ?>\n <li id=\"<?php echo esc_attr( $link_id ); ?>\"<?php echo $class; ?>>\n <a href=\"<?php echo esc_url( \"$panel_id\" ); ?>\">\n <?php echo esc_html( $tab['title'] ); ?>\n </a>\n </li>\n <?php\n $class = '';\n endforeach;\n ?>\n </ul>\n </div>\n\n <?php if ( $help_sidebar ) : ?>\n <div class=\"tabbed-sidebar\">\n <?php echo $help_sidebar; ?>\n </div>\n <?php endif; ?>\n\n <div class=\"tr-sections clearfix\">\n <?php\n $classes = 'tab-section active';\n foreach ( $tabs as $tab ):\n $panel_id = \"tab-panel-{$tab['id']}\";\n ?>\n\n <div id=\"<?php echo esc_attr( $panel_id ); ?>\" class=\"<?php echo $classes; ?>\">\n <?php\n // Print tab content.\n echo $tab['content'];\n\n // If it exists, fire tab callback.\n if ( ! empty( $tab['callback'] ) )\n call_user_func_array( $tab['callback'], array( $this, $tab ) );\n ?>\n </div>\n <?php\n $classes = 'tab-section';\n endforeach;\n ?>\n </div>\n </div>\n <?php\n }", "public function print_tabs() {\n $id = $this->required_param('id', PARAM_INT);\n $page = $this->get_tab_page();\n $params = array('id' => $id);\n $rows = array();\n $row = array();\n\n // Main Tab List.\n foreach ($page->tabs as $tab) {\n $tab = $this->add_defaults_to_tab($tab);\n if ($tab['showtab'] === true) {\n $target = new $tab['page'](array_merge($tab['params'], $params));\n if (!$target->can_do()) {\n continue;\n }\n $row[] = new tabobject($tab['tab_id'], $target->url, $tab['name']);\n }\n }\n if (!empty($row)) {\n $rows[] = $row;\n }\n\n // Sub-menu.\n $assignedpage = $this->get_new_page(array('id' => $id, 'action' => 'default'));\n $unassignedpage = $this->get_new_page(array('id' => $id, 'action' => 'add'));\n list($langassigned, $langunassigned) = $this->get_assigned_strings();\n\n $rows[] = array(\n new tabobject('assigned', $assignedpage->url, $langassigned),\n new tabobject('unassigned', $unassignedpage->url, $langunassigned)\n );\n\n $selectedtab = ($this->is_assigning() === true) ? 'unassigned' : 'assigned';\n print_tabs($rows, $selectedtab, array(), array(get_class($this)));\n }", "public function get_envira_tab_nav() {\n\n $tabs = array(\n 'images' => __( 'Images', 'envira-gallery' ),\n 'config' => __( 'Config', 'envira-gallery' ),\n 'lightbox' => __( 'Lightbox', 'envira-gallery' ),\n 'mobile' => __( 'Mobile', 'envira-gallery' ),\n );\n $tabs = apply_filters( 'envira_gallery_tab_nav', $tabs );\n\n // \"Misc\" tab is required.\n $tabs['misc'] = __( 'Misc', 'envira-gallery' );\n\n return $tabs;\n\n }", "function echotheme_tabs_func( $atts, $content = null ) {\n global $tabs;\n $tabs = array(); // clear the array\n\tdo_shortcode($content); // execute the '[tab]' shortcode first to get the title and content\n\n $tabs_nav = '<div class=\"clear\"></div>';\n $tabs_nav .= '<div class=\"tabs-wrapper\">';\n $tabs_nav .= '<ul class=\"tabs\">';\n\t$tabs_content .= '<ul class=\"tabs-content\">';\n \n\tforeach ($tabs as $tab => $tab_atts) {\n\t\t$id = str_replace(' ', '-', $tab_atts['title']);\n\t\t$default = ( $tab == 0 ) ? ' class=\"active\"' : '';\n\t\n\t\t$tabs_nav .= '<li><a href=\"#'.$id.'\"'.$default.'>'.$tab_atts['title'].'</a></li>';\n\t\t$tabs_content .= '<li id=\"'.$id.'\"'.$default.'>'.$tab_atts['content'].'</li>';\n }\n\n $tabs_nav .= '</ul>';\n\t$tabs_content .= '</ul>';\n $tabs_output .= $tabs_nav . $tabs_content;\n $tabs_output .= '</div><!-- tabs-wrapper end -->';\n $tabs_output .= '<div class=\"clear\"></div>';\n\t\n return $tabs_output;\n}", "public function settings_tabs( $tabs ) {\n\t\t$new_tab = array( 'app-vpn' => __( 'APP: VPN - Settings', 'wpcd' ) );\n\t\t$tabs = $tabs + $new_tab;\n\t\treturn $tabs;\n\t}", "public function generate_html_forms()\n\t{\n\t\t$return_str = '<div class=\"bwp-wrap bwp-option-page-wrapper\" style=\"padding-bottom: 20px;\">' . \"\\n\";\n\t\tif (sizeof($this->form_tabs) >= 2)\n\t\t\t$return_str .= apply_filters('bwp_admin_form_icon', '<div class=\"icon32\" id=\"icon-options-general\"><br></div>' . \"\\n\");\n\t\telse\n\t\t\t$return_str .= '<div class=\"icon32\" id=\"icon-options-general\"><br></div>';\t\t\t\n\t\t\n\t\tif (sizeof($this->form_tabs) >= 2)\n\t\t{\n\t\t\t$count = 0;\n\t\t\t$return_str .= '<h2 class=\"bwp-option-page-tabs\">' . \"\\n\";\n\t\t\t$return_str .= apply_filters('bwp_admin_plugin_version', '') . \"\\n\";\n\t\t\tforeach ($this->form_tabs as $title => $link)\n\t\t\t{\n\t\t\t\t$count++;\n\t\t\t\t$active = ($count == $this->current_tab) ? ' nav-tab-active' : '';\n\t\t\t\t$return_str .= '<a class=\"nav-tab' . $active . '\" href=\"' . $link . '\">' . $title . '</a>' . \"\\n\";\n\t\t\t}\n\t\t\t$return_str .= '</h2>' . \"\\n\";\n\t\t}\n\t\telse if (!isset($this->form_tabs[0]))\n\t\t{\n\t\t\t$title = array_keys($this->form_tabs);\n\t\t\t$return_str .= '<h2>' . $title[0] . '</h2>' . \"\\n\";\n\t\t}\n\t\telse\n\t\t\t$return_str .= '<h2>' . $this->form_tabs[0] . '</h2>' . \"\\n\";\n\n\t\t$return_str .= '<div class=\"bwp-option-box clear\">' . \"\\n\";\n\n\t\t// Begin generating each form\n\t\tforeach ($this->forms as $form)\n\t\t{\n\t\t\t// If this form has 'divider' items, we need to split HTML fields appropriately\n\t\t\t$dividers = (isset($form->form['divider']) && is_array($form->form['divider'])) ? array_keys($form->form['divider']) : array();\n\t\t\t$form_style = (!empty($form->style)) ? ' style=\"' . $form->style . '\" ' : '';\n\t\t\t$multi_form_style = (!empty($form->style) && 0 < sizeof($dividers)) ? ' style=\"' . $form->style . '\" ' : '';\n\n\t\t\tif (0 == sizeof($dividers))\n\t\t\t{\n\t\t\t\t$return_str .= '<div class=\"bwp-option-box-inside\"' . $form_style . '>' . \"\\n\";\n\t\t\t\t$return_str .= apply_filters('bwp_opf_before_form_' . $form->form_name, '');\n\t\t\t\techo $return_str;\n\t\t\t\tdo_action('bwp_opa_before_form_' . $form->form_name, $form->form_name);\n\t\t\t}\n\t\t\telse\n\t\t\t\techo $return_str;\n\n\t\t\t$enctype = (!empty($form->form_enctype)) ? ' enctype=\"' . $form->form_enctype . '\" ' : '';\n\t\t\t$return_str = '<form class=\"bwp-option-page\" name=\"' . $form->form_name . '\" method=\"post\" action=\"\"' . $enctype . $multi_form_style . '>' . \"\\n\";\n\n\t\t\t// Nonce\n\t\t\t$return_str .= wp_nonce_field($form->form_name, \"_wpnonce\", false, false) . \"\\n\";\n\t\t\t$return_str .= apply_filters('bwp_opf_referrer_field_' . $form->form_name, wp_referer_field(false)) . \"\\n\";\n\n\t\t\t$return_str .= '<ul>' . \"\\n\";\n\n\t\t\tif (isset($form->form_items) && is_array($form->form_items))\n\t\t\t{\n\t\t\t\t// If this form needs to be divided, so be it\n\t\t\t\tif (0 < sizeof($dividers))\n\t\t\t\t{\n\t\t\t\t\t$return_str .= '<div class=\"bwp-option-box-inside\">' . \"\\n\";\n\t\t\t\t\t$return_str .= apply_filters('bwp_opf_before_form_' . $form->form_name, '');\n\t\t\t\t\techo $return_str;\n\t\t\t\t\tdo_action('bwp_opa_before_form_' . $form->form_name, $form->form_name);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\techo $return_str;\n\t\t\t\t// Reset the result\n\t\t\t\t$return_str = '';\n\t\t\t\t// Generate individual items\n\t\t\t\t$form_count = 0;\n\t\t\t\tforeach ($form->form_items as $key => $type)\n\t\t\t\t{\n\t\t\t\t\tif (!empty($form->form_item_names[$key]) && isset($form->form_item_labels[$key]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$extra_classes = ('heading' == $type) ? ' bwp-li-heading' : ' bwp-li-item';\n\t\t\t\t\t\t// Before the field\n\t\t\t\t\t\techo $return_str;\n\t\t\t\t\t\tdo_action('bwp_opa_before_field_' . $form->form_name . '_' . $form->form_item_names[$key], $form->form_name);\n\t\t\t\t\t\t$return_str = '';\n\t\t\t\t\t\t// The field\n\t\t\t\t\t\t$return_str .= ('hidden' != $form->form_items[$key]) ? '<li class=\"clear' . $extra_classes . '\">' . $form->generate_html_fields($type, $form->form_item_names[$key]) . '</li>' : $form->generate_html_fields($type, $form->form_item_names[$key]) . \"\\n\";\n\t\t\t\t\t\t// After the field\n\t\t\t\t\t\techo $return_str;\n\t\t\t\t\t\tdo_action('bwp_opa_after_field_' . $form->form_name . '_' . $form->form_item_names[$key], $form->form_name);\n\t\t\t\t\t\t$return_str = '';\n\t\t\t\t\t\tif (in_array($form->form_item_names[$key], $dividers))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$form_count++;\n\t\t\t\t\t\t\techo $return_str;\n\t\t\t\t\t\t\tdo_action('bwp_opa_after_divided_form_' . $form->form_name . '_' . $form_count, $form->form_name);\n\t\t\t\t\t\t\t$return_str = '';\n\t\t\t\t\t\t\t$return_str .= apply_filters('bwp_opf_multi_submit_button_' . $form->form_name, '<p class=\"submit\"><input type=\"submit\" class=\"button-primary\" name=\"save_' . $form->form_name . '\" value=\"' . __('Save All Changes', $this->domain) . '\" /> &nbsp;<input type=\"submit\" class=\"button-secondary\" name=\"reset_' . $form->form_name . '\" value=\"' . __('Reset to Defaults', $this->domain) . '\" /></p>', $form_count) . \"\\n\";\n\t\t\t\t\t\t\t$return_str .= '</div>' . \"\\n\";\n\t\t\t\t\t\t\t$return_str .= '<div class=\"bwp-option-box-inside\">' . \"\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If this form needs to be divided, add the final Save all changes button\n\t\t\t\tif (0 < sizeof($dividers))\n\t\t\t\t\t$return_str .= apply_filters('bwp_opf_multi_submit_button_' . $form->form_name, '<p class=\"submit\"><input type=\"submit\" class=\"button-primary\" name=\"save_' . $form->form_name . '\" value=\"' . __('Save All Changes', $this->domain) . '\" /> &nbsp;<input type=\"submit\" class=\"button-secondary\" name=\"reset_' . $form->form_name . '\" value=\"' . __('Reset to Defaults', $this->domain) . '\" /></p>', 'last') . \"\\n\";\n\t\t\t}\n\n\t\t\t$return_str .= '</ul>' . \"\\n\";\t\t\n\t\t\t$return_str .= apply_filters('bwp_opf_before_submit_button_' . $form->form_name, '');\n\t\t\techo $return_str;\n\t\t\tdo_action('bwp_opa_before_submit_button_' . $form->form_name, $form->form_name);\n\n\t\t\t$submit = apply_filters('bwp_opf_submit_button_' . $form->form_name, '<p class=\"submit\"><input type=\"submit\" class=\"button-primary\" name=\"save_' . $form->form_name . '\" value=\"' . __('Save Changes', $this->domain) . '\" /> &nbsp;<input type=\"submit\" class=\"button-secondary\" name=\"reset_' . $form->form_name . '\" value=\"' . __('Reset to Defaults', $this->domain) . '\" /></p>') . \"\\n\";\n\t\t\t$return_str = apply_filters('bwp_op_submit_button', $submit) . \"\\n\";\n\t\t\t$return_str .= '</form>' . \"\\n\";\n\n\t\t\tif (0 == sizeof($dividers))\n\t\t\t\t$return_str .= '</div>' . \"\\n\";\n\t\t}\n\n\t\t$return_str .= '<div class=\"clear\"><!-- --></div>' . \"\\n\";\n\t\t$return_str .= '</div>' . \"\\n\";\n\t\t$return_str .= '</div>' . \"\\n\";\n\n\t\techo $return_str;\n\t}", "public function register_data_tab( $tabs ) {\r\n $tabs['tm_extra_product_options'] = array(\r\n 'label' => __( 'TM Extra Product Options', TM_EPO_TRANSLATION ),\r\n 'target' => 'tm_extra_product_options',\r\n 'class' => array( 'tm_epo_class', 'hide_if_grouped' )\r\n );\r\n return $tabs;\r\n }", "public function tabsAction()\n {\n\t\treturn array();\n }", "public function settings_page_init() {\n global $WCPc;\n \n $settings_tab_options = array(\"tab\" => \"{$this->tab}\", \"ref\" => &$this,\n \"sections\" => array(\n // Section one\n \"default_settings_section\" => array(\n \"title\" => __('Default Settings', $WCPc->text_domain), \n \"fields\" => array( /* Hidden */\n \"id\" => array('title' => '', \n 'type' => 'hidden', \n 'id' => 'id', \n 'name' => 'id', \n 'value' => 999\n ),\n /* Text */ \n \"id_number\" => array('title' => __('ID Number', $WCPc->text_domain), \n 'type' => 'text', \n 'id' => 'id_number', \n 'label_for' => 'id_number', \n 'name' => 'id_number', \n 'hints' => __('Enter your ID Number here.', $WCPc->text_domain), \n 'desc' => __('It will represent your identification.', $WCPc->text_domain)\n ), \n /* Textarea */\n \"about\" => array('title' => __('About', $WCPc->text_domain) , \n 'type' => 'textarea', \n 'id' => 'about', \n 'label_for' => 'about', \n 'name' => 'about', \n 'rows' => 5, \n 'placeholder' => __('About you', $WCPc->text_domain), \n 'desc' => __('It will represent your significant.', $WCPc->text_domain)\n ), \n /* Text */\n \"demo_test\" => array('title' => __('Demo Test', $WCPc->text_domain),\n 'type' => 'text',\n 'id' => 'demo_test',\n 'label_for' => 'demo_test',\n 'name' => 'demo_test',\n 'placeholder' => __('Demo Test', $WCPc->text_domain)\n ),\n /* Wp Eeditor */\n \"bio\" => array('title' => __('Bio', $WCPc->text_domain), \n 'type' => 'wpeditor', \n 'id' => 'bio', \n 'label_for' => 'bio', \n 'name' => 'bio'\n ), \n /* Checkbox */\n \"is_enable\" => array('title' => __('Enable', $WCPc->text_domain), \n 'type' => 'checkbox', \n 'id' => 'is_enable', \n 'label_for' => 'is_enable', \n 'name' => 'is_enable', \n 'value' => 'Enable'\n ), \n /* Radio */\n \"offday\" => array('title' => __('Off Day', $WCPc->text_domain), \n 'type' => 'radio', \n 'id' => 'offday', \n 'label_for' => 'offday', \n 'name' => 'offday', \n 'dfvalue' => 'wednesday', \n 'options' => array('sunday' => 'Sunday', \n 'monday' => 'Monday', \n 'tuesday' => 'Tuesday', \n 'wednesday' => 'Wednesday', \n 'thrusday' => 'Thrusday'\n ), \n 'hints' => __('Choose your preferred week offday.', $WCPc->text_domain), \n 'desc' => __('By default Saterday will be offday.', $WCPc->text_domain)\n ), \n /* Select */\n \"preference\" => array('title' => __('Preference', $WCPc->text_domain), \n 'type' => 'select', \n 'id' => 'preference', \n 'label_for' => 'preference', \n 'name' => 'preference', \n 'options' => array('one' => 'One Time', \n 'two' => 'Two Time', \n 'three' => 'Three Time'\n ), \n 'hints' => __('Choose your preferred occurence count.', $WCPc->text_domain)\n ), \n /* Upload */\n \"logo\" => array('title' => __('Logo', $WCPc->text_domain), \n 'type' => 'upload', \n 'id' => 'logo', \n 'label_for' => 'logo', \n 'name' => 'logo', \n 'prwidth' => 125, \n 'hints' => __('Your presentation.', $WCPc->text_domain), \n 'desc' => __('Represent your graphical signature.', $WCPc->text_domain)\n ), \n /* Colorpicker */\n \"dc_colorpicker\" => array('title' => __('Choose Color', $WCPc->text_domain), \n 'type' => 'colorpicker', \n 'id' => 'dc_colorpicker', \n 'label_for' => 'dc_colorpicker', \n 'name' => 'dc_colorpicker', \n 'default' => '000000', \n 'hints' => __('Choose your color here.', $WCPc->text_domain),\n 'desc' => __('This lets you choose your desired color.', $WCPc->text_domain)\n ), \n /* Datepicker */\n \"dc_datepicker\" => array('title' => __('Choose DOB', $WCPc->text_domain),\n 'type' => 'datepicker', \n 'id' => 'dc_datepicker', \n 'label_for' => 'dc_datepicker', \n 'name' => 'dc_datepicker', \n 'hints' => __('Choose your DOB here', $WCPc->text_domain), \n 'desc' => __('This lets you choose your date of birth.', $WCPc->text_domain), \n 'custom_attributes' => array('date_format' => 'dd-mm-yy')\n ), \n /* Multiinput */\n \"slider\" => array('title' => __('Slider', $WCPc->text_domain) , \n 'type' => 'multiinput', \n 'id' => 'slider', \n 'label_for' => 'slider', \n 'name' => 'slider', \n 'options' => array(\n \"title\" => array('label' => __('Title', $WCPc->text_domain) , \n 'type' => 'text', \n 'label_for' => 'title', \n 'name' => 'title', \n 'class' => 'regular-text'\n ),\n \"content\" => array('label' => __('Content', $WCPc->text_domain), \n 'type' => 'textarea', \n 'label_for' => 'content', \n 'name' => 'content', \n 'cols' => 40\n ),\n \"image\" => array('label' => __('Image', $WCPc->text_domain), \n 'type' => 'upload', \n 'label_for' => 'image', \n 'name' => 'image', \n 'prwidth' => 125\n ),\n \"url\" => array('label' => __('URL', $WCPc->text_domain) , \n 'type' => 'url', \n 'label_for' => 'url', \n 'name' => 'url', \n 'class' => 'regular-text'\n ),\n \"published\" => array('label' => __('Published ON', $WCPc->text_domain), \n 'type' => 'datepicker', \n 'id' => 'published', \n 'label_for' => 'published', \n 'name' => 'published', \n 'hints' => __('Published Date', $WCPc->text_domain), \n 'custom_attributes' => array('date_format' => 'dd th M, yy')\n )\n )\n )\n )\n ), \n \"custom_settings_section\" => array(\n \"title\" => \"Demo Custom Settings\", // Another section\n \"fields\" => array(\n \"location\" => array('title' => __('Location', $WCPc->text_domain), \n 'type' => 'text', \n 'id' => 'location', \n 'name' => 'location', \n 'hints' => __('Location', $WCPc->text_domain)\n ),\n \"role\" => array('title' => __('Role', $WCPc->text_domain), \n 'type' => 'text', \n 'id' => 'role', \n 'name' => 'role', \n 'hints' => __('Role', $WCPc->text_domain)\n )\n )\n )\n )\n );\n \n $WCPc->admin->settings->wcpc_settings_field_init(apply_filters(\"wcpc_settings_{$this->tab}_tab_options\", $settings_tab_options));\n }", "function _getTabs($tabs, $showTabs = true, $selectedGroup='All')\n {\n if($selectedGroup=='All')\n \t$selectedGroup=translate('LBL_TABGROUP_ALL');\n\n \t// Set up a mapping from subpanelID, found in the $tabs list, to the source module name\n \t// As the $GLOBALS['tabStructure'] array holds the Group Tabs by module name we need to efficiently convert between the two\n \t// when constructing the subpanel tabs\n \t// Note that we can't use the very similar GroupedTabStructure class as it lacks this mapping, and logically, it is designed\n \t// for use when constructing the module by module tabs, not the subpanel tabs, as we move away from using module names to represent\n \t// subpanels, and use unique subpanel IDs instead.\n\n \t$moduleNames = array () ;\n \tforeach ( $tabs as $subpanelID )\n \t{\n // Bug #44344 : Custom relationships under same module only show once in subpanel tabs\n // use object property instead new object to have ability run unit test (can override subpanel_definitions)\n $subpanel = $this->subpanel_definitions->load_subpanel( $subpanelID );\n \t\tif ($subpanel !== false)\n \t\t $moduleNames [ $subpanelID ] = $subpanel->get_module_name() ;\n \t}\n\n \t$groups = array () ;\n \t$found = array () ;\n\n foreach( $GLOBALS['tabStructure'] as $mainTab => $subModules)\n {\n foreach( $subModules['modules'] as $key => $subModule )\n {\n \t\t\tforeach ( $tabs as $subpanelID )\n if (isset($moduleNames[ $subpanelID ] ) && strcasecmp( $subModule , $moduleNames[ $subpanelID ] ) === 0)\n {\n // Bug #44344 : Custom relationships under same module only show once in subpanel tabs\n $groups [ translate ( $mainTab ) ] [ 'modules' ] [] = $subpanelID ;\n \t$found [ $subpanelID ] = true ;\n \t}\n }\n }\n\n // Put all the remaining subpanels into the 'Other' tab.\n\n foreach( $tabs as $subpanelID )\n {\n \tif ( ! isset ( $found [ $subpanelID ] ) )\n\t \t$groups [ translate ('LBL_TABGROUP_OTHER') ]['modules'] [] = $subpanelID ;\n }\n\n /* Move history to same tab as activities */\n if(in_array('history', $tabs) && in_array('activities', $tabs))\n {\n foreach($groups as $mainTab => $group)\n {\n \tif(in_array('activities', array_map('strtolower', $group['modules'])))\n {\n \tif(!in_array('history', array_map('strtolower', $group['modules'])))\n {\n \t/* Move hist from there to here */\n $groups[$mainTab]['modules'] []= 'history';\n }\n }\n else if(false !== ($i = array_search('history', array_map('strtolower', $group['modules']))))\n {\n unset($groups[$mainTab]['modules'][$i]);\n if(empty($groups[$mainTab]['modules']))\n {\n \tunset($groups[$mainTab]);\n }\n }\n }\n }\n\n /* Add the 'All' group.\n * Note that if a tab group already exists with the name 'All',\n * it will be overwritten in this union operation.\n */\n if(count($groups) <= 1)\n \t$groups = array(translate('LBL_TABGROUP_ALL') => array('label' => translate('LBL_TABGROUP_ALL'), 'modules' => $tabs));\n else\n $groups = array(translate('LBL_TABGROUP_ALL') => array('label' => translate('LBL_TABGROUP_ALL'), 'modules' => $tabs)) + $groups;\n /* Note - all $display checking and array_intersects with $tabs\n * are now redundant (thanks to GroupedTabStructure), and could\n * be removed for performance, but for now can stay to help ensure\n * that the tabs get renedered correctly.\n */\n\n $retTabs = array();\n if($showTabs)\n {\n \trequire_once('include/SubPanel/SugarTab.php');\n \t$sugarTab = new SugarTab();\n\n $displayTabs = array();\n $otherTabs = array();\n\n \t foreach ($groups as $key=>$tab)\n \t\t{\n $display = false;\n foreach($tab['modules'] as $subkey=>$subtab)\n {\n if(in_array(strtolower($subtab), $tabs))\n {\n $display = true;\n break;\n }\n }\n\n $selected = '';\n\n if($selectedGroup == $key)\n {\n $selected = 'current';\n }\n\n if($display)\n {\n $relevantTabs = SubPanelTilesTabs::applyUserCustomLayoutToTabs($tabs, $key);\n\n $sugarTabs[$key] = array(//'url'=>'index.php?module=' . $_REQUEST['module'] . '&record=' . $_REQUEST['record'] . '&action=' . $_REQUEST['action']. '&subpanel=' . $key.'#tabs',\n //'url'=>\"javascript:SUGAR.util.retrieveAndFill('index.php?to_pdf=1&module=MySettings&action=LoadTabSubpanels&loadModule={$_REQUEST['module']}&record={$_REQUEST['record']}&subpanel=$key','subpanel_list',null,null,null);\",\n 'label'=>( !empty($tab['label']) ? $tab['label']: $key ),\n 'type'=>$selected);\n\n $otherTabs[$key] = array('key'=>$key, 'tabs'=>array());\n\n $orderedTabs = array_intersect($relevantTabs, array_map('strtolower', $groups[$key]['modules']));\n\n foreach($orderedTabs as $subkey => $subtab)\n {\n $otherTabs[$key]['tabs'][$subkey] = array('key'=>$subtab, 'label'=>translate($this->subpanel_definitions->layout_defs['subpanel_setup'][$subtab]['title_key']));\n }\n\n if($selectedGroup == $key)\n {\n $displayTabs = $otherTabs[$key]['tabs'];\n $retTabs = $orderedTabs;\n }\n }\n \t\t}\n\n if(empty($displayTabs) && !empty($otherTabs))\n {\n //WDong Bug: 12258 \"All\" tab in the middle of a record's detail view is not localized.\n $selectedGroup = translate('LBL_TABGROUP_ALL');\n $displayTabs = $otherTabs[$selectedGroup]['tabs'];\n $sugarTabs[$selectedGroup]['type'] = 'current';\n $retTabs = array_intersect($tabs, array_map('strtolower', $groups[$selectedGroup]['modules']));\n }\n\n if (!empty($sugarTabs) || !empty($otherTabs) ) {\n \t$sugarTab->setup($sugarTabs, $otherTabs, $displayTabs, $selectedGroup);\n \t$sugarTab->display();\n }\n }\n else\n {\n $tabs = SubPanelTilesTabs::applyUserCustomLayoutToTabs($tabs, $selectedGroup);\n\n $retTabs = array_intersect($tabs, array_map('strtolower', $groups[$selectedGroup]['modules']));\n }\n\n\t\treturn $retTabs;\n\t}", "public function build_controls()\n\t{\n\t\t$this->add_control( 'title', [\n\t\t\t'label' => __( 'Title' )\n\t\t] );\n\t\t$this->add_control( 'content', [\n\t\t\t'label' => __( 'Content' ),\n\t\t\t'type' => 'textarea'\n\t\t] );\n\t\t$this->add_control( 'link_url', [\n\t\t\t'label' => __( 'URL' )\n\t\t] );\n\t\t$this->add_control( 'link_text', [\n\t\t\t'label' => __( 'Link Text' )\n\t\t] );\n\t\t$this->add_control( 'link_target', [\n\t\t\t'label' => __( 'Open link in a new window/tab' ),\n\t\t\t'type' => 'checkbox',\n\t\t\t'value' => '1'\n\t\t] );\n\t}", "function scb_tabx($atts, $content){\n\t$tabid='';\n\t$tabclass = $atts['class'];\n\t$tabmode = ' nav-tabs';\n\t$tablia = ''; $tabCont = '';\n\t\n\tif($atts['id'] !=''){\n\t\t$tabid = ' id=\"'.$atts['id'].'\"'; \n\t}\n\t\n\tif($atts['mode'] !=''){\n\t\t$tabmode = ' nav-'.$atts['mode']; \n\t}\n\t\n\t$menu = explode('[/tab_content]', $content);\n\t$tabTitle='';\n\t\n\tfor($i=0; $i<count($menu)-1;$i++){\n\t\t$tabTitle = explode(':',explode(']',$menu[$i])[0])[1];\n\t\tadd_shortcode('content:'.str_replace(' ','',$tabTitle), 'tabMenuCont_sc');\n\t}\n\t\n\tfor($i=0; $i<count($menu)-1;$i++){\n\t\t$tabTitle = explode(':',explode(']',$menu[$i])[0])[1];\n\t\t$tabSCName = explode(']',$menu[$i])[0];\n\t\t$renscName = '[tab_content:'.str_replace(' ','',$tabTitle);\n\t\t$scName = str_replace($tabSCName, $renscName ,$menu[$i]);\n\t\t$tablia .= '<li role=\"presentation\" '.($i==0?'class=\"active\"':'').'><a href=\"#dv'.$attrs['id'].'_'.$i.'\" data-toggle=\"tab\" role=\"tab\" aria-expanded=\"true\">'.$tabTitle.'</a></li>';\n\t\t\n\t\t$tabCont .= '<div id=\"dv'.$attrs['id'].'_'.$i.'\" class=\"tab-pane '.($i==0?'active':'').'\" >'.do_shortcode(trim($scName)).'</div>';\n\t}\n\t\n\t$retVal = '<div'.$tabid.'><ul class=\"nav'.$tabmode.'\">'.$tablia.'</ul><div class=\"tab-content\">'.$tabCont.'</div></div>';\n\treturn $retVal;\n}", "public function metabox_tabs() {\n\t\t$tabs = array(\n\t\t\t'vpn-general' => array(\n\t\t\t\t'label' => 'General',\n\t\t\t\t'icon' => 'dashicons-text',\n\t\t\t),\n\t\t\t'vpn-scripts' => array(\n\t\t\t\t'label' => 'Scripts',\n\t\t\t\t'icon' => 'dashicons-format-aside',\n\t\t\t),\n\t\t\t'vpn-promotions' => array(\n\t\t\t\t'label' => 'Promotions',\n\t\t\t\t'icon' => 'dashicons-testimonial',\n\t\t\t),\n\t\t);\n\n\t\treturn $tabs;\n\t}", "function pexeto_show_tabs( $atts, $content = null ) {\r\n\t\textract( shortcode_atts( array(\r\n\t\t\t\t\t'titles' => '',\r\n\t\t\t\t\t'width' => 'medium'\r\n\t\t\t\t), $atts ) );\r\n\t\t$titlearr=explode( ',', $titles );\r\n\t\t$html='<div class=\"tabs-container\"><ul class=\"tabs \">';\r\n\t\tif ( $width=='small' ) {\r\n\t\t\t$wclass='w1';\r\n\t\t}elseif ( $width=='big' ) {\r\n\t\t\t$wclass='w3';\r\n\t\t}else {\r\n\t\t\t$wclass='w2';\r\n\t\t}\r\n\t\tforeach ( $titlearr as $title ) {\r\n\t\t\t$html.='<li class=\"'.$wclass.'\"><a href=\"#\">'.$title.'</a></li>';\r\n\t\t}\r\n\t\t$html.='</ul><div class=\"panes\">'.do_shortcode( $content ).'</div></div>';\r\n\t\treturn $html;\r\n\t}", "function show_tabs($tabs) {\n// $this->log(__CLASS__ . \".\" . __FUNCTION__ . \"() for \" . $this->controller->request->params['controller'] . '/' . $this->controller->request->params['action'], LOG_DEBUG);\n\n if (!is_array($tabs)){\n $args = func_get_args();\n }\n else $args = $tabs;\n\n foreach($args as $tabID){\n $tabMap = Configure::read('tabControllerActionMap');\n $controller = $tabMap[$tabID]['controller'];\n $action = $tabMap[$tabID]['action'];\n $isAuthorized = $this->controller->DhairAuth->isAuthorizedForUrl($controller,$action); \n\n if (!$isAuthorized)\n {\n unset($args[array_search($tabID, $args)]);\n }\n elseif ($controller == 'surveys' && $action == 'index'\n && empty($this->controller->session_link)){\n unset($args[array_search($tabID, $args)]);\n }\n\n }\n\n $this->tabs_for_layout = $args;\n// $this->log(__CLASS__ . \"->\" . __FUNCTION__ . \"(...) tabs_for_layout after auth filter: \" . print_r($this->tabs_for_layout, true) /**. \", here's the stack: \" . Debugger::trace() */, LOG_DEBUG);\n\n// $this->log(__CLASS__ . \"->\" . __FUNCTION__ . \"(...), next: calculateTabsToRemoveOrDisable()\" /*. Debugger::trace()*/ , LOG_DEBUG);\n $this->calculateTabsToRemoveOrDisable();\n// $this->log(__CLASS__ . \"->\" . __FUNCTION__ . \"(...), just did calculateTabsToRemoveOrDisable()\" /*. Debugger::trace()*/ , LOG_DEBUG);\n $this->controller->set('tabsToDisable', $this->tabsToDisable);\n\n// $this->log(__CLASS__ . \"->\" . __FUNCTION__ . \"(...), here's tabs_for_layout: \" . print_r($this->tabs_for_layout, true) /*. Debugger::trace()*/ , LOG_DEBUG);\n $this->controller->set('tabs_for_layout', $this->tabs_for_layout);\n }", "public function get_markup () {\r\n\t\t$data = $this->properties_to_array();\r\n\r\n\t\t// Ensure tab title\r\n\t\t// Do shortcode\r\n\t\tforeach($data['tabs'] as $index=>$tab) {\r\n\t\t\t$ttl = trim(str_replace(\"\\n\", '', $tab['title']));\r\n\t\t\tif (empty($ttl)) {\r\n\t\t\t\t$tab['title'] = 'Tab ' . ($index + 1);\r\n\t\t\t}\r\n\t\t\t$tab['content'] = $this->_do_shortcode($tab['content']);\r\n\t\t\t$data['tabs'][$index] = $tab;\r\n\t\t}\r\n\r\n\t\tif (!$data['preset']) {\r\n\t\t\t$data['preset'] = 'default';\r\n\t\t}\r\n\r\n\t\t$data['wrapper_id'] = str_replace('utabs-object-', 'wrapper-', $data['element_id']);\r\n\r\n\t\t$markup = upfront_get_template('utabs', $data, dirname(dirname(__FILE__)) . '/tpl/utabs.html');\r\n\r\n\t\t// upfront_add_element_style('upfront_tabs', array('css/utabs.css', dirname(__FILE__)));\r\n\t\tupfront_add_element_script('upfront_tabs', array('js/utabs-front.js', dirname(__FILE__)));\r\n\r\n\t\treturn $markup;\r\n\t}", "function wp_yes_tabs() {\n\t\t$settings = new WP_Yes( 'wp_yes_tabs' ); // Initialize the WP_Yes class.\n\n\t\t$settings->add_tab(\n\t\t\tarray(\n\t\t\t\t'id' => 'tab_1',\n\t\t\t)\n\t\t);\n\n\t\t$settings->add_section(\n\t\t\tarray(\n\t\t\t\t'id' => 'section_1',\n\t\t\t)\n\t\t);\n\n\t\t$settings->add_field(\n\t\t\tarray(\n\t\t\t\t'id' => 'wp_yes_tabs_field_1',\n\t\t\t\t'required' => true,\n\t\t\t\t'type' => 'text',\n\t\t\t)\n\t\t);\n\n\t\t$settings->add_field(\n\t\t\tarray(\n\t\t\t\t'id' => 'wp_yes_tabs_field_2',\n\t\t\t\t'required' => true,\n\t\t\t\t'type' => 'multicheckbox',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'foo' => 'foo',\n\t\t\t\t\t'bar' => 'bar',\n\t\t\t\t\t'foo bar' => 'foo bar',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$settings->add_tab(\n\t\t\tarray(\n\t\t\t\t'id' => 'tab_2',\n\t\t\t)\n\t\t);\n\n\t\t$settings->add_section(\n\t\t\tarray(\n\t\t\t\t'id' => 'section_1',\n\t\t\t)\n\t\t);\n\n\t\t$settings->add_field(\n\t\t\tarray(\n\t\t\t\t'id' => 'wp_yes_tabs_field_3',\n\t\t\t\t'required' => true,\n\t\t\t\t'type' => 'file',\n\t\t\t)\n\t\t);\n\n\t\t$settings->add_field(\n\t\t\tarray(\n\t\t\t\t'id' => 'wp_yes_tabs_field_4',\n\t\t\t\t'required' => true,\n\t\t\t\t'type' => 'multiselect',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'foo' => 'foo',\n\t\t\t\t\t'bar' => 'bar',\n\t\t\t\t\t'foo bar' => 'foo bar',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$settings->init(); // Run the WP_Yes class.\n\t}", "function addPageEditorSettingsSubtabs()\n\t{\n\t\tglobal $ilCtrl, $ilTabs;\n\n\t\t$ilTabs->addSubTabTarget(\"adve_pe_general\",\n\t\t\t $ilCtrl->getLinkTarget($this, \"showGeneralPageEditorSettings\"),\n\t\t\t array(\"showGeneralPageEditorSettings\", \"\", \"view\")); \n\t\t\n\t\tinclude_once(\"./Services/COPage/classes/class.ilPageEditorSettings.php\");\n\t\t$grps = ilPageEditorSettings::getGroups();\n\t\t\n\t\tforeach ($grps as $g => $types)\n\t\t{\n\t\t\t$ilCtrl->setParameter($this, \"grp\", $g);\n\t\t\t$ilTabs->addSubTabTarget(\"adve_grp_\".$g,\n\t\t\t\t $ilCtrl->getLinkTarget($this, \"showPageEditorSettings\"),\n\t\t\t\t array(\"showPageEditorSettings\")); \n\t\t}\n\t\t$ilCtrl->setParameter($this, \"grp\", $_GET[\"grp\"]);\n\t}", "public function display(){\r\n $configured = WiziappConfig::getInstance()->settings_done;\r\n\r\n if (isset($_GET['wiziapp_configured']) && $_GET['wiziapp_configured'] == 1){\r\n $configured = TRUE;\r\n }\r\n\r\n $showAllTabs = WiziappConfig::getInstance()->finished_processing && $configured;\r\n\r\n ?>\r\n <script src=\"http://cdn.jquerytools.org/1.2.5/all/jquery.tools.min.js\"></script>\r\n <style>\r\n #wiziapp_container{\r\n background: #fff;\r\n min-height: 500px;\r\n position: relative;\r\n }\r\n #wiziapp_logo{\r\n float: left;\r\n margin-right: 5px;\r\n }\r\n\r\n #wiziapp_logo a{\r\n text-decoration: none;\r\n }\r\n\r\n #wiziapp_logo a img{\r\n border: 0px none;\r\n }\r\n #wiziapp_header{\r\n clear: both;\r\n height: 62px;\r\n width: 875px;\r\n padding: 15px 10px 25px;\r\n margin: 0px auto;\r\n }\r\n #wiziapp_container_content{\r\n width: 875px;\r\n margin: 0px auto;\r\n }\r\n #wiziapp_header ul{\r\n list-style: none;\r\n height: 48px;\r\n width: 679px;\r\n background: url(<?php\t \t echo WiziappConfig::getInstance()->getCdnServer(); ?>/images/cms/menu_shadow_line.jpg) no-repeat bottom center;\r\n margin: 14px auto 0px;\r\n padding: 0px;\r\n float: right;\r\n }\r\n\r\n #wiziapp_header li{\r\n background: url(<?php\t \t echo WiziappConfig::getInstance()->getCdnServer(); ?>/images/cms/Menu_Close_Tabe.png) no-repeat bottom center;\r\n width: 104px;\r\n height: 48px;\r\n display: inline-block;\r\n text-align: center;\r\n font-size: 14px;\r\n }\r\n\r\n #wiziapp_header li.active{\r\n background: url(<?php\t \t echo WiziappConfig::getInstance()->getCdnServer(); ?>/images/cms/Menu_open_tab.png) no-repeat bottom center;\r\n font-weight: bolder;\r\n position: relative;\r\n top: -4px;\r\n }\r\n #wiziapp_header li.active.single{\r\n top: 1px;\r\n }\r\n #wiziapp_header li a{\r\n color: #000;\r\n text-decoration: none;\r\n display: block;\r\n margin-top: 23px;\r\n }\r\n #wiziapp_header li.active a{\r\n margin-top: 18px;\r\n }\r\n #wiziapp_container .col{\r\n float: left;\r\n }\r\n #wiziapp_support_links{\r\n width: 200px;\r\n background: url(<?php\t \t echo WiziappConfig::getInstance()->getCdnServer(); ?>/images/cms/MyAccount_Shadow_center.jpg) no-repeat scroll left center transparent;\r\n padding: 0 0 0 40px;\r\n min-height: 334px;\r\n margin-left: 25px;\r\n }\r\n #wiziapp_container .clear{\r\n clear: both;\r\n }\r\n #wiziapp_support_table{\r\n\r\n }\r\n #wiziapp_container table{\r\n width: 607px;\r\n margin-top: 15px;\r\n border-collapse: collapse;\r\n }\r\n #wiziapp_container table td{\r\n color: #353535;\r\n width: 80px;\r\n }\r\n #wiziapp_container table thead{\r\n background: url(<?php\t \t echo WiziappConfig::getInstance()->getCdnServer(); ?>/images/generator/main_sprite.png) no-repeat scroll 0px -349px;\r\n }\r\n #wiziapp_container table thead th{\r\n font-weight: normal;\r\n height: 59px;\r\n width: 80px;\r\n text-align: center;\r\n padding-right: 10px;\r\n }\r\n #wiziapp_container table .v_first-col{\r\n width: 150px;\r\n text-align: left;\r\n padding-left: 10px;\r\n }\r\n #wiziapp_container table td.v_first-col{\r\n padding-left: 10px;\r\n color:#0fb3fb;\r\n }\r\n #wiziapp_container table tbody td{\r\n border-right: 2px #ffffff solid;\r\n height: 59px;\r\n text-align: center;\r\n }\r\n #wiziapp_container table tbody tr.v_odd td{\r\n background-color: #f0f0f0;\r\n }\r\n #wiziapp_container table .status_col{\r\n width: 30px;\r\n }\r\n #wiziapp_container table .status_col div{\r\n height: 100%;\r\n width: 17px;\r\n margin: 0px auto;\r\n }\r\n #wiziapp_container table .status_col .success{\r\n background: url(<?php\t \t echo WiziappConfig::getInstance()->getCdnServer(); ?>/images/cms/V_Icon.png) no-repeat left center;\r\n }\r\n #wiziapp_container table .status_col .failed{\r\n background: url(<?php\t \t echo WiziappConfig::getInstance()->getCdnServer(); ?>/images/cms/validetion_error_Icon.png) no-repeat left center;\r\n }\r\n #wiziapp_container table span.sep, #wiziapp_container table a{\r\n color:#0fb3fb;\r\n }\r\n \r\n #wiziapp_container .wiziapp_button{\r\n background: url(<?php\t \t echo WiziappConfig::getInstance()->getCdnServer(); ?>/images/cms/ReportBTN.png) no-repeat left center;\r\n width: 164px;\r\n height: 33px;\r\n line-height: 33px;\r\n color: #000;\r\n text-align: center;\r\n font-weight: bold;\r\n text-decoration: none;\r\n display: block;\r\n margin: 30px auto;\r\n }\r\n #wiziapp_container table tr.details{\r\n display: none;\r\n }\r\n #wiziapp_container .wiziapp_error{\r\n padding: 0px 10px 20px;\r\n position: static;\r\n background: none transparent;\r\n width: auto;\r\n height: auto;\r\n text-align: left;\r\n }\r\n .wiziapp_errors_container{\r\n display: none;\r\n z-index: 999;\r\n }\r\n #wiziapp_env_indicator{\r\n color: #0fb3fb;\r\n font-size: 12px;\r\n position: absolute;\r\n top: 0px;\r\n right: 25px;\r\n }\r\n </style>\r\n <script type=\"text/javascript\">\r\n jQuery(document).ready(function($){\r\n $(\"#wiziapp_main_tabs a\").click(function(event){\r\n event.preventDefault();\r\n top.document.location.replace('<?php\t \t echo get_admin_url();?>admin.php?page='+$(this).attr('rel'));\r\n return false;\r\n });\r\n\r\n $(\"#wiziapp_container .retry\").click(function(event){\r\n event.preventDefault();\r\n top.document.location.reload(true);\r\n return false;\r\n });\r\n\r\n $(\"#wiziapp_container .details\").click(function(event){\r\n event.preventDefault();\r\n var $el = jQuery(this).parents(\"tr:first\").next(\"tr\");\r\n\r\n if ( $el.is(':visible') ){\r\n $el.hide();\r\n } else {\r\n $el.show();\r\n }\r\n $el = null;\r\n return false;\r\n });\r\n\r\n $(\"#wiziapp_container .wiziapp_errors_container\").bind('closingReportForm', function(){\r\n jQuery('.wiziapp_errors_container').data('overlay').close();\r\n });\r\n });\r\n </script>\r\n <div id=\"wiziapp_container\">\r\n <div id=\"wiziapp_header\">\r\n <div id=\"wiziapp_logo\"><a href=\"#\"><img src=\"<?php\t \t echo WiziappConfig::getInstance()->getCdnServer(); ?>/images/generator/main_logo.png\" alt=\"Extend your reach\" /></a></div>\r\n <ul id=\"wiziapp_main_tabs\">\r\n <?php\t \t if ( $showAllTabs ) { ?>\r\n <?php\t \t if (WiziappConfig::getInstance()->app_live !== FALSE){ ?>\r\n <li class=\"wiziapp_header_link\">\r\n <a rel=\"wiziapp_statistics_display\" href=\"/cms/controlPanel/statistics\">Statistics</a>\r\n </li>\r\n <?php\t \t } ?>\r\n <li class=\"wiziapp_header_link\">\r\n <a rel=\"wiziapp_app_info_display\" href=\"/cms/controlPanel/appInfo\">App Info</a>\r\n </li>\r\n <li class=\"wiziapp_header_link\">\r\n <a rel=\"wiziapp_my_account_display\" href=\"/cms/controlPanel/myAccount\">My Account</a>\r\n </li>\r\n <?php\t \t } ?>\r\n <li class=\"wiziapp_header_link active <?php\t \t echo ($showAllTabs) ? '' : 'single'; ?>\">\r\n <a rel=\"wiziapp_support_display\" href=\"/cms/controlPanel/support\">Support</a>\r\n </li>\r\n </ul>\r\n </div>\r\n <div id=\"wiziapp_container_content\">\r\n <div id=\"wiziapp_support_table\" class=\"col\">\r\n <table border=\"0\">\r\n <thead>\r\n <tr>\r\n <th class=\"v_first-col\">Requirement</th>\r\n <th class=\"status_col\">Status</th>\r\n <th>Solution</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <?php\t \t \r\n echo $this->getStatusRow('WritingPermissions', 'Writing Permissions');\r\n echo $this->getStatusRow('PhpGraphicRequirements', 'GD / ImageMagick', 'v_odd');\r\n echo $this->getStatusRow('AllowUrlFopen', 'allow_url_fopen');\r\n ?>\r\n </tbody>\r\n </table>\r\n <div class=\"report_container wiziapp_errors_container\"></div>\r\n </div>\r\n <div id=\"wiziapp_support_links\" class=\"col\">\r\n <a href=\"http://wiziapp.com/support\" target=\"_blank\" id=\"wiziapp_faq_link\" class=\"wiziapp_button\">FAQ</a>\r\n <a href=\"http://wiziapp.com/contact\" target=\"_blank\" id=\"wiziapp_contact_link\" class=\"wiziapp_button\">Contact Us</a>\r\n </div>\r\n <div class=\"clear\"></div>\r\n </div>\r\n <div id=\"wiziapp_env_indicator\">\r\n <?php\t \t echo WIZIAPP_ENV; ?> :: <?php\t \t echo WIZIAPP_VERSION; ?>\r\n </div>\r\n </div>\r\n <?php\t \t \r\n }", "private function parse_options()\n\t\t{\n\t\t\t$options = $this->options;\n\n\t\t\tforeach ( $options as $option ) {\n\n\t\t\t\tif ( $option[ 'type' ] == 'heading' ) {\n\t\t\t\t\t$tab_name = sanitize_title( $option[ 'name' ] );\n\t\t\t\t\t$this->tab_headers = array( $tab_name => $option[ 'name' ] );\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$option[ 'tab' ] = $tab_name;\n\t\t\t\t$tabs[ $tab_name ][ ] = $option;\n\n\t\t\t}\n\n\t\t\t$this->tabs = $tabs;\n\n\t\t\treturn $tabs;\n\t\t}", "function __construct()\n\t{\n\t\tparent::__construct(\n\t\t\t'jetty_widget_horizontal_tab',\n\t\t\t__('Jetty Horizontal Tabs', 'jetty'),\n\t\t\tarray( 'description' => __( 'This widget for display horizontal tab on certain page', 'jetty' ), )\n\t\t);\n\t}", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: string properties');\r\n\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($stringpainted, 'stringpainted', 'Render a custom string:');\r\n\r\n $this->addElement('text', 'stringid', 'Id:', array('size' => 32));\r\n $this->addElement('text', 'stringclass', 'CSS class:', array('size' => 32));\r\n $this->addElement('text', 'stringvalue', 'Content:', array('size' => 32));\r\n\r\n $stringsize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $stringsize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $stringsize['left'] =& $this->createElement('text',\r\n 'left', 'left',\r\n array('size' => 4));\r\n $stringsize['top'] =& $this->createElement('text',\r\n 'top', 'top',\r\n array('size' => 4));\r\n $stringsize['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'bgcolor',\r\n array('size' => 7));\r\n $this->addGroup($stringsize, 'stringsize', 'Size, position and color:', ' ');\r\n\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Top', 'top');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Bottom', 'bottom');\r\n $this->addGroup($stringvalign, 'stringvalign', 'Vertical alignment:');\r\n\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Center', 'center');\r\n $this->addGroup($stringalign, 'stringalign', 'Horizontal alignment:');\r\n\r\n $stringfont['family'] =& $this->createElement('text',\r\n 'family', 'family',\r\n array('size' => 40));\r\n $stringfont['size'] =& $this->createElement('text',\r\n 'size', 'size',\r\n array('size' => 2));\r\n $stringfont['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($stringfont, 'stringfont', 'Font:', ' ');\r\n\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'normal', 'normal');\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'Bold', 'bold');\r\n $this->addGroup($stringweight, 'stringweight', 'Font weight:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function echotheme_tab_func( $atts, $content = null ) {\n extract(shortcode_atts(array(\n\t 'title'\t=> '',\n ), $atts));\n global $tabs;\n $tabs[] = array('title' => $title, 'content' => trim(wpautop(do_shortcode($content))));\n return $tabs;\n}", "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$windowId = $this->_Admin_Form_Controller->getWindowId();\n\n\t\t$oMainTab\n\t\t\t->add(Admin_Form_Entity::factory('Div')->class('row')\n\t\t\t\t->add($oDivLeft = Admin_Form_Entity::factory('Div')->class('col-xs-12 col-md-6 col-lg-7 left-block'))\n\t\t\t\t->add($oDivRight = Admin_Form_Entity::factory('Div')->class('col-xs-12 col-md-6 col-lg-5 right-block'))\n\t\t\t);\n\n\t\t\t$oMainTab\n\t\t\t->add(Admin_Form_Entity::factory('Script')\n\t\t\t\t->value('\n\t\t\t\t\t$(function(){\n\t\t\t\t\t\tvar timer = setInterval(function(){\n\t\t\t\t\t\t\tif ($(\"#' . $windowId . ' .left-block\").height())\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tclearInterval(timer);\n\n\t\t\t\t\t\t\t\t$(\"#' . $windowId . ' .right-block\").find(\"#' . $windowId . '_notes\").slimscroll({\n\t\t\t\t\t\t\t\t\theight: $(\"#' . $windowId . ' .left-block\").height() - 75,\n\t\t\t\t\t\t\t\t\tcolor: \"rgba(0, 0, 0, 0.3)\",\n\t\t\t\t\t\t\t\t\tsize: \"5px\"\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 500);\n\t\t\t\t\t});\n\t\t\t\t'));\n\n\t\t$oDivLeft\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\t\t\t->add($oMainRow3 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t->add($oMainRow4 = Admin_Form_Entity::factory('Div')->class('row'))\n\t\t\t;\n\n\t\t$oDivRight\n\t\t\t->add($oMainRowRight1 = Admin_Form_Entity::factory('Div')->class('row'));\n\n\t\t$sColorValue = ($this->_object->id && $this->getField('color')->value)\n\t\t\t? $this->getField('color')->value\n\t\t\t: '#aebec4';\n\n\t\t$this->getField('color')\n\t\t\t->colorpicker(TRUE)\n\t\t\t->value($sColorValue);\n\n\t\t$oMainTab\n\t\t\t->move($this->getField('name')->divAttr(array('class' => 'form-group col-xs-12')), $oMainRow1)\n\t\t\t->move($this->getField('description')->divAttr(array('class' => 'form-group col-xs-12'))->rows(10), $oMainRow2)\n\t\t\t->move($this->getField('datetime')->divAttr(array('class' => 'form-group col-xs-12 col-sm-6 col-md-4 col-lg-6')), $oMainRow3)\n\t\t\t->move($this->getField('deadline')->divAttr(array('class' => 'form-group col-xs-12 col-sm-6 col-md-4 col-lg-6')), $oMainRow3)\n\t\t\t->move($this->getField('color')->set('data-control', 'hue')->divAttr(array('class' => 'form-group col-xs-12 col-sm-6')), $oMainRow4)\n\t\t\t->move($this->getField('completed')->divAttr(array('class' => 'form-group col-xs-12 col-sm-6 col-md-4 col-lg-6 margin-top-21')), $oMainRow4);\n\n\t\t$windowId = $this->_Admin_Form_Controller->getWindowId();\n\n\t\t$countNotes = $this->_object->Crm_Notes->getCount()\n\t\t\t? '<span class=\"badge badge-palegreen\">' . $this->_object->Crm_Notes->getCount() . '</span>'\n\t\t\t: '';\n\n\t\tob_start();\n\t\t?>\n\t\t<div class=\"tabbable\">\n\t\t\t<ul class=\"nav nav-tabs tabs-flat\" id=\"crmProjectTabs\">\n\t\t\t\t<li class=\"active\">\n\t\t\t\t\t<a data-toggle=\"tab\" href=\"#<?php echo $windowId?>_notes\" data-path=\"/admin/crm/project/note/index.php\" data-window-id=\"<?php echo $windowId?>_notes\" data-additional=\"crm_project_id=<?php echo $this->_object->id?>\">\n\t\t\t\t\t\t<?php echo Core::_(\"Crm_Project.tabNotes\")?> <?php echo $countNotes?>\n\t\t\t\t\t</a>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t\t<div class=\"tab-content tabs-flat\">\n\t\t\t\t<div id=\"<?php echo $windowId?>_notes\" class=\"tab-pane in active\">\n\t\t\t\t\t<?php\n\t\t\t\t\tAdmin_Form_Entity::factory('Div')\n\t\t\t\t\t\t->controller($this->_Admin_Form_Controller)\n\t\t\t\t\t\t->id(\"crm-project-notes\")\n\t\t\t\t\t\t->add(\n\t\t\t\t\t\t\t$this->_object->id\n\t\t\t\t\t\t\t\t? $this->_addNotes()\n\t\t\t\t\t\t\t\t: Admin_Form_Entity::factory('Code')->html(\n\t\t\t\t\t\t\t\t\tCore_Message::get(Core::_('Crm_Project.enable_after_save'), 'warning')\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t\t->execute();\n\t\t\t\t\t?>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t\t$oMainRowRight1->add(Admin_Form_Entity::factory('Div')\n\t\t\t->class('form-group col-xs-12 margin-top-20')\n\t\t\t->add(\n\t\t\t\tAdmin_Form_Entity::factory('Code')\n\t\t\t\t\t->html(ob_get_clean())\n\t\t\t)\n\t\t);\n\n\t\t$this->title($this->_object->id\n\t\t\t? Core::_('Crm_Project.edit_title', $this->_object->name, FALSE)\n\t\t\t: Core::_('Crm_Project.add_title')\n\t\t);\n\n\t\treturn $this;\n\t}", "function admin_init() {\n\t\t\twp_enqueue_script('common');\n\t\t\twp_enqueue_script('wp-lists');\n\t\t\twp_enqueue_script('postbox');\n\n\t\t\t// Group = setings_fields, name of options, validation callback\n\t\t\tregister_setting( 'subpages_as_tabs_options', 'subpages_as_tabs_options', array( $this, 'options_validate' ) );\n\t\t\t// Unique ID, section title displayed, section callback, page name = do_settings_section\n\t\t\tadd_settings_section( 'subpages_tabs_section', '', array( $this, 'main_section' ), 'subpage_tabs_plugin' );\n\t\t\t// Unique ID, Title, function callback, page name = do_settings_section, section name\n\t\t\tadd_settings_field( 'spat_active_tab_background', __( 'Active Tab Background' ), array( $this, 'active_tab_background'), 'subpage_tabs_plugin', 'subpages_tabs_section');\n\t\t\t/**/\n\t\t\tadd_settings_field( 'spat_active_tab_foreground', __('Active Tab Text' ), array( $this, 'active_tab_foreground'), 'subpage_tabs_plugin', 'subpages_tabs_section');\n\t\t\tadd_settings_field( 'spat_inactive_tab_background', __( 'Inactive Tab Background' ), array( $this, 'inactive_tab_background'), 'subpage_tabs_plugin', 'subpages_tabs_section');\n\t\t\tadd_settings_field( 'spat_inactive_tab_foreground', __('Inactive Tab Text' ), array( $this, 'inactive_tab_foreground'), 'subpage_tabs_plugin', 'subpages_tabs_section');\n\n\t\t\tadd_settings_field( 'border', __('Border' ), array( $this, 'border'), 'subpage_tabs_plugin', 'subpages_tabs_section');\n\t\t\t//*/\n\t\t}", "function training_tabs_callback() {\n ctools_include('menu');\n $tab_1 = array(\n 'title' => 'First tab',\n 'href' => 'training/ctools/tabs/tab1',\n );\n $tab_2 = array(\n 'title' => 'Second tab',\n 'href' => 'training/ctools/tabs/tab2',\n );\n ctools_menu_add_tab($tab_1);\n ctools_menu_add_tab($tab_2);\n if (arg(3) == 'tab2') {\n return t('Tab 2 content');\n }\n\n return t('Tab 1 content');\n}", "public function buildPanels() {\n return array($this);\n }", "function hankart_add_manual_tab( $tabs ) {\n\t$tabs['pdf_manual'] = array(\n\t\t'title' \t=> __( 'Manual', 'storefront' ),\n\t\t'priority' \t=> 50,\n\t\t'callback' \t=> 'hankart_add_manual_tab_content'\n\t);\n\treturn $tabs;\n}", "private static function _parse()\n {\n $data = array();\n $data['tab-label'] = $_POST['tab-label'];\n $data['title-disabled'] = (bool) @$_POST['title-disabled'];\n $data['languages'] = $_POST['languages'];\n \n $data['languages'] = $_POST['languages'] ? explode(',',$_POST['languages']) : array(); \n $data['info'] = trim($_POST['info']); \n\t\t\n\t\t\n $data['required-width-comparator'] = $_POST['required-width-comparator']; \n $data['required-width'] = $_POST['required-width']; //do not cast to int\n\t\t$data['required-width-ranges'] = $_POST['required-width-ranges'] ? array_map('self::_explodeRangeRow', explode(';', $_POST['required-width-ranges'])) : array(); //twice explode\n\n\n\t\t$data['required-height-comparator'] = $_POST['required-height-comparator']; \n $data['required-height'] = $_POST['required-height']; //do not cast to int\n\t\t$data['required-height-ranges'] = $_POST['required-height-ranges'] ? array_map('self::_explodeRangeRow', explode(';', $_POST['required-height-ranges'])) : array(); //twice explode\n\n \n $data['fields'] = array();\n \n for ($i=0; isset($_POST['field-'.$i.'-type']); $i++) {\n $field = array();\n \n $field['label'] = $_POST['field-'.$i.'-label'];\n $field['type'] = $_POST['field-'.$i.'-type'];\n $field['required'] = (bool)@$_POST['field-'.$i.'-required'];\n \n if ($field['type'] == 'select')\n $field['options'] = preg_replace('/\\s\\s+/', ',', $_POST['field-'.$i.'-options']);\n \n $data['fields'][] = $field;\n } \n\n $data['thumbnails'] = array();\n \n //thumbs\n for ($i=0; $i <= 1; $i++) {\n $thumb = array();\n\n $thumb['enabled'] = (bool) @$_POST['thumb-'.$i.'-enabled'];\n $thumb['required'] = (bool) @$_POST['thumb-'.$i.'-required'];\n $thumb['label'] = @$_POST['thumb-'.$i.'-label'];\n $thumb['width'] = @$_POST['thumb-'.$i.'-width'];\n $thumb['height'] = @$_POST['thumb-'.$i.'-height'];\n $thumb['auto-crop'] = @$_POST['thumb-'.$i.'-auto-crop'];\n \n $data['thumbnails'][] = $thumb;\n }\n\n return $data;\n }", "function init()\n\t{\n\t\t$this->setType(\"tabs\");\n\t}", "function account_tab( $tabs ) {\n\n\t\t$tabs[1000]['points']['icon'] = 'um-faicon-trophy';\n\t\t$tabs[1000]['points']['title'] = __( 'My Points', 'twodayssss' );\n\t\t$tabs[1000]['points']['submit_title'] = __( 'My Points', 'twodayssss' );\n\t\t$tabs[1000]['points']['show_button'] = false;\n\n\t\treturn $tabs;\n\t}", "public function add_tabs() {\n\t\t$screen = get_current_screen();\n\n\t\tif ( ! $screen || ! in_array( $screen->id, wc_get_screen_ids() ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$video_map = array(\n\t\t\t'wc-settings' => array(\n\t\t\t\t'title' => __( 'General Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/mz2l10u5f6?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-general' => array(\n\t\t\t\t'title' => __( 'General Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/mz2l10u5f6?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-products' => array(\n\t\t\t\t'title' => __( 'Product Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/lolkan4fxf?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-tax' => array(\n\t\t\t\t'title' => __( 'Tax Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/qp1v19dwrh?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-checkout' => array(\n\t\t\t\t'title' => __( 'Checkout Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/65yjv96z51?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-account' => array(\n\t\t\t\t'title' => __( 'Account Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/35mazq7il2?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-email' => array(\n\t\t\t\t'title' => __( 'Email Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/svcaftq4xv?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-api' => array(\n\t\t\t\t'title' => __( 'Webhook Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/1q0ny74vvq?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-checkout-wc_gateway_paypal' => array(\n\t\t\t\t'title' => __( 'PayPal Standard', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/rbl7e7l4k2?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-checkout-wc_gateway_simplify_commerce' => array(\n\t\t\t\t'title' => __( 'Simplify Commerce', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/jdfzjiiw61?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-shipping' => array(\n\t\t\t\t'title' => __( 'Shipping Settings', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/9c9008dxnr?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-shipping-wc_shipping_free_shipping' => array(\n\t\t\t\t'title' => __( 'Free Shipping', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/po191fmvy9?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-shipping-wc_shipping_local_delivery' => array(\n\t\t\t\t'title' => __( 'Local Delivery', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/5qjepx9ozj?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-settings-shipping-wc_shipping_local_pickup' => array(\n\t\t\t\t'title' => __( 'Local Pickup', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/pe95ph0apb?videoFoam=true'\n\t\t\t),\n\t\t\t'edit-product_cat' => array(\n\t\t\t\t'title' => __( 'Product Categories, Tags, Shipping Classes, &amp; Attributes', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/f0j5gzqigg?videoFoam=true'\n\t\t\t),\n\t\t\t'edit-product_tag' => array(\n\t\t\t\t'title' => __( 'Product Categories, Tags, Shipping Classes, &amp; Attributes', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/f0j5gzqigg?videoFoam=true'\n\t\t\t),\n\t\t\t'edit-product_shipping_class' => array(\n\t\t\t\t'title' => __( 'Product Categories, Tags, Shipping Classes, &amp; Attributes', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/f0j5gzqigg?videoFoam=true'\n\t\t\t),\n\t\t\t'product_attributes' => array(\n\t\t\t\t'title' => __( 'Product Categories, Tags, Shipping Classes, &amp; Attributes', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/f0j5gzqigg?videoFoam=true'\n\t\t\t),\n\t\t\t'product' => array(\n\t\t\t\t'title' => __( 'Simple Products', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/ziyjmd4kut?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-status' => array(\n\t\t\t\t'title' => __( 'System Status', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/xdn733nnhi?videoFoam=true'\n\t\t\t),\n\t\t\t'wc-reports' => array(\n\t\t\t\t'title' => __( 'Reports', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/6aasex0w99?videoFoam=true'\n\t\t\t),\n\t\t\t'edit-shop_coupon' => array(\n\t\t\t\t'title' => __( 'Coupons', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/gupd4h8sit?videoFoam=true'\n\t\t\t),\n\t\t\t'shop_coupon' => array(\n\t\t\t\t'title' => __( 'Coupons', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/gupd4h8sit?videoFoam=true'\n\t\t\t),\n\t\t\t'edit-shop_order' => array(\n\t\t\t\t'title' => __( 'Managing Orders', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/n8n0sa8hee?videoFoam=true'\n\t\t\t),\n\t\t\t'shop_order' => array(\n\t\t\t\t'title' => __( 'Managing Orders', 'woocommerce' ),\n\t\t\t\t'url' => '//fast.wistia.net/embed/iframe/n8n0sa8hee?videoFoam=true'\n\t\t\t)\n\t\t);\n\n\t\t$page = empty( $_GET['page'] ) ? '' : sanitize_title( $_GET['page'] );\n\t\t$tab = empty( $_GET['tab'] ) ? '' : sanitize_title( $_GET['tab'] );\n\t\t$section = empty( $_REQUEST['section'] ) ? '' : sanitize_title( $_REQUEST['section'] );\n\t\t$video_key = $page ? implode( '-', array_filter( array( $page, $tab, $section ) ) ) : $screen->id;\n\n\t\t// Fallback for sections\n\t\tif ( ! isset( $video_map[ $video_key ] ) ) {\n\t\t\t$video_key = $page ? implode( '-', array_filter( array( $page, $tab ) ) ) : $screen->id;\n\t\t}\n\n\t\t// Fallback for tabs\n\t\tif ( ! isset( $video_map[ $video_key ] ) ) {\n\t\t\t$video_key = $page ? $page : $screen->id;\n\t\t}\n\n\t\tif ( isset( $video_map[ $video_key ] ) ) {\n\t\t\t$screen->add_help_tab( array(\n\t\t\t\t'id' => 'woocommerce_101_tab',\n\t\t\t\t'title' => __( 'WooCommerce 101', 'woocommerce' ),\n\t\t\t\t'content' =>\n\t\t\t\t\t'<h2><a href=\"http://docs.woothemes.com/document/woocommerce-101-video-series/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=Videos&utm_campaign=Onboarding\">' . __( 'WooCommerce 101', 'woocommerce' ) . '</a> &ndash; ' . esc_html( $video_map[ $video_key ]['title'] ) . '</h2>' .\n\t\t\t\t\t'<iframe data-src=\"' . esc_url( $video_map[ $video_key ]['url'] ) . '\" src=\"\" allowtransparency=\"true\" frameborder=\"0\" scrolling=\"no\" class=\"wistia_embed\" name=\"wistia_embed\" allowfullscreen mozallowfullscreen webkitallowfullscreen oallowfullscreen msallowfullscreen width=\"480\" height=\"298\"></iframe>'\n\t\t\t) );\n\t\t}\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'woocommerce_docs_tab',\n\t\t\t'title' => __( 'Documentation', 'woocommerce' ),\n\t\t\t'content' =>\n\t\t\t\t'<h2>' . __( 'Documentation', 'woocommerce' ) . '</h2>' .\n\t\t\t\t'<p>' . __( 'Should you need help understanding, using, or extending WooCommerce, please read our documentation. You will find all kinds of resources including snippets, tutorials and much more.' , 'woocommerce' ) . '</p>' .\n\t\t\t\t'<p><a href=\"' . 'http://docs.woothemes.com/documentation/plugins/woocommerce/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=Docs&utm_campaign=Onboarding' . '\" class=\"button button-primary\">' . __( 'WooCommerce Documentation', 'woocommerce' ) . '</a> <a href=\"' . 'http://docs.woothemes.com/wc-apidocs/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=APIDocs&utm_campaign=Onboarding' . '\" class=\"button\">' . __( 'Developer API Docs', 'woocommerce' ) . '</a></p>'\n\n\t\t) );\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'woocommerce_support_tab',\n\t\t\t'title' => __( 'Support', 'woocommerce' ),\n\t\t\t'content' =>\n\t\t\t\t'<h2>' . __( 'Support', 'woocommerce' ) . '</h2>' .\n\t\t\t\t'<p>' . sprintf( __( 'After %sreading the documentation%s, for further assistance you can use the %scommunity forums%s on WordPress.org to talk with other users. If however you are a WooThemes customer, or need help with premium add-ons sold by WooThemes, please %suse our helpdesk%s.', 'woocommerce' ), '<a href=\"http://docs.woothemes.com/documentation/plugins/woocommerce/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=Docs&utm_campaign=Onboarding\">', '</a>', '<a href=\"https://wordpress.org/support/plugin/woocommerce\">', '</a>', '<a href=\"http://www.woothemes.com/my-account/tickets/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=Tickets&utm_campaign=Onboarding\">', '</a>' ) . '</p>' .\n\t\t\t\t'<p>' . __( 'Before asking for help we recommend checking the system status page to identify any problems with your configuration.', 'woocommerce' ) . '</p>' .\n\t\t\t\t'<p><a href=\"' . admin_url( 'admin.php?page=wc-status' ) . '\" class=\"button button-primary\">' . __( 'System Status', 'woocommerce' ) . '</a> <a href=\"' . 'https://wordpress.org/support/plugin/woocommerce' . '\" class=\"button\">' . __( 'WordPress.org Forums', 'woocommerce' ) . '</a> <a href=\"' . 'http://www.woothemes.com/my-account/tickets/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=Tickets&utm_campaign=Onboarding' . '\" class=\"button\">' . __( 'WooThemes Customer Support', 'woocommerce' ) . '</a></p>'\n\t\t) );\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'woocommerce_education_tab',\n\t\t\t'title' => __( 'Education', 'woocommerce' ),\n\t\t\t'content' =>\n\t\t\t\t'<h2>' . __( 'Education', 'woocommerce' ) . '</h2>' .\n\t\t\t\t'<p>' . __( 'If you would like to learn about using WooCommerce from an expert, consider following a WooCommerce course ran by one of our educational partners.', 'woocommerce' ) . '</p>' .\n\t\t\t\t'<p><a href=\"' . 'http://www.woothemes.com/educational-partners/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=EduPartners&utm_campaign=Onboarding' . '\" class=\"button button-primary\">' . __( 'View Education Partners', 'woocommerce' ) . '</a></p>'\n\t\t) );\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'woocommerce_bugs_tab',\n\t\t\t'title' => __( 'Found a bug?', 'woocommerce' ),\n\t\t\t'content' =>\n\t\t\t\t'<h2>' . __( 'Found a bug?', 'woocommerce' ) . '</h2>' .\n\t\t\t\t'<p>' . sprintf( __( 'If you find a bug within WooCommerce core you can create a ticket via <a href=\"%s\">Github issues</a>. Ensure you read the <a href=\"%s\">contribution guide</a> prior to submitting your report. To help us solve your issue, please be as descriptive as possible and include your <a href=\"%s\">system status report</a>.', 'woocommerce' ), 'https://github.com/woothemes/woocommerce/issues?state=open', 'https://github.com/woothemes/woocommerce/blob/master/CONTRIBUTING.md', admin_url( 'admin.php?page=wc-status' ) ) . '</p>' .\n\t\t\t\t'<p><a href=\"' . 'https://github.com/woothemes/woocommerce/issues?state=open' . '\" class=\"button button-primary\">' . __( 'Report a bug', 'woocommerce' ) . '</a> <a href=\"' . admin_url( 'admin.php?page=wc-status' ) . '\" class=\"button\">' . __( 'System Status', 'woocommerce' ) . '</a></p>'\n\n\t\t) );\n\n\t\t$screen->add_help_tab( array(\n\t\t\t'id' => 'woocommerce_onboard_tab',\n\t\t\t'title' => __( 'Setup Wizard', 'woocommerce' ),\n\t\t\t'content' =>\n\t\t\t\t'<h2>' . __( 'Setup Wizard', 'woocommerce' ) . '</h2>' .\n\t\t\t\t'<p>' . __( 'If you need to access the setup wizard again, please click on the button below.', 'woocommerce' ) . '</p>' .\n\t\t\t\t'<p><a href=\"' . admin_url( 'index.php?page=wc-setup' ) . '\" class=\"button button-primary\">' . __( 'Setup Wizard', 'woocommerce' ) . '</a></p>'\n\n\t\t) );\n\n\t\t$screen->set_help_sidebar(\n\t\t\t'<p><strong>' . __( 'For more information:', 'woocommerce' ) . '</strong></p>' .\n\t\t\t'<p><a href=\"' . 'http://www.woothemes.com/woocommerce/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=WooCommerceProductPage&utm_campaign=Onboarding' . '\" target=\"_blank\">' . __( 'About WooCommerce', 'woocommerce' ) . '</a></p>' .\n\t\t\t'<p><a href=\"' . 'http://wordpress.org/extend/plugins/woocommerce/' . '\" target=\"_blank\">' . __( 'WordPress.org Project', 'woocommerce' ) . '</a></p>' .\n\t\t\t'<p><a href=\"' . 'https://github.com/woothemes/woocommerce' . '\" target=\"_blank\">' . __( 'Github Project', 'woocommerce' ) . '</a></p>' .\n\t\t\t'<p><a href=\"' . 'http://www.woothemes.com/product-category/themes/woocommerce/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=WCThemes&utm_campaign=Onboarding' . '\" target=\"_blank\">' . __( 'Official Themes', 'woocommerce' ) . '</a></p>' .\n\t\t\t'<p><a href=\"' . 'http://www.woothemes.com/product-category/woocommerce-extensions/?utm_source=WooCommercePlugin&utm_medium=Help&utm_content=WCExtensions&utm_campaign=Onboarding' . '\" target=\"_blank\">' . __( 'Official Extensions', 'woocommerce' ) . '</a></p>'\n\t\t);\n\t}", "public function lite_tabs( $tabs ) {\n\n $tabs['mobile'] = __( 'Mobile', 'envira-gallery' );\n $tabs['videos'] = __( 'Videos', 'envira-gallery' );\n $tabs['social'] = __( 'Social', 'envira-gallery' );\n $tabs['tags'] = __( 'Tags', 'envira-gallery' );\n $tabs['pagination'] = __( 'Pagination', 'envira-gallery' );\n return $tabs;\n\n }", "protected function _register_controls() {\n\n\t\t$this->start_controls_section(\n\t\t\t'content_section',\n\t\t\t[\n\t\t\t\t'label' => __( 'Content', 'portfolio-elementor' ),\n\t\t\t\t'tab' => \\Elementor\\Controls_Manager::TAB_CONTENT,\n\t\t\t]\n\t\t);\n\t\t\n\t\t// Section Heading Title\n\t\t$this->add_control(\n\t\t 'portfolio_section_heading_title',\n\t\t\t[\n\t\t\t 'label' => esc_html__('Section Heading Title','portfolio-elementor'),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::TEXT,\n\t\t\t\t'label_block' => true,\n\t\t\t\t'separator' => 'before',\n\t\t\t\t'placeholder' => esc_html__('Enter Section Heading Title','portfolio-elementor'),\n\t\t\t]\n\t\t);\n\t\t\n\t\t// Section Heading Sub Title \n\t\t$this->add_control(\n\t\t 'portfolio_section_heading_sub_title',\n\t\t\t[\n\t\t\t 'label' => esc_html__('Section Heading Sub Title','portfolio-elementor'),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::TEXT,\n\t\t\t\t'label_block' => true,\n\t\t\t\t'separator' => 'before',\n\t\t\t\t'placeholder' => esc_html__('Enter Section Heading Sub Title','portfolio-elementor'),\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->end_controls_section();\n\t\t// end of the Content tab section\n\t\t\n\t\t// start of the Style tab section\n\t\t$this->start_controls_section(\n\t\t\t'style_section',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Content Style', 'portfolio-elementor' ),\n\t\t\t\t'tab' => \\Elementor\\Controls_Manager::TAB_STYLE,\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->start_controls_tabs(\n\t\t\t'style_tabs'\n\t\t);\n\t\t\n\t\t// start everything related to Normal state here\n\t\t$this->start_controls_tab(\n\t\t\t'style_normal_tab',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Normal', 'portfolio-elementor' ),\n\t\t\t]\n\t\t);\n\n\t\t// Section Heading Title Options\n\t\t$this->add_control(\n\t\t\t'portfolio_section_heading_title_options',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Section Heading Title', 'portfolio-elementor' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::HEADING,\n\t\t\t\t'separator' => 'before',\n\t\t\t]\n\t\t);\n\n\t\t// Section Heading Title Color\n\t\t$this->add_control(\n\t\t\t'portfolio_section_heading_title_color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Title Color', 'portfolio-elementor' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::COLOR,\n\t\t\t\t'scheme' => [\n\t\t\t\t\t'type' => \\Elementor\\Scheme_Color::get_type(),\n\t\t\t\t\t'value' => \\Elementor\\Scheme_Color::COLOR_1,\n\t\t\t\t],\n\t\t\t\t'default' => '#dee3e4',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .section-title h2' => 'color: {{VALUE}}',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t\n\t\t// Section Heading Title Typography\n\t\t$this->add_group_control(\n\t\t\t\\Elementor\\Group_Control_Typography::get_type(),\n\t\t\t[\n\t\t\t\t'name' => 'portfolio_section_heading_title_typography',\n\t\t\t\t'label' => esc_html__( 'Typography', 'portfolio-elementor' ),\n\t\t\t\t'scheme' => \\Elementor\\Scheme_Typography::TYPOGRAPHY_1,\n\t\t\t\t'selector' => '{{WRAPPER}} .section-title h2',\n\t\t\t]\n\t\t);\n\t\t\n\t\t// Section Heading Sub Title Options\n\t\t$this->add_control(\n\t\t\t'portfolio_section_heading_sub_title_options',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Section Heading Sub Title', 'portfolio-elementor' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::HEADING,\n\t\t\t\t'separator' => 'before',\n\t\t\t]\n\t\t);\n\n\t\t// Section Heading Sub Title Color\n\t\t$this->add_control(\n\t\t\t'portfolio_section_heading_sub_title_color',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Sub Title Color', 'portfolio-elementor' ),\n\t\t\t\t'type' => \\Elementor\\Controls_Manager::COLOR,\n\t\t\t\t'scheme' => [\n\t\t\t\t\t'type' => \\Elementor\\Scheme_Color::get_type(),\n\t\t\t\t\t'value' => \\Elementor\\Scheme_Color::COLOR_1,\n\t\t\t\t],\n\t\t\t\t'default' => '#343a40',\n\t\t\t\t'selectors' => [\n\t\t\t\t\t'{{WRAPPER}} .section-title p' => 'color: {{VALUE}}',\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\t\t\n\t\t// Section Heading Sub Title Typography\n\t\t$this->add_group_control(\n\t\t\t\\Elementor\\Group_Control_Typography::get_type(),\n\t\t\t[\n\t\t\t\t'name' => 'portfolio_section_heading_sub_title_typography',\n\t\t\t\t'label' => esc_html__( 'Typography', 'portfolio-elementor' ),\n\t\t\t\t'scheme' => \\Elementor\\Scheme_Typography::TYPOGRAPHY_1,\n\t\t\t\t'selector' => '{{WRAPPER}} .section-title p',\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->end_controls_tab();\n\t\t// end everything related to Normal state here\n\n\t\t// start everything related to Hover state here\n\t\t$this->start_controls_tab(\n\t\t\t'style_hover_tab',\n\t\t\t[\n\t\t\t\t'label' => esc_html__( 'Hover', 'portfolio-elementor' ),\n\t\t\t]\n\t\t);\n\t\t\n\t\t$this->end_controls_tab();\n\t\t// end everything related to Hover state here\n\n\t\t$this->end_controls_tabs();\n\n\t\t$this->end_controls_section();\n\t\t// end of the Style tab section\n\n\t}", "private function get_main_tabs_array() {\n\t\treturn apply_filters(\n\t\t\t'updraftplus_main_tabs',\n\t\t\tarray(\n\t\t\t\t'backups' => __('Backup / Restore', 'updraftplus'),\n\t\t\t\t'migrate' => __('Migrate / Clone', 'updraftplus'),\n\t\t\t\t'settings' => __('Settings', 'updraftplus'),\n\t\t\t\t'expert' => __('Advanced Tools', 'updraftplus'),\n\t\t\t\t'addons' => __('Premium / Extensions', 'updraftplus'),\n\t\t\t)\n\t\t);\n\t}", "function ch_widget_tabcontent($args, $number = 1) {\n\textract($args);\n\t$options = get_option('widget_tabcontent');\n\t\n\tinclude(TEMPLATEPATH . '/tabcontent.php');\n\t\n}", "public function actionCreate()\n {\n $this->can('createTabs');\n $model = new Tabs();\n\n if ($model->load(Yii::$app->request->post())) {\n $max = Tabs::find()->select('position')->asArray()->orderBy('position DESC')->one();\n $model->position = $max['position']+1;\n if ($model->save()) {\n return $this->redirect(['index']);\n }\n }\n\n $parents = ArrayHelper::map(Tabs::find()->where(['parent' => 0])->asArray()->all(), 'id', 'name');\n $parents[0] = Yii::t('app', 'Menu');\n ksort($parents);\n\n $Tabs = ArrayHelper::index(Tabs::find()->asArray()->all(), 'id');\n\n $items = Tabs::generateTree($Tabs, 0);\n\n return $this->render('create', [\n 'model' => $model,\n 'parents' => $parents,\n 'items' => $items,\n ]);\n }" ]
[ "0.7487054", "0.6603563", "0.6448827", "0.63951415", "0.6376598", "0.6342076", "0.63246083", "0.6316735", "0.62946516", "0.6253495", "0.6227628", "0.62228113", "0.61793476", "0.6155166", "0.61530346", "0.6118265", "0.6103463", "0.6070469", "0.6066338", "0.6050339", "0.59843427", "0.59528047", "0.591701", "0.58926606", "0.5891947", "0.58819485", "0.58720267", "0.584689", "0.5835146", "0.58297396", "0.5820008", "0.58167565", "0.580237", "0.57537824", "0.573061", "0.5706685", "0.5695175", "0.56874657", "0.5640662", "0.56345296", "0.5623697", "0.5612823", "0.56049496", "0.5588188", "0.55766475", "0.556772", "0.5557029", "0.55563027", "0.55361605", "0.5533483", "0.55326086", "0.55307084", "0.55175745", "0.5511534", "0.5508784", "0.550351", "0.54823816", "0.54737234", "0.5456711", "0.54522234", "0.5445022", "0.5438618", "0.5429678", "0.54267895", "0.54200584", "0.54189163", "0.5416505", "0.54150057", "0.5379553", "0.53727967", "0.5363681", "0.53521913", "0.53462726", "0.53315914", "0.53311217", "0.53293854", "0.53245884", "0.5302638", "0.52957374", "0.5290575", "0.5288918", "0.5285619", "0.52802503", "0.52767724", "0.5275335", "0.52667475", "0.5250827", "0.5247525", "0.5244297", "0.5238747", "0.5235012", "0.5222568", "0.52216864", "0.5221153", "0.5210254", "0.5206879", "0.52051485", "0.5202953", "0.520121", "0.5194386" ]
0.795176
0
Builds the form that define the main properties of your progress bar
Создает форму, определяющую основные свойства вашей прогресс-бара
function buildForm() { $this->buildTabs(); // tab caption $this->addElement('header', null, 'Progress2 Generator - Control Panel: main properties'); $shape[] =& $this->createElement('radio', null, null, 'Horizontal', '1'); $shape[] =& $this->createElement('radio', null, null, 'Vertical', '2'); $this->addGroup($shape, 'shape', 'Shape:'); $way[] =& $this->createElement('radio', null, null, 'Natural', 'natural'); $way[] =& $this->createElement('radio', null, null, 'Reverse', 'reverse'); $this->addGroup($way, 'way', 'Direction:'); $autosize[] =& $this->createElement('radio', null, null, 'Yes', true); $autosize[] =& $this->createElement('radio', null, null, 'No', false); $this->addGroup($autosize, 'autosize', 'Best size:'); $psize['width'] =& $this->createElement('text', 'width', 'width', array('size' => 4)); $psize['height'] =& $this->createElement('text', 'height', 'height', array('size' => 4)); $psize['left'] =& $this->createElement('text', 'left', 'left', array('size' => 4)); $psize['top'] =& $this->createElement('text', 'top', 'top', array('size' => 4)); $psize['position'] =& $this->createElement('text', 'position', 'position', array('disabled' => 'true')); $psize['bgcolor'] =& $this->createElement('text', 'bgcolor', 'bgcolor', array('size' => 7)); $this->addGroup($psize, 'progresssize', 'Size, position and color:', ' '); $this->addElement('text', 'rAnimSpeed', array('Animation speed :', '(0-1000 ; 0:fast, 1000:slow)')); $this->addRule('rAnimSpeed', 'Should be between 0 and 1000', 'rangelength', array(0,1000), 'client'); // Buttons of the wizard to do the job $this->buildButtons(array('back','apply','process')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: run demo');\r\n\r\n $this->addElement('static', 'progressBar',\r\n 'Your progress meter looks like:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('reset','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: string properties');\r\n\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($stringpainted, 'stringpainted', 'Render a custom string:');\r\n\r\n $this->addElement('text', 'stringid', 'Id:', array('size' => 32));\r\n $this->addElement('text', 'stringclass', 'CSS class:', array('size' => 32));\r\n $this->addElement('text', 'stringvalue', 'Content:', array('size' => 32));\r\n\r\n $stringsize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $stringsize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $stringsize['left'] =& $this->createElement('text',\r\n 'left', 'left',\r\n array('size' => 4));\r\n $stringsize['top'] =& $this->createElement('text',\r\n 'top', 'top',\r\n array('size' => 4));\r\n $stringsize['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'bgcolor',\r\n array('size' => 7));\r\n $this->addGroup($stringsize, 'stringsize', 'Size, position and color:', ' ');\r\n\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Top', 'top');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Bottom', 'bottom');\r\n $this->addGroup($stringvalign, 'stringvalign', 'Vertical alignment:');\r\n\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Center', 'center');\r\n $this->addGroup($stringalign, 'stringalign', 'Horizontal alignment:');\r\n\r\n $stringfont['family'] =& $this->createElement('text',\r\n 'family', 'family',\r\n array('size' => 40));\r\n $stringfont['size'] =& $this->createElement('text',\r\n 'size', 'size',\r\n array('size' => 2));\r\n $stringfont['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($stringfont, 'stringfont', 'Font:', ' ');\r\n\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'normal', 'normal');\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'Bold', 'bold');\r\n $this->addGroup($stringweight, 'stringweight', 'Font weight:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: border properties');\r\n\r\n $borderpainted[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $borderpainted[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($borderpainted, 'borderpainted', 'Display the border:');\r\n\r\n $this->addElement('text', 'borderclass', 'CSS class:', array('size' => 32));\r\n\r\n $borderstyle['style'] =& $this->createElement('select',\r\n 'style', 'style',\r\n array('solid' => 'Solid',\r\n 'dashed' => 'Dashed',\r\n 'dotted' => 'Dotted',\r\n 'inset' => 'Inset',\r\n 'outset' => 'Outset'));\r\n $borderstyle['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 2));\r\n $borderstyle['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($borderstyle, 'borderstyle', null, ' ');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: cell properties');\r\n\r\n $this->addElement('text', 'cellid', 'Id mask:', array('size' => 32));\r\n $this->addElement('text', 'cellclass', 'CSS class:', array('size' => 32));\r\n\r\n $cellvalue['min'] =& $this->createElement('text',\r\n 'min', 'minimum',\r\n array('size' => 4));\r\n $cellvalue['max'] =& $this->createElement('text',\r\n 'max', 'maximum',\r\n array('size' => 4));\r\n $cellvalue['inc'] =& $this->createElement('text',\r\n 'inc', 'increment',\r\n array('size' => 4));\r\n $this->addGroup($cellvalue, 'cellvalue', 'Value:', ' ');\r\n\r\n $cellsize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $cellsize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $cellsize['spacing'] =& $this->createElement('text',\r\n 'spacing', 'spacing',\r\n array('size' => 2));\r\n $cellsize['count'] =& $this->createElement('text',\r\n 'count', 'count',\r\n array('size' => 2));\r\n $this->addGroup($cellsize, 'cellsize', 'Size:', ' ');\r\n\r\n $cellcolor['active'] =& $this->createElement('text',\r\n 'active', 'active',\r\n array('size' => 7));\r\n $cellcolor['inactive'] =& $this->createElement('text',\r\n 'inactive', 'inactive',\r\n array('size' => 7));\r\n $cellcolor['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'background',\r\n array('size' => 7));\r\n $this->addGroup($cellcolor, 'cellcolor', 'Color:', ' ');\r\n\r\n $cellfont['family'] =& $this->createElement('text',\r\n 'family', 'family',\r\n array('size' => 32));\r\n $cellfont['size'] =& $this->createElement('text',\r\n 'size', 'size',\r\n array('size' => 2));\r\n $cellfont['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($cellfont, 'cellfont', 'Font:', ' ');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: save PHP/CSS code');\r\n\r\n $code[] =& $this->createElement('checkbox', 'P', null, 'PHP');\r\n $code[] =& $this->createElement('checkbox', 'C', null, 'CSS');\r\n $this->addGroup($code, 'phpcss', 'PHP and/or StyleSheet source code:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('next','apply'));\r\n }", "function buildSettingsForm() {}", "public function buildForm()\n {\n $this\n ->addMeasureList()\n ->addAscendingList()\n ->addTitles(['class' => 'indicator_title_title_narrative', 'narrative_true' => true])\n ->addDescriptions(['class' => 'indicator_description_title_narrative'])\n ->addCollection('reference', 'Activity\\Reference', 'reference', [], trans('elementForm.reference'))\n ->addAddMoreButton('add_reference', 'reference')\n ->addBaselines()\n ->addPeriods()\n ->addAddMoreButton('add_period', 'period')\n ->addRemoveThisButton('remove_indicator');\n }", "protected function build()\n {\n $stockalign = new GtkAlignment(0, 0, 0, 0);\n $stockalign->add(\n GtkImage::new_from_stock(\n Gtk::STOCK_DIALOG_ERROR, Gtk::ICON_SIZE_DIALOG\n )\n );\n $this->pack_start($stockalign, false, true);\n\n\n $this->expander = new GtkExpander('');\n\n $this->message = new GtkLabel();\n $this->expander->set_label_widget($this->message);\n $this->message->set_selectable(true);\n $this->message->set_line_wrap(true);\n\n $this->userinfo = new GtkLabel();\n $this->userinfo->set_selectable(true);\n $this->userinfo->set_line_wrap(true);\n //FIXME: add scrolled window\n $this->expander->add($this->userinfo);\n\n $this->pack_start($this->expander);\n }", "function build_basic_form()\r\n {\r\n $this->addElement('select', LanguagePack :: PROPERTY_BRANCH, Translation :: get('Branch'), LanguagePack :: get_branch_options());\r\n \r\n \t$this->addElement('file', 'file', Translation :: get('FileName'));\r\n $allowed_upload_types = array('zip');\r\n $this->addRule('file', Translation :: get('OnlyZIPAllowed'), 'filetype', $allowed_upload_types);\r\n $this->addRule('file', Translation :: get('ThisFieldIsRequired', null, Utilities :: COMMON_LIBRARIES), 'required');\r\n \r\n // Submit button\r\n //$this->addElement('submit', 'user_settings', 'OK');\r\n $buttons[] = $this->createElement('style_submit_button', 'submit', Translation :: get('Import', null, Utilities :: COMMON_LIBRARIES), array('class' => 'positive'));\r\n $buttons[] = $this->createElement('style_reset_button', 'reset', Translation :: get('Reset', null, Utilities :: COMMON_LIBRARIES), array('class' => 'normal empty'));\r\n \r\n $this->addGroup($buttons, 'buttons', null, '&nbsp;', false);\r\n }", "protected function buildForm()\n {\n $this->form = Yii::createObject(array_merge([\n 'scenario' => $this->scenario,\n 'parent_id' => $this->parent_id,\n 'parentTariff' => $this->parentTariff,\n 'tariff' => $this->tariff,\n ], $this->getFormOptions()));\n }", "function SLFramework_Progressbar($length=300, $height=20, $start=0, $insideText=\"\", $id=\"progressbar\") {\r\n\t\t\t$this->length = $length ; \r\n\t\t\t$this->insideText = $insideText ; \r\n\t\t\t$this->height = $height ; \r\n\t\t\t$this->start = $start ; \r\n\t\t\t$this->id = $id ; \r\n\t\t}", "public function buildForm()\n {\n }", "protected function Form_Create() {\n\t\t\t$this->txtValue1 = new QTextBox($this);\n\t\t\t\n\t\t\t$this->txtValue2 = new QTextBox($this);\n\t\t\t\n\t\t\t$this->lstOperation = new QListBox($this);\n\t\t\t$this->lstOperation->AddItem('+', 'add');\n\t\t\t$this->lstOperation->AddItem('-', 'subtract');\n\t\t\t$this->lstOperation->AddItem('*', 'multiply');\n\t\t\t$this->lstOperation->AddItem('/', 'divide');\n\t\t\t\n\t\t\t$this->btnCalculate = new QButton($this);\n\t\t\t$this->btnCalculate->Text = 'Calculate';\n\t\t\t$this->btnCalculate->AddAction(new QClickEvent(), new QServerAction('btnCalculate_Click'));\n\t\t\t\n\t\t\t$this->lblResult = new QLabel($this);\n\t\t\t$this->lblResult->HtmlEntities = false;\n\t\t}", "public function initConfigurationForm()\n\t{\n\t\tglobal $lng, $ilCtrl;\n\t\t\n\t\t$pl = $this->getPluginObject();\n\t\n\t\tinclude_once(\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$form = new ilPropertyFormGUI();\n\t\n\t\t// setting 1 (a checkbox)\n\t\t$cb = new ilCheckboxInputGUI($pl->txt(\"setting_1\"), \"setting_1\");\n\t\t$form->addItem($cb);\n\t\t\n\t\t// setting 2 (text)\n\t\t$ti = new ilTextInputGUI($pl->txt(\"setting_2\"), \"setting_2\");\n\t\t$ti->setRequired(true);\n\t\t$ti->setMaxLength(10);\n\t\t$ti->setSize(10);\n\t\t$form->addItem($ti);\n\t\n\t\t$form->addCommandButton(\"save\", $lng->txt(\"save\"));\n\t \n\t\t$form->setTitle($pl->txt(\"example_plugin_configuration\"));\n\t\t$form->setFormAction($ilCtrl->getFormAction($this));\n\t\t\n\t\treturn $form;\n\t}", "private function loadForm()\n {\n // init settings form\n $this->frm = new Form('settings');\n\n // add festival year\n $this->frm->addText('year', $this->get('fork.settings')->get($this->URL->getModule(), 'year'));\n\n // add fields for pagination\n $this->frm->addDropdown(\n 'overview_num_items',\n array_combine(range(1, 30), range(1, 30)),\n $this->get('fork.settings')->get($this->URL->getModule(), 'overview_num_items', 10)\n );\n $this->frm->addDropdown(\n 'recent_festival_list_num_items',\n array_combine(range(1, 30), range(1, 30)),\n $this->get('fork.settings')->get($this->URL->getModule(), 'recent_festival_list_num_items', 5)\n );\n\n // add functions fields\n $this->frm->addCheckbox('cover_image_enabled', $this->get('fork.settings')->get($this->URL->getModule(), 'cover_image_enabled', false));\n $this->frm->addCheckbox('cover_image_required', $this->get('fork.settings')->get($this->URL->getModule(), 'cover_image_required', false));\n $this->frm->addCheckbox('multi_images_enabled', $this->get('fork.settings')->get($this->URL->getModule(), 'multi_images_enabled', false));\n\n // add god user only fields\n if ($this->godUser) {\n $this->frm->addText('image_size_limit', (float) $this->get('fork.settings')->get($this->URL->getModule(), 'image_size_limit', 10));\n }\n }", "public function initClientOverviewForm()\n\t{\n\t\tglobal $lng, $ilCtrl;\n\n\t\t$settings = $this->setup->getClient()->getAllSettings();\n\n\t\tinclude_once(\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$this->form = new ilPropertyFormGUI();\n\n\t\t$this->form->setTitle($lng->txt(\"client_info\"));\n\n\t\t// installation name\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"inst_name\"), \"inst_name\");\n\t\t$ne->setValue(($this->setup->getClient()->getName())\n\t\t\t? $this->setup->getClient()->getName()\n\t\t\t: \"&lt;\".$this->lng->txt(\"no_client_name\").\"&gt;\");\n\t\t$ne->setInfo($this->setup->getClient()->getDescription());\n\t\t$this->form->addItem($ne);\n\n\t\t// client id\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"client_id\"), \"client_id\");\n\t\t$ne->setValue($this->setup->getClient()->getId());\n\t\t$this->form->addItem($ne);\n\n\t\t// nic id\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"ilias_nic_id\"), \"nic_id\");\n\t\t$ne->setValue(($this->setup->getClient()->db_installed)\n\t\t\t? $settings[\"inst_id\"]\n\t\t\t: $txt_no_database);\n\t\t$this->form->addItem($ne);\n\n\t\t// database version\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"db_version\"), \"db_vers\");\n\t\t$ne->setValue(($this->setup->getClient()->db_installed)\n\t\t\t? $settings[\"db_version\"]\n\t\t\t: $txt_no_database);\n\t\t$this->form->addItem($ne);\n\n\t\t// access status\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"access_status\"), \"status\");\n\t\t//$access_link = \"&nbsp;&nbsp;[<a href=\\\"setup.php?cmd=changeaccess&client_id=\".$this->setup->getClient()->getId().\"&back=view\\\">\".$this->lng->txt($access_button).\"</a>]\";\n\t\t$access_status = ($this->setup->getClient()->status[\"access\"][\"status\"]) ? \"online\" : \"disabled\";\n\t\t$ne->setValue($this->lng->txt($access_status).$access_link);\n\t\t$this->form->addItem($ne);\n\n\t\t// server information\n\t\t$sh = new ilFormSectionHeaderGUI();\n\t\t$sh->setTitle($this->lng->txt(\"server_info\"));\n\t\t$this->form->addItem($sh);\n\n\t\t// ilias version\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"ilias_version\"), \"il_vers\");\n\t\t$ne->setValue(ILIAS_VERSION);\n\t\t$this->form->addItem($ne);\n\n\t\t// host\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"host\"), \"host\");\n\t\t$ne->setValue($_SERVER[\"SERVER_NAME\"]);\n\t\t$this->form->addItem($ne);\n\n\t\t// ip address and port\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"ip_address\").\" & \".\n\t\t\t$lng->txt(\"port\"));\n\t\t$ne->setValue($_SERVER[\"SERVER_ADDR\"].\":\".$_SERVER[\"SERVER_PORT\"]);\n\t\t$this->form->addItem($ne);\n\n\t\t// server software\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"server_software\"), \"server_softw\");\n\t\t$ne->setValue($_SERVER[\"SERVER_SOFTWARE\"]);\n\t\t$this->form->addItem($ne);\n\n\t\t// http path\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"http_path\"), \"http_path\");\n\t\t$ne->setValue(ILIAS_HTTP_PATH);\n\t\t$this->form->addItem($ne);\n\n\t\t// absolute path\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"absolute_path\"), \"absolute_path\");\n\t\t$ne->setValue(ILIAS_ABSOLUTE_PATH);\n\t\t$this->form->addItem($ne);\n\n\t\t// third party tools\n\t\t$sh = new ilFormSectionHeaderGUI();\n\t\t$sh->setTitle($this->lng->txt(\"3rd_party_software\"));\n\t\t$this->form->addItem($sh);\n\n\t\t$tools = array(\"convert\", \"zip\", \"unzip\", \"ghostscript\", \"java\", \"htmldoc\", \"ffmpeg\");\n\n\t\tforeach ($tools as $tool)\n\t\t{\n\t\t\t// tool\n\t\t\t$ne = new ilNonEditableValueGUI($lng->txt($tool.\"_path\"), $tool.\"_path\");\n\t\t\t$p = $this->setup->ini->readVariable(\"tools\", $tool);\n\t\t\t$ne->setValue($p ? $p : $this->lng->txt(\"not_configured\"));\n\t\t\t$this->form->addItem($ne);\n\t\t}\n\n\t\t// latex\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"url_to_latex\"), \"latex_url\");\n\t\t$p = $this->setup->ini->readVariable(\"tools\", \"latex\"); // #13109\n\t\t$ne->setValue($p ? $p : $this->lng->txt(\"not_configured\"));\n\t\t$this->form->addItem($ne);\n\n\t\t// virus scanner\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"virus_scanner\"), \"vscan\");\n\t\t$ne->setValue($this->setup->ini->readVariable(\"tools\",\"vscantype\"));\n\t\t$this->form->addItem($ne);\n\n\t\t// scan command\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"scan_command\"), \"scan\");\n\t\t$p = $this->setup->ini->readVariable(\"tools\",\"scancommand\");\n\t\t$ne->setValue($p ? $p : $this->lng->txt(\"not_configured\"));\n\t\t$this->form->addItem($ne);\n\n\t\t// clean command\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"clean_command\"), \"clean\");\n\t\t$p = $this->setup->ini->readVariable(\"tools\",\"cleancommand\");\n\t\t$ne->setValue($p ? $p : $this->lng->txt(\"not_configured\"));\n\t\t$this->form->addItem($ne);\n\n\t\t$this->form->setFormAction(\"setup.php?cmd=gateway\");\n\t}", "function __construct()\n {\n parent::__construct();\n \n // creates the form\n $this->form = new TQuickForm('form_historicotrabalho');\n $this->form->class = 'tform'; // change CSS class\n \n $this->form->style = 'display: table;width:100%'; // change style\n \n // Define Título da página\n $this->form->setFormTitle('Banco de Horas - Lançamento de Escalas');\n // Inicía ferramentas auxiliares\n $fer = new TFerramentas(); // Ferramentas diversas\n $sicad = new TSicadDados(); // Ferramentas de acesso ao SICAD\n //Realiza definições iniciais de acesso\n $profile = TSession::getValue('profile'); //Profile da Conta do usuário\n if ($this->opm_operador==false) //Carrega OPM do usuário\n {\n //Confere se já foi carregado a OPM, senão carrega...ou se o ambiente for de desenvolvimento usa a OPM = 140\n $this->opm_operador = ($fer->is_dev()==true) ? 140 : $profile['unidade']['id'];\n }\n if (!$this->nivel_sistema || $this->config_load == false) //Carrega OPMs que tem acesso\n {\n $this->nivel_sistema = $fer->getnivel (get_class($this));//Verifica qual nível de acesso do usuário\n $this->listas = $sicad->get_OpmsRegiao($this->opm_operador);//Carregas as OPMs que o usuário administra\n $this->config = $fer->getConfig($this->sistema); //Busca o Nível de acesso que o usuário tem para a Classe\n $this->config_load = true; //Informa que configuração foi carregada\n }\n \n // Cria os Itens do Formulário\n $rgmilitar = new TEntry('rgmilitar');\n \n //Monta ComboBox com OPMs que o Operador pode ver\n //echo $this->nivel_sistema.'---'.$this->opm_operador;\n if ($this->nivel_sistema>=80) //Adm e Gestor\n {\n $criteria = null;\n }\n else if ($this->nivel_sistema>=50 ) //Nível Operador (carrega OPM e subOPMs)\n {\n $criteria = new TCriteria;\n //Se não há lista de OPM, carrega só a OPM do usuário\n $lista = ($this->listas['valores']!='') ? $this->listas['valores'] : $profile['unidade']['id'];\n $query = \"(SELECT DISTINCT id FROM g_geral.opm WHERE id IN (\".$lista.\"))\";\n $criteria->add (new TFilter ('id','IN',$query));\n }\n else if ($this->nivel_sistema<50) //nível de visitante (só a própria OPM)\n {\n $criteria = new TCriteria;\n $query = \"(SELECT DISTINCT id FROM g_geral.opm WHERE id IN (\".$this->opm_operador.\"))\";\n $criteria->add (new TFilter ('id','IN',$query));\n }\n $opm = new TDBCombo('opm','sicad','OPM','id','nome','nome',$criteria);\n \n $ativo = new TCombo('ativo');\n $lista_opm = new TSelect('lista_opm');\n $lista_slc = new TSelect('lista_slc');\n //Critério para os Turnos de Serviço (Deve-se excluir os ocultos e o item id=13)\n $criteria = new TCriteria; \n $criteria->add(new TFilter('oculto', '=', 'f'));\n $criteria->add(new TFilter('id', '!=', 13));\n $turno = new TDBCombo('turno','sicad','turnos','id','nome','nome',$criteria);\n \n $datainicial = new TDate('dataInicial');\n $datafinal = new TDate('dataFinal');\n $horaIncialOrdinario = new TEntry('horaInicialOrdinario');\n $opm_id_info = new TDBCombo('opm_id_info','sicad','OPM','id','sigla','sigla');\n $opm_info_atual = new TCombo('OPM_info_Atual');\n $diasExtra = new TEntry('diasExtra');\n $mesExtra = new TCombo('mesExtra');\n $anoExtra = new TCombo('anoExtra');\n $horaInicioExtra = new TEntry('horaInicioExtra');\n $horasTrabalhadas = new TEntry('horasTrabalhadas');\n $tipoExtra = new TCombo('tipoExtra');\n $afasta_id = new TDBCombo('afasta_id','sicad','afastamentos','id','nome','nome');\n $dtinicioaf = new TDate('dtinicioaf');\n $dtfimaf = new TDate('dtfimaf');\n $bgaf = new TEntry('bgaf');\n $anobgaf = new TEntry('anobgaf');\n \n //Formatar Itens\n $rgmilitar->setSize(80);\n $opm->setSize(300);\n $lista_opm->setSize(280,256);\n $lista_slc->setSize(280,256);\n $turno->setSize(200);\n $datainicial->setSize(80);\n $datafinal->setSize(80);\n $horaIncialOrdinario->setSize(50);\n $opm_id_info->setSize(150);\n $opm_info_atual->setSize(80);\n $diasExtra->setSize(200);\n $mesExtra->setSize(80);\n $anoExtra->setSize(80);\n $horaInicioExtra->setSize(50);\n $horasTrabalhadas->setSize(50);\n $tipoExtra->setSize(120);\n $afasta_id->setSize(150);\n $dtinicioaf->setSize(80);\n $dtfimaf->setSize(80);\n $bgaf->setSize(80);\n $anobgaf->setSize(80);\n $ativo->setSize(80);\n //Style\n $lista_opm->style = \"font-size: 12px;\";\n $lista_slc->style = \"font-size: 12px;\";\n\n //Mascaras\n $datainicial->setMask('dd-mm-yyyy');\n $datafinal->setMask('dd-mm-yyyy');\n $dtinicioaf->setMask('dd-mm-yyyy');\n $dtfimaf->setMask('dd-mm-yyyy');\n $horaIncialOrdinario->setMask('99:99');\n $horaInicioExtra->setMask('99:99');\n $horasTrabalhadas->setMask('99');\n\n //Dados\n $opm_info_atual->addItems($fer->lista_sim_nao());//($item);\n $opm_info_atual->setValue('N');\n $ativo->addItems($fer->lista_sim_nao());//($item);\n $ativo->setValue('N');\n //\n $item = array (\"S\"=>\"Remunerada\",\"N\"=>\"Administrativa\");\n $tipoExtra->addItems($item);\n $tipoExtra->setValue('N');\n //\n $fer = new TFerramentas;\n $mesExtra->addItems($fer->lista_meses());\n $anoExtra->addItems($fer->lista_anos());\n //Tips\n $rgmilitar->setTip('Preencha com o RG do Militar pretendido...');\n $opm->setTip('Selecione a OPM para que possa preencher o campo de Lista da OPM com os componentes da Unidade.');\n $lista_opm->setTip('Lista dos Militares pertencente à Unidade Selecionada acima.<br>'.\n 'Vale lembrar que esta lista é atualizada diáriamente, assim os que estão aqui reflete as listas do SICAD.<br>' .\n 'Outro ponto a se considerar é a possibilidade de selecionar vários PMs, para isso basta usar<br>'.\n 'as teclas Control (ctrl) ou shift (seta pra cima);');\n $lista_slc->setTip('Militares Selecionados. Todos que estão nesta lista serão afetados, quer por uma escala ou por afastamentos...');\n $turno->setTip('Selecione uma Escala conforme a necessidade.');\n $datainicial->setTip('Selecione a data inicial da Escala Ordinária.');\n $datafinal->setTip('Selecione a data final da Escala Ordinária');\n $horaIncialOrdinario->setTip('Informe a hora de inicio do primeiro turno da Escala Ordinária.');\n $opm_id_info->setTip('Selecione qual foi a OPM informante da Escala.<br>É útil quando o militar está prestando serviços em uma OPM diferente da sua.');\n $opm_info_atual->setTip('A unidade Informante é a Unidade Atual? Se SIM, irei substituir a unidade que por ventura está na ficha do militar pela que foi informada...');\n $diasExtra->setTip('Defina os dias que o militar trabalhou podendo ser:<br> - Um dia apenas (Ex: 1);<br>- Alguns dias separados por vírgula(Ex: 2,5,8);<br>- Um intervalo de dias ligados por traço (Ex: 2-10);<br>- Um misto de combinações (Ex: 1,3-5,8,15-25). ');\n $mesExtra->setTip('Mês que ocorreu o serviço extra.');\n $anoExtra->setTip('Ano que ocorreu o serviço extra.');\n $horaInicioExtra->setTip('Hora que o serviço extra iniciou.');\n $horasTrabalhadas->setTip('Quantas horas foram trabalhadas neste serviço extra.');\n $tipoExtra->setTip('Defina se a escala foi Administrativa (sem remuneração AC-4) ou Remunerada (com pagamento de AC-4).');\n $afasta_id->setTip('Qual tipo de afastamento o militar fez jus.');\n $dtinicioaf->setTip('Data inicial do afastamento.');\n $dtfimaf->setTip('Data final do afastamento.');\n $bgaf->setTip('Numero do BG onde foi publicado o afastamento(Opcional).');\n $anobgaf->setTip('Ano de publicação do BG de Afastamento (Opcional).');\n $ativo->setTip('Se desejar que os militares inativos façam parte da seleção, marque como SIM para seleciona-los.'.\n '<br>Caso troque esta opção, não haverá a limpeza dos já selecionados.');\n //Ações\n //$change_action = new TAction(array($this, 'onSelectOpm_old'));//Ação de Popular lista de PMs\n //$opm->setChangeAction($change_action);\n //$ativo->setChangeAction($change_action);\n \n //Controle de Nível\n if ($this->nivel_sistema<$this->config[$this->cfg_chg_opm])\n {\n $opm_id_info->setEditable(FALSE);\n $opm_info_atual->setEditable(FALSE);\n }\n //Botões\n //Seleciona PMs\n $addPM = new TButton('addPM');\n $addPM->setImage('fa:arrow-down black');\n $addPM->class = 'btn btn-primary btn-sm';\n $Action = new TAction(array($this, 'onSelectMilitar'));\n $addPM->setAction($Action);\n $addPM->setLabel('Seleciona');\n \n //Botão Gera Escala Ordinária\n $runOrd = new TButton('runOrd');\n $runOrd->setImage('fa:floppy-o red');\n $runOrd->class = 'btn btn-primary btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_ord]) ? new TAction(array($this, 'onGeraOrdinaria')) : new TAction(array($this, 'NoAcess'));\n $runOrd->setAction($Action);\n $runOrd->setLabel('Gera Escala');\n \n //Botão Gera Escala Extra\n $runExt = new TButton('runExt');\n $runExt->setImage('fa:floppy-o red');\n $runExt->class = 'btn btn-primary btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_ext]) ? new TAction(array($this, 'onGeraExtra')) : new TAction(array($this, 'NoAcess'));\n $runExt->setAction($Action);\n $runExt->setLabel('Gera Escala');\n \n //Botão Gera Afastamento\n $runAfa = new TButton('runAfa');\n $runAfa->setImage('fa:floppy-o red');\n $runAfa->class = 'btn btn-primary btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_afa]) ? new TAction(array($this, 'onGeraAfastamento')) : new TAction(array($this, 'NoAcess'));\n $runAfa->setAction($Action);\n $runAfa->setLabel('Gera Afastamento');\n \n //Botão Limpa Afastamento\n $runCls = new TButton('runCls');\n $runCls->setImage('fa:trash black');\n $runCls->class = 'btn btn-danger btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_cls_afa]) ? new TAction(array($this, 'onLimpaAfastamento')) : new TAction(array($this, 'NoAcess'));\n $runCls->setAction($Action);\n $runCls->setLabel('Limpa Afastamento');\n \n //Botão Verifica Escala\n $runVer = new TButton('runVer');\n $runVer->setImage('fa:eye black');\n $runVer->class = 'btn btn-info btn-sm';\n $Action = new TAction(array($this, 'onListaEscala'));\n $runVer->setAction($Action);\n $runVer->setLabel('Ver Escala');\n \n //Botão limpa Escalas\n $runLmp = new TButton('runLmp');\n $runLmp->setImage('fa:trash black');\n $runLmp->class = 'btn btn-danger btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_cls_esc]) ? new TAction(array($this, 'onLimpaEscala')) : new TAction(array($this, 'NoAcess'));\n $runLmp->setAction($Action);\n $runLmp->setLabel('Limpa Escala');\n \n //Botão Carrega OPM na Lista da OPM\n $runOpm = new TButton('runOpm');\n $runOpm->setImage('fa:retweet');\n $runOpm->class = 'btn btn-success btn-sm';\n $Action = new TAction(array($this, 'onSelectOpm_old'));\n $runOpm->setAction($Action);\n $runOpm->setLabel('Carrega OPM');\n \n $table = new TTable();\n $table-> border = '0';\n $table-> cellpadding = '4';\n $table-> style = 'border-collapse:collapse; text-align: center;';\n\n //Monta selecionador\n $hbox1 = new THBox;\n $hbox1->addRowSet( new TLabel('RG:'),$rgmilitar,$addPM,new TLabel('Unidade:'),$opm,new TLabel('Seleciona Inativos?'),$ativo,$runOpm);\n $frame1 = new TFrame;\n $frame1->setLegend('Selecione os PMs ou a OPM');\n $frame1->add($hbox1);\n //Monta Labels das tabelas de distribuição\n $title4 = new TLabel('Listagem da OPM');\n $title4->setFontSize(12);\n $title4->setFontFace('Arial');\n $title4->setFontColor('black');\n $title4->setFontStyle('b');\n \n $title3 = new TLabel('Comandos');\n $title3->setFontSize(12);\n $title3->setFontFace('Arial');\n $title3->setFontColor('black');\n $title3->setFontStyle('b');\n \n $title2 = new TLabel('PMs Selecionados');\n $title2->setFontSize(12);\n $title2->setFontFace('Arial');\n $title2->setFontColor('black');\n $title2->setFontStyle('b');\n \n $title1 = new TLabel('Gestão da Escala');\n $title1->setFontSize(12);\n $title1->setFontFace('Arial');\n $title1->setFontColor('black');\n $title1->setFontStyle('b');\n \n //Botões de Serviço\n $add = new TButton('add_opm');\n $del = new TButton('del_opm');\n $cls = new TButton('clear');\n $ret = new TButton('return');\n \n //Tabelas Auxiliares de Cadastro\n $table_ord = new TTable;//Escalas Ordinárias\n $table_ext = new TTable;//Escalas Extras\n $table_afa = new TTable;//Afastamentos\n\n //Cria no Notebook \n $notebook = new TNotebook(200, 220);\n // Crias as Abas no notebook\n $notebook->appendPage('Ordinária' , $table_ord);\n $notebook->appendPage('Extra' , $table_ext);\n $notebook->appendPage('Afastamento', $table_afa);\n\n //Itens: Escala Ordinária\n $table_ord->addRowSet(array(new TLabel('Escala'),$turno));\n $table_ord->addRowSet(array(new TLabel('De'),$datainicial,new TLabel('A'),$datafinal));\n $table_ord->addRowSet(array(new TLabel('Hora Inicial'),$horaIncialOrdinario));\n $table_ord->addRowSet(array(new TLabel('OPM Informante'),$opm_id_info));\n $table_ord->addRowSet(array(new TLabel('Usar Informante com Atual'),$opm_info_atual));\n $table_ord->addRowSet(array($runLmp,$runOrd));\n //Itens: Escala Extra\n $table_ext->addRowSet(array(new TLabel('Dias'),$diasExtra));\n $table_ext->addRowSet(array(new TLabel('Mês'),$mesExtra,new TLabel('Ano'),$anoExtra));\n $table_ext->addRowSet(array(new TLabel('Hr Início'),$horaInicioExtra,new TLabel('Hrs. Trab.'),$horasTrabalhadas));\n $table_ext->addRowSet(array(new TLabel('Tipo Escala'),$tipoExtra));\n $table_ext->addRowSet($runExt);\n //Itens: Afastamento\n $table_afa->addRowSet(array(new TLabel('Afastamento'),$afasta_id));\n $table_afa->addRowSet(array(new TLabel('De'),$dtinicioaf,new TLabel('A'),$dtfimaf));\n $table_afa->addRowSet(array(new TLabel('BG'),$bgaf,new TLabel('/'),$anobgaf));\n $table_afa->addRowSet(array($runCls,$runAfa));\n\n //Ações\n $add->setAction(new TAction(array($this, 'onAddPMSelect')));\n $del->setAction(new TAction(array($this, 'onDelPMSelect')));\n $cls->setAction(new TAction(array($this, 'onClearSelect')));\n $ret->setAction(new TAction(array($this, 'onReturn')));\n //Labels\n $add->setLabel('Adiciona');\n $del->setLabel('Remove');\n $cls->setLabel('Limpa');\n $ret->setLabel('Volta ao Gerenciador');\n //Icones\n $add->setImage('fa:plus green');\n $del->setImage('fa:minus red');\n $cls->setImage('fa:file-o black');\n $ret->setImage('fa:backward black');\n //Classes\n $ret->class = 'btn btn-warning';\n //PopUps\n if ($this->popAtivo)\n {\n $addPM->popover = 'true';\n $addPM->popside = 'top';\n $addPM->poptitle = 'Seleciona Militar';\n $addPM->popcontent = 'Clique aqui ou tecle ENTER para selecionar o militar.';\n //\n $add->popover = 'true';\n $add->popside = 'top';\n $add->poptitle = 'Adiciona Seleção de Militares';\n $add->popcontent = 'Adiciona o(s) Militar(es) selecionado(s) da caixa Lista da OPM.';\n //\n $del->popover = 'true';\n $del->popside = 'top';\n $del->poptitle = 'Remove Seleção de Militares';\n $del->popcontent = 'Remove o(s) Militar(es) selecionado(s) da caixa Selecionados.';\n //\n $cls->popover = 'true';\n $cls->popside = 'top';\n $cls->poptitle = 'Limpa toda Seleção de Militares';\n $cls->popcontent = 'Remove TODOS os Militares selecionados da caixa Selecionados.';\n //\n $ret->popover = 'true';\n $ret->popside = 'top';\n $ret->poptitle = 'Retorno à Tela de Gerenciamento';\n $ret->popcontent = 'Retorna para a Tela de Gerenciamento do Banco de Horas.<br>A lista e Militares já selecionados permanecerá até o fechamento do sistema.';\n //\n $runOrd->popover = 'true';\n $runOrd->popside = 'top';\n $runOrd->poptitle = 'Gera Escala Ordinária.';\n $runOrd->popcontent = 'São campos necessários:<br>- Turno;<br>- Data inicial e final;<br>- Hora de Início da Escala.';//.\n //\n $runExt->popover = 'true';\n $runExt->popside = 'top';\n $runExt->poptitle = 'Gera Escala Extra';\n $runExt->popcontent = 'São Campos necessários:<br>- Dias (preencher com um ou mais);<br>- Mês e Ano;<br>- Hora Início;<br>'.\n '- Horas Trabalhadas;<br>- Tipo Escala.';\n //\n $runCls->popover = 'true';\n $runCls->popside = 'top';\n $runCls->poptitle = 'Limpa Afastamentos e Restrições (apenas)';\n $runCls->popcontent = 'Use os campos acima como filtro.';\n //\n $runAfa->popover = 'true';\n $runAfa->popside = 'top';\n $runAfa->poptitle = 'Gera Afastamentos e Restrições';\n $runAfa->popcontent = 'São Campos necessários:<br>- Afastamento;<br>- O intervalo de datas.';\n //\n $runVer->popover = 'true';\n $runVer->popside = 'top';\n $runVer->poptitle = 'Verifica a Escala';\n $runVer->popcontent = 'É necessário escolher um militar (um apenas) quer no Campo Lista da OPM quer no Campo Selecionados.';\n //\n $runLmp->popover = 'true';\n $runLmp->popside = 'top';\n $runLmp->poptitle = 'Limpa as Escalas e Afastamentos';\n $runLmp->popcontent = 'Limpa Escalas (ordinária e Extra) e Afastamentos dos militares Selecionados e no intervalo de datas';\n \n $runOpm->popover = 'true';\n $runOpm->popside = 'top';\n $runOpm->poptitle = 'Carrega os militares da Unidade';\n $runOpm->popcontent = 'Carrega os Militares da unidade escolhida filtrando os ativos e inativos conforme se escolhe Sim ou Não no campo Seleciona inativos:';\n }\n //Tabela com Comandos\n $frame_tempo = new TFrame();\n $hboxc = new THBox;\n $hboxc->addRowSet($add);\n $hboxc->addRowSet($del);\n $hboxc->addRowSet($cls);\n $hboxc->addRowSet($runVer);\n $hboxc->addRowSet($ret);\n\n $frame1->add($hboxc);\n $frame1->style = \"width: 100%; display: table-cell; vertical-align: top; text-align: center;\";\n\n //Frame com Lista da OPM\n $vbox2 = new TVBox;\n $frame4 = new TFrame(260,330);\n $frame4->setLegend('Lista de Militares da OPM');\n $frame4->add($lista_opm);\n $frame4->style = \"width: 280px; display: table-cell; vertical-align: top;\";\n $vbox2->add($frame4);\n //Frame de Seleção\n $vbox4 = new TVBox;\n $frame6 = new TFrame(260,330);\n $frame6->setLegend('Militares Selecionados');\n $frame6->add($lista_slc);\n $frame6->style = \"width: 280px; display: table-cell; vertical-align: top;\";\n $vbox4->add($frame6);\n //Frame de Geração\n $vbox5 = new TVBox;\n $frame3 = new TFrame(280,330);\n $frame3->setLegend('Funções de Geração');\n $frame3->add($notebook);\n $frame3->style = \"width: 280px; display: table-cell; vertical-align: top;\";\n $vbox5->add($frame3);\n \n $frame2 = new TFrame;\n $frame2->style = \"width: 100%; display: table-cell; vertical-align: top;\";\n $frame2->add($vbox2);\n $frame2->add($vbox4);\n $frame2->add($vbox5);\n\n $this->form->setFields(array($rgmilitar,$opm,$addPM,$lista_opm,$lista_slc,$opm_info_atual,$opm_id_info,$turno,\n $datafinal,$datainicial,$dtinicioaf,$dtfimaf,$horaIncialOrdinario,$horaInicioExtra,$horasTrabalhadas,\n $diasExtra,$mesExtra,$anoExtra,$bgaf,$anobgaf,$tipoExtra,$afasta_id,$ativo,\n $add,$del,$cls,$ret,$runOrd,$runExt,$runAfa,$runCls,$runVer,$runLmp,$runOpm)); \n // vertical box container\n $container = new TVBox;\n $container->style = 'width: 90%';\n $container->add(new TXMLBreadCrumb('menu.xml', 'bdhManagerForm'));\n $container->add($frame1);\n //$container->add($frame_tempo);\n $container->add($frame2);\n $this->form->add($container);\n\n //parent::add($container);\n parent::add($this->form);\n if ($opm->getValue())\n {\n self::onSelectOpm_old(array('opm'=>$opm->getValue(),'ativo'=>$ativo->getValue()));\n }\n $lista_slc = TSession::getValue(__CLASS__.'_lista_slc');\n self::onLoadPMSelect();\n self::popula_escalas();\n\n }", "protected function initializeForm()\n {\n $this->form = new Form();\n $this->form->add(Element::create(\"FieldSet\",\"Report Format\")->add\n (\n Element::create(\"SelectionList\", \"File Format\", \"report_format\")\n ->addOption(\"Hypertext Markup Language (HTML)\",\"html\")\n ->addOption(\"Portable Document Format (PDF)\",\"pdf\")\n ->addOption(\"Microsoft Excel (XLS)\",\"xls\")\n ->addOption(\"Microsoft Word (DOC)\",\"doc\")\n ->setRequired(true)\n ->setValue(\"pdf\"),\n Element::create(\"SelectionList\", \"Page Orientation\", \"page_orientation\")\n ->addOption(\"Landscape\", \"L\")\n ->addOption(\"Portrait\", \"P\")\n ->setValue(\"L\"),\n Element::create(\"SelectionList\", \"Paper Size\", \"paper_size\")\n ->addOption(\"A4\", \"A4\")\n ->addOption(\"A3\", \"A3\")\n ->setValue(\"A4\")\n )->setId(\"report_formats\")->addAttribute(\"style\",\"width:50%\")\n );\n $this->form->setSubmitValue(\"Generate\");\n $this->form->addAttribute(\"action\",Application::getLink($this->path.\"/generate\"));\n $this->form->addAttribute(\"target\",\"blank\");\n }", "protected function form()\n {\n $form = new Form(new Direction());\n\n $form->text('name', __(trans('hhx.name')));\n $form->text('intro', __(trans('hhx.intro')));\n $form->image('Img', __(trans('hhx.img')))->move('daily/direction')->uniqueName();\n $form->select('status', __(trans('hhx.status')))->options(config('hhx.status'));;\n $form->number('order_num', __(trans('hhx.order_num')));\n $form->hidden('all_num', __(trans('hhx.all_num')))->default(0.00);\n $form->decimal('stock', __(trans('hhx.stock')));\n\n return $form;\n }", "function show_form()\n\t\t{\n\t\t\t//set a global template for interactive activities\n\t\t\t$this->t->set_file('run_activity','run_activity.tpl');\n\t\t\t\n\t\t\t//set the css style files links\n\t\t\t$this->t->set_var(array(\n\t\t\t\t'run_activity_css_link'\t=> $this->get_css_link('run_activity', $this->print_mode),\n\t\t\t\t'run_activity_print_css_link'\t=> $this->get_css_link('run_activity', true),\n\t\t\t));\n\t\t\t\n\t\t\t\n\t\t\t// draw the activity's title zone\n\t\t\t$this->parse_title($this->activity_name);\n\n\t\t\t//draw the instance_name input or label\n\t\t\t// init wf_name to the requested one or the stored name\n\t\t\t// the requested one handle the looping in activity form\n\n\t\t\t$wf_name = get_var('wf_name','post',$this->instance->getName());\n\t\t\t$this->parse_instance_name($wf_name);\n\n\t\t\t//draw the instance_name input or label\n\t\t\t// init wf_set_owner to the requested one or the stored owner\n\t\t\t// the requested one handle the looping in activity form\n\t\t\t$wf_set_owner = get_var('wf_set_owner','post',$this->instance->getOwner());\n\t\t\t$this->parse_instance_owner($wf_set_owner);\n\t\t\t\n\t\t\t// draw the activity central user form\n\t\t\t$this->t->set_var(array('activity_template' => $this->wf_template->parse('output', 'template')));\n\t\t\t\n\t\t\t//draw the select priority box\n\t\t\t// init priority to the requested one or the stored priority\n\t\t\t// the requested one handle the looping in activity form\n\t\t\t$priority = get_var('wf_priority','post',$this->instance->getPriority());\n\t\t\t$this->parse_priority($priority);\n\t\t\t\n\t\t\t//draw the select next_user box\n\t\t\t// init next_user to the requested one or the stored one\n\t\t\t// the requested one handle the looping in activity form\n\t\t\t$next_user = get_var('wf_next_user','POST',$this->instance->getNextUser());\n\t\t\t$this->parse_next_user($next_user);\n\t\t\t\n\t\t\t//draw print_mode buttons\n\t\t\t$this->parse_print_mode_buttons();\n\t\t\t\n\t\t\t//draw the activity submit buttons\t\n\t\t\t$this->parse_submit();\n\t\t\t\n\t\t\t//draw the info zone\n\t\t\t$this->parse_info_zone();\n\t\t\t\n\t\t\t//draw the history zone if user wanted it\n\t\t\t$this->parse_history_zone();\n\t\t\t\n\t\t\t$this->translate_template('run_activity');\n\t\t\t$this->t->pparse('output', 'run_activity');\n\t\t\t$GLOBALS['egw']->common->egw_footer();\n\t\t}", "public function buildForm(array $form, FormStateInterface $form_state) {\n $form['time_duration'] = [\n '#type' => 'number',\n '#title' => $this->t('Time duration'),\n '#min' => 100,\n '#step' => 100,\n '#description' => $this->t(\n \"Time in seconds from the user's last login. Used as an event to \n update the relationships between the user and companies.\"\n ),\n '#default_value' => $this->config('pmmi_sso.company.settings')->get('time_duration'),\n '#required' => TRUE,\n ];\n $form['submit'] = [\n '#type' => 'submit',\n '#value' => $this->t('Save'),\n ];\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Activity());\n\n $form->text('name', __('Name'));\n $form->image('image', __('Image'));\n $form->text('intro', __('Intro'));\n $form->UEditor('details', __('Details'));\n $form->datetime('start_at', __('Start at'))->default(date('Y-m-d H:i:s'));\n $form->datetime('end_at', __('End at'))->default(date('Y-m-d H:i:s'));\n $form->text('location', __('Location'));\n $form->decimal('fee', __('Fee'))->default(0.00);\n $form->number('involves', __('Involves'));\n $form->number('involves_min', __('Involves min'));\n $form->number('involves_max', __('Involves max'));\n $form->switch('status', __('Status'));\n $form->text('organizers', __('Organizers'));\n $form->number('views', __('Views'));\n $form->switch('is_stick', __('Is stick'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Resources);\n\n $form->text('name', '名称')->rules('required',['required' => '请输入 配置项的名称']);\n\n $form->radio('type', '类型')->options(Resources::TYPE);\n\n $form->cropper('url','图片');\n\n $form->number('sort_num','排序');\n\n $form->textarea('memo','备注');\n\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`删除`按钮\n $tools->disableDelete();\n\n // 去掉`查看`按钮\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n\n return $form;\n }", "protected function buildForm()\n\t{\t\n\t\t$mid = $this->Form->newInput( 'hidden' );\n\t\t$mid->set( 'name', 'mid' );\n\t\t$mid->set( 'id', 'mid' );\n\t\t$mid->set( 'value', $this->data['id'] );\n\t\t\n\t\t$submit = $this->Form->newInput( 'submit' );\n\t\t$submit->set( 'name', 'submit' );\n\t\t$submit->set( 'id', 'submit' );\n\t\t$submit->set( 'value', 'Restore' );\n\t}", "function buildForm(){\n\t\t# menampilkan form\n\t}", "protected function form()\n {\n $form = new Form(new UserHealth());\n\n $form->number('height', __('Height'));\n $form->number('weight', __('Weight'));\n $form->text('blood_pressure', __('Blood pressure'));\n $form->text('sugar_level', __('Sugar level'));\n $form->text('blood_type', __('Blood type'));\n $form->decimal('muscle_mass', __('Muscle mass'))->default(0);\n $form->text('metabolism', __('Metabolism'));\n $form->textarea('genetic_history', __('Genetic history'));\n $form->textarea('illness_history', __('Illness history'));\n $form->textarea('allergies', __('Allergies'));\n $form->textarea('prescription', __('Prescription'));\n $form->textarea('operations', __('Operations'));\n $form->number('user_id', __('User id'));\n\n return $form;\n }", "private function build_form()\n {\n $ldm = LaikaDataManager :: get_instance();\n\n // The Laika Scales\n $scales = $ldm->retrieve_laika_scales(null, null, null, new ObjectTableOrder(LaikaScale :: PROPERTY_TITLE));\n $scale_options = array();\n while ($scale = $scales->next_result())\n {\n $scale_options[$scale->get_id()] = $scale->get_title();\n }\n\n // The Laika Percentile Codes\n $codes = $ldm->retrieve_percentile_codes();\n $code_options = array();\n foreach ($codes as $code)\n {\n $code_options[$code] = $code;\n }\n\n $this->addElement('category', Translation :: get('Dates'));\n $this->add_timewindow(self :: GRAPH_FILTER_START_DATE, self :: GRAPH_FILTER_END_DATE, Translation :: get('StartTimeWindow'), Translation :: get('EndTimeWindow'), false);\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Groups', null, 'group'));\n\n $group_options = $this->get_groups();\n\n if (count($group_options) > 0)\n {\n if (count($group_options) < 10)\n {\n $count = count($group_options);\n }\n else\n {\n $count = 10;\n }\n\n $this->addElement('select', self :: GRAPH_FILTER_GROUP, Translation :: get('Group', null, Utilities::GROUP), $this->get_groups(), array('multiple', 'size' => $count));\n $this->addRule(self :: GRAPH_FILTER_GROUP, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n }\n else\n {\n $this->addElement('static', 'group_text', Translation :: get('Group'), Translation :: get('NoGroupsAvailable'));\n $this->addElement('hidden', self :: GRAPH_FILTER_GROUP, null);\n }\n\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Results'));\n $this->addElement('select', self :: GRAPH_FILTER_SCALE, Translation :: get('Scale'), $scale_options, array('multiple', 'size' => '10'));\n $this->addRule(self :: GRAPH_FILTER_SCALE, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n $this->addElement('select', self :: GRAPH_FILTER_CODE, Translation :: get('Code'), $code_options, array('multiple', 'size' => '4'));\n $this->addRule(self :: GRAPH_FILTER_CODE, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Options'));\n\n $group = array();\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderGraphAndTable'), LaikaGraphRenderer :: RENDER_GRAPH_AND_TABLE);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderGraph'), LaikaGraphRenderer :: RENDER_GRAPH);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderTable'), LaikaGraphRenderer :: RENDER_TABLE);\n $this->addGroup($group, self :: GRAPH_FILTER_TYPE, Translation :: get('RenderType'), '<br/>', false);\n\n $allow_save = PlatformSetting :: get('allow_save', LaikaManager :: APPLICATION_NAME);\n if ($allow_save == true)\n {\n $this->addElement('checkbox', self :: GRAPH_FILTER_SAVE, Translation :: get('SaveToRepository'));\n }\n\n $maximum_attempts = PlatformSetting :: get('maximum_attempts', LaikaManager :: APPLICATION_NAME);\n if ($maximum_attempts > 1)\n {\n $group = array();\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('OnlyIncludeFirstAttempt'), LaikaGraphRenderer :: RENDER_ATTEMPT_FIRST);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('OnlyIncludeMostRecentAttempt'), LaikaGraphRenderer :: RENDER_ATTEMPT_LAST);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('IncludeAllAttempts'), LaikaGraphRenderer :: RENDER_ATTEMPT_ALL);\n $this->addGroup($group, self :: GRAPH_FILTER_ATTEMPT, Translation :: get('AttemptsToInclude'), '<br/>', false);\n }\n else\n {\n $this->addElement('hidden', self :: GRAPH_FILTER_ATTEMPT, LaikaGraphRenderer :: RENDER_ATTEMPT_ALL);\n }\n\n $this->addElement('category');\n\n $buttons = array();\n\n $buttons[] = $this->createElement('style_submit_button', 'submit', Translation :: get('Filter', null, Utilities::COMMON_LIBRARIES), array('class' => 'normal search'));\n $buttons[] = $this->createElement('style_reset_button', 'reset', Translation :: get('Reset', null, Utilities::COMMON_LIBRARIES), array('class' => 'normal empty'));\n\n $this->addGroup($buttons, 'buttons', null, '&nbsp;', false);\n }", "protected function createComponentProjectForm(): Form {\n $form = new Form; \n\n //Get all available project types for select field\n $types = $this->database->table('types');\n $types_arr = array();\n foreach($types as $type) {\n $types_arr[$type->id] = $type->title;\n }\n\n $form->addText('title', \"Project Title:\")\n ->setRequired()\n ->addRule($form::MAX_LENGTH, 'The Project title need to be less than %d character long', 60);\n\n $form->addSelect(\"type_id\", \"Project Type\", $types_arr)\n ->setRequired();\n\n $form->addText('start_date', \"Start Date\")\n ->setHtmlType('date')\n ->setRequired();\n\n $form->addText('end_date', \"End Date\")\n ->setHtmlType('date')\n ->setRequired();\n\n $form->addSubmit('send', \"Publish Project\");\n\n $form->onSuccess[] = [$this, 'projectFormSucceeded'];\n\n return $form;\n }", "function createForm(){\n\t\t$this->createFormBase();\n\t\t$this->addElement('reset','reset','Reset');\t\t\t\n\t\t$tab['seeker_0'] = '0';\n\t\t$this->setDefaults($tab);\n\t\t$this->addElement('submit','bouton_add_pi','Add a contact',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_contact'\"));\n\t\t$this->createVaFormResolution();\n\t\t$this->createFormGeoCoverage();\n\t\t$this->createFormGrid();\t\n\t\t//Required format\n\t\t$dformat = new data_format;\n\t\t$dformat_select = $dformat->chargeFormDestFormat($this,'required_data_format','Required data format','NetCDF');\n\t\t$this->addElement($dformat_select);\n\t\t$this->getElement('organism_0')->setLabel(\"Organism short name\");\n\t\t$this->getElement('project_0')->setLabel(\"Useful in the framework of\");\n\t\t$this->getElement('dats_abstract')->setLabel(\"Abstract \");\n\t\t$this->getElement('dats_purpose')->setLabel(\"Purpose\");\n\t\t$this->getElement('database')->setLabel(\"Data center\");\n\t\t$this->getElement('new_db_url')->setLabel(\"Data center url\");\n\t\t$this->getElement('dats_use_constraints')->setLabel(\"Access and use constraints\");\t\t\t\n\t\t$this->getElement('sensor_resol_tmp')->setLabel('Temporal (hh:mm:ss)');\t\t\t\n\t\t$this->getElement('place_alt_min_0')->setLabel(\"Altitude min\");\n\t\t$this->getElement('place_alt_max_0')->setLabel(\"Altitude max\");\n\t\t$this->getElement('data_format_0')->setLabel(\"Original data format\");\n\t\t$this->addElement('file','upload_doc','Attached document');\n\t\t$this->addElement('submit','upload','Upload');\n\t\t$this->addElement('submit','delete','Delete');\n\t\t\n\t\tfor ($i = 0; $i < $this->dataset->nbVars; $i++){\n\t\t\t$this->getElement('methode_acq_'.$i)->setLabel(\"Parameter processing related information\");\n\t\t}\n\t\t$this->addElement('submit','bouton_add_variable','Add a parameter',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_param'\"));\n\t\t\n\t\t$this->addElement('submit','bouton_add_projet','Add a project',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_general'\"));\n\t\t$option = array();\n\t\t$option['default'] = \"\";\n\t\t$option['model'] = \"Model\";\n\t\t$option['instrument'] = \"Instrument\";\n\t\t$option['satellite'] = \"Satellite\";\n\t\t$this->addElement('select','source_type','source type :',$option,array('onchange' => \"DeactivateButtonAddSource()\",'onclick' => \"DeactivateButtonAddSource();\",'onmouseover' => 'DeactivateButtonAddSource();' ));\n\t\t$this->addElement('submit','bouton_add_source','Add a source',array('disabled' => 'true','onclick' => \"document.getElementById('frmvadataset').action += '#a_source'\",'onmouseout' => 'DeactivateButtonAddSource();'));\n\t\t\n\t\tif (isset ( $this->dataset->dats_sensors ) && ! empty ( $this->dataset->dats_sensors )) {\n\t\t\t$this->dats_sensors = array();\n\t\t\t$this->dats_sensors = $this->dataset->dats_sensors ;\n\t\t}\n\t\tif (isset ( $this->dataset->sites ) && ! empty ( $this->dataset->sites )) {\n\t\t\t$this->sites = array();\n\t\t\t$this->sites = $this->dataset->sites;\n\t\t}\n\t\t\n\t\tif ( isset ( $this->dataset->dats_id ) && $this->dataset->dats_id > 0) {\n\t\t\tif (isset ( $this->dataset->nbModFormSensor )){\n\t\t\t\tif($this->dataset->nbModForm <= $this->dataset->nbModFormSensor ){\n\t\t\t\t\t$this->dataset->nbModForm = $this->dataset->nbModFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset ( $this->dataset->nbSatFormSensor )){\n\t\t\t\t//$this->dataset->nbSatFormSensor = $this->dataset->nbSatFormSensor - 1;\n\t\t\t\tif($this->dataset->nbSatForm <= $this->dataset->nbSatFormSensor){\n\t\t\t\t\t$this->dataset->nbSatForm = $this->dataset->nbSatFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset ( $this->dataset->nbInstruFormSensor )){\n\t\t\t\tif($this->dataset->nbInstruForm <= $this->dataset->nbInstruFormSensor){\n\t\t\t\t\t$this->dataset->nbInstruForm = $this->dataset->nbInstruFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif($this->dataset->nbModForm > 0)\n\t\t\t$this->addMod();\n\t\tif($this->dataset->nbInstruForm > 0)\n\t\t\t$this->addInstru();\t\n\t\tif($this->dataset->nbSatForm > 0)\n\t\t\t$this->addSat();\n\t\t\n\t\t$this->dataset->dats_sensors = null ;\n\t\t$this->dataset->sites = null;\n\t}", "protected function getForm() {\n\t\tglobal $wgScript;\n\n\t\t$this->opts['title'] = $this->getPageTitle()->getPrefixedText();\n\t\tif ( !isset( $this->opts['target'] ) ) {\n\t\t\t$this->opts['target'] = '';\n\t\t} else {\n\t\t\t$this->opts['target'] = str_replace( '_', ' ', $this->opts['target'] );\n\t\t}\n\n\t\tif ( !isset( $this->opts['namespace'] ) ) {\n\t\t\t$this->opts['namespace'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['nsInvert'] ) ) {\n\t\t\t$this->opts['nsInvert'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['associated'] ) ) {\n\t\t\t$this->opts['associated'] = false;\n\t\t}\n\n\t\tif ( !isset( $this->opts['contribs'] ) ) {\n\t\t\t$this->opts['contribs'] = 'user';\n\t\t}\n\n\t\tif ( !isset( $this->opts['year'] ) ) {\n\t\t\t$this->opts['year'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['month'] ) ) {\n\t\t\t$this->opts['month'] = '';\n\t\t}\n\n\t\tif ( $this->opts['contribs'] == 'newbie' ) {\n\t\t\t$this->opts['target'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['tagfilter'] ) ) {\n\t\t\t$this->opts['tagfilter'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['topOnly'] ) ) {\n\t\t\t$this->opts['topOnly'] = false;\n\t\t}\n\n\t\tif ( !isset( $this->opts['newOnly'] ) ) {\n\t\t\t$this->opts['newOnly'] = false;\n\t\t}\n\n\t\t$form = Html::openElement(\n\t\t\t'form',\n\t\t\tarray(\n\t\t\t\t'method' => 'get',\n\t\t\t\t'action' => $wgScript,\n\t\t\t\t'class' => 'mw-contributions-form'\n\t\t\t)\n\t\t);\n\n\t\t# Add hidden params for tracking except for parameters in $skipParameters\n\t\t$skipParameters = array(\n\t\t\t'namespace',\n\t\t\t'nsInvert',\n\t\t\t'deletedOnly',\n\t\t\t'target',\n\t\t\t'contribs',\n\t\t\t'year',\n\t\t\t'month',\n\t\t\t'topOnly',\n\t\t\t'newOnly',\n\t\t\t'associated'\n\t\t);\n\n\t\tforeach ( $this->opts as $name => $value ) {\n\t\t\tif ( in_array( $name, $skipParameters ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$form .= \"\\t\" . Html::hidden( $name, $value ) . \"\\n\";\n\t\t}\n\n\t\t$tagFilter = ChangeTags::buildTagFilterSelector( $this->opts['tagfilter'] );\n\n\t\tif ( $tagFilter ) {\n\t\t\t$filterSelection = Html::rawElement(\n\t\t\t\t'td',\n\t\t\t\tarray( 'class' => 'mw-label' ),\n\t\t\t\tarray_shift( $tagFilter )\n\t\t\t);\n\t\t\t$filterSelection .= Html::rawElement(\n\t\t\t\t'td',\n\t\t\t\tarray( 'class' => 'mw-input' ),\n\t\t\t\timplode( '&#160', $tagFilter )\n\t\t\t);\n\t\t} else {\n\t\t\t$filterSelection = Html::rawElement( 'td', array( 'colspan' => 2 ), '' );\n\t\t}\n\n\t\t$labelNewbies = Xml::radioLabel(\n\t\t\t$this->msg( 'sp-contributions-newbies' )->text(),\n\t\t\t'contribs',\n\t\t\t'newbie',\n\t\t\t'newbie',\n\t\t\t$this->opts['contribs'] == 'newbie',\n\t\t\tarray( 'class' => 'mw-input' )\n\t\t);\n\t\t$labelUsername = Xml::radioLabel(\n\t\t\t$this->msg( 'sp-contributions-username' )->text(),\n\t\t\t'contribs',\n\t\t\t'user',\n\t\t\t'user',\n\t\t\t$this->opts['contribs'] == 'user',\n\t\t\tarray( 'class' => 'mw-input' )\n\t\t);\n\t\t$input = Html::input(\n\t\t\t'target',\n\t\t\t$this->opts['target'],\n\t\t\t'text',\n\t\t\tarray( 'size' => '40', 'required' => '', 'class' => 'mw-input' ) +\n\t\t\t\t( $this->opts['target'] ? array() : array( 'autofocus' )\n\t\t\t\t)\n\t\t);\n\t\t$targetSelection = Html::rawElement(\n\t\t\t'td',\n\t\t\tarray( 'colspan' => 2 ),\n\t\t\t$labelNewbies . '<br />' . $labelUsername . ' ' . $input . ' '\n\t\t);\n\n\t\t$namespaceSelection = Xml::tags(\n\t\t\t'td',\n\t\t\tarray( 'class' => 'mw-label' ),\n\t\t\tXml::label(\n\t\t\t\t$this->msg( 'namespace' )->text(),\n\t\t\t\t'namespace',\n\t\t\t\t''\n\t\t\t)\n\t\t);\n\t\t$namespaceSelection .= Html::rawElement(\n\t\t\t'td',\n\t\t\tnull,\n\t\t\tHtml::namespaceSelector(\n\t\t\t\tarray( 'selected' => $this->opts['namespace'], 'all' => '' ),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'namespace',\n\t\t\t\t\t'id' => 'namespace',\n\t\t\t\t\t'class' => 'namespaceselector',\n\t\t\t\t)\n\t\t\t) . '&#160;' .\n\t\t\t\tHtml::rawElement(\n\t\t\t\t\t'span',\n\t\t\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\t\t\tXml::checkLabel(\n\t\t\t\t\t\t$this->msg( 'invert' )->text(),\n\t\t\t\t\t\t'nsInvert',\n\t\t\t\t\t\t'nsInvert',\n\t\t\t\t\t\t$this->opts['nsInvert'],\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'title' => $this->msg( 'tooltip-invert' )->text(),\n\t\t\t\t\t\t\t'class' => 'mw-input'\n\t\t\t\t\t\t)\n\t\t\t\t\t) . '&#160;'\n\t\t\t\t) .\n\t\t\t\tHtml::rawElement( 'span', array( 'style' => 'white-space: nowrap' ),\n\t\t\t\t\tXml::checkLabel(\n\t\t\t\t\t\t$this->msg( 'namespace_association' )->text(),\n\t\t\t\t\t\t'associated',\n\t\t\t\t\t\t'associated',\n\t\t\t\t\t\t$this->opts['associated'],\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'title' => $this->msg( 'tooltip-namespace_association' )->text(),\n\t\t\t\t\t\t\t'class' => 'mw-input'\n\t\t\t\t\t\t)\n\t\t\t\t\t) . '&#160;'\n\t\t\t\t)\n\t\t);\n\n\t\tif ( $this->getUser()->isAllowed( 'deletedhistory' ) ) {\n\t\t\t$deletedOnlyCheck = Html::rawElement(\n\t\t\t\t'span',\n\t\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\t\tXml::checkLabel(\n\t\t\t\t\t$this->msg( 'history-show-deleted' )->text(),\n\t\t\t\t\t'deletedOnly',\n\t\t\t\t\t'mw-show-deleted-only',\n\t\t\t\t\t$this->opts['deletedOnly'],\n\t\t\t\t\tarray( 'class' => 'mw-input' )\n\t\t\t\t)\n\t\t\t);\n\t\t} else {\n\t\t\t$deletedOnlyCheck = '';\n\t\t}\n\n\t\t$checkLabelTopOnly = Html::rawElement(\n\t\t\t'span',\n\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\tXml::checkLabel(\n\t\t\t\t$this->msg( 'sp-contributions-toponly' )->text(),\n\t\t\t\t'topOnly',\n\t\t\t\t'mw-show-top-only',\n\t\t\t\t$this->opts['topOnly'],\n\t\t\t\tarray( 'class' => 'mw-input' )\n\t\t\t)\n\t\t);\n\t\t$checkLabelNewOnly = Html::rawElement(\n\t\t\t'span',\n\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\tXml::checkLabel(\n\t\t\t\t$this->msg( 'sp-contributions-newonly' )->text(),\n\t\t\t\t'newOnly',\n\t\t\t\t'mw-show-new-only',\n\t\t\t\t$this->opts['newOnly'],\n\t\t\t\tarray( 'class' => 'mw-input' )\n\t\t\t)\n\t\t);\n\t\t$extraOptions = Html::rawElement(\n\t\t\t'td',\n\t\t\tarray( 'colspan' => 2 ),\n\t\t\t$deletedOnlyCheck . $checkLabelTopOnly . $checkLabelNewOnly\n\t\t);\n\n\t\t$dateSelectionAndSubmit = Xml::tags( 'td', array( 'colspan' => 2 ),\n\t\t\tXml::dateMenu(\n\t\t\t\t$this->opts['year'] === '' ? MWTimestamp::getInstance()->format( 'Y' ) : $this->opts['year'],\n\t\t\t\t$this->opts['month']\n\t\t\t) . ' ' .\n\t\t\t\tXml::submitButton(\n\t\t\t\t\t$this->msg( 'sp-contributions-submit' )->text(),\n\t\t\t\t\tarray( 'class' => 'mw-submit' )\n\t\t\t\t)\n\t\t);\n\n\t\t$form .= Xml::fieldset( $this->msg( 'sp-contributions-search' )->text() );\n\t\t$form .= Html::rawElement( 'table', array( 'class' => 'mw-contributions-table' ), \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $targetSelection ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $namespaceSelection ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $filterSelection ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $extraOptions ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $dateSelectionAndSubmit ) . \"\\n\"\n\t\t);\n\n\t\t$explain = $this->msg( 'sp-contributions-explain' );\n\t\tif ( !$explain->isBlank() ) {\n\t\t\t$form .= \"<p id='mw-sp-contributions-explain'>{$explain->parse()}</p>\";\n\t\t}\n\n\t\t$form .= Xml::closeElement( 'fieldset' ) . Xml::closeElement( 'form' );\n\n\t\treturn $form;\n\t}", "public function ajax_example_progressbar_callback($form, &$form_state) {\n $variable_name = 'example_progressbar_' . $form_state['time'];\n $commands = array();\n\n variable_set($variable_name, 10);\n sleep(2);\n variable_set($variable_name, 40);\n sleep(2);\n variable_set($variable_name, 70);\n sleep(2);\n variable_set($variable_name, 90);\n sleep(2);\n variable_del($variable_name);\n\n $commands[] = HtmlCommand('#progress-status', $this->t('Executed.'));\n\n return array(\n '#type' => 'ajax',\n '#commands' => $commands,\n );\n}", "protected function form()\n {\n $form = new Form(new DbTop());\n $form->select('status', __(trans('hhx.status')))->options(config('hhx.db_status'));;\n $form->text('pan_url', __(trans('hhx.pan_url')));\n $form->text('pan_code', __(trans('hhx.pan_code')));\n\n return $form;\n }", "function initControlStructureForm()\n\t{\n\t\tinclude_once (\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n $form = new ilPropertyFormGUI();\n\n\t\t$form->setId(\"control_structure\");\n\t\t$form->setTitle($this->lng->txt(\"ctrl_structure\"));\n\t\t$form->setFormAction(\"setup.php?cmd=gateway\");\n\n\t\t$ilDB = $this->setup->getClient()->db;\n\t\t$cset = $ilDB->query(\"SELECT count(*) as cnt FROM ctrl_calls\");\n\t\t$crec = $ilDB->fetchAssoc($cset);\n\n\t\t$item = new ilCustomInputGUI($this->lng->txt(\"ctrl_structure_reload\"));\n\t\tif ($crec[\"cnt\"] == 0)\n\t\t{\n\t\t\t$item->setInfo($this->lng->txt(\"ctrl_missing_desc\"));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$item->setInfo($this->lng->txt(\"ctrl_structure_desc\"));\n\t\t}\n\t\t$form->addItem($item);\n\n\t\t$form->addCommandButton(\"reloadStructure\", $this->lng->txt(\"reload\"));\n\t\treturn $form;\n\t}", "protected function form()\n {\n $form = new Form(new PrizesLog);\n\n // 去掉`删除`按钮\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableDelete();\n $tools->disableView();\n });\n\n $form->text('group.title', '奖品组')->readonly();\n $form->text('prize.name', '奖品名称')->readonly();\n $form->text('material.title', '物料名称')->readonly();\n $form->text('material_code', '物料代码')->readonly();\n $form->text('user.username', '用户名')->readonly();\n $form->text('user.mobile', '用户手机号')->readonly();\n $form->select('source', '来源')->options([\n '' => '', 'exchange' => '兑换/领取', 'lottery' => '抽奖'\n ])->readonly();\n $form->ip('ip', 'IP地址')->readonly();\n $form->datetime('created_at', '中奖时间')->readonly();\n $form->embeds('leaving_capital', '留资信息', function ($form) {\n $form->text('name', '收件人');\n $form->mobile('mobile', '手机号');\n $form->text('address', '收件地址');\n });\n $form->radio('status', '状态')->options([\n '0' => '作废', '1' => '有效'\n ])->default('1');\n return $form;\n }", "public function buildForm()\n {\n $this\n ->addNarrative('location_description_narrative')\n ->addAddMoreButton('add', 'location_description_narrative');\n }", "public function initBasicSettingsForm($a_install = false)\n\t{\n\t\tglobal $lng, $ilCtrl;\n\n\t\tinclude_once(\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$this->form = new ilPropertyFormGUI();\n\n\t\t// webspace dir\t\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"data_directory_in_ws\"), \"webspace_dir\");\n\t\tif ($a_install)\n\t\t{\n\t\t\t$ne->setInfo($this->lng->txt(\"data_directory_in_ws_info\"));\n\t\t}\n\t\t$cwd = ilUtil::isWindows()\n\t\t\t? str_replace(\"\\\\\", \"/\", getcwd())\n\t\t\t: getcwd();\n\n\t\t$ne->setValue($cwd.\"/data\");\n\t\t$this->form->addItem($ne);\n\n\t\t// data dir\n\t\tif ($a_install)\n\t\t{\n\t\t\t$ti = new ilTextInputGUI($lng->txt(\"data_directory_outside_ws\"), \"datadir_path\");\n\t\t\t$ti->setInfo($lng->txt(\"data_directory_info\"));\n\t\t\t$ti->setRequired(true);\n\t\t\t$this->form->addItem($ti);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"data_directory_outside_ws\"), \"data_dir\");\n\t\t\t$this->form->addItem($ne);\n\t\t}\n\n\t\t$lvext = (ilUtil::isWindows())\n\t\t\t? \"_win\"\n\t\t\t: \"\";\n\n\n\t\t// logging\n\t\t$sh = new ilFormSectionHeaderGUI();\n\t\t$sh->setTitle($lng->txt(\"logging\"));\n\t\t$this->form->addItem($sh);\n\n\t\t// path to log file\n\t\t$ti = new ilTextInputGUI($lng->txt(\"log_path\"), \"log_path\");\n\t\t$ti->setInfo($lng->txt(\"log_path_comment\".$lvext));\n\t\t$this->form->addItem($ti);\n\n\t\t// disable logging \n\t\t$cb = new ilCheckboxInputGUI($lng->txt(\"disable_logging\"), \"chk_log_status\");\n\t\t$this->form->addItem($cb);\n\n\t\t// server settings\n\t\t$sh = new ilFormSectionHeaderGUI();\n\t\t$sh->setTitle($lng->txt(\"server_settings\"));\n\t\t$this->form->addItem($sh);\n\n\t\t// time zone\n\t\tinclude_once(\"./Services/Calendar/classes/class.ilCalendarUtil.php\");\n\t\t$si = new ilSelectInputGUI($lng->txt(\"time_zone\"), \"time_zone\");\n\t\t$si->setOptions(array_merge(\n\t\t\tarray(\"\" => \"-- \".$lng->txt(\"please_select\").\" --\"),\n\t\t\tilCalendarUtil::_getShortTimeZoneList()));\n\t\t$si->setRequired(true);\n\t\t$this->form->addItem($si);\n\n\t\t// https settings\n\t\t$sh = new ilFormSectionHeaderGUI();\n\t\t$sh->setTitle($lng->txt(\"https_settings\"));\n\t\t$this->form->addItem($sh);\n\n\t\t$check = new ilCheckboxInputGUI($lng->txt('ps_auto_https'),'auto_https_detect_enabled');\n\t\t$check->setOptionTitle($lng->txt('ps_auto_https_description'));\n\t\t$check->setValue(1);\n\n\t\t$text = new ilTextInputGUI($lng->txt('ps_auto_https_header_name'),'auto_https_detect_header_name');\n\t\t$text->setSize(24);\n\t\t$text->setMaxLength(64);\n\t\t$text->setRequired(true);\n\t\t$check->addSubItem($text);\n\n\t\t$text = new ilTextInputGUI($lng->txt('ps_auto_https_header_value'),'auto_https_detect_header_value');\n\t\t$text->setSize(24);\n\t\t$text->setMaxLength(64);\n\t\t$text->setRequired(true);\n\t\t$check->addSubItem($text);\n\n\t\t$this->form->addItem($check);\n\n\t\t// required 3rd party tools\n\t\t$sh = new ilFormSectionHeaderGUI();\n\t\t$sh->setTitle($lng->txt(\"3rd_party_software_req\"));\n\t\t$this->form->addItem($sh);\n\n\t\t// convert path\n\t\t$ti = new ilTextInputGUI($lng->txt(\"convert_path\"), \"convert_path\");\n\t\t$ti->setInfo($lng->txt(\"convert_path_comment\".$lvext));\n\t\t$ti->setRequired(true);\n\t\t$this->form->addItem($ti);\n\n\t\t// zip path\n\t\t$ti = new ilTextInputGUI($lng->txt(\"zip_path\"), \"zip_path\");\n\t\t$ti->setInfo($lng->txt(\"zip_path_comment\".$lvext));\n\t\t$ti->setRequired(true);\n\t\t$this->form->addItem($ti);\n\n\t\t// unzip path\n\t\t$ti = new ilTextInputGUI($lng->txt(\"unzip_path\"), \"unzip_path\");\n\t\t$ti->setInfo($lng->txt(\"unzip_path_comment\".$lvext));\n\t\t$ti->setRequired(true);\n\t\t$this->form->addItem($ti);\n\n\t\t// optional 3rd party tools\n\t\t$sh = new ilFormSectionHeaderGUI();\n\t\t$sh->setTitle($lng->txt(\"3rd_party_software_opt\"));\n\t\t$this->form->addItem($sh);\n\n\t\t// ghostscript path\n\t\t$ti = new ilTextInputGUI($lng->txt(\"ghostscript_path\"), \"ghostscript_path\");\n\t\t$ti->setInfo($lng->txt(\"ghostscript_path_comment\".$lvext));\n\t\t$this->form->addItem($ti);\n\n\t\t// java path\n\t\t$ti = new ilTextInputGUI($lng->txt(\"java_path\"), \"java_path\");\n\t\t$ti->setInfo($lng->txt(\"java_path_comment\".$lvext));\n\t\t$this->form->addItem($ti);\n\n\t\t// htmldoc path\n\t\t$ti = new ilTextInputGUI($lng->txt(\"htmldoc_path\"), \"htmldoc_path\");\n\t\t$ti->setInfo($lng->txt(\"htmldoc_path_comment\".$lvext));\n\t\t$this->form->addItem($ti);\n\n\t\t// ffmpeg path\n\t\t$ti = new ilTextInputGUI($lng->txt(\"ffmpeg_path\"), \"ffmpeg_path\");\n\t\t$ti->setInfo($lng->txt(\"ffmpeg_path_comment\"));\n\t\t$this->form->addItem($ti);\n\n\t\t// latex\n\t\t$ti = new ilTextInputGUI($lng->txt(\"url_to_latex\"), \"latex_url\");\n\t\t$ti->setInfo($lng->txt(\"latex_url_comment\"));\n\t\t$this->form->addItem($ti);\n\n\t\t// virus scanner\n\t\t$options = array(\n\t\t\t\"none\" => $lng->txt(\"none\"),\n\t\t\t\"sophos\" => $lng->txt(\"sophos\"),\n\t\t\t\"antivir\" => $lng->txt(\"antivir\"),\n\t\t\t\"clamav\" => $lng->txt(\"clamav\")\n\t\t\t);\n\t\t$si = new ilSelectInputGUI($lng->txt(\"virus_scanner\"), \"vscanner_type\");\n\t\t$si->setOptions($options);\n\t\t$this->form->addItem($si);\n\n\t\t// scan command\n\t\t$ti = new ilTextInputGUI($lng->txt(\"scan_command\"), \"scan_command\");\n\t\t$this->form->addItem($ti);\n\n\t\t// clean command\n\t\t$ti = new ilTextInputGUI($lng->txt(\"clean_command\"), \"clean_command\");\n\t\t$this->form->addItem($ti);\n\n\t\tif ($a_install)\n\t\t{\n\t\t\t$sh = new ilFormSectionHeaderGUI();\n\t\t\t$sh->setTitle($lng->txt(\"master_password\"));\n\t\t\t$this->form->addItem($sh);\n\n\t\t\t// password\n\t\t\t$pi = new ilPasswordInputGUI($lng->txt(\"password\"), \"password\");\n\t\t\t$pi->setRequired(true);\n\t\t\t$pi->setSkipSyntaxCheck(true);\n\t\t\t$pi->setInfo($lng->txt(\"password_info\"));\n\t\t\t$this->form->addItem($pi);\n\t\t}\n\n\t\tif ($a_install)\n\t\t{\n\t\t\t$this->form->addCommandButton(\"saveBasicSettings\", $lng->txt(\"save\"));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->form->addCommandButton(\"updateBasicSettings\", $lng->txt(\"save\"));\n\t\t\t$this->form->addCommandButton(\"determineToolsPath\", $lng->txt(\"determine_tools_paths\"));\n\t\t}\n\n\t\t$this->form->setTitle($lng->txt(\"data_directories\"));\n\t\t$this->form->setFormAction(\"setup.php?cmd=gateway\");\n\n\t\tif ($a_install)\n\t\t{\n\t\t\t$det = $this->determineTools();\n\t\t\t$this->form->setValuesByArray($det);\n\t\t}\n\n\t}", "public function initGeneralSettingsForm()\n\t{\n\t\tglobal $lng, $ilUser, $styleDefinition, $ilSetting;\n\t\t\n\t\t\n\t\tinclude_once(\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$this->form = new ilPropertyFormGUI();\n\n\t\t// language\n\t\tif ($this->userSettingVisible(\"language\"))\n\t\t{\n\t\t\t$languages = $this->lng->getInstalledLanguages();\n\t\t\t$options = array();\n\t\t\tforeach($languages as $lang_key)\n\t\t\t{\n\t\t\t\t$options[$lang_key] = ilLanguage::_lookupEntry($lang_key,\"meta\", \"meta_l_\".$lang_key);\n\t\t\t}\n\t\t\t\n\t\t\t$si = new ilSelectInputGUI($this->lng->txt(\"language\"), \"language\");\n\t\t\t$si->setOptions($options);\n\t\t\t$si->setValue($ilUser->getLanguage());\n\t\t\t$si->setDisabled($ilSetting->get(\"usr_settings_disable_language\"));\n\t\t\t$this->form->addItem($si);\n\t\t}\n\n\t\t// skin/style\n\t\tinclude_once(\"./Services/Style/classes/class.ilObjStyleSettings.php\");\n\t\tif ($this->userSettingVisible(\"skin_style\"))\n\t\t{\n\t\t\t$templates = $styleDefinition->getAllTemplates();\n\t\t\tif (is_array($templates))\n\t\t\t{ \n\t\t\t\t$si = new ilSelectInputGUI($this->lng->txt(\"skin_style\"), \"skin_style\");\n\t\t\t\t\n\t\t\t\t$options = array();\n\t\t\t\tforeach($templates as $template)\n\t\t\t\t{\n\t\t\t\t\t// get styles information of template\n\t\t\t\t\t$styleDef = new ilStyleDefinition($template[\"id\"]);\n\t\t\t\t\t$styleDef->startParsing();\n\t\t\t\t\t$styles = $styleDef->getStyles();\n\n\t\t\t\t\tforeach($styles as $style)\n\t\t\t\t\t{\n\t\t\t\t\t\tif (!ilObjStyleSettings::_lookupActivatedStyle($template[\"id\"],$style[\"id\"]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$options[$template[\"id\"].\":\".$style[\"id\"]] =\n\t\t\t\t\t\t\t$styleDef->getTemplateName().\" / \".$style[\"name\"];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$si->setOptions($options);\n\t\t\t\t$si->setValue($ilUser->skin.\":\".$ilUser->prefs[\"style\"]);\n\t\t\t\t$si->setDisabled($ilSetting->get(\"usr_settings_disable_skin_style\"));\n\t\t\t\t$this->form->addItem($si);\n\t\t\t}\n\t\t}\n\n\t\t// screen reader optimization\n\t\tif ($this->userSettingVisible(\"screen_reader_optimization\"))\n\t\t{ \n\t\t\t$cb = new ilCheckboxInputGUI($this->lng->txt(\"user_screen_reader_optimization\"), \"screen_reader_optimization\");\n\t\t\t$cb->setChecked($ilUser->prefs[\"screen_reader_optimization\"]);\n\t\t\t$cb->setDisabled($ilSetting->get(\"usr_settings_disable_screen_reader_optimization\"));\n\t\t\t$cb->setInfo($this->lng->txt(\"user_screen_reader_optimization_info\"));\n\t\t\t$this->form->addItem($cb);\n\t\t}\n\n\t\t// hits per page\n\t\tif ($this->userSettingVisible(\"hits_per_page\"))\n\t\t{\n\t\t\t$si = new ilSelectInputGUI($this->lng->txt(\"hits_per_page\"), \"hits_per_page\");\n\t\t\t\n\t\t\t$hits_options = array(10,15,20,30,40,50,100,9999);\n\t\t\t$options = array();\n\n\t\t\tforeach($hits_options as $hits_option)\n\t\t\t{\n\t\t\t\t$hstr = ($hits_option == 9999)\n\t\t\t\t\t? $this->lng->txt(\"no_limit\")\n\t\t\t\t\t: $hits_option;\n\t\t\t\t$options[$hits_option] = $hstr;\n\t\t\t}\n\t\t\t$si->setOptions($options);\n\t\t\t$si->setValue($ilUser->prefs[\"hits_per_page\"]);\n\t\t\t$si->setDisabled($ilSetting->get(\"usr_settings_disable_hits_per_page\"));\n\t\t\t$this->form->addItem($si);\n\t\t}\n\n\t\t// Users Online\n\t\tif ($this->userSettingVisible(\"show_users_online\"))\n\t\t{\n\t\t\t$si = new ilSelectInputGUI($this->lng->txt(\"show_users_online\"), \"show_users_online\");\n\t\t\t\n\t\t\t$options = array(\n\t\t\t\t\"y\" => $this->lng->txt(\"users_online_show_y\"),\n\t\t\t\t\"associated\" => $this->lng->txt(\"users_online_show_associated\"),\n\t\t\t\t\"n\" => $this->lng->txt(\"users_online_show_n\"));\n\t\t\t$si->setOptions($options);\n\t\t\t$si->setValue($ilUser->prefs[\"show_users_online\"]);\n\t\t\t$si->setDisabled($ilSetting->get(\"usr_settings_disable_show_users_online\"));\n\t\t\t$this->form->addItem($si);\n\t\t}\n\n\t\t// Store last visited\n\t\t$lv = new ilSelectInputGUI($this->lng->txt(\"user_store_last_visited\"), \"store_last_visited\");\n\t\t$options = array(\n\t\t\t0 => $this->lng->txt(\"user_lv_keep_entries\"),\n\t\t\t1 => $this->lng->txt(\"user_lv_keep_only_for_session\"),\n\t\t\t2 => $this->lng->txt(\"user_lv_do_not_store\"));\n\t\t$lv->setOptions($options);\n\t\t$lv->setValue((int) $ilUser->prefs[\"store_last_visited\"]);\n\t\t$this->form->addItem($lv);\n\n\t\t// hide_own_online_status\n\t\tif ($this->userSettingVisible(\"hide_own_online_status\"))\n\t\t{ \n\t\t\t$cb = new ilCheckboxInputGUI($this->lng->txt(\"hide_own_online_status\"), \"hide_own_online_status\");\n\t\t\t$cb->setChecked($ilUser->prefs[\"hide_own_online_status\"] == \"y\");\n\t\t\t$cb->setDisabled($ilSetting->get(\"usr_settings_disable_hide_own_online_status\"));\n\t\t\t$this->form->addItem($cb);\n\t\t}\n\t\t\n\t\tinclude_once 'Services/Authentication/classes/class.ilSessionReminder.php';\n\t\tif(ilSessionReminder::isGloballyActivated())\n\t\t{\n\t\t\t$cb = new ilCheckboxInputGUI($this->lng->txt('session_reminder'), 'session_reminder_enabled');\n\t\t\t$cb->setInfo($this->lng->txt('session_reminder_info'));\n\t\t\t$cb->setValue(1);\n\t\t\t$cb->setChecked((int)$ilUser->getPref('session_reminder_enabled'));\n\n\t\t\t$expires = ilSession::getSessionExpireValue();\n\t\t\t$lead_time_gui = new ilNumberInputGUI($this->lng->txt('session_reminder_lead_time'), 'session_reminder_lead_time');\n\t\t\t$lead_time_gui->setInfo(sprintf($this->lng->txt('session_reminder_lead_time_info'), ilFormat::_secondsToString($expires, true)));\n\n\t\t\t$min_value = ilSessionReminder::MIN_LEAD_TIME;\n\t\t\t$max_value = max($min_value, ((int)$expires / 60) - 1);\n\n\t\t\t$current_user_value = $ilUser->getPref('session_reminder_lead_time');\n\t\t\tif($current_user_value < $min_value ||\n\t\t\t $current_user_value > $max_value)\n\t\t\t{\n\t\t\t\t$current_user_value = ilSessionReminder::SUGGESTED_LEAD_TIME;\n\t\t\t}\n\t\t\t$value = min(\n\t\t\t\tmax(\n\t\t\t\t\t$min_value, $current_user_value\n\t\t\t\t),\n\t\t\t\t$max_value\n\t\t\t);\n\n\t\t\t$lead_time_gui->setValue($value);\n\t\t\t$lead_time_gui->setSize(3);\n\t\t\t$lead_time_gui->setMinValue($min_value);\n\t\t\t$lead_time_gui->setMaxValue($max_value);\n\t\t\t$cb->addSubItem($lead_time_gui);\n\n\t\t\t$this->form->addItem($cb);\n\t\t}\n\n\t\t// calendar settings (copied here to be reachable when calendar is inactive)\n\t\t// they cannot be hidden/deactivated\n\n\t\tinclude_once('Services/Calendar/classes/class.ilCalendarUserSettings.php');\n\t\tinclude_once('Services/Calendar/classes/class.ilCalendarUtil.php');\n\t\t$lng->loadLanguageModule(\"dateplaner\");\n\t\t$user_settings = ilCalendarUserSettings::_getInstanceByUserId($ilUser->getId());\n\n\t\t$select = new ilSelectInputGUI($lng->txt('cal_user_timezone'),'timezone');\n\t\t$select->setOptions(ilCalendarUtil::_getShortTimeZoneList());\n\t\t$select->setInfo($lng->txt('cal_timezone_info'));\n\t\t$select->setValue($user_settings->getTimeZone());\n\t\t$this->form->addItem($select);\n\n\t\t$year = date(\"Y\");\n\t\t$select = new ilSelectInputGUI($lng->txt('cal_user_date_format'),'date_format');\n\t\t$select->setOptions(array(\n\t\t\tilCalendarSettings::DATE_FORMAT_DMY => '31.10.'.$year,\n\t\t\tilCalendarSettings::DATE_FORMAT_YMD => $year.\"-10-31\",\n\t\t\tilCalendarSettings::DATE_FORMAT_MDY => \"10/31/\".$year));\n\t\t$select->setInfo($lng->txt('cal_date_format_info'));\n\t\t$select->setValue($user_settings->getDateFormat());\n\t\t$this->form->addItem($select);\n\n\t\t$select = new ilSelectInputGUI($lng->txt('cal_user_time_format'),'time_format');\n\t\t$select->setOptions(array(\n\t\t\tilCalendarSettings::TIME_FORMAT_24 => '13:00',\n\t\t\tilCalendarSettings::TIME_FORMAT_12 => '1:00pm'));\n\t\t$select->setInfo($lng->txt('cal_time_format_info'));\n\t $select->setValue($user_settings->getTimeFormat());\n\t\t$this->form->addItem($select);\n\t\t\n\t\t\n\t\t// starting point\t\n\t\tinclude_once \"Services/User/classes/class.ilUserUtil.php\";\n\t\tif(ilUserUtil::hasPersonalStartingPoint())\n\t\t{\n\t\t\t$this->lng->loadLanguageModule(\"administration\");\n\t\t\t$si = new ilRadioGroupInputGUI($this->lng->txt(\"adm_user_starting_point\"), \"usr_start\");\n\t\t\t$si->setRequired(true);\n\t\t\t$si->setInfo($this->lng->txt(\"adm_user_starting_point_info\"));\n\t\t\t$def_opt = new ilRadioOption($this->lng->txt(\"adm_user_starting_point_inherit\"), 0);\n\t\t\t$def_opt->setInfo($this->lng->txt(\"adm_user_starting_point_inherit_info\"));\n\t\t\t$si->addOption($def_opt);\n\t\t\tforeach(ilUserUtil::getPossibleStartingPoints() as $value => $caption)\n\t\t\t{\n\t\t\t\t$si->addOption(new ilRadioOption($caption, $value));\n\t\t\t}\n\t\t\t$si->setValue(ilUserUtil::hasPersonalStartPointPref()\n\t\t\t\t? ilUserUtil::getPersonalStartingPoint()\n\t\t\t\t: 0);\n\t\t\t$this->form->addItem($si);\n\t\t\t\t\t\t\n\t\t\t// starting point: repository object\n\t\t\t$repobj = new ilRadioOption($lng->txt(\"adm_user_starting_point_object\"), ilUserUtil::START_REPOSITORY_OBJ);\n\t\t\t$repobj_id = new ilTextInputGUI($lng->txt(\"adm_user_starting_point_ref_id\"), \"usr_start_ref_id\");\n\t\t\t$repobj_id->setRequired(true);\n\t\t\t$repobj_id->setSize(5);\n\t\t\tif($si->getValue() == ilUserUtil::START_REPOSITORY_OBJ)\n\t\t\t{\n\t\t\t\t$start_ref_id = ilUserUtil::getPersonalStartingObject();\n\t\t\t\t$repobj_id->setValue($start_ref_id);\n\t\t\t\tif($start_ref_id)\n\t\t\t\t{\n\t\t\t\t\t$start_obj_id = ilObject::_lookupObjId($start_ref_id);\n\t\t\t\t\tif($start_obj_id)\n\t\t\t\t\t{\n\t\t\t\t\t\t$repobj_id->setInfo($lng->txt(\"obj_\".ilObject::_lookupType($start_obj_id)).\n\t\t\t\t\t\t\t\": \".ilObject::_lookupTitle($start_obj_id));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t\t$repobj->addSubItem($repobj_id);\n\t\t\t$si->addOption($repobj);\n\t\t}\t\t\n\t\t\n\t\t// selector for unicode characters\n\t\tglobal $ilSetting;\n\t\tif ($ilSetting->get('char_selector_availability') > 0)\n\t\t{\n\t\t\trequire_once 'Services/UIComponent/CharSelector/classes/class.ilCharSelectorGUI.php';\n\t\t\t$char_selector = new ilCharSelectorGUI(ilCharSelectorConfig::CONTEXT_USER);\n\t\t\t$char_selector->getConfig()->setAvailability($ilUser->getPref('char_selector_availability'));\n\t\t\t$char_selector->getConfig()->setDefinition($ilUser->getPref('char_selector_definition'));\n\t\t\t$char_selector->addFormProperties($this->form);\n\t\t\t$char_selector->setFormValues($this->form);\n\t\t}\n\t\t\n\t\t$this->form->addCommandButton(\"saveGeneralSettings\", $lng->txt(\"save\"));\n\t\t$this->form->setTitle($lng->txt(\"general_settings\"));\n\t\t$this->form->setFormAction($this->ctrl->getFormAction($this));\n\t \n\t}", "public function buildForm() {\n\t\t$form = '';\n\n\t\tforeach ($this->_properties as $row) {\n\t\t\tif (!in_array($row['Field'],$this->_ignore)) {\n\t\t\t\t$elem = $this->buildElement($row);\n\t\t\t\t$row['Comment'] != '' ? $comment = $row['Comment'].\"<br />\": $comment = '';\n\t\t\t\t$this->_properties[$row['Field']]['HTMLElement']=$elem;\n\t\t\t\tif ($row['ElementType']=='hidden')\n\t\t\t\t\t$form .= $elem;\n\t\t\t\telse \n\t\t\t\t\t$form .= sprintf(\"<div class='formElem'>\\n%s<br />\\n%s\\n%s</div>\\n\",ucwords (str_replace (\"_\",\" \",$row['Field'])),$comment,$elem);\n\t\t\t}\n\t\t}\n\t\treturn $form;\n\t}", "protected function form()\n {\n $form = new Form(new Carousel);\n\n $form->select('carousel_category_id', __('carousel::carousel.carousel_category_id'))\n ->options(CarouselCategory::all()->pluck('name', 'id'));\n $form->text('title', __('carousel::carousel.title'));\n $form->text('url', __('carousel::carousel.url'));\n $form->image('img_src', __('carousel::carousel.img_src'))\n ->removable()\n ->uniqueName()\n ->move('carousel');\n $form->text('alt', __('carousel::carousel.alt'));\n $form->textarea('remark', __('carousel::carousel.remark'));\n $form->select('status', __('carousel::carousel.status.label'))\n ->default(1)\n ->options(__('carousel::carousel.status.value'));\n $form->datetime('start_time', __('carousel::carousel.start_time'))\n ->default(date('Y-m-d H:i:s'));\n $form->datetime('end_time', __('carousel::carousel.end_time'))\n ->default(date('Y-m-d H:i:s'));\n\n return $form;\n }", "private function StartForm(){\r\n\t\t\t$this->formHTML .= \"<form method=\\\"{$this->method}\\\" action=\\\"{$this->action}\\\"\";\r\n\t\t\tif($this->enctype){\r\n\t\t\t\t$this->formHTML .= \" enctype=\\\"{$this->enctype}\\\"\";\r\n\t\t\t}\r\n\t\t\t$this->formHTML .= \" name=\\\"{$this->formName}\\\" class=\\\"c{$this->formName}\\\" id=\\\"i{$this->formName}\\\"\";\r\n\t\t\t$this->formHTML .= \">\";\r\n\t\t}", "protected function form()\n {\n $form = new Form(new Activity());\n\n $form->text('log_name', __('Log name'));\n $form->text('description', __('Description'));\n $form->number('subject_id', __('Subject id'));\n $form->text('subject_type', __('Subject type'));\n $form->number('causer_id', __('Causer id'));\n $form->text('causer_type', __('Causer type'));\n $form->textarea('properties', __('Properties'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Project());\n $form->text('name', '项目名称')->rules('required')->required();\n $form->url('url', '项目地址')->rules('required')->required();\n $form->text('username', '账号');\n $form->text('password', '密码');\n $status = [\n 'on' => ['value' => 1, 'text' => '启用', 'color' => 'success'],\n 'off' => ['value' => 2, 'text' => '禁用', 'color' => 'danger'],\n ];\n $form->switch('status', '状态')->states($status)->default(1);\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableDelete();\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n $footer->disableReset();\n $footer->disableViewCheck();\n $footer->disableEditingCheck();\n $footer->disableCreatingCheck();\n });\n\n return $form;\n }", "function buildForm()\n {\n $this->buildTabs();\n // tab caption\n $this->addElement('header', null, 'Specify file role for specific files');\n\n $fe =& PEAR_PackageFileManager_Frontend::singleton();\n $sess =& $fe->container();\n\n $selection = $this->getSubmitValue('files');\n $selection_count = count($selection);\n $fe->log('debug',\n str_pad($this->getAttribute('id') .'('. __LINE__ .')', 20, '.') .\n ' selection='. serialize($selection)\n );\n\n list($page, $action) = $this->controller->getActionName();\n\n // selection list (false) or edit dialog frame (true)\n if ($action == 'edit' && $selection_count > 0) {\n $editDialog = true;\n }elseif ($action == 'save') {\n $editDialog = true;\n } else {\n $editDialog = false;\n }\n\n if (!$editDialog) {\n\n foreach ($sess['defaults']['_files']['mapping'] as $fn) {\n $pinfo = pathinfo($fn);\n $ext[] = $pinfo['extension'];\n }\n $extensions = array_unique($ext);\n $extensions[] = '-None-';\n sort($extensions, SORT_ASC);\n $extensions = array_combine($extensions, $extensions);\n\n // Role options list: (value => text, with value === text)\n $pageName = $fe->getPageName('page1');\n $releaseType = $fe->exportValue($pageName, 'packageType');\n $roles = PEAR_Installer_Role::getValidRoles($releaseType);\n $roles[] = '-None-';\n sort($roles, SORT_ASC);\n $roles = array_combine($roles, $roles);\n\n $filters = array();\n $filters[] = &HTML_QuickForm::createElement('select', 'extensionFilter', 'Extension', $extensions);\n $filters[] = &HTML_QuickForm::createElement('select', 'roleFilter', 'Role', $roles);\n $filters[] = &HTML_QuickForm::createElement('submit', $this->getButtonName('sort'), 'Apply');\n $this->addGroup($filters, 'filters', 'Filters applied on list :', '', false);\n\n $hdr = array('Path', 'Role');\n $table = new HTML_Table(array('class' => 'tableone'));\n $htmltableDecorator = new PEAR_PackageFileManager_Frontend_Decorator_HTMLTable($fe);\n $htmltableDecorator->setHtmlTable($table);\n $htmltableDecorator->getExceptionList($hdr);\n // We need a simple static html area for maintainers list.\n $this->addElement('static', 'exceptions', '', $htmltableDecorator->toHtml());\n\n $def = array('extensionFilter' => '-None-', 'roleFilter' => '-None-');\n $this->setDefaults($def);\n\n $commands = array('edit', 'remove');\n $nocmd = array('commit', 'reset');\n\n } else {\n\n // we need a multiple-select box for list of file targets\n $rPath =& $this->addElement('select', 'exceptfiles');\n $rPath->setMultiple(true);\n $rPath->setLabel('Path:');\n $rPath->freeze();\n\n // Role options list: (value => text, with value === text)\n $pageName = $fe->getPageName('page1');\n $releaseType = $fe->exportValue($pageName, 'packageType');\n $roles = PEAR_Installer_Role::getValidRoles($releaseType);\n $roles[] = '';\n sort($roles, SORT_ASC);\n $roles = array_combine($roles, $roles);\n $this->addElement('select', 'role', 'Role:', $roles);\n\n if ($selection_count == 0) {\n $key1 = -1;\n $def = array();\n } else {\n $keys = $needle = array_keys($selection);\n $key1 = array_shift($needle);\n\n $files = array();\n foreach($keys as $k) {\n $files[$k] = $sess['files']['mapping'][$k];\n }\n $rPath->load($files, $keys);\n $def = array('exceptfiles' => $keys);\n }\n\n // applies new filters to the element values\n $this->applyFilter('__ALL__', 'trim');\n\n // old values of edit user\n $this->setDefaults($def);\n\n $commands = array('save', 'cancel');\n $nocmd = array('commit','reset');\n }\n\n // Buttons of the wizard to do the job\n $this->buildButtons($nocmd, $commands);\n }", "public function buildForm()\n {\n $this->add('organization_identifier_code', 'text', ['label' => trans('elementForm.organisation_identifier_code')])\n ->add('provider_activity_id', 'text', ['label' => trans('elementForm.provider_activity_id')])\n ->addSelect('type', $this->getCodeList('OrganisationType', 'Activity'), trans('elementForm.type'), $this->addHelpText('Activity_ParticipatingOrg-type'))\n ->addNarrative('provider_org_narrative')\n ->addAddMoreButton('add_provider_org_narrative', 'provider_org_narrative');\n }", "public function progressBar()\n {\n \n self::$view='adminlte::progress.bar';\n return $this;\n \n }", "protected function buildForm()\n {\n $this->formBuilder\n ->add('host', 'text', array(\n 'data' => ElasticProduct::getConfigValue('host'),\n 'required' => false,\n 'attr' => ['placeholder' => 'localhost'],\n 'label' => Translator::getInstance()->trans('Host', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'host'\n )\n ))\n ->add('port', 'text', array(\n 'data' => ElasticProduct::getConfigValue('port'),\n 'required' => false,\n 'attr' => ['placeholder' => '9200'],\n 'label' => Translator::getInstance()->trans('Port', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'port'\n )\n ))\n ->add('username', 'text', array(\n 'data' => ElasticProduct::getConfigValue('username'),\n 'required' => false,\n 'label' => Translator::getInstance()->trans('Username', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'username'\n )\n ))\n ->add('password', PasswordType::class, array(\n 'data' => ElasticProduct::getConfigValue('password'),\n 'required' => false,\n 'label' => Translator::getInstance()->trans('Password', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'password'\n )\n ))\n ->add('index_prefix', 'text', array(\n 'data' => ElasticProduct::getConfigValue('index_prefix'),\n 'required' => false,\n 'attr' => ['placeholder' => 'my_website_name'],\n 'label' => Translator::getInstance()->trans('Index prefix', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'index_prefix'\n )\n ));\n }", "private function buildGitLabWForm(&$form) {\n $git_settings = $this->configFactory->get('simple_git.settings');\n\n $form['git_lab'] = [\n '#type' => 'fieldset',\n '#title' => $this->t('GitLab Web settings'),\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n ];\n\n $form['git_lab']['git_lab_app_id'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitLab App Web Id'),\n '#description' => $this->t('GitLab App Web Id value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITLAB\n )['app_id'],\n ];\n\n $form['git_lab']['git_lab_app_secret'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitLab App Web Secret'),\n '#description' => $this->t('GitLab App Web Secret value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITLAB\n )['app_secret'],\n ];\n\n $form['git_lab']['git_lab_app_url_redirect'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitLab URL Web Redirect'),\n '#description' => $this->t('GitLab URL Web Redirect value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITLAB\n )['app_url_redirect'],\n ];\n\n }", "public function build(Form $form):Form\n {\n foreach ($this->classType->getProperties() as $property) {\n $this->add($form, $property);\n }\n \n return $form;\n }", "public function buildForm() {\n\t\techo \"<!DOCTYPE html>\n\t\t<html>\n\t\t<head>\n\t\t\t<title>$this->title</title>\n\t\t</head>\n\t\t<body>\n\t\t<form method=\\\"$this->method\\\">\";\n\t\tforeach ($this->_inputs as $key => $input) {\n\t\t\t// Check if email validation is required.\n\t\t\tif (isset($input['rule']) && in_array('email', $input['rule'])) {\n\t\t\t\t$input['inputType'] = 'email';\n\t\t\t}\n\n\t\t\techo \"<label>\".$input['label'].\"</label><input type=\\\"\".$input['inputType'].\"\\\" id=\\\"\".$input['name'].\"\\\" name=\\\"\".$input['name'].\"\\\" value=\\\"\".$input['defaultValue'].\"\\\"\";\n\n\t\t\t// Check if field was required.\n\t\t\tif (isset($input['rule']) && in_array('required', $input['rule'])) {\n\t\t\t\techo \" required\";\n\t\t\t}\n\n\t\t\techo \"><br></form>\";\n\t\t}\n\t}", "function initStylePropertiesForm()\n\t{\n\t\tglobal $ilCtrl, $lng, $ilTabs, $ilSetting;\n\t\t\n\t\tinclude_once(\"./Services/Style/classes/class.ilObjStyleSheet.php\");\n\t\t$lng->loadLanguageModule(\"style\");\n\n\t\tinclude_once(\"./Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$this->form = new ilPropertyFormGUI();\n\t\t\n\t\t$fixed_style = $ilSetting->get(\"fixed_content_style_id\");\n\t\t$style_id = $this->object->getStyleSheetId();\n\n\t\tif ($fixed_style > 0)\n\t\t{\n\t\t\t$st = new ilNonEditableValueGUI($lng->txt(\"style_current_style\"));\n\t\t\t$st->setValue(ilObject::_lookupTitle($fixed_style).\" (\".\n\t\t\t\t$this->lng->txt(\"global_fixed\").\")\");\n\t\t\t$this->form->addItem($st);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$st_styles = ilObjStyleSheet::_getStandardStyles(true, false,\n\t\t\t\t$_GET[\"ref_id\"]);\n\n\t\t\t$st_styles[0] = $this->lng->txt(\"default\");\n\t\t\tksort($st_styles);\n\n\t\t\tif ($style_id > 0)\n\t\t\t{\n\t\t\t\t// individual style\n\t\t\t\tif (!ilObjStyleSheet::_lookupStandard($style_id))\n\t\t\t\t{\n\t\t\t\t\t$st = new ilNonEditableValueGUI($lng->txt(\"style_current_style\"));\n\t\t\t\t\t$st->setValue(ilObject::_lookupTitle($style_id));\n\t\t\t\t\t$this->form->addItem($st);\n\n//$this->ctrl->getLinkTargetByClass(\"ilObjStyleSheetGUI\", \"edit\"));\n\n\t\t\t\t\t// delete command\n\t\t\t\t\t$this->form->addCommandButton(\"editStyle\",\n\t\t\t\t\t\t$lng->txt(\"style_edit_style\"));\n\t\t\t\t\t$this->form->addCommandButton(\"deleteStyle\",\n\t\t\t\t\t\t$lng->txt(\"style_delete_style\"));\n//$this->ctrl->getLinkTargetByClass(\"ilObjStyleSheetGUI\", \"delete\"));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id))\n\t\t\t{\n\t\t\t\t$style_sel = ilUtil::formSelect ($style_id, \"style_id\",\n\t\t\t\t\t$st_styles, false, true);\n\t\t\t\t$style_sel = new ilSelectInputGUI($lng->txt(\"style_current_style\"), \"style_id\");\n\t\t\t\t$style_sel->setOptions($st_styles);\n\t\t\t\t$style_sel->setValue($style_id);\n\t\t\t\t$this->form->addItem($style_sel);\n//$this->ctrl->getLinkTargetByClass(\"ilObjStyleSheetGUI\", \"create\"));\n\t\t\t\t$this->form->addCommandButton(\"saveStyleSettings\",\n\t\t\t\t\t\t$lng->txt(\"save\"));\n\t\t\t\t$this->form->addCommandButton(\"createStyle\",\n\t\t\t\t\t$lng->txt(\"sty_create_ind_style\"));\n\t\t\t}\n\t\t}\n\t\t$this->form->setTitle($lng->txt(\"wiki_style\"));\n\t\t$this->form->setFormAction($ilCtrl->getFormAction($this));\n\t}", "public function form()\n {\n $this->switch('auto_df_switch', __('message.tikuanconfig.auto_df_switch'));\n $this->timeRange('auto_df_stime', 'auto_df_etime', '开启时间');\n $this->text('auto_df_maxmoney', __('message.tikuanconfig.auto_df_maxmoney'))->setWidth(2);\n $this->text('auto_df_max_count', __('message.tikuanconfig.auto_df_max_count'))->setWidth(2);\n $this->text('auto_df_max_sum', __('message.tikuanconfig.auto_df_max_sum'))->setWidth(2);\n\n }", "function form($instance) {\n\n\t\t// Get stored preferences\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$title = isset( $instance['title'] ) ? esc_attr($instance['title']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$show_title_text = isset( $instance['show_title_text'] ) ? $instance['show_title_text'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$order = isset( $instance['order'] ) ? esc_attr($instance['order']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$size_from = isset( $instance['size_from'] ) ? esc_attr($instance['size_from']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$size_to = isset( $instance['size_to'] ) ? esc_attr($instance['size_to']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$max = isset( $instance['max'] ) ? esc_attr($instance['max']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$taxonomy = isset( $instance['taxonomy'] ) ? esc_attr($instance['taxonomy']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$color = isset( $instance['color'] ) ? esc_attr($instance['color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$color_span_from = isset( $instance['color_span_from'] ) ? esc_attr($instance['color_span_from']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$color_span_to = isset( $instance['color_span_to'] ) ? esc_attr($instance['color_span_to']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$letter_spacing = isset( $instance['letter_spacing'] ) ? esc_attr($instance['letter_spacing']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$word_spacing = isset( $instance['word_spacing'] ) ? esc_attr($instance['word_spacing']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$tag_spacing = isset( $instance['tag_spacing'] ) ? esc_attr($instance['tag_spacing']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$case = isset( $instance['case'] ) ? esc_attr($instance['case']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$minimum\t\t = isset( $instance['minimum'] ) ? esc_attr($instance['minimum']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$tags_list = isset( $instance['tags_list'] ) && is_array($instance['tags_list']) ? $instance['tags_list'] : array();\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$tags_list_type = isset( $instance['tags_list_type'] ) ? esc_attr($instance['tags_list_type']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$reverse = isset( $instance['reverse'] ) ? $instance['reverse'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$authors = isset( $instance['authors'] ) && is_array($instance['authors']) ? $instance['authors'] : array();\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$color_set = isset( $instance['color_set'] ) && is_array($instance['color_set']) ? $instance['color_set'] : array();\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$case_sensitive = isset( $instance['case_sensitive'] ) ? $instance['case_sensitive'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$debug \t\t\t\t= isset( $instance['debug'] ) ? $instance['debug'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$show_title = isset( $instance['show_title'] ) ? $instance['show_title'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_underline = isset( $instance['link_underline'] ) ? $instance['link_underline'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_bold = isset( $instance['link_bold'] ) ? $instance['link_bold'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_italic = isset( $instance['link_italic'] ) ? $instance['link_italic'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_bg_color = isset( $instance['link_bg_color'] ) ? esc_attr($instance['link_bg_color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_border_width = isset( $instance['link_border_width'] ) ? esc_attr($instance['link_border_width']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_border_style = isset( $instance['link_border_style'] ) ? $instance['link_border_style'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_border_color = isset( $instance['link_border_color'] ) ? esc_attr($instance['link_border_color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_underline = isset( $instance['hover_underline'] ) ? $instance['hover_underline'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_bold = isset( $instance['hover_bold'] ) ? $instance['hover_bold'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_italic = isset( $instance['hover_italic'] ) ? $instance['hover_italic'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_bg_color = isset( $instance['hover_bg_color'] ) ? esc_attr($instance['hover_bg_color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_color = isset( $instance['hover_color'] ) ? esc_attr($instance['hover_color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_border_width = isset( $instance['hover_border_width'] ) ? esc_attr($instance['hover_border_width']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_border_style = isset( $instance['hover_border_style'] ) ? $instance['hover_border_style'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_border_color = isset( $instance['hover_border_color'] ) ? esc_attr($instance['hover_border_color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$days_old \t\t\t= isset( $instance['days_old'] ) ? esc_attr($instance['days_old']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$line_height \t\t= isset( $instance['line_height'] ) ? esc_attr($instance['line_height']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$separator \t\t\t= isset( $instance['separator'] ) ? esc_attr($instance['separator']) : '';\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$prefix \t\t\t= isset( $instance['prefix'] ) ? esc_attr($instance['prefix']) : '';\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$suffix \t\t\t= isset( $instance['suffix'] ) ? esc_attr($instance['suffix']) : '';\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$post_type = isset( $instance['post_type'] ) ? $instance['post_type'] : array('post');\n\n\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$configurations = get_option('utcw_saved_configs');\n\n\t\t$args = array(\n\t\t\t'public' => true\n\t\t);\n\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$available_post_types = get_post_types($args);\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$available_taxonomies = get_taxonomies();\n\n\t\t// Content of the widget settings form\n\t\trequire \"settings.php\";\n\t}", "public function form(){\n \t \tif($this->layoutWidgetInfo){\n \t\t$setting = json_decode($this->layoutWidgetInfo->setting, true);\n \t}\n\n \t//default option(type[text], cols[3-9], rows[1], label[$key], name[$key], value[$setting[$k]])\n \t//add option(class, id, stype, styleRow, required, placeholder, attr, [options, code])\n \t$settingForm = array(\n \t\t'layout_widget_id' \t=> array('type' => 'hidden', 'value' => $this->layoutWidgetInfo->layoutWidgetId),\n \t\t'widget_controller' => array('type' => 'hidden', 'value' => $this->widgetController),\n \t\t'header' \t=> array('type' => 'custom', 'value' => \"<h4 class='widget_header col-md-12'>{$this->widgetController}</h4>\", 'label' => ''),\n\n \t\t'title' => array(),\n \t\t'class'\t=> array(),\n 'bg_color'\t=> array('label' => 'Màu nền', 'class' => 'ColorPickerSliders',\n 'addElement' => '<a href=\"index.php?r=admin/help/view&helpId=4\" target=\"_blank\">Xem thêm</a>'),\n \t\t'category_id'\t=> array('type' => 'select_category', 'label' => 'Category', 'required' => true,\n \t\t\t\t'options' => CategoryExt::getCategoryList()),\n \t\t'style'\t=> array('type' => 'select', 'options' => $this->settingDefault['style']),\n \t\t'order_by' => array('type' => 'select', 'options' => $this->settingDefault['order_by']),\n \t\t'order_direction' => array('type' => 'select', 'options' => $this->settingDefault['order_direction']),\n \t);\n\n \t$settingAll = array(\n \t\t'cols' => '3-9'\n \t);\n\n \t//render setting from\n \tTemplateHelper::renderForm($settingForm, $setting, $settingAll);\n TemplateHelper::getTemplate('layout/_extra/add_setting.php', $setting);\n TemplateHelper::getTemplate('layout/_extra/color_picker.php');\n \t}", "function buildTabs()\r\n {\r\n $this->_formBuilt = true;\r\n\r\n // Here we get all page names in the controller\r\n $pages = array();\r\n $myName = $current = $this->getAttribute('id');\r\n while (null !== ($current = $this->controller->getPrevName($current))) {\r\n $pages[] = $current;\r\n }\r\n $pages = array_reverse($pages);\r\n $pages[] = $current = $myName;\r\n while (null !== ($current = $this->controller->getNextName($current))) {\r\n $pages[] = $current;\r\n }\r\n // Here we display buttons for all pages, the current one's is disabled\r\n foreach ($pages as $pageName) {\r\n $disabled = ($pageName == $myName ? array('disabled' => 'disabled')\r\n : array());\r\n\r\n $tabs[] = $this->createElement('submit',\r\n $this->getButtonName($pageName),\r\n ucfirst($pageName),\r\n array('class' => 'flat') + $disabled);\r\n }\r\n $this->addGroup($tabs, 'tabs', null, '&nbsp;', false);\r\n }", "private function buildGitHubWForm(&$form) {\n $git_settings = $this->configFactory->get('simple_git.settings');\n\n $form['git_hub'] = [\n '#type' => 'fieldset',\n '#title' => $this->t('GitHub Web settings'),\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n ];\n\n $form['git_hub']['git_hub_app_id'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitHub App Web Id'),\n '#description' => $this->t('GitHub App Web Id value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITHUB\n )['app_id'],\n ];\n\n $form['git_hub']['git_hub_app_secret'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitHub App Web Secret'),\n '#description' => $this->t('GitHub App Web Secret value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITHUB\n )['app_secret'],\n ];\n\n $form['git_hub']['git_hub_app_url_redirect'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitHub URL Web Redirect'),\n '#description' => $this->t('GitHub URL Web Redirect value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITHUB\n )['app_url_redirect'],\n ];\n\n $form['git_hub']['git_hub_app_name'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitHub App Web Name'),\n '#description' => $this->t('GitHub App Web Name'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITHUB\n )['app_name'],\n ];\n\n }", "static function lengthForm (ViewRegistry $context) {\n $lengths=array(10,20,50,100,\"*\");\n\n $form=\"<form action=\\\"\\\" method=\\\"get\\\" id=\\\"perPage\\\" drawer=\\\"Per\\\"><p>\".l(\"Per page:\").\" <select name=\\\"length\\\">\";\n $optList=\"\";\n foreach ($lengths as $l) {\n $optList.=\"<option value=\\\"\".$l.\"\\\"\";\n if ( $l==$context->g(\"length\") ) $optList.=\" selected=\\\"selected\\\"\";\n $optList.=\">\".$l.\"</option>\";\n }\n //<option value=\"10\">10</option>\n $form.=$optList;\n $form.=\"</select> <input type=\\\"submit\\\" value=\\\"\".l(\"Apply\").\"\\\"/>\";\n $defineBase=\"<input type=\\\"hidden\\\" name=\\\"\";\n $bs=$context->g(\"base\");\n $defineBase.=$bs.\"\\\" value=\\\"\";\n if ( $bs == \"begin\" ) $defineBase.=$context->g(\"begin\");\n else if ( $bs == \"end\" ) $defineBase.=$context->g(\"end\");\n else throw new UsageException (\"Illegal value at \\\"base\\\" key :\".$bs.'!');\n $defineBase.=\"\\\"/>\";\n $form.=$defineBase.\"</p></form>\";\n return ($form);\n }", "protected function form()\n {\n $form = new Form(new Activity);\n\n $form->text('log_name', 'Log name');\n $form->textarea('description', 'Description');\n $form->number('subject_id', 'Subject id');\n $form->text('subject_type', 'Subject type');\n $form->number('causer_id', 'Causer id');\n $form->text('causer_type', 'Causer type');\n $form->text('properties', 'Properties');\n\n return $form;\n }", "function buildQuickForm( ) {\n // and the grades\n require_once 'School/Utils/Conference.php';\n $details = School_Utils_Conference::getReminderDetails( );\n $string = array();\n foreach ( $details as $name => $grade ) {\n $string[] = \"{$name} (Grade: {$grade})\";\n }\n $this->assign( 'conferenceTeachers',\n implode( ', ', $string ) );\n\n $this->addButtons(array( \n array ( 'type' => 'refresh', \n 'name' => ts( 'Send Reminder' ),\n 'spacing' => '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;', \n 'isDefault' => true ), \n array ( 'type' => 'cancel', \n 'name' => ts('Cancel') ), \n )\n );\n }", "public function createForm() {\n module_load_include('inc', 'islandora_form_builder', 'FormGenerator');\n $form_values = &$this->formState['values'];\n $file = isset($form_values['ingest-file-location']) ? $form_values['ingest-file-location'] : '';\n $form['#attributes']['enctype'] = 'multipart/form-data';\n $form['indicator']['ingest-file-location'] = array(\n '#type' => 'file',\n '#title' => t('Upload Document'),\n '#size' => 48,\n '#description' => t('Select file to be added the the object.'),\n );\n $form_generator = FormGenerator::CreateFromModel($this->contentModelPid, $this->contentModelDsid);\n $form[FORM_ROOT] = $form_generator->generate($this->formName); // TODO get from user .\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Ingest'),\n '#prefix' => t('Please be patient. Once you click next there may be a number of files created. ' .\n 'Depending on your content model this could take a few minutes to process.<br />')\n );\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Goodss);\n $form->switch('is_enable','状态')->options([\n 'on' => ['value' => 1, 'text' => '正常', 'color' => 'primary'],\n 'off' => ['value' => 0, 'text' => '禁止', 'color' => 'default'],\n ]);\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`删除`按钮\n $tools->disableDelete();\n // 去掉`查看`按钮\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n\n // 去掉`重置`按钮\n //$footer->disableReset();\n\n // 去掉`提交`按钮\n //$footer->disableSubmit();\n\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n return $form;\n }", "private function build()\n {\n $this->form->addText(\n 'name',\n $this->teamMember === null ? null : $this->teamMember->getName(),\n null,\n 'inputText title',\n 'inputTextError title'\n );\n\n $this->form->addEditor(\n 'description',\n $this->teamMember === null ? null : $this->teamMember->getDescription()\n );\n\n $this->meta = new Meta(\n $this->form,\n $this->teamMember === null ? null : $this->teamMember->getMetaId(),\n 'name',\n true\n );\n }", "public function construct()\r\n\t{\r\n\t\t\r\n\t\t\r\n\t\t$class = ($this->classClr) ? 'w50 clr' : 'w50';\r\n\t\t$class = ($this->classLong) ? 'long clr' : $class;\r\n\t\t$class .= ($this->picker) ? ' wizard' : '';\r\n\t\t\r\n\t\t$wizard = ($this->picker == 'page') ? array(array('tl_content', 'pagePicker')) : false;\r\n\t\t\r\n\t\t// input unit\r\n\t\tif (($this->picker == 'unit'))\r\n\t\t{\r\n\t\t\t$options = array();\r\n\t\t\tforeach (deserialize($this->units) as $arrOption)\r\n\t\t\t{\r\n\t\t\t\t$options[$arrOption['value']] = $arrOption['label'];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// the text field\r\n\t\t$this->generateDCA(($this->picker != 'unit') ? ($this->multiple) ? 'multiField' : 'textField' : 'inputUnit', array\r\n\t\t(\r\n\t\t\t'inputType' =>\t($this->picker == 'unit') ? 'inputUnit' : 'text',\r\n\t\t\t'label'\t\t=>\tarray($this->label, $this->description),\r\n\t\t\t'default'\t=>\t$this->defaultValue,\r\n\t\t\t'wizard'\t=>\t$wizard,\r\n\t\t\t'options'\t=>\t$options,\r\n\t\t\t'eval'\t\t=>\tarray\r\n\t\t\t(\r\n\t\t\t\t'mandatory'\t\t=>\t($this->mandatory) ? true : false, \r\n\t\t\t\t'minlength'\t\t=>\t$this->minlength, \r\n\t\t\t\t'maxlength'\t\t=>\t$this->maxLength, \r\n\t\t\t\t'tl_class'\t\t=>\t$class,\r\n\t\t\t\t'rgxp'\t\t\t=>\t$this->rgxp,\r\n\t\t\t\t'multiple'\t\t=>\t($this->multiple) ? true : false,\r\n\t\t\t\t'size'\t\t\t=>\t$this->multiple,\r\n\t\t\t\t'datepicker' \t=> \t($this->picker == 'datetime') ? true : false,\r\n\t\t\t\t'colorpicker' \t=> \t($this->picker == 'color') ? true : false,\r\n\t\t\t\t'isHexColor' \t=> \t($this->picker == 'color') ? true : false,\r\n\t\t\t),\r\n\t\t));\r\n\t\t\r\n\t}", "protected function definition_inner(&$mform) {\n\n $norepeats = $this->_customdata['norepeats']; // number of dimensions to display\n $descriptionopts = $this->_customdata['descriptionopts']; // wysiwyg fields options\n $current = $this->_customdata['current']; // current data to be set\n\n $mform->addElement('hidden', 'norepeats', $norepeats);\n $mform->setType('norepeats', PARAM_INT);\n // value not to be overridden by submitted value\n $mform->setConstants(array('norepeats' => $norepeats));\n\n $levelgrades = array();\n for ($i = 100; $i >= 0; $i--) {\n $levelgrades[$i] = $i;\n }\n\n for ($i = 0; $i < $norepeats; $i++) {\n $mform->addElement('header', 'dimension'.$i, get_string('dimensionnumber', 'workshopform_rubric', $i+1));\n $mform->addElement('hidden', 'dimensionid__idx_'.$i);\n $mform->setType('dimensionid__idx_'.$i, PARAM_INT);\n $mform->addElement('editor', 'description__idx_'.$i.'_editor',\n get_string('dimensiondescription', 'workshopform_rubric'), '', $descriptionopts);\n if (isset($current->{'numoflevels__idx_' . $i})) {\n $numoflevels = max($current->{'numoflevels__idx_' . $i} + self::ADDLEVELS, self::MINLEVELS);\n } else {\n $numoflevels = self::MINLEVELS;\n }\n $prevlevel = -1;\n for ($j = 0; $j < $numoflevels; $j++) {\n $mform->addElement('hidden', 'levelid__idx_' . $i . '__idy_' . $j);\n $mform->setType('levelid__idx_' . $i . '__idy_' . $j, PARAM_INT);\n $levelgrp = array();\n $levelgrp[] = $mform->createElement('select', 'grade__idx_'.$i.'__idy_'.$j,'', $levelgrades);\n $levelgrp[] = $mform->createElement('textarea', 'definition__idx_'.$i.'__idy_'.$j, '', array('cols' => 60, 'rows' => 3));\n $mform->addGroup($levelgrp, 'level__idx_'.$i.'__idy_'.$j, get_string('levelgroup', 'workshopform_rubric'), array(' '), false);\n $mform->setDefault('grade__idx_'.$i.'__idy_'.$j, $prevlevel + 1);\n if (isset($current->{'grade__idx_'.$i.'__idy_'.$j})) {\n $prevlevel = $current->{'grade__idx_'.$i.'__idy_'.$j};\n } else {\n $prevlevel++;\n }\n }\n }\n\n $mform->registerNoSubmitButton('adddims');\n $mform->addElement('submit', 'adddims', get_string('addmoredimensions', 'workshopform_rubric',\n workshop_rubric_strategy::ADDDIMS));\n $mform->closeHeaderBefore('adddims');\n\n $mform->addElement('header', 'configheader', get_string('configuration', 'workshopform_rubric'));\n $layoutgrp = array();\n $layoutgrp[] = $mform->createElement('radio', 'config_layout', '',\n get_string('layoutlist', 'workshopform_rubric'), 'list');\n $layoutgrp[] = $mform->createElement('radio', 'config_layout', '',\n get_string('layoutgrid', 'workshopform_rubric'), 'grid');\n $mform->addGroup($layoutgrp, 'layoutgrp', get_string('layout', 'workshopform_rubric'), array('<br />'), false);\n $mform->setDefault('config_layout', 'list');\n $this->set_data($current);\n }", "protected function buildControl()\n\t\t{\n\t\t\tswitch($this->getDisplayMode())\n\t\t\t{\n\t\t\t\tcase self::DISPLAYMODE_ICONS :\n\t\t\t\t\t$this->buildIconView();\n\t\t\t\t\tbreak;\n\t\t\t\tcase self::DISPLAYMODE_LIST :\n\t\t\t\t\t$this->buildListView();\n\t\t\t\t\tbreak;\n\t\t\t\tcase self::DISPLAYMODE_DETAILS :\n\t\t\t\t\t$this->buildDetailView();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstatic::fail(\"Unknown DisplayMode '%s'\", $this->getDisplayMode());\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "public function buildForm()\n {\n $this\n ->add(\n 'new_organization_group',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\OrganizationGroupInformation',\n 'label' => false,\n ]\n ]\n )\n ->add(\n 'group_admin_information',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\GroupAdmin',\n 'label' => false,\n ]\n ]\n )\n ->addSaveButton();\n }", "function initSettingsTypeForm()\n\t{\n\t\tinclude_once(\"./Services/Administration/classes/class.ilSetting.php\");\n\t\t$type = ilSetting::_getValueType();\n\n\t\tinclude_once (\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n $form = new ilPropertyFormGUI();\n\n\t\t$form->setId(\"settings_type\");\n\t\t$form->setTitle($this->lng->txt(\"settings_type\"));\n\t\t$form->setFormAction(\"setup.php?cmd=gateway\");\n\n\t\t$item = new ilNonEditableValueGUI($this->lng->txt('settings_type_current'));\n\t\t$item->setValue(strtoupper($type));\n\n\t\tif ($type == \"clob\")\n\t\t{\n\t\t\t$item->setInfo($this->lng->txt('settings_info_clob'));\n $form->addCommandButton(\"showLongerSettings\", $this->lng->txt(\"settings_show_longer\"));\n $form->addCommandButton(\"changeSettingsType\", $this->lng->txt(\"settings_change_text\"));\n\t }\n\t\telse\n\t\t{\n\t\t\t$item->setInfo($this->lng->txt('settings_info_text'));\n \t$form->addCommandButton(\"changeSettingsType\", $this->lng->txt(\"settings_change_clob\"));\n\t\t}\n\t\t$form->addItem($item);\n\n\t\tif (is_array($this->longer_settings))\n\t\t{\n\t\t\t$item = new ilCustomInputGUI($this->lng->txt('settings_longer_values'));\n\n\t\t\tif (count($this->longer_settings))\n\t\t\t{\n\t foreach ($this->longer_settings as $row)\n\t\t\t\t{\n\t $subitem = new ilCustomInputGUI(sprintf($this->lng->txt('settings_key_info'), $row['module'], $row['keyword']));\n\t\t\t\t\t$subitem->setInfo($row['value']);\n\t\t\t\t\t$item->addSubItem($subitem);\n\t }\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t $item->setHTML($this->lng->txt('settings_no_longer_values'));\n\t }\n\t\t\t$form->addItem($item);\n\t }\n\n\t\treturn $form;\n\t}", "public static function drawLoggingOptions()\n {\n $buildopts = array(\n 'files' => jgettext('Log file contents')\n , 'profile' => jgettext('Profile')\n );\n\n //--Get component parameters\n $params = JComponentHelper::getParams('com_easycreator');\n\n echo NL.'<div class=\"logging-options\">';\n\n $js = \"v =( $('div_buildopts').getStyle('display') == 'block') ? 'none' : 'block';\";\n $js .= \"$('div_buildopts').setStyle('display', v);\";\n\n $checked =($params->get('logging')) ? ' checked=\"checked\"' : '';\n echo NL.'<input type=\"checkbox\" onchange=\"'.$js.'\" name=\"buildopts[]\"'.$checked.' value=\"logging\" id=\"logging\" />';\n echo NL.'<label for=\"logging\">'.jgettext('Activate logging').'</label>';\n\n $style =($params->get('logging')) ? '' : ' style=\"display: none;\"';\n echo NL.' <div id=\"div_buildopts\"'.$style.'>';\n\n foreach($buildopts as $name => $titel)\n {\n //--Get component parameters\n $checked =($params->get($name)) ? ' checked=\"checked\"' : '';\n\n echo NL.'&nbsp;|__';\n echo NL.'<input type=\"checkbox\" name=\"buildopts[]\"'.$checked.' value=\"'.$name.'\" id=\"'.$name.'\" />';\n echo NL.'<label for=\"'.$name.'\">'.$titel.'</label><br />';\n }//foreach\n\n echo NL.' </div>';\n echo NL.'</div>';\n }", "function build() {\n\t\t$this->order_id = new view_field(\"Order ID\");\n\t\t$this->timestamp = new view_field(\"Date\");\n\t\t$this->total_amount = new view_field(\"Amount\");\n $this->view= new view_element(\"static\");\n \n $translations = new translations(\"fields\");\n $invoice_name = $translations->translate(\"fields\",\"Invoice\",true);\n $this->view->value=\"<a href=\\\"/orders/order_details.php?order_id={$this->_order_id}\\\" target=\\\"invoice\\\">\".$invoice_name.\"</a>\";\n\n\t\tif(isset($_SESSION['wizard']['complete']['process_time']))\n\t\t{\n\t\t\t$this->process_time = new view_field(\"Seconds to process\");\n\t\t\t$this->process_time->value=$_SESSION['wizard']['complete']['process_time'];\n\t\t\t$this->server = new view_field();\n\t\t\t$address_parts = explode('.',$_SERVER['SERVER_ADDR']);\n\t\t\t$this->server->value = $address_parts[count($address_parts) - 1];\n\t\t}\n\t\tparent::build();\n\t}", "protected function form()\n {\n $form = new Form(new Terrace());\n\n $form->image('image', __('平台图片'))->rules('required', ['required' => '平台图片不能为空']);\n $form->text('name', __('平台名称'))->rules('required', ['required' => '平台名称不能为空']);\n $form->text('path', __('外链'))->rules('required', ['required' => '平台外链不能为空']);\n $form->text('notice_info', __('提示语'))->rules('required', ['required' => '平台提示语不能为空']);\n $form->radio('status','状态')->options(['1' => '未推荐', '2'=> '已推荐'])->default(1);\n\n return $form;\n }", "protected function definition_inner($mform) {\n global $PAGE;\n $PAGE->requires->jquery();\n $PAGE->requires->jquery_plugin('ui');\n $PAGE->requires->jquery_plugin('ui-css');\n\n $PAGE->requires->strings_for_js(array('itemsettingserror', 'editquestiontext', 'additemsettings',\n 'correct', 'incorrect'), 'qtype_gapfill');\n $PAGE->requires->js('/question/type/gapfill/questionedit.js');\n $mform->addElement('hidden', 'reload', 1);\n $mform->setType('reload', PARAM_RAW);\n\n $mform->removeelement('questiontext');\n /*for storing the json containing the settings data */\n $mform->addElement('hidden', 'itemsettings', '', array('size' => '80'));\n $mform->setType('itemsettings', PARAM_RAW);\n\n /* popup for entering feedback for individual words */\n $mform->addElement('html', '<div id=\"id_itemsettings_popup\" title=\"' . get_string('additemsettings', 'qtype_gapfill')\n . '\" style=\"display:none;background-color:lightgrey\" >');\n $mform->addElement('editor', 'correct', '', array('size' => 70, 'rows' => 4), $this->editoroptions);\n $mform->addElement('editor', 'incorrect', '', array('size' => 70, 'rows' => 4), $this->editoroptions);\n $mform->addElement('html', '</div>');\n\n /* presented for clicking on the gaps once they have been given numberical ids */\n $mform->addElement('html',\n '<div class=\"gapfill\" id=\"id_itemsettings_canvas\" style=\"display:none;background-color:lightgrey\" ></div>');\n\n $mform->addElement('html', '<div id=\"questiontext\" >');\n $mform->addElement('editor', 'questiontext', get_string('questiontext', 'question'), array('rows' => 10),\n $this->editoroptions);\n $mform->addElement('html', '</div>');\n\n $mform->setType('questiontext', PARAM_RAW);\n $mform->addHelpButton('questiontext', 'questiontext', 'qtype_gapfill');\n\n $mform->addElement('button', 'itemsettings_button', get_string('itemsettingsbutton', 'qtype_gapfill'));\n $mform->addHelpButton('itemsettings_button', 'itemsettings_button', 'qtype_gapfill');\n\n $mform->removeelement('generalfeedback');\n\n // Default mark will be set to 1 * number of fields.\n $mform->removeelement('defaultmark');\n\n $mform->addElement('editor', 'wronganswers', get_string('wronganswers', 'qtype_gapfill'),\n array('size' => 70, 'rows' => 1), $this->editoroptions);\n $mform->addHelpButton('wronganswers', 'wronganswers', 'qtype_gapfill');\n\n /* Only allow plain text in for the comma delimited set of wrong answer values\n * wrong answers really should be a set of zero marked ordinary answers in the answers\n * table.\n */\n $mform->setType('wronganswers', PARAM_TEXT);\n\n $mform->addElement('editor', 'generalfeedback', get_string('generalfeedback', 'question')\n , array('rows' => 10), $this->editoroptions);\n\n $mform->setType('generalfeedback', PARAM_RAW);\n $mform->addHelpButton('generalfeedback', 'generalfeedback', 'question');\n $mform->addElement('header', 'feedbackheader', get_string('moreoptions', 'qtype_gapfill'));\n\n // The delimiting characters around fields.\n $config = get_config('qtype_gapfill');\n /* turn config->delimitchars into an array) */\n $delimitchars = explode(\",\", $config->delimitchars);\n /* copies the values into the keys */\n $delimitchars = array_combine($delimitchars, $delimitchars);\n /* strip any spaces from keys. This is about backward compatibility with old code\n * and avoiding having to expand the size of the delimitchar column from its current\n * 2. The value in the drop down looks better with a gap between the delimitchars, but\n * a gap in the key will break the insert into the question_gapfill table\n */\n foreach ($delimitchars as $key => $value) {\n $key2 = str_replace(' ', '', $key);\n $delimitchars2[$key2] = $value;\n }\n $mform->addElement('select', 'delimitchars', get_string('delimitchars', 'qtype_gapfill'), $delimitchars2);\n $mform->addHelpButton('delimitchars', 'delimitchars', 'qtype_gapfill');\n\n $answerdisplaytypes = array(\"dragdrop\" => get_string('displaydragdrop', 'qtype_gapfill'),\n \"gapfill\" => get_string('displaygapfill', 'qtype_gapfill'),\n \"dropdown\" => get_string('displaydropdown', 'qtype_gapfill'));\n\n $mform->addElement('select', 'answerdisplay', get_string('answerdisplay', 'qtype_gapfill'), $answerdisplaytypes);\n $mform->addHelpButton('answerdisplay', 'answerdisplay', 'qtype_gapfill');\n\n /* sets all gaps to the size of the largest gap, avoids giving clues to the correct answer */\n $mform->addElement('advcheckbox', 'fixedgapsize', get_string('fixedgapsize', 'qtype_gapfill'));\n $mform->addHelpButton('fixedgapsize', 'fixedgapsize', 'qtype_gapfill');\n\n /* put draggable answer options after the text. They don't have to be dragged as far, handy on small screens */\n $mform->addElement('advcheckbox', 'optionsaftertext', get_string('optionsaftertext', 'qtype_gapfill'));\n $mform->setDefault('optionsaftertext', $config->optionsaftertext);\n $mform->addHelpButton('optionsaftertext', 'optionsaftertext', 'qtype_gapfill');\n\n /* use plain string matching instead of regular expressions */\n $mform->addElement('advcheckbox', 'disableregex', get_string('disableregex', 'qtype_gapfill'));\n $mform->addHelpButton('disableregex', 'disableregex', 'qtype_gapfill');\n $mform->setDefault('disableregex', $config->disableregex);\n $mform->setAdvanced('disableregex');\n\n $mform->addElement('advcheckbox', 'letterhints', get_string('letterhints', 'qtype_gapfill'));\n $mform->setDefault('letterhints', $config->letterhints);\n $mform->addHelpButton('letterhints', 'letterhints', 'qtype_gapfill');\n\n /* Discards duplicates before processing answers, useful for tables with gaps like [cat|dog][cat|dog] */\n $mform->addElement('advcheckbox', 'noduplicates', get_string('noduplicates', 'qtype_gapfill'));\n $mform->addHelpButton('noduplicates', 'noduplicates', 'qtype_gapfill');\n $mform->setAdvanced('noduplicates');\n\n /* Makes marking case sensitive so Cat is not the same as cat */\n $mform->addElement('advcheckbox', 'casesensitive', get_string('casesensitive', 'qtype_gapfill'));\n $mform->setDefault('casesensitive', $config->casesensitive);\n $mform->addHelpButton('casesensitive', 'casesensitive', 'qtype_gapfill');\n $mform->setAdvanced('casesensitive');\n\n // To add combined feedback (correct, partial and incorrect).\n $this->add_combined_feedback_fields(true);\n\n // Adds hinting features.\n $this->add_interactive_settings(true, true);\n if ($config->letterhints && $config->addhinttext) {\n $this->_form->getElement('hint[0]')->setValue(array('text' => get_string('letterhint0', 'qtype_gapfill')));\n $this->_form->getElement('hint[1]')->setValue(array('text' => get_string('letterhint1', 'qtype_gapfill')));\n }\n }", "protected function createComponentTarifForm()\r\n\t{\r\n\t\t$form = new Form;\r\n\t\t$form->addText('name', 'Jméno:')\r\n\t\t\t->setRequired('Zadej jméno.');\r\n\r\n\t\t$form->addText('apicode', 'API Code:');\r\n\r\n\t\t$form->addText('price', 'Cena:')\r\n\t\t ->addRule(Form::INTEGER, 'Cena musí být číslo')\r\n\t\t\t->setRequired('Zadej cenu.');\r\n\t\t\r\n\t\t$form->addText('description', 'Popis:');\r\n\t\t\t\r\n\t\t$form->addSubmit('save', 'Uložit')\r\n\t\t\t->setAttribute('class', 'default')\r\n\t\t\t->onClick[] = $this->tarifFormSucceeded;\r\n\r\n\t\t$form->addSubmit('cancel', 'Cancel')\r\n\t\t\t->setValidationScope(NULL)\r\n\t\t\t->onClick[] = $this->formCancelled;\r\n\r\n\t\t$form->addProtection();\r\n\t\treturn $form;\r\n\t}", "public function buildPaneForm(array $pane_form, FormStateInterface $form_state, array &$complete_form);", "public function init()\n\t{\n\t\tparent::init();\n\t\t$this->addCssClass($this->options, 'progress');\n\t}", "protected function form()\n {\n $form = new Form(new $this->currentModel);\n \n $form->display('id', 'ID');\n $form->select('company_id', '公司名称')->options(Company::getSelectOptions());\n $form->text('project_name', '项目名称');\n $form->image('project_photo', '项目图片')->uniqueName()->move('public/photo/images/custom_thum/');\n $form->url('link_url', '项目链接');\n $form->radio('display', '公开度')->options(['0' => '公开', '-1'=> '保密'])->default('0');\n //$form->display('created_at', 'Created At');\n //$form->display('updated_at', 'Updated At');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Setting());\n\n $form->decimal('member_fee', __('会员年费'))->required();\n $form->decimal('task_rate', __('任务佣金抽成比例'))->required()->help('将扣除对应比例,比例范围0-1');\n $form->tools(function (Form\\Tools $tools) {\n\n // 去掉`列表`按钮\n $tools->disableList();\n\n // 去掉`删除`按钮\n $tools->disableDelete();\n\n // 去掉`查看`按钮\n $tools->disableView();\n });\n\n $form->footer(function ($footer) {\n\n // 去掉`重置`按钮\n $footer->disableReset();\n\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n\n //保存后回调\n $form->saved(function (Form $form) {\n $success = new MessageBag([\n 'title' => '提示',\n 'message' => '保存成功',\n ]);\n\n return back()->with(compact('success'));\n });\n return $form;\n }", "protected function form() {\n\t\treturn Admin::form(WhtSpiderLogModel::class,function (Form $form) {\n\t\t\t$directors = [\n\t\t\t\t'成功' => 1,\n\t\t\t\t'失败' => 0,\n\t\t\t];\n\t\t\t$form->select('status','状态')->options($directors);\n\t\t\t$form->setAction('采集');\n\t\t});\n\t}", "protected function form()\n {\n $form = new Form(new Cate());\n\n $form->text('name', __('Name'));\n $form->url('link', __('Link'));\n $form->text('thumb', __('Thumb'));\n $form->switch('status', __('Status'));\n $form->number('sort', __('Sort'));\n $form->datetime('createtime', __('Createtime'))->default(date('Y-m-d H:i:s'));\n\n return $form;\n }", "public function buildFormFields()\n {\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"titre\")\n ->setLabel(\"Titre\")\n );\n\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"soustitre\")\n ->setLabel(\"Sous-titre\")\n );\n\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"slug\")\n ->setLabel(\"Slug\")\n );\n\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"url\")\n ->setLabel(\"URL du projet\")\n );\n\n $this->addFormField(\n SharpMarkdownFormFieldConfig::create(\"texte\")\n ->setLabel(\"Texte\")\n ->showToolbar(true)\n );\n\n $this->addFormField(\n SharpCheckFormFieldConfig::create(\"is_open_source\")\n ->setText(\"Projet Open-source\")\n );\n\n $this->addFormField(\n SharpPivotFormFieldConfig::create(\"technos\", SharpTechnoRepository::class)\n ->setLabel(\"Technologies\")\n ->setAddable(true)\n ->setSortable(true)\n ->setOrderAttribute(\"ordre\")\n ->setCreateAttribute(\"nom\")\n );\n\n $this->addFormField(\n SharpListFormFieldConfig::create(\"screenshots\")\n ->setLabel(\"Screenshots\")\n ->setSortable(true)->setOrderAttribute(\"ordre\")\n ->setAddable(true)->setAddButtonText(\"Ajouter un screenshot\")\n ->setRemovable(true)->setRemoveButtonText(\"Supprimer\")\n ->addItemFormField(\n SharpFileFormFieldConfig::create(\"fichier\")\n ->setFileFilterImages()\n ->setMaxFileSize(5)\n ->setThumbnail(\"100x100\")\n ->addGeneratedThumbnail(\"600x\"))\n ->addItemFormField(\n SharpTextFormFieldConfig::create(\"tag\")\n ->addAttribute(\"placeholder\", \"Tag\"))\n ->addItemFormField(\n SharpTextareaFormFieldConfig::create(\"legende\")\n ->setRows(3))\n ->setItemFormTemplate(\n SharpListItemFormTemplateConfig::create()\n ->addField(\"fichier\")\n ->addField(\"tag\")\n ->addField(\"legende\")\n )\n );\n\n $this->addFormTemplateColumn(\n SharpFormTemplateColumnConfig::create(7)\n ->addField(\"titre\")\n ->addField(\"soustitre\")\n ->addField([\"slug:5\", \"url:7\"])\n ->addField(\"technos\")\n ->addField(\"is_open_source\")\n\n )->addFormTemplateColumn(\n SharpFormTemplateColumnConfig::create(5)\n ->addField(\"texte\")\n ->addField(\"screenshots\")\n );\n }", "public function build() { $this->form_built = TRUE; return $this; }", "private function buildGitLabMForm(&$form) {\n $git_settings = $this->configFactory->get('simple_git.settings');\n\n $form['git_labM'] = [\n '#type' => 'fieldset',\n '#title' => $this->t('GitLab Mobile settings'),\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n ];\n\n $form['git_labM']['git_labM_app_id'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitLab App Mobile Id'),\n '#description' => $this->t('GitLab App Mobile Id value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITLABM\n )['app_id'],\n ];\n\n $form['git_labM']['git_labM_app_secret'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitLab App Mobile Secret'),\n '#description' => $this->t('GitLab App <mobile Secret value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITLABM\n )['app_secret'],\n ];\n\n $form['git_labM']['git_labM_app_url_redirect'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitLab URL Mobile Redirect'),\n '#description' => $this->t('GitLab URL Mobile Redirect value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITLABM\n )['app_url_redirect'],\n ];\n\n }", "protected function createComponentPrihozForm()\n {\n $id = (int) $this->getParameter('id');\n $form = new Nette\\Application\\UI\\Form;\n \n $form->addText('id_uzivatel')\n ->setAttribute('style', 'display:none')\n ->setDefaultValue($this->user->id);\n\n $form->addText('id_nemovitost')\n ->setAttribute('style', 'display:none')\n ->setDefaultValue($id);\n \n $form->addText('pocet')\n ->setAttribute('style', 'display:none');\n \n $form->addText('vkladana_castka', 'Přihazovaná částka:')\n ->setType('number')\n ->setRequired('Prosím vložte částku, kterou chcete přihodit.')\n ->addRule(Nette\\Application\\UI\\Form::MIN, 'Prosím vložte vyšší částku. Minimální příhoz je 5,000 Kč.', 5000)\n ->setAttribute('placeholder', 'Sem vložte částku v Kč.')\n ->setAttribute('class', 'castka')\n ->setAttribute('step', '1');\n\n $form->addSubmit('send', 'Odeslat formulář')\n ->setAttribute('class', 'btn btn-primary');\n\n $form->onSuccess[] = $this->prihozFormSucceeded;\n return $form;\n }", "public function initGeneralPageSettingsForm()\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\n\t\t$aset = new ilSetting(\"adve\");\n\n\t\t// use physical character styles\n\t\t$cb = new ilCheckboxInputGUI($this->lng->txt(\"adve_use_physical\"), \"use_physical\");\n\t\t$cb->setInfo($this->lng->txt(\"adve_use_physical_info\"));\n\t\t$cb->setChecked($aset->get(\"use_physical\"));\n\t\t$form->addItem($cb);\n\n\t\t// blocking mode\n\t\t$cb = new ilCheckboxInputGUI($this->lng->txt(\"adve_blocking_mode\"), \"block_mode_act\");\n\t\t$cb->setChecked($aset->get(\"block_mode_minutes\") > 0);\n\t\t$form->addItem($cb);\n\n\t\t\t// number of minutes\n\t\t\t$ni = new ilNumberInputGUI($this->lng->txt(\"adve_minutes\"), \"block_mode_minutes\");\n\t\t\t$ni->setMinValue(2);\n\t\t\t$ni->setMaxLength(5);\n\t\t\t$ni->setSize(5);\n\t\t\t$ni->setRequired(true);\n\t\t\t$ni->setInfo($this->lng->txt(\"adve_minutes_info\"));\n\t\t\t$ni->setValue($aset->get(\"block_mode_minutes\"));\n\t\t\t$cb->addSubItem($ni);\n\t\t\n\t\t$form->addCommandButton(\"saveGeneralPageSettings\", $lng->txt(\"save\"));\n\t \n\t\t$form->setTitle($lng->txt(\"adve_pe_general\"));\n\t\t$form->setFormAction($ilCtrl->getFormAction($this));\n\t \n\t\treturn $form;\n\t}", "public function buildForm(array $form, FormStateInterface $form_state) {\n // Call the parent implementation to inherit from the save button and\n // form style.\n $form = parent::buildForm($form, $form_state);\n\n // Add our custom form fields.\n $form['opening_hours'] = array(\n '#type' => 'textarea',\n '#title' => 'Opening hours',\n '#description' => 'Days / hours of the library',\n '#default_value' => $this->config('happy_alexandrie.library_config')->get('opening_hours'),\n '#rows' => 5,\n );\n return $form;\n }", "public function buildForm(array $form, FormStateInterface $form_state) {\n $form['FedoraResource_settings']['#markup'] = 'Settings form for Fedora resource entities. Manage field settings here.';\n return $form;\n }", "public function __construct()\n {\n parent::__construct();\n \n $this->form = new BootstrapFormBuilder;\n $this->form->setFormTitle('Bootstrap Form Builder');\n \n $label1 = new TLabel('Some label', '#7D78B6', 12, 'bi');\n $label1->style='text-align:left;border-bottom:1px solid #c0c0c0;width:100%';\n \n $this->form->appendPage('Page 1');\n $this->form->addContent( [$label1] );\n \n $field1a = new TEntry('row1a');\n $field2a = new TDate('row2a');\n $field2b = new TCombo('row2b');\n $field3a = new TEntry('row3a');\n $field3b = new TEntry('row3b');\n $field3c = new TEntry('row3c');\n $field3d = new TEntry('row3d');\n $field4a = new TText('row4a');\n \n // add a row with 2 slots\n $this->form->addFields( [ new TLabel('Row 1') ],\n [ $field1a ] );\n \n // add a row with 2 slots\n $this->form->addFields( [ new TLabel('Row 2') ],\n [ $field2a, $field2b ] );\n \n // add a row with 4 slots\n $this->form->addFields( [ new TLabel('Row 3') ],\n [ $field3a, $field3b ],\n [ new TLabel('Label') ],\n [ $field3c, $field3d ] );\n \n $field2b->addItems( ['1' => 'One', '2' => 'Two'] );\n \n $field1a->setSize('70%');\n $field2a->setSize('120');\n $field2b->setSize('75%');\n \n $field3a->setSize('50%');\n $field3b->setSize('50%');\n $field3c->setSize('50%');\n $field3d->setSize('50%');\n \n $this->form->appendPage('Page 2');\n \n $label2 = new TLabel('Another label', '#7D78B6', 12, 'bi');\n $label2->style='text-align:left;border-bottom:1px solid #c0c0c0;width:100%';\n \n $this->form->addContent( [$label2] );\n $this->form->addFields( [new TLabel('Row 4')], [$field4a ]);\n $field4a->setSize('100%', 100);\n \n $this->form->addAction('Send', new TAction(array($this, 'onSend')), 'fa:check-circle-o green');\n \n // wrap the page content using vertical box\n $vbox = new TVBox;\n $vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));\n $vbox->add($this->form);\n\n parent::add($this->form);\n }", "protected function form()\n {\n $form = new Form(new Config);\n\n $form->text('key', '配置项')->readOnly();\n\n $form->text('value', '值');\n\n $form->text('desc', '描述');\n\n $form->tools(function(Form\\Tools $tools) {\n $tools->disableView();\n });\n\n return $form;\n }", "abstract function setupform();", "public function form()\n {\n $this->switch('footer_remove', Support::trans('main.footer_remove'))\n ->default(admin_setting('footer_remove'));\n $defaultColors = [\n 'default' => '墨蓝',\n 'blue' => '蓝',\n 'blue-light' => '亮蓝',\n 'green' => '墨绿',\n ];\n foreach (explode(\",\", ServiceProvider::setting('additional_theme_colors')) as $value) {\n if (!empty($value)) {\n [$k, $v] = explode(\":\", $value);\n $defaultColors[$k] = $v;\n }\n }\n\n $this->radio('theme_color', Support::trans('main.theme_color'))\n ->options($defaultColors)\n ->default(admin_setting('theme_color'));\n $this->radio('sidebar_style', Support::trans('main.sidebar_style'))\n ->options([\n 'default' => '默认',\n 'sidebar-separate' => '菜单分离',\n 'horizontal_menu' => '水平菜单'\n ])\n ->default(admin_setting('sidebar_style'));\n $this->switch('grid_row_actions_right', Support::trans('main.grid_row_actions_right'))\n ->help('启用后表格行操作按钮将永远贴着最右侧。')\n ->default(admin_setting('grid_row_actions_right'));\n }", "protected function createComponentRateForm()\r\n\t{\r\n\t\t$form = new Form;\r\n\t\t$form->addText('tarif', 'Tarifní sazba:')\r\n\t\t\t\t->setRequired('Uveďte tarifní hodinovou sazbu.')\r\n\t\t\t\t->setAttribute('class', 'cislo')\r\n\t\t\t\t->addFilter(array('Nette\\Forms\\Controls\\TextBase', 'filterFloat'))\r\n\t\t\t\t\t->controlPrototype->autocomplete('off')\r\n\t\t\t\t->addCondition($form::FILLED)\r\n\t\t\t\t\t\t->addRule($form::FLOAT, 'Hodnota musí být celé nebo reálné číslo.');\r\n\t\t\r\n\t\t$form->addText('hodnota', 'Kalkulační hodnota:')\r\n\t\t\t\t->setRequired('Uveďte kalkulační hodnotu tarifu.')\r\n\t\t\t\t->setAttribute('class', 'cislo')\r\n\t\t\t\t->addFilter(array('Nette\\Forms\\Controls\\TextBase', 'filterFloat'))\r\n\t\t\t\t\t->controlPrototype->autocomplete('off')\r\n\t\t\t\t->addCondition($form::FILLED)\r\n\t\t\t\t\t\t->addRule($form::FLOAT, 'Hodnota musí být celé nebo reálné číslo.');\r\n\r\n\t\t$form->addHidden('id_set_tarifu');\r\n\t\t$form->addHidden('id_typy_tarifu');\r\n\r\n\t\t$form->addSubmit('save', 'Uložit')->setAttribute('class', 'default');\r\n\t\t$form->addSubmit('cancel', 'Storno')->setValidationScope(FALSE);\r\n\t\t$form->onSuccess[] = callback($this, 'rateFormSubmitted');\r\n\r\n\t\t$form->addProtection(self::MESS_PROTECT);\r\n\t\treturn $form;\r\n\t}", "private function initImportBookmarksForm()\n\t{\n\t\tglobal $lng, $ilCtrl, $ilUser;\n\t\t\n\t\tif (!$this->tree->isInTree($this->id))\n\t\t{\n\t\t\t$this->ctrl->setParameter($this, 'bmf_id', '');\n\t\t\t$this->ctrl->redirect($this);\n\t\t}\n\n\t\tinclude_once 'Services/Form/classes/class.ilPropertyFormGUI.php';\n\t\t$form = new ilPropertyFormGUI();\n\t\t$form->setTopAnchor(\"bookmark_top\");\n\t\t$form->setTitle($lng->txt(\"bkm_import\"));\n\t\t\n\t\t$fi = new ilFileInputGUI($lng->txt(\"file_add\"), \"bkmfile\");\n\t\t$fi->setRequired(true);\n\t\t$form->addItem($fi);\n\n\t\t$form->addCommandButton(\"importFile\", $lng->txt('import'));\n\t\t$form->addCommandButton('cancel', $lng->txt('cancel'));\n\t\t\n\t\treturn $form;\n\t}", "protected function form()\n {\n $form = new Form(new Banner);\n\n $form->text('title', 'Title');\n $form->image('image', 'Image')->rules('required')->move('images/banners');\n $form->switch('status', 'Published')->default(1);\n\n $form->footer(function ($footer) {\n // disable `View` checkbox\n $footer->disableViewCheck();\n\n // disable `Continue editing` checkbox\n $footer->disableEditingCheck();\n\n // disable `Continue Creating` checkbox\n $footer->disableCreatingCheck();\n\n });\n return $form;\n }", "public function form( $instance ) {\n\t\t$args = array_merge( $this->defaults, $instance );\n\t\textract( $args );\n\t\tinclude( 'templates/pblw-requirements-widget-settings.php' );\n }", "public function createComponentDateRangeForm() {\n\t\t$form = new NAppForm();\n\t\t\n\t\t$form->addGroup();\n\t\t$form->addText('from', 'Zobrazovať projekty od')\n\t\t\t\t->addRule(NForm::FILLED, 'Vyplňte od akého dátumu sa majú projekty zobrazovať.')\n\t\t\t\t->getControlPrototype()\n\t\t\t\t\t->class('datepicker');\n\t\t$form->addText('to', 'Zobrazovať projekty do')\n\t\t\t\t->addRule(NForm::FILLED, 'Vyplňte do akého dátumu sa majú projekty zobrazovať.')\n\t\t\t\t->getControlPrototype()\n\t\t\t\t\t->class('datepicker');\n\t\t\n\t\t$form->setCurrentGroup(NULL);\n\t\n\t\t$form->addSubmit('process', 'Nastav')\n\t\t\t\t->getControlPrototype()\n\t\t\t\t->class('design');\n\t\t$form->addSubmit('set_default', 'Zobraz všekto')\n\t\t\t\t->setValidationScope(NULL)\n\t\t\t\t->getControlPrototype()\n\t\t\t\t->class('design');\n\t\t$form->addSubmit('back', 'Naspäť')\n\t\t\t\t->setValidationScope(NULL)\n\t\t\t\t->getControlPrototype()\n\t\t\t\t->class('design');\n\t\t\n\t\t$form->onSuccess[] = callback($this, 'dateRangeFormSubmit');\n\t\t\n\t\treturn $form;\n\t}", "public function form( $instance ) {\n\t\t// Set widget defaults\n\t\t$defaults = array(\n\t\t\t'title' => 'remoteok.io Jobs',\n\t\t\t'page_size' => 10\n\t\t);\n\t\t\n\t\t// Parse current settings with defaults\n extract( wp_parse_args( ( array ) $instance, $defaults ) ); ?>\n \n\t\t<p>\n\t\t\t<label for=\"<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>\"><?php _e( 'Widget Title', 'mtc_text' ); ?></label>\n\t\t\t<input class=\"widefat\" id=\"<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>\" name=\"<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>\" type=\"text\" value=\"<?php echo esc_attr( $title ); ?>\" />\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo esc_attr( $this->get_field_id( 'page_size' ) ); ?>\"><?php _e( 'Page Size:', 'mtc_text' ); ?></label>\n\t\t\t<input class=\"widefat\" id=\"<?php echo esc_attr( $this->get_field_id( 'page_size' ) ); ?>\" name=\"<?php echo esc_attr( $this->get_field_name( 'page_size' ) ); ?>\" type=\"number\" min=\"1\" value=\"<?php echo esc_attr( $page_size ); ?>\" />\n\t\t</p>\n\t<?php }", "public function form_footer_progress_block_html() {\n\n\t\t$progress_style = ! empty( $this->form_data['settings']['conversational_forms_progress_bar'] ) ? $this->form_data['settings']['conversational_forms_progress_bar'] : '';\n\n\t\t?>\n\t\t<div class=\"wpforms-conversational-form-footer-progress\">\n\t\t\t<div class=\"wpforms-conversational-form-footer-progress-status\">\n\t\t\t\t<?php\n\t\t\t\tif ( 'proportion' === $progress_style ) {\n\t\t\t\t\t$this->form_footer_progress_status_proportion_html();\n\t\t\t\t} else {\n\t\t\t\t\t$this->form_footer_progress_status_percentage_html();\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<div class=\"wpforms-conversational-form-footer-progress-bar\">\n\t\t\t\t<div class=\"wpforms-conversational-form-footer-progress-completed\"></div>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "protected function form()\n {\n $form = new Form(new Good);\n $form->text('name', __('名称'))->rules('required');\n $form->decimal('amount', __('价格'))->default(0.00)->rules('required');\n $form->text('unit', __('单位'))->rules('required');\n $form->image('list_img', __('缩略图(320*320)'))->creationRules('required');\n $form->hasMany('goodsimgs', __('轮播图(640*640)'),function(Form\\NestedForm $form){\n $form->image('img',__('轮播图'))->creationRules('required');\n });\n $form->kindeditor('describe', __('描述'));\n // 去掉`查看`checkbox\n $form->disableViewCheck();\n // 去掉`继续编辑`checkbox\n $form->disableEditingCheck();\n // 去掉`继续创建`checkbox\n $form->disableCreatingCheck();\n return $form;\n }", "protected function form()\n {\n $form = new Form(new BuSong);\n\n// $form->number('serialid', __('Serialid'));\n $form->text('svrkey', __('svrkey'));\n $form->text('songname', __('歌名'));\n $form->text('singer', __('歌星'));\n $form->select('langtype', __('语种'))->options([0=>'国语',1=>'粤语',2=>'英语',3=>'台语',4=>'日语',5=>'韩语',6=>'不详']);\n $form->text('remarks', __('备注'));\n $form->datetime('createdate', __('创建时间'))->default(date('Y-m-d H:i:s'));\n $form->select('ischeck', __('是否检查'))->options([0=>'否',1=>'是']);\n $form->select('buState', __('状态'))->options([0=>'新增',1=>'处理中',2=>'完成',3=>'歌曲信息出错',4=>'取消无法处理',5=>'已上传',6=>'彻底删除']);\n $form->text('musicdbpk', __('musicdbpk'));\n $form->text('optionRemarks', __('操作日志'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Information);\n \n \n\n $form->text('name', __('项目名称'))->autofocus()->placeholder('例:上汽大众新能源汽车工厂项目')->required();\n $form->text('industry', __('行业类别'))->required();\n $form->currency('investment', __('投资金额'))->icon('fa-usd')->required(); \n $form->text('cont_name', __('资方联系人'))->placeholder('选填内容,可为空');\n $form->text('cont_phone', __('资方联系方式'))->placeholder('选填内容,可为空');\n $form->text('staff_name', __('工作人员姓名'));\n $form->text('staff_phone', __('工作人员电话'));\n $form->hidden('adminuser_id', __('adminuser_id'))->value(Admin::user()->id);\n $form->textarea('content', __('项目情况'))->required()->placeholder('请填写项目介绍(包括项目投资额度、产业类别等)、项目需求(如土地、排放、能耗等)、谈判进度等......');\n\n\n\n $form->tools(function (Form\\Tools $tools) {\n\n // 去掉`列表`按钮\n $tools->disableList();\n\n });\n\n $form->footer(function ($footer) {\n\n // 去掉`重置`按钮\n $footer->disableReset();\n\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n\n $form->setAction('../admin/myinfo');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new LotteryCode());\n\n $form->text('code', __('Code'));\n $form->number('batch_num', __('Batch num'));\n $form->text('prizes_name', __('Prizes name'));\n $form->datetime('valid_period', __('Valid period'))->default(date('Y-m-d H:i:s'));\n $form->datetime('prizes_time', __('Prizes time'))->default(date('Y-m-d H:i:s'));\n $form->text('operator', __('Operator'));\n $form->switch('award_status', __('Award status'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new gameLog());\n\n $form->text('onlyId', ___('OnlyId'));\n $form->number('bigBlindIndex', ___('BigBlindIndex'));\n $form->number('gameNums', ___('GameNums'));\n $form->number('smallBlindIndex', ___('SmallBlindIndex'));\n $form->textarea('tableCards', ___('TableCards'));\n $form->number('tableId', ___('TableId'));\n $form->textarea('tableSeat1Str1', ___('TableSeat1Str1'));\n $form->textarea('tableSeat1Str2', ___('TableSeat1Str2'));\n $form->textarea('tableSeat1Str3', ___('TableSeat1Str3'));\n $form->textarea('tableSeat1Str4', ___('TableSeat1Str4'));\n $form->textarea('tableSeat1Str5', ___('TableSeat1Str5'));\n $form->textarea('tableSeat1Str6', ___('TableSeat1Str6'));\n $form->textarea('tableSeat1Str7', ___('TableSeat1Str7'));\n $form->number('time', ___('Time'));\n\n return $form;\n }" ]
[ "0.77083474", "0.6770756", "0.6582365", "0.62868875", "0.6283344", "0.6056346", "0.60378045", "0.60249215", "0.595588", "0.5948091", "0.57597005", "0.5717113", "0.57070196", "0.5703448", "0.5602351", "0.5581841", "0.5547263", "0.5502277", "0.5478038", "0.5475706", "0.5434613", "0.54240876", "0.539587", "0.53778464", "0.5359825", "0.53590983", "0.5339037", "0.5321328", "0.5318948", "0.5309997", "0.5308763", "0.5306407", "0.52934027", "0.52694947", "0.52674586", "0.5263945", "0.52618235", "0.52587044", "0.5246304", "0.5233099", "0.52288944", "0.5221508", "0.52138895", "0.5209269", "0.52089834", "0.5206813", "0.52010256", "0.5186561", "0.5182961", "0.51678663", "0.51643145", "0.5163652", "0.51619506", "0.516182", "0.5145591", "0.5139777", "0.5136229", "0.5124329", "0.5122386", "0.5115804", "0.51133114", "0.5109674", "0.5103184", "0.5088838", "0.5088361", "0.50863606", "0.50861907", "0.5084361", "0.50782883", "0.5077335", "0.5075169", "0.5073754", "0.50718427", "0.5070721", "0.5067243", "0.50662994", "0.5050853", "0.50462085", "0.5045296", "0.50337905", "0.50323945", "0.5032061", "0.5029078", "0.50278485", "0.5021534", "0.50132006", "0.50122815", "0.5006161", "0.5001968", "0.49970314", "0.49937168", "0.49930912", "0.4989337", "0.49843767", "0.49839061", "0.49812287", "0.49774504", "0.49765617", "0.49743992", "0.49743298" ]
0.76451546
1
Builds the form that define cell properties of your progress bar
Создает форму, определяющую свойства ячеек вашего прогресс-бара
function buildForm() { $this->buildTabs(); // tab caption $this->addElement('header', null, 'Progress2 Generator - Control Panel: cell properties'); $this->addElement('text', 'cellid', 'Id mask:', array('size' => 32)); $this->addElement('text', 'cellclass', 'CSS class:', array('size' => 32)); $cellvalue['min'] =& $this->createElement('text', 'min', 'minimum', array('size' => 4)); $cellvalue['max'] =& $this->createElement('text', 'max', 'maximum', array('size' => 4)); $cellvalue['inc'] =& $this->createElement('text', 'inc', 'increment', array('size' => 4)); $this->addGroup($cellvalue, 'cellvalue', 'Value:', ' '); $cellsize['width'] =& $this->createElement('text', 'width', 'width', array('size' => 4)); $cellsize['height'] =& $this->createElement('text', 'height', 'height', array('size' => 4)); $cellsize['spacing'] =& $this->createElement('text', 'spacing', 'spacing', array('size' => 2)); $cellsize['count'] =& $this->createElement('text', 'count', 'count', array('size' => 2)); $this->addGroup($cellsize, 'cellsize', 'Size:', ' '); $cellcolor['active'] =& $this->createElement('text', 'active', 'active', array('size' => 7)); $cellcolor['inactive'] =& $this->createElement('text', 'inactive', 'inactive', array('size' => 7)); $cellcolor['bgcolor'] =& $this->createElement('text', 'bgcolor', 'background', array('size' => 7)); $this->addGroup($cellcolor, 'cellcolor', 'Color:', ' '); $cellfont['family'] =& $this->createElement('text', 'family', 'family', array('size' => 32)); $cellfont['size'] =& $this->createElement('text', 'size', 'size', array('size' => 2)); $cellfont['color'] =& $this->createElement('text', 'color', 'color', array('size' => 7)); $this->addGroup($cellfont, 'cellfont', 'Font:', ' '); // Buttons of the wizard to do the job $this->buildButtons(array('apply','process')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: main properties');\r\n\r\n $shape[] =& $this->createElement('radio', null, null, 'Horizontal', '1');\r\n $shape[] =& $this->createElement('radio', null, null, 'Vertical', '2');\r\n $this->addGroup($shape, 'shape', 'Shape:');\r\n\r\n $way[] =& $this->createElement('radio', null, null, 'Natural', 'natural');\r\n $way[] =& $this->createElement('radio', null, null, 'Reverse', 'reverse');\r\n $this->addGroup($way, 'way', 'Direction:');\r\n\r\n $autosize[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $autosize[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($autosize, 'autosize', 'Best size:');\r\n\r\n $psize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $psize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $psize['left'] =& $this->createElement('text',\r\n 'left', 'left',\r\n array('size' => 4));\r\n $psize['top'] =& $this->createElement('text',\r\n 'top', 'top',\r\n array('size' => 4));\r\n $psize['position'] =& $this->createElement('text',\r\n 'position', 'position',\r\n array('disabled' => 'true'));\r\n $psize['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'bgcolor',\r\n array('size' => 7));\r\n $this->addGroup($psize, 'progresssize',\r\n 'Size, position and color:', ' ');\r\n\r\n $this->addElement('text', 'rAnimSpeed',\r\n array('Animation speed :',\r\n '(0-1000 ; 0:fast, 1000:slow)'));\r\n $this->addRule('rAnimSpeed',\r\n 'Should be between 0 and 1000',\r\n 'rangelength', array(0,1000), 'client');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('back','apply','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: run demo');\r\n\r\n $this->addElement('static', 'progressBar',\r\n 'Your progress meter looks like:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('reset','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: string properties');\r\n\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($stringpainted, 'stringpainted', 'Render a custom string:');\r\n\r\n $this->addElement('text', 'stringid', 'Id:', array('size' => 32));\r\n $this->addElement('text', 'stringclass', 'CSS class:', array('size' => 32));\r\n $this->addElement('text', 'stringvalue', 'Content:', array('size' => 32));\r\n\r\n $stringsize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $stringsize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $stringsize['left'] =& $this->createElement('text',\r\n 'left', 'left',\r\n array('size' => 4));\r\n $stringsize['top'] =& $this->createElement('text',\r\n 'top', 'top',\r\n array('size' => 4));\r\n $stringsize['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'bgcolor',\r\n array('size' => 7));\r\n $this->addGroup($stringsize, 'stringsize', 'Size, position and color:', ' ');\r\n\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Top', 'top');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Bottom', 'bottom');\r\n $this->addGroup($stringvalign, 'stringvalign', 'Vertical alignment:');\r\n\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Center', 'center');\r\n $this->addGroup($stringalign, 'stringalign', 'Horizontal alignment:');\r\n\r\n $stringfont['family'] =& $this->createElement('text',\r\n 'family', 'family',\r\n array('size' => 40));\r\n $stringfont['size'] =& $this->createElement('text',\r\n 'size', 'size',\r\n array('size' => 2));\r\n $stringfont['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($stringfont, 'stringfont', 'Font:', ' ');\r\n\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'normal', 'normal');\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'Bold', 'bold');\r\n $this->addGroup($stringweight, 'stringweight', 'Font weight:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: border properties');\r\n\r\n $borderpainted[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $borderpainted[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($borderpainted, 'borderpainted', 'Display the border:');\r\n\r\n $this->addElement('text', 'borderclass', 'CSS class:', array('size' => 32));\r\n\r\n $borderstyle['style'] =& $this->createElement('select',\r\n 'style', 'style',\r\n array('solid' => 'Solid',\r\n 'dashed' => 'Dashed',\r\n 'dotted' => 'Dotted',\r\n 'inset' => 'Inset',\r\n 'outset' => 'Outset'));\r\n $borderstyle['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 2));\r\n $borderstyle['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($borderstyle, 'borderstyle', null, ' ');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "public function build_table()\n {\n if (count($this->properties) > 0)\n {\n foreach ($this->properties as $property => $values)\n {\n $contents = array();\n $contents[] = $property;\n \n if (! is_array($values))\n {\n $values = array($values);\n }\n \n if (count($values) > 0)\n {\n foreach ($values as $value)\n {\n $contents[] = $value;\n }\n }\n \n $this->addRow($contents);\n }\n \n $this->setColAttributes(0, array('class' => 'header'));\n }\n else\n {\n $contents = array();\n $contents[] = Translation::get('NoResults', null, Utilities::COMMON_LIBRARIES);\n $row = $this->addRow($contents);\n $this->setCellAttributes($row, 0, 'style=\"font-style: italic;text-align:center;\" colspan=2');\n }\n }", "function formProperties() {\n\t\tglobal $l_we_class;\n\n\t\t// Create table\n\t\t$_content = new we_htmlTable(array(\"border\" => 0, \"cellpadding\" => 0, \"cellspacing\" => 0), 12, 5);\n\n\t\t// Row 1\n\t\t$_content->setCol(0, 0, null, $this->formInput2(155, \"width\", 10, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol(0, 2, null, $this->formInput2(155, \"height\", 10, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol(0, 4, null, $this->formInput2(155, \"border\", 10, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\n\t\t$_content->setCol(0, 1, null, getPixel(18, 1));\n\t\t$_content->setCol(0, 3, null, getPixel(18, 1));\n\n\t\t// Row 2\n\t\t$_content->setCol(1, 0, array(\"colspan\" => 5), getPixel(1, 5));\n\n\t\t// Row 3\n\t\t$_content->setCol(2, 0, null, $this->formInput2(155, \"align\", 10, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol(2, 2, null, $this->formInput2(155, \"hspace\", 10, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol(2, 4, null, $this->formInput2(155, \"vspace\", 10, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\n\t\t$_content->setCol(2, 1, null, getPixel(18, 1));\n\t\t$_content->setCol(2, 3, null, getPixel(18, 1));\n\n\t\t// Row 4\n\t\t$_content->setCol(3, 0, array(\"colspan\" => 5), getPixel(1, 5));\n\n\t\t// Row 5\n\t\t$_content->setCol(4, 0, array(\"colspan\" => 3), $this->formInput2(328, \"alt\", 23, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol(4, 3, null, getPixel(18, 1));\n\t\t$_content->setCol(4, 4, null, $this->formInput2(155, \"name\", 10, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\n\t\t// Row 6\n\t\t$_content->setCol(5, 0, array(\"colspan\" => 5), getPixel(1, 5));\n\n\t\t//\tRow 7\n\t\t$_content->setCol(6, 0, array(\"colspan\" => 3), $this->formInput2(328, \"title\", 23, \"attrib\", ($this->getElement(\"useMetaTitle\") == 1 ? \"readonly='readonly'\" : \"\") . '\" onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\n\t\t$_content->setCol(6, 3, null, getPixel(18, 1));\n\t\t\t$_titleField = \"we_\".$this->Name.\"_attrib[title]\";\n\t\t\t$_metaTitleField = \"we_\".$this->Name.\"_txt[Title]\";\n\t\t\t$useMetaTitle = \"we_\".$this->Name.\"_txt[useMetaTitle]\";\n\t\t//\tdisable field 'title' when checked or not.\n\t\t$_content->setCol(6, 4, array(\"valign\" => \"bottom\"), we_forms::checkboxWithHidden($this->getElement(\"useMetaTitle\"), $useMetaTitle, $l_we_class[\"use_meta_title\"], false, \"defaultfont\", \"if(this.checked){ document.forms[0]['$_titleField'].setAttribute('readonly', 'readonly', 'false'); document.forms[0]['$_titleField'].value = ''; }else{ document.forms[0]['$_titleField'].removeAttribute('readonly', 'false');}_EditorFrame.setEditorIsHot(true);\"));\n\n\t\t// longdesc should be available in images.\n\t\t// check if longdesc is set and get path\n\t\t$longdesc_id_name = \"we_\".$this->Name.\"_attrib[longdescid]\";\n\t\t$longdesc_text_name = 'tmp_longdesc';\n\t\t$longdesc_id = $this->getElement('longdescid');\n\t\tif($longdesc_id){\n $longdescPath = id_to_path($longdesc_id);\n\t\t} else {\n $longdescPath = '';\n\t\t}\n\n\t\t$we_button = new we_button();\n\n\t\t$yuiSuggest =& weSuggest::getInstance();\n\t\t$yuiSuggest->setAcId(\"LonDesc\");\n\t\t$yuiSuggest->setContentType(\"folder,text/webEdition,text/html\");\n\t\t$yuiSuggest->setInput($longdesc_text_name,$longdescPath);\n\t\t$yuiSuggest->setLabel($l_we_class[\"longdesc_text\"]);\n\t\t$yuiSuggest->setMaxResults(20);\n\t\t$yuiSuggest->setMayBeEmpty(1);\n\t\t$yuiSuggest->setResult($longdesc_id_name, $longdesc_id);\n\t\t$yuiSuggest->setSelector(\"Docselector\");\n\t\t$yuiSuggest->setWidth(328);\n\t\t$yuiSuggest->setSelectButton($we_button->create_button(\"select\", \"javascript:we_cmd('openDocselector',document.we_form.elements['$longdesc_id_name'].value,'\" . FILE_TABLE . \"','document.we_form.elements[\\\\'$longdesc_id_name\\\\'].value','document.we_form.elements[\\\\'$longdesc_text_name\\\\'].value','opener._EditorFrame.setEditorIsHot(true);opener.top.we_cmd(\\'reload_editpage\\');','\".session_id().\"','','text/webedition,text/plain,text/html',1)\"));\n\t\t$yuiSuggest->setTrashButton($we_button->create_button('image:btn_function_trash',\"javascript:document.we_form.elements['$longdesc_id_name'].value='-1';document.we_form.elements['$longdesc_text_name'].value='';_EditorFrame.setEditorIsHot(true); YAHOO.autocoml.setValidById('\".$yuiSuggest->getInputId().\"')\"));\n\t\t$_content->setCol(7, 0, array(\"colspan\" => 5), getPixel(1, 5));\n\t\t$_content->setCol(8, 0, array(\"valign\" => \"bottom\", 'colspan' => 5), $yuiSuggest->getYuiFiles() . $yuiSuggest->getHTML() . $yuiSuggest->getYuiCode());\n\n\t\t// Return HTML\n\t\treturn $_content->getHtmlCode();\n \t}", "public function buildForm()\n {\n $this\n ->addMeasureList()\n ->addAscendingList()\n ->addTitles(['class' => 'indicator_title_title_narrative', 'narrative_true' => true])\n ->addDescriptions(['class' => 'indicator_description_title_narrative'])\n ->addCollection('reference', 'Activity\\Reference', 'reference', [], trans('elementForm.reference'))\n ->addAddMoreButton('add_reference', 'reference')\n ->addBaselines()\n ->addPeriods()\n ->addAddMoreButton('add_period', 'period')\n ->addRemoveThisButton('remove_indicator');\n }", "protected function buildForm()\n {\n $this->form = Yii::createObject(array_merge([\n 'scenario' => $this->scenario,\n 'parent_id' => $this->parent_id,\n 'parentTariff' => $this->parentTariff,\n 'tariff' => $this->tariff,\n ], $this->getFormOptions()));\n }", "function formProperties(){\n\t\t// Create table\n\t\t$_content = new we_html_table(array('class' => 'default propertydualtable'), 5, 3);\n\t\t$row = 0;\n\t\t// Row 1\n\t\t$_content->setCol($row, 0, null, $this->formInputInfo2(155, 'width', 10, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"', \"origwidth\"));\n\t\t$_content->setCol($row, 1, null, $this->formInputInfo2(155, 'height', 10, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"', \"origheight\"));\n\t\t$_content->setCol($row++, 2, null, $this->formInput2(155, 'border', 10, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\n\n\t\t// Row 2\n\t\t$_content->setCol($row, 0, null, $this->formInput2(155, 'align', 10, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol($row, 1, null, $this->formInput2(155, 'hspace', 10, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol($row++, 2, null, $this->formInput2(155, 'vspace', 10, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\n\n\t\t// Row 3\n\t\t$_content->setCol($row, 0, array('colspan' => 3), $this->formInput2(328, 'alt', 23, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol($row++, 2, null, $this->formInput2(155, 'name', 10, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\n\n\t\t//\tRow 4\n\t\t$_content->setCol($row, 0, array('colspan' => 3), $this->formInput2(328, 'title', 23, 'attrib', ($this->getElement('useMetaTitle') == 1 ? \"readonly='readonly'\" : \"\") . '\" onchange=\"_EditorFrame.setEditorIsHot(true);\"', 'Title'));\n\n\t\t$_titleField = 'we_' . $this->Name . '_attrib[title]';\n\t\t$_metaTitleField = 'we_' . $this->Name . '_txt[Title]';\n\t\t$useMetaTitle = 'we_' . $this->Name . '_attrib[useMetaTitle]';\n\t\t//\tdisable field 'title' when checked or not. on checked true: document.forms[0]['$_titleField'].value='$this->getElement('Title')' and onchecked false: document.forms[0]['$_titleField'].value='' added to fix bug #5814\n\t\t$_content->setCol($row++, 2, array('style' => 'vertical-align:bottom'), we_html_forms::checkboxWithHidden($this->getElement('useMetaTitle'), $useMetaTitle, g_l('weClass', '[use_meta_title]'), false, 'defaultfont', \"if(this.checked){ document.forms[0]['\" . $_titleField . \"'].setAttribute('readonly', 'readonly', 'false'); document.forms[0]['\" . $_titleField . \"'].value = '\" . $this->getElement('Title') . \"'; }else{ document.forms[0]['\" . $_titleField . \"'].removeAttribute('readonly', 'false'); document.forms[0]['\" . $_titleField . \"'].value='';}_EditorFrame.setEditorIsHot(true);\"));\n\n\t\t// longdesc should be available in images.\n\t\t// check if longdesc is set and get path\n\t\t$longdesc_id_name = 'we_' . $this->Name . '_attrib[longdescid]';\n\t\t$longdesc_text_name = 'tmp_longdesc';\n\t\t$longdesc_id = $this->getElement('longdescid');\n\t\t$longdescPath = ($longdesc_id ? id_to_path($longdesc_id) : '');\n\n\t\t$yuiSuggest = & weSuggest::getInstance();\n\t\t$yuiSuggest->setAcId('LonDesc');\n\t\t$yuiSuggest->setContentType('folder,' . we_base_ContentTypes::WEDOCUMENT . ',' . we_base_ContentTypes::HTML);\n\t\t$yuiSuggest->setInput($longdesc_text_name, $longdescPath);\n\t\t$yuiSuggest->setLabel(g_l('weClass', '[longdesc_text]'));\n\t\t$yuiSuggest->setMaxResults(20);\n\t\t$yuiSuggest->setMayBeEmpty(1);\n\t\t$yuiSuggest->setResult($longdesc_id_name, $longdesc_id);\n\t\t$yuiSuggest->setSelector(weSuggest::DocSelector);\n\t\t$yuiSuggest->setWidth(328);\n\t\t$cmd1 = \"document.we_form.elements['\" . $longdesc_id_name . \"'].value\";\n\n\t\t$yuiSuggest->setSelectButton(we_html_button::create_button(we_html_button::SELECT, \"javascript:we_cmd('we_selector_image',\" . $cmd1 . \",'\" . FILE_TABLE . \"','\" . we_base_request::encCmd($cmd1) . \"','\" . we_base_request::encCmd(\"document.we_form.elements['\" . $longdesc_text_name . \"'].value\") . \"','\" . we_base_request::encCmd(\"opener._EditorFrame.setEditorIsHot(true);opener.top.we_cmd('reload_editpage');\") . \"','','','\" . we_base_ContentTypes::WEDOCUMENT . \",\" . we_base_ContentTypes::TEXT . \",\" . we_base_ContentTypes::HTML . \"',1)\"));\n\t\t$yuiSuggest->setTrashButton(we_html_button::create_button(we_html_button::TRASH, \"javascript:document.we_form.elements['\" . $longdesc_id_name . \"'].value='-1';document.we_form.elements['\" . $longdesc_text_name . \"'].value='';_EditorFrame.setEditorIsHot(true); YAHOO.autocoml.setValidById('\" . $yuiSuggest->getInputId() . \"')\"));\n\t\t$_content->setCol($row, 0, array('style' => 'vertical-align:bottom', 'colspan' => 5), $yuiSuggest->getHTML() . $yuiSuggest->getYuiJs());\n\n\t\t// Return HTML\n\t\treturn $_content->getHtml();\n\t}", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: save PHP/CSS code');\r\n\r\n $code[] =& $this->createElement('checkbox', 'P', null, 'PHP');\r\n $code[] =& $this->createElement('checkbox', 'C', null, 'CSS');\r\n $this->addGroup($code, 'phpcss', 'PHP and/or StyleSheet source code:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('next','apply'));\r\n }", "function value_form(&$form, &$form_state) {\n $form['value']['column'] = array(\n '#type' => 'textfield',\n '#title' => t('Property column'),\n '#default_value' => $this->value['column'],\n '#description' => t('Name of the database column to use in the comparison.'),\n );\n\n // We know which properties are available, so we can show a select box.\n if (isset($this->definition['available_properties'])) {\n $form['value']['column']['#type'] = 'select';\n $form['value']['column']['#options'] = array_combine($this->definition['available_properties'], $this->definition['available_properties']);\n }\n\n $form['value']['value'] = array(\n '#type' => 'textfield',\n '#title' => t('Value'),\n '#size' => 30,\n '#default_value' => $this->value['value'],\n '#process' => array('ctools_dependent_process'),\n '#dependency' => array('radio:options[operator]' => array_map('htmlentities', $this->operator_values(1))),\n );\n $form['value']['min'] = array(\n '#type' => 'textfield',\n '#title' => t('Min'),\n '#size' => 30,\n '#default_value' => $this->value['min'],\n '#process' => array('ctools_dependent_process'),\n '#dependency' => array('radio:options[operator]' => array_map('htmlentities', $this->operator_values(2))),\n );\n $form['value']['max'] = array(\n '#type' => 'textfield',\n '#title' => t('And max'),\n '#size' => 30,\n '#default_value' => $this->value['max'],\n '#process' => array('ctools_dependent_process'),\n '#dependency' => array('radio:options[operator]' => array_map('htmlentities', $this->operator_values(2))),\n );\n }", "protected function build()\n {\n $stockalign = new GtkAlignment(0, 0, 0, 0);\n $stockalign->add(\n GtkImage::new_from_stock(\n Gtk::STOCK_DIALOG_ERROR, Gtk::ICON_SIZE_DIALOG\n )\n );\n $this->pack_start($stockalign, false, true);\n\n\n $this->expander = new GtkExpander('');\n\n $this->message = new GtkLabel();\n $this->expander->set_label_widget($this->message);\n $this->message->set_selectable(true);\n $this->message->set_line_wrap(true);\n\n $this->userinfo = new GtkLabel();\n $this->userinfo->set_selectable(true);\n $this->userinfo->set_line_wrap(true);\n //FIXME: add scrolled window\n $this->expander->add($this->userinfo);\n\n $this->pack_start($this->expander);\n }", "public function buildForm() {\n\t\t$form = '';\n\n\t\tforeach ($this->_properties as $row) {\n\t\t\tif (!in_array($row['Field'],$this->_ignore)) {\n\t\t\t\t$elem = $this->buildElement($row);\n\t\t\t\t$row['Comment'] != '' ? $comment = $row['Comment'].\"<br />\": $comment = '';\n\t\t\t\t$this->_properties[$row['Field']]['HTMLElement']=$elem;\n\t\t\t\tif ($row['ElementType']=='hidden')\n\t\t\t\t\t$form .= $elem;\n\t\t\t\telse \n\t\t\t\t\t$form .= sprintf(\"<div class='formElem'>\\n%s<br />\\n%s\\n%s</div>\\n\",ucwords (str_replace (\"_\",\" \",$row['Field'])),$comment,$elem);\n\t\t\t}\n\t\t}\n\t\treturn $form;\n\t}", "function __construct()\n {\n parent::__construct();\n \n // creates the form\n $this->form = new TQuickForm('form_historicotrabalho');\n $this->form->class = 'tform'; // change CSS class\n \n $this->form->style = 'display: table;width:100%'; // change style\n \n // Define Título da página\n $this->form->setFormTitle('Banco de Horas - Lançamento de Escalas');\n // Inicía ferramentas auxiliares\n $fer = new TFerramentas(); // Ferramentas diversas\n $sicad = new TSicadDados(); // Ferramentas de acesso ao SICAD\n //Realiza definições iniciais de acesso\n $profile = TSession::getValue('profile'); //Profile da Conta do usuário\n if ($this->opm_operador==false) //Carrega OPM do usuário\n {\n //Confere se já foi carregado a OPM, senão carrega...ou se o ambiente for de desenvolvimento usa a OPM = 140\n $this->opm_operador = ($fer->is_dev()==true) ? 140 : $profile['unidade']['id'];\n }\n if (!$this->nivel_sistema || $this->config_load == false) //Carrega OPMs que tem acesso\n {\n $this->nivel_sistema = $fer->getnivel (get_class($this));//Verifica qual nível de acesso do usuário\n $this->listas = $sicad->get_OpmsRegiao($this->opm_operador);//Carregas as OPMs que o usuário administra\n $this->config = $fer->getConfig($this->sistema); //Busca o Nível de acesso que o usuário tem para a Classe\n $this->config_load = true; //Informa que configuração foi carregada\n }\n \n // Cria os Itens do Formulário\n $rgmilitar = new TEntry('rgmilitar');\n \n //Monta ComboBox com OPMs que o Operador pode ver\n //echo $this->nivel_sistema.'---'.$this->opm_operador;\n if ($this->nivel_sistema>=80) //Adm e Gestor\n {\n $criteria = null;\n }\n else if ($this->nivel_sistema>=50 ) //Nível Operador (carrega OPM e subOPMs)\n {\n $criteria = new TCriteria;\n //Se não há lista de OPM, carrega só a OPM do usuário\n $lista = ($this->listas['valores']!='') ? $this->listas['valores'] : $profile['unidade']['id'];\n $query = \"(SELECT DISTINCT id FROM g_geral.opm WHERE id IN (\".$lista.\"))\";\n $criteria->add (new TFilter ('id','IN',$query));\n }\n else if ($this->nivel_sistema<50) //nível de visitante (só a própria OPM)\n {\n $criteria = new TCriteria;\n $query = \"(SELECT DISTINCT id FROM g_geral.opm WHERE id IN (\".$this->opm_operador.\"))\";\n $criteria->add (new TFilter ('id','IN',$query));\n }\n $opm = new TDBCombo('opm','sicad','OPM','id','nome','nome',$criteria);\n \n $ativo = new TCombo('ativo');\n $lista_opm = new TSelect('lista_opm');\n $lista_slc = new TSelect('lista_slc');\n //Critério para os Turnos de Serviço (Deve-se excluir os ocultos e o item id=13)\n $criteria = new TCriteria; \n $criteria->add(new TFilter('oculto', '=', 'f'));\n $criteria->add(new TFilter('id', '!=', 13));\n $turno = new TDBCombo('turno','sicad','turnos','id','nome','nome',$criteria);\n \n $datainicial = new TDate('dataInicial');\n $datafinal = new TDate('dataFinal');\n $horaIncialOrdinario = new TEntry('horaInicialOrdinario');\n $opm_id_info = new TDBCombo('opm_id_info','sicad','OPM','id','sigla','sigla');\n $opm_info_atual = new TCombo('OPM_info_Atual');\n $diasExtra = new TEntry('diasExtra');\n $mesExtra = new TCombo('mesExtra');\n $anoExtra = new TCombo('anoExtra');\n $horaInicioExtra = new TEntry('horaInicioExtra');\n $horasTrabalhadas = new TEntry('horasTrabalhadas');\n $tipoExtra = new TCombo('tipoExtra');\n $afasta_id = new TDBCombo('afasta_id','sicad','afastamentos','id','nome','nome');\n $dtinicioaf = new TDate('dtinicioaf');\n $dtfimaf = new TDate('dtfimaf');\n $bgaf = new TEntry('bgaf');\n $anobgaf = new TEntry('anobgaf');\n \n //Formatar Itens\n $rgmilitar->setSize(80);\n $opm->setSize(300);\n $lista_opm->setSize(280,256);\n $lista_slc->setSize(280,256);\n $turno->setSize(200);\n $datainicial->setSize(80);\n $datafinal->setSize(80);\n $horaIncialOrdinario->setSize(50);\n $opm_id_info->setSize(150);\n $opm_info_atual->setSize(80);\n $diasExtra->setSize(200);\n $mesExtra->setSize(80);\n $anoExtra->setSize(80);\n $horaInicioExtra->setSize(50);\n $horasTrabalhadas->setSize(50);\n $tipoExtra->setSize(120);\n $afasta_id->setSize(150);\n $dtinicioaf->setSize(80);\n $dtfimaf->setSize(80);\n $bgaf->setSize(80);\n $anobgaf->setSize(80);\n $ativo->setSize(80);\n //Style\n $lista_opm->style = \"font-size: 12px;\";\n $lista_slc->style = \"font-size: 12px;\";\n\n //Mascaras\n $datainicial->setMask('dd-mm-yyyy');\n $datafinal->setMask('dd-mm-yyyy');\n $dtinicioaf->setMask('dd-mm-yyyy');\n $dtfimaf->setMask('dd-mm-yyyy');\n $horaIncialOrdinario->setMask('99:99');\n $horaInicioExtra->setMask('99:99');\n $horasTrabalhadas->setMask('99');\n\n //Dados\n $opm_info_atual->addItems($fer->lista_sim_nao());//($item);\n $opm_info_atual->setValue('N');\n $ativo->addItems($fer->lista_sim_nao());//($item);\n $ativo->setValue('N');\n //\n $item = array (\"S\"=>\"Remunerada\",\"N\"=>\"Administrativa\");\n $tipoExtra->addItems($item);\n $tipoExtra->setValue('N');\n //\n $fer = new TFerramentas;\n $mesExtra->addItems($fer->lista_meses());\n $anoExtra->addItems($fer->lista_anos());\n //Tips\n $rgmilitar->setTip('Preencha com o RG do Militar pretendido...');\n $opm->setTip('Selecione a OPM para que possa preencher o campo de Lista da OPM com os componentes da Unidade.');\n $lista_opm->setTip('Lista dos Militares pertencente à Unidade Selecionada acima.<br>'.\n 'Vale lembrar que esta lista é atualizada diáriamente, assim os que estão aqui reflete as listas do SICAD.<br>' .\n 'Outro ponto a se considerar é a possibilidade de selecionar vários PMs, para isso basta usar<br>'.\n 'as teclas Control (ctrl) ou shift (seta pra cima);');\n $lista_slc->setTip('Militares Selecionados. Todos que estão nesta lista serão afetados, quer por uma escala ou por afastamentos...');\n $turno->setTip('Selecione uma Escala conforme a necessidade.');\n $datainicial->setTip('Selecione a data inicial da Escala Ordinária.');\n $datafinal->setTip('Selecione a data final da Escala Ordinária');\n $horaIncialOrdinario->setTip('Informe a hora de inicio do primeiro turno da Escala Ordinária.');\n $opm_id_info->setTip('Selecione qual foi a OPM informante da Escala.<br>É útil quando o militar está prestando serviços em uma OPM diferente da sua.');\n $opm_info_atual->setTip('A unidade Informante é a Unidade Atual? Se SIM, irei substituir a unidade que por ventura está na ficha do militar pela que foi informada...');\n $diasExtra->setTip('Defina os dias que o militar trabalhou podendo ser:<br> - Um dia apenas (Ex: 1);<br>- Alguns dias separados por vírgula(Ex: 2,5,8);<br>- Um intervalo de dias ligados por traço (Ex: 2-10);<br>- Um misto de combinações (Ex: 1,3-5,8,15-25). ');\n $mesExtra->setTip('Mês que ocorreu o serviço extra.');\n $anoExtra->setTip('Ano que ocorreu o serviço extra.');\n $horaInicioExtra->setTip('Hora que o serviço extra iniciou.');\n $horasTrabalhadas->setTip('Quantas horas foram trabalhadas neste serviço extra.');\n $tipoExtra->setTip('Defina se a escala foi Administrativa (sem remuneração AC-4) ou Remunerada (com pagamento de AC-4).');\n $afasta_id->setTip('Qual tipo de afastamento o militar fez jus.');\n $dtinicioaf->setTip('Data inicial do afastamento.');\n $dtfimaf->setTip('Data final do afastamento.');\n $bgaf->setTip('Numero do BG onde foi publicado o afastamento(Opcional).');\n $anobgaf->setTip('Ano de publicação do BG de Afastamento (Opcional).');\n $ativo->setTip('Se desejar que os militares inativos façam parte da seleção, marque como SIM para seleciona-los.'.\n '<br>Caso troque esta opção, não haverá a limpeza dos já selecionados.');\n //Ações\n //$change_action = new TAction(array($this, 'onSelectOpm_old'));//Ação de Popular lista de PMs\n //$opm->setChangeAction($change_action);\n //$ativo->setChangeAction($change_action);\n \n //Controle de Nível\n if ($this->nivel_sistema<$this->config[$this->cfg_chg_opm])\n {\n $opm_id_info->setEditable(FALSE);\n $opm_info_atual->setEditable(FALSE);\n }\n //Botões\n //Seleciona PMs\n $addPM = new TButton('addPM');\n $addPM->setImage('fa:arrow-down black');\n $addPM->class = 'btn btn-primary btn-sm';\n $Action = new TAction(array($this, 'onSelectMilitar'));\n $addPM->setAction($Action);\n $addPM->setLabel('Seleciona');\n \n //Botão Gera Escala Ordinária\n $runOrd = new TButton('runOrd');\n $runOrd->setImage('fa:floppy-o red');\n $runOrd->class = 'btn btn-primary btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_ord]) ? new TAction(array($this, 'onGeraOrdinaria')) : new TAction(array($this, 'NoAcess'));\n $runOrd->setAction($Action);\n $runOrd->setLabel('Gera Escala');\n \n //Botão Gera Escala Extra\n $runExt = new TButton('runExt');\n $runExt->setImage('fa:floppy-o red');\n $runExt->class = 'btn btn-primary btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_ext]) ? new TAction(array($this, 'onGeraExtra')) : new TAction(array($this, 'NoAcess'));\n $runExt->setAction($Action);\n $runExt->setLabel('Gera Escala');\n \n //Botão Gera Afastamento\n $runAfa = new TButton('runAfa');\n $runAfa->setImage('fa:floppy-o red');\n $runAfa->class = 'btn btn-primary btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_afa]) ? new TAction(array($this, 'onGeraAfastamento')) : new TAction(array($this, 'NoAcess'));\n $runAfa->setAction($Action);\n $runAfa->setLabel('Gera Afastamento');\n \n //Botão Limpa Afastamento\n $runCls = new TButton('runCls');\n $runCls->setImage('fa:trash black');\n $runCls->class = 'btn btn-danger btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_cls_afa]) ? new TAction(array($this, 'onLimpaAfastamento')) : new TAction(array($this, 'NoAcess'));\n $runCls->setAction($Action);\n $runCls->setLabel('Limpa Afastamento');\n \n //Botão Verifica Escala\n $runVer = new TButton('runVer');\n $runVer->setImage('fa:eye black');\n $runVer->class = 'btn btn-info btn-sm';\n $Action = new TAction(array($this, 'onListaEscala'));\n $runVer->setAction($Action);\n $runVer->setLabel('Ver Escala');\n \n //Botão limpa Escalas\n $runLmp = new TButton('runLmp');\n $runLmp->setImage('fa:trash black');\n $runLmp->class = 'btn btn-danger btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_cls_esc]) ? new TAction(array($this, 'onLimpaEscala')) : new TAction(array($this, 'NoAcess'));\n $runLmp->setAction($Action);\n $runLmp->setLabel('Limpa Escala');\n \n //Botão Carrega OPM na Lista da OPM\n $runOpm = new TButton('runOpm');\n $runOpm->setImage('fa:retweet');\n $runOpm->class = 'btn btn-success btn-sm';\n $Action = new TAction(array($this, 'onSelectOpm_old'));\n $runOpm->setAction($Action);\n $runOpm->setLabel('Carrega OPM');\n \n $table = new TTable();\n $table-> border = '0';\n $table-> cellpadding = '4';\n $table-> style = 'border-collapse:collapse; text-align: center;';\n\n //Monta selecionador\n $hbox1 = new THBox;\n $hbox1->addRowSet( new TLabel('RG:'),$rgmilitar,$addPM,new TLabel('Unidade:'),$opm,new TLabel('Seleciona Inativos?'),$ativo,$runOpm);\n $frame1 = new TFrame;\n $frame1->setLegend('Selecione os PMs ou a OPM');\n $frame1->add($hbox1);\n //Monta Labels das tabelas de distribuição\n $title4 = new TLabel('Listagem da OPM');\n $title4->setFontSize(12);\n $title4->setFontFace('Arial');\n $title4->setFontColor('black');\n $title4->setFontStyle('b');\n \n $title3 = new TLabel('Comandos');\n $title3->setFontSize(12);\n $title3->setFontFace('Arial');\n $title3->setFontColor('black');\n $title3->setFontStyle('b');\n \n $title2 = new TLabel('PMs Selecionados');\n $title2->setFontSize(12);\n $title2->setFontFace('Arial');\n $title2->setFontColor('black');\n $title2->setFontStyle('b');\n \n $title1 = new TLabel('Gestão da Escala');\n $title1->setFontSize(12);\n $title1->setFontFace('Arial');\n $title1->setFontColor('black');\n $title1->setFontStyle('b');\n \n //Botões de Serviço\n $add = new TButton('add_opm');\n $del = new TButton('del_opm');\n $cls = new TButton('clear');\n $ret = new TButton('return');\n \n //Tabelas Auxiliares de Cadastro\n $table_ord = new TTable;//Escalas Ordinárias\n $table_ext = new TTable;//Escalas Extras\n $table_afa = new TTable;//Afastamentos\n\n //Cria no Notebook \n $notebook = new TNotebook(200, 220);\n // Crias as Abas no notebook\n $notebook->appendPage('Ordinária' , $table_ord);\n $notebook->appendPage('Extra' , $table_ext);\n $notebook->appendPage('Afastamento', $table_afa);\n\n //Itens: Escala Ordinária\n $table_ord->addRowSet(array(new TLabel('Escala'),$turno));\n $table_ord->addRowSet(array(new TLabel('De'),$datainicial,new TLabel('A'),$datafinal));\n $table_ord->addRowSet(array(new TLabel('Hora Inicial'),$horaIncialOrdinario));\n $table_ord->addRowSet(array(new TLabel('OPM Informante'),$opm_id_info));\n $table_ord->addRowSet(array(new TLabel('Usar Informante com Atual'),$opm_info_atual));\n $table_ord->addRowSet(array($runLmp,$runOrd));\n //Itens: Escala Extra\n $table_ext->addRowSet(array(new TLabel('Dias'),$diasExtra));\n $table_ext->addRowSet(array(new TLabel('Mês'),$mesExtra,new TLabel('Ano'),$anoExtra));\n $table_ext->addRowSet(array(new TLabel('Hr Início'),$horaInicioExtra,new TLabel('Hrs. Trab.'),$horasTrabalhadas));\n $table_ext->addRowSet(array(new TLabel('Tipo Escala'),$tipoExtra));\n $table_ext->addRowSet($runExt);\n //Itens: Afastamento\n $table_afa->addRowSet(array(new TLabel('Afastamento'),$afasta_id));\n $table_afa->addRowSet(array(new TLabel('De'),$dtinicioaf,new TLabel('A'),$dtfimaf));\n $table_afa->addRowSet(array(new TLabel('BG'),$bgaf,new TLabel('/'),$anobgaf));\n $table_afa->addRowSet(array($runCls,$runAfa));\n\n //Ações\n $add->setAction(new TAction(array($this, 'onAddPMSelect')));\n $del->setAction(new TAction(array($this, 'onDelPMSelect')));\n $cls->setAction(new TAction(array($this, 'onClearSelect')));\n $ret->setAction(new TAction(array($this, 'onReturn')));\n //Labels\n $add->setLabel('Adiciona');\n $del->setLabel('Remove');\n $cls->setLabel('Limpa');\n $ret->setLabel('Volta ao Gerenciador');\n //Icones\n $add->setImage('fa:plus green');\n $del->setImage('fa:minus red');\n $cls->setImage('fa:file-o black');\n $ret->setImage('fa:backward black');\n //Classes\n $ret->class = 'btn btn-warning';\n //PopUps\n if ($this->popAtivo)\n {\n $addPM->popover = 'true';\n $addPM->popside = 'top';\n $addPM->poptitle = 'Seleciona Militar';\n $addPM->popcontent = 'Clique aqui ou tecle ENTER para selecionar o militar.';\n //\n $add->popover = 'true';\n $add->popside = 'top';\n $add->poptitle = 'Adiciona Seleção de Militares';\n $add->popcontent = 'Adiciona o(s) Militar(es) selecionado(s) da caixa Lista da OPM.';\n //\n $del->popover = 'true';\n $del->popside = 'top';\n $del->poptitle = 'Remove Seleção de Militares';\n $del->popcontent = 'Remove o(s) Militar(es) selecionado(s) da caixa Selecionados.';\n //\n $cls->popover = 'true';\n $cls->popside = 'top';\n $cls->poptitle = 'Limpa toda Seleção de Militares';\n $cls->popcontent = 'Remove TODOS os Militares selecionados da caixa Selecionados.';\n //\n $ret->popover = 'true';\n $ret->popside = 'top';\n $ret->poptitle = 'Retorno à Tela de Gerenciamento';\n $ret->popcontent = 'Retorna para a Tela de Gerenciamento do Banco de Horas.<br>A lista e Militares já selecionados permanecerá até o fechamento do sistema.';\n //\n $runOrd->popover = 'true';\n $runOrd->popside = 'top';\n $runOrd->poptitle = 'Gera Escala Ordinária.';\n $runOrd->popcontent = 'São campos necessários:<br>- Turno;<br>- Data inicial e final;<br>- Hora de Início da Escala.';//.\n //\n $runExt->popover = 'true';\n $runExt->popside = 'top';\n $runExt->poptitle = 'Gera Escala Extra';\n $runExt->popcontent = 'São Campos necessários:<br>- Dias (preencher com um ou mais);<br>- Mês e Ano;<br>- Hora Início;<br>'.\n '- Horas Trabalhadas;<br>- Tipo Escala.';\n //\n $runCls->popover = 'true';\n $runCls->popside = 'top';\n $runCls->poptitle = 'Limpa Afastamentos e Restrições (apenas)';\n $runCls->popcontent = 'Use os campos acima como filtro.';\n //\n $runAfa->popover = 'true';\n $runAfa->popside = 'top';\n $runAfa->poptitle = 'Gera Afastamentos e Restrições';\n $runAfa->popcontent = 'São Campos necessários:<br>- Afastamento;<br>- O intervalo de datas.';\n //\n $runVer->popover = 'true';\n $runVer->popside = 'top';\n $runVer->poptitle = 'Verifica a Escala';\n $runVer->popcontent = 'É necessário escolher um militar (um apenas) quer no Campo Lista da OPM quer no Campo Selecionados.';\n //\n $runLmp->popover = 'true';\n $runLmp->popside = 'top';\n $runLmp->poptitle = 'Limpa as Escalas e Afastamentos';\n $runLmp->popcontent = 'Limpa Escalas (ordinária e Extra) e Afastamentos dos militares Selecionados e no intervalo de datas';\n \n $runOpm->popover = 'true';\n $runOpm->popside = 'top';\n $runOpm->poptitle = 'Carrega os militares da Unidade';\n $runOpm->popcontent = 'Carrega os Militares da unidade escolhida filtrando os ativos e inativos conforme se escolhe Sim ou Não no campo Seleciona inativos:';\n }\n //Tabela com Comandos\n $frame_tempo = new TFrame();\n $hboxc = new THBox;\n $hboxc->addRowSet($add);\n $hboxc->addRowSet($del);\n $hboxc->addRowSet($cls);\n $hboxc->addRowSet($runVer);\n $hboxc->addRowSet($ret);\n\n $frame1->add($hboxc);\n $frame1->style = \"width: 100%; display: table-cell; vertical-align: top; text-align: center;\";\n\n //Frame com Lista da OPM\n $vbox2 = new TVBox;\n $frame4 = new TFrame(260,330);\n $frame4->setLegend('Lista de Militares da OPM');\n $frame4->add($lista_opm);\n $frame4->style = \"width: 280px; display: table-cell; vertical-align: top;\";\n $vbox2->add($frame4);\n //Frame de Seleção\n $vbox4 = new TVBox;\n $frame6 = new TFrame(260,330);\n $frame6->setLegend('Militares Selecionados');\n $frame6->add($lista_slc);\n $frame6->style = \"width: 280px; display: table-cell; vertical-align: top;\";\n $vbox4->add($frame6);\n //Frame de Geração\n $vbox5 = new TVBox;\n $frame3 = new TFrame(280,330);\n $frame3->setLegend('Funções de Geração');\n $frame3->add($notebook);\n $frame3->style = \"width: 280px; display: table-cell; vertical-align: top;\";\n $vbox5->add($frame3);\n \n $frame2 = new TFrame;\n $frame2->style = \"width: 100%; display: table-cell; vertical-align: top;\";\n $frame2->add($vbox2);\n $frame2->add($vbox4);\n $frame2->add($vbox5);\n\n $this->form->setFields(array($rgmilitar,$opm,$addPM,$lista_opm,$lista_slc,$opm_info_atual,$opm_id_info,$turno,\n $datafinal,$datainicial,$dtinicioaf,$dtfimaf,$horaIncialOrdinario,$horaInicioExtra,$horasTrabalhadas,\n $diasExtra,$mesExtra,$anoExtra,$bgaf,$anobgaf,$tipoExtra,$afasta_id,$ativo,\n $add,$del,$cls,$ret,$runOrd,$runExt,$runAfa,$runCls,$runVer,$runLmp,$runOpm)); \n // vertical box container\n $container = new TVBox;\n $container->style = 'width: 90%';\n $container->add(new TXMLBreadCrumb('menu.xml', 'bdhManagerForm'));\n $container->add($frame1);\n //$container->add($frame_tempo);\n $container->add($frame2);\n $this->form->add($container);\n\n //parent::add($container);\n parent::add($this->form);\n if ($opm->getValue())\n {\n self::onSelectOpm_old(array('opm'=>$opm->getValue(),'ativo'=>$ativo->getValue()));\n }\n $lista_slc = TSession::getValue(__CLASS__.'_lista_slc');\n self::onLoadPMSelect();\n self::popula_escalas();\n\n }", "protected function definition_inner(&$mform) {\n\n $norepeats = $this->_customdata['norepeats']; // number of dimensions to display\n $descriptionopts = $this->_customdata['descriptionopts']; // wysiwyg fields options\n $current = $this->_customdata['current']; // current data to be set\n\n $mform->addElement('hidden', 'norepeats', $norepeats);\n $mform->setType('norepeats', PARAM_INT);\n // value not to be overridden by submitted value\n $mform->setConstants(array('norepeats' => $norepeats));\n\n $levelgrades = array();\n for ($i = 100; $i >= 0; $i--) {\n $levelgrades[$i] = $i;\n }\n\n for ($i = 0; $i < $norepeats; $i++) {\n $mform->addElement('header', 'dimension'.$i, get_string('dimensionnumber', 'workshopform_rubric', $i+1));\n $mform->addElement('hidden', 'dimensionid__idx_'.$i);\n $mform->setType('dimensionid__idx_'.$i, PARAM_INT);\n $mform->addElement('editor', 'description__idx_'.$i.'_editor',\n get_string('dimensiondescription', 'workshopform_rubric'), '', $descriptionopts);\n if (isset($current->{'numoflevels__idx_' . $i})) {\n $numoflevels = max($current->{'numoflevels__idx_' . $i} + self::ADDLEVELS, self::MINLEVELS);\n } else {\n $numoflevels = self::MINLEVELS;\n }\n $prevlevel = -1;\n for ($j = 0; $j < $numoflevels; $j++) {\n $mform->addElement('hidden', 'levelid__idx_' . $i . '__idy_' . $j);\n $mform->setType('levelid__idx_' . $i . '__idy_' . $j, PARAM_INT);\n $levelgrp = array();\n $levelgrp[] = $mform->createElement('select', 'grade__idx_'.$i.'__idy_'.$j,'', $levelgrades);\n $levelgrp[] = $mform->createElement('textarea', 'definition__idx_'.$i.'__idy_'.$j, '', array('cols' => 60, 'rows' => 3));\n $mform->addGroup($levelgrp, 'level__idx_'.$i.'__idy_'.$j, get_string('levelgroup', 'workshopform_rubric'), array(' '), false);\n $mform->setDefault('grade__idx_'.$i.'__idy_'.$j, $prevlevel + 1);\n if (isset($current->{'grade__idx_'.$i.'__idy_'.$j})) {\n $prevlevel = $current->{'grade__idx_'.$i.'__idy_'.$j};\n } else {\n $prevlevel++;\n }\n }\n }\n\n $mform->registerNoSubmitButton('adddims');\n $mform->addElement('submit', 'adddims', get_string('addmoredimensions', 'workshopform_rubric',\n workshop_rubric_strategy::ADDDIMS));\n $mform->closeHeaderBefore('adddims');\n\n $mform->addElement('header', 'configheader', get_string('configuration', 'workshopform_rubric'));\n $layoutgrp = array();\n $layoutgrp[] = $mform->createElement('radio', 'config_layout', '',\n get_string('layoutlist', 'workshopform_rubric'), 'list');\n $layoutgrp[] = $mform->createElement('radio', 'config_layout', '',\n get_string('layoutgrid', 'workshopform_rubric'), 'grid');\n $mform->addGroup($layoutgrp, 'layoutgrp', get_string('layout', 'workshopform_rubric'), array('<br />'), false);\n $mform->setDefault('config_layout', 'list');\n $this->set_data($current);\n }", "public function buildForm(array $form, FormStateInterface $form_state) {\n $form['time_duration'] = [\n '#type' => 'number',\n '#title' => $this->t('Time duration'),\n '#min' => 100,\n '#step' => 100,\n '#description' => $this->t(\n \"Time in seconds from the user's last login. Used as an event to \n update the relationships between the user and companies.\"\n ),\n '#default_value' => $this->config('pmmi_sso.company.settings')->get('time_duration'),\n '#required' => TRUE,\n ];\n $form['submit'] = [\n '#type' => 'submit',\n '#value' => $this->t('Save'),\n ];\n return $form;\n }", "public function buildFormLayout()\n {\n $this->addColumn(6, function(FormLayoutColumn $column) {\n $column->withSingleField('title');\n })->addColumn(6, function(FormLayoutColumn $column) {\n $column->withSingleField('cover');\n $column->withSingleField('description');\n $column->withSingleField('price');\n $column->withSingleField('tags');\n });\n }", "public function __construct()\n {\n parent::__construct();\n \n $this->form = new BootstrapFormBuilder;\n $this->form->setFormTitle('Bootstrap Form Builder');\n \n $label1 = new TLabel('Some label', '#7D78B6', 12, 'bi');\n $label1->style='text-align:left;border-bottom:1px solid #c0c0c0;width:100%';\n \n $this->form->appendPage('Page 1');\n $this->form->addContent( [$label1] );\n \n $field1a = new TEntry('row1a');\n $field2a = new TDate('row2a');\n $field2b = new TCombo('row2b');\n $field3a = new TEntry('row3a');\n $field3b = new TEntry('row3b');\n $field3c = new TEntry('row3c');\n $field3d = new TEntry('row3d');\n $field4a = new TText('row4a');\n \n // add a row with 2 slots\n $this->form->addFields( [ new TLabel('Row 1') ],\n [ $field1a ] );\n \n // add a row with 2 slots\n $this->form->addFields( [ new TLabel('Row 2') ],\n [ $field2a, $field2b ] );\n \n // add a row with 4 slots\n $this->form->addFields( [ new TLabel('Row 3') ],\n [ $field3a, $field3b ],\n [ new TLabel('Label') ],\n [ $field3c, $field3d ] );\n \n $field2b->addItems( ['1' => 'One', '2' => 'Two'] );\n \n $field1a->setSize('70%');\n $field2a->setSize('120');\n $field2b->setSize('75%');\n \n $field3a->setSize('50%');\n $field3b->setSize('50%');\n $field3c->setSize('50%');\n $field3d->setSize('50%');\n \n $this->form->appendPage('Page 2');\n \n $label2 = new TLabel('Another label', '#7D78B6', 12, 'bi');\n $label2->style='text-align:left;border-bottom:1px solid #c0c0c0;width:100%';\n \n $this->form->addContent( [$label2] );\n $this->form->addFields( [new TLabel('Row 4')], [$field4a ]);\n $field4a->setSize('100%', 100);\n \n $this->form->addAction('Send', new TAction(array($this, 'onSend')), 'fa:check-circle-o green');\n \n // wrap the page content using vertical box\n $vbox = new TVBox;\n $vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));\n $vbox->add($this->form);\n\n parent::add($this->form);\n }", "function buildSettingsForm() {}", "function make_form_row(){\n\t\t$index = $this->col_index;\n\t\t# remove the * at the start of the first line\n\t\t$this->col_data = preg_replace(\"/^\\*/\",\"\",$this->col_data);\n\t\t# split the lines and remove the * from each. The value in each line goes into the array $values\n\t\t$values = preg_split(\"/\\n\\*?/\", $this->col_data);\n\t\t# pad the values array to make sure there are 3 entries\n\t\t$values = array_pad($values, 3, \"\");\n\t\t\n\t\t/*\n\t\tmake three input boxes. TableEdit takes row input from an input array named field a \n\t\tvalue for a particular field[$index] can be an array\n\t\t\tfield[$index][] is the field name\n\t\t\t40 is the length of the box\n\t\t\t$value is the value for the ith line\n\t\t \n\t\t */\n\t\t $form = ''; #initialize\n\t\t foreach($values as $i => $value){\n\t\t\t$form .= \"$i:\".XML::input(\"field[$index][]\",40,$value, array('maxlength'=>255)).\"<br>\\n\";\n\t\t}\n\t\treturn $form;\n\t\n\t}", "public function progressBar()\n {\n \n self::$view='adminlte::progress.bar';\n return $this;\n \n }", "private function build_form()\n {\n $ldm = LaikaDataManager :: get_instance();\n\n // The Laika Scales\n $scales = $ldm->retrieve_laika_scales(null, null, null, new ObjectTableOrder(LaikaScale :: PROPERTY_TITLE));\n $scale_options = array();\n while ($scale = $scales->next_result())\n {\n $scale_options[$scale->get_id()] = $scale->get_title();\n }\n\n // The Laika Percentile Codes\n $codes = $ldm->retrieve_percentile_codes();\n $code_options = array();\n foreach ($codes as $code)\n {\n $code_options[$code] = $code;\n }\n\n $this->addElement('category', Translation :: get('Dates'));\n $this->add_timewindow(self :: GRAPH_FILTER_START_DATE, self :: GRAPH_FILTER_END_DATE, Translation :: get('StartTimeWindow'), Translation :: get('EndTimeWindow'), false);\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Groups', null, 'group'));\n\n $group_options = $this->get_groups();\n\n if (count($group_options) > 0)\n {\n if (count($group_options) < 10)\n {\n $count = count($group_options);\n }\n else\n {\n $count = 10;\n }\n\n $this->addElement('select', self :: GRAPH_FILTER_GROUP, Translation :: get('Group', null, Utilities::GROUP), $this->get_groups(), array('multiple', 'size' => $count));\n $this->addRule(self :: GRAPH_FILTER_GROUP, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n }\n else\n {\n $this->addElement('static', 'group_text', Translation :: get('Group'), Translation :: get('NoGroupsAvailable'));\n $this->addElement('hidden', self :: GRAPH_FILTER_GROUP, null);\n }\n\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Results'));\n $this->addElement('select', self :: GRAPH_FILTER_SCALE, Translation :: get('Scale'), $scale_options, array('multiple', 'size' => '10'));\n $this->addRule(self :: GRAPH_FILTER_SCALE, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n $this->addElement('select', self :: GRAPH_FILTER_CODE, Translation :: get('Code'), $code_options, array('multiple', 'size' => '4'));\n $this->addRule(self :: GRAPH_FILTER_CODE, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Options'));\n\n $group = array();\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderGraphAndTable'), LaikaGraphRenderer :: RENDER_GRAPH_AND_TABLE);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderGraph'), LaikaGraphRenderer :: RENDER_GRAPH);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderTable'), LaikaGraphRenderer :: RENDER_TABLE);\n $this->addGroup($group, self :: GRAPH_FILTER_TYPE, Translation :: get('RenderType'), '<br/>', false);\n\n $allow_save = PlatformSetting :: get('allow_save', LaikaManager :: APPLICATION_NAME);\n if ($allow_save == true)\n {\n $this->addElement('checkbox', self :: GRAPH_FILTER_SAVE, Translation :: get('SaveToRepository'));\n }\n\n $maximum_attempts = PlatformSetting :: get('maximum_attempts', LaikaManager :: APPLICATION_NAME);\n if ($maximum_attempts > 1)\n {\n $group = array();\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('OnlyIncludeFirstAttempt'), LaikaGraphRenderer :: RENDER_ATTEMPT_FIRST);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('OnlyIncludeMostRecentAttempt'), LaikaGraphRenderer :: RENDER_ATTEMPT_LAST);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('IncludeAllAttempts'), LaikaGraphRenderer :: RENDER_ATTEMPT_ALL);\n $this->addGroup($group, self :: GRAPH_FILTER_ATTEMPT, Translation :: get('AttemptsToInclude'), '<br/>', false);\n }\n else\n {\n $this->addElement('hidden', self :: GRAPH_FILTER_ATTEMPT, LaikaGraphRenderer :: RENDER_ATTEMPT_ALL);\n }\n\n $this->addElement('category');\n\n $buttons = array();\n\n $buttons[] = $this->createElement('style_submit_button', 'submit', Translation :: get('Filter', null, Utilities::COMMON_LIBRARIES), array('class' => 'normal search'));\n $buttons[] = $this->createElement('style_reset_button', 'reset', Translation :: get('Reset', null, Utilities::COMMON_LIBRARIES), array('class' => 'normal empty'));\n\n $this->addGroup($buttons, 'buttons', null, '&nbsp;', false);\n }", "function SLFramework_Progressbar($length=300, $height=20, $start=0, $insideText=\"\", $id=\"progressbar\") {\r\n\t\t\t$this->length = $length ; \r\n\t\t\t$this->insideText = $insideText ; \r\n\t\t\t$this->height = $height ; \r\n\t\t\t$this->start = $start ; \r\n\t\t\t$this->id = $id ; \r\n\t\t}", "protected function form()\n {\n $form = new Form(new UserHealth());\n\n $form->number('height', __('Height'));\n $form->number('weight', __('Weight'));\n $form->text('blood_pressure', __('Blood pressure'));\n $form->text('sugar_level', __('Sugar level'));\n $form->text('blood_type', __('Blood type'));\n $form->decimal('muscle_mass', __('Muscle mass'))->default(0);\n $form->text('metabolism', __('Metabolism'));\n $form->textarea('genetic_history', __('Genetic history'));\n $form->textarea('illness_history', __('Illness history'));\n $form->textarea('allergies', __('Allergies'));\n $form->textarea('prescription', __('Prescription'));\n $form->textarea('operations', __('Operations'));\n $form->number('user_id', __('User id'));\n\n return $form;\n }", "protected function Form_Create() {\n\t\t\t$this->dtgFichasNotases = new FichasNotasDataGrid($this);\n\n\t\t\t// Style the DataGrid (if desired)\n\t\t\t$this->dtgFichasNotases->CssClass = 'datagrid';\n\t\t\t$this->dtgFichasNotases->AlternateRowStyle->CssClass = 'alternate';\n\n\t\t\t// Add Pagination (if desired)\n\t\t\t$this->dtgFichasNotases->Paginator = new QPaginator($this->dtgFichasNotases);\n\t\t\t$this->dtgFichasNotases->ItemsPerPage = 20;\n\n\t\t\t// Use the MetaDataGrid functionality to add Columns for this datagrid\n\n\t\t\t// Create an Edit Column\n\t\t\t$strEditPageUrl = __VIRTUAL_DIRECTORY__ . __FORM_DRAFTS__ . '/fichas_notas_edit.php';\n\t\t\t$this->dtgFichasNotases->MetaAddEditLinkColumn($strEditPageUrl, QApplication::Translate('Edit'), QApplication::Translate('Edit'));\n\n\t\t\t// Create the Other Columns (note that you can use strings for fichas_notas's properties, or you\n\t\t\t// can traverse down QQN::fichas_notas() to display fields that are down the hierarchy)\n\t\t\t$this->dtgFichasNotases->MetaAddColumn('IdFichaNota');\n\t\t\t$this->dtgFichasNotases->MetaAddColumn(QQN::FichasNotas()->IdFichasObject);\n\t\t\t$this->dtgFichasNotases->MetaAddColumn('IdNota');\n\t\t}", "public function buildForm()\n {\n }", "function build_basic_form()\r\n {\r\n $this->addElement('select', LanguagePack :: PROPERTY_BRANCH, Translation :: get('Branch'), LanguagePack :: get_branch_options());\r\n \r\n \t$this->addElement('file', 'file', Translation :: get('FileName'));\r\n $allowed_upload_types = array('zip');\r\n $this->addRule('file', Translation :: get('OnlyZIPAllowed'), 'filetype', $allowed_upload_types);\r\n $this->addRule('file', Translation :: get('ThisFieldIsRequired', null, Utilities :: COMMON_LIBRARIES), 'required');\r\n \r\n // Submit button\r\n //$this->addElement('submit', 'user_settings', 'OK');\r\n $buttons[] = $this->createElement('style_submit_button', 'submit', Translation :: get('Import', null, Utilities :: COMMON_LIBRARIES), array('class' => 'positive'));\r\n $buttons[] = $this->createElement('style_reset_button', 'reset', Translation :: get('Reset', null, Utilities :: COMMON_LIBRARIES), array('class' => 'normal empty'));\r\n \r\n $this->addGroup($buttons, 'buttons', null, '&nbsp;', false);\r\n }", "function _name_field_settings_pre_render($form) {\n\n $warning = t('<strong>Warning! Changing this setting after data has been created could result in the loss of data!</strong>');\n\n $form['field_properties'] = array(\n '#prefix' => '<table>',\n '#suffix' => '</table>',\n '#weight' => 1,\n 'thead' => array(\n '#prefix' => '<thead><tr><th>' . t('Field') . '</th>',\n '#suffix' => '</tr></thead>',\n '#weight' => 0,\n ),\n 'tbody' => array(\n '#prefix' => '<tbody>',\n '#suffix' => '</tbody>',\n '#weight' => 1,\n 'components' => array(\n '#prefix' => '<tr><td><strong>' . t('Components') . ' <sup>1</sup></strong></td>',\n '#suffix' => '</tr>',\n '#weight' => 1,\n ),\n 'minimum_components' => array(\n '#prefix' => '<tr><td><strong>' . t('Minimum components') . ' <sup>2</sup></strong></td>',\n '#suffix' => '</tr>',\n '#weight' => 2,\n ),\n 'max_length' => array(\n '#prefix' => '<tr><td><strong>' . t('Maximum length') . ' <sup>3</sup></strong></td>',\n '#suffix' => '</tr>',\n '#weight' => 3,\n ),\n 'labels' => array(\n '#prefix' => '<tr><td><strong>' . t('Labels') . ' <sup>4</sup></strong></td>',\n '#suffix' => '</tr>',\n '#weight' => 4,\n ),\n 'sort_options' => array(\n '#prefix' => '<tr><td><strong>' . t('Sort options') . ' <sup>5</sup></strong></td>',\n '#suffix' => '</tr>',\n '#weight' => 5,\n ),\n\n ),\n 'tfoot' => array(\n '#value' => '<tfoot><tr><td colspan=\"6\"><ol>'\n . '<li>'. t('Only selected components will be activated on this field. All non-selected components / component settings will be ignored.')\n . '<br/>'. $warning .'</li>'\n . '<li>'. t('The minimal set of components required before considered the name field to be incomplete.') . '</li>'\n . '<li>'. t('The maximum length of the field in characters. This must be between 1 and 255.')\n . '<br/>'. $warning .'</li>'\n . '<li>'. t('The labels are used to distinguish the fields. You can use the special label \"!tag\" to hide this.', array('!tag' => '<none>')) . '</li>'\n . '<li>'. t('This enables sorting on the options after the vocabulary terms are added and duplicate values are removed.') . '</li>'\n . '</ol></td></tr></tfoot>',\n '#weight' => 2,\n ),\n );\n\n $i = 0;\n foreach (_name_translations() as $key => $title) {\n // Adds the table header for the particullar field.\n $form['field_properties']['thead'][$key]['#value'] = '<th>' . $title . '</th>';\n $form['field_properties']['thead'][$key]['#weight'] = ++$i;\n\n // Strip the title & description.\n unset($form['components'][$key]['#description']);\n unset($form['components'][$key]['#title']);\n\n unset($form['minimum_components'][$key]['#description']);\n unset($form['minimum_components'][$key]['#title']);\n\n unset($form['max_length'][$key]['#description']);\n unset($form['max_length'][$key]['#title']);\n $form['max_length'][$key]['#size'] = 10;\n\n unset($form['labels'][$key]['#description']);\n unset($form['labels'][$key]['#title']);\n $form['labels'][$key]['#size'] = 10;\n\n if (isset($form['sort_options'][$key])) {\n unset($form['sort_options'][$key]['#description']);\n unset($form['sort_options'][$key]['#title']);\n }\n\n // Moves the elements into the table.\n $form['field_properties']['tbody']['components'][$key] = $form['components'][$key];\n $form['field_properties']['tbody']['components'][$key]['#prefix'] = '<td>';\n $form['field_properties']['tbody']['components'][$key]['#suffix'] = '</td>';\n $form['field_properties']['tbody']['components'][$key]['#weight'] = $i;\n\n $form['field_properties']['tbody']['minimum_components'][$key] = $form['minimum_components'][$key];\n $form['field_properties']['tbody']['minimum_components'][$key]['#prefix'] = '<td>';\n $form['field_properties']['tbody']['minimum_components'][$key]['#suffix'] = '</td>';\n $form['field_properties']['tbody']['minimum_components'][$key]['#weight'] = $i;\n\n $form['field_properties']['tbody']['max_length'][$key] = $form['max_length'][$key];\n $form['field_properties']['tbody']['max_length'][$key]['#prefix'] = '<td>';\n $form['field_properties']['tbody']['max_length'][$key]['#suffix'] = '</td>';\n $form['field_properties']['tbody']['max_length'][$key]['#weight'] = $i;\n\n $form['field_properties']['tbody']['labels'][$key] = $form['labels'][$key];\n $form['field_properties']['tbody']['labels'][$key]['#prefix'] = '<td>';\n $form['field_properties']['tbody']['labels'][$key]['#suffix'] = '</td>';\n $form['field_properties']['tbody']['labels'][$key]['#weight'] = $i;\n\n if (isset($form['sort_options'][$key])) {\n $form['field_properties']['tbody']['sort_options'][$key] = $form['sort_options'][$key];\n }\n else {\n $form['field_properties']['tbody']['sort_options'][$key] = array('#value' => '&nbsp;');\n }\n $form['field_properties']['tbody']['sort_options'][$key]['#prefix'] = '<td>';\n $form['field_properties']['tbody']['sort_options'][$key]['#suffix'] = '</td>';\n $form['field_properties']['tbody']['sort_options'][$key]['#weight'] = $i;\n\n // Clean up the leftovers.\n unset($form['components'][$key]);\n $form['components']['#access'] = FALSE;\n\n unset($form['minimum_components'][$key]);\n $form['minimum_components']['#access'] = FALSE;\n\n unset($form['max_length'][$key]);\n $form['max_length']['#access'] = FALSE;\n\n unset($form['labels'][$key]);\n $form['labels']['#access'] = FALSE;\n\n if (isset($form['sort_options'][$key])) {\n unset($form['sort_options'][$key]);\n $form['sort_options']['#access'] = FALSE;\n }\n }\n\n // Move the additional options under the table.\n $form['extra_fields'] = array(\n '#weight' => 2,\n );\n $form['title_options']['#weight'] = 0;\n $form['generational_options']['#weight'] = 1;\n $form['extra_fields']['title_options'] = $form['title_options'];\n $form['extra_fields']['generational_options'] = $form['generational_options'];\n unset($form['title_options']);\n unset($form['generational_options']);\n\n return $form;\n}", "public function initConfigurationForm()\n\t{\n\t\tglobal $lng, $ilCtrl;\n\t\t\n\t\t$pl = $this->getPluginObject();\n\t\n\t\tinclude_once(\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$form = new ilPropertyFormGUI();\n\t\n\t\t// setting 1 (a checkbox)\n\t\t$cb = new ilCheckboxInputGUI($pl->txt(\"setting_1\"), \"setting_1\");\n\t\t$form->addItem($cb);\n\t\t\n\t\t// setting 2 (text)\n\t\t$ti = new ilTextInputGUI($pl->txt(\"setting_2\"), \"setting_2\");\n\t\t$ti->setRequired(true);\n\t\t$ti->setMaxLength(10);\n\t\t$ti->setSize(10);\n\t\t$form->addItem($ti);\n\t\n\t\t$form->addCommandButton(\"save\", $lng->txt(\"save\"));\n\t \n\t\t$form->setTitle($pl->txt(\"example_plugin_configuration\"));\n\t\t$form->setFormAction($ilCtrl->getFormAction($this));\n\t\t\n\t\treturn $form;\n\t}", "function show_answers_progress($real_taskcount, $taskcount, $pid, $colspan = -1){\n\t\n\tif($colspan == -1){\n\t\t$colspan = \"\";\n\t}else{\n\t\t$colspan = \" colspan = '$colspan'\";\n\t}\n\t\n\t//taskcount formatting\n\t$delta_tc = $taskcount - $real_taskcount;\n\t$const = 60;\n\tif($delta_tc >= 0 || $taskcount == 0){\n\t\t$width = $const;\n\t}else{\n\t\t$width = $const * $taskcount / $real_taskcount;\n\t\t$sec_width = $const * abs($delta_tc) / $real_taskcount;\n\t}\n\t\n\techo \"<td$colspan>\n\t\t<meter id='bar$pid' min='0' max='100' low='25' high='75' optimum='100' value='\";\n\tif($taskcount == 0){\n\t\techo \"0\";\n\t}else{\n\t\techo $real_taskcount / $taskcount * 100;\n\t}\n\techo \"' style='width:\".$width.\"%;'></meter>\";\n\tif($delta_tc < 0 && $taskcount != 0){\n\t\techo \"<meter min='0' max='100' low='0' high='0' optimum='0' value='100' style='width:\".$sec_width.\"%;'></meter>\";\n\t}\n\techo \"<label for='bar$pid'> $real_taskcount/$taskcount</label>\";\n\techo \"</td>\";\n}", "protected function form()\n {\n $form = new Form(new Direction());\n\n $form->text('name', __(trans('hhx.name')));\n $form->text('intro', __(trans('hhx.intro')));\n $form->image('Img', __(trans('hhx.img')))->move('daily/direction')->uniqueName();\n $form->select('status', __(trans('hhx.status')))->options(config('hhx.status'));;\n $form->number('order_num', __(trans('hhx.order_num')));\n $form->hidden('all_num', __(trans('hhx.all_num')))->default(0.00);\n $form->decimal('stock', __(trans('hhx.stock')));\n\n return $form;\n }", "protected function definition_inner($mform) {\n global $PAGE;\n $PAGE->requires->jquery();\n $PAGE->requires->jquery_plugin('ui');\n $PAGE->requires->jquery_plugin('ui-css');\n\n $PAGE->requires->strings_for_js(array('itemsettingserror', 'editquestiontext', 'additemsettings',\n 'correct', 'incorrect'), 'qtype_gapfill');\n $PAGE->requires->js('/question/type/gapfill/questionedit.js');\n $mform->addElement('hidden', 'reload', 1);\n $mform->setType('reload', PARAM_RAW);\n\n $mform->removeelement('questiontext');\n /*for storing the json containing the settings data */\n $mform->addElement('hidden', 'itemsettings', '', array('size' => '80'));\n $mform->setType('itemsettings', PARAM_RAW);\n\n /* popup for entering feedback for individual words */\n $mform->addElement('html', '<div id=\"id_itemsettings_popup\" title=\"' . get_string('additemsettings', 'qtype_gapfill')\n . '\" style=\"display:none;background-color:lightgrey\" >');\n $mform->addElement('editor', 'correct', '', array('size' => 70, 'rows' => 4), $this->editoroptions);\n $mform->addElement('editor', 'incorrect', '', array('size' => 70, 'rows' => 4), $this->editoroptions);\n $mform->addElement('html', '</div>');\n\n /* presented for clicking on the gaps once they have been given numberical ids */\n $mform->addElement('html',\n '<div class=\"gapfill\" id=\"id_itemsettings_canvas\" style=\"display:none;background-color:lightgrey\" ></div>');\n\n $mform->addElement('html', '<div id=\"questiontext\" >');\n $mform->addElement('editor', 'questiontext', get_string('questiontext', 'question'), array('rows' => 10),\n $this->editoroptions);\n $mform->addElement('html', '</div>');\n\n $mform->setType('questiontext', PARAM_RAW);\n $mform->addHelpButton('questiontext', 'questiontext', 'qtype_gapfill');\n\n $mform->addElement('button', 'itemsettings_button', get_string('itemsettingsbutton', 'qtype_gapfill'));\n $mform->addHelpButton('itemsettings_button', 'itemsettings_button', 'qtype_gapfill');\n\n $mform->removeelement('generalfeedback');\n\n // Default mark will be set to 1 * number of fields.\n $mform->removeelement('defaultmark');\n\n $mform->addElement('editor', 'wronganswers', get_string('wronganswers', 'qtype_gapfill'),\n array('size' => 70, 'rows' => 1), $this->editoroptions);\n $mform->addHelpButton('wronganswers', 'wronganswers', 'qtype_gapfill');\n\n /* Only allow plain text in for the comma delimited set of wrong answer values\n * wrong answers really should be a set of zero marked ordinary answers in the answers\n * table.\n */\n $mform->setType('wronganswers', PARAM_TEXT);\n\n $mform->addElement('editor', 'generalfeedback', get_string('generalfeedback', 'question')\n , array('rows' => 10), $this->editoroptions);\n\n $mform->setType('generalfeedback', PARAM_RAW);\n $mform->addHelpButton('generalfeedback', 'generalfeedback', 'question');\n $mform->addElement('header', 'feedbackheader', get_string('moreoptions', 'qtype_gapfill'));\n\n // The delimiting characters around fields.\n $config = get_config('qtype_gapfill');\n /* turn config->delimitchars into an array) */\n $delimitchars = explode(\",\", $config->delimitchars);\n /* copies the values into the keys */\n $delimitchars = array_combine($delimitchars, $delimitchars);\n /* strip any spaces from keys. This is about backward compatibility with old code\n * and avoiding having to expand the size of the delimitchar column from its current\n * 2. The value in the drop down looks better with a gap between the delimitchars, but\n * a gap in the key will break the insert into the question_gapfill table\n */\n foreach ($delimitchars as $key => $value) {\n $key2 = str_replace(' ', '', $key);\n $delimitchars2[$key2] = $value;\n }\n $mform->addElement('select', 'delimitchars', get_string('delimitchars', 'qtype_gapfill'), $delimitchars2);\n $mform->addHelpButton('delimitchars', 'delimitchars', 'qtype_gapfill');\n\n $answerdisplaytypes = array(\"dragdrop\" => get_string('displaydragdrop', 'qtype_gapfill'),\n \"gapfill\" => get_string('displaygapfill', 'qtype_gapfill'),\n \"dropdown\" => get_string('displaydropdown', 'qtype_gapfill'));\n\n $mform->addElement('select', 'answerdisplay', get_string('answerdisplay', 'qtype_gapfill'), $answerdisplaytypes);\n $mform->addHelpButton('answerdisplay', 'answerdisplay', 'qtype_gapfill');\n\n /* sets all gaps to the size of the largest gap, avoids giving clues to the correct answer */\n $mform->addElement('advcheckbox', 'fixedgapsize', get_string('fixedgapsize', 'qtype_gapfill'));\n $mform->addHelpButton('fixedgapsize', 'fixedgapsize', 'qtype_gapfill');\n\n /* put draggable answer options after the text. They don't have to be dragged as far, handy on small screens */\n $mform->addElement('advcheckbox', 'optionsaftertext', get_string('optionsaftertext', 'qtype_gapfill'));\n $mform->setDefault('optionsaftertext', $config->optionsaftertext);\n $mform->addHelpButton('optionsaftertext', 'optionsaftertext', 'qtype_gapfill');\n\n /* use plain string matching instead of regular expressions */\n $mform->addElement('advcheckbox', 'disableregex', get_string('disableregex', 'qtype_gapfill'));\n $mform->addHelpButton('disableregex', 'disableregex', 'qtype_gapfill');\n $mform->setDefault('disableregex', $config->disableregex);\n $mform->setAdvanced('disableregex');\n\n $mform->addElement('advcheckbox', 'letterhints', get_string('letterhints', 'qtype_gapfill'));\n $mform->setDefault('letterhints', $config->letterhints);\n $mform->addHelpButton('letterhints', 'letterhints', 'qtype_gapfill');\n\n /* Discards duplicates before processing answers, useful for tables with gaps like [cat|dog][cat|dog] */\n $mform->addElement('advcheckbox', 'noduplicates', get_string('noduplicates', 'qtype_gapfill'));\n $mform->addHelpButton('noduplicates', 'noduplicates', 'qtype_gapfill');\n $mform->setAdvanced('noduplicates');\n\n /* Makes marking case sensitive so Cat is not the same as cat */\n $mform->addElement('advcheckbox', 'casesensitive', get_string('casesensitive', 'qtype_gapfill'));\n $mform->setDefault('casesensitive', $config->casesensitive);\n $mform->addHelpButton('casesensitive', 'casesensitive', 'qtype_gapfill');\n $mform->setAdvanced('casesensitive');\n\n // To add combined feedback (correct, partial and incorrect).\n $this->add_combined_feedback_fields(true);\n\n // Adds hinting features.\n $this->add_interactive_settings(true, true);\n if ($config->letterhints && $config->addhinttext) {\n $this->_form->getElement('hint[0]')->setValue(array('text' => get_string('letterhint0', 'qtype_gapfill')));\n $this->_form->getElement('hint[1]')->setValue(array('text' => get_string('letterhint1', 'qtype_gapfill')));\n }\n }", "protected function Form_Create() {\n\t\t\t$this->txtValue1 = new QTextBox($this);\n\t\t\t\n\t\t\t$this->txtValue2 = new QTextBox($this);\n\t\t\t\n\t\t\t$this->lstOperation = new QListBox($this);\n\t\t\t$this->lstOperation->AddItem('+', 'add');\n\t\t\t$this->lstOperation->AddItem('-', 'subtract');\n\t\t\t$this->lstOperation->AddItem('*', 'multiply');\n\t\t\t$this->lstOperation->AddItem('/', 'divide');\n\t\t\t\n\t\t\t$this->btnCalculate = new QButton($this);\n\t\t\t$this->btnCalculate->Text = 'Calculate';\n\t\t\t$this->btnCalculate->AddAction(new QClickEvent(), new QServerAction('btnCalculate_Click'));\n\t\t\t\n\t\t\t$this->lblResult = new QLabel($this);\n\t\t\t$this->lblResult->HtmlEntities = false;\n\t\t}", "function getForm($form, &$form_state, $disabled, $myvalues)\n {\n $form[\"data_entry_area1\"] = array(\n '#prefix' => \"\\n<section class='protocollib-admin raptor-dialog-table'>\\n\",\n '#suffix' => \"\\n</section>\\n\",\n );\n $form[\"data_entry_area1\"]['table_container'] = array(\n '#type' => 'item', \n '#prefix' => '<div class=\"raptor-dialog-table-container\">',\n '#suffix' => '</div>', \n '#tree' => TRUE,\n );\n\n \n $oDD = new \\raptor\\DashboardData($this->m_oContext);\n $oPSD = new \\raptor\\ProtocolSupportingData($this->m_oContext);\n $radiology_reports_detail = $oPSD->getRadiologyReportsDetail();\n $raptor_protocoldashboard = $oDD->getDashboardDetails();\n \n $patientDFN=$raptor_protocoldashboard['PatientID'];\n $patientICN=$raptor_protocoldashboard['mpiPid'];\n \n $rows = '';\n foreach($radiology_reports_detail as $data_row) \n {\n $reportID=$data_row['ReportID'];\n $caseNumber=$data_row['CaseNumber']; \n $rows .= \"\\n\".'<tr>'\n . '<td>'.$data_row[\"Title\"].'</td>'\n . '<td>'.$data_row[\"ReportedDate\"].'</td>'\n . '<td><a href=\"#\" class=\"raptor-details\">'.$data_row[\"Snippet\"].'</a>'.GetRadiologyReportsTab::raptor_print_details($data_row[\"Details\"]).'</td>'\n . '<td>'.GetRadiologyReportsTab::getImageInfoAsHTML($this->m_oContext, $patientDFN, $patientICN, $reportID, $caseNumber).'</td>'\n . '</tr>';\n }\n \n $form[\"data_entry_area1\"]['table_container']['reports'] = array('#type' => 'item',\n '#markup' => '<table id=\"my-raptor-dialog-table\" class=\"dataTable\">'\n . '<thead>'\n . '<tr>'\n . '<th>Title</th>'\n . '<th>Date</th>'\n . '<th>Details</th>'\n . '<th>Existing Images</th>'\n . '</tr>'\n . '</thead>'\n . '<tbody>'\n . $rows\n . '</tbody>'\n . '</table>');\n \n return $form;\n }", "function _name_field_instance_settings_pre_render($form) {\n\n $form['instance_properties'] = array(\n '#prefix' => '<table>',\n '#suffix' => '</table>',\n '#weight' => 1,\n 'thead' => array(\n '#prefix' => '<thead><tr><th>' . t('Field') . '</th>',\n '#suffix' => '</tr></thead>',\n '#weight' => 0,\n ),\n 'tbody' => array(\n '#prefix' => '<tbody>',\n '#suffix' => '</tbody>',\n '#weight' => 1,\n 'title_display' => array(\n '#prefix' => '<tr><td><strong>' . t('Title display') . ' <sup>1</sup></strong></td>',\n '#suffix' => '</tr>',\n '#weight' => 1,\n ),\n 'size' => array(\n '#prefix' => '<tr><td><strong>' . t('HTML size') . ' <sup>2</sup></strong></td>',\n '#suffix' => '</tr>',\n '#weight' => 2,\n ),\n 'inline_css_enabled' => array(\n '#prefix' => '<tr><td><strong>' . t('Inline style') . ' <sup>3</sup></strong></td>',\n '#suffix' => '</tr>',\n '#weight' => 3,\n ),\n ),\n 'tfoot' => array(\n '#value' => '<tfoot><tr><td colspan=\"6\"><ol>'\n . '<li>'. t('The title display controls how the label of the name component is displayed in the form. \"%above\" is the standard title; \"%below\" is the standard description; \"%hidden\" removes the label.',\n array('%above' => t('above'), '%below' => t('below'), '%hidden' => t('hidden'))) . '</li>'\n . '<li>'. t('The HTML size property tells the browser what the width of the field should be when it is rendered. This gets overriden by the themes CSS properties. This must be between 1 and 255.') . '</li>'\n . '<li>'. t('The inline style property tells the browser what the width of the field <strong>really</strong> should be when it is rendered. This is dynamically calculated from the HTML size property.') . '</li>'\n . '</ol></td></tr></tfoot>' ,\n '#weight' => 2,\n ),\n 'extra_fields' => array(\n '#weight' => 3,\n ),\n );\n\n $i = 0;\n foreach (_name_translations() as $key => $title) {\n // Adds the table header for the particullar field.\n $form['instance_properties']['thead'][$key]['#value'] = '<th>' . $title . '</th>';\n $form['instance_properties']['thead'][$key]['#weight'] = ++$i;\n\n // Strip the title & description.\n unset($form['size'][$key]['#description']);\n unset($form['size'][$key]['#title']);\n $form['size'][$key]['#size'] = 5;\n\n unset($form['title_display'][$key]['#description']);\n unset($form['title_display'][$key]['#title']);\n\n unset($form['inline_css_enabled'][$key]['#description']);\n unset($form['inline_css_enabled'][$key]['#title']);\n\n // Moves the size element into the table.\n $form['instance_properties']['tbody']['size'][$key] = $form['size'][$key];\n $form['instance_properties']['tbody']['size'][$key]['#prefix'] = '<td>';\n $form['instance_properties']['tbody']['size'][$key]['#suffix'] = '</td>';\n $form['instance_properties']['tbody']['size'][$key]['#weight'] = $i;\n\n $form['instance_properties']['tbody']['title_display'][$key] = $form['title_display'][$key];\n $form['instance_properties']['tbody']['title_display'][$key]['#prefix'] = '<td>';\n $form['instance_properties']['tbody']['title_display'][$key]['#suffix'] = '</td>';\n $form['instance_properties']['tbody']['title_display'][$key]['#weight'] = $i;\n\n $form['instance_properties']['tbody']['inline_css_enabled'][$key] = $form['inline_css_enabled'][$key];\n $form['instance_properties']['tbody']['inline_css_enabled'][$key]['#prefix'] = '<td>';\n $form['instance_properties']['tbody']['inline_css_enabled'][$key]['#suffix'] = '</td>';\n $form['instance_properties']['tbody']['inline_css_enabled'][$key]['#weight'] = $i;\n\n // Clean up the leftovers.\n unset($form['size'][$key]);\n $form['size']['#access'] = FALSE;\n\n unset($form['title_display'][$key]);\n $form['title_display']['#access'] = FALSE;\n\n unset($form['inline_css_enabled'][$key]);\n $form['inline_css_enabled']['#access'] = FALSE;\n\n }\n\n // Move the additional options under the table.\n $form['extra_fields'] = array(\n '#weight' => 2,\n );\n $form['inline_css']['#weight'] = 0;\n $form['title_field']['#weight'] = 1;\n $form['generational_field']['#weight'] = 2;\n $form['extra_fields']['inline_css'] = $form['inline_css'];\n $form['extra_fields']['title_field'] = $form['title_field'];\n $form['extra_fields']['generational_field'] = $form['generational_field'];\n unset($form['title_field']);\n unset($form['inline_css']);\n unset($form['generational_field']);\n\n return $form;\n}", "protected function form()\n {\n $form = new Form(new DbTop());\n $form->select('status', __(trans('hhx.status')))->options(config('hhx.db_status'));;\n $form->text('pan_url', __(trans('hhx.pan_url')));\n $form->text('pan_code', __(trans('hhx.pan_code')));\n\n return $form;\n }", "function createForm(){\n\t\t$this->createFormBase();\n\t\t$this->addElement('reset','reset','Reset');\t\t\t\n\t\t$tab['seeker_0'] = '0';\n\t\t$this->setDefaults($tab);\n\t\t$this->addElement('submit','bouton_add_pi','Add a contact',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_contact'\"));\n\t\t$this->createVaFormResolution();\n\t\t$this->createFormGeoCoverage();\n\t\t$this->createFormGrid();\t\n\t\t//Required format\n\t\t$dformat = new data_format;\n\t\t$dformat_select = $dformat->chargeFormDestFormat($this,'required_data_format','Required data format','NetCDF');\n\t\t$this->addElement($dformat_select);\n\t\t$this->getElement('organism_0')->setLabel(\"Organism short name\");\n\t\t$this->getElement('project_0')->setLabel(\"Useful in the framework of\");\n\t\t$this->getElement('dats_abstract')->setLabel(\"Abstract \");\n\t\t$this->getElement('dats_purpose')->setLabel(\"Purpose\");\n\t\t$this->getElement('database')->setLabel(\"Data center\");\n\t\t$this->getElement('new_db_url')->setLabel(\"Data center url\");\n\t\t$this->getElement('dats_use_constraints')->setLabel(\"Access and use constraints\");\t\t\t\n\t\t$this->getElement('sensor_resol_tmp')->setLabel('Temporal (hh:mm:ss)');\t\t\t\n\t\t$this->getElement('place_alt_min_0')->setLabel(\"Altitude min\");\n\t\t$this->getElement('place_alt_max_0')->setLabel(\"Altitude max\");\n\t\t$this->getElement('data_format_0')->setLabel(\"Original data format\");\n\t\t$this->addElement('file','upload_doc','Attached document');\n\t\t$this->addElement('submit','upload','Upload');\n\t\t$this->addElement('submit','delete','Delete');\n\t\t\n\t\tfor ($i = 0; $i < $this->dataset->nbVars; $i++){\n\t\t\t$this->getElement('methode_acq_'.$i)->setLabel(\"Parameter processing related information\");\n\t\t}\n\t\t$this->addElement('submit','bouton_add_variable','Add a parameter',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_param'\"));\n\t\t\n\t\t$this->addElement('submit','bouton_add_projet','Add a project',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_general'\"));\n\t\t$option = array();\n\t\t$option['default'] = \"\";\n\t\t$option['model'] = \"Model\";\n\t\t$option['instrument'] = \"Instrument\";\n\t\t$option['satellite'] = \"Satellite\";\n\t\t$this->addElement('select','source_type','source type :',$option,array('onchange' => \"DeactivateButtonAddSource()\",'onclick' => \"DeactivateButtonAddSource();\",'onmouseover' => 'DeactivateButtonAddSource();' ));\n\t\t$this->addElement('submit','bouton_add_source','Add a source',array('disabled' => 'true','onclick' => \"document.getElementById('frmvadataset').action += '#a_source'\",'onmouseout' => 'DeactivateButtonAddSource();'));\n\t\t\n\t\tif (isset ( $this->dataset->dats_sensors ) && ! empty ( $this->dataset->dats_sensors )) {\n\t\t\t$this->dats_sensors = array();\n\t\t\t$this->dats_sensors = $this->dataset->dats_sensors ;\n\t\t}\n\t\tif (isset ( $this->dataset->sites ) && ! empty ( $this->dataset->sites )) {\n\t\t\t$this->sites = array();\n\t\t\t$this->sites = $this->dataset->sites;\n\t\t}\n\t\t\n\t\tif ( isset ( $this->dataset->dats_id ) && $this->dataset->dats_id > 0) {\n\t\t\tif (isset ( $this->dataset->nbModFormSensor )){\n\t\t\t\tif($this->dataset->nbModForm <= $this->dataset->nbModFormSensor ){\n\t\t\t\t\t$this->dataset->nbModForm = $this->dataset->nbModFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset ( $this->dataset->nbSatFormSensor )){\n\t\t\t\t//$this->dataset->nbSatFormSensor = $this->dataset->nbSatFormSensor - 1;\n\t\t\t\tif($this->dataset->nbSatForm <= $this->dataset->nbSatFormSensor){\n\t\t\t\t\t$this->dataset->nbSatForm = $this->dataset->nbSatFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset ( $this->dataset->nbInstruFormSensor )){\n\t\t\t\tif($this->dataset->nbInstruForm <= $this->dataset->nbInstruFormSensor){\n\t\t\t\t\t$this->dataset->nbInstruForm = $this->dataset->nbInstruFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif($this->dataset->nbModForm > 0)\n\t\t\t$this->addMod();\n\t\tif($this->dataset->nbInstruForm > 0)\n\t\t\t$this->addInstru();\t\n\t\tif($this->dataset->nbSatForm > 0)\n\t\t\t$this->addSat();\n\t\t\n\t\t$this->dataset->dats_sensors = null ;\n\t\t$this->dataset->sites = null;\n\t}", "public function form()\n {\n $this->switch('auto_df_switch', __('message.tikuanconfig.auto_df_switch'));\n $this->timeRange('auto_df_stime', 'auto_df_etime', '开启时间');\n $this->text('auto_df_maxmoney', __('message.tikuanconfig.auto_df_maxmoney'))->setWidth(2);\n $this->text('auto_df_max_count', __('message.tikuanconfig.auto_df_max_count'))->setWidth(2);\n $this->text('auto_df_max_sum', __('message.tikuanconfig.auto_df_max_sum'))->setWidth(2);\n\n }", "protected function constructGrid()\n {\n // jquery script for loading first page of grid\n $table = \"\n <script type=\\\"text/javascript\\\">\n // load first page\n WschangeModelPagination(\n '$this->_id',\n '$this->_action',\n '$this->_modelName',\n '$this->noDataText',\n $this->itemsPerPage,\n $this->showEdit,\n '$this->_order',\n '$this->_formId',\n 0,\n '$this->_id'+'_0',\n '$this->_edit_action',\n '$this->_delete_action'\n );\n </script>\n \";\n\n // container for edit dialog\n if ($this->showEdit) {\n $table .= '<div class=\"uk-modal\" id=\"'.$this->_formId.'\"></div>';\n $table .= '<div class=\"uk-modal\" id=\"'.$this->_formId.'_new\"></div>';\n }\n\n // title\n $table .= '<div class=\"uk-grid\">';\n $table .= '<div class=\"uk-width-small-1-1 uk-width-medium-1-1\">';\n $table .= '<h1>'.$this->_model->metaName.'</h1>';\n $table .= '</div>';\n $table .= '</div>';\n\n // add and search controls\n $table .= '<div class=\"uk-grid\">';\n $table .= '<div class=\"uk-width-small-1-1 uk-width-medium-1-2\">';\n $table .= '<form class=\"uk-form uk-form-horizontal\">';\n $table .= '<fieldset data-uk-margin>';\n // new item button\n if ($this->showEdit) {\n $table .= '<button class=\"uk-button uk-button-success\"'\n .' data-uk-modal=\"{target:\\'#'.$this->_formId\n .'_new\\', center:true}\"'\n .' id=\"btn_create_'.$this->_id.'\"'\n .' type=\"button\" onclick=\"WseditModelID('\n .'\\''.$this->_formId.'_new\\', '\n .'\\''.$this->_modelName.'\\', '\n .'0, \\''.$this->_edit_action.'\\')\">';\n $table .= '<i class=\"uk-icon-plus\"></i>';\n $table .= '</button>';\n }\n // search control\n $table .= '<input';\n $table .= ' type=\"text\" id=\"search_'.$this->_id.'\"';\n $table .= '/>';\n $table .= '<button class=\"uk-button\"'\n .' id=\"btn_search_'.$this->_id\n .'\" type=\"button\" onclick=\"WschangeModelPagination('\n .'\\''.$this->_id.'\\', '\n .'\\''.$this->_action.'\\', '\n .'\\''.$this->_modelName.'\\', '\n .'\\''.$this->noDataText.'\\', '\n .$this->itemsPerPage.', '\n .$this->showEdit.', '\n .'\\''.$this->_order.'\\', '\n .'\\''.$this->_formId.'\\', '\n .'0, \\''.$this->_id.'\\'+\\'_0\\', '\n .'\\''.$this->_edit_action.'\\', '\n .'\\''.$this->_delete_action.'\\')\">';\n $table .= '<i class=\"uk-icon-search\"></i>';\n $table .= '</button>';\n\n $table .= '</fieldset>';\n $table .= '</form>';\n $table .= '</div>';\n $table .= '</div>';\n\n // Grid View table\n $table .= '<div class=\"uk-grid\">';\n $table .= '<div class=\"uk-width-1-1\">';\n $table .= '<div class=\"uk-overflow-container\">';\n $table .= '<table class=\"uk-table uk-table-hover uk-table-striped\">';\n $table .= '<thead>';\n $table .= '<tr>';\n foreach ($this->_model->columns as $column) {\n if (!in_array($column, $this->_model->hiddenColumns)) {\n if (isset($this->_model->columnHeaders[$column])) {\n $table .= '<th>'\n .$this->_model->columnHeaders[$column];\n $table .= '</th>';\n } else {\n $table .= '<th>'.$column.'</th>';\n }\n }\n }\n if ($this->showEdit) {\n $table .= '<th></th>';\n }\n $table .= '</tr>';\n $table .= '</thead>';\n\n // container of table data loaded from AJAX request\n $table .= '<tbody id=\"'.$this->_id.'\"></tbody>';\n\n // end of grid table\n $table .= '</table>';\n $table .= '</div>';\n $table .= '</div>';\n $table .= '</div>';\n\n // get number ow rows from query so that we can make pager\n $db = new WsDatabase();\n $countQuery = 'SELECT COUNT(*) AS nrows FROM '.$this->_model->tableName;\n $result = $db->query($countQuery);\n $this->nRows = intval($result[0]['nrows']);\n $db->close();\n\n // number of items in pager\n $nPages = $this->getPagination($this->nRows);\n\n // construct pager\n $table .= '<ul class=\"uk-pagination uk-pagination-left\">';\n // links to pages\n for ($i = 0; $i < $nPages; $i++) {\n $table .= '<li>';\n $table .= '\n <a id=\"'.$this->_id.'_'.$i.'\"\n href=\"javascript:void(0)\"\n onclick=\"WschangeModelPagination('\n .'\\''.$this->_id.'\\', '\n .'\\''.$this->_action.'\\', '\n .'\\''.$this->_modelName.'\\', '\n .'\\''.$this->noDataText.'\\', '\n .$this->itemsPerPage.', '\n .$this->showEdit.', '\n .'\\''.$this->_order.'\\', '\n .'\\''.$this->_formId.'\\', '\n .$i.',\\''.$this->_id.'_'.$i.'\\', '\n .'\\''.$this->_edit_action.'\\', '\n .'\\''.$this->_delete_action.'\\')\"/>'\n .($i+1).'</a>';\n $table .= '</li>';\n }\n // end of pager\n $table .= '</ul>';\n\n // end of master div element\n $table .= '<br/>';\n\n $table .= '<script type=\"text/javascript\">'\n .'$(\"#search_'.$this->_id.'\").keydown(function(event) {'\n .' if(event.keyCode == 13) {'\n .' event.preventDefault();'\n .' $(\"#btn_search_'.$this->_id.'\").click();'\n .' }'\n .'});'\n .'</script>';\n\n unset($i, $nPages, $db, $result, $countQuery);\n return $table;\n }", "protected function form()\n {\n $form = new Form(new Activity());\n\n $form->text('name', __('Name'));\n $form->image('image', __('Image'));\n $form->text('intro', __('Intro'));\n $form->UEditor('details', __('Details'));\n $form->datetime('start_at', __('Start at'))->default(date('Y-m-d H:i:s'));\n $form->datetime('end_at', __('End at'))->default(date('Y-m-d H:i:s'));\n $form->text('location', __('Location'));\n $form->decimal('fee', __('Fee'))->default(0.00);\n $form->number('involves', __('Involves'));\n $form->number('involves_min', __('Involves min'));\n $form->number('involves_max', __('Involves max'));\n $form->switch('status', __('Status'));\n $form->text('organizers', __('Organizers'));\n $form->number('views', __('Views'));\n $form->switch('is_stick', __('Is stick'));\n\n return $form;\n }", "protected function initializeForm()\n {\n $this->form = new Form();\n $this->form->add(Element::create(\"FieldSet\",\"Report Format\")->add\n (\n Element::create(\"SelectionList\", \"File Format\", \"report_format\")\n ->addOption(\"Hypertext Markup Language (HTML)\",\"html\")\n ->addOption(\"Portable Document Format (PDF)\",\"pdf\")\n ->addOption(\"Microsoft Excel (XLS)\",\"xls\")\n ->addOption(\"Microsoft Word (DOC)\",\"doc\")\n ->setRequired(true)\n ->setValue(\"pdf\"),\n Element::create(\"SelectionList\", \"Page Orientation\", \"page_orientation\")\n ->addOption(\"Landscape\", \"L\")\n ->addOption(\"Portrait\", \"P\")\n ->setValue(\"L\"),\n Element::create(\"SelectionList\", \"Paper Size\", \"paper_size\")\n ->addOption(\"A4\", \"A4\")\n ->addOption(\"A3\", \"A3\")\n ->setValue(\"A4\")\n )->setId(\"report_formats\")->addAttribute(\"style\",\"width:50%\")\n );\n $this->form->setSubmitValue(\"Generate\");\n $this->form->addAttribute(\"action\",Application::getLink($this->path.\"/generate\"));\n $this->form->addAttribute(\"target\",\"blank\");\n }", "function box_build_attributes($properties, $i, $showtrunc = true, $showfont = true, $showborder = true, $showfill = true, $pre = '', $title = '') {\n global $kFonts, $kFontSizes, $kFontAlign, $kFontColors, $kLineSizes;\n $fields = array('font', 'size', 'align', 'color', 'bordershow', 'bordersize', 'bordercolor', 'fillshow', 'fillcolor');\n\tforeach ($fields as $value) {\n $temp = $pre . $value;\n\t $$value = $properties->$temp;\n\t}\n $output = NULL;\n $output .= '<table class=\"ui-widget\" style=\"border-collapse:collapse;margin-left:auto;margin-right:auto;\">' . nl;\n $output .= ' <thead class=\"ui-widget-header\">' . nl;\n $output .= ' <tr><th colspan=\"5\">' . ($title ? $title : TEXT_ATTRIBUTES) . '</th></tr>' . nl;\n $output .= ' </thead>' . nl;\n $output .= ' <tbody class=\"ui-widget-content\">' . nl;\n if ($showtrunc) {\n $output .= ' <tr>' . nl;\n $output .= ' <td colspan=\"2\">' . TEXT_TRUNCATE . html_radio_field($pre.'box_trun_' . $i, '0', (!$properties->truncate) ? true : false) . TEXT_NO . html_radio_field($pre.'box_trun_' . $i, '1', ($properties->truncate) ? true : false) . TEXT_YES . '</td>' . nl;\n $output .= ' <td colspan=\"3\">' . TEXT_DISPLAY_ON . html_radio_field($pre.'box_last_' . $i, '0', (!$properties->display || $properties->display == '0') ? true : false) . TEXT_ALL_PAGES . html_radio_field($pre.'box_last_' . $i, '1', ($properties->display == '1') ? true : false) . TEXT_FIRST_PAGE . html_radio_field($pre.'box_last_' . $i, '2', ($properties->display == '2') ? true : false) . TEXT_LAST_PAGE . '</td>' . nl;\n $output .= ' </tr>' . nl;\n }\n if ($showfont) {\n $output .= ' <tr class=\"ui-widget-header\">' . nl;\n $output .= ' <th>' . '&nbsp;' . '</th>' . nl;\n $output .= ' <th>' . TEXT_STYLE . '</th>' . nl;\n $output .= ' <th>' . TEXT_SIZE . '</th>' . nl;\n $output .= ' <th>' . TEXT_ALIGN . '</th>' . nl;\n $output .= ' <th>' . TEXT_COLOR . '</th>' . nl;\n $output .= ' </tr>' . nl;\n $output .= ' <tr>' . nl;\n $output .= ' <td>' . TEXT_FONT .'</td>' . nl;\n $output .= ' <td>' . html_pull_down_menu($pre.'box_fnt_' . $i, $kFonts, $font) . '</td>' . nl;\n $output .= ' <td>' . html_pull_down_menu($pre.'box_size_'. $i, $kFontSizes, $size) . '</td>' . nl;\n $output .= ' <td>' . html_pull_down_menu($pre.'box_aln_' . $i, $kFontAlign, $align) . '</td>' . nl;\n $output .= ' <td id=\"' . $pre.'box_td_' . $i . '\" style=\"background-color:#' . convertPfColor($color) . '\">' . nl;\n $output .= ' <div id=\"' . $pre.'box_whl_' . $i . '\" \n\t onmousemove=\"moved(event, \\''.$pre.'box_whl_' . $i . '\\', \\''.$pre.'box_td_' . $i . '\\', \\''.$pre.'box_clr_' . $i . '\\')\" \n\t onclick=\"setCustom(\\''.$pre.'box_whl_' . $i . '\\', \\''.$pre.'sel_clr_' . $i . '\\')\" style=\"position:absolute; display:none; top:0px; left:0px; z-index:10000\">\n\t <img src=\"'.DIR_WS_MODULES.'phreeform/images/colorwheel.jpg\" width=\"256\" height=\"256\" alt=\"\" />' . nl;\n $output .= ' </div>' . nl;\n $output .= html_hidden_field($pre.'box_clr_' . $i, $color ? $color : '0:0:0') . nl;\n $output .= html_pull_down_menu($pre.'sel_clr_' . $i, $kFontColors, $color ? $color : '0:0:0', 'onchange=\"colorSet(\\''.$pre.'sel_clr_' . $i . '\\', \\''.$pre.'box_td_' . $i . '\\', \\''.$pre.'box_clr_' . $i . '\\')\"') . nl;\n $output .= html_icon('categories/applications-graphics.png', TEXT_CUSTOM, 'small', 'onclick=\"showCustom(\\''.$pre.'box_whl_' . $i . '\\', \\''.$pre.'sel_clr_' . $i . '\\')\"') . nl;\n $output .= ' </td>'. nl;\n $output .= ' </tr>' . nl;\n }\n if ($showborder) {\n $output .= ' <tr>' . nl;\n $output .= ' <td>' . TEXT_BORDER_AREA . '</td>' . nl;\n $output .= ' <td>' . html_checkbox_field($pre.'box_bdr_' . $i, '1', ($bordershow) ? true : false) . '</td>' . nl;\n $output .= ' <td>' . html_pull_down_menu($pre.'box_bsz_' . $i, $kLineSizes, $bordersize) . TEXT_POINTS . '</td>' . nl;\n $output .= ' <td>' . '&nbsp;' . '</td>' . nl;\n $output .= ' <td id=\"'.$pre.'box_btd_' . $i . '\" style=\"background-color:#' . convertPfColor($bordercolor) . '\">' . nl;\n $output .= ' <div id=\"'.$pre.'box_bwhl_' . $i . '\" \n\t onmousemove=\"moved(event, \\''.$pre.'box_bwhl_' . $i . '\\', \\''.$pre.'box_btd_' . $i . '\\', \\''.$pre.'box_bclr_' . $i . '\\')\" \n\t onclick=\"setCustom(\\''.$pre.'box_bwhl_' . $i . '\\', \\''.$pre.'sel_bclr_' . $i . '\\')\" style=\"position:absolute; display:none; top:0px; left:0px; z-index:10000\">\n\t <img src=\"'.DIR_WS_MODULES.'phreeform/images/colorwheel.jpg\" width=\"256\" height=\"256\" alt=\"\" />' . nl;\n $output .= ' </div>' . nl;\n $output .= html_hidden_field($pre.'box_bclr_' . $i, $bordercolor ? $bordercolor : '0:0:0') . nl;\n $output .= html_pull_down_menu($pre.'sel_bclr_' . $i, $kFontColors, $bordercolor ? $bordercolor : '0:0:0', 'onchange=\"colorSet(\\''.$pre.'sel_bclr_' . $i . '\\', \\''.$pre.'box_btd_' . $i . '\\', \\''.$pre.'box_bclr_' . $i . '\\')\"') . nl;\n $output .= html_icon('categories/applications-graphics.png', TEXT_CUSTOM, 'small', 'onclick=\"showCustom(\\''.$pre.'box_bwhl_' . $i . '\\', \\''.$pre.'sel_bclr_' . $i . '\\')\"') . nl;\n $output .= ' </td>'. nl;\n $output .= '</tr>' . nl;\n }\n if ($showfill) {\n $output .= '<tr>' . nl;\n $output .= ' <td>'. TEXT_FILL_AREA . '</td>' . nl;\n $output .= ' <td>'. html_checkbox_field($pre.'box_fill_' . $i, '1', ($fillshow) ? true : false) . '</td>' . nl;\n $output .= ' <td>'. '&nbsp;' . '</td>' . nl;\n $output .= ' <td>'. '&nbsp;' . '</td>' . nl;\n $output .= ' <td id=\"'.$pre.'box_ftd_' . $i .'\" style=\"background-color:#' . convertPfColor($fillcolor) .'\">' . nl;\n $output .= ' <div id=\"'.$pre.'box_fwhl_' . $i . '\" \n\t onmousemove=\"moved(event, \\''.$pre.'box_fwhl_' . $i . '\\', \\''.$pre.'box_ftd_' . $i . '\\', \\''.$pre.'box_fclr_' . $i . '\\')\" \n\t onclick=\"setCustom(\\''.$pre.'box_fwhl_' . $i . '\\', \\''.$pre.'sel_fclr_' . $i . '\\')\" style=\"position:absolute; display:none; top:0px; left:0px; z-index:10000\">\n\t <img src=\"'.DIR_WS_MODULES.'phreeform/images/colorwheel.jpg\" width=\"256\" height=\"256\" alt=\"\" />' . nl;\n $output .= ' </div>' . nl;\n $output .= html_hidden_field($pre.'box_fclr_' . $i, $fillcolor ? $fillcolor : '0:0:0') . nl;\n $output .= html_pull_down_menu($pre.'sel_fclr_' . $i, $kFontColors, $fillcolor ? $fillcolor : '0:0:0', 'onchange=\"colorSet(\\''.$pre.'sel_fclr_' . $i . '\\', \\''.$pre.'box_ftd_' . $i . '\\', \\''.$pre.'box_fclr_' . $i . '\\')\"') . nl;\n $output .= html_icon('categories/applications-graphics.png', TEXT_CUSTOM, 'small', 'onclick=\"showCustom(\\''.$pre.'box_fwhl_' . $i . '\\', \\''.$pre.'sel_fclr_' . $i . '\\')\"') . nl;\n $output .= ' </td>'. nl;\n $output .= '</tr>' . nl;\n }\n $output .= '</tbody></table>' . nl;\n return $output;\n}", "function showform() {\r\n $this->showerror();\r\n\r\n # make sure cursor does not point to invalid index\r\n if ($this->_cursor > ($this->db_count-1)) $this->_cursor = $this->db_count-1;\r\n if ($this->_cursor < 0) $this->_cursor = 0;\r\n\r\n $this->grid_command[] = array('csv',lang('Generate CSV'));\r\n\r\n # prepare javascript validation and confirmation function for each action\r\n echo '<!-- 1223 --> <script type=\"text/javascript\">';\r\n if ($this->action == 'browse') {\r\n echo 'function form_submit_confirm(myform) {\r\n action = myform.elements[\\'act\\'].value;\r\n if (action == \\'del\\') {\r\n if (!confirm(\\''.lang('Are you sure you want to delete').'?\\')) {\r\n return false;\r\n }\r\n myform.submit();\r\n return true;\r\n }\r\n else {\r\n myform.submit();\r\n return true;\r\n }\r\n return false;\r\n }\r\n ';\r\n } else { # callback to function like $this->form_submit_confirm_new()\r\n echo $this->{'form_submit_confirm_'.$this->action}();\r\n }\r\n\r\n echo '</script>';\r\n\r\n echo '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" summary=\"paging\">'; //style=\"border-collapse: collapse;\"\r\n echo '<tr valign=\"top\">';\r\n\r\n if ($this->action == 'browse') {\r\n if ($this->db_count > 1) {\r\n echo '<td valign=\"top\" nowrap>&nbsp;&nbsp;';\r\n # determine on which index current rowid is\r\n if ($this->_cursor > 0) {\r\n $r = 0;\r\n $url = $_SERVER['PHP_SELF'].'?m='.$this->module.'&amp;act=browse&amp;cursor='.$r.'&amp;orderby='.$this->_orderby.'&amp;sortdir='.$this->_sortdir.'&amp;query='.urlencode($this->_query).'&amp;qf='.urlencode($_REQUEST['qf']);\r\n echo '<a href=\"'.$url.'\"><img src=\"images/b_firstpage.gif\" border=\"0\" alt=\"first record\"></a> ';\r\n $r = $this->_cursor - 1;\r\n $url = $_SERVER['PHP_SELF'].'?m='.$this->module.'&amp;act=browse&amp;cursor='.$r.'&amp;orderby='.$this->_orderby.'&amp;sortdir='.$this->_sortdir.'&amp;query='.urlencode($this->_query).'&amp;qf='.urlencode($_REQUEST['qf']);\r\n echo '<a href=\"'.$url.'\"><img src=\"images/b_prevpage.gif\" border=\"0\" alt=\"prev record\"></a> ';\r\n }\r\n else {\r\n echo '<img src=\"images/bd_firstpage.gif\" border=\"0\" alt=\"first record\"> ';\r\n echo '<img src=\"images/bd_prevpage.gif\" border=\"0\" alt=\"prev record\"> ';\r\n }\r\n\r\n if ($this->_cursor < ($this->db_count -1)) {\r\n $r = $this->_cursor + 1;\r\n $url = $_SERVER['PHP_SELF'].'?m='.$this->module.'&amp;act=browse&amp;cursor='.$r.'&amp;orderby='.$this->_orderby.'&amp;sortdir='.$this->_sortdir.'&amp;query='.urlencode($this->_query).'&amp;qf='.urlencode($_REQUEST['qf']);\r\n echo '<a href=\"'.$url.'\"><img src=\"images/b_nextpage.gif\" border=\"0\" alt=\"next record\"></a> ';\r\n $r = $this->db_count - 1;\r\n $url = $_SERVER['PHP_SELF'].'?m='.$this->module.'&amp;act=browse&amp;cursor='.$r.'&amp;orderby='.$this->_orderby.'&amp;sortdir='.$this->_sortdir.'&amp;query='.urlencode($this->_query).'&amp;qf='.urlencode($_REQUEST['qf']);\r\n echo '<a href=\"'.$url.'\"><img src=\"images/b_lastpage.gif\" border=\"0\" alt=\"last record\"></a> ';\r\n }\r\n else {\r\n echo '<img src=\"images/bd_nextpage.gif\" border=\"0\" alt=\"next record\"> ';\r\n echo '<img src=\"images/bd_lastpage.gif\" border=\"0\" alt=\"last record\"> ';\r\n }\r\n echo '</td>';\r\n }\r\n echo '<form method=\"POST\" action=\"'.$_SERVER['PHP_SELF'].'\">';\r\n echo '<input type=hidden name=m value=\"'.$this->module.'\">';\r\n echo '<input type=hidden name=go value=\"'.htmlentities($GLOBALS['full_self_url']).'\">'; # url to go after successful submitation\r\n echo '<input type=hidden name=\"rowid[]\" value=\"'.$this->ds->_rowid[$this->_cursor].'\">'; # for edit-action\r\n echo '<input type=\"hidden\" name=\"act\">';\r\n echo '<td>&nbsp;&nbsp;';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\'edit\\';form_submit_confirm(this.form);\" value=\"'.lang('Edit').'\" '.(($this->allow_edit and $this->db_count > 0)?'':'disabled').'> ';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\'del\\';form_submit_confirm(this.form);\" value=\"'.lang('Delete').'\" '.(($this->allow_delete and $this->db_count > 0)?'':'disabled').'> ';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\'duplicate\\';form_submit_confirm(this.form);\" value=\"'.lang('Duplicate').'\" '.(($this->allow_duplicate and $this->db_count > 0)?'':'disabled').'> ';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\'view\\';form_submit_confirm(this.form);\" value=\"'.lang('View').'\" '.(($this->allow_view and $this->db_count > 0)?'':'disabled').'> ';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\'new\\';form_submit_confirm(this.form);\" value=\"'.lang('New').'\" '.($this->allow_new?'':'disabled').'> ';\r\n\r\n if (count($this->grid_command))\r\n echo ' | Other: ';\r\n\r\n foreach ($this->grid_command as $command) {\r\n #~ echo '<input type=\"button\" onclick=\"this.form.act.value = \\''.$command[0].'\\';submit_confirm(this.form);\" value=\"'.lang($command[1]).'\"> ';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\''.$command[0].'\\';this.form.submit();\" value=\"'.lang($command[1]).'\"> ';\r\n }\r\n echo '</form>';\r\n echo '</td>';\r\n }\r\n echo '</tr></table>'; //outer table\r\n\r\n if ($this->_query != '') {\r\n if ($this->db_count == 0) {\r\n echo '<p><b>'.lang('The search').' \"'.$this->_query.'\" '.lang('returns no record').'</b>. <a href=\"'.$_SERVER['PHP_SELF'].'?m='.$this->module.'\">'.lang('Reset Search').'</a>.</p>';\r\n return;\r\n }\r\n else {\r\n echo '<p><b>'.lang('The search').' \"'.$this->_query.'\" '.lang('found').' '.$this->db_count.' '.lang($this->unit).'</b>. <a href=\"'.$_SERVER['PHP_SELF'].'?m='.$this->module.'\">'.lang('Reset Search').'</a>.</p>';\r\n }\r\n }\r\n\r\n echo $this->body[$this->action]['prefix']; # show prefix body\r\n\r\n echo '<table border=\"0\" summary=\"form format\">';\r\n # form for new record\r\n echo '<form method=post enctype=\"multipart/form-data\" action=\"'.$_SERVER['PHP_SELF'].'\" onSubmit=\"return form_submit_confirm(this);\" autocomplete=\"off\">';\r\n echo '<input type=hidden name=m value=\"'.$this->module.'\">'; # this module\r\n echo '<input type=hidden name=act value=\"'.$this->action.'\">'; # contains the action (edit/new)\r\n #~ echo '<input type=hidden name=save value=\"'.$this->_save.'\">'; # marker to indicate form submitation\r\n if (!$this->_preview)\r\n echo '<input type=hidden name=save value=\"-1\">'; # marker to indicate form submitation\r\n else\r\n echo '<input type=hidden name=save value=\"1\">'; # marker to indicate form submitation\r\n #~ echo '<input type=hidden name=save value=\"-1\">'; # marker to indicate form submitation\r\n echo '<input type=hidden name=go value=\"'.htmlentities($this->_go).'\">'; # url to go after successful submitation\r\n echo '<input type=hidden name=\"num_row\" value=\"'.$this->db_count.'\">';\r\n echo '<input type=hidden name=\"rowid['.$this->_cursor.']\" value=\"'.$this->ds->_rowid[$this->_cursor].'\">'; # for edit-action\r\n\r\n # decide, which columns to show in form\r\n $this->colgrid = array();\r\n foreach ($this->properties as $key=>$col) {\r\n if ($this->action == 'browse' and $col->hidden) continue;\r\n if ($this->action == 'edit' and !$col->updatable) continue;\r\n if ($this->action == 'new' and !$col->insertable) continue;\r\n $this->colgrid[] = $key;\r\n }\r\n $i = 0; # html table rows\r\n $i2 = 0; # datasource columns\r\n\r\n for ($ci = 0; $ci < count($this->colgrid); $ci++) {\r\n $colvar = $this->colgrid[$ci];\r\n $i2++;\r\n $col = &$this->properties[$colvar];\r\n\r\n if ($col->box_start != '') { # box start append a title line\r\n echo '<tr><td colspan=\"2\"><br><b>'.$col->box_start.'</b></td></tr>';\r\n }\r\n\r\n if ($this->action != 'browse' or $this->browse_mode != 'form' or ($i2 % $this->browse_form_cols == 1)) {\r\n $rowcolour = ($i++ % 2 == 0)? 'greyformlight': 'greyformdark';\r\n echo '<tr class=\"'.$rowcolour.'\">';\r\n }\r\n\r\n echo '<td>';\r\n #~ if ($this->action != 'browse' and $col->required)\r\n #~ echo '<span class=\"asterix\">*</span>';\r\n $label = $col->colspan_label != ''? $col->colspan_label: $col->label;\r\n #~ if ($col->is_key)\r\n #~ echo '<b>'.$label.'</b>';\r\n #~ else\r\n echo $label;\r\n echo '</td>';\r\n\r\n echo '<td>';\r\n $max_colspan = $col->colspan; # save this first, since $col will be change on subsequent loops\r\n for ($colspan=0; $colspan < $max_colspan; $colspan++) {\r\n $colvar = $this->colgrid[$ci + $colspan];\r\n $col = &$this->properties[$colvar];\r\n $value = $this->ds->{$colvar}[$this->_cursor];\r\n if ($this->_preview) { # preview me\r\n echo '<input type=\"hidden\" name=\"field['.$colvar.']['.$this->_cursor.']\" value=\"'.$value.'\">';\r\n echo ' '.$value.' ';\r\n }\r\n else {\r\n echo $col->prefix_text;\r\n if ($this->action == 'browse') {\r\n if ($col->enumerate) { # if field is enumerated, get the enumerate value instead\r\n $value = '';\r\n if (is_string($col->enumerate) and $value != '') {\r\n $e = instantiate_module($col->enumerate);\r\n $value = $e->enum_decode($value);\r\n if ($value === False) {\r\n $col->notes = '<span style=\"color:f00\"><b>(ref?)</b></span> '.$col->notes;\r\n }\r\n }\r\n elseif (is_array($col->enumerate)) {\r\n $value = $col->enumerate[$value];\r\n }\r\n }\r\n elseif ($col->inputtype=='combobox' and $col->choices) { # if field is using simple enumeration, also get the choice value instead\r\n $value = $col->choices[$value];\r\n }\r\n else {\r\n #~ $value = $this->ds->{$colvar}[$rowindex];\r\n #pass\r\n }\r\n\r\n if ($col->inputtype == 'combobox') {\r\n $col->inputtype = 'text';\r\n }\r\n }\r\n\r\n if ($this->action == 'browse' and $this->browse_form_statictext) {\r\n echo '<b>';\r\n echo ' '.$value.' ';\r\n echo '</b>';\r\n }\r\n else {\r\n $this->input_widget(\"field[$colvar][{$this->_cursor}]\", $value, $colvar);\r\n }\r\n }\r\n }\r\n $ci += $max_colspan - 1; # since ->colspan starts at 1\r\n if ($this->action != 'browse' and $this->_save != -1) # edit/add mode and not preview\r\n echo '&nbsp;'.$col->notes;\r\n echo '</td>';\r\n\r\n if ($this->action != 'browse' or $this->browse_mode != 'form' or ($i2 % $this->browse_form_cols == 0)) {\r\n echo \"</tr>\\r\\n\";\r\n }\r\n\r\n if ($col->box_end) {\r\n echo '<tr><td colspan=\"2\"><br></td></tr>';\r\n }\r\n\r\n\r\n }\r\n echo '</table>';\r\n\r\n # show prefix/suffix body\r\n if (method_exists($this, $this->body[$this->action]['suffix'])) # give chance for suffix to execute them self.\r\n echo $this->{$this->body[$this->action]['suffix']}();\r\n else\r\n echo $this->body[$this->action]['suffix'];\r\n\r\n $_submitlabel = ($this->preview[$this->action] and !$this->_preview)? ' '.lang('Preview').' ': ' '.$this->submit_label['new'].' ';\r\n if ($this->action != 'browse') {\r\n echo '<p><input type=submit value=\"'.$_submitlabel.'\"> | ';\r\n #~ echo '<b><a href=\"'.$this->_go.'\">Cancel</a></b></p>';\r\n echo '<input type=button value=\"'.lang('Cancel').'\" onclick=\"window.location=\\''.$this->_go.'\\'\">';\r\n #~ echo '<b><a href=\"\" onclick=\"window.history.back();return false;\">Cancel</a></b>';\r\n }\r\n echo '</form>';\r\n\r\n # show suffix2 body (after previous big form)\r\n if (method_exists($this, $this->body[$this->action]['suffix2'])) # give chance for suffix to execute them self.\r\n echo $this->{$this->body[$this->action]['suffix2']}();\r\n else\r\n echo $this->body[$this->action]['suffix2'];\r\n }", "protected function formCreate() {\n\t\t$this->pxyLink = new \\QCubed\\Control\\Proxy($this);\n\t\t$this->pxyLink->AddAction(new \\QCubed\\Event\\MouseOver(), new \\QCubed\\Action\\Ajax('mouseOver'));\n\n\t\t// Define the DataGrid\n\t\t$this->tblProjects = new \\QCubed\\Project\\Control\\Table($this);\n\n\t\t// This css class is used to style alternate rows and the header, all in css\n\t\t$this->tblProjects->CssClass = 'simple_table';\n\n\t\t// Define Columns\n\n\t\t// Create a link column that shows the name of the project, and when clicked, calls back to this page with an id\n\t\t// of the item clicked on\n\t\t$this->tblProjects->CreateLinkColumn('Project', '->Name', \\QCubed\\Project\\Application::instance()->context()->scriptName(), ['intId'=>'->Id']);\n\n\t\t// Create a link column using a proxy\n\t\t$col = $this->tblProjects->CreateLinkColumn('Status', '->ProjectStatusType', $this->pxyLink, '->Id');\n\n\t\t$this->tblProjects->SetDataBinder('tblProjects_Bind');\n\n\t\t$this->pnlClick = new \\QCubed\\Control\\Panel($this);\n\n\t\tif (($intId = \\QCubed\\Project\\Application::instance()->context()->queryStringItem('intId')) && ($objProject = Project::Load($intId))) {\n\t\t\t$this->pnlClick->Text = 'You clicked on ' . $objProject->Name;\n\t\t}\n\n\t}", "public function definition() {\n\t\t\tglobal $CFG, $DB;\t\n\t\t\n\t\t$mform = $this->_form; // Don't forget the underscore!\n\t\n\t\t$result= $DB->get_records_sql(\"SELECT DISTINCT `intensidad` FROM `mdl_ejercicios`\");\n\t\t$result_tren= $DB->get_records_sql(\"SELECT DISTINCT `categoria` FROM `mdl_ejercicios`\");\n\t\t$options= array();\n\t\tforeach($result as $rs)\n\t\t\t\t$options[$rs->intensidad] = $rs->intensidad;\n\t\t\n\t\t$options_tren= array();\n\t\tforeach ($result_tren as $rst)\n\t\t\t$options_tren[$rst->categoria]= $rst->categoria;\n\t\t$mform->addElement('header', 'header', 'Para crear una rutina aleatoria');\n\t\t\n\t\t$mform->addElement('select', 'intensidad', '¿Qué intensidad quieres?:',$options);\n\n\t\t//$mform->addElement('select', 'categoria', '¿Qué tren de tu cuerpo quieres trabajar?:',$options_tren);\n\t\t\n\t\t\n\t\t$buttonarray=array();\n\t\t$buttonarray[] = &$mform->createElement('submit', 'submitbutton', 'Buscar rutina');\n\t\t$buttonarray[] = &$mform->createElement('reset', 'resetbutton', 'Resetear');\n\t\t$buttonarray[] = &$mform->createElement('cancel', 'cancel', 'Cancelar');\n\t\t$mform->addGroup($buttonarray, 'buttonar', '', array(' '), false);\n\t\t$mform->addElement('hidden', 'end');\n\t\t$mform->setType('end', PARAM_NOTAGS);\n\t\t$mform->closeHeaderBefore('end');\n\t}", "protected function createComponentRateForm()\r\n\t{\r\n\t\t$form = new Form;\r\n\t\t$form->addText('tarif', 'Tarifní sazba:')\r\n\t\t\t\t->setRequired('Uveďte tarifní hodinovou sazbu.')\r\n\t\t\t\t->setAttribute('class', 'cislo')\r\n\t\t\t\t->addFilter(array('Nette\\Forms\\Controls\\TextBase', 'filterFloat'))\r\n\t\t\t\t\t->controlPrototype->autocomplete('off')\r\n\t\t\t\t->addCondition($form::FILLED)\r\n\t\t\t\t\t\t->addRule($form::FLOAT, 'Hodnota musí být celé nebo reálné číslo.');\r\n\t\t\r\n\t\t$form->addText('hodnota', 'Kalkulační hodnota:')\r\n\t\t\t\t->setRequired('Uveďte kalkulační hodnotu tarifu.')\r\n\t\t\t\t->setAttribute('class', 'cislo')\r\n\t\t\t\t->addFilter(array('Nette\\Forms\\Controls\\TextBase', 'filterFloat'))\r\n\t\t\t\t\t->controlPrototype->autocomplete('off')\r\n\t\t\t\t->addCondition($form::FILLED)\r\n\t\t\t\t\t\t->addRule($form::FLOAT, 'Hodnota musí být celé nebo reálné číslo.');\r\n\r\n\t\t$form->addHidden('id_set_tarifu');\r\n\t\t$form->addHidden('id_typy_tarifu');\r\n\r\n\t\t$form->addSubmit('save', 'Uložit')->setAttribute('class', 'default');\r\n\t\t$form->addSubmit('cancel', 'Storno')->setValidationScope(FALSE);\r\n\t\t$form->onSuccess[] = callback($this, 'rateFormSubmitted');\r\n\r\n\t\t$form->addProtection(self::MESS_PROTECT);\r\n\t\treturn $form;\r\n\t}", "public function buildForm(array $form, FormStateInterface $form_state) {\n // Call the parent implementation to inherit from the save button and\n // form style.\n $form = parent::buildForm($form, $form_state);\n\n // Add our custom form fields.\n $form['opening_hours'] = array(\n '#type' => 'textarea',\n '#title' => 'Opening hours',\n '#description' => 'Days / hours of the library',\n '#default_value' => $this->config('happy_alexandrie.library_config')->get('opening_hours'),\n '#rows' => 5,\n );\n return $form;\n }", "public function generate()\n {\n switch ($this->sColumn) {\n case 'description':\n $this->oForm->addElement(\n new Textarea(\n t('Description:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('str'),\n 'onblur' => 'CValid(this.value,this.id,20,4000)',\n 'value' => $this->sVal,\n 'validation' => new Str(20, 4000),\n 'required' => 1\n ]\n )\n );\n $this->addCheckErrSpan('str');\n break;\n\n case 'punchline':\n $this->oForm->addElement(\n new Textbox(\n t('Punchline/Headline:'),\n 'punchline',\n [\n 'id' => $this->getFieldId('str'),\n 'onblur' => 'CValid(this.value,this.id,5,150)',\n 'value' => $this->sVal,\n 'validation' => new Str(5, 150)\n ]\n )\n );\n $this->addCheckErrSpan('str');\n break;\n\n case 'country':\n $this->oForm->addElement(\n new Country(\n t('Country:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('str'),\n 'value' => $this->sVal,\n 'required' => 1\n ]\n )\n );\n break;\n\n case 'city':\n $this->oForm->addElement(\n new Textbox(\n t('City:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('str'),\n 'onblur' => 'CValid(this.value,this.id,2,150)',\n 'value' => $this->sVal,\n 'validation' => new Str(2, 150),\n 'required' => 1\n ]\n )\n );\n $this->addCheckErrSpan('str');\n break;\n\n case 'state':\n $this->oForm->addElement(\n new Textbox(\n t('State/Province:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('str'),\n 'onblur' => 'CValid(this.value,this.id,2,150)',\n 'value' => $this->sVal,\n 'validation' => new Str(2, 150)\n ]\n )\n );\n $this->addCheckErrSpan('str');\n break;\n\n case 'zipCode':\n $this->oForm->addElement(\n new Textbox(\n t('Postal Code:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('str'),\n 'onblur' => 'CValid(this.value,this.id,2,15)',\n 'value' => $this->sVal,\n 'validation' => new Str(2, 15)\n ]\n )\n );\n $this->addCheckErrSpan('str');\n break;\n\n case 'middleName':\n $this->oForm->addElement(\n new Textbox(\n t('Middle Name:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('name'),\n 'onblur' => 'CValid(this.value,this.id)',\n 'value' => $this->sVal,\n 'validation' => new Name\n ]\n )\n );\n $this->addCheckErrSpan('name');\n break;\n\n case 'height':\n $this->oForm->addElement(\n new Height(\n t('Height:'),\n $this->sColumn,\n [\n 'value' => $this->sVal\n ]\n )\n );\n break;\n\n case 'weight':\n $this->oForm->addElement(\n new Weight(\n t('Weight:'),\n $this->sColumn,\n [\n 'value' => $this->sVal\n ]\n )\n );\n break;\n\n case 'website':\n case 'socialNetworkSite':\n $sLabel = $this->sColumn === 'socialNetworkSite' ? t('Social Media Profile:') : t('Website:');\n $sDesc = $this->sColumn === 'socialNetworkSite' ? t('The URL of your social profile, such as Facebook, Instagram, Snapchat, LinkedIn, ...') : t('Your Personal Website/Blog (any promotional/affiliated contents will be removed)');\n $this->oForm->addElement(\n new Url(\n $sLabel,\n $this->sColumn, [\n 'id' => $this->getFieldId('url'),\n 'onblur' => 'CValid(this.value,this.id)',\n 'description' => $sDesc,\n 'value' => $this->sVal\n ]\n )\n );\n $this->addCheckErrSpan('url');\n break;\n\n case 'phone':\n $this->oForm->addElement(\n new Phone(\n t('Phone Number:'),\n $this->sColumn,\n array_merge(\n [\n 'id' => $this->getFieldId('phone'),\n 'onblur' => 'CValid(this.value, this.id)',\n 'value' => $this->sVal,\n ],\n self::setCustomValidity(\n t('Enter full number with area code.')\n ),\n )\n )\n );\n $this->addCheckErrSpan('phone');\n break;\n\n default:\n $sLangKey = strtolower($this->sColumn);\n $sClass = '\\PFBC\\Element\\\\' . $this->getFieldType();\n $this->oForm->addElement(new $sClass(t($sLangKey), $this->sColumn, ['value' => $this->sVal]));\n }\n\n return $this->oForm;\n }", "public function MapperForm()\n {\n $fields = new FieldList(\n CheckboxField::create(\n \"HasHeader\",\n \"This data includes a header row.\",\n true\n )\n );\n if ($this->component->getCanClearData()) {\n $fields->push(\n CheckboxField::create(\n \"ClearData\",\n \"Remove all existing records before import.\"\n )\n );\n }\n $actions = FieldList::create(\n FormAction::create(\"import\", \"Import CSV\")\n ->setUseButtonTag(true)\n ->addExtraClass(\"btn btn-primary btn--icon-large font-icon-upload\"),\n FormAction::create(\"cancel\", \"Cancel\")\n ->setUseButtonTag(true)\n ->addExtraClass(\"btn btn-outline-danger btn-hide-outline font-icon-cancel-circled\")\n );\n\n $form = new Form($this, __FUNCTION__, $fields, $actions);\n\n return $form;\n }", "public function ajax_example_progressbar_callback($form, &$form_state) {\n $variable_name = 'example_progressbar_' . $form_state['time'];\n $commands = array();\n\n variable_set($variable_name, 10);\n sleep(2);\n variable_set($variable_name, 40);\n sleep(2);\n variable_set($variable_name, 70);\n sleep(2);\n variable_set($variable_name, 90);\n sleep(2);\n variable_del($variable_name);\n\n $commands[] = HtmlCommand('#progress-status', $this->t('Executed.'));\n\n return array(\n '#type' => 'ajax',\n '#commands' => $commands,\n );\n}", "protected function buildForm()\n {\n $this->formBuilder\n ->add('host', 'text', array(\n 'data' => ElasticProduct::getConfigValue('host'),\n 'required' => false,\n 'attr' => ['placeholder' => 'localhost'],\n 'label' => Translator::getInstance()->trans('Host', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'host'\n )\n ))\n ->add('port', 'text', array(\n 'data' => ElasticProduct::getConfigValue('port'),\n 'required' => false,\n 'attr' => ['placeholder' => '9200'],\n 'label' => Translator::getInstance()->trans('Port', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'port'\n )\n ))\n ->add('username', 'text', array(\n 'data' => ElasticProduct::getConfigValue('username'),\n 'required' => false,\n 'label' => Translator::getInstance()->trans('Username', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'username'\n )\n ))\n ->add('password', PasswordType::class, array(\n 'data' => ElasticProduct::getConfigValue('password'),\n 'required' => false,\n 'label' => Translator::getInstance()->trans('Password', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'password'\n )\n ))\n ->add('index_prefix', 'text', array(\n 'data' => ElasticProduct::getConfigValue('index_prefix'),\n 'required' => false,\n 'attr' => ['placeholder' => 'my_website_name'],\n 'label' => Translator::getInstance()->trans('Index prefix', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'index_prefix'\n )\n ));\n }", "protected function form()\n {\n $form = new Form(new Task);\n\n $form->text('eid', 'Eid');\n $form->text('store', 'Store');\n $form->text('etype', 'Etype');\n $form->text('uid', 'Uid');\n $form->text('uname', 'Uname');\n $form->text('qq', 'Qq');\n $form->number('qtype', 'Qtype');\n $form->number('times', 'Times')->default(1);\n $form->textarea('content', 'Content');\n $form->text('deadline', 'Deadline');\n $form->file('file', 'File');\n $form->number('isok', 'Isok');\n $form->number('istag', 'Istag');\n $form->text('sid', 'Sid');\n $form->text('sname', 'Sname');\n $form->text('score', 'Score');\n\n return $form;\n }", "function usp_ews_completion_progress($iCompletion, $colour='') {\n\t// total width block - completed percentage\n\t$width = 100 - $iCompletion;\n\t\n\tif($colour == ''){\n\t\t$colour = usp_ews_find_color_percentage($iCompletion);\n\t}\n\t// html content\n\t// creating the bar in table \n\t$contenthtml = '';\n\t\n\t// inline css for the table properties\n\t$tableoption = array('class' => 'usp_ewsBarDashboardTable');\n\t$contenthtml .= HTML_WRITER::start_tag('table', $tableoption); // <table>\n\n\t$contenthtml .= HTML_WRITER::start_tag('tr'); // <tr>\n\t// <td> properties\n\t$tdoption = array('class' => 'usp_ewsotherCell',\n\t\t\t\t\t\t'title' => \"$iCompletion%\",\t\t\t\t\t\t\n\t\t\t\t\t\t'style' => 'background:' . $colour .'; width:' . $iCompletion . '%;');\n\t$contenthtml .= HTML_WRITER::start_tag('td', $tdoption); // <td>\n\t$contenthtml .= HTML_WRITER::end_tag('td'); // </td>\n\t\n\t$tdoption1 = array( 'class' => 'usp_ewsotherCell',\t\t\t\t\t\t\n\t\t\t\t\t\t'style' => 'background:#D3D3D3; width:' . $width . '%;');\n\t$contenthtml .= HTML_WRITER::start_tag('td', $tdoption1); // <td>\t \t\t\t\t\n\t$contenthtml .= HTML_WRITER::end_tag('td'); // </td>\n\n\t$contenthtml .= HTML_WRITER::end_tag('tr'); // </tr>\n\t$contenthtml .= HTML_WRITER::end_tag('table'); // <table>\n\n\t// returns the content\n\treturn $contenthtml;\n}", "protected function Form_Create() {\n\t\t\t$this->dtgTenPAssessments = new TenPAssessmentDataGrid($this);\n\n\t\t\t// Style the DataGrid (if desired)\n\t\t\t$this->dtgTenPAssessments->CssClass = 'datagrid';\n\t\t\t$this->dtgTenPAssessments->AlternateRowStyle->CssClass = 'alternate';\n\n\t\t\t// Add Pagination (if desired)\n\t\t\t$this->dtgTenPAssessments->Paginator = new QPaginator($this->dtgTenPAssessments);\n\t\t\t$this->dtgTenPAssessments->ItemsPerPage = 20;\n\n\t\t\t// Use the MetaDataGrid functionality to add Columns for this datagrid\n\n\t\t\t// Create an Edit Column\n\t\t\t$strEditPageUrl = __VIRTUAL_DIRECTORY__ . __FORM_DRAFTS__ . '/ten_p_assessment_edit.php';\n\t\t\t$this->dtgTenPAssessments->MetaAddEditLinkColumn($strEditPageUrl, 'Edit', 'Edit');\n\n\t\t\t// Create the Other Columns (note that you can use strings for ten_p_assessment's properties, or you\n\t\t\t// can traverse down QQN::ten_p_assessment() to display fields that are down the hierarchy)\n\t\t\t$this->dtgTenPAssessments->MetaAddColumn('Id');\n\t\t\t$this->dtgTenPAssessments->MetaAddColumn(QQN::TenPAssessment()->ResourceStatus);\n\t\t\t$this->dtgTenPAssessments->MetaAddColumn(QQN::TenPAssessment()->Company);\n\t\t\t$this->dtgTenPAssessments->MetaAddColumn(QQN::TenPAssessment()->Resource);\n\t\t\t$this->dtgTenPAssessments->MetaAddColumn(QQN::TenPAssessment()->User);\n\t\t\t$this->dtgTenPAssessments->MetaAddColumn(QQN::TenPAssessment()->Group);\n\t\t}", "function erpal_contract_helper_config_form($form, $form_state) {\n $form = array();\n \n $form['cancelation_precalculate_range'] = array(\n '#type' => 'textfield',\n '#title' => t('Precalculation range contract duration'),\n '#description' => t('Number of month the date items for contract calculation are precalculated.'),\n '#default_value' => _erpal_contract_helper_cancelation_precalculate_range(),\n ); \n \n $form['submit'] = array(\n '#value' => t('save'),\n '#type' => 'submit',\n '#submit' => array('_erpal_contract_helper_config_form_submit'),\n );\n\n return $form;\n}", "protected function set_up_blank_object()\n {\n return $this->create_cell(array('content'=>'','colCount'=>1));\n }", "protected function createComponentTarifForm()\r\n\t{\r\n\t\t$form = new Form;\r\n\t\t$form->addText('name', 'Jméno:')\r\n\t\t\t->setRequired('Zadej jméno.');\r\n\r\n\t\t$form->addText('apicode', 'API Code:');\r\n\r\n\t\t$form->addText('price', 'Cena:')\r\n\t\t ->addRule(Form::INTEGER, 'Cena musí být číslo')\r\n\t\t\t->setRequired('Zadej cenu.');\r\n\t\t\r\n\t\t$form->addText('description', 'Popis:');\r\n\t\t\t\r\n\t\t$form->addSubmit('save', 'Uložit')\r\n\t\t\t->setAttribute('class', 'default')\r\n\t\t\t->onClick[] = $this->tarifFormSucceeded;\r\n\r\n\t\t$form->addSubmit('cancel', 'Cancel')\r\n\t\t\t->setValidationScope(NULL)\r\n\t\t\t->onClick[] = $this->formCancelled;\r\n\r\n\t\t$form->addProtection();\r\n\t\treturn $form;\r\n\t}", "protected function createComponentMoveForm() {\r\n\t\t$form = new Form;\r\n\t\t$options = $this->closureModel->getOptions();\r\n\t\t$form->addSelect(\"parentId\", \"Branch Parent\", $options);\r\n\t\t$form->addHidden(\"id\", $this->edit_id);\r\n\t\t$form->addSubmit('save', 'Save')\r\n\t\t\t\t->onClick[] = callback($this, 'moveFormSubmitted');\r\n\t\t$form->setRenderer(new \\Kdyby\\BootstrapFormRenderer\\BootstrapRenderer());\r\n\t\treturn $form;\r\n\t}", "public function definition() {\n global $CFG;\n $mform = $this->_form;\n // Define hidden element for id.\n $id = $this->_customdata['id'];\n $mform->addElement('hidden', 'id', $id);\n $mform->setType('id', PARAM_INT);\n\n // Define hidden element for course id.\n $courseid = $this->_customdata['courseid'];\n $mform->addElement('hidden', 'courseid', $courseid);\n $mform->setType('courseid', PARAM_INT);\n // Text element to hold name data.\n $mform->addElement('text', 'name', get_string('name', 'tool_sumitnegi'));\n $mform->setType('name', PARAM_NOTAGS);\n // Checkbox to set completion for the record.\n $mform->addElement('checkbox', 'completed', get_string('completed', 'tool_sumitnegi'));\n $mform->addElement('editor', 'description_editor', get_string('description', 'tool_sumitnegi'),\n null, tool_sumitnegi\\api::editor_options());\n $mform->setType('description', PARAM_RAW);\n $this->add_action_buttons();\n }", "protected function form()\n {\n $form = new Form(new Good);\n $form->text('name', __('名称'))->rules('required');\n $form->decimal('amount', __('价格'))->default(0.00)->rules('required');\n $form->text('unit', __('单位'))->rules('required');\n $form->image('list_img', __('缩略图(320*320)'))->creationRules('required');\n $form->hasMany('goodsimgs', __('轮播图(640*640)'),function(Form\\NestedForm $form){\n $form->image('img',__('轮播图'))->creationRules('required');\n });\n $form->kindeditor('describe', __('描述'));\n // 去掉`查看`checkbox\n $form->disableViewCheck();\n // 去掉`继续编辑`checkbox\n $form->disableEditingCheck();\n // 去掉`继续创建`checkbox\n $form->disableCreatingCheck();\n return $form;\n }", "public function build(Form $form):Form\n {\n foreach ($this->classType->getProperties() as $property) {\n $this->add($form, $property);\n }\n \n return $form;\n }", "protected function form()\n {\n $form = new Form(new Boarding()); \n \n $form->select('pet_id',__('Pet Name'))->options(Pet::all()->pluck('name','id'))->rules('required');\n $form->select('reservation_id',__('Reservation'))->options(Reservation::all()->pluck('date','id'))->rules('required');\n $form->select('cage_id',__('Available Cages'))->options(Cage::get()->where(\"availability\",\"Available\")->pluck('id','id'))->rules('required');\n $form->datetime('end_date', __('End date'))->default(date('Y-m-d H:i:s'))->rules('required');\n \n return $form; \n }", "protected function getConfigForm()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n\n\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter an image'),\n 'name' => 'title',\n 'label' => $this->l('Titre'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter an image'),\n 'name' => 'description',\n 'label' => $this->l('Description'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter an image'),\n 'name' => 'legend',\n 'label' => $this->l('Légende'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter an image'),\n 'name' => 'url',\n 'label' => $this->l('Url'),\n ), \n array(\n 'col' => 6,\n 'type' => 'file',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter an image'),\n 'name' => 'image',\n 'label' => $this->l('Image_up'),\n ),\n array(\n 'col' => 4,\n 'type' => 'date',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter a start date'),\n 'name' => 'debut',\n 'label' => $this->l('Debut'),\n ),\n array(\n 'col' => 4,\n 'type' => 'date',\n 'prefix' => '<i class=\"icon icon-envelope\"></i>',\n 'desc' => $this->l('Enter a end date'),\n 'name' => 'fin',\n 'label' => $this->l('Fin'),\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n }", "function form($instance) {\n\n\t\t// Get stored preferences\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$title = isset( $instance['title'] ) ? esc_attr($instance['title']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$show_title_text = isset( $instance['show_title_text'] ) ? $instance['show_title_text'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$order = isset( $instance['order'] ) ? esc_attr($instance['order']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$size_from = isset( $instance['size_from'] ) ? esc_attr($instance['size_from']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$size_to = isset( $instance['size_to'] ) ? esc_attr($instance['size_to']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$max = isset( $instance['max'] ) ? esc_attr($instance['max']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$taxonomy = isset( $instance['taxonomy'] ) ? esc_attr($instance['taxonomy']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$color = isset( $instance['color'] ) ? esc_attr($instance['color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$color_span_from = isset( $instance['color_span_from'] ) ? esc_attr($instance['color_span_from']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$color_span_to = isset( $instance['color_span_to'] ) ? esc_attr($instance['color_span_to']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$letter_spacing = isset( $instance['letter_spacing'] ) ? esc_attr($instance['letter_spacing']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$word_spacing = isset( $instance['word_spacing'] ) ? esc_attr($instance['word_spacing']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$tag_spacing = isset( $instance['tag_spacing'] ) ? esc_attr($instance['tag_spacing']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$case = isset( $instance['case'] ) ? esc_attr($instance['case']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$minimum\t\t = isset( $instance['minimum'] ) ? esc_attr($instance['minimum']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$tags_list = isset( $instance['tags_list'] ) && is_array($instance['tags_list']) ? $instance['tags_list'] : array();\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$tags_list_type = isset( $instance['tags_list_type'] ) ? esc_attr($instance['tags_list_type']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$reverse = isset( $instance['reverse'] ) ? $instance['reverse'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$authors = isset( $instance['authors'] ) && is_array($instance['authors']) ? $instance['authors'] : array();\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$color_set = isset( $instance['color_set'] ) && is_array($instance['color_set']) ? $instance['color_set'] : array();\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$case_sensitive = isset( $instance['case_sensitive'] ) ? $instance['case_sensitive'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$debug \t\t\t\t= isset( $instance['debug'] ) ? $instance['debug'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$show_title = isset( $instance['show_title'] ) ? $instance['show_title'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_underline = isset( $instance['link_underline'] ) ? $instance['link_underline'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_bold = isset( $instance['link_bold'] ) ? $instance['link_bold'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_italic = isset( $instance['link_italic'] ) ? $instance['link_italic'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_bg_color = isset( $instance['link_bg_color'] ) ? esc_attr($instance['link_bg_color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_border_width = isset( $instance['link_border_width'] ) ? esc_attr($instance['link_border_width']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_border_style = isset( $instance['link_border_style'] ) ? $instance['link_border_style'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_border_color = isset( $instance['link_border_color'] ) ? esc_attr($instance['link_border_color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_underline = isset( $instance['hover_underline'] ) ? $instance['hover_underline'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_bold = isset( $instance['hover_bold'] ) ? $instance['hover_bold'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_italic = isset( $instance['hover_italic'] ) ? $instance['hover_italic'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_bg_color = isset( $instance['hover_bg_color'] ) ? esc_attr($instance['hover_bg_color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_color = isset( $instance['hover_color'] ) ? esc_attr($instance['hover_color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_border_width = isset( $instance['hover_border_width'] ) ? esc_attr($instance['hover_border_width']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_border_style = isset( $instance['hover_border_style'] ) ? $instance['hover_border_style'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_border_color = isset( $instance['hover_border_color'] ) ? esc_attr($instance['hover_border_color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$days_old \t\t\t= isset( $instance['days_old'] ) ? esc_attr($instance['days_old']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$line_height \t\t= isset( $instance['line_height'] ) ? esc_attr($instance['line_height']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$separator \t\t\t= isset( $instance['separator'] ) ? esc_attr($instance['separator']) : '';\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$prefix \t\t\t= isset( $instance['prefix'] ) ? esc_attr($instance['prefix']) : '';\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$suffix \t\t\t= isset( $instance['suffix'] ) ? esc_attr($instance['suffix']) : '';\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$post_type = isset( $instance['post_type'] ) ? $instance['post_type'] : array('post');\n\n\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$configurations = get_option('utcw_saved_configs');\n\n\t\t$args = array(\n\t\t\t'public' => true\n\t\t);\n\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$available_post_types = get_post_types($args);\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$available_taxonomies = get_taxonomies();\n\n\t\t// Content of the widget settings form\n\t\trequire \"settings.php\";\n\t}", "public function definition() {\n global $CFG, $PAGE;\n\n $mform =& $this->_form;\n\n //edit section\n $mform->addElement('header', 'configheader', get_string('exitingcrontitle', 'tool_servercron'));\n\n $existing = $this->_customdata['existingrecs'];\n $rows = '';\n\n if (count($existing)) {\n //set up heading for the table\n $row = html_writer::tag('th', get_string('minuteprompt', 'tool_servercron'),\n array('width' => '5%', 'style' => 'padding:5px; text-align:right'));\n\n $row .= html_writer::tag('th', get_string('hourprompt', 'tool_servercron'),\n array('width' => '5%', 'style' => 'padding:5px; text-align:right'));\n\n $row .= html_writer::tag('th', get_string('dayprompt', 'tool_servercron'),\n array('width' => '5%', 'style' => 'padding:5px; text-align:right'));\n\n $row .= html_writer::tag('th', get_string('monthprompt', 'tool_servercron'),\n array('width' => '5%', 'style' => 'padding:5px; text-align:right'));\n\n $row .= html_writer::tag('th', get_string('wdayprompt', 'tool_servercron'),\n array('width' => '5%', 'style' => 'padding:5px; text-align:right'));\n\n $row .= html_writer::tag('th', get_string('commandprompt', 'tool_servercron'),\n array('width' => '30%', 'style' => 'padding:5px; text-align:center'));\n\n $row .= html_writer::tag('th', get_string('actionsprompt', 'tool_servercron'),\n array('style' => 'padding:5px; text-align:center'));\n\n $row = html_writer::tag('tr', $row, array('width' => '100%'));\n $rows .= $row .\"\\n\";\n\n foreach ($existing as $exists) {\n // make up the edit line\n $row = html_writer::tag('td', $exists->minute, array('style' => 'text-align: right'));\n $row .= html_writer::tag('td', $exists->hour, array('style' => 'text-align: right'));\n $row .= html_writer::tag('td', $exists->day, array('style' => 'text-align: right'));\n $row .= html_writer::tag('td', $exists->month, array('style' => 'text-align: right'));\n $row .= html_writer::tag('td', $exists->wday, array('style' => 'text-align: right'));\n $row .= html_writer::tag('td', $exists->commandline);\n\n //editing links\n $row .= html_writer::start_tag('td', array('style' => 'padding:5px; text-align:center'));\n\n $row .= html_writer::tag('a', '['.get_string('editcronjob', 'tool_servercron').']',\n array('id' => 'svrcrn'.$exists->id,\n 'href' => $PAGE->url.\"?action=edit&cronjobid=\".$exists->id));\n\n $row .= '&nbsp;&nbsp;';\n\n $row .= html_writer::tag('a', '['.get_string('deletecronjob', 'tool_servercron').']',\n array('id' => 'svrcrn'.$exists->id, 'href' => $PAGE->url.\"?action=delete&cronjobid=\".$exists->id));\n\n $row .= html_writer::end_tag('td');\n\n $row = html_writer::tag('tr', $row);\n $rows .= $row .\"\\n\";\n }\n\n $mform->addElement('html', html_writer::tag('table', $rows, array('width' => '100%'))); //enclose in table\n } else {\n //if no rec id specified - then we have no records\n if (!$this->_customdata['cronjobid']) {\n $mform->addElement('html', html_writer::tag('p', get_string('noexistingcrons', 'tool_servercron')));\n }\n }\n\n $editing = false; //deafult not editing existing record\n if ($this->_customdata['cronjobid'] != 0) {\n $editing = true;\n }\n //new section\n if ($editing) {\n $mform->addElement('header', 'configheader', get_string('editcronstitle', 'tool_servercron') .' [' .\n $this->_customdata['cronjobid'] . ']' );\n } else {\n $mform->addElement('header', 'configheader', get_string('newcronstitle', 'tool_servercron'));\n }\n\n if (isset($this->_customdata['error'])) {\n $mform->addElement('html', '<h3 style=\"color: red\">'.$this->_customdata['error'].'</h3>');\n }\n\n //hidden field\n $mform->addElement('hidden', 'cronjobid', $this->_customdata['cronjobid'], array('id' => 'id_cronjobid'));//0=new\n // default action is save - have to check for cancel in php code to avoid reliance on JS\n $mform->addElement('hidden', 'action', 'save', array('id' => 'id_action'));\n\n $timingdets=array();\n\n $select = $mform->createElement('select', 'minute', get_string('minuteprompt', 'tool_servercron'),\n $this->_customdata['minutes']);\n $select->setMultiple(true);\n $timingdets[] = $select;\n\n $select = $mform->createElement('select', 'hour', get_string('hourprompt', 'tool_servercron'),\n $this->_customdata['hours']);\n $select->setMultiple(true);\n $timingdets[] = $select;\n\n $select = $mform->createElement('select', 'day', get_string('dayprompt', 'tool_servercron'),\n $this->_customdata['days']);\n $select->setMultiple(true);\n $timingdets[] = $select;\n\n $select = $mform->createElement('select', 'month', get_string('monthprompt', 'tool_servercron'),\n $this->_customdata['months']);\n $select->setMultiple(true);\n $timingdets[] = $select;\n\n $select = $mform->createElement('select', 'wday', get_string('wdayprompt', 'tool_servercron'),\n $this->_customdata['wdays']);\n $select->setMultiple(true);\n $timingdets[] = $select;\n\n //set the defaults for all the dropdowns as every *\n if (isset($this->_customdata['minute'])) {\n $mform->setDefault('minute', $this->_customdata['minute']);\n } else {\n $mform->setDefault('minute', -1);\n }\n\n if (isset($this->_customdata['hour'])) {\n $mform->setDefault('hour', $this->_customdata['hour']);\n } else {\n $mform->setDefault('hour', -1);\n }\n\n if (isset($this->_customdata['day'])) {\n $mform->setDefault('day', $this->_customdata['day']);\n } else {\n $mform->setDefault('day', -1);\n }\n\n if (isset($this->_customdata['month'])) {\n $mform->setDefault('month', $this->_customdata['month']);\n } else {\n $mform->setDefault('month', -1);\n }\n\n if (isset($this->_customdata['wday'])) {\n $mform->setDefault('wday', $this->_customdata['wday']);\n } else {\n $mform->setDefault('wday', -1);\n }\n\n //now add the group to the form\n $mform->addGroup($timingdets, 'timings', get_string('timingsprompt', 'tool_servercron'), array(' '), false);\n\n //servercron title\n $mform->addElement('text', 'commandline', get_string('commandprompt', 'tool_servercron'), array('size' => 100));\n $mform->setDefault('commandline', $this->_customdata['commandline']);\n $mform->setType('commandline', PARAM_TEXT);\n\n //buttons\n $buttonarray=array();\n $buttonarray[] = $mform->createElement('submit', 'save', get_string('cronjobsave', 'tool_servercron'));\n\n if ($editing) {\n $buttonarray[] = $mform->createElement('cancel', 'cancel', get_string('croneditcancel', 'tool_servercron'));\n }\n\n $buttonarray[] = $mform->createElement('reset', 'resetbutton', get_string('cronjobreset', 'tool_servercron'));\n $mform->addGroup($buttonarray, 'buttonar', '', array(' '), false);\n\n }", "public function __construct()\n {\n parent::__construct();\n parent::setSize(640, null);\n parent::setTitle('AgendaEntry');\n parent::removePadding();\n \n // creates the form\n $this->form = new BootstrapFormBuilder('form_Entry');\n $this->form->setProperty('style', 'margin-bottom:0');\n \n $hours = array();\n $durations = array();\n for ($n=0; $n<24; $n++)\n {\n $hours[$n] = \"$n:00\";\n $durations[$n+1] = $n+1 . ' h';\n }\n array_pop($durations);\n // create the form fields\n $id = new TEntry('id');\n $entry_date = new TDate('entry_date');\n $start_hour = new TCombo('start_hour');\n $duration = new TCombo('duration');\n $title = new TEntry('title');\n $description = new TText('description');\n \n $start_hour->addItems($hours);\n $duration->addItems($durations);\n $id->setEditable(FALSE);\n \n // define the sizes\n $id->setSize(40);\n $entry_date->setSize(100);\n $start_hour->setSize(100);\n $duration->setSize(100);\n $title->setSize(400);\n $description->setSize(400, 50);\n \n // add one row for each form field\n $this->form->addFields( [new TLabel('ID:')], [$id] );\n $this->form->addFields( [new TLabel('Entry Date:')], [$entry_date] );\n $this->form->addFields( [new TLabel('Start Hour:')], [$start_hour] );\n $this->form->addFields( [new TLabel('Duration:')], [$duration] );\n $this->form->addFields( [new TLabel('Title:')], [$title] );\n $this->form->addFields( [new TLabel('Description:')], [$description] );\n\n $this->form->addAction( _t('Save'), new TAction(array($this, 'onSave')), 'fa:save green');\n $this->form->addAction( _t('Clear'), new TAction(array($this, 'onEdit')), 'fa:eraser red');\n \n parent::add($this->form);\n }", "function initStylePropertiesForm()\n\t{\n\t\tglobal $ilCtrl, $lng, $ilTabs, $ilSetting;\n\t\t\n\t\tinclude_once(\"./Services/Style/classes/class.ilObjStyleSheet.php\");\n\t\t$lng->loadLanguageModule(\"style\");\n\n\t\tinclude_once(\"./Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$this->form = new ilPropertyFormGUI();\n\t\t\n\t\t$fixed_style = $ilSetting->get(\"fixed_content_style_id\");\n\t\t$style_id = $this->object->getStyleSheetId();\n\n\t\tif ($fixed_style > 0)\n\t\t{\n\t\t\t$st = new ilNonEditableValueGUI($lng->txt(\"style_current_style\"));\n\t\t\t$st->setValue(ilObject::_lookupTitle($fixed_style).\" (\".\n\t\t\t\t$this->lng->txt(\"global_fixed\").\")\");\n\t\t\t$this->form->addItem($st);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$st_styles = ilObjStyleSheet::_getStandardStyles(true, false,\n\t\t\t\t$_GET[\"ref_id\"]);\n\n\t\t\t$st_styles[0] = $this->lng->txt(\"default\");\n\t\t\tksort($st_styles);\n\n\t\t\tif ($style_id > 0)\n\t\t\t{\n\t\t\t\t// individual style\n\t\t\t\tif (!ilObjStyleSheet::_lookupStandard($style_id))\n\t\t\t\t{\n\t\t\t\t\t$st = new ilNonEditableValueGUI($lng->txt(\"style_current_style\"));\n\t\t\t\t\t$st->setValue(ilObject::_lookupTitle($style_id));\n\t\t\t\t\t$this->form->addItem($st);\n\n//$this->ctrl->getLinkTargetByClass(\"ilObjStyleSheetGUI\", \"edit\"));\n\n\t\t\t\t\t// delete command\n\t\t\t\t\t$this->form->addCommandButton(\"editStyle\",\n\t\t\t\t\t\t$lng->txt(\"style_edit_style\"));\n\t\t\t\t\t$this->form->addCommandButton(\"deleteStyle\",\n\t\t\t\t\t\t$lng->txt(\"style_delete_style\"));\n//$this->ctrl->getLinkTargetByClass(\"ilObjStyleSheetGUI\", \"delete\"));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id))\n\t\t\t{\n\t\t\t\t$style_sel = ilUtil::formSelect ($style_id, \"style_id\",\n\t\t\t\t\t$st_styles, false, true);\n\t\t\t\t$style_sel = new ilSelectInputGUI($lng->txt(\"style_current_style\"), \"style_id\");\n\t\t\t\t$style_sel->setOptions($st_styles);\n\t\t\t\t$style_sel->setValue($style_id);\n\t\t\t\t$this->form->addItem($style_sel);\n//$this->ctrl->getLinkTargetByClass(\"ilObjStyleSheetGUI\", \"create\"));\n\t\t\t\t$this->form->addCommandButton(\"saveStyleSettings\",\n\t\t\t\t\t\t$lng->txt(\"save\"));\n\t\t\t\t$this->form->addCommandButton(\"createStyle\",\n\t\t\t\t\t$lng->txt(\"sty_create_ind_style\"));\n\t\t\t}\n\t\t}\n\t\t$this->form->setTitle($lng->txt(\"wiki_style\"));\n\t\t$this->form->setFormAction($ilCtrl->getFormAction($this));\n\t}", "function __buildGDL()\n {\n $gdl = new SwimTeamJobsAdminGUIDataList('Swim Team Jobs',\n '100%', 'jobstatus, jobposition', false) ;\n\n $gdl->set_alternating_row_colors(true) ;\n $gdl->set_show_empty_datalist_actionbar(true) ;\n\n return $gdl ;\n }", "protected function getConfigForm()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'col' => 4,\n 'type' => 'text',\n 'desc' => $this->l('Show manufacturer name'),\n 'name' => 'MF_TITLE',\n 'label' => $this->l('Enable Manufacturers Name'),\n 'required' => true,\n ),\n array(\n 'col' => 4,\n 'type' => 'text',\n 'desc' => $this->l('Show manufacturer description'),\n 'name' => 'MF_DESCRIPTION',\n 'label' => $this->l('Provide a description for the heading'),\n 'required' => true,\n ),\n array(\n 'col' => 4,\n 'type' => 'text',\n 'desc' => $this->l('Number of manufacturers to display (Enter 0 to display all)'),\n 'name' => 'MF_MAN_NUMBER',\n 'label' => $this->l('Number of Manufacturers'),\n 'required' => true,\n ),\n array(\n 'col' => 4,\n 'type' => 'text',\n 'desc' => $this->l('How many logo\\'s should be visible on desktops'),\n 'name' => 'MF_PER_ROW_DESKTOP',\n 'label' => $this->l('Logo\\'s per row (Desktop)'),\n 'required' => true,\n ),\n array(\n 'col' => 4,\n 'type' => 'text',\n 'desc' => $this->l('How many logo\\'s should be visible on tablets'),\n 'name' => 'MF_PER_ROW_TABLET',\n 'label' => $this->l('Logo\\'s per row (Tablet)'),\n 'required' => true,\n ),\n array(\n 'col' => 4,\n 'type' => 'text',\n 'desc' => $this->l('How many logo\\'s should be visible on mobiles'),\n 'name' => 'MF_PER_ROW_MOBILE',\n 'label' => $this->l('Logo\\'s per row (Mobile)'),\n 'required' => true,\n ),\n array(\n 'type' => 'select',\n 'desc' => 'How the logo\\'s should be sorted',\n 'name' => 'MF_MAN_ORDER',\n 'label' => $this->l('Order by'),\n 'options' => array(\n 'query' => array(\n array(\n 'id_option' => 'name_asc',\n 'name' => $this->l('Name ASC'),\n ),\n array(\n 'id_option' => 'name_desc',\n 'name' => $this->l('Name DESC'),\n ),\n array(\n 'id_option' => 'manu_asc',\n 'name' => $this->l('Manufacturer ID ASC'),\n ),\n array(\n 'id_option' => 'manu_desc',\n 'name' => $this->l('Manufacturer ID DESC'),\n ),\n ),\n 'id' => 'id_option',\n 'name' => 'name',\n ),\n ),\n array(\n 'type' => 'switch',\n 'label' => $this->l('Enable Manufacturers Name'),\n 'name' => 'MF_SHOW_MAN_NAME',\n 'is_bool' => true,\n 'desc' => $this->l('Use this module in live mode'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => 1,\n 'label' => $this->l('Yes'),\n ),\n array(\n 'id' => 'active_off',\n 'value' => 0,\n 'label' => $this->l('No'),\n )\n ),\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n }", "protected function form()\n {\n $form = new Form(new Activity());\n\n $form->text('log_name', __('Log name'));\n $form->text('description', __('Description'));\n $form->number('subject_id', __('Subject id'));\n $form->text('subject_type', __('Subject type'));\n $form->number('causer_id', __('Causer id'));\n $form->text('causer_type', __('Causer type'));\n $form->textarea('properties', __('Properties'));\n\n return $form;\n }", "protected function createComponentProjectForm(): Form {\n $form = new Form; \n\n //Get all available project types for select field\n $types = $this->database->table('types');\n $types_arr = array();\n foreach($types as $type) {\n $types_arr[$type->id] = $type->title;\n }\n\n $form->addText('title', \"Project Title:\")\n ->setRequired()\n ->addRule($form::MAX_LENGTH, 'The Project title need to be less than %d character long', 60);\n\n $form->addSelect(\"type_id\", \"Project Type\", $types_arr)\n ->setRequired();\n\n $form->addText('start_date', \"Start Date\")\n ->setHtmlType('date')\n ->setRequired();\n\n $form->addText('end_date', \"End Date\")\n ->setHtmlType('date')\n ->setRequired();\n\n $form->addSubmit('send', \"Publish Project\");\n\n $form->onSuccess[] = [$this, 'projectFormSucceeded'];\n\n return $form;\n }", "public function definition() {\n global $CFG;\n\n $mform = $this->_form; // Don't forget the underscore! \n\n $mform->addElement('filepicker', 'excelfile', get_string('excelfile', 'booking'), null, array('maxbytes' => $CFG->maxbytes, 'accepted_types' => '*'));\n $mform->addRule('excelfile', null, 'required', null, 'client');\n\n $this->add_action_buttons(TRUE, get_string('importexceltitle', 'booking'));\n }", "protected function form()\n {\n $form = new Form(new ScanRechargeOrder());\n $form->select('scan_recharge_channel_id', __('scan-recharge::order.scan_recharge_channel_id'))\n ->options(ScanRechargeChannel::select('id', 'name')->pluck('name', 'id'))\n ->required();\n $form->text('user_id', __('scan-recharge::order.user_id'))\n ->required()\n ->help(__('scan-recharge::order.user_id_help'));\n $form->currency('amount', __('scan-recharge::order.amount'))->symbol('¥')\n ->default(0)\n ->required();\n $form->textarea('desc', __('scan-recharge::order.desc'))\n ->required()\n ->help(__('scan-recharge::order.desc_help'));\n $form->textarea('reply', __('scan-recharge::order.reply'))\n ->help(__('scan-recharge::order.reply_help'));\n $form->select('status', __('scan-recharge::order.status'))\n ->options(__('scan-recharge::order.status_value'));\n $form->saving(function (Form $form) {\n if ($form->status == 1 && $form->model()->id) {\n RechargeSuccessUserAccountJob::dispatch(ScanRechargeOrder::find($form->model()->id));\n }\n });\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Resources);\n\n $form->text('name', '名称')->rules('required',['required' => '请输入 配置项的名称']);\n\n $form->radio('type', '类型')->options(Resources::TYPE);\n\n $form->cropper('url','图片');\n\n $form->number('sort_num','排序');\n\n $form->textarea('memo','备注');\n\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`删除`按钮\n $tools->disableDelete();\n\n // 去掉`查看`按钮\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new JournalVoucher);\n\n $form->saved(function(Form $form){\n self::postToLedger($form->model());\n });\n\n $form->date('date', __('Date'))->default(date('Y-m-d'));\n \n \\App\\Helpers\\SelectHelper::buildAjaxSelect(\n $form, \n 'project_id', \n __('Project'), \n 'admin/projects/create', \n '\\App\\Project')\n ->rules('required');\n\n \\App\\Helpers\\SelectHelper::buildAjaxSelect(\n $form, \n 'phase_id', \n __('Phase'), \n 'admin/phases/create', \n '\\App\\Phase')\n ->rules('required');\n\n $form->hasMany('journalVoucherDetails', __('Entries'), function (Form\\NestedForm $form) {\n \n \\App\\Helpers\\SelectHelper::buildAjaxSelect(\n $form, \n 'account_head_id', \n __('Account Head'), \n 'admin/account-heads/create', \n '\\App\\AccountHead')\n ->rules('required');\n \n $form->text('description', __('Description'))->rules('required');\n\n $form->decimal('debit', __('Debit'));\n \n $form->decimal('credit', __('Credit'));\n\n \\App\\Helpers\\SelectHelper::buildAjaxSelect(\n $form, \n 'person_id', \n __('Person (Optional)'), \n '', \n '\\App\\Person');\n\n \\App\\Helpers\\SelectHelper::buildAjaxSelect(\n $form, \n 'property_file_id', \n __('Property File (Optional)'), \n '', \n '\\App\\PropertyFile');\n\n\n })->mode('table');\n\n return $form;\n }", "function dwsim_flowsheet_completed_tab_form($form, $form_state)\n{\n\t$options_first = _flowsheet_details_year_wise();\n\t$selected = isset($form_state['values']['howmany_select']) ? $form_state['values']['howmany_select'] : key($options_first);\n\t$form = array();\n\t$form['howmany_select'] = array(\n\t'#title' => t('Sorting projects according to year:'),\n '#type' => 'select',\n '#options' => _flowsheet_details_year_wise(),\n /*'#options' => array(\n \t'Please select...' => 'Please select...',\n \t'2017' => '2017',\n \t'2018' => '2018', \n \t'2019' => '2019', \n \t'2020' => '2020', \n \t'2021' => '2021'),*/\n '#default_value' => $selected,\n '#ajax' => array(\n 'callback' => 'ajax_example_autocheckboxes_callback',\n ),\n '#suffix' => '<div id=\"ajax-selected-flowsheet\"></div>'\n\n\t );\n\treturn $form;\n}", "protected function form() {\n\t\treturn Admin::form(WhtSpiderLogModel::class,function (Form $form) {\n\t\t\t$directors = [\n\t\t\t\t'成功' => 1,\n\t\t\t\t'失败' => 0,\n\t\t\t];\n\t\t\t$form->select('status','状态')->options($directors);\n\t\t\t$form->setAction('采集');\n\t\t});\n\t}", "public function buildPaneForm(array $pane_form, FormStateInterface $form_state, array &$complete_form);", "public function buildFormFields()\n {\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"titre\")\n ->setLabel(\"Titre\")\n );\n\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"soustitre\")\n ->setLabel(\"Sous-titre\")\n );\n\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"slug\")\n ->setLabel(\"Slug\")\n );\n\n $this->addFormField(\n SharpTextFormFieldConfig::create(\"url\")\n ->setLabel(\"URL du projet\")\n );\n\n $this->addFormField(\n SharpMarkdownFormFieldConfig::create(\"texte\")\n ->setLabel(\"Texte\")\n ->showToolbar(true)\n );\n\n $this->addFormField(\n SharpCheckFormFieldConfig::create(\"is_open_source\")\n ->setText(\"Projet Open-source\")\n );\n\n $this->addFormField(\n SharpPivotFormFieldConfig::create(\"technos\", SharpTechnoRepository::class)\n ->setLabel(\"Technologies\")\n ->setAddable(true)\n ->setSortable(true)\n ->setOrderAttribute(\"ordre\")\n ->setCreateAttribute(\"nom\")\n );\n\n $this->addFormField(\n SharpListFormFieldConfig::create(\"screenshots\")\n ->setLabel(\"Screenshots\")\n ->setSortable(true)->setOrderAttribute(\"ordre\")\n ->setAddable(true)->setAddButtonText(\"Ajouter un screenshot\")\n ->setRemovable(true)->setRemoveButtonText(\"Supprimer\")\n ->addItemFormField(\n SharpFileFormFieldConfig::create(\"fichier\")\n ->setFileFilterImages()\n ->setMaxFileSize(5)\n ->setThumbnail(\"100x100\")\n ->addGeneratedThumbnail(\"600x\"))\n ->addItemFormField(\n SharpTextFormFieldConfig::create(\"tag\")\n ->addAttribute(\"placeholder\", \"Tag\"))\n ->addItemFormField(\n SharpTextareaFormFieldConfig::create(\"legende\")\n ->setRows(3))\n ->setItemFormTemplate(\n SharpListItemFormTemplateConfig::create()\n ->addField(\"fichier\")\n ->addField(\"tag\")\n ->addField(\"legende\")\n )\n );\n\n $this->addFormTemplateColumn(\n SharpFormTemplateColumnConfig::create(7)\n ->addField(\"titre\")\n ->addField(\"soustitre\")\n ->addField([\"slug:5\", \"url:7\"])\n ->addField(\"technos\")\n ->addField(\"is_open_source\")\n\n )->addFormTemplateColumn(\n SharpFormTemplateColumnConfig::create(5)\n ->addField(\"texte\")\n ->addField(\"screenshots\")\n );\n }", "public static function formrow(){\n\n\n $forms = \"<tr class='row100 body'>\\n\";\n $forms .= \"<td class='cell100 column1'>\";\n return $forms;\n }", "protected function getConfigForm()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'col' => 6,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-key\"></i>',\n 'desc' => $this->l('Ingrese un token de empresa - Vea la documentación'),\n 'name' => 'APISFACT_PRESTASHOP_TOKEN',\n 'label' => $this->l('Token'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-circle text-success\"></i>',\n 'desc' => $this->l('Ingrese la serie para las facturas'),\n 'name' => 'APISFACT_PRESTASHOP_SERIEF',\n 'label' => $this->l('Serie Factura'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-circle text-success\"></i>',\n 'desc' => $this->l('Ingrese el número inicial para las facturas'),\n 'name' => 'APISFACT_PRESTASHOP_NUMEROF',\n 'label' => $this->l('Numero de Factura'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-circle\"></i>',\n 'desc' => $this->l('Ingrese la serie para las boletas'),\n 'name' => 'APISFACT_PRESTASHOP_SERIEB',\n 'label' => $this->l('Serie Boleta'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-circle\"></i>',\n 'desc' => $this->l('Ingrese el número inicial para las boletas'),\n 'name' => 'APISFACT_PRESTASHOP_NUMEROB',\n 'label' => $this->l('Numero de Boleta'),\n )\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n }", "protected function form()\n {\n $form = new Form(new gameLog());\n\n $form->text('onlyId', ___('OnlyId'));\n $form->number('bigBlindIndex', ___('BigBlindIndex'));\n $form->number('gameNums', ___('GameNums'));\n $form->number('smallBlindIndex', ___('SmallBlindIndex'));\n $form->textarea('tableCards', ___('TableCards'));\n $form->number('tableId', ___('TableId'));\n $form->textarea('tableSeat1Str1', ___('TableSeat1Str1'));\n $form->textarea('tableSeat1Str2', ___('TableSeat1Str2'));\n $form->textarea('tableSeat1Str3', ___('TableSeat1Str3'));\n $form->textarea('tableSeat1Str4', ___('TableSeat1Str4'));\n $form->textarea('tableSeat1Str5', ___('TableSeat1Str5'));\n $form->textarea('tableSeat1Str6', ___('TableSeat1Str6'));\n $form->textarea('tableSeat1Str7', ___('TableSeat1Str7'));\n $form->number('time', ___('Time'));\n\n return $form;\n }", "public function __construct($pIndex = 'A')\n {\n \t// Initialise values\n \t$this->_columnIndex\t\t= $pIndex;\n \t$this->_width\t\t\t= -1;\n \t$this->_autoSize\t\t= false;\n \t$this->_visible\t\t\t= true;\n \t$this->_outlineLevel\t= 0;\n \t$this->_collapsed\t\t= false;\n\n\t\t// set default index to cellXf\n\t\t$this->_xfIndex = 0;\n }", "function buildWidgets(&$table,$row) {\n //print_r($this);\n $this->table = &$table;\n $widgets = array(\n // format:\n //name display, width, pos , span , \n 'name' => array(null, 1 , 1),\n 'type' => array(null, 2 , 1),\n 'length' => array(null, 3 , 1),\n 'notnull' => array('n', 4 , 1),\n 'isIndex' => array('I', 5 , 1),\n 'sequence' => array('+', 6 , 1),\n 'unique' => array('u', 7 , 1),\n 'default' => array(null, 8 , 2)\n \n );\n \n foreach ($widgets as $string=>$config) {\n \n switch($string) {\n \n case 'name':\n case 'length':\n case 'default':\n $this->widgets[$string] = &new GtkEntry;\n $this->widgets[$string]->set_text((string) $this->$string);\n $this->widgets[$string]->connect('changed',array(&$this,'callbackSetValue'),$string);\n $this->widgets[$string]->connect('leave-notify-event', array(&$this->table->database,'save'));\n if ($string == 'name') {\n $this->widgets[$string]->connect_after('drag_begin',array(&$this,'callbackNamePressed'));\n $this->widgets[$string]->connect_after('drag-end',array(&$this,'callbackNameReleased'));\n $this->widgets[$string]->show();\n //$this->widgets[$string]->show();\n // $this->widgets[$string]->realize();\n $this->widgets[$string]->connect('drag_data_get', array(&$this,'callbackDropAsk'));\n $this->widgets[$string]->drag_source_set(\n GDK_BUTTON1_MASK|GDK_BUTTON3_MASK, \n array(array('text/plain', 0, -1)),\n GDK_ACTION_COPY\n );\n $this->widgets[$string]->connect('drag_data_received', array(&$this,'callbackDropReceived'));\n $this->widgets[$string]->drag_dest_set(\n GTK_DEST_DEFAULT_ALL, \n array(array('text/plain', 0, -1)) ,\n GDK_ACTION_COPY);\n\n }\n break;\n \n case 'type':\n $this->widgets[$string] = &new GtkEntry;\n $this->widgets[$string]->set_text((string) $this->$string);\n $this->widgets[$string]->connect('button-press-event',array(&$this,'callbackTypePressed'),$string);\n $this->widgets[$string]->set_editable(false); \n break;\n case 'notnull':\n case 'isIndex':\n case 'sequence':\n case 'unique':\n $this->widgets[$string] = &new GtkToggleButton($config[0]);\n $this->widgets[$string]->set_active((int) $this->$string);\n $this->widgets[$string]->connect('toggled',array(&$this,'callbackSetValue'),$string);\n \n break;\n case 'delete':\n $this->widgets[$string] = &new GtkButton('X');\n $this->widgets[$string]->connect('pressed',array(&$this,'callbackRowDelete'));\n break;\n \n } \n \n \n $this->table->addCell($this->widgets[$string],$config[1],$row, $config[2], GTK_EXPAND|GTK_FILL);\n $this->widgets[$string]->show();\n }\n $this->setSizes();\n \n $this->deleteMenuItem = &new GtkMenuItem($this->name);\n $this->deleteMenuItem->show();\n $this->deleteMenuItem->connect('activate',array(&$this,'callbackRowDelete'));\n $this->table->deleteMenu->add( $this->deleteMenuItem);\n $this->setVisable();\n \n \n \n }", "function conf__prop_basicas($form)\n\t{\n\t\t$datos = $this->get_entidad()->tabla('prop_basicas')->get();\n\t\t$datos['posicion_botonera'] = $this->get_entidad()->tabla('base')->get_columna('posicion_botonera');\n\t\t$form->set_datos($datos);\n\t}", "protected function form()\n {\n $form = new Form(new Procurement);\n\n $form->number('u_id', 'U id');\n $form->number('brand', 'Brand');\n $form->number('type', 'Type');\n $form->number('models', 'Models');\n $form->number('material', 'Material');\n $form->decimal('area', 'Area');\n $form->radio('status', '审核')->options(['0' => '待审核', '1'=> '通过','2'=>'未通过'])->default('0');\n $form->number('room_city', 'Room city');\n $form->text('address', 'Address');\n $form->number('brick_time', 'Brick time')->default(1);\n $form->text('images', 'Images');\n $form->number('ctime', 'Ctime');\n $form->number('utime', 'Utime');\n\n return $form;\n }", "public function buildForm()\n {\n $this\n ->addNarrative('location_description_narrative')\n ->addAddMoreButton('add', 'location_description_narrative');\n }", "protected function form()\n {\n $form = new Form(new Activity);\n\n $form->text('log_name', 'Log name');\n $form->textarea('description', 'Description');\n $form->number('subject_id', 'Subject id');\n $form->text('subject_type', 'Subject type');\n $form->number('causer_id', 'Causer id');\n $form->text('causer_type', 'Causer type');\n $form->text('properties', 'Properties');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Carousel);\n\n $form->select('carousel_category_id', __('carousel::carousel.carousel_category_id'))\n ->options(CarouselCategory::all()->pluck('name', 'id'));\n $form->text('title', __('carousel::carousel.title'));\n $form->text('url', __('carousel::carousel.url'));\n $form->image('img_src', __('carousel::carousel.img_src'))\n ->removable()\n ->uniqueName()\n ->move('carousel');\n $form->text('alt', __('carousel::carousel.alt'));\n $form->textarea('remark', __('carousel::carousel.remark'));\n $form->select('status', __('carousel::carousel.status.label'))\n ->default(1)\n ->options(__('carousel::carousel.status.value'));\n $form->datetime('start_time', __('carousel::carousel.start_time'))\n ->default(date('Y-m-d H:i:s'));\n $form->datetime('end_time', __('carousel::carousel.end_time'))\n ->default(date('Y-m-d H:i:s'));\n\n return $form;\n }", "protected function getConfigForm()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'type' => 'textarea',\n 'label' => $this->l('CGV'),\n 'name' => 'MYETICKETS_CGV',\n 'desc' => $this->l('Set the CGV that will be print to e-tckets.'),\n ),\n array(\n 'type' => 'text',\n 'label' => $this->l('Number of days to use e-tickets'),\n 'name' => 'MYETICKETS_PERIOD',\n 'class' => 'fixed-width-xs',\n 'desc' => $this->l('Set the number of days to use and check e-tckets.'),\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n }", "function definition() {\n\t\tglobal $CFG, $DB;\n\n\t\t$mform =& $this->_form; // Don't forget the underscore!\n\t\t$instance = $this->_customdata;\n\t\t$buildingid = $instance['idbuilding'];\n\t\t$prevaction=$instance['prevaction'];\n\t\t$name = $instance['buildingname'];\n\t\t$modules=$instance['modules'];\n\t\t$places=$instance['place'];\n\t\t$idres = optional_param('building', NULL, PARAM_RAW);\n\t\t$moduleforline = implode('', $modules);\n\t\t$buildingplace = $DB->get_record('bookingrooms_buildings', array('id'=>$buildingid));\n\t\t$placename = $DB->get_record('bookingrooms_campus', array('id'=>$buildingplace->campus_id));\n\t\t\n\t\t\n\t\t$mform->addElement('select', 'campus', get_string('campus', 'local_bookingrooms').': ', $places); //add the select to the campus\n\t\t$mform->setDefault('campus',$placename->id);\n\t\t$mform->setType('campus', PARAM_INT);\n\t\t$mform->addElement('text', 'building',get_string('newbuildingname', 'local_bookingrooms').': ', array('value'=>$name));// Add new edificos\n\t\t$mform->setType('building', PARAM_TEXT);\n\t\t$mform->addElement('hidden', 'testbuilding', $name);\n\t\t$mform->setType('testbuilding', PARAM_TEXT);\n\t\t$mform->addRule('building',get_string('indicatenametobuilding', 'local_bookingrooms').': ','required');\n\t\t$mform->addElement('textarea', 'modules', get_string('modules', 'local_bookingrooms').': ');\n\t\t$mform->setDefault('modules',$moduleforline);\n\t\t$mform->setType('modules', PARAM_TEXT);\n\t\t$mform->addRule('modules', get_string('indicatemodules', 'local_bookingrooms'), 'required');\n\t\t$mform->addElement('static', 'rule', get_string('modulerule', 'local_bookingrooms').': ');\n\t\t$mform->addElement('static', 'condition', get_string('modulecondition', 'local_bookingrooms'));\n\t\t$mform->addElement('hidden','action','edit');\n\t\t$mform->setType('action', PARAM_TEXT);\n\t\t$mform->addElement('hidden','buildingid',$buildingid);\n\t\t$mform->setType('buildingid', PARAM_INT);\n\t\t$mform->addElement('hidden','prevaction',$prevaction);\n\t\t$mform->setType('prevaction', PARAM_INT);\n\t\t$this->add_action_buttons(true,get_string('changebuilding', 'local_bookingrooms'));\n\t}", "public function form(){\n \t \tif($this->layoutWidgetInfo){\n \t\t$setting = json_decode($this->layoutWidgetInfo->setting, true);\n \t}\n\n \t//default option(type[text], cols[3-9], rows[1], label[$key], name[$key], value[$setting[$k]])\n \t//add option(class, id, stype, styleRow, required, placeholder, attr, [options, code])\n \t$settingForm = array(\n \t\t'layout_widget_id' \t=> array('type' => 'hidden', 'value' => $this->layoutWidgetInfo->layoutWidgetId),\n \t\t'widget_controller' => array('type' => 'hidden', 'value' => $this->widgetController),\n \t\t'header' \t=> array('type' => 'custom', 'value' => \"<h4 class='widget_header col-md-12'>{$this->widgetController}</h4>\", 'label' => ''),\n\n \t\t'title' => array(),\n \t\t'class'\t=> array(),\n 'bg_color'\t=> array('label' => 'Màu nền', 'class' => 'ColorPickerSliders',\n 'addElement' => '<a href=\"index.php?r=admin/help/view&helpId=4\" target=\"_blank\">Xem thêm</a>'),\n \t\t'category_id'\t=> array('type' => 'select_category', 'label' => 'Category', 'required' => true,\n \t\t\t\t'options' => CategoryExt::getCategoryList()),\n \t\t'style'\t=> array('type' => 'select', 'options' => $this->settingDefault['style']),\n \t\t'order_by' => array('type' => 'select', 'options' => $this->settingDefault['order_by']),\n \t\t'order_direction' => array('type' => 'select', 'options' => $this->settingDefault['order_direction']),\n \t);\n\n \t$settingAll = array(\n \t\t'cols' => '3-9'\n \t);\n\n \t//render setting from\n \tTemplateHelper::renderForm($settingForm, $setting, $settingAll);\n TemplateHelper::getTemplate('layout/_extra/add_setting.php', $setting);\n TemplateHelper::getTemplate('layout/_extra/color_picker.php');\n \t}", "function build() {\n $this->to_usd = new view_field(\"To USD\");\n $this->to_local = new view_field(\"To local\");\n $this->timestamp = new view_field(\"Created\");\n $this->expire_date_time = new view_field(\"Expired\");\n parent::build();\n }", "function getForm($form, &$form_state, $disabled, $myvalues)\n {\n $form[\"data_entry_area1\"] = array(\n '#prefix' => \"\\n<section class='protocollib-admin raptor-dialog-table'>\\n\",\n '#suffix' => \"\\n</section>\\n\",\n );\n $form[\"data_entry_area1\"]['table_container'] = array(\n '#type' => 'item', \n '#prefix' => '<div class=\"raptor-dialog-table-container\">',\n '#suffix' => '</div>', \n '#tree' => TRUE,\n );\n\n\tglobal $base_url;\n $language_infer = new \\raptor_formulas\\LanguageInference();\n\t\t\n $showDeleteOption = $this->m_oUserInfo->hasPrivilege('REP1');\n $showAddOption = $this->m_oUserInfo->hasPrivilege('UNP1');\n \n $rows = \"\\n\";\n $result = db_select('raptor_protocol_lib', 'p')\n ->fields('p')\n ->orderBy('protocol_shortname')\n ->execute();\n foreach($result as $item) \n {\n $protocol_shortname = $item->protocol_shortname;\n if($item->original_file_upload_dt == NULL)\n {\n $docuploadedmarkup = 'No';\n } else {\n $docuploadedmarkup = '<span class=\"hovertips\" title=\"uploaded '\n .$item->original_filename\n .' on '\n .$item->original_file_upload_dt.'\">Yes</span>';\n }\n $keywords = $this->getFormattedKeywordsForTable($protocol_shortname);\n $active_markup = $item->active_yn == 1 ? '<b>Yes</b>' : 'No';\n $declaredHasContrast = $item->contrast_yn == 1 ? TRUE : FALSE;\n $hasSedation = $item->sedation_yn == 1 ? '<b>Yes</b>' : 'No';\n $hasRadioisotope = $item->sedation_yn == 1 ? '<b>Yes</b>' : 'No';\n $fullname = $item->name;\n $infered_hasContrast = $language_infer->inferContrastFromPhrase($fullname);\n $hasContrastMarkup = $declaredHasContrast ? '<b>Yes</b>' : 'No';\n if($infered_hasContrast !== NULL)\n {\n if(!(\n ($declaredHasContrast && $infered_hasContrast) || \n (!$declaredHasContrast && !$infered_hasContrast))\n )\n {\n if($infered_hasContrast)\n {\n $troublemsg = \"protocol long name implies YES contrast\";\n } else {\n $troublemsg = \"protocol long name implies NO contrast\";\n }\n $hasContrastMarkup = \"<span class='medical-health-warn' title='$troublemsg'>!!! $hasContrastMarkup !!!</span>\";\n }\n }\n if(!$showAddOption)\n {\n $addActionMarkup = '';\n $editActionMarkup = '';\n } else {\n $addActionMarkup = '<a href=\"'.$base_url.'/raptor/viewprotocollib?protocol_shortname='.$item->protocol_shortname.'\">View</a>';\n $editActionMarkup = '<a href=\"'.$base_url.'/raptor/editprotocollib?protocol_shortname='.$item->protocol_shortname.'\">Edit</a>';\n }\n if(!$showDeleteOption)\n {\n $deleteActionMarkup = '';\n } else {\n $deleteActionMarkup = '<a href=\"'.$base_url.'/raptor/deleteprotocollib?protocol_shortname='.$item->protocol_shortname.'\">Delete</a>';\n }\n $rows .= \"\\n\".'<tr>'\n . '<td>'.$protocol_shortname.'</td>'\n . '<td>'.$fullname.'</td>'\n . '<td>'.$active_markup.'</td>'\n . '<td>'.$hasContrastMarkup.'</td>'\n . '<td>'.$hasSedation.'</td>'\n . '<td>'.$hasRadioisotope.'</td>'\n . '<td>'.$item->modality_abbr.'</td>'\n . '<td>'.$item->version.'</td>'\n . '<td>'.$docuploadedmarkup.'</td>'\n . '<td>'.$keywords.'</td>'\n . \"<td>$addActionMarkup</td>\"\n . \"<td>$editActionMarkup</td>\"\n . \"<td>$deleteActionMarkup</td>\"\n . '</tr>';\n }\n\n $form[\"data_entry_area1\"]['table_container']['protocols'] = array('#type' => 'item',\n '#markup' => '<table id=\"my-raptor-dialog-table\" class=\"dataTable\">'\n . '<thead>'\n . '<tr>'\n . '<th title=\"System unique identifier for the protocol\">Short Name</th>'\n . '<th title=\"Full name of the protocol\">Long Name</th>'\n . '<th title=\"Only active protocols are available for use on new exams\">Is Active</th>'\n . '<th title=\"Has contrast\">C</th>'\n . '<th title=\"Has sedation\">S</th>'\n . '<th title=\"Has radioisotope\">R</th>'\n . '<th title=\"The equipment context for this protocol\">Modality</th>'\n . '<th title=\"Value increases with each saved edit\">Version</th>'\n . '<th title=\"The scanned document\">Doc Uploaded</th>'\n . '<th title=\"Keywords used for matching this protocol programatically\">Keywords</th>'\n . '<th title=\"Just view the protocol\">View</th>'\n . '<th title=\"Edit the protocol details\">Edit</th>'\n . '<th title=\"Remove this protocol from the library\">Delete</th>'\n . '</tr>'\n . '</thead>'\n . '<tbody>'\n . $rows\n . '</tbody>'\n . '</table>');\n \n $form['data_entry_area1']['action_buttons'] = array(\n '#type' => 'item', \n '#prefix' => '<div class=\"raptor-action-buttons\">',\n '#suffix' => '</div>', \n '#tree' => TRUE,\n );\n $form['data_entry_area1']['action_buttons']['createlink'] \n = array('#type' => 'item'\n , '#markup' => '<a class=\"button\" href=\"'\n .$base_url.'/raptor/addprotocollib\">Add Protocol</a>');\n\n $form['data_entry_area1']['action_buttons']['cancel'] = array('#type' => 'item'\n , '#markup' => '<input class=\"raptor-dialog-cancel\" type=\"button\" value=\"Exit\" />'); \n \n \n return $form;\n }", "function form_content()\r\n {\r\n $table = html_table($this->_width,0,4) ;\r\n $table->set_style(\"border: 0px solid\") ;\r\n\r\n $table->add_row($this->element_label($this->getUploadFileLabel()),\r\n $this->element_form($this->getUploadFileLabel())) ;\r\n\r\n $td = html_td(null, null, $this->element_form('Override Z0 Record Validation')) ;\r\n $td->set_tag_attribute('colspan', 2) ;\r\n $table->add_row($td) ;\r\n\r\n $this->add_form_block(null, $table) ;\r\n }", "protected function form()\n {\n $form = new Form(new PrizesLog);\n\n // 去掉`删除`按钮\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableDelete();\n $tools->disableView();\n });\n\n $form->text('group.title', '奖品组')->readonly();\n $form->text('prize.name', '奖品名称')->readonly();\n $form->text('material.title', '物料名称')->readonly();\n $form->text('material_code', '物料代码')->readonly();\n $form->text('user.username', '用户名')->readonly();\n $form->text('user.mobile', '用户手机号')->readonly();\n $form->select('source', '来源')->options([\n '' => '', 'exchange' => '兑换/领取', 'lottery' => '抽奖'\n ])->readonly();\n $form->ip('ip', 'IP地址')->readonly();\n $form->datetime('created_at', '中奖时间')->readonly();\n $form->embeds('leaving_capital', '留资信息', function ($form) {\n $form->text('name', '收件人');\n $form->mobile('mobile', '手机号');\n $form->text('address', '收件地址');\n });\n $form->radio('status', '状态')->options([\n '0' => '作废', '1' => '有效'\n ])->default('1');\n return $form;\n }", "public function __construct()\n {\n parent::__construct();\n\n // creates the form\n $this->form = new BootstrapFormBuilder(self::$formName);\n\n // define the form title\n $this->form->setFormTitle('Avaliações');\n\n $inscricao_evento_id = new TDBUniqueSearch('inscricao_evento_id', 'eventtus', 'Evento', 'id', 'id','nome asc' );\n\n $inscricao_evento_id->setSize('100%');\n $inscricao_evento_id->setMinLength(0);\n $inscricao_evento_id->setMask('{nome}');\n\n $row1 = $this->form->addFields([new TLabel('Evento', null, '14px', null),$inscricao_evento_id]);\n $row1->layout = ['col-sm-6'];\n\n // keep the form filled during navigation with session data\n $this->form->setData( TSession::getValue(__CLASS__.'_filter_data') );\n\n $btn_ongenerate = $this->form->addAction('Gerar', new TAction([$this, 'onGenerate']), 'fa:search #ffffff');\n $btn_ongenerate->addStyleClass('btn-primary'); \n\n // vertical box container\n $container = new TVBox;\n $container->style = 'width: 100%';\n $container->add(TBreadCrumb::create(['Cadastros','Avaliações']));\n $container->add($this->form);\n\n parent::add($container);\n\n }", "protected function form()\n {\n $form = new Form(new $this->currentModel);\n \n $form->display('id', 'ID');\n $form->select('company_id', '公司名称')->options(Company::getSelectOptions());\n $form->text('project_name', '项目名称');\n $form->image('project_photo', '项目图片')->uniqueName()->move('public/photo/images/custom_thum/');\n $form->url('link_url', '项目链接');\n $form->radio('display', '公开度')->options(['0' => '公开', '-1'=> '保密'])->default('0');\n //$form->display('created_at', 'Created At');\n //$form->display('updated_at', 'Updated At');\n\n return $form;\n }", "public function definition() {\n global $DB;\n\n $m =& $this->_form;\n\n $m->addElement('hidden', 'id', '');\n\n $queries = $DB->get_records_menu('block_up_export_queries', null, 'name desc', 'id, name');\n\n $label = get_string('query_name', 'block_up_grade_export');\n $m->addElement('select', 'queryid', $label, $queries);\n\n $label = get_string('automated', 'block_up_grade_export');\n $m->addElement('checkbox', 'automated', $label, '');\n\n $course = $this->_customdata['course'];\n\n if (empty($course)) {\n $label = get_string('course') . ' ' . get_string('shortname');\n $m->addElement('text', 'shortname', $label);\n }\n\n $courses = $this->_customdata['courses'];\n\n if ($courses) {\n $m->addElement('static', 'page_top', '', $this->_customdata['pagination']);\n foreach ($courses as $course) {\n $m->addElement('radio', 'course', '', $course->fullname, $course->id);\n }\n $m->addElement('static', 'page_bottom', '', $this->_customdata['pagination']);\n\n $m->addRule('course', null, 'required', null, 'client');\n $m->setType('course', PARAM_INT);\n }\n\n $grade_seq = $this->_customdata['grade_seq'];\n\n if ($grade_seq and $grade_seq->items) {\n $label = get_string('clear_course', 'block_up_grade_export');\n $m->addElement('checkbox', 'clear_course', $label, '');\n\n $structure = $this->_customdata['structure'];\n $struct_params = function ($item) {\n return array('type' => 'item', 'object' => $item);\n };\n\n $label = get_string('select_grade', 'block_up_grade_export');\n $m->addElement('static', 'selected_course', $label, $course->fullname);\n\n foreach ($grade_seq->items as $grade_item) {\n $grade_icon = $structure->get_element_icon($struct_params($grade_item));\n\n $name = $grade_item->is_category_item() ?\n $grade_item->get_item_category()->get_name() :\n $grade_item->get_name();\n\n $label = \" $grade_icon{$name}\";\n\n $m->addElement('radio', 'itemid', '', $label, $grade_item->id);\n }\n\n $m->addElement('hidden', 'course', $course->id);\n $m->addRule('queryid', null, 'required', null, 'client');\n $m->setType('queryid', PARAM_MULTILANG);\n\n $m->disabledIf('itemid', 'clear_course', 'checked');\n }\n\n $label = $grade_seq ? 'submit' : 'next';\n $buttons = array(\n $m->createElement('submit', 'submit', get_string($label)),\n $m->createElement('cancel'),\n );\n\n $m->addGroup($buttons, 'buttons', '&nbsp;', array(' '), false);\n }", "function generateCell($type) {\n\t\t\n\t\tif($this->getV()) {\n\t\t\n\t\t\t$str = \"{v: \";\n\t\t\t\n\t\t\tif($type==\"string\") {\n\t\t\t\t$str.= \"'\".$this->escapeJSChars($this->getV()).\"',\";\n\t\t\t} elseif($type==\"boolean\") {\n\t\t\t\t$str.= \"'\".$this->getV().\"',\";\n\t\t\t} elseif($type==\"date\") {\n\t\t\t\t$str.= \"new Date(\".substr($this->getV(),0,4).\",\".(substr($this->getV(),5,2) - 1).\",\".substr($this->getV(),8,2).\"),\";\n\t\t\t} elseif($type==\"datetime\") {\n\t\t\t\t$str.= \"new Date(\".substr($this->getV(),0,4).\",\".(substr($this->getV(),5,2) - 1).\",\".substr($this->getV(),8,2).\",\".substr($this->getV(),11,2).\",\".substr($this->getV(),14,2).\",\".substr($this->getV(),17,2).\"),\";\n\t\t\t} elseif($type==\"timeofday\") {\n\t\t\t\t$str.= \"[\".substr($this->getV(),11,2).\",\".substr($this->getV(),14,2).\",\".substr($this->getV(),17,2).\"],\";\n\t\t\t} else {\t\t\n\t\t\t\t$str.= $this->escapeJSChars($this->getV()).\",\";\n\t\t\t}\n\t\t\t\n\t\t\tif($this->getF()) {\n\t\t\t\t$str.= \"f: '\".$this->getF().\"',\";\n\t\t\t}\t\t\n\t\t\t\n\t\t\tif($this->getClassName()) {\n\t\t\t\t$str.=\"p: {'className': '\".$this->getClassName().\"'},\";\n\t\t\t}\n\t\t\t\n\t\t\t$str = substr($str,0,-1);\n\t\t\t$str.= \"}\";\n\n\t\t} else {\n\t\t\n\t\t\t$str = \"\";\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $str;\n\t\t\n\t}" ]
[ "0.6875267", "0.6660737", "0.61252147", "0.59181416", "0.5750583", "0.5628293", "0.56004137", "0.54911566", "0.5465777", "0.54592305", "0.5447524", "0.5405576", "0.5394894", "0.5352851", "0.5344981", "0.5321192", "0.5305566", "0.52538455", "0.51949364", "0.51825327", "0.5163714", "0.5151167", "0.51504636", "0.5136932", "0.51298517", "0.5082424", "0.5072682", "0.50598717", "0.50482756", "0.5039891", "0.5039271", "0.5037", "0.50292027", "0.5025533", "0.5019413", "0.5002462", "0.4987194", "0.49759224", "0.4970492", "0.4969992", "0.49566022", "0.49321628", "0.49292305", "0.49200353", "0.49078193", "0.48963696", "0.48928815", "0.48868367", "0.48796776", "0.48722807", "0.48678347", "0.48674512", "0.48659116", "0.48600763", "0.4856441", "0.4856267", "0.48517552", "0.48496294", "0.4846484", "0.4843509", "0.4842198", "0.48376042", "0.48323908", "0.4825812", "0.4822906", "0.48223424", "0.48222628", "0.48221713", "0.4821793", "0.48172328", "0.48157609", "0.4810527", "0.48095164", "0.48028076", "0.4801619", "0.48001236", "0.47951415", "0.47940224", "0.47898644", "0.47820336", "0.47804153", "0.47779062", "0.47743312", "0.4763918", "0.47623333", "0.4760224", "0.47580373", "0.47508883", "0.475038", "0.4749847", "0.4747031", "0.4743838", "0.4743728", "0.47400537", "0.4730476", "0.4727005", "0.4723434", "0.47214702", "0.47200248", "0.47181758" ]
0.7368667
0
Builds the form that define border properties of your progress bar
Создает форму, определяющую свойства границ вашего прогресс-бара
function buildForm() { $this->buildTabs(); // tab caption $this->addElement('header', null, 'Progress2 Generator - Control Panel: border properties'); $borderpainted[] =& $this->createElement('radio', null, null, 'Yes', true); $borderpainted[] =& $this->createElement('radio', null, null, 'No', false); $this->addGroup($borderpainted, 'borderpainted', 'Display the border:'); $this->addElement('text', 'borderclass', 'CSS class:', array('size' => 32)); $borderstyle['style'] =& $this->createElement('select', 'style', 'style', array('solid' => 'Solid', 'dashed' => 'Dashed', 'dotted' => 'Dotted', 'inset' => 'Inset', 'outset' => 'Outset')); $borderstyle['width'] =& $this->createElement('text', 'width', 'width', array('size' => 2)); $borderstyle['color'] =& $this->createElement('text', 'color', 'color', array('size' => 7)); $this->addGroup($borderstyle, 'borderstyle', null, ' '); // Buttons of the wizard to do the job $this->buildButtons(array('apply','process')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: main properties');\r\n\r\n $shape[] =& $this->createElement('radio', null, null, 'Horizontal', '1');\r\n $shape[] =& $this->createElement('radio', null, null, 'Vertical', '2');\r\n $this->addGroup($shape, 'shape', 'Shape:');\r\n\r\n $way[] =& $this->createElement('radio', null, null, 'Natural', 'natural');\r\n $way[] =& $this->createElement('radio', null, null, 'Reverse', 'reverse');\r\n $this->addGroup($way, 'way', 'Direction:');\r\n\r\n $autosize[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $autosize[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($autosize, 'autosize', 'Best size:');\r\n\r\n $psize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $psize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $psize['left'] =& $this->createElement('text',\r\n 'left', 'left',\r\n array('size' => 4));\r\n $psize['top'] =& $this->createElement('text',\r\n 'top', 'top',\r\n array('size' => 4));\r\n $psize['position'] =& $this->createElement('text',\r\n 'position', 'position',\r\n array('disabled' => 'true'));\r\n $psize['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'bgcolor',\r\n array('size' => 7));\r\n $this->addGroup($psize, 'progresssize',\r\n 'Size, position and color:', ' ');\r\n\r\n $this->addElement('text', 'rAnimSpeed',\r\n array('Animation speed :',\r\n '(0-1000 ; 0:fast, 1000:slow)'));\r\n $this->addRule('rAnimSpeed',\r\n 'Should be between 0 and 1000',\r\n 'rangelength', array(0,1000), 'client');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('back','apply','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: run demo');\r\n\r\n $this->addElement('static', 'progressBar',\r\n 'Your progress meter looks like:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('reset','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: cell properties');\r\n\r\n $this->addElement('text', 'cellid', 'Id mask:', array('size' => 32));\r\n $this->addElement('text', 'cellclass', 'CSS class:', array('size' => 32));\r\n\r\n $cellvalue['min'] =& $this->createElement('text',\r\n 'min', 'minimum',\r\n array('size' => 4));\r\n $cellvalue['max'] =& $this->createElement('text',\r\n 'max', 'maximum',\r\n array('size' => 4));\r\n $cellvalue['inc'] =& $this->createElement('text',\r\n 'inc', 'increment',\r\n array('size' => 4));\r\n $this->addGroup($cellvalue, 'cellvalue', 'Value:', ' ');\r\n\r\n $cellsize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $cellsize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $cellsize['spacing'] =& $this->createElement('text',\r\n 'spacing', 'spacing',\r\n array('size' => 2));\r\n $cellsize['count'] =& $this->createElement('text',\r\n 'count', 'count',\r\n array('size' => 2));\r\n $this->addGroup($cellsize, 'cellsize', 'Size:', ' ');\r\n\r\n $cellcolor['active'] =& $this->createElement('text',\r\n 'active', 'active',\r\n array('size' => 7));\r\n $cellcolor['inactive'] =& $this->createElement('text',\r\n 'inactive', 'inactive',\r\n array('size' => 7));\r\n $cellcolor['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'background',\r\n array('size' => 7));\r\n $this->addGroup($cellcolor, 'cellcolor', 'Color:', ' ');\r\n\r\n $cellfont['family'] =& $this->createElement('text',\r\n 'family', 'family',\r\n array('size' => 32));\r\n $cellfont['size'] =& $this->createElement('text',\r\n 'size', 'size',\r\n array('size' => 2));\r\n $cellfont['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($cellfont, 'cellfont', 'Font:', ' ');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: string properties');\r\n\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($stringpainted, 'stringpainted', 'Render a custom string:');\r\n\r\n $this->addElement('text', 'stringid', 'Id:', array('size' => 32));\r\n $this->addElement('text', 'stringclass', 'CSS class:', array('size' => 32));\r\n $this->addElement('text', 'stringvalue', 'Content:', array('size' => 32));\r\n\r\n $stringsize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $stringsize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $stringsize['left'] =& $this->createElement('text',\r\n 'left', 'left',\r\n array('size' => 4));\r\n $stringsize['top'] =& $this->createElement('text',\r\n 'top', 'top',\r\n array('size' => 4));\r\n $stringsize['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'bgcolor',\r\n array('size' => 7));\r\n $this->addGroup($stringsize, 'stringsize', 'Size, position and color:', ' ');\r\n\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Top', 'top');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Bottom', 'bottom');\r\n $this->addGroup($stringvalign, 'stringvalign', 'Vertical alignment:');\r\n\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Center', 'center');\r\n $this->addGroup($stringalign, 'stringalign', 'Horizontal alignment:');\r\n\r\n $stringfont['family'] =& $this->createElement('text',\r\n 'family', 'family',\r\n array('size' => 40));\r\n $stringfont['size'] =& $this->createElement('text',\r\n 'size', 'size',\r\n array('size' => 2));\r\n $stringfont['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($stringfont, 'stringfont', 'Font:', ' ');\r\n\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'normal', 'normal');\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'Bold', 'bold');\r\n $this->addGroup($stringweight, 'stringweight', 'Font weight:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function border($args) {\r\n\t\t$description = $args['description'];\r\n\t\tunset($args['description']);\r\n\t\t\r\n\t\t// if plain is true at this point we must have come from a post meta box so do some switching of the args around\r\n\t\t$form_prefix = $this->metabox_id_fix($args);\r\n\t\t$form_value = $this->metabox_value_fix($args);\r\n\t\t\r\n\t\t\r\n\t\t$args['selections'] = array('0'=>'0','1'=>'1','2'=>'2','3'=>'3','4'=>'4','5'=>'5','6'=>'6','7'=>'7','8'=>'8','9'=>'9','10'=>'10','11'=>'11','12'=>'12','13'=>'13','14'=>'14','15'=>'15','16'=>'16','17'=>'17');\r\n\t\t$args['plain']=true; // switch to plain mode\r\n\t\t\r\n\t\tunset($args['description']); // kill off descriptions till the end\r\n\t\t$args['id'] = $form_prefix . \"[size]\";\r\n\t\t$args['value'] =$form_value[size];\r\n\t\t$args['width'] = '75';\r\n\t\t$args['tooltip'] = 'Choose the border size';\r\n\t\t$this->select($args);\r\n\t\t\r\n\t\t// add font units\r\n\t\t$args['id'] = $form_prefix . \"[unit]\";\r\n\t\t$args['value'] = $form_value['unit'];\r\n\t\t$args['width'] = '65';\r\n\t\t\t$args['tooltip'] = 'Choose the border size units';\r\n\t\t$this->fontunit($args);\r\n\t\t\r\n\t\t// add font size\r\n\t\t$args['id'] = $form_prefix . \"[type]\";\r\n\t\t$args['value'] = $form_value[type];\r\n\t\t$args['width'] = '165';\r\n\t\t$args['tooltip'] = 'Choose the border type';\r\n\t\t$this->bordertype($args);\r\n\t\t\r\n\t\t// add font units\r\n\t\t$args['id'] = $form_prefix . \"[color]\";\r\n\t\t$args['value'] = $form_value[color];\r\n\t\t$args['width'] = '75';\r\n\t\t$args['tooltip'] = 'Choose the border color';\r\n\t\t$this->color($args);\r\n\r\n\t\t$this->description($description);\r\n\t}", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: save PHP/CSS code');\r\n\r\n $code[] =& $this->createElement('checkbox', 'P', null, 'PHP');\r\n $code[] =& $this->createElement('checkbox', 'C', null, 'CSS');\r\n $this->addGroup($code, 'phpcss', 'PHP and/or StyleSheet source code:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('next','apply'));\r\n }", "public function getBorderStyle() {}", "public function getBorderStyle() {}", "function SLFramework_Progressbar($length=300, $height=20, $start=0, $insideText=\"\", $id=\"progressbar\") {\r\n\t\t\t$this->length = $length ; \r\n\t\t\t$this->insideText = $insideText ; \r\n\t\t\t$this->height = $height ; \r\n\t\t\t$this->start = $start ; \r\n\t\t\t$this->id = $id ; \r\n\t\t}", "public function getBorderStyle() {}", "public function getBorderStyle() {}", "public function getBorderStyle() {}", "public function getBorderStyle() {}", "public function getBorderStyle() {}", "protected function build()\n {\n $stockalign = new GtkAlignment(0, 0, 0, 0);\n $stockalign->add(\n GtkImage::new_from_stock(\n Gtk::STOCK_DIALOG_ERROR, Gtk::ICON_SIZE_DIALOG\n )\n );\n $this->pack_start($stockalign, false, true);\n\n\n $this->expander = new GtkExpander('');\n\n $this->message = new GtkLabel();\n $this->expander->set_label_widget($this->message);\n $this->message->set_selectable(true);\n $this->message->set_line_wrap(true);\n\n $this->userinfo = new GtkLabel();\n $this->userinfo->set_selectable(true);\n $this->userinfo->set_line_wrap(true);\n //FIXME: add scrolled window\n $this->expander->add($this->userinfo);\n\n $this->pack_start($this->expander);\n }", "public function buildForm()\n {\n $this\n ->addMeasureList()\n ->addAscendingList()\n ->addTitles(['class' => 'indicator_title_title_narrative', 'narrative_true' => true])\n ->addDescriptions(['class' => 'indicator_description_title_narrative'])\n ->addCollection('reference', 'Activity\\Reference', 'reference', [], trans('elementForm.reference'))\n ->addAddMoreButton('add_reference', 'reference')\n ->addBaselines()\n ->addPeriods()\n ->addAddMoreButton('add_period', 'period')\n ->addRemoveThisButton('remove_indicator');\n }", "protected function Form_Create() {\n\t\t\t$this->txtValue1 = new QTextBox($this);\n\t\t\t\n\t\t\t$this->txtValue2 = new QTextBox($this);\n\t\t\t\n\t\t\t$this->lstOperation = new QListBox($this);\n\t\t\t$this->lstOperation->AddItem('+', 'add');\n\t\t\t$this->lstOperation->AddItem('-', 'subtract');\n\t\t\t$this->lstOperation->AddItem('*', 'multiply');\n\t\t\t$this->lstOperation->AddItem('/', 'divide');\n\t\t\t\n\t\t\t$this->btnCalculate = new QButton($this);\n\t\t\t$this->btnCalculate->Text = 'Calculate';\n\t\t\t$this->btnCalculate->AddAction(new QClickEvent(), new QServerAction('btnCalculate_Click'));\n\t\t\t\n\t\t\t$this->lblResult = new QLabel($this);\n\t\t\t$this->lblResult->HtmlEntities = false;\n\t\t}", "function border() {\n\t\t\t// Matches field # of register_setting\n\t\t\t$options = get_option( 'subpages_as_tabs_options' );\n?>\n\t\t\t<input id=\"spat_border\" name=\"subpages_as_tabs_options[border]\" class=\"color_pick\" type=\"color\" size=\"7\" value=\"<?php _e( $options['border'] );?>\" />\n<?php\n\t\t}", "function build_basic_form()\r\n {\r\n $this->addElement('select', LanguagePack :: PROPERTY_BRANCH, Translation :: get('Branch'), LanguagePack :: get_branch_options());\r\n \r\n \t$this->addElement('file', 'file', Translation :: get('FileName'));\r\n $allowed_upload_types = array('zip');\r\n $this->addRule('file', Translation :: get('OnlyZIPAllowed'), 'filetype', $allowed_upload_types);\r\n $this->addRule('file', Translation :: get('ThisFieldIsRequired', null, Utilities :: COMMON_LIBRARIES), 'required');\r\n \r\n // Submit button\r\n //$this->addElement('submit', 'user_settings', 'OK');\r\n $buttons[] = $this->createElement('style_submit_button', 'submit', Translation :: get('Import', null, Utilities :: COMMON_LIBRARIES), array('class' => 'positive'));\r\n $buttons[] = $this->createElement('style_reset_button', 'reset', Translation :: get('Reset', null, Utilities :: COMMON_LIBRARIES), array('class' => 'normal empty'));\r\n \r\n $this->addGroup($buttons, 'buttons', null, '&nbsp;', false);\r\n }", "function buildTabs()\r\n {\r\n $this->_formBuilt = true;\r\n\r\n // Here we get all page names in the controller\r\n $pages = array();\r\n $myName = $current = $this->getAttribute('id');\r\n while (null !== ($current = $this->controller->getPrevName($current))) {\r\n $pages[] = $current;\r\n }\r\n $pages = array_reverse($pages);\r\n $pages[] = $current = $myName;\r\n while (null !== ($current = $this->controller->getNextName($current))) {\r\n $pages[] = $current;\r\n }\r\n // Here we display buttons for all pages, the current one's is disabled\r\n foreach ($pages as $pageName) {\r\n $disabled = ($pageName == $myName ? array('disabled' => 'disabled')\r\n : array());\r\n\r\n $tabs[] = $this->createElement('submit',\r\n $this->getButtonName($pageName),\r\n ucfirst($pageName),\r\n array('class' => 'flat') + $disabled);\r\n }\r\n $this->addGroup($tabs, 'tabs', null, '&nbsp;', false);\r\n }", "public function getFormStyle()\n {\n $prop = array();\n\n $prop['alignment'] = $this->value['text-align'];\n\n if (isset($this->value['background']['color']) && is_array($this->value['background']['color'])) {\n $prop['fillColor'] = $this->value['background']['color'];\n }\n\n if (isset($this->value['border']['t']['color'])) {\n $prop['strokeColor'] = $this->value['border']['t']['color'];\n }\n\n if (isset($this->value['border']['t']['width'])) {\n $prop['lineWidth'] = $this->value['border']['t']['width'];\n }\n\n if (isset($this->value['border']['t']['type'])) {\n $prop['borderStyle'] = $this->value['border']['t']['type'];\n }\n\n if (!empty($this->value['color'])) {\n $prop['textColor'] = $this->value['color'];\n }\n\n if (!empty($this->value['font-size'])) {\n $prop['textSize'] = $this->value['font-size'];\n }\n\n return $prop;\n }", "protected function buildForm()\n {\n $this->form = Yii::createObject(array_merge([\n 'scenario' => $this->scenario,\n 'parent_id' => $this->parent_id,\n 'parentTariff' => $this->parentTariff,\n 'tariff' => $this->tariff,\n ], $this->getFormOptions()));\n }", "public function __construct(\n private readonly int $borderWidth = 4,\n private string|array $backgroundColour = '#ffffff',\n private string|array $foregroundColour = '#000000',\n private string $format = 'png',\n ) {\n $this->backgroundColour = $this->handleColour($this->backgroundColour);\n $this->foregroundColour = $this->handleColour($this->foregroundColour);\n $this->format = strtolower($this->format);\n }", "public function buildForm()\n {\n }", "function render()\n {\n\t\t$value = $this->_value;\n\t\t$i = 0;\n\t\treturn \t\"<div>\".\n\t\t\t\t\t\"<label class=\\\"inline\\\">\"._AM_TMANAGER_BORDERBOX.\" :</label>&nbsp;&nbsp;&nbsp;\".\n\t\t\t\t\t\"<input type=\\\"radio\\\" name=\\\"\".$this->getName().\"_yn\\\" class='borders_r_same'style=\\\"vertical-align: baseline;margin:0\\\" value=\\\"1\\\" \".($value['same']?'checked=\\\"checked\\\"':'').\">&nbsp;\"._YES.\"&nbsp;&nbsp;\".\n\t\t\t\t\t\"<input type=\\\"radio\\\" name=\\\"\".$this->getName().\"_yn\\\" class='borders_r_same'style=\\\"vertical-align: baseline;margin:0\\\" value=\\\"0\\\" \".($value['same']?'':'checked=\\\"checked\\\"').\">&nbsp;\"._NO.\n\t\t\t\t\t\"<div id='\".$this->getName().\"_sameborders' style='display:\".($value['same']?'block':'none').\"'>\".\n\t\t\t\t\t\t$this->SingleBorder(_ALL, $value['size'][0], $value['type'][0], $value['color'][0], 'all').\n\t\t\t\t\t\"</div>\".\n\t\t\t\t\t\"<div id='\".$this->getName().\"_diffborders' style='display:\".($value['same']?'none':'block').\"'>\".\t\t\t\t\n\t\t\t\t\t\t$this->SingleBorder(_AM_TMANAGER_BOX_TOP, $value['size'][$i], $value['type'][$i], $value['color'][$i++], 'top').\n\t\t\t\t\t\t$this->SingleBorder(_AM_TMANAGER_BOX_LEFT, $value['size'][$i], $value['type'][$i], $value['color'][$i++], 'left').\n\t\t\t\t\t\t$this->SingleBorder(_AM_TMANAGER_BOX_RIGHT, $value['size'][$i], $value['type'][$i], $value['color'][$i++], 'right').\n\t\t\t\t\t\t$this->SingleBorder(_AM_TMANAGER_BOX_BOTTOM, $value['size'][$i], $value['type'][$i], $value['color'][$i++], 'bot').\n\t\t\t\t\t\"</div>\".\n\t\t\t\t\"</div>\";\n }", "public function print_form_styles() {\n\n\t\tif ( empty( $this->form_data['settings']['conversational_forms_color_scheme'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$color = \\sanitize_hex_color( $this->form_data['settings']['conversational_forms_color_scheme'] );\n\n\t\tif ( empty( $color ) ) {\n\t\t\t$color = '#448ccb';\n\t\t}\n\n\t\t$min = \\wpforms_get_min_suffix();\n\n\t\tswitch ( $color ) {\n\t\t\tcase '#448ccb':\n\t\t\t\t$theme = 'color-scheme-blue';\n\t\t\t\tbreak;\n\t\t\tcase '#1a3c5a':\n\t\t\t\t$theme = 'color-scheme-dark_blue';\n\t\t\t\tbreak;\n\t\t\tcase '#4aa891':\n\t\t\t\t$theme = 'color-scheme-teal';\n\t\t\t\tbreak;\n\t\t\tcase '#9178b3':\n\t\t\t\t$theme = 'color-scheme-purple';\n\t\t\t\tbreak;\n\t\t\tcase '#cccccc':\n\t\t\t\t$theme = 'color-scheme-light';\n\t\t\t\tbreak;\n\t\t\tcase '#363636':\n\t\t\t\t$theme = 'color-scheme-dark';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$theme = '';\n\t\t}\n\n\t\tif ( ! $theme ) {\n\t\t\trequire \\plugin_dir_path( WPFORMS_CONVERSATIONAL_FORMS_FILE ) . 'templates/dynamic-color-scheme-styles.php';\n\t\t\treturn;\n\t\t}\n\n\t\t\\wp_enqueue_style(\n\t\t\t\"wpforms-conversational-forms-{$theme}\",\n\t\t\t\\wpforms_conversational_forms()->url . \"assets/css/color-schemes/{$theme}{$min}.css\",\n\t\t\tarray( 'wpforms-conversational-forms' ),\n\t\t\t\\WPFORMS_CONVERSATIONAL_FORMS_VERSION\n\t\t);\n\t}", "function renderForm()\t{\n\n\t\t$fields[] = $this->renderField( $GLOBALS['LANG']->getLL('settings'), 'divider', '');\n\t\t$fields[] = $this->renderField( $GLOBALS['LANG']->getLL('spaceTitle'), 'text', 'title');\n\t\n\t\tif(count($this->error) > 0) {\n\t\t\t$form .= \"<span style='display:block;color:red;font-weight:bold;padding:10px;'>\" .\n\t\t\t\t\t\t\t implode(\"<br />\", $this->error) . \n\t\t\t\t\t \"</span>\";\t\n\t\t}\n\n\t\t$form .= \"<form action=\" . t3lib_div::getThisUrl() . \"><table border='0' cellpadding='7'>\";\n\t\t$form .= implode(\"\\n\", $fields);\n\t\t$form .= \"<tr><td colspan='2' align='right'>\" .\n\t\t\t\t \"<input type='hidden' name='formPosted' value='1'>\" . \n\t\t\t\t \"<input type='submit' value='\" . $GLOBALS['LANG']->getLL('createSpace') . \"'></td></tr></table></form>\";\n\n\t\treturn $form;\n\t}", "function buildSettingsForm() {}", "function initStylePropertiesForm()\n\t{\n\t\tglobal $ilCtrl, $lng, $ilTabs, $ilSetting;\n\t\t\n\t\tinclude_once(\"./Services/Style/classes/class.ilObjStyleSheet.php\");\n\t\t$lng->loadLanguageModule(\"style\");\n\n\t\tinclude_once(\"./Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$this->form = new ilPropertyFormGUI();\n\t\t\n\t\t$fixed_style = $ilSetting->get(\"fixed_content_style_id\");\n\t\t$style_id = $this->object->getStyleSheetId();\n\n\t\tif ($fixed_style > 0)\n\t\t{\n\t\t\t$st = new ilNonEditableValueGUI($lng->txt(\"style_current_style\"));\n\t\t\t$st->setValue(ilObject::_lookupTitle($fixed_style).\" (\".\n\t\t\t\t$this->lng->txt(\"global_fixed\").\")\");\n\t\t\t$this->form->addItem($st);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$st_styles = ilObjStyleSheet::_getStandardStyles(true, false,\n\t\t\t\t$_GET[\"ref_id\"]);\n\n\t\t\t$st_styles[0] = $this->lng->txt(\"default\");\n\t\t\tksort($st_styles);\n\n\t\t\tif ($style_id > 0)\n\t\t\t{\n\t\t\t\t// individual style\n\t\t\t\tif (!ilObjStyleSheet::_lookupStandard($style_id))\n\t\t\t\t{\n\t\t\t\t\t$st = new ilNonEditableValueGUI($lng->txt(\"style_current_style\"));\n\t\t\t\t\t$st->setValue(ilObject::_lookupTitle($style_id));\n\t\t\t\t\t$this->form->addItem($st);\n\n//$this->ctrl->getLinkTargetByClass(\"ilObjStyleSheetGUI\", \"edit\"));\n\n\t\t\t\t\t// delete command\n\t\t\t\t\t$this->form->addCommandButton(\"editStyle\",\n\t\t\t\t\t\t$lng->txt(\"style_edit_style\"));\n\t\t\t\t\t$this->form->addCommandButton(\"deleteStyle\",\n\t\t\t\t\t\t$lng->txt(\"style_delete_style\"));\n//$this->ctrl->getLinkTargetByClass(\"ilObjStyleSheetGUI\", \"delete\"));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id))\n\t\t\t{\n\t\t\t\t$style_sel = ilUtil::formSelect ($style_id, \"style_id\",\n\t\t\t\t\t$st_styles, false, true);\n\t\t\t\t$style_sel = new ilSelectInputGUI($lng->txt(\"style_current_style\"), \"style_id\");\n\t\t\t\t$style_sel->setOptions($st_styles);\n\t\t\t\t$style_sel->setValue($style_id);\n\t\t\t\t$this->form->addItem($style_sel);\n//$this->ctrl->getLinkTargetByClass(\"ilObjStyleSheetGUI\", \"create\"));\n\t\t\t\t$this->form->addCommandButton(\"saveStyleSettings\",\n\t\t\t\t\t\t$lng->txt(\"save\"));\n\t\t\t\t$this->form->addCommandButton(\"createStyle\",\n\t\t\t\t\t$lng->txt(\"sty_create_ind_style\"));\n\t\t\t}\n\t\t}\n\t\t$this->form->setTitle($lng->txt(\"wiki_style\"));\n\t\t$this->form->setFormAction($ilCtrl->getFormAction($this));\n\t}", "protected function definition_inner(&$mform) {\n\n $norepeats = $this->_customdata['norepeats']; // number of dimensions to display\n $descriptionopts = $this->_customdata['descriptionopts']; // wysiwyg fields options\n $current = $this->_customdata['current']; // current data to be set\n\n $mform->addElement('hidden', 'norepeats', $norepeats);\n $mform->setType('norepeats', PARAM_INT);\n // value not to be overridden by submitted value\n $mform->setConstants(array('norepeats' => $norepeats));\n\n $levelgrades = array();\n for ($i = 100; $i >= 0; $i--) {\n $levelgrades[$i] = $i;\n }\n\n for ($i = 0; $i < $norepeats; $i++) {\n $mform->addElement('header', 'dimension'.$i, get_string('dimensionnumber', 'workshopform_rubric', $i+1));\n $mform->addElement('hidden', 'dimensionid__idx_'.$i);\n $mform->setType('dimensionid__idx_'.$i, PARAM_INT);\n $mform->addElement('editor', 'description__idx_'.$i.'_editor',\n get_string('dimensiondescription', 'workshopform_rubric'), '', $descriptionopts);\n if (isset($current->{'numoflevels__idx_' . $i})) {\n $numoflevels = max($current->{'numoflevels__idx_' . $i} + self::ADDLEVELS, self::MINLEVELS);\n } else {\n $numoflevels = self::MINLEVELS;\n }\n $prevlevel = -1;\n for ($j = 0; $j < $numoflevels; $j++) {\n $mform->addElement('hidden', 'levelid__idx_' . $i . '__idy_' . $j);\n $mform->setType('levelid__idx_' . $i . '__idy_' . $j, PARAM_INT);\n $levelgrp = array();\n $levelgrp[] = $mform->createElement('select', 'grade__idx_'.$i.'__idy_'.$j,'', $levelgrades);\n $levelgrp[] = $mform->createElement('textarea', 'definition__idx_'.$i.'__idy_'.$j, '', array('cols' => 60, 'rows' => 3));\n $mform->addGroup($levelgrp, 'level__idx_'.$i.'__idy_'.$j, get_string('levelgroup', 'workshopform_rubric'), array(' '), false);\n $mform->setDefault('grade__idx_'.$i.'__idy_'.$j, $prevlevel + 1);\n if (isset($current->{'grade__idx_'.$i.'__idy_'.$j})) {\n $prevlevel = $current->{'grade__idx_'.$i.'__idy_'.$j};\n } else {\n $prevlevel++;\n }\n }\n }\n\n $mform->registerNoSubmitButton('adddims');\n $mform->addElement('submit', 'adddims', get_string('addmoredimensions', 'workshopform_rubric',\n workshop_rubric_strategy::ADDDIMS));\n $mform->closeHeaderBefore('adddims');\n\n $mform->addElement('header', 'configheader', get_string('configuration', 'workshopform_rubric'));\n $layoutgrp = array();\n $layoutgrp[] = $mform->createElement('radio', 'config_layout', '',\n get_string('layoutlist', 'workshopform_rubric'), 'list');\n $layoutgrp[] = $mform->createElement('radio', 'config_layout', '',\n get_string('layoutgrid', 'workshopform_rubric'), 'grid');\n $mform->addGroup($layoutgrp, 'layoutgrp', get_string('layout', 'workshopform_rubric'), array('<br />'), false);\n $mform->setDefault('config_layout', 'list');\n $this->set_data($current);\n }", "function __construct()\n {\n parent::__construct();\n \n // creates the form\n $this->form = new TQuickForm('form_historicotrabalho');\n $this->form->class = 'tform'; // change CSS class\n \n $this->form->style = 'display: table;width:100%'; // change style\n \n // Define Título da página\n $this->form->setFormTitle('Banco de Horas - Lançamento de Escalas');\n // Inicía ferramentas auxiliares\n $fer = new TFerramentas(); // Ferramentas diversas\n $sicad = new TSicadDados(); // Ferramentas de acesso ao SICAD\n //Realiza definições iniciais de acesso\n $profile = TSession::getValue('profile'); //Profile da Conta do usuário\n if ($this->opm_operador==false) //Carrega OPM do usuário\n {\n //Confere se já foi carregado a OPM, senão carrega...ou se o ambiente for de desenvolvimento usa a OPM = 140\n $this->opm_operador = ($fer->is_dev()==true) ? 140 : $profile['unidade']['id'];\n }\n if (!$this->nivel_sistema || $this->config_load == false) //Carrega OPMs que tem acesso\n {\n $this->nivel_sistema = $fer->getnivel (get_class($this));//Verifica qual nível de acesso do usuário\n $this->listas = $sicad->get_OpmsRegiao($this->opm_operador);//Carregas as OPMs que o usuário administra\n $this->config = $fer->getConfig($this->sistema); //Busca o Nível de acesso que o usuário tem para a Classe\n $this->config_load = true; //Informa que configuração foi carregada\n }\n \n // Cria os Itens do Formulário\n $rgmilitar = new TEntry('rgmilitar');\n \n //Monta ComboBox com OPMs que o Operador pode ver\n //echo $this->nivel_sistema.'---'.$this->opm_operador;\n if ($this->nivel_sistema>=80) //Adm e Gestor\n {\n $criteria = null;\n }\n else if ($this->nivel_sistema>=50 ) //Nível Operador (carrega OPM e subOPMs)\n {\n $criteria = new TCriteria;\n //Se não há lista de OPM, carrega só a OPM do usuário\n $lista = ($this->listas['valores']!='') ? $this->listas['valores'] : $profile['unidade']['id'];\n $query = \"(SELECT DISTINCT id FROM g_geral.opm WHERE id IN (\".$lista.\"))\";\n $criteria->add (new TFilter ('id','IN',$query));\n }\n else if ($this->nivel_sistema<50) //nível de visitante (só a própria OPM)\n {\n $criteria = new TCriteria;\n $query = \"(SELECT DISTINCT id FROM g_geral.opm WHERE id IN (\".$this->opm_operador.\"))\";\n $criteria->add (new TFilter ('id','IN',$query));\n }\n $opm = new TDBCombo('opm','sicad','OPM','id','nome','nome',$criteria);\n \n $ativo = new TCombo('ativo');\n $lista_opm = new TSelect('lista_opm');\n $lista_slc = new TSelect('lista_slc');\n //Critério para os Turnos de Serviço (Deve-se excluir os ocultos e o item id=13)\n $criteria = new TCriteria; \n $criteria->add(new TFilter('oculto', '=', 'f'));\n $criteria->add(new TFilter('id', '!=', 13));\n $turno = new TDBCombo('turno','sicad','turnos','id','nome','nome',$criteria);\n \n $datainicial = new TDate('dataInicial');\n $datafinal = new TDate('dataFinal');\n $horaIncialOrdinario = new TEntry('horaInicialOrdinario');\n $opm_id_info = new TDBCombo('opm_id_info','sicad','OPM','id','sigla','sigla');\n $opm_info_atual = new TCombo('OPM_info_Atual');\n $diasExtra = new TEntry('diasExtra');\n $mesExtra = new TCombo('mesExtra');\n $anoExtra = new TCombo('anoExtra');\n $horaInicioExtra = new TEntry('horaInicioExtra');\n $horasTrabalhadas = new TEntry('horasTrabalhadas');\n $tipoExtra = new TCombo('tipoExtra');\n $afasta_id = new TDBCombo('afasta_id','sicad','afastamentos','id','nome','nome');\n $dtinicioaf = new TDate('dtinicioaf');\n $dtfimaf = new TDate('dtfimaf');\n $bgaf = new TEntry('bgaf');\n $anobgaf = new TEntry('anobgaf');\n \n //Formatar Itens\n $rgmilitar->setSize(80);\n $opm->setSize(300);\n $lista_opm->setSize(280,256);\n $lista_slc->setSize(280,256);\n $turno->setSize(200);\n $datainicial->setSize(80);\n $datafinal->setSize(80);\n $horaIncialOrdinario->setSize(50);\n $opm_id_info->setSize(150);\n $opm_info_atual->setSize(80);\n $diasExtra->setSize(200);\n $mesExtra->setSize(80);\n $anoExtra->setSize(80);\n $horaInicioExtra->setSize(50);\n $horasTrabalhadas->setSize(50);\n $tipoExtra->setSize(120);\n $afasta_id->setSize(150);\n $dtinicioaf->setSize(80);\n $dtfimaf->setSize(80);\n $bgaf->setSize(80);\n $anobgaf->setSize(80);\n $ativo->setSize(80);\n //Style\n $lista_opm->style = \"font-size: 12px;\";\n $lista_slc->style = \"font-size: 12px;\";\n\n //Mascaras\n $datainicial->setMask('dd-mm-yyyy');\n $datafinal->setMask('dd-mm-yyyy');\n $dtinicioaf->setMask('dd-mm-yyyy');\n $dtfimaf->setMask('dd-mm-yyyy');\n $horaIncialOrdinario->setMask('99:99');\n $horaInicioExtra->setMask('99:99');\n $horasTrabalhadas->setMask('99');\n\n //Dados\n $opm_info_atual->addItems($fer->lista_sim_nao());//($item);\n $opm_info_atual->setValue('N');\n $ativo->addItems($fer->lista_sim_nao());//($item);\n $ativo->setValue('N');\n //\n $item = array (\"S\"=>\"Remunerada\",\"N\"=>\"Administrativa\");\n $tipoExtra->addItems($item);\n $tipoExtra->setValue('N');\n //\n $fer = new TFerramentas;\n $mesExtra->addItems($fer->lista_meses());\n $anoExtra->addItems($fer->lista_anos());\n //Tips\n $rgmilitar->setTip('Preencha com o RG do Militar pretendido...');\n $opm->setTip('Selecione a OPM para que possa preencher o campo de Lista da OPM com os componentes da Unidade.');\n $lista_opm->setTip('Lista dos Militares pertencente à Unidade Selecionada acima.<br>'.\n 'Vale lembrar que esta lista é atualizada diáriamente, assim os que estão aqui reflete as listas do SICAD.<br>' .\n 'Outro ponto a se considerar é a possibilidade de selecionar vários PMs, para isso basta usar<br>'.\n 'as teclas Control (ctrl) ou shift (seta pra cima);');\n $lista_slc->setTip('Militares Selecionados. Todos que estão nesta lista serão afetados, quer por uma escala ou por afastamentos...');\n $turno->setTip('Selecione uma Escala conforme a necessidade.');\n $datainicial->setTip('Selecione a data inicial da Escala Ordinária.');\n $datafinal->setTip('Selecione a data final da Escala Ordinária');\n $horaIncialOrdinario->setTip('Informe a hora de inicio do primeiro turno da Escala Ordinária.');\n $opm_id_info->setTip('Selecione qual foi a OPM informante da Escala.<br>É útil quando o militar está prestando serviços em uma OPM diferente da sua.');\n $opm_info_atual->setTip('A unidade Informante é a Unidade Atual? Se SIM, irei substituir a unidade que por ventura está na ficha do militar pela que foi informada...');\n $diasExtra->setTip('Defina os dias que o militar trabalhou podendo ser:<br> - Um dia apenas (Ex: 1);<br>- Alguns dias separados por vírgula(Ex: 2,5,8);<br>- Um intervalo de dias ligados por traço (Ex: 2-10);<br>- Um misto de combinações (Ex: 1,3-5,8,15-25). ');\n $mesExtra->setTip('Mês que ocorreu o serviço extra.');\n $anoExtra->setTip('Ano que ocorreu o serviço extra.');\n $horaInicioExtra->setTip('Hora que o serviço extra iniciou.');\n $horasTrabalhadas->setTip('Quantas horas foram trabalhadas neste serviço extra.');\n $tipoExtra->setTip('Defina se a escala foi Administrativa (sem remuneração AC-4) ou Remunerada (com pagamento de AC-4).');\n $afasta_id->setTip('Qual tipo de afastamento o militar fez jus.');\n $dtinicioaf->setTip('Data inicial do afastamento.');\n $dtfimaf->setTip('Data final do afastamento.');\n $bgaf->setTip('Numero do BG onde foi publicado o afastamento(Opcional).');\n $anobgaf->setTip('Ano de publicação do BG de Afastamento (Opcional).');\n $ativo->setTip('Se desejar que os militares inativos façam parte da seleção, marque como SIM para seleciona-los.'.\n '<br>Caso troque esta opção, não haverá a limpeza dos já selecionados.');\n //Ações\n //$change_action = new TAction(array($this, 'onSelectOpm_old'));//Ação de Popular lista de PMs\n //$opm->setChangeAction($change_action);\n //$ativo->setChangeAction($change_action);\n \n //Controle de Nível\n if ($this->nivel_sistema<$this->config[$this->cfg_chg_opm])\n {\n $opm_id_info->setEditable(FALSE);\n $opm_info_atual->setEditable(FALSE);\n }\n //Botões\n //Seleciona PMs\n $addPM = new TButton('addPM');\n $addPM->setImage('fa:arrow-down black');\n $addPM->class = 'btn btn-primary btn-sm';\n $Action = new TAction(array($this, 'onSelectMilitar'));\n $addPM->setAction($Action);\n $addPM->setLabel('Seleciona');\n \n //Botão Gera Escala Ordinária\n $runOrd = new TButton('runOrd');\n $runOrd->setImage('fa:floppy-o red');\n $runOrd->class = 'btn btn-primary btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_ord]) ? new TAction(array($this, 'onGeraOrdinaria')) : new TAction(array($this, 'NoAcess'));\n $runOrd->setAction($Action);\n $runOrd->setLabel('Gera Escala');\n \n //Botão Gera Escala Extra\n $runExt = new TButton('runExt');\n $runExt->setImage('fa:floppy-o red');\n $runExt->class = 'btn btn-primary btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_ext]) ? new TAction(array($this, 'onGeraExtra')) : new TAction(array($this, 'NoAcess'));\n $runExt->setAction($Action);\n $runExt->setLabel('Gera Escala');\n \n //Botão Gera Afastamento\n $runAfa = new TButton('runAfa');\n $runAfa->setImage('fa:floppy-o red');\n $runAfa->class = 'btn btn-primary btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_afa]) ? new TAction(array($this, 'onGeraAfastamento')) : new TAction(array($this, 'NoAcess'));\n $runAfa->setAction($Action);\n $runAfa->setLabel('Gera Afastamento');\n \n //Botão Limpa Afastamento\n $runCls = new TButton('runCls');\n $runCls->setImage('fa:trash black');\n $runCls->class = 'btn btn-danger btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_cls_afa]) ? new TAction(array($this, 'onLimpaAfastamento')) : new TAction(array($this, 'NoAcess'));\n $runCls->setAction($Action);\n $runCls->setLabel('Limpa Afastamento');\n \n //Botão Verifica Escala\n $runVer = new TButton('runVer');\n $runVer->setImage('fa:eye black');\n $runVer->class = 'btn btn-info btn-sm';\n $Action = new TAction(array($this, 'onListaEscala'));\n $runVer->setAction($Action);\n $runVer->setLabel('Ver Escala');\n \n //Botão limpa Escalas\n $runLmp = new TButton('runLmp');\n $runLmp->setImage('fa:trash black');\n $runLmp->class = 'btn btn-danger btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_cls_esc]) ? new TAction(array($this, 'onLimpaEscala')) : new TAction(array($this, 'NoAcess'));\n $runLmp->setAction($Action);\n $runLmp->setLabel('Limpa Escala');\n \n //Botão Carrega OPM na Lista da OPM\n $runOpm = new TButton('runOpm');\n $runOpm->setImage('fa:retweet');\n $runOpm->class = 'btn btn-success btn-sm';\n $Action = new TAction(array($this, 'onSelectOpm_old'));\n $runOpm->setAction($Action);\n $runOpm->setLabel('Carrega OPM');\n \n $table = new TTable();\n $table-> border = '0';\n $table-> cellpadding = '4';\n $table-> style = 'border-collapse:collapse; text-align: center;';\n\n //Monta selecionador\n $hbox1 = new THBox;\n $hbox1->addRowSet( new TLabel('RG:'),$rgmilitar,$addPM,new TLabel('Unidade:'),$opm,new TLabel('Seleciona Inativos?'),$ativo,$runOpm);\n $frame1 = new TFrame;\n $frame1->setLegend('Selecione os PMs ou a OPM');\n $frame1->add($hbox1);\n //Monta Labels das tabelas de distribuição\n $title4 = new TLabel('Listagem da OPM');\n $title4->setFontSize(12);\n $title4->setFontFace('Arial');\n $title4->setFontColor('black');\n $title4->setFontStyle('b');\n \n $title3 = new TLabel('Comandos');\n $title3->setFontSize(12);\n $title3->setFontFace('Arial');\n $title3->setFontColor('black');\n $title3->setFontStyle('b');\n \n $title2 = new TLabel('PMs Selecionados');\n $title2->setFontSize(12);\n $title2->setFontFace('Arial');\n $title2->setFontColor('black');\n $title2->setFontStyle('b');\n \n $title1 = new TLabel('Gestão da Escala');\n $title1->setFontSize(12);\n $title1->setFontFace('Arial');\n $title1->setFontColor('black');\n $title1->setFontStyle('b');\n \n //Botões de Serviço\n $add = new TButton('add_opm');\n $del = new TButton('del_opm');\n $cls = new TButton('clear');\n $ret = new TButton('return');\n \n //Tabelas Auxiliares de Cadastro\n $table_ord = new TTable;//Escalas Ordinárias\n $table_ext = new TTable;//Escalas Extras\n $table_afa = new TTable;//Afastamentos\n\n //Cria no Notebook \n $notebook = new TNotebook(200, 220);\n // Crias as Abas no notebook\n $notebook->appendPage('Ordinária' , $table_ord);\n $notebook->appendPage('Extra' , $table_ext);\n $notebook->appendPage('Afastamento', $table_afa);\n\n //Itens: Escala Ordinária\n $table_ord->addRowSet(array(new TLabel('Escala'),$turno));\n $table_ord->addRowSet(array(new TLabel('De'),$datainicial,new TLabel('A'),$datafinal));\n $table_ord->addRowSet(array(new TLabel('Hora Inicial'),$horaIncialOrdinario));\n $table_ord->addRowSet(array(new TLabel('OPM Informante'),$opm_id_info));\n $table_ord->addRowSet(array(new TLabel('Usar Informante com Atual'),$opm_info_atual));\n $table_ord->addRowSet(array($runLmp,$runOrd));\n //Itens: Escala Extra\n $table_ext->addRowSet(array(new TLabel('Dias'),$diasExtra));\n $table_ext->addRowSet(array(new TLabel('Mês'),$mesExtra,new TLabel('Ano'),$anoExtra));\n $table_ext->addRowSet(array(new TLabel('Hr Início'),$horaInicioExtra,new TLabel('Hrs. Trab.'),$horasTrabalhadas));\n $table_ext->addRowSet(array(new TLabel('Tipo Escala'),$tipoExtra));\n $table_ext->addRowSet($runExt);\n //Itens: Afastamento\n $table_afa->addRowSet(array(new TLabel('Afastamento'),$afasta_id));\n $table_afa->addRowSet(array(new TLabel('De'),$dtinicioaf,new TLabel('A'),$dtfimaf));\n $table_afa->addRowSet(array(new TLabel('BG'),$bgaf,new TLabel('/'),$anobgaf));\n $table_afa->addRowSet(array($runCls,$runAfa));\n\n //Ações\n $add->setAction(new TAction(array($this, 'onAddPMSelect')));\n $del->setAction(new TAction(array($this, 'onDelPMSelect')));\n $cls->setAction(new TAction(array($this, 'onClearSelect')));\n $ret->setAction(new TAction(array($this, 'onReturn')));\n //Labels\n $add->setLabel('Adiciona');\n $del->setLabel('Remove');\n $cls->setLabel('Limpa');\n $ret->setLabel('Volta ao Gerenciador');\n //Icones\n $add->setImage('fa:plus green');\n $del->setImage('fa:minus red');\n $cls->setImage('fa:file-o black');\n $ret->setImage('fa:backward black');\n //Classes\n $ret->class = 'btn btn-warning';\n //PopUps\n if ($this->popAtivo)\n {\n $addPM->popover = 'true';\n $addPM->popside = 'top';\n $addPM->poptitle = 'Seleciona Militar';\n $addPM->popcontent = 'Clique aqui ou tecle ENTER para selecionar o militar.';\n //\n $add->popover = 'true';\n $add->popside = 'top';\n $add->poptitle = 'Adiciona Seleção de Militares';\n $add->popcontent = 'Adiciona o(s) Militar(es) selecionado(s) da caixa Lista da OPM.';\n //\n $del->popover = 'true';\n $del->popside = 'top';\n $del->poptitle = 'Remove Seleção de Militares';\n $del->popcontent = 'Remove o(s) Militar(es) selecionado(s) da caixa Selecionados.';\n //\n $cls->popover = 'true';\n $cls->popside = 'top';\n $cls->poptitle = 'Limpa toda Seleção de Militares';\n $cls->popcontent = 'Remove TODOS os Militares selecionados da caixa Selecionados.';\n //\n $ret->popover = 'true';\n $ret->popside = 'top';\n $ret->poptitle = 'Retorno à Tela de Gerenciamento';\n $ret->popcontent = 'Retorna para a Tela de Gerenciamento do Banco de Horas.<br>A lista e Militares já selecionados permanecerá até o fechamento do sistema.';\n //\n $runOrd->popover = 'true';\n $runOrd->popside = 'top';\n $runOrd->poptitle = 'Gera Escala Ordinária.';\n $runOrd->popcontent = 'São campos necessários:<br>- Turno;<br>- Data inicial e final;<br>- Hora de Início da Escala.';//.\n //\n $runExt->popover = 'true';\n $runExt->popside = 'top';\n $runExt->poptitle = 'Gera Escala Extra';\n $runExt->popcontent = 'São Campos necessários:<br>- Dias (preencher com um ou mais);<br>- Mês e Ano;<br>- Hora Início;<br>'.\n '- Horas Trabalhadas;<br>- Tipo Escala.';\n //\n $runCls->popover = 'true';\n $runCls->popside = 'top';\n $runCls->poptitle = 'Limpa Afastamentos e Restrições (apenas)';\n $runCls->popcontent = 'Use os campos acima como filtro.';\n //\n $runAfa->popover = 'true';\n $runAfa->popside = 'top';\n $runAfa->poptitle = 'Gera Afastamentos e Restrições';\n $runAfa->popcontent = 'São Campos necessários:<br>- Afastamento;<br>- O intervalo de datas.';\n //\n $runVer->popover = 'true';\n $runVer->popside = 'top';\n $runVer->poptitle = 'Verifica a Escala';\n $runVer->popcontent = 'É necessário escolher um militar (um apenas) quer no Campo Lista da OPM quer no Campo Selecionados.';\n //\n $runLmp->popover = 'true';\n $runLmp->popside = 'top';\n $runLmp->poptitle = 'Limpa as Escalas e Afastamentos';\n $runLmp->popcontent = 'Limpa Escalas (ordinária e Extra) e Afastamentos dos militares Selecionados e no intervalo de datas';\n \n $runOpm->popover = 'true';\n $runOpm->popside = 'top';\n $runOpm->poptitle = 'Carrega os militares da Unidade';\n $runOpm->popcontent = 'Carrega os Militares da unidade escolhida filtrando os ativos e inativos conforme se escolhe Sim ou Não no campo Seleciona inativos:';\n }\n //Tabela com Comandos\n $frame_tempo = new TFrame();\n $hboxc = new THBox;\n $hboxc->addRowSet($add);\n $hboxc->addRowSet($del);\n $hboxc->addRowSet($cls);\n $hboxc->addRowSet($runVer);\n $hboxc->addRowSet($ret);\n\n $frame1->add($hboxc);\n $frame1->style = \"width: 100%; display: table-cell; vertical-align: top; text-align: center;\";\n\n //Frame com Lista da OPM\n $vbox2 = new TVBox;\n $frame4 = new TFrame(260,330);\n $frame4->setLegend('Lista de Militares da OPM');\n $frame4->add($lista_opm);\n $frame4->style = \"width: 280px; display: table-cell; vertical-align: top;\";\n $vbox2->add($frame4);\n //Frame de Seleção\n $vbox4 = new TVBox;\n $frame6 = new TFrame(260,330);\n $frame6->setLegend('Militares Selecionados');\n $frame6->add($lista_slc);\n $frame6->style = \"width: 280px; display: table-cell; vertical-align: top;\";\n $vbox4->add($frame6);\n //Frame de Geração\n $vbox5 = new TVBox;\n $frame3 = new TFrame(280,330);\n $frame3->setLegend('Funções de Geração');\n $frame3->add($notebook);\n $frame3->style = \"width: 280px; display: table-cell; vertical-align: top;\";\n $vbox5->add($frame3);\n \n $frame2 = new TFrame;\n $frame2->style = \"width: 100%; display: table-cell; vertical-align: top;\";\n $frame2->add($vbox2);\n $frame2->add($vbox4);\n $frame2->add($vbox5);\n\n $this->form->setFields(array($rgmilitar,$opm,$addPM,$lista_opm,$lista_slc,$opm_info_atual,$opm_id_info,$turno,\n $datafinal,$datainicial,$dtinicioaf,$dtfimaf,$horaIncialOrdinario,$horaInicioExtra,$horasTrabalhadas,\n $diasExtra,$mesExtra,$anoExtra,$bgaf,$anobgaf,$tipoExtra,$afasta_id,$ativo,\n $add,$del,$cls,$ret,$runOrd,$runExt,$runAfa,$runCls,$runVer,$runLmp,$runOpm)); \n // vertical box container\n $container = new TVBox;\n $container->style = 'width: 90%';\n $container->add(new TXMLBreadCrumb('menu.xml', 'bdhManagerForm'));\n $container->add($frame1);\n //$container->add($frame_tempo);\n $container->add($frame2);\n $this->form->add($container);\n\n //parent::add($container);\n parent::add($this->form);\n if ($opm->getValue())\n {\n self::onSelectOpm_old(array('opm'=>$opm->getValue(),'ativo'=>$ativo->getValue()));\n }\n $lista_slc = TSession::getValue(__CLASS__.'_lista_slc');\n self::onLoadPMSelect();\n self::popula_escalas();\n\n }", "protected function createComponentRateForm()\r\n\t{\r\n\t\t$form = new Form;\r\n\t\t$form->addText('tarif', 'Tarifní sazba:')\r\n\t\t\t\t->setRequired('Uveďte tarifní hodinovou sazbu.')\r\n\t\t\t\t->setAttribute('class', 'cislo')\r\n\t\t\t\t->addFilter(array('Nette\\Forms\\Controls\\TextBase', 'filterFloat'))\r\n\t\t\t\t\t->controlPrototype->autocomplete('off')\r\n\t\t\t\t->addCondition($form::FILLED)\r\n\t\t\t\t\t\t->addRule($form::FLOAT, 'Hodnota musí být celé nebo reálné číslo.');\r\n\t\t\r\n\t\t$form->addText('hodnota', 'Kalkulační hodnota:')\r\n\t\t\t\t->setRequired('Uveďte kalkulační hodnotu tarifu.')\r\n\t\t\t\t->setAttribute('class', 'cislo')\r\n\t\t\t\t->addFilter(array('Nette\\Forms\\Controls\\TextBase', 'filterFloat'))\r\n\t\t\t\t\t->controlPrototype->autocomplete('off')\r\n\t\t\t\t->addCondition($form::FILLED)\r\n\t\t\t\t\t\t->addRule($form::FLOAT, 'Hodnota musí být celé nebo reálné číslo.');\r\n\r\n\t\t$form->addHidden('id_set_tarifu');\r\n\t\t$form->addHidden('id_typy_tarifu');\r\n\r\n\t\t$form->addSubmit('save', 'Uložit')->setAttribute('class', 'default');\r\n\t\t$form->addSubmit('cancel', 'Storno')->setValidationScope(FALSE);\r\n\t\t$form->onSuccess[] = callback($this, 'rateFormSubmitted');\r\n\r\n\t\t$form->addProtection(self::MESS_PROTECT);\r\n\t\treturn $form;\r\n\t}", "function box_build_attributes($properties, $i, $showtrunc = true, $showfont = true, $showborder = true, $showfill = true, $pre = '', $title = '') {\n global $kFonts, $kFontSizes, $kFontAlign, $kFontColors, $kLineSizes;\n $fields = array('font', 'size', 'align', 'color', 'bordershow', 'bordersize', 'bordercolor', 'fillshow', 'fillcolor');\n\tforeach ($fields as $value) {\n $temp = $pre . $value;\n\t $$value = $properties->$temp;\n\t}\n $output = NULL;\n $output .= '<table class=\"ui-widget\" style=\"border-collapse:collapse;margin-left:auto;margin-right:auto;\">' . nl;\n $output .= ' <thead class=\"ui-widget-header\">' . nl;\n $output .= ' <tr><th colspan=\"5\">' . ($title ? $title : TEXT_ATTRIBUTES) . '</th></tr>' . nl;\n $output .= ' </thead>' . nl;\n $output .= ' <tbody class=\"ui-widget-content\">' . nl;\n if ($showtrunc) {\n $output .= ' <tr>' . nl;\n $output .= ' <td colspan=\"2\">' . TEXT_TRUNCATE . html_radio_field($pre.'box_trun_' . $i, '0', (!$properties->truncate) ? true : false) . TEXT_NO . html_radio_field($pre.'box_trun_' . $i, '1', ($properties->truncate) ? true : false) . TEXT_YES . '</td>' . nl;\n $output .= ' <td colspan=\"3\">' . TEXT_DISPLAY_ON . html_radio_field($pre.'box_last_' . $i, '0', (!$properties->display || $properties->display == '0') ? true : false) . TEXT_ALL_PAGES . html_radio_field($pre.'box_last_' . $i, '1', ($properties->display == '1') ? true : false) . TEXT_FIRST_PAGE . html_radio_field($pre.'box_last_' . $i, '2', ($properties->display == '2') ? true : false) . TEXT_LAST_PAGE . '</td>' . nl;\n $output .= ' </tr>' . nl;\n }\n if ($showfont) {\n $output .= ' <tr class=\"ui-widget-header\">' . nl;\n $output .= ' <th>' . '&nbsp;' . '</th>' . nl;\n $output .= ' <th>' . TEXT_STYLE . '</th>' . nl;\n $output .= ' <th>' . TEXT_SIZE . '</th>' . nl;\n $output .= ' <th>' . TEXT_ALIGN . '</th>' . nl;\n $output .= ' <th>' . TEXT_COLOR . '</th>' . nl;\n $output .= ' </tr>' . nl;\n $output .= ' <tr>' . nl;\n $output .= ' <td>' . TEXT_FONT .'</td>' . nl;\n $output .= ' <td>' . html_pull_down_menu($pre.'box_fnt_' . $i, $kFonts, $font) . '</td>' . nl;\n $output .= ' <td>' . html_pull_down_menu($pre.'box_size_'. $i, $kFontSizes, $size) . '</td>' . nl;\n $output .= ' <td>' . html_pull_down_menu($pre.'box_aln_' . $i, $kFontAlign, $align) . '</td>' . nl;\n $output .= ' <td id=\"' . $pre.'box_td_' . $i . '\" style=\"background-color:#' . convertPfColor($color) . '\">' . nl;\n $output .= ' <div id=\"' . $pre.'box_whl_' . $i . '\" \n\t onmousemove=\"moved(event, \\''.$pre.'box_whl_' . $i . '\\', \\''.$pre.'box_td_' . $i . '\\', \\''.$pre.'box_clr_' . $i . '\\')\" \n\t onclick=\"setCustom(\\''.$pre.'box_whl_' . $i . '\\', \\''.$pre.'sel_clr_' . $i . '\\')\" style=\"position:absolute; display:none; top:0px; left:0px; z-index:10000\">\n\t <img src=\"'.DIR_WS_MODULES.'phreeform/images/colorwheel.jpg\" width=\"256\" height=\"256\" alt=\"\" />' . nl;\n $output .= ' </div>' . nl;\n $output .= html_hidden_field($pre.'box_clr_' . $i, $color ? $color : '0:0:0') . nl;\n $output .= html_pull_down_menu($pre.'sel_clr_' . $i, $kFontColors, $color ? $color : '0:0:0', 'onchange=\"colorSet(\\''.$pre.'sel_clr_' . $i . '\\', \\''.$pre.'box_td_' . $i . '\\', \\''.$pre.'box_clr_' . $i . '\\')\"') . nl;\n $output .= html_icon('categories/applications-graphics.png', TEXT_CUSTOM, 'small', 'onclick=\"showCustom(\\''.$pre.'box_whl_' . $i . '\\', \\''.$pre.'sel_clr_' . $i . '\\')\"') . nl;\n $output .= ' </td>'. nl;\n $output .= ' </tr>' . nl;\n }\n if ($showborder) {\n $output .= ' <tr>' . nl;\n $output .= ' <td>' . TEXT_BORDER_AREA . '</td>' . nl;\n $output .= ' <td>' . html_checkbox_field($pre.'box_bdr_' . $i, '1', ($bordershow) ? true : false) . '</td>' . nl;\n $output .= ' <td>' . html_pull_down_menu($pre.'box_bsz_' . $i, $kLineSizes, $bordersize) . TEXT_POINTS . '</td>' . nl;\n $output .= ' <td>' . '&nbsp;' . '</td>' . nl;\n $output .= ' <td id=\"'.$pre.'box_btd_' . $i . '\" style=\"background-color:#' . convertPfColor($bordercolor) . '\">' . nl;\n $output .= ' <div id=\"'.$pre.'box_bwhl_' . $i . '\" \n\t onmousemove=\"moved(event, \\''.$pre.'box_bwhl_' . $i . '\\', \\''.$pre.'box_btd_' . $i . '\\', \\''.$pre.'box_bclr_' . $i . '\\')\" \n\t onclick=\"setCustom(\\''.$pre.'box_bwhl_' . $i . '\\', \\''.$pre.'sel_bclr_' . $i . '\\')\" style=\"position:absolute; display:none; top:0px; left:0px; z-index:10000\">\n\t <img src=\"'.DIR_WS_MODULES.'phreeform/images/colorwheel.jpg\" width=\"256\" height=\"256\" alt=\"\" />' . nl;\n $output .= ' </div>' . nl;\n $output .= html_hidden_field($pre.'box_bclr_' . $i, $bordercolor ? $bordercolor : '0:0:0') . nl;\n $output .= html_pull_down_menu($pre.'sel_bclr_' . $i, $kFontColors, $bordercolor ? $bordercolor : '0:0:0', 'onchange=\"colorSet(\\''.$pre.'sel_bclr_' . $i . '\\', \\''.$pre.'box_btd_' . $i . '\\', \\''.$pre.'box_bclr_' . $i . '\\')\"') . nl;\n $output .= html_icon('categories/applications-graphics.png', TEXT_CUSTOM, 'small', 'onclick=\"showCustom(\\''.$pre.'box_bwhl_' . $i . '\\', \\''.$pre.'sel_bclr_' . $i . '\\')\"') . nl;\n $output .= ' </td>'. nl;\n $output .= '</tr>' . nl;\n }\n if ($showfill) {\n $output .= '<tr>' . nl;\n $output .= ' <td>'. TEXT_FILL_AREA . '</td>' . nl;\n $output .= ' <td>'. html_checkbox_field($pre.'box_fill_' . $i, '1', ($fillshow) ? true : false) . '</td>' . nl;\n $output .= ' <td>'. '&nbsp;' . '</td>' . nl;\n $output .= ' <td>'. '&nbsp;' . '</td>' . nl;\n $output .= ' <td id=\"'.$pre.'box_ftd_' . $i .'\" style=\"background-color:#' . convertPfColor($fillcolor) .'\">' . nl;\n $output .= ' <div id=\"'.$pre.'box_fwhl_' . $i . '\" \n\t onmousemove=\"moved(event, \\''.$pre.'box_fwhl_' . $i . '\\', \\''.$pre.'box_ftd_' . $i . '\\', \\''.$pre.'box_fclr_' . $i . '\\')\" \n\t onclick=\"setCustom(\\''.$pre.'box_fwhl_' . $i . '\\', \\''.$pre.'sel_fclr_' . $i . '\\')\" style=\"position:absolute; display:none; top:0px; left:0px; z-index:10000\">\n\t <img src=\"'.DIR_WS_MODULES.'phreeform/images/colorwheel.jpg\" width=\"256\" height=\"256\" alt=\"\" />' . nl;\n $output .= ' </div>' . nl;\n $output .= html_hidden_field($pre.'box_fclr_' . $i, $fillcolor ? $fillcolor : '0:0:0') . nl;\n $output .= html_pull_down_menu($pre.'sel_fclr_' . $i, $kFontColors, $fillcolor ? $fillcolor : '0:0:0', 'onchange=\"colorSet(\\''.$pre.'sel_fclr_' . $i . '\\', \\''.$pre.'box_ftd_' . $i . '\\', \\''.$pre.'box_fclr_' . $i . '\\')\"') . nl;\n $output .= html_icon('categories/applications-graphics.png', TEXT_CUSTOM, 'small', 'onclick=\"showCustom(\\''.$pre.'box_fwhl_' . $i . '\\', \\''.$pre.'sel_fclr_' . $i . '\\')\"') . nl;\n $output .= ' </td>'. nl;\n $output .= '</tr>' . nl;\n }\n $output .= '</tbody></table>' . nl;\n return $output;\n}", "public function ajax_example_progressbar_callback($form, &$form_state) {\n $variable_name = 'example_progressbar_' . $form_state['time'];\n $commands = array();\n\n variable_set($variable_name, 10);\n sleep(2);\n variable_set($variable_name, 40);\n sleep(2);\n variable_set($variable_name, 70);\n sleep(2);\n variable_set($variable_name, 90);\n sleep(2);\n variable_del($variable_name);\n\n $commands[] = HtmlCommand('#progress-status', $this->t('Executed.'));\n\n return array(\n '#type' => 'ajax',\n '#commands' => $commands,\n );\n}", "protected function createComponentTarifForm()\r\n\t{\r\n\t\t$form = new Form;\r\n\t\t$form->addText('name', 'Jméno:')\r\n\t\t\t->setRequired('Zadej jméno.');\r\n\r\n\t\t$form->addText('apicode', 'API Code:');\r\n\r\n\t\t$form->addText('price', 'Cena:')\r\n\t\t ->addRule(Form::INTEGER, 'Cena musí být číslo')\r\n\t\t\t->setRequired('Zadej cenu.');\r\n\t\t\r\n\t\t$form->addText('description', 'Popis:');\r\n\t\t\t\r\n\t\t$form->addSubmit('save', 'Uložit')\r\n\t\t\t->setAttribute('class', 'default')\r\n\t\t\t->onClick[] = $this->tarifFormSucceeded;\r\n\r\n\t\t$form->addSubmit('cancel', 'Cancel')\r\n\t\t\t->setValidationScope(NULL)\r\n\t\t\t->onClick[] = $this->formCancelled;\r\n\r\n\t\t$form->addProtection();\r\n\t\treturn $form;\r\n\t}", "protected function createComponentPrihozForm()\n {\n $id = (int) $this->getParameter('id');\n $form = new Nette\\Application\\UI\\Form;\n \n $form->addText('id_uzivatel')\n ->setAttribute('style', 'display:none')\n ->setDefaultValue($this->user->id);\n\n $form->addText('id_nemovitost')\n ->setAttribute('style', 'display:none')\n ->setDefaultValue($id);\n \n $form->addText('pocet')\n ->setAttribute('style', 'display:none');\n \n $form->addText('vkladana_castka', 'Přihazovaná částka:')\n ->setType('number')\n ->setRequired('Prosím vložte částku, kterou chcete přihodit.')\n ->addRule(Nette\\Application\\UI\\Form::MIN, 'Prosím vložte vyšší částku. Minimální příhoz je 5,000 Kč.', 5000)\n ->setAttribute('placeholder', 'Sem vložte částku v Kč.')\n ->setAttribute('class', 'castka')\n ->setAttribute('step', '1');\n\n $form->addSubmit('send', 'Odeslat formulář')\n ->setAttribute('class', 'btn btn-primary');\n\n $form->onSuccess[] = $this->prihozFormSucceeded;\n return $form;\n }", "private function build_form()\n {\n $ldm = LaikaDataManager :: get_instance();\n\n // The Laika Scales\n $scales = $ldm->retrieve_laika_scales(null, null, null, new ObjectTableOrder(LaikaScale :: PROPERTY_TITLE));\n $scale_options = array();\n while ($scale = $scales->next_result())\n {\n $scale_options[$scale->get_id()] = $scale->get_title();\n }\n\n // The Laika Percentile Codes\n $codes = $ldm->retrieve_percentile_codes();\n $code_options = array();\n foreach ($codes as $code)\n {\n $code_options[$code] = $code;\n }\n\n $this->addElement('category', Translation :: get('Dates'));\n $this->add_timewindow(self :: GRAPH_FILTER_START_DATE, self :: GRAPH_FILTER_END_DATE, Translation :: get('StartTimeWindow'), Translation :: get('EndTimeWindow'), false);\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Groups', null, 'group'));\n\n $group_options = $this->get_groups();\n\n if (count($group_options) > 0)\n {\n if (count($group_options) < 10)\n {\n $count = count($group_options);\n }\n else\n {\n $count = 10;\n }\n\n $this->addElement('select', self :: GRAPH_FILTER_GROUP, Translation :: get('Group', null, Utilities::GROUP), $this->get_groups(), array('multiple', 'size' => $count));\n $this->addRule(self :: GRAPH_FILTER_GROUP, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n }\n else\n {\n $this->addElement('static', 'group_text', Translation :: get('Group'), Translation :: get('NoGroupsAvailable'));\n $this->addElement('hidden', self :: GRAPH_FILTER_GROUP, null);\n }\n\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Results'));\n $this->addElement('select', self :: GRAPH_FILTER_SCALE, Translation :: get('Scale'), $scale_options, array('multiple', 'size' => '10'));\n $this->addRule(self :: GRAPH_FILTER_SCALE, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n $this->addElement('select', self :: GRAPH_FILTER_CODE, Translation :: get('Code'), $code_options, array('multiple', 'size' => '4'));\n $this->addRule(self :: GRAPH_FILTER_CODE, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Options'));\n\n $group = array();\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderGraphAndTable'), LaikaGraphRenderer :: RENDER_GRAPH_AND_TABLE);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderGraph'), LaikaGraphRenderer :: RENDER_GRAPH);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderTable'), LaikaGraphRenderer :: RENDER_TABLE);\n $this->addGroup($group, self :: GRAPH_FILTER_TYPE, Translation :: get('RenderType'), '<br/>', false);\n\n $allow_save = PlatformSetting :: get('allow_save', LaikaManager :: APPLICATION_NAME);\n if ($allow_save == true)\n {\n $this->addElement('checkbox', self :: GRAPH_FILTER_SAVE, Translation :: get('SaveToRepository'));\n }\n\n $maximum_attempts = PlatformSetting :: get('maximum_attempts', LaikaManager :: APPLICATION_NAME);\n if ($maximum_attempts > 1)\n {\n $group = array();\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('OnlyIncludeFirstAttempt'), LaikaGraphRenderer :: RENDER_ATTEMPT_FIRST);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('OnlyIncludeMostRecentAttempt'), LaikaGraphRenderer :: RENDER_ATTEMPT_LAST);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('IncludeAllAttempts'), LaikaGraphRenderer :: RENDER_ATTEMPT_ALL);\n $this->addGroup($group, self :: GRAPH_FILTER_ATTEMPT, Translation :: get('AttemptsToInclude'), '<br/>', false);\n }\n else\n {\n $this->addElement('hidden', self :: GRAPH_FILTER_ATTEMPT, LaikaGraphRenderer :: RENDER_ATTEMPT_ALL);\n }\n\n $this->addElement('category');\n\n $buttons = array();\n\n $buttons[] = $this->createElement('style_submit_button', 'submit', Translation :: get('Filter', null, Utilities::COMMON_LIBRARIES), array('class' => 'normal search'));\n $buttons[] = $this->createElement('style_reset_button', 'reset', Translation :: get('Reset', null, Utilities::COMMON_LIBRARIES), array('class' => 'normal empty'));\n\n $this->addGroup($buttons, 'buttons', null, '&nbsp;', false);\n }", "public function buildForm(array $form, FormStateInterface $form_state) {\n $form['time_duration'] = [\n '#type' => 'number',\n '#title' => $this->t('Time duration'),\n '#min' => 100,\n '#step' => 100,\n '#description' => $this->t(\n \"Time in seconds from the user's last login. Used as an event to \n update the relationships between the user and companies.\"\n ),\n '#default_value' => $this->config('pmmi_sso.company.settings')->get('time_duration'),\n '#required' => TRUE,\n ];\n $form['submit'] = [\n '#type' => 'submit',\n '#value' => $this->t('Save'),\n ];\n return $form;\n }", "protected function setLoginBar()\n {\n $this->loginBar = new FormBuilder(\"login\", \"login\", \"post\");\n $loginTitle = new Comment(\"Member Login:\");\n $loginTitle->setBold();\n $loginTitle->setUnderlined();\n $this->loginBar->add($loginTitle);\n\n $this->loginBar->buildComment(\"username: \", false)\n ->buildTextField(\"username\")\n ->buildComment(\"password: \", false)\n ->buildPasswordField(\"password\", \"password\", \"\", true)\n ->buildButton(\"Log In\", \"submit\", \"submit\")\n ->buildComment(\"Don't have an account?\");\n \n $register = new Link(\"register\");\n $register->setText(\"Register New Account\");\n $register->setLineBreak(true);\n $forgot = new Link(\"forgotpass\");\n $forgot->setText(\"Forgot Password?\");\n \n $this->loginBar->add($register);\n $this->loginBar->add($forgot);\n $this->setDivision($this->loginBar);\n }", "protected function definition_inner($mform) {\n\n $mform->addElement('header', 'previewareaheader',\n get_string('previewareaheader', 'qtype_'.$this->qtype()));\n $mform->setExpanded('previewareaheader');\n $mform->addElement('static', 'previewarea', '',\n get_string('previewareamessage', 'qtype_'.$this->qtype()));\n\n $mform->registerNoSubmitButton('refresh');\n $mform->addElement('submit', 'refresh', get_string('refresh', 'qtype_'.$this->qtype()));\n $mform->addElement('filepicker', 'bgimage', get_string('bgimage', 'qtype_'.$this->qtype()),\n null, self::file_picker_options());\n $mform->closeHeaderBefore('dropzoneheader');\n\n // Add the draggable image fields & drop zones to the form.\n list($itemrepeatsatstart, $imagerepeats) = $this->get_drag_item_repeats();\n $this->definition_draggable_items($mform, $itemrepeatsatstart);\n $this->definition_drop_zones($mform, $imagerepeats);\n\n $this->add_combined_feedback_fields(true);\n $this->add_interactive_settings(true, true);\n }", "public function progressBar()\n {\n \n self::$view='adminlte::progress.bar';\n return $this;\n \n }", "protected function form()\n {\n $form = new Form(new MachinesStyle());\n\n $form->text('style_name', __('型号名称'));\n\n $form->select('aa', __('所属类型'))->options(MachinesType::where('state', '1')->get()->pluck('name', 'id'))->load('factory_id', '/api/getAdminFactory');\n\n $form->select('factory_id', __('所属厂商'))->required();\n\n $form->ignore(['aa']);\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new PrizesLog);\n\n // 去掉`删除`按钮\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableDelete();\n $tools->disableView();\n });\n\n $form->text('group.title', '奖品组')->readonly();\n $form->text('prize.name', '奖品名称')->readonly();\n $form->text('material.title', '物料名称')->readonly();\n $form->text('material_code', '物料代码')->readonly();\n $form->text('user.username', '用户名')->readonly();\n $form->text('user.mobile', '用户手机号')->readonly();\n $form->select('source', '来源')->options([\n '' => '', 'exchange' => '兑换/领取', 'lottery' => '抽奖'\n ])->readonly();\n $form->ip('ip', 'IP地址')->readonly();\n $form->datetime('created_at', '中奖时间')->readonly();\n $form->embeds('leaving_capital', '留资信息', function ($form) {\n $form->text('name', '收件人');\n $form->mobile('mobile', '手机号');\n $form->text('address', '收件地址');\n });\n $form->radio('status', '状态')->options([\n '0' => '作废', '1' => '有效'\n ])->default('1');\n return $form;\n }", "protected function createComponentMoveForm() {\r\n\t\t$form = new Form;\r\n\t\t$options = $this->closureModel->getOptions();\r\n\t\t$form->addSelect(\"parentId\", \"Branch Parent\", $options);\r\n\t\t$form->addHidden(\"id\", $this->edit_id);\r\n\t\t$form->addSubmit('save', 'Save')\r\n\t\t\t\t->onClick[] = callback($this, 'moveFormSubmitted');\r\n\t\t$form->setRenderer(new \\Kdyby\\BootstrapFormRenderer\\BootstrapRenderer());\r\n\t\treturn $form;\r\n\t}", "function ps_set_border_style($psdoc, $style, $width)\n{\n}", "protected function createStyle()\n\t{\n\t\treturn new TPanelStyle;\n\t}", "function setDefaults() {\r\n\t\t$this->border='1px solid #46b0ee';\r\n\t\t$this->fgColor='#ff9000';\r\n\t\t$this->bgColor='#FFFFFF';\r\n\t}", "public function setBorderWidth($borderWidth) {}", "public function buildForm() {\n\t\t$form = '';\n\n\t\tforeach ($this->_properties as $row) {\n\t\t\tif (!in_array($row['Field'],$this->_ignore)) {\n\t\t\t\t$elem = $this->buildElement($row);\n\t\t\t\t$row['Comment'] != '' ? $comment = $row['Comment'].\"<br />\": $comment = '';\n\t\t\t\t$this->_properties[$row['Field']]['HTMLElement']=$elem;\n\t\t\t\tif ($row['ElementType']=='hidden')\n\t\t\t\t\t$form .= $elem;\n\t\t\t\telse \n\t\t\t\t\t$form .= sprintf(\"<div class='formElem'>\\n%s<br />\\n%s\\n%s</div>\\n\",ucwords (str_replace (\"_\",\" \",$row['Field'])),$comment,$elem);\n\t\t\t}\n\t\t}\n\t\treturn $form;\n\t}", "public function __construct($width=NULL, $height=NULL)\n\t{\n\t\tparent::__construct($width, $height);\n\n\t\t$this->set_margins(5);\n\n\t\t$this->colors['bar_color'] = \t\t\t\tarray('#e0d62e', NULL, NULL);\n\t\t$this->colors['bar_border_color'] = array('#747014', 10, \t NULL);\n\t\t$this->colors['line_color'] = \t\t\tarray('#dfdfdf', NULL, NULL);\t// primary color of lines\n\t\t$this->colors['line_color2'] =\t\t\tarray('#969696', NULL, NULL);\t// for short lines by the legend for example\n\t}", "protected function form()\n {\n $form = new Form(new Direction());\n\n $form->text('name', __(trans('hhx.name')));\n $form->text('intro', __(trans('hhx.intro')));\n $form->image('Img', __(trans('hhx.img')))->move('daily/direction')->uniqueName();\n $form->select('status', __(trans('hhx.status')))->options(config('hhx.status'));;\n $form->number('order_num', __(trans('hhx.order_num')));\n $form->hidden('all_num', __(trans('hhx.all_num')))->default(0.00);\n $form->decimal('stock', __(trans('hhx.stock')));\n\n return $form;\n }", "public function construct()\r\n\t{\r\n\t\t\r\n\t\t\r\n\t\t$class = ($this->classClr) ? 'w50 clr' : 'w50';\r\n\t\t$class = ($this->classLong) ? 'long clr' : $class;\r\n\t\t$class .= ($this->picker) ? ' wizard' : '';\r\n\t\t\r\n\t\t$wizard = ($this->picker == 'page') ? array(array('tl_content', 'pagePicker')) : false;\r\n\t\t\r\n\t\t// input unit\r\n\t\tif (($this->picker == 'unit'))\r\n\t\t{\r\n\t\t\t$options = array();\r\n\t\t\tforeach (deserialize($this->units) as $arrOption)\r\n\t\t\t{\r\n\t\t\t\t$options[$arrOption['value']] = $arrOption['label'];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// the text field\r\n\t\t$this->generateDCA(($this->picker != 'unit') ? ($this->multiple) ? 'multiField' : 'textField' : 'inputUnit', array\r\n\t\t(\r\n\t\t\t'inputType' =>\t($this->picker == 'unit') ? 'inputUnit' : 'text',\r\n\t\t\t'label'\t\t=>\tarray($this->label, $this->description),\r\n\t\t\t'default'\t=>\t$this->defaultValue,\r\n\t\t\t'wizard'\t=>\t$wizard,\r\n\t\t\t'options'\t=>\t$options,\r\n\t\t\t'eval'\t\t=>\tarray\r\n\t\t\t(\r\n\t\t\t\t'mandatory'\t\t=>\t($this->mandatory) ? true : false, \r\n\t\t\t\t'minlength'\t\t=>\t$this->minlength, \r\n\t\t\t\t'maxlength'\t\t=>\t$this->maxLength, \r\n\t\t\t\t'tl_class'\t\t=>\t$class,\r\n\t\t\t\t'rgxp'\t\t\t=>\t$this->rgxp,\r\n\t\t\t\t'multiple'\t\t=>\t($this->multiple) ? true : false,\r\n\t\t\t\t'size'\t\t\t=>\t$this->multiple,\r\n\t\t\t\t'datepicker' \t=> \t($this->picker == 'datetime') ? true : false,\r\n\t\t\t\t'colorpicker' \t=> \t($this->picker == 'color') ? true : false,\r\n\t\t\t\t'isHexColor' \t=> \t($this->picker == 'color') ? true : false,\r\n\t\t\t),\r\n\t\t));\r\n\t\t\r\n\t}", "function style(){\r\n\t\t// Sorry mom :(\r\n\t\t$style=\"<style>\r\n\t\t\t.debug{\r\n\t\t\t\tposition: relative;\r\n\t\t\t\tpadding: 15px;\r\n\t\t\t\tmargin: 15px;\r\n\t\t\t\tborder: 1px solid black;\r\n\t\t\t\tcolor: black;\r\n\t\t\t\tfont-size: 14px;\r\n\t\t\t\tfont-family: monospace;\r\n\t\t\t\toverflow: auto;\r\n\t\t\t\t\r\n\t\t\t\ttext-align: left;\r\n\t\t\t\tline-height: 14px;\r\n\t\t\t\tborder-radius: 10px;\r\n\t\t\t\tmoz-border-radiuz: 10px;\r\n\t\t\t\t\r\n\t\t\t\tbackground-image: linear-gradient(bottom, rgb(251,255,199) 90%, rgb(227,222,157) 100%);\r\n\t\t\t\tbackground-image: -o-linear-gradient(bottom, rgb(251,255,199) 90%, rgb(227,222,157) 100%);\r\n\t\t\t\tbackground-image: -moz-linear-gradient(bottom, rgb(251,255,199) 90%, rgb(227,222,157) 100%);\r\n\t\t\t\tbackground-image: -webkit-linear-gradient(bottom, rgb(251,255,199) 90%, rgb(227,222,157) 100%);\r\n\t\t\t\tbackground-image: -ms-linear-gradient(bottom, rgb(251,255,199) 90%, rgb(227,222,157) 100%);\r\n\t\t\t\t\r\n\t\t\t\tbackground-image: -webkit-gradient(\r\n\t\t\t\t\tlinear,\r\n\t\t\t\t\tleft bottom,\r\n\t\t\t\t\tleft top,\r\n\t\t\t\t\tcolor-stop(0.9, rgb(251,255,199)),\r\n\t\t\t\t\tcolor-stop(1, rgb(227,222,157))\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t\t</style>\r\n\t\t \";\r\n\t\treturn $style;\r\n\t}", "protected function form()\n {\n $form = new Form(new DbTop());\n $form->select('status', __(trans('hhx.status')))->options(config('hhx.db_status'));;\n $form->text('pan_url', __(trans('hhx.pan_url')));\n $form->text('pan_code', __(trans('hhx.pan_code')));\n\n return $form;\n }", "public function initClientOverviewForm()\n\t{\n\t\tglobal $lng, $ilCtrl;\n\n\t\t$settings = $this->setup->getClient()->getAllSettings();\n\n\t\tinclude_once(\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$this->form = new ilPropertyFormGUI();\n\n\t\t$this->form->setTitle($lng->txt(\"client_info\"));\n\n\t\t// installation name\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"inst_name\"), \"inst_name\");\n\t\t$ne->setValue(($this->setup->getClient()->getName())\n\t\t\t? $this->setup->getClient()->getName()\n\t\t\t: \"&lt;\".$this->lng->txt(\"no_client_name\").\"&gt;\");\n\t\t$ne->setInfo($this->setup->getClient()->getDescription());\n\t\t$this->form->addItem($ne);\n\n\t\t// client id\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"client_id\"), \"client_id\");\n\t\t$ne->setValue($this->setup->getClient()->getId());\n\t\t$this->form->addItem($ne);\n\n\t\t// nic id\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"ilias_nic_id\"), \"nic_id\");\n\t\t$ne->setValue(($this->setup->getClient()->db_installed)\n\t\t\t? $settings[\"inst_id\"]\n\t\t\t: $txt_no_database);\n\t\t$this->form->addItem($ne);\n\n\t\t// database version\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"db_version\"), \"db_vers\");\n\t\t$ne->setValue(($this->setup->getClient()->db_installed)\n\t\t\t? $settings[\"db_version\"]\n\t\t\t: $txt_no_database);\n\t\t$this->form->addItem($ne);\n\n\t\t// access status\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"access_status\"), \"status\");\n\t\t//$access_link = \"&nbsp;&nbsp;[<a href=\\\"setup.php?cmd=changeaccess&client_id=\".$this->setup->getClient()->getId().\"&back=view\\\">\".$this->lng->txt($access_button).\"</a>]\";\n\t\t$access_status = ($this->setup->getClient()->status[\"access\"][\"status\"]) ? \"online\" : \"disabled\";\n\t\t$ne->setValue($this->lng->txt($access_status).$access_link);\n\t\t$this->form->addItem($ne);\n\n\t\t// server information\n\t\t$sh = new ilFormSectionHeaderGUI();\n\t\t$sh->setTitle($this->lng->txt(\"server_info\"));\n\t\t$this->form->addItem($sh);\n\n\t\t// ilias version\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"ilias_version\"), \"il_vers\");\n\t\t$ne->setValue(ILIAS_VERSION);\n\t\t$this->form->addItem($ne);\n\n\t\t// host\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"host\"), \"host\");\n\t\t$ne->setValue($_SERVER[\"SERVER_NAME\"]);\n\t\t$this->form->addItem($ne);\n\n\t\t// ip address and port\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"ip_address\").\" & \".\n\t\t\t$lng->txt(\"port\"));\n\t\t$ne->setValue($_SERVER[\"SERVER_ADDR\"].\":\".$_SERVER[\"SERVER_PORT\"]);\n\t\t$this->form->addItem($ne);\n\n\t\t// server software\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"server_software\"), \"server_softw\");\n\t\t$ne->setValue($_SERVER[\"SERVER_SOFTWARE\"]);\n\t\t$this->form->addItem($ne);\n\n\t\t// http path\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"http_path\"), \"http_path\");\n\t\t$ne->setValue(ILIAS_HTTP_PATH);\n\t\t$this->form->addItem($ne);\n\n\t\t// absolute path\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"absolute_path\"), \"absolute_path\");\n\t\t$ne->setValue(ILIAS_ABSOLUTE_PATH);\n\t\t$this->form->addItem($ne);\n\n\t\t// third party tools\n\t\t$sh = new ilFormSectionHeaderGUI();\n\t\t$sh->setTitle($this->lng->txt(\"3rd_party_software\"));\n\t\t$this->form->addItem($sh);\n\n\t\t$tools = array(\"convert\", \"zip\", \"unzip\", \"ghostscript\", \"java\", \"htmldoc\", \"ffmpeg\");\n\n\t\tforeach ($tools as $tool)\n\t\t{\n\t\t\t// tool\n\t\t\t$ne = new ilNonEditableValueGUI($lng->txt($tool.\"_path\"), $tool.\"_path\");\n\t\t\t$p = $this->setup->ini->readVariable(\"tools\", $tool);\n\t\t\t$ne->setValue($p ? $p : $this->lng->txt(\"not_configured\"));\n\t\t\t$this->form->addItem($ne);\n\t\t}\n\n\t\t// latex\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"url_to_latex\"), \"latex_url\");\n\t\t$p = $this->setup->ini->readVariable(\"tools\", \"latex\"); // #13109\n\t\t$ne->setValue($p ? $p : $this->lng->txt(\"not_configured\"));\n\t\t$this->form->addItem($ne);\n\n\t\t// virus scanner\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"virus_scanner\"), \"vscan\");\n\t\t$ne->setValue($this->setup->ini->readVariable(\"tools\",\"vscantype\"));\n\t\t$this->form->addItem($ne);\n\n\t\t// scan command\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"scan_command\"), \"scan\");\n\t\t$p = $this->setup->ini->readVariable(\"tools\",\"scancommand\");\n\t\t$ne->setValue($p ? $p : $this->lng->txt(\"not_configured\"));\n\t\t$this->form->addItem($ne);\n\n\t\t// clean command\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"clean_command\"), \"clean\");\n\t\t$p = $this->setup->ini->readVariable(\"tools\",\"cleancommand\");\n\t\t$ne->setValue($p ? $p : $this->lng->txt(\"not_configured\"));\n\t\t$this->form->addItem($ne);\n\n\t\t$this->form->setFormAction(\"setup.php?cmd=gateway\");\n\t}", "protected function buildForm()\n\t{\t\n\t\t$mid = $this->Form->newInput( 'hidden' );\n\t\t$mid->set( 'name', 'mid' );\n\t\t$mid->set( 'id', 'mid' );\n\t\t$mid->set( 'value', $this->data['id'] );\n\t\t\n\t\t$submit = $this->Form->newInput( 'submit' );\n\t\t$submit->set( 'name', 'submit' );\n\t\t$submit->set( 'id', 'submit' );\n\t\t$submit->set( 'value', 'Restore' );\n\t}", "public static function drawLoggingOptions()\n {\n $buildopts = array(\n 'files' => jgettext('Log file contents')\n , 'profile' => jgettext('Profile')\n );\n\n //--Get component parameters\n $params = JComponentHelper::getParams('com_easycreator');\n\n echo NL.'<div class=\"logging-options\">';\n\n $js = \"v =( $('div_buildopts').getStyle('display') == 'block') ? 'none' : 'block';\";\n $js .= \"$('div_buildopts').setStyle('display', v);\";\n\n $checked =($params->get('logging')) ? ' checked=\"checked\"' : '';\n echo NL.'<input type=\"checkbox\" onchange=\"'.$js.'\" name=\"buildopts[]\"'.$checked.' value=\"logging\" id=\"logging\" />';\n echo NL.'<label for=\"logging\">'.jgettext('Activate logging').'</label>';\n\n $style =($params->get('logging')) ? '' : ' style=\"display: none;\"';\n echo NL.' <div id=\"div_buildopts\"'.$style.'>';\n\n foreach($buildopts as $name => $titel)\n {\n //--Get component parameters\n $checked =($params->get($name)) ? ' checked=\"checked\"' : '';\n\n echo NL.'&nbsp;|__';\n echo NL.'<input type=\"checkbox\" name=\"buildopts[]\"'.$checked.' value=\"'.$name.'\" id=\"'.$name.'\" />';\n echo NL.'<label for=\"'.$name.'\">'.$titel.'</label><br />';\n }//foreach\n\n echo NL.' </div>';\n echo NL.'</div>';\n }", "function createForm(){\n\t\t$this->createFormBase();\n\t\t$this->addElement('reset','reset','Reset');\t\t\t\n\t\t$tab['seeker_0'] = '0';\n\t\t$this->setDefaults($tab);\n\t\t$this->addElement('submit','bouton_add_pi','Add a contact',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_contact'\"));\n\t\t$this->createVaFormResolution();\n\t\t$this->createFormGeoCoverage();\n\t\t$this->createFormGrid();\t\n\t\t//Required format\n\t\t$dformat = new data_format;\n\t\t$dformat_select = $dformat->chargeFormDestFormat($this,'required_data_format','Required data format','NetCDF');\n\t\t$this->addElement($dformat_select);\n\t\t$this->getElement('organism_0')->setLabel(\"Organism short name\");\n\t\t$this->getElement('project_0')->setLabel(\"Useful in the framework of\");\n\t\t$this->getElement('dats_abstract')->setLabel(\"Abstract \");\n\t\t$this->getElement('dats_purpose')->setLabel(\"Purpose\");\n\t\t$this->getElement('database')->setLabel(\"Data center\");\n\t\t$this->getElement('new_db_url')->setLabel(\"Data center url\");\n\t\t$this->getElement('dats_use_constraints')->setLabel(\"Access and use constraints\");\t\t\t\n\t\t$this->getElement('sensor_resol_tmp')->setLabel('Temporal (hh:mm:ss)');\t\t\t\n\t\t$this->getElement('place_alt_min_0')->setLabel(\"Altitude min\");\n\t\t$this->getElement('place_alt_max_0')->setLabel(\"Altitude max\");\n\t\t$this->getElement('data_format_0')->setLabel(\"Original data format\");\n\t\t$this->addElement('file','upload_doc','Attached document');\n\t\t$this->addElement('submit','upload','Upload');\n\t\t$this->addElement('submit','delete','Delete');\n\t\t\n\t\tfor ($i = 0; $i < $this->dataset->nbVars; $i++){\n\t\t\t$this->getElement('methode_acq_'.$i)->setLabel(\"Parameter processing related information\");\n\t\t}\n\t\t$this->addElement('submit','bouton_add_variable','Add a parameter',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_param'\"));\n\t\t\n\t\t$this->addElement('submit','bouton_add_projet','Add a project',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_general'\"));\n\t\t$option = array();\n\t\t$option['default'] = \"\";\n\t\t$option['model'] = \"Model\";\n\t\t$option['instrument'] = \"Instrument\";\n\t\t$option['satellite'] = \"Satellite\";\n\t\t$this->addElement('select','source_type','source type :',$option,array('onchange' => \"DeactivateButtonAddSource()\",'onclick' => \"DeactivateButtonAddSource();\",'onmouseover' => 'DeactivateButtonAddSource();' ));\n\t\t$this->addElement('submit','bouton_add_source','Add a source',array('disabled' => 'true','onclick' => \"document.getElementById('frmvadataset').action += '#a_source'\",'onmouseout' => 'DeactivateButtonAddSource();'));\n\t\t\n\t\tif (isset ( $this->dataset->dats_sensors ) && ! empty ( $this->dataset->dats_sensors )) {\n\t\t\t$this->dats_sensors = array();\n\t\t\t$this->dats_sensors = $this->dataset->dats_sensors ;\n\t\t}\n\t\tif (isset ( $this->dataset->sites ) && ! empty ( $this->dataset->sites )) {\n\t\t\t$this->sites = array();\n\t\t\t$this->sites = $this->dataset->sites;\n\t\t}\n\t\t\n\t\tif ( isset ( $this->dataset->dats_id ) && $this->dataset->dats_id > 0) {\n\t\t\tif (isset ( $this->dataset->nbModFormSensor )){\n\t\t\t\tif($this->dataset->nbModForm <= $this->dataset->nbModFormSensor ){\n\t\t\t\t\t$this->dataset->nbModForm = $this->dataset->nbModFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset ( $this->dataset->nbSatFormSensor )){\n\t\t\t\t//$this->dataset->nbSatFormSensor = $this->dataset->nbSatFormSensor - 1;\n\t\t\t\tif($this->dataset->nbSatForm <= $this->dataset->nbSatFormSensor){\n\t\t\t\t\t$this->dataset->nbSatForm = $this->dataset->nbSatFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset ( $this->dataset->nbInstruFormSensor )){\n\t\t\t\tif($this->dataset->nbInstruForm <= $this->dataset->nbInstruFormSensor){\n\t\t\t\t\t$this->dataset->nbInstruForm = $this->dataset->nbInstruFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif($this->dataset->nbModForm > 0)\n\t\t\t$this->addMod();\n\t\tif($this->dataset->nbInstruForm > 0)\n\t\t\t$this->addInstru();\t\n\t\tif($this->dataset->nbSatForm > 0)\n\t\t\t$this->addSat();\n\t\t\n\t\t$this->dataset->dats_sensors = null ;\n\t\t$this->dataset->sites = null;\n\t}", "public function createComponentDateRangeForm() {\n\t\t$form = new NAppForm();\n\t\t\n\t\t$form->addGroup();\n\t\t$form->addText('from', 'Zobrazovať projekty od')\n\t\t\t\t->addRule(NForm::FILLED, 'Vyplňte od akého dátumu sa majú projekty zobrazovať.')\n\t\t\t\t->getControlPrototype()\n\t\t\t\t\t->class('datepicker');\n\t\t$form->addText('to', 'Zobrazovať projekty do')\n\t\t\t\t->addRule(NForm::FILLED, 'Vyplňte do akého dátumu sa majú projekty zobrazovať.')\n\t\t\t\t->getControlPrototype()\n\t\t\t\t\t->class('datepicker');\n\t\t\n\t\t$form->setCurrentGroup(NULL);\n\t\n\t\t$form->addSubmit('process', 'Nastav')\n\t\t\t\t->getControlPrototype()\n\t\t\t\t->class('design');\n\t\t$form->addSubmit('set_default', 'Zobraz všekto')\n\t\t\t\t->setValidationScope(NULL)\n\t\t\t\t->getControlPrototype()\n\t\t\t\t->class('design');\n\t\t$form->addSubmit('back', 'Naspäť')\n\t\t\t\t->setValidationScope(NULL)\n\t\t\t\t->getControlPrototype()\n\t\t\t\t->class('design');\n\t\t\n\t\t$form->onSuccess[] = callback($this, 'dateRangeFormSubmit');\n\t\t\n\t\treturn $form;\n\t}", "public function form_footer_progress_block_html() {\n\n\t\t$progress_style = ! empty( $this->form_data['settings']['conversational_forms_progress_bar'] ) ? $this->form_data['settings']['conversational_forms_progress_bar'] : '';\n\n\t\t?>\n\t\t<div class=\"wpforms-conversational-form-footer-progress\">\n\t\t\t<div class=\"wpforms-conversational-form-footer-progress-status\">\n\t\t\t\t<?php\n\t\t\t\tif ( 'proportion' === $progress_style ) {\n\t\t\t\t\t$this->form_footer_progress_status_proportion_html();\n\t\t\t\t} else {\n\t\t\t\t\t$this->form_footer_progress_status_percentage_html();\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<div class=\"wpforms-conversational-form-footer-progress-bar\">\n\t\t\t\t<div class=\"wpforms-conversational-form-footer-progress-completed\"></div>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "private function initImportBookmarksForm()\n\t{\n\t\tglobal $lng, $ilCtrl, $ilUser;\n\t\t\n\t\tif (!$this->tree->isInTree($this->id))\n\t\t{\n\t\t\t$this->ctrl->setParameter($this, 'bmf_id', '');\n\t\t\t$this->ctrl->redirect($this);\n\t\t}\n\n\t\tinclude_once 'Services/Form/classes/class.ilPropertyFormGUI.php';\n\t\t$form = new ilPropertyFormGUI();\n\t\t$form->setTopAnchor(\"bookmark_top\");\n\t\t$form->setTitle($lng->txt(\"bkm_import\"));\n\t\t\n\t\t$fi = new ilFileInputGUI($lng->txt(\"file_add\"), \"bkmfile\");\n\t\t$fi->setRequired(true);\n\t\t$form->addItem($fi);\n\n\t\t$form->addCommandButton(\"importFile\", $lng->txt('import'));\n\t\t$form->addCommandButton('cancel', $lng->txt('cancel'));\n\t\t\n\t\treturn $form;\n\t}", "public function __construct()\n {\n $this->foregroundColors[ self::BLACK_NAME ] = self::BLACK_FOREGROUND_COLOR;\n $this->foregroundColors[ self::DARK_GRAY_NAME ] = self::DARK_GRAY_FOREGROUND_COLOR;\n $this->foregroundColors[ self::BLUE_NAME ] = self::BLUE_FOREGROUND_COLOR;\n $this->foregroundColors[ self::LIGHT_BLUE_NAME ] = self::LIGHT_BLUE_FOREGROUND_COLOR;\n $this->foregroundColors[ self::GREEN_NAME ] = self::GREEN_FOREGROUND_COLOR;\n $this->foregroundColors[ self::LIGHT_GREEN_NAME ] = self::LIGHT_GREEN_FOREGROUND_COLOR;\n $this->foregroundColors[ self::CYAN_NAME ] = self::CYAN_FOREGROUND_COLOR;\n $this->foregroundColors[ self::LIGHT_CYAN_NAME ] = self::LIGHT_CYAN_FOREGROUND_COLOR;\n $this->foregroundColors[ self::RED_NAME ] = self::RED_FOREGROUND_COLOR;\n $this->foregroundColors[ self::LIGHT_RED_NAME ] = self::LIGHT_RED_FOREGROUND_COLOR;\n $this->foregroundColors[ self::PURPLE_NAME ] = self::PURPLE_FOREGROUND_COLOR;\n $this->foregroundColors[ self::LIGHT_PURPLE_NAME ] = self::LIGHT_PURPLE_FOREGROUND_COLOR;\n $this->foregroundColors[ self::BROWN_NAME ] = self::BROWN_FOREGROUND_COLOR;\n $this->foregroundColors[ self::YELLOW_NAME ] = self::YELLOW_FOREGROUND_COLOR;\n $this->foregroundColors[ self::LIGHT_GRAY_NAME ] = self::LIGHT_GRAY_FOREGROUND_COLOR;\n $this->foregroundColors[ self::WHITE_NAME ] = self::WHITE_FOREGROUND_COLOR;\n\n $this->backgroundColors[ self::BLACK_NAME ] = self::BLACK_BACKGROUND_COLOR;\n $this->backgroundColors[ self::RED_NAME ] = self::RED_BACKGROUND_COLOR;\n $this->backgroundColors[ self::GREEN_NAME ] = self::GREEN_BACKGROUND_COLOR;\n $this->backgroundColors[ self::YELLOW_NAME ] = self::YELLOW_BACKGROUND_COLOR;\n $this->backgroundColors[ self::BLUE_NAME ] = self::BLUE_BACKGROUND_COLOR;\n $this->backgroundColors[ self::MAGENTA_NAME ] = self::MAGENTA_BACKGROUND_COLOR;\n $this->backgroundColors[ self::CYAN_NAME ] = self::CYAN_BACKGROUND_COLOR;\n $this->backgroundColors[ self::LIGHT_GRAY_NAME ] = self::LIGHT_GRAY_BACKGROUND_COLOR;\n }", "function book_form($piecemakerId='') \n\t{\n\t\tif($piecemakerId == '') // default values\n\t\t{ \n\t\t\t// MAIN\n $piecemaker['Width'] = \"900\";\n\t\t\t$piecemaker['Height'] = \"360\";\n\t\t\t$piecemaker['LoaderColor'] = \"0x333333\";\n\t\t\t$piecemaker['InnerSideColor'] = \"0x222222\";\n\t\t\t$piecemaker['Autoplay'] = \"10\";\n\t\t\t$piecemaker['FieldOfView'] = \"45\";\n\t\t\t\n\t\t\t// SHADOWS\n\t\t\t$piecemaker['SideShadowAlpha'] = \"0.8\";\n\t\t\t$piecemaker['DropShadowAlpha'] = \"0.7\";\n\t\t\t$piecemaker['DropShadowDistance'] = \"25\";\n\t\t\t$piecemaker['DropShadowScale'] = \"0.95\";\n\t\t\t$piecemaker['DropShadowBlurX'] = \"40\";\n\t\t\t$piecemaker['DropShadowBlurY'] = \"4\";\n\t\t\t\n\t\t\t// MENU\n\t\t\t$piecemaker['MenuDistanceX'] = \"20\";\n\t\t\t$piecemaker['MenuDistanceY'] = \"50\";\n\t\t\t$piecemaker['MenuColor1'] = \"0x999999\";\n\t\t\t$piecemaker['MenuColor2'] = \"0x333333\";\n\t\t\t$piecemaker['MenuColor3'] = \"0xFFFFFF\";\n\t\t\t\n\t\t\t// CONTROLS\n\t\t\t$piecemaker['ControlSize'] = \"100\";\n\t\t\t$piecemaker['ControlDistance'] = \"20\";\n\t\t\t$piecemaker['ControlColor1'] = \"0x222222\";\n\t\t\t$piecemaker['ControlColor2'] = \"0xFFFFFF\";\n\t\t\t$piecemaker['ControlAlpha'] = \"0.8\";\n $piecemaker['ControlAlphaOver'] = \"0.95\";\n $piecemaker['ControlsX'] = \"450\";\n $piecemaker['ControlsY'] = \"280\";\n $piecemaker['ControlsAlign'] = \"center\";\n\n\t\t\t// TOOLTIPS\n $piecemaker['TooltipHeight'] = \"31\";\n $piecemaker['TooltipColor'] = \"0x222222\";\n\t\t\t$piecemaker['TooltipTextY'] = \"5\";\n\t\t\t$piecemaker['TooltipTextStyle'] = \"P-Italic\";\n\t\t\t$piecemaker['TooltipTextColor'] = \"0xFFFFFF\";\n\t\t\t$piecemaker['TooltipMarginLeft'] = \"5\";\n\t\t\t$piecemaker['TooltipMarginRight'] = \"7\";\n\t\t\t$piecemaker['TooltipTextSharpness'] = \"50\";\n\t\t\t$piecemaker['TooltipTextThickness'] = \"-100\";\n\n\t\t\t// INFO\n\t\t\t$piecemaker['InfoWidth'] = \"400\";\n\t\t\t$piecemaker['InfoBackground'] = \"0xFFFFFF\";\n\t\t\t$piecemaker['InfoBackgroundAlpha'] = \"0.95\";\n\t\t\t$piecemaker['InfoMargin'] = \"15\";\n\t\t\t$piecemaker['InfoSharpness'] = \"0\";\n\t\t\t$piecemaker['InfoThickness'] = \"0\";\n\n\t\t\t// OTHER\n\t\t\t$piecemaker['name'] = \"Piecemaker 2\";\n $piecemaker['button'] = \"Add Piecemaker\";\n $piecemaker['title'] = \"Add Piecemaker\";\n $piecemaker['action'] = \"addbook\";\n $piecemaker['id'] = \"0\";\n } else { // if the piecemaker is edited, exists\n\t\t\t\tglobal $wpdb;\n\t\t\t\t$piecemaker_xml = $this->get_xml($piecemakerId);\n\t\t\t\t$sql = \"select `name` from `\".$this->table_name.\"` where `id` = '\".$piecemakerId.\"'\";\n\t\t\t\n\t\t\t\t$piecemaker['Width'] = $piecemaker_xml->Settings->attributes()->ImageWidth;\n\t\t\t\t$piecemaker['Height'] = $piecemaker_xml->Settings->attributes()->ImageHeight;\n\t\t\t\t$piecemaker['LoaderColor'] = $piecemaker_xml->Settings->attributes()->LoaderColor;\n\t\t\t\t$piecemaker['InnerSideColor'] = $piecemaker_xml->Settings->attributes()->InnerSideColor;\n\t\t\t\t$piecemaker['Autoplay'] = $piecemaker_xml->Settings->attributes()->Autoplay;\n\t\t\t\t$piecemaker['FieldOfView'] = $piecemaker_xml->Settings->attributes()->FieldOfView;\n\n\t\t\t\t// SHADOWS\n\t\t\t\t$piecemaker['SideShadowAlpha'] = $piecemaker_xml->Settings->attributes()->SideShadowAlpha;\n\t\t\t\t$piecemaker['DropShadowAlpha'] = $piecemaker_xml->Settings->attributes()->DropShadowAlpha;\n\t\t\t\t$piecemaker['DropShadowDistance'] = $piecemaker_xml->Settings->attributes()->DropShadowDistance;\n\t\t\t\t$piecemaker['DropShadowScale'] = $piecemaker_xml->Settings->attributes()->DropShadowScale;\n\t\t\t\t$piecemaker['DropShadowBlurX'] = $piecemaker_xml->Settings->attributes()->DropShadowBlurX;\n\t\t\t\t$piecemaker['DropShadowBlurY'] = $piecemaker_xml->Settings->attributes()->DropShadowBlurY;\n\n\t\t\t\t// MENU\n\t\t\t\t$piecemaker['MenuDistanceX'] = $piecemaker_xml->Settings->attributes()->MenuDistanceX;\n\t\t\t\t$piecemaker['MenuDistanceY'] = $piecemaker_xml->Settings->attributes()->MenuDistanceY;\n\t\t\t\t$piecemaker['MenuColor1'] = $piecemaker_xml->Settings->attributes()->MenuColor1;\n\t\t\t\t$piecemaker['MenuColor2'] = $piecemaker_xml->Settings->attributes()->MenuColor2;\n\t\t\t\t$piecemaker['MenuColor3'] = $piecemaker_xml->Settings->attributes()->MenuColor3;\n\n\t\t\t\t// CONTROLS\n\t\t\t\t$piecemaker['ControlSize'] = $piecemaker_xml->Settings->attributes()->ControlSize;\n\t\t\t\t$piecemaker['ControlDistance'] = $piecemaker_xml->Settings->attributes()->ControlDistance;\n\t\t\t\t$piecemaker['ControlColor1'] = $piecemaker_xml->Settings->attributes()->ControlColor1;\n\t\t\t\t$piecemaker['ControlColor2'] = $piecemaker_xml->Settings->attributes()->ControlColor2;\n\t\t\t\t$piecemaker['ControlAlpha'] = $piecemaker_xml->Settings->attributes()->ControlAlpha;\n\t $piecemaker['ControlAlphaOver'] = $piecemaker_xml->Settings->attributes()->ControlAlphaOver;\n\t $piecemaker['ControlsX'] = $piecemaker_xml->Settings->attributes()->ControlsX;\n\t $piecemaker['ControlsY'] = $piecemaker_xml->Settings->attributes()->ControlsY;\n\t $piecemaker['ControlsAlign'] = $piecemaker_xml->Settings->attributes()->ControlsAlign;\n\n\t\t\t\t// TOOLTIPS\n\t $piecemaker['TooltipHeight'] = $piecemaker_xml->Settings->attributes()->TooltipHeight;\n\t $piecemaker['TooltipColor'] = $piecemaker_xml->Settings->attributes()->TooltipColor;\n\t\t\t\t$piecemaker['TooltipTextY'] = $piecemaker_xml->Settings->attributes()->TooltipTextY;\n\t\t\t\t$piecemaker['TooltipTextStyle'] = $piecemaker_xml->Settings->attributes()->TooltipTextStyle;\n\t\t\t\t$piecemaker['TooltipTextColor'] = $piecemaker_xml->Settings->attributes()->TooltipTextColor;\n\t\t\t\t$piecemaker['TooltipMarginLeft'] = $piecemaker_xml->Settings->attributes()->TooltipMarginLeft;\n\t\t\t\t$piecemaker['TooltipMarginRight'] = $piecemaker_xml->Settings->attributes()->TooltipMarginRight;\n\t\t\t\t$piecemaker['TooltipTextSharpness'] = $piecemaker_xml->Settings->attributes()->TooltipTextSharpness;\n\t\t\t\t$piecemaker['TooltipTextThickness'] = $piecemaker_xml->Settings->attributes()->TooltipTextThickness;\n\n\t\t\t\t// INFO\n\t\t\t\t$piecemaker['InfoWidth'] = $piecemaker_xml->Settings->attributes()->InfoWidth;\n\t\t\t\t$piecemaker['InfoBackground'] = $piecemaker_xml->Settings->attributes()->InfoBackground;\n\t\t\t\t$piecemaker['InfoBackgroundAlpha'] = $piecemaker_xml->Settings->attributes()->InforBackgroundAlpha;\n\t\t\t\t$piecemaker['InfoMargin'] = $piecemaker_xml->Settings->attributes()->InfoMargin;\n\t\t\t\t$piecemaker['InfoSharpness'] = $piecemaker_xml->Settings->attributes()->InfoSharpness;\n\t\t\t\t$piecemaker['InfoThickness'] = $piecemaker_xml->Settings->attributes()->InfoThickness;\n\n\t\t\t\t// OTHER\n\t\t\t\t$piecemaker['name'] = $wpdb->get_var($sql, 0, 0);\n\t\t\t\t$piecemaker['button'] = \"Save Changes\";\n\t\t\t\t$piecemaker['title'] = \"Piecemaker properties\";\n\t\t\t\t$piecemaker['action'] = \"editbook\";\n\t\t\t\t$piecemaker['id'] = $piecemakerId;\n\t\t\t\n\t\t\t}\n ?>\n <br />\n\t\t\t<div class=\"wrap\">\n\t\t\t\n\t\t\t\t<div id=\"ajax-response\"></div>\t<!-- book form -->\n\t\t\t\t<form name=\"addpiecemaker\" id=\"addpiecemaker\" method=\"post\" action=\"\" enctype=\"multipart/form-data\" class=\"add:the-list: validate\">\n\t\t\t\t\t<input name=\"action\" value=\"<?php echo $piecemaker['action'];?>\" type=\"hidden\">\n\t\t\t\t\t<input name=\"piecemakerId\" value=\"<?php echo $piecemaker['id'];?>\" type=\"hidden\">\n\n\t\t\t\t\t<script type=\"text/javascript\" src=\"http://code.jquery.com/jquery-1.4.2.min.js\"></script>\n\t\t\t\t\t<script src=\"<?php echo $this->path_to_plugin; ?>js/tabs.js\" type=\"text/javascript\"></script>\n\n\t\t\t\t\t<div id=\"options_piecemaker\">\n\t\t\t\t\t\t\t<ul class=\"tabs\">\n\t\t\t\t\t\t\t\t<li><a href=\"#tab1\" class=\"tab\"><span>Piecemaker</span></a></li>\n\t\t\t\t\t\t\t\t<li><a href=\"#tab2\" class=\"tab\"><span>Shadows</span></a></li>\n\t\t\t\t\t\t\t\t<li><a href=\"#tab3\" class=\"tab\"><span>Menu</span></a></li>\n\t\t\t\t\t\t\t\t<li><a href=\"#tab4\" class=\"tab\"><span>Controls</span></a></li>\n\t\t\t\t\t\t\t\t<li><a href=\"#tab5\" class=\"tab\"><span>Tooltips</span></a></li>\n\t\t\t\t\t\t\t\t<li><a href=\"#tab6\" class=\"tab\"><span>Info</span></a></li>\n\t\t\t\t\t\t </ul> \n\t\t\t\t\t\t <div class=\"blue\"></div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"tab_container\">\n\t\t\t\t\t\t<div id=\"tab1\" class=\"tab_content\">\n\t\t\t\t\t\t\t<table class=\"form-table\">\n\t\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t\t\t<th class=\"table_heading\" colspan=\"3\"><h3>Piecemaker</h3></th>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"Width\">Width</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"Width\" id=\"Width\" value=\"<?php echo $piecemaker['Width'];?>\" size=\"20\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Width of every Image</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"Height\">Height</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"Height\" id=\"Height\" value=\"<?php echo $piecemaker['Height'];?>\" size=\"20\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Height of every Image</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"LoaderColor\">Loader Color</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"LoaderColor\" id=\"LoaderColor\" value=\"<?php echo $piecemaker['LoaderColor'];?>\" size=\"20\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Color of the cubes before the first image appears, also the color of the back sides of the cube, which become visible at some transition types</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"InnerSideColor\">Inner Side Color</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"InnerSideColor\" id=\"InnerSideColor\" value=\"<?php echo $piecemaker['InnerSideColor'];?>\" size=\"20\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Color of the inner sides of the cube when sliced </p></td>\n\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"Autoplay\">Autoplay</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"Autoplay\" id=\"Autoplay\" value=\"<?php echo $piecemaker['Autoplay'];?>\" size=\"20\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Number of seconds from one transition to another, if not stopped. Set to 0 to disable autoplay</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"> <label for=\"FieldOfView\">Field Of View</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"FieldOfView\" id=\"FieldOfView\" value=\"<?php echo $piecemaker['FieldOfView'];?>\" size=\"20\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p><a href=\"http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/geom/PerspectiveProjection.html#fieldOfView\">see this</a></p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div id=\"tab2\" class=\"tab_content\">\n\t\t\t\t\t\t\t<table class=\"form-table\" > \n\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t<th class=\"table_heading\" colspan=\"3\"><h3>Shadows</h3></th>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under parent\"><label for=\"SideShadowAlpha\">Side Shadow Alpha</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"SideShadowAlpha\" id=\"SideShadowAlpha\" value=\"<?php echo $piecemaker['SideShadowAlpha'];?>\" size=\"20\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Sides get darker when moved away from the front. This is the\n\t\t\t\t\t\t\t\t\t\t\t\tdegree of darkness - 0 == no change, 1 == 100% black</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under parent\"><label for=\"DropShadowAlpha\">Drop Shadow Alpha</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"DropShadowAlpha\" id=\"DropShadowAlpha\" value=\"<?php echo $piecemaker['DropShadowAlpha'];?>\" size=\"20\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Alpha of the drop shadow - 0 == no shadow, 1 == opaque</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under parent\"><label for=\"DropShadowDistance\">Drop Shadow Distance</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"DropShadowDistance\" id=\"DropShadowDistance\" value=\"<?php echo $piecemaker['DropShadowDistance'];?>\" size=\"20\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Distance of the shadow from the bottom of the image</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"DropShadowScale\">Drop Shadow Scale</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"DropShadowScale\" id=\"DropShadowScale\" value=\"<?php echo $piecemaker['DropShadowScale'];?>\" size=\"20\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>As the shadow is blurred, it appears wider that the actual image, when not resized. Thus it's a good idea to make it slightly smaller. - 1 would be no resizing at all</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"DropShadowBlurX\">Drop Shadow BlurX</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"DropShadowBlurX\" id=\"DropShadowBlurX\" value=\"<?php echo $piecemaker['DropShadowBlurX'];?>\" size=\"20\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Blur of the drop shadow on the x-axis</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"DropShadowBlurY\">Drop Shadow Blur Y</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"DropShadowBlurY\" id=\"DropShadowBlurY\" value=\"<?php echo $piecemaker['DropShadowBlurY'];?>\" size=\"20\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Blur of the drop shadow on the y-axis</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t</div>\n\n\n\t\t\t\t\t\t<div id=\"tab3\" class=\"tab_content\">\n\t\t\t\t\t\t\t<table class=\"form-table\" > \n\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t<th class=\"table_heading\" colspan=\"3\"><h3>Menu</h3></th>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"MenuDistanceX\">Menu Distance X</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"MenuDistanceX\" id=\"MenuDistanceX\" value=\"<?php echo $piecemaker['MenuDistanceX'];?>\" size=\"20\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Distance between two menu items (from center to center)</p></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"> <label for=\"MenuDistanceY\">Menu Distance Y</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"MenuDistanceY\" id=\"MenuDistanceY\" value=\"<?php echo $piecemaker['MenuDistanceY'];?>\" size=\"20\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>SDistance of the menu from the bottom of the image</p></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"MenuColor1\">Menu Color 1</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"MenuColor1\" id=\"MenuColor1\" value=\"<?php echo $piecemaker['MenuColor1'];?>\" size=\"20\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Color of an inactive menu item</p></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"MenuColor2\">Menu Color 2</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"MenuColor2\" id=\"MenuColor2\" value=\"<?php echo $piecemaker['MenuColor2'];?>\" size=\"20\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Color of an active menu item</p></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"MenuColor3\">Menu Color 3</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"MenuColor3\" id=\"MenuColor3\" value=\"<?php echo $piecemaker['MenuColor3'];?>\" size=\"20\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Color of the inner circle of an active menu item. Should equal the background color of the whole thing</p></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t</table> \n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div id=\"tab4\" class=\"tab_content\">\n\t\t\t\t\t\t\t<table class=\"form-table\"> \n\t\t\t\t\t\t\t\t<tbody>\n\n\t\t\t\t\t\t\t\t\t\t<th class=\"table_heading\" colspan=\"3\"><h3>Controls</h3></th>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"ControlSize\">Control Size</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"ControlSize\" id=\"ControlSize\" value=\"<?php echo $piecemaker['ControlSize'];?>\" size=\"35\" type=\"text\"></td>\n\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Size of the controls, which appear on rollover (play, stop, info, link)</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"ControlDistance\">Control Distance</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"ControlDistance\" id=\"ControlDistance\" value=\"<?php echo $piecemaker['ControlDistance'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Distance between the controls (from the borders)</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"ControlColor1\">Control Color 1</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"ControlColor1\" id=\"ControlColor1\" value=\"<?php echo $piecemaker['ControlColor1'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Background color of the controls</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"ControlColor2\">Control Color 2</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"ControlColor2\" id=\"ControlColor2\" value=\"<?php echo $piecemaker['ControlColor2'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Font color of the controls</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"ControlAlpha\">Control Alpha</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"ControlAlpha\" id=\"ControlAlpha\" value=\"<?php echo $piecemaker['ControlAlpha'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Alpha of a control, when mouse is not over</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"ControlAlphaOver\">Control Alpha Over</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"ControlAlphaOver\" id=\"ControlAlphaOver\" value=\"<?php echo $piecemaker['ControlAlphaOver'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Alpha of a control, when mouse is over</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"ControlsX\">Controls X</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"ControlsX\" id=\"ControlsX\" value=\"<?php echo $piecemaker['ControlsX'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>X-position of the point, which aligns the controls (measured from [0,0] of the image)</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"ControlsY\">Controls Y</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"ControlsY\" id=\"ControlsY\" value=\"<?php echo $piecemaker['ControlsY'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Y-position of the point, which aligns the controls (measured from [0,0] of the image)</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"ControlsAlign\">Controls Align</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><!--<input name=\"ControlsAlign\" id=\"ControlsAlign\" value=\"<?php echo $piecemaker['ControlsAlign'];?>\" size=\"35\" type=\"text\">-->\n\t\t\t\t\t\t\t\t\t\t\t\t\t<select name=\"ControlsAlign\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<?php if($piecemaker['ControlsAlign'] == \"center\") {?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"center\" selected=\"yes\">center</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"left\">left</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"right\">right</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<?php } elseif($piecemaker['ControlsAlign'] == \"left\") {?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"center\">center</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"left\" selected=\"yes\">left</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"right\">right</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<?php } elseif($piecemaker['ControlsAlign'] == \"right\") {?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"center\">center</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"left\">left</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"right\" selected=\"yes\">right</option>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t\t\t\t\t\t\t\t</select></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Type of alignment from the point [controlsX, controlsY] - can be \"center\", \"left\" or \"right\"</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t</table> \n\n\t\t\t\t\t\t</div>\n\n\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div id=\"tab5\" class=\"tab_content\">\n\t\t\t\t\t\t\t<table class=\"form-table\" > \n\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t<th class=\"table_heading\" colspan=\"3\"><h3>Tooltips</h3></th>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"TooltipHeight\">Tooltip Height</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"TooltipHeight\" id=\"TooltipHeight\" value=\"<?php echo $piecemaker['TooltipHeight'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Height of the tooltip surface in the menu</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"TooltipColor\">Tooltip Color</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"TooltipColor\" id=\"TooltipColor\" value=\"<?php echo $piecemaker['TooltipColor'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Color of the tooltip surface in the menu</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"TooltipTextY\">Tooltip Text Y</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"TooltipTextY\" id=\"TooltipTextY\" value=\"<?php echo $piecemaker['TooltipTextY'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Color of the tooltip surface in the menu</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"TooltipTextStyle\">Tooltip Text Style</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"TooltipTextStyle\" id=\"TooltipTextStyle\" value=\"<?php echo $piecemaker['TooltipTextStyle'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>The style of the tooltip text, specified in the CSS file</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"TooltipTextColor\">Tooltip Text Color</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"TooltipTextColor\" id=\"TooltipTextColor\" value=\"<?php echo $piecemaker['TooltipTextColor'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Color of the tooltip text</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"TooltipMarginLeft\">Tooltip Margin Left</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"TooltipMarginLeft\" id=\"TooltipMarginLeft\" value=\"<?php echo $piecemaker['TooltipMarginLeft'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Margin of the text to the left end of the tooltip</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"TooltipMarginRight\">Tooltip Margin Right</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"TooltipMarginRight\" id=\"TooltipMarginRight\" value=\"<?php echo $piecemaker['TooltipMarginRight'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Margin of the text to the right end of the tooltip</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"TooltipTextSharpness\">Tooltip Text Sharpness</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"TooltipTextSharpness\" id=\"TooltipTextSharpness\" value=\"<?php echo $piecemaker['TooltipTextSharpness'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Sharpness of the tooltip text (-400 to 400) - <a href=\"http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/text/TextField.html#sharpness\">read this</a></p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"TooltipTextThickness\">Tooltip Text Thickness</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"TooltipTextThickness\" id=\"TooltipTextThickness\" value=\"<?php echo $piecemaker['TooltipTextThickness'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Thickness of the tooltip text (-400 to 400) - <a href=\"http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/text/TextField.html#thickness\">read this</a></p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t</table> \n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div id=\"tab6\" class=\"tab_content\">\n\t\t\t\t\t\t\t\t<table class=\"form-table\"> \n\t\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t\t<th class=\"table_heading\" colspan=\"3\"><h3>Info</h3></th>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"InfoWidth\">Info Width</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"InfoWidth\" id=\"InfoWidth\" value=\"<?php echo $piecemaker['InfoWidth'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>The width of the info text field</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"InfoBackground\">Info Background</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"InfoBackground\" id=\"InfoBackground\" value=\"<?php echo $piecemaker['InfoBackground'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>The background color of the info text field</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"InfoBackgroundAlpha\">Info Background Alpha</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"InfoBackgroundAlpha\" id=\"InfoBackgroundAlpha\" value=\"<?php echo $piecemaker['InfoBackgroundAlpha'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>The alpha of the background of the info text, the image shines through, when smaller than 1</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"InfoMargin\">Info Margin</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"InfoMargin\" id=\"InfoMargin\" value=\"<?php echo $piecemaker['InfoMargin'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>The margin of the text field in the info section to all sides.</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"InfoSharpness\">Info Sharpness</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"InfoSharpness\" id=\"InfoSharpness\" value=\"<?php echo $piecemaker['InfoSharpness'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Sharpness of the info text (see above)</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"under\"><label for=\"InfoThickness\">Info Thickness</label></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"middle\"><input name=\"InfoThickness\" id=\"InfoThickness\" value=\"<?php echo $piecemaker['InfoThickness'];?>\" size=\"35\" type=\"text\"></td>\n\t\t\t\t\t\t\t\t\t\t\t\t<td class=\"desc\"><p>Thickness of the info text (see above)</p></td>\n\t\t\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t\t</table>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t</div><!-- .tab_container -->\n\n\t\t\t\t\t<br />\n\t\t\t\t\t\t<table>\n\t\t\t\t\t\t\t<input class=\"button-primary\" name=\"submit\" value=\"<?php echo $piecemaker['button'];?>\" type=\"submit\">\n\t\t\t\t\t\t\t\t <?php\n\t\t\t\t\t\t\t\t\t if($piecemakerId !== '') echo \"<a href=\\\"\\\" name=\\\"do\\\" class=\\\"button-primary\\\" value=\\\"Back\\\" type=\\\"submit\\\" title=\\\"Back\\\">Back</a>\";\n\t\t\t\t\t\t\t\t ?>\n\t\t\t\t\t\t</table>\n\n\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t<?php\n\t}", "protected function definition_inner($mform) {\n global $PAGE;\n $PAGE->requires->jquery();\n $PAGE->requires->jquery_plugin('ui');\n $PAGE->requires->jquery_plugin('ui-css');\n\n $PAGE->requires->strings_for_js(array('itemsettingserror', 'editquestiontext', 'additemsettings',\n 'correct', 'incorrect'), 'qtype_gapfill');\n $PAGE->requires->js('/question/type/gapfill/questionedit.js');\n $mform->addElement('hidden', 'reload', 1);\n $mform->setType('reload', PARAM_RAW);\n\n $mform->removeelement('questiontext');\n /*for storing the json containing the settings data */\n $mform->addElement('hidden', 'itemsettings', '', array('size' => '80'));\n $mform->setType('itemsettings', PARAM_RAW);\n\n /* popup for entering feedback for individual words */\n $mform->addElement('html', '<div id=\"id_itemsettings_popup\" title=\"' . get_string('additemsettings', 'qtype_gapfill')\n . '\" style=\"display:none;background-color:lightgrey\" >');\n $mform->addElement('editor', 'correct', '', array('size' => 70, 'rows' => 4), $this->editoroptions);\n $mform->addElement('editor', 'incorrect', '', array('size' => 70, 'rows' => 4), $this->editoroptions);\n $mform->addElement('html', '</div>');\n\n /* presented for clicking on the gaps once they have been given numberical ids */\n $mform->addElement('html',\n '<div class=\"gapfill\" id=\"id_itemsettings_canvas\" style=\"display:none;background-color:lightgrey\" ></div>');\n\n $mform->addElement('html', '<div id=\"questiontext\" >');\n $mform->addElement('editor', 'questiontext', get_string('questiontext', 'question'), array('rows' => 10),\n $this->editoroptions);\n $mform->addElement('html', '</div>');\n\n $mform->setType('questiontext', PARAM_RAW);\n $mform->addHelpButton('questiontext', 'questiontext', 'qtype_gapfill');\n\n $mform->addElement('button', 'itemsettings_button', get_string('itemsettingsbutton', 'qtype_gapfill'));\n $mform->addHelpButton('itemsettings_button', 'itemsettings_button', 'qtype_gapfill');\n\n $mform->removeelement('generalfeedback');\n\n // Default mark will be set to 1 * number of fields.\n $mform->removeelement('defaultmark');\n\n $mform->addElement('editor', 'wronganswers', get_string('wronganswers', 'qtype_gapfill'),\n array('size' => 70, 'rows' => 1), $this->editoroptions);\n $mform->addHelpButton('wronganswers', 'wronganswers', 'qtype_gapfill');\n\n /* Only allow plain text in for the comma delimited set of wrong answer values\n * wrong answers really should be a set of zero marked ordinary answers in the answers\n * table.\n */\n $mform->setType('wronganswers', PARAM_TEXT);\n\n $mform->addElement('editor', 'generalfeedback', get_string('generalfeedback', 'question')\n , array('rows' => 10), $this->editoroptions);\n\n $mform->setType('generalfeedback', PARAM_RAW);\n $mform->addHelpButton('generalfeedback', 'generalfeedback', 'question');\n $mform->addElement('header', 'feedbackheader', get_string('moreoptions', 'qtype_gapfill'));\n\n // The delimiting characters around fields.\n $config = get_config('qtype_gapfill');\n /* turn config->delimitchars into an array) */\n $delimitchars = explode(\",\", $config->delimitchars);\n /* copies the values into the keys */\n $delimitchars = array_combine($delimitchars, $delimitchars);\n /* strip any spaces from keys. This is about backward compatibility with old code\n * and avoiding having to expand the size of the delimitchar column from its current\n * 2. The value in the drop down looks better with a gap between the delimitchars, but\n * a gap in the key will break the insert into the question_gapfill table\n */\n foreach ($delimitchars as $key => $value) {\n $key2 = str_replace(' ', '', $key);\n $delimitchars2[$key2] = $value;\n }\n $mform->addElement('select', 'delimitchars', get_string('delimitchars', 'qtype_gapfill'), $delimitchars2);\n $mform->addHelpButton('delimitchars', 'delimitchars', 'qtype_gapfill');\n\n $answerdisplaytypes = array(\"dragdrop\" => get_string('displaydragdrop', 'qtype_gapfill'),\n \"gapfill\" => get_string('displaygapfill', 'qtype_gapfill'),\n \"dropdown\" => get_string('displaydropdown', 'qtype_gapfill'));\n\n $mform->addElement('select', 'answerdisplay', get_string('answerdisplay', 'qtype_gapfill'), $answerdisplaytypes);\n $mform->addHelpButton('answerdisplay', 'answerdisplay', 'qtype_gapfill');\n\n /* sets all gaps to the size of the largest gap, avoids giving clues to the correct answer */\n $mform->addElement('advcheckbox', 'fixedgapsize', get_string('fixedgapsize', 'qtype_gapfill'));\n $mform->addHelpButton('fixedgapsize', 'fixedgapsize', 'qtype_gapfill');\n\n /* put draggable answer options after the text. They don't have to be dragged as far, handy on small screens */\n $mform->addElement('advcheckbox', 'optionsaftertext', get_string('optionsaftertext', 'qtype_gapfill'));\n $mform->setDefault('optionsaftertext', $config->optionsaftertext);\n $mform->addHelpButton('optionsaftertext', 'optionsaftertext', 'qtype_gapfill');\n\n /* use plain string matching instead of regular expressions */\n $mform->addElement('advcheckbox', 'disableregex', get_string('disableregex', 'qtype_gapfill'));\n $mform->addHelpButton('disableregex', 'disableregex', 'qtype_gapfill');\n $mform->setDefault('disableregex', $config->disableregex);\n $mform->setAdvanced('disableregex');\n\n $mform->addElement('advcheckbox', 'letterhints', get_string('letterhints', 'qtype_gapfill'));\n $mform->setDefault('letterhints', $config->letterhints);\n $mform->addHelpButton('letterhints', 'letterhints', 'qtype_gapfill');\n\n /* Discards duplicates before processing answers, useful for tables with gaps like [cat|dog][cat|dog] */\n $mform->addElement('advcheckbox', 'noduplicates', get_string('noduplicates', 'qtype_gapfill'));\n $mform->addHelpButton('noduplicates', 'noduplicates', 'qtype_gapfill');\n $mform->setAdvanced('noduplicates');\n\n /* Makes marking case sensitive so Cat is not the same as cat */\n $mform->addElement('advcheckbox', 'casesensitive', get_string('casesensitive', 'qtype_gapfill'));\n $mform->setDefault('casesensitive', $config->casesensitive);\n $mform->addHelpButton('casesensitive', 'casesensitive', 'qtype_gapfill');\n $mform->setAdvanced('casesensitive');\n\n // To add combined feedback (correct, partial and incorrect).\n $this->add_combined_feedback_fields(true);\n\n // Adds hinting features.\n $this->add_interactive_settings(true, true);\n if ($config->letterhints && $config->addhinttext) {\n $this->_form->getElement('hint[0]')->setValue(array('text' => get_string('letterhint0', 'qtype_gapfill')));\n $this->_form->getElement('hint[1]')->setValue(array('text' => get_string('letterhint1', 'qtype_gapfill')));\n }\n }", "protected function form()\n {\n $form = new Form(new Banner);\n\n $form->text('title', 'Title');\n $form->image('image', 'Image')->rules('required')->move('images/banners');\n $form->switch('status', 'Published')->default(1);\n\n $form->footer(function ($footer) {\n // disable `View` checkbox\n $footer->disableViewCheck();\n\n // disable `Continue editing` checkbox\n $footer->disableEditingCheck();\n\n // disable `Continue Creating` checkbox\n $footer->disableCreatingCheck();\n\n });\n return $form;\n }", "protected function form()\n {\n $form = new Form(new WithdrawDepositOrder);\n\n $form->number('apply_amount', __('Apply amount'));\n $form->number('transfer_amount', __('Transfer amount'));\n $form->number('master_id', __('Master id'));\n $form->switch('status', __('Status'));\n $form->textarea('comment', __('Comment'));\n\n return $form;\n }", "public function getBankForm()\n {\n\n $config = array(\n 'kwota' => 999.99,\n 'opis' => 'Transaction description',\n 'crc' => '100020003000',\n 'wyn_url' => 'http://example.pl/examples/notificationBasic.php?transaction_confirmation',\n 'wyn_email' => 'shop@example.com',\n 'pow_url' => 'http://example.pl/examples/success.html',\n 'email' => 'customer@example.com',\n 'imie' => 'Jan',\n 'nazwisko' => 'Kowalski',\n );\n\n $form = $this->getBankSelectionForm($config, false, true);\n\n echo $form;\n }", "public function build(Form $form):Form\n {\n foreach ($this->classType->getProperties() as $property) {\n $this->add($form, $property);\n }\n \n return $form;\n }", "public function box()\n {\n echo \"<div style='height:54px;width:54px;background-color:{$this};color:{$this->black_or_white()};padding:3px;'>{$this}</div>\";\n }", "function drawStyle()\r\n\t{\r\n\t}", "function ShowBorder($exterior=true,$interior=true) {\n\t$this->pie_border = $exterior;\n\t$this->pie_interior_border = $interior;\n }", "function form($instance) {\n\n\t\t// Get stored preferences\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$title = isset( $instance['title'] ) ? esc_attr($instance['title']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$show_title_text = isset( $instance['show_title_text'] ) ? $instance['show_title_text'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$order = isset( $instance['order'] ) ? esc_attr($instance['order']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$size_from = isset( $instance['size_from'] ) ? esc_attr($instance['size_from']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$size_to = isset( $instance['size_to'] ) ? esc_attr($instance['size_to']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$max = isset( $instance['max'] ) ? esc_attr($instance['max']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$taxonomy = isset( $instance['taxonomy'] ) ? esc_attr($instance['taxonomy']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$color = isset( $instance['color'] ) ? esc_attr($instance['color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$color_span_from = isset( $instance['color_span_from'] ) ? esc_attr($instance['color_span_from']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$color_span_to = isset( $instance['color_span_to'] ) ? esc_attr($instance['color_span_to']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$letter_spacing = isset( $instance['letter_spacing'] ) ? esc_attr($instance['letter_spacing']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$word_spacing = isset( $instance['word_spacing'] ) ? esc_attr($instance['word_spacing']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$tag_spacing = isset( $instance['tag_spacing'] ) ? esc_attr($instance['tag_spacing']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$case = isset( $instance['case'] ) ? esc_attr($instance['case']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$minimum\t\t = isset( $instance['minimum'] ) ? esc_attr($instance['minimum']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$tags_list = isset( $instance['tags_list'] ) && is_array($instance['tags_list']) ? $instance['tags_list'] : array();\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$tags_list_type = isset( $instance['tags_list_type'] ) ? esc_attr($instance['tags_list_type']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$reverse = isset( $instance['reverse'] ) ? $instance['reverse'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$authors = isset( $instance['authors'] ) && is_array($instance['authors']) ? $instance['authors'] : array();\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$color_set = isset( $instance['color_set'] ) && is_array($instance['color_set']) ? $instance['color_set'] : array();\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$case_sensitive = isset( $instance['case_sensitive'] ) ? $instance['case_sensitive'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$debug \t\t\t\t= isset( $instance['debug'] ) ? $instance['debug'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$show_title = isset( $instance['show_title'] ) ? $instance['show_title'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_underline = isset( $instance['link_underline'] ) ? $instance['link_underline'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_bold = isset( $instance['link_bold'] ) ? $instance['link_bold'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_italic = isset( $instance['link_italic'] ) ? $instance['link_italic'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_bg_color = isset( $instance['link_bg_color'] ) ? esc_attr($instance['link_bg_color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_border_width = isset( $instance['link_border_width'] ) ? esc_attr($instance['link_border_width']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_border_style = isset( $instance['link_border_style'] ) ? $instance['link_border_style'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$link_border_color = isset( $instance['link_border_color'] ) ? esc_attr($instance['link_border_color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_underline = isset( $instance['hover_underline'] ) ? $instance['hover_underline'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_bold = isset( $instance['hover_bold'] ) ? $instance['hover_bold'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_italic = isset( $instance['hover_italic'] ) ? $instance['hover_italic'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_bg_color = isset( $instance['hover_bg_color'] ) ? esc_attr($instance['hover_bg_color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_color = isset( $instance['hover_color'] ) ? esc_attr($instance['hover_color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_border_width = isset( $instance['hover_border_width'] ) ? esc_attr($instance['hover_border_width']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_border_style = isset( $instance['hover_border_style'] ) ? $instance['hover_border_style'] : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$hover_border_color = isset( $instance['hover_border_color'] ) ? esc_attr($instance['hover_border_color']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$days_old \t\t\t= isset( $instance['days_old'] ) ? esc_attr($instance['days_old']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$line_height \t\t= isset( $instance['line_height'] ) ? esc_attr($instance['line_height']) : '' ;\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$separator \t\t\t= isset( $instance['separator'] ) ? esc_attr($instance['separator']) : '';\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$prefix \t\t\t= isset( $instance['prefix'] ) ? esc_attr($instance['prefix']) : '';\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$suffix \t\t\t= isset( $instance['suffix'] ) ? esc_attr($instance['suffix']) : '';\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$post_type = isset( $instance['post_type'] ) ? $instance['post_type'] : array('post');\n\n\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$configurations = get_option('utcw_saved_configs');\n\n\t\t$args = array(\n\t\t\t'public' => true\n\t\t);\n\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$available_post_types = get_post_types($args);\n\t\t/** @noinspection PhpUnusedLocalVariableInspection */\n\t\t$available_taxonomies = get_taxonomies();\n\n\t\t// Content of the widget settings form\n\t\trequire \"settings.php\";\n\t}", "protected function form()\n {\n $form = new Form(new LotteryCode());\n\n $form->text('code', __('Code'));\n $form->number('batch_num', __('Batch num'));\n $form->text('prizes_name', __('Prizes name'));\n $form->datetime('valid_period', __('Valid period'))->default(date('Y-m-d H:i:s'));\n $form->datetime('prizes_time', __('Prizes time'))->default(date('Y-m-d H:i:s'));\n $form->text('operator', __('Operator'));\n $form->switch('award_status', __('Award status'));\n\n return $form;\n }", "private function buildGitLabWForm(&$form) {\n $git_settings = $this->configFactory->get('simple_git.settings');\n\n $form['git_lab'] = [\n '#type' => 'fieldset',\n '#title' => $this->t('GitLab Web settings'),\n '#collapsible' => TRUE,\n '#collapsed' => FALSE,\n ];\n\n $form['git_lab']['git_lab_app_id'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitLab App Web Id'),\n '#description' => $this->t('GitLab App Web Id value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITLAB\n )['app_id'],\n ];\n\n $form['git_lab']['git_lab_app_secret'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitLab App Web Secret'),\n '#description' => $this->t('GitLab App Web Secret value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITLAB\n )['app_secret'],\n ];\n\n $form['git_lab']['git_lab_app_url_redirect'] = [\n '#type' => 'textfield',\n '#title' => $this->t('GitLab URL Web Redirect'),\n '#description' => $this->t('GitLab URL Web Redirect value'),\n '#default_value' => $git_settings->get(\n ModuleConstantInterface::GIT_TYPE_GITLAB\n )['app_url_redirect'],\n ];\n\n }", "public function __construct()\n\t{\n\t\t$this->setWidth('600px');\n\t\t$this->setHeight('250px');\n\t\tparent::__construct();\n\t}", "protected function form()\n {\n $form = new Form(new Boarding()); \n \n $form->select('pet_id',__('Pet Name'))->options(Pet::all()->pluck('name','id'))->rules('required');\n $form->select('reservation_id',__('Reservation'))->options(Reservation::all()->pluck('date','id'))->rules('required');\n $form->select('cage_id',__('Available Cages'))->options(Cage::get()->where(\"availability\",\"Available\")->pluck('id','id'))->rules('required');\n $form->datetime('end_date', __('End date'))->default(date('Y-m-d H:i:s'))->rules('required');\n \n return $form; \n }", "public function init()\n\t{\n\t\tparent::init();\n\t\t$this->addCssClass($this->options, 'progress');\n\t}", "public function __construct($color = \"green\", $size = '', $progress = 0, $indeterminate = false)\n {\n $this->color = $color;\n $this->size = $size;\n $this->progress = $progress;\n $this->indeterminate = $indeterminate;\n }", "protected function form()\n {\n $form = new Form(new Resources);\n\n $form->text('name', '名称')->rules('required',['required' => '请输入 配置项的名称']);\n\n $form->radio('type', '类型')->options(Resources::TYPE);\n\n $form->cropper('url','图片');\n\n $form->number('sort_num','排序');\n\n $form->textarea('memo','备注');\n\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`删除`按钮\n $tools->disableDelete();\n\n // 去掉`查看`按钮\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n\n return $form;\n }", "protected function createComponentDeletePrihozForm()\n {\n $form = new Nette\\Application\\UI\\Form;\n \n $form->addText('id_nemovitost')\n ->setAttribute('style', 'display:none');\n \n $form->addSubmit('send', 'Odeslat formulář')\n ->setAttribute('class', 'btn btn-primary');\n\n $form->onSuccess[] = $this->deletePrihozFormSucceeded;\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Carousel);\n\n $form->select('carousel_category_id', __('carousel::carousel.carousel_category_id'))\n ->options(CarouselCategory::all()->pluck('name', 'id'));\n $form->text('title', __('carousel::carousel.title'));\n $form->text('url', __('carousel::carousel.url'));\n $form->image('img_src', __('carousel::carousel.img_src'))\n ->removable()\n ->uniqueName()\n ->move('carousel');\n $form->text('alt', __('carousel::carousel.alt'));\n $form->textarea('remark', __('carousel::carousel.remark'));\n $form->select('status', __('carousel::carousel.status.label'))\n ->default(1)\n ->options(__('carousel::carousel.status.value'));\n $form->datetime('start_time', __('carousel::carousel.start_time'))\n ->default(date('Y-m-d H:i:s'));\n $form->datetime('end_time', __('carousel::carousel.end_time'))\n ->default(date('Y-m-d H:i:s'));\n\n return $form;\n }", "static function lengthForm (ViewRegistry $context) {\n $lengths=array(10,20,50,100,\"*\");\n\n $form=\"<form action=\\\"\\\" method=\\\"get\\\" id=\\\"perPage\\\" drawer=\\\"Per\\\"><p>\".l(\"Per page:\").\" <select name=\\\"length\\\">\";\n $optList=\"\";\n foreach ($lengths as $l) {\n $optList.=\"<option value=\\\"\".$l.\"\\\"\";\n if ( $l==$context->g(\"length\") ) $optList.=\" selected=\\\"selected\\\"\";\n $optList.=\">\".$l.\"</option>\";\n }\n //<option value=\"10\">10</option>\n $form.=$optList;\n $form.=\"</select> <input type=\\\"submit\\\" value=\\\"\".l(\"Apply\").\"\\\"/>\";\n $defineBase=\"<input type=\\\"hidden\\\" name=\\\"\";\n $bs=$context->g(\"base\");\n $defineBase.=$bs.\"\\\" value=\\\"\";\n if ( $bs == \"begin\" ) $defineBase.=$context->g(\"begin\");\n else if ( $bs == \"end\" ) $defineBase.=$context->g(\"end\");\n else throw new UsageException (\"Illegal value at \\\"base\\\" key :\".$bs.'!');\n $defineBase.=\"\\\"/>\";\n $form.=$defineBase.\"</p></form>\";\n return ($form);\n }", "public function form(){\n \t \tif($this->layoutWidgetInfo){\n \t\t$setting = json_decode($this->layoutWidgetInfo->setting, true);\n \t}\n\n \t//default option(type[text], cols[3-9], rows[1], label[$key], name[$key], value[$setting[$k]])\n \t//add option(class, id, stype, styleRow, required, placeholder, attr, [options, code])\n \t$settingForm = array(\n \t\t'layout_widget_id' \t=> array('type' => 'hidden', 'value' => $this->layoutWidgetInfo->layoutWidgetId),\n \t\t'widget_controller' => array('type' => 'hidden', 'value' => $this->widgetController),\n \t\t'header' \t=> array('type' => 'custom', 'value' => \"<h4 class='widget_header col-md-12'>{$this->widgetController}</h4>\", 'label' => ''),\n\n \t\t'title' => array(),\n \t\t'class'\t=> array(),\n 'bg_color'\t=> array('label' => 'Màu nền', 'class' => 'ColorPickerSliders',\n 'addElement' => '<a href=\"index.php?r=admin/help/view&helpId=4\" target=\"_blank\">Xem thêm</a>'),\n \t\t'category_id'\t=> array('type' => 'select_category', 'label' => 'Category', 'required' => true,\n \t\t\t\t'options' => CategoryExt::getCategoryList()),\n \t\t'style'\t=> array('type' => 'select', 'options' => $this->settingDefault['style']),\n \t\t'order_by' => array('type' => 'select', 'options' => $this->settingDefault['order_by']),\n \t\t'order_direction' => array('type' => 'select', 'options' => $this->settingDefault['order_direction']),\n \t);\n\n \t$settingAll = array(\n \t\t'cols' => '3-9'\n \t);\n\n \t//render setting from\n \tTemplateHelper::renderForm($settingForm, $setting, $settingAll);\n TemplateHelper::getTemplate('layout/_extra/add_setting.php', $setting);\n TemplateHelper::getTemplate('layout/_extra/color_picker.php');\n \t}", "public function getBorderWidth() {}", "public function buildForm(array $form, FormStateInterface $form_state) {\n // Call the parent implementation to inherit from the save button and\n // form style.\n $form = parent::buildForm($form, $form_state);\n\n // Add our custom form fields.\n $form['opening_hours'] = array(\n '#type' => 'textarea',\n '#title' => 'Opening hours',\n '#description' => 'Days / hours of the library',\n '#default_value' => $this->config('happy_alexandrie.library_config')->get('opening_hours'),\n '#rows' => 5,\n );\n return $form;\n }", "public function __construct()\n {\n parent::__construct();\n \n $this->form = new BootstrapFormBuilder;\n $this->form->setFormTitle('Bootstrap Form Builder');\n \n $label1 = new TLabel('Some label', '#7D78B6', 12, 'bi');\n $label1->style='text-align:left;border-bottom:1px solid #c0c0c0;width:100%';\n \n $this->form->appendPage('Page 1');\n $this->form->addContent( [$label1] );\n \n $field1a = new TEntry('row1a');\n $field2a = new TDate('row2a');\n $field2b = new TCombo('row2b');\n $field3a = new TEntry('row3a');\n $field3b = new TEntry('row3b');\n $field3c = new TEntry('row3c');\n $field3d = new TEntry('row3d');\n $field4a = new TText('row4a');\n \n // add a row with 2 slots\n $this->form->addFields( [ new TLabel('Row 1') ],\n [ $field1a ] );\n \n // add a row with 2 slots\n $this->form->addFields( [ new TLabel('Row 2') ],\n [ $field2a, $field2b ] );\n \n // add a row with 4 slots\n $this->form->addFields( [ new TLabel('Row 3') ],\n [ $field3a, $field3b ],\n [ new TLabel('Label') ],\n [ $field3c, $field3d ] );\n \n $field2b->addItems( ['1' => 'One', '2' => 'Two'] );\n \n $field1a->setSize('70%');\n $field2a->setSize('120');\n $field2b->setSize('75%');\n \n $field3a->setSize('50%');\n $field3b->setSize('50%');\n $field3c->setSize('50%');\n $field3d->setSize('50%');\n \n $this->form->appendPage('Page 2');\n \n $label2 = new TLabel('Another label', '#7D78B6', 12, 'bi');\n $label2->style='text-align:left;border-bottom:1px solid #c0c0c0;width:100%';\n \n $this->form->addContent( [$label2] );\n $this->form->addFields( [new TLabel('Row 4')], [$field4a ]);\n $field4a->setSize('100%', 100);\n \n $this->form->addAction('Send', new TAction(array($this, 'onSend')), 'fa:check-circle-o green');\n \n // wrap the page content using vertical box\n $vbox = new TVBox;\n $vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));\n $vbox->add($this->form);\n\n parent::add($this->form);\n }", "protected function form()\n {\n $form = new Form(new BoxOrder);\n\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Terrace());\n\n $form->image('image', __('平台图片'))->rules('required', ['required' => '平台图片不能为空']);\n $form->text('name', __('平台名称'))->rules('required', ['required' => '平台名称不能为空']);\n $form->text('path', __('外链'))->rules('required', ['required' => '平台外链不能为空']);\n $form->text('notice_info', __('提示语'))->rules('required', ['required' => '平台提示语不能为空']);\n $form->radio('status','状态')->options(['1' => '未推荐', '2'=> '已推荐'])->default(1);\n\n return $form;\n }", "public function makeImage()\n {\n $x_width = 200;\n $y_width = 125;\n\n $this->image = imagecreatetruecolor(200, 125);\n\n $this->white = imagecolorallocate($this->image, 255, 255, 255);\n $this->black = imagecolorallocate($this->image, 0, 0, 0);\n $this->red = imagecolorallocate($this->image, 255, 0, 0);\n $this->green = imagecolorallocate($this->image, 0, 255, 0);\n $this->grey = imagecolorallocate($this->image, 128, 128, 128);\n\n $this->red = imagecolorallocate($this->image, 231, 0, 0);\n\n $this->yellow = imagecolorallocate($this->image, 255, 239, 0);\n $this->green = imagecolorallocate($this->image, 0, 129, 31);\n\n $this->color_palette = [$this->red, $this->yellow, $this->green];\n\n imagefilledrectangle($this->image, 0, 0, 200, 125, $this->white);\n\n $border = 25;\n\n $lines = [\"e\", \"g\", \"b\", \"d\", \"f\"];\n $i = 0;\n foreach ($lines as $key => $line) {\n $x1 = 0;\n $x2 = $x_width;\n $y1 = $i * 15 + 25;\n $y2 = $y1;\n imageline(\n $this->image,\n $x1 + $border,\n $y1,\n $x2 - $border,\n $y2,\n $this->black\n );\n $i = $i + 1;\n }\n\n imageline(\n $this->image,\n 0 + $border,\n 25,\n 0 + $border,\n 4 * 15 + 25,\n $this->black\n );\n imageline(\n $this->image,\n 200 - $border,\n 25,\n 200 - $border,\n 4 * 15 + 25,\n $this->black\n );\n\n $textcolor = $this->black;\n\n $font = $this->default_font;\n\n $size = 10;\n $angle = 0;\n\n if (!isset($this->bar_count) or $this->bar_count == \"X\") {\n $this->bar_count = 0;\n }\n $count_notation = $this->bar_count + 1;\n\n if (file_exists($font)) {\n if (\n $count_notation != 1 or\n $count_notation == $this->max_bar_count\n ) {\n imagettftext(\n $this->image,\n $size,\n $angle,\n 0 + 10,\n 110,\n $this->black,\n $font,\n $count_notation\n );\n }\n\n if (\n $count_notation + 1 != 1 or\n $count_notation + 1 == $this->max_bar_count + 1\n ) {\n imagettftext(\n $this->image,\n $size,\n $angle,\n 200 - 25,\n 110,\n $this->black,\n $font,\n $count_notation + 1\n );\n }\n }\n }", "function creaped() {\n\t\t// Esto debe hacerse por dataform\n\t\t$styles = \"\\n<!-- Estilos -->\\n\";\n\t\t$styles .= style('rapyd.css');\n\t\t$styles .= style('ventanas.css');\n\t\t$styles .= style('themes/proteo/proteo.css');\n\t\t$styles .= style(\"themes/ui.jqgrid.css\");\n\t\t$styles .= style(\"themes/ui.multiselect.css\");\n\t\t$styles .= style('layout1.css');\n\t\t$styles .= '<link rel=\"stylesheet\" href=\"'.base_url().'system/application/rapyd/elements/proteo/css/rapyd_components.css\" type=\"text/css\" />'.\"\\n\";\n\n\n\t\t$styles .= '\n<style type=\"text/css\">\n\tp {font-size:1em; margin: 1ex 0;}\n\tp.buttons {text-align:center;line-height:2.5em;}\n\tbutton {line-height: normal;}\n\t.hidden {display: none;}\n\tul {z-index:100000;margin:1ex 0;padding:0;list-style:none;cursor:pointer;border:1px solid Black;width:15ex;position:\trelative;}\n\tul li {background-color: #EEE;padding: 0.15em 1em 0.3em 5px;}\n\tul ul {display:none;position:absolute;width:100%;left:-1px;bottom:0;margin:0;margin-bottom: 1.55em;}\n\t.ui-layout-north ul ul {bottom:auto;margin:0;margin-top:1.45em;}\n\tul ul li { padding: 3px 1em 3px 5px; }\n\tul ul li:hover { background-color: #FF9; }\n\tul li:hover ul { display:block; background-color: #EEE; }\n\n\t#feedback { font-size: 0.8em; }\n\t#tablas .ui-selecting { background: #FECA40; }\n\t#tablas .ui-selected { background: #F39814; color: white; }\n\t#tablas { list-style-type: none; margin: 0; padding: 0; width: 90%; }\n\t#tablas li { margin: 1px; padding: 0em; font-size: 0.8em; height: 14px; }\n\n\ttable.tc td.header {padding-right: 1px;padding-left: 1px;font-weight: bold;font-size: 8pt;color: navy;background-color: #f4edd5;text-align:center;}\n\ttable.tc td.title{padding-right: 1px;padding-left: 1px;font-weight: bold;font-size: 8pt;color:navy;text-align:center;background-color: #fdffdf;}\n\ttable.tc td.resalte{border-left:solid 1px #daac00;border-top:solid 1px #daac00;text-align:center;font-weight: bold;}\n\ttable.tc td{ border-left:solid 1px #DAAC00;border-TOP:solid 1px #DAAC00;}\n\ttable.tc {border-right: #daac00 1px solid;padding-right: 0px;border-top: medium none;padding-left: 0px;padding-bottom: 0px;border-left: medium none;border-bottom: #daac00 1px solid;font-family: verdana;font-size:8pt;cellspacing: 0px}\n\ttable.tc td.sin_borde{border-left:solid 1px #DAAC00;border-TOP:solid 1px #DAAC00;text-align:center;border-right:solid 5px #f6f6f6;border-bottom:solid 5px #f6f6f6;}\n\n\t.custom-combobox {position: relative;display: inline-block;}\n\t.custom-combobox-toggle {position: absolute;top: 0;bottom: 0;margin-left: -1px;padding: 0;}\n\t.custom-combobox-input {margin: 0;padding: 5px 10px;}\n\n</style>\n';\n\n\t\t$title = \"\n<div id='encabe'>\n<table width='98%'>\n\t<tr>\n\t\t<td>\".heading('Generar Orden de Produccion').\"</td>\n\t\t<td align='right' width='40'>\".image('cerrar.png','Cerrar Ventana',array('onclick'=>'window.close()','height'=>'20')).\"</td>\n\t</tr>\n</table>\n</div>\n\";\n\t\t$script = \"\\n<!-- JQUERY -->\\n\";\n\t\t$script .= script('jquery-min.js');\n\t\t$script .= script('jquery-migrate-min.js');\n\t\t$script .= script('jquery-ui.custom.min.js');\n\n\t\t$script .= script(\"jquery.layout.js\");\n\t\t$script .= script(\"i18n/grid.locale-sp.js\");\n\n\t\t$script .= script(\"ui.multiselect.js\");\n\t\t$script .= script(\"jquery.jqGrid.min.js\");\n\t\t$script .= script(\"jquery.tablednd.js\");\n\t\t$script .= script(\"jquery.contextmenu.js\");\n\n\t\t$script .= script('plugins/jquery.numeric.pack.js');\n\t\t$script .= script('plugins/jquery.floatnumber.js');\n\t\t$script .= script('plugins/jquery.maskedinput.min.js');\n\n\t\t$script .= '\n<script type=\"text/javascript\">\n\t$(function(){\n\t\t$(\".inputnum\").numeric(\".\");\n\t});\n\t$(function() {\n\t\t$( \"input:submit, a, button\", \".botones\",\".otros\" ).button();\n\t});\n';\n\n\t\t$script .= '\n\t// set EVERY state here so will undo ALL layout changes\n\t// used by the Reset State button: myLayout.loadState( stateResetSettings )\n\tvar stateResetSettings = {\n\t\tnorth__size:\t\t\"auto\"\n\t,\tnorth__initClosed:\tfalse\n\t,\tnorth__initHidden:\tfalse\n\t,\tsouth__size:\t\t\"auto\"\n\t,\tsouth__initClosed:\tfalse\n\t,\tsouth__initHidden:\tfalse\n\t,\twest__size:\t\t\t200\n\t,\twest__initClosed:\tfalse\n\t,\twest__initHidden:\tfalse\n\t,\teast__size:\t\t\t100\n\t,\teast__initClosed:\ttrue\n\t,\teast__initHidden:\ttrue\n\n\t};\n\n\tvar myLayout;\n\n\t$(document).ready(function () {\n\n\t\t// this layout could be created with NO OPTIONS - but showing some here just as a sample...\n\t\t// myLayout = $(\"body\").layout(); -- syntax with No Options\n\n\t\tmyLayout = $(\"body\").layout({\n\n\t\t//\treference only - these options are NOT required because \"true\" is the default\n\t\t\tclosable: true,\tresizable:\ttrue, slidable:\ttrue, livePaneResizing:\ttrue\n\t\t//\tsome resizing/toggling settings\n\t\t,\tnorth__slidable: false, north__togglerLength_closed: \"100%\", north__spacing_closed:\t20\n\t\t,\tsouth__resizable:false,\tsouth__spacing_open:0\n\t\t,\tsouth__spacing_closed:20\n\t\t//\tsome pane-size settings\n\t\t,\twest__minSize: 100, east__size: 100, east__minSize: 50, east__maxSize: .5, center__minWidth: 100\n\t\t//\tsome pane animation settings\n\t\t,\twest__animatePaneSizing: false,\twest__fxSpeed_size:\t\"fast\",\twest__fxSpeed_open: 1000\n\t\t,\twest__fxSettings_open:{ easing: \"easeOutBounce\" },\twest__fxName_close:\"none\"\n\t\t//\tenable showOverflow on west-pane so CSS popups will overlap north pane\n\t\t//,\twest__showOverflowOnHover:\ttrue\n\t\t,\tstateManagement__enabled:true, showDebugMessages: true\n\t\t});\n\n\t\t$(function() {\n\t\t\t$(\"button\").button().click(function(event) {event.preventDefault();});\n\t\t\t//$( \"#almacen\" ).combobox();\n\t\t});\n\n\n \t});\n\n\tfunction sumar(j){\n\t\tvar nn = \\'[name=\"codigo_\\'+j+\\'\"]\\';\n\t\tvar k = 0;\n\t\tvar t;\n\t\tvar totalc = 0;\n\t\tvar maximo = 0;\n\n\t\t// Valida el maximo\n\t\t$(\"#resultados\").html(\"Maximo \"+maximo);\n\n\t\t$(nn).each( function() {\n\t\t\tk = $(this).val();\n\t\t\tt = Number($(\"#cana_\"+k).val());\n\t\t\tmaximo = Number($(\"#falta_\"+k).val());\n\t\t\tif ( t > maximo ){\n\t\t\t\tt = maximo;\n\t\t\t\t$(\"#cana_\"+k).val(maximo);\n\t\t\t}\n\t\t\ttotalc += t;\n\t\t});\n\t\t$(\\'#totalc_\\'+j).val(totalc);\n\t}\n\n\tfunction guardar(){\n\t\talert(\"Guardar\");\n\t\t$.post( \"'.base_url().'inventario/prdo/guardaoe\", $(\"#guardar\").serialize(),\n\t\t\tfunction(data) {\n\t\t\t\talert(data);\n\t\t\t\tlocation.reload();\n\t\t\t\twindow.opener.actualiza();\n\t\t\t}\n\t\t);\n\t}\n</script>\n';\n\n// ENCABEZADO\n$tabla = '\n<div class=\"ui-layout-north\" onmouseover=\"myLayout.allowOverflow(\\'north\\')\" onmouseout=\"myLayout.resetOverflow(this)\">\n<table width=\"100%\" bgcolor=\"#2067B5\">\n\t<tr>\n\t\t<td align=\"left\" width=\"80px\"><img src=\"'.base_url().'assets/default/css/templete_01.jpg\" width=\"120\"></td><td align=\"center\"><h1 style=\"font-size: 20px; color: rgb(255, 255, 255);\" onclick=\"history.back()\">ORDEN DE PRODUCCION</h1></td><td align=\"left\" width=\"100px\" nowrap=\"nowrap\"><font style=\"color:#FFFFFF;font-size:12px\">Usuario: '.$this->secu->usuario().'<br/>'.$this->secu->getnombre().'</font></td><td align=\"right\" width=\"28px\"></td>\n\t</tr>\n</table>\n</div>\n';\n\n// IZQUIERDO\n$tabla .= '\n<div class=\"ui-layout-west\">\n<form id=\"guardar\" >\n<center>\n<lable>Almacen</lable> ';\n$tabla .= $this->datasis->llenaopciones(\"SELECT ubica, ubides FROM caub WHERE gasto='N' ORDER BY ubica\", false, $id='almacen' );\n\n$tabla .= '\n\t<br><br>\n\t<lable>Instruciones</lable>\n\t<textarea rows=\"4\" cols=\"25\" id=\"instrucciones\" name=\"instrucciones\"></textarea>\n\t<br><br>\n\t<button type=\"button\" onclick=\"guardar()\">Guardar Orden</button>\n\t<div id=\"resultados\"></div>\n</center>\n</div>';\n\n// INFERIOR\n$tabla .= '\n<div class=\"ui-layout-south\">\n';\n\n$tabla .= $this->datasis->traevalor('TITULO1');\n\n$tabla .= '\n</div>\n';\n\n// DERECHA\n$tabla .= '\n<div class=\"ui-layout-east\">\n</div>\n';\n\n// CENTRO\n$norden = $this->datasis->dameval('SELECT MAX(id) maxi FROM prdo');\nif ($norden == '') $norden = 0;\n\n$tabla .= '\n<div class=\"ui-layout-center\">';\n\n$mSQL = '\nSELECT a.id, b.numero, b.fecha, b.cod_cli, b.nombre, a.codigoa, a.desca, a.cana, COALESCE(sum(e.ordenado),0) producido, a.cana-COALESCE(sum(e.ordenado),0) falta, COALESCE(sum(e.ordenado),0) ordenado, d.ruta, d.descrip\nFROM itpfac a\nJOIN pfac b ON a.numa = b.numero\nLEFT JOIN sclitrut c ON b.cod_cli=c.cliente\nLEFT JOIN sclirut d ON c.ruta=d.ruta\nLEFT JOIN itprdo e ON a.id = e.idpfac\nWHERE b.producir=\"S\" AND ( b.ordprod=\"\" OR b.ordprod IS NULL )\nGROUP BY a.id\nHAVING falta>0\nORDER BY a.codigoa, d.ruta, a.numa\n';\n\n$query = $this->db->query($mSQL);\n$ruta = 'XX0XX';\n$codigo = 'XXZZWWXXWWXXZZZZ';\n$i = 0;\n$c = 0;\nif ($query->num_rows() > 0){\n\tforeach ($query->result() as $row){\n\t\tif ( $codigo != $row->codigoa ){\n\t\t\tif ( $i > 0 ) $tabla .= \"</tbody></table><br>\\n\";\n\t\t\t$tabla .= '<table class=\"tc\" width=\"100%\">';\n\t\t\t$tabla .= \"<tbody>\\n\";\n\n\t\t\tif ( $i > 0 ) $c++;\n\n\t\t\t$tabla .= \"<tr style='background:#2067B5;color:#FFFFFF;'>\\n\";\n\t\t\t$tabla .= \"\t<td colspan='7'>Cod: \".$row->codigoa.\" Desc: \".$row->desca.\"</td>\\n\";\n\t\t\t//$tabla .= \"\t<td>&nbsp;</td>\\n\";\n\t\t\t$tabla .= \"\t<td><input class='inputnum' name='totalc_$c' id='totalc_$c' size='4' type='text' readonly></td>\\n\";\n\t\t\t$tabla .= \"</tr>\\n\";\n\n\t\t\t$tabla .= \"<tr bgcolor='#BEDCFD'>\\n\";\n\t\t\t$tabla .= \"\t<td >Ruta</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Pedido</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Fecha</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Cliente</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Nombre</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Cantidad</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Producido</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Ordenado</td>\\n\";\n\t\t\t$tabla .= \"</tr>\\n\";\n\n\t\t\t$codigo = $row->codigoa;\n\t\t}\n\n\t\t$tabla .= \"<tr>\\n\";\n\t\t$tabla .= \"\t<td><a href='#' title='\".$row->descrip.\"'>\".$row->ruta.\"&nbsp;</a></td>\\n\";\n\t\t$tabla .= \"\t<td>\".$row->numero.\"</td>\\n\";\n\t\t$tabla .= \"\t<td>\".$row->fecha.\"</td>\\n\";\n\t\t$tabla .= \"\t<td>\".$row->cod_cli.\"</td>\\n\";\n\t\t$tabla .= \"\t<td>\".$row->nombre.\"</td>\\n\";\n\t\t$tabla .= \"\t<td align='right'>\".$row->cana.\"</td>\\n\";\n\t\t$tabla .= \"\t<td align='right'>\".$row->producido.\"</td>\\n\";\n\n\t\t$tabla .= \"\t<td>\\n\";\n\t\t$tabla .= \"\t\t<input class='inputnum' name='cana_$i' id='cana_$i' size='4' onkeyUp='sumar($c)' value='0.00' >\\n\";\n\t\t$tabla .= \"\t\t<input name='codigo_$c' id='codigo_$c' type='hidden' value='$i' >\\n\";\n\t\t$tabla .= \"\t\t<input name='idpfac_$i' id='idpfac_$i' type='hidden' value='\".$row->id. \"' >\\n\";\n\t\t$tabla .= \"\t\t<input name='falta_$i' id='falta_$i' type='hidden' value='\".$row->falta.\"' >\\n\";\n\t\t$tabla .= \"\t</td>\\n\";\n\n\t\t$tabla .= \"</tr>\\n\";\n\t\t$i++;\n\t}\n\t$tabla .= \"</table>\\n\";\n}\n\n$tabla .= '\n<input id=\"totalitem\" name=\"totalitem\" type=\"hidden\" value=\"'.$i.'\">\n</form>\n</div>\n';\n\t\t$data['content'] = $tabla;\n\t\t$data['title'] = $title;\n\t\t$data['head'] = $styles;\n\t\t$data['head'] .= $script;\n\t\t$this->load->view('view_ventanas_lite',$data);\n\t}", "function form( $instance ){\n\n\t\t\t// $instance Defaults\n\t\t\t$instance_defaults = $this->defaults;\n\n\t\t\t// If we have information in this widget, then ignore the defaults\n\t\t\tif( !empty( $instance ) ) $instance_defaults = array();\n\n\t\t\t// Parse $instance\n\t\t\t$instance = wp_parse_args( $instance, $instance_defaults );\n\t\t\textract( $instance, EXTR_SKIP );\n\n\t\t\t$design_bar_components = apply_filters( 'layers_' . $this->widget_id . '_widget_design_bar_components' , array(\n\t\t\t\t\t'custom',\n\t\t\t\t\t'advanced'\n\t\t\t\t) );\n\n\t\t\t$design_bar_custom_components = apply_filters( 'layers_' . $this->widget_id . '_widget_design_bar_custom_components' , array(\n\t\t\t\t\t'layout' => array(\n\t\t\t\t\t\t'icon-css' => 'icon-layout-fullwidth',\n\t\t\t\t\t\t'label' => __( 'Layout', 'layerswp' ),\n\t\t\t\t\t\t'wrapper-class' => 'layers-pop-menu-wrapper layers-small',\n\t\t\t\t\t\t'elements' => array(\n\t\t\t\t\t\t\t'layout' => array(\n\t\t\t\t\t\t\t\t'type' => 'select-icons',\n\t\t\t\t\t\t\t\t'label' => __( '' , 'layerswp' ),\n\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'design' ) . '[layout]' ,\n\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'design-layout' ) ,\n\t\t\t\t\t\t\t\t'value' => ( isset( $design['layout'] ) ) ? $design['layout'] : NULL,\n\t\t\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t\t\t'layout-boxed' => __( 'Boxed' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'layout-fullwidth' => __( 'Full Width' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'layout-full-screen' => __( 'Full Screen' , 'layerswp' )\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'display' => array(\n\t\t\t\t\t\t'icon-css' => 'icon-slider',\n\t\t\t\t\t\t'label' => __( 'Slider', 'layerswp' ),\n\t\t\t\t\t\t'elements' => array(\n\t\t\t\t\t\t\t\t'show_slider_arrows' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_slider_arrows' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_slider_arrows' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_slider_arrows ) ) ? $show_slider_arrows : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Slider Arrows' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_slider_dots' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_slider_dots' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_slider_dots' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_slider_dots ) ) ? $show_slider_dots : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Slider Dots' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'autoplay_slides' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'autoplay_slides' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'autoplay_slides' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $autoplay_slides ) ) ? $autoplay_slides : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Autoplay Slides' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'slide_time' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'slide_time' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'slide_time' ) ,\n\t\t\t\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t\t\t\t'max' => 10,\n\t\t\t\t\t\t\t\t\t'placeholder' => __( 'Time in seconds, eg. 2' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $slide_time ) ) ? $slide_time : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Slide Interval' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'data' => array( 'show-if-selector' => '#' . $this->get_field_id( 'autoplay_slides' ), 'show-if-value' => 'true' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'slide_height' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'slide_height' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'slide_height' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $slide_height ) ) ? $slide_height : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Slider Height' , 'layerswp' )\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t) );\n\n\t\t\t$this->design_bar(\n\t\t\t\t'side', // CSS Class Name\n\t\t\t\tarray(\n\t\t\t\t\t'name' => $this->get_field_name( 'design' ),\n\t\t\t\t\t'id' => $this->get_field_id( 'design' ),\n\t\t\t\t), // Widget Object\n\t\t\t\t$instance, // Widget Values\n\t\t\t\t$design_bar_components, // Standard Components\n\t\t\t\t$design_bar_custom_components // Add-on Components\n\t\t\t); ?>\n\t\t\t<div class=\"layers-container-large\" id=\"layers-slide-widget-<?php echo esc_attr( $this->number ); ?>\">\n\n\t\t\t\t<?php $this->form_elements()->header( array(\n\t\t\t\t\t'title' =>'Sliders',\n\t\t\t\t\t'icon_class' =>'slider'\n\t\t\t\t) ); ?>\n\n\t\t\t\t<section class=\"layers-accordion-section layers-content\">\n\t\t\t\t\t\t<?php echo $this->form_elements()->input(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'type' => 'hidden',\n\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'slide_ids' ) ,\n\t\t\t\t\t\t\t\t'id' => 'slide_ids_input_' . $this->number,\n\t\t\t\t\t\t\t\t'value' => ( isset( $slide_ids ) ) ? $slide_ids : NULL\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t); ?>\n\n\t\t\t\t\t\t<?php // If we have some slides, let's break out their IDs into an array\n\t\t\t\t\t\tif( isset( $slide_ids ) && '' != $slide_ids ) $slides = explode( ',' , $slide_ids ); ?>\n\n\t\t\t\t\t\t<ul id=\"slide_list_<?php echo esc_attr( $this->number ); ?>\" class=\"layers-accordions layers-accordions-sortable layers-sortable\" data-id_base=\"<?php echo $this->id_base; ?>\" data-number=\"<?php echo esc_attr( $this->number ); ?>\">\n\t\t\t\t\t\t\t<?php if( isset( $slides ) && is_array( $slides ) ) { ?>\n\t\t\t\t\t\t\t\t<?php foreach( $slides as $slide ) {\n\t\t\t\t\t\t\t\t\t$this->slide_item( array(\n\t\t\t\t\t\t\t\t\t\t\t\t'id_base' => $this->id_base ,\n\t\t\t\t\t\t\t\t\t\t\t\t'number' => $this->number\n\t\t\t\t\t\t\t\t\t\t\t) ,\n\t\t\t\t\t\t\t\t\t\t\t$slide ,\n\t\t\t\t\t\t\t\t\t\t\t( isset( $instance[ 'slides' ][ $slide ] ) ) ? $instance[ 'slides' ][ $slide ] : NULL );\n\t\t\t\t\t\t\t\t} ?>\n\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t<button class=\"layers-button btn-full layers-add-widget-slide add-new-widget\" data-number=\"<?php echo esc_attr( $this->number ); ?>\"><?php _e( 'Add New Slide' , 'layerswp' ) ; ?></button>\n\t\t\t\t</section>\n\n\t\t\t</div>\n\n\t\t<?php }", "private function StartForm(){\r\n\t\t\t$this->formHTML .= \"<form method=\\\"{$this->method}\\\" action=\\\"{$this->action}\\\"\";\r\n\t\t\tif($this->enctype){\r\n\t\t\t\t$this->formHTML .= \" enctype=\\\"{$this->enctype}\\\"\";\r\n\t\t\t}\r\n\t\t\t$this->formHTML .= \" name=\\\"{$this->formName}\\\" class=\\\"c{$this->formName}\\\" id=\\\"i{$this->formName}\\\"\";\r\n\t\t\t$this->formHTML .= \">\";\r\n\t\t}", "protected function createComponentProjectForm(): Form {\n $form = new Form; \n\n //Get all available project types for select field\n $types = $this->database->table('types');\n $types_arr = array();\n foreach($types as $type) {\n $types_arr[$type->id] = $type->title;\n }\n\n $form->addText('title', \"Project Title:\")\n ->setRequired()\n ->addRule($form::MAX_LENGTH, 'The Project title need to be less than %d character long', 60);\n\n $form->addSelect(\"type_id\", \"Project Type\", $types_arr)\n ->setRequired();\n\n $form->addText('start_date', \"Start Date\")\n ->setHtmlType('date')\n ->setRequired();\n\n $form->addText('end_date', \"End Date\")\n ->setHtmlType('date')\n ->setRequired();\n\n $form->addSubmit('send', \"Publish Project\");\n\n $form->onSuccess[] = [$this, 'projectFormSucceeded'];\n\n return $form;\n }", "function __construct($aowner=null)\r\n {\r\n //Calls inherited constructor\r\n parent::__construct($aowner);\r\n\r\n $this->Width=65;\r\n $this->Height=65;\r\n $this->_pen=new Pen();\r\n $this->_pen->_control=$this;\r\n $this->_brush=new Brush();\r\n $this->_brush->_control=$this;\r\n\r\n }", "protected function buildForm()\n {\n $this->formBuilder\n ->add('host', 'text', array(\n 'data' => ElasticProduct::getConfigValue('host'),\n 'required' => false,\n 'attr' => ['placeholder' => 'localhost'],\n 'label' => Translator::getInstance()->trans('Host', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'host'\n )\n ))\n ->add('port', 'text', array(\n 'data' => ElasticProduct::getConfigValue('port'),\n 'required' => false,\n 'attr' => ['placeholder' => '9200'],\n 'label' => Translator::getInstance()->trans('Port', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'port'\n )\n ))\n ->add('username', 'text', array(\n 'data' => ElasticProduct::getConfigValue('username'),\n 'required' => false,\n 'label' => Translator::getInstance()->trans('Username', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'username'\n )\n ))\n ->add('password', PasswordType::class, array(\n 'data' => ElasticProduct::getConfigValue('password'),\n 'required' => false,\n 'label' => Translator::getInstance()->trans('Password', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'password'\n )\n ))\n ->add('index_prefix', 'text', array(\n 'data' => ElasticProduct::getConfigValue('index_prefix'),\n 'required' => false,\n 'attr' => ['placeholder' => 'my_website_name'],\n 'label' => Translator::getInstance()->trans('Index prefix', array(), ElasticProduct::DOMAIN_NAME),\n 'label_attr' => array(\n 'for' => 'index_prefix'\n )\n ));\n }", "public function __construct($width=NULL, $height=NULL)\n\t{\n\t\tparent::__construct($width, $height);\n\t\t\n\t\t$this->set_margins(5);\n\t\t\n\t\t$this->colors['pen_color'] = array(\t// for drawing \"value lines\"\n\t\t\t\tarray('#c45e31', NULL, NULL),\n\t\t\t\tarray('#b7da2d', NULL, NULL)\n\t\t\t);\n\t\t$this->colors['point_color'] = array(\t// point border color\n\t\t\t\tarray('#c45e31', NULL, NULL),\n\t\t\t\tarray('#b7da2d', NULL, NULL)\n\t\t\t);\n\t\t$this->colors['point_fill_color'] = array('#ffffff', NULL, NULL);\t// point fill color\n\t\t$this->colors['line_color'] = \t\t\tarray('#dfdfdf', NULL, NULL);\t// primary color of lines\n\t\t$this->colors['line_color2'] =\t\t\tarray('#969696', NULL, NULL);\t// for short lines by the legend for example\n\t\t$this->colors['legend_color'] = \t\tarray('#fefefe', NULL, NULL); // background legend color\n\t}", "public function __construct()\n {\n \t// Initialise values\n \t$this->_horizontal\t\t\t= PHPPowerPoint_Style_Alignment::HORIZONTAL_LEFT;\n \t$this->_vertical\t\t\t= PHPPowerPoint_Style_Alignment::VERTICAL_BASE;\n \t$this->_level\t\t\t\t= 0;\n\t\t$this->_indent\t\t\t\t= 0;\n }", "protected function form()\n {\n $form = new Form(new Cate());\n\n $form->text('name', __('Name'));\n $form->url('link', __('Link'));\n $form->text('thumb', __('Thumb'));\n $form->switch('status', __('Status'));\n $form->number('sort', __('Sort'));\n $form->datetime('createtime', __('Createtime'))->default(date('Y-m-d H:i:s'));\n\n return $form;\n }", "abstract public function createForm();", "abstract public function createForm();" ]
[ "0.69055814", "0.68195033", "0.61908114", "0.61072564", "0.5682266", "0.56485695", "0.5436292", "0.5436292", "0.5434116", "0.5432274", "0.5432274", "0.5432274", "0.5432274", "0.5432274", "0.5430103", "0.53658926", "0.5246863", "0.5181012", "0.516103", "0.5084275", "0.50808173", "0.50668967", "0.50278145", "0.5017033", "0.49811444", "0.4950983", "0.49413857", "0.4937674", "0.49348432", "0.48909384", "0.48762122", "0.48659104", "0.4862793", "0.48360148", "0.48299643", "0.48123047", "0.4802906", "0.48011452", "0.4791999", "0.4764162", "0.47428182", "0.47376797", "0.47370127", "0.4734007", "0.47336948", "0.4719728", "0.4718893", "0.47185218", "0.47160634", "0.47091165", "0.46864396", "0.46821767", "0.4669702", "0.466719", "0.4661036", "0.46547955", "0.46512067", "0.4651137", "0.4651035", "0.4645653", "0.46383762", "0.46234447", "0.46203667", "0.4611601", "0.46023747", "0.45981586", "0.4595627", "0.4586037", "0.45845112", "0.45823428", "0.45817629", "0.4581508", "0.45781982", "0.45717323", "0.45711395", "0.45709863", "0.45691243", "0.45647332", "0.45617408", "0.45617038", "0.45508695", "0.4549374", "0.45453638", "0.45446625", "0.45445773", "0.45395055", "0.4520069", "0.45163256", "0.4516016", "0.45087415", "0.45020804", "0.44947883", "0.44943383", "0.44942337", "0.449213", "0.44872504", "0.4485907", "0.44853836", "0.4479297", "0.4479297" ]
0.75592405
0
Builds the form that show a preview of your progress bar design
Создает форму, которая отображает предварительный просмотр вашего дизайна прогресс-бара
function buildForm() { $this->buildTabs(); // tab caption $this->addElement('header', null, 'Progress2 Generator - Control Panel: run demo'); $this->addElement('static', 'progressBar', 'Your progress meter looks like:'); // Buttons of the wizard to do the job $this->buildButtons(array('reset','process')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: main properties');\r\n\r\n $shape[] =& $this->createElement('radio', null, null, 'Horizontal', '1');\r\n $shape[] =& $this->createElement('radio', null, null, 'Vertical', '2');\r\n $this->addGroup($shape, 'shape', 'Shape:');\r\n\r\n $way[] =& $this->createElement('radio', null, null, 'Natural', 'natural');\r\n $way[] =& $this->createElement('radio', null, null, 'Reverse', 'reverse');\r\n $this->addGroup($way, 'way', 'Direction:');\r\n\r\n $autosize[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $autosize[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($autosize, 'autosize', 'Best size:');\r\n\r\n $psize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $psize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $psize['left'] =& $this->createElement('text',\r\n 'left', 'left',\r\n array('size' => 4));\r\n $psize['top'] =& $this->createElement('text',\r\n 'top', 'top',\r\n array('size' => 4));\r\n $psize['position'] =& $this->createElement('text',\r\n 'position', 'position',\r\n array('disabled' => 'true'));\r\n $psize['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'bgcolor',\r\n array('size' => 7));\r\n $this->addGroup($psize, 'progresssize',\r\n 'Size, position and color:', ' ');\r\n\r\n $this->addElement('text', 'rAnimSpeed',\r\n array('Animation speed :',\r\n '(0-1000 ; 0:fast, 1000:slow)'));\r\n $this->addRule('rAnimSpeed',\r\n 'Should be between 0 and 1000',\r\n 'rangelength', array(0,1000), 'client');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('back','apply','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: border properties');\r\n\r\n $borderpainted[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $borderpainted[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($borderpainted, 'borderpainted', 'Display the border:');\r\n\r\n $this->addElement('text', 'borderclass', 'CSS class:', array('size' => 32));\r\n\r\n $borderstyle['style'] =& $this->createElement('select',\r\n 'style', 'style',\r\n array('solid' => 'Solid',\r\n 'dashed' => 'Dashed',\r\n 'dotted' => 'Dotted',\r\n 'inset' => 'Inset',\r\n 'outset' => 'Outset'));\r\n $borderstyle['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 2));\r\n $borderstyle['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($borderstyle, 'borderstyle', null, ' ');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: save PHP/CSS code');\r\n\r\n $code[] =& $this->createElement('checkbox', 'P', null, 'PHP');\r\n $code[] =& $this->createElement('checkbox', 'C', null, 'CSS');\r\n $this->addGroup($code, 'phpcss', 'PHP and/or StyleSheet source code:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('next','apply'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: string properties');\r\n\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($stringpainted, 'stringpainted', 'Render a custom string:');\r\n\r\n $this->addElement('text', 'stringid', 'Id:', array('size' => 32));\r\n $this->addElement('text', 'stringclass', 'CSS class:', array('size' => 32));\r\n $this->addElement('text', 'stringvalue', 'Content:', array('size' => 32));\r\n\r\n $stringsize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $stringsize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $stringsize['left'] =& $this->createElement('text',\r\n 'left', 'left',\r\n array('size' => 4));\r\n $stringsize['top'] =& $this->createElement('text',\r\n 'top', 'top',\r\n array('size' => 4));\r\n $stringsize['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'bgcolor',\r\n array('size' => 7));\r\n $this->addGroup($stringsize, 'stringsize', 'Size, position and color:', ' ');\r\n\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Top', 'top');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Bottom', 'bottom');\r\n $this->addGroup($stringvalign, 'stringvalign', 'Vertical alignment:');\r\n\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Center', 'center');\r\n $this->addGroup($stringalign, 'stringalign', 'Horizontal alignment:');\r\n\r\n $stringfont['family'] =& $this->createElement('text',\r\n 'family', 'family',\r\n array('size' => 40));\r\n $stringfont['size'] =& $this->createElement('text',\r\n 'size', 'size',\r\n array('size' => 2));\r\n $stringfont['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($stringfont, 'stringfont', 'Font:', ' ');\r\n\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'normal', 'normal');\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'Bold', 'bold');\r\n $this->addGroup($stringweight, 'stringweight', 'Font weight:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "public function buildForm()\n {\n $this\n ->addMeasureList()\n ->addAscendingList()\n ->addTitles(['class' => 'indicator_title_title_narrative', 'narrative_true' => true])\n ->addDescriptions(['class' => 'indicator_description_title_narrative'])\n ->addCollection('reference', 'Activity\\Reference', 'reference', [], trans('elementForm.reference'))\n ->addAddMoreButton('add_reference', 'reference')\n ->addBaselines()\n ->addPeriods()\n ->addAddMoreButton('add_period', 'period')\n ->addRemoveThisButton('remove_indicator');\n }", "function show_form()\n\t\t{\n\t\t\t//set a global template for interactive activities\n\t\t\t$this->t->set_file('run_activity','run_activity.tpl');\n\t\t\t\n\t\t\t//set the css style files links\n\t\t\t$this->t->set_var(array(\n\t\t\t\t'run_activity_css_link'\t=> $this->get_css_link('run_activity', $this->print_mode),\n\t\t\t\t'run_activity_print_css_link'\t=> $this->get_css_link('run_activity', true),\n\t\t\t));\n\t\t\t\n\t\t\t\n\t\t\t// draw the activity's title zone\n\t\t\t$this->parse_title($this->activity_name);\n\n\t\t\t//draw the instance_name input or label\n\t\t\t// init wf_name to the requested one or the stored name\n\t\t\t// the requested one handle the looping in activity form\n\n\t\t\t$wf_name = get_var('wf_name','post',$this->instance->getName());\n\t\t\t$this->parse_instance_name($wf_name);\n\n\t\t\t//draw the instance_name input or label\n\t\t\t// init wf_set_owner to the requested one or the stored owner\n\t\t\t// the requested one handle the looping in activity form\n\t\t\t$wf_set_owner = get_var('wf_set_owner','post',$this->instance->getOwner());\n\t\t\t$this->parse_instance_owner($wf_set_owner);\n\t\t\t\n\t\t\t// draw the activity central user form\n\t\t\t$this->t->set_var(array('activity_template' => $this->wf_template->parse('output', 'template')));\n\t\t\t\n\t\t\t//draw the select priority box\n\t\t\t// init priority to the requested one or the stored priority\n\t\t\t// the requested one handle the looping in activity form\n\t\t\t$priority = get_var('wf_priority','post',$this->instance->getPriority());\n\t\t\t$this->parse_priority($priority);\n\t\t\t\n\t\t\t//draw the select next_user box\n\t\t\t// init next_user to the requested one or the stored one\n\t\t\t// the requested one handle the looping in activity form\n\t\t\t$next_user = get_var('wf_next_user','POST',$this->instance->getNextUser());\n\t\t\t$this->parse_next_user($next_user);\n\t\t\t\n\t\t\t//draw print_mode buttons\n\t\t\t$this->parse_print_mode_buttons();\n\t\t\t\n\t\t\t//draw the activity submit buttons\t\n\t\t\t$this->parse_submit();\n\t\t\t\n\t\t\t//draw the info zone\n\t\t\t$this->parse_info_zone();\n\t\t\t\n\t\t\t//draw the history zone if user wanted it\n\t\t\t$this->parse_history_zone();\n\t\t\t\n\t\t\t$this->translate_template('run_activity');\n\t\t\t$this->t->pparse('output', 'run_activity');\n\t\t\t$GLOBALS['egw']->common->egw_footer();\n\t\t}", "public function ajax_example_progressbar_callback($form, &$form_state) {\n $variable_name = 'example_progressbar_' . $form_state['time'];\n $commands = array();\n\n variable_set($variable_name, 10);\n sleep(2);\n variable_set($variable_name, 40);\n sleep(2);\n variable_set($variable_name, 70);\n sleep(2);\n variable_set($variable_name, 90);\n sleep(2);\n variable_del($variable_name);\n\n $commands[] = HtmlCommand('#progress-status', $this->t('Executed.'));\n\n return array(\n '#type' => 'ajax',\n '#commands' => $commands,\n );\n}", "public function progressBar()\n {\n \n self::$view='adminlte::progress.bar';\n return $this;\n \n }", "public function createForm() {\n module_load_include('inc', 'islandora_form_builder', 'FormGenerator');\n $form_values = &$this->formState['values'];\n $file = isset($form_values['ingest-file-location']) ? $form_values['ingest-file-location'] : '';\n $form['#attributes']['enctype'] = 'multipart/form-data';\n $form['indicator']['ingest-file-location'] = array(\n '#type' => 'file',\n '#title' => t('Upload Document'),\n '#size' => 48,\n '#description' => t('Select file to be added the the object.'),\n );\n $form_generator = FormGenerator::CreateFromModel($this->contentModelPid, $this->contentModelDsid);\n $form[FORM_ROOT] = $form_generator->generate($this->formName); // TODO get from user .\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Ingest'),\n '#prefix' => t('Please be patient. Once you click next there may be a number of files created. ' .\n 'Depending on your content model this could take a few minutes to process.<br />')\n );\n return $form;\n }", "public function display() {\r\n self::createUploaderScript();\r\n\r\n $this->echoOptionHeader();\r\n\r\n // Display the preview file name.\r\n $value = $this->getValue();\r\n if ( ! is_array( $value ) ) {\r\n $value = $this->getValue();\r\n }\r\n\r\n $previewFile = '';\r\n if ( ! empty( $value ) ) {\r\n $previewFile = \"<i class='dashicons dashicons-no-alt remove'></i><p>\". basename( get_attached_file( $value ) ) . \"</p>\";\r\n } else {\r\n $previewFile = $this->settings['label'];\r\n }\r\n echo \"<div class='tf-file-upload'>\" . $previewFile . '</div>';\r\n\r\n printf('<input name=\"%s\" placeholder=\"%s\" id=\"%s\" type=\"hidden\" value=\"%s\" />',\r\n $this->getID(),\r\n $this->settings['placeholder'],\r\n $this->getID(),\r\n esc_attr( $this->getValue() )\r\n );\r\n $this->echoOptionFooter();\r\n }", "function build_basic_form()\r\n {\r\n $this->addElement('select', LanguagePack :: PROPERTY_BRANCH, Translation :: get('Branch'), LanguagePack :: get_branch_options());\r\n \r\n \t$this->addElement('file', 'file', Translation :: get('FileName'));\r\n $allowed_upload_types = array('zip');\r\n $this->addRule('file', Translation :: get('OnlyZIPAllowed'), 'filetype', $allowed_upload_types);\r\n $this->addRule('file', Translation :: get('ThisFieldIsRequired', null, Utilities :: COMMON_LIBRARIES), 'required');\r\n \r\n // Submit button\r\n //$this->addElement('submit', 'user_settings', 'OK');\r\n $buttons[] = $this->createElement('style_submit_button', 'submit', Translation :: get('Import', null, Utilities :: COMMON_LIBRARIES), array('class' => 'positive'));\r\n $buttons[] = $this->createElement('style_reset_button', 'reset', Translation :: get('Reset', null, Utilities :: COMMON_LIBRARIES), array('class' => 'normal empty'));\r\n \r\n $this->addGroup($buttons, 'buttons', null, '&nbsp;', false);\r\n }", "public function form_footer_progress_block_html() {\n\n\t\t$progress_style = ! empty( $this->form_data['settings']['conversational_forms_progress_bar'] ) ? $this->form_data['settings']['conversational_forms_progress_bar'] : '';\n\n\t\t?>\n\t\t<div class=\"wpforms-conversational-form-footer-progress\">\n\t\t\t<div class=\"wpforms-conversational-form-footer-progress-status\">\n\t\t\t\t<?php\n\t\t\t\tif ( 'proportion' === $progress_style ) {\n\t\t\t\t\t$this->form_footer_progress_status_proportion_html();\n\t\t\t\t} else {\n\t\t\t\t\t$this->form_footer_progress_status_percentage_html();\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<div class=\"wpforms-conversational-form-footer-progress-bar\">\n\t\t\t\t<div class=\"wpforms-conversational-form-footer-progress-completed\"></div>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "protected function form()\n {\n $form = new Form(new Activity());\n\n $form->text('name', __('Name'));\n $form->image('image', __('Image'));\n $form->text('intro', __('Intro'));\n $form->UEditor('details', __('Details'));\n $form->datetime('start_at', __('Start at'))->default(date('Y-m-d H:i:s'));\n $form->datetime('end_at', __('End at'))->default(date('Y-m-d H:i:s'));\n $form->text('location', __('Location'));\n $form->decimal('fee', __('Fee'))->default(0.00);\n $form->number('involves', __('Involves'));\n $form->number('involves_min', __('Involves min'));\n $form->number('involves_max', __('Involves max'));\n $form->switch('status', __('Status'));\n $form->text('organizers', __('Organizers'));\n $form->number('views', __('Views'));\n $form->switch('is_stick', __('Is stick'));\n\n return $form;\n }", "public function buildForm()\n {\n }", "public function append_media_upload_form() {\n \n ?>\n <!-- Add from Media Library -->\n <a href=\"#\" class=\"envira-media-library button\" title=\"<?php _e( 'Click Here to Insert from Other Image Sources', 'envira-gallery' ); ?>\" style=\"vertical-align: baseline;\">\n <?php _e( 'Select Files from Other Sources', 'envira-gallery' ); ?>\n </a>\n\n <!-- Progress Bar -->\n <div class=\"envira-progress-bar\">\n <div class=\"envira-progress-bar-inner\"></div>\n <div class=\"envira-progress-bar-status\">\n <span class=\"uploading\">\n <?php _e( 'Uploading Image', 'envira-gallery' ); ?>\n <span class=\"current\">1</span>\n <?php _e( 'of', 'envira-gallery' ); ?>\n <span class=\"total\">3</span>\n </span>\n\n <span class=\"done\"><?php _e( 'All images uploaded.', 'envira-gallery' ); ?></span>\n </div>\n </div>\n <?php\n\n }", "protected function build()\n {\n $stockalign = new GtkAlignment(0, 0, 0, 0);\n $stockalign->add(\n GtkImage::new_from_stock(\n Gtk::STOCK_DIALOG_ERROR, Gtk::ICON_SIZE_DIALOG\n )\n );\n $this->pack_start($stockalign, false, true);\n\n\n $this->expander = new GtkExpander('');\n\n $this->message = new GtkLabel();\n $this->expander->set_label_widget($this->message);\n $this->message->set_selectable(true);\n $this->message->set_line_wrap(true);\n\n $this->userinfo = new GtkLabel();\n $this->userinfo->set_selectable(true);\n $this->userinfo->set_line_wrap(true);\n //FIXME: add scrolled window\n $this->expander->add($this->userinfo);\n\n $this->pack_start($this->expander);\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: cell properties');\r\n\r\n $this->addElement('text', 'cellid', 'Id mask:', array('size' => 32));\r\n $this->addElement('text', 'cellclass', 'CSS class:', array('size' => 32));\r\n\r\n $cellvalue['min'] =& $this->createElement('text',\r\n 'min', 'minimum',\r\n array('size' => 4));\r\n $cellvalue['max'] =& $this->createElement('text',\r\n 'max', 'maximum',\r\n array('size' => 4));\r\n $cellvalue['inc'] =& $this->createElement('text',\r\n 'inc', 'increment',\r\n array('size' => 4));\r\n $this->addGroup($cellvalue, 'cellvalue', 'Value:', ' ');\r\n\r\n $cellsize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $cellsize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $cellsize['spacing'] =& $this->createElement('text',\r\n 'spacing', 'spacing',\r\n array('size' => 2));\r\n $cellsize['count'] =& $this->createElement('text',\r\n 'count', 'count',\r\n array('size' => 2));\r\n $this->addGroup($cellsize, 'cellsize', 'Size:', ' ');\r\n\r\n $cellcolor['active'] =& $this->createElement('text',\r\n 'active', 'active',\r\n array('size' => 7));\r\n $cellcolor['inactive'] =& $this->createElement('text',\r\n 'inactive', 'inactive',\r\n array('size' => 7));\r\n $cellcolor['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'background',\r\n array('size' => 7));\r\n $this->addGroup($cellcolor, 'cellcolor', 'Color:', ' ');\r\n\r\n $cellfont['family'] =& $this->createElement('text',\r\n 'family', 'family',\r\n array('size' => 32));\r\n $cellfont['size'] =& $this->createElement('text',\r\n 'size', 'size',\r\n array('size' => 2));\r\n $cellfont['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($cellfont, 'cellfont', 'Font:', ' ');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "protected function buildForm()\n {\n $this->form = Yii::createObject(array_merge([\n 'scenario' => $this->scenario,\n 'parent_id' => $this->parent_id,\n 'parentTariff' => $this->parentTariff,\n 'tariff' => $this->tariff,\n ], $this->getFormOptions()));\n }", "function showPreviewForm()\n {\n $ok = $this->preview();\n if (!$ok) {\n // @todo FIXME maybe provide a cancel button or link back?\n return;\n }\n\n $this->elementStart('div', 'entity_actions');\n $this->elementStart('ul');\n $this->elementStart('li', 'entity_subscribe');\n $this->elementStart('form', array('method' => 'post',\n 'id' => 'form_ostatus_sub',\n 'class' => 'form_remote_authorize',\n 'action' =>\n $this->selfLink()));\n $this->elementStart('fieldset');\n $this->hidden('token', common_session_token());\n $this->hidden('profile', $this->profile_uri);\n if ($this->oprofile->isGroup()) {\n // TRANS: Button text.\n $this->submit('submit', _m('Join'), 'submit', null,\n // TRANS: Tooltip for button \"Join\".\n _m('BUTTON','Join this group'));\n } else {\n // TRANS: Button text.\n $this->submit('submit', _m('BUTTON','Confirm'), 'submit', null,\n // TRANS: Tooltip for button \"Confirm\".\n _m('Subscribe to this user'));\n }\n $this->elementEnd('fieldset');\n $this->elementEnd('form');\n $this->elementEnd('li');\n $this->elementEnd('ul');\n $this->elementEnd('div');\n }", "protected function form()\n {\n $form = new Form(new PrizesLog);\n\n // 去掉`删除`按钮\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableDelete();\n $tools->disableView();\n });\n\n $form->text('group.title', '奖品组')->readonly();\n $form->text('prize.name', '奖品名称')->readonly();\n $form->text('material.title', '物料名称')->readonly();\n $form->text('material_code', '物料代码')->readonly();\n $form->text('user.username', '用户名')->readonly();\n $form->text('user.mobile', '用户手机号')->readonly();\n $form->select('source', '来源')->options([\n '' => '', 'exchange' => '兑换/领取', 'lottery' => '抽奖'\n ])->readonly();\n $form->ip('ip', 'IP地址')->readonly();\n $form->datetime('created_at', '中奖时间')->readonly();\n $form->embeds('leaving_capital', '留资信息', function ($form) {\n $form->text('name', '收件人');\n $form->mobile('mobile', '手机号');\n $form->text('address', '收件地址');\n });\n $form->radio('status', '状态')->options([\n '0' => '作废', '1' => '有效'\n ])->default('1');\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Carousel);\n\n $form->select('carousel_category_id', __('carousel::carousel.carousel_category_id'))\n ->options(CarouselCategory::all()->pluck('name', 'id'));\n $form->text('title', __('carousel::carousel.title'));\n $form->text('url', __('carousel::carousel.url'));\n $form->image('img_src', __('carousel::carousel.img_src'))\n ->removable()\n ->uniqueName()\n ->move('carousel');\n $form->text('alt', __('carousel::carousel.alt'));\n $form->textarea('remark', __('carousel::carousel.remark'));\n $form->select('status', __('carousel::carousel.status.label'))\n ->default(1)\n ->options(__('carousel::carousel.status.value'));\n $form->datetime('start_time', __('carousel::carousel.start_time'))\n ->default(date('Y-m-d H:i:s'));\n $form->datetime('end_time', __('carousel::carousel.end_time'))\n ->default(date('Y-m-d H:i:s'));\n\n return $form;\n }", "function SLFramework_Progressbar($length=300, $height=20, $start=0, $insideText=\"\", $id=\"progressbar\") {\r\n\t\t\t$this->length = $length ; \r\n\t\t\t$this->insideText = $insideText ; \r\n\t\t\t$this->height = $height ; \r\n\t\t\t$this->start = $start ; \r\n\t\t\t$this->id = $id ; \r\n\t\t}", "public function form()\n {\n $this->switch('auto_df_switch', __('message.tikuanconfig.auto_df_switch'));\n $this->timeRange('auto_df_stime', 'auto_df_etime', '开启时间');\n $this->text('auto_df_maxmoney', __('message.tikuanconfig.auto_df_maxmoney'))->setWidth(2);\n $this->text('auto_df_max_count', __('message.tikuanconfig.auto_df_max_count'))->setWidth(2);\n $this->text('auto_df_max_sum', __('message.tikuanconfig.auto_df_max_sum'))->setWidth(2);\n\n }", "protected function form() {\n\t\treturn Admin::form(WhtSpiderLogModel::class,function (Form $form) {\n\t\t\t$directors = [\n\t\t\t\t'成功' => 1,\n\t\t\t\t'失败' => 0,\n\t\t\t];\n\t\t\t$form->select('status','状态')->options($directors);\n\t\t\t$form->setAction('采集');\n\t\t});\n\t}", "function buildSettingsForm() {}", "function update_spinner_preview() {\n if (! isset($_POST)) wp_die();\n\n $type = isset($_POST['type']) ? $_POST['type'] : '';\n\n $wfc_preloader_options = $this->wfc_preloader_options();\n WFC_Preloader_Spinners::spinner($type, $wfc_preloader_options['spinner_size'], $wfc_preloader_options['spinner_color']);\n\n wp_die();\n }", "protected function form()\n {\n $form = new Form(new Banner);\n\n $form->text('title', 'Title');\n $form->image('image', 'Image')->rules('required')->move('images/banners');\n $form->switch('status', 'Published')->default(1);\n\n $form->footer(function ($footer) {\n // disable `View` checkbox\n $footer->disableViewCheck();\n\n // disable `Continue editing` checkbox\n $footer->disableEditingCheck();\n\n // disable `Continue Creating` checkbox\n $footer->disableCreatingCheck();\n\n });\n return $form;\n }", "public function renderUploadForm() {}", "function form( $instance ) {\n\t\t\n\t\tTrends()->view->load(\n\t\t\t'/view/backend',\n\t\t\tarray(\n\t\t\t\t'widget' => $this,\n\t\t\t\t'instance' => $instance\n\t\t\t),\n\t\t\tfalse,\n\t\t\tdirname( __FILE__ )\n\t\t);\n\t\t\n\t}", "function form( $instance ){\n\n\t\t\t// $instance Defaults\n\t\t\t$instance_defaults = $this->defaults;\n\n\t\t\t// If we have information in this widget, then ignore the defaults\n\t\t\tif( !empty( $instance ) ) $instance_defaults = array();\n\n\t\t\t// Parse $instance\n\t\t\t$instance = wp_parse_args( $instance, $instance_defaults );\n\n\t\t\textract( $instance, EXTR_SKIP );\n\n\t\t\t$design_bar_components = apply_filters( 'layers_' . $this->widget_id . '_widget_design_bar_components' , array(\n\t\t\t\t\t'layout',\n\t\t\t\t\t'fonts',\n\t\t\t\t\t'custom',\n\t\t\t\t\t'columns',\n\t\t\t\t\t'liststyle',\n\t\t\t\t\t'imageratios',\n\t\t\t\t\t'background',\n\t\t\t\t\t'advanced'\n\t\t\t\t) );\n\n\t\t\t$design_bar_custom_components = apply_filters( 'layers_' . $this->widget_id . '_widget_design_bar_custom_components' , array(\n\t\t\t\t\t'display' => array(\n\t\t\t\t\t\t'icon-css' => 'icon-display',\n\t\t\t\t\t\t'label' => __( 'Display', 'layerswp' ),\n\t\t\t\t\t\t'elements' => array(\n\t\t\t\t\t\t\t\t'text_style' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'text_style' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'text_style' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $text_style ) ) ? $text_style : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Title &amp; Excerpt Position' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t\t\t\t\t'regular' => __( 'Regular' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t\t\t'overlay' => __( 'Overlay' , 'layerswp' )\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'show_media' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_media' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_media' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_media ) ) ? $show_media : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Featured Images' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_titles' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_titles' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_titles' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_titles ) ) ? $show_titles : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Post Titles' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_excerpts' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_excerpts' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_excerpts' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_excerpts ) ) ? $show_excerpts : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Post Excerpts' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n 'excerpt_length' => array(\n 'type' => 'number',\n 'name' => $this->get_field_name( 'excerpt_length' ) ,\n 'id' => $this->get_field_id( 'excerpt_length' ) ,\n 'min' => 0,\n 'max' => 10000,\n 'value' => ( isset( $excerpt_length ) ) ? $excerpt_length : NULL,\n 'label' => __( 'Excerpts Length' , 'layerswp' )\n ),\n\t\t\t\t\t\t\t\t'show_dates' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_dates' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_dates' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_dates ) ) ? $show_dates : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Post Dates' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_author' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_author' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_author' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_author ) ) ? $show_author : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Post Author' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_tags' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_tags' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_tags' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_tags ) ) ? $show_tags : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Tags' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_categories' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_categories' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_categories' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_categories ) ) ? $show_categories : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Categories' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_call_to_action' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_call_to_action' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_call_to_action' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_call_to_action ) ) ? $show_call_to_action : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show \"Read More\" Buttons' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n 'call_to_action' => array(\n 'type' => 'text',\n 'name' => $this->get_field_name( 'call_to_action' ) ,\n 'id' => $this->get_field_id( 'call_to_action' ) ,\n 'value' => ( isset( $call_to_action ) ) ? $call_to_action : NULL,\n 'label' => __( '\"Read More\" Text' , 'layerswp' )\n ),\n\t\t\t\t\t\t\t\t'show_pagination' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_pagination' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_pagination' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_pagination ) ) ? $show_pagination : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Pagination' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t) );\n\n\t\t\t$this->design_bar(\n\t\t\t\t'side', // CSS Class Name\n\t\t\t\tarray(\n\t\t\t\t\t'name' => $this->get_field_name( 'design' ),\n\t\t\t\t\t'id' => $this->get_field_id( 'design' ),\n\t\t\t\t), // Widget Object\n\t\t\t\t$instance, // Widget Values\n\t\t\t\t$design_bar_components, // Standard Components\n\t\t\t\t$design_bar_custom_components // Add-on Components\n\t\t\t); ?>\n\t\t\t<div class=\"layers-container-large\">\n\n\t\t\t\t<?php $this->form_elements()->header( array(\n\t\t\t\t\t'title' => __( 'Post' , 'layerswp' ),\n\t\t\t\t\t'icon_class' =>'post'\n\t\t\t\t) ); ?>\n\n\t\t\t\t<section class=\"layers-accordion-section layers-content\">\n\n\t\t\t\t\t<div class=\"layers-row layers-push-bottom\">\n\t\t\t\t\t\t<p class=\"layers-form-item\">\n\t\t\t\t\t\t\t<?php echo $this->form_elements()->input(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'title' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'title' ) ,\n\t\t\t\t\t\t\t\t\t'placeholder' => __( 'Enter title here' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $title ) ) ? $title : NULL ,\n\t\t\t\t\t\t\t\t\t'class' => 'layers-text layers-large'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t); ?>\n\t\t\t\t\t\t</p>\n\n\t\t\t\t\t\t<p class=\"layers-form-item\">\n\t\t\t\t\t\t\t<?php echo $this->form_elements()->input(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'excerpt' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'excerpt' ) ,\n\t\t\t\t\t\t\t\t\t'placeholder' => __( 'Short Excerpt' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $excerpt ) ) ? $excerpt : NULL ,\n\t\t\t\t\t\t\t\t\t'class' => 'layers-textarea layers-large'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t); ?>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<?php // Grab the terms as an array and loop 'em to generate the $options for the input\n\t\t\t\t\t\t$terms = get_terms( $this->taxonomy );\n\t\t\t\t\t\tif( !is_wp_error( $terms ) ) { ?>\n\t\t\t\t\t\t\t<p class=\"layers-form-item\">\n\t\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id( 'category' ); ?>\"><?php echo __( 'Category to Display' , 'layerswp' ); ?></label>\n\t\t\t\t\t\t\t\t<?php $category_options[ 0 ] = __( 'All' , 'layerswp' );\n\t\t\t\t\t\t\t\tforeach ( $terms as $t ) $category_options[ $t->term_id ] = $t->name;\n\t\t\t\t\t\t\t\techo $this->form_elements()->input(\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'category' ) ,\n\t\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'category' ) ,\n\t\t\t\t\t\t\t\t\t\t'placeholder' => __( 'Select a Category' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t\t'value' => ( isset( $category ) ) ? $category : NULL ,\n\t\t\t\t\t\t\t\t\t\t'options' => $category_options\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</p>\n\t\t\t\t\t\t<?php } // if !is_wp_error ?>\n\t\t\t\t\t\t<p class=\"layers-form-item\">\n\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id( 'posts_per_page' ); ?>\"><?php echo __( 'Number of items to show' , 'layerswp' ); ?></label>\n\t\t\t\t\t\t\t<?php $select_options[ '-1' ] = __( 'Show All' , 'layerswp' );\n\t\t\t\t\t\t\t$select_options = $this->form_elements()->get_incremental_options( $select_options , 1 , 20 , 1);\n\t\t\t\t\t\t\techo $this->form_elements()->input(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'posts_per_page' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'posts_per_page' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $posts_per_page ) ) ? $posts_per_page : NULL ,\n\t\t\t\t\t\t\t\t\t'min' => '-1',\n\t\t\t\t\t\t\t\t\t'max' => '100'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t); ?>\n\t\t\t\t\t\t</p>\n\n\t\t\t\t\t\t<p class=\"layers-form-item\">\n\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id( 'order' ); ?>\"><?php echo __( 'Sort by' , 'layerswp' ); ?></label>\n\t\t\t\t\t\t\t<?php echo $this->form_elements()->input(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'order' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'order' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $order ) ) ? $order : NULL ,\n\t\t\t\t\t\t\t\t\t'options' => $this->form_elements()->get_sort_options()\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t); ?>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t</section>\n\n\t\t\t</div>\n\t\t<?php }", "protected function buildForm()\n\t{\t\n\t\t$mid = $this->Form->newInput( 'hidden' );\n\t\t$mid->set( 'name', 'mid' );\n\t\t$mid->set( 'id', 'mid' );\n\t\t$mid->set( 'value', $this->data['id'] );\n\t\t\n\t\t$submit = $this->Form->newInput( 'submit' );\n\t\t$submit->set( 'name', 'submit' );\n\t\t$submit->set( 'id', 'submit' );\n\t\t$submit->set( 'value', 'Restore' );\n\t}", "protected function Form_Create() {\n\t\t\t$this->txtValue1 = new QTextBox($this);\n\t\t\t\n\t\t\t$this->txtValue2 = new QTextBox($this);\n\t\t\t\n\t\t\t$this->lstOperation = new QListBox($this);\n\t\t\t$this->lstOperation->AddItem('+', 'add');\n\t\t\t$this->lstOperation->AddItem('-', 'subtract');\n\t\t\t$this->lstOperation->AddItem('*', 'multiply');\n\t\t\t$this->lstOperation->AddItem('/', 'divide');\n\t\t\t\n\t\t\t$this->btnCalculate = new QButton($this);\n\t\t\t$this->btnCalculate->Text = 'Calculate';\n\t\t\t$this->btnCalculate->AddAction(new QClickEvent(), new QServerAction('btnCalculate_Click'));\n\t\t\t\n\t\t\t$this->lblResult = new QLabel($this);\n\t\t\t$this->lblResult->HtmlEntities = false;\n\t\t}", "function showform() {\r\n $this->showerror();\r\n\r\n # make sure cursor does not point to invalid index\r\n if ($this->_cursor > ($this->db_count-1)) $this->_cursor = $this->db_count-1;\r\n if ($this->_cursor < 0) $this->_cursor = 0;\r\n\r\n $this->grid_command[] = array('csv',lang('Generate CSV'));\r\n\r\n # prepare javascript validation and confirmation function for each action\r\n echo '<!-- 1223 --> <script type=\"text/javascript\">';\r\n if ($this->action == 'browse') {\r\n echo 'function form_submit_confirm(myform) {\r\n action = myform.elements[\\'act\\'].value;\r\n if (action == \\'del\\') {\r\n if (!confirm(\\''.lang('Are you sure you want to delete').'?\\')) {\r\n return false;\r\n }\r\n myform.submit();\r\n return true;\r\n }\r\n else {\r\n myform.submit();\r\n return true;\r\n }\r\n return false;\r\n }\r\n ';\r\n } else { # callback to function like $this->form_submit_confirm_new()\r\n echo $this->{'form_submit_confirm_'.$this->action}();\r\n }\r\n\r\n echo '</script>';\r\n\r\n echo '<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" summary=\"paging\">'; //style=\"border-collapse: collapse;\"\r\n echo '<tr valign=\"top\">';\r\n\r\n if ($this->action == 'browse') {\r\n if ($this->db_count > 1) {\r\n echo '<td valign=\"top\" nowrap>&nbsp;&nbsp;';\r\n # determine on which index current rowid is\r\n if ($this->_cursor > 0) {\r\n $r = 0;\r\n $url = $_SERVER['PHP_SELF'].'?m='.$this->module.'&amp;act=browse&amp;cursor='.$r.'&amp;orderby='.$this->_orderby.'&amp;sortdir='.$this->_sortdir.'&amp;query='.urlencode($this->_query).'&amp;qf='.urlencode($_REQUEST['qf']);\r\n echo '<a href=\"'.$url.'\"><img src=\"images/b_firstpage.gif\" border=\"0\" alt=\"first record\"></a> ';\r\n $r = $this->_cursor - 1;\r\n $url = $_SERVER['PHP_SELF'].'?m='.$this->module.'&amp;act=browse&amp;cursor='.$r.'&amp;orderby='.$this->_orderby.'&amp;sortdir='.$this->_sortdir.'&amp;query='.urlencode($this->_query).'&amp;qf='.urlencode($_REQUEST['qf']);\r\n echo '<a href=\"'.$url.'\"><img src=\"images/b_prevpage.gif\" border=\"0\" alt=\"prev record\"></a> ';\r\n }\r\n else {\r\n echo '<img src=\"images/bd_firstpage.gif\" border=\"0\" alt=\"first record\"> ';\r\n echo '<img src=\"images/bd_prevpage.gif\" border=\"0\" alt=\"prev record\"> ';\r\n }\r\n\r\n if ($this->_cursor < ($this->db_count -1)) {\r\n $r = $this->_cursor + 1;\r\n $url = $_SERVER['PHP_SELF'].'?m='.$this->module.'&amp;act=browse&amp;cursor='.$r.'&amp;orderby='.$this->_orderby.'&amp;sortdir='.$this->_sortdir.'&amp;query='.urlencode($this->_query).'&amp;qf='.urlencode($_REQUEST['qf']);\r\n echo '<a href=\"'.$url.'\"><img src=\"images/b_nextpage.gif\" border=\"0\" alt=\"next record\"></a> ';\r\n $r = $this->db_count - 1;\r\n $url = $_SERVER['PHP_SELF'].'?m='.$this->module.'&amp;act=browse&amp;cursor='.$r.'&amp;orderby='.$this->_orderby.'&amp;sortdir='.$this->_sortdir.'&amp;query='.urlencode($this->_query).'&amp;qf='.urlencode($_REQUEST['qf']);\r\n echo '<a href=\"'.$url.'\"><img src=\"images/b_lastpage.gif\" border=\"0\" alt=\"last record\"></a> ';\r\n }\r\n else {\r\n echo '<img src=\"images/bd_nextpage.gif\" border=\"0\" alt=\"next record\"> ';\r\n echo '<img src=\"images/bd_lastpage.gif\" border=\"0\" alt=\"last record\"> ';\r\n }\r\n echo '</td>';\r\n }\r\n echo '<form method=\"POST\" action=\"'.$_SERVER['PHP_SELF'].'\">';\r\n echo '<input type=hidden name=m value=\"'.$this->module.'\">';\r\n echo '<input type=hidden name=go value=\"'.htmlentities($GLOBALS['full_self_url']).'\">'; # url to go after successful submitation\r\n echo '<input type=hidden name=\"rowid[]\" value=\"'.$this->ds->_rowid[$this->_cursor].'\">'; # for edit-action\r\n echo '<input type=\"hidden\" name=\"act\">';\r\n echo '<td>&nbsp;&nbsp;';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\'edit\\';form_submit_confirm(this.form);\" value=\"'.lang('Edit').'\" '.(($this->allow_edit and $this->db_count > 0)?'':'disabled').'> ';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\'del\\';form_submit_confirm(this.form);\" value=\"'.lang('Delete').'\" '.(($this->allow_delete and $this->db_count > 0)?'':'disabled').'> ';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\'duplicate\\';form_submit_confirm(this.form);\" value=\"'.lang('Duplicate').'\" '.(($this->allow_duplicate and $this->db_count > 0)?'':'disabled').'> ';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\'view\\';form_submit_confirm(this.form);\" value=\"'.lang('View').'\" '.(($this->allow_view and $this->db_count > 0)?'':'disabled').'> ';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\'new\\';form_submit_confirm(this.form);\" value=\"'.lang('New').'\" '.($this->allow_new?'':'disabled').'> ';\r\n\r\n if (count($this->grid_command))\r\n echo ' | Other: ';\r\n\r\n foreach ($this->grid_command as $command) {\r\n #~ echo '<input type=\"button\" onclick=\"this.form.act.value = \\''.$command[0].'\\';submit_confirm(this.form);\" value=\"'.lang($command[1]).'\"> ';\r\n echo '<input type=\"button\" onclick=\"this.form.act.value = \\''.$command[0].'\\';this.form.submit();\" value=\"'.lang($command[1]).'\"> ';\r\n }\r\n echo '</form>';\r\n echo '</td>';\r\n }\r\n echo '</tr></table>'; //outer table\r\n\r\n if ($this->_query != '') {\r\n if ($this->db_count == 0) {\r\n echo '<p><b>'.lang('The search').' \"'.$this->_query.'\" '.lang('returns no record').'</b>. <a href=\"'.$_SERVER['PHP_SELF'].'?m='.$this->module.'\">'.lang('Reset Search').'</a>.</p>';\r\n return;\r\n }\r\n else {\r\n echo '<p><b>'.lang('The search').' \"'.$this->_query.'\" '.lang('found').' '.$this->db_count.' '.lang($this->unit).'</b>. <a href=\"'.$_SERVER['PHP_SELF'].'?m='.$this->module.'\">'.lang('Reset Search').'</a>.</p>';\r\n }\r\n }\r\n\r\n echo $this->body[$this->action]['prefix']; # show prefix body\r\n\r\n echo '<table border=\"0\" summary=\"form format\">';\r\n # form for new record\r\n echo '<form method=post enctype=\"multipart/form-data\" action=\"'.$_SERVER['PHP_SELF'].'\" onSubmit=\"return form_submit_confirm(this);\" autocomplete=\"off\">';\r\n echo '<input type=hidden name=m value=\"'.$this->module.'\">'; # this module\r\n echo '<input type=hidden name=act value=\"'.$this->action.'\">'; # contains the action (edit/new)\r\n #~ echo '<input type=hidden name=save value=\"'.$this->_save.'\">'; # marker to indicate form submitation\r\n if (!$this->_preview)\r\n echo '<input type=hidden name=save value=\"-1\">'; # marker to indicate form submitation\r\n else\r\n echo '<input type=hidden name=save value=\"1\">'; # marker to indicate form submitation\r\n #~ echo '<input type=hidden name=save value=\"-1\">'; # marker to indicate form submitation\r\n echo '<input type=hidden name=go value=\"'.htmlentities($this->_go).'\">'; # url to go after successful submitation\r\n echo '<input type=hidden name=\"num_row\" value=\"'.$this->db_count.'\">';\r\n echo '<input type=hidden name=\"rowid['.$this->_cursor.']\" value=\"'.$this->ds->_rowid[$this->_cursor].'\">'; # for edit-action\r\n\r\n # decide, which columns to show in form\r\n $this->colgrid = array();\r\n foreach ($this->properties as $key=>$col) {\r\n if ($this->action == 'browse' and $col->hidden) continue;\r\n if ($this->action == 'edit' and !$col->updatable) continue;\r\n if ($this->action == 'new' and !$col->insertable) continue;\r\n $this->colgrid[] = $key;\r\n }\r\n $i = 0; # html table rows\r\n $i2 = 0; # datasource columns\r\n\r\n for ($ci = 0; $ci < count($this->colgrid); $ci++) {\r\n $colvar = $this->colgrid[$ci];\r\n $i2++;\r\n $col = &$this->properties[$colvar];\r\n\r\n if ($col->box_start != '') { # box start append a title line\r\n echo '<tr><td colspan=\"2\"><br><b>'.$col->box_start.'</b></td></tr>';\r\n }\r\n\r\n if ($this->action != 'browse' or $this->browse_mode != 'form' or ($i2 % $this->browse_form_cols == 1)) {\r\n $rowcolour = ($i++ % 2 == 0)? 'greyformlight': 'greyformdark';\r\n echo '<tr class=\"'.$rowcolour.'\">';\r\n }\r\n\r\n echo '<td>';\r\n #~ if ($this->action != 'browse' and $col->required)\r\n #~ echo '<span class=\"asterix\">*</span>';\r\n $label = $col->colspan_label != ''? $col->colspan_label: $col->label;\r\n #~ if ($col->is_key)\r\n #~ echo '<b>'.$label.'</b>';\r\n #~ else\r\n echo $label;\r\n echo '</td>';\r\n\r\n echo '<td>';\r\n $max_colspan = $col->colspan; # save this first, since $col will be change on subsequent loops\r\n for ($colspan=0; $colspan < $max_colspan; $colspan++) {\r\n $colvar = $this->colgrid[$ci + $colspan];\r\n $col = &$this->properties[$colvar];\r\n $value = $this->ds->{$colvar}[$this->_cursor];\r\n if ($this->_preview) { # preview me\r\n echo '<input type=\"hidden\" name=\"field['.$colvar.']['.$this->_cursor.']\" value=\"'.$value.'\">';\r\n echo ' '.$value.' ';\r\n }\r\n else {\r\n echo $col->prefix_text;\r\n if ($this->action == 'browse') {\r\n if ($col->enumerate) { # if field is enumerated, get the enumerate value instead\r\n $value = '';\r\n if (is_string($col->enumerate) and $value != '') {\r\n $e = instantiate_module($col->enumerate);\r\n $value = $e->enum_decode($value);\r\n if ($value === False) {\r\n $col->notes = '<span style=\"color:f00\"><b>(ref?)</b></span> '.$col->notes;\r\n }\r\n }\r\n elseif (is_array($col->enumerate)) {\r\n $value = $col->enumerate[$value];\r\n }\r\n }\r\n elseif ($col->inputtype=='combobox' and $col->choices) { # if field is using simple enumeration, also get the choice value instead\r\n $value = $col->choices[$value];\r\n }\r\n else {\r\n #~ $value = $this->ds->{$colvar}[$rowindex];\r\n #pass\r\n }\r\n\r\n if ($col->inputtype == 'combobox') {\r\n $col->inputtype = 'text';\r\n }\r\n }\r\n\r\n if ($this->action == 'browse' and $this->browse_form_statictext) {\r\n echo '<b>';\r\n echo ' '.$value.' ';\r\n echo '</b>';\r\n }\r\n else {\r\n $this->input_widget(\"field[$colvar][{$this->_cursor}]\", $value, $colvar);\r\n }\r\n }\r\n }\r\n $ci += $max_colspan - 1; # since ->colspan starts at 1\r\n if ($this->action != 'browse' and $this->_save != -1) # edit/add mode and not preview\r\n echo '&nbsp;'.$col->notes;\r\n echo '</td>';\r\n\r\n if ($this->action != 'browse' or $this->browse_mode != 'form' or ($i2 % $this->browse_form_cols == 0)) {\r\n echo \"</tr>\\r\\n\";\r\n }\r\n\r\n if ($col->box_end) {\r\n echo '<tr><td colspan=\"2\"><br></td></tr>';\r\n }\r\n\r\n\r\n }\r\n echo '</table>';\r\n\r\n # show prefix/suffix body\r\n if (method_exists($this, $this->body[$this->action]['suffix'])) # give chance for suffix to execute them self.\r\n echo $this->{$this->body[$this->action]['suffix']}();\r\n else\r\n echo $this->body[$this->action]['suffix'];\r\n\r\n $_submitlabel = ($this->preview[$this->action] and !$this->_preview)? ' '.lang('Preview').' ': ' '.$this->submit_label['new'].' ';\r\n if ($this->action != 'browse') {\r\n echo '<p><input type=submit value=\"'.$_submitlabel.'\"> | ';\r\n #~ echo '<b><a href=\"'.$this->_go.'\">Cancel</a></b></p>';\r\n echo '<input type=button value=\"'.lang('Cancel').'\" onclick=\"window.location=\\''.$this->_go.'\\'\">';\r\n #~ echo '<b><a href=\"\" onclick=\"window.history.back();return false;\">Cancel</a></b>';\r\n }\r\n echo '</form>';\r\n\r\n # show suffix2 body (after previous big form)\r\n if (method_exists($this, $this->body[$this->action]['suffix2'])) # give chance for suffix to execute them self.\r\n echo $this->{$this->body[$this->action]['suffix2']}();\r\n else\r\n echo $this->body[$this->action]['suffix2'];\r\n }", "public function getFormPage()\n {\n return new TwigResponse('image_queue.html');\n }", "public function buildForm(array $form, FormStateInterface $form_state) {\n $form = parent::buildForm($form, $form_state);\n\n $form['help_1'] = [\n '#prefix' => '<p>',\n '#markup' => $this->t('Release content to update the front end of this demo environment with the latest published content changes.'),\n '#suffix' => '</p>',\n '#weight' => -10,\n ];\n\n $form['section_1']['title'] = [\n '#type' => 'item',\n '#prefix' => '<h2>',\n '#markup' => $this->t('1. Release content'),\n '#suffix' => '</h2>',\n ];\n $form['section_1']['selection'] = [\n '#title' => $this->t('Which version of the VA.gov front end would you like to use?'),\n '#type' => 'radios',\n '#options' => [\n 'default' => $this->t('Use default - the frontend version from the time this demo environment was created.'),\n 'choose' => $this->t('Select a different frontend branch/pull request - for example, to see your content in a newer frontend design.'),\n ],\n '#default_value' => 'default',\n ];\n $form['section_1']['git_ref'] = [\n '#type' => 'textfield',\n '#title' => $this->t('Select branch/pull request'),\n '#description' => $this->t('Start typing to select a branch for the frontend version you want to use.'),\n '#autocomplete_route_name' => 'va_gov_build_trigger.front_end_branches_autocomplete',\n '#autocomplete_route_parameters' => [\n 'count' => 10,\n ],\n '#size' => 72,\n '#maxlength' => 1024,\n '#hidden' => TRUE,\n '#states' => [\n 'visible' => [':input[name=\"selection\"]' => ['value' => 'choose']],\n ],\n ];\n\n $form['section_1']['actions']['#type'] = 'actions';\n $form['section_1']['actions']['submit'] = [\n '#type' => 'submit',\n '#value' => $this->t('Release content'),\n '#button_type' => 'primary',\n ];\n\n $form['section_2']['title'] = [\n '#type' => 'item',\n '#prefix' => '<h2>',\n '#markup' => $this->t('2. Wait for the release to complete'),\n '#suffix' => '</h2>',\n ];\n $help_url = Url::fromUri(\n 'https://va-gov.atlassian.net/servicedesk/customer/portal/3/group/8/create/26',\n ['attributes' => ['target' => '_blank']]\n );\n $help_link = Link::fromTextAndUrl($this->t('contact the CMS help desk'), $help_url);\n $description = $this->t(\n 'It may take up to one minute for the status of new content releases to appear here in the queue. Content releases will complete in the order released. If you encounter an error, please @help_link.',\n ['@help_link' => $help_link->toString()]\n );\n $form['section_2']['help'] = [\n '#type' => 'item',\n '#title' => $this->t('Recent content releases'),\n '#description' => $description,\n ];\n $form['section_2']['content_release_status_block'] = $this->getContentReleaseStatusBlock();\n\n $form['section_3']['title'] = [\n '#type' => 'item',\n '#prefix' => '<h2>',\n '#markup' => $this->t('3. Access the frontend environment'),\n '#suffix' => '</h2>',\n ];\n $description = $this->t('Once the release is completed successfully, see how your content will appear to site visitors on the front end.');\n $form['section_3']['environment_target'] = [\n '#type' => 'item',\n '#markup' => $description,\n ];\n $target = $this->environmentDiscovery->getWebUrl();\n $target_url = Url::fromUri($target, ['attributes' => ['target' => '_blank']]);\n $target_link = Link::fromTextAndUrl($this->t('Go to front end'), $target_url);\n $form['section_3']['cta'] = [\n '#type' => 'item',\n '#wrapper_attributes' => ['class' => ['button button--primary']],\n '#markup' => $target_link->toString(),\n ];\n\n return $form;\n }", "function form( $instance ){\n\n\t\t\t// $instance Defaults\n\t\t\t$instance_defaults = $this->defaults;\n\n\t\t\t// If we have information in this widget, then ignore the defaults\n\t\t\tif( !empty( $instance ) ) $instance_defaults = array();\n\n\t\t\t// Parse $instance\n\t\t\t$instance = wp_parse_args( $instance, $instance_defaults );\n\t\t\textract( $instance, EXTR_SKIP );\n\n\t\t\t$design_bar_components = apply_filters( 'layers_' . $this->widget_id . '_widget_design_bar_components' , array(\n\t\t\t\t\t'custom',\n\t\t\t\t\t'advanced'\n\t\t\t\t) );\n\n\t\t\t$design_bar_custom_components = apply_filters( 'layers_' . $this->widget_id . '_widget_design_bar_custom_components' , array(\n\t\t\t\t\t'layout' => array(\n\t\t\t\t\t\t'icon-css' => 'icon-layout-fullwidth',\n\t\t\t\t\t\t'label' => __( 'Layout', 'layerswp' ),\n\t\t\t\t\t\t'wrapper-class' => 'layers-pop-menu-wrapper layers-small',\n\t\t\t\t\t\t'elements' => array(\n\t\t\t\t\t\t\t'layout' => array(\n\t\t\t\t\t\t\t\t'type' => 'select-icons',\n\t\t\t\t\t\t\t\t'label' => __( '' , 'layerswp' ),\n\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'design' ) . '[layout]' ,\n\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'design-layout' ) ,\n\t\t\t\t\t\t\t\t'value' => ( isset( $design['layout'] ) ) ? $design['layout'] : NULL,\n\t\t\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t\t\t'layout-boxed' => __( 'Boxed' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'layout-fullwidth' => __( 'Full Width' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'layout-full-screen' => __( 'Full Screen' , 'layerswp' )\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'display' => array(\n\t\t\t\t\t\t'icon-css' => 'icon-slider',\n\t\t\t\t\t\t'label' => __( 'Slider', 'layerswp' ),\n\t\t\t\t\t\t'elements' => array(\n\t\t\t\t\t\t\t\t'show_slider_arrows' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_slider_arrows' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_slider_arrows' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_slider_arrows ) ) ? $show_slider_arrows : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Slider Arrows' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_slider_dots' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_slider_dots' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_slider_dots' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_slider_dots ) ) ? $show_slider_dots : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Slider Dots' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'autoplay_slides' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'autoplay_slides' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'autoplay_slides' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $autoplay_slides ) ) ? $autoplay_slides : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Autoplay Slides' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'slide_time' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'slide_time' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'slide_time' ) ,\n\t\t\t\t\t\t\t\t\t'min' => 1,\n\t\t\t\t\t\t\t\t\t'max' => 10,\n\t\t\t\t\t\t\t\t\t'placeholder' => __( 'Time in seconds, eg. 2' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $slide_time ) ) ? $slide_time : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Slide Interval' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'data' => array( 'show-if-selector' => '#' . $this->get_field_id( 'autoplay_slides' ), 'show-if-value' => 'true' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'slide_height' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'slide_height' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'slide_height' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $slide_height ) ) ? $slide_height : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Slider Height' , 'layerswp' )\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t) );\n\n\t\t\t$this->design_bar(\n\t\t\t\t'side', // CSS Class Name\n\t\t\t\tarray(\n\t\t\t\t\t'name' => $this->get_field_name( 'design' ),\n\t\t\t\t\t'id' => $this->get_field_id( 'design' ),\n\t\t\t\t), // Widget Object\n\t\t\t\t$instance, // Widget Values\n\t\t\t\t$design_bar_components, // Standard Components\n\t\t\t\t$design_bar_custom_components // Add-on Components\n\t\t\t); ?>\n\t\t\t<div class=\"layers-container-large\" id=\"layers-slide-widget-<?php echo esc_attr( $this->number ); ?>\">\n\n\t\t\t\t<?php $this->form_elements()->header( array(\n\t\t\t\t\t'title' =>'Sliders',\n\t\t\t\t\t'icon_class' =>'slider'\n\t\t\t\t) ); ?>\n\n\t\t\t\t<section class=\"layers-accordion-section layers-content\">\n\t\t\t\t\t\t<?php echo $this->form_elements()->input(\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'type' => 'hidden',\n\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'slide_ids' ) ,\n\t\t\t\t\t\t\t\t'id' => 'slide_ids_input_' . $this->number,\n\t\t\t\t\t\t\t\t'value' => ( isset( $slide_ids ) ) ? $slide_ids : NULL\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t); ?>\n\n\t\t\t\t\t\t<?php // If we have some slides, let's break out their IDs into an array\n\t\t\t\t\t\tif( isset( $slide_ids ) && '' != $slide_ids ) $slides = explode( ',' , $slide_ids ); ?>\n\n\t\t\t\t\t\t<ul id=\"slide_list_<?php echo esc_attr( $this->number ); ?>\" class=\"layers-accordions layers-accordions-sortable layers-sortable\" data-id_base=\"<?php echo $this->id_base; ?>\" data-number=\"<?php echo esc_attr( $this->number ); ?>\">\n\t\t\t\t\t\t\t<?php if( isset( $slides ) && is_array( $slides ) ) { ?>\n\t\t\t\t\t\t\t\t<?php foreach( $slides as $slide ) {\n\t\t\t\t\t\t\t\t\t$this->slide_item( array(\n\t\t\t\t\t\t\t\t\t\t\t\t'id_base' => $this->id_base ,\n\t\t\t\t\t\t\t\t\t\t\t\t'number' => $this->number\n\t\t\t\t\t\t\t\t\t\t\t) ,\n\t\t\t\t\t\t\t\t\t\t\t$slide ,\n\t\t\t\t\t\t\t\t\t\t\t( isset( $instance[ 'slides' ][ $slide ] ) ) ? $instance[ 'slides' ][ $slide ] : NULL );\n\t\t\t\t\t\t\t\t} ?>\n\t\t\t\t\t\t\t<?php } ?>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t<button class=\"layers-button btn-full layers-add-widget-slide add-new-widget\" data-number=\"<?php echo esc_attr( $this->number ); ?>\"><?php _e( 'Add New Slide' , 'layerswp' ) ; ?></button>\n\t\t\t\t</section>\n\n\t\t\t</div>\n\n\t\t<?php }", "private function showProgress()\n {\n $allQuestions = $this->questionRepository->list(['id', 'question']);\n $this->transformProgressList($allQuestions);\n\n $this->console->info( ' ************ Your progress is ************');\n\n foreach ($this->progress as $option) {\n $validate = $option['is_true'] ? __('True') : __('False');\n $this->console->info( ' Question: ' . $option['question']);\n if(null !== $option['is_true'])\n $this->console->info( ' Answer: ' . $option['answer'] . '('.$validate .')');\n $this->console->info( ' ');\n }\n $this->console->info( ' *******************************************');\n }", "private function StartForm(){\r\n\t\t\t$this->formHTML .= \"<form method=\\\"{$this->method}\\\" action=\\\"{$this->action}\\\"\";\r\n\t\t\tif($this->enctype){\r\n\t\t\t\t$this->formHTML .= \" enctype=\\\"{$this->enctype}\\\"\";\r\n\t\t\t}\r\n\t\t\t$this->formHTML .= \" name=\\\"{$this->formName}\\\" class=\\\"c{$this->formName}\\\" id=\\\"i{$this->formName}\\\"\";\r\n\t\t\t$this->formHTML .= \">\";\r\n\t\t}", "protected function definition_inner($mform) {\n\n $mform->addElement('header', 'previewareaheader',\n get_string('previewareaheader', 'qtype_'.$this->qtype()));\n $mform->setExpanded('previewareaheader');\n $mform->addElement('static', 'previewarea', '',\n get_string('previewareamessage', 'qtype_'.$this->qtype()));\n\n $mform->registerNoSubmitButton('refresh');\n $mform->addElement('submit', 'refresh', get_string('refresh', 'qtype_'.$this->qtype()));\n $mform->addElement('filepicker', 'bgimage', get_string('bgimage', 'qtype_'.$this->qtype()),\n null, self::file_picker_options());\n $mform->closeHeaderBefore('dropzoneheader');\n\n // Add the draggable image fields & drop zones to the form.\n list($itemrepeatsatstart, $imagerepeats) = $this->get_drag_item_repeats();\n $this->definition_draggable_items($mform, $itemrepeatsatstart);\n $this->definition_drop_zones($mform, $imagerepeats);\n\n $this->add_combined_feedback_fields(true);\n $this->add_interactive_settings(true, true);\n }", "protected function getForm() {\n $lUpdate = ($this -> mPhraseTyp == 'product') ? 'yes' : 'no';\n $this -> setParam('ref_update', $lUpdate);\n\n $lRet = '<div id=\"job_form\" class=\"frm\">'.LF;\n\t$lRet.= $this -> getFieldForm();\n $lRet.= '</div>' . LF;\n \n /*if($this -> mCanBuild) {\n $lRet.= '<div id=\"save_dialog\" title=\"Publish PDF\" style=\"display:none;\">'.LF;\n\t $lRet.= '<input id=\"templateId\" type=\"hidden\" value=\"\" />'.LF;\n $lRet.= '<iframe src=\"\" onload=\"javascript:GetEditor()\" id=\"chiliEditor\" class=\"dn\" style=\"width:100%;height:100%;\"></iframe>'.LF;\n $lRet.= '</div>'.LF;\n }*/\n \n $lDlg = new CJob_Cms_Content_Dialog($this -> mJobId, $this -> mSrc, $this -> mJob);\n $lRet.= $lDlg -> getContent();\n \n $lRet.= $lDlg -> getModals();\n \n return $lRet;\n }", "public function form_footer_progress_status_proportion_html() {\n\n\t\t?>\n\t\t<div class=\"wpforms-conversational-form-footer-progress-status-proportion\">\n\t\t\t<?php\n\t\t\tprintf(\n\t\t\t\t/* translators: %1$s - Number of fields completed, %2$s - Number of fields in total. */\n\t\t\t\t\\esc_html__(\n\t\t\t\t\t'%1$s of %2$s completed',\n\t\t\t\t\t'wpforms-conversational-forms'\n\t\t\t\t),\n\t\t\t\t'<span class=\"completed\"></span>',\n\t\t\t\t'<span class=\"completed-of\"></span>'\n\t\t\t);\n\t\t\t?>\n\t\t</div>\n\t\t<div class=\"wpforms-conversational-form-footer-progress-status-proportion-completed\" style=\"display: none\">\n\t\t\t<?php \\esc_html_e( 'Form completed', 'wpforms-conversational-forms' ); ?>\n\t\t</div>\n\t\t<?php\n\t}", "function ch_qti2_display_form()\n{\n $name_tools = get_lang('ImportQtiQuiz');\n $form = '<div class=\"actions\">';\n $form .= '<a href=\"' . api_get_path(WEB_CODE_PATH) . 'exercise/exercise.php?show=test&'.api_get_cidreq().'\">'.\n Display :: return_icon('back.png', get_lang('BackToExercisesList'), '', ICON_SIZE_MEDIUM).'</a>';\n $form .= '</div>';\n $formValidator = new FormValidator(\n 'qti_upload',\n 'post',\n api_get_self().\"?\".api_get_cidreq(),\n null,\n array('enctype' => 'multipart/form-data')\n );\n $formValidator->addElement('header', $name_tools);\n $formValidator->addElement('file', 'userFile', get_lang('DownloadFile'));\n $formValidator->addButtonImport(get_lang('Upload'));\n $form .= $formValidator->returnForm();\n echo $form;\n}", "public function form( $instance ) {\n\t\t// Set widget defaults\n\t\t$defaults = array(\n\t\t\t'title' => 'remoteok.io Jobs',\n\t\t\t'page_size' => 10\n\t\t);\n\t\t\n\t\t// Parse current settings with defaults\n extract( wp_parse_args( ( array ) $instance, $defaults ) ); ?>\n \n\t\t<p>\n\t\t\t<label for=\"<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>\"><?php _e( 'Widget Title', 'mtc_text' ); ?></label>\n\t\t\t<input class=\"widefat\" id=\"<?php echo esc_attr( $this->get_field_id( 'title' ) ); ?>\" name=\"<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>\" type=\"text\" value=\"<?php echo esc_attr( $title ); ?>\" />\n\t\t</p>\n\t\t<p>\n\t\t\t<label for=\"<?php echo esc_attr( $this->get_field_id( 'page_size' ) ); ?>\"><?php _e( 'Page Size:', 'mtc_text' ); ?></label>\n\t\t\t<input class=\"widefat\" id=\"<?php echo esc_attr( $this->get_field_id( 'page_size' ) ); ?>\" name=\"<?php echo esc_attr( $this->get_field_name( 'page_size' ) ); ?>\" type=\"number\" min=\"1\" value=\"<?php echo esc_attr( $page_size ); ?>\" />\n\t\t</p>\n\t<?php }", "protected function render() : string\n {\n $html = '<div class=\"progress\">';\n\n foreach ($this->values as $k => $value) {\n $styles = $this->styles($value);\n if (strlen($styles) > 0) {\n $styles = 'style=\"' . trim($styles) . '\"';\n }\n\n $html .= '<div class=\"progress-bar' . $this->classes($this->bg_colors[$k]) . '\" role=\"progressbar\" ' .\n $styles . ' aria-valuenow=\"' . $value . '\" aria-valuemin=\"0\" aria-valuemax=\"100\"></div>';\n }\n\n $html .= '</div>';\n\n return $html;\n }", "protected function form()\n {\n $form = new Form(new $this->currentModel);\n \n $form->display('id', 'ID');\n $form->select('company_id', '公司名称')->options(Company::getSelectOptions());\n $form->text('project_name', '项目名称');\n $form->image('project_photo', '项目图片')->uniqueName()->move('public/photo/images/custom_thum/');\n $form->url('link_url', '项目链接');\n $form->radio('display', '公开度')->options(['0' => '公开', '-1'=> '保密'])->default('0');\n //$form->display('created_at', 'Created At');\n //$form->display('updated_at', 'Updated At');\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Procurement);\n\n $form->number('u_id', 'U id');\n $form->number('brand', 'Brand');\n $form->number('type', 'Type');\n $form->number('models', 'Models');\n $form->number('material', 'Material');\n $form->decimal('area', 'Area');\n $form->radio('status', '审核')->options(['0' => '待审核', '1'=> '通过','2'=>'未通过'])->default('0');\n $form->number('room_city', 'Room city');\n $form->text('address', 'Address');\n $form->number('brick_time', 'Brick time')->default(1);\n $form->text('images', 'Images');\n $form->number('ctime', 'Ctime');\n $form->number('utime', 'Utime');\n\n return $form;\n }", "private function display_progress_bar($args){\n $number_of_steps = count($this->step_ids);\n $current_step = $args['step'];\n\n echo '<ul class=\"list-unstyled\">';\n for($i = 1; $i < $number_of_steps - 1; $i++){\n echo '<li style=\"display:inline-block; margin-right:15px;\">Step ' . $i . '</li>';\n }\n echo '</ul>';\n }", "protected function form()\n {\n $form = new Form(new Direction());\n\n $form->text('name', __(trans('hhx.name')));\n $form->text('intro', __(trans('hhx.intro')));\n $form->image('Img', __(trans('hhx.img')))->move('daily/direction')->uniqueName();\n $form->select('status', __(trans('hhx.status')))->options(config('hhx.status'));;\n $form->number('order_num', __(trans('hhx.order_num')));\n $form->hidden('all_num', __(trans('hhx.all_num')))->default(0.00);\n $form->decimal('stock', __(trans('hhx.stock')));\n\n return $form;\n }", "function buildTabs()\r\n {\r\n $this->_formBuilt = true;\r\n\r\n // Here we get all page names in the controller\r\n $pages = array();\r\n $myName = $current = $this->getAttribute('id');\r\n while (null !== ($current = $this->controller->getPrevName($current))) {\r\n $pages[] = $current;\r\n }\r\n $pages = array_reverse($pages);\r\n $pages[] = $current = $myName;\r\n while (null !== ($current = $this->controller->getNextName($current))) {\r\n $pages[] = $current;\r\n }\r\n // Here we display buttons for all pages, the current one's is disabled\r\n foreach ($pages as $pageName) {\r\n $disabled = ($pageName == $myName ? array('disabled' => 'disabled')\r\n : array());\r\n\r\n $tabs[] = $this->createElement('submit',\r\n $this->getButtonName($pageName),\r\n ucfirst($pageName),\r\n array('class' => 'flat') + $disabled);\r\n }\r\n $this->addGroup($tabs, 'tabs', null, '&nbsp;', false);\r\n }", "public function buildForm(array $form, FormStateInterface $form_state) {\n $form['time_duration'] = [\n '#type' => 'number',\n '#title' => $this->t('Time duration'),\n '#min' => 100,\n '#step' => 100,\n '#description' => $this->t(\n \"Time in seconds from the user's last login. Used as an event to \n update the relationships between the user and companies.\"\n ),\n '#default_value' => $this->config('pmmi_sso.company.settings')->get('time_duration'),\n '#required' => TRUE,\n ];\n $form['submit'] = [\n '#type' => 'submit',\n '#value' => $this->t('Save'),\n ];\n return $form;\n }", "protected function form()\n {\n return Admin::form(QQAlbum::class, function (Form $form) {\n\n $form->display('id', 'ID');\n\n $form->display('created_at', 'Created At');\n $form->display('updated_at', 'Updated At');\n });\n }", "protected function form()\n {\n $form = new Form(new DbTop());\n $form->select('status', __(trans('hhx.status')))->options(config('hhx.db_status'));;\n $form->text('pan_url', __(trans('hhx.pan_url')));\n $form->text('pan_code', __(trans('hhx.pan_code')));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new ScanRechargeOrder());\n $form->select('scan_recharge_channel_id', __('scan-recharge::order.scan_recharge_channel_id'))\n ->options(ScanRechargeChannel::select('id', 'name')->pluck('name', 'id'))\n ->required();\n $form->text('user_id', __('scan-recharge::order.user_id'))\n ->required()\n ->help(__('scan-recharge::order.user_id_help'));\n $form->currency('amount', __('scan-recharge::order.amount'))->symbol('¥')\n ->default(0)\n ->required();\n $form->textarea('desc', __('scan-recharge::order.desc'))\n ->required()\n ->help(__('scan-recharge::order.desc_help'));\n $form->textarea('reply', __('scan-recharge::order.reply'))\n ->help(__('scan-recharge::order.reply_help'));\n $form->select('status', __('scan-recharge::order.status'))\n ->options(__('scan-recharge::order.status_value'));\n $form->saving(function (Form $form) {\n if ($form->status == 1 && $form->model()->id) {\n RechargeSuccessUserAccountJob::dispatch(ScanRechargeOrder::find($form->model()->id));\n }\n });\n return $form;\n }", "public function doRender(){\r\n\t\t$label = ($this->label != '') ? Label::get($this)->doRender() : '';\r\n\r\n\t\treturn\r\n\t\t\t '<div class=\"'.$this->printWrapperClasses().'\">'\r\n\t\t\t\t.$label\r\n\t\t\t\t.'<div class=\"'.parent::WIDGETCLASS.'\">'\r\n\t\t\t\t\t.'<input'\r\n\t\t\t\t\t\t.$this->printId()\r\n\t\t\t\t\t\t.$this->printName()\r\n\t\t\t\t\t\t.' type=\"file\"'\r\n\t\t\t\t\t\t.$this->printTitle()\r\n\t\t\t\t\t\t.$this->printAccept()\r\n\t\t\t\t\t\t.$this->printSize()\r\n\t\t\t\t\t\t.$this->printMaxLength()\r\n\t\t\t\t\t\t.$this->printCssClasses()\r\n\t\t\t\t\t\t.$this->printJavascriptEventHandler()\r\n\t\t\t\t\t\t.$this->printTabindex()\r\n\t\t\t\t\t\t.$this->printReadonly()\r\n\t\t\t\t\t\t.$this->printDisabled()\r\n\t\t\t\t\t\t.$this->masterForm->printSlash()\r\n\t\t\t\t\t.'>'\r\n\t\t\t\t.'</div>'\r\n\t\t\t\t.$this->masterForm->printFloatBreak()\r\n\t\t\t.'</div>'\r\n\t\t;\r\n\t}", "private function loadForm()\n {\n // init settings form\n $this->frm = new Form('settings');\n\n // add festival year\n $this->frm->addText('year', $this->get('fork.settings')->get($this->URL->getModule(), 'year'));\n\n // add fields for pagination\n $this->frm->addDropdown(\n 'overview_num_items',\n array_combine(range(1, 30), range(1, 30)),\n $this->get('fork.settings')->get($this->URL->getModule(), 'overview_num_items', 10)\n );\n $this->frm->addDropdown(\n 'recent_festival_list_num_items',\n array_combine(range(1, 30), range(1, 30)),\n $this->get('fork.settings')->get($this->URL->getModule(), 'recent_festival_list_num_items', 5)\n );\n\n // add functions fields\n $this->frm->addCheckbox('cover_image_enabled', $this->get('fork.settings')->get($this->URL->getModule(), 'cover_image_enabled', false));\n $this->frm->addCheckbox('cover_image_required', $this->get('fork.settings')->get($this->URL->getModule(), 'cover_image_required', false));\n $this->frm->addCheckbox('multi_images_enabled', $this->get('fork.settings')->get($this->URL->getModule(), 'multi_images_enabled', false));\n\n // add god user only fields\n if ($this->godUser) {\n $this->frm->addText('image_size_limit', (float) $this->get('fork.settings')->get($this->URL->getModule(), 'image_size_limit', 10));\n }\n }", "public function buildForm()\n {\n $this->add('organization_identifier_code', 'text', ['label' => trans('elementForm.organisation_identifier_code')])\n ->add('provider_activity_id', 'text', ['label' => trans('elementForm.provider_activity_id')])\n ->addSelect('type', $this->getCodeList('OrganisationType', 'Activity'), trans('elementForm.type'), $this->addHelpText('Activity_ParticipatingOrg-type'))\n ->addNarrative('provider_org_narrative')\n ->addAddMoreButton('add_provider_org_narrative', 'provider_org_narrative');\n }", "public function render()\n {\n return view('components::element.progress');\n }", "protected function form()\n {\n $form = new Form(new Goodss);\n $form->switch('is_enable','状态')->options([\n 'on' => ['value' => 1, 'text' => '正常', 'color' => 'primary'],\n 'off' => ['value' => 0, 'text' => '禁止', 'color' => 'default'],\n ]);\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`删除`按钮\n $tools->disableDelete();\n // 去掉`查看`按钮\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n\n // 去掉`重置`按钮\n //$footer->disableReset();\n\n // 去掉`提交`按钮\n //$footer->disableSubmit();\n\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n return $form;\n }", "private function build_form()\n {\n $ldm = LaikaDataManager :: get_instance();\n\n // The Laika Scales\n $scales = $ldm->retrieve_laika_scales(null, null, null, new ObjectTableOrder(LaikaScale :: PROPERTY_TITLE));\n $scale_options = array();\n while ($scale = $scales->next_result())\n {\n $scale_options[$scale->get_id()] = $scale->get_title();\n }\n\n // The Laika Percentile Codes\n $codes = $ldm->retrieve_percentile_codes();\n $code_options = array();\n foreach ($codes as $code)\n {\n $code_options[$code] = $code;\n }\n\n $this->addElement('category', Translation :: get('Dates'));\n $this->add_timewindow(self :: GRAPH_FILTER_START_DATE, self :: GRAPH_FILTER_END_DATE, Translation :: get('StartTimeWindow'), Translation :: get('EndTimeWindow'), false);\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Groups', null, 'group'));\n\n $group_options = $this->get_groups();\n\n if (count($group_options) > 0)\n {\n if (count($group_options) < 10)\n {\n $count = count($group_options);\n }\n else\n {\n $count = 10;\n }\n\n $this->addElement('select', self :: GRAPH_FILTER_GROUP, Translation :: get('Group', null, Utilities::GROUP), $this->get_groups(), array('multiple', 'size' => $count));\n $this->addRule(self :: GRAPH_FILTER_GROUP, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n }\n else\n {\n $this->addElement('static', 'group_text', Translation :: get('Group'), Translation :: get('NoGroupsAvailable'));\n $this->addElement('hidden', self :: GRAPH_FILTER_GROUP, null);\n }\n\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Results'));\n $this->addElement('select', self :: GRAPH_FILTER_SCALE, Translation :: get('Scale'), $scale_options, array('multiple', 'size' => '10'));\n $this->addRule(self :: GRAPH_FILTER_SCALE, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n $this->addElement('select', self :: GRAPH_FILTER_CODE, Translation :: get('Code'), $code_options, array('multiple', 'size' => '4'));\n $this->addRule(self :: GRAPH_FILTER_CODE, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Options'));\n\n $group = array();\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderGraphAndTable'), LaikaGraphRenderer :: RENDER_GRAPH_AND_TABLE);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderGraph'), LaikaGraphRenderer :: RENDER_GRAPH);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderTable'), LaikaGraphRenderer :: RENDER_TABLE);\n $this->addGroup($group, self :: GRAPH_FILTER_TYPE, Translation :: get('RenderType'), '<br/>', false);\n\n $allow_save = PlatformSetting :: get('allow_save', LaikaManager :: APPLICATION_NAME);\n if ($allow_save == true)\n {\n $this->addElement('checkbox', self :: GRAPH_FILTER_SAVE, Translation :: get('SaveToRepository'));\n }\n\n $maximum_attempts = PlatformSetting :: get('maximum_attempts', LaikaManager :: APPLICATION_NAME);\n if ($maximum_attempts > 1)\n {\n $group = array();\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('OnlyIncludeFirstAttempt'), LaikaGraphRenderer :: RENDER_ATTEMPT_FIRST);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('OnlyIncludeMostRecentAttempt'), LaikaGraphRenderer :: RENDER_ATTEMPT_LAST);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('IncludeAllAttempts'), LaikaGraphRenderer :: RENDER_ATTEMPT_ALL);\n $this->addGroup($group, self :: GRAPH_FILTER_ATTEMPT, Translation :: get('AttemptsToInclude'), '<br/>', false);\n }\n else\n {\n $this->addElement('hidden', self :: GRAPH_FILTER_ATTEMPT, LaikaGraphRenderer :: RENDER_ATTEMPT_ALL);\n }\n\n $this->addElement('category');\n\n $buttons = array();\n\n $buttons[] = $this->createElement('style_submit_button', 'submit', Translation :: get('Filter', null, Utilities::COMMON_LIBRARIES), array('class' => 'normal search'));\n $buttons[] = $this->createElement('style_reset_button', 'reset', Translation :: get('Reset', null, Utilities::COMMON_LIBRARIES), array('class' => 'normal empty'));\n\n $this->addGroup($buttons, 'buttons', null, '&nbsp;', false);\n }", "public function displayForm() {\n\t\t$output = $this->getOutput();\n\n\t\t$form_class = $this->adapter->getFormClass();\n\t\t// TODO: use interface. static ctor.\n\t\tif ( $form_class && class_exists( $form_class ) ){\n\t\t\t$form_obj = new $form_class();\n\t\t\t$form_obj->setGateway( $this->adapter );\n\t\t\t$form_obj->setGatewayPage( $this );\n\t\t\t$form = $form_obj->getForm();\n\t\t\t$output->addModules( $form_obj->getResources() );\n\t\t\t$output->addModuleStyles( $form_obj->getStyleModules() );\n\t\t\t$output->addHTML( $form );\n\t\t} else {\n\t\t\t$this->logger->error( \"Displaying fail page for bad form class '$form_class'\" );\n\t\t\t$this->displayFailPage( false );\n\t\t}\n\t}", "function renderForm()\t{\n\n\t\t$fields[] = $this->renderField( $GLOBALS['LANG']->getLL('settings'), 'divider', '');\n\t\t$fields[] = $this->renderField( $GLOBALS['LANG']->getLL('spaceTitle'), 'text', 'title');\n\t\n\t\tif(count($this->error) > 0) {\n\t\t\t$form .= \"<span style='display:block;color:red;font-weight:bold;padding:10px;'>\" .\n\t\t\t\t\t\t\t implode(\"<br />\", $this->error) . \n\t\t\t\t\t \"</span>\";\t\n\t\t}\n\n\t\t$form .= \"<form action=\" . t3lib_div::getThisUrl() . \"><table border='0' cellpadding='7'>\";\n\t\t$form .= implode(\"\\n\", $fields);\n\t\t$form .= \"<tr><td colspan='2' align='right'>\" .\n\t\t\t\t \"<input type='hidden' name='formPosted' value='1'>\" . \n\t\t\t\t \"<input type='submit' value='\" . $GLOBALS['LANG']->getLL('createSpace') . \"'></td></tr></table></form>\";\n\n\t\treturn $form;\n\t}", "public function displayForm() {\n\t\t$output = $this->getOutput();\n\n\t\t$form_class = $this->adapter->getFormClass();\n\t\t// TODO: use interface. static ctor.\n\t\tif ( $form_class && class_exists( $form_class ) ) {\n\t\t\t$form_obj = new $form_class();\n\t\t\t$form_obj->setGateway( $this->adapter );\n\t\t\t$form_obj->setGatewayPage( $this );\n\t\t\t$form = $form_obj->getForm();\n\t\t\t$output->addModules( $form_obj->getResources() );\n\t\t\t$output->addModuleStyles( $form_obj->getStyleModules() );\n\t\t\t$output->addHTML( $form );\n\t\t} else {\n\t\t\t$this->logger->error( \"Displaying fail page for bad form class '$form_class'\" );\n\t\t\t$this->displayFailPage( false );\n\t\t}\n\t}", "function buildForm(){\n\t\t# menampilkan form\n\t}", "public function getPanel() {\n $isAdditionalBar = \\TracyDebugger::isAdditionalBar();\n $out = \"<h1>{$this->icon} {$this->label}\" . ($isAdditionalBar ? \" (\".$isAdditionalBar.\")\" : \"\") . \"</h1>\";\n\n $out .= '<span class=\"tracy-icons\"><span class=\"resizeIcons\"><a href=\"#\" title=\"Maximize / Restore\" onclick=\"tracyResizePanel(\\'' . $this->className . '\\')\">+</a></span></span>';\n\n // panel body\n $out .= '<div class=\"tracy-inner\">';\n\n $numOrphanFiles = count($this->orphanFiles);\n\n if($numOrphanFiles > 0) {\n $out .= '\n <form style=\"display:inline\" method=\"post\" action=\"'.\\TracyDebugger::inputUrl(true).'\" onsubmit=\"return confirm(\\'Do you really want to delete all the orange highlighted orphan files?\\');\">\n <input type=\"hidden\" name=\"orphanPaths\" value=\"'.implode('|', $this->orphanFiles).'\" />\n <input type=\"submit\" style=\"color:'.\\TracyDebugger::COLOR_WARN.' !important; color: #FFFFFF\" name=\"deleteOrphanFiles\" value=\"Delete '.$numOrphanFiles.' orphan'._n('', 's', $numOrphanFiles).'\" />\n </form>&nbsp&nbsp;';\n }\n\n if($this->numMissingFiles > 0) {\n $out .= '\n <form style=\"display:inline\" method=\"post\" action=\"'.\\TracyDebugger::inputUrl(true).'\" onsubmit=\"return confirm(\\'Do you really want to delete all the red highlighted missing pagefiles?\\');\">\n <input type=\"hidden\" name=\"missingPaths\" value=\"'.urlencode(json_encode($this->missingFiles)).'\" />\n <input type=\"submit\" style=\"color:'.\\TracyDebugger::COLOR_ALERT.' !important; color: #FFFFFF\" name=\"deleteMissingFiles\" value=\"Delete '.$this->numMissingFiles.' missing pagefile'._n('', 's', $this->numMissingFiles).'\" />\n </form>';\n }\n\n if($numOrphanFiles > 0 || $this->numMissingFiles > 0) {\n $out .= '<br /><br />';\n }\n\n $out .= '<div id=\"tracyPageFilesList\">'.$this->filesListStr.'</div>';\n\n $out .= \\TracyDebugger::generatePanelFooter($this->name, \\Tracy\\Debugger::timer($this->name), strlen($out));\n $out .= '</div>';\n\n return parent::loadResources() . $out;\n }", "function renderWholeForm() {\n\t\t$output = $this->renderCurrentStep();\n\t\t$output .= $this->renderSubmitButtons();\n\n\t\treturn $this->wrapWithForm ($output);\n\t}", "public function buildForm()\n {\n $this\n ->addNarrative('location_description_narrative')\n ->addAddMoreButton('add', 'location_description_narrative');\n }", "protected function form()\n {\n $form = new Form(new Resources);\n\n $form->text('name', '名称')->rules('required',['required' => '请输入 配置项的名称']);\n\n $form->radio('type', '类型')->options(Resources::TYPE);\n\n $form->cropper('url','图片');\n\n $form->number('sort_num','排序');\n\n $form->textarea('memo','备注');\n\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`删除`按钮\n $tools->disableDelete();\n\n // 去掉`查看`按钮\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new ThemePoster());\n\n $form->select('domain_id', __('domain_id'))->options(DomainConfig::getDomainMap())->rules('required');\n $form->radio('type', __('type'))->options(ThemePoster::getTypeMap())->when(1, function (Form $form){\n $form->select('type_id', __('type_id'))->options(array_merge(['0' => '总列表'], Product::getCategoryMap()->toArray()))->rules('required');\n\n })->when(2, function (Form $form){\n $form->select('type_id', __('type_id'))->options(array_merge(['0' => '总列表'], Article::getCategoryMap()))->rules('required');\n\n });\n $form->text('title', __('title'))->rules('required');\n $form->text('alt', __('alt'))->rules('required');\n $form->image('site', '图片尺寸 1600*300')\n ->uniqueName()\n ->rules('required|max:150')->resize(1600, 300);\n $form->url('link', __('link'));\n $form->switch('is_show', __('is_show'));\n\n return $form;\n }", "function form($instance) {\n\t\t\n\t\t$defaults= array(\t\t\t\t\n\t\t\t'skill_title' => 'Skill',\n\t\t\t'skill_level' => '70',\t\t\t\n\t\t\t'skill_color' => '#ebebeb'\t\t\n\t\t);\n\t\t\n\t\t$instance = wp_parse_args($instance, $defaults);\n\t\textract($instance);\n\t\t\n\t\t?>\n\t\t\n\t\t<p class=\"description\">\n\t\t\t<label for=\"<?php echo $this->get_field_id('skill_title') ?>\">\n\t\t\t\tSkill Title<br/>\n\t\t\t\t<?php echo aq_field_input('skill_title', $block_id, $skill_title) ?>\t\t\n\t\t\t</label>\n\t\t</p>\n\t\t<p class=\"description\">\n\t\t\t<label for=\"<?php echo $this->get_field_id('skill_level') ?>\">\n\t\t\t\tSkill Level<br/>\n\t\t\t\t<?php echo aq_field_input('skill_level', $block_id, $skill_level, 'min', 'number') ?>\n\t\t\t</label>\n\t\t</p>\n\t\t<div class=\"description\">\n\t\t\t<label for=\"<?php echo $this->get_field_id('skill_color') ?>\">\n\t\t\t\tSkill Graph Color<br/>\n\t\t\t\t<?php echo aq_field_color_picker('skill_color', $block_id, $skill_color) ?>\n\t\t\t</label>\n\t\t\t\n\t\t</div>\n\t\t\n\t\t\n\t\t<?php\n\t\t\n\t}", "protected function form()\n {\n $form = new Form(new Activity());\n\n $form->text('log_name', __('Log name'));\n $form->text('description', __('Description'));\n $form->number('subject_id', __('Subject id'));\n $form->text('subject_type', __('Subject type'));\n $form->number('causer_id', __('Causer id'));\n $form->text('causer_type', __('Causer type'));\n $form->textarea('properties', __('Properties'));\n\n return $form;\n }", "function createCtfEstimateForm($extra=false) {\n\t// check if coming directly from a session\n\t$expId = $_GET['expId'];\n\tif ($expId) {\n\t\t$sessionId=$expId;\n\t\t$formAction=$_SERVER['PHP_SELF'].\"?expId=$expId\";\n\t}\n\telse {\n\t\t$sessionId=$_POST['sessionId'];\n\t\t$formAction=$_SERVER['PHP_SELF'];\t\n\t}\n\t$projectId=getProjectId();\n\n\t// check if running ctffind or ctftilt\n\t$progname = \"Xmipp CTF Estimator\";\n\t$runbase = \"xmippctf\";\n\n\t$presetval = ($_POST['preset']) ? $_POST['preset'] : 'en';\n\t$javafunctions = \"\";\n\t$javafunctions .= writeJavaPopupFunctions('appion');\n\tprocessing_header(\"$progname Launcher\", \"$progname\", $javafunctions);\n\n\tif ($extra) {\n\t\techo \"<font color='#cc3333' size='+2'>$extra</font>\\n<hr/>\\n\";\n\t}\n\n\techo\"\n\t<form name='viewerform' method='POST' action='$formAction'>\\n\";\n\t$sessiondata=getSessionList($projectId,$expId);\n\t$sessioninfo=$sessiondata['info'];\n\t$presets=$sessiondata['presets'];\n\tif (!empty($sessioninfo)) {\n\t\t$sessionpath=getBaseAppionPath($sessioninfo).'/ctf/';\n\t}\n\t$ctf = new particledata();\n\t$lastrunnumber = $ctf->getLastRunNumberForType($sessionId,'ApAceRunData','name'); \n\twhile (file_exists($sessionpath.$runbase.'run'.($lastrunnumber+1)))\n\t\t$lastrunnumber += 1;\n\t$defrunname = ($_POST['runname']) ? $_POST['runname'] : $runbase.'run'.($lastrunnumber+1);\n\n\t// set defaults and check posted values\n\t$form_fieldsz = ($_POST['fieldsize']) ? $_POST['fieldsize'] : 512;\n\t$form_resmin = ($_POST['resmin']) ? $_POST['resmin'] : '100';\n\t$form_resmax = ($_POST['resmax']) ? $_POST['resmax'] : '10';\n\n\techo\"\n\t<TABLE BORDER=0 CLASS=tableborder CELLPADDING=15>\n\t<TR>\n\t <TD VALIGN='TOP'>\";\n\n\tcreateAppionLoopTable($sessiondata, $defrunname, \"ctf\");\n\techo\"\n\t </TD>\n\t <TD CLASS='tablebg'>\";\n\n\techo \"<b>$progname Values</b><br/>\\n\";\n\techo \"<INPUT TYPE='text' NAME='fieldsize' VALUE='$form_fieldsz' size='6'>\\n\";\n\techo docpop('field','Field Size');\n\techo \"<br />\\n\";\n\techo \"<input type='text' name='resmin' value='$form_resmin' size='6'>\\n\";\n\techo docpop('resmin','Minimum Resolution');\n\techo \" (&Aring;ngstroms)<br />\\n\";\n\techo \"<input type='text' name='resmax' value='$form_resmax' size='6'>\\n\";\n\techo docpop('resmax','Maximum Resolution');\n\techo \" (&Aring;ngstroms)<br />\\n\";\n\techo \"<br />\\n\";\n\n\techo\"\n\t </TD>\n\t</tr>\n\t<TR>\n\t <TD COLSPAN='2' ALIGN='CENTER'>\\n<hr />\";\n\techo getSubmitForm(\"Run $progname\");\n\techo \"\n\t </td>\n\t</tr>\n\t</table>\n\t</form>\\n\";\n\n\techo referenceBox(\"Fast, robust, and accurate determination of transmission electron microscopy contrast transfer function.\", 2007, \"Sorzano CO, Jonic S, Núñez-Ramírez R, Boisset N, Carazo JM.\", \"J Struct Biol.\", 160, 2, 17911028, false, false, \"img/xmipp_logo.png\");\n\n\tprocessing_footer();\n}", "function build() {\n\t\t$this->order_id = new view_field(\"Order ID\");\n\t\t$this->timestamp = new view_field(\"Date\");\n\t\t$this->total_amount = new view_field(\"Amount\");\n $this->view= new view_element(\"static\");\n \n $translations = new translations(\"fields\");\n $invoice_name = $translations->translate(\"fields\",\"Invoice\",true);\n $this->view->value=\"<a href=\\\"/orders/order_details.php?order_id={$this->_order_id}\\\" target=\\\"invoice\\\">\".$invoice_name.\"</a>\";\n\n\t\tif(isset($_SESSION['wizard']['complete']['process_time']))\n\t\t{\n\t\t\t$this->process_time = new view_field(\"Seconds to process\");\n\t\t\t$this->process_time->value=$_SESSION['wizard']['complete']['process_time'];\n\t\t\t$this->server = new view_field();\n\t\t\t$address_parts = explode('.',$_SERVER['SERVER_ADDR']);\n\t\t\t$this->server->value = $address_parts[count($address_parts) - 1];\n\t\t}\n\t\tparent::build();\n\t}", "protected function form()\n {\n $form = new Form(new Good);\n $form->text('name', __('名称'))->rules('required');\n $form->decimal('amount', __('价格'))->default(0.00)->rules('required');\n $form->text('unit', __('单位'))->rules('required');\n $form->image('list_img', __('缩略图(320*320)'))->creationRules('required');\n $form->hasMany('goodsimgs', __('轮播图(640*640)'),function(Form\\NestedForm $form){\n $form->image('img',__('轮播图'))->creationRules('required');\n });\n $form->kindeditor('describe', __('描述'));\n // 去掉`查看`checkbox\n $form->disableViewCheck();\n // 去掉`继续编辑`checkbox\n $form->disableEditingCheck();\n // 去掉`继续创建`checkbox\n $form->disableCreatingCheck();\n return $form;\n }", "protected function form()\n {\n $form = new Form(new LotteryCode());\n\n $form->text('code', __('Code'));\n $form->number('batch_num', __('Batch num'));\n $form->text('prizes_name', __('Prizes name'));\n $form->datetime('valid_period', __('Valid period'))->default(date('Y-m-d H:i:s'));\n $form->datetime('prizes_time', __('Prizes time'))->default(date('Y-m-d H:i:s'));\n $form->text('operator', __('Operator'));\n $form->switch('award_status', __('Award status'));\n\n return $form;\n }", "public function renderProgressBar()\n {\n if (!isset($this->progressBarOptions['id'])) {\n $this->progressBarOptions['id'] = $this->options['id'] . static::ID_PROGRESS_SUFFIX;\n }\n if (!isset($this->clientOptions['progressBarId'])) {\n $this->clientOptions['progressBarId'] = $this->progressBarOptions['id'];\n }\n return Html::tag($this->progressBarTag, '', $this->progressBarOptions);\n }", "protected function getForm() {\n\t\tglobal $wgScript;\n\n\t\t$this->opts['title'] = $this->getPageTitle()->getPrefixedText();\n\t\tif ( !isset( $this->opts['target'] ) ) {\n\t\t\t$this->opts['target'] = '';\n\t\t} else {\n\t\t\t$this->opts['target'] = str_replace( '_', ' ', $this->opts['target'] );\n\t\t}\n\n\t\tif ( !isset( $this->opts['namespace'] ) ) {\n\t\t\t$this->opts['namespace'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['nsInvert'] ) ) {\n\t\t\t$this->opts['nsInvert'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['associated'] ) ) {\n\t\t\t$this->opts['associated'] = false;\n\t\t}\n\n\t\tif ( !isset( $this->opts['contribs'] ) ) {\n\t\t\t$this->opts['contribs'] = 'user';\n\t\t}\n\n\t\tif ( !isset( $this->opts['year'] ) ) {\n\t\t\t$this->opts['year'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['month'] ) ) {\n\t\t\t$this->opts['month'] = '';\n\t\t}\n\n\t\tif ( $this->opts['contribs'] == 'newbie' ) {\n\t\t\t$this->opts['target'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['tagfilter'] ) ) {\n\t\t\t$this->opts['tagfilter'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['topOnly'] ) ) {\n\t\t\t$this->opts['topOnly'] = false;\n\t\t}\n\n\t\tif ( !isset( $this->opts['newOnly'] ) ) {\n\t\t\t$this->opts['newOnly'] = false;\n\t\t}\n\n\t\t$form = Html::openElement(\n\t\t\t'form',\n\t\t\tarray(\n\t\t\t\t'method' => 'get',\n\t\t\t\t'action' => $wgScript,\n\t\t\t\t'class' => 'mw-contributions-form'\n\t\t\t)\n\t\t);\n\n\t\t# Add hidden params for tracking except for parameters in $skipParameters\n\t\t$skipParameters = array(\n\t\t\t'namespace',\n\t\t\t'nsInvert',\n\t\t\t'deletedOnly',\n\t\t\t'target',\n\t\t\t'contribs',\n\t\t\t'year',\n\t\t\t'month',\n\t\t\t'topOnly',\n\t\t\t'newOnly',\n\t\t\t'associated'\n\t\t);\n\n\t\tforeach ( $this->opts as $name => $value ) {\n\t\t\tif ( in_array( $name, $skipParameters ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$form .= \"\\t\" . Html::hidden( $name, $value ) . \"\\n\";\n\t\t}\n\n\t\t$tagFilter = ChangeTags::buildTagFilterSelector( $this->opts['tagfilter'] );\n\n\t\tif ( $tagFilter ) {\n\t\t\t$filterSelection = Html::rawElement(\n\t\t\t\t'td',\n\t\t\t\tarray( 'class' => 'mw-label' ),\n\t\t\t\tarray_shift( $tagFilter )\n\t\t\t);\n\t\t\t$filterSelection .= Html::rawElement(\n\t\t\t\t'td',\n\t\t\t\tarray( 'class' => 'mw-input' ),\n\t\t\t\timplode( '&#160', $tagFilter )\n\t\t\t);\n\t\t} else {\n\t\t\t$filterSelection = Html::rawElement( 'td', array( 'colspan' => 2 ), '' );\n\t\t}\n\n\t\t$labelNewbies = Xml::radioLabel(\n\t\t\t$this->msg( 'sp-contributions-newbies' )->text(),\n\t\t\t'contribs',\n\t\t\t'newbie',\n\t\t\t'newbie',\n\t\t\t$this->opts['contribs'] == 'newbie',\n\t\t\tarray( 'class' => 'mw-input' )\n\t\t);\n\t\t$labelUsername = Xml::radioLabel(\n\t\t\t$this->msg( 'sp-contributions-username' )->text(),\n\t\t\t'contribs',\n\t\t\t'user',\n\t\t\t'user',\n\t\t\t$this->opts['contribs'] == 'user',\n\t\t\tarray( 'class' => 'mw-input' )\n\t\t);\n\t\t$input = Html::input(\n\t\t\t'target',\n\t\t\t$this->opts['target'],\n\t\t\t'text',\n\t\t\tarray( 'size' => '40', 'required' => '', 'class' => 'mw-input' ) +\n\t\t\t\t( $this->opts['target'] ? array() : array( 'autofocus' )\n\t\t\t\t)\n\t\t);\n\t\t$targetSelection = Html::rawElement(\n\t\t\t'td',\n\t\t\tarray( 'colspan' => 2 ),\n\t\t\t$labelNewbies . '<br />' . $labelUsername . ' ' . $input . ' '\n\t\t);\n\n\t\t$namespaceSelection = Xml::tags(\n\t\t\t'td',\n\t\t\tarray( 'class' => 'mw-label' ),\n\t\t\tXml::label(\n\t\t\t\t$this->msg( 'namespace' )->text(),\n\t\t\t\t'namespace',\n\t\t\t\t''\n\t\t\t)\n\t\t);\n\t\t$namespaceSelection .= Html::rawElement(\n\t\t\t'td',\n\t\t\tnull,\n\t\t\tHtml::namespaceSelector(\n\t\t\t\tarray( 'selected' => $this->opts['namespace'], 'all' => '' ),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'namespace',\n\t\t\t\t\t'id' => 'namespace',\n\t\t\t\t\t'class' => 'namespaceselector',\n\t\t\t\t)\n\t\t\t) . '&#160;' .\n\t\t\t\tHtml::rawElement(\n\t\t\t\t\t'span',\n\t\t\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\t\t\tXml::checkLabel(\n\t\t\t\t\t\t$this->msg( 'invert' )->text(),\n\t\t\t\t\t\t'nsInvert',\n\t\t\t\t\t\t'nsInvert',\n\t\t\t\t\t\t$this->opts['nsInvert'],\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'title' => $this->msg( 'tooltip-invert' )->text(),\n\t\t\t\t\t\t\t'class' => 'mw-input'\n\t\t\t\t\t\t)\n\t\t\t\t\t) . '&#160;'\n\t\t\t\t) .\n\t\t\t\tHtml::rawElement( 'span', array( 'style' => 'white-space: nowrap' ),\n\t\t\t\t\tXml::checkLabel(\n\t\t\t\t\t\t$this->msg( 'namespace_association' )->text(),\n\t\t\t\t\t\t'associated',\n\t\t\t\t\t\t'associated',\n\t\t\t\t\t\t$this->opts['associated'],\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'title' => $this->msg( 'tooltip-namespace_association' )->text(),\n\t\t\t\t\t\t\t'class' => 'mw-input'\n\t\t\t\t\t\t)\n\t\t\t\t\t) . '&#160;'\n\t\t\t\t)\n\t\t);\n\n\t\tif ( $this->getUser()->isAllowed( 'deletedhistory' ) ) {\n\t\t\t$deletedOnlyCheck = Html::rawElement(\n\t\t\t\t'span',\n\t\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\t\tXml::checkLabel(\n\t\t\t\t\t$this->msg( 'history-show-deleted' )->text(),\n\t\t\t\t\t'deletedOnly',\n\t\t\t\t\t'mw-show-deleted-only',\n\t\t\t\t\t$this->opts['deletedOnly'],\n\t\t\t\t\tarray( 'class' => 'mw-input' )\n\t\t\t\t)\n\t\t\t);\n\t\t} else {\n\t\t\t$deletedOnlyCheck = '';\n\t\t}\n\n\t\t$checkLabelTopOnly = Html::rawElement(\n\t\t\t'span',\n\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\tXml::checkLabel(\n\t\t\t\t$this->msg( 'sp-contributions-toponly' )->text(),\n\t\t\t\t'topOnly',\n\t\t\t\t'mw-show-top-only',\n\t\t\t\t$this->opts['topOnly'],\n\t\t\t\tarray( 'class' => 'mw-input' )\n\t\t\t)\n\t\t);\n\t\t$checkLabelNewOnly = Html::rawElement(\n\t\t\t'span',\n\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\tXml::checkLabel(\n\t\t\t\t$this->msg( 'sp-contributions-newonly' )->text(),\n\t\t\t\t'newOnly',\n\t\t\t\t'mw-show-new-only',\n\t\t\t\t$this->opts['newOnly'],\n\t\t\t\tarray( 'class' => 'mw-input' )\n\t\t\t)\n\t\t);\n\t\t$extraOptions = Html::rawElement(\n\t\t\t'td',\n\t\t\tarray( 'colspan' => 2 ),\n\t\t\t$deletedOnlyCheck . $checkLabelTopOnly . $checkLabelNewOnly\n\t\t);\n\n\t\t$dateSelectionAndSubmit = Xml::tags( 'td', array( 'colspan' => 2 ),\n\t\t\tXml::dateMenu(\n\t\t\t\t$this->opts['year'] === '' ? MWTimestamp::getInstance()->format( 'Y' ) : $this->opts['year'],\n\t\t\t\t$this->opts['month']\n\t\t\t) . ' ' .\n\t\t\t\tXml::submitButton(\n\t\t\t\t\t$this->msg( 'sp-contributions-submit' )->text(),\n\t\t\t\t\tarray( 'class' => 'mw-submit' )\n\t\t\t\t)\n\t\t);\n\n\t\t$form .= Xml::fieldset( $this->msg( 'sp-contributions-search' )->text() );\n\t\t$form .= Html::rawElement( 'table', array( 'class' => 'mw-contributions-table' ), \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $targetSelection ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $namespaceSelection ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $filterSelection ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $extraOptions ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $dateSelectionAndSubmit ) . \"\\n\"\n\t\t);\n\n\t\t$explain = $this->msg( 'sp-contributions-explain' );\n\t\tif ( !$explain->isBlank() ) {\n\t\t\t$form .= \"<p id='mw-sp-contributions-explain'>{$explain->parse()}</p>\";\n\t\t}\n\n\t\t$form .= Xml::closeElement( 'fieldset' ) . Xml::closeElement( 'form' );\n\n\t\treturn $form;\n\t}", "public function form()\n {\n $this->switch('footer_remove', Support::trans('main.footer_remove'))\n ->default(admin_setting('footer_remove'));\n $defaultColors = [\n 'default' => '墨蓝',\n 'blue' => '蓝',\n 'blue-light' => '亮蓝',\n 'green' => '墨绿',\n ];\n foreach (explode(\",\", ServiceProvider::setting('additional_theme_colors')) as $value) {\n if (!empty($value)) {\n [$k, $v] = explode(\":\", $value);\n $defaultColors[$k] = $v;\n }\n }\n\n $this->radio('theme_color', Support::trans('main.theme_color'))\n ->options($defaultColors)\n ->default(admin_setting('theme_color'));\n $this->radio('sidebar_style', Support::trans('main.sidebar_style'))\n ->options([\n 'default' => '默认',\n 'sidebar-separate' => '菜单分离',\n 'horizontal_menu' => '水平菜单'\n ])\n ->default(admin_setting('sidebar_style'));\n $this->switch('grid_row_actions_right', Support::trans('main.grid_row_actions_right'))\n ->help('启用后表格行操作按钮将永远贴着最右侧。')\n ->default(admin_setting('grid_row_actions_right'));\n }", "protected function form()\n {\n $form = new Form(new StationBannerImage());\n\n $form->select('station_id', __('測站'))->options(Station::all()->pluck('station_name', 'id'))->rules('required');\n $form->image('image', __('輪播圖'))->help('圖片尺寸:2297*1583')->rules('required');\n $form->url('url', __('連結'))->placeholder('例:http://www.cwb.gov.tw');\n $form->text('order', __('排序'));\n $form->datetime('valid_at', __('有效日期'))->default(date('Y-m-d H:i:s'));\n $form->text('mod_user', __('異動人員'))->default(Admin::user()->name)->readonly();\n $form->saving(function (Form $form) {\n $form->mod_user = Admin::user()->name;\n });\n\n return $form;\n }", "public function showForm($iniValues = NULL) {\n\t\t$form [] = '<form action=\"\" class=\"editor\" method=\"post\">';\n\t\t$form [] = \"<div class='box-inside-form'>\";\n\t\t$form [] = '<label for=\"title\">Titel</label>';\n\t\t$form [] = '<input type=\"text\" id=\"title\" name=\"title\" value=\"' . $iniValues ['title'] . '\">';\n\t\t$form [] = '<label for=\"category\">Kategorie</label>';\n\t\t$k = parent::distinct ( \"category\" );\n\t\t$category = '<input list=\"category\" name=\"category\" value=\"' . $iniValues ['category'] . '\">';\n\t\t$category .= '<datalist id=\"category\">';\n\t\twhile ( $k ) {\n\t\t\t$category .= '<option value=\"' . array_shift ( $k ) . '\">';\n\t\t}\n\t\t$form [] = $category . '</datalist>';\n\t\tif ($chapter) {\n\t\t\t$form [] = '<label for=\"chapter\">Kapitel</label>';\n\t\t\tif (empty ( $iniValues ['chapter'] )) {\n\t\t\t\t$chap = 0;\n\t\t\t} else {\n\t\t\t\t$chap = $iniValues ['chapter'];\n\t\t\t}\n\t\t\t$form [] = '<input type=\"number\" id=\"chapter\" name=\"chapter\" size=\"3\" value=\"' . $chap . '\" min=\"0\">';\n\t\t}\n\t\t$form [] = '<label for=\"keywords\">Schlagworte</label> <input type=\"text\"\n\t\t\t\t\t\t\t\tid=\"keywords\" name=\"keywords\" value=\"' . $iniValues ['keywords'] . '\">';\n\t\t$form [] = '<label for=\"status\">Status</label>';\n\t\t$form [] = '<select id=\"status\"\tname=\"status\">\n\t\t\t\t\t\t<option value=\"public\">sichtbar</option>\n\t\t\t\t\t\t<option value=\"draft\">Entwurf</option>\n\t\t\t\t\t\t<option value=\"archive\">Archiv</option>\n\t\t\t\t\t</select>';\n\t\t$form [] = \"</div><div style='clear:both'></div>\";\n\t\t$form [] = '<textarea id=\"editor\" name=\"text\">' . $iniValues ['text'] . '</textarea>';\n\t\tif ($iniValues) {\n\t\t\t$form [] = Registry::makeUpdateButton ();\n\t\t\t$form [] = Registry::makeDeleteButton ();\n\t\t\t$form [] = '<input type=\"hidden\" id=\"id\" name=\"id\" value=\"' . $iniValues ['id'] . '\">';\n\t\t\t$form [] = '<input type=\"hidden\" id=\"page\" name=\"page\" value=\"' . $iniValues ['page'] . '\">';\n\t\t} else {\n\t\t\t$form [] = Registry::makeInsertButton ();\n\t\t}\n\t\t$form [] = '</form>';\n\t\t\n\t\techo implode ( \"\\n\", $form );\n\t}", "protected function initializeForm()\n {\n $this->form = new Form();\n $this->form->add(Element::create(\"FieldSet\",\"Report Format\")->add\n (\n Element::create(\"SelectionList\", \"File Format\", \"report_format\")\n ->addOption(\"Hypertext Markup Language (HTML)\",\"html\")\n ->addOption(\"Portable Document Format (PDF)\",\"pdf\")\n ->addOption(\"Microsoft Excel (XLS)\",\"xls\")\n ->addOption(\"Microsoft Word (DOC)\",\"doc\")\n ->setRequired(true)\n ->setValue(\"pdf\"),\n Element::create(\"SelectionList\", \"Page Orientation\", \"page_orientation\")\n ->addOption(\"Landscape\", \"L\")\n ->addOption(\"Portrait\", \"P\")\n ->setValue(\"L\"),\n Element::create(\"SelectionList\", \"Paper Size\", \"paper_size\")\n ->addOption(\"A4\", \"A4\")\n ->addOption(\"A3\", \"A3\")\n ->setValue(\"A4\")\n )->setId(\"report_formats\")->addAttribute(\"style\",\"width:50%\")\n );\n $this->form->setSubmitValue(\"Generate\");\n $this->form->addAttribute(\"action\",Application::getLink($this->path.\"/generate\"));\n $this->form->addAttribute(\"target\",\"blank\");\n }", "protected function form()\n {\n $form = new Form(new BuSong);\n\n// $form->number('serialid', __('Serialid'));\n $form->text('svrkey', __('svrkey'));\n $form->text('songname', __('歌名'));\n $form->text('singer', __('歌星'));\n $form->select('langtype', __('语种'))->options([0=>'国语',1=>'粤语',2=>'英语',3=>'台语',4=>'日语',5=>'韩语',6=>'不详']);\n $form->text('remarks', __('备注'));\n $form->datetime('createdate', __('创建时间'))->default(date('Y-m-d H:i:s'));\n $form->select('ischeck', __('是否检查'))->options([0=>'否',1=>'是']);\n $form->select('buState', __('状态'))->options([0=>'新增',1=>'处理中',2=>'完成',3=>'歌曲信息出错',4=>'取消无法处理',5=>'已上传',6=>'彻底删除']);\n $form->text('musicdbpk', __('musicdbpk'));\n $form->text('optionRemarks', __('操作日志'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Product());\n\n $form->text('product_core', __('Product core'));\n $form->text('title', __('Title'));\n $form->text('long_title', __('Long title'));\n $form->text('bar_code', __('Bar code'));\n $form->number('category_id', __('Category id'));\n $form->switch('status', __('Status'));\n $form->select('audit_status', '审核状态')->options(\n [0 => '未进行审核', 1 => '审核已通过', 2 => '审核未通过']\n );\n $form->number('shop_id', __('Shop id'));\n $form->number('description_id', __('Description id'));\n $form->decimal('rating', __('Rating'));\n $form->number('sold_count', __('Sold count'));\n $form->number('review_count', __('Review count'));\n $form->decimal('price', __('Price'));\n $form->image('image', __('Image'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Project());\n $form->text('name', '项目名称')->rules('required')->required();\n $form->url('url', '项目地址')->rules('required')->required();\n $form->text('username', '账号');\n $form->text('password', '密码');\n $status = [\n 'on' => ['value' => 1, 'text' => '启用', 'color' => 'success'],\n 'off' => ['value' => 2, 'text' => '禁用', 'color' => 'danger'],\n ];\n $form->switch('status', '状态')->states($status)->default(1);\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableDelete();\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n $footer->disableReset();\n $footer->disableViewCheck();\n $footer->disableEditingCheck();\n $footer->disableCreatingCheck();\n });\n\n return $form;\n }", "function buildForm()\n {\n $this->buildTabs();\n // tab caption\n $this->addElement('header', null, 'Specify file role for specific files');\n\n $fe =& PEAR_PackageFileManager_Frontend::singleton();\n $sess =& $fe->container();\n\n $selection = $this->getSubmitValue('files');\n $selection_count = count($selection);\n $fe->log('debug',\n str_pad($this->getAttribute('id') .'('. __LINE__ .')', 20, '.') .\n ' selection='. serialize($selection)\n );\n\n list($page, $action) = $this->controller->getActionName();\n\n // selection list (false) or edit dialog frame (true)\n if ($action == 'edit' && $selection_count > 0) {\n $editDialog = true;\n }elseif ($action == 'save') {\n $editDialog = true;\n } else {\n $editDialog = false;\n }\n\n if (!$editDialog) {\n\n foreach ($sess['defaults']['_files']['mapping'] as $fn) {\n $pinfo = pathinfo($fn);\n $ext[] = $pinfo['extension'];\n }\n $extensions = array_unique($ext);\n $extensions[] = '-None-';\n sort($extensions, SORT_ASC);\n $extensions = array_combine($extensions, $extensions);\n\n // Role options list: (value => text, with value === text)\n $pageName = $fe->getPageName('page1');\n $releaseType = $fe->exportValue($pageName, 'packageType');\n $roles = PEAR_Installer_Role::getValidRoles($releaseType);\n $roles[] = '-None-';\n sort($roles, SORT_ASC);\n $roles = array_combine($roles, $roles);\n\n $filters = array();\n $filters[] = &HTML_QuickForm::createElement('select', 'extensionFilter', 'Extension', $extensions);\n $filters[] = &HTML_QuickForm::createElement('select', 'roleFilter', 'Role', $roles);\n $filters[] = &HTML_QuickForm::createElement('submit', $this->getButtonName('sort'), 'Apply');\n $this->addGroup($filters, 'filters', 'Filters applied on list :', '', false);\n\n $hdr = array('Path', 'Role');\n $table = new HTML_Table(array('class' => 'tableone'));\n $htmltableDecorator = new PEAR_PackageFileManager_Frontend_Decorator_HTMLTable($fe);\n $htmltableDecorator->setHtmlTable($table);\n $htmltableDecorator->getExceptionList($hdr);\n // We need a simple static html area for maintainers list.\n $this->addElement('static', 'exceptions', '', $htmltableDecorator->toHtml());\n\n $def = array('extensionFilter' => '-None-', 'roleFilter' => '-None-');\n $this->setDefaults($def);\n\n $commands = array('edit', 'remove');\n $nocmd = array('commit', 'reset');\n\n } else {\n\n // we need a multiple-select box for list of file targets\n $rPath =& $this->addElement('select', 'exceptfiles');\n $rPath->setMultiple(true);\n $rPath->setLabel('Path:');\n $rPath->freeze();\n\n // Role options list: (value => text, with value === text)\n $pageName = $fe->getPageName('page1');\n $releaseType = $fe->exportValue($pageName, 'packageType');\n $roles = PEAR_Installer_Role::getValidRoles($releaseType);\n $roles[] = '';\n sort($roles, SORT_ASC);\n $roles = array_combine($roles, $roles);\n $this->addElement('select', 'role', 'Role:', $roles);\n\n if ($selection_count == 0) {\n $key1 = -1;\n $def = array();\n } else {\n $keys = $needle = array_keys($selection);\n $key1 = array_shift($needle);\n\n $files = array();\n foreach($keys as $k) {\n $files[$k] = $sess['files']['mapping'][$k];\n }\n $rPath->load($files, $keys);\n $def = array('exceptfiles' => $keys);\n }\n\n // applies new filters to the element values\n $this->applyFilter('__ALL__', 'trim');\n\n // old values of edit user\n $this->setDefaults($def);\n\n $commands = array('save', 'cancel');\n $nocmd = array('commit','reset');\n }\n\n // Buttons of the wizard to do the job\n $this->buildButtons($nocmd, $commands);\n }", "public function buildForm()\n {\n $this\n ->add(\n 'new_organization_group',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\OrganizationGroupInformation',\n 'label' => false,\n ]\n ]\n )\n ->add(\n 'group_admin_information',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\GroupAdmin',\n 'label' => false,\n ]\n ]\n )\n ->addSaveButton();\n }", "protected function form()\n {\n $form = new Form(new Terrace());\n\n $form->image('image', __('平台图片'))->rules('required', ['required' => '平台图片不能为空']);\n $form->text('name', __('平台名称'))->rules('required', ['required' => '平台名称不能为空']);\n $form->text('path', __('外链'))->rules('required', ['required' => '平台外链不能为空']);\n $form->text('notice_info', __('提示语'))->rules('required', ['required' => '平台提示语不能为空']);\n $form->radio('status','状态')->options(['1' => '未推荐', '2'=> '已推荐'])->default(1);\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new GithubRepositories());\n\n $form->text('name', __('项目名'));\n $form->text('full_name', __('项目全名'));\n $form->textarea('description', __('简介'));\n $form->textarea('owner', __('作者资料'));\n $form->textarea('html_url', __('网页地址'));\n $form->textarea('original_data', __('原始数据'));\n\n return $form;\n }", "protected function createComponentProjectForm(): Form {\n $form = new Form; \n\n //Get all available project types for select field\n $types = $this->database->table('types');\n $types_arr = array();\n foreach($types as $type) {\n $types_arr[$type->id] = $type->title;\n }\n\n $form->addText('title', \"Project Title:\")\n ->setRequired()\n ->addRule($form::MAX_LENGTH, 'The Project title need to be less than %d character long', 60);\n\n $form->addSelect(\"type_id\", \"Project Type\", $types_arr)\n ->setRequired();\n\n $form->addText('start_date', \"Start Date\")\n ->setHtmlType('date')\n ->setRequired();\n\n $form->addText('end_date', \"End Date\")\n ->setHtmlType('date')\n ->setRequired();\n\n $form->addSubmit('send', \"Publish Project\");\n\n $form->onSuccess[] = [$this, 'projectFormSucceeded'];\n\n return $form;\n }", "public function form( $instance ) {\n\n\t\t\t/* Set up some default widget settings. */\n\t\t\t$defaults \t\t\t= array();\n\t\t\t$instance \t\t\t= wp_parse_args( (array) $instance, $defaults ); \t\t\n\t\t\t$title1\t\t\t\t= isset( $instance['title1'] ) ? strip_tags($instance['title1']) : ''; \n\t\t\t$description \t\t= isset( $instance['description'] ) ? \tstrip_tags($instance['description']) : '';\n\t\t\t$categoryid \t\t= isset( $instance['category'] ) ? $instance['category'] : 0;\n\t\t\t$select_order \t= isset( $instance['select_order'] ) ? strip_tags($instance['select_order']) : 'latest';\n\t\t\t$orderby \t\t= isset( $instance['orderby'] ) ? strip_tags($instance['orderby']) : 'ID';\n\t\t\t$order \t\t= isset( $instance['order'] ) ? strip_tags($instance['order']) : 'ASC';\n\t\t\t$number \t\t= isset( $instance['numberposts'] ) ? intval($instance['numberposts']) : 5;\n\t\t\t$item_row \t\t= isset( $instance['item_row'] ) \t? intval($instance['item_row']) : 1;\n\t\t\t$tab_active \t\t= isset( $instance['tab_active'] ) ? intval($instance['tab_active']) : 1;\n\t\t\t$columns \t\t= isset( $instance['columns'] ) ? intval($instance['columns']) : 1;\n\t\t\t$autoplay \t\t= isset( $instance['autoplay'] ) ? strip_tags($instance['autoplay']) : 'false';\n\t\t\t$interval \t\t= isset( $instance['interval'] ) ? intval($instance['interval']) : 5000;\n\t\t\t$scroll \t\t= isset( $instance['scroll'] ) ? intval($instance['scroll']) : 1;\n\t\t\t$widget_template = isset( $instance['widget_template'] ) ? strip_tags($instance['widget_template']) : 'default';\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t?>\n\n\t\t\t</p> \n\t\t\t <div style=\"background: Blue; color: white; font-weight: bold; text-align:center; padding: 3px\"> * Data Config * </div>\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('title1'); ?>\"><?php _e('Title', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('title1'); ?>\" name=\"<?php echo $this->get_field_name('title1'); ?>\"\n\t\t\t\t\ttype=\"text\"\tvalue=\"<?php echo esc_attr($title1); ?>\" />\n\t\t\t</p>\n\t\t\t\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('description'); ?>\"><?php _e('Description', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('description'); ?>\" name=\"<?php echo $this->get_field_name('description'); ?>\"\n\t\t\t\t\ttype=\"text\"\tvalue=\"<?php echo esc_attr($description); ?>\" />\n\t\t\t</p>\n\t\t\t\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('category'); ?>\"><?php _e('Category', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<?php echo $this->category_select('category', array('allow_select_all' => true), $categoryid); ?>\n\t\t\t</p>\n\t\t\t\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('select_order'); ?>\"><?php _e('Select Order', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<?php $allowed_key = array('latest' => 'Latest Products', 'rating' => 'Top Rating Products', 'bestsales' => 'Best Selling Products', 'featured' => 'Featured Products'); ?>\n\t\t\t\t<select class=\"widefat\"\n\t\t\t\t\tid=\"<?php echo $this->get_field_id('select_order'); ?>\"\n\t\t\t\t\tname=\"<?php echo $this->get_field_name('select_order'); ?>\">\n\t\t\t\t\t<?php\n\t\t\t\t\t$option ='';\n\t\t\t\t\tforeach ($allowed_key as $value => $key) :\n\t\t\t\t\t\t$option .= '<option value=\"' . $value . '\" ';\n\t\t\t\t\t\tif ($value == $select_order){\n\t\t\t\t\t\t\t$option .= 'selected=\"selected\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$option .= '>'.$key.'</option>';\n\t\t\t\t\tendforeach;\n\t\t\t\t\techo $option;\n\t\t\t\t\t?>\n\t\t\t\t</select>\n\t\t\t</p>\n\t\t\t\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('orderby'); ?>\"><?php _e('Orderby', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<?php $allowed_keys = array('name' => 'Name', 'author' => 'Author', 'date' => 'Date', 'title' => 'Title', 'modified' => 'Modified', 'parent' => 'Parent', 'ID' => 'ID', 'rand' =>'Rand', 'comment_count' => 'Comment Count'); ?>\n\t\t\t\t<select class=\"widefat\"\n\t\t\t\t\tid=\"<?php echo $this->get_field_id('orderby'); ?>\"\n\t\t\t\t\tname=\"<?php echo $this->get_field_name('orderby'); ?>\">\n\t\t\t\t\t<?php\n\t\t\t\t\t$option ='';\n\t\t\t\t\tforeach ($allowed_keys as $value => $key) :\n\t\t\t\t\t\t$option .= '<option value=\"' . $value . '\" ';\n\t\t\t\t\t\tif ($value == $orderby){\n\t\t\t\t\t\t\t$option .= 'selected=\"selected\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$option .= '>'.$key.'</option>';\n\t\t\t\t\tendforeach;\n\t\t\t\t\techo $option;\n\t\t\t\t\t?>\n\t\t\t\t</select>\n\t\t\t</p>\n\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('order'); ?>\"><?php _e('Order', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<select class=\"widefat\"\n\t\t\t\t\tid=\"<?php echo $this->get_field_id('order'); ?>\" name=\"<?php echo $this->get_field_name('order'); ?>\">\n\t\t\t\t\t<option value=\"DESC\" <?php if ($order=='DESC'){?> selected=\"selected\"\n\t\t\t\t\t<?php } ?>>\n\t\t\t\t\t\t<?php _e('Descending', 'sw_woocommerce')?>\n\t\t\t\t\t</option>\n\t\t\t\t\t<option value=\"ASC\" <?php if ($order=='ASC'){?> selected=\"selected\"\t<?php } ?>>\n\t\t\t\t\t\t<?php _e('Ascending', 'sw_woocommerce')?>\n\t\t\t\t\t</option>\n\t\t\t\t</select>\n\t\t\t</p>\n\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('numberposts'); ?>\"><?php _e('Number of Posts', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('numberposts'); ?>\" name=\"<?php echo $this->get_field_name('numberposts'); ?>\"\n\t\t\t\t\ttype=\"text\"\tvalue=\"<?php echo esc_attr($number); ?>\" />\n\t\t\t</p>\n\t\t\t\n\t\t\t<?php $row_number = array( '1' => 1, '2' => 2, '3' => 3 ); ?>\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('item_row'); ?>\"><?php _e('Number row per column: ', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<select class=\"widefat\"\n\t\t\t\t\tid=\"<?php echo $this->get_field_id('item_row'); ?>\"\n\t\t\t\t\tname=\"<?php echo $this->get_field_name('item_row'); ?>\">\n\t\t\t\t\t<?php\n\t\t\t\t\t$option ='';\n\t\t\t\t\tforeach ($row_number as $key => $value) :\n\t\t\t\t\t\t$option .= '<option value=\"' . $value . '\" ';\n\t\t\t\t\t\tif ($value == $item_row){\n\t\t\t\t\t\t\t$option .= 'selected=\"selected\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$option .= '>'.$key.'</option>';\n\t\t\t\t\tendforeach;\n\t\t\t\t\techo $option;\n\t\t\t\t\t?>\n\t\t\t\t</select>\n\t\t\t</p> \n\t\t\t\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('tab_active'); ?>\"><?php _e('Tab active: ', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<input class=\"widefat\"\n\t\t\t\t\tid=\"<?php echo $this->get_field_id('tab_active'); ?>\" name=\"<?php echo $this->get_field_name('tab_active'); ?>\" type=\"text\" \n\t\t\t\t\tvalue=\"<?php echo esc_attr($tab_active); ?>\" />\n\t\t\t</p> \n\t\t\t\n\t\t\t<?php $number = array('1' => 1, '2' => 2, '3' => 3, '4' => 4, '5' => 5, '6' => 6); ?>\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('columns'); ?>\"><?php _e('Number of Columns >1200px: ', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<select class=\"widefat\"\n\t\t\t\t\tid=\"<?php echo $this->get_field_id('columns'); ?>\"\n\t\t\t\t\tname=\"<?php echo $this->get_field_name('columns'); ?>\">\n\t\t\t\t\t<?php\n\t\t\t\t\t$option ='';\n\t\t\t\t\tforeach ($number as $key => $value) :\n\t\t\t\t\t\t$option .= '<option value=\"' . $value . '\" ';\n\t\t\t\t\t\tif ($value == $columns){\n\t\t\t\t\t\t\t$option .= 'selected=\"selected\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$option .= '>'.$key.'</option>';\n\t\t\t\t\tendforeach;\n\t\t\t\t\techo $option;\n\t\t\t\t\t?>\n\t\t\t\t</select>\n\t\t\t</p> \n\t\t\t\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('autoplay'); ?>\"><?php _e('Auto Play', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<select class=\"widefat\"\n\t\t\t\t\tid=\"<?php echo $this->get_field_id('autoplay'); ?>\" name=\"<?php echo $this->get_field_name('autoplay'); ?>\">\n\t\t\t\t\t<option value=\"false\" <?php if ($autoplay=='false'){?> selected=\"selected\"\n\t\t\t\t\t<?php } ?>>\n\t\t\t\t\t\t<?php _e('False', 'sw_woocommerce')?>\n\t\t\t\t\t</option>\n\t\t\t\t\t<option value=\"true\" <?php if ($autoplay=='true'){?> selected=\"selected\"\t<?php } ?>>\n\t\t\t\t\t\t<?php _e('True', 'sw_woocommerce')?>\n\t\t\t\t\t</option>\n\t\t\t\t</select>\n\t\t\t</p>\n\t\t\t\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('interval'); ?>\"><?php _e('Interval', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('interval'); ?>\" name=\"<?php echo $this->get_field_name('interval'); ?>\"\n\t\t\t\t\ttype=\"text\"\tvalue=\"<?php echo esc_attr($interval); ?>\" />\n\t\t\t</p>\n\t\t\t\n\t\t\t\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('scroll'); ?>\"><?php _e('Total Items Slided', 'sw_woocommerce')?></label>\n\t\t\t\t<br />\n\t\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('scroll'); ?>\" name=\"<?php echo $this->get_field_name('scroll'); ?>\"\n\t\t\t\t\ttype=\"text\"\tvalue=\"<?php echo esc_attr($scroll); ?>\" />\n\t\t\t</p>\n\t\t\t\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $this->get_field_id('widget_template'); ?>\"><?php _e(\"Template\", 'sw_woocommerce')?></label>\n\t\t\t\t<br/>\n\t\t\t\t\n\t\t\t\t<select class=\"widefat\"\n\t\t\t\t\tid=\"<?php echo $this->get_field_id('widget_template'); ?>\"\tname=\"<?php echo $this->get_field_name('widget_template'); ?>\">\n\t\t\t\t\t<option value=\"default\" <?php if ($widget_template=='default'){?> selected=\"selected\"\n\t\t\t\t\t<?php } ?>>\n\t\t\t\t\t\t<?php _e('Default', 'sw_woocommerce')?>\n\t\t\t\t\t</option>\t\t\t\t\n\t\t\t\t</select>\n\t\t\t</p> \n\t\t<?php\n\t\t}", "function form_content()\r\n {\r\n $table = html_table($this->_width,0,4) ;\r\n $table->set_style(\"border: 0px solid\") ;\r\n\r\n $table->add_row($this->element_label($this->getUploadFileLabel()),\r\n $this->element_form($this->getUploadFileLabel())) ;\r\n\r\n $td = html_td(null, null, $this->element_form('Override Z0 Record Validation')) ;\r\n $td->set_tag_attribute('colspan', 2) ;\r\n $table->add_row($td) ;\r\n\r\n $this->add_form_block(null, $table) ;\r\n }", "protected function form()\n {\n $form = new Form(new video());\n\n $form->text('video_title', __('标题'))->attribute('autocomplete', 'off')->required()->rules('required|max:100');\n\n $form->checkbox('tags','标签')->options(Tag::all()->where('tag_status', Tag::STATUS_TRUE)->pluck('tag_name', 'id'));\n\n $form->textarea('video_describe', __('视频简介'));\n\n $form->image('video_img','封面图')->required()->removable();\n\n $form->chunk_file('video_link', '所属视频')->attribute('accept', 'video/*')->rules('required');\n\n $form->number('video_click', __('点击量'))->rules('required')->default(0);\n\n $form->switch('video_show', __('是否显示'))->states(config('system.show'))->default(1);\n\n $form->switch('video_recommend', __('是否推荐'))->states(config('system.recommend'))->default(1);\n\n $form->number('video_sort', __('admin.sort'))->rules('required')->default(100);\n\n //保存后回调\n $form->saved(function (Form $form) {\n\n });\n return $form;\n }", "protected function form()\n {\n $form = new Form(new UserHealth());\n\n $form->number('height', __('Height'));\n $form->number('weight', __('Weight'));\n $form->text('blood_pressure', __('Blood pressure'));\n $form->text('sugar_level', __('Sugar level'));\n $form->text('blood_type', __('Blood type'));\n $form->decimal('muscle_mass', __('Muscle mass'))->default(0);\n $form->text('metabolism', __('Metabolism'));\n $form->textarea('genetic_history', __('Genetic history'));\n $form->textarea('illness_history', __('Illness history'));\n $form->textarea('allergies', __('Allergies'));\n $form->textarea('prescription', __('Prescription'));\n $form->textarea('operations', __('Operations'));\n $form->number('user_id', __('User id'));\n\n return $form;\n }", "public function stepStart($data, $form)\n {\n if (!$data) return;\n\n if ($data['settings']['progress_indicator'] == 'steps') {\n $nav = \"<ul class='ff-step-titles'><li class='ff_active'><span>\" . implode('</span></li><li><span>', $data['settings']['step_titles']) . \"</span></li></ul>\";\n } elseif ($data['settings']['progress_indicator'] == 'progress-bar') {\n $nav = \"<div class='ff-el-progress-status'></div>\n <div class='ff-el-progress'>\n <div class='ff-el-progress-bar'><span></span></div>\n </div>\n <ul style='display: none' class='ff-el-progress-title'>\n <li>\" . implode('</li><li>', $data['settings']['step_titles']) . \"</li>\n </ul>\";\n } else {\n $nav = '';\n }\n\n $data['attributes']['data-disable_auto_focus'] = ArrayHelper::get($data, 'settings.disable_auto_focus', 'no');\n $data['attributes']['data-enable_auto_slider'] = ArrayHelper::get($data, 'settings.enable_auto_slider', 'no');\n\n $data['attributes']['data-enable_step_data_persistency'] = ArrayHelper::get($data, 'settings.enable_step_data_persistency', 'no');\n $data['attributes']['data-enable_step_page_resume'] = ArrayHelper::get($data, 'settings.enable_step_page_resume', 'no');\n\n $atts = $this->buildAttributes(\n \\FluentForm\\Framework\\Helpers\\ArrayHelper::except($data['attributes'], 'name')\n );\n\n echo \"<div class='ff-step-container' {$atts}>\";\n if ($nav) {\n echo \"<div class='ff-step-header'>{$nav}</div>\";\n }\n\n echo \"<span class='ff_step_start'></span><div class='ff-step-body'>\";\n $data['attributes']['class'] .= ' fluentform-step';\n $data['attributes']['class'] = trim($data['attributes']['class']) . ' active';\n $atts = $this->buildAttributes(\n \\FluentForm\\Framework\\Helpers\\ArrayHelper::except($data['attributes'], 'name')\n );\n echo \"<div {$atts}>\";\n }", "protected function form()\n {\n $form = new Form(new Movie());\n\n $form->text('title', __('名字'));\n $form->number('director', __('导演'));\n $form->text('describe', __('简介'));\n $form->number('rate', __('评价'));\n $form->switch('released', __('是否上映'));\n $form->datetime('release_at', __('发行时间'))->default(date('Y-m-d H:i:s'));\n\n return $form;\n }", "public function form( $instace ){\n echo '<p><strong>Widget ini belum bisa diubag secara Manual!</strong><br> Hubungi developer untuk melakukan perubahan</p>'; \n }", "protected function form()\n\t{\n\t\t$form = new Form(new Card);\n\n\t\t$form->footer(function ($footer) {\n\t\t\t// 去掉重置按钮\n\t\t\t$footer->disableReset();\n\t\t\t// 去掉查看\n\t\t\t$footer->disableViewCheck();\n\t\t\t// 去掉继续编辑按钮\n\t\t\t$footer->disableEditingCheck();\n\t\t\t// 去掉继续创建按钮\n\t\t\t$footer->disableCreatingCheck();\n\t\t});\n\n\t\t$form -> text('card', __('卡号'));\n\t\t$form -> text('password', __('密码'));\n\t\t//$form ->switch('type', __('类型'));\n\t\t$form->select('type', __('类型'))->options([1 => '天卡', 2 => '周卡', 3 => '月卡', 4 => '季卡', 5 => '半年卡', 6 => '年卡']);\n\t\t$states = [\n\t\t\t'on' => ['value' => 1, 'text' => '已充值', 'color' => 'danger'],\n\t\t\t'off' => ['value' => 0, 'text' => '未充值', 'color' => 'success'],\n\t\t];\n\t\t$form ->switch('consume', __('是否已充值'))->states($states);\n\t\t$form -> text('key', __('被充值Key'));\n\t\t$form -> datetime('consumetime', __('充值时间'))->default(date('Y-m-d H:i:s'));\n $states1 = [\n 'on' => ['value' => 0, 'text' => '未封卡', 'color' => 'success'],\n 'off' => ['value' => 1, 'text' => '被封卡', 'color' => 'danger'],\n ];\n $form ->switch('beifeng', __('是否被封'))->states($states1);\n\n\t\treturn $form;\n\t}", "public static function widget() {\n \n\t\t$start = self::get_dashboard_widget_option(self::wid, 'starting_conversion');\n\t\t$remaining_days = self::get_dashboard_widget_option(self::wid, 'starting_conversion');\n\t\t\n\t\t// Display Dashboard widget\n\t\trequire_once( 'red-flag-parking-display.php' );\n }", "public function render() {\n $formContainsRequiredFields = FALSE;\n $htmlElements = array();\n\n foreach($this->elements as $element) {\n if(!$this->getMarkRequiredFields()) {\n $element['object']->markIfRequired(FALSE);\n }\n\n if($element['object']->isRequired()) $formContainsRequiredFields = TRUE;\n $element['object']->render();\n if($element['object']->errorOccured()) $this->setError(TRUE);\n\n $htmlElements[] = $element['object']->fetch();\n $this->javascripts .= $element['object']->getJavaScripts();\n }\n\n $this->html = implode(\"\\n<span class=\\\"element_separator\\\">&nbsp;</span>\", $htmlElements);\n $preForm = (bool)$this->headline ? FORMWIZARD_PRE_FORM_HEADLINE : FORMWIZARD_PRE_FORM;\n\n $html = NULL;\n\n $html .= '<style type=\"text/css\">@import url('.FORMWIZARD_CSS_URL.\");</style>\\n\";\n $html .= str_replace('{headline}', $this->headline, $preForm);\n $html .= \"\\n\".'<form name=\"'.$this->name.'\" method=\"'.$this->method.'\" action=\"'.$this->action.'\" enctype=\"multipart/form-data\">';\n $html .= \"\\n\".'<input type=\"hidden\" name=\"__'.$this->name.'_submitted\" value=\"1\" />';\n $html .= \"\\n\".$this->html;\n $html .= \"\\n\".'</form>';\n $html .= \"\\n\".'<script type=\"text/javascript\">'.$this->javascripts.'</script>';\n\n if($formContainsRequiredFields && $this->markRequiredFields) {\n $html .= \"\\n\".FORMWIZARD_LEGEND_REQUIRED_FIELD;\n }\n\n $this->html = $html.\"\\n\".FORMWIZARD_POST_FORM;\n\n $this->isRendered = TRUE;\n }", "public function renderUI() {\r\n require_once 'classes/Helper.php';\r\n $this->init();\r\n \r\n $form_msg = $this->process_export_import();\r\n $this->prepareHead();\r\n $data = $this->prepareData();\r\n \r\n $helper = new GearHelper($this->context->smarty);\r\n $form_msg .= $helper->postProcess($data);\r\n $content = $helper->createTemplate($data);\r\n \r\n $this->smarty->assign(array(\r\n 'form_action' => Tools::safeOutput($_SERVER['REQUEST_URI']),\r\n 'gear_path' => __DIR__,\r\n 'img_dir' => _THEME_IMG_DIR_,\r\n 'form_msg' => $form_msg\r\n ));\r\n \r\n $ui = $this->display(GEAR_PARENT_FILE, GEAR_NAME.DIRECTORY_SEPARATOR.'views'.DIRECTORY_SEPARATOR.'header.tpl');\r\n $ui .= $content;\r\n $ui .= $this->display(GEAR_PARENT_FILE, GEAR_NAME.DIRECTORY_SEPARATOR.'views'.DIRECTORY_SEPARATOR.'footer.tpl');\r\n \r\n return $ui;\r\n }", "protected function form()\n {\n $form = new Form(new Activity);\n\n $form->text('log_name', 'Log name');\n $form->textarea('description', 'Description');\n $form->number('subject_id', 'Subject id');\n $form->text('subject_type', 'Subject type');\n $form->number('causer_id', 'Causer id');\n $form->text('causer_type', 'Causer type');\n $form->text('properties', 'Properties');\n\n return $form;\n }" ]
[ "0.710235", "0.63623637", "0.62253284", "0.6152803", "0.60618824", "0.5923924", "0.57680374", "0.57551", "0.57166356", "0.56992376", "0.56499654", "0.5645377", "0.5642863", "0.56302464", "0.5626179", "0.5624876", "0.56189144", "0.56085944", "0.56044364", "0.55827785", "0.55659795", "0.55393565", "0.55389726", "0.552323", "0.55104625", "0.55044085", "0.5450927", "0.54422885", "0.5420915", "0.53986126", "0.5394823", "0.53743404", "0.53656185", "0.5360266", "0.53598243", "0.53486186", "0.53483254", "0.5346012", "0.53457665", "0.5342716", "0.5340488", "0.5327866", "0.5325151", "0.52862245", "0.5284809", "0.5281433", "0.5271427", "0.5266736", "0.52580255", "0.52529883", "0.5251146", "0.5242816", "0.52388054", "0.5235927", "0.5230195", "0.52263373", "0.5226176", "0.5214034", "0.5211915", "0.52075094", "0.52038187", "0.51967937", "0.51966995", "0.51905185", "0.5189664", "0.518643", "0.51818305", "0.51812935", "0.5178954", "0.51748", "0.51720005", "0.5167098", "0.51631886", "0.515426", "0.5152771", "0.51504725", "0.51503617", "0.51496136", "0.51483476", "0.51430357", "0.51245594", "0.5124411", "0.5124222", "0.512361", "0.51234704", "0.5122792", "0.5121456", "0.51184756", "0.511657", "0.51110053", "0.5110626", "0.51104194", "0.51067024", "0.5100918", "0.50875306", "0.50853175", "0.5085209", "0.50811386", "0.5080206", "0.5074309" ]
0.76990116
0
Builds the form that allow to save your PHP/CSS code
Создает форму, позволяющую сохранить ваш код PHP/CSS
function buildForm() { $this->buildTabs(); // tab caption $this->addElement('header', null, 'Progress2 Generator - Control Panel: save PHP/CSS code'); $code[] =& $this->createElement('checkbox', 'P', null, 'PHP'); $code[] =& $this->createElement('checkbox', 'C', null, 'CSS'); $this->addGroup($code, 'phpcss', 'PHP and/or StyleSheet source code:'); // Buttons of the wizard to do the job $this->buildButtons(array('next','apply')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function beaver_extender_fe_style_editor_build_form() {\n\t\n?>\n\t\t<form action=\"/\" id=\"beaver-extender-fe-style-editor-form\" name=\"beaver-extender-fe-style-editor-form\">\n\t\t\t\n\t\t\t<input type=\"hidden\" name=\"action\" value=\"beaver_extender_fe_style_editor_save\" />\n\t\t\t<input type=\"hidden\" name=\"security\" value=\"<?php echo wp_create_nonce( 'beaver-extender-fe-style-editor' ); ?>\" />\n\t\t\n\t\t\t<div class=\"beaver-extender-fe-style-editor-nav\">\n\t\t\t\t<input id=\"beaver-extender-fe-style-editor-save-button\" type=\"submit\" value=\"<?php _e( 'Save Changes', 'extender' ); ?>\" name=\"Submit\" alt=\"Save Changes\" />\n\t\t\t\t<img class=\"beaver-extender-ajax-save-spinner\" src=\"<?php echo site_url() . '/wp-admin/images/spinner-2x.gif'; ?>\" />\n\t\t\t\t<span class=\"beaver-extender-saved\"></span>\n\t\n\t\t\t\t<span id=\"beaver-extender-fe-style-editor-contract-icon\" class=\"beaver-extender-fe-style-editor-icons dashicons dashicons-editor-contract\"></span>\n\t\t\t\t<span id=\"beaver-extender-fe-style-editor-css-builder-toggle-icon\" class=\"beaver-extender-fe-style-editor-icons dashicons dashicons-admin-customizer\"></span>\n\t\t\t\t<span id=\"beaver-extender-fe-style-editor-search-icon\" class=\"beaver-extender-fe-style-editor-icons dashicons dashicons-search\"></span>\n\t\t\t</div><!-- END .beaver-extender-fe-style-editor-nav -->\n\t\t\t\n\t\t\t<div id=\"beaver-extender-fe-style-editor-container\">\n\t\t\t\t\n\t\t\t\t<textarea data-editor=\"css\" style=\"display:none;\" wrap=\"off\" id=\"beaver-extender-fe-style-editor-output\" class=\"code-builder-output\" name=\"extender[custom_css]\"><?php echo beaver_extender_get_custom_css( 'custom_css' ); ?></textarea>\t\t\t\t\t\n\t\t\t\n\t\t\t</div><!-- END #beaver-extender-fe-style-editor-container -->\n\t\t\n\t\t</form><!-- END #beaver-extender-fe-style-editor-form -->\n<?php\n\t\n}", "public function saveForm() {\n\n\t\tforeach ( $this->getOptionsList() as $element ) {\n\t\t\t$element->save();\n\t\t}\n\t\t$this->setLastAction( self::ACTION_SAVE );\n\n\t\t$custom_style = new Custom_CSS_Style();\n\t\t$custom_style->reinit();\n\t}", "function buildForm(){\n\t\t# menampilkan form\n\t}", "function creaped() {\n\t\t// Esto debe hacerse por dataform\n\t\t$styles = \"\\n<!-- Estilos -->\\n\";\n\t\t$styles .= style('rapyd.css');\n\t\t$styles .= style('ventanas.css');\n\t\t$styles .= style('themes/proteo/proteo.css');\n\t\t$styles .= style(\"themes/ui.jqgrid.css\");\n\t\t$styles .= style(\"themes/ui.multiselect.css\");\n\t\t$styles .= style('layout1.css');\n\t\t$styles .= '<link rel=\"stylesheet\" href=\"'.base_url().'system/application/rapyd/elements/proteo/css/rapyd_components.css\" type=\"text/css\" />'.\"\\n\";\n\n\n\t\t$styles .= '\n<style type=\"text/css\">\n\tp {font-size:1em; margin: 1ex 0;}\n\tp.buttons {text-align:center;line-height:2.5em;}\n\tbutton {line-height: normal;}\n\t.hidden {display: none;}\n\tul {z-index:100000;margin:1ex 0;padding:0;list-style:none;cursor:pointer;border:1px solid Black;width:15ex;position:\trelative;}\n\tul li {background-color: #EEE;padding: 0.15em 1em 0.3em 5px;}\n\tul ul {display:none;position:absolute;width:100%;left:-1px;bottom:0;margin:0;margin-bottom: 1.55em;}\n\t.ui-layout-north ul ul {bottom:auto;margin:0;margin-top:1.45em;}\n\tul ul li { padding: 3px 1em 3px 5px; }\n\tul ul li:hover { background-color: #FF9; }\n\tul li:hover ul { display:block; background-color: #EEE; }\n\n\t#feedback { font-size: 0.8em; }\n\t#tablas .ui-selecting { background: #FECA40; }\n\t#tablas .ui-selected { background: #F39814; color: white; }\n\t#tablas { list-style-type: none; margin: 0; padding: 0; width: 90%; }\n\t#tablas li { margin: 1px; padding: 0em; font-size: 0.8em; height: 14px; }\n\n\ttable.tc td.header {padding-right: 1px;padding-left: 1px;font-weight: bold;font-size: 8pt;color: navy;background-color: #f4edd5;text-align:center;}\n\ttable.tc td.title{padding-right: 1px;padding-left: 1px;font-weight: bold;font-size: 8pt;color:navy;text-align:center;background-color: #fdffdf;}\n\ttable.tc td.resalte{border-left:solid 1px #daac00;border-top:solid 1px #daac00;text-align:center;font-weight: bold;}\n\ttable.tc td{ border-left:solid 1px #DAAC00;border-TOP:solid 1px #DAAC00;}\n\ttable.tc {border-right: #daac00 1px solid;padding-right: 0px;border-top: medium none;padding-left: 0px;padding-bottom: 0px;border-left: medium none;border-bottom: #daac00 1px solid;font-family: verdana;font-size:8pt;cellspacing: 0px}\n\ttable.tc td.sin_borde{border-left:solid 1px #DAAC00;border-TOP:solid 1px #DAAC00;text-align:center;border-right:solid 5px #f6f6f6;border-bottom:solid 5px #f6f6f6;}\n\n\t.custom-combobox {position: relative;display: inline-block;}\n\t.custom-combobox-toggle {position: absolute;top: 0;bottom: 0;margin-left: -1px;padding: 0;}\n\t.custom-combobox-input {margin: 0;padding: 5px 10px;}\n\n</style>\n';\n\n\t\t$title = \"\n<div id='encabe'>\n<table width='98%'>\n\t<tr>\n\t\t<td>\".heading('Generar Orden de Produccion').\"</td>\n\t\t<td align='right' width='40'>\".image('cerrar.png','Cerrar Ventana',array('onclick'=>'window.close()','height'=>'20')).\"</td>\n\t</tr>\n</table>\n</div>\n\";\n\t\t$script = \"\\n<!-- JQUERY -->\\n\";\n\t\t$script .= script('jquery-min.js');\n\t\t$script .= script('jquery-migrate-min.js');\n\t\t$script .= script('jquery-ui.custom.min.js');\n\n\t\t$script .= script(\"jquery.layout.js\");\n\t\t$script .= script(\"i18n/grid.locale-sp.js\");\n\n\t\t$script .= script(\"ui.multiselect.js\");\n\t\t$script .= script(\"jquery.jqGrid.min.js\");\n\t\t$script .= script(\"jquery.tablednd.js\");\n\t\t$script .= script(\"jquery.contextmenu.js\");\n\n\t\t$script .= script('plugins/jquery.numeric.pack.js');\n\t\t$script .= script('plugins/jquery.floatnumber.js');\n\t\t$script .= script('plugins/jquery.maskedinput.min.js');\n\n\t\t$script .= '\n<script type=\"text/javascript\">\n\t$(function(){\n\t\t$(\".inputnum\").numeric(\".\");\n\t});\n\t$(function() {\n\t\t$( \"input:submit, a, button\", \".botones\",\".otros\" ).button();\n\t});\n';\n\n\t\t$script .= '\n\t// set EVERY state here so will undo ALL layout changes\n\t// used by the Reset State button: myLayout.loadState( stateResetSettings )\n\tvar stateResetSettings = {\n\t\tnorth__size:\t\t\"auto\"\n\t,\tnorth__initClosed:\tfalse\n\t,\tnorth__initHidden:\tfalse\n\t,\tsouth__size:\t\t\"auto\"\n\t,\tsouth__initClosed:\tfalse\n\t,\tsouth__initHidden:\tfalse\n\t,\twest__size:\t\t\t200\n\t,\twest__initClosed:\tfalse\n\t,\twest__initHidden:\tfalse\n\t,\teast__size:\t\t\t100\n\t,\teast__initClosed:\ttrue\n\t,\teast__initHidden:\ttrue\n\n\t};\n\n\tvar myLayout;\n\n\t$(document).ready(function () {\n\n\t\t// this layout could be created with NO OPTIONS - but showing some here just as a sample...\n\t\t// myLayout = $(\"body\").layout(); -- syntax with No Options\n\n\t\tmyLayout = $(\"body\").layout({\n\n\t\t//\treference only - these options are NOT required because \"true\" is the default\n\t\t\tclosable: true,\tresizable:\ttrue, slidable:\ttrue, livePaneResizing:\ttrue\n\t\t//\tsome resizing/toggling settings\n\t\t,\tnorth__slidable: false, north__togglerLength_closed: \"100%\", north__spacing_closed:\t20\n\t\t,\tsouth__resizable:false,\tsouth__spacing_open:0\n\t\t,\tsouth__spacing_closed:20\n\t\t//\tsome pane-size settings\n\t\t,\twest__minSize: 100, east__size: 100, east__minSize: 50, east__maxSize: .5, center__minWidth: 100\n\t\t//\tsome pane animation settings\n\t\t,\twest__animatePaneSizing: false,\twest__fxSpeed_size:\t\"fast\",\twest__fxSpeed_open: 1000\n\t\t,\twest__fxSettings_open:{ easing: \"easeOutBounce\" },\twest__fxName_close:\"none\"\n\t\t//\tenable showOverflow on west-pane so CSS popups will overlap north pane\n\t\t//,\twest__showOverflowOnHover:\ttrue\n\t\t,\tstateManagement__enabled:true, showDebugMessages: true\n\t\t});\n\n\t\t$(function() {\n\t\t\t$(\"button\").button().click(function(event) {event.preventDefault();});\n\t\t\t//$( \"#almacen\" ).combobox();\n\t\t});\n\n\n \t});\n\n\tfunction sumar(j){\n\t\tvar nn = \\'[name=\"codigo_\\'+j+\\'\"]\\';\n\t\tvar k = 0;\n\t\tvar t;\n\t\tvar totalc = 0;\n\t\tvar maximo = 0;\n\n\t\t// Valida el maximo\n\t\t$(\"#resultados\").html(\"Maximo \"+maximo);\n\n\t\t$(nn).each( function() {\n\t\t\tk = $(this).val();\n\t\t\tt = Number($(\"#cana_\"+k).val());\n\t\t\tmaximo = Number($(\"#falta_\"+k).val());\n\t\t\tif ( t > maximo ){\n\t\t\t\tt = maximo;\n\t\t\t\t$(\"#cana_\"+k).val(maximo);\n\t\t\t}\n\t\t\ttotalc += t;\n\t\t});\n\t\t$(\\'#totalc_\\'+j).val(totalc);\n\t}\n\n\tfunction guardar(){\n\t\talert(\"Guardar\");\n\t\t$.post( \"'.base_url().'inventario/prdo/guardaoe\", $(\"#guardar\").serialize(),\n\t\t\tfunction(data) {\n\t\t\t\talert(data);\n\t\t\t\tlocation.reload();\n\t\t\t\twindow.opener.actualiza();\n\t\t\t}\n\t\t);\n\t}\n</script>\n';\n\n// ENCABEZADO\n$tabla = '\n<div class=\"ui-layout-north\" onmouseover=\"myLayout.allowOverflow(\\'north\\')\" onmouseout=\"myLayout.resetOverflow(this)\">\n<table width=\"100%\" bgcolor=\"#2067B5\">\n\t<tr>\n\t\t<td align=\"left\" width=\"80px\"><img src=\"'.base_url().'assets/default/css/templete_01.jpg\" width=\"120\"></td><td align=\"center\"><h1 style=\"font-size: 20px; color: rgb(255, 255, 255);\" onclick=\"history.back()\">ORDEN DE PRODUCCION</h1></td><td align=\"left\" width=\"100px\" nowrap=\"nowrap\"><font style=\"color:#FFFFFF;font-size:12px\">Usuario: '.$this->secu->usuario().'<br/>'.$this->secu->getnombre().'</font></td><td align=\"right\" width=\"28px\"></td>\n\t</tr>\n</table>\n</div>\n';\n\n// IZQUIERDO\n$tabla .= '\n<div class=\"ui-layout-west\">\n<form id=\"guardar\" >\n<center>\n<lable>Almacen</lable> ';\n$tabla .= $this->datasis->llenaopciones(\"SELECT ubica, ubides FROM caub WHERE gasto='N' ORDER BY ubica\", false, $id='almacen' );\n\n$tabla .= '\n\t<br><br>\n\t<lable>Instruciones</lable>\n\t<textarea rows=\"4\" cols=\"25\" id=\"instrucciones\" name=\"instrucciones\"></textarea>\n\t<br><br>\n\t<button type=\"button\" onclick=\"guardar()\">Guardar Orden</button>\n\t<div id=\"resultados\"></div>\n</center>\n</div>';\n\n// INFERIOR\n$tabla .= '\n<div class=\"ui-layout-south\">\n';\n\n$tabla .= $this->datasis->traevalor('TITULO1');\n\n$tabla .= '\n</div>\n';\n\n// DERECHA\n$tabla .= '\n<div class=\"ui-layout-east\">\n</div>\n';\n\n// CENTRO\n$norden = $this->datasis->dameval('SELECT MAX(id) maxi FROM prdo');\nif ($norden == '') $norden = 0;\n\n$tabla .= '\n<div class=\"ui-layout-center\">';\n\n$mSQL = '\nSELECT a.id, b.numero, b.fecha, b.cod_cli, b.nombre, a.codigoa, a.desca, a.cana, COALESCE(sum(e.ordenado),0) producido, a.cana-COALESCE(sum(e.ordenado),0) falta, COALESCE(sum(e.ordenado),0) ordenado, d.ruta, d.descrip\nFROM itpfac a\nJOIN pfac b ON a.numa = b.numero\nLEFT JOIN sclitrut c ON b.cod_cli=c.cliente\nLEFT JOIN sclirut d ON c.ruta=d.ruta\nLEFT JOIN itprdo e ON a.id = e.idpfac\nWHERE b.producir=\"S\" AND ( b.ordprod=\"\" OR b.ordprod IS NULL )\nGROUP BY a.id\nHAVING falta>0\nORDER BY a.codigoa, d.ruta, a.numa\n';\n\n$query = $this->db->query($mSQL);\n$ruta = 'XX0XX';\n$codigo = 'XXZZWWXXWWXXZZZZ';\n$i = 0;\n$c = 0;\nif ($query->num_rows() > 0){\n\tforeach ($query->result() as $row){\n\t\tif ( $codigo != $row->codigoa ){\n\t\t\tif ( $i > 0 ) $tabla .= \"</tbody></table><br>\\n\";\n\t\t\t$tabla .= '<table class=\"tc\" width=\"100%\">';\n\t\t\t$tabla .= \"<tbody>\\n\";\n\n\t\t\tif ( $i > 0 ) $c++;\n\n\t\t\t$tabla .= \"<tr style='background:#2067B5;color:#FFFFFF;'>\\n\";\n\t\t\t$tabla .= \"\t<td colspan='7'>Cod: \".$row->codigoa.\" Desc: \".$row->desca.\"</td>\\n\";\n\t\t\t//$tabla .= \"\t<td>&nbsp;</td>\\n\";\n\t\t\t$tabla .= \"\t<td><input class='inputnum' name='totalc_$c' id='totalc_$c' size='4' type='text' readonly></td>\\n\";\n\t\t\t$tabla .= \"</tr>\\n\";\n\n\t\t\t$tabla .= \"<tr bgcolor='#BEDCFD'>\\n\";\n\t\t\t$tabla .= \"\t<td >Ruta</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Pedido</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Fecha</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Cliente</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Nombre</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Cantidad</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Producido</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Ordenado</td>\\n\";\n\t\t\t$tabla .= \"</tr>\\n\";\n\n\t\t\t$codigo = $row->codigoa;\n\t\t}\n\n\t\t$tabla .= \"<tr>\\n\";\n\t\t$tabla .= \"\t<td><a href='#' title='\".$row->descrip.\"'>\".$row->ruta.\"&nbsp;</a></td>\\n\";\n\t\t$tabla .= \"\t<td>\".$row->numero.\"</td>\\n\";\n\t\t$tabla .= \"\t<td>\".$row->fecha.\"</td>\\n\";\n\t\t$tabla .= \"\t<td>\".$row->cod_cli.\"</td>\\n\";\n\t\t$tabla .= \"\t<td>\".$row->nombre.\"</td>\\n\";\n\t\t$tabla .= \"\t<td align='right'>\".$row->cana.\"</td>\\n\";\n\t\t$tabla .= \"\t<td align='right'>\".$row->producido.\"</td>\\n\";\n\n\t\t$tabla .= \"\t<td>\\n\";\n\t\t$tabla .= \"\t\t<input class='inputnum' name='cana_$i' id='cana_$i' size='4' onkeyUp='sumar($c)' value='0.00' >\\n\";\n\t\t$tabla .= \"\t\t<input name='codigo_$c' id='codigo_$c' type='hidden' value='$i' >\\n\";\n\t\t$tabla .= \"\t\t<input name='idpfac_$i' id='idpfac_$i' type='hidden' value='\".$row->id. \"' >\\n\";\n\t\t$tabla .= \"\t\t<input name='falta_$i' id='falta_$i' type='hidden' value='\".$row->falta.\"' >\\n\";\n\t\t$tabla .= \"\t</td>\\n\";\n\n\t\t$tabla .= \"</tr>\\n\";\n\t\t$i++;\n\t}\n\t$tabla .= \"</table>\\n\";\n}\n\n$tabla .= '\n<input id=\"totalitem\" name=\"totalitem\" type=\"hidden\" value=\"'.$i.'\">\n</form>\n</div>\n';\n\t\t$data['content'] = $tabla;\n\t\t$data['title'] = $title;\n\t\t$data['head'] = $styles;\n\t\t$data['head'] .= $script;\n\t\t$this->load->view('view_ventanas_lite',$data);\n\t}", "private function viewBuilder() {\n $html = '';\n $file = false;\n // Create fields\n foreach ($this->formDatas as $field) {\n $type = $field['type'];\n switch ($type) {\n case 'text' :\n case 'password' :\n case 'hidden' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <input type=\"' . $type . '\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?>\"/>';\n break;\n // Addon - 2013-07-31\n case 'date' :\n case 'datetime' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <input type=\"text\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?>\"/>';\n\n\n if ($type == 'datetime') {\n $plugin = $this->addPlugin('widget', false);\n $plugin = $this->addPlugin('date');\n }\n $plugin = $this->addPlugin($type);\n if (!isset($this->js['script'])) {\n $this->js['script'] = '';\n }\n if ($type == 'datetime') {\n $this->js['script'] .= '\n <script type=\"text/javascript\">$(document).ready(function() {$(\"#' . $field['name'] . '\").datetimepicker({ dateFormat: \"yy-mm-dd\", timeFormat : \"HH:mm\"});});</script>';\n } else {\n $this->js['script'] .= '\n <script type=\"text/javascript\">$(document).ready(function() {$(\"#' . $field['name'] . '\").datepicker({ dateFormat: \"yy-mm-dd\"});});</script>';\n }\n break;\n // End Addon\n case 'select' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <select name=\"' . $field['name'] . '\">';\n // Add options\n foreach ($field['options'] as $option) {\n $html .= '\n <option value=\"' . $option . '\" <?php echo set_select(\"' . $field['name'] . '\", \"' . $option . '\"); ?>>' . $option . '</option>';\n }\n $html .= '\n </select>';\n break;\n case 'checkbox' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n ';\n // Add options\n foreach ($field['checkbox'] as $option) {\n $html .= '\n <input type=\"checkbox\" value=\"' . $option . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $option . '\"); ?>\"><span>' . $option . '</span>';\n }\n break;\n case 'radio' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n ';\n // Add options\n foreach ($field['radio'] as $option) {\n $html .= '\n <input type=\"radio\" value=\"' . $option . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $option . '\"); ?>\"><span>' . $option . '</span>';\n }\n break;\n case 'reset' :\n case 'submit' :\n $html .= '\n <input type=\"' . $type . '\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?>\"/>';\n break;\n case 'textarea' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <textarea name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\"><?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?></textarea>';\n break;\n case 'file' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <input type=\"file\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" />';\n $file = true;\n break;\n }\n }\n\n $view = '\n <html>\n <head>\n <link type=\"text/css\" rel=\"stylesheet\" href=\"<?php echo base_url() ?>assets/css/generator/' . $this->cssName . '.css\">\n '; // Addon - 2013-07-31\n foreach ($this->css as $css) {\n $view .= $css . '\n ';\n }\n foreach ($this->js as $js) {\n $view .= $js . '\n ';\n }\n // End Addon\n $view .= '\n </head>\n <body>\n <?php\n // Show errors\n if(isset($error)) {\n switch($error) {\n case \"validation\" :\n echo validation_errors();\n break;\n case \"save\" :\n echo \"<p class=\\'error\\'>Save error !</p>\";\n break;\n }\n }\n if(isset($errorfile)) {\n foreach($errorfile as $name => $value) {\n echo \"<p class=\\'error\\'>File \\\"\".$name.\"\\\" upload error : \".$value.\"</p>\";\n }\n }\n ?>\n <form action=\"<?php echo base_url() ?>' . $this->formName . '\" method=\"post\" ' . ($file == true ? 'enctype=\"multipart/form-data\"' : '') . '>\n ' . $html . '\n </form>\n </body>\n </html>';\n return array(str_replace('<', '&lt;', $view), $view);\n }", "function child_themer_style_editor_save() {\n\t\t\n\t\tcheck_ajax_referer( 'child-themer-style-editor', 'security' );\n\n\t\tif ( $_POST['code_state'] == 'Parse Error' ) {\n\t\t\t\n\t\t\techo 'Parse Error, Check Code.';\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\tchild_themer_write_file( $path = get_stylesheet_directory() . '/style.css', $code = $_POST['child-themer-style-editor']['styles'] );\n\t\t\t\n\t\t\techo 'Stylesheet Updated';\n\t\t\t\n\t\t}\n\t\t\n\t\texit();\n\t\t\n\t}", "function mmpm_theme_options_form(){\n\t\t$out = '';\n\t\t$submit_button = mmpm_ntab(7) . '<input type=\"submit\" class=\"button-primary pull-right\" value=\"' . __( 'Save All Changes', MMPM_TEXTDOMAIN_ADMIN ) . '\" />';\n\t\t$theme_meta = mmpm_ntab(7) . '<div>' . mmpm_ntab(8) . '<span class=\"theme_name\">' . __( MMPM_PLUGIN_NAME , MMPM_TEXTDOMAIN_ADMIN ) . '</span>' . ' <small>v' . MMPM_PLUGIN_VERSION . mmpm_ntab(7) . '</small></div>';\n\t\t$out .= mmpm_ntab(1) . '<div class=\"wrap bootstrap\">';\n\t\t$out .= mmpm_ntab(2) . '<div class=\"'. MMPM_PREFIX . '_theme_page\">';\n\t\t$out .= mmpm_ntab(3) . '<form id=\"'. MMPM_PREFIX . '_theme_options_form\" class=\"'. MMPM_PREFIX . '_theme_options_form\" method=\"post\" action=\"options.php\" enctype=\"multipart/form-data\">';\n\t\t$out .= mmpm_ntab(4) . '<div class=\"save_shanges row no_x_margin\">';\n\t\t$out .= mmpm_ntab(5) . '<div class=\"col-xs-12\">';\n\t\t$out .= mmpm_ntab(6) . '<div class=\"float_holder\">';\n\t\t$out .= $submit_button;\n\t\t$out .= $theme_meta;\n\t\t$out .= mmpm_ntab(6) . '</div>';\n\t\t$out .= mmpm_ntab(5) . '</div>';\n\t\t$out .= mmpm_ntab(4) . '</div>';\n//\t\t$out .= mmpm_ntab(4) . '<input type=\"hidden\" name=\"action\" value=\"update\" />';\n\t\t$out .= mmpm_ntab(4) . '<input type=\"hidden\" name=\"' . MMPM_OPTIONS_DB_NAME . '[last_modified]\" value=\"' . ( time() + 60 ) . '\" />';\n\t\tob_start();\n\t\tsettings_fields( 'mmpm_options_group' );\n\t\t$out .= mmpm_ntab(4) . ob_get_contents();\n\t\tob_end_clean();\n\t\t$out .= mmpm_theme_sections_generator();\n\t\t$out .= mmpm_ntab(4) . '<div class=\"save_shanges row no_x_margin\">';\n\t\t$out .= mmpm_ntab(5) . '<div class=\"col-xs-12\">';\n\t\t$out .= mmpm_ntab(6) . '<div class=\"float_holder\">';\n\t\t$out .= $submit_button;\n\t\t$out .= mmpm_ntab(6) . '</div>';\n\t\t$out .= mmpm_ntab(5) . '</div>';\n\t\t$out .= mmpm_ntab(4) . '</div>';\n\t\t$out .= mmpm_ntab(3) . '</form>';\n\t\t$out .= mmpm_ntab(2) . '</div><!-- class=\"'. MMPM_PREFIX . 'theme_page\" -->';\n\t\t$out .= mmpm_ntab(1) . '</div><!-- class=\"wrap\" -->';\n\n\t\techo $out; // general out\n\t}", "public function buildForm() {\n\t\techo \"<!DOCTYPE html>\n\t\t<html>\n\t\t<head>\n\t\t\t<title>$this->title</title>\n\t\t</head>\n\t\t<body>\n\t\t<form method=\\\"$this->method\\\">\";\n\t\tforeach ($this->_inputs as $key => $input) {\n\t\t\t// Check if email validation is required.\n\t\t\tif (isset($input['rule']) && in_array('email', $input['rule'])) {\n\t\t\t\t$input['inputType'] = 'email';\n\t\t\t}\n\n\t\t\techo \"<label>\".$input['label'].\"</label><input type=\\\"\".$input['inputType'].\"\\\" id=\\\"\".$input['name'].\"\\\" name=\\\"\".$input['name'].\"\\\" value=\\\"\".$input['defaultValue'].\"\\\"\";\n\n\t\t\t// Check if field was required.\n\t\t\tif (isset($input['rule']) && in_array('required', $input['rule'])) {\n\t\t\t\techo \" required\";\n\t\t\t}\n\n\t\t\techo \"><br></form>\";\n\t\t}\n\t}", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: border properties');\r\n\r\n $borderpainted[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $borderpainted[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($borderpainted, 'borderpainted', 'Display the border:');\r\n\r\n $this->addElement('text', 'borderclass', 'CSS class:', array('size' => 32));\r\n\r\n $borderstyle['style'] =& $this->createElement('select',\r\n 'style', 'style',\r\n array('solid' => 'Solid',\r\n 'dashed' => 'Dashed',\r\n 'dotted' => 'Dotted',\r\n 'inset' => 'Inset',\r\n 'outset' => 'Outset'));\r\n $borderstyle['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 2));\r\n $borderstyle['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($borderstyle, 'borderstyle', null, ' ');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function ctools_export_form($form, &$form_state, $code, $title = '') {\r\n $lines = substr_count($code, \"\\n\");\r\n $form['code'] = array(\r\n '#type' => 'textarea',\r\n '#title' => $title,\r\n '#default_value' => $code,\r\n '#rows' => $lines,\r\n );\r\n\r\n return $form;\r\n}", "public function getCSS()\n {\n ob_start();\n ?>\n div.webFormHelpBox {\n position: absolute;\n left: 320px;\n top: 330px;\n width: 200px;\n font-family: Arial, Verdana, sans-serif;\n font-size: 8pt;\n line-height: 8pt;\n font-weight: normal;\n background-color: #f7f7f7;\n border: 1px solid #cccccc;\n padding: 8px;\n visibility: hidden;\n }\n div.webFormErrorBox {\n position: absolute;\n left: 320px;\n top: 330px;\n width: 200px;\n font-family: Arial, Verdana, sans-serif;\n font-size: 8pt;\n line-height: 8pt;\n font-weight: normal;\n background-color: #fddbdb;\n border: 1px solid #9a1515;\n padding: 8px;\n visibility: hidden;\n color: #000000;\n }\n td.wfErrorText {\n font-family: Arial, Verdana, sans-serif;\n font-size: 12px;\n font-weight: normal;\n color: #000000;\n line-height: 14px;\n }\n div.webFormCaption {\n font-size: 8pt;\n color: #888888;\n line-height: 10pt;\n font-family: Arial, Verdana, sans-serif;\n text-align: left;\n width: 150px;\n padding: 2px;\n display: none;\n }\n span.webFormVerifyText {\n font-family: Arial, Verdana, sans-serif;\n font-size: 9pt;\n font-weight: normal;\n }\n input.webFormSaveButton {\n font-family: Arial, Verdana, sans-serif;\n font-size: 7pt;\n font-weight: bold;\n }\n div.webFormVerifyFieldContainer {\n padding: 1px;\n background-color: #f0f0f0;\n border: 1px solid #c0c0c0;\n }\n div.webFormVerifyFieldContainerBox {\n padding: 1px;\n background-color: #f0f0f0;\n border: 1px solid #c0c0c0;\n /*height: 63px;*/\n }\n a.webFormVerifyFieldLink {\n font-family: Arial, Verdana, sans-serif;\n font-size: 10pt;\n font-weight: normal;\n text-decoration: none;\n color: #000000;\n }\n input:hover {\n background-color: #f2f2f2;\n }\n textarea:hover {\n background-color: #f2f2f2;\n }\n\n /* Elements <input>-type items */\n <?php if ($this->_verifyForm) { ?>\n .webFormElementText {\n padding: 3px 0px 2px 18px;\n background-color: #ffffff;\n border: 1px solid #c0c0c0;\n }\n .webFormElementTextBox {\n padding: 0px 0px 0px 0px;\n background-color: #ffffff;\n border: 1px solid #c0c0c0;\n }\n .webFormElementSelect {\n\n }\n <?php } else { ?>\n .webFormElementText {\n padding: 3px 0px 2px 3px;\n background-color: #ffffff;\n border: 1px solid #c0c0c0;\n }\n .webFormElementTextBox {\n padding: 0px 0px 0px 0px;\n background-color: #ffffff;\n border: 1px solid #c0c0c0;\n }\n .webFormElementSelect {\n\n }\n <?php } ?>\n\n <?php\n $css = ob_get_contents();\n ob_end_clean();\n\n return $css;\n }", "function buildSettingsForm() {}", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: string properties');\r\n\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($stringpainted, 'stringpainted', 'Render a custom string:');\r\n\r\n $this->addElement('text', 'stringid', 'Id:', array('size' => 32));\r\n $this->addElement('text', 'stringclass', 'CSS class:', array('size' => 32));\r\n $this->addElement('text', 'stringvalue', 'Content:', array('size' => 32));\r\n\r\n $stringsize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $stringsize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $stringsize['left'] =& $this->createElement('text',\r\n 'left', 'left',\r\n array('size' => 4));\r\n $stringsize['top'] =& $this->createElement('text',\r\n 'top', 'top',\r\n array('size' => 4));\r\n $stringsize['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'bgcolor',\r\n array('size' => 7));\r\n $this->addGroup($stringsize, 'stringsize', 'Size, position and color:', ' ');\r\n\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Top', 'top');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Bottom', 'bottom');\r\n $this->addGroup($stringvalign, 'stringvalign', 'Vertical alignment:');\r\n\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Center', 'center');\r\n $this->addGroup($stringalign, 'stringalign', 'Horizontal alignment:');\r\n\r\n $stringfont['family'] =& $this->createElement('text',\r\n 'family', 'family',\r\n array('size' => 40));\r\n $stringfont['size'] =& $this->createElement('text',\r\n 'size', 'size',\r\n array('size' => 2));\r\n $stringfont['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($stringfont, 'stringfont', 'Font:', ' ');\r\n\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'normal', 'normal');\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'Bold', 'bold');\r\n $this->addGroup($stringweight, 'stringweight', 'Font weight:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function do_form(){\n\t\tob_start();\n\t\t\n\t\t$op = ($this->id_base == $this->id)? __('Add', JCF_TEXTDOMAIN) : __('Edit', JCF_TEXTDOMAIN);\n\t\t?>\n\t\t<div class=\"jcf_edit_field\">\n\t\t\t<h3 class=\"header\"><?php echo $op . ' ' . $this->title; ?></h3>\n\t\t\t<div class=\"jcf_inner_content\">\n\t\t\t\t<form action=\"#\" method=\"post\" id=\"jcform_edit_field\">\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<input type=\"hidden\" name=\"field_id\" value=\"<?php echo $this->id; ?>\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"field_number\" value=\"<?php echo $this->number; ?>\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"field_id_base\" value=\"<?php echo $this->id_base; ?>\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"fieldset_id\" value=\"<?php echo $this->fieldset_id; ?>\" />\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->form( $this->instance );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// need to add slug field too\n\t\t\t\t\t\t\t$slug = esc_attr($this->slug);\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id('slug'); ?>\"><?php _e('Slug:', JCF_TEXTDOMAIN); ?></label>\n\t\t\t\t\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('slug'); ?>\" name=\"<?php echo $this->get_field_name('slug'); ?>\" type=\"text\" value=\"<?php echo $slug; ?>\" />\n\t\t\t\t\t\t\t<br/><small><?php _e('Machine name, will be used for postmeta field name.', JCF_TEXTDOMAIN); ?></small>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t// enabled field\n\t\t\t\t\t\t\tif( $this->is_new ){\n\t\t\t\t\t\t\t\t$this->instance['enabled'] = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id('enabled'); ?>\">\n\t\t\t\t\t\t\t\t<input class=\"checkbox\" type=\"checkbox\" \n\t\t\t\t\t\t\t\t\t\tid=\"<?php echo $this->get_field_id('enabled'); ?>\"\n\t\t\t\t\t\t\t\t\t\tname=\"<?php echo $this->get_field_name('enabled'); ?>\"\n\t\t\t\t\t\t\t\t\t\tvalue=\"1\" <?php checked(true, @$this->instance['enabled']); ?> />\n\t\t\t\t\t\t\t\t<?php _e('Enabled', JCF_TEXTDOMAIN); ?></label>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"field-control-actions\">\n\t\t\t\t\t\t\t<div class=\"alignleft\">\n\t\t\t\t\t\t\t\t<?php if( $op != __('Add', JCF_TEXTDOMAIN) ) : ?>\n\t\t\t\t\t\t\t\t<a href=\"#remove\" class=\"field-control-remove\"><?php _e('Delete', JCF_TEXTDOMAIN); ?></a> |\n\t\t\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t\t\t<a href=\"#close\" class=\"field-control-close\"><?php _e('Close', JCF_TEXTDOMAIN); ?></a>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"alignright\">\n\t\t\t\t\t\t\t\t<?php echo print_loader_img(); ?>\n\t\t\t\t\t\t\t\t<input type=\"submit\" value=\"<?php _e('Save', JCF_TEXTDOMAIN); ?>\" class=\"button-primary\" name=\"savefield\">\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<br class=\"clear\"/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</fieldset>\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\t\t\n\t\t$html = ob_get_clean();\n\t\treturn $html;\n\t}", "function build_basic_form()\r\n {\r\n $this->addElement('select', LanguagePack :: PROPERTY_BRANCH, Translation :: get('Branch'), LanguagePack :: get_branch_options());\r\n \r\n \t$this->addElement('file', 'file', Translation :: get('FileName'));\r\n $allowed_upload_types = array('zip');\r\n $this->addRule('file', Translation :: get('OnlyZIPAllowed'), 'filetype', $allowed_upload_types);\r\n $this->addRule('file', Translation :: get('ThisFieldIsRequired', null, Utilities :: COMMON_LIBRARIES), 'required');\r\n \r\n // Submit button\r\n //$this->addElement('submit', 'user_settings', 'OK');\r\n $buttons[] = $this->createElement('style_submit_button', 'submit', Translation :: get('Import', null, Utilities :: COMMON_LIBRARIES), array('class' => 'positive'));\r\n $buttons[] = $this->createElement('style_reset_button', 'reset', Translation :: get('Reset', null, Utilities :: COMMON_LIBRARIES), array('class' => 'normal empty'));\r\n \r\n $this->addGroup($buttons, 'buttons', null, '&nbsp;', false);\r\n }", "protected function createComponentEditForm() {\r\n\t\t$form = new Form;\r\n\t\t$form->getElementPrototype()->class(\"formWide\");\r\n\t\t$options = array(0 => \"Default\", 1 => \"Odkaz na obsah\", 3 => \"Odkaz na položku menu\");\r\n\t\t// easy way how to create url slug\r\n\t\t$form->addText(\"title\", \"Název:\")\r\n\t\t\t\t->setAttribute('onchange', '\r\n\t\t\t\t\t\t\tvar nodiac = { \"á\": \"a\", \"č\": \"c\", \"ď\": \"d\", \"é\": \"e\", \"ě\": \"e\", \"í\": \"i\", \"ň\": \"n\", \"ó\": \"o\", \"ř\": \"r\", \"š\": \"s\", \"ť\": \"t\", \"ú\": \"u\", \"ů\": \"u\", \"ý\": \"y\", \"ž\": \"z\" };\r\n\t\t\t\t\t\t\ts = $(\"#frmeditForm-title\").val().toLowerCase();\r\n\t\t\t\t\t\t\tvar s2 = \"\";\r\n\t\t\t\t\t\t\tfor (var i=0; i < s.length; i++) {\r\n\t\t\t\t\t\t\t\ts2 += (typeof nodiac[s.charAt(i)] != \"undefined\" ? nodiac[s.charAt(i)] : s.charAt(i));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tresult=s2.replace(/[^a-z0-9_]+/g, \"-\").replace(/^-|-$/g, \"\");\r\n\t\t\t\t\t\t\t$(\"#frmeditForm-url\").val(result);\r\n\t\t\t\t\t\t');\r\n\t\t$form->addText(\"url\", \"url:\")->setAttribute(\"readonly\", \"readonly\");\r\n\t\tif (!$this->onlyTree) {\r\n\t\t\t$form->addSelect(\"target_type\", \"Cíl:\", $options);\r\n\t\t\t$content = $this->prepareContentSelectBox();\r\n\t\t\t$menuContent = $this->prepareMenuContentSelectBox();\r\n\t\t\t$form->addSelect(\"target_id\", \"Odkazovaný obsah:\", $content)->setPrompt(\"Pouze při zvolení výše\");\r\n\t\t\t$form->addSelect(\"target_menu\", \"Odk. položka menu:\", $menuContent)->setPrompt(\"Pouze při zvolení výše\");\r\n\t\t}\r\n\t\t$form->addHidden(\"parent_id\", $this->parent_id);\r\n\t\t$form->addHidden(\"edit_id\", $this->edit_id);\r\n\t\t//filling form\r\n\t\tif ($this->edit_id or $this->edit_id === \"0\") {\r\n\t\t\t$defFromDb = $this->closureModel->getItemById($this->edit_id);\r\n\t\t\t$defaults = new \\Nette\\ArrayHash;\r\n\t\t\tforeach ($defFromDb as $key => $value) {\r\n\t\t\t\t$defaults->$key = $value;\r\n\t\t\t}\r\n\t\t\tif ($this->edit_id === \"0\") {\r\n\t\t\t\t$form[\"title\"]->setDisabled();\r\n\t\t\t}\r\n\t\t\tif (!$this->onlyTree) {\r\n\t\t\t\t$t = $defaults->target;\r\n\t\t\t\tif (!Validators::isNumericInt($t)) {\r\n\t\t\t\t\t$menuItem = $this->checkTargetMenuItemExists($t);\r\n\t\t\t\t\tif ($menuItem) {\r\n\t\t\t\t\t\t$defaults->target_type = 3;\r\n\t\t\t\t\t\t$defaults->target_menu = $menuItem;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$contentId = $this->checkTargetContentExists($t);\r\n\t\t\t\t\t\t$defaults->target_type = 1;\r\n\t\t\t\t\t\t$defaults->target_id = $contentId;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$form[\"target_menu\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t} elseif ($t <= 0) {\r\n\t\t\t\t\t$defaults->target_type = 0;\r\n\t\t\t\t\t$form[\"target_menu\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t\t$form[\"target_id\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$defaults->target = null;\r\n\t\t\t$form->setDefaults($defaults);\r\n\t\t}\r\n\r\n\t\t$form->addSubmit('save', 'Save')\r\n\t\t\t\t\t\t->setAttribute('onclick', '$(\"#frmeditForm-title\").trigger(\"change\")')\r\n\t\t\t\t->onClick[] = callback($this, 'editFormSubmitted');\r\n\t\t$form->setRenderer(new \\Kdyby\\BootstrapFormRenderer\\BootstrapRenderer());\r\n\t\treturn $form;\r\n\t}", "protected function buildForm()\n\t{\t\n\t\t$mid = $this->Form->newInput( 'hidden' );\n\t\t$mid->set( 'name', 'mid' );\n\t\t$mid->set( 'id', 'mid' );\n\t\t$mid->set( 'value', $this->data['id'] );\n\t\t\n\t\t$submit = $this->Form->newInput( 'submit' );\n\t\t$submit->set( 'name', 'submit' );\n\t\t$submit->set( 'id', 'submit' );\n\t\t$submit->set( 'value', 'Restore' );\n\t}", "public function cs_generate_form() {\n global $post;\n }", "public function buildForm()\n {\n }", "public function makeOutput()\n\t{\n\t\t$formId = $this->name;\n\t\t$enctype = 'application/x-www-form-urlencoded';\n\n\t\t$formHtml = new HtmlObject('form');\n\t\t$formHtml->property('method', $this->form->getMethod())->\n\t\t\t\t\tproperty('id', $formId)->\n\t\t\t\t\tproperty('action', $this->form->getAction());\n\n\t\t$jsStartup = array();\n\n\t\tforeach($this->inputs as $inputs) {\n\t\t\tforeach($inputs as $input) {\n\t\t\t\tif(($input->type == 'checkbox' || $input->type == 'radio') && isset($input->properties['value'])) {\n\t\t\t\t\t$inputId = $formId . '_' . $input->name . '_' . $input->properties['value'];\n\t\t\t\t} else {\n\t\t\t\t\t$inputId = $formId . '_' . $input->name;\n\t\t\t\t}\n\t\t\t\t$input->property('id', $inputId);\n\t\t\t}\n\t\t}\n\n\t\tforeach($this->inputs as $section => $inputs)\n\t\t{\n\t\t\t$sectionHtml = new HtmlObject('fieldset');\n\t\t\t$sectionHtml->property('id', $formId . \"_section_\" . $section);\n\n\t\t\tif(isset($this->sectionClasses[$section])) {\n\t\t\t\tforeach($this->sectionClasses[$section] as $class) {\n\t\t\t\t\t$sectionHtml->addClass($class);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->sectionClasses[$section] = array();\n\t\t\t}\n\n\t\t\tif(!in_array('mf-toggle-hide', $this->sectionClasses[$section]) && \n\t\t\t !in_array('mf-toggle-none', $this->sectionClasses[$section])) {\n\t\t\t\t$sectionHtml->addClass('mf-toggle-show');\n\t\t\t}\n\n\n\t\t\tif(isset($this->sectionLegends[$section]))\n\t\t\t\t$sectionHtml->insertNewHtmlObject('legend')->\n\t\t\t\t\twrapAround($this->sectionLegends[$section]);\n\n\t\t\t$sectionDiv = new HtmlObject('div');\n\t\t\t$sectionDiv->addClass('fieldset_contents')->\n\t\t\t\tproperty('id', $formId . \"_section_\" . $section . '_contents');\n\n\t\t\tif(isset($this->sectionIntro[$section]))\n\t\t\t\t$sectionDiv->insertNewHtmlObject('div')->\n\t\t\t\t\twrapAround($this->sectionIntro[$section])->\n\t\t\t\t\taddClass('fieldset_intro')->\n\t\t\t\t\tproperty('id', $formId . \"_section_\" . $section . '_intro');\n\n\t\t\t$sectionHtml->wrapAround($sectionDiv);\n\n\t\t\t$hasInputs = false;\n\n\t\t\t$controlsDiv = new HtmlObject('div');\n\t\t\t$controlsDiv->addClass('fieldset_controls')->\n\t\t\t\tproperty('id', $formId . \"_section_\" . $section . '_controls');\n\n\t\t\t$sectionDiv->wrapAround($controlsDiv);\n\n\t\t\tforeach($inputs as $input)\n\t\t\t{\n\t\t\t\t$inputId = $input->property('id');\n\n\t\t\t\tif($input->type === 'submit' && !$this->includeSubmit)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tif($input->type === 'richtext') {\n\t\t\t\t\t$input->property($this->form->getMarkup(), 'true');\n\t\t\t\t\t$input->type = 'textarea';\n\t\t\t\t\t$input->addClass('fulltext');\n\t\t\t\t}\n\n\t\t\t\t$plugins = new Hook();\n\t\t\t\t$plugins->enforceInterface('FormToHtmlHook');\n\t\t\t\t$plugins->loadPlugins('Forms', 'HtmlConvert', 'Base');\n\t\t\t\t$plugins->loadPlugins('Forms', 'HtmlConvert', $input->type);\n\t\t\t\t$plugins->setInput($input);\n\n\t\t\t\t$jsStartup = array_merge_recursive($jsStartup,\n\t\t\t\t\t\t\t\tHook::mergeResults($plugins->getCustomJavaScript()));\n\n\t\t\t\tif(in_array(true, Hook::mergeResults($plugins->overrideHtml())))\n\t\t\t\t{\n\t\t\t\t\t$plugins->createOverriddingHtml($sectionHtml);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\n\t\t\t\tif($inputStartupJs = $this->getInputJavascript($input))\n\t\t\t\t\t$jsStartup = array_merge_recursive($jsStartup, $inputStartupJs);\n\n\t\t\t\t$inputHtml = $this->getInputHtmlByType($input);\n\t\t\t\t$plugins->setCustomHtml($inputHtml);\n\n\t\t\t\tif($inputOptions = $this->getInputMetaData($input) ) //count($inputOptions > 0))\n\t\t\t\t{\n\t\t\t\t\t$metaDataClass = json_encode($inputOptions);\n\t\t\t\t\t$inputHtml->addClass($metaDataClass);\n\t\t\t\t}\n\n\t\t\t\tif($input->type == 'file')\n\t\t\t\t\t$enctype = 'multipart/form-data';\n\n\t\t\t\tif($input->type == 'hidden') {\n\t\t\t\t\t$inputHtml->close(false);\n\t\t\t\t\t$formHtml->wrapAround($inputHtml);\n\t\t\t\t} else {\n\t\t\t\t\t$inputHtml->wrapAround($input->property('contents'));\n\n\t\t\t\t\t$labelHtml = new HtmlObject('label');\n\n\t\t\t\t\t$labelHtml->property('for', $inputId)->\n\t\t\t\t\t\tproperty('id', $inputId . '_label');\n\n\t\t\t\t\tif(isset($input->pretext))\n\t\t\t\t\t\t$controlsDiv->wrapAround($input->pretext);\n\n\t\t\t\t\tif(isset($input->label))\n\t\t\t\t\t{\n\t\t\t\t\t\t$labelHtml->wrapAround($input->label);\n\t\t\t\t\t\tif(isset($input->description))\n\t\t\t\t\t\t\t$labelHtml->property('title', $input->description);\n\t\t\t\t\t}\n\n\t\t\t\t\tif($input->type == 'radio' || $input->type == 'checkbox')\n\t\t\t\t\t\t$inputHtml->addClass('small_input');\n\n\t\t\t\t\tif(isset($input->labelAfter) && $input->labelAfter) {\n\t\t\t\t\t\t$labelHtml->addClass('label_after');\n\t\t\t\t\t\t$inputHtml->addClass('input_label_after');\n\n\t\t\t\t\t\t$controlsDiv->wrapAround($inputHtml)->\n\t\t\t\t\t\t\twrapAround($labelHtml);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$labelHtml->addClass('label_before');\n\t\t\t\t\t\t$inputHtml->addClass('input_label_before');\n\n\t\t\t\t\t\t$controlsDiv->wrapAround($labelHtml)->\n\t\t\t\t\t\t\twrapAround($inputHtml);\n\t\t\t\t\t}\n\n\t\t\t\t\tif(isset($this->errors[$input->name])) {\n\t\t\t\t\t\t$errorLabel = new HtmlObject('label');\n\t\t\t\t\t\t$errorLabel->addClass('error')->\n\t\t\t\t\t\t\tproperty('for', $inputId)->\n\t\t\t\t\t\t\tproperty('generated', true);\n\t\t\t\t\t\t$errorVal = '';\n\n\t\t\t\t\t\tforeach($this->errors[$input->name] as $error)\n\t\t\t\t\t\t\t$errorVal .= $error . ' ';\n\n\t\t\t\t\t\t$errorLabel->wrapAround(trim($errorVal));\n\t\t\t\t\t\t$controlsDiv->wrapAround($errorLabel);\n\t\t\t\t\t}\n\n\t\t\t\t\tif(isset($input->posttext))\n\t\t\t\t\t\t$controlsDiv->wrapAround($input->posttext);\n\n\t\t\t\t\tif(!isset($input->noBreak) || $input->noBreak === false)\n\t\t\t\t\t\t$controlsDiv->insertNewHtmlObject('br');\n\n\t\t\t\t\t$hasInputs = true;\n\t\t\t\t}\n\t\t\t}//foreach($this->inputs as $section => $inputs)\n\n\t\t\tif(isset($this->sectionOutro[$section]))\n\t\t\t\t$sectionDiv->insertNewHtmlObject('div')->\n\t\t\t\t\twrapAround($this->sectionOutro[$section])->\n\t\t\t\t\taddClass('fieldset_outro')->\n\t\t\t\t\tproperty('id', $formId . \"_section_\" . $section . '_outro');\n\n\t\t\tif($hasInputs)\n\t\t\t\t$formHtml->wrapAround($sectionHtml);\n\n\t\t\t$formHtml->property('enctype', $enctype);\n\t\t}\n\n\t\tif(!$this->submitButton && $this->includeSubmit)\n\t\t{\n\t\t\t$sectionHtml = new HtmlObject('div');\n\t\t\t$sectionHtml->property('id', $this->name . \"_section_\" . 'control');\n\t\t\t$inputHtml = new HtmlObject('input');\n\t\t\t$inputHtml->name = $input->name;\n\t\t\t$inputHtml->property('name', 'Submit')->property('type', 'Submit')->property('value', 'Submit');\n\n\t\t\t$labelHtml = new HtmlObject('label');\n\t\t\t$sectionHtml->wrapAround($labelHtml)->wrapAround($inputHtml)->wrapAround('<br>');\n\t\t\t$formHtml->wrapAround($sectionHtml);\n\t\t}\n\n\t\t$formHtml = (string) $formHtml;\n\n\t\t$output = $this->fullForm\n\t\t\t? (string) $formHtml\n\t\t\t: (string) $sectionHtml;\n\n\t\t$formJsOptions = array();\n\t\t$formJsOptions['validateOnLoad'] = $this->form->wasSubmitted();\n\t\t$jsStartup[] = '$(\"#' . $this->name . '\").MortarForm(' . json_encode($formJsOptions) . ');';\n\n\t\tif(class_exists('ActivePage', false))\n\t\t{\n\t\t\t$page = ActivePage::getInstance();\n\t\t\t$page->addStartupScript($jsStartup);\n\t\t}\n\t\treturn $output;\n\t}", "public function buildFormTemplate() {\n\t\t$formTemplatepath = \"src/Templates/\".$this->stateName.\"_\".$this->stateType.\".php\";\n\t\t$formTemplate = fopen($formTemplatepath, \"w\") or die (\"Unable to create html template for \\\"\".$this->stateName.\"_\".$this->stateType.\"\\\" state.\");\n\t\t$formHtml = \"<!DOCTYPE html>\n\t\t<html>\n\t\t<head>\n\t\t\t<title>\".$this->title.\"</title>\n\t\t</head>\n\t\t<body>\";\n\t\tif ($this->stateType == \"generation\") {\n\t\t\t$formHtml .= \"<form method=\\\"\".$this->method.\"\\\" action=\\\"../Scripts/generationHandleRequest.php\\\" >\";\n\t\t}\n\t\t\n\t\tforeach ($this->_inputs as $key => $input) {\n\t\t\t// Skip the Database elements.\n\t\t\tif ($input['inputType'] == \"DATABASE\") {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Check if email validation is required.\n\t\t\tif (isset($input['rule']) && in_array('email', $input['rule'])) {\n\t\t\t\t$input['inputType'] = 'email';\n\t\t\t}\n\n\t\t\t$formHtml .= \"<label>\".$input['label'].\"</label><input type=\\\"\".$input['inputType'].\"\\\" id=\\\"\".$input['name'].\"\\\" name=\\\"\".$input['name'].\"\\\" value=\\\"\".$input['defaultValue'].\"\\\"\";\n\n\t\t\t// Check if field was required.\n\t\t\tif (isset($input['rule']) && in_array('required', $input['rule'])) {\n\t\t\t\t$formHtml .= \" required\";\n\t\t\t}\n\t\t\t// Makes the html page more readable, i.e. appending with a new line.\n\t\t\t$formHtml .= \">\n\t\t\t<br>\";\n\t\t}\n\n\t\t$formHtml .= \"</form>\n\t\t</body>\n\t\t</html>\";\n\n\t\tfwrite($formTemplate, $formHtml);\n\t\tfclose($formTemplate);\n\t}", "public function buildForm() {\n\t\t$form = '';\n\n\t\tforeach ($this->_properties as $row) {\n\t\t\tif (!in_array($row['Field'],$this->_ignore)) {\n\t\t\t\t$elem = $this->buildElement($row);\n\t\t\t\t$row['Comment'] != '' ? $comment = $row['Comment'].\"<br />\": $comment = '';\n\t\t\t\t$this->_properties[$row['Field']]['HTMLElement']=$elem;\n\t\t\t\tif ($row['ElementType']=='hidden')\n\t\t\t\t\t$form .= $elem;\n\t\t\t\telse \n\t\t\t\t\t$form .= sprintf(\"<div class='formElem'>\\n%s<br />\\n%s\\n%s</div>\\n\",ucwords (str_replace (\"_\",\" \",$row['Field'])),$comment,$elem);\n\t\t\t}\n\t\t}\n\t\treturn $form;\n\t}", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: run demo');\r\n\r\n $this->addElement('static', 'progressBar',\r\n 'Your progress meter looks like:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('reset','process'));\r\n }", "protected function getForm()\n {\n $this->document->addStyle('view/javascript/codemirror/lib/codemirror.css');\n $this->document->addStyle('view/javascript/codemirror/theme/monokai.css');\n $this->document->addStyle('view/javascript/summernote/summernote.css');\n\n $this->document->addScript('view/javascript/codemirror/lib/codemirror.js');\n $this->document->addScript('view/javascript/codemirror/lib/xml.js');\n $this->document->addScript('view/javascript/codemirror/lib/formatting.js');\n $this->document->addScript('view/javascript/summernote/summernote.js');\n $this->document->addScript('view/javascript/summernote/summernote-image-attributes.js');\n $this->document->addScript('view/javascript/summernote/opencart.js');\n\n $data['text_form'] = !isset($this->request->get['country_id']) ? $this->language->get('text_add') : $this->language->get('text_edit');\n\n if (isset($this->error['warning'])) {\n $data['error_warning'] = $this->error['warning'];\n } else {\n $data['error_warning'] = '';\n }\n\n if (isset($this->error['domain'])) {\n $data['error_domain'] = $this->error['domain'];\n } else {\n $data['error_domain'] = array();\n }\n\n if (isset($this->error['currency'])) {\n $data['error_currency'] = $this->error['currency'];\n } else {\n $data['error_currency'] = '';\n }\n\n $url = '';\n\n if (isset($this->request->get['sort'])) {\n $url .= '&sort=' . $this->request->get['sort'];\n }\n\n if (isset($this->request->get['order'])) {\n $url .= '&order=' . $this->request->get['order'];\n }\n\n if (isset($this->request->get['page'])) {\n $url .= '&page=' . $this->request->get['page'];\n }\n\n $data['breadcrumbs'] = array();\n\n $data['breadcrumbs'][] = array(\n 'text' => $this->language->get('text_home'),\n 'href' => $this->url->link('common/dashboard', 'user_token=' . $this->session->data['user_token'])\n );\n\n $data['breadcrumbs'][] = array(\n 'text' => $this->language->get('heading_title'),\n 'href' => $this->url->link('domain/domain', 'user_token=' . $this->session->data['user_token'] . $url)\n );\n\n if (!isset($this->request->get['country_id'])) {\n $data['action'] = $this->url->link('domain/domain/add', 'user_token=' . $this->session->data['user_token'] . $url);\n } else {\n $data['action'] = $this->url->link('domain/domain/edit', 'user_token=' . $this->session->data['user_token'] . '&country_id=' . $this->request->get['country_id'] . $url);\n }\n\n $data['cancel'] = $this->url->link('domain/domain', 'user_token=' . $this->session->data['user_token'] . $url);\n\n if (isset($this->request->get['country_id']) && ($this->request->server['REQUEST_METHOD'] != 'POST')) {\n $data['domainLang'] = $this->model_domain_domain->getDomain($this->request->get['country_id']);\n if(isset($data['domainLang'][0] )){\n $domain_info = current($data['domainLang']);\n }else{\n $domain_info = $data['domainLang'];\n }\n\n }\n\n $data['user_token'] = $this->session->data['user_token'];\n\n\n if (isset($this->request->post['domain'])) {\n $data['domain'] = $this->request->post['domain'];\n } elseif (!empty($domain_info)) {\n $data['domain'] = $domain_info['domain'];\n } else {\n $data['domain'] = '';\n }\n\n if (isset($this->request->post['currency_id'])) {\n $data['currency_id'] = $this->request->post['currency_id'];\n } elseif (!empty($domain_info)) {\n $data['currency_id'] = $domain_info['currency_id'];\n } else {\n $data['currency_id'] = '';\n }\n\n if (isset($this->request->post['currency_title'])) {\n $data['currency_title'] = $this->request->post['currency_title'];\n } elseif (!empty($domain_info)) {\n $data['currency_title'] = $domain_info['currency_title'];\n } else {\n $data['currency_title'] = '';\n }\n\n $this->load->model('design/layout');\n\n $data['layouts'] = $this->model_design_layout->getLayouts();\n\n $data['header'] = $this->load->controller('common/header');\n $data['column_left'] = $this->load->controller('common/column_left');\n $data['footer'] = $this->load->controller('common/footer');\n\n $this->response->setOutput($this->load->view('domain/domain_form', $data));\n }", "private function controllerBuilder() {\n // Create rules\n $validationRules = '';\n $filecheck = '';\n $insert = false;\n $insertTab = '';\n // Foreach on form fields added on generator\n foreach ($this->formDatas as $field) {\n $rules = array();\n // Create rules for codeigniter framework\n if (isset($field['rules'])) {\n $rules = json_decode($field['rules'], true);\n }\n if (!empty($field['min_length'])) {\n $rules[] = 'min_length[' . $field['min_length'] . ']';\n }\n if (!empty($field['max_length'])) {\n $rules[] = 'max_length[' . $field['max_length'] . ']';\n }\n if (!empty($field['exact_length'])) {\n $rules[] = 'exact_length[' . $field['exact_length'] . ']';\n }\n if (!empty($field['greater_than'])) {\n $rules[] = 'greater_than[' . $field['greater_than'] . ']';\n }\n if (!empty($field['less_than'])) {\n $rules[] = 'less_than[' . $field['less_than'] . ']';\n }\n\n // Create php line\n if (isset($rules)) {\n $validationRules .= '$this->form_validation->set_rules(\\'' . strtolower($field['name']) . '\\', \\'' . $field['label'] . '\\', \\'' . implode('|', $rules) . '\\');\n ';\n }\n\n\n // File\n if ($field['type'] == 'file') {\n // If file_format selected or maxfilesize indicated\n if (isset($field['file_format']) || isset($field['maxfilesize'])) {\n if (!isset($field['file_format'])) {\n $fileformat = 'false';\n } else {\n $fileformat = str_replace(']', ')', str_replace('[', 'array(', sprintf($field['file_format'])));\n }\n\n // Create check line for checking file options\n $filecheck .= '$errorfile[\"' . $field['name'] . '\"] = $this->fileup->checkErrorUpload($_FILES[\"' . $field['name'] . '\"], ' . $fileformat . ', ' . $field['maxfilesize'] . ');\n ';\n }\n }\n\n // Check if database option is checked for create fields to insert\n if (isset($field['database_fields'])) {\n // Option to active database insert\n $insert = true;\n // Tab to insert\n $insertTab .= '$insertTab[\"' . $field['name'] . '\"] = $_POST[\"' . $field[\"name\"] . '\"];\n ';\n }\n }\n\n // Create com for files check\n if ($filecheck != '') {\n $filecheck = '// Files validation\n ' . $filecheck;\n }\n\n // Create code to insert in database\n if ($insert == true) {\n $database_insert = '\n // If valid\n if($valid == true) {\n ' . $insertTab . '\n // Save to bdd\n if (!$this->' . $this->formName . '_model->save($insertTab) == true) {\n // Save error\n $data[\"error\"] = \"save\";\n }\n }';\n } else {\n $database_insert = '';\n }\n\n // Build the controller\n $controller = '<?php\n class ' . ucfirst($this->formName) . ' extends CI_Controller {\n // Constructor\n function __construct()\n {\n parent::__construct();\n $this->load->library(array(\\'form_validation\\', \\'fileup\\'));\n $this->load->helper(array(\\'form\\'));\n $this->load->model(\\'' . $this->formName . '_model\\');\n }\n\n // Form ' . ucfirst($this->formName) . '\n public function index()\n {\n // Init\n $data = array();\n // If form sended\n if(!empty($_POST)) {\n // Delimitors\n $this->form_validation->set_error_delimiters(\\'<p class=\"error\">\\', \\'</p>\\');\n\n // Validation rules\n ' . $validationRules . '\n\n ' . $filecheck . '\n\n // To block database insertion if we have file errors\n $valid = true;\n\n // Check for file errors\n if(isset($errorfile)) {\n // Create file errors for view\n foreach($errorfile as $name => $errorf) {\n if($errorf != false) {\n $data[\"errorfile\"][$name] = $errorf;\n $valid = false;\n }\n }\n }\n\n if ($this->form_validation->run() == true) {\n // Insert in bdd\n ' . $database_insert . '\n\n // Redirect to success page\n redirect(\\'' . $this->formName . '/success\\');\n }\n else {\n // Validation error\n $data[\"error\"] = \"validation\";\n\n }\n }\n // Load view\n $this->load->view(\\'' . $this->formName . '\\', $data);\n }\n\n // Success\n public function success() {\n // Load view\n $this->load->view(\\'' . $this->formName . '_success\\');\n }\n\n }\n ?>';\n\n return array(str_replace('<', '&lt;', $controller), $controller);\n }", "public function auto_build_form($form_content, $data){\r\n\t\treturn \"<form method='post' enctype='multipart/form-data' action='#' \" . (isset($data['onsubmit']) ? \" onsubmit='\" . $data['onsubmit'] . \"' \" : \"onsubmit=\\\"return validateFields()\\\"\") .\r\n\t\t\t\" >\" .\r\n\t\t\t$form_content .\r\n\t\t\t\"</form>\";\r\n\t}", "public function build_css() {\n\t\t\t\n\t\t}", "function genFormStyle(){\n $res = '<form action=\"preferences.php\" method=\"post\">';\n $res .= '<p>Selctionner un style</p>';\n $res .= '<select name=\"style\" id=\"style\">';\n if(isset($_SESSION['style'])){\n switch($_SESSION['style']){\n case \"blue.css\":\n $res .= '<option value=\"blue.css\" selected>Blue</option>';\n $res .= '<option value=\"italic.css\">Italic</option>';\n $res .= '<option value=\"vertetjaune.css\">V et J</option>';\n break;\n case \"italic.css\":\n $res .= '<option value=\"blue.css\">Blue</option>';\n $res .= '<option value=\"italic.css\" selected>Italic</option>';\n $res .= '<option value=\"vertetjaune.css\">V et J</option>';\n break;\n case \"vertetjaune.css\":\n $res .= '<option value=\"blue.css\">Blue</option>';\n $res .= '<option value=\"italic.css\">Italic</option>';\n $res .= '<option value=\"vertetjaune.css\" selected>V et J</option>';\n break;\n }\n }\n else{\n $res .= '<option value=\"blue.css\">Blue</option>';\n $res .= '<option value=\"italic.css\">Italic</option>';\n $res .= '<option value=\"vertetjaune.css\">V et J</option>';\n }\n $res .= '</select>';\n $res .= '<button value=\"submit\">Go !</button>';\n $res .= '</form>';\n echo $res;\n }", "public function build_menu_page() {\n\n\t\t\t$tabindex = 0;\n\t\t\t$temp = array();\n\t\t\t$hidden = array();\n\t\t\t$this->data = get_option($this->slug.'_fields');\n\t\t\t\n\t\t\t$output = '';\n\t\t\t$output .= '<!-- wrap starts -->'.\"\\n\";\n\t\t\t$output .= \"\\t\".'<div class=\"wrap\">'.\"\\n\";\n\n\t\t\t$output .= '<h1>'.$this->options['title'].'</h1>'.\"\\n\";\n\n\t\t\t$output .= \"\\t\".'<form method=\"post\" action=\"'.$_SERVER['REQUEST_URI'].'\" enctype=\"multipart/form-data\">'.\"\\n\\n\";\n\n\t\t\tforeach ($this->data as $section => $fields) {\n\n\t\t\t\t$output .= \"\\t\".'<h2 class=\"title\" id=\"'.sanitize_title($section).'\">'.$section.'</h2>'.\"\\n\\n\";\n\n\t\t\t\t$output .= \"\\t\".'<table class=\"form-table theme-form-table\">'.\"\\n\";\n\t\t\t\t$output .= \"\\t\".'<tbody>'.\"\\n\";\n\n\t\t\t\tforeach ($fields as $id => $field) {\n\n\t\t\t\t\tif ($field['type'] != 'hidden') {\n\n\t\t\t\t\t\t$tabindex += 1;\n\t\t\t\t\t\t$temp += array($field['label'] => isset($field['value']) ? $field['value'] : '');\n\t\t\t\t\t\t$value = isset($_POST['updating']) ? Save::save_page($this->slug, $field) : Save::set_default_value($this->slug, $temp, $field);\n\n\t\t\t\t\t\t$description = (isset($field['description']) && !empty($field['description'])) ? '<span class=\"description\" id=\"'.Field::get_label_name($field['label']).'-info\">'.$field['description'].'</span>' : '';\n\t\t\t\t\t\t$toggle = (isset($field['description']) && !empty($field['description'])) ? '<a class=\"toggle\" data-toggle=\"form-description\" data-target=\"'.Field::get_label_name($field['label']).'-info\" title=\"'.__('Show info.', 'admin translation').'\">'.__('[+] Info', 'admin translation').'</a>' : '';\n\n\t\t\t\t\t\t$output .= \"\\t\".'<tr valign=\"top\">'.\"\\n\";\n\t\t\t\t\t\t$output .= \"\\t\".'<th class=\"scope-one\" scope=\"row\"><label'.Field::get_label_error($field['label']).' for=\"'.Field::get_label_name($field['label']).'\">'.$field['name'].' <cite></cite></label></th>'.\"\\n\";\n\t\t\t\t\t\t$output .= \"\\t\".'<td class=\"scope-two\">'.Field::get_field($this->slug, $field, $value).'<div class=\"field-info\">'.$description.'</div></td>'.\"\\n\";\n\t\t\t\t\t\t$output .= \"\\t\".'<td class=\"scope-three\">'.$toggle.'</td>'.\"\\n\";\n\t\t\t\t\t\t$output .= \"\\t\".'<td>&nbsp;</td>'.\"\\n\";\n\t\t\t\t\t\t$output .= \"\\t\".'</tr>'.\"\\n\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\n\t\t\t\t\t\tarray_push($hidden, $field);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t$output .= \"\\t\".'</tbody>'.\"\\n\";\n\t\t\t\t$output .= \"\\t\".'</table>'.\"\\n\\n\";\n\t\t\t\t$output .= \"\\t\".'<hr />'.\"\\n\\n\";\n\t\t\t}\n\n\t\t\t$output .= isset($_REQUEST['page']) ? \"\\t\".wp_nonce_field($_REQUEST['page']).\"\\n\" : '';\n\n\t\t\tforeach ($hidden as $id => $field) {\n\n\t\t\t\t$temp += array($field['label'] => isset($field['value']) ? $field['value'] : '');\n\t\t\t\t$value = isset($_POST['updating']) ? Save::save_page($this->slug, $field) : Save::set_default_value($this->slug, $temp, $field);\n\t\t\t\t\n\t\t\t\t$output .= Field::get_field($this->slug, $field, $value);\n\t\t\t}\n\t\t\t\n\t\t\t$output .= \"\\t\".'<input type=\"hidden\" id=\"updating\" name=\"updating\" value=\"1\" />'.\"\\n\";\n\t\t\t$output .= \"\\t\".'<p class=\"submit\"><input type=\"submit\" name=\"submit\" id=\"submit\" class=\"button button-primary\" value=\"'.__('Save Changes', 'admin translation').'\" /></p>'.\"\\n\";\n\t\t\t$output .= \"\\t\".'</form>'.\"\\n\";\n\n\t\t\t$output .= \"\\t\".'</div>'.\"\\n\";\n\t\t\t$output .= '<!-- wrap ends -->'.\"\\n\\n\";\n\n\t\t\t$output .= Field::get_form_feedback();\n\t\t\t\n\t\t\tValidation::reset_error();\n\n\t\t\techo $output;\n\t\t}", "private function _displayForm(){\n\t $moneda = Tools::getValue('moneda', $this->moneda);\n\t $iseuro = ($moneda == '978') ? ' selected=\"selected\" ' : '';\n\t $isdollar = ($moneda == '840') ? ' selected=\"selected\" ' : '';\n \t // Opciones para activar/desactivar SSL\n\t $ssl = Tools::getValue('ssl', $this->ssl);\n\t $ssl_si = ($ssl == 'si') ? ' checked=\"checked\" ' : '';\n\t $ssl_no = ($ssl == 'no') ? ' checked=\"checked\" ' : '';\n\t // Opciones para el comportamiento en error en el pago\n\t $error_pago = Tools::getValue('error_pago', $this->error_pago);\n\t $error_pago_si = ($error_pago == 'si') ? ' checked=\"checked\" ' : '';\n\t $error_pago_no = ($error_pago == 'no') ? ' checked=\"checked\" ' : '';\n\t // Opciones para activar los idiomas\n\t $idiomas_estado = Tools::getValue('idiomas_estado', $this->idiomas_estado);\n\t $idiomas_estado_si = ($idiomas_estado == 'si') ? ' checked=\"checked\" ' : '';\n\t $idiomas_estado_no = ($idiomas_estado == 'no') ? ' checked=\"checked\" ' : '';\n\t \n\t \n\t // Mostar formulario\n\t\t$this->_html .=\n\t\t'<form action=\"'.$_SERVER['REQUEST_URI'].'\" method=\"post\">\n\t\t\t<fieldset>\n\t\t\t<legend><img src=\"../img/admin/contact.gif\" />'.$this->l('Configuraci&oacute;n del TPV').'</legend>\n\t\t\t\t<table border=\"0\" width=\"680\" cellpadding=\"0\" cellspacing=\"0\" id=\"form\">\n\t\t\t\t\t<tr><td colspan=\"2\">'.$this->l('Por favor completa la informaci&oacute;n requerida que te proporcionar&aacute; tu banco Servired.').'.<br /><br /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('URL de llamada del entorno').'</td><td><input type=\"text\" name=\"urltpv\" value=\"'.Tools::getValue('urltpv', $this->urltpv).'\" style=\"width: 330px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Clave secreta de encriptaci&oacute;n').'</td><td><input type=\"password\" name=\"clave\" value=\"'.Tools::getValue('clave', $this->clave).'\" style=\"width: 200px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Nombre del comercio').'</td><td><input type=\"text\" name=\"nombre\" value=\"'.htmlentities(Tools::getValue('nombre', $this->nombre), ENT_COMPAT, 'UTF-8').'\" style=\"width: 200px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('N&uacute;mero de comercio (FUC)').'</td><td><input type=\"text\" name=\"codigo\" value=\"'.Tools::getValue('codigo', $this->codigo).'\" style=\"width: 200px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('N&uacute;mero de terminal').'</td><td><input type=\"text\" name=\"terminal\" value=\"'.Tools::getValue('terminal', $this->terminal).'\" style=\"width: 80px;\" /></td></tr>\t\t\t\t\t\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Tipo de moneda').'</td><td>\n\t\t\t\t\t<select name=\"moneda\" style=\"width: 80px;\"><option value=\"\"></option><option value=\"978\"'.$iseuro.'>EURO</option><option value=\"840\"'.$isdollar.'>DOLLAR</option></select></td></tr>\n\t\t\t\t\t\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Tipo de transacci&oacute;n').'</td><td><input type=\"text\" name=\"trans\" value=\"'.Tools::getValue('trans', $this->trans).'\" style=\"width: 80px;\" /></td></tr>\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\t</td></tr>\n\t\t\t\t\t\n\t\t\t\t</table>\n\t\t\t</fieldset>\n\t\t\t<br>\n\t\t\t<fieldset>\n\t\t\t<legend><img src=\"../img/t/9.gif\" />'.$this->l('Personalizaci&oacute;n').'</legend>\n\t\t\t<table border=\"0\" width=\"680\" cellpadding=\"0\" cellspacing=\"0\" id=\"form\">\n\t\t<tr>\n\t\t\t<td colspan=\"2\">'.$this->l('Por favor completa los datos adicionales.').'.<br /><br /></td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td width=\"215\" style=\"height: 35px;\">'.$this->l('SSL en URL de validaci&oacute;n').'</td>\n\t\t\t<td>\n\t\t\t<input type=\"radio\" name=\"ssl\" id=\"ssl_1\" value=\"si\" '.$ssl_si.'/>\n\t\t\t<img src=\"../img/admin/enabled.gif\" alt=\"'.$this->l('Activado').'\" title=\"'.$this->l('Activado').'\" />\n\t\t\t<input type=\"radio\" name=\"ssl\" id=\"ssl_0\" value=\"no\" '.$ssl_no.'/>\n\t\t\t<img src=\"../img/admin/disabled.gif\" alt=\"'.$this->l('Desactivado').'\" title=\"'.$this->l('Desactivado').'\" />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td width=\"215\" style=\"height: 35px;\">'.$this->l('En caso de error, permitir elegir otro medio de pago').'</td>\n\t\t\t<td>\n\t\t\t<input type=\"radio\" name=\"error_pago\" id=\"error_pago_1\" value=\"si\" '.$error_pago_si.'/>\n\t\t\t<img src=\"../img/admin/enabled.gif\" alt=\"'.$this->l('Activado').'\" title=\"'.$this->l('Activado').'\" />\n\t\t\t<input type=\"radio\" name=\"error_pago\" id=\"error_pago_0\" value=\"no\" '.$error_pago_no.'/>\n\t\t\t<img src=\"../img/admin/disabled.gif\" alt=\"'.$this->l('Desactivado').'\" title=\"'.$this->l('Desactivado').'\" />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td width=\"215\" style=\"height: 35px;\">'.$this->l('Activar los idiomas en el TPV').'</td>\n\t\t\t<td>\n\t\t\t<input type=\"radio\" name=\"idiomas_estado\" id=\"idiomas_estado_si\" value=\"si\" '.$idiomas_estado_si.'/>\n\t\t\t<img src=\"../img/admin/enabled.gif\" alt=\"'.$this->l('Activado').'\" title=\"'.$this->l('Activado').'\" />\n\t\t\t<input type=\"radio\" name=\"idiomas_estado\" id=\"idiomas_estado_no\" value=\"no\" '.$idiomas_estado_no.'/>\n\t\t\t<img src=\"../img/admin/disabled.gif\" alt=\"'.$this->l('Desactivado').'\" title=\"'.$this->l('Desactivado').'\" />\n\t\t\t</td>\n\t\t</tr>\n\t\t</table>\n\t\t\t</fieldset>\t\n\t\t\t<br>\n\t\t<input class=\"button\" name=\"btnSubmit\" value=\"'.$this->l('Guardar configuraci&oacute;n').'\" type=\"submit\" />\n\t\t\t\t\t\n\t\t\t\n\t\t</form>';\n\t}", "private function StartForm(){\r\n\t\t\t$this->formHTML .= \"<form method=\\\"{$this->method}\\\" action=\\\"{$this->action}\\\"\";\r\n\t\t\tif($this->enctype){\r\n\t\t\t\t$this->formHTML .= \" enctype=\\\"{$this->enctype}\\\"\";\r\n\t\t\t}\r\n\t\t\t$this->formHTML .= \" name=\\\"{$this->formName}\\\" class=\\\"c{$this->formName}\\\" id=\\\"i{$this->formName}\\\"\";\r\n\t\t\t$this->formHTML .= \">\";\r\n\t\t}", "abstract function builder_form(): string;", "public function createForm() {\n module_load_include('inc', 'islandora_form_builder', 'FormGenerator');\n $form_values = &$this->formState['values'];\n $file = isset($form_values['ingest-file-location']) ? $form_values['ingest-file-location'] : '';\n $form['#attributes']['enctype'] = 'multipart/form-data';\n $form['indicator']['ingest-file-location'] = array(\n '#type' => 'file',\n '#title' => t('Upload Document'),\n '#size' => 48,\n '#description' => t('Select file to be added the the object.'),\n );\n $form_generator = FormGenerator::CreateFromModel($this->contentModelPid, $this->contentModelDsid);\n $form[FORM_ROOT] = $form_generator->generate($this->formName); // TODO get from user .\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Ingest'),\n '#prefix' => t('Please be patient. Once you click next there may be a number of files created. ' .\n 'Depending on your content model this could take a few minutes to process.<br />')\n );\n return $form;\n }", "function customHead(){?>\n\t\t\t<style type=\"text/css\">\n\t\t\t.half-container:not(.full){\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tvertical-align: top;\n\t\t\t\twidth: 49%;\n\t\t\t\tbox-sizing:border-box;\n\t\t\t\t-moz-box-sizing:border-box;\n\t\t\t\t-webkit-box-sizing:border-box;\n\t\t\t\tpadding: 0 10px 0 0;\n\t\t\t\tmargin: 0 !important;\n\t\t\t}\n\t\t\tdiv.form-container input{\n\t\t\t\tborder: 2px solid #6A6A6A;\n\t\t\t\tfont-family: AurulentSansRegular;\n\t\t\t\tfont-size: 14px;\n\t\t\t\tpadding: 3px;\n\t\t\t}\n\t\t\tdiv.form-container label{\n\t\t\t\tcolor: #6A6A6A;\n\t\t\t\tfont-family: AurulentSansRegular;\n\t\t\t\tfont-size: 15px;\n\t\t\t\tfont-weight: normal;\n\t\t\t}\n\t\t\t</style>\n\t\t\t<style type=\"text/css\">\n\n\t\t\t/* General styles */\n\t\t\t/* body { margin: 0; padding: 0; font: 80%/1.5 Arial,Helvetica,sans-serif; color: #111; background-color: #FFF; } */\n\t\t\th2 { margin: 0px; padding: 10px; font-family: Georgia, \"Times New Roman\", Times, serif; font-size: 200%; font-weight: normal; color: #FFF; background-color: #CCC; border-bottom: #BBB 2px solid; }\n\t\t\tp#copyright { margin: 20px 10px; font-size: 90%; color: #999; }\n\n\t\t\t/* Form styles */\n\t\t\tdiv.form-container { margin: 10px; padding: 5px; background-color: #FFF; /* border: #EEE 1px solid; */ }\n\n\t\t\tp.legend { margin-bottom: 1em; }\n\t\t\tp.legend em { color: #C00; font-style: normal; }\n\n\t\t\tdiv.errors, div.form-container div.errors { margin: 0 0 10px 0; padding: 5px 10px; border: #FC6 2px solid; background-color: #FFC; }\n\t\t\tdiv.errors p { margin: 0; }\n\t\t\tdiv.errors p em { color: #C00; font-style: normal; font-weight: bold; }\n\n\t\t\tdiv.form-container form p { margin: 0; }\n\t\t\tdiv.form-container form p.note { margin-left: 170px; font-size: 90%; color: #333; }\n\t\t\tdiv.form-container form fieldset { margin: 10px 0; padding: 10px; border: #DDD 1px solid; }\n\t\t\tdiv.form-container form legend { font-weight: bold; color: #666; }\n\t\t\tdiv.form-container form fieldset div { padding: 0.25em 0; }\n\t\t\tdiv.form-container label { margin-right: 10px; padding-right: 10px; width: 100px; display: block; float: left; text-align: right; position: relative; }\n\t\t\tdiv.form-container label.error, \n\t\t\tdiv.form-container span.error { color: #C00; }\n\t\t\tdiv.form-container label em { position: absolute; right: 0; font-size: 120%; font-style: normal; color: #C00; }\n\t\t\tdiv.form-container input.error { border-color: #C00; background-color: #FEF; }\n\t\t\tdiv.form-container input:focus,\n\t\t\tdiv.form-container input.error:focus, \n\t\t\tdiv.form-container textarea:focus {\tbackground-color: #FFC; border-color: #FC6; }\n\t\t\tdiv.form-container div.controlset label, \n\t\t\tdiv.form-container div.controlset input { display: inline; float: none; }\n\t\t\tdiv.form-container div.controlset label.controlset { display: block; float: left; }\n\t\t\tdiv.form-container div.controlset div { margin-left: 170px; }\n\t\t\tdiv.form-container div.buttonrow { margin-left: 180px; }\n\t\t\t\n\t\t\tp.note { font-size: 12px; margin: 5px 0 0 170px; }\n\n\t\t</style>\n\t<?php\n\t}", "public function form(){\n \t \tif($this->layoutWidgetInfo){\n \t\t$setting = json_decode($this->layoutWidgetInfo->setting, true);\n \t}\n\n \t//default option(type[text], cols[3-9], rows[1], label[$key], name[$key], value[$setting[$k]])\n \t//add option(class, id, stype, styleRow, required, placeholder, attr, [options, code])\n \t$settingForm = array(\n \t\t'layout_widget_id' \t=> array('type' => 'hidden', 'value' => $this->layoutWidgetInfo->layoutWidgetId),\n \t\t'widget_controller' => array('type' => 'hidden', 'value' => $this->widgetController),\n \t\t'header' \t=> array('type' => 'custom', 'value' => \"<h4 class='widget_header col-md-12'>{$this->widgetController}</h4>\", 'label' => ''),\n\n \t\t'title' => array(),\n \t\t'class'\t=> array(),\n 'bg_color'\t=> array('label' => 'Màu nền', 'class' => 'ColorPickerSliders',\n 'addElement' => '<a href=\"index.php?r=admin/help/view&helpId=4\" target=\"_blank\">Xem thêm</a>'),\n \t\t'category_id'\t=> array('type' => 'select_category', 'label' => 'Category', 'required' => true,\n \t\t\t\t'options' => CategoryExt::getCategoryList()),\n \t\t'style'\t=> array('type' => 'select', 'options' => $this->settingDefault['style']),\n \t\t'order_by' => array('type' => 'select', 'options' => $this->settingDefault['order_by']),\n \t\t'order_direction' => array('type' => 'select', 'options' => $this->settingDefault['order_direction']),\n \t);\n\n \t$settingAll = array(\n \t\t'cols' => '3-9'\n \t);\n\n \t//render setting from\n \tTemplateHelper::renderForm($settingForm, $setting, $settingAll);\n TemplateHelper::getTemplate('layout/_extra/add_setting.php', $setting);\n TemplateHelper::getTemplate('layout/_extra/color_picker.php');\n \t}", "public function build() {\n\t\t$this->add($this->Html->A(array('href' => 'http://cakephp.org', 'target' => '_blank', 'text' => 'CakePHP')));\n\t\t$this->add($this->Html->Abbr(array('text' => __('This is an abrreviation'))));\n\t\t$this->add($this->Html->Address(array('text' => __('This is an address'))));\n\t\t$this->add($this->Html->B(array('text' => __('This is bold text'))));\n\t\t$this->add($this->Html->Bdo(array('name' => 'value')));\n\t\t$this->add($this->Html->Blockquote(array('text' => __('This is a block quote'))));\n\t\t$this->add($this->Html->Br());\n\t\t$this->add($this->Html->Button(array('value' => __('This is a button'))));\n\t\t$this->add($this->Html->Cite(array('text' => __('This is a citation'))));\n\t\t$this->add($this->Html->Code(array('text' => __('This is a code block'))));\n\t\t$this->add($this->Html->Comment(array('text' => __('This is a comment'))));\n\t\t$this->add($this->Html->Del(array('text' => __('This is deleted text'))));\n\t\t$this->add($this->Html->Dfn(array('text' => __('This is a definition'))));\n\t\t$this->add($this->Html->Div(array('text' => __('This is a division'))));\n\t\t$dl = $this->Html->Dl(array('text' => __('This is a defined list')));\n\t\t$dl->add($this->Html->Dt(array('text' => __('This is a definition title'))));\n\t\t$dl->add($this->Html->Dd(array('text' => __('This is a definition data'))));\n\t\t$this->add($dl);\n\t\t$this->add($this->Html->Em(array('text' => __('This is text with emphasis'))));\n\t\t$form = $this->Html->Form(array('name' => 'example'));\n\t\t\t$fieldset = $this->Html->Fieldset();\n\t\t\t$fieldset->add($this->Html->Legend(array('text' => __('This is a legend of a fieldset'))));\n\t\t\t$fieldset->add($this->Html->Label(array('text' => __('This is a label'))));\n\t\t\t$fieldset->add($this->Html->Input(array('name' => 'text', 'type' => 'text', 'value' => __('This is a text input'))));\n\t\t\t$fieldset->add($this->Html->Input(array('name' => 'password', 'type' => 'password', 'value' => __('This is a password input'))));\n\t\t\t$fieldset->add($this->Html->Input(array('name' => 'radio', 'type' => 'radio', 'value' => 'radio')));\n\t\t\t$fieldset->add($this->Html->Input(array('name' => 'checkbox', 'type' => 'checkbox', 'value' => 'checkbox')));\n\t\t\t$fieldset->add($this->Html->Textarea(array('name' => 'textarea', 'text' => __('This is a textarea'))));\n\t\t\t\t$select = $this->Html->Select(array('name' => 'select'));\n\t\t\t\t\t$optgroup = $this->Html->Optgroup(array('label' => __('This is an option group')));\n\t\t\t\t\t$optgroup->add($this->Html->Option(array('value' => 123, 'text' => __('This is an option'))));\n\t\t\t\t$select->add($optgroup);\n\t\t\t$fieldset->add($select);\n\t\t$form->add($fieldset);\n\t\t$this->add($form);\n\t\t$this->add($this->Html->Hr());\n\t\t$this->add($this->Html->I(array('text' => __('This is text in italics'))));\n\t\t$this->add($this->Html->Iframe(array('name' => 'ctk', 'src' => 'https://github.com/jameswatts/cake-toolkit')));\n\t\t$this->add($this->Html->Img(array('src' => 'http://cakephp.org/img/cake-logo.png', 'alt' => 'CakePHP')));\n\t\t$this->add($this->Html->Ins(array('text' => __('This is inserted text'))));\n\t\t$this->add($this->Html->Kbd(array('text' => __('This is keyboard text'))));\n\t\t$map = $this->Html->Map();\n\t\t$map->add($this->Html->Area());\n\t\t$this->add($map);\n\t\t$this->add($this->Html->Noscript(array('text' => __('This is displayed if you do not have JavaScript enabled'))));\n\t\t$object = $this->Html->Object();\n\t\t$object->add($this->Html->Param(array('name' => 'example', 'value' => 123)));\n\t\t$this->add($object);\n\t\t$this->add($this->Html->P(array('text' => __('This is a paragraph of text'))));\n\t\t$this->add($this->Html->Pre(array('text' => __('This is preformatted text'))));\n\t\t$this->add($this->Html->Q(array('text' => __('This is a quotation'))));\n\t\t$this->add($this->Html->S(array('text' => __('This is a strike-through text'))));\n\t\t$this->add($this->Html->Samp(array('text' => __('This is a sample text'))));\n\t\t$this->add($this->Html->Small(array('text' => __('This is small text'))));\n\t\t$this->add($this->Html->Span(array('text' => __('This is a span'))));\n\t\t$this->add($this->Html->Strong(array('text' => __('This is a strong text'))));\n\t\t$this->add($this->Html->Style(array('name' => 'value')));\n\t\t$this->add($this->Html->Sub(array('text' => __('This is a sub-text'))));\n\t\t$this->add($this->Html->Sup(array('text' => __('This is a super-text'))));\n\t\t$table = $this->Html->Table(array('border' => 1));\n\t\t$table->add($this->Html->Caption(array('text' => __('This is a table caption'))));\n\t\t\t$colgroup = $this->Html->Colgroup();\n\t\t\t$colgroup->add($this->Html->Col(array('span' => 1)));\n\t\t\t$colgroup->add($this->Html->Col(array('span' => 1)));\n\t\t\t$tbody = $this->Html->Tbody();\n\t\t\t\t$tr = $this->Html->Tr();\n\t\t\t\t$tr->add($this->Html->Th(array('text' => __('This is a table header'))));\n\t\t\t\t$tr->add($this->Html->Td(array('text' => __('This is a table data'))));\n\t\t\t$tbody->add($tr);\n\t\t$table->add($colgroup);\n\t\t$table->add($tbody);\n\t\t$this->add($table);\n\t\t$ol = $this->Html->Ol();\n\t\t$ol->add($this->Html->Li(array('text' => __('This is an ordered list item'))));\n\t\t$this->add($ol);\n\t\t$ul = $this->Html->Ul();\n\t\t$ul->add($this->Html->Li(array('text' => __('This is an unordered list item'))));\n\t\t$this->add($ul);\n\t\t$this->add($this->Html->Var(array('text' => __('This is a variable'))));\n\t}", "static function newform()\n\t{\n\t\treturn '\n\t\t<h2>Neue Wette eintragen</h2>\n\t\t<small>Eine Wette wird erst gestartet wenn der Wetter (das bist DU wenn du eine Wette einträgst) die offene Wette startet.</small>\n\t\t<form action=\"'.getURL(false,false).'\" method=\"post\">\n\t\t<table class=\"border\">\n\t\t<tr><td>\n\t\t<b>Wett Titel:<b> <br />\n\t\t<input type=\"text\" name=\"titel\" class=\"text\" size=\"40\">\n\t\t</td></tr><tr><td>\n\t\t<b>Wette: </b><br />\n\t\t<textarea name=\"wette\" cols=\"40\" rows=\"5\" class=\"text\"></textarea>\n\t\t</td></tr><tr><td>\n\t\t<b>Wetteinsatz: </b><br />\n\t\t<textarea name=\"einsatz\" cols=\"40\" rows=\"3\" class=\"text\"></textarea>\n\t\t</td></tr><tr><td>\n\t\t<b><small>Gültigkeit (in Tagen ab Wettstart, 0 steht für unbegrenzt):</small></b>\n\t\t<br />\n\t\t<input type=\"text\" name=\"dauer\" class=\"text\" size=\"4\">\n\t\t</td></tr><tr><td>\n\t\t<br />\n\t\t<small>\n\t\tEine Wette ist beendet wenn, <b>beide Parteien</b> <br />\n\t\tsich auf einen <b>Sieg oder eine Niederlage einigen</b> können.<br />\n\t\t</small>\n\t\t<br />\n\t\t<input type=\"submit\" value=\"Wette eintragen\" class=\"button\">\n\t\t</td></tr>\n\t\t</table>\n\t\t</form>';\n\t}", "function newPlatformForm()\n{\n echo '<form action=\"./platform.php?action=add\" method=\"post\" enctype=\"multipart/form-data\" id=\"editForm\">\n <label>Platform Name :</label><input type=\"text\" name=\"name\" /><br />\n <label>Platform Icon :</label><input type=\"file\" value=\"upload\" name=\"icon\" /><br />\n <input type=\"submit\" name=\"submit\" value=\"submit\" />\n </form>';\n}", "public function printForm() {\n\t\t$html = $this->printPre().'<input type=\"file\" id=\"'.$this->name().'\" name=\"'.$this->name().'\" />'.$this->printPost().$this->printDescription();\n\n\t\tif ($this->allowMultiple) {\n\t\t\t$html .= $this->print_js();\n\t\t}\n\t\treturn $html;\n\t}", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: main properties');\r\n\r\n $shape[] =& $this->createElement('radio', null, null, 'Horizontal', '1');\r\n $shape[] =& $this->createElement('radio', null, null, 'Vertical', '2');\r\n $this->addGroup($shape, 'shape', 'Shape:');\r\n\r\n $way[] =& $this->createElement('radio', null, null, 'Natural', 'natural');\r\n $way[] =& $this->createElement('radio', null, null, 'Reverse', 'reverse');\r\n $this->addGroup($way, 'way', 'Direction:');\r\n\r\n $autosize[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $autosize[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($autosize, 'autosize', 'Best size:');\r\n\r\n $psize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $psize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $psize['left'] =& $this->createElement('text',\r\n 'left', 'left',\r\n array('size' => 4));\r\n $psize['top'] =& $this->createElement('text',\r\n 'top', 'top',\r\n array('size' => 4));\r\n $psize['position'] =& $this->createElement('text',\r\n 'position', 'position',\r\n array('disabled' => 'true'));\r\n $psize['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'bgcolor',\r\n array('size' => 7));\r\n $this->addGroup($psize, 'progresssize',\r\n 'Size, position and color:', ' ');\r\n\r\n $this->addElement('text', 'rAnimSpeed',\r\n array('Animation speed :',\r\n '(0-1000 ; 0:fast, 1000:slow)'));\r\n $this->addRule('rAnimSpeed',\r\n 'Should be between 0 and 1000',\r\n 'rangelength', array(0,1000), 'client');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('back','apply','process'));\r\n }", "public function criarHtml()\n {\n ;\n $form = \"\n <div class='row'>\n <div class='col-md-12 col-sm-12 col-xs-12'>\n <div class='x_panel'>\n <div class='x_content'>\n<form id='form' class='form-horizontal form-label-left' data-parsley-validate enctype='multipart/form-data' method='POST' >\n \" . $this->conteudo . \"\n <div class='ln_solid'></div>\n <div class='form-group'>\n <div class='col-md-3 col-sm-3 col-xs-12 col-md-offset-9'>\n <button class='btn btn-primary' type='submit'>Cancel</button>\n <a class='btn btn-success' onclick='$this->action'>Salvar</a>\n </div>\n </div>\n</form>\n</div>\n</div>\n</div>\n</div>\n\";\n return $form;\n }", "function cbstdsys_render_form() {\n\t?>\n\t<div class=\"wrap\">\n\n\t\t<!-- Display Plugin Icon, Header, and Description -->\n\t\t<div class=\"icon32\" id=\"icon-options-general\"><br></div>\n\t\t<h2><span style=\"font-family:Consolas,Monaco,Courier,monospace\">cb-std-sys</span>-<?php _e('Settings'); ?>, Version <?php echo CB_STD_SYS_VERSION; ?></h2>\n\n\t\t<!-- Beginning of the Plugin Options Form -->\n\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t<?php settings_fields('cbstdsys_plugin_options'); ?>\n\n<!--\n <fieldset>\n <legend><?php _e('Content','cb-std-sys'); ?></legend>\n\n \t\t\t<table class=\"form-table\">\n-->\n<?php render_form_fields( get_cbstdsys_options(), 'cbstdsys', 'cbstdsys_options' ); ?>\n<!--\n </table>\n\n </fieldset>\n-->\n\t\t\t<p class=\"submit\">\n\t\t\t<input type=\"submit\" class=\"button-primary\" value=\"<?php _e('Save Changes') ?>\" />\n\t\t\t</p>\n\n\t\t</form>\n\n\t</div>\n\t<?php\n}", "function beaver_extender_fe_style_editor() {\n\t\n?>\n\t<div id=\"beaver-extender-fe-style-editor\" style=\"display:none;\">\n\t\t\n\t\t<h3>\n\t\t\t<span class=\"dashicons dashicons-move\" style=\"padding-top:3px;\"></span>\n\t\t</h3>\n\t\t\n\t\t<?php do_action( 'beaver_extender_fe_style_editor_form' ); ?>\n\t\t\n\t</div><!-- END #beaver-extender-fe-style-editor -->\n<?php\n\n}", "public function build() {\n\n\t\t// Build out the CSS styling for the optin.\n\t\t$theme = '<style type=\"text/css\">';\n\t\t$css = '\n\t\thtml div#om-' . $this->hash . ',\n\t\thtml div#om-' . $this->hash . ' * {\n\t\t\tbackground:none;\n\t\t\tborder:0;\n\t\t\tborder-radius:0;\n\t\t\t-webkit-border-radius:0;\n\t\t\t-moz-border-radius:0;\n\t\t\tfloat:none;\n\t\t\tfont:normal 100%/normal helvetica,arial,sans-serif;\n\t\t\t-webkit-font-smoothing:antialiased;\n\t\t\theight:auto;\n\t\t\tletter-spacing:normal;\n\t\t\toutline:none;\n\t\t\tposition:static;\n\t\t\ttext-decoration:none;\n\t\t\ttext-indent:0;\n\t\t\ttext-shadow:none;\n\t\t\ttext-transform:none;\n\t\t\twidth:auto;\n\t\t\tvisibility:visible;\n\t\t\toverflow:visible;\n\t\t\tmargin:0;\n\t\t\tpadding:0;\n\t\t\tline-height:1;\n\t\t\tbox-sizing:border-box;\n\t\t\t-webkit-box-sizing:border-box;\n\t\t\t-moz-box-sizing:border-box;\n\t\t\t-webkit-box-shadow:none;\n\t\t\t-moz-box-shadow:none;\n\t\t\t-ms-box-shadow:none;\n\t\t\t-o-box-shadow:none;\n\t\t\tbox-shadow:none;\n\t\t\t-webkit-appearance:none;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' {\n\t\t\tbackground: transparent;\n\t\t\t-webkit-font-smoothing: antialiased;\n\t\t\tline-height: 1;\n\t\t\twidth: 300px;\n\t\t\tposition: fixed;\n\t\t\tright: 20px;\n\t\t\tbottom: 0;\n\t\t\tz-index: ' . ( 'customizer' == $this->env ? 1 : 734626274 ) . ';\n\t\t\tmin-height: 20px;\n\t\t\theight: auto;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' strong {\n\t\t\tfont-weight: bold;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' em {\n\t\t\tfont-style: italic;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' u {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' .om-clearfix {\n\t\t\tclear: both;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' .om-clearfix:after {\n\t\t\tclear: both;\n\t\t\tcontent: \".\";\n\t\t\tdisplay: block;\n\t\t\theight: 0;\n\t\t\tline-height: 0;\n\t\t\toverflow: auto;\n\t\t\tvisibility: hidden;\n\t\t\tzoom: 1;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin {\n\t\t\tbackground: #000;\n\t\t\tdisplay: none;\n\t\t\tposition: relative;\n\t\t\tmin-height: 20px;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' .om-slide-open-holder,\n\t\thtml div#om-' . $this->hash . ' .om-slide-close-holder {\n\t\t\tcolor: #fff;\n\t\t\tdisplay: block;\n\t\t\tfont-family: Arial, sans-serif;\n\t\t\tposition relative;\n\t\t\tpadding: 10px;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' .om-slide-close-holder {\n\t\t\tpadding: 10px 0 0;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' .om-slide-open-holder span,\n\t\thtml div#om-' . $this->hash . ' .om-slide-close-holder span {\n\t\t\tcolor: #fff;\n\t\t\tdisplay: inline;\n\t\t\tfloat: right;\n\t\t\tfont-size: 21px;\n\t\t\tline-height: 14px;\n\t\t\tfont-weight: 100;\n\t\t\ttext-decoration: none !important;\n\t\t\tfont-family: Arial, sans-serif !important;\n\t\t\tmargin: 0 0 0 10px;\n\t\t\tvertical-align: middle;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' .om-slide-close-holder span {\n\t\t\tfont-size: 16px;\n\t\t\tfont-weight: bold;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-title-closed,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-title-open,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-tagline {\n\t\t\tdisplay: block;\n\t\t\tfont-size: 14px;\n\t\t\tcolor: #fff;\n\t\t\twidth: 100%;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-title-closed span,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-title-closed strong,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-title-closed em,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-title-closed u,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-title-open span,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-title-open strong,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-title-open em,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-title-open u,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-tagline span,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-tagline strong,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-tagline em,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-tagline u {\n\t\t\tfont-family: inherit;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-tagline {\n\t\t\tline-height: 1.2;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' .om-slide-open .om-slide-open-holder,\n\t\thtml div#om-' . $this->hash . ' .om-slide-closed #om-slide-' . $this->theme . '-header,\n\t\thtml div#om-' . $this->hash . ' .om-slide-closed #om-slide-' . $this->theme . '-content,\n\t\thtml div#om-' . $this->hash . ' .om-slide-closed #om-slide-' . $this->theme . '-footer {\n\t\t\tdisplay: none;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-header,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-content,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-footer {\n\t\t\tpadding: 0 10px 10px;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' input,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-name,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-email {\n\t\t\tbackground-color: #fff;\n\t\t\tdisplay: block;\n\t\t\tborder: 1px solid #fff;\n\t\t\tfont-size: 14px;\n\t\t\tline-height: 24px;\n\t\t\tpadding: 4px 6px;\n\t\t\toverflow: hidden;\n\t\t\toutline: none;\n\t\t\tmargin: 0 0 10px;\n\t\t\tvertical-align: middle;\n\t\t\twidth: 280px;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' input[type=submit],\n\t\thtml div#om-' . $this->hash . ' button,\n\t\thtml div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin-submit {\n\t\t\tbackground: #ff370f;\n\t\t\tborder: 1px solid #ff370f;\n\t\t\twidth: 280px;\n\t\t\tcolor: #fff;\n\t\t\tfont-size: 14px;\n\t\t\tpadding: 4px 6px;\n\t\t\tline-height: 24px;\n\t\t\theight: ' . ( isset( $this->meta['email']['provider'] ) && 'custom' == $this->meta['email']['provider'] ? '34px' : '24px' ) . ';\n\t\t\ttext-align: center;\n\t\t\tvertical-align: middle;\n\t\t\tcursor: pointer;\n\t\t\tmargin: 0;\n\t\t}\n\t\thtml div#om-' . $this->hash . ' input[type=checkbox],\n\t\thtml div#om-' . $this->hash . ' input[type=radio] {\n\t\t -webkit-appearance: checkbox;\n\t\t width: auto;\n\t\t outline: invert none medium;\n\t\t padding: 0;\n\t\t margin: 0;\n\t\t}\n\t\t';\n\n\t\t// Minify CSS a bit.\n\t\t$theme .= str_replace( array( \"\\n\", \"\\t\", \"\\r\" ), '', $css );\n\n\t\t// If there is any custom CSS, append it now.\n\t\tif ( ! empty( $this->meta['custom_css'] ) )\n\t\t $theme .= str_replace( array( \"\\n\", \"\\t\", \"\\r\" ), '', $this->meta['custom_css'] );\n\n // Close out the styles.\n $theme .= '</style>';\n\n\t\t// Build out the HTML structure for the optin.\n\t\t$bg = $this->get_field( 'background', 'header' );\n\t\t$theme .= '<div id=\"om-slide-' . $this->theme . '-optin\" class=\"om-slide-' . $this->theme . ' om-clearfix om-slide-closed\">';\n\t\t\t$theme .= '<div id=\"om-slide-' . $this->theme . '-optin-wrap\" class=\"om-clearfix\">';\n\t\t\t\t$theme .= '<a href=\"#\" class=\"om-slide-open-holder\" title=\"Open\" style=\"' . ( ! empty( $bg ) ? 'background-color: ' . $bg : '' ) . '\">';\n\n\t\t\t\t$title = $this->get_field( 'title_closed' );\n\t\t\t $style = '';\n\t\t\t if ( ! empty( $title['color'] ) )\n\t\t\t $style .= 'color:' . $title['color'] . ';';\n\t\t\t if ( ! empty( $title['font'] ) )\n\t\t\t $style .= 'font-family:\\'' . $title['font'] . '\\', sans-serif;';\n\t\t\t if ( ! empty( $title['size'] ) )\n\t\t\t $style .= 'font-size:' . $title['size'] . 'px;';\n\t\t\t if ( ! empty( $title['meta'] ) )\n\t\t\t foreach ( (array) $title['meta'] as $prop => $val )\n\t\t\t $style .= str_replace( '_', '-', $prop ) . ':' . $val . ';';\n\t\t\t\t$theme .= '<h1 id=\"om-slide-' . $this->theme . '-optin-title-closed\" style=\"' . ( ! empty( $style ) ? $style : '' ) . '\">' . ( ! empty( $title['text'] ) ? $title['text'] : '' ) . '<span class=\"om-slide-open-content\">&#43;</span></h1>';\n\t\t\t\t$theme .= '</a>';\n\n\t\t\t\t// Header area.\n\t\t\t\t$theme .= '<div id=\"om-slide-' . $this->theme . '-header\" class=\"om-clearfix\" style=\"' . ( ! empty( $bg ) ? 'background-color: ' . $bg : '' ) . '\">';\n\t\t\t\t\t$theme .= '<a href=\"#\" class=\"om-slide-close-holder\" title=\"Close\">';\n\t\t\t\t $title = $this->get_field( 'title_open' );\n\t\t\t\t $style = '';\n\t\t\t\t if ( ! empty( $title['color'] ) )\n\t\t\t\t $style .= 'color:' . $title['color'] . ';';\n\t\t\t\t if ( ! empty( $title['font'] ) )\n\t\t\t\t $style .= 'font-family:\\'' . $title['font'] . '\\', sans-serif;';\n\t\t\t\t if ( ! empty( $title['size'] ) )\n\t\t\t\t $style .= 'font-size:' . $title['size'] . 'px;';\n\t\t\t\t if ( ! empty( $title['meta'] ) )\n\t\t\t\t foreach ( (array) $title['meta'] as $prop => $val )\n\t\t\t\t $style .= str_replace( '_', '-', $prop ) . ':' . $val . ';';\n\t\t\t\t\t$theme .= '<h2 id=\"om-slide-' . $this->theme . '-optin-title-open\" style=\"' . ( ! empty( $style ) ? $style : '' ) . '\">' . ( ! empty( $title['text'] ) ? $title['text'] : '' ) . '<span class=\"om-slide-close-content\">&#120;</span></h2>';\n\t\t\t\t\t$theme .= '</a>';\n\t\t\t\t$theme .= '</div>';\n\n\t\t\t\t// Content area.\n\t\t\t\t$content_bg = $this->get_field( 'background', 'content' );\n\t\t\t\t$theme .= '<div id=\"om-slide-' . $this->theme . '-content\" class=\"om-clearfix\" style=\"' . ( ! empty( $content_bg ) ? 'background-color: ' . $content_bg . ';' : '' ) . ( ! empty( $bg ) && ! empty( $content_bg ) && ($bg !== $content_bg) ? 'padding-top:10px;' : '' ) . '\">';\n\t\t\t\t\t$theme .= '<div id=\"om-slide-' . $this->theme . '-content-clear\">';\n\t\t\t\t\t\t $tagline = $this->get_field( 'tagline' );\n \t\t\t\t $style = '';\n \t\t\t\t if ( ! empty( $tagline['color'] ) )\n \t\t\t\t $style .= 'color:' . $tagline['color'] . ';';\n \t\t\t\t if ( ! empty( $tagline['font'] ) )\n \t\t\t\t $style .= 'font-family:\\'' . $tagline['font'] . '\\', sans-serif;';\n \t\t\t\t if ( ! empty( $tagline['size'] ) )\n \t\t\t\t $style .= 'font-size:' . $tagline['size'] . 'px;';\n \t\t\t\t if ( ! empty( $tagline['meta'] ) )\n \t\t\t\t foreach ( (array) $tagline['meta'] as $prop => $val )\n \t\t\t\t $style .= str_replace( '_', '-', $prop ) . ':' . $val . ';';\n\t\t\t\t\t\t\t$theme .= '<h2 id=\"om-slide-' . $this->theme . '-optin-tagline\" style=\"' . ( ! empty( $style ) ? $style : '' ) . '\">' . ( ! empty( $tagline['text'] ) ? $tagline['text'] : '' ) . '</h2>';\n\t\t\t\t\t$theme .= '</div>';\n\t\t\t\t$theme .= '</div>';\n\n\t\t\t\t// slide area.\n $class = $this->get_field( 'name', 'show' ) ? ' om-has-name-email' : ' om-has-email';\n\t\t\t\t$theme .= '<div id=\"om-slide-' . $this->theme . '-footer\" class=\"om-clearfix' . $class . '\" style=\"' . ( ! empty( $content_bg ) ? 'background-color: ' . $content_bg : '' ) . '\">';\n\t\t\t\t if ( isset( $this->meta['email']['provider'] ) && 'custom' == $this->meta['email']['provider'] ) :\n $theme .= html_entity_decode( $this->meta['custom_html'] );\n\t\t\t\t else :\n $disabled = 'customizer' == $this->env ? ' disabled=\"disabled\"' : '';\n $show_name = $this->get_field( 'name', 'show' );\n if ( $show_name ) {\n \t\t\t\t\t $name = $this->get_field( 'name' );\n \t\t\t\t $style = '';\n \t\t\t\t if ( ! empty( $name['color'] ) )\n \t\t\t\t $style .= 'color:' . $name['color'] . ';';\n \t\t\t\t if ( ! empty( $name['font'] ) )\n \t\t\t\t $style .= 'font-family:\\'' . $name['font'] . '\\', sans-serif;';\n \t\t\t\t if ( ! empty( $name['size'] ) )\n \t\t\t\t $style .= 'font-size:' . $name['size'] . 'px;';\n \t\t\t\t if ( ! empty( $name['meta'] ) )\n \t\t\t\t foreach ( (array) $name['meta'] as $prop => $val )\n \t\t\t\t $style .= str_replace( '_', '-', $prop ) . ':' . $val . ';';\n \t\t\t\t\t $theme .= '<input' . $disabled . ' id=\"om-slide-' . $this->theme . '-optin-name\" type=\"text\" value=\"\" placeholder=\"' . ( ! empty( $name['placeholder'] ) ? $name['placeholder'] : '' ) . '\" style=\"' . ( ! empty( $style ) ? $style : '' ) . '\" />';\n \t\t\t\t\t}\n\n \t\t\t\t $email = $this->get_field( 'email' );\n \t\t\t\t $style = '';\n \t\t\t\t if ( ! empty( $email['color'] ) )\n \t\t\t\t $style .= 'color:' . $email['color'] . ';';\n \t\t\t\t if ( ! empty( $email['font'] ) )\n \t\t\t\t $style .= 'font-family:\\'' . $email['font'] . '\\', sans-serif;';\n \t\t\t\t if ( ! empty( $email['size'] ) )\n \t\t\t\t $style .= 'font-size:' . $email['size'] . 'px;';\n \t\t\t\t if ( ! empty( $email['meta'] ) )\n \t\t\t\t foreach ( (array) $email['meta'] as $prop => $val )\n \t\t\t\t $style .= str_replace( '_', '-', $prop ) . ':' . $val . ';';\n \t\t\t\t\t$theme .= '<input' . $disabled . ' id=\"om-slide-' . $this->theme . '-optin-email\" type=\"email\" value=\"\" placeholder=\"' . ( ! empty( $email['placeholder'] ) ? $email['placeholder'] : '' ) . '\" style=\"' . ( ! empty( $style ) ? $style : '' ) . '\" />';\n\n $submit = $this->get_field( 'submit' );\n \t\t\t\t $style = '';\n \t\t\t\t if ( ! empty( $submit['field_color'] ) )\n \t\t\t\t $style .= 'color:' . $submit['field_color'] . ';';\n \t\t\t\t if ( ! empty( $submit['bg_color'] ) )\n \t\t\t\t $style .= 'background-color:' . $submit['bg_color'] . ';border-color:' . $submit['bg_color'] . ';';\n \t\t\t\t if ( ! empty( $submit['font'] ) )\n \t\t\t\t $style .= 'font-family:\\'' . $submit['font'] . '\\', sans-serif;';\n \t\t\t\t if ( ! empty( $submit['size'] ) )\n \t\t\t\t $style .= 'font-size:' . $submit['size'] . 'px;';\n \t\t\t\t if ( ! empty( $submit['meta'] ) )\n \t\t\t\t foreach ( (array) $submit['meta'] as $prop => $val )\n \t\t\t\t $style .= str_replace( '_', '-', $prop ) . ':' . $val . ';';\n \t\t\t\t\t$theme .= '<input' . $disabled . ' id=\"om-slide-' . $this->theme . '-optin-submit\" type=\"submit\" value=\"' . ( ! empty( $submit['placeholder'] ) ? $submit['placeholder'] : '' ) . '\" style=\"' . ( ! empty( $style ) ? $style : '' ) . '\" />';\n \t\t\t\tendif;\n\t\t\t\t$theme .= '</div>';\n\t\t\t$theme .= '</div>';\n\t\t$theme .= '</div>';\n\n\t\t// Build out any necessary JS elements.\n\t\t$theme .= '<script type=\"text/javascript\">';\n\t\t\t$theme .= 'function om_js_' . str_replace( '-', '_', $this->hash ) . '(){';\n\t\t\t\t$theme .= 'this.init = function($){this.resize_element($, \"div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin\");},';\n\t\t\t\t$theme .= 'this.resize_element = function($, el){';\n\t\t\t\t\tif ( 'customizer' == $this->env ) :\n\t\t\t\t\t\t$theme .= '$(\"#om-slide-' . $this->theme . '-optin-name, #om-slide-' . $this->theme . '-optin-email\").resize(function(){$(\"#om-slide-' . $this->theme . '-optin-submit\").css({ \"height\": $(this).outerHeight() + \"px\", \"line-height\": ($(this).outerHeight()-10) + \"px\" });});';\n\t\t\t\t\t\t$theme .= '$(\"#om-slide-' . $this->theme . '-optin-title-open\").resize(function(){$(\"#om-slide-' . $this->theme . '-optin .om-slide-close-holder span\").css({ \"line-height\": $(\"#om-slide-' . $this->theme . '-optin-title-open\").outerHeight() + \"px\" });});';\n\t\t\t\t\t\t$theme .= '$(\"#om-slide-' . $this->theme . '-optin-title-closed\").resize(function(){$(\"#om-slide-' . $this->theme . '-optin .om-slide-open-holder span\").css({ \"line-height\": $(\"#om-slide-' . $this->theme . '-optin-title-closed\").outerHeight() + \"px\" });});';\n\t\t\t\t\t\t$theme .= '$(\"div#om-' . $this->hash . ' input[data-om-render=label]\").each(function(){var new_el = $(this).changeElementType(\\'label\\');});';\n\t\t\t\t\t\t$theme .= '$(\"div#om-' . $this->hash . ' label[data-om-render=label]\").each(function(){var new_el = $(this).text($(this).attr(\\'value\\')).removeAttr(\\'type\\');});';\n\t\t\t\t\t\t$theme .= '$(\"div#om-' . $this->hash . '\").find(\"input\").each(function(){$(this).attr(\"disabled\", \"disabled\");});';\n\t\t\t\t\t\t$theme .= '$(\"div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin\").fadeIn(300);';\n\t\t\t\t\t\t$theme .= '$(\"div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin .om-slide-open-holder\").on(\"click\", function(e){e.preventDefault();$(\"div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin\").removeClass(\"om-slide-closed\").addClass(\"om-slide-open\");});';\n\t\t\t\t\t\t$theme .= '$(\"div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin .om-slide-close-holder\").on(\"click\", function(e){e.preventDefault();$(\"div#om-' . $this->hash . ' #om-slide-' . $this->theme . '-optin\").removeClass(\"om-slide-open\").addClass(\"om-slide-closed\");});';\n\t\t\t\t\telse :\n\t\t\t\t\t\t$theme .= '$(\"#om-slide-' . $this->theme . '-optin .om-slide-open-holder span\").css({ \"line-height\": $(\"#om-slide-' . $this->theme . '-optin-title-closed\").outerHeight() + \"px\" });';\n\t\t\t \tendif;\n\t\t\t\t$theme .= '}';\n\t\t\t$theme .= '}';\n\t\t$theme .= '</script>';\n\n\t\t// Return the theme output and design.\n\t\treturn $theme;\n\n\t}", "function buildForm()\n {\n $this->buildTabs();\n // tab caption\n $this->addElement('header', null, 'Specify file role for specific files');\n\n $fe =& PEAR_PackageFileManager_Frontend::singleton();\n $sess =& $fe->container();\n\n $selection = $this->getSubmitValue('files');\n $selection_count = count($selection);\n $fe->log('debug',\n str_pad($this->getAttribute('id') .'('. __LINE__ .')', 20, '.') .\n ' selection='. serialize($selection)\n );\n\n list($page, $action) = $this->controller->getActionName();\n\n // selection list (false) or edit dialog frame (true)\n if ($action == 'edit' && $selection_count > 0) {\n $editDialog = true;\n }elseif ($action == 'save') {\n $editDialog = true;\n } else {\n $editDialog = false;\n }\n\n if (!$editDialog) {\n\n foreach ($sess['defaults']['_files']['mapping'] as $fn) {\n $pinfo = pathinfo($fn);\n $ext[] = $pinfo['extension'];\n }\n $extensions = array_unique($ext);\n $extensions[] = '-None-';\n sort($extensions, SORT_ASC);\n $extensions = array_combine($extensions, $extensions);\n\n // Role options list: (value => text, with value === text)\n $pageName = $fe->getPageName('page1');\n $releaseType = $fe->exportValue($pageName, 'packageType');\n $roles = PEAR_Installer_Role::getValidRoles($releaseType);\n $roles[] = '-None-';\n sort($roles, SORT_ASC);\n $roles = array_combine($roles, $roles);\n\n $filters = array();\n $filters[] = &HTML_QuickForm::createElement('select', 'extensionFilter', 'Extension', $extensions);\n $filters[] = &HTML_QuickForm::createElement('select', 'roleFilter', 'Role', $roles);\n $filters[] = &HTML_QuickForm::createElement('submit', $this->getButtonName('sort'), 'Apply');\n $this->addGroup($filters, 'filters', 'Filters applied on list :', '', false);\n\n $hdr = array('Path', 'Role');\n $table = new HTML_Table(array('class' => 'tableone'));\n $htmltableDecorator = new PEAR_PackageFileManager_Frontend_Decorator_HTMLTable($fe);\n $htmltableDecorator->setHtmlTable($table);\n $htmltableDecorator->getExceptionList($hdr);\n // We need a simple static html area for maintainers list.\n $this->addElement('static', 'exceptions', '', $htmltableDecorator->toHtml());\n\n $def = array('extensionFilter' => '-None-', 'roleFilter' => '-None-');\n $this->setDefaults($def);\n\n $commands = array('edit', 'remove');\n $nocmd = array('commit', 'reset');\n\n } else {\n\n // we need a multiple-select box for list of file targets\n $rPath =& $this->addElement('select', 'exceptfiles');\n $rPath->setMultiple(true);\n $rPath->setLabel('Path:');\n $rPath->freeze();\n\n // Role options list: (value => text, with value === text)\n $pageName = $fe->getPageName('page1');\n $releaseType = $fe->exportValue($pageName, 'packageType');\n $roles = PEAR_Installer_Role::getValidRoles($releaseType);\n $roles[] = '';\n sort($roles, SORT_ASC);\n $roles = array_combine($roles, $roles);\n $this->addElement('select', 'role', 'Role:', $roles);\n\n if ($selection_count == 0) {\n $key1 = -1;\n $def = array();\n } else {\n $keys = $needle = array_keys($selection);\n $key1 = array_shift($needle);\n\n $files = array();\n foreach($keys as $k) {\n $files[$k] = $sess['files']['mapping'][$k];\n }\n $rPath->load($files, $keys);\n $def = array('exceptfiles' => $keys);\n }\n\n // applies new filters to the element values\n $this->applyFilter('__ALL__', 'trim');\n\n // old values of edit user\n $this->setDefaults($def);\n\n $commands = array('save', 'cancel');\n $nocmd = array('commit','reset');\n }\n\n // Buttons of the wizard to do the job\n $this->buildButtons($nocmd, $commands);\n }", "function renderForm()\t{\n\n\t\t$fields[] = $this->renderField( $GLOBALS['LANG']->getLL('settings'), 'divider', '');\n\t\t$fields[] = $this->renderField( $GLOBALS['LANG']->getLL('spaceTitle'), 'text', 'title');\n\t\n\t\tif(count($this->error) > 0) {\n\t\t\t$form .= \"<span style='display:block;color:red;font-weight:bold;padding:10px;'>\" .\n\t\t\t\t\t\t\t implode(\"<br />\", $this->error) . \n\t\t\t\t\t \"</span>\";\t\n\t\t}\n\n\t\t$form .= \"<form action=\" . t3lib_div::getThisUrl() . \"><table border='0' cellpadding='7'>\";\n\t\t$form .= implode(\"\\n\", $fields);\n\t\t$form .= \"<tr><td colspan='2' align='right'>\" .\n\t\t\t\t \"<input type='hidden' name='formPosted' value='1'>\" . \n\t\t\t\t \"<input type='submit' value='\" . $GLOBALS['LANG']->getLL('createSpace') . \"'></td></tr></table></form>\";\n\n\t\treturn $form;\n\t}", "public function BuildContent( ){\n\t\tif(!isset($_SESSION['steamid'])) {\n\t\t\t$this->NotAuthed();\n\t\t}else{\n\t\t\tinclude ('php/steamauth/userInfo.php');\n\t\t\tif (!isset($_POST[\"submit\"])){\n\t\t\t\t$this->Authed($steamprofile);\n\t\t\t}else{\n\t\t\t\t$this->TackleForm($steamprofile);\n\t\t\t}\n\t\t}\n\t}", "public function showForm($iniValues = NULL) {\n\t\t$form [] = '<form action=\"\" class=\"editor\" method=\"post\">';\n\t\t$form [] = \"<div class='box-inside-form'>\";\n\t\t$form [] = '<label for=\"title\">Titel</label>';\n\t\t$form [] = '<input type=\"text\" id=\"title\" name=\"title\" value=\"' . $iniValues ['title'] . '\">';\n\t\t$form [] = '<label for=\"category\">Kategorie</label>';\n\t\t$k = parent::distinct ( \"category\" );\n\t\t$category = '<input list=\"category\" name=\"category\" value=\"' . $iniValues ['category'] . '\">';\n\t\t$category .= '<datalist id=\"category\">';\n\t\twhile ( $k ) {\n\t\t\t$category .= '<option value=\"' . array_shift ( $k ) . '\">';\n\t\t}\n\t\t$form [] = $category . '</datalist>';\n\t\tif ($chapter) {\n\t\t\t$form [] = '<label for=\"chapter\">Kapitel</label>';\n\t\t\tif (empty ( $iniValues ['chapter'] )) {\n\t\t\t\t$chap = 0;\n\t\t\t} else {\n\t\t\t\t$chap = $iniValues ['chapter'];\n\t\t\t}\n\t\t\t$form [] = '<input type=\"number\" id=\"chapter\" name=\"chapter\" size=\"3\" value=\"' . $chap . '\" min=\"0\">';\n\t\t}\n\t\t$form [] = '<label for=\"keywords\">Schlagworte</label> <input type=\"text\"\n\t\t\t\t\t\t\t\tid=\"keywords\" name=\"keywords\" value=\"' . $iniValues ['keywords'] . '\">';\n\t\t$form [] = '<label for=\"status\">Status</label>';\n\t\t$form [] = '<select id=\"status\"\tname=\"status\">\n\t\t\t\t\t\t<option value=\"public\">sichtbar</option>\n\t\t\t\t\t\t<option value=\"draft\">Entwurf</option>\n\t\t\t\t\t\t<option value=\"archive\">Archiv</option>\n\t\t\t\t\t</select>';\n\t\t$form [] = \"</div><div style='clear:both'></div>\";\n\t\t$form [] = '<textarea id=\"editor\" name=\"text\">' . $iniValues ['text'] . '</textarea>';\n\t\tif ($iniValues) {\n\t\t\t$form [] = Registry::makeUpdateButton ();\n\t\t\t$form [] = Registry::makeDeleteButton ();\n\t\t\t$form [] = '<input type=\"hidden\" id=\"id\" name=\"id\" value=\"' . $iniValues ['id'] . '\">';\n\t\t\t$form [] = '<input type=\"hidden\" id=\"page\" name=\"page\" value=\"' . $iniValues ['page'] . '\">';\n\t\t} else {\n\t\t\t$form [] = Registry::makeInsertButton ();\n\t\t}\n\t\t$form [] = '</form>';\n\t\t\n\t\techo implode ( \"\\n\", $form );\n\t}", "public function form()\n {\n $this->switch('footer_remove', Support::trans('main.footer_remove'))\n ->default(admin_setting('footer_remove'));\n $defaultColors = [\n 'default' => '墨蓝',\n 'blue' => '蓝',\n 'blue-light' => '亮蓝',\n 'green' => '墨绿',\n ];\n foreach (explode(\",\", ServiceProvider::setting('additional_theme_colors')) as $value) {\n if (!empty($value)) {\n [$k, $v] = explode(\":\", $value);\n $defaultColors[$k] = $v;\n }\n }\n\n $this->radio('theme_color', Support::trans('main.theme_color'))\n ->options($defaultColors)\n ->default(admin_setting('theme_color'));\n $this->radio('sidebar_style', Support::trans('main.sidebar_style'))\n ->options([\n 'default' => '默认',\n 'sidebar-separate' => '菜单分离',\n 'horizontal_menu' => '水平菜单'\n ])\n ->default(admin_setting('sidebar_style'));\n $this->switch('grid_row_actions_right', Support::trans('main.grid_row_actions_right'))\n ->help('启用后表格行操作按钮将永远贴着最右侧。')\n ->default(admin_setting('grid_row_actions_right'));\n }", "function fn_adt_css_write($form_url)\n{\n global $wp_filesystem;\n\n check_admin_referer('adt_css_save_nonce');\n\n $csstext = esc_textarea($_POST['txt_adt_css']); //sanitize the input\n $form_fields = array('txt_adt_css'); //fields that should be preserved across screens\n $method = ''; //leave this empty to perform test for 'direct' writing\n\n $context = ADT_PLUGIN_DIR_PATH.'assets/css/'; //target folder\n\n $form_url = wp_nonce_url($form_url, 'adt_css_save_nonce'); //page url with nonce value\n\n if(!fn_adt_filesystem_init($form_url, $method, $context, $form_fields)) {\n return false; //stop further processign when request form is displaying\n }\n\n /*\n * now $wp_filesystem could be used\n * get correct target file first\n **/\n $target_dir = $wp_filesystem->find_folder($context);\n $target_file = trailingslashit($target_dir).'adt_custom_css.css';\n\n\n /* write into file */\n if(!$wp_filesystem->put_contents($target_file, $csstext, FS_CHMOD_FILE))\n\t{\n\t\treturn new WP_Error('writing_error', 'Error when writing file'); //return error object\n\t}\n\telse\n\t{\n\t\t//update css version\n\t\t$css_version=1;\n\t\t$adt_css_version=get_option('adt_css_version');\n\t\tif($adt_css_version==FALSE)\n\t\t{\n\n\t\t\t$deprecated = null;\n\t\t $autoload = 'no';\n\t\t add_option( 'adt_css_version', $css_version, $deprecated, $autoload );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$css_version=$adt_css_version+1;\n\t\t\tupdate_option( 'adt_css_version', $css_version );\n\t\t}\n\t}\n return $csstext;\n}", "public static function easyFormStart()\n {\n echo '<!-- EasyCreator START -->'.NL;\n\n echo '<div id=\"ecr_box\">'.NL;\n\n echo '<form action=\"index.php?option=com_easycreator\" method=\"post\" '\n .'name=\"adminForm\" id=\"adminForm\">'.NL;\n }", "function block_skinChooser(){\n //Show first part\n echo '<form action=\"php/profile/form_skinChooser.php\" method=\"post\" id=\"columnBack\">';\n echo '<h1 class=\"title is-4\">- Custom skin chooser -</h1>';\n showSuccess(2);\n\n block_skinChooser_body();\n \n //Show last part\n echo <<<EOF\n <br>\n <br>\n <input type=\"submit\" value=\"Save all modifications\" class=\"button is-light\"/>\n </form>\nEOF;\n}", "public function definition() {\n\n \t$sphereLib = new setask_sphere();\n \t$compilers = $sphereLib->sphereGetCompilers(); //to be improved (maybe... - probably no need to rewrite here)\n # \tvar_dump($compilers);\n $mform = $this->_form;\n\n list($setask, $data) = $this->_customdata;\n $mform->addElement('select', 'compiler', 'Compilers: ',$compilers\t);\n\t\t\n $setask->add_submission_form_elements($mform, $data);\n\n $this->add_action_buttons(true, get_string('savechanges', 'setask'));\n if ($data) {\n\t\t\t//ugly (but working) way of extracting data from text editor\n \tforeach($data as $tes){\n \t\t$ii =0;\n \t\n \t\tforeach($tes as $tes2)\n \t\t{\n \t\t\tif($ii == 0)\n \t\t\t\t$textToSend = $tes2;//text from online editor - ugly way but it works...\n \t\t\t#\tvar_dump($textToSend);\n \t\t\t\t$ii++;\n \t\t}\n \t\n \t}\n \t\n \t//extracting selected compiler \n \t$selectedItem =& $mform->getElement('compiler')->getSelected();\n #\tvar_dump($selectedItem);\n $this->set_data($data);\n }\n \n }", "public function form_css(){\n\t\twp_register_style( 'lead_gen_plugin', plugin_dir_url( __FILE__ ) . 'css/style.css', false );\n\t\twp_enqueue_style( 'lead_gen_plugin' );\n\t}", "function form_content()\r\n {\r\n $table = html_table($this->_width,0,4) ;\r\n $table->set_style(\"border: 0px solid\") ;\r\n\r\n $table->add_row($this->element_label($this->getUploadFileLabel()),\r\n $this->element_form($this->getUploadFileLabel())) ;\r\n\r\n $td = html_td(null, null, $this->element_form('Override Z0 Record Validation')) ;\r\n $td->set_tag_attribute('colspan', 2) ;\r\n $table->add_row($td) ;\r\n\r\n $this->add_form_block(null, $table) ;\r\n }", "static function get_site_settings_editor()\n {\n global $dbhost, $dbuser, $dbpass, $dbname, $title, $googleTrackingID,\n $copyright;\n \n $result = '\n<p>Complete the following form to edit the site settings.</p>\n <form action=\"javascript:submit();\"><fieldset>\n <h3>MySQL Database Information</h3>\n <ol>\n <li>\n <label for=\"host\">Database Host</label>\n <input type=\"text\" name=\"host\" id=\"host\" value=\"'.$dbhost.'\"\n placeholder=\"e.g., localhost\" required />\n </li>\n <li>\n <label for=\"db\">Database Name</label>\n <input type=\"text\" name=\"db\" id=\"db\" value=\"'.$dbname.'\"\n placeholder=\"e.g., my_remote_lab\" required />\n </li>\n <li>\n <label for=\"dbuser\">Database Username</label>\n <input type=\"text\" name=\"dbuser\" id=\"dbuser\" value=\"'.$dbuser.'\"\n placeholder=\"username\" required />\n </li>\n <li>\n <label for=\"password\">Database Password</label>\n <input type=\"password\" name=\"password\" id=\"password\" value=\"'.\n api::$passwordHolder.'\"\n placeholder=\"Password\" required />\n <label for=\"password-confirm\">Confirm Database Password</label>\n <input type=\"password\" name=\"password-confirm\" \n id=\"password-confirm\" value=\"'.api::$passwordHolder.\n '\" placeholder=\"Confirm Password\" required />\n </li>\n </ol>\n </fieldset>\n <fieldset>\n <br />\n <h3>Site Information</h3>\n <ol>\n <li>\n <label for=\"site-name\">Site Name</label>\n <input type=\"text\" name=\"site-name\" id=\"site-name\" \n value=\"'.$title.'\" placeholder=\"e.g., My Awesome Title\"\n required />\n </li>\n <li>\n <label for=\"google\">Google Analytics (optional)</label>\n <input type=\"text\" name=\"google\" id=\"google\" value=\"'.\n $googleTrackingID.'\" placeholder=\"(optional)\" />\n </li>\n <li><label for=\"copyright\">Copyright Message</label>\n <input type=\"text\" name=\"copyright\" id=\"copyright\" value=\"'.\n substr($copyright, 6).'\" \n placeholder=\"e.g., 2012 My Robot College\" required />\n </li>\n </ol>\n </fieldset>\n <input type=\"submit\" value=\"Submit\" />\n</form>';\n \n return $result;\n }", "function createForm(){\n\t\t$this->createFormBase();\n\t\t$this->addElement('reset','reset','Reset');\t\t\t\n\t\t$tab['seeker_0'] = '0';\n\t\t$this->setDefaults($tab);\n\t\t$this->addElement('submit','bouton_add_pi','Add a contact',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_contact'\"));\n\t\t$this->createVaFormResolution();\n\t\t$this->createFormGeoCoverage();\n\t\t$this->createFormGrid();\t\n\t\t//Required format\n\t\t$dformat = new data_format;\n\t\t$dformat_select = $dformat->chargeFormDestFormat($this,'required_data_format','Required data format','NetCDF');\n\t\t$this->addElement($dformat_select);\n\t\t$this->getElement('organism_0')->setLabel(\"Organism short name\");\n\t\t$this->getElement('project_0')->setLabel(\"Useful in the framework of\");\n\t\t$this->getElement('dats_abstract')->setLabel(\"Abstract \");\n\t\t$this->getElement('dats_purpose')->setLabel(\"Purpose\");\n\t\t$this->getElement('database')->setLabel(\"Data center\");\n\t\t$this->getElement('new_db_url')->setLabel(\"Data center url\");\n\t\t$this->getElement('dats_use_constraints')->setLabel(\"Access and use constraints\");\t\t\t\n\t\t$this->getElement('sensor_resol_tmp')->setLabel('Temporal (hh:mm:ss)');\t\t\t\n\t\t$this->getElement('place_alt_min_0')->setLabel(\"Altitude min\");\n\t\t$this->getElement('place_alt_max_0')->setLabel(\"Altitude max\");\n\t\t$this->getElement('data_format_0')->setLabel(\"Original data format\");\n\t\t$this->addElement('file','upload_doc','Attached document');\n\t\t$this->addElement('submit','upload','Upload');\n\t\t$this->addElement('submit','delete','Delete');\n\t\t\n\t\tfor ($i = 0; $i < $this->dataset->nbVars; $i++){\n\t\t\t$this->getElement('methode_acq_'.$i)->setLabel(\"Parameter processing related information\");\n\t\t}\n\t\t$this->addElement('submit','bouton_add_variable','Add a parameter',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_param'\"));\n\t\t\n\t\t$this->addElement('submit','bouton_add_projet','Add a project',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_general'\"));\n\t\t$option = array();\n\t\t$option['default'] = \"\";\n\t\t$option['model'] = \"Model\";\n\t\t$option['instrument'] = \"Instrument\";\n\t\t$option['satellite'] = \"Satellite\";\n\t\t$this->addElement('select','source_type','source type :',$option,array('onchange' => \"DeactivateButtonAddSource()\",'onclick' => \"DeactivateButtonAddSource();\",'onmouseover' => 'DeactivateButtonAddSource();' ));\n\t\t$this->addElement('submit','bouton_add_source','Add a source',array('disabled' => 'true','onclick' => \"document.getElementById('frmvadataset').action += '#a_source'\",'onmouseout' => 'DeactivateButtonAddSource();'));\n\t\t\n\t\tif (isset ( $this->dataset->dats_sensors ) && ! empty ( $this->dataset->dats_sensors )) {\n\t\t\t$this->dats_sensors = array();\n\t\t\t$this->dats_sensors = $this->dataset->dats_sensors ;\n\t\t}\n\t\tif (isset ( $this->dataset->sites ) && ! empty ( $this->dataset->sites )) {\n\t\t\t$this->sites = array();\n\t\t\t$this->sites = $this->dataset->sites;\n\t\t}\n\t\t\n\t\tif ( isset ( $this->dataset->dats_id ) && $this->dataset->dats_id > 0) {\n\t\t\tif (isset ( $this->dataset->nbModFormSensor )){\n\t\t\t\tif($this->dataset->nbModForm <= $this->dataset->nbModFormSensor ){\n\t\t\t\t\t$this->dataset->nbModForm = $this->dataset->nbModFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset ( $this->dataset->nbSatFormSensor )){\n\t\t\t\t//$this->dataset->nbSatFormSensor = $this->dataset->nbSatFormSensor - 1;\n\t\t\t\tif($this->dataset->nbSatForm <= $this->dataset->nbSatFormSensor){\n\t\t\t\t\t$this->dataset->nbSatForm = $this->dataset->nbSatFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset ( $this->dataset->nbInstruFormSensor )){\n\t\t\t\tif($this->dataset->nbInstruForm <= $this->dataset->nbInstruFormSensor){\n\t\t\t\t\t$this->dataset->nbInstruForm = $this->dataset->nbInstruFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif($this->dataset->nbModForm > 0)\n\t\t\t$this->addMod();\n\t\tif($this->dataset->nbInstruForm > 0)\n\t\t\t$this->addInstru();\t\n\t\tif($this->dataset->nbSatForm > 0)\n\t\t\t$this->addSat();\n\t\t\n\t\t$this->dataset->dats_sensors = null ;\n\t\t$this->dataset->sites = null;\n\t}", "private function weblinkContent_form() {\n\n // Textarea Settings\n if (!fusion_get_settings(\"tinymce_enabled\")) {\n $ExtendedSettings = [\n 'required' => ($this->weblinksSettings['links_extended_required'] ? TRUE : FALSE),\n 'preview' => TRUE,\n 'html' => TRUE,\n 'autosize' => TRUE,\n 'placeholder' => $this->locale['WLS_0255'],\n 'error_text' => $this->locale['WLS_0270'],\n 'form_name' => \"weblinkform\",\n \"wordcount\" => TRUE\n ];\n } else {\n $ExtendedSettings = [\n 'required' => ($this->weblinksSettings['links_extended_required'] ? TRUE : FALSE),\n 'type' => \"tinymce\",\n 'tinymce' => \"advanced\",\n 'error_text' => $this->locale['WLS_0270']];\n }\n\n // Start Form\n echo openform('weblinkform', 'post', $this->form_action);\n echo form_hidden('weblink_id', '', $this->weblink_data['weblink_id']);\n ?>\n\n <!-- Display Form -->\n <div class=\"row\">\n\n <!-- Display Left Column -->\n <div class=\"col-xs-12 col-sm-12 col-md-7 col-lg-8\">\n <?php\n\n echo form_text('weblink_name', $this->locale['WLS_0201'], $this->weblink_data['weblink_name'], [\n 'required' => TRUE,\n 'placeholder' => $this->locale['WLS_0201'],\n 'error_text' => $this->locale['WLS_0252']\n ]);\n\n echo form_text('weblink_url', $this->locale['WLS_0253'], $this->weblink_data['weblink_url'], [\n 'required' => TRUE,\n 'type' => 'url',\n 'placeholder' => 'http://'\n ]);\n\n echo form_textarea('weblink_description', $this->locale['WLS_0254'], $this->weblink_data['weblink_description'], $ExtendedSettings);\n ?>\n </div>\n\n <!-- Display Right Column -->\n <div class=\"col-xs-12 col-sm-12 col-md-5 col-lg-4\">\n <?php\n\n openside($this->locale['WLS_0260']);\n\n echo form_select_tree('weblink_cat', $this->locale['WLS_0101'], $this->weblink_data['weblink_cat'], [\n 'required' => TRUE,\n 'no_root' => TRUE,\n 'placeholder' => $this->locale['choose'],\n 'query' => (multilang_table(\"WL\") ? \"WHERE \".in_group('weblink_cat_language', LANGUAGE) : \"\")\n ], DB_WEBLINK_CATS, \"weblink_cat_name\", \"weblink_cat_id\", \"weblink_cat_parent\");\n\n echo form_select('weblink_visibility', $this->locale['WLS_0103'], $this->weblink_data['weblink_visibility'], [\n 'options' => fusion_get_groups(),\n 'placeholder' => $this->locale['choose']\n ]);\n\n if (multilang_table(\"WL\")) {\n echo form_select('weblink_language[]', $this->locale['language'], $this->weblink_data['weblink_language'], [\n 'options' => fusion_get_enabled_languages(),\n 'placeholder' => $this->locale['choose'],\n 'multiple' => TRUE,\n 'delimeter' => '.'\n ]);\n } else {\n echo form_hidden('weblink_language', '', $this->weblink_data['weblink_language']);\n }\n\n echo form_hidden('weblink_status', '', 1);\n echo form_hidden('weblink_datestamp', '', $this->weblink_data['weblink_datestamp']);\n\n if (!empty($_GET['action']) && $_GET['action'] == 'edit') {\n echo form_checkbox('update_datestamp', $this->locale['WLS_0259'], '');\n }\n\n closeside();\n\n ?>\n\n </div>\n </div>\n <?php\n self::display_weblinkButtons('formend', FALSE);\n echo closeform();\n }", "function buildContent($lang) {\n\t// stores the textbox file names to use\n\t// NOTE: the textboxes will be created and ordered in the same order of this array\n\t$file_list = array(\"narrator_box\", \"style_box\", \"script_box\", \"about_box\");\n\n\t// stores the content to be returned\n\t$res = array(\"style\" => \"\", \"script\" => \"\");\n\n\t// loop through the file list and create the textboxes HTML\n\tfor ($i = 0; $i < count($file_list); $i++) {\n\t\t// get this file's content\n\t\t$file_content = getFileContent($file_list[$i], $lang);\n\n\t\t// check if this file has no content\n\t\tif (empty($file_content)) {\n\t\t\t// it doesn't, so skip it\n\t\t\tcontinue;\n\t\t}\n\n\t\t// standardize the line breaks used in the file's content\n\t\t$file_content = preg_replace(\"/(\\n|\\r\\n)/\", \"\\r\", $file_content);\n\n\t\t// run this file's content through the CSS color coding function\n\t\t$content_parts = addStyleTags($file_content);\n\n\t\t// store the raw CSS code (without any color coding tags)\n\t\t$res[\"style\"] .= $content_parts[\"style\"];\n\n\t\t// store the new file content, now with the CSS color coding tags\n\t\t$file_content = $content_parts[\"color_coded\"];\n\n\t\t// run this file's content through the JS color coding function\n\t\t$content_parts = addScriptTags($file_content);\n\n\t\t// store the raw JS code (without any color coding tags)\n\t\t$res[\"script\"] .= $content_parts[\"script\"];\n\n\t\t// store the new file content, now with the JS color coding tags\n\t\t$file_content = $content_parts[\"color_coded\"];\n\n\t\t// store this file's content (with color coding)\n\t\t// making sure to remove any \"goto\" tags and any \"\\r\" after it (avoiding empty lines in the final result)\n\t\t$res[$file_list[$i]] = preg_replace(\"/<goto[^>]*>\\r?/i\", \"\", $file_content);\n\n\t\t// create this file's textbox HTML\n\t\t$res[$file_list[$i]] = \"<div id='\".$file_list[$i].\"' class='content flex_item' style='order:\".$i.\";'>\n\t\t\t<div class='header header_expanded'>\n\t\t\t\t<div class='header_text'>\".strtoupper($file_list[$i]).\"</div>\n\t\t\t\t<div class='header_button hb_expanded'></div>\n\t\t\t</div>\n\t\t\t<div class='text text_expanded'>\".$res[$file_list[$i]].\"</div>\n\t\t</div>\";\n\t}\n\n\t// return the processed data\n\treturn($res);\n}", "function pc_content_init_form( $font=[], $color='', $background='', $border='' ) {\n\n $css = ['', ''];\n\n\tif ( isset($font['font-family']) && $font['font-family'] ) {\n\t\t$is_custom_font = get_aifonts_from_dir( $font['font-family'], true );\n\n\t\tif ( ! is_font_loaded( $font['font-family'] ) ) :\n\t\t\tif ( !$is_custom_font ) {\n\t\t\t\t$css[0] = \"</style><style>@import url('https://fonts.googleapis.com/css?family=\" . $font['font-family'] . \"');\";\n\t\t\t} else {\n\t\t\t\t$css[0] = \"</style>{$is_custom_font}<style>\";\n\t\t\t}\n\t\tendif;\n\n\t \t$css[1] .= \"font-family:'\" . $font['font-family'] . \"';\";\n\t}\n\n\t$css[1] .= isset($font['font-weight'])&&$font['font-weight'] ? \"font-weight:\" . $font['font-weight'] . \";\" : '';\n\t$css[1] .= isset($font['font_size'])&&$font['font_size'] ? \"font-size:\" . $font['font_size'] . \"px;\" : '';\n\t$css[1] .= isset($font['line_height'])&&$font['line_height'] ? \"line-height:\" . $font['line_height'] . \"px;\" : '';\n\t$css[1] .= isset($font['font_style'])&&$font['font_style'] ? \"font-style:\" . $font['font_style'] . \";\" : '';\n\t$css[1] .= isset($font['text_align'])&&$font['text_align'] ? \"text-align:\" . $font['text_align'] . \";\" : '';\n\t$css[1] .= isset($font['letter_spacing'])&&$font['letter_spacing'] ? \"letter-spacing:\" . $font['letter_spacing'] . \"px;\" : '';\n\n\t$css[1] .= $color ? 'color:' . $color . ';' : '';\n\t$css[1] .= $background ? 'background-color:' . $background . ';' : '';\n\t$css[1] .= $border ? 'border-color:' . $border . ';' : '';\n\n\treturn $css;\n}", "function build_form($echo = true) {\n\t\n\t\t$output = '\n\t\t<form method=\"' . $this->form['method'] . '\"';\n\t\t\n\t\tif (!empty($this->form['enctype'])) $output .= ' enctype=\"' . $this->form['enctype'] . '\"';\n\t\t\n\t\tif (!empty($this->form['action'])) $output .= ' action=\"' . $this->form['action'] . '\"';\n\t\t\n\t\tif (!empty($this->form['id'])) $output .= ' id=\"' . $this->form['id'] . '\"';\n\t\t\n\t\tif (count($this->form['class']) > 0) $output .= $this->_output_classes($this->form['class']);\n\t\t\n\t\tif ($this->form['novalidate']) $output .= ' novalidate';\n\t\t\n\t\t$output .= '>';\n\t\t\n\t\tif ($this->form['add_honeypot']) \n\t\t\t$this->add_input('Leave blank to submit', array(\n\t\t\t\t'name' => 'honeypot',\n\t\t\t\t'slug' => 'honeypot',\n\t\t\t\t'id' => 'form_honeypot',\n\t\t\t\t'wrap_tag' => 'div',\n\t\t\t\t'wrap_class' => array('form_field_wrap', 'hidden'),\n\t\t\t\t'wrap_id' => '',\n\t\t\t\t'wrap_style' => 'display: none'\n\t\t\t));\n\t\t\n\t\tif ($this->form['add_nonce'] && function_exists('wp_create_nonce')) \n\t\t\t$this->add_input('WordPress nonce', array(\n\t\t\t\t'value' => wp_create_nonce($this->form['add_nonce']),\n\t\t\t\t'add_label' => false,\n\t\t\t\t'type' => 'hidden'\n\t\t\t));\n\t\t\n\t\tforeach ($this->inputs as $key => $val) :\n\t\t\t\n\t\t\t$min_max_range = $element = $end = $attr = $field = $label_html = '';\n\t\t\t\n\t\t\t// Set the field value to incoming\n\t\t\t$val['value'] = isset($_REQUEST[$val['name']]) && !empty($_REQUEST[$val['name']]) ? \n\t\t\t\t$_REQUEST[$val['name']] : \n\t\t\t\t$val['value'];\n\t\t\t\n\t\t\tswitch ($val['type']) :\n\t\t\t\t\n\t\t\t\tcase 'html':\n\t\t\t\t\t$element = '';\n\t\t\t\t\t$end = $val['label'];\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'title':\n\t\t\t\t\t$element = '';\n\t\t\t\t\t$end = '\n\t\t\t\t\t<h3>' . $val['label'] . '</h3>';\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'textarea':\n\t\t\t\t\t$element = 'textarea';\n\t\t\t\t\t$end = '>' . $val['value'] . '</textarea>';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 'select':\n\t\t\t\t\t$element = 'select';\n\t\t\t\t\t$end = '>' . $this->_output_options_select($val['options']) . '\n\t\t\t\t\t</select>';\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'checkbox':\n\t\t\t\t\tif (count($val['options']) > 0) :\n\t\t\t\t\t\t$element = '';\n\t\t\t\t\t\t$end = $this->_output_options_checkbox($val['options'], $val['name']);\n\t\t\t\t\t\t$label_html = '<p class=\"checkbox_header\">' . $val['label'] . '</p>';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tendif;\n\t\t\t\t\n\t\t\t\tcase 'radio':\n\t\t\t\t\tif (count($val['options']) > 0) :\n\t\t\t\t\t\t$element = '';\n\t\t\t\t\t\t$end = $this->_output_options_radios($val['options'], $val['name']);\n\t\t\t\t\t\t$label_html = '<p class=\"checkbox_header\">' . $val['label'] . '</p>';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tendif;\n\t\t\t\t\n\t\t\t\tcase 'range':\n\t\t\t\tcase 'number':\n\t\t\t\t\t$min_max_range .= !empty($val['min']) ? ' min=\"' . $val['min'] . '\"' : '';\n\t\t\t\t\t$min_max_range .= !empty($val['max']) ? ' max=\"' . $val['max'] . '\"' : '';\n\t\t\t\t\t$min_max_range .= !empty($val['step']) ? ' step=\"' . $val['step'] . '\"' : '';\n\t\t\t\t\n\t\t\t\tcase 'submit':\n\t\t\t\t\t$this->has_submit = true;\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tdefault :\n\t\t\t\t\t$element = 'input';\n\t\t\t\t\t$end .= ' type=\"' . $val['type'] . '\" value=\"' . $val['value'] . '\"';\n\t\t\t\t\t$end .= $val['checked'] ? ' selected' : '';\n\t\t\t\t\t$end .= $this->field_close();\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tendswitch;\n\t\t\t\n\t\t\t$id = !empty($val['id']) ? ' id=\"' . $val['id'] . '\"' : '';\n\t\t\t$class = count($val['class']) ? ' class=\"' . $this->_output_classes($val['class']) . '\"' : '';\n\t\t\t$attr = $val['autofocus'] ? ' autofocus' : '';\n\t\t\t$attr = $val['checked'] ? ' checked' : '';\n\t\t\t$attr = $val['required'] ? ' required' : '';\n\t\t\t\n\t\t\t// Build the label\n\t\t\tif (!empty($label_html)) :\n\t\t\t\t$field .= $label_html;\n\t\t\telseif ($val['add_label'] && $val['type'] != 'hidden' && $val['type'] != 'submit' && $val['type'] != 'title' && $val['type'] != 'html') :\n\t\t\t\t$val['label'] .= $val['required'] ? ' <strong>*</strong>' : '';\n\t\t\t\t$field .= '\n\t\t\t\t\t<label for=\"' . $val['id'] . '\">' . $val['label'] . '</label>';\n\t\t\tendif;\n\t\t\t\n\t\t\tif (!empty($element))\n\t\t\t\t$field .= '\n\t\t\t\t\t<' . $element . $id . ' name=\"' . $val['name'] . '\"' . $min_max_range . $attr . $end;\n\t\t\telse \n\t\t\t\t$field .= $end;\n\t\t\t\n\t\t\t// Parse and create wrap, if needed\n\t\t\tif ($val['type'] != 'hidden' && $val['type'] != 'html' && !empty($val['wrap_tag'])) :\n\t\t\t\n\t\t\t\t$wrap_before = '\n\t\t\t\t<' . $val['wrap_tag'];\n\t\t\t\t$wrap_before .= count($val['wrap_class']) > 0 ? $this->_output_classes($val['wrap_class']) : '';\n\t\t\t\t$wrap_before .= !empty($val['wrap_style']) ? ' style=\"' . $val['wrap_style'] . '\"' : '';\n\t\t\t\t$wrap_before .= !empty($val['wrap_id']) ? ' id=\"' . $val['wrap_id'] . '\"' : '';\n\t\t\t\t$wrap_before .= '>';\n\t\t\t\t\n\t\t\t\t$wrap_after = '\n\t\t\t\t</' . $val['wrap_tag'] . '>';\n\t\t\t\t\n\t\t\t\t$output .= $wrap_before . $field . $wrap_after;\n\t\t\telse : \n\t\t\t\t$output .= $field;\n\t\t\tendif;\n\t\t\t\n\t\tendforeach;\t\n\t\t\n\t\tif (! $this->has_submit) $output .= '\n\t\t\t\t<div class=\"form_field_wrap\">\n\t\t\t\t\t<input type=\"submit\" value=\"Submit\" name=\"submit\">\n\t\t\t\t</div>';\n\t\t\n\t\t$output .= '\n\t\t</form>';\n\t\t\n\t\tif ($echo) echo $output;\n\t\telse return $output;\n\t\t\n\t}", "function fn_adt_admin_css_content()\n{\n\t//$adt_css_file_name=ADT_PLUGIN_DIR_PATH.'assets/css/adt_custom_css.css';//ADT_PLUGIN_DIR_PATH\n\t//$adt_css_folder_path=ADT_PLUGIN_DIR_PATH.'assets/css/';//ADT_PLUGIN_DIR_PATH\n\n\t//refrence http://www.webdesignerdepot.com/2012/08/wordpress-filesystem-api-the-right-way-to-operate-with-local-files/\n\n\t$form_url = 'admin.php?page='.PLUGIN_ADMIN_PAGE_SLUG.'&tab=css';\n\t$output = $error = '';\n\n\t/**\n\t * write submitted text into file (if any)\n\t * or read the text from file - if there is no submission\n\t **/\n\tif(isset($_POST['txt_adt_css']))//new submission\n\t{\n\n\t if(false === ($output = fn_adt_css_write($form_url)))\n\t {\n\t return; //we are displaying credentials form - no need for further processing\n\n\t }\n\t elseif(is_wp_error($output))\n\t {\n\t $error = $output->get_error_message();\n\t $output = '';\n\t }\n\n\t} else {//read from file\n\n\t if(false === ($output = fn_adt_css_read($form_url))){\n\t return; //we are displaying credentials form no need for further processing\n\n\t } elseif(is_wp_error($output)) {\n\t $error = $output->get_error_message();\n\t $output = '';\n\t }\n\t}\n\n\t$output = $output; //escaping for printing\n\n\t$str_error='';\n\tif($error)\n\t{\n\t\t$str_error='<div class=\"error below-h2\">'.$error.'</div>';\n\t}\n\n\t$str_return='\n\t\t<div class=\"postbox\">\n\t\t <h3 class=\"hndle\"><span>Custom Adore Datatables CSS (Global)</span></h3>\n\t\t <div class=\"inside\">\n\t\t <p class=\"alternate\">Write your custom CSS here. This CSS will be loaded on every page/post where Adore Datatable instance exists.</p>\n\t\t '.$str_error.'\n\t\t\t\t<form method=\"post\" action=\"\">\n\t\t\t\t\t'.wp_nonce_field('adt_css_save_nonce').'\n\t\t\t\t\t<fieldset class=\"form-table\">\n\t\t\t\t\t <label for=\"txt_adt_css\">Write your custom CSS Below</label><br>\n\t\t\t\t\t <textarea id=\"txt_adt_css\" name=\"txt_adt_css\" rows=\"8\" class=\"large-text\">'.$output.'</textarea>\n\t\t\t\t\t</fieldset>\n\t\t\t\t\t<input type=\"submit\" value=\"Save CSS\" class=\"button button-primary\" id=\"cmd_adt_css_submit\" name=\"cmd_adt_css_submit\">\n\t\t\t\t</form>\n\t\t </div>\n\t\t</div>\n\t';\n\treturn $str_return;\n}", "function genForm($query,$id,$prefix,$target)\n {\n global $values;\n $getCols = query($query);\n //$results = query($query);\n //$values = mysqli_fetch_array($results);\n\n $fields_num = mysqli_num_fields($getCols);\n echo '<textarea>';\n\n\n $formName = $prefix.\"Form\";\t\n echo \"<form action='\".'<?=app(\"url\")?>'.\"/exec/$target' id='$formName' name='$formName'>\\n\";\n\n\n \n for($i=0; $i<$fields_num; $i++)\n {\n $field = mysqli_fetch_field($getCols);\t\n \n if(strstr($id,$field->name)){\n echo \"<input type='hidden' name='frm_$id' id='$id' value='\".'<?=$values[\"'.$field->name.'\"]?>'.\"'>\\n\";\n }else{\n //$colname[$y] = $field->name;\n $label = ucfirst(str_replace($prefix.\"_\",\"\",$field->name));\n\n echo \"<label>\".ucfirst(str_replace('_', ' ',$label)).\"</label>\";\n echo \"<input name='frm_$field->name' id='frm_$field->name' value='\".'<?=$values[\"'.$field->name.'\"]?>'.\"'><br>\\n\";\n }\n }\n echo \"<label>&nbsp;</label><button id='formbutton'>Submit</button>\\n\";\n echo \"</form>\\n\";\n echo \"\\n<script>\\n\";\n echo \"$(document).ready(function(){\\n\";\n echo \" $('#$formName').validate();\\n\";\n echo \"});\\n\";\n echo \"</script>\\n\";\n echo '</textarea>';\n\t}", "public function inline_css() { ?>\n\n\t\t\t<style type=\"text/css\">\n\t\t\t\tbody #wprt-add-widget h3 { text-align: center !important; padding: 15px 7px; font-size: 1.3em; margin-top: 5px; }\n\t\t\t\tbody div#widgets-right .sidebar-wprt-custom .widgets-sortables { padding-bottom: 45px }\n\t\t\t\tbody div#widgets-right .sidebar-wprt-custom.closed .widgets-sortables { padding-bottom: 0 }\n\t\t\t\tbody .wprt-widget-area-footer { display: block; position: absolute; bottom: 0; left: 0; height: 40px; line-height: 40px; width: 100%; border-top: 1px solid #e4e4e4; }\n\t\t\t\tbody .wprt-widget-area-footer > div { padding: 8px 8px 0 }\n\t\t\t\tbody .wprt-widget-area-footer .wprt-widget-area-id { display: block; float: left; max-width: 48%; overflow: hidden; position: relative; top: -6px; }\n\t\t\t\tbody .wprt-widget-area-footer .wprt-widget-area-buttons { float: right }\n\t\t\t\tbody .wprt-widget-area-footer .description { padding: 0 !important; margin: 0 !important; }\n\t\t\t\tbody div#widgets-right .sidebar-wprt-custom.closed .widgets-sortables .wprt-widget-area-footer { display: none }\n\t\t\t\tbody .wprt-widget-area-footer .wprt-widget-area-delete { display: block; float: right; margin: 0; }\n\t\t\t\tbody .wprt-widget-area-footer .wprt-widget-area-delete-confirm { display: none; float: right; margin: 0 5px 0 0; }\n\t\t\t\tbody .wprt-widget-area-footer .wprt-widget-area-delete-cancel { display: none; float: right; margin: 0; }\n\t\t\t\tbody .wprt-widget-area-delete-confirm:hover:before { color: red }\n\t\t\t\tbody .wprt-widget-area-delete-confirm:hover { color: #333 }\n\t\t\t\tbody .wprt-widget-area-delete:hover:before { color: #919191 }\n\t\t\t\tbody .activate_spinner { display: block !important; position: absolute; top: 10px; right: 4px; background-color: #ECECEC; }\n\t\t\t\tbody #wprt-add-widget form { text-align: center }\n\t\t\t\tbody #widget_area-wprt-custom,\n\t\t\t\tbody #widget_area-wprt-custom h3 { position: relative }\n\t\t\t\tbody #wprt-add-widget p { margin-top: 0 }\n\t\t\t\tbody #wprt-add-widget { margin: 10px 0 0; position: relative; }\n\t\t\t\tbody #wprt-add-widget-input { max-width: 95%; padding: 8px; margin-bottom: 14px; margin-top: 3px; text-align: center; }\n\t\t\t</style>\n\n\t\t<?php }", "function sc_shortcode_form() {\r\n\tglobal $sc_url;\r\n\t$fields = get_option('sc_form');\r\n\t$settings = get_option('sc_settings');\r\n\r\n\t$form = '';\r\n\t$form .= '<div id=\"sc_form\">';\r\n\t$form .= '<div class=\"mess\"></div>';\r\n\t$form .= '<form method=\"post\" action=\"\" onsubmit=\"return scCheckForm2()\">';\r\n\t\r\n\tif( $fields!='' ): for($i=0; $i<count($fields); $i++):\r\n\t\t\r\n\t\tif( $fields[$i]['req']==1 ){ $mend = 'mendatory '; $ast = '* '; }\r\n\t\telse { $mend = ''; $ast = ''; }\r\n\t\t\r\n\t\tif( $fields[$i]['mail']==1 ) $mail = 'sc_mail';\r\n\t\telse $mail = '';\r\n\t\t\r\n\t\t$lbl = '<label class=\"'. $mend. $mail .'\" for=\"field_'. $i .'_sc\">'. $ast . $fields[$i]['label'] .'</label>';\r\n\t\t$hid = '<input name=\"field_name[]\" value=\"'. $fields[$i]['label'] .'\" type=\"hidden\" style=\"display:none;\" />';\r\n\t\t\r\n\t\tif( $fields[$i]['type']=='textbox' )\r\n\t\t\t$in = '<input class=\"drwr-txtInp-sc\" name=\"field_val[]\" id=\"field_'. $i .'_sc\" type=\"text\" />';\r\n\t\telse\r\n\t\t\t$in = '<textarea class=\"drwr-txtArea-sc\" rows=\"5\" cols=\"5\" name=\"field_val[]\" id=\"field_'. $i .'_sc\"></textarea>';\r\n\t\t\r\n\t\t$form .= \"\\n\\n<p>\".$hid;\r\n\t\t$form .= \"\\n\".$lbl;\r\n\t\t$form .= \"\\n\".$in.\"</p>\";\r\n\t\r\n\tendfor; endif;\r\n\t\r\n\t\r\n\t//add captcha code starts \r\n\tif( $settings['sc_captcha']==1 ){\r\n\t\t\r\n\t\t$form .= '<p><label>Security Code</label>';\r\n\t\t$form .= '<img src=\"'. $sc_url .'/includes/captcha/securimage_show.php?sid='. md5(uniqid(time())) .'\" alt=\"Security Code\" id=\"sc_image_sc\" style=\"float:left\" />';\r\n\t\t\r\n\t\t$form .= '<a href=\"#\" onclick=\"document.getElementById(\\'sc_image_sc\\').src = \\''. $sc_url .'/includes/captcha/securimage_show.php?sid=\\' + Math.random(); return false\"><img src=\"'. $sc_url .'/includes/captcha/images/refresh.png\" alt=\"Reload Image\" title=\"Reload Image\" style=\"float:left;padding-left:10px;\" /></a></p>';\r\n\t\t\r\n\t\t$form .= '<p><label for=\"sc_code_sc\" class=\"mendatory\">* Verify Code</label>';\r\n\t\t$form .= '<input name=\"sc_code\" id=\"sc_code_sc\" type=\"text\" style=\"text-align:center;\" /></p>';\r\n\t\r\n\t}\r\n\t//add captcha code ends\r\n\t\r\n\t\r\n\t\t$form .= '<p><label>*required fields</label><input value=\"Submit\" type=\"submit\" id=\"sc_submit_sc\" /></p>';\r\n\t$form .= '</form>';\r\n\t$form .= '</div>';\r\n\r\n\t$form .= '<div id=\"sc_thanku_sc\" style=\"display:none\"><div class=\"mess\">'. $settings['sc_thanku'] .'</div></div>';\r\n\t$form .= '<div id=\"sc_error_sc\" style=\"display:none\"><div class=\"mess\">'. $settings['sc_error'] .'</div></div>';\r\n\r\n\treturn $form;\r\n}", "function getForm()\r\n\t{\r\n\t\t$this->action();\r\n\t\t$mainForm\t= $this->getMainForm();\r\n\t\tif($this->isFormRequire)\r\n\t\t{\r\n\t\t\t$cls = ' class=\"formIsRequire\"';\r\n\t\t\tlink_js(_PEA_URL.'includes/formIsRequire.js', false);\r\n\t\t}else{\r\n\t\t\t$cls = '';\r\n\t\t}\r\n\r\n\t\t$i = 0;\r\n\t\t$out = '';\r\n\r\n\t\t$out .= '<form method=\"'.$this->methodForm.'\" action=\"'.$this->actionUrl.'\" name=\"'. $this->formName .'\"'.$cls.' enctype=\"multipart/form-data\" role=\"form\">';\r\n\t\t$out .= $this->getSaveSuccessPage();\r\n\t\t$out .= $this->getDeleteSuccessPage();\r\n\r\n\t\t$hover= $this->isChangeBc ? ' table-hover' : '';\r\n\t\t$out .= '<table class=\"table table-striped table-bordered'.$hover.'\">';\r\n\t\t$out .= '<thead><tr>';\r\n\r\n\t\t// ngambil tr title\r\n\t\t$numColumns = 0;\r\n\r\n\t\tforeach($this->arrInput as $input)\r\n\t\t{\r\n\t\t\tif ($input->isInsideRow && !$input->isInsideMultiInput && !$input->isHeader)\r\n\t\t\t{\r\n\t\t\t\t// buat array data untuk report\r\n\t\t\t\tif ($this->isReportOn && $input->isIncludedInReport)\r\n\t\t\t\t{\r\n\t\t\t\t\t$arrHeader[]\t= $input->title;\r\n\t\t\t\t}\r\n\t\t\t\t// dapatkan text bantuan\r\n\t\t\t\tif (!empty($input->textHelp))\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->help->value[$input->name] = $input->textHelp;\r\n\t\t\t\t}\r\n\t\t\t\tif (!empty($input->textTip))\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->tip->value[$input->name] = $input->textTip;\r\n\t\t\t\t}\r\n\t\t\t\t$label = '';\r\n\t\t\t\tif (@$input->isCheckAll)\r\n\t\t\t\t{\r\n\t\t\t\t\t$label = $this->getCheckAll($input);\r\n\t\t\t\t}\r\n\t\t\t\t$href = $this->getOrderUrl($input, $input->title);\r\n\t\t\t\tif (!empty($this->tip->value[$input->name]))\r\n\t\t\t\t{\r\n\t\t\t\t\t$input->title = tip($input->title, $this->tip->value[$input->name]);\r\n\t\t\t\t}\r\n\t\t\t\t$label .= $href['start'].$input->title.$href['end'];\r\n\t\t\t\t$out .= ' <th>'.$label;\r\n\t\t\t\tif (!empty($this->help->value[$input->name]))\r\n\t\t\t\t{\r\n\t\t\t\t\t$out .= ' <span style=\"font-weight: normal;\">'.help($this->help->value[$input->name],'bottom').'</span>';\r\n\t\t\t\t}\r\n\t\t\t\t$out\t\t.= \"</th>\\n\";\r\n\t\t\t\t$numColumns++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$out .= '</tr></thead>';\r\n\t\t$this->reportData['header']\t= isset($arrHeader) ? $arrHeader : array();\r\n\t\t// ambil mainFormnya\r\n\t\t$out .= $mainForm;\r\n\r\n\t\t/* Return, Save, Reset, Navigation, Delete */\r\n\t\t$button = '';\r\n\t\tif (!empty($_GET['return']) && empty($_GET['is_ajax']))\r\n\t\t{\r\n\t\t\t$button .= $GLOBALS['sys']->button($_GET['return']);\r\n\t\t}\r\n\t\tif ($this->saveTool)\r\n\t\t{\r\n\t\t\t$button .= '<button type=\"submit\" name=\"'. $this->saveButton->name .'\" value=\"'. $this->saveButton->value\r\n\t\t\t\t\t\t.\t'\" class=\"btn btn-primary btn-sm\"><span class=\"glyphicon glyphicon-'.$this->saveButton->icon.'\"></span>'\r\n\t\t\t\t\t\t. $this->saveButton->label .'</button>';\r\n\t\t}\r\n\t\tif ($this->resetTool)\r\n\t\t{\r\n\t\t\t$button .= '<button type=\"reset\" class=\"btn btn-warning btn-sm\"><span class=\"glyphicon glyphicon-'.$this->resetButton->icon.'\"></span>'.$this->resetButton->label.'</button> ';\r\n\t\t}\r\n\t\t$nav = $this->nav->getNav();\r\n\t\tif (!empty($nav))\r\n\t\t{\r\n\t\t\tif (!empty($button))\r\n\t\t\t{\r\n\t\t\t\t$button = '<table style=\"width: 100%;\"><tr><td style=\"width: 10px;white-space: nowrap;\">'.$button.'</td><td style=\"text-align: center;\">'.$nav.'</td></tr></table>';\r\n\t\t\t}else{\r\n\t\t\t\t$button .= $nav;\r\n\t\t\t}\r\n\t\t}\r\n\t\t$footerTD = array();\r\n\t\t$colspan = $numColumns;\r\n\t\tif ($this->deleteTool)\r\n\t\t{\r\n\t\t\t$colspan -= 1;\r\n\t\t}\r\n\t\t$attr = $colspan > 1 ? ' colspan=\"'.$colspan.'\"' : '';\r\n\t\t$footerTD[] = '<td'.$attr.'>'.$button.'</td>';\r\n\t\tif ($this->deleteTool)\r\n\t\t{\r\n\t\t\t$footerTD[] = '<td>'\r\n\t\t\t\t. '<button type=\"submit\" name=\"'.$this->deleteButton->name.'\" value=\"'. $this->deleteButton->value.'\" class=\"btn btn-danger btn-sm\" '\r\n\t\t\t\t. 'onclick=\"if (confirm(\\'Are you sure want to delete selected row(s) ?\\')) { return true; }else{ return false; }\">'\r\n\t\t\t\t. '<span class=\"glyphicon glyphicon-'.$this->deleteButton->icon.'\"></span>'.$this->deleteButton->label .'</button>'\r\n\t\t\t\t. '</td>';\r\n\t\t}\r\n\t\tif (!empty($footerTD))\r\n\t\t{\r\n\t\t\t$out .= '<tfoot><tr>'.implode('', $footerTD).'</tr></tfoot>';\r\n\t\t}\r\n\t\t$out .= '</table>';\r\n\t\t$out .= '</form>';\r\n\r\n\t\t/* Export Tool, Page Status, Form Navigate */\r\n\t\t$nav = $this->nav->getViewAllLink();\r\n\t\tif (!empty($nav))\r\n\t\t{\r\n\t\t\t$nav = '<span class=\"input-group-addon\">'.$nav.'</span>';\r\n\t\t}\r\n\t\t$nav .= $this->nav->getGoToForm(false);\r\n\t\t$out .= '<form method=\"get\" action=\"\" role=\"form\" style=\"margin-top:-20px;margin-bottom: 20px;\">'\r\n\t\t\t\t.\t'<div class=\"input-group\">'\r\n\t\t\t\t. $this->getReport($this->nav->int_cur_page)\r\n\t\t\t\t. '<span class=\"input-group-addon\">'\r\n\t\t\t\t. $this->nav->getStatus().'</span>'.$nav.'</div></form>';\r\n\r\n\t\t/* Form Panel */\r\n\t\t$formHeader = $this->getHeaderType();\r\n\t\tif (!empty($formHeader))\r\n\t\t{\r\n\t\t\t$out = '\r\n\t\t\t\t<div class=\"panel panel-default\">\r\n\t\t\t\t\t<div class=\"panel-heading\">\r\n\t\t\t\t\t\t<h3 class=\"panel-title\">'.$formHeader.'</h3>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t\t<div class=\"panel-body\">\r\n\t\t\t\t\t\t'.$out.'\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>';\r\n\t\t}\r\n\t\t$out = $this->getHideFormToolStart().$out.$this->getHideFormToolEnd();\r\n\t\treturn $out;\r\n\t}", "private function generateFormConstantes()\n {\n $inputs = array();\n $inputs[] = array(\n 'type' => 'text',\n 'label' => 'Seuil de Calcul Prime fichier',\n 'name' => 'co_seuil_prime_fichier',\n 'desc' => 'Montant du seuil de calcul de la prime',\n 'class' => 'input fixed-width-md',\n 'suffix' => '€'\n );\n $inputs[] = array(\n 'type' => 'text',\n 'label' => 'Prime fichier',\n 'name' => 'co_prime_fichier',\n 'desc' => 'Montant de la prime fichier',\n 'class' => 'input fixed-width-md',\n 'suffix' => '€'\n );\n $inputs[] = array(\n 'type' => 'text',\n 'label' => 'Prime parrainage',\n 'name' => 'co_prime_parrainage',\n 'desc' => 'Montant de la prime parrainage',\n 'class' => 'input fixed-width-md',\n 'suffix' => '€'\n );\n $inputs[] = array(\n 'type' => 'text',\n 'label' => 'Prospects par jour',\n 'name' => 'co_prospects_jour',\n 'desc' => 'Nombre de prospects affectés par jour travaillé',\n 'class' => 'input fixed-width-md',\n );\n $inputs[] = array(\n 'type' => 'text',\n 'label' => 'Prospects par heure',\n 'name' => 'co_prospects_heure',\n 'desc' => 'Nombre de prospects par heure travaillé',\n 'class' => 'input fixed-width-md',\n );\n $inputs[] = array(\n 'type' => 'text',\n 'label' => 'Ancienneté des prospects',\n 'name' => 'co_prospects_jour_max',\n 'desc' => 'Nombre de jour maximum d\\'ancienneté des prospects pour l\\'atribution',\n 'class' => 'input fixed-width-md',\n 'suffix' => 'jour'\n );\n\n $fields_form = array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Configuration'),\n 'icon' => 'icon-cogs'\n ),\n 'input' => $inputs,\n 'submit' => array(\n 'title' => $this->l('Save'),\n 'class' => 'btn btn-default pull-right',\n 'name' => 'submitConfiguration'\n )\n )\n );\n\n $lang = new Language((int)Configuration::get('PS_LANG_DEFAULT'));\n $helper = new HelperForm();\n $helper->default_form_language = $lang->id;\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false) . '&configure=' . $this->name\n . '&tab_module=' . $this->tab . '&module_name=' . $this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigConfiguration(),\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id\n );\n return $helper->generateForm(array($fields_form));\n\n }", "public static function display_create_form(){\n echo \"<form action='../../Controllers/charity_controller.class.php?action=save' method='post'>\";\n echo \"Name: <input type='text' name='name' /><br />\";\n echo \"Description: <textarea name='description'></textarea><br />\";\n echo \"<input type='submit' value='Save' />\";\n echo \"</form>\";\n }", "public static function outputForm()\n {\n $out = <<<EOD\n <form method=\"post\" action=\"../webroot/rm-movies.php\" onsubmit=\"\">\n <input type=hidden name=search value='simple-search'/>\n <input type='text' name='title-simple' placeholder='Sök Filmtitel' />\n </form>\nEOD;\n return $out;\n }", "public function generate_html_forms()\n\t{\n\t\t$return_str = '<div class=\"bwp-wrap bwp-option-page-wrapper\" style=\"padding-bottom: 20px;\">' . \"\\n\";\n\t\tif (sizeof($this->form_tabs) >= 2)\n\t\t\t$return_str .= apply_filters('bwp_admin_form_icon', '<div class=\"icon32\" id=\"icon-options-general\"><br></div>' . \"\\n\");\n\t\telse\n\t\t\t$return_str .= '<div class=\"icon32\" id=\"icon-options-general\"><br></div>';\t\t\t\n\t\t\n\t\tif (sizeof($this->form_tabs) >= 2)\n\t\t{\n\t\t\t$count = 0;\n\t\t\t$return_str .= '<h2 class=\"bwp-option-page-tabs\">' . \"\\n\";\n\t\t\t$return_str .= apply_filters('bwp_admin_plugin_version', '') . \"\\n\";\n\t\t\tforeach ($this->form_tabs as $title => $link)\n\t\t\t{\n\t\t\t\t$count++;\n\t\t\t\t$active = ($count == $this->current_tab) ? ' nav-tab-active' : '';\n\t\t\t\t$return_str .= '<a class=\"nav-tab' . $active . '\" href=\"' . $link . '\">' . $title . '</a>' . \"\\n\";\n\t\t\t}\n\t\t\t$return_str .= '</h2>' . \"\\n\";\n\t\t}\n\t\telse if (!isset($this->form_tabs[0]))\n\t\t{\n\t\t\t$title = array_keys($this->form_tabs);\n\t\t\t$return_str .= '<h2>' . $title[0] . '</h2>' . \"\\n\";\n\t\t}\n\t\telse\n\t\t\t$return_str .= '<h2>' . $this->form_tabs[0] . '</h2>' . \"\\n\";\n\n\t\t$return_str .= '<div class=\"bwp-option-box clear\">' . \"\\n\";\n\n\t\t// Begin generating each form\n\t\tforeach ($this->forms as $form)\n\t\t{\n\t\t\t// If this form has 'divider' items, we need to split HTML fields appropriately\n\t\t\t$dividers = (isset($form->form['divider']) && is_array($form->form['divider'])) ? array_keys($form->form['divider']) : array();\n\t\t\t$form_style = (!empty($form->style)) ? ' style=\"' . $form->style . '\" ' : '';\n\t\t\t$multi_form_style = (!empty($form->style) && 0 < sizeof($dividers)) ? ' style=\"' . $form->style . '\" ' : '';\n\n\t\t\tif (0 == sizeof($dividers))\n\t\t\t{\n\t\t\t\t$return_str .= '<div class=\"bwp-option-box-inside\"' . $form_style . '>' . \"\\n\";\n\t\t\t\t$return_str .= apply_filters('bwp_opf_before_form_' . $form->form_name, '');\n\t\t\t\techo $return_str;\n\t\t\t\tdo_action('bwp_opa_before_form_' . $form->form_name, $form->form_name);\n\t\t\t}\n\t\t\telse\n\t\t\t\techo $return_str;\n\n\t\t\t$enctype = (!empty($form->form_enctype)) ? ' enctype=\"' . $form->form_enctype . '\" ' : '';\n\t\t\t$return_str = '<form class=\"bwp-option-page\" name=\"' . $form->form_name . '\" method=\"post\" action=\"\"' . $enctype . $multi_form_style . '>' . \"\\n\";\n\n\t\t\t// Nonce\n\t\t\t$return_str .= wp_nonce_field($form->form_name, \"_wpnonce\", false, false) . \"\\n\";\n\t\t\t$return_str .= apply_filters('bwp_opf_referrer_field_' . $form->form_name, wp_referer_field(false)) . \"\\n\";\n\n\t\t\t$return_str .= '<ul>' . \"\\n\";\n\n\t\t\tif (isset($form->form_items) && is_array($form->form_items))\n\t\t\t{\n\t\t\t\t// If this form needs to be divided, so be it\n\t\t\t\tif (0 < sizeof($dividers))\n\t\t\t\t{\n\t\t\t\t\t$return_str .= '<div class=\"bwp-option-box-inside\">' . \"\\n\";\n\t\t\t\t\t$return_str .= apply_filters('bwp_opf_before_form_' . $form->form_name, '');\n\t\t\t\t\techo $return_str;\n\t\t\t\t\tdo_action('bwp_opa_before_form_' . $form->form_name, $form->form_name);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\techo $return_str;\n\t\t\t\t// Reset the result\n\t\t\t\t$return_str = '';\n\t\t\t\t// Generate individual items\n\t\t\t\t$form_count = 0;\n\t\t\t\tforeach ($form->form_items as $key => $type)\n\t\t\t\t{\n\t\t\t\t\tif (!empty($form->form_item_names[$key]) && isset($form->form_item_labels[$key]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$extra_classes = ('heading' == $type) ? ' bwp-li-heading' : ' bwp-li-item';\n\t\t\t\t\t\t// Before the field\n\t\t\t\t\t\techo $return_str;\n\t\t\t\t\t\tdo_action('bwp_opa_before_field_' . $form->form_name . '_' . $form->form_item_names[$key], $form->form_name);\n\t\t\t\t\t\t$return_str = '';\n\t\t\t\t\t\t// The field\n\t\t\t\t\t\t$return_str .= ('hidden' != $form->form_items[$key]) ? '<li class=\"clear' . $extra_classes . '\">' . $form->generate_html_fields($type, $form->form_item_names[$key]) . '</li>' : $form->generate_html_fields($type, $form->form_item_names[$key]) . \"\\n\";\n\t\t\t\t\t\t// After the field\n\t\t\t\t\t\techo $return_str;\n\t\t\t\t\t\tdo_action('bwp_opa_after_field_' . $form->form_name . '_' . $form->form_item_names[$key], $form->form_name);\n\t\t\t\t\t\t$return_str = '';\n\t\t\t\t\t\tif (in_array($form->form_item_names[$key], $dividers))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$form_count++;\n\t\t\t\t\t\t\techo $return_str;\n\t\t\t\t\t\t\tdo_action('bwp_opa_after_divided_form_' . $form->form_name . '_' . $form_count, $form->form_name);\n\t\t\t\t\t\t\t$return_str = '';\n\t\t\t\t\t\t\t$return_str .= apply_filters('bwp_opf_multi_submit_button_' . $form->form_name, '<p class=\"submit\"><input type=\"submit\" class=\"button-primary\" name=\"save_' . $form->form_name . '\" value=\"' . __('Save All Changes', $this->domain) . '\" /> &nbsp;<input type=\"submit\" class=\"button-secondary\" name=\"reset_' . $form->form_name . '\" value=\"' . __('Reset to Defaults', $this->domain) . '\" /></p>', $form_count) . \"\\n\";\n\t\t\t\t\t\t\t$return_str .= '</div>' . \"\\n\";\n\t\t\t\t\t\t\t$return_str .= '<div class=\"bwp-option-box-inside\">' . \"\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If this form needs to be divided, add the final Save all changes button\n\t\t\t\tif (0 < sizeof($dividers))\n\t\t\t\t\t$return_str .= apply_filters('bwp_opf_multi_submit_button_' . $form->form_name, '<p class=\"submit\"><input type=\"submit\" class=\"button-primary\" name=\"save_' . $form->form_name . '\" value=\"' . __('Save All Changes', $this->domain) . '\" /> &nbsp;<input type=\"submit\" class=\"button-secondary\" name=\"reset_' . $form->form_name . '\" value=\"' . __('Reset to Defaults', $this->domain) . '\" /></p>', 'last') . \"\\n\";\n\t\t\t}\n\n\t\t\t$return_str .= '</ul>' . \"\\n\";\t\t\n\t\t\t$return_str .= apply_filters('bwp_opf_before_submit_button_' . $form->form_name, '');\n\t\t\techo $return_str;\n\t\t\tdo_action('bwp_opa_before_submit_button_' . $form->form_name, $form->form_name);\n\n\t\t\t$submit = apply_filters('bwp_opf_submit_button_' . $form->form_name, '<p class=\"submit\"><input type=\"submit\" class=\"button-primary\" name=\"save_' . $form->form_name . '\" value=\"' . __('Save Changes', $this->domain) . '\" /> &nbsp;<input type=\"submit\" class=\"button-secondary\" name=\"reset_' . $form->form_name . '\" value=\"' . __('Reset to Defaults', $this->domain) . '\" /></p>') . \"\\n\";\n\t\t\t$return_str = apply_filters('bwp_op_submit_button', $submit) . \"\\n\";\n\t\t\t$return_str .= '</form>' . \"\\n\";\n\n\t\t\tif (0 == sizeof($dividers))\n\t\t\t\t$return_str .= '</div>' . \"\\n\";\n\t\t}\n\n\t\t$return_str .= '<div class=\"clear\"><!-- --></div>' . \"\\n\";\n\t\t$return_str .= '</div>' . \"\\n\";\n\t\t$return_str .= '</div>' . \"\\n\";\n\n\t\techo $return_str;\n\t}", "public function buildLightbox(){\n\n\t\t$fields = $this->getFields();\n\n\t\techo '<div class=\"main-content\">';\n\t\t\n\t\t\tforeach( $fields as $field ){\n\n\t\t\t\t$field->render();\n\n\t\t\t\tif( method_exists( $field, 'renderTemplate' ) )\n\t\t\t\t\techo $field->renderTemplate();\n\n\t\t\t}\n\n\t\techo '</div>';\n\t\techo '<div class=\"side-content\">';\n\t\t\t\n\t\t\t$this->saveButton();\n\n\t\techo '</div>';\n\t}", "function sr_write_pagebuilder($pagebuildermeta) {\n\tglobal $sr_prefix, $post; \n\t\n\t/* Bugfix for export/import */\n\t$json = str_replace(\"\\\\\\\\\", \"\\\\\", get_post_meta($post->ID, $sr_prefix.'_pagebuilder_json', true));\n\t\n\t$classActive = ''; if (get_post_meta($post->ID, $sr_prefix.'_pagebuilder_active', true) == 'yes') { $classActive = 'active'; }\n\techo '<div id=\"sr-pagebuilder\" class=\"'.$classActive.'\">';\n\t\n\t// Main Textareas\n\techo '<div class=\"fieldareas\">';\n\techo '<textarea name=\"'.$sr_prefix.'_pagebuilder\" id=\"'.$sr_prefix.'_pagebuilder\">'.get_post_meta($post->ID, $sr_prefix.'_pagebuilder', true).'</textarea>';\n\techo '<textarea name=\"'.$sr_prefix.'_pagebuilder_json\" id=\"'.$sr_prefix.'_pagebuilder_json\">'.$json.'</textarea>';\n\t\n\techo '<textarea name=\"'.$sr_prefix.'_pagebuilder_backup_one\" id=\"'.$sr_prefix.'_pagebuilder_backup_one\">'.get_post_meta($post->ID, $sr_prefix.'_pagebuilder', true).'</textarea>';\n\techo '<textarea name=\"'.$sr_prefix.'_pagebuilder_json_backup_one\" id=\"'.$sr_prefix.'_pagebuilder_json_backup_one\">'.get_post_meta($post->ID, $sr_prefix.'_pagebuilder_json', true).'</textarea>';\n\techo '<textarea name=\"'.$sr_prefix.'_pagebuilder_json_backup_one_tmp\" id=\"'.$sr_prefix.'_pagebuilder_json_backup_one_tmp\">'.get_post_meta($post->ID, $sr_prefix.'_pagebuilder_json_backup_one', true).'</textarea>';\n\techo '</div>';\n\t\n\t\n\t// Activate Pagebuilder\n\techo '<input type=\"hidden\" name=\"'.$sr_prefix.'_pagebuilder_active\" class=\"'.$sr_prefix.'_pagebuilder_active\" id=\"'.$sr_prefix.'_pagebuilder_active\" value=\"'.get_post_meta($post->ID, $sr_prefix.'_pagebuilder_active', true).'\">';\n\techo '<a href=\"#\" class=\"sr-enable-pagebuilder\">Activate Pagebuilder</a>';\n\techo '<a href=\"#\" class=\"sr-disable-pagebuilder\">Deactivate Pagebuilder</a>';\n\t\n\t\n\t\n\t\n\t\n\t// \t\t********\n\t\n\t//\t\tPagebuilder VISUAL\n\t\n\t// \t\t********\t\n\techo '<div id=\"sr-pagebuilder-visual\" class=\"sortable-container\">';\n\t\n\tif (get_post_meta($post->ID, $sr_prefix.'_pagebuilder_json', true) !== '') {\n\t$json = json_decode($json);\n\tif($json) {\n\tforeach($json->section as $section) {\t\n\t\t\n\t\tswitch($section->shortcode) {\n\t\t\t\n\t\n\t\t\t// text\n\t\t\tcase 'text':\n\t\t\t\t$jsonContent = json_encode($section)\t;\n\t\t\t\t$thisContent = false;\n\t\t\t\tforeach ($section->options as $o) {\n\t\t\t\t\tif ($o->oName == 'content') { $thisContent = $o->oVal;}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo '<div class=\"visualsection '.$section->shortcode.'\">\n\t\t\t\t\t<div class=\"action-bar\"><a href=\"#sr-pagebuilder-popup-'.$section->shortcode.'\" class=\"edit-section\"></a><a href=\"#\" class=\"delete-section\"></a></div>\n\t\t\t\t\t<textarea class=\"shortcode shortcode-start\">'.$thisContent.'</textarea>\n\t\t\t\t\t<textarea class=\"json json-start\">'.$jsonContent.'</textarea>';\n\t\t\t\techo '<span>Text / Editor</span>\n\t\t\t\t</div>';\n\t\t\tbreak;\n\t\t\t\n\t\t\t// spacer\n\t\t\tcase 'spacer':\n\t\t\t\techo '<div class=\"visualsection '.$section->shortcode.'\">\n\t\t\t\t\t<div class=\"action-bar\"><a href=\"#\" class=\"delete-section\"></a><a href=\"#sr-pagebuilder-popup-'.$section->shortcode.'\" class=\"edit-section\"></a></div>';\n\t\t\t\t\n\t\t\t\t$size = '';\t\n\t\t\t\techo '<textarea class=\"shortcode shortcode-start\">[spacer ';\n\t\t\t\tforeach ($section->options as $o) {\n\t\t\t\t\tif ($o->oName == 'size') { $size = $o->oVal;}\n\t\t\t\t\techo ' '.$o->oName.'=\"'.$o->oVal.'\"'; \n\t\t\t\t}\n\t\t\t\techo ']</textarea>';\n\t\t\t\t$jsonContent = json_encode($section)\t;\n\t\t\t\techo '<textarea class=\"json json-start\">'.$jsonContent.'</textarea>';\n\t\t\t\techo '<span>Spacer ('.$size.')</span>\n\t\t\t\t<a class=\"sr-add-row sr-open-popup\" href=\"#sr-pagebuilder-popup-row\">Add Row</a>\n\t\t\t\t</div>';\n\t\t\tbreak;\n\t\t\t\n\t\t\t\n\t\t\t// teammemeber\n\t\t\tcase 'sr-teammember':\n\t\t\t\t$jsonContent = json_encode($section)\t;\n\t\t\t\t$thisContent = false;\n\t\t\t\tforeach ($section->options as $o) {\n\t\t\t\t\tif ($o->oName == 'content') { $thisContent = $o->oVal;}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo '<div class=\"visualsection '.$section->shortcode.'\">\n\t\t\t\t\t<div class=\"action-bar\"><a href=\"#sr-pagebuilder-popup-'.$section->shortcode.'\" class=\"edit-section\"></a><a href=\"#\" class=\"delete-section\"></a></div>';\n\t\t\t\t$thisContent = false;\t\n\t\t\t\techo '<textarea class=\"shortcode shortcode-start\">['.$section->shortcode.' ';\n\t\t\t\tforeach ($section->options as $o) {\n\t\t\t\t\tif ($o->oName == 'content') { $thisContent = $o->oVal; } else {\n\t\t\t\t\techo ' '.$o->oName.'=\"'.$o->oVal.'\"'; }\n\t\t\t\t}\n\t\t\t\techo ']'.$thisContent.'</textarea>';\t\n\t\t\t\techo '\t<textarea class=\"json json-start\">'.$jsonContent.'</textarea>';\n\t\t\t\techo '<span>Team Member</span>';\n\t\t\tbreak;\n\t\t\t\n\t\t\t// /teammember (end team member)\n\t\t\tcase '/sr-teammember':\n\t\t\t\techo '<textarea class=\"shortcode\">['.$section->shortcode.']</textarea><textarea class=\"json\">{\"shortcode\":\"'.$section->shortcode.'\"}</textarea></div>';\n\t\t\tbreak;\n\t\t\t\n\t\t\t\n\t\t\t// googlemap\n\t\t\tcase 'sr-googlemap':\n\t\t\t\t$jsonContent = json_encode($section)\t;\n\t\t\t\t$thisContent = false;\n\t\t\t\tforeach ($section->options as $o) {\n\t\t\t\t\tif ($o->oName == 'content') { $thisContent = $o->oVal;}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo '<div class=\"visualsection '.$section->shortcode.'\">\n\t\t\t\t\t<div class=\"action-bar\"><a href=\"#sr-pagebuilder-popup-'.$section->shortcode.'\" class=\"edit-section\"></a><a href=\"#\" class=\"delete-section\"></a></div>';\n\t\t\t\t$thisContent = false;\t\n\t\t\t\techo '<textarea class=\"shortcode shortcode-start\">['.$section->shortcode.' ';\n\t\t\t\tforeach ($section->options as $o) {\n\t\t\t\t\tif ($o->oName == 'content') { $thisContent = $o->oVal; } else {\n\t\t\t\t\techo ' '.$o->oName.'=\"'.$o->oVal.'\"'; }\n\t\t\t\t}\n\t\t\t\techo ']'.$thisContent.'</textarea>';\t\n\t\t\t\techo '\t<textarea class=\"json json-start\">'.$jsonContent.'</textarea>';\n\t\t\t\techo '<span>Google Map</span>';\n\t\t\tbreak;\n\t\t\t\n\t\t\t// /googlemap (end googlemap)\n\t\t\tcase '/sr-googlemap':\n\t\t\t\techo '<textarea class=\"shortcode\">['.$section->shortcode.']</textarea><textarea class=\"json\">{\"shortcode\":\"'.$section->shortcode.'\"}</textarea>\n\t\t\t\t<a class=\"sr-add-row sr-open-popup\" href=\"#sr-pagebuilder-popup-row\">Add Row</a>\n\t\t\t\t</div>';\n\t\t\tbreak;\n\t\t\t\n\t\t\t\n\t\t\t// columns\n\t\t\tcase 'col':\n\t\t\t\t\n\t\t\t\t$size = '';\n\t\t\t\t$shortcode = $section->shortcode;\n\t\t\t\tforeach ($section->options as $o) {\n\t\t\t\t\tif ($o->oName == 'size') { $size = $o->oVal;}\n\t\t\t\t\t$shortcode .= ' '.$o->oName.'=\"'.$o->oVal.'\"'; \n\t\t\t\t}\n\t\t\t\t$jsonContent = json_encode($section)\t;\n\t\t\t\t\n\t\t\t\techo '<div class=\"col '.$size.'\">\n\t\t\t\t\t\t\t\t<textarea class=\"shortcode shortcode-start\">['.$shortcode.']</textarea>\n\t\t\t\t\t\t\t\t<textarea class=\"json json-start\">'.$jsonContent.'</textarea>';\n\t\t\t\techo '<div class=\"element-container col-inner\">';\n\t\t\tbreak;\n\t\t\t\n\t\t\t// /columns (end columns)\n\t\t\tcase '/col':\n\t\t\t\techo '<a class=\"sr-add-element sr-open-popup disable-sortable\" href=\"#sr-pagebuilder-popup-element\">Insert Element</a></div>\n\t\t\t\t<textarea class=\"shortcode\">['.$section->shortcode.']</textarea><textarea class=\"json\">{\"shortcode\":\"'.$section->shortcode.'\"}</textarea>\n\t\t\t\t</div>';\n\t\t\tbreak;\n\t\t\t\n\t\t\t// columnsection\n\t\t\tcase 'columnsection':\n\t\t\t\techo '<div class=\"visualsection '.$section->shortcode.' sr-clearfix\">';\n\t\t\t\t\n\t\t\t\t$wrapperVal = '';\n\t\t\t\techo '<textarea class=\"shortcode shortcode-start\">[columnsection ';\n\t\t\t\tforeach ($section->options as $o) {\n\t\t\t\t\techo ' '.$o->oName.'=\"'.$o->oVal.'\"'; \n\t\t\t\t\tif ($o->oName == 'wrapper') { $wrapperVal = $o->oVal; }\n\t\t\t\t}\n\t\t\t\techo ']</textarea>';\n\t\t\t\t\n\t\t\t\t$jsonContent = json_encode($section)\t;\n\t\t\t\techo '<textarea class=\"json json-start\">'.$jsonContent.'</textarea>';\n\t\t\t\t\n\t\t\t\techo '<div class=\"action-bar\"><a href=\"#\" class=\"delete-section\"></a><a href=\"#sr-pagebuilder-popup-'.$section->shortcode.'\" class=\"edit-section\"></a></div>\n\t\t\t\t\t\t<div class=\"columns '.$wrapperVal.' sr-clearfix\">';\n\t\t\tbreak;\n\t\t\t\n\t\t\t// /columnsection\n\t\t\tcase '/columnsection':\n\t\t\t\techo '</div>\n\t\t\t\t\t\t<a class=\"sr-add-row sr-open-popup\" href=\"#sr-pagebuilder-popup-row\">Add Row</a>\n\t\t\t\t\t\t<textarea class=\"shortcode\">['.$section->shortcode.']</textarea><textarea class=\"json\">{\"shortcode\":\"'.$section->shortcode.'\"}</textarea>\n\t\t\t\t\t</div>';\n\t\t\tbreak;\n\t\t\t\n\t\t\t\n\t\t\t// horizontalsection\n\t\t\tcase 'horizontalsection':\n\t\t\t\techo '<div class=\"visualsection '.$section->shortcode.' sr-clearfix\">';\n\t\t\t\t\n\t\t\t\techo '<textarea class=\"shortcode shortcode-start\">[horizontalsection ';\n\t\t\t\tforeach ($section->options as $o) {\n\t\t\t\t\techo ' '.$o->oName.'=\"'.$o->oVal.'\"'; \n\t\t\t\t}\n\t\t\t\techo ']</textarea>';\n\t\t\t\t\n\t\t\t\t$jsonContent = json_encode($section)\t;\n\t\t\t\techo '<textarea class=\"json json-start\">'.$jsonContent.'</textarea>';\n\t\t\t\t\n\t\t\t\techo '<div class=\"action-bar\"><a href=\"#\" class=\"delete-section\"></a><a href=\"#sr-pagebuilder-popup-'.$section->shortcode.'\" class=\"edit-section\"></a></div>\n\t\t\t\t\t\t<div class=\"horizontal-inner sortable-container-inner\">';\n\t\t\tbreak;\n\t\t\t\n\t\t\t// /horizontalsection\n\t\t\tcase '/horizontalsection':\n\t\t\t\techo '\n\t\t\t\t\t\t\t<a class=\"sr-add-first-row sr-open-popup disable-sortable\" href=\"#sr-pagebuilder-popup-row\">Add Row</a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<a class=\"sr-add-row sr-open-popup\" href=\"#sr-pagebuilder-popup-row\">Add Row</a>\n\t\t\t\t\t\t<textarea class=\"shortcode\">['.$section->shortcode.']</textarea><textarea class=\"json\">{\"shortcode\":\"'.$section->shortcode.'\"}</textarea>\n\t\t\t\t\t</div>';\n\t\t\tbreak;\n\t\t\t\n\t\t\t\n\t\t\t// wolf\n\t\t\tcase 'wolf':\n\t\t\t\techo '<div class=\"visualsection '.$section->shortcode.' sr-clearfix\">';\n\t\t\t\t\n\t\t\t\t$wrapperVal = '';\n\t\t\t\techo '<textarea class=\"shortcode shortcode-start\">[wolf ';\n\t\t\t\tforeach ($section->options as $o) {\n\t\t\t\t\techo ' '.$o->oName.'=\"'.$o->oVal.'\"';\n\t\t\t\t\tif ($o->oName == 'wrapper') { $wrapperVal = $o->oVal; } \n\t\t\t\t}\n\t\t\t\techo ']</textarea>';\n\t\t\t\t\n\t\t\t\t$jsonContent = json_encode($section)\t;\n\t\t\t\techo '<textarea class=\"json json-start\">'.$jsonContent.'</textarea>';\n\t\t\t\t\n\t\t\t\techo '<div class=\"action-bar\"><a href=\"#\" class=\"delete-section\"></a><a href=\"#sr-pagebuilder-popup-'.$section->shortcode.'\" class=\"edit-section\"></a></div>\n\t\t\t\t\t\t<div class=\"wolf-inner '.$wrapperVal.' sr-clearfix\">';\n\t\t\tbreak;\n\t\t\t\n\t\t\t// /wolf\n\t\t\tcase '/wolf':\n\t\t\t\techo '\n\t\t\t\t\t\t\t<a class=\"sr-add-wolfitem sr-open-popup disable-sortable\" href=\"#sr-pagebuilder-popup-wolfitem\">Insert Wolf Item</a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<a class=\"sr-add-row sr-open-popup\" href=\"#sr-pagebuilder-popup-row\">Add Row</a>\n\t\t\t\t\t\t<textarea class=\"shortcode\">['.$section->shortcode.']</textarea><textarea class=\"json\">{\"shortcode\":\"'.$section->shortcode.'\"}</textarea>\n\t\t\t\t\t</div>';\n\t\t\tbreak;\n\t\t\t\n\t\t\t\n\t\t\t// wolfitem\n\t\t\tcase 'wolfitem':\n\t\t\t\n\t\t\t\t$thisContent = '';\n\t\t\t\t$size = '';\n\t\t\t\t$shortcode = $section->shortcode;\n\t\t\t\tforeach ($section->options as $o) {\n\t\t\t\t\tif ($o->oName == 'size') { $size = $o->oVal; }\n\t\t\t\t\tif ($o->oName == 'content') { $thisContent = $o->oVal;}\n\t\t\t\t\telse { $shortcode .= ' '.$o->oName.'=\"'.$o->oVal.'\"'; }\n\t\t\t\t}\n\t\t\t\t$jsonContent = json_encode($section)\t;\n\t\t\t\t\n\t\t\t\tif ($size !== \"null\") {\n\t\t\t\t// some users had problems with enpty/null wolf items (maybe a duplicator plugin, see also js)\n\t\t\t\techo '<div class=\"visualsection '.$section->shortcode.' '.$size.' sr-clearfix\">';\n\t\t\t\techo '<textarea class=\"shortcode shortcode-start\">['.$shortcode.']'.$thisContent.'</textarea>';\n\t\t\t\techo '<textarea class=\"json json-start\">'.$jsonContent.'</textarea>';\n\t\t\t\techo '<div class=\"action-bar\"><a href=\"#\" class=\"delete-section\"></a><a href=\"#sr-pagebuilder-popup-'.$section->shortcode.'\" class=\"edit-section\"></a></div>';\n\t\t\t\t} else {\n\t\t\t\techo '<div class=\"empty-wolf\" style=\"display:none;\">';\t\n\t\t\t\t//echo '<textarea class=\"shortcode\">[wolfitem]</textarea>';\n\t\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t\t// /wolfitem\n\t\t\tcase '/wolfitem':\n\t\t\t\techo '\t<span>Wolf item</span>\n\t\t\t\t\t\t<textarea class=\"shortcode\">['.$section->shortcode.']</textarea><textarea class=\"json\">{\"shortcode\":\"'.$section->shortcode.'\"}</textarea>\n\t\t\t\t\t</div>';\n\t\t\tbreak;\n\t\t\t\n\t\t\t\n\t\t\t// text\n\t\t\tcase 'sr-slider':\n\t\t\t\t$jsonContent = json_encode($section)\t;\n\t\t\t\t$thisContent = false;\n\t\t\t\tforeach ($section->options as $o) {\n\t\t\t\t\tif ($o->oName == 'content') { $thisContent = $o->oVal;}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo '<div class=\"visualsection '.$section->shortcode.'\">\n\t\t\t\t\t<div class=\"action-bar\"><a href=\"#sr-pagebuilder-popup-'.$section->shortcode.'\" class=\"edit-section\"></a><a href=\"#\" class=\"delete-section\"></a></div>';\n\t\t\t\techo '<textarea class=\"shortcode shortcode-start\">[sr-slider ';\n\t\t\t\tforeach ($section->options as $o) {\n\t\t\t\t\techo ' '.$o->oName.'=\"'.$o->oVal.'\"'; \n\t\t\t\t}\n\t\t\t\techo ']</textarea>';\n\t\t\t\techo '<textarea class=\"json json-start\">'.$jsonContent.'</textarea>';\n\t\t\t\techo '<span>Slider</span>\n\t\t\t\t</div>';\n\t\t\tbreak;\n\t\t\t\n\t\t\t\n\t\t\t// sr-gallery\n\t\t\tcase 'sr-gallery':\n\t\t\t\t$jsonContent = json_encode($section)\t;\n\t\t\t\t$thisContent = false;\n\t\t\t\tforeach ($section->options as $o) {\n\t\t\t\t\tif ($o->oName == 'content') { $thisContent = $o->oVal;}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo '<div class=\"visualsection '.$section->shortcode.'\">\n\t\t\t\t\t<div class=\"action-bar\"><a href=\"#sr-pagebuilder-popup-'.$section->shortcode.'\" class=\"edit-section\"></a><a href=\"#\" class=\"delete-section\"></a></div>';\n\t\t\t\techo '<textarea class=\"shortcode shortcode-start\">[sr-gallery ';\n\t\t\t\tforeach ($section->options as $o) {\n\t\t\t\t\techo ' '.$o->oName.'=\"'.$o->oVal.'\"'; \n\t\t\t\t}\n\t\t\t\techo ']</textarea>';\n\t\t\t\techo '<textarea class=\"json json-start\">'.$jsonContent.'</textarea>';\n\t\t\t\techo '<span>Gallery</span>\n\t\t\t\t<a class=\"sr-add-row sr-open-popup\" href=\"#sr-pagebuilder-popup-row\">Add Row</a>\n\t\t\t\t</div>';\n\t\t\tbreak;\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t} // END switch\n\t\t} // END foreach section\n\t\t\n\t\techo '<a class=\"sr-add-first-row sr-open-popup disable-sortable\" href=\"#sr-pagebuilder-popup-row\">Add Row</a>';\n\t} else {\n\t\t// If json has error\n\t\t$jsonBackup = str_replace(\"\\\\\\\\\", \"\\\\\", get_post_meta($post->ID, $sr_prefix.'_pagebuilder_json_backup_one', true));\t\n\t\t$jsonBackup = json_decode($jsonBackup);\n\t\tif (get_post_meta($post->ID, $sr_prefix.'_pagebuilder_json_backup_one', true) && get_post_meta($post->ID, $sr_prefix.'_pagebuilder_json_backup_one', true) !== '' && $jsonBackup) {\n\t\t\n\t\techo '<div class=\"pagebuilder-message alert-message\">Unfortunately something went wrong.<br>It\\'s recommended to retsore the pagebuilder in order not to loose your previous savings.</div>';\t\n\t\techo '<input type=\"hidden\" name=\"sr-pagebuilder-restore\" id=\"sr-pagebuilder-restore\" value=\"false\">';\n\t\techo '<a href=\"#\" id=\"restore-pagebuilder\">Restore Now</a>';\n\t\t} else {\n\t\t\techo '<div class=\"pagebuilder-message alert-message\">Unfortunately something went wrong and the different pagebuilder elements have errors and can\\'t be shown here, although it might display fine on your frontend.<br><br>You need to recreate the different elements.</div>';\t\n\t\t\techo '<a class=\"sr-add-first-row sr-open-popup disable-sortable\" href=\"#sr-pagebuilder-popup-row\">Add Row</a>';\n\t\t}\n\t}\n\t\n\t} else { \n\t\t// Pagebuilder is empty\n\t\techo '<a class=\"sr-add-first-row sr-open-popup disable-sortable\" href=\"#sr-pagebuilder-popup-row\">Add Row</a>';\n\t}\n\t\t\n\techo '</div>'; // END #sr-pagebuilder-visual\n\t// \t\t********\n\t\n\t//\t\tPagebuilder VISUAL\n\t\n\t// \t\t********\t\n\n\t\t\t\n\t\t\t\n\t\n\t\n\t// \t\t********\n\t\n\t//\t\tPagebuilder POPUP ($sr_meta_pagebuilder)\n\t\n\t// \t\t********\n\techo '<div id=\"sr-pagebuilder-popup-bg\"></div>';\n\t\n\t\n\t/* Popup Add Row */\n\techo '<div id=\"sr-pagebuilder-popup-row\" class=\"sr-pagebuilder-popup\">';\n\techo '<div class=\"popup-title\">Add Row <a class=\"close-popup\" href=\"#\">close</a></div>';\n\techo '<div class=\"popup-inner\">';\n\tforeach ($pagebuildermeta as $row) {\n\t\tif (strpos($row['type'],'row') !== false) echo '<a href=\"#sr-pagebuilder-popup-'.$row['id'].'\" class=\"popup-add-row sr-open-popup '.$row['id'].'\">'.$row['title'].'</a>';\n\t}\n\techo '</div>';\n\techo '</div>';\n\t/* Popup Add Row */\n\t\n\t\n\t\n\t/* Popup Add Element */\n\techo '<div id=\"sr-pagebuilder-popup-element\" class=\"sr-pagebuilder-popup\">';\n\techo '<div class=\"popup-title\">Insert Element <a class=\"close-popup\" href=\"#\">close</a></div>';\n\techo '<div class=\"popup-inner\">';\n\tforeach ($pagebuildermeta as $row) {\n\t\tif (strpos($row['type'],'element') !== false) echo '<a href=\"#sr-pagebuilder-popup-'.$row['id'].'\" class=\"popup-add-element sr-open-popup\">'.$row['title'].'</a>';\n\t}\n\techo '</div>';\n\techo '</div>';\n\t/* Popup Add Element */\n\t\n\t\n\t\n\t/* Popup Rows & Elements */\n\tforeach ($pagebuildermeta as $meta) {\n\t\t\n\t\techo '<div id=\"sr-pagebuilder-popup-'.$meta['id'].'\" class=\"sr-pagebuilder-popup sr-pagebuilder-popup-option\" data-name=\"'.$meta['id'].'\">';\n\t\techo '<div class=\"popup-title\">'.$meta['title'].' <a class=\"close-popup\" href=\"#\">close</a></div>';\n\t\techo '<div class=\"popup-inner\">';\n\t\t\n\t\t\t// create fields\n\t\t\tforeach ($meta['fields'] as $field) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif ($field['type'] == 'info') {\n\t\t\t\t\techo '<div class=\"builder-info\">'.$field['desc'].'</div>';\n\t\t\t\t} else if ($field['type'] == 'title') {\n\t\t\t\t\techo '<div class=\"builder-title\"><h1><strong>'.$field['desc'].'</strong></h1></div>';\n\t\t\t\t} else if ($field['type'] == 'hidinggroupstart') {\n\t\t\t\t\t$relatedArray = explode(' ',$field['hiding']);\n\t\t\t\t\t$hideClass = '';\n\t\t\t\t\tforeach ($relatedArray as $r) { $hideClass .= $field['id'].'_'.$r.' '; }\n\t\t\t\t\techo '<div class=\"hidinggroup hide'.$field['id'].' '.$hideClass.'\">';\n\t\t\t\t} else if ($field['type'] == 'hidinggroupend') {\n\t\t\t\t\techo '</div>';\n\t\t\t\t} else if ($field['type'] == 'dynamicitemliststart') {\n\t\t\t\t\techo '<div class=\"sr-dynamic-item-list\">';\n\t\t\t\t\techo '\t<div class=\"sr-item\">\n\t\t\t\t\t\t\t<div class=\"item-title\">'.$field['label'].'<a href=\"#\" class=\"delete-item\"></a><a href=\"#\" class=\"edit-item\"></a></div>\n\t\t\t\t\t\t\t<div class=\"item-inner\">';\n\t\t\t\t} else if ($field['type'] == 'dynamicitemlistend') {\n\t\t\t\t\techo '</div>';\n\t\t\t\t\techo '</div>';\n\t\t\t\t\techo '<a href=\"\" class=\"sr-add-item\">Add '.$field['label'].'</a>';\n\t\t\t\t\techo '</div>';\n\t\t\t\t} else {\n\t\t\t\t\n\t\t\t\t$default = '';\n\t\t\t\tif (isset($field['default']) && $field['default'] !== '') { $default = $field['default']; }\n\t\t\t\t\n\t\t\t\t$sendVal = ''; $formDisable = ''; if ($field['sendval']) { $sendVal = ' send-val'; } else { $formDisable = 'disable-on-edit'; }\n\t\t\t\t\n\t\t\t\techo '<div class=\"form-row row-'.$field['type'].' '.$formDisable.'\">';\n\t\t\t\t\n\t\t\t\t$formValClass = '';\n\t\t\t\tif ($field['type'] !== 'editor') {\n\t\t\t\techo '<label for=\"'.$field['id'].'\"><b>'.$field['label'].'</b></label>';\n\t\t\t\t} else { $formValClass = 'editor-val'; }\n\t\t\t\t\n\t\t\t\t\n\t\t\t\techo '<div class=\"form-val '.$formValClass.'\">';\n\t\t\t\tswitch($field['type']) {\n\t\t\t\t\t\n\t\t\t\t\t// text\n \t\t\t\tcase 'text':\n\t\t\t\t\t\techo '<input type=\"text\" name=\"builder-'.$meta['id'].''.$field['id'].'\" id=\"'.$meta['id'].'-'.$field['id'].'\" class=\"builder'.$field['id'].' '.$sendVal.'\" value=\"'.$default.'\" size=\"30\" data-default=\"'.$default.'\" />';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t// textarea\n \t\t\t\tcase 'textarea':\n\t\t\t\t\t\techo '<textarea name=\"builder-'.$meta['id'].''.$field['id'].'\" id=\"'.$meta['id'].'-'.$field['id'].'\" class=\"builder'.$field['id'].' '.$sendVal.'\">'.$default.'</textarea>';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t// editor\n \t\t\t\tcase 'editor':\n\t\t\t\t\t\twp_editor( '', $meta['id'].'-'.$field['id'],array('textarea_rows' => 13,'editor_class' => $sendVal));\n\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//color\n\t\t\t\t\tcase \"color\":\n\t\t\t\t\t\techo '<input type=\"text\" name=\"builder-'.$meta['id'].''.$field['id'].'\" id=\"'.$meta['id'].'-'.$field['id'].'\" class=\"builder'.$field['id'].' sr-color-field '.$sendVal.'\" />';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t// select\n\t\t\t\t\tcase 'select': \n\t\t\t\t\t echo '<div class=\"select\">\n\t\t\t\t\t\t\t\t<select name=\"builder-'.$meta['id'].''.$field['id'].'\" id=\"'.$meta['id'].'-'.$field['id'].'\" class=\"builder'.$field['id'].' '.$sendVal.'\">';\n\t\t\t\t\t\tforeach ($field['option'] as $var) {\n\t\t\t\t\t\t\techo '<option value=\"'.$var['value'].'\"> '.$var['name'].'</option>';\n\t\t\t\t\t\t}\t\t\t \n\t\t\t\t\t\techo '</select></div>'; \n\t\t\t\t\tbreak;\t\n\t\t\t\t\t\n\t\t\t\t\t// select-hiding\n\t\t\t\t\tcase 'select-hiding': \n\t\t\t\t\t echo '<div class=\"select-hiding\">\n\t\t\t\t\t\t\t\t<select name=\"builder-'.$meta['id'].''.$field['id'].'\" id=\"'.$meta['id'].'-'.$field['id'].'\" class=\"builder'.$field['id'].' '.$sendVal.'\">';\n\t\t\t\t\t\tforeach ($field['option'] as $var) {\n\t\t\t\t\t\t\techo '<option value=\"'.$var['value'].'\"> '.$var['name'].'</option>';\n\t\t\t\t\t\t}\t\t\t \n\t\t\t\t\t\techo '</select></div>'; \n\t\t\t\t\tbreak;\t\n\t\t\t\t\t\n\t\t\t\t\t// custom-select\n\t\t\t\t\tcase 'custom-select': \n\t\t\t\t\t echo '<div class=\"custom-select\">\n\t\t\t\t\t\t\t\t<select name=\"builder-'.$meta['id'].''.$field['id'].'\" id=\"'.$meta['id'].'-'.$field['id'].'\" class=\"builder'.$field['id'].' '.$sendVal.'\">';\n\t\t\t\t\t\tforeach ($field['option'] as $var) {\n\t\t\t\t\t\t\techo '<option value=\"'.$var['value'].'\"> '.$var['name'].'</option>';\n\t\t\t\t\t\t}\t\t\t \n\t\t\t\t\t\techo '</select>';\n\t\t\t\t\t\t\n\t\t\t\t\t\techo '<ul class=\"sr-clearfix\">';\n\t\t\t\t\t\tforeach ($field['option'] as $var) {\n\t\t\t\t\t\t\techo '<li data-rel=\"'.$var['value'].'\"><img src=\"'.get_template_directory_uri().'/theme-admin/pagebuilder/img/'.$var['img'].'\" /></li>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo '</ul>';\n\t\t\t\t\t\t\n\t\t\t\t\t\techo '</div>'; \n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t// image \n\t\t\t\t\tcase 'image': \n\t\t\t\t\t\techo '\t<div class=\"single-image\">\n\t\t\t\t\t\t\t\t<input class=\"upload_image builder'.$field['id'].' '.$sendVal.'\" type=\"text\" name=\"builder-'.$meta['id'].''.$field['id'].'\" id=\"'.$meta['id'].'-'.$field['id'].'\" value=\"\" size=\"30\" />\n\t\t\t\t\t\t\t\t<input class=\"add_singleimage sr-button\" type=\"button\" value=\"Add Image\" /><br />\n\t\t\t\t\t\t\t\t<span class=\"preview_image\"><img class=\"'.$field['id'].'\" src=\"\" alt=\"\" /></span>\n\t\t\t\t\t\t</div>';\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// gallery \n\t\t\t\t\tcase 'gallery': \n\t\t\t\t\t\techo '<div id=\"sortable'.$field['id'].'\" class=\"sortable-medias\">';\n\t\t\t\t\t\techo '\t<input class=\"add_image button\" type=\"button\" value=\"'.__(\"Add Images\", 'sr_avoc_theme').'\" />\n\t\t\t\t\t\t\t\t<textarea name=\"builder-'.$meta['id'].''.$field['id'].'\" id=\"'.$meta['id'].'-'.$field['id'].'\" class=\"media-gallery builder'.$field['id'].' '.$sendVal.'\" style=\"display:none;\"></textarea>';\n\t\t\t\t\t\techo '<ul id=\"sortable\" class=\"media-elements\">';\t\t\n\t\t\t\t\t echo '</ul>';\n\t\t\t\t\t\techo '</div>';\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t} // END switch\n\t\t\t\techo '<br><span class=\"sr_description\">'.$field['desc'].'</span>';\n\t\t\t\techo '</div>'; // End .form-val\n\t\t\t\t\n\t\t\t\techo '<div style=\"clear:both;\"></div></div>'; // END form-row\n\t\t\t\t\n\t\t\t\t} // END else hidinggroup\n\t\t\t\t\n\t\t\t} // END foreach create fields\n\t\t\t\n\t\t\techo '\n\t\t\t\t<div class=\"pagebuilder-insert\">\n\t\t\t\t\t<a href=\"'.$meta['id'].'\" id=\"insertbuilder_'.$meta['id'].'\" class=\"sr-builder-insert\">'.__(\"Add Element\", 'sr_avoc_theme').'</a>\n\t\t\t\t\t<a href=\"'.$meta['id'].'\" id=\"editbuilder_'.$meta['id'].'\" class=\"sr-builder-edit\">'.__(\"Edit Element\", 'sr_avoc_theme').'</a>\n\t\t\t\t</div>'; // END op-content\n\t\t\t\n\t\techo '</div>';\n\t\techo '</div>';\n\t\n\t} // END foreach ($pagebuildermeta as $meta) {\n\t\n\t// \t\t********\n\t\n\t//\t\tPagebuilder POPUP ($sr_meta_pagebuilder)\n\t\n\t// \t\t********\t\n\t\n\t\t\n\t\t\t\n\t\n\techo '</div>'; // END #sr-pagebuilder\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n}", "function makeForm() {\n if($this->table_title != '' ) {\n $db_obj = new db_class();\n $desc_table = $db_obj->tableDescription($this->table_title);\n $db_obj->closeDB();\n \n// showArray($desc_table);\n echo '<form id=\"generic_edit_form\" method=\"POST\" >';\n echo '<input type=\"hidden\" name=\"title_input\" value=\"name\"> '; // THIS MUST BE HERE FOR CLONABLE FORMS!!!\n echo '<input type=\"hidden\" name=\"table\" value=\"vendors\">'; // THE TABLE MUST BE LABELED\n echo '<b>This is a generic input</b> <input type=\"text\" name=\"generic\">' . \"\\n\";\n \n echo '<br><br><input type=\"submit\" >';\n echo '</form>';\n } else {\n echo '<h2>hello, form<h2>';\n }\n }", "public function outputSetupForm() {\n\t\t$this->_directFormHtml( 'webinarjamstudio' );\n\t}", "public function buildForm()\n {\n $this\n ->add(\n 'new_organization_group',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\OrganizationGroupInformation',\n 'label' => false,\n ]\n ]\n )\n ->add(\n 'group_admin_information',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\GroupAdmin',\n 'label' => false,\n ]\n ]\n )\n ->addSaveButton();\n }", "public function renderForm()\n {\n $lang = $this->context->language;\n\n $inputs[] = [\n 'type' => 'switch',\n 'label' => $this->l(\"Active\"),\n 'name' => 'active',\n 'values' => [\n [\n 'id' => 'active_on',\n 'value' => 1,\n ],\n [\n 'id' => 'active_off',\n 'value' => 0,\n ],\n ]\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Page Name'),\n 'name' => 'name',\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Meta Title'),\n 'name' => 'meta_title_lang',\n 'required' => true,\n 'id' => 'name',\n 'lang' => true,\n 'class' => 'copyMeta2friendlyURL',\n 'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Meta Description'),\n 'name' => 'meta_description_lang',\n 'lang' => true,\n 'hint' => $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ];\n $inputs[] = [\n 'type' => 'tags',\n 'label' => $this->l('Meta Keywords'),\n 'name' => 'meta_keywords_lang',\n 'lang' => true,\n 'hint' => [\n $this->l('To add \"tags\" click in the field, write something, and then press \"Enter.\"'),\n $this->l('Invalid characters:').' &lt;&gt;;=#{}',\n ],\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Friendly URL'),\n 'name' => 'url',\n 'required' => true,\n 'hint' => $this->l('Only letters and the hyphen (-) character are allowed.'),\n ];\n $inputs[] = [\n 'type' => 'text',\n 'label' => $this->l('Breadcrumb URL Parameters'),\n 'name' => 'breadcrumb_parameters',\n 'required' => false,\n 'hint' => $this->l('Parameters to be applied when rendering as a breadcrumb'),\n ];\n\n $inputs[] = [\n 'type' => 'code',\n 'mode' => 'css',\n 'label' => $this->l('Style'),\n 'name' => 'style',\n 'lang' => false,\n //'autoload_rte' => true,\n 'id' => 'style',\n 'enableBasicAutocompletion' => true,\n 'enableSnippets' => true,\n 'enableLiveAutocompletion' => true,\n 'maxLines' => 50,\n ];\n $inputs[] = [\n 'type' => 'code',\n 'mode' => 'html',\n 'label' => $this->l('Content'),\n 'name' => 'content_lang',\n 'lang' => true,\n //'autoload_rte' => true,\n 'id' => 'content',\n 'enableBasicAutocompletion' => true,\n 'enableSnippets' => true,\n 'enableLiveAutocompletion' => true,\n 'maxLines' => 70,\n ];\n\n\n $allPages = $this->module->getAllHTMLPages(true);\n array_unshift($allPages, '-');\n\n\n if ($this->display == 'edit') {\n $inputs[] = [\n 'type' => 'hidden',\n 'name' => 'id_page'\n ];\n $title = $this->l('Edit Page');\n $action = 'submitEditCustomHTMLPage';\n\n $pageId = Tools::getValue('id_page');\n\n $this->fields_value = $this->module->getHTMLPage($pageId);\n\n // Remove the current page from the list of pages\n foreach ($allPages as $i => $p) {\n if ($p != '-' && $p['id_page'] == $pageId) {\n unset($allPages[$i]);\n break;\n }\n }\n }\n else {\n\n }\n\n // Parent select\n $inputs[] = [\n 'type' => 'select',\n 'label' => $this->l('Parent'),\n 'name' => 'id_parent',\n 'options' => [\n 'query' => $allPages,\n 'id' => 'id_page',\n 'name' => 'name'\n ]\n ];\n //$this->fields_value['id_relatedTo'] = [];\n\n array_shift($allPages);\n\n // List of Pages this Page is related to\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Show On ($page->related[])'),\n 'multiple' => true,\n 'name' => 'id_relatedTo',\n 'options' => [\n 'query' => $allPages,\n 'id' => 'id_page',\n 'name' => 'name'\n ],\n 'hint' => $this->l('Makes this page show up on other pages (not as a child page but as a related page): $page->related[]')\n ];\n\n $inputs[] = [\n 'type' => 'html',\n 'html_content' => '<hr/>',\n 'name' => 'id_page',\n ];\n\n // List of Products\n $products = Product::getProducts($lang->id, 0, 1000, 'id_product', 'ASC');\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Products ($product or $products)'),\n 'name' => 'id_products',\n 'multiple' => true,\n 'options' => [\n 'query' => $products,\n 'id' => 'id_product',\n 'name' => 'name'\n ],\n 'hint' => $this->l('This will populate $products. If only one is selected then $product will be populated'),\n ];\n\n // List of Categories\n $categories = Category::getCategories($lang->id, true, false);\n $inputs[] = [\n 'type' => 'swap',\n 'label' => $this->l('Categories ($category or $categories)'),\n 'name' => 'id_categories',\n 'multiple' => true,\n 'options' => [\n 'query' => $categories,\n 'id' => 'id_category',\n 'name' => 'name'\n ],\n 'hint' => $this->l('This will populate $categories. If only one is selected then $category will be populated'),\n ];\n\n $this->fields_form = [\n 'legend' => [\n 'title' => $title,\n 'icon' => 'icon-cogs',\n ],\n 'input' => $inputs,\n 'buttons' => [\n 'save-and-stay' => [\n 'title' => $this->l('Save and Stay'),\n 'class' => 'btn btn-default pull-right',\n 'name' => $action.'AndStay',\n 'icon' => 'process-icon-save',\n 'type' => 'submit'\n ]\n\n ],\n 'submit' => [\n 'title' => $this->l('Save'),\n 'class' => 'btn btn-default pull-right',\n 'name' => $action,\n ],\n\n ];\n\n\n return parent::renderForm();\n }", "function makeForm() {\n?>\n <div id=\"form_wrap\">\n <a class=\"faux_button\" id=\"done_goback_button\" href=\"#\">Go Back</a>\n<?php if(! $this->is_find_form AND ! $this->is_new): ?>\n <button class=\"faux_button\" id=\"clone_this\" <?php if( $this->is_new == 1 ){ echo 'disabled';} ?> >Clone</button>\n <a class=\"faux_button\" href=\"/cancer_types/views_controllers/form_cancer_type.php?new=yes\">New Cancer Type</a>\n <span class=\"right\"><a class=\"faux_button\" id=\"delete\" href=\"#\">Delete</a></span>\n<?php elseif($this->is_find_form) : ?>\n <span style=\"float:right\">\n <button class=\"search_button\" id=\"search_button\" name=\"search_button\" >Search</button>\n <b>Match:</b> <select class=\"semi_faux\" id=\"conjunction\"><option value=\"OR\">Any</option><option value=\"AND\">All</option></select> Fields\n </span>\n <div style=\"clear:both\"></div>\n <p id=\"search_inform\"></p>\n<?php endif ?>\n\n <div class=\"clear\"></div>\n <br> \n <br>\n\n <?php \n // We don't want to go through the whole generic_update during a search \n if(! $this->is_find_form ):\n ?>\n <form method=\"post\" id=\"generic_edit_form\" class=\"generic_update\">\n <?php else: ?>\n <form method=\"post\" id=\"generic_find_form\" >\n <?php endif ?>\n \n<?php if(! $this->is_find_form ): ?>\n <input type=\"hidden\" name=\"id\" value=\"<?php echo $this->id ?>\">\n <span class=\"tag\">ID:</span> <b><?php echo $this->id ?></b><br><br>\n<?php endif ?>\n <input type=\"hidden\" name=\"is_new\" value=\"<?php echo $this->is_new ?>\">\n <input type=\"hidden\" name=\"table\" value=\"cancer_type\">\n <input type=\"hidden\" name=\"table_display\" value=\"<?php echo $this->table_display ?>\">\n <input type=\"hidden\" name=\"title_input\" value=\"cancer_type\"> \n \n \n <span class=\"tag\">Cancer Type:</span> <input class=\"info\" type=\"text\" name=\"cancer_type\" size=\"95\" value=\"<?php echo $this->cancer_type ?>\"> <br>\n <span class=\"tag\">Synopsis</span> <input class=\"info\" type=\"text\" name=\"synopsis\" size=\"95\" value=\"<?php echo $this->synopsis ?>\"> \n \n <span class=\"tag_long\">Primary Anatomical Site</span> <?php $this->buildGenericSelect('primary_anatomical_site', 'primary_anatomical_site', 'table_index', 'descriptor') ?>\n<!-- \n <span class=\"leftForm\"></span><br>\n <span class=\"rightForm\"></span>\n -->\n <br> <br>\n <span class=\"tag\">Overview:</span><textarea class=\"form_text\" name=\"overview\"><?php echo $this->overview; ?></textarea>\n<br><br>\n <button class=\"faux_button\" id=\"undo_generic_update\" >Undo</button>\n </form>\n\n </div>\n<?php\n$this->deleteInfo();\n }", "function main_form($type='edit')\n\t{\n\t\t$this->ipsclass->input['id'] = intval($this->ipsclass->input['id']);\n\t\t\n\t\tif ($type == 'edit')\n\t\t{\n\t\t\tif ( ! $this->ipsclass->input['id'] )\n\t\t\t{\n\t\t\t\t$this->ipsclass->admin->error(\"No custom field id was passed to edit.\");\n\t\t\t}\n\t\t\t\n\t\t\t$form_code = 'doedit';\n\t\t\t$button = 'Complete Edit';\n\t\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$form_code = 'doadd';\n\t\t\t$button = 'Add Field';\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Get field from db\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $this->ipsclass->input['id'] )\n\t\t{\n\t\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'downloads_cfields', 'where' => \"cf_id=\".intval($this->ipsclass->input['id']) ) );\n\t\t\t$this->ipsclass->DB->simple_exec();\n\t\t\n\t\t\t$fields = $this->ipsclass->DB->fetch_row();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$fields = array();\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Top 'o 'the mornin'\n\t\t//-----------------------------------------\n\t\t\n\t\tif ($type == 'edit')\n\t\t{\n\t\t\t$this->ipsclass->admin->page_title = \"Editing Custom Field \".$fields['cf_title'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->ipsclass->admin->page_title = 'Adding a new custom field';\n\t\t\t$fields['cf_title'] = '';\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Wise words\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->admin->page_detail = \"Please double check the information before submitting the form.\";\n\t\t\n\t\t//-----------------------------------------\n\t\t// Start form\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_form( array( 1 => array( 'code' , $form_code ),\n\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t 2 => array( 'act' , 'downloads' ),\n\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t 3 => array( 'id' , $this->ipsclass->input['id'] ),\n\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t 4 => array( 'section', $this->ipsclass->section_code ),\n\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t 5 => array( 'req'\t , 'customfields'\t),\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Format...\n\t\t//-----------------------------------------\n\t\t\t\t\t\t\t\t\t \n\t\t$fields['cf_content'] = $this->func->method_format_content_for_edit($fields['cf_content'] );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Tbl (no ae?)\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->adskin->td_header[] = array( \"&nbsp;\" , \"40%\" );\n\t\t$this->ipsclass->adskin->td_header[] = array( \"&nbsp;\" , \"60%\" );\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->start_table( \"Field Settings\" );\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Field Title</b><div class='graytext'>Max characters: 200</div>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_input(\"cf_title\", $fields['cf_title'] )\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\t\t\t\t\t\t\t \n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Description</b><div class='graytext'>Max Characters: 250</div>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_input(\"cf_desc\", $fields['cf_desc'] )\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\t\t\t\t\t\t\t \n\t\t//-----------------------------------------\n\t\t// Apply to categories\n\t\t//-----------------------------------------\n\t\t\n\t\t$sel_menu = \"<select name='cats_apply[]' size='5' multiple='multiple'>\\n\";\n\t\t\n\t\t$cur \t = $this->lib->get_cats_cfield( $fields['cf_id'] );\n\t\t$opts\t = $this->lib->cat_jump_list( 1, 'none', $cur );\n\n\t\tif( is_array($opts) AND count($opts) )\n\t\t{\n\t\t\tforeach( $opts as $cdata )\n\t\t\t{\n\t\t\t\tif( is_array($cur) AND in_array( $cdata[0], $cur ) )\n\t\t\t\t{\n\t\t\t\t\t$cdata[2] = \" selected='selected'\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$sel_menu .= \"<option value='{$cdata[0]}'{$cdata[2]}>{$cdata[1]}</option>\\n\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t$sel_menu .= \"</select>\";\n\t\t\t\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Use in Categories</b><div class='graytext'>Select the categories to use this field in</div>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $sel_menu\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Field Type</b>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t $this->ipsclass->adskin->form_dropdown(\"cf_type\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 0 => array( 'text' , 'Text Input' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 1 => array( 'drop' , 'Drop Down Box' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 2 => array( 'area' , 'Text Area' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $fields['cf_type'] )\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t) );\n\t\t\t\t\t\t\t\t\t \n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Maximum Input</b><div class='graytext'>For text input and text areas (in characters)</div>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_input(\"cf_max_input\", $fields['cf_max_input'] )\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\t\t\t\t\t\t\t \n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Expected Input Format</b><div class='graytext'>Use: <b>a</b> for alpha characters<br />Use: <b>n</b> for numerics.<br />Example, for credit card numbers: nnnn-nnnn-nnnn-nnnn<br />Example, Date of Birth: nn-nn-nnnn<br />Leave blank to accept any input</div>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_input(\"cf_input_format\", $fields['cf_input_format'] )\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\t\t\t\t\t\t\t \n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Option Content (for drop downs)</b><div class='graytext'>In sets, one set per line<br>Example for 'Software Version' field:<br>10=1.0<br>20=2.0<br>na=Not Applicable<br>Will produce:<br><select name='version'><option value='10'>1.0</option><option value='20'>2.0</option><option value='na'>Not Applicable</option></select><br>10,20, or na stored in database. When showing field on download page, will use value from pair (20=2.0, shows '2.0')</div>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_textarea(\"cf_content\", $fields['cf_content'] )\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Field MUST be completed and not left empty?</b><div class='graytext'>If 'yes', an error will be shown if this field is not completed.</div>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_yes_no(\"cf_not_null\", $fields['cf_not_null'] )\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\t\t\t\t\t\t\t \n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Include field in auto-generated topics?</b><div class='graytext'>Only applies to categories that automatically generate topics for file submissions</div>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_yes_no(\"cf_topic\", $fields['cf_topic'] )\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\t\t\t\t\t\t\t \n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->add_td_row( array( \"<b>Allow users to search in these fields?</b>\" ,\n\t\t\t\t\t\t\t\t\t\t\t\t $this->ipsclass->adskin->form_yes_no(\"cf_search\", $fields['cf_search'] )\n\t\t\t\t\t\t\t\t\t ) );\n\t\t\t\t\t\t\t\t\t \n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_form($button);\n\t\t\t\t\t\t\t\t\t\t \n\t\t$this->ipsclass->html .= $this->ipsclass->adskin->end_table();\n\t\t\n\t\t$this->ipsclass->admin->output();\n\t\t\t\n\t}", "function toString()\n\t{\n\t\t// Start main form attributes\n\t\t$formAttributes = array();\n\t\t$formAttributes['method'] = 'POST';\t\n\t\t\n\t\t// Use custom action attribute?\n\t\tif ($this->actionURL) {\n\t\t\t$formAttributes['action'] = $this->actionURL;\n\t\t} else {\n\t\t\t// Current page\n\t\t\t$formAttributes['action'] = str_replace( '%7E', '~', $_SERVER['REQUEST_URI']);\n\t\t}\n\t\t\n\t\t// Add the form name if specified\n\t\t$namestring = \"\";\n\t\tif ($this->formName) {\n\t\t\t$formAttributes['name'] = $this->formName;\t\n\t\t\t$formAttributes['id'] = $this->formName;\n\t\t}\n\t\t\n\t\t// Need extra attribute if there's a upload field\n\t\tif ($this->haveFileUploadField()) {\n\t\t\t$formAttributes['enctype'] = 'multipart/form-data';\n\t\t}\n\t\t\n\t\t// Render form with all attributes\n\t\t$attributeString = false;\n\t\tforeach($formAttributes as $name => $value) {\n\t\t\t$attributeString .= sprintf('%s=\"%s\" ', $name, $value);\n\t\t}\n\t\t\n\t\t// Start form\n\t\t$resultString = \"\\n<form $attributeString>\\n\";\n\t\t\n\t\t// Is first item a break? If so, render it.\n\t\tif (isset($this->breakList[FORM_BUILDER_START_OF_FORM])) {\n\t\t\t$resultString .= $this->createTableHeader(array('id' => $this->breakList[FORM_BUILDER_START_OF_FORM]['sectionid']), $this->breakList[FORM_BUILDER_START_OF_FORM]['prefixHTML']);\n\t\t} else {\n\t\t\t$resultString .= $this->createTableHeader();\n\t\t}\t\t\n\t\t\n\t\t// Now add all form elements\n\t\tforeach ($this->elementList as $element)\n\t\t{\n\t\t\t// Hidden elements are added later\n\t\t\tif ($element->type == 'hidden') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// Render form element\t\t\t\t\n\t\t\t$resultString .= $element->toString($this->showRequiredLabels);\n\n\t\t\t// Add section breaks if this element is in the break list.\n\t\t\t// Add break after element HTML\n\t\t\tif (in_array($element->name, array_keys($this->breakList)))\n\t\t\t{\n\t\t\t\t$resultString .= $this->createTableFooter();\n\t\t\t\t$resultString .= $this->createTableHeader(array('id' => $this->breakList[$element->name]['sectionid']), $this->breakList[$element->name]['prefixHTML']);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t$resultString .= $this->createTableFooter();\n\t\t\n\t\t// Button area\n\t\t$resultString .= '<p class=\"submit\">'.\"\\n\";\n\t\t\n\t\t// Add submit button\n\t\t$resultString .= \"\\t\".'<input class=\"button-primary\" type=\"submit\" name=\"Submit\" value=\"'.$this->submitlabel.'\" />'.\"\\n\";\n\t\t\n\t\t// Add remaining buttons\n\t\tforeach ($this->buttonList as $buttonName => $buttonLabel) {\n\t\t\t$resultString .= \"\\t<input type=\\\"submit\\\" class=\\\"button-secondary\\\" name=\\\"$buttonName\\\" value=\\\"$buttonLabel\\\" />\\n\";\t\t\n\t\t}\n\t\t\t\t\n\t\t// Hidden field to indicate update is happening\n\t\t$resultString .= sprintf(\"\\t\".'<input type=\"hidden\" name=\"update\" value=\"%s\" />'.\"\\n\", $this->formName);\n\t\t\t\t\n\t\t// Add any extra hidden elements\n\t\tforeach ($this->elementList as $element)\n\t\t{\n\t\t\t// Leave all hidden elements until the end.\n\t\t\tif ($element->type == 'hidden') {\t\n\t\t\t\t$resultString .= \"\\t\".'<input type=\"hidden\" name=\"'.$element->name.'\" value=\"'.$element->value.'\" />'.\"\\n\";\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\t$resultString .= '</p>'.\"\\n\";\n\t\t\t\t\t\t\t\n\t\t// End form\n\t\t$resultString .= \"\\n</form>\\n\";\n\t\t\n\t\treturn $resultString;\n\t}", "public function buildForm()\n {\n $this->add('organization_identifier_code', 'text', ['label' => trans('elementForm.organisation_identifier_code')])\n ->add('provider_activity_id', 'text', ['label' => trans('elementForm.provider_activity_id')])\n ->addSelect('type', $this->getCodeList('OrganisationType', 'Activity'), trans('elementForm.type'), $this->addHelpText('Activity_ParticipatingOrg-type'))\n ->addNarrative('provider_org_narrative')\n ->addAddMoreButton('add_provider_org_narrative', 'provider_org_narrative');\n }", "private function _saveForm()\r\n\t{\r\n\t\tglobal $action, $whmcs;\r\n\t\t\r\n\t\t$db\t\t= dunloader( 'database', true );\r\n\t\t$input\t= $whmcs->input;\r\n\t\t\r\n\t\tswitch ( $action ) {\r\n\t\t\t// Save the theme settings\r\n\t\t\tcase 'themes' :\r\n\t\t\t\t\r\n\t\t\t\t// Check license and task\r\n\t\t\t\tif (! dunloader( 'license', 'themer' )->isValid() ) return;\r\n\t\t\t\tif (! array_key_exists( 'task', $input ) ) return;\r\n\t\t\t\t\r\n\t\t\t\tif ( array_key_exists( 'tid', $input ) ) $tid = $input['tid'];\r\n\t\t\t\t\r\n\t\t\t\tswitch( $input['task'] ) {\r\n\t\t\t\t\tcase 'addnew' :\r\n\t\t\t\t\t\t$db->setQuery( \"SELECT `params` FROM `mod_themer_themes` WHERE `id` = '1'\" );\r\n\t\t\t\t\t\t$params\t= $db->loadResult();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$db->setQuery( \"INSERT INTO `mod_themer_themes` (`name`, `params` ) VALUES ('\" . $input['name'] . \"', '\" . $params . \"' ); \");\r\n\t\t\t\t\t\t$db->query();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'delete' :\r\n\t\t\t\t\t\t$db->setQuery( \"DELETE FROM `mod_themer_themes` WHERE `id` = '\" . $tid . \"'\" );\r\n\t\t\t\t\t\t$db->query();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'makedefault' :\r\n\t\t\t\t\t\t$db->setQuery( \"UPDATE `mod_themer_settings` SET `value` = '\" . $tid . \"' WHERE `key` = 'usetheme'\" );\r\n\t\t\t\t\t\t$db->query();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'copytheme' :\r\n\t\t\t\t\t\t$db->setQuery( \"SELECT * FROM `mod_themer_themes` WHERE `id` = '\" . $tid . \"'\" );\r\n\t\t\t\t\t\t$theme\t= $db->loadObject();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$db->setQuery( \"INSERT INTO `mod_themer_themes` (`name`, `description`, `params` ) VALUES ('\" . $theme->name . \" (copy)', '\" . $theme->description . \"', '\" . $theme->params . \"' ); \");\r\n\t\t\t\t\t\t$db->query();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tcase 'edittheme' :\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$params\t= array('fullwidth' => null,'contentbg' => null, 'font' => null,'logo' => null,'bodytype' => null,'bodyoptnsolid'\t=> null,'bodyoptnfrom' => null,'bodyoptnto' => null,'bodyoptndir' => null,'bodyoptnpattern' => null,'bodyoptnimage' => null,'alinks'\t=> null,'alinksstd' => null,'alinksvis' => null,'alinkshov' => null,'navbarfrom' => null,'navbarto' => null,'navbartxt' => null,'navbarhov' => null,'navbardropbg' => null,'navbardroptxt' => null,'navbardrophl' => null,'txtelemgffont' => null,'txtelemgfsize' => null,'txtelemgfcolor' => null,'txtelemh1font' => null,'txtelemh1size' => null,'txtelemh1color' => null,'txtelemh2font' => null,'txtelemh2size' => null,'txtelemh2color' => null,'txtelemh3font' => null,'txtelemh3size' => null,'txtelemh3color' => null,'txtelemh4font' => null,'txtelemh4size' => null,'txtelemh4color' => null,'txtelemh5font' => null,'txtelemh5size' => null,'txtelemh5color' => null,'txtelemh6font' => null,'txtelemh6size' => null,'txtelemh6color' => null,);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tforeach( $input as $key => $value ) {\r\n\t\t\t\t\t\t\tif (! array_key_exists( $key, $params ) ) continue;\r\n\t\t\t\t\t\t\t$params[$key] = $value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$paramstring\t= json_encode( $params );\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$db->setQuery( \"UPDATE `mod_themer_themes` SET `name` = '\" . $input['name'] . \"', `description` = '\" . $input['description'] . \"', `params` = '{$paramstring}' WHERE `id` = '{$tid}'\" );\r\n\t\t\t\t\t\t$db->query();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// Check for save and close\r\n\t\t\t\t\t\tif ( array_key_exists( 'saveandclose', $input ) ) {\r\n\t\t\t\t\t\t\t$whmcs->input['task'] = null;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t}\t// End Task Switch;\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t// Save our configuration settings\r\n\t\t\tcase 'config' :\r\n\t\t\t\t\r\n\t\t\t\t// Check license\r\n\t\t\t\tif (! dunloader( 'license', 'themer' )->isValid() ) return;\r\n\t\t\t\t\r\n\t\t\t\tif (! array_key_exists( 'restrictuser', $input ) ) $input['restrictuser'] = array();\r\n\t\t\t\t\r\n\t\t\t\t$config\t= array( 'enable', 'restrictip', 'restrictuser', 'fontselect' );\r\n\t\t\t\t\r\n\t\t\t\tforeach ( $config as $item ) {\r\n\t\t\t\t\t$key = $item; $value = $input[$item];\r\n\t\t\t\t\tif ( is_array( $value ) ) $value = implode( '|', $value );\r\n\t\t\t\t\t$db->setQuery( \"UPDATE `mod_themer_settings` SET `value` = \" . $db->Quote( $value ) . \" WHERE `key` = '{$key}'\" );\r\n\t\t\t\t\t$db->query();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'license' :\r\n\t\t\t\t$save = array( 'license' => $input['license'], 'localkey' => null );\r\n\t\t\t\t\r\n\t\t\t\tforeach ( $save as $key => $value ) {\r\n\t\t\t\t\t$db->setQuery( \"UPDATE `mod_themer_settings` SET `value` = '{$value}' WHERE `key` = '{$key}'\" );\r\n\t\t\t\t\t$db->query();\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "public function generate()\n {\n switch ($this->sColumn) {\n case 'description':\n $this->oForm->addElement(\n new Textarea(\n t('Description:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('str'),\n 'onblur' => 'CValid(this.value,this.id,20,4000)',\n 'value' => $this->sVal,\n 'validation' => new Str(20, 4000),\n 'required' => 1\n ]\n )\n );\n $this->addCheckErrSpan('str');\n break;\n\n case 'punchline':\n $this->oForm->addElement(\n new Textbox(\n t('Punchline/Headline:'),\n 'punchline',\n [\n 'id' => $this->getFieldId('str'),\n 'onblur' => 'CValid(this.value,this.id,5,150)',\n 'value' => $this->sVal,\n 'validation' => new Str(5, 150)\n ]\n )\n );\n $this->addCheckErrSpan('str');\n break;\n\n case 'country':\n $this->oForm->addElement(\n new Country(\n t('Country:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('str'),\n 'value' => $this->sVal,\n 'required' => 1\n ]\n )\n );\n break;\n\n case 'city':\n $this->oForm->addElement(\n new Textbox(\n t('City:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('str'),\n 'onblur' => 'CValid(this.value,this.id,2,150)',\n 'value' => $this->sVal,\n 'validation' => new Str(2, 150),\n 'required' => 1\n ]\n )\n );\n $this->addCheckErrSpan('str');\n break;\n\n case 'state':\n $this->oForm->addElement(\n new Textbox(\n t('State/Province:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('str'),\n 'onblur' => 'CValid(this.value,this.id,2,150)',\n 'value' => $this->sVal,\n 'validation' => new Str(2, 150)\n ]\n )\n );\n $this->addCheckErrSpan('str');\n break;\n\n case 'zipCode':\n $this->oForm->addElement(\n new Textbox(\n t('Postal Code:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('str'),\n 'onblur' => 'CValid(this.value,this.id,2,15)',\n 'value' => $this->sVal,\n 'validation' => new Str(2, 15)\n ]\n )\n );\n $this->addCheckErrSpan('str');\n break;\n\n case 'middleName':\n $this->oForm->addElement(\n new Textbox(\n t('Middle Name:'),\n $this->sColumn,\n [\n 'id' => $this->getFieldId('name'),\n 'onblur' => 'CValid(this.value,this.id)',\n 'value' => $this->sVal,\n 'validation' => new Name\n ]\n )\n );\n $this->addCheckErrSpan('name');\n break;\n\n case 'height':\n $this->oForm->addElement(\n new Height(\n t('Height:'),\n $this->sColumn,\n [\n 'value' => $this->sVal\n ]\n )\n );\n break;\n\n case 'weight':\n $this->oForm->addElement(\n new Weight(\n t('Weight:'),\n $this->sColumn,\n [\n 'value' => $this->sVal\n ]\n )\n );\n break;\n\n case 'website':\n case 'socialNetworkSite':\n $sLabel = $this->sColumn === 'socialNetworkSite' ? t('Social Media Profile:') : t('Website:');\n $sDesc = $this->sColumn === 'socialNetworkSite' ? t('The URL of your social profile, such as Facebook, Instagram, Snapchat, LinkedIn, ...') : t('Your Personal Website/Blog (any promotional/affiliated contents will be removed)');\n $this->oForm->addElement(\n new Url(\n $sLabel,\n $this->sColumn, [\n 'id' => $this->getFieldId('url'),\n 'onblur' => 'CValid(this.value,this.id)',\n 'description' => $sDesc,\n 'value' => $this->sVal\n ]\n )\n );\n $this->addCheckErrSpan('url');\n break;\n\n case 'phone':\n $this->oForm->addElement(\n new Phone(\n t('Phone Number:'),\n $this->sColumn,\n array_merge(\n [\n 'id' => $this->getFieldId('phone'),\n 'onblur' => 'CValid(this.value, this.id)',\n 'value' => $this->sVal,\n ],\n self::setCustomValidity(\n t('Enter full number with area code.')\n ),\n )\n )\n );\n $this->addCheckErrSpan('phone');\n break;\n\n default:\n $sLangKey = strtolower($this->sColumn);\n $sClass = '\\PFBC\\Element\\\\' . $this->getFieldType();\n $this->oForm->addElement(new $sClass(t($sLangKey), $this->sColumn, ['value' => $this->sVal]));\n }\n\n return $this->oForm;\n }", "private function generateFormCodeAction()\n {\n $codesAction = $this->getAllCodesAction();\n $inputs = array();\n foreach ($codesAction as $code => $value) {\n $inputs[] = array(\n 'type' => 'select',\n 'label' => $value['description'] . ' (' . $value['name'] . ')',\n 'name' => 'ca_' . $value['id_code_action'],\n 'options' => array(\n 'query' => $codesAction,\n 'id' => 'id_code_action',\n 'name' => 'name'\n ),\n );\n }\n $fields_form = array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Groupement des codes action.'),\n 'icon' => 'icon-cogs'\n ),\n 'input' => $inputs,\n 'submit' => array(\n 'title' => $this->l('Save'),\n 'class' => 'btn btn-default pull-right',\n 'name' => 'submitUpdateCodeAction'\n )\n )\n );\n\n $lang = new Language((int)Configuration::get('PS_LANG_DEFAULT'));\n $helper = new HelperForm();\n $helper->default_form_language = $lang->id;\n $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false) . '&configure=' . $this->name\n . '&tab_module=' . $this->tab . '&module_name=' . $this->name;\n $helper->token = Tools::getAdminTokenLite('AdminModules');\n $helper->tpl_vars = array(\n 'fields_value' => $this->getConfigCodeAction(),\n 'languages' => $this->context->controller->getLanguages(),\n 'id_language' => $this->context->language->id\n );\n return $helper->generateForm(array($fields_form));\n\n }", "private function getFormItBuilderOutput(){\n\t\t$s_submitVar = 'submitVar_'.$this->_id;\n\t\t$b_customSubmitVar=false;\n\t\tif(empty($this->_submitVar)===false){\n\t\t\t$s_submitVar = $this->_submitVar;\n\t\t\t$b_customSubmitVar=true;\n\t\t}\n\t\t$s_recaptchaJS='';\n\t\t$b_posted = false;\n\t\tif(isset($_REQUEST[$s_submitVar])===true){\n\t\t\t$b_posted=true;\n\t\t}\n\t\t$nl=\"\\r\\n\";\n\n\t\t//process and add form rules\n\t\t$a_fieldProps=array();\n\t\t$a_fieldProps_jqValidate=array();\n\t\t$a_fieldProps_jqValidateGroups=array();\n\t\t$a_fieldProps_errstringFormIt=array();\n\t\t$a_fieldProps_errstringJq=array();\n\t\t\n\t\t$a_formProps=array();\n\t\t$a_formProps_custValidate=array();\n\t\t$a_formPropsFormItErrorStrings=array();\n\n\t\tforeach($this->_rules as $rule){\n\t\t\t$o_elFull = $rule->getElement();\n\t\t\tif(is_array($o_elFull)===true){\n\t\t\t\t$o_el = $o_elFull[0];\n\t\t\t}else{\n\t\t\t\t$o_el = $o_elFull;\n\t\t\t}\n\t\t\t$elId = $o_el->getId();\n\t\t\t$elName = $o_el->getName();\n\t\t\tif(isset($a_fieldProps[$elId])===false){\n\t\t\t\t$a_fieldProps[$elId]=array();\n\t\t\t}\n\t\t\tif(isset($a_fieldProps[$elId])===false){\n\t\t\t\t$a_fieldProps[$elId]=array();\n\t\t\t}\n\t\t\tif(isset($a_fieldProps_jqValidate[$elId])===false){\n\t\t\t\t$a_fieldProps_jqValidate[$elId]=array();\n\t\t\t}\n\t\t\tif(isset($a_fieldProps_errstringFormIt[$elId])===false){\n\t\t\t\t$a_fieldProps_errstringFormIt[$elId]=array();\n\t\t\t}\n\t\t\tif(isset($a_fieldProps_errstringJq[$elId])===false){\n\t\t\t\t$a_fieldProps_errstringJq[$elId]=array();\n\t\t\t}\n\t\t\tif(isset($a_formProps_custValidate[$elId])===false){\n\t\t\t\t$a_formProps_custValidate[$elId]=array();\n\t\t\t}\n\t\t\t\n\t\t\t$s_validationMessage=$rule->getValidationMessage();\n\t\t\tswitch($rule->getType()){\n\t\t\t\tcase FormRuleType::email:\n\t\t\t\t\t$a_fieldProps[$elId][] = 'email';\n\t\t\t\t\t$a_fieldProps_errstringFormIt[$elId][] = 'vTextEmailInvalid=`'.$s_validationMessage.'`';\n\t\t\t\t\t$a_fieldProps_jqValidate[$elName][] = 'email:true';\n\t\t\t\t\t$a_fieldProps_errstringJq[$elName][] = 'email:\"'.$s_validationMessage.'\"';\n\t\t\t\t\tbreak;\n\t\t\t\tcase FormRuleType::fieldMatch:\n\t\t\t\t\t$a_fieldProps[$elId][] = 'password_confirm=^'.$o_elFull[1]->getId().'^';\n\t\t\t\t\t$a_fieldProps_errstringFormIt[$elId][] = 'vTextPasswordConfirm=`'.$s_validationMessage.'`';\n\t\t\t\t\t$a_fieldProps_jqValidate[$elName][] = 'equalTo:\"#'.$o_elFull[1]->getId().'\"';\n\t\t\t\t\t$a_fieldProps_errstringJq[$elName][] = 'equalTo:\"'.$s_validationMessage.'\"';\n\t\t\t\t\tbreak;\n\t\t\t\tcase FormRuleType::maximumLength:\n\t\t\t\t\tif(is_a($o_el, 'FormItBuilder_elementCheckboxGroup')){\n\t\t\t\t\t\t$a_formProps_custValidate[$elId][]=array('type'=>'checkboxGroup','maxLength'=>$rule->getValue(),'errorMessage'=>$s_validationMessage);\n\t\t\t\t\t\t$a_fieldProps[$elId][] = 'FormItBuilder_customValidation';\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$a_fieldProps[$elId][] = 'maxLength=^'.$rule->getValue().'^';\n\t\t\t\t\t\t$a_fieldProps_errstringFormIt[$elId][] = 'vTextMaxLength=`'.$s_validationMessage.'`';\n\t\t\t\t\t}\n\t\t\t\t\t$a_fieldProps_jqValidate[$elName][] = 'maxlength:'.$rule->getValue();\n\t\t\t\t\t$a_fieldProps_errstringJq[$elName][] = 'maxlength:\"'.$s_validationMessage.'\"';\n\t\t\t\t\tbreak;\n\t\t\t\tcase FormRuleType::maximumValue:\n\t\t\t\t\t$a_fieldProps[$elId][] = 'maxValue=^'.$rule->getValue().'^';\n\t\t\t\t\t$a_fieldProps_errstringFormIt[$elId][] = 'vTextMaxValue=`'.$s_validationMessage.'`';\n\t\t\t\t\t$a_fieldProps_jqValidate[$elName][] = 'max:'.$rule->getValue();\n\t\t\t\t\t$a_fieldProps_errstringJq[$elName][] = 'max:\"'.$s_validationMessage.'\"';\n\t\t\t\t\tbreak;\n\t\t\t\tcase FormRuleType::minimumLength:\n\t\t\t\t\tif(is_a($o_el, 'FormItBuilder_elementCheckboxGroup')){\n\t\t\t\t\t\t$a_formProps_custValidate[$elId][]=array('type'=>'checkboxGroup','minLength'=>$rule->getValue(),'errorMessage'=>$s_validationMessage);\n\t\t\t\t\t\t$a_fieldProps[$elId][] = 'FormItBuilder_customValidation';\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$a_formProps_custValidate[$elId][]=array('type'=>'textfield','minLength'=>$rule->getValue(),'errorMessage'=>$s_validationMessage);\n\t\t\t\t\t\t$a_fieldProps[$elId][] = 'FormItBuilder_customValidation';\n\t\t\t\t\t}\n\t\t\t\t\t//Made own validation rule cause FormIt doesnt behave with required.\n\t\t\t\t\t//$a_fieldProps_errstringFormIt[$elId][] = 'vTextMinLength=`'.$s_validationMessage.'`';\n\t\t\t\t\t$a_fieldProps_jqValidate[$elName][] = 'minlength:'.$rule->getValue();\n\t\t\t\t\t$a_fieldProps_errstringJq[$elName][] = 'minlength:\"'.$s_validationMessage.'\"';\n\t\t\t\t\tbreak;\n\t\t\t\tcase FormRuleType::minimumValue:\n\t\t\t\t\t$a_fieldProps[$elId][] = 'minValue=^'.$rule->getValue().'^';\n\t\t\t\t\t$a_fieldProps_errstringFormIt[$elId][] = 'vTextMinValue=`'.$s_validationMessage.'`';\n\t\t\t\t\t$a_fieldProps_jqValidate[$elName][] = 'min:'.$rule->getValue();\n\t\t\t\t\t$a_fieldProps_errstringJq[$elName][] = 'min:\"'.$s_validationMessage.'\"';\n\t\t\t\t\tbreak;\n\t\t\t\tcase FormRuleType::numeric:\n\t\t\t\t\t$a_fieldProps[$elId][] = 'isNumber';\n\t\t\t\t\t$a_fieldProps_errstringFormIt[$elId][] = 'vTextIsNumber=`'.$s_validationMessage.'`';\n\t\t\t\t\t$a_fieldProps_jqValidate[$elName][] = 'digits:true';\n\t\t\t\t\t$a_fieldProps_errstringJq[$elName][] = 'digits:\"'.$s_validationMessage.'\"';\n\t\t\t\t\tbreak;\n\t\t\t\tcase FormRuleType::required:\n\t\t\t\t\tif(is_a($o_el, 'FormItBuilder_elementMatrix')){\n\t\t\t\t\t\t$s_type=$o_el->getType();\n\t\t\t\t\t\t$a_formProps_custValidate[$elId][]=array('type'=>'elementMatrix_'.$s_type,'required'=>true,'errorMessage'=>$s_validationMessage);\n\t\t\t\t\t\t$a_fieldProps[$elId][] = 'FormItBuilder_customValidation';\n\t\t\t\t\t\t$a_rows = $o_el->getRows();\n\t\t\t\t\t\t$a_columns = $o_el->getColumns();\n\t\t\t\t\t\t$a_namesForGroup=array();\n\t\t\t\t\t\tswitch($s_type){\n\t\t\t\t\t\t\tcase 'text':\n\t\t\t\t\t\t\t\tfor($row_cnt=0; $row_cnt<count($a_rows);$row_cnt++){\n\t\t\t\t\t\t\t\t\tfor($col_cnt=0; $col_cnt<count($a_columns); $col_cnt++){\n\t\t\t\t\t\t\t\t\t\t$a_namesForGroup[]=$elName.'_'.$row_cnt.'_'.$col_cnt;\n\t\t\t\t\t\t\t\t\t\t$a_fieldProps_jqValidate[$elName.'_'.$row_cnt.'_'.$col_cnt][] = 'required:true';\n\t\t\t\t\t\t\t\t\t\t$a_fieldProps_errstringJq[$elName.'_'.$row_cnt.'_'.$col_cnt][] = 'required:\"'.$s_validationMessage.'\"';\n\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'radio':\n\t\t\t\t\t\t\t\tfor($row_cnt=0; $row_cnt<count($a_rows);$row_cnt++){\n\t\t\t\t\t\t\t\t\t$a_namesForGroup[]=$elName.'_'.$row_cnt;\n\t\t\t\t\t\t\t\t\t$a_fieldProps_jqValidate[$elName.'_'.$row_cnt][] = 'required:true';\n\t\t\t\t\t\t\t\t\t$a_fieldProps_errstringJq[$elName.'_'.$row_cnt][] = 'required:\"'.$s_validationMessage.'\"';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'check':\n\t\t\t\t\t\t\t\tfor($row_cnt=0; $row_cnt<count($a_rows);$row_cnt++){\n\t\t\t\t\t\t\t\t\t$s_fieldName = $elName.'_'.$row_cnt.'[]';\n\t\t\t\t\t\t\t\t\t$a_namesForGroup[]=$s_fieldName;\n\t\t\t\t\t\t\t\t\t$a_fieldProps_jqValidate[$s_fieldName][] = 'required:true';\n\t\t\t\t\t\t\t\t\t$a_fieldProps_errstringJq[$s_fieldName][] = 'required:\"'.$s_validationMessage.'\"';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$a_fieldProps_jqValidateGroups[$elName]=implode(' ',$a_namesForGroup);\n\t\t\t\t\t}else if(is_a($o_el, 'FormItBuilder_elementDate')){\n\t\t\t\t\t\t$a_formProps_custValidate[$elId][]=array('type'=>'elementDate','required'=>true,'errorMessage'=>$s_validationMessage);\n\t\t\t\t\t\t$a_fieldProps[$elId][] = 'FormItBuilder_customValidation';\n\t\t\t\t\t\t$a_fieldProps_jqValidate[$elName.'_0'][] = 'required:true,dateElementRequired:true';\n\t\t\t\t\t\t$a_fieldProps_errstringJq[$elName.'_0'][] = 'required:\"'.$s_validationMessage.'\",dateElementRequired:\"'.$s_validationMessage.'\"';\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$a_formProps_custValidate[$elId][]=array('type'=>'textfield','required'=>true,'errorMessage'=>$s_validationMessage);\n\t\t\t\t\t\t$a_fieldProps[$elId][] = 'FormItBuilder_customValidation';\n\t\t\t\t\t\t$a_fieldProps_jqValidate[$elName][] = 'required:true';\n\t\t\t\t\t\t$a_fieldProps_errstringJq[$elName][] = 'required:\"'.$s_validationMessage.'\"';\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase FormRuleType::date:\n\t\t\t\t\t$s_thisVal = $rule->getValue();\n\t\t\t\t\t$s_thisErrorMsg = str_replace('===dateformat===',$s_thisVal,$s_validationMessage);\n\t\t\t\t\t$a_formProps_custValidate[$elId][]=array('type'=>'date','fieldFormat'=>$s_thisVal,'errorMessage'=>$s_thisErrorMsg);\n\t\t\t\t\t$a_fieldProps[$elId][] = 'FormItBuilder_customValidation';\n\t\t\t\t\t$a_fieldProps_jqValidate[$elName][] = 'dateFormat:\\''.$s_thisVal.'\\'';\n\t\t\t\t\t$a_fieldProps_errstringJq[$elName][] = 'dateFormat:\"'.$s_thisErrorMsg.'\"';\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t//if some custom validation options were found (date etc) then add formItBuilder custom validate snippet to the list\n\t\tif(count($a_formProps_custValidate)>0){\n\t\t\t$GLOBALS['FormItBuilder_customValidation']=$a_formProps_custValidate;\n\t\t\tif(empty($this->_customValidators)===false){\n\t\t\t\t$this->_customValidators.=',';\n\t\t\t}\n\t\t\t$this->_customValidators.='FormItBuilder_customValidation';\n\t\t}\n\t\t\n\t\t//build inner form html\n\t\t$b_attachmentIncluded=false;\n\t\t$s_form='<div>'.$nl\n\t\t.$nl.'<div class=\"process_errors_wrap\"><div class=\"process_errors\">[[!+fi.error_message:notempty=`[[!+fi.error_message]]`]]</div></div>'\n\t\t.$nl.($b_customSubmitVar===false?'<input type=\"hidden\" name=\"'.$s_submitVar.'\" value=\"1\" />':'')\n\t\t.$nl.'<input type=\"hidden\" name=\"fke'.date('Y').'Sp'.date('m').'Blk:blank\" value=\"\" /><!-- additional crude spam block. If this field ends up with data it will fail to submit -->'\n\t\t.$nl;\n\t\tforeach($this->_formElements as $o_el){\n\t\t\t$s_elClass=get_class($o_el);\n\t\t\tif($s_elClass=='FormItBuilder_elementFile'){\n\t\t\t\t$b_attachmentIncluded=true;\n\t\t\t}\n\t\t\tif(is_a($o_el,'FormItBuilder_elementHidden')){\n\t\t\t\t$s_form.=$o_el->outputHTML();\n\t\t\t}else if(is_a($o_el,'FormItBuilder_htmlBlock')){\n\t\t\t\t$s_form.=$o_el->outputHTML();\n\t\t\t}else{\n\t\t\t\t$s_typeClass = substr($s_elClass,14,strlen($s_elClass)-14);\n\t\t\t\t$forId=$o_el->getId();\n\t\t\t\tif(\n\t\t\t\t\tis_a($o_el,'FormItBuilder_elementRadioGroup')===true\n\t\t\t\t\t|| is_a($o_el,'FormItBuilder_elementCheckboxGroup')===true\n\t\t\t\t\t|| is_a($o_el,'FormItBuilder_elementDate')===true\n\t\t\t\t){\n\t\t\t\t\t$forId=$o_el->getId().'_0';\n\t\t\t\t}else if(is_a($o_el,'FormItBuilder_elementMatrix')){\n\t\t\t\t\t$forId=$o_el->getId().'_0_0';\n\t\t\t\t}\n\t\t\t\t$s_forStr = ' for=\"'.htmlspecialchars($forId).'\"';\n\t\t\t\t\n\t\t\t\tif(is_a($o_el,'FormItBuilder_elementReCaptcha')===true){\n\t\t\t\t\t$s_forStr = ''; // dont use for attrib for Recaptcha (as it is an external program outside control of formitbuilder\n\t\t\t\t\t$s_recaptchaJS=$o_el->getJsonConfig();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$s_extraClasses='';\n\t\t\t\t$a_exClasses=$o_el->getExtraClasses();\n\t\t\t\tif(count($a_exClasses)>0){\n\t\t\t\t\t$s_extraClasses = ' '.implode(' ',$o_el->getExtraClasses());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$b_required = $o_el->isRequired();\n\t\t\t\t$s_form.='<div title=\"'.$o_el->getLabel().'\" class=\"formSegWrap formSegWrap_'.htmlspecialchars($o_el->getId()).' '.$s_typeClass.($b_required===true?' required':'').$s_extraClasses.'\">';\n\t\t\t\t\t$s_labelHTML='';\n\t\t\t\t\tif($o_el->showLabel()===true){\n\t\t\t\t\t\t$s_desc=$o_el->getDescription();\n\t\t\t\t\t\tif(empty($s_desc)===false){\n\t\t\t\t\t\t\t$s_desc='<span class=\"description\">'.$s_desc.'</span>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$s_labelHTML='<label class=\"mainElLabel\"'.$s_forStr.'><span class=\"before\"></span><span class=\"mainLabel\">'.$o_el->getLabel().'</span>'.$s_desc.'<span class=\"after\"></span></label>';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$s_element='<div class=\"elWrap\">'.$nl.' <span class=\"before\"></span>'.$o_el->outputHTML().'<span class=\"after\"></span>';\n\t\t\t\t\tif($o_el->showLabel()===true){\n\t\t\t\t\t\t$s_element.='<div class=\"errorContainer\"><label class=\"formiterror\" '.$s_forStr.'>[[+fi.error.'.htmlspecialchars($o_el->getId()).']]</label></div>';\n\t\t\t\t\t}\n\t\t\t\t\t$s_element.='</div>';\n\t\t\t\t\t\n\t\t\t\t\tif($o_el->getLabelAfterElement()===true){\n\t\t\t\t\t\t$s_form.=$s_element.$s_labelHTML;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$s_form.=$s_labelHTML.$s_element;\n\t\t\t\t\t}\n\t\t\t\t$s_form.=$nl.'</div>'.$nl;\n\t\t\t}\n\t\t}\n\t\t$s_form.=$nl.'</div>';\n\n\t\t//wrap form elements in form tags\n\t\t$s_form='<form action=\"'.$this->_formAction.'\" method=\"'.htmlspecialchars($this->_method).'\"'.($b_attachmentIncluded?' enctype=\"multipart/form-data\"':'').' class=\"form\" id=\"'.htmlspecialchars($this->_id).'\">'.$nl\n\t\t.$s_form.$nl\n\t\t.'</form>';\n\t\t\n\t\t//add all formit validation rules together in one array for easy implode\n\t\t$a_formItCmds=array();\n\t\t$a_formItErrorMessage=array();\n\t\tforeach($a_fieldProps as $fieldID=>$a_fieldProp){\n\t\t\tif(count($a_fieldProp)>0){\n\t\t\t\t$a_formItCmds[]=$fieldID.':'.implode(':',$a_fieldProp);\n\t\t\t}\n\t\t}\n\t\t//add formIT error messages\n\t\tforeach($a_fieldProps_errstringFormIt as $fieldID=>$msgArray){\n\t\t\tforeach($msgArray as $msg){\n\t\t\t\t$a_formItErrorMessage[]='&'.$fieldID.'.'.$msg;\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor($i=0; $i<count($a_formProps); $i++){\n\t\t\t$a_formItCmds[]=$a_formProps[$i];\n\t\t\tif(empty($a_formPropsFormItErrorStrings[$i])===false){\n\t\t\t\t$a_formItErrorMessage[]=$a_formPropsFormItErrorStrings[$i];\n\t\t\t}\n\t\t}\n\t\t\n\t\t//if using database table then add call to final hook\n\t\t$b_addFinalHooks=false;\n\t\t$GLOBALS['FormItBuilder_hookCommands']=array('formObj'=>&$this,'commands'=>array());\n\t\tif(empty($this->_databaseTableObjectName)===false){\n\t\t\t$GLOBALS['FormItBuilder_hookCommands']['commands'][]=array('name'=>'dbEntry','value'=>array('tableObj'=>$this->_databaseTableObjectName,'mapping'=>$this->_databaseTableFieldMapping));\n\t\t\t$b_addFinalHooks=true;\n\t\t}\n\t\tif($b_addFinalHooks===true){\n\t\t\t$this->_hooks[]='FormItBuilder_hooks';\n\t\t}\n\t\t\n\t\t//rebuild hooks system\n\t\t$s_hooksStr = '';\n\t\tif(empty($this->_postHookName)===false){\n\t\t $s_hooksStr.=$this->_postHookName;\n\t\t}\n\t\tif(count($this->_hooks)>0){\n\t\t if(empty($this->_postHookName)===false){\n\t\t\t$s_hooksStr.=',';\n\t\t }\n\t\t $s_hooksStr.=implode(',',$this->_hooks);\n\t\t}\n\t\t$s_fullHooksParam='';\n\t\tif(empty($s_hooksStr)===false){\n\t\t $s_fullHooksParam=$nl.'&hooks=`'.$s_hooksStr.'`';\n\t\t}\n\t\t\n\t\t$s_formItCmd='[[!FormIt?'\n\t\t.$s_fullHooksParam\t\t\t\t\n\t\t.(empty($s_recaptchaJS)===false?$nl.'&recaptchaJs=`'.$s_recaptchaJS.'`':'')\n\t\t.(empty($this->_customValidators)===false?$nl.'&customValidators=`'.$this->_customValidators.'`':'')\n\t\t\t\n\t\t.(empty($this->_emailTpl)===false?$nl.'&emailTpl=`'.$this->_emailTpl.'`':'')\n\t\t.(empty($this->_emailToAddress)===false?$nl.'&emailTo=`'.$this->_emailToAddress.'`':'')\n\t\t.(empty($this->_emailToName)===false?$nl.'&emailToName=`'.$this->_emailToName.'`':'')\n\t\t.(empty($this->_emailFromAddress)===false?$nl.'&emailFrom=`'.$this->_emailFromAddress.'`':'')\n\t\t.(empty($this->_emailFromName)===false?$nl.'&emailFromName=`'.$this->_emailFromName.'`':'')\n\t\t.(empty($this->_emailReplyToAddress)===false?$nl.'&emailReplyTo=`'.$this->_emailReplyToAddress.'`':'')\n\t\t.(empty($this->_emailReplyToName)===false?$nl.'&emailReplyToName=`'.$this->_emailReplyToName.'`':'')\n\t\t.(empty($this->_emailCCAddress)===false?$nl.'&emailCC=`'.$this->_emailCCAddress.'`':'')\n\t\t.(empty($this->_emailCCName)===false?$nl.'&emailCCName=`'.$this->_emailCCName.'`':'')\n\t\t.(empty($this->_emailBCCAddress)===false?$nl.'&emailBCC=`'.$this->_emailBCCAddress.'`':'')\n\t\t.(empty($this->_emailBCCName)===false?$nl.'&emailBCCName=`'.$this->_emailBCCName.'`':'')\n\t\t\n\t\t.(empty($this->_autoResponderTpl)===false?$nl.'&fiarTpl=`'.$this->_autoResponderTpl.'`':'')\n\t\t.(empty($this->_autoResponderSubject)===false?$nl.'&fiarSubject=`'.$this->_autoResponderSubject.'`':'')\n\t\t.(empty($this->_autoResponderToAddressField)===false?$nl.'&fiarToField=`'.$this->_autoResponderToAddressField.'`':'')\n\t\t.(empty($this->_autoResponderFromAddress)===false?$nl.'&fiarFrom=`'.$this->_autoResponderFromAddress.'`':'')\n\t\t.(empty($this->_autoResponderFromName)===false?$nl.'&fiarFromName=`'.$this->_autoResponderFromName.'`':'')\n\t\t.(empty($this->_autoResponderReplyTo)===false?$nl.'&fiarReplyTo=`'.$this->_autoResponderReplyTo.'`':'')\n\t\t.(empty($this->_autoResponderReplyToName)===false?$nl.'&fiarReplyToName=`'.$this->_autoResponderReplyToName.'`':'')\n\t\t.(empty($this->_autoResponderCC)===false?$nl.'&fiarCC=`'.$this->_autoResponderCC.'`':'')\n\t\t.(empty($this->_autoResponderCCName)===false?$nl.'&fiarCCName=`'.$this->_autoResponderCCName.'`':'')\n\t\t.(empty($this->_autoResponderBCC)===false?$nl.'&fiarBCC=`'.$this->_autoResponderBCC.'`':'')\n\t\t.(empty($this->_autoResponderBCCName)===false?$nl.'&fiarBCCName=`'.$this->_autoResponderBCCName.'`':'')\n\t\t.$nl.'&fiarHtml=`'.($this->_autoResponderHtml===false?'0':'1').'`'\t\t\t\t\n\t\t\t\t\n\t\t.$nl.'&emailSubject=`'.$this->_emailSubject.'`'\n\t\t.$nl.'&emailUseFieldForSubject=`1`'\n\t\t.$nl.'&redirectTo=`'.$this->_redirectDocument.'`'\n\t\t.(empty($this->_redirectParams)===false?$nl.'&redirectParams=`'.$this->_redirectParams.'`':'')\n\t\t.$nl.'&store=`'.($this->_store===true?'1':'0').'`'\n\t\t.$nl.'&submitVar=`'.$s_submitVar.'`'\n\t\t.$nl.implode($nl,$a_formItErrorMessage)\n\t\t.$nl.'&validate=`'.(isset($this->_validate)?$this->_validate.',':'').implode(','.$nl.' ',$a_formItCmds).','.$nl.'`]]'.$nl;\n\t\t\n\t\tif($this->_jqueryValidation===true){\n\t\t\t$s_js='\t\n$().ready(function() {\n\njQuery.validator.addMethod(\"dateFormat\", function(value, element, format) {\n\tvar b_retStatus=false;\n\tvar s_retValue=\"\";\n\tvar n_retTimestamp=0;\n\tif(value.length==format.length){\n\t\tvar separator_only = format;\n\t\tvar testDate;\n\t\tif(format.toLowerCase()==\"yyyy\"){\n\t\t\t//allow just yyyy\n\t\t\ttestDate = new Date(value, 1, 1);\n\t\t\tif(testDate.getFullYear()==value){\n\t\t\t\tb_retStatus=true;\n\t\t\t}\n\t\t}else{\n\t\t\tseparator_only = separator_only.replace(/m|d|y/g,\"\");\n\t\t\tvar separator = separator_only.charAt(0)\n\n\t\t\tif(separator && separator_only.length==2){\n\t\t\t\tvar dayPos; var day; var monthPos; var month; var yearPos; var year;\n\t\t\t\tvar s_testYear;\n\t\t\t\tvar newStr = format;\n\n\t\t\t\tdayPos = format.indexOf(\"dd\");\n\t\t\t\tday = parseInt(value.substr(dayPos,2),10)+\"\";\n\t\t\t\tif(day.length==1){day=\"0\"+day;}\n\t\t\t\tnewStr=newStr.replace(\"dd\",day);\n\n\t\t\t\tmonthPos = format.indexOf(\"mm\");\n\t\t\t\tmonth = parseInt(value.substr(monthPos,2),10)+\"\";\n\t\t\t\tif(month.length==1){month=\"0\"+month;}\n\t\t\t\tnewStr=newStr.replace(\"mm\",month);\n\n\t\t\t\tyearPos = format.indexOf(\"yyyy\");\n\t\t\t\tyear = parseInt(value.substr(yearPos,4),10);\n\t\t\t\tnewStr=newStr.replace(\"yyyy\",year);\n\n\t\t\t\ttestDate = new Date(year, month-1, day);\n\n\t\t\t\tvar testDateDay=(testDate.getDate())+\"\";\n\t\t\t\tif(testDateDay.length==1){testDateDay=\"0\"+testDateDay;}\n\n\t\t\t\tvar testDateMonth=(testDate.getMonth()+1)+\"\";\n\t\t\t\tif(testDateMonth.length==1){testDateMonth=\"0\"+testDateMonth;}\n\n\t\t\t\tif (testDateDay==day && testDateMonth==month && testDate.getFullYear()==year) {\n\t\t\t\t\tb_retStatus = true;\n\t\t\t\t\t$(element).val(newStr);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn this.optional(element) || b_retStatus;\n}, \"Please enter a valid date.\");\n\njQuery.validator.addMethod(\"dateElementRequired\", function(value, element, format) {\n\tvar el=element;\n\tb_retStatus=true;\n\tvar elBaseId=element.id.substr(0,element.id.length-2);\n\tif($(\"#\"+elBaseId+\"_0\").val()==\"\" || $(\"#\"+elBaseId+\"_1\").val()==\"\" || $(\"#\"+elBaseId+\"_2\").val()==\"\"){\n\t\tb_retStatus=false;\n\t}\n\treturn this.optional(element) || b_retStatus;\n}, \"Date element is required.\");\n\n//Main validate call\nvar thisFormEl=$(\"#'.$this->_id.'\");\nthisFormEl.validate({errorPlacement:function(error, element) {\n\tvar labelEl = element.parents(\".formSegWrap\").find(\".errorContainer\");\n\terror.appendTo( labelEl );\n},success: function(element) {\n\telement.addClass(\"valid\");\n\tvar formSegWrapEl = element.parents(\".formSegWrap\");\n\tformSegWrapEl.children(\".mainElLabel\").removeClass(\"mainLabelError\");\n},highlight: function(el, errorClass, validClass) {\n\tvar element= $(el);\n\telement.addClass(errorClass).removeClass(validClass);\n\telement.parents(\".formSegWrap\").children(\".mainElLabel\").addClass(\"mainLabelError\");\n},invalidHandler: function(form, validator){\n\t//make nice little animation to scroll to the first invalid element instead of an instant jump\n\tvar jumpEl = $(\"#\"+validator.errorList[0].element.id).parents(\".formSegWrap\");\n\t$(\"html,body\").animate({scrollTop: jumpEl.offset().top});\n if(FormItBuilderInvalidCallback){FormItBuilderInvalidCallback();}\n},ignore:\":hidden\",'.\n\t\t\t\t\t\n$this->jqueryValidateJSON(\n\t$a_fieldProps_jqValidate,\n\t$a_fieldProps_errstringJq,\n\t$a_fieldProps_jqValidateGroups\n).'});\n\t\n'.\n//Force validation on load if already posted\n($b_posted===true?'thisFormEl.valid();':'')\n.'\n\t\n});\n';\n\t\t}\n\t\t\n\t\t//Allows output of the javascript into a paceholder so in can be inserted elsewhere in html (head etc)\n\t\tif(empty($this->_placeholderJavascript)===false){\n\t\t\t$this->modx->setPlaceholder($this->_placeholderJavascript,$s_js);\n\t\t\treturn $s_formItCmd.$s_form;\n\t\t}else{\n\t\t\treturn $s_formItCmd.$s_form.\n'<script type=\"text/javascript\">\n// <![CDATA[\n'.$s_js.'\n// ]]>\n</script>';\n\t\t}\n\t}", "static function form() {\n ?>\n\n <?php if ( isset( $_GET['message'] ) ): ?>\n <div id=\"message\" class=\"notice notice-<?php echo self::$MESSAGES[ $_GET['message'] ][0] ; ?> is-dismissible\">\n <p><?php echo self::$MESSAGES[ $_GET['message'] ][1] ?></p>\n </div>\n <?php endif; ?>\n\n <fieldset class=\"options\">\n <h3><?php esc_html_e( \"Export WP Super Cache Settings\", \"wp-super-cache\" ) ?></h3>\n <p><?php esc_html_e( \"Export the WP Super Cache Settings to transfer them to another WordPress site.\", \"wp-super-cache\" ) ?></p>\n\n <form action=\"\" method=\"post\">\n <input type=\"hidden\" name=\"<?php echo self::NAME ?>\" value=\"export\" />\n <?php wp_nonce_field( self::EXPORT_NONCE ); ?>\n <?php submit_button( esc_html__( 'Export settings', 'wp-super-cache' ) ); ?>\n </form>\n\n <hr>\n\n <h3><?php esc_html_e( \"Import WP Super Cache Settings\", \"wp-super-cache\" ) ?></h3>\n <p><?php esc_html_e( \"Import the WP Super Cache Settings to from another WordPress site. This file must be a json format and exported from a WP Super Cache plugin.\", \"wp-super-cache\" ) ?></p>\n\n <form action=\"\" method=\"post\" enctype=\"multipart/form-data\">\n <?php wp_nonce_field( self::IMPORT_NONCE ); ?>\n <input type=\"hidden\" name=\"<?php echo self::NAME ?>\" value=\"import\" />\n <input type=\"file\" name=\"wp_super_cache_import_file\"/>\n <?php submit_button( esc_html__( 'Import settings', 'wp-super-cache' ) ); ?>\n </form>\n\n <?php if ( self::backupFileExists() ) : ?>\n\n <hr>\n\n <p>\n <?php esc_html_e( \"Restore the previous WP Super Cache settings or remove them permanently.\", \"wp-super-cache\" ) ?>\n </p>\n\n <p>\n\n <form action=\"\" method=\"post\">\n <input type=\"hidden\" name=\"<?php echo self::NAME ?>\" value=\"restore\" />\n <?php wp_nonce_field( self::RESTORE_NONCE ); ?>\n <?php submit_button( esc_html__( 'Restore settings', 'wp-super-cache' ), 'secondary', 'submit', false ); ?>\n </form>\n\n <form action=\"\" method=\"post\" style=\"margin-top:10px;\">\n <input type=\"hidden\" name=\"<?php echo self::NAME ?>\" value=\"remove\" />\n <?php wp_nonce_field( self::REMOVE_NONCE ); ?>\n <?php submit_button( esc_html__( 'Remove backup settings', 'wp-super-cache' ), 'delete', 'submit',false ); ?>\n </p>\n\n <?php endif; ?>\n\n </fieldset>\n\n <?php\n }", "function validation_files()\n\t{\n\t\t//Script file\n\t\techo '<script src=\"'.SITEPATH.'/administrator/validation/validationtextfield.js\" type=\"text/javascript\"></script>\n\t\t<script src=\"'.SITEPATH.'/administrator/validation/validationtextarea.js\" type=\"text/javascript\"></script>\n\t\t<script src=\"'.SITEPATH.'/administrator/validation/validationselect.js\" type=\"text/javascript\"></script>';\n\t\t//css file\n\t\techo '<link href=\"'.SITEPATH.'/administrator/validation/validationtextfield.css\" rel=\"stylesheet\" type=\"text/css\" />\n\t\t<link href=\"'.SITEPATH.'/administrator/validation/validationtextarea.css\" rel=\"stylesheet\" type=\"text/css\" />\n\t\t<link href=\"'.SITEPATH.'/administrator/validation/validationselect.css\" rel=\"stylesheet\" type=\"text/css\" />';\n\t}", "function hgr_minimal_form($atts, $content = null ) {\n\t\t\twp_enqueue_script('hgr-vc-modernizr');\n\t\t\twp_enqueue_script('hgr-vc-classie');\n\t\t\twp_enqueue_script('hgr-vc-stepsform');\n\t\t\t\n\t\t\t\n\t\t\t/*\n\t\t\t\tEmpty vars declaration\n\t\t\t*/\n\t\t\t$output = $form_size = $form_style = $form_size_class = $label_text_size = $label_text_color = $input_text_color = $next_icon_color = $confirmation_text = $confirmation_text_size = $confirmation_text_color = $steps_text_color = $form_input_color = $progress_bar_bgcolor = $email_form = $confirmation_text_style = $progress_bar_style = $steps_text_style = $next_icon_style = $label_text_style = $input_text_style = $form_input_style = $hgr_minimal_sendmail = $css = '';\n\t\t\t\n\t\t\t/*\n\t\t\t\tWordPress function to extract shortcodes attributes\n\t\t\t\tRefference: http://codex.wordpress.org/Function_Reference/shortcode_atts\n\t\t\t*/\n\t\t\textract(shortcode_atts(array(\n\t\t\t\t'form_size'\t\t\t\t\t\t=>\t'',\n\t\t\t\t'form_style'\t\t\t\t\t\t=>\t'',\n\t\t\t\t'label_text_size'\t\t\t\t=>\t'',\n\t\t\t\t'label_text_color'\t\t\t\t=>\t'',\n\t\t\t\t'input_text_color'\t\t\t\t=>\t'',\n\t\t\t\t'next_icon_color'\t\t\t\t=>\t'',\n\t\t\t\t'confirmation_text'\t\t\t\t=>\t'',\n\t\t\t\t'confirmation_text_size'\t\t=>\t'',\n\t\t\t\t'confirmation_text_color'\t\t=>\t'',\n\t\t\t\t'steps_text_color'\t\t\t\t=>\t'',\n\t\t\t\t'form_input_color'\t\t\t\t=>\t'',\n\t\t\t\t'progress_bar_bgcolor'\t\t\t=>\t'',\n\t\t\t\t'email_form'\t\t\t\t\t\t=>\t'',\n\t\t\t\t'css'\t\t\t\t\t\t\t=>\t'',\n\t\t\t), $atts));\n\t\t\t\n\t\t\t$css_class = apply_filters( VC_SHORTCODE_CUSTOM_CSS_FILTER_TAG, vc_shortcode_custom_css_class( $css, ' ' ), $this->settings['base'], $atts );\n\t\t\t\n\t\t\tswitch($form_size){\n\t\t\t\tcase 'large':\n\t\t\t\t\t$form_size_class = 'simform-large';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'medium':\n\t\t\t\t\t$form_size_class = 'simform-medium';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'small':\n\t\t\t\t\t$form_size_class = 'simform-small';\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tswitch($form_style){\n\t\t\t\tcase 'standard':\n\t\t\t\t\t$confirmation_text_style = '';\n\t\t\t\t\t$progress_bar_style = '';\n\t\t\t\t\t$steps_text_style = '';\n\t\t\t\t\t$next_icon_style = '';\n\t\t\t\t\t$label_text_style = '';\n\t\t\t\t\t$input_text_style = '';\n\t\t\t\t\t$form_input_style = 'rgba(0,0,0,0.1)';\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'advanced':\t\t\t\t\t\n\t\t\t\t\t$confirmation_text_style = 'style=\"'.($confirmation_text_size !== '' ? 'font-size:'.$confirmation_text_size.'px;' : '').''.($confirmation_text_color !== '' ? 'color:'.$confirmation_text_color.';' : '').'\"';\n\t\t\t\t\t$progress_bar_style = 'style=\"'.($progress_bar_bgcolor !== '' ? 'background:'.$progress_bar_bgcolor : '').'\"';\n\t\t\t\t\t$steps_text_style = 'style=\"'.($steps_text_color !== '' ? 'color:'.$steps_text_color : '').'\"';\n\t\t\t\t\t$next_icon_style = 'style=\"'.($next_icon_color !== '' ? 'color:'.$next_icon_color : '').'\"';\n\t\t\t\t\t$label_text_style = 'style=\"'.($label_text_size !== '' ? 'font-size:'.$label_text_size.'px;' : '').''.($label_text_color !== '' ? 'color:'.$label_text_color.';' : '').'\"';\n\t\t\t\t\t$input_text_style = 'style=\"'.($input_text_color !== '' ? 'color:'.$input_text_color : '').'\"';\n\t\t\t\t\t$form_input_style = ($form_input_color !== '' ? $form_input_color : 'rgba(0,0,0,0.1)');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$GLOBALS['hgr_label_style'] = $label_text_style;\n\t\t\t$GLOBALS['hgr_input_text_style'] = $input_text_style;\n\t\t\t$GLOBALS['hgr_minimal_sendmail'] = $email_form;\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$output .= '<script>\n\t\t\t\tjQuery( document ).ready(function() {\n\t\t\t\t\t//Add form size class\n\t\t\t\t\tjQuery(\"#theForm\").addClass(\"'.$form_size_class.'\");\n\t\t\t\t\t\n\t\t\t\t\t//Add form background color\n\t\t\t\t\tjQuery(\"head\").append(\"<style>.hgr-minimal-form .simform ol:before{background:'.$form_input_style.';}</style>\");\n\t\t\t\t\t\n\t\t\t\t\tvar theForm = document.getElementById( \"theForm\" );\n\t\t\t\t\tnew stepsForm( theForm, {\n\t\t\t\t\t\tonSubmit : function( form ) {\n\t\t\t\t\t\t\tclassie.addClass( theForm.querySelector( \".simform-inner\" ), \"hide\" );\n\t\t\t\t\t\t\tvar messageEl = theForm.querySelector( \".final-message\" );\n\t\t\t\t\t\t\tmessageEl.innerHTML = \"'.$confirmation_text.'\";\n\t\t\t\t\t\t\tclassie.addClass( messageEl, \"show\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t\t\n\t\t\t\t\t// Submits the form\n\t\t\t\t\tstepsForm.prototype._submit = function() {\n\t\t\t\t\t\t// get all the inputs into an array.\n\t\t\t\t\t\tvar $inputs = jQuery(\"#theForm :input\");\n\n\t\t\t\t\t\tvar values = {};\n\t\t\t\t\t\t$inputs.each(function() {\n\t\t\t\t\t\t\tif( jQuery(this).val() != \"\" ) {\n\t\t\t\t\t\t\t\tvalues[jQuery(this).attr(\"data-question\")] = jQuery(this).val();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t// send email\n\t\t\t\t\t\tvar data = {\n\t\t\t\t\t\t\taction: \"mail_before_submit\",\n\t\t\t\t\t\t\twhatever: values,\n\t\t\t\t\t\t\t_ajax_nonce: \"'.wp_create_nonce( \"my_email_ajax_nonce\" ).'\"\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\tjQuery.post(\"'. get_bloginfo(\"url\").'/wp-admin/admin-ajax.php\", data);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// show confirmation text\n\t\t\t\t\t\tthis.options.onSubmit( this.el );\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t</script>';\n\t\t\t\n\t\t\t\t$output .= '<div class=\"hgr-minimal-form ' . esc_attr( $css_class ) . '\">';\n\t\t\t\t\t$output .= '<form id=\"theForm\" class=\"simform\" autocomplete=\"off\">';\n\t\t\t\t\t\t$output .= '<div class=\"simform-inner\">';\n\t\t\t\t\t\t\t$output .= '<ol class=\"questions\">';\n\t\t\t\t\t\t\t\t$output .= do_shortcode($content);\n\t\t\t\t\t\t\t$output .= '</ol><!-- /questions -->';\n\t\t\t\t\t\t\t$output .= '<button class=\"submit\" type=\"submit\">Send answers</button>';\n\t\t\t\t\t\t\t$output .= '<div class=\"controls\" '.$progress_bar_style.'>';\n\t\t\t\t\t\t\t\t$output .= '<button class=\"hgr-next-button\" '.$next_icon_style.'></button>';\n\t\t\t\t\t\t\t\t$output .= '<div class=\"progress\"></div>';\n\t\t\t\t\t\t\t\t$output .= '<span class=\"number\" '.$steps_text_style.'>';\n\t\t\t\t\t\t\t\t\t$output .= '<span class=\"number-current\"></span>';\n\t\t\t\t\t\t\t\t\t$output .= '<span class=\"number-total\"></span>';\n\t\t\t\t\t\t\t\t$output .= '</span>';\n\t\t\t\t\t\t\t\t$output .= '<span class=\"error-message\"></span>';\n\t\t\t\t\t\t\t$output .= '</div><!-- / controls -->';\n\t\t\t\t\t\t$output .= '</div><!-- /simform-inner -->';\n\t\t\t\t\t\t$output .= '<span class=\"final-message\" '.$confirmation_text_style.'></span>';\n\t\t\t\t\t$output .= '</form><!-- /simform -->';\n\t\t\t\t$output .= '</div>';\n\t\t\t\n\t\t\t/*\n\t\t\t\tReturn the output\n\t\t\t*/\n\t\t\treturn $output;\n\t\t}", "function export_all() {\n echo\"</br>\";\n echo\"<form id='export_all' name='export_all' method='post' action='html2word.php?user_choice=all_notes'>\";\n echo get_string('name', 'local_mynotebook');\n echo\"<input name='filename' type='text' id='filename' size='10' required='required'/></br></br>\n \" . get_string('ext', 'local_mynotebook'). \"\n <select name='tpl' id='tpl'>\n <option value='ms_word.doc'> \" . get_string('msword', 'local_mynotebook'). \"</option>\n </select>\";\n echo \"</br></br>\";\n //Input type before was submit\n echo\"<div style='text-align: center;'>\";\n echo\"<input type='image' title='\" . get_string('dl', 'local_mynotebook'). \"' name='btn_go' id='btn_go' value='export' src='images/dl.png' />\";\n echo\"</div></form>\";\n}", "function ting_admin_boost_form_after_build($form, &$form_state) {\n $path = drupal_get_path('module', 'ting');\n\n drupal_add_css($path .'/css/ting_admin_boost_form.css');\n\n return $form;\n}", "function build_tb_theme_options() {\n\n settings_errors();\n\n ?>\n <form method=\"post\" action=\"options.php\" />\n\n <?php\n settings_fields( \"tb_theme_options\" );\n do_settings_sections( \"tb_theme_options\" );\n submit_button();\n ?>\n </form>\n<?php\n}", "function section_editor($section = array('ID'=>'0','title'=>'','shortname'=>'','handler'=>'','stylesheet'=>'style.css','hidden'=>'','page_order'=>'0','last_updated'=>'')) {\r\n\tglobal $inline;\r\n\tob_start(); ?>\r\n\t\t\t<form name=\"edit-<?php echo $section['ID']; ?>\" action=\"\" method=\"post\" id=\"sectionform\" class=\"editform\">\n\t\t\t\t<div class=\"c-ontent\">\n\t\t\t\t\t<p class=\"label\"><label for=\"title\"><?php _e('Title'); ?></label></p>\r\n\t\t\t\t\t<p><input type=\"text\" name=\"title\" id=\"title\" value=\"<?php echo formatted_for_editing($section['title']); ?>\" class=\"text100\" /></p>\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"column width50\">\r\n\t\t\t\t\t<div class=\"c-ontent\">\n\t\t\t\t\t\t<p class=\"label\"><label for=\"page_order\"><?php _e('Menu Order'); ?></label></p>\r\n\t\t\t\t\t\t<p><input type=\"text\" name=\"page_order\" id=\"page_order\" value=\"<?php echo $section['page_order']; ?>\" class=\"text100\" /></p>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"column width50\">\r\n\t\t\t\t\t<div class=\"c-ontent\">\n\t\t\t\t\t\t<p class=\"label\"><label for=\"hidden\"><?php _e('Hidden?'); ?></label></p>\r\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<select name=\"hidden\" id=\"hidden\" class=\"width100\">\r\n\t\t\t\t\t\t\t\t<option value=\"no\"<?php bj_selected($section['hidden'],'no'); ?>><?php _e('No'); ?></option>\r\n\t\t\t\t\t\t\t\t<option value=\"yes\"<?php bj_selected($section['hidden'],'yes'); ?>><?php _e('Yes'); ?></option>\r\n\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t</p>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"column width50\">\r\n\t\t\t\t\t<div class=\"c-ontent\">\r\n\t\t\t\t\t\t<p class=\"label\"><label for=\"handler\" title=\"<?php _e('A handler is a special PHP file within the current skin that can be used to parse PHP before the section template file is loaded.'); ?>\" class=\"cowtip\"><?php _e('Handler'); ?></label></p>\n\t\t\t\t\t\t<p>\r\n<?php\r\n\t\t\t\t\t\t$skin_files = FileFolderList(BJTEMPLATE); ?>\r\n\t\t\t\t\t\t\t<select name=\"handler\" id=\"handler\" class=\"width100\">\r\n\t\t\t\t\t\t\t\t<option value=\"\"<?php bj_selected($section['handler'],''); ?>><?php _e('None'); ?></option>\r\n<?php\r\n\t\t\t\t\t\tforeach($skin_files['files'] as $num=>$file) {\r\n\t\t\t\t\t\t\t$data = parse_file_info($file,array('Handler'));\r\n\t\t\t\t\t\t\tif(!empty($data['Handler']) and end(explode('.',$file)) == 'php') { ?>\r\n\t\t\t\t\t\t\t\t<option value=\"<?php echo basename($file); ?>\"<?php bj_selected($section['handler'],basename($file)); ?>><?php echo $data['Handler']; ?></option>\r\n<?php\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} ?>\r\n\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t</p>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"column width50\">\r\n\t\t\t\t\t<div class=\"c-ontent\">\r\n\t\t\t\t\t\t<p class=\"label\"><label for=\"stylesheet\"><?php _e('Stylesheet'); ?></label></p>\n\t\t\t\t\t\t<p>\r\n\t\t\t\t\t\t\t<select name=\"stylesheet\" id=\"stylesheet\" class=\"width100\">\r\n<?php\r\n\t\t\t\t\t\t$css_files = glob(BJTEMPLATE.'/*.css');\r\n\t\t\t\t\t\tif(is_array($css_files)) {\r\n\t\t\t\t\t\t\tforeach($css_files as $num=>$file) { ?>\r\n\t\t\t\t\t\t\t\t<option value=\"<?php echo basename($file); ?>\"<?php bj_selected($section['stylesheet'],basename($file)); ?>><?php echo basename($file); ?></option>\r\n<?php\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} ?>\r\n\t\t\t\t\t\t\t</select>\r\n\t\t\t\t\t\t</p>\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class=\"clear\"></div>\r\n<?php\r\n\t\t\t\t\tif($section['ID'] == \"0\") { ?>\r\n\t\t\t\t<input type=\"hidden\" name=\"new-section-send\" value=\"yes\" />\r\n<?php\r\n\t\t\t\t\t} else { ?>\r\n\t\t\t\t<input type=\"hidden\" name=\"edit-section-send\" value=\"yes\" />\r\n\t\t\t\t<input type=\"hidden\" name=\"edit-section-id\" value=\"<?php echo $section['ID']; ?>\" />\r\n<?php\r\n\t\t\t\t\t} ?>\r\n\t\t\t\t<p class=\"submit\">\r\n<?php\r\n\t\t\t\t\tif($section['ID'] != \"0\") { ?>\r\n\t\t\t\t\t<input type=\"submit\" name=\"save-del\" value=\"<?php _e('Delete'); ?>\" class=\"button_deleteme\" />\r\n<?php\r\n\t\t\t\t\t} ?>\r\n\t\t\t\t\t<input type=\"submit\" name=\"save\" value=\"<?php _e('Save'); ?>\" />\r\n\t\t\t\t</p>\r\n\t\t\t</form>\r\n<?php\r\n\tif($inline) { ?>\r\n\t\t\t<script type=\"text/javascript\">\r\n\t\t\t$('sectionform').onsubmit = function(){\r\n\t\t\t\tblackJack.ajaxAdd('sections.php?req=ajaxadd',this,'headings');\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t</script>\r\n<?php\r\n\t}\r\n\t$content = run_actions('section_editor',ob_get_contents());\r\n\tob_end_clean();\r\n\techo $content;\r\n}", "function form_wysiwyg($name, $value, $content_type='', $content_id='', $tempkey='', $height = 300) {\n\n\trequire_once(INC . 'classes/class_DpFCKeditor.php') ;\n\n\t$wysiwyg = new DpFCKeditor($name) ;\n\t$wysiwyg->BasePath = WEB . 'includes/3rdparty/fckeditor/';\n\t$wysiwyg->Value\t= $value;\n\t$wysiwyg->Height = $height;\n\t$wysiwyg->Config['ImageUploadURL'] = '../../../../../tech/home/uploadimage.php?content_type=' . $content_type . '&content_id=' . $content_id . '&tempkey=' . $tempkey;\n\n\treturn $wysiwyg->CreateHtml();\n\n}", "function show_form()\n\t{\n\t\t//-----------------------------------------\n\t\t// INIT\n\t\t//-----------------------------------------\n\n\t\t$raw_post = \"\";\n\t\t\n\t\t//-----------------------------------------\n\t\t// Unconvert the saved post if required\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( ! isset($_POST['Post']) )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// If we're using RTE, then just clean up html\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\tif ( $this->han_editor->method == 'rte' )\n\t\t\t{\n\t\t\t\t$raw_post = $this->parser->convert_ipb_html_to_html( $this->orig_post['post'] );\n\n\t\t\t\tif( intval($this->orig_post['post_htmlstate']) AND $this->forum['use_html'] AND $this->ipsclass->member['g_dohtml'] )\n\t\t\t\t{\n\t\t\t\t\t# Make EMO_DIR safe so the ^> regex works\n\t\t\t\t\t$raw_post = str_replace( \"<#EMO_DIR#>\", \"&lt;#EMO_DIR&gt;\", $raw_post );\n\t\t\t\t\t\n\t\t\t\t\t# New emo\n\t\t\t\t\t$raw_post = preg_replace( \"#(\\s)?<([^>]+?)emoid=\\\"(.+?)\\\"([^>]*?)\".\">(\\s)?#is\", \"\\\\1\\\\3\\\\5\", $raw_post );\n\t\t\t\t\t\n\t\t\t\t\t# And convert it back again...\n\t\t\t\t\t$raw_post = str_replace( \"&lt;#EMO_DIR&gt;\", \"<#EMO_DIR#>\", $raw_post );\n\n\t\t\t\t\t$raw_post = $this->parser->convert_std_to_rte( $raw_post );\n\t\t\t\t}\n\n\t\t\t\tif( isset($this->orig_post['post_htmlstate']) AND $this->orig_post['post_htmlstate'] == 2 )\n\t\t\t\t{\n\t\t\t\t\t$raw_post = str_replace( '&lt;br&gt;', \"<br />\", $raw_post );\n\t\t\t\t\t$raw_post = str_replace( '&lt;br /&gt;', \"<br />\", $raw_post );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->orig_post['post_htmlstate'] = isset($this->orig_post['post_htmlstate']) ? $this->orig_post['post_htmlstate'] : 0;\n\t\t\t\t$this->parser->parse_html = intval($this->orig_post['post_htmlstate']) AND $this->forum['use_html'] AND $this->ipsclass->member['g_dohtml'] ? 1 : 0;\n\t\t\t\t$this->parser->parse_nl2br = (isset($this->orig_post['post_htmlstate']) AND $this->orig_post['post_htmlstate'] == 2) ? 1 : 0;\n\t\t\t\t$this->parser->parse_smilies = intval($this->orig_post['use_emo']);\n\t\t\t\t$this->parser->parse_bbcode = $this->forum['use_ibc'];\n\n\t\t\t\tif( $this->parser->parse_html )\n\t\t\t\t{\n\t\t\t\t\t# Make EMO_DIR safe so the ^> regex works\n\t\t\t\t\t$this->orig_post['post'] = str_replace( \"<#EMO_DIR#>\", \"&lt;#EMO_DIR&gt;\", $this->orig_post['post'] );\n\t\t\t\t\t\n\t\t\t\t\t# New emo\n\t\t\t\t\t$this->orig_post['post'] = preg_replace( \"#(\\s)?<([^>]+?)emoid=\\\"(.+?)\\\"([^>]*?)\".\">(\\s)?#is\", \"\\\\1\\\\3\\\\5\", $this->orig_post['post'] );\n\t\t\t\t\t\n\t\t\t\t\t# And convert it back again...\n\t\t\t\t\t$this->orig_post['post'] = str_replace( \"&lt;#EMO_DIR&gt;\", \"<#EMO_DIR#>\", $this->orig_post['post'] );\n\t\t\t\t\n\t\t\t\t\t$this->orig_post['post'] = $this->parser->convert_ipb_html_to_html( $this->orig_post['post'] );\n\t\t\t\t\t\n\t\t\t\t\t$this->orig_post['post'] = htmlspecialchars( $this->orig_post['post'] );\n\t\t\t\t\t\n\t\t\t\t\tif( $this->parser->parse_nl2br )\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->orig_post['post'] = str_replace( '&lt;br&gt;', \"\\n\", $this->orig_post['post'] );\n\t\t\t\t\t\t$this->orig_post['post'] = str_replace( '&lt;br /&gt;', \"\\n\", $this->orig_post['post'] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$raw_post = $this->parser->pre_edit_parse( $this->orig_post['post'] );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ( $this->han_editor->method != 'rte' )\n\t\t\t{\n\t\t\t\t$_POST['Post'] = str_replace( '&', '&amp;', $_POST['Post'] );\n\t\t\t}\n\n\t\t\tif ( $this->ipsclass->input['_from'] == 'quickedit' )\n\t\t\t{\n\t\t\t\t$this->orig_post['post_htmlstatus'] = isset($this->orig_post['post_htmlstatus']) ? $this->orig_post['post_htmlstatus'] : 0;\n\t\t\t\t$this->parser->parse_html = intval($this->orig_post['post_htmlstatus']) AND $this->forum['use_html'] AND $this->ipsclass->member['g_dohtml'] ? 1 : 0;\n\t\t\t\t$this->parser->parse_nl2br = (isset($this->ipsclass->input['post_htmlstatus']) AND $this->ipsclass->input['post_htmlstatus'] == 2) ? 1 : 0;\n\t\t\t\t$this->parser->parse_smilies = intval($this->orig_post['use_emo']);\n\t\t\t\t$this->parser->parse_bbcode = $this->forum['use_ibc'];\n\n\t\t\t\tif ( $this->han_editor->method == 'rte' )\n\t\t\t\t{\n\t\t\t\t\t$raw_post = $this->parser->convert_std_to_rte( $this->ipsclass->txt_stripslashes( $_POST['Post'] ) );\n\t\t\t\t\t\n\t\t\t\t\tforeach( $this->ipsclass->skin['_macros'] as $row )\n\t\t\t \t{\n\t\t\t\t\t\tif ( $row['macro_value'] != \"\" )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$raw_post = str_replace( \"<{\".$row['macro_value'].\"}>\", $row['macro_replace'], $raw_post );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$raw_post = str_replace( \"<#IMG_DIR#>\", $this->ipsclass->skin['_imagedir'], $raw_post );\n\t\t\t\t\t$raw_post = str_replace( \"<#EMO_DIR#>\", $this->ipsclass->skin['_emodir'] , $raw_post );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$raw_post = $this->ipsclass->txt_stripslashes( $_POST['Post'] );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$raw_post = $this->ipsclass->txt_stripslashes( $_POST['Post'] );\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Is this the first post in the topic?\n\t\t//-----------------------------------------\n\t\t\n\t\t$topic_title = \"\";\n\t\t$topic_desc = \"\";\n\t\t\n\t\tif ( $this->edit_title == 1 )\n\t\t{\n\t\t\t$topic_title = isset($_POST['TopicTitle']) ? $this->ipsclass->input['TopicTitle'] : $this->topic['title'];\n\t\t\t$topic_desc = isset($_POST['TopicDesc']) ? $this->ipsclass->input['TopicDesc'] : $this->topic['description'];\n\t\t\t\n\t\t\t$topic_title = $this->ipsclass->compiled_templates['skin_post']->topictitle_fields( array( 'TITLE' => $topic_title, 'DESC' => $topic_desc ) );\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Do we have any posting errors?\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( isset($this->obj['post_errors']) AND $this->obj['post_errors'] )\n\t\t{\n\t\t\t$this->output .= $this->ipsclass->compiled_templates['skin_post']->errors( $this->ipsclass->lang[ $this->obj['post_errors'] ]);\n\t\t}\n\t\t\n\t\tif ( isset($this->obj['preview_post']) AND $this->obj['preview_post'] )\n\t\t{\n\t\t\t$this->output .= $this->ipsclass->compiled_templates['skin_post']->preview( $this->show_post_preview( $this->post['post'], $this->post_key ) );\n\t\t}\n\t\t\n\t\t$this->output .= $this->html_start_form( array( 1 => array( 'CODE' , '09' ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t2 => array( 't' , $this->topic['tid']),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t3 => array( 'p' , $this->ipsclass->input['p'] ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t4 => array( 'st' , $this->ipsclass->input['st'] ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t5 => array( 'attach_post_key', $this->post_key )\n\t\t\t\t\t\t\t\t\t\t\t ) );\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t//-----------------------------------------\n\t\t// START TABLE\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->output .= $this->ipsclass->compiled_templates['skin_post']->table_structure();\n\t\t\n\t\t$start_table = $this->ipsclass->compiled_templates['skin_post']->table_top( \"{$this->ipsclass->lang['top_txt_edit']} {$this->topic['title']}\");\n\t\t\n\t\t$name_fields = $this->html_name_field();\n\t\t\n\t\t$post_box = $this->html_post_body( $raw_post );\n\t\t\t\n\t\t$mod_options = $this->edit_title == 1 ? $this->mod_options('edit') : '';\n\t\t\n\t\t$end_form = $this->ipsclass->compiled_templates['skin_post']->EndForm( $this->ipsclass->lang['submit_edit'] );\n\t\t\n\t\t$post_icons = $this->html_post_icons($this->orig_post['icon_id']);\n\t\t\n\t\t$upload_field = $this->can_upload ? $this->html_build_uploads($this->post_key,'edit',$this->orig_post['pid']) : '';\n\t\t\n\t\t//-----------------------------------------\n\t\t// Still here?\n\t\t//-----------------------------------------\n\t\t\n\t\t$poll_box = \"\";\n\t\t\n\t\tif ( $this->can_add_poll )\n\t\t{\n\t\t\t//-----------------------------------------\n\t\t\t// Did someone hit preview / do we have\n\t\t\t// post info?\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$poll_questions = \"\";\n\t\t\t$poll_choices = \"\";\n\t\t\t$poll_votes = \"\";\n\t\t\t$show_open = 0;\n\t\t\t$is_mod = 0;\n\t\t\t$poll_only\t\t= \"\";\n\t\t\t$poll_multi\t\t= \"\";\t\t\t\n\t\t\t\n\t\t\tif ( isset($_POST['question']) AND is_array( $_POST['question'] ) and count( $_POST['question'] ) )\n\t\t\t{\n\t\t\t\tforeach( $_POST['question'] as $id => $question )\n\t\t\t\t{\n\t\t\t\t\t$poll_questions .= \"\\t{$id} : '\".str_replace( \"'\", '&#39;', $question ).\"',\\n\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$poll_question = $this->ipsclass->input['poll_question'];\n\t\t\t\t$show_open = 1;\n\t\t\t\t\n\t\t\t\tif ( is_array( $_POST['choice'] ) and count( $_POST['choice'] ) )\n\t\t\t\t{\n\t\t\t\t\tforeach( $_POST['choice'] as $id => $choice )\n\t\t\t\t\t{\n\t\t\t\t\t\t$poll_choices .= \"\\t'{$id}' : '\".str_replace( \"'\", '&#39;', $choice ).\"',\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( isset($_POST['multi']) AND is_array( $_POST['multi'] ) and count( $_POST['multi'] ) )\n\t\t\t\t{\n\t\t\t\t\tforeach( $_POST['multi'] as $id => $checked )\n\t\t\t\t\t{\n\t\t\t\t\t\t$poll_multi .= \"\\t{$id} : '{$checked}',\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( is_array( $_POST['votes'] ) and count( $_POST['votes'] ) )\n\t\t\t\t{\n\t\t\t\t\tforeach( $_POST['votes'] as $id => $vote )\n\t\t\t\t\t{\n\t\t\t\t\t\t$poll_votes .= \"\\t'{$id}' : '\".$vote.\"',\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$poll_only = 0;\n\t\t\t\t\n\t\t\t\tif( $this->ipsclass->vars['ipb_poll_only'] AND $this->ipsclass->input['poll_only'] == 1 )\n\t\t\t\t{\n\t\t\t\t\t$poll_only = \"checked='checked'\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$poll_questions = preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_questions );\n\t\t\t\t$poll_choices = preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_choices );\n\t\t\t\t$poll_multi \t= preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_multi );\n\t\t\t\t$poll_votes = preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_votes );\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Load the poll from the DB\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'polls', 'where' => \"tid=\".$this->topic['tid'] ) );\n\t\t\t\t$this->ipsclass->DB->simple_exec();\n\t\t\n\t \t\t$this->poll_data = $this->ipsclass->DB->fetch_row();\n\t \t\t\n\t \t\t$this->poll_answers = $this->poll_data['choices'] ? unserialize(stripslashes($this->poll_data['choices'])) : array();\n\n \t\t//-----------------------------------------\n \t\t// Lezz go\n \t\t//-----------------------------------------\n \t\t\n \t\tforeach( $this->poll_answers as $question_id => $data )\n \t\t{\n \t\t\t$poll_questions .= \"\\t{$question_id} : '\".str_replace( \"'\", '&#39;', $data['question'] ).\"',\\n\";\n \t\t\t\n \t\t\t$data['multi']\t = isset($data['multi']) ? intval($data['multi']) : 0;\n \t\t\t$poll_multi \t.= \"\\t{$question_id} : '\".$data['multi'].\"',\\n\";\n \t\t\t\n \t\t\tforeach( $data['choice'] as $choice_id => $text )\n\t\t\t\t\t{\n\t\t\t\t\t\t$choice = $text;\n\t\t\t\t\t\t$votes = intval($data['votes'][ $choice_id ]);\n\t\t\t\t\t\t\n\t\t\t\t\t\t$poll_choices .= \"\\t'{$question_id}_{$choice_id}' : '\".str_replace( \"'\", '&#39;', $choice ).\"',\\n\";\n\t\t\t\t\t\t$poll_votes .= \"\\t'{$question_id}_{$choice_id}' : '\".$votes.\"',\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$poll_only = 0;\n\t\t\t\t\n\t\t\t\tif ( $this->ipsclass->vars['ipb_poll_only'] AND $this->poll_data['poll_only'] == 1 )\n\t\t\t\t{\n\t\t\t\t\t$poll_only = \"checked='checked'\";\n\t\t\t\t}\t\t\t\t\n\t\t\t\t\n\t\t\t\t//-----------------------------------------\n\t\t\t\t// Trim off trailing commas (Safari hates it)\n\t\t\t\t//-----------------------------------------\n\t\t\t\t\n\t\t\t\t$poll_questions = preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_questions );\n\t\t\t\t$poll_choices = preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_choices );\n\t\t\t\t$poll_multi \t= preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_multi );\n\t\t\t\t$poll_votes = preg_replace( \"#,(\\n)?$#\", \"\\\\1\", $poll_votes );\n\t\t\t\t\n\t\t\t\t$poll_question = $this->poll_data['poll_question'];\n\t\t\t\t$show_open = $this->poll_data['choices'] ? 1 : 0;\n\t\t\t\t$is_mod = $this->can_add_poll_mod;\n\t\t\t}\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Print poll box\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$poll_box = $this->ipsclass->compiled_templates['skin_post']->poll_box( $this->max_poll_questions, $this->max_poll_choices_per_question, $poll_questions, $poll_choices, $poll_votes, $show_open, $poll_question, $is_mod, $poll_multi, $poll_only );\n\t\t}\n\t\t\n\t\t$edit_option = \"\";\n\t\t\n\t\tif ($this->ipsclass->member['g_append_edit'])\n\t\t{\n\t\t\t$checked = \"\";\n\t\t\t$show_reason = 0;\n\t\t\t\n\t\t\tif ($this->orig_post['append_edit'])\n\t\t\t{\n\t\t\t\t$checked = \"checked\";\n\t\t\t}\n\t\t\t\n\t\t\tif ( $this->moderator['edit_post'] OR $this->ipsclass->member['g_is_supmod'] )\n\t\t\t{\n\t\t\t\t$show_reason = 1;\n\t\t\t}\n\t\t\t\n\t\t\t$edit_option = $this->ipsclass->compiled_templates['skin_post']->add_edit_box( $checked, $show_reason, $this->ipsclass->input['post_edit_reason'] ? $this->ipsclass->input['post_edit_reason'] : $this->orig_post['post_edit_reason'] );\n\t\t}\n\t\t\n\t\t$this->output = str_replace( \"<!--START TABLE-->\" , $start_table , $this->output );\n\t\t$this->output = str_replace( \"<!--NAME FIELDS-->\" , $name_fields , $this->output );\n\t\t$this->output = str_replace( \"<!--POST BOX-->\" , $post_box , $this->output );\n\t\t$this->output = str_replace( \"<!--POLL BOX-->\" , $poll_box , $this->output );\n\t\t$this->output = str_replace( \"<!--POST ICONS-->\" , $post_icons , $this->output );\n\t\t$this->output = str_replace( \"<!--END TABLE-->\" , $end_form , $this->output );\n\t\t$this->output = str_replace( \"<!--UPLOAD FIELD-->\", $upload_field , $this->output );\n\t\t$this->output = str_replace( \"<!--MOD OPTIONS-->\" , $edit_option . $mod_options , $this->output );\n\t\t$this->output = str_replace( \"<!--FORUM RULES-->\" , $this->ipsclass->print_forum_rules($this->forum), $this->output );\n\t\t$this->output = str_replace( \"<!--TOPIC TITLE-->\" , $topic_title , $this->output );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Add in siggy buttons and such\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->input['post_htmlstatus'] = $this->orig_post['post_htmlstate'];\n\t\t$this->ipsclass->input['enablesig']\t\t = $this->orig_post['use_sig'];\n\t\t$this->ipsclass->input['enableemo']\t\t = $this->orig_post['use_emo'];\n\t\t\n\t\t$this->html_checkboxes('edit', $this->topic['tid'], $this->forum['id']);\n\t\t\n\t\t$this->html_topic_summary( $this->topic['tid'] );\n\t\t\n\t\t$this->show_post_navigation();\n\t\t\t\t\t\t \n\t\t$this->title = $this->ipsclass->lang['editing_post'].' '.$this->topic['title'];\n\t\t\n\t\t$this->ipsclass->print->add_output( $this->output );\n\t\t\n $this->ipsclass->print->do_output( array( 'TITLE' => $this->ipsclass->vars['board_name'].\" -> \".$this->title,\n \t\t\t\t\t \t 'JS' => 1,\n \t\t\t\t\t \t 'NAV' => $this->nav,\n \t\t\t\t\t ) );\n\t}", "function makeForm ()\n{\n\trequire('colors/colors.php');\n\t$inRow = false;\n\t$isSubmission = isset($_REQUEST['submission']) && ($_REQUEST['submission'] == 'yes');\n\techo \"<form method=\\\"get\\\">\\n\";\n\techo \"<input type=\\\"hidden\\\" name=\\\"submission\\\" value='no'/>\\n\";\n\techo \"<table>\\n\";\n\n\t\n\tfor ($i = 1; $i <= 4; $i++)\n\t{\n\t\t// If not in row, create new row and toggle $inRow, if in row simply toggle $inRow\n\t\tif(!$inRow)\n\t\t{\n\t\t\techo \"<tr>\\n\";\n\t\t\t$inRow = true;\n\t\t}\n\t\telse\n\t\t\t$inRow = false;\n\t\t\n\t\t// Start this section of data\n\t\techo \"<td>\\n\";\n\t\t\n\t\t// Insert caption box\n\t\t$captionbox = \"captionbox\" . $i;\n\t\t$value = empty($_REQUEST) ? \"\" : $_REQUEST[$captionbox];\n\t\techo \"<p>\\n\";\n\t\techo \"\\t<label for=\\\"$captionbox\\\">Enter Caption:</label>\\n\";\n\t\techo \"\\t<input type=\\\"text\\\" id=\\\"$captionbox\\\" name=\\\"$captionbox\\\" value=\\\"$value\\\"/>\\n\";\n\t\techo \"</p>\\n\";\n\t\tif($isSubmission)\n\t\t\tcaptionError($captionbox);\n\t\t\n\t\t// Insert Color drop down menu\n\t\t$selectBox = \"selectbox\" . $i;\n\t\t$colorMenu = createColors($colorTypes, $selectBox, $defaultColor);\n\t\techo $colorMenu;\n\t\t\n\t\t// Insert radio buttons and thumbs\n\t\t$radioBox = \"radioBox\" . $i;\n\t\t$radioMenu = createRadios($radioBox, $i);\n\t\techo $radioMenu;\n\t\tif($isSubmission)\n\t\t\tradioError($radioBox);\n\t\t\n\t\t// End data entry\n\t\techo \"</td>\\n\";\n\t\t\n\t\t// If no longer in row, end the row\n\t\tif(!$inRow)\n\t\t{\n\t\t\techo \"</tr>\\n\";\n\t\t}\n\t}\n\t\n\techo \"</table>\";\n\techo \"<input type=\\\"submit\\\" id=\\\"submit\\\" onclick=\\\"submission.value='yes'\\\" value=\\\"Make captions\\\"/>\\n\";\n\techo \"</form>\\n\";\n}", "public function generate()\n\t{\n if (is_array($GLOBALS['TL_JAVASCRIPT']))\n\t\t{\n\t\t\tarray_insert($GLOBALS['TL_JAVASCRIPT'], 1, 'bundles/hschottmtextwizard/js/textwizard.min.js');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$GLOBALS['TL_JAVASCRIPT'] = array('bundles/hschottmtextwizard/js/textwizard.min.js');\n\t\t}\n\n\t\t$arrButtons = array('new', 'copy', 'delete', 'drag');\n\t\t// Make sure there is at least an empty array\n\t\tif (empty($this->varValue) || !\\is_array($this->varValue))\n\t\t{\n\t\t\t$this->varValue = array('');\n\t\t}\n\t\t// Initialize the tab index\n\t\tif (!\\Cache::has('tabindex'))\n\t\t{\n\t\t\t\\Cache::set('tabindex', 1);\n\t\t}\n\n $hasTitles = array_key_exists('buttonTitles', $this->arrConfiguration) && is_array($this->arrConfiguration['buttonTitles']);\n\n $return = ($this->wizard) ? '<div class=\"tl_wizard\">' . $this->wizard . '</div>' : '';\n\t\t$return .= '<ul id=\"ctrl_'.$this->strId.'\" class=\"tl_listwizard tl_textwizard\">';\n\t\t// Add input fields\n\t\tfor ($i=0, $c=\\count($this->varValue); $i<$c; $i++)\n\t\t{\n\t\t\t$return .= '\n <li><input type=\"text\" name=\"'.$this->strId.'[]\" class=\"tl_text\" value=\"'.\\StringUtil::specialchars($this->varValue[$i]).'\"' . $this->getAttributes() . '> ';\n\t\t\t// Add buttons\n\t\t\tforeach ($arrButtons as $button)\n\t\t\t{\n\t\t\t\tif ($button == 'drag')\n\t\t\t\t{\n\t\t\t\t\t$return .= ' <button type=\"button\" class=\"drag-handle\" title=\"' . \\StringUtil::specialchars($GLOBALS['TL_LANG']['MSC']['move']) . '\" aria-hidden=\"true\">' . \\Image::getHtml('drag.svg') . '</button>';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n $buttontitle = ($hasTitles && array_key_exists($button, $this->arrConfiguration['buttonTitles'])) ? $this->arrConfiguration['buttonTitles'][$button] : $GLOBALS['TL_LANG']['MSC']['lw_'.$button];\n\t\t\t\t\t$return .= ' <button type=\"button\" data-command=\"' . $button . '\" title=\"' . \\StringUtil::specialchars($buttontitle) . '\">' . \\Image::getHtml($button.'.svg') . '</button>';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$return .= '</li>';\n\t\t}\n\t\treturn $return.'\n </ul>\n <script>TextWizard.textWizard(\"ctrl_'.$this->strId.'\")</script>';\n\t}", "public function generate()\n\t{\n\t\t$GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/coursebuilderwizard/html/coursebuilderwizard.js';\n\t\t$GLOBALS['TL_CSS'][] = 'system/modules/coursebuilderwizard/html/coursebuilderwizard.css';\n\t\n\t\n\t\t$this->import('Database');\n\n\t\t$arrButtons = array('copy', 'up', 'down', 'delete');\n\t\t$strCommand = 'cmd_' . $this->strField;\n\n\t\t// Change the order\n\t\tif ($this->Input->get($strCommand) && is_numeric($this->Input->get('cid')) && $this->Input->get('id') == $this->currentRecord)\n\t\t{\n\t\t\tswitch ($this->Input->get($strCommand))\n\t\t\t{\n\t\t\t\tcase 'copy':\n\t\t\t\t\t$this->varValue = array_duplicate($this->varValue, $this->Input->get('cid'));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'up':\n\t\t\t\t\t$this->varValue = array_move_up($this->varValue, $this->Input->get('cid'));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'down':\n\t\t\t\t\t$this->varValue = array_move_down($this->varValue, $this->Input->get('cid'));\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'delete':\n\t\t\t\t\t$this->varValue = array_delete($this->varValue, $this->Input->get('cid'));\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$elements = array();\n\t\t\n\t\t// Get all available options to assemble the courses\n\t\tforeach($GLOBALS['CB_ELEMENT'] as $strClass=>$arrData)\n\t\t{\n\t\t\t$objElements = $this->Database->prepare(\"SELECT id, name FROM {$arrData['table']} ORDER BY name\")->execute();\n\t\t\t\n\t\t\tif ($objElements->numRows)\n\t\t\t{\n\t\t\t\twhile($objElements->next())\n\t\t\t\t{\n\t\t\t\t\t$arrEl = $objElements->row(); \n\t\t\t\t\t$arrEl['type'] = $strClass;\n\t\t\t\t\t$elements[] = $arrEl;\n\t\t\t\t}\n\t\t\t\n\t\t\t}\t\t\t\n\t\t}\n\t\t\n\t\t// Get new value\n\t\tif ($this->Input->post('FORM_SUBMIT') == $this->strTable)\n\t\t{\n\t\t\t$this->varValue = $this->Input->post($this->strId);\n\t\t}\n\n\t\t// Make sure there is at least an empty array\n\t\tif (!is_array($this->varValue) || !$this->varValue[0])\n\t\t{\n\t\t\t$this->varValue = array('');\n\t\t}\n\n\t\t// Save the value\n\t\tif ($this->Input->get($strCommand) || $this->Input->post('FORM_SUBMIT') == $this->strTable)\n\t\t{\n\t\t\t$this->Database->prepare(\"UPDATE \" . $this->strTable . \" SET \" . $this->strField . \"=? WHERE id=?\")\n\t\t\t\t\t\t ->execute(serialize($this->varValue), $this->currentRecord);\n\n\t\t\t// Reload the page\n\t\t\tif (is_numeric($this->Input->get('cid')) && $this->Input->get('id') == $this->currentRecord)\n\t\t\t{\n\t\t\t\t$this->redirect(preg_replace('/&(amp;)?cid=[^&]*/i', '', preg_replace('/&(amp;)?' . preg_quote($strCommand, '/') . '=[^&]*/i', '', $this->Environment->request)));\n\t\t\t}\n\t\t}\n\n\t\t// Add label and return wizard\n\t\t$return .= '<table cellspacing=\"0\" cellpadding=\"0\" id=\"ctrl_'.$this->strId.'\" class=\"tl_courseBuilderWizard\" summary=\"Course wizard\">\n <thead>\n <tr>\n <td>'.$GLOBALS['TL_LANG']['MSC']['cb_course'].'</td>\n <td>&nbsp;</td>\n </tr>\n </thead>\n <tbody>';\n\n\t\t// Load tl_article language file\n\t\t$this->loadLanguageFile('tl_article');\n\n\t\t// Add input fields\n\t\tfor ($i=0; $i<count($this->varValue); $i++)\n\t\t{\n\t\t\t$options = '';\n\n\t\t\t// Add modules\n\t\t\tforeach ($elements as $v)\n\t\t\t{\n\t\t\t\t$options .= '<option value=\"'.specialchars($v['type']).'|'.specialchars($v['id']).'\"'.$this->optionSelected($v['type'].'|'.$v['id'], $this->varValue[$i]).'>'.$v['name'].'</option>';\n\t\t\t}\n\n\t\t\t$return .= '\n <tr>\n <td><select name=\"'.$this->strId.'['.$i.']\" class=\"tl_select\" onfocus=\"Backend.getScrollOffset();\">'.$options.'</select></td>';\n\t\t\t\n\t\t\t$return .= '<td>';\n\n\t\t\tforeach ($arrButtons as $button)\n\t\t\t{\n\t\t\t\t$return .= '<a href=\"'.$this->addToUrl('&amp;'.$strCommand.'='.$button.'&amp;cid='.$i.'&amp;id='.$this->currentRecord).'\" title=\"'.specialchars($GLOBALS['TL_LANG']['MSC']['mw_'.$button]).'\" onclick=\"CourseBuilderWizard.coursebuilderWizard(this, \\''.$button.'\\', \\'ctrl_'.$this->strId.'\\'); return false;\">'.$this->generateImage($button.'.gif', $GLOBALS['TL_LANG']['MSC']['mw_'.$button], 'class=\"tl_listwizard_img\"').'</a> ';\n\t\t\t}\n\n\t\t\t$return .= '</td>\n </tr>';\n\t\t}\n\n\t\treturn $return.'\n </tbody>\n </table>';\n\t}", "function cjpopups_shortcode_form($options){\n\tinclude(sprintf('%s/shortcode_form.php', cjpopups_item_path('includes_dir')));\n\treturn implode(\"\\n\", $display);\n}", "public function cloudviewForm(): string\n {\n $rcmail = rcmail::get_instance();\n\n $boxTitle = html::div(['class' => 'boxtitle'], rcmail::Q($this->gettext('plugin_settings_title')));\n\n $saveButton = (new html_button())->show(\n rcmail::Q($this->gettext('save')),\n [\n 'type' => 'input',\n 'class' => 'btn button submit mainaction',\n 'onclick' => \"return rcmail.command('plugin.cloudview-save', '', this, event)\",\n ]\n );\n\n $objectTable = new html_table(['cols' => 2, 'class' => 'propform']);\n\n // option: enable this plugin or not\n $objectCloudviewEnabled = new html_checkbox([\n 'name' => '_cloudview_enabled',\n 'id' => '_cloudview_enabled',\n 'value' => 1,\n ]);\n $objectTable->add('title', html::label('_cloudview_enabled', rcmail::Q($this->gettext('plugin_enabled'))));\n $objectTable->add('', $objectCloudviewEnabled->show($this->prefs['cloudview_enabled'] ? 1 : 0));\n\n // option: choose cloud viewer\n $objectCloudviewViewer = new html_select(['name' => '_cloudview_viewer', 'id' => '_cloudview_viewer']);\n $objectCloudviewViewer->add(\n [\n rcmail::Q($this->gettext('viewer_microsoft_office_web')),\n rcmail::Q($this->gettext('viewer_google_docs')),\n ],\n [\n self::VIEWER_MICROSOFT_OFFICE_WEB,\n self::VIEWER_GOOGLE_DOCS,\n ]\n );\n $objectTable->add('title', html::label('_cloudview_viewer', rcmail::Q($this->gettext('select_viewer'))));\n $objectTable->add('', $objectCloudviewViewer->show($this->prefs['cloudview_viewer']));\n\n $table = $objectTable->show();\n $form = html::div(['class' => 'boxcontent'], $table . $saveButton);\n\n // responsive layout for the \"elastic\" skin\n if (RoundcubeHelper::getBaseSkinName() === 'elastic') {\n $containerAttrs = ['class' => 'formcontent'];\n } else {\n $containerAttrs = [];\n }\n\n $rcmail->output->add_gui_object('cloudview-form', 'cloudview-form');\n\n return html::div($containerAttrs, $rcmail->output->form_tag(\n [\n 'id' => 'cloudview-form',\n 'name' => 'cloudview-form',\n 'method' => 'post',\n 'class' => 'propform',\n 'action' => './?_task=settings&_action=plugin.cloudview-save',\n ],\n html::div(['class' => 'box'], $boxTitle . $form)\n ));\n }", "public function append_media_upload_form() {\n \n ?>\n <!-- Add from Media Library -->\n <a href=\"#\" class=\"envira-media-library button\" title=\"<?php _e( 'Click Here to Insert from Other Image Sources', 'envira-gallery' ); ?>\" style=\"vertical-align: baseline;\">\n <?php _e( 'Select Files from Other Sources', 'envira-gallery' ); ?>\n </a>\n\n <!-- Progress Bar -->\n <div class=\"envira-progress-bar\">\n <div class=\"envira-progress-bar-inner\"></div>\n <div class=\"envira-progress-bar-status\">\n <span class=\"uploading\">\n <?php _e( 'Uploading Image', 'envira-gallery' ); ?>\n <span class=\"current\">1</span>\n <?php _e( 'of', 'envira-gallery' ); ?>\n <span class=\"total\">3</span>\n </span>\n\n <span class=\"done\"><?php _e( 'All images uploaded.', 'envira-gallery' ); ?></span>\n </div>\n </div>\n <?php\n\n }", "function html_form_code() {\n $form = \"\";\n $form.=\"<form action='\" . esc_url($_SERVER['REQUEST_URI']) . \"' method='post'>\";\n $form.=\"<input type='text' name='ms-name' value='\" . ( isset($_POST[\"ms-name\"]) ? esc_attr($_POST[\"ms-name\"]) : '' ) . \"' placeholder='Ваше Имя'/>\";\n $form.=\"<input type='email' name='ms-email' value='\" . ( isset($_POST[\"ms-email\"]) ? esc_attr($_POST[\"ms-email\"]) : '' ) . \"' placeholder='Ваш E-mail'/>\";\n $form.=\"<input name='ms-submit' type='submit' id='add-share-btn' value='Получить доступ'/>\";\n $form.=\"</form>\";\n echo $form;\n}" ]
[ "0.7886451", "0.68713915", "0.67178565", "0.6539944", "0.6483157", "0.6474773", "0.64229256", "0.6420625", "0.63697195", "0.63479596", "0.6323945", "0.63135266", "0.62959915", "0.6291068", "0.6272934", "0.6272123", "0.62512887", "0.6247538", "0.6239279", "0.6233017", "0.6231236", "0.6229104", "0.62192297", "0.6219041", "0.6171441", "0.6141108", "0.61409783", "0.6130023", "0.609278", "0.60664654", "0.6052796", "0.6041995", "0.60301584", "0.6020875", "0.6009843", "0.5990211", "0.5988356", "0.59855515", "0.5982797", "0.59824693", "0.5974245", "0.59677565", "0.5965452", "0.59546745", "0.59476703", "0.5937455", "0.5909079", "0.58944166", "0.5885427", "0.5882749", "0.58792895", "0.58788574", "0.5873863", "0.5872746", "0.58723533", "0.58646935", "0.58508515", "0.5850608", "0.5838353", "0.58340013", "0.58311534", "0.58307064", "0.58228153", "0.58156615", "0.5795184", "0.57942927", "0.57789075", "0.57780874", "0.5777978", "0.57721734", "0.5770865", "0.5765711", "0.576365", "0.57626444", "0.57579565", "0.574798", "0.5747159", "0.57308674", "0.5727316", "0.57238823", "0.57168347", "0.5713956", "0.57097095", "0.5705178", "0.57046556", "0.5696239", "0.56939095", "0.56895643", "0.568622", "0.567666", "0.56738603", "0.56691253", "0.56661034", "0.5664113", "0.56620044", "0.56579816", "0.56578046", "0.5654757", "0.56539834", "0.5652413" ]
0.7944517
0
/ Selecting an option If you have read the documentation of the `HtField` and the `HtWidget` parent classes you already know that you are supposed to use the `context` method in order to set the value of a field/widget: mdx:SelectedOption Outputs: mdx:SelectedOption o httidy
Выбор опции Если вы прочитали документацию классов `HtField` и `HtWidget`, то уже знаете, что для установки значения поля/виджета следует использовать метод `context`: mdx:SelectedOption Вывод: mdx:SelectedOption o httidy
function testSelectedOption(){ #mdx:SelectedOption $select = new HtSelect('id_category'); $select->options([1=>'Category1',2=>'Category2',3=>'Category3']); $select->context(['id_category'=>2]); #/mdx echo $select $this->expectOutputRegex("/option.*?2.*selected/"); echo $select; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function testSelectedOption(){\n\t\t#mdx:SelectedOption\n\t\t$select = new HtCklist(\"select_days\");\n\t\t$select->options([1=>'Mon',2=>'Tue',3=>'Wed',4=>'Thu',5=>'Fri',6=>'Sat']);\n\t\t$select->context(['select_days'=>[2,5]]); // check Tue and Fri\n\t\t#/mdx echo $select\n\t\t$this->expectOutputRegex(\"/input.*?2.*checked.*?input.*?5.*?checked/s\");\n\t\techo $select;\n\t}", "function select_option()\r\n{}", "protected function getSelectedValue() {}", "function hundope_select_field_render() { \n\t\n}", "function testSelected(){\n\t\t#mdx:Selected\n\t\t$choice = new SimpleChoice('season');\n\t\t$choice->options([\n\t\t\t1 => 'Spring',\n\t\t\t2 => 'Summer',\n\t\t\t3 => 'Fall',\n\t\t\t4 => 'Winter'\n\t\t]);\n\t\t$choice->context(['season'=>3]); // selects season 3 (Fall)\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"<b>3 - Fall\",\"$choice\");\n\t}", "public function select_option($id, $value)\n\t{\n\t\t$this->connection()->post(\"element/$id/selected\", array('value' => $value));\n\t}", "public function set_value($value) {\n\n // Is the select multiple?\n $multiple = $this->field->hasAttribute('multiple');\n $singleselect = ($this->field->hasClass('singleselect') || $this->field->hasClass('urlselect'));\n\n // Here we select the option(s).\n if ($multiple) {\n // Split and decode values. Comma separated list of values allowed. With valuable commas escaped with backslash.\n $options = preg_replace('/\\\\\\,/', ',', preg_split('/(?<!\\\\\\),/', trim($value)));\n // This is a multiple select, let's pass the multiple flag after first option.\n $afterfirstoption = false;\n foreach ($options as $option) {\n $this->field->selectOption(trim($option), $afterfirstoption);\n $afterfirstoption = true;\n }\n } else {\n // By default, assume the passed value is a non-multiple option.\n $this->field->selectOption(trim($value));\n }\n\n // Wait for all the possible AJAX requests that have been\n // already triggered by selectOption() to be finished.\n if ($this->running_javascript()) {\n // Trigger change event and click on first skip link, as some OS/browsers (Phantomjs, Mac-FF),\n // don't close select option field and trigger event.\n if (!$singleselect) {\n $dialoguexpath = \"//div[contains(concat(' ', normalize-space(@class), ' '), ' moodle-dialogue-focused ')]\";\n if (!$node = $this->session->getDriver()->find($dialoguexpath)) {\n $script = \"Syn.trigger('change', {}, {{ELEMENT}})\";\n try {\n $driver = $this->session->getDriver();\n if ($driver instanceof \\Moodle\\BehatExtension\\Driver\\MoodleSelenium2Driver) {\n $driver->triggerSynScript($this->field->getXpath(), $script);\n }\n $driver->click('//body//div[@class=\"skiplinks\"]');\n } catch (\\Exception $e) {\n return;\n }\n } else {\n try {\n $this->session->getDriver()->click($dialoguexpath);\n } catch (\\Exception $e) {\n return;\n }\n }\n }\n $this->session->wait(behat_base::get_timeout() * 1000, behat_base::PAGE_READY_JS);\n }\n }", "public function form_field_select ( $args ) {\n\t\t$options = $this->get_settings();\n\t\t\n\t\tif ( isset( $args['data']['options'] ) && ( count( (array)$args['data']['options'] ) > 0 ) ) {\n\t\t\t$html = '';\n\t\t\t$html .= '<select id=\"' . esc_attr( $args['key'] ) . '\" name=\"' . esc_attr( $this->token ) . '[' . esc_attr( $args['key'] ) . ']\">' . \"\\n\";\n\t\t\t\tforeach ( $args['data']['options'] as $k => $v ) {\n\t\t\t\t\t$html .= '<option value=\"' . esc_attr( $k ) . '\"' . selected( esc_attr( $options[$args['key']] ), $k, false ) . '>' . $v . '</option>' . \"\\n\";\n\t\t\t\t}\n\t\t\t$html .= '</select>' . \"\\n\";\n\t\t\techo $html;\n\t\t\t\n\t\t\tif ( isset( $args['data']['description'] ) ) {\n\t\t\t\techo '<p><span class=\"description\">' . $args['data']['description'] . '</span></p>' . \"\\n\";\n\t\t\t}\n\t\t}\n\t}", "function form_select($field, $options) {\n $defaults = array(\n 'wrap' => true,\n 'label' => true,\n 'class' => array('input', 'select'),\n 'options' => array()\n );\n\n $options = array_merge($defaults, $options);\n\n $output = '<select name=\"' . $field . '\" id=\"' . form__field_id($field) . '\">';\n foreach($options['options'] as $value => $text) {\n $output .= '<option value=\"' . $value . '\"';\n if(!empty($_POST[$field]) && $_POST[$field] == $value) {\n $output .= ' selected=\"selected\"';\n }\n $output .= '>' . $text . '</option>';\n }\n $output .= '</select>';\n\n if($options['wrap']) {\n $options['field'] = $field;\n $output = form__wrap($output, $options);\n }\n\n $error = form_error_message($field);\n if(!empty($error)) {\n $output .= $error;\n }\n \n return html__output($output);\n}", "public function select_values_for_form( EntryValueSelect $entry_value_select );", "function render_field_select($field)\n {\n }", "public function callback_select( $args ) {\n\n $name_id = $args['name_id'];\n if ($args['parent']) {\n $value = $this->get_option( $args['parent']['id'], $args['section'], $args['std'], $args['global'] );\n $value = isset($value[$args['id']]) ? $value[$args['id']] : $args['std'];\n $args['disable'] = (isset( $args['parent']['disable'])) ? $args['parent']['disable'] : false;\n }else {\n $value = $this->get_option( $args['id'], $args['section'], $args['std'], $args['global'] );\n }\n\n $disable = (isset( $args['disable'] ) && $args['disable'] === true) ? 'disabled' : '';\n $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';\n $html = sprintf( '<select class=\"%1$s\" name=\"%2$s\" id=\"%2$s\" %3$s>', $size, $name_id, $disable );\n\n foreach ( $args['options'] as $key => $label ) {\n $html .= sprintf( '<option value=\"%s\" %s>%s</option>', $key, selected( $value, $key, false ), $label );\n }\n\n $html .= sprintf( '</select>' );\n $html .= $this->get_field_description( $args );\n\n echo $html;\n }", "function barnelli_wp_select( $field ) {\n\tglobal $thepostid, $post, $vision;\n\n\t$thepostid \t\t\t\t= empty( $thepostid ) ? $post->ID : $thepostid;\n\t$field['class'] \t\t= isset( $field['class'] ) ? $field['class'] : 'select short';\n\t$field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';\n\t$field['value'] \t\t= isset( $field['value'] ) ? $field['value'] : get_post_meta( $thepostid, $field['id'], true );\n\n\techo '<p class=\"form-field ' . esc_attr( $field['id'] ) . '_field ' . esc_attr( $field['wrapper_class'] ) . '\"><label for=\"' . esc_attr( $field['id'] ) . '\">' . wp_kses_post( $field['label'] ) . '</label><select id=\"' . esc_attr( $field['id'] ) . '\" name=\"' . esc_attr( $field['id'] ) . '\" class=\"' . esc_attr( $field['class'] ) . '\">';\n\n\tforeach ( $field['options'] as $key => $value ) {\n\n\t\techo '<option value=\"' . esc_attr( $key ) . '\" ' . selected( esc_attr( $field['value'] ), esc_attr( $key ), false ) . '>' . esc_html( $value ) . '</option>';\n\n\t}\n\n\techo '</select> ';\n\n\tif ( ! empty( $field['description'] ) ) {\n\n\t\tif ( isset( $field['desc_tip'] ) ) {\n\t\t\techo '<img class=\"help_tip\" data-tip=\"' . esc_attr( $field['description'] ) . '\" src=\"' . $vision->plugin_url() . '/assets/images/help.png\" height=\"16\" width=\"16\" />';\n\t\t} else {\n\t\t\techo '<span class=\"description\">' . wp_kses_post( $field['description'] ) . '</span>';\n\t\t}\n\n\t}\n\techo '</p>';\n}", "public function setup_selected() {\n\t}", "function yaz_set_option($id, $name, $value)\n{\n}", "public function Do_select_Example1(){\n\n\t}", "public function select ( \\r8\\Form\\Select $field )\n {\n $this->addField( \"select\", $field );\n }", "public function smtp_secure_select( $args ) {\n $field_id = $args['label_for'];\n $options = $args['options'];\n $value = get_option( $field_id, $args['default'] );\n \n printf( \"<select name='%s' id='%s'>\", $field_id, $field_id );\n\n foreach ( $options as $option ) {\n $selected = '';\n\n if ( $value == $option ) {\n $selected = 'selected';\n }\n\n printf( \"<option value=%s %s>%s</option>\", $option, $selected, $option );\n }\n \n printf( \"</select>\" );\n }", "function selected($field, $value = null) {\n if ( is_string($field) ) {\n if ( $this->setting($field) == $value ) {\n echo 'selected=\"selected\"';\n }\n } else if ( (bool) $field ) {\n echo 'selected=\"selected\"';\n }\n }", "function select( \n\t $name, $title = null, $value = null, \n\t $required = false, \n\t $attributes = null,\n\t $options = array(),\n\t $datatype = Form::DATA_STRING\n\t){\n return $this->input(\n\t $name, \n\t Form::TYPE_SELECT,\n\t $title, \n\t $value, \n\t $required, \n\t $attributes,\n\t $options,\n\t $datatype\n );\n\t}", "public function set( $option, $value );", "function testOptionsFunction(){\n\t\t#mdx:OptionsFunction\n\t\t$choice = new SimpleChoice(\"category\");\n\t\t$choice->options(function(){\n\t\t\t// pretend this was fetched from the db\n\t\t\t$rows = [\n\t\t\t\t['id'=>1,'name'=>'Action'],\n\t\t\t\t['id'=>2,'name'=>'Drama'],\n\t\t\t\t['id'=>3,'name'=>'Sci-fi']\n\t\t\t];\n\n\t\t\treturn $rows;\n\n\t\t})->context(['category'=>3]); // selects category 3\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"<b>3 - Sci-fi\",\"$choice\");\n\n\t}", "function osa_field_widget_options_select_form_alter(&$element, &$form_state, $context) {\r\n\r\n // This code, while it works to populate the selection boxes when built, fails on validation\r\n // So we have hard coded the values into the form for now.\r\n /* populate the drop down with the class types\r\n if ($element['#field_name'] == 'field_class_type') {\r\n $element['#options'] = array('_none' => '- Select a value -') + osa_options_class_types();\r\n }\r\n */\r\n \r\n // populate the drop down with the list of events\r\n // only include events of type 'Group Class (Master)'\r\n if ($element['#field_name'] == 'field_event_master') {\r\n civicrm_initialize();\r\n $results = civicrm_api('event', 'get', array('event_type_id' => OSA_EVENT_GROUP_CLASS_MASTER, 'is_active' => TRUE, 'rowCount' => PHP_INT_MAX, 'version' => 3));\r\n $options = array();\r\n foreach ($results['values'] as $class) {\r\n $options[$class['id']] = $class['event_title'];\r\n }\r\n asort($options);\r\n $element['#options'] = array('_none' => '- Select a value -') + $options;\r\n }\r\n}", "function mc_option_selected( $field, $value, $type = 'checkbox' ) {\n\tswitch ( $type ) {\n\t\tcase 'radio':\n\t\tcase 'checkbox':\n\t\t\t$result = ' checked=\"checked\"';\n\t\t\tbreak;\n\t\tcase 'option':\n\t\t\t$result = ' selected=\"selected\"';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$result = '';\n\t\t\tbreak;\n\t}\n\tif ( $field == $value ) {\n\t\t$output = $result;\n\t} else {\n\t\t$output = '';\n\t}\n\n\treturn $output;\n}", "public static function renderSelect();", "function get_meta_select( $args = array(), $value = false ) { \r\r\n extract($args);\r\r\n ?>\r\r\n\t<tr>\r\r\n\t\t<th style=\"width:10%;\"><label for=\"<?php\t \t echo $args['name']; ?>\"><?php\t \t echo $args['title']; ?></label></th>\r\r\n\t\t<td>\r\r\n\t\t\t<select name=\"<?php\t \t echo $args['name']; ?>\" id=\"<?php\t \t echo $args['name']; ?>\">\r\r\n\t\t\t\t<option value=\"\"></option>\r\r\n\t\t\t\t<?php\t \t foreach ( $args['options'] as $option => $val ) : ?>\r\r\n\t\t\t\t\t<option <?php\t \t if ( htmlentities( $value, ENT_QUOTES ) == $val ) echo ' selected=\"selected\"'; ?> value=\"<?php\t \t echo $val; ?>\"><?php\t \t if ( __( 'Template:', 'hybrid') == $args['title'] ) echo $option; else echo $val; ?></option>\r\r\n\t\t\t\t<?php\t \t endforeach; ?>\r\r\n\t\t\t</select>\r\r\n\t\t\t<br /><small><?php\t \t echo $args['description']; ?></small>\r\r\n\t\t</td>\r\r\n\t</tr>\r\r\n\t<?php\t \t\r\r\n}", "public function setOption($option, $value);", "private function selectCustomField(): string\n {\n $value = $this->getValue($this->index);\n foreach($this->options as &$option) {\n if($option['key'] == $value) {\n $option['selected'] = true;\n break;\n }\n }\n\n return Template::build($this->getTemplatePath('select.html'), [\n 'id' => uniqid(\"{$this->id}-\", true),\n 'name' => $this->id,\n 'label' => $this->label,\n 'options' => $this->options,\n 'index' => isset($this->index) ? $this->index : false\n ]);\n }", "function add_to_context( $context ) {\n\t\t$context['options'] = get_fields('options');\n\t\treturn $context;\n\t}", "function meta_box_select( $args = array(), $value = false ) {\n\t\t\t$name = preg_replace( \"/[^A-Za-z_-]/\", '-', $args['name'] ); ?>\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $name; ?>\"><?php echo $args['title']; ?></label>\n\t\t\t\t<?php if ( !empty( $args['sep'] ) ) echo '<br />'; ?>\n\t\t\t\t<select name=\"<?php echo $name; ?>\" id=\"<?php echo $name; ?>\" style=\"width:60px\">\n\t\t\t\t\t<?php // echo '<option value=\"\"></option>'; ?>\n\t\t\t\t\t<?php $i = 0; foreach ( $args['options'] as $option => $val ) { $i++; ?>\n\t\t\t\t\t\t<option value=\"<?php echo esc_attr( $val ); ?>\" <?php selected( esc_attr( $value ), esc_attr( $val ) ); //if ( $i == 1 ) echo 'selected=\"selected\"'; ?>><?php echo ( !empty( $args['use_key_and_value'] ) ? $option : $val ); ?></option>\n\t\t\t\t\t<?php } ?>\n\t\t\t\t</select>\n\t\t\t\t<?php if ( !empty( $args['description'] ) ) echo '<br /><span class=\"howto\">' . $args['description'] . '</span>'; ?>\n\t\t\t</p>\n\t\t\t<?php\n\t\t}", "public function setSelect($select);", "function _field_select($fval) \n {\n\n // if need be, copy the current vals for safety + reset()\n $postedvals = (is_array($fval))? $fval : array();\n\n $res = sprintf(\"<select size=\\\"1\\\" name=\\\"%s\\\" id=\\\"%s\\\" class=\\\"%s\\\" %s>\",\n $this->fname, \n $this->fname, \n (isset($this->attribs['class']))? $this->attribs['class'] : $this->element_class,\n $this->extra_attribs);\n\n if (empty($fval) and isset($this->attribs['top_value'])) {\n $res .= \"<option value=\\\"\\\">\". $this->attribs['top_value'] .\"</option>\"; \n } \n\n $opts = $this->opts; # $this->_array_stringify($this->opts);\n foreach ($opts as $optkey => $optval) { \n $res .= sprintf(\"<option value=\\\"%s\\\"%s>%s</option>\",\n $this->_htmlentities($optkey),\n ((in_array($optkey, $postedvals) || $optkey == $fval) and !empty($fval))? \" selected\" : \"\",\n $this->_htmlentities($optval));\n }\n $res .= \"</select>\";\n return $res;\n }", "public function Option1()\n {\n $this->CallJqUiMethod(\"option\");\n }", "public function setSelectedValue($value);", "public function setOption($name, $value);", "public function setOption($name, $value);", "public function setOption($name, $value);", "public function setOption($name, $value);", "public function testSetSelected()\n\t{\n\t\t// Remove the following lines when you implement this test.\n\t\t$this->markTestIncomplete(\n\t\t\t'This test has not been implemented yet.'\n\t\t);\n\t}", "public function selectOption($select, $option)\n {\n $args = func_get_args();\n $this->waitForText($option);\n\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('selectOption', $args));\n }", "function okrs_related_to_select($value)\n{\n\n $selected = '';\n if($value == 'okrs'){\n $selected = 'selected';\n }\n echo \"<option value='okrs' \".$selected.\">\".\n _l('okrs').\"\n </option>\";\n\n}", "public function setOption($key, $value);", "function initlab_field_mailman_version_cb($args) {\n // Get the value of the setting we've registered with register_setting()\n $options = get_option('initlab_options', []);\n ?>\n <select id=\"<?php echo esc_attr($args['label_for']); ?>\" name=\"initlab_options[<?php echo esc_attr($args['label_for']); ?>]\">\n <?php\n foreach ($args['options'] as $value => $label) {\n ?>\n <option value=\"<?php echo esc_attr($value)?>\" <?php echo array_key_exists($args['label_for'], $options) ? selected($options[$args['label_for']], $value, false) : ''; ?>>\n <?php esc_html_e($label, 'initlab-addons'); ?>\n </option>\n <?php\n }\n ?>\n </select>\n <?php\n}", "public function select($field, $values = null, array $options = array(), array $attrs = array())\n\t{\n\t\tstatic::$helper->add_template($attrs);\n\t\t$out = parent::select($field, $values, $options, $attrs);\n\t\treturn $this->prepend_controls($out);\n\t}", "function select($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\t\t\tif ($args['multiple']) {\r\n\t\t\t\techo \"<select class='optselect chzn-select' multiple='true' style='\" .$this->width($args['width']) . \"' name='\" . $args['formname'] . \"\" . \"[]'>\";\r\n\t\t\t\tforeach ($args['selections'] as $key => $value) {\r\n\t\t\t\t\techo \"<option \" . (array_search($value , $args['value']) === false ? '' : 'selected' ). \" value='\" . $key . \"'>\" . $value . \"</option>\";\t\r\n\t\t\t\t}\t\r\n\t\t\t\techo \"</select>\";\r\n\t\t\t} else {\r\n\t\t\t\techo \"<select class='optselect chzn-select' style='\" .$this->width($args['width']) . \"' name='\" . $args['formname'] . \"'>\";\r\n\t\t\t\tforeach ($args['selections'] as $key => $value) {\r\n\t\t\t\t\techo \"<option \" . ($args['value'] == $key ? 'selected' : '' ). \" value='\" . $key . \"'>\" . $value . \"</option>\";\t\r\n\t\t\t\t}\t\r\n\t\t\t\techo \"</select>\";\r\n\t\t\t}\r\n\t\t\t$this->description($args['description']);\r\n\t\t}", "public function getSelected() {}", "public function getSelected() {}", "function option_helper($post, $value, $label) {\n $selected = $post->post_status == $value ? 'selected' : '';\n return \"<option value='{$value}' {$selected}>{$label}</option>\";\n }", "function ffw_port_select_callback($args) {\n global $ffw_port_settings;\n\n if ( isset( $ffw_port_settings[ $args['id'] ] ) )\n $value = $ffw_port_settings[ $args['id'] ];\n else\n $value = isset( $args['std'] ) ? $args['std'] : '';\n\n $html = '<select id=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\" name=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\"/>';\n\n foreach ( $args['options'] as $option => $name ) :\n $selected = selected( $option, $value, false );\n $html .= '<option value=\"' . $option . '\" ' . $selected . '>' . $name . '</option>';\n endforeach;\n\n $html .= '</select>';\n $html .= '<label for=\"ffw_port_settings_' . $args['section'] . '[' . $args['id'] . ']\"> ' . $args['desc'] . '</label>';\n\n echo $html;\n}", "public function select($element) {\n $element = $this->_setRender($element);\n\n $element['_render']['element'] = '';\n $element['_render']['element'] .= '<select id=\"' . $element['#id'] . '\" ';\n $element['_render']['element'] .= $element['_attributes_string'];\n $element['_render']['element'] .= sprintf(' data-wpt-type=\"%s\"', __FUNCTION__);\n /**\n * multiple\n */\n if (array_key_exists('#multiple', $element) && $element['#multiple']) {\n $element['_render']['element'] .= ' multiple=\"multiple\"';\n $element['_render']['element'] .= ' name=\"' . $element['#name'] . '[]\"';\n } else {\n $element['_render']['element'] .= ' name=\"' . $element['#name'] . '\"';\n }\n $element['_render']['element'] .= \">\\r\\n\";\n $count = 1;\n foreach ($element['#options'] as $id => $value) {\n if (!is_array($value)) {\n $value = array('#title' => $id, '#value' => $value, '#type' => 'option');\n }\n $value['#type'] = 'option';\n if (!isset($value['#value'])) {\n $value['#value'] = $this->_count['select'] . '-' . $count;\n $count += 1;\n }\n $element['_render']['element'] .= '<option value=\"' . htmlspecialchars($value['#value']) . '\"';\n $element['_render']['element'] .= $this->_setElementAttributes($value);\n if (array_key_exists('#types-value', $value)) {\n $element['_render']['element'] .= sprintf(' data-types-value=\"%s\"', $value['#types-value']);\n }\n /**\n * type and data_id\n */\n $element['_render']['element'] .= ' data-wpt-type=\"option\"';\n $element['_render']['element'] .= $this->_getDataWptId($element);\n /**\n * selected\n */\n if (array_key_exists('#multiple', $element) && $element['#multiple']) {\n if (is_array($element['#default_value']) && in_array($value['#value'], $element['#default_value'])) {\n $element['_render']['element'] .= ' selected=\"selected\"';\n }\n } elseif ($element['#default_value'] == $value['#value']) {\n $element['_render']['element'] .= ' selected=\"selected\"';\n }\n $element['_render']['element'] .= '>';\n $element['_render']['element'] .= isset($value['#title']) ? $value['#title'] : $value['#value'];\n $element['_render']['element'] .= \"</option>\\r\\n\";\n }\n $element['_render']['element'] .= '</select>';\n $element['_render']['element'] .= PHP_EOL;\n\n $pattern = $this->_getStatndardPatern($element);\n $output = $this->_pattern($pattern, $element);\n $output = $this->_wrapElement($element, $output);\n\n return $output;\n }", "function _setOptionSelected($option,$value) {\r\n\t\treturn ($option == $value ? ' selected=\"selected\"' : '');\r\n\t}", "public function form()\r\n {\r\n $this->switch('field_select_create', Support::trans('main.select_create'))\r\n ->default(admin_setting('field_select_create'));\r\n }", "public function setOption(string $name, $value);", "public function setOption(string $name, $value);", "function yaz_set_option($id, $options)\n{\n}", "function options_form($context) {\n $options = array();\n $themes = list_themes();\n foreach($themes as $name => $theme) {\n if($theme->status == 1) $options[$name] = $name;\n }\n\n $form = array(\n '#tree' => TRUE,\n '#title' => t('Theme'),\n 'theme' => array(\n '#title' => t('Active theme'),\n '#description' => t('Choose a theme to activate when this context is active.'),\n '#type' => 'select',\n '#options' => $options,\n '#default_value' => 0//$this->fetch_from_context($context),\n ),\n );\n return $form;\n\n }", "public function selected()\n {\n parent::selected();\n $this->name = '';\n }", "public function it_shows_select_input_with_options()\n {\n // configure\n $inputs = [\n [\n 'type' => 'select',\n 'name' => 'country',\n 'options' => ['IN' => 'India']\n ]\n ];\n\n $this->configureInputs($inputs);\n\n // assert\n $this->get('/settings')\n ->assertStatus(200)\n ->assertSee('select')\n ->assertSee('IN');\n }", "function setSelected($selected) {\r\n if ($this->list) {\n if ($selected) {\n $this->list->selectOption($this);\n } else {\n $this->list->deselectOption($this);\n }\n }\n }", "protected function renderSimulateUserSelectAndLabel() {}", "public function option(string $option);", "public function select($title, $text, $list, $selectedIndex, $handlerObj, $handlerMethod, $carryValue = NULL) {\n if ($this->promptInProgress) {\n throw new SFException( 'PromptService: a prompt is already in progress', ERR_REPORT_APP );\n }\n\n $this->promptInProgress = TRUE;\n $this->handlerObj = $handlerObj;\n $this->handlerMethod = $handlerMethod;\n $this->carryValue = $carryValue;\n $this->callMethod( 'select', array($title, $text, $list, (int) $selectedIndex) );\n }", "function print_select($value){\n\t\techo $this->before_option_title.$value['name'].$this->after_option_title;\n\t\t$input_value = $this->get_field_value($value['id']);\n\t\t\t\n\t\techo '<select class=\"option-select'.((isset($value['conditional']) && $value['conditional'])?' option-conditional':'').'\" name=\"'.$value['id'].'\" id=\"'.$value['id'].'\">';\n\t\t\n\t\tforeach ($value['options'] as $option) {\n\t\t\t$attr='';\t\n\t\t\t if ( get_option( $value['id'] ) == $option['id']) {\n\t\t\t\t$attr = ' selected=\"selected\"';\n\t\t\t }\n\t\t \t if ( $option['id'] == 'disabled') {\n\t\t\t\t$attr.= ' disabled=\"disabled\"';\n\t\t\t }\n\t\t\t if($option['class']){\n\t\t\t\t$attr.=' class=\"'.$option['class'].'\"';\t\t\t \t\n\t\t\t }\n\t\t\techo '<option '.$attr.' value=\"'.$option['id'].'\">'.$option['name'].'</option>'; \n\t\t} \n\t\n\t\techo '</select>';\n\t\t$this->close_option($value);\n\t}", "function __select( $hidden = true ) {\n\t\t$data = '';\n\t\tif( $hidden === true ) {\n\t\t\t// use hyperv-vm.select.class\n\t\t\trequire_once($this->rootdir.'/plugins/hyperv/class/hyperv-vm.select.class.php');\n\t\t\t$controller = new hyperv_vm_select($this->htvcenter, $this->response);\n\t\t\t$controller->actions_name = $this->actions_name;\n\t\t\t$controller->tpldir = $this->tpldir;\n\t\t\t$controller->message_param = $this->message_param;\n\t\t\t$controller->lang = $this->lang['select'];\n\t\t\t$data = $controller->action();\n\t\t}\n\t\t$content['label'] = $this->lang['select']['tab'];\n\t\t$content['value'] = $data;\n\t\t$content['target'] = $this->response->html->thisfile;\n\t\t$content['request'] = $this->response->get_array($this->actions_name, 'select' );\n\t\t$content['onclick'] = false;\n\t\tif($this->action === 'select'){\n\t\t\t$content['active'] = true;\n\t\t}\n\t\treturn $content;\n\t}", "function renderSelected($option) {\n\t\t$conf = array($this->config['selected'], $this->config['selected.']);\n\t\treturn $this->renderOption($option, $conf);\n\t}", "function theme_select(&$item) {\n\n\t\t$class = array('form-select');\n\t\t_form_set_class($item, $class);\n\n\t\t$size = $item['#size'] ? ' size=\"' . $item['#size'] . '\"' : '';\n\t\t$multiple = isset($item['#multiple']) && $item['#multiple'];\n\n\t\t$retval .= '<select name=\"'\n\t\t\t. $item['#name'] . ''. ($multiple ? '[]' : '') . '\"' \n\t\t\t. ($multiple ? ' multiple=\"multiple\" ' : '') \n\t\t\t. drupal_attributes($item['#attributes']) \n\t\t\t. ' id=\"' . $item['#id'] . '\" ' . $size . '>' \n\t\t\t. form_select_options($item) . '</select>';\n\t\treturn($retval);\n\n\t}", "function echoSelected($fieldname){\n\t#echo \"199\".$fieldname.$this->request['option']; exit;\n\t\tif($this->request['option']==$fieldname)\n\t\t\techo \" selected\";\n\t}", "public function set(string $option, $value): self;", "function uds_pricing_render_general_options_select($key, $value)\n{\n\tglobal $uds_pricing_general_options;\n\t$field = $uds_pricing_general_options[$key];\n\t$default = $value;\n\t\n\t$options = '';\n\tforeach($field['options'] as $name => $value) {\n\t\t$selected = $name == $default ? 'selected=\"selected\"' : '';\n\t\t$options .= \"<option value='$name' $selected>$value</option>\";\n\t}\n\t\n\t$out = \"\n\t\t<div>\n\t\t\t<label>{$field['label']}</label>\n\t\t\t<select name='uds-pricing-$key'>\n\t\t\t\t$options\n\t\t\t</select>\n\t\t</div>\n\t\";\n\treturn $out;\n}", "public static function option($texte,$valeur=null,$defaut=null){\n $selected = '';\n \n if(is_null($valeur)){\n $valeur = $texte;\n }\n \n if(!is_null($defaut)){\n if($valeur == $defaut){\n $selected = 'selected';\n }\n }\n \n ?>\n <option value=\"<?php echo $valeur;?>\" <?php echo $selected;?> ><?php echo $texte;?></option>\n <?php \n }", "function testOptionsFunction2(){\n\n\t\t#mdx:OptionsFunction2\n\t\t$choice = new SimpleChoice(\"category\");\n\t\t$choice->options(function(){\n\t\t\t// return a function which returns an associative array:\n\t\t\treturn function(){\n\t\t\t\treturn [1=>'Category A',2=>'Category B',3=>'Category C'];\n\t\t\t};\n\t\t});\n\n\t\t$choice->context(['category'=>2]); // selects category 2\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"<b>2\",\"$choice\");\n\n\t}", "function testOptionsObjects(){\n\t\n\t\t#mdx:OptionsObjects\n\t\t$choice = new SimpleChoice(\"category\");\n\t\n\t\t$option1 = new StdClass();\n\t\t$option1->id = 1;\n\t\t$option1->name = 'Action';\n\t\n\t\t$option2 = new StdClass();\n\t\t$option2->id = 2;\n\t\t$option2->name = 'Drama';\n\n\t\t$choice->options([$option1, $option2])\n\t\t\t->context(['category'=>2]); // selects category 2\n\t\t\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"1 - Action\",\"$choice\");\n\t\t$this->assertContains(\"<b>2 - Drama\",\"$choice\");\n\n\t}", "function form_option($option)\n {\n }", "function selectAndPick(sfTestBrowser $t, array $options)\n{\n foreach($options as $check => $value)\n {\n $t->setField($check . \"_check\", 1);\n $t->setField($check, $value);\n }\n\n return $t;\n}", "function formulize_inner_custom_box($post) {\n\tglobal $post;\n\t$values = get_post_custom($post->ID);\n\t$selected = isset($values['formulize_select']) ? esc_attr($values['formulize_select']) : ''; \n\t// We'll use this nonce field later on when saving. \n wp_nonce_field( 'my_formulize_nonce', 'formulize_nonce' );\n ?>\n <label for =\"formulize_select\">Choose screen: </label>\n <select name=\"formulize_select\" id=\"formulize_select\">\n <option value=\"test one\" <?php selected($selected, 'test one'); ?>>Test One </option>\n <option value=\"test two\" <?php selected($selected, 'test two'); ?>>Test Two </option>\n </select>\n <?php\n}", "private static function select_option($label, $value, array $selected, $optionclass = '') {\n $attributes = array();\n $value = (string)$value;\n if (in_array($value, $selected, true)) {\n $attributes['selected'] = 'selected';\n }\n $attributes['value'] = $value;\n $attributes['class'] = $optionsclass;\n return html_writer::tag('option', $label, $attributes);\n }", "function _select ($name, $id, $attribs, $options, $value)\n\t{\n\t\t$xhtml = '<div class=\"select\"><select'\n\t\t. ' name=\"' . $this->view->escape($name) . '\"'\n\t\t. ' id=\"' . $this->view->escape($id) . '\"'\n\t\t. $this->_htmlAttribs($attribs)\n\t\t. \">\";\n\n\t\t// build the list of options\n\t\t$list = array();\n\t\t$translator = $this->getTranslator();\n\t\tforeach ((array) $options as $opt_value => $opt_label) {\n\t\t\tif (is_array($opt_label)) {\n if (null !== $translator) {\n $opt_value = $translator->translate($opt_value);\n }\n \n $list[] = '<optgroup'\n . ' label=\"' . $this->view->escape($opt_value) .'\">';\n foreach ($opt_label as $val => $lab) {\n $list[] = $this->_build($val, $lab, $value, false);\n }\n $list[] = '</optgroup>';\n } else {\n\t\t\t\t$list[] = $this->_build($opt_value, $opt_label, $value, false);\n }\n\t\t}\n\n\t\t// add the options to the xhtml and close the select\n\t\t$xhtml .= implode(\"\", $list) . \"</select> <a href=\\\"#\\\" class=\\\"remove\\\">-</a></div>\";\n\n\t\treturn $xhtml;\n\t}", "function select_box($selected, $options, $input_name, $input_id = FALSE, $use_lang = TRUE, $key_is_value = TRUE, $attributes = array())\n\t{\n\t\tglobal $LANG;\n\n\t\t$input_id = ($input_id === FALSE) ? str_replace(array(\"[\", \"]\"), array(\"_\", \"\"), $input_name) : $input_id;\n\n\t\t$attributes = array_merge(array(\n\t\t\t\"name\" => $input_name,\n\t\t\t\"id\" => strtolower($input_id)\n\t\t), $attributes);\n\n\t\t$attributes_str = \"\";\n\t\tforeach ($attributes as $key => $value)\n\t\t{\n\t\t\t$attributes_str .= \" {$key}='{$value}' \";\n\t\t}\n\n\t\t$ret = \"<select{$attributes_str}>\";\n\n\t\tforeach($options as $option_value => $option_label)\n\t\t{\n\t\t\tif (!is_int($option_value))\n\t\t\t\t$option_value = $option_value;\n\t\t\telse\n\t\t\t\t$option_value = ($key_is_value === TRUE) ? $option_value : $option_label;\n\n\t\t\t$option_label = ($use_lang === TRUE) ? $LANG->line($option_label) : $option_label;\n\t\t\t$checked = ($selected == $option_value) ? \" selected='selected' \" : \"\";\n\t\t\t$ret .= \"<option value='{$option_value}'{$checked}>{$option_label}</option>\";\n\t\t}\n\n\t\t$ret .= \"</select>\";\n\t\treturn $ret;\n\t}", "public function testIssue255()\n {\n $session = $this->getSession();\n $session->visit($this->pathTo('/issue255.php'));\n\n $session->getPage()->selectFieldOption('foo_select', 'Option 3');\n\n $session->wait(2000, '$(\"#output_foo_select\").text() != \"\"');\n $this->assertEquals('onChangeSelect', $session->getPage()->find('css', '#output_foo_select')->getText());\n }", "function changeSelectOptionSelected($name,$value,$selected,$html,$pattern='<option value=\"__value__\">') {\n\t\tif (preg_match('/<(select*)\\\\b name=\"'.$name.'\"[^>]*>(.*?)<\\/\\\\1>/sim', $html, $regs)) {\n\t\t\t$selectHtml=$regs[0];\n\t\t\t\n\t\t\t$pattern=str_replace('__value__',$value,$pattern);\n\t\t\tif ($selected==true)\n\t\t\t\t$patternNew=str_replace('>',' selected=\"selected\" >',$pattern);\n\t\t\t\n\t\t\t\n\t\t\t$selectNewHtml=str_replace($pattern,$patternNew,$selectHtml);\n\t\t\t$html=str_replace($selectHtml,$selectNewHtml,$html);\n\t\t\treturn $html;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "function edit(){\n global $wpdb;\n global $DOPBSP;\n \n $id = $_POST['id'];\n $field = $_POST['field'];\n $value = $_POST['value'];\n $language = $_POST['language'];\n \n if ($field == 'label'){\n $value = str_replace(\"\\n\", '<<new-line>>', $value);\n $value = str_replace(\"\\'\", '<<single-quote>>', $value);\n $value = utf8_encode($value);\n \n $field_data = $wpdb->get_row($wpdb->prepare('SELECT * FROM '.$DOPBSP->tables->forms_fields_options.' WHERE id=%d',\n $id));\n \n $translation = json_decode($field_data->translation);\n $translation->$language = $value;\n \n $value = json_encode($translation);\n $field = 'translation';\n }\n \n $select_option = $wpdb->get_row($wpdb->prepare('SELECT * FROM '.$DOPBSP->tables->forms_fields_options.' WHERE id=%d',\n $id));\n $wpdb->update($DOPBSP->tables->forms_fields_options, array($field => $value), \n array('id' => $_POST['id']));\n \n echo $select_option->field_id;\n \n die();\n }", "function getSelect($label, $name, $id, $options) {\r\n $return .= $this->getLabel($label, $id, $true);\r\n $return .= \"<select name='\".$name.\"' id='\".$id.\"'>\";\r\n if($this->getConfigurationValue($name) AND !$value){\r\n $value = $this->getConfigurationValue($name);\r\n }elseif($_POST[$name]){\r\n $data = $this->getFormData(array($name));\r\n $value = $data[$name];\r\n } \r\n foreach($options as $key=>$option){\r\n $selected = \"\";\r\n if($option==$value) $selected=\" selected='selected'\";\r\n $return .= \"<option value='\".$option.\"'\".$selected.\">\".$option.\"</option>\"; \r\n }\r\n $return .= \"</select>\";\r\n return $return;\r\n }", "public function select_option($option, $select) {\n $select = $this->fixStepArgument($select);\n $option = $this->fixStepArgument($option);\n\n // We add the click event to deal with autosubmit drop down menus.\n $selectnode = $this->getSession()->getPage()->findField($select);\n if ($selectnode == null) {\n throw new ElementNotFoundException(\n $this->getSession(), 'form field', 'id|name|label|value', $select\n );\n }\n $selectnode->selectOption($option);\n $selectnode->click();\n }", "public function select( $select_id, $option_text ) {\n $element = $this->getElement( LocatorStrategy::id, $select_id );\n $option = $element->findOptionElementByText( $option_text );\n $option->click();\n }", "public function optionsdemo_field_callback( $field ) {\n\t\t\t$option_name = $field['option_name'];\n\t\t\t$option = get_option( $option_name );\n\t\t\t$value = isset( $option[ $field['id'] ] ) ? $option[ $field['id'] ] : '';\n\t\t\t\n\t\t\tswitch ( $field['type'] ) {\n\t\t\t\t\n\t\t\t\tcase 'file':\n\t\t\t\t\t\n\t\t\t\t\techo '<div class=\"optionsdemo-warp\">';\n\t\t\t\t\tprintf( '<input id=\"%1$s-%2$s\" type=\"text\" class=\"optionsdemo-input\" name=\"%1$s[%2$s]\" value=\"%3$s\"/>',\n\t\t\t\t\t\t$option_name,\n\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t$value\n\t\t\t\t\t);\n\t\t\t\t\tprintf( '<input type=\"button\" class=\"button-primary optionsdemo-btn \" value=\"Insert Image\"/>' );\n\t\t\t\t\t\n\t\t\t\t\techo '</div>';\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// Multiple select render\n\t\t\t\tcase 'multiple':\n\t\t\t\t\t\n\t\t\t\t\t$countries = $field['countries'];\n\t\t\t\t\t\n\t\t\t\t\tprintf( '<select id=\"%1$s-%2$s\" name=\"%1$s[%2$s][]\" multiple=\"%3$s\">',\n\t\t\t\t\t\t$option_name,\n\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t$field['type']\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\tforeach ( $countries as $key => $country ) {\n\t\t\t\t\t\t$selected = '';\n\t\t\t\t\t\tif ( is_array( $value ) && in_array( $key, $value ) ) {\n\t\t\t\t\t\t\t$selected = 'selected';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tprintf( '<option value=\"%1$s\" %2$s >%3$s</option>',\n\t\t\t\t\t\t\t$key,\n\t\t\t\t\t\t\t$selected,\n\t\t\t\t\t\t\t$country\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\techo \"</select>\";\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t// Select filed render\n\t\t\t\tcase 'select':\n\t\t\t\t\t\n\t\t\t\t\t$countries = $field['countries'];\n\t\t\t\t\tprintf( '<select id=\"%1$s-%2$s\" name=\"%1$s[%2$s]\">',\n\t\t\t\t\t\t$option_name,\n\t\t\t\t\t\t$field['id']\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\tforeach ( $countries as $country ) {\n\t\t\t\t\t\t$selected = '';\n\t\t\t\t\t\tif ( $value == $country ) {\n\t\t\t\t\t\t\t$selected = 'selected';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tprintf( '<option value=\"%1$s\" %2$s >%3$s</option>',\n\t\t\t\t\t\t\t$country,\n\t\t\t\t\t\t\t$selected,\n\t\t\t\t\t\t\t$country\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t// Radio filed render\n\t\t\t\tcase 'radio':\n\t\t\t\t\t\n\t\t\t\t\t$conditions = $field['conditions'];\n\t\t\t\t\t\n\t\t\t\t\tforeach ( $conditions as $condition ) {\n\t\t\t\t\t\t$selected = '';\n\t\t\t\t\t\tif ( $value == $condition ) {\n\t\t\t\t\t\t\t$selected = 'checked';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tprintf( '<input id=\"%1$s-%2$s\" name=\"%1$s[%2$s]\" type=\"%3$s\" value=\"%4$s\" %5$s />%6$s<br>',\n\t\t\t\t\t\t\t$option_name,\n\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t$field['type'],\n\t\t\t\t\t\t\t$condition,\n\t\t\t\t\t\t\t$selected,\n\t\t\t\t\t\t\t$condition\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcase 'checkbox':\n\t\t\t\t\t\n\t\t\t\t\t$countries = $field['countries'];\n\t\t\t\t\t\n\t\t\t\t\tforeach ( $countries as $key => $country ) {\n\t\t\t\t\t\t$checked = '';\n\t\t\t\t\t\tif ( is_array( $value ) && in_array( $key, $value ) ) {\n\t\t\t\t\t\t\t$checked = 'checked';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tprintf( '<input id=\"%1$s-%2$s\" name=\"%1$s[%2$s][%4$s]\" type=\"%3$s\" value=\"%4$s\" %5$s />%6$s<br>',\n\t\t\t\t\t\t\t$option_name,\n\t\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t\t$field['type'],\n\t\t\t\t\t\t\t$key,\n\t\t\t\t\t\t\t$checked,\n\t\t\t\t\t\t\t$country,\n\t\t\t\t\t\t\t$value\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcase 'textarea':\n\t\t\t\t\t\n\t\t\t\t\tprintf( '<textarea name=\"%1$s[%2$s]\" id=\"%1$s-%2$s\" placeholder=\"%3$s\" rows=\"5\" cols=\"50\">%4$s</textarea>',\n\t\t\t\t\t\t$option_name,\n\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\tisset( $field['placeholder'] ) ? $field['placeholder'] : '',\n\t\t\t\t\t\t$value\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tcase 'url':\n\t\t\t\t\t\n\t\t\t\t\tprintf( '<input name=\"%1$s[%2$s]\" id=\"%1$s-%2$s\" type=\"%3$s\" placeholder=\"%4$s\" value=\"%5$s\"/>',\n\t\t\t\t\t\t$option_name,\n\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t$field['type'],\n\t\t\t\t\t\tisset( $field['placeholder'] ) ? $field['placeholder'] : '',\n\t\t\t\t\t\t$value\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'number':\n\t\t\t\t\t\n\t\t\t\t\tprintf( '<input name=\"%1$s[%2$s]\" id=\"%1$s-%2$s\" type=\"%3$s\" placeholder=\"%4$s\" value=\"%5$s\" min=\"%6$s\" max=\"%7$s\"/>',\n\t\t\t\t\t\t$option_name,\n\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t$field['type'],\n\t\t\t\t\t\tisset( $field['placeholder'] ) ? $field['placeholder'] : '',\n\t\t\t\t\t\t$value,\n\t\t\t\t\t\t$field['min'],\n\t\t\t\t\t\t$field['max']\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'password':\n\t\t\t\t\t\n\t\t\t\t\tprintf( '<input name=\"%1$s[%2$s]\" id=\"%1$s-%2$s\" type=\"%3$s\" placeholder=\"%4$s\" value=\"%5$s\"/>',\n\t\t\t\t\t\t$option_name,\n\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t$field['type'],\n\t\t\t\t\t\tisset( $field['placeholder'] ) ? $field['placeholder'] : '',\n\t\t\t\t\t\t$value\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'email':\n\t\t\t\t\t\n\t\t\t\t\tprintf( '<input name=\"%1$s[%2$s]\" id=\"%1$s-%2$s\" type=\"%3$s\" placeholder=\"%4$s\" value=\"%5$s\"/>',\n\t\t\t\t\t\t$option_name,\n\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t$field['type'],\n\t\t\t\t\t\tisset( $field['placeholder'] ) ? $field['placeholder'] : '',\n\t\t\t\t\t\t$value\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\t\n\t\t\t\t\tprintf( '<input name=\"%1$s[%2$s]\" id=\"%1$s-%2$s\" type=\"%3$s\" placeholder=\"%4$s\" value=\"%5$s\"/>',\n\t\t\t\t\t\t$option_name,\n\t\t\t\t\t\t$field['id'],\n\t\t\t\t\t\t$field['type'],\n\t\t\t\t\t\tisset( $field['placeholder'] ) ? $field['placeholder'] : '',\n\t\t\t\t\t\t$value\n\t\t\t\t\t);\n\t\t\t}\n\t\t\t//End Switch case\n\t\t}", "public function getSelect();", "public function getSelect();", "function get_selected()\n {\n }", "function selMethod($selmethid, $methval) {\n\techo \"<SELECT ID=$selmethid CLASS=selmeth>\\n\";\n\techo \"<OPTION VALUE='PUT'\";\n\tif ($methval == \"PUT\") {\n\t\techo \" SELECTED\";\n\t}\n\techo \">PUT</OPTION>\\n\";\n\techo \"<OPTION VALUE='POST'\";\n\tif ($methval == \"POST\") {\n\t\techo \" SELECTED\";\n\t}\n\techo \">POST</OPTION>\\n\";\n\techo \"<OPTION VALUE='DELETE'\";\n\tif ($methval == \"DELETE\") {\n\t\techo \" SELECTED\";\n\t}\n\techo \">DELETE</OPTION>\\n\";\n\techo \"</SELECT>\\n\";\n\t\n\techo \"<SCRIPT>\\$(\\\"#$selmethid\\\").selectmenu({width : 'auto'});</SCRIPT>\\n\";\n}", "public function selected()\n {\n parent::selected();\n $this->enclosed = null;\n $this->escaped = false;\n $this->collected = '';\n }", "public static function page_select_callback( $val ){\n $id = $val['id'];\n $option_name = $val['option_name'];\n $args = array(\n 'posts_per_page' => -1,\n 'limit' => -1,\n );\n $pages = get_pages($args);\n echo ' <select name=\"'.$option_name .'\">';\n echo '<option value=\"-1\">— Select —</option>';\n\n foreach ($pages as $id => $page) {\n $selected = (esc_attr( get_option($option_name) ) == $page->ID )? 'selected = \"selected\"' : '';\n ?>\n <option <?php echo $selected; ?> value=\"<?php echo $page->ID ?>\"> <?php echo $page->post_title; ?></option>\n <?php\n }\n echo '</select>';\n }", "public static function page_select_callback( $val ){\n $id = $val['id'];\n $option_name = $val['option_name'];\n $args = array(\n 'posts_per_page' => -1,\n 'limit' => -1,\n );\n $pages = get_pages($args);\n echo ' <select name=\"'.$option_name .'\">';\n echo '<option value=\"-1\">— Select —</option>';\n\n foreach ($pages as $id => $page) {\n $selected = (esc_attr( get_option($option_name) ) == $page->ID )? 'selected = \"selected\"' : '';\n ?>\n <option <?php echo $selected; ?> value=\"<?php echo $page->ID ?>\"> <?php echo $page->post_title; ?></option>\n <?php\n }\n echo '</select>';\n }", "public function setSelectedItem($name,$value) {\n $this->addHiddenField('on0',$name);\n $this->addHiddenField('os0',$value);\n }", "function getWidget() {\n // just override the template being used.\n $bHasErrors = false; \n if (count($this->aErrors) != 0) { $bHasErrors = true; }\n\n // at this last moment we pick the template to use \n $total = count($this->aVocab);\n if ($this->bUseSimple === true) {\n $this->sTemplate = 'ktcore/forms/widgets/simple_selection'; \n } else if ($this->bUseSimple === false) {\n $this->sTemplate = 'ktcore/forms/widgets/selection'; \n } else if (is_null($this->bUseSimple) && ($total <= $this->USE_SIMPLE)) {\n $this->sTemplate = 'ktcore/forms/widgets/simple_selection';\n } else {\n $this->sTemplate = 'ktcore/forms/widgets/selection';\n }\n \n $oTemplating =& KTTemplating::getSingleton(); \n $oTemplate = $oTemplating->loadTemplate($this->sTemplate);\n\n // have to do this here, and not in \"configure\" since it breaks \n // entity-select.\n $unselected = KTUtil::arrayGet($this->aOptions, 'unselected_label');\n if (!empty($unselected)) {\n // NBM: we get really, really nasty interactions if we try merge\n // NBM: items with numeric (but important) key values and other\n // NBM: numerically / null keyed items\n $vocab = array();\n $vocab[] = $unselected;\n foreach ($this->aVocab as $k => $v) {\n $vocab[$k] = $v;\n }\n \n $this->aVocab = $vocab;\n\n // make sure its the selected one if there's no value specified.\n if (empty($this->value)) {\n $this->value = 0;\n }\n }\n\n // performance optimisation for large selected sets.\n if ($this->bMulti) {\n $this->_valuesearch = array();\n $value = (array) $this->value;\n foreach ($value as $v) {\n $this->_valuesearch[$v] = true;\n }\n }\n \n $aTemplateData = array(\n \"context\" => $this,\n \"name\" => $this->sName,\n \"has_id\" => ($this->sId !== null),\n \"id\" => $this->sId,\n \"has_value\" => ($this->value !== null),\n \"value\" => $this->value,\n \"options\" => $this->aOptions,\n 'vocab' => $this->aVocab,\n );\n return $oTemplate->render($aTemplateData);\n }", "private function handleOption() : void\n {\n switch ($this->selectedOption) {\n case QAOptionsEnum::ADD:\n $this->addQuestion();\n break;\n\n case QAOptionsEnum::VIEW:\n $this->viewQuestion();\n break;\n\n case QAOptionsEnum::SHOW_ANSWERS:\n $this->showAnswers();\n break;\n\n case QAOptionsEnum::QA_EXIT:\n $this->exit();\n break;\n }\n\n $this->showOptions($this->console);\n }", "public static function select( $var, $label, $values, $option = '' ) {\n\t\tif ( method_exists( 'Yoast_Form', 'select' ) ) {\n\t\t\tif ( $option !== '' ) {\n\t\t\t\tYoast_Form::get_instance()->set_option( $option );\n\t\t\t}\n\n\t\t\tYoast_Form::get_instance()->select( $var, $label, $values );\n\n\t\t\treturn;\n\t\t}\n\n\t\treturn self::admin_pages()->select( $var, $label, $option );\n\t}", "function output_term_select_row( string $label, string $key, $taxonomy_or_terms, $val, string $field = 'slug' ): void {\n\twp_enqueue_style( 'wpinc-meta-field' );\n\t$terms = is_array( $taxonomy_or_terms ) ? $taxonomy_or_terms : get_terms( $taxonomy_or_terms );\n\tif ( ! is_array( $terms ) ) {\n\t\t$terms = array();\n\t}\n\t?>\n\t<div class=\"wpinc-meta-field-single select\">\n\t\t<label>\n\t\t\t<span><?php echo esc_html( $label ); ?></span>\n\t\t\t<select name=\"<?php echo esc_attr( $key ); ?>\">\n\t<?php\n\tforeach ( $terms as $t ) {\n\t\t$name = $t->name;\n\t\t$tf = get_term_field( $field, $t, '', 'raw' );\n\t\techo '<option value=\"' . esc_attr( $val ) . '\"' . selected( $tf, $val, false ) . '>' . esc_html( $name ) . '</option>';\n\t}\n\t?>\n\t\t\t</select>\n\t\t</label>\n\t</div>\n\t<?php\n}", "function testGuessItsSelectIfOptionsAreSet() {\n\t\t$result = $this->helper->__guessInputType('Test.foo', array('options' => array()));\n\t\t$this->assertEqual($result, 'select');\n\t}", "private static function renderSelect($value)\n {\n return $value;\n }", "function awm_select_options()\n {\n return array(\n 'options' => array(\n 'label' => __('Options', 'extend-wp'),\n 'case' => 'repeater',\n 'include' => array(\n 'option' => array(\n 'label' => __('Value', 'extend-wp'),\n 'case' => 'input',\n 'type' => 'text',\n ),\n 'label' => array(\n 'label' => __('Label', 'extend-wp'),\n 'case' => 'input',\n 'type' => 'text',\n ),\n ),\n ),\n );\n }" ]
[ "0.67317617", "0.67007697", "0.61267126", "0.6101564", "0.6092063", "0.6082261", "0.59615076", "0.5959076", "0.59364", "0.5885151", "0.58820623", "0.58743864", "0.58718723", "0.5857547", "0.58489746", "0.5836531", "0.5825224", "0.58173037", "0.58064955", "0.57943064", "0.5789808", "0.57831657", "0.5774297", "0.5736056", "0.56976455", "0.56864786", "0.5682357", "0.5657142", "0.56420416", "0.56407815", "0.563702", "0.5624433", "0.5622002", "0.56214714", "0.5611404", "0.5611404", "0.5611404", "0.5611404", "0.5559547", "0.5545755", "0.55364853", "0.5531455", "0.5526964", "0.5523142", "0.55139095", "0.5512524", "0.5512524", "0.55034435", "0.5497906", "0.54946476", "0.54911953", "0.54857457", "0.5484366", "0.5484366", "0.54808027", "0.54761434", "0.546377", "0.5460877", "0.5460351", "0.54549944", "0.54495454", "0.54477954", "0.54444164", "0.54413843", "0.5439996", "0.54319733", "0.5431062", "0.5424881", "0.54239607", "0.53984636", "0.5385981", "0.53710043", "0.53572077", "0.53522485", "0.53512734", "0.5350876", "0.53471845", "0.53321034", "0.53317946", "0.53101015", "0.5304322", "0.52919704", "0.5273225", "0.52695394", "0.5255015", "0.52405536", "0.52405536", "0.52310675", "0.52268106", "0.52266604", "0.5224339", "0.5224339", "0.5219822", "0.5218884", "0.520835", "0.52073205", "0.5200016", "0.51841766", "0.517896", "0.5176011" ]
0.71186876
0
/ Setting a caption The "caption" is the default text which appears on the select field when no option has been selected yet. This is usally a message indicating that the user should choose something: mdx:Caption Outputs: mdx:Caption o httidy
Установка подписи Подпись ("caption") — это стандартный текст, который отображается в поле выбора до тех пор, пока не будет выбрана какая-либо опция. Обычно это сообщение, информирующее пользователя о том, что он должен выбрать что-либо: mdx:Caption Выходы: mdx:Caption o httidy
function testCaption(){ #mdx:Caption $select = new HtSelect('id_category'); $select->options([1=>'Category1',2=>'Category2',3=>'Category3']); $select->caption('CHOOSE A CATEGORY:'); #/mdx echo $select $this->expectOutputRegex("/select.*?CHOOSE A CATEGORY.*?/s"); echo $select; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function testCaptionValue(){\n\t\t#mdx:CaptionValue\n\t\t$select = new HtSelect('id_category');\n\t\t$select->options([1=>'Category1',2=>'Category2',3=>'Category3']);\n\t\t$select->caption('CHOOSE A CATEGORY:', 'none'); # change value to 'none'\n\t\t#/mdx echo $select\n\t\t$this->expectOutputRegex(\"/select.*?option.*?none.*?CHOOSE A CATEGORY.*?/s\");\n\t\techo $select;\n\t}", "public function setCaption($caption) {\n\t\t$this->caption = $caption;\n\t}", "function set_caption($caption)\n\t{\n\t\t$this->caption = $caption;\n\t}", "public function setCaption(?string $caption): void\n\t{\n\t\t$this->caption = $caption;\n\t}", "function getModifyCaption() \r\n \t{\r\n \t\treturn '';\r\n \t}", "public function getCaption() {}", "public function renderCaption() {\n if (!empty($this->caption)) {\n return self::html()->tag('<caption{:options}>{:content}</caption>', array('content' => $this->caption, 'options' => $this->captionOptions), $this->captionOptions);\n } else {\n return false;\n }\n }", "function setCaption($cap) {\n\t\t$this->lobSub->lobCaption = $cap;\n\t}", "public function caption($caption)\n {\n return $this->setProperty('caption', $caption);\n }", "private function _set_photo_caption($value){\n if(!empty($value)){\n $this->_photo_caption = $value;\n }else{\n throw new Exception(\"photo_caption must be a nonempty string\");\n }\n }", "function getCaption() {return $this->readCaption();}", "function XoopsFormTextDateSelect($caption, $name, $size = 15, $value= 0)\n\t{\n\t\t$this->XoopsFormText($caption, $name, $size, 25, $value);\n\t}", "public function getCaption(): string\n {\n return $this->attrs['caption'] ?? '';\n }", "public function getCaption()\n {\n return $this->caption;\n }", "function set_caption($alt, $title, $iptc_caption, $filename)\n {\n $values = array($this->_params->get('caption_type_iptc') => $iptc_caption,\n $this->_params->get('caption_type_filename') => $filename,\n $this->_params->get('caption_type_title') => $title,\n $this->_params->get('caption_type_alt') => $alt);\n\n ksort($values);\n $caption = '';\n foreach ($values as $key => $val) {\n if ($key and $val) {\n $caption = $val;\n break;\n }\n }\n\n\n return $caption;\n }", "function getAddCaption() \r\n \t{\r\n \t\treturn '';\r\n \t}", "public function getCaption() {\n\t\treturn $this->caption;\n\t}", "public function get_caption($key = 0)\n {\n }", "function OptionBox($label, $value, $defaultvalue, $text)\n{\n $result = '';\n\tfor ($i=0; $i<count($label); $i++)\n\t{\n\t\t$result .= '<option label=\"'.$label[$i];\n\t\t$result .= '\" value=\"'.$value[$i].'\" ';\n\t\tif (isset($defaultvalue))\n\t\t{\n\t \tif ($value[$i]==$defaultvalue)\n\t \t\t{\n\t \t\t\t$result .= 'selected=\"selected\" ';\n\t \t\t}\n\t\t}\n\t \t$result .= '>'.$text[$i].'</option>';\n\t}\n\treturn $result;\n}", "public function addCaption($text)\n {\n $this->captionCount++;\n $this->captionStarted = $this->timer->elapsedAsSubripTime();\n $this->captionText = $text;\n }", "public function getCaption()\n {\n return $this->_caption;\n }", "public function renderCaption()\n {\n if (!empty($this->caption)) {\n return Html::tag('caption', $this->caption, $this->captionOptions);\n }\n\n return false;\n }", "public function get_caption() {\n\t\treturn __( 'Automatic Translation', 'wpml-translation-management' );\n\t}", "function meta_box_select( $args = array(), $value = false ) {\n\t\t\t$name = preg_replace( \"/[^A-Za-z_-]/\", '-', $args['name'] ); ?>\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $name; ?>\"><?php echo $args['title']; ?></label>\n\t\t\t\t<?php if ( !empty( $args['sep'] ) ) echo '<br />'; ?>\n\t\t\t\t<select name=\"<?php echo $name; ?>\" id=\"<?php echo $name; ?>\" style=\"width:60px\">\n\t\t\t\t\t<?php // echo '<option value=\"\"></option>'; ?>\n\t\t\t\t\t<?php $i = 0; foreach ( $args['options'] as $option => $val ) { $i++; ?>\n\t\t\t\t\t\t<option value=\"<?php echo esc_attr( $val ); ?>\" <?php selected( esc_attr( $value ), esc_attr( $val ) ); //if ( $i == 1 ) echo 'selected=\"selected\"'; ?>><?php echo ( !empty( $args['use_key_and_value'] ) ? $option : $val ); ?></option>\n\t\t\t\t\t<?php } ?>\n\t\t\t\t</select>\n\t\t\t\t<?php if ( !empty( $args['description'] ) ) echo '<br /><span class=\"howto\">' . $args['description'] . '</span>'; ?>\n\t\t\t</p>\n\t\t\t<?php\n\t\t}", "function captionError($captionBox)\n{\n\t// Check if anything has been entered into the caption box\n\tif(!isset($_REQUEST[$captionBox]))\n\t\techo \"<p style=\\\"color:red;\\\">Please enter a caption.</p>\\n\";\n\telse\n\t{\n\t\t// Trim any whitespace\n\t\t$caption = trim($_REQUEST[$captionBox]);\n\t\t\n\t\t// Check if the entered caption is empty or more than 20 characters\n\t\tif( (strlen($caption) == 0) || (strlen($caption) > 20) )\n\t\t\techo \"<p style=\\\"color:red;\\\">Please enter a caption that is less than 20 characters long.</p>\\n\";\n\t}\n}", "public function getCaption()\n\t{\n\t\tif ($this->caption instanceof Html && $this->caption->title) {\n\t\t\treturn $this->caption->title($this->getDataGrid()\n\t\t\t\t->translate($this->caption->title));\n\t\t} else {\n\t\t\treturn $this->getDataGrid()\n\t\t\t\t->translate($this->caption);\n\t\t}\n\t}", "function image_add_caption($html, $id, $caption, $title, $align, $url, $size, $alt = '')\n {\n }", "function TableCaption() {\n\t\tglobal $ReportLanguage;\n\t\treturn $ReportLanguage->TablePhrase($this->TableVar, \"TblCaption\");\n\t}", "function TableCaption() {\n\t\tglobal $ReportLanguage;\n\t\treturn $ReportLanguage->TablePhrase($this->TableVar, \"TblCaption\");\n\t}", "public function render_content()\n {\n ?>\n <label>\n\t\t\t<select <?php $this->link(); ?>>\n\t\t\t\t<?php\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', 'none', selected($this->value(), 'none', false), 'none');\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', 'capitalize', selected($this->value(), 'capitalize', false), 'capitalize');\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', 'uppercase', selected($this->value(), 'uppercase', false), 'uppercase');\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', 'lowercase', selected($this->value(), 'lowercase', false), 'lowercase');\n\t\t\t\t?>\n </select>\n\t\t\t<p class=\"description\"><?php echo esc_html( $this->label ); ?></p>\n </label>\n <?php\n }", "public function caption($caption)\n {\n $this->caption = $caption;\n return $this;\n }", "private function getCaption()\n\t{\n\t\t$buffer = '';\n\t\t\n\t\tif(!$this->aImg['sFilename'])\n\t\t\treturn $buffer;\n\t\t\n\t\t// button\n\t\t$link = $this->getCaptionButton();\n\t\t\n\t\t// caption\t\t\n\t\t$buffer .= '<textarea class=\"TextareaDisable\" disabled=\"disabled\">';\n\t\t$buffer .= stripslashes($this->aImg['sCaption']);\n\t\t$buffer .= '</textarea>';\n\t\t$buffer .= '<br /><br />';\n\t\t\t\n\t\t$buffer .= $link;\t\t\t\n\t\treturn $buffer;\t\t\n\t}", "function selectCauses($Empty = 0){\n global $db;\n\n $sql = \"SELECT * FROM event_causes\";\n //Basic::EventLog(\"Projects->getProductsInProjects: \".$sql);\n $res =& $db->query($sql);\n $html = '<select id=\"why\" name=\"why\" disabled>\n <option value=\"0\">Select...</option>';\n if($res){\n while ($row=$res->fetchRow()) {\n $html .= '<option value=\"'.$row['motivo'].'\">'.$row['motivo'].'</option>';\n }\n }\n $html .= '</select>';\n //Basic::EventLog(\"Projects->printSelectIdType: \".$html);\n return $html;\n }", "function metaboxTabOutputHeader ()\n\t{\n\t\techo '<strong>' . __( 'Select item', 'avhamazon' ) . '</strong><br />';\n\t}", "protected function caption_style() {\n\t\t$this->start_controls_section(\n\t\t\t'section_style_caption',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Caption', 'boostify' ),\n\t\t\t\t'tab' => Controls_Manager::TAB_STYLE,\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'text_color',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Text Color', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'default' => '',\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .widget-image-caption' => 'color: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_control(\n\t\t\t'caption_background_color',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Background Color', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::COLOR,\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .widget-image-caption' => 'background-color: {{VALUE}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->add_group_control(\n\t\t\tGroup_Control_Typography::get_type(),\n\t\t\tarray(\n\t\t\t\t'name' => 'caption_typography',\n\t\t\t\t'selector' => '{{WRAPPER}} .widget-image-caption',\n\t\t\t\t'scheme' => Scheme_Typography::TYPOGRAPHY_1,\n\t\t\t)\n\t\t);\n\n\t\t$this->add_responsive_control(\n\t\t\t'caption_padding',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Padding', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::DIMENSIONS,\n\t\t\t\t'size_units' => array( 'px', 'em', '%' ),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .widget-image-caption' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\t\t$this->add_responsive_control(\n\t\t\t'caption_space',\n\t\t\tarray(\n\t\t\t\t'label' => __( 'Caption Top Spacing', 'boostify' ),\n\t\t\t\t'type' => Controls_Manager::SLIDER,\n\t\t\t\t'range' => array(\n\t\t\t\t\t'px' => array(\n\t\t\t\t\t\t'min' => 0,\n\t\t\t\t\t\t'max' => 100,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'default' => array(\n\t\t\t\t\t'size' => 0,\n\t\t\t\t\t'unit' => 'px',\n\t\t\t\t),\n\t\t\t\t'selectors' => array(\n\t\t\t\t\t'{{WRAPPER}} .widget-image-caption' => 'margin-top: {{SIZE}}{{UNIT}}; margin-bottom: 0px;',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\t$this->end_controls_section();\n\t}", "private function retrieve_caption() {\n\t\treturn $this->retrieve_excerpt_only();\n\t}", "public function caption(){\n\t\tif( $this->caption ) {\n\t\t\treturn $this->caption;\n\t\t}//end if\n\n\t\t$this->caption = @file_get_contents( $this->base_dir.'/'.$this->dir . 'captions/' . $this->filename . '.txt');\n\t\t\n\t\treturn $this->caption;\n\t}", "public static function defaultSelectionLabel(): string\n {\n return Craft::t('app', 'Select organization');\n }", "function initlab_field_mailman_version_cb($args) {\n // Get the value of the setting we've registered with register_setting()\n $options = get_option('initlab_options', []);\n ?>\n <select id=\"<?php echo esc_attr($args['label_for']); ?>\" name=\"initlab_options[<?php echo esc_attr($args['label_for']); ?>]\">\n <?php\n foreach ($args['options'] as $value => $label) {\n ?>\n <option value=\"<?php echo esc_attr($value)?>\" <?php echo array_key_exists($args['label_for'], $options) ? selected($options[$args['label_for']], $value, false) : ''; ?>>\n <?php esc_html_e($label, 'initlab-addons'); ?>\n </option>\n <?php\n }\n ?>\n </select>\n <?php\n}", "public function setCommandCaption($value)\n {\n if (is_string($value) === false)\n throw new SystemException(SystemException::EX_INVALIDPARAMETER, 'Parameter = value');\n \n $this->commandCaption = $value;\n }", "public function setCaption(string $caption): self\n {\n $this->caption = $caption;\n return $this;\n }", "public function setCaptionPosition($captionPosition) {}", "function msgbox($caption, $message) {\n\treturn \"<fieldset class=\\\"msgbox\\\"><legend>\" .\n\t\t\"<img src=\\\"../images/huh.png\\\" class=\\\"picto\\\" alt=\\\"?\\\" /> \" .\n\t\t$caption . \"</legend>\\n\" .\n\t\t$message .\n\t\t\"</fieldset>\\n\\n\";\n}", "protected function renderSimulateUserSelectAndLabel() {}", "function getFieldTitle($value = null){\n\t\t$form_ret = '';\n\t\t$dataField = get_option('axceleratelink_srms_opt_title');\n\t\t$dataTitle = get_option('axceleratelink_srms_opt_tit_title');\n\t\t$tooltip = setToolTipNotification('title');\t\t\n\t\tif ($dataField == 'true'){\n\t\t\t$form_ret .= \"</br><label>\".$dataTitle.(get_axl_req_fields('title') === 'title' ? '<span class=\"red\">*</span>' : '').$tooltip.\"</label></br><select name='title' id='title'><option value='Mr' \".($value == 'Mr'? 'selected': '').\">Mr</option><option value='Ms' \".($value == 'Ms'? 'selected': '').\">Ms</option><option value='Mrs' \".($value == 'Mrs'? 'selected': '').\">Mrs</option><option value='Others' \".($value == 'Others'? 'selected': '').\">Others</option></select></br>\";\n\t\t}\n\t\treturn $form_ret;\n\t}", "public function getTagName ()\n\t{\n\t\treturn 'caption';\n\t}", "public function setDescription($value) {\n\t\tif($value == \"\") { $value = \"None\"; }\n\t\tself::$_description = $value;\n\t}", "private function addCaption(string $script, PhotoswipeConfig $config): string\n {\n if (false === $config->hasCaption()) {\n // Remove the caption placeholder from the lightbox script\n return str_replace('[[PSWP_CAPTION]]', '', $script);\n }\n\n $captionScript = <<<'CAPTION'\n // Adding new caption element .pswp--caption at the end of the photoswipe container\n [[PSWP_LIGHTBOX]].on('uiRegister', function() {\n [[PSWP_LIGHTBOX]].pswp.ui.registerElement({\n name: 'caption',\n order: 9,\n isButton: false,\n appendTo: 'root',\n html: 'Caption text',\n onInit: (el, pswp) => {\n [[PSWP_LIGHTBOX]].pswp.on('change', () => {\n const currSlideElement = [[PSWP_LIGHTBOX]].pswp.currSlide.data.element;\n let captionHTML = '';\n if (currSlideElement) {\n const caption = currSlideElement.querySelector('figcaption');\n if (caption) {\n captionHTML = caption.innerHTML;\n } else {\n captionHTML = currSlideElement.querySelector('img').getAttribute('alt');\n }\n }\n el.innerHTML = captionHTML || '';\n });\n }\n });\n });\n CAPTION;\n\n return str_replace('[[PSWP_CAPTION]]', $captionScript, $script);\n }", "public function caption(string $caption)\n {\n $this->caption = $caption;\n\n return $this;\n }", "public function caption(string $caption)\n {\n $this->caption = $caption;\n\n return $this;\n }", "protected function initCaptionRenderer()\n {\n $this->captionRenderer = new CaptionRenderer();\n }", "public function customizer_help() {\n\t\techo '\n\t\t<li>\n\t\t\t<p>\n\t\t\t\t' . __( 'Example text:', 'hellish-simplicity' ) . ' <code>' . esc_html( $this->default_header_text ) . '</code>\n\t\t\t</p>\n\t\t</li>';\n\t}", "function meta_box_text( $args = array(), $value = false ) {\n\t\t\t$name = preg_replace( \"/[^A-Za-z_-]/\", '-', $args['name'] ); ?>\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $name; ?>\"><?php echo $args['title']; ?></label>\n\t\t\t\t<br />\n\t\t\t\t<input type=\"text\" name=\"<?php echo $name; ?>\" id=\"<?php echo $name; ?>\" value=\"<?php echo esc_attr( $value ); ?>\" size=\"30\" tabindex=\"30\" style=\"width: <?php echo ( !empty( $args['width'] ) ? $args['width'] : '99%' ); ?>;\" />\n\t\t\t\t<?php if ( !empty( $args['description'] ) ) echo '<br /><span class=\"howto\">' . $args['description'] . '</span>'; ?>\n\t\t\t</p>\n\t\t\t<?php\n\t\t}", "function wp_caption_input_textarea($edit_post)\n {\n }", "public function setDefaultText($value)\n\t{\n\t\t$this->setViewState('DefaultText',$value,'');\n\t}", "public function defaultName() { return \"Enter the category name...\"; }", "public function add_option() {\n\t\tadd_option(\n\t\t\t$this->header_text_option, // The header text option\n\t\t\t$this->default_header_text // The default header text\n\t\t);\n\t}", "function close_option($value){\n\t\tif(!isset($value['desc'])) $value['desc']='';\n\t\tif (isset($value['std']) && $value['std']!='' && in_array($value['type'],array('text','color','upload')))\n\t\t\t$value['desc'] .= ' (default: '.$value['std'].')';\n\t\tif($value['desc'])\n\t\t\techo '<a href=\"\" class=\"help-button\"><div class=\"help-dialog\" title=\"'.$value['name'].'\"><p>'.$value['desc'].'</p></div></a>';\n\t\techo $this->after_option;\n\t}", "public function setCaption($content)\n {\n $this->caption = Element::create('caption')->addContent(\n $content\n );\n\n return $this;\n }", "function wpse_74735_caption_shortcode( $attr, $content = NULL )\n{\n $caption = img_caption_shortcode( $attr, $content );\n $caption = str_replace( '<p class=\"wp-caption\"></p>', '<span class=\"wp-caption-text my_new_class', $caption );\n return $caption;\n}", "public function submit_box() {\n\t\tglobal $post;\n\n\t\tif ( ! is_object( $post ) )\n\t\t\treturn;\n\n\t\tif( 'bbp_notice' != $post->post_type )\n\t\t\treturn;\n\n\t\t$type = get_post_meta( $post->ID, '_bbp_notice_type', true );\n\n\t\techo '<div id=\"bbp_notice_type_wrap\">';\n\t\t\techo '<label for=\"bbp_notice_type\">' . __( 'Type:', 'bbpress-notices' ) . '</label>&nbsp;';\n\t\t\techo '<select name=\"bbp_notice_type\" id=\"bbp_notice_type\">';\n\t\t\t\techo '<option value=\"0\">' . __( 'Default', 'bbpress-notices' ) . '</option>';\n\t\t\t\techo '<option value=\"info\"' . selected( 'info', $type, false ) . '>' . __( 'Info', 'bbpress-notices' ) . '</option>';\n\t\t\t\techo '<option value=\"error\"' . selected( 'error', $type, false ) . '>' . __( 'Error', 'bbpress-notices' ) . '</option>';\n\t\t\techo '</select>';\n\t\techo '</div>';\n\t}", "function AddDefaultOptions() {\n\t\n\t\t\t /* MODIFIED CODE */\n\t\n\t\t\t /* Wrap string in gettext function __() */\n\t\t\t add_option(self::PREFIX . '_cheesy_slogan_text', __('you can\\'t beat his prices!', self::PREFIX));\n\t\n\t\t\t /* END MODIFIED CODE */\n\t\n\t\t\t add_option(self::PREFIX . '_horrible_banner_image', '1');\n\t\n\t\t\t add_option(self::PREFIX . '_disgusting_background_enabled', true);\n\t\n\t\t\t add_option(self::PREFIX . '_annoying_popup_enabled', true);\n\t\t}", "function tb_longwave_header_options_callback() {\n\techo '<p>Settings for things visible in the Head of the theme.</p>';\n}", "private function get_caption( $settings ) {\n\t\t$caption = '';\n\t\tif ( 'custom' === $settings['caption_source'] ) {\n\t\t\t$caption = ! empty( $settings['caption'] ) ? $settings['caption'] : '';\n\t\t}\n\t\treturn $caption;\n\t}", "function _action_box_text($options)\n\t{\n\t\t?>\n\t\t\t<div id=\"action_box\" data-arrowpos=\"center\">\n\t\t\t\t<div class=\"container\">\n\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t\n\t\t\t\t\t\t<?php \n\t\t\t\t\t\t\t// Title\n\t\t\t\t\t\t\tif ( !empty ( $options['page_ac_title'] ) ) \n\t\t\t\t\t\t\t{ \n\t\t\t\t\t\t\t\techo '<div class=\"span12\">';\n\t\t\t\t\t\t\t\techo '<h4 class=\"text\">'.$options['page_ac_title'].'</h4>';\n\t\t\t\t\t\t\t\techo '</div>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t?>\n\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div><!-- end action box -->\n\t\t<?php\n\t}", "public function setDescription($value);", "public static function option($texte,$valeur=null,$defaut=null){\n $selected = '';\n \n if(is_null($valeur)){\n $valeur = $texte;\n }\n \n if(!is_null($defaut)){\n if($valeur == $defaut){\n $selected = 'selected';\n }\n }\n \n ?>\n <option value=\"<?php echo $valeur;?>\" <?php echo $selected;?> ><?php echo $texte;?></option>\n <?php \n }", "public function actionUpdateImageCaption() \r\n {\r\n extract($_POST);\r\n $res=0;\r\n \r\n\r\n $fileMaster= FileMaster::model()->findByPk($id);\r\n $fileMaster->Title = $caption;\r\n if($fileMaster->save()) $res=1;\r\n else print_r( $fileMaster->getErrors() );\r\n print CJSON::encode($res);\r\n }", "function captogov_form_alter( &$form, &$form_state, $form_id )\n{\n if ($form_id == 'search_api_page_search_form_default_search') { \n $form['keys_1']['#attributes']['placeholder'] = t( 'Search our website' );\n }\n}", "function setDescription( $value )\r\n {\r\n $this->Description = $value;\r\n }", "function setDescription( $value )\r\n {\r\n $this->Description = $value;\r\n }", "private function showOptions() : void\n {\n $selectedOption = $this->console->choice(__('Please cheoose your option:'), $this->getAllOptions() );\n $this->setSelectedOption($selectedOption);\n $this->handleOption();\n }", "function getCaption() {\n\t\treturn $this->lobSub->lobCaption;\n\t}", "public function setTitle(string $text = \"untitled\");", "public function __construct($name, $caption, $value = '', $isRequired = true, $helpMessage = '')\n {\n parent::__construct($name, $caption, $value, $isRequired, $helpMessage);\n }", "public function __construct($name, $caption, $value = '', $isRequired = true, $helpMessage = '')\n {\n parent::__construct($name, $caption, $value, $isRequired, $helpMessage);\n }", "public function __construct($name, $caption, $value = '', $isRequired = true, $helpMessage = '')\n {\n parent::__construct($name, $caption, $value, $isRequired, $helpMessage);\n }", "public function __construct($name, $caption, $value = '', $isRequired = true, $helpMessage = '')\n {\n parent::__construct($name, $caption, $value, $isRequired, $helpMessage);\n }", "function pqrc_display_select_field()\n {\n global $pqrc_countries;\n $option = get_option('pqrc_select');\n\n printf('<select id=\"%s\" name=\"%s\">', 'pqrc_select', 'pqrc_select');\n foreach ($pqrc_countries as $country) {\n $selected = '';\n if ($option == $country) {\n $selected = 'selected';\n }\n printf('<option value=\"%s\" %s>%s</option>', $country, $selected, $country);\n }\n echo \"</select>\";\n }", "final function getCaption($value) {\n $titles = $this->getTitles(array($value));\n if (isset($titles[$value])) $res = $titles[$value];\n else $res = false;\n return $res;\n }", "public function form_field_select ( $args ) {\n\t\t$options = $this->get_settings();\n\t\t\n\t\tif ( isset( $args['data']['options'] ) && ( count( (array)$args['data']['options'] ) > 0 ) ) {\n\t\t\t$html = '';\n\t\t\t$html .= '<select id=\"' . esc_attr( $args['key'] ) . '\" name=\"' . esc_attr( $this->token ) . '[' . esc_attr( $args['key'] ) . ']\">' . \"\\n\";\n\t\t\t\tforeach ( $args['data']['options'] as $k => $v ) {\n\t\t\t\t\t$html .= '<option value=\"' . esc_attr( $k ) . '\"' . selected( esc_attr( $options[$args['key']] ), $k, false ) . '>' . $v . '</option>' . \"\\n\";\n\t\t\t\t}\n\t\t\t$html .= '</select>' . \"\\n\";\n\t\t\techo $html;\n\t\t\t\n\t\t\tif ( isset( $args['data']['description'] ) ) {\n\t\t\t\techo '<p><span class=\"description\">' . $args['data']['description'] . '</span></p>' . \"\\n\";\n\t\t\t}\n\t\t}\n\t}", "public function __construct(\n public string $name,\n public string $label,\n public array $options,\n public string $selected = '',\n public string $placeholder = 'Выберите один из вариантов',\n )\n {\n //\n }", "function option_dropdown($label, $name, $value, $keys, $comment='') {\r\n\t\techo \"<tr valign='top'><th scope='row'>\" . $label . \"</th>\";\r\n\t\techo \"<td><select name='$name'>\";\r\n\r\n\t\tforeach ((array)$keys as $key => $description) {\r\n\t\t\tif ($key == $value)\r\n\t\t\t\t$selected = \"selected\";\r\n\t\t\telse\r\n\t\t\t\t$selected = \"\";\r\n\r\n\t\t\techo \"<option value='\" . htmlentities($key, ENT_QUOTES, 'UTF-8') . \"' $selected>$description</option>\";\r\n\t\t}\r\n\t\techo \"</select>\";\r\n\t\techo \" $comment</td></tr>\";\r\n\t}", "function select_option()\r\n{}", "function okrs_related_to_select($value)\n{\n\n $selected = '';\n if($value == 'okrs'){\n $selected = 'selected';\n }\n echo \"<option value='okrs' \".$selected.\">\".\n _l('okrs').\"\n </option>\";\n\n}", "public function setCaption($caption)\n {\n $this->vkarg_caption = $caption;\n\n return $this;\n }", "function get_meta_select( $args = array(), $value = false ) { \r\r\n extract($args);\r\r\n ?>\r\r\n\t<tr>\r\r\n\t\t<th style=\"width:10%;\"><label for=\"<?php\t \t echo $args['name']; ?>\"><?php\t \t echo $args['title']; ?></label></th>\r\r\n\t\t<td>\r\r\n\t\t\t<select name=\"<?php\t \t echo $args['name']; ?>\" id=\"<?php\t \t echo $args['name']; ?>\">\r\r\n\t\t\t\t<option value=\"\"></option>\r\r\n\t\t\t\t<?php\t \t foreach ( $args['options'] as $option => $val ) : ?>\r\r\n\t\t\t\t\t<option <?php\t \t if ( htmlentities( $value, ENT_QUOTES ) == $val ) echo ' selected=\"selected\"'; ?> value=\"<?php\t \t echo $val; ?>\"><?php\t \t if ( __( 'Template:', 'hybrid') == $args['title'] ) echo $option; else echo $val; ?></option>\r\r\n\t\t\t\t<?php\t \t endforeach; ?>\r\r\n\t\t\t</select>\r\r\n\t\t\t<br /><small><?php\t \t echo $args['description']; ?></small>\r\r\n\t\t</td>\r\r\n\t</tr>\r\r\n\t<?php\t \t\r\r\n}", "public function updateGalCaption($galImageID)\r\n\t{\r\n\t\t// Get user input\r\n\t\t$caption = $_POST['caption'];\r\n\r\n\t\t// Update DB\r\n\t\t$this->db->update('galImage', array('caption' => $caption), \"`galImageID` = \".$galImageID);\r\n\t\techo json_encode(array('error' => false));\r\n\t}", "public function render_content()\n {\n ?>\n <label>\n\t\t\t<select <?php $this->link(); ?>>\n\t\t\t\t<?php\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', 'normal', selected($this->value(), 'normal', false), 'normal');\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', 'bold', selected($this->value(), 'bold', false), 'bold');\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', '100', selected($this->value(), '100', false), '100');\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', '200', selected($this->value(), '200', false), '200');\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', '300', selected($this->value(), '300', false), '300');\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', '400', selected($this->value(), '400', false), '400');\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', '500', selected($this->value(), '500', false), '500');\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', '600', selected($this->value(), '600', false), '600');\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', '700', selected($this->value(), '700', false), '700');\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', '800', selected($this->value(), '800', false), '800');\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', '900', selected($this->value(), '900', false), '900');\n\t\t\t\t?>\n </select>\n\t\t\t<p class=\"description\"><?php echo esc_html( $this->label ); ?></p>\n </label>\n <?php\n }", "function testOptionsFunction(){\n\t\t#mdx:OptionsFunction\n\t\t$choice = new SimpleChoice(\"category\");\n\t\t$choice->options(function(){\n\t\t\t// pretend this was fetched from the db\n\t\t\t$rows = [\n\t\t\t\t['id'=>1,'name'=>'Action'],\n\t\t\t\t['id'=>2,'name'=>'Drama'],\n\t\t\t\t['id'=>3,'name'=>'Sci-fi']\n\t\t\t];\n\n\t\t\treturn $rows;\n\n\t\t})->context(['category'=>3]); // selects category 3\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"<b>3 - Sci-fi\",\"$choice\");\n\n\t}", "function text($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\t\t\techo \"<input type='text' size='57' style='\" . $this->width($args['width']) . \"' \" . $this->placeholder($args['placeholder']) . \" name='\" . $args['formname'] . \"' value='\" . $args['value'] . \"'/>\";\t\t\t\t\t\r\n\t\t\t$this->description($args['description']);\r\n\t\t}", "public function displayAddFormOption() {\n $L = $this->getLangStrings();\n\n $LANG = Core::$L;\n $root_url = Core::getRootUrl();\n\n $select = mb_strtoupper($LANG[\"word_select\"]);\n\n echo <<< END\n <table width=\"100%\">\n <tr>\n <td width=\"49%\" valign=\"top\">\n <div class=\"grey_box add_form_select\">\n <span style=\"float:right\">\n <input type=\"button\" name=\"form_builder\" class=\"blue bold\" value=\"$select\"\n onclick=\"window.location='$root_url/modules/form_builder/admin/add_form.php'\" />\n </span>\n <div class=\"bold\">{$L[\"module_name\"]}</div>\n <div class=\"medium_grey\">{$L[\"text_form_builder_add_form_section\"]}</div>\n </div>\n </td>\n <td width=\"2%\"> </td>\n <td width=\"49%\"></td>\n </tr>\n </table>\nEND;\n }", "public function getTitle($caption)\n {\n return \" <title>$caption</title>\\n\";\n }", "function bb_print_mystique_option( $option ) {\r\n\techo bb_get_mystique_option( $option );\r\n}", "function settings_html() {\n $this->render_setting( 'label_any' );\n }", "public function name() {\n\t\treturn __( 'Option Container', 'thrive-cb' );\n\t}", "function kstFilterShortcodeCaptionAndWpCaption($attr, $content = null) {\n $output = apply_filters('kst_wp_caption_shortcode', '', $attr, $content);\n\n if ( $output != '' )\n return $output;\n\n extract(shortcode_atts(array(\n 'id'\t=> '',\n 'align'\t=> '',\n 'width'\t=> '',\n 'caption' => ''\n ), $attr));\n\n if ( $id )\n $id = 'id=\"' . $id . '\" ';\n\n if (!empty($width) )\n\n $width = ( !empty($width) )\n ? ' style=\"width: ' . ((int) $width) . 'px\" '\n : '';\n\n $better = '<div ' . $id . $width . 'class=\"wp_attachment\">';\n $better .= do_shortcode( $content );\n if ( !empty($caption) )\n $better .= '<div class=\"wp_caption\">' . $caption .'</div>';\n $better .= '</div>';\n\n return $better;\n }", "function updateOption($caption,$value,$type,$db) {\r\n//\t$res=mysql_query($sql,$db);\r\n\r\n}", "public function hasCaption()\n {\n return $this->caption !== null;\n }", "function uds_pricing_render_general_options_text($key, $value)\n{\n\tglobal $uds_pricing_general_options;\n\t$field = $uds_pricing_general_options[$key];\n\t$out = \"\n\t\t<div>\n\t\t\t<label>{$field['label']}</label>\n\t\t\t<input type='text' name='uds-pricing-$key' value='$value' class='uds-pricing-$key' />\n\t\t</div>\n\t\";\n\treturn $out;\n}" ]
[ "0.72729474", "0.69511145", "0.6939236", "0.6899094", "0.6625466", "0.651141", "0.64263403", "0.64084697", "0.62733597", "0.6265194", "0.6231165", "0.6140197", "0.6131023", "0.6128065", "0.6066711", "0.6044273", "0.60297805", "0.60256106", "0.6001828", "0.5976827", "0.59663606", "0.59535694", "0.59445995", "0.59387314", "0.5902391", "0.5876506", "0.58437693", "0.57934904", "0.57934904", "0.5736946", "0.572585", "0.5711329", "0.5691864", "0.5672998", "0.56536794", "0.5638933", "0.562236", "0.5619884", "0.5600133", "0.5576742", "0.5569663", "0.5551352", "0.5545514", "0.5522999", "0.54899985", "0.54720545", "0.54418427", "0.5440735", "0.5430463", "0.5430463", "0.5415759", "0.54143107", "0.54029834", "0.5392578", "0.5386655", "0.53866476", "0.53797626", "0.53747624", "0.53689086", "0.536679", "0.53628594", "0.5354574", "0.5354465", "0.53540856", "0.53514934", "0.5332835", "0.5318857", "0.5294244", "0.5293254", "0.5290935", "0.5290935", "0.5284816", "0.5284618", "0.5281804", "0.52803445", "0.52803445", "0.52803445", "0.52803445", "0.5279258", "0.5277502", "0.5271873", "0.52512014", "0.5247534", "0.5245474", "0.5243942", "0.5237417", "0.52345073", "0.5228424", "0.5222715", "0.5221534", "0.52110505", "0.5209801", "0.52045846", "0.5204138", "0.52032727", "0.5199968", "0.51984304", "0.5197125", "0.5196484", "0.51873887" ]
0.7215593
1
Check to see if an IP is inside a given network See : \ref ipAddressToNetwork
Проверьте, находится ли IP-адрес внутри заданной сети. См. : \ref ipAddressToNetwork
static function checkIPFromNetwork($address, $networkAddress, $networkNetmask, $version = 0) { $IPNetmask = [0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff]; $relativity = self::checkNetworkRelativity($address, $IPNetmask, $networkAddress, $networkNetmask, $version); return ($relativity == "equals") || ($relativity == "second contains first"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ip_in_range($network,$netmask,$ip)\n {\n $wildcard_mask = pow( 2, ( 32 - $netmask ) ) - 1;\n $mask = ~ $wildcard_mask;\n return ( ( $ip & $mask ) == ( $network & $mask ) );\n }", "function current_ip_in_network() {\r\n return ip_in_network(current_user_ip());\r\n}", "public function isIPAddressInNetwork($ipAddress)\n {\n $first = $this->_getSubnetFirstUsableHost($this->getNetworkAddress(),\n $this->getNetworkMask());\n\n $last = $this->_getSubnetLastUsableHost($this->getNetworkAddress(),\n $this->getNetworkMask());\n \n $long = ip2long($ipAddress);\n \n return (ip2long($first) <= $long\n && $long <= ip2long($last));\n }", "function check_subnet($ip, $network, $netmask) {\n\t$network_long = ip2long($network);\n\t$mask_long = ip2long($netmask);\n\t$ip_long = ip2long($ip);\n\n\t// Remove the host part of the addresses.\n\t$network_net_long = $network_long & $mask_long;\n\t$ip_net_long = $ip_long & $mask_long;\n\n\t// If the network parts are equal, return true.\n\treturn ($network_net_long === $ip_net_long);\n}", "public function contains( $ip )\n\t{\n\t\tif( !$this->valid ) return false;\n\t\tif( $this->isIPv4( $ip ))\n\t\t{\n\t\t\t$ip = '::'.$ip;\n\t\t}\n\t\t$addr = @inet_pton( $ip );\n\t\tif( $addr === false ) return false;\n\t\t$gmp = $this->inet_ntogmp( $addr );\n\t\treturn( \\gmp_cmp( $this->net_addr_long, $gmp ) <= 0 && \\gmp_cmp( $gmp, $this->net_broadcast_long ) <= 0 );\t\t\n\t}", "protected function verifyNetwork($input): bool\n {\n if ($this->networkRange === null) {\n return true;\n }\n\n if (isset($this->networkRange['mask'])) {\n return $this->belongsToSubnet($input);\n }\n\n $input = sprintf('%u', ip2long($input));\n\n $min = sprintf('%u', ip2long($this->networkRange['min']));\n $max = sprintf('%u', ip2long($this->networkRange['max']));\n\n return ($input >= $min) && ($input <= $max);\n }", "public static function isIPWanAddress($string) {\n $bytes = self::isIPAddress($string, true);\n\n // Die Logik entspricht dem Gegenteil von self:: isIPLanAdress() + zusaetzlicher Tests.\n if ($bytes) {\n if ($bytes[0] == 10) // 10.0.0.0 - 10.255.255.255\n return false;\n\n if ($bytes[0] == 127) // 127.0.0.0 - 127.255.255.255\n return false;\n\n if ($bytes[0]==169) // 169.0.0.0 - 169.255.255.255 !!! wem zugewiesen? niemandem?\n return false;\n\n if ($bytes[0] == 172) // 172.16.0.0 - 172.31.255.255\n return !(15 < $bytes[1] && $bytes[1] < 32);\n\n if ($bytes[0]==192) // 192.168.0.0 - 192.168.255.255\n return ($bytes[1]!=168);\n }\n\n // dieses TRUE ist eher spekulativ\n return true;\n }", "function ip_in_subnet($addr,$subnet) {\n\tlist($ip, $mask) = explode('/', $subnet);\n\t$mask = 0xffffffff << (32 - $mask);\n\treturn ((ip2long($addr) & $mask) == (ip2long($ip) & $mask));\n}", "function rest_is_ip_address($ip)\n {\n }", "public static function isIPLanAddress($string) {\n $bytes = self::isIPAddress($string, true);\n\n if ($bytes) {\n if ($bytes[0] == 10) // 10.0.0.0 - 10.255.255.255\n return true;\n\n if ($bytes[0] == 172) // 172.16.0.0 - 172.31.255.255\n return (15 < $bytes[1] && $bytes[1] < 32);\n\n if ($bytes[0]==192 && $bytes[1]==168) // 192.168.0.0 - 192.168.255.255\n return true;\n }\n\n return false;\n }", "function ip_in_subnet($ip, $subnet)\n{\n // Converts a human-readable IP address into its binary representation\n $binary_ip = inet_pton($ip);\n\n // Converts the binary IP into a string of bits.\n // We can't convert the IP to an int (using, for example ip2long()) because php only\n // natively supports unsigned 32 bit ints, while an ipv6 address is 128 bits.\n // If we want, we could make use of some php libraries (e.g. BC Math or GMP) to create a 128\n // bit int, but this is not necessary because we don't need to perform any math operations\n // on this int anyway.\n // Instead, we just convert the IP to a string which is sufficient because we only need to\n // use it for a single string comparison later.\n $ip_bits = inet_to_bits($binary_ip);\n\n // Get the bit string for the subnet address, as well as the length of the subnet mask (in bits)\n list($range, $netmask_len) = explode('/', $subnet, 2); //$netmask_len is aka. the CIDR prefix\n $binary_range = inet_pton($range);\n $range_bits = inet_to_bits($binary_range);\n\n // Get the network bits of the given IP address and the subnet address\n $ip_net_bits = substr($ip_bits, 0, $netmask_len);\n $range_net_bits = substr($range_bits, 0, $netmask_len);\n\n // If the network bits are identical, then this IP is part of the subnet\n return ($ip_net_bits == $range_net_bits);\n}", "public function isUserIPAddressAllowedAccess()\n\t{\n\t\ttry\n {\n $IpBin = new IpBin();\n return $IpBin->isUserIPAddressAllowedAccess($this->getSiteUser()->getId());\n }\n catch(\\Whoops\\Example\\Exception $e)\n {\n Log::error(\"Could not check if ip address is allowed access for user [\" . $this->getSiteUser()->getId() . \"]. \" . $e);\n return FALSE;\n }\n\t}", "function is_private_ip($iptocheck) {\n\t$isprivate = false;\n\t$ip_private_list = array(\n\t\t\"10.0.0.0/8\",\n\t\t\"100.64.0.0/10\",\n\t\t\"172.16.0.0/12\",\n\t\t\"192.168.0.0/16\",\n\t);\n\tforeach ($ip_private_list as $private) {\n\t\tif (ip_in_subnet($iptocheck, $private) == true) {\n\t\t\t$isprivate = true;\n\t\t}\n\t}\n\treturn $isprivate;\n}", "public static function checkIPSubnet( $ipAddress ){\n\t\t\tglobal $wpdb;\n\n\t\t\t/*\n\t\t\t\tGrabs allowed subnets from the \n\t\t\t\tcurrent blog.\n\t\t\t*/\n\t\t\tif( is_multisite() ){\n\t\t\t\t$currentBlogID = get_current_blog_id();\n\n\t\t\t\tglobal $switched;\n\t\t\t\tswitch_to_blog(1);\n\n\t\t\t\t$subnets = $wpdb->get_results( $wpdb->prepare(\n\t\t\t\t\t\"SELECT *\n\t\t\t\t\t FROM \".$wpdb->prefix.\"wps_subnets\n\t\t\t\t\t WHERE blog_id = '%d'\",\n\t\t\t\t\t $currentBlogID\n\t\t\t\t), ARRAY_A );\n\n\t\t\t\trestore_current_blog();\n\t\t\t}else{\n\t\t\t\t$subnets = $wpdb->get_results( \"SELECT * FROM \".$wpdb->prefix.\"wps_subnets\", ARRAY_A );\n\t\t\t}\n\n\t\t\t/*\n\t\t\t\tIterates through subnets and checks to see\n\t\t\t\tif the IP address is within the range.\n\t\t\t*/\n\t\t\tforeach( $subnets as $subnet ){\n\t\t\t\t$subnetParts \t= explode( '.', $subnet['start_ip'] );\n\n\t\t\t\t$firstOctet \t= $subnetParts[0];\n\t\t\t\t$secondOctet \t= $subnetParts[1];\n\t\t\t\t$thirdOctet \t= $subnetParts[2];\n\t\t\t\t$fourthOctet \t= $subnetParts[3];\n\n\t\t\t\t$newFirstOctet \t= '';\n\t\t\t\t$newSecondOctet\t= '';\n\t\t\t\t$newThirdOctet \t= '';\n\t\t\t\t$newFourthOctet = '';\n\n\t\t\t\t/*\n\t\t\t\t\tChecks from the largest networks\n\t\t\t\t\tfirst down to the smallest.\n\t\t\t\t*/\n\t\t\t\tif( $subnet['subnet'] <= 8 ){\n\t\t\t\t\tif( ( $firstOctet + $subnet['subnet'] ) > 255 ){\n\t\t\t\t\t\t$newFirstOctet = 255;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$newFirstOctet = $firstOctet + $subnet['subnet'];\n\t\t\t\t\t}\n\n\t\t\t\t\t$min \t= ip2long( $subnet['start_ip'] );\n\t\t\t\t\t$max \t= ip2long( $newFirstOctet.'.255.255.254' );\n\t\t\t\t\t$needle = ip2long( $ipAddress );\n\n\t\t\t\t\tif( ( $needle >= $min ) AND ( $needle <= $max ) ){\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}else if( ( $subnet['subnet'] > 8 ) && ( $subnet['subnet'] <= 16 ) ){\n\t\t\t\t\tif( ( $secondOctet + $subnet['subnet'] ) > 255 ){\n\t\t\t\t\t\t$newScondOctet = ( $secondOctet + $subnet['subnet'] ) - 255;\n\t\t\t\t\t\t$newFirstOctet = $firstOctet + 1;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$newFirstOctet = $firstOctet;\n\t\t\t\t\t\t$newSecondOctet = $secondOctet + $subnet['subnet'];\n\t\t\t\t\t}\n\n\t\t\t\t\t$min = ip2long( $subnet['start_ip'] );\n\t\t\t\t\t$max = ip2long( $newFirstOctet.'.255.255.254' );\n\t\t\t\t\t$needle = ip2long( $ipAddress ); \n\n\t\t\t\t\tif( ( $needle >= $min ) AND ( $needle <= $max ) ){\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}else if( ( $subnet['subnet'] > 16 ) && ( $subnet['subnet'] <= 24 ) ){\n\t\t\t\t\tif( ( $thirdOctet + $subnet['subnet'] ) > 255 ){\n\t\t\t\t\t\t$newThirdOctet \t= ( $thirdOctet + $subnet['subnet'] ) - 255;\n\t\t\t\t\t\t$newSecondOctet = $secondOctet + 1;\n\t\t\t\t\t\t$newFirstOctet \t= $firstOctet;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$newSecondOctet = $secondOctet;\n\t\t\t\t\t\t$newThirdOctet \t= $thirdOctet + $subnet['subnet'];\n\t\t\t\t\t\t$newFirstOctet \t= $firstOctet;\n\t\t\t\t\t}\n\n\n\t\t\t\t\t$min = ip2long( $subnet['start_ip'] );\n\t \t\t$max = ip2long( $newFirstOctet.'.255.255.254' );\n\t \t\t$needle = ip2long( $ipAddress ); \n\n\t \t\tif( ( $needle >= $min ) AND ( $needle <= $max ) ){\n\t \t\t\treturn true;\n\t \t\t}\n\t\t\t\t}else if( $subnet['subnet'] > 24 ){\n\t\t\t\t\tif( ( $fourthOctet + $subnet['subnet'] ) > 255 ){\n\t\t\t\t\t\t$newFourthOctet = ( $fourthOctet + $subnet['subnet'] ) - 255;\n\t\t\t\t\t\t$newThirdOctet \t= $thirdOctet + 1;\n\t\t\t\t\t\t$newSecondOctet = $secondOctet;\n\t\t\t\t\t\t$newFirstOctet \t= $firstOctet;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$newFourthOctet = $fourthOctet + $subnet['subnet'];\n\t\t\t\t\t\t$newSecondOctet = $secondOctet;\n\t\t\t\t\t\t$newThirdOctet \t= $thirdOctet;\n\t\t\t\t\t\t$newFirstOctet \t= $firstOctet;\n\t\t\t\t\t}\n\n\n\t\t\t\t\t$min = ip2long( $subnet['start_ip'] );\n\t \t\t$max = ip2long( $newFirstOctet.'.255.255.254' );\n\t \t\t$needle = ip2long( $ipAddress ); \n\n\t \t\tif( ( $needle >= $min ) AND ( $needle <= $max ) ){\n\t \t\t\treturn true;\n\t \t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/*\n\t\t\t\tOnly reachable if nothing was returned\n\t\t\t\tmeaning that the IP is NOT in the subnet.\n\t\t\t*/\n\t\t\treturn false;\n\t\t}", "private function doIpCheck($ip)\r\n {\r\n $allowedList = array();\r\n $allowedList['85.158.206.17'] = 1;\r\n $allowedList['85.158.206.18'] = 1;\r\n $allowedList['85.158.206.19'] = 1;\r\n $allowedList['85.158.206.20'] = 1;\r\n $allowedList['85.158.206.21'] = 1;\r\n if (!isset($allowedList[$ip]))\r\n {\r\n return false;\r\n }\r\n return true;\r\n }", "public static function ipaddress_or_cidr(string $input): bool {\r\n return preg_match('/^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\\/(\\d|[1-2]\\d|3[0-2]))?$/', $input) === 1;\r\n }", "public function validate_ip($ip) {\n\t\tif (strtolower($ip) === 'unknown')\n\t\t\treturn false;\n\n\t\t// generate ipv4 network address\n\t\t$ip = ip2long($ip);\n\n\t\t// if the ip is set and not equivalent to 255.255.255.255\n\t\tif ($ip !== false && $ip !== -1) {\n\t\t\t// make sure to get unsigned long representation of ip\n\t\t\t// due to discrepancies between 32 and 64 bit OSes and\n\t\t\t// signed numbers (ints default to signed in PHP)\n\t\t\t$ip = sprintf('%u', $ip);\n\t\t\t// do private network range checking\n\t\t\tif ($ip >= 0 && $ip <= 50331647) return false;\n\t\t\tif ($ip >= 167772160 && $ip <= 184549375) return false;\n\t\t\tif ($ip >= 2130706432 && $ip <= 2147483647) return false;\n\t\t\tif ($ip >= 2851995648 && $ip <= 2852061183) return false;\n\t\t\tif ($ip >= 2886729728 && $ip <= 2887778303) return false;\n\t\t\tif ($ip >= 3221225984 && $ip <= 3221226239) return false;\n\t\t\tif ($ip >= 3232235520 && $ip <= 3232301055) return false;\n\t\t\tif ($ip >= 4294967040) return false;\n\t\t}\n\t\treturn true;\n\t}", "function cidr_match($ip, $range){\n list ($subnet, $bits) = explode('/', $range);\n $ip = ip2long($ip);\n $subnet = ip2long($subnet);\n $mask = -1 << (32 - $bits);\n $subnet &= $mask; # nb: in case the supplied subnet wasn't correctly aligned\n return ($ip & $mask) == $subnet;\n}", "public function validate_ip($ip) {\n if (strtolower($ip) === 'unknown')\n return false;\n\n // generate ipv4 network address\n $ip = ip2long($ip);\n\n // if the ip is set and not equivalent to 255.255.255.255\n if ($ip !== false && $ip !== -1) {\n // make sure to get unsigned long representation of ip\n // due to discrepancies between 32 and 64 bit OSes and\n // signed numbers (ints default to signed in PHP)\n $ip = sprintf('%u', $ip);\n // do private network range checking\n if ($ip >= 0 && $ip <= 50331647) return false;\n if ($ip >= 167772160 && $ip <= 184549375) return false;\n if ($ip >= 2130706432 && $ip <= 2147483647) return false;\n if ($ip >= 2851995648 && $ip <= 2852061183) return false;\n if ($ip >= 2886729728 && $ip <= 2887778303) return false;\n if ($ip >= 3221225984 && $ip <= 3221226239) return false;\n if ($ip >= 3232235520 && $ip <= 3232301055) return false;\n if ($ip >= 4294967040) return false;\n }\n return true;\n }", "private function is_from_valid_ip() {\n\t\t$my_ip = getenv( 'REMOTE_ADDR' );\n\t\t\n\t\t// Check if we are in testing mode, and get list of valid IPs\n\t\t//if ( Mage::getStoreConfig( 'payment/fssnet/is_testing' ) )\n\t\t\t$valid_ips = array( '221.134.101.174', '221.134.101.169','198.64.129.10','198.64.133.213' );\n\t\t//else\n\t\t\t//$valid_ips = array( '221.134.101.187', '221.134.101.175', '221.134.101.166','198.64.129.10','198.64.133.213' );\n\t\t\n\t\t// Check if our IP is valid\n\t\tif ( in_array( $my_ip, $valid_ips ) )\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "function validate_ip($ip)\n {\n if (strtolower($ip) === 'unknown')\n return false;\n\n // generate ipv4 network address\n $ip = ip2long($ip);\n\n // if the ip is set and not equivalent to 255.255.255.255\n if ($ip !== false && $ip !== -1) {\n // make sure to get unsigned long representation of ip\n // due to discrepancies between 32 and 64 bit OSes and\n // signed numbers (ints default to signed in PHP)\n $ip = sprintf('%u', $ip);\n // do private network range checking\n if ($ip >= 0 && $ip <= 50331647) return false;\n if ($ip >= 167772160 && $ip <= 184549375) return false;\n if ($ip >= 2130706432 && $ip <= 2147483647) return false;\n if ($ip >= 2851995648 && $ip <= 2852061183) return false;\n if ($ip >= 2886729728 && $ip <= 2887778303) return false;\n if ($ip >= 3221225984 && $ip <= 3221226239) return false;\n if ($ip >= 3232235520 && $ip <= 3232301055) return false;\n if ($ip >= 4294967040) return false;\n }\n return true;\n }", "static function ip__is_private_network($ip, $ip_type = 'v4')\n\t{\n\t\treturn self::ip__mask_match($ip, self::$private_networks[$ip_type], $ip_type);\n\t}", "function validate_ip($ip) {\n if (strtolower($ip) === 'unknown')\n return false;\n\n // generate ipv4 network address\n $ip = ip2long($ip);\n\n // if the ip is set and not equivalent to 255.255.255.255\n if ($ip !== false && $ip !== -1) {\n // make sure to get unsigned long representation of ip\n // due to discrepancies between 32 and 64 bit OSes and\n // signed numbers (ints default to signed in PHP)\n $ip = sprintf('%u', $ip);\n // do private network range checking\n if ($ip >= 0 && $ip <= 50331647)\n return false;\n if ($ip >= 167772160 && $ip <= 184549375)\n return false;\n if ($ip >= 2130706432 && $ip <= 2147483647)\n return false;\n if ($ip >= 2851995648 && $ip <= 2852061183)\n return false;\n if ($ip >= 2886729728 && $ip <= 2887778303)\n return false;\n if ($ip >= 3221225984 && $ip <= 3221226239)\n return false;\n if ($ip >= 3232235520 && $ip <= 3232301055)\n return false;\n if ($ip >= 4294967040)\n return false;\n }\n return true;\n }", "function ip_in_whitelist($whitelist)\n{\n $ip = get_ip();\n\n // Check if the IP is in our defined whitelist\n foreach ($whitelist as $subnet) {\n if (ip_in_subnet($ip, $subnet) == true) {\n return true;\n }\n }\n\n return false;\n}", "function ip_in_range($ip, $range) {\n if ( is_string($range) ) $ranges = explode(',',$range);\n else $ranges = $range;\n if (strpos($ip,':') !== false) {\n return in_array($ip,$ranges);\n } else {\n $in = false;\n foreach($ranges as $range) {\n if ($in) return $in;\n if (strpos($range,':') !== false) continue;\n # If IP has the 4 blocks is a host, but we need the prefix, so put it\n if (strpos($range,'/') === false && strpos($range,'-') === false && strpos($range,'*') === false) $range .= '/32';\n if (strpos($range, '/') !== false) {\n // $range is in IP/NETMASK format\n list($range, $netmask) = explode('/', $range, 2);\n if (strpos($netmask, '.') !== false) {\n // $netmask is a 255.255.0.0 format\n $netmask = str_replace('*', '0', $netmask);\n $netmask_dec = ip2long($netmask);\n return ( (ip2long($ip) & $netmask_dec) == (ip2long($range) & $netmask_dec) );\n } else {\n // $netmask is a CIDR size block\n // fix the range argument\n $x = explode('.', $range);\n while(count($x)<4) $x[] = '0';\n list($a,$b,$c,$d) = $x;\n $range = sprintf(\"%u.%u.%u.%u\", empty($a)?'0':$a, empty($b)?'0':$b,empty($c)?'0':$c,empty($d)?'0':$d);\n $range_dec = ip2long($range);\n $ip_dec = ip2long($ip);\n # Strategy 1 - Create the netmask with 'netmask' 1s and then fill it to 32 with 0s\n #$netmask_dec = bindec(str_pad('', $netmask, '1') . str_pad('', 32-$netmask, '0'));\n # Strategy 2 - Use math to create it\n $wildcard_dec = pow(2, (32-$netmask)) - 1;\n $netmask_dec = ~ $wildcard_dec;\n $in = (($ip_dec & $netmask_dec) == ($range_dec & $netmask_dec));\n }\n } else {\n // range might be 255.255.*.* or 1.2.3.0-1.2.3.255\n if (strpos($range, '*') !==false) { // a.b.*.* format\n // Just convert to A-B format by setting * to 0 for A and 255 for B\n $lower = str_replace('*', '0', $range);\n $upper = str_replace('*', '255', $range);\n $range = \"$lower-$upper\";\n }\n if (strpos($range, '-')!==false) { // A-B format\n list($lower, $upper) = explode('-', $range, 2);\n $lower_dec = (float)sprintf(\"%u\",ip2long($lower));\n $upper_dec = (float)sprintf(\"%u\",ip2long($upper));\n $ip_dec = (float)sprintf(\"%u\",ip2long($ip));\n $in = ( ($ip_dec>=$lower_dec) && ($ip_dec<=$upper_dec) );\n }\n }\n }\n return $in;\n }\n}", "Function ip_in_range($ip, $range) {\r\n if (strpos($range, '/') !== false) {\r\n // $range is in IP/NETMASK format\r\n list($range, $netmask) = explode('/', $range, 2);\r\n if (strpos($netmask, '.') !== false) {\r\n // $netmask is a 255.255.0.0 format\r\n $netmask = str_replace('*', '0', $netmask);\r\n $netmask_dec = ip2long($netmask);\r\n return ( (ip2long($ip) & $netmask_dec) == (ip2long($range) & $netmask_dec) );\r\n } else {\r\n // $netmask is a CIDR size block\r\n // fix the range argument\r\n $x = explode('.', $range);\r\n while(count($x)<4) $x[] = '0';\r\n list($a,$b,$c,$d) = $x;\r\n $range = sprintf(\"%u.%u.%u.%u\", empty($a)?'0':$a, empty($b)?'0':$b,empty($c)?'0':$c,empty($d)?'0':$d);\r\n $range_dec = ip2long($range);\r\n $ip_dec = ip2long($ip);\r\n\r\n # Strategy 1 - Create the netmask with 'netmask' 1s and then fill it to 32 with 0s\r\n #$netmask_dec = bindec(str_pad('', $netmask, '1') . str_pad('', 32-$netmask, '0'));\r\n\r\n # Strategy 2 - Use math to create it\r\n $wildcard_dec = pow(2, (32-$netmask)) - 1;\r\n $netmask_dec = ~ $wildcard_dec;\r\n\r\n return (($ip_dec & $netmask_dec) == ($range_dec & $netmask_dec));\r\n }\r\n } else {\r\n // range might be 255.255.*.* or 1.2.3.0-1.2.3.255\r\n if (strpos($range, '*') !==false) { // a.b.*.* format\r\n // Just convert to A-B format by setting * to 0 for A and 255 for B\r\n $lower = str_replace('*', '0', $range);\r\n $upper = str_replace('*', '255', $range);\r\n $range = \"$lower-$upper\";\r\n }\r\n\r\n if (strpos($range, '-')!==false) { // A-B format\r\n list($lower, $upper) = explode('-', $range, 2);\r\n $lower_dec = (float)sprintf(\"%u\",ip2long($lower));\r\n $upper_dec = (float)sprintf(\"%u\",ip2long($upper));\r\n $ip_dec = (float)sprintf(\"%u\",ip2long($ip));\r\n return ( ($ip_dec>=$lower_dec) && ($ip_dec<=$upper_dec) );\r\n }\r\n\r\n echo 'Range argument is not in 1.2.3.4/24 or 1.2.3.4/255.255.255.0 format';\r\n return false;\r\n }\r\n\r\n}", "public function inNetwork($networks = [], $ip = \"\") {\n $network_group = [];\n $netmask_group = [];\n\n foreach($networks as $network) {\n list($subnet, $cidr) = explode('/', $network);\n $netmask = (1 << 32) - (1 << (32 - $cidr));\n $network_group[ip2long($subnet)] = $network;\n\n if(!in_array($netmask, $netmask_group)) $netmask_group[] = $netmask;\n }\n\n // sort netmask in desc order - important to work properly\n rsort($netmask_group);\n\n foreach($netmask_group as $netmask) {\n // get network from ip address and netmask\n $network = ip2long($ip) & $netmask;\n\n if(array_key_exists($network, $network_group)) return $network_group[$network];\n }\n\n }", "function check_cidr($ip, $cidr) {\n\t$ip_arr = explode('/', $cidr);\n\t// Fill in any missing \".0\" parts, and turn the address into a long.\n\t$cidr_long = ip2long($ip_arr[0].str_repeat('.0', 3 - substr_count($ip_arr[0], '.')));\n\t$cidr_bits = (int) $ip_arr[1];\n\t// Turn the IP into a long.\n\t$ip_long = ip2long($ip);\n\n\t// Get the network part of the CIDR and the IP.\n\t$cidr_network = $cidr_long >> (32 - $cidr_bits);\n\t$ip_network = $ip_long >> (32 - $cidr_bits);\n\n\t// If the network parts are equal, return true.\n\treturn ($cidr_network === $ip_network);\n}", "Function ip_in_range($ip, $range) {\n if (strpos($range, '/') !== false) {\n // $range is in IP/NETMASK format\n list($range, $netmask) = explode('/', $range, 2);\n if (strpos($netmask, '.') !== false) {\n // $netmask is a 255.255.0.0 format\n $netmask = str_replace('*', '0', $netmask);\n $netmask_dec = ip2long($netmask);\n return ( (ip2long($ip) & $netmask_dec) == (ip2long($range) & $netmask_dec) );\n } else {\n // $netmask is a CIDR size block\n // fix the range argument\n $x = explode('.', $range);\n while(count($x)<4) $x[] = '0';\n list($a,$b,$c,$d) = $x;\n $range = sprintf(\"%u.%u.%u.%u\", empty($a)?'0':$a, empty($b)?'0':$b,empty($c)?'0':$c,empty($d)?'0':$d);\n $range_dec = ip2long($range);\n $ip_dec = ip2long($ip);\n\n # Strategy 1 - Create the netmask with 'netmask' 1s and then fill it to 32 with 0s\n #$netmask_dec = bindec(str_pad('', $netmask, '1') . str_pad('', 32-$netmask, '0'));\n\n # Strategy 2 - Use math to create it\n $wildcard_dec = pow(2, (32-$netmask)) - 1;\n $netmask_dec = ~ $wildcard_dec;\n\n return (($ip_dec & $netmask_dec) == ($range_dec & $netmask_dec));\n }\n } else {\n // range might be 255.255.*.* or 1.2.3.0-1.2.3.255\n if (strpos($range, '*') !==false) { // a.b.*.* format\n // Just convert to A-B format by setting * to 0 for A and 255 for B\n $lower = str_replace('*', '0', $range);\n $upper = str_replace('*', '255', $range);\n $range = \"$lower-$upper\";\n }\n\n if (strpos($range, '-')!==false) { // A-B format\n list($lower, $upper) = explode('-', $range, 2);\n $lower_dec = (float)sprintf(\"%u\",ip2long($lower));\n $upper_dec = (float)sprintf(\"%u\",ip2long($upper));\n $ip_dec = (float)sprintf(\"%u\",ip2long($ip));\n return ( ($ip_dec>=$lower_dec) && ($ip_dec<=$upper_dec) );\n }\n\n //echo 'Range argument is not in 1.2.3.4/24 or 1.2.3.4/255.255.255.0 format';\n return false;\n }\n\n}", "public static function isPublic( $ip ) {\n if ( self::isIPv6( $ip ) ) {\n return self::isPublic6( $ip );\n }\n $n = self::toUnsigned( $ip );\n if ( !$n ) {\n return false;\n }\n\n // ip2long accepts incomplete addresses, as well as some addresses\n // followed by garbage characters. Check that it's really valid.\n if ( $ip != long2ip( $n ) ) {\n return false;\n }\n\n static $privateRanges = false;\n if ( !$privateRanges ) {\n $privateRanges = array(\n array( '10.0.0.0', '10.255.255.255' ), # RFC 1918 (private)\n array( '172.16.0.0', '172.31.255.255' ), # \"\n array( '192.168.0.0', '192.168.255.255' ), # \"\n array( '0.0.0.0', '0.255.255.255' ), # this network\n array( '127.0.0.0', '127.255.255.255' ), # loopback\n );\n }\n\n foreach ( $privateRanges as $r ) {\n $start = self::toUnsigned( $r[0] );\n $end = self::toUnsigned( $r[1] );\n if ( $n >= $start && $n <= $end ) {\n return false;\n }\n }\n return true;\n }", "public static function subnetContainsIP($subnet, $ip) {\n\t\tlist($network, $prefix) = array_pad(explode('/', $subnet, 2), 2, null);\n\t\t\n\t\tif (filter_var($network, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {\n\t\t\t// If no prefix was supplied, 32 is implied for IPv4\n\t\t\tif ($prefix === null) {\n\t\t\t\t$prefix = 32;\n\t\t\t}\n\t\t\t\n\t\t\t// Validate the IPv4 network prefix\n\t\t\tif ($prefix < 0 || $prefix > 32) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t// Increase the IPv4 network prefix to work in the IPv6 address space\n\t\t\t$prefix += 96;\n\t\t} else {\n\t\t\t// If no prefix was supplied, 128 is implied for IPv6\n\t\t\tif ($prefix === null) {\n\t\t\t\t$prefix = 128;\n\t\t\t}\n\t\t\t\n\t\t\t// Validate the IPv6 network prefix\n\t\t\tif ($prefix < 1 || $prefix > 128) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$bin_network = wfWAFUtils::substr(self::inet_pton($network), 0, ceil($prefix / 8));\n\t\t$bin_ip = wfWAFUtils::substr(self::inet_pton($ip), 0, ceil($prefix / 8));\n\t\tif ($prefix % 8 != 0) { //Adjust the last relevant character to fit the mask length since the character's bits are split over it\n\t\t\t$pos = intval($prefix / 8);\n\t\t\t$adjustment = chr(((0xff << (8 - ($prefix % 8))) & 0xff));\n\t\t\t$bin_network[$pos] = ($bin_network[$pos] & $adjustment);\n\t\t\t$bin_ip[$pos] = ($bin_ip[$pos] & $adjustment);\n\t\t}\n\t\t\n\t\treturn ($bin_network === $bin_ip);\n\t}", "public static function ipInRange (string $ip, string $range): bool {\n if (!str_contains($range, '/')) {\n $range .= '/32';\n }\n $range_full = explode('/', $range, 2);\n $netmask_decimal = ~(pow(2, (32 - $range_full[1])) - 1);\n return (ip2long($ip) & $netmask_decimal) == (ip2long($range_full[0]) & $netmask_decimal);\n }", "function is_internal_IP() {\n if (is_admins())\n return true;\n $ip_prefix = array(\"172.31.\",\n \"172.\",\n \"10.\",\n \"222.200.\",\n \"192.168.\",\n \"202.116.\",\n \"211.66\",\n \"219.222\",\n \"125.217\",\n \"127.0.0.1\"\n );\n foreach ($ip_prefix as $ip) {\n if (!strncmp($_SERVER['REMOTE_ADDR'], $ip, strlen($ip)))\n return true;\n }\n return false;\n}", "public static function validateIpAddress($ipAddress = '') {\n if (strtolower($ipAddress) === 'unknown') {\n return false;\n }\n // Generate ipv4 network address\n $ipAddress = ip2long($ipAddress);\n // If the ip is set and not equivalent to 255.255.255.255\n if ($ipAddress !== false && $ipAddress !== -1) {\n /**\n * Make sure to get unsigned long representation of ip\n * due to discrepancies between 32 and 64 bit OSes and\n * signed numbers (ints default to signed in PHP)\n */\n $ipAddress = sprintf('%u', $ipAddress);\n // Do private network range checking\n if ($ipAddress >= 0 && $ipAddress <= 50331647) return false;\n if ($ipAddress >= 167772160 && $ipAddress <= 184549375) return false;\n if ($ipAddress >= 2130706432 && $ipAddress <= 2147483647) return false;\n if ($ipAddress >= 2851995648 && $ipAddress <= 2852061183) return false;\n if ($ipAddress >= 2886729728 && $ipAddress <= 2887778303) return false;\n if ($ipAddress >= 3221225984 && $ipAddress <= 3221226239) return false;\n if ($ipAddress >= 3232235520 && $ipAddress <= 3232301055) return false;\n if ($ipAddress >= 4294967040) return false;\n }\n return true;\n }", "function check_ip($ip)\r\n\t{\r\n\t\treturn (!strcmp(long2ip(sprintf('%u',ip2long($ip))),$ip) ? true : false);\r\n\t}", "function _checkIP($ip)\n{\n _log(\"checkIP: Starting.\",\"info\");\n global $caasnode;\n _log(\"checkIP: IP address is $ip.\",\"info\");\n $cIP = ip2long($ip);\n $fIP = long2ip($cIP);\n if($fIP=='0.0.0.0')\n\t{\n\t\t_log(\"-----Failed to process node ($caasnode): IPaddress is not valid.\",\"SUMMARY\");\n\t\t_logProvsionEndToDb(0,\"Failed to process node: IPaddress is not valid.\");\n\t\t_exit1(\"Exiting at checkIP: Invalid ip address, aborting \\n\\n\\n\");\n\t}\n _log(\"checkIP: $ip is a valid ip address.\",\"info\");\n _log(\"checkIP: Exiting.\",\"info\");\n}", "public function checkIPs () {\n\n\t\t$validation = true;\n\n\t\tforeach ($this->allow as $key => $ip) {\n\t\t\t\n\t\t\tif ($this->matchIP($ip)) {\n \n return true;\n \n }\n\n\t\t}\n\n\t\treturn false;\n\n\t}", "static function cidr_check($ip, $cidr)\n\t{\n\t\tlist ($net, $mask) = explode(\"/\", $cidr);\n\n\t\t// Allow non-standard /0 syntax\n\t\tif ($mask == 0)\n\t\t{\n\t\t\tif (ip2long($ip) == ip2long($net))\n\t\t\t{\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\n\t\t$ip_net = ip2long ($net);\n\t\t$ip_mask = ~((1 << (32 - $mask)) - 1);\n\n\t\t$ip_ip = ip2long ($ip);\n\n\t\t$ip_ip_net = $ip_ip & $ip_mask;\n\n\t\treturn ($ip_ip_net == $ip_net);\n\t}", "function is_ip_banned($ip, $banned_ips)\n {\n foreach($banned_ips as $banned_ip) // go through every $banned_ip\n {\n if(strpos($banned_ip,'*')!==false) // $banned_ip contains \"*\" = > IP range\n {\n $ip_range = substr($banned_ip, 0, strpos($banned_ip, '*')); // fetch part before \"*\"\n if(strpos($ip, $ip_range)===0) // check if IP begins with part before \"*\"\n {\n return true;\n }\n }\n elseif(strpos($banned_ip,'/')!==false && preg_match(\"/(([0-9]{1,3}\\.){3}[0-9]{1,3})\\/([0-9]{1,2})/\", $banned_ip, $regs)) // $banned_ip contains \"/\" => CIDR notation (the regular expression is only used if $banned_ip contains \"/\")\n {\n // convert IP into bit pattern:\n $n_user_leiste = '00000000000000000000000000000000'; // 32 bits\n $n_user_ip = explode('.',trim($ip));\n for ($i = 0; $i <= 3; $i++) // go through every byte\n {\n for ($n_j = 0; $n_j < 8; $n_j++) // ... check every bit\n {\n if($n_user_ip[$i] >= pow(2, 7-$n_j)) // set to 1 if necessary\n {\n $n_user_ip[$i] = $n_user_ip[$i] - pow(2, 7-$n_j);\n $n_user_leiste[$n_j + $i*8] = '1';\n }\n }\n }\n // analyze prefix length:\n $n_byte_array = explode('.',trim($regs[1])); // IP -> 4 Byte\n $n_cidr_bereich = $regs[3]; // prefix length\n // bit pattern:\n $n_bitleiste = '00000000000000000000000000000000';\n for ($i = 0; $i <= 3; $i++) // go through every byte\n {\n if ($n_byte_array[$i] > 255) // invalid\n {\n $n_cidr_bereich = 0;\n }\n for ($n_j = 0; $n_j < 8; $n_j++) // ... check every bit\n {\n if($n_byte_array[$i] >= pow(2, 7-$n_j)) // set to 1 if necessary\n {\n $n_byte_array[$i] = $n_byte_array[$i] - pow(2, 7-$n_j);\n $n_bitleiste[$n_j + $i*8] = '1';\n }\n }\n }\n // check if bit patterns match on the first n chracters:\n if (strncmp($n_bitleiste, $n_user_leiste, $n_cidr_bereich) == 0 && $n_cidr_bereich > 0)\n {\n return true;\n }\n }\n else // neither \"*\" nor \"/\" => simple comparison:\n {\n if($ip == $banned_ip)\n {\n return true;\n }\n }\n }\n return false;\n }", "protected function isValidIp($ip)\n{\n $ips = array('IP_ADDRESS');\nreturn in_array($ip, $ips);\n}", "public function checkForAddrMatchIpv4($ip, $network)\n {\n // See also ip2long PHP online manual: Kenneth Shaw\n // coded a network matching function called net_match.\n // We use here his way of doing bit-by-bit network comparison\n\n // Start applying the discovering of the network mask\n $ip_arr = explode('/', $network);\n\n $network_long = ip2long($ip_arr[0]);\n $ip_long = ip2long($ip);\n\n if (!isset($ip_arr[1])) {\n // $network seems to be a simple ip address, instead of a network address\n $matched = ($network_long == $ip_long);\n } else {\n // $network seems to be a real network address\n $x = ip2long($ip_arr[1]);\n // Evaluate the netmask: <Network Mask> or <CIDR>\n $mask = ( long2ip($x) == $ip_arr[1] ? $x : 0xffffffff << (32 - $ip_arr[1]));\n $matched = ( ($ip_long & $mask) == ($network_long & $mask) );\n }\n\n return $matched;\n }", "public function checkForAddrMatchIpv4($ip, $network)\n {\n // See also ip2long PHP online manual: Kenneth Shaw\n // coded a network matching function called net_match.\n // We use here his way of doing bit-by-bit network comparison\n\n // Start applying the discovering of the network mask\n $ip_arr = explode('/', $network);\n\n $network_long = ip2long($ip_arr[0]);\n $ip_long = ip2long($ip);\n\n if (!isset($ip_arr[1])) {\n // $network seems to be a simple ip address, instead of a network address\n $matched = ($network_long == $ip_long);\n } else {\n // $network seems to be a real network address\n $x = ip2long($ip_arr[1]);\n // Evaluate the netmask: <Network Mask> or <CIDR>\n $mask = (long2ip($x) == $ip_arr[1] ? $x : 0xffffffff << (32 - $ip_arr[1]));\n $matched = (($ip_long & $mask) == ($network_long & $mask));\n }\n\n return $matched;\n }", "public function checkForAddrMatchIpv6($ip, $network)\n {\n if (false === strpos($network, '/')) {\n throw new InvalidArgumentException(\"Not a valid IPv6 subnet.\");\n }\n\n list($addr, $preflen) = explode('/', $network);\n if (!is_numeric($preflen)) {\n throw new InvalidArgumentException(\"Not a valid IPv6 preflen.\");\n }\n\n if (!filter_var($addr, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {\n throw new InvalidArgumentException(\"Not a valid IPv6 subnet.\");\n }\n\n\n $bytes_addr = unpack(\"n*\", inet_pton($addr));\n $bytes_test = unpack(\"n*\", inet_pton($ip));\n\n for ($i = 1; $i <= ceil($preflen / 16); $i++) {\n $left = $preflen - 16 * ($i-1);\n if ($left > 16) {\n $left = 16;\n }\n $mask = ~(0xffff >> $left) & 0xffff;\n if (($bytes_addr[$i] & $mask) != ($bytes_test[$i] & $mask)) {\n return false;\n }\n }\n return true;\n }", "public static function isIPAddress( $ip ) {\n return (bool)preg_match( '/^' . IP_ADDRESS_STRING . '$/', $ip );\n }", "public function isValidIP(string $ip, string $which = null): bool;", "function ip_is_local($ip){\r\n\t\r\n\t $ipv4array = explode('.',$ip); $ipv6array = explode(':',$ip);\r\n\t $lenipv4 = count($ipv4array) ; $lenipv6 = count($ipv6array); \r\n\t $ipint = array(); \r\n\t if($lenipv4 > 0 ){//We have an ipv4 address\r\n\t\t for ($i = 0 ; $i<$lenipv4 ; $i++){\r\n\t\t\t $ipint[$i] = intval($ipv4array[$i]) ; //Generating integera values for the ips\r\n\t\t }\r\n\t\t \r\n\t\t\t//Let's see if our IP is riv ate\r\n\t\t\tif ($ipint[0] == 10) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else if ($ipint[0] == 172 && $ipint[1] > 15 && $ipint[1] < 32) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else if ($ipint[0] == 192 && $ipint[1] == 168) {\r\n\t\t\t\treturn true;\r\n\t\t\t}else return false ;\r\n\t }else{\r\n\t //Either something went wrong, or we are in IPV6 format.\t \r\n\t\t \r\n\t\t if( $lenipv6 > 0){//We are having a big IPV6 address here !\r\n\t\t\t //We are in IPV4. Haven't implemented IPV6 yet\r\n\t\t\t \r\n\t\t }\r\n\t\t return false ;\r\n\t }\r\n\t \r\n\t \r\n\t return false;\r\n}", "function network(){\n return (long2ip((ip2long($this->address))\n & (ip2long($this->netmask()))));\n }", "protected function checkIpAddress()\n {\n $allowedIpAddresses = \\XLite\\Core\\Config::getInstance()->CDev->XPaymentsConnector->xpc_allowed_ip_addresses;\n return !$allowedIpAddresses \n || false !== strpos($allowedIpAddresses, $_SERVER['REMOTE_ADDR']);\n }", "public static function isValidIpAddress($ip_address){\n return (filter_var($ip_address, FILTER_VALIDATE_IP)) ? true : false;\n }", "public function testInRange()\n {\n $ipComponent = new \\Shieldon\\Firewall\\Component\\Ip();\n $t = $ipComponent->inRange('127.0.0.44', '127.0.0.0/24');\n $this->assertEquals(true, $t);\n $t = $ipComponent->inRange('127.0.250.44', '127.0.250.250/24');\n $this->assertEquals(true, $t);\n $t = $ipComponent->inRange('127.0.1.44', '127.0.0.0/24');\n $this->assertEquals(false, $t);\n\n // Single Ip\n $t = $ipComponent->inRange('127.0.0.1', '127.0.0.1');\n $this->assertEquals(true, $t);\n\n // Test 2. Check IP is if in C class subnet.\n $ipComponent = new \\Shieldon\\Firewall\\Component\\Ip();\n $t = $ipComponent->inRange('127.0.33.33', '127.0.0.0/16');\n $this->assertEquals(true, $t);\n $t = $ipComponent->inRange('127.0.33.33', '127.0.250.0/16');\n $this->assertEquals(true, $t);\n $t = $ipComponent->inRange('127.1.33.33', '127.0.0.0/16');\n $this->assertEquals(false, $t);\n\n // Test 3. Check IP is if in B class subnet.\n $ipComponent = new \\Shieldon\\Firewall\\Component\\Ip();\n $t = $ipComponent->inRange('127.33.250.33', '127.0.0.0/8');\n $this->assertEquals(true, $t);\n $t = $ipComponent->inRange('127.33.33.33', '127.0.0.0/8');\n $this->assertEquals(true, $t);\n $t = $ipComponent->inRange('128.33.250.33', '127.0.0.0/8');\n $this->assertEquals(false, $t);\n\n // Test 4. Check IPv6\n $ipComponent = new \\Shieldon\\Firewall\\Component\\Ip();\n $t = $ipComponent->inRange('2001:db8:ffff:ffff:ffff:ffff:ffff:ffff', '2001:db8::/32');\n $this->assertEquals(true, $t);\n\n $t = $ipComponent->inRange('2001:db8:ffff:ffff:ffff:ffff:ffff:ffff', '2001:db8::0/32');\n $this->assertEquals(false, $t);\n\n // Test 5. Check Invalid IP\n $ipComponent = new \\Shieldon\\Firewall\\Component\\Ip();\n $t = $ipComponent->inRange('127.0.333.33', '127.0.250.0/16');\n $this->assertEquals(false, $t);\n }", "private function cidr_includes($ip, $cidr) {\n list ($net, $mask) = explode (\"/\", $cidr);\n $ip_net = ip2long ($net);\n $ip_mask = ~((1 << (32 - $mask)) - 1);\n $ip_ip = ip2long ($ip);\n $ip_ip_net = $ip_ip & $ip_mask;\n return ($ip_ip_net == $ip_net);\n }", "function is_ip($ip){\n return (filter_var($ip, FILTER_VALIDATE_IP) !== false);\n}", "public static function check_ip_address($ip_addr) {\n\t // First of all the format of the ip address is matched\n\t if (preg_match(\"/^(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$/\", $ip_addr)) {\n\t // Now all the intger values are separated\n\t $parts = explode(\".\", $ip_addr);\n\t // Now we need to check each part can range from 0-255\n\t foreach ($parts as $ip_parts)\n\t {\n\t if (intval($ip_parts) > 255 || intval($ip_parts) < 0)\n\t return false; // If number is not within range of 0-255\n\t }\n\t return true;\n\t }\n\t else\n\t return false; // If format of ip address doesn't matches\n\t}", "public function checkForAddrMatchIpv6($ip, $network)\n {\n if (false === strpos($network, '/')) {\n throw new InvalidArgumentException('Not a valid IPv6 subnet.');\n }\n\n list($addr, $preflen) = explode('/', $network);\n if (!is_numeric($preflen)) {\n throw new InvalidArgumentException('Not a valid IPv6 preflen.');\n }\n\n if (!filter_var($addr, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) {\n throw new InvalidArgumentException('Not a valid IPv6 subnet.');\n }\n\n $bytes_addr = unpack('n*', inet_pton($addr));\n $bytes_test = unpack('n*', inet_pton($ip));\n\n for ($i = 1; $i <= ceil($preflen / 16); ++$i) {\n $left = $preflen - 16 * ($i - 1);\n if ($left > 16) {\n $left = 16;\n }\n $mask = ~(0xffff >> $left) & 0xffff;\n if (($bytes_addr[$i] & $mask) != ($bytes_test[$i] & $mask)) {\n return false;\n }\n }\n\n return true;\n }", "public static function check_ipv6($ip, $cidr) {\n\n if (!((extension_loaded('sockets') && defined('AF_INET6')) || @inet_pton('::1')))\n return false;\n\n if (false !== strpos($cidr, '/')) {\n list($address, $netmask) = explode('/', $cidr, 2);\n if ($netmask < 1 || $netmask > 128)\n return false;\n } else {\n $address = $cidr;\n $netmask = 128;\n }\n\n $bytesAddr = unpack('n*', @inet_pton($address));\n $bytesTest = unpack('n*', @inet_pton($ip));\n if (!$bytesAddr || !$bytesTest)\n return false;\n\n for ($i = 1, $ceil = ceil($netmask / 16); $i <= $ceil; ++$i) {\n $left = $netmask - 16 * ($i - 1);\n $left = ($left <= 16) ? $left : 16;\n $mask = ~(0xffff >> $left) & 0xffff;\n if (($bytesAddr[$i] & $mask) != ($bytesTest[$i] & $mask)) {\n return false;\n }\n }\n\n return true;\n }", "public static function is_ip(&$ip) {\r\n\t\treturn self::is_ip4($ip) || self::is_ip6($ip);\r\n\t}", "function is_main_network($network_id = \\null)\n {\n }", "protected function ipInRange($ip, $range)\n {\n // $range is in IP/CIDR format eg 127.0.0.1/24\n list($range, $netmask) = explode('/', $range, 2);\n $range_decimal = ip2long($range);\n $ip_decimal = ip2long($ip);\n $wildcard_decimal = pow(2, (32 - $netmask)) - 1;\n $netmask_decimal = ~$wildcard_decimal;\n\n return (($ip_decimal & $netmask_decimal) == ($range_decimal & $netmask_decimal));\n }", "function is_ipaddr($ipaddr) {\n\tif (!is_string($ipaddr))\n\treturn false;\n\n\t$ip_long = ip2long($ipaddr);\n\t$ip_reverse = long2ip($ip_long);\n\n\tif ($ipaddr == $ip_reverse)\n\treturn true;\n\telse\n\treturn false;\n}", "function isValidIP($ip_addr){\n //first of all the format of the ip address is matched\n if(preg_match(\"/^(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})$/\",$ip_addr)) {\n //now all the intger values are separated\n $parts=explode(\".\",$ip_addr);\n //now we need to check each part can range from 0-255\n foreach($parts as $ip_parts) {\n if(intval($ip_parts)>255 || intval($ip_parts)<0)\n return false; //if number is not within range of 0-255\n }\n return true;\n }\n else\n return false; //if format of ip address doesn't matches\n}", "function subnet ($ip=NULL, $subnet=NULL)\n\t{\n\n\t\t// assign defaults\n\t\tif (is_null($ip))\n\t\t\t$ip = $_SERVER['REMOTE_ADDR'];\n\n\t\t// default to REMOTE_ADDR\n\t\tif (!is_null($subnet))\n\t\t{\n\t\t\t$explodeip = explode('.', $ip);\n\t\t\t$subnetip = explode('.', substr($subnet, 0, strpos($subnet, '/')));\n\t\t\t$subnetmask = substr($subnet, strpos($subnet, '/') + 1);\n\t\t\tif ($subnetmask == 32)\n\t\t\t{\n\t\t\t\tif (substr($subnet, 0, strpos($subnet, '/')) == $ip)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t} else {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} elseif ($subnetmask < 32 && $subnetmask >= 24)\n\t\t\t{\n\t\t\t\t$start = $subnetip[3];\n\t\t\t\t$check = 32;\n\t\t\t\t$top = 254;\n\t\t\t\t$checkip = $explodeip[3];\n\t\t\t} elseif ($subnetmask < 24 && $subnetmask >= 16)\n\t\t\t{\n\t\t\t\t$start = $subnetip[2];\n\t\t\t\t$check = 24;\n\t\t\t\t$top = 255;\n\t\t\t\t$checkip = $explodeip[2];\n\t\t\t} elseif ($subnetmask < 16 && $subnetmask >= 8)\n\t\t\t{\n\t\t\t\t$start = $subnetip[1];\n\t\t\t\t$check = 16;\n\t\t\t\t$top = 255;\n\t\t\t\t$checkip = $explodeip[1];\n\t\t\t} elseif ($subnetmask < 8)\n\t\t\t{\n\t\t\t\t$start = $subnetip[0];\n\t\t\t\t$check = 8;\n\t\t\t\t$top = 254;\n\t\t\t\t$checkip = $explodeip[0];\n\t\t\t}\n\t\t\t$end = $start + pow(2, ($check - $subnetmask));\n\t\t\tif ($end > $top) $end = $top;\n\t\t\tif ($checkip >= $start && $checkip <= $end)\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t\t\n\t\t} else {\t\t\t\t\n\t\t\t\t\n\t\t\t// wow hard\n\t\t\t$subnet = substr($ip, 0, strrpos($ip, '.')).\".0/24\";\n\t\n\t\t\treturn $subnet;\n\t\t}\n\t}", "function validIP($ip){\r\n if(preg_match(\"^([1-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}^\", $ip))\r\n return true;\r\n else\r\n return false;\r\n}", "function ip_in_pfb_localsub($subnet) {\n\tglobal $pfb_localsub;\n\n\tif (!empty($pfb_localsub)) {\n\t\tforeach ($pfb_localsub as $line) {\n\t\t\tif (ip_in_subnet($subnet, $line)) {\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\t}\n\treturn FALSE;\n}", "function checkIPorRange ($ip_address) {\r\n\t if (ereg(\"-\",$ip_address)) {\r\n\t // Range\r\n\t $ar = explode(\"-\",$ip_address);\r\n\t $your_long_ip = ip2long($_SERVER[\"REMOTE_ADDR\"]);\r\n\t if ( ($your_long_ip >= ip2long($ar[0])) && ($your_long_ip <= ip2long($ar[1])) ) {\r\n\t return TRUE;\r\n\t }\r\n\t } else {\r\n\t // Single IP\r\n\t if ($_SERVER[\"REMOTE_ADDR\"] == $ip_address) {\r\n\t return TRUE;\r\n\t }\r\n\t }\r\n\t return FALSE;\r\n\t}", "private static function isPublic6( $ip ) {\n static $privateRanges = false;\n if ( !$privateRanges ) {\n $privateRanges = array(\n array( 'fc00::', 'fdff:ffff:ffff:ffff:ffff:ffff:ffff:ffff' ), # RFC 4193 (local)\n array( '0:0:0:0:0:0:0:1', '0:0:0:0:0:0:0:1' ), # loopback\n );\n }\n $n = self::toHex( $ip );\n foreach ( $privateRanges as $r ) {\n $start = self::toHex( $r[0] );\n $end = self::toHex( $r[1] );\n if ( $n >= $start && $n <= $end ) {\n return false;\n }\n }\n return true;\n }", "function ip_in_range($ip, $range) {\r\n if (strpos($ip, '.') !== false) { // regular IPv4\r\n if (strpos($range, '/') !== false) {\r\n // $range is in IP/NETMASK format\r\n list($range, $netmask) = explode('/', $range, 2);\r\n if (strpos($netmask, '.') !== false) {\r\n // $netmask is a 255.255.0.0 format, or 255.*\r\n $nets = explode('.', $netmask);\r\n while(count($nets) < 4) $nets[] = '*';\r\n $netmask = implode('.', $nets);\r\n // by now we have ensured that we have 4 octets of the netmask a.b.c.d\r\n $netmask = str_replace('*', '0', $netmask);\r\n $netmask_dec = ip2float($netmask);\r\n#printf(\"%-10s: %s\\n\", \"Netmask\", $netmask);\r\n#printf(\"%-10s: %-032b\\n\", \"Netmaskbin\", $netmask_dec);\r\n\r\n } else {\r\n // $netmask is a CIDR size block\r\n // fix the range argument\r\n $x = explode('.', $range);\r\n while(count($x)<4) $x[] = '0';\r\n #list($a,$b,$c,$d) = $x;\r\n #$range = sprintf(\"%u.%u.%u.%u\", empty($a)?'0':$a, empty($b)?'0':$b,empty($c)?'0':$c,empty($d)?'0':$d);\r\n $range = implode('.', $x);\r\n\r\n # Strategy 1 - Create the netmask with 'netmask' 1s and then fill it to 32 with 0s\r\n #$netmask_dec = bindec(str_pad('', $netmask, '1') . str_pad('', 32-$netmask, '0'));\r\n\r\n # Strategy 2 - Use math to create it\r\n $wildcard_dec = pow(2, (32-$netmask)) - 1;\r\n $netmask_dec = ~ $wildcard_dec;\r\n $netmask_dec = (float)(pow(2,32) - pow(2, (32-$netmask)));\r\n\r\n }\r\n#printf(\"%-10s: %s\\n\", \"IP\", $ip);\r\n#printf(\"%-10s: %-032b\\n\", \"IPbin\", ip2float($ip));\r\n#printf(\"%-10s: %s\\n\", \"Range\", $range);\r\n#printf(\"%-10s: %-032b\\n\", \"Rangebin\", ip2float($range));\r\n#printf(\"%-10s: %-032b\\n\", \"Netmask\", $netmask_dec);\r\n# $a = float_and(ip2float($ip), $netmask_dec);\r\n# $b = float_and(ip2float($range), $netmask_dec);\r\n#printf(\"%-10s: %-032b\\n\", \"IP&MASK\", $a);\r\n#printf(\"%-10s: %-032b\\n\", \"Range&MASK\", $b);\r\n return ( float_and(ip2float($ip), $netmask_dec) == float_and(ip2float($range), $netmask_dec) );\r\n } else {\r\n // range might be 255.255.*.* or 1.2.3.0-1.2.3.255\r\n if (strpos($range, '*') !==false) { // a.b.*.* format\r\n // Just convert to A-B format by setting * to 0 for A and 255 for B\r\n $lower = str_replace('*', '0', $range);\r\n $upper = str_replace('*', '255', $range);\r\n $range = \"$lower-$upper\";\r\n }\r\n\r\n if (strpos($range, '-')!==false) { // A-B format\r\n list($lower, $upper) = explode('-', $range, 2);\r\n $lower_dec = ip2float($lower);\r\n $upper_dec = ip2float($upper);\r\n $ip_dec = ip2float($ip);\r\n return ( ($ip_dec>=$lower_dec) && ($ip_dec<=$upper_dec) );\r\n }\r\n\r\n echo 'Range argument is not in 1.2.3.4/24 or 1.2.3.4/255.255.255.0 format';\r\n return false;\r\n }\r\n }\r\n if (strpos($ip, ':') !== false) { // IPv6\r\n ini_set(\"display_errors\", 1);\r\n error_reporting(E_ALL);\r\n // Parse out the $range\r\n if (strpos($range, '/') !== false) {\r\n // $range is in IPv6/NETMASK format\r\n list($range, $netbits) = explode('/', $range, 2);\r\n $netmask_binstr = str_pad('', $netbits, '1') . str_pad('', 128-$netbits, '0');\r\n }\r\n if (preg_match('/::$/', $range)) {\r\n $range = preg_replace('/::$/', '', $range);\r\n $x = explode(':', $range);\r\n while(count($x) < 8) $x[] = '0';\r\n $range = implode(':', $x);\r\n }\r\n return ( largearray_and(ip6floatA($ip), largebin2floatA($netmask_binstr)) == largearray_and(ip6floatA($range), largebin2floatA($netmask_binstr)) );\r\n }\r\n\r\n}", "public function checkLockToIP() {}", "function access_control_allowed($ip_address) {\n\n\t\t//invalid ip address\n\t\tif (!filter_var($ip_address, FILTER_VALIDATE_IP)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t//get the access control allowed nodes\n\t\t$sql = \"select access_control_node_uuid, access_control_uuid, node_cidr, node_description \";\n\t\t$sql .= \"from v_access_control_nodes \";\n\t\t$sql .= \"where node_type = 'allow' \";\n\t\t$sql .= \"and length(node_cidr) > 0 \";\n\t\t$parameters = null;\n\t\t$database = new database;\n\t\t$allowed_nodes = $database->select($sql, $parameters, 'all');\n\t\tunset($database);\n\n\t\t//default authorized to false\n\t\t$allowed = false;\n\n\t\t//use the ip address to get the authorized nodes\n\t\tif (is_array($allowed_nodes)) {\n\t\t\tforeach($allowed_nodes as $row) {\n\t\t\t\tif (check_cidr($row['node_cidr'], $ip_address)) {\n\t\t\t\t\t//debug info\n\t\t\t\t\t//if ($debug) {\n\t\t\t\t\t//\tprint_r($row);\n\t\t\t\t\t//\techo $ip_address.\"\\n\";\n\t\t\t\t\t//}\n\n\t\t\t\t\t//set the allowed to true\n\t\t\t\t\t$allowed = true;\n\n\t\t\t\t\t//exit the loop\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//return\n\t\treturn $allowed;\n\t}", "function is_ipaddr_configured($ipaddr, $ignore_if = \"\", $check_localip = false, $check_subnets = false, $cidrprefix = \"\") {\n\tif (count(where_is_ipaddr_configured($ipaddr, $ignore_if, $check_localip, $check_subnets, $cidrprefix))) {\n\t\treturn true;\n\t}\n\treturn false;\n}", "function IsVPN($ip)\n{\n $iphub = json_decode(ReadURL(\"https://v2.api.iphub.info/guest/ip/\" . GetUserIP()));\n return $iphub->block;\n}", "function is_blocked($ip_address) {\n\t\t//define the global variables\n\t\tglobal $firewall_path, $firewall_name;\n\n\t\t//invalid ip address\n\t\tif (!filter_var($ip_address, FILTER_VALIDATE_IP)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t//determine whether to return true or false\n\t\tif ($firewall_name == 'iptables') {\n\t\t\t//check to see if the address is blocked\n\t\t\t$command = $firewall_path.'/./iptables -L -n --line-numbers | grep '.$ip_address;\n\t\t\t$result = shell($command);\n\t\t\tif (strlen($result) > 3) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\telseif ($firewall_name == 'pf') {\n\t\t\t//check to see if the address is blocked\n\t\t\t$command = $firewall_path.'/pfctl -t \".$filter.\" -Ts | grep '.$ip_address;\n\t\t\t$result = shell($command);\n\t\t\tif (strlen($result) > 3) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public function checkIfRemoteIpIsInRange($ip, $mask)\n {\n $this->checkMask($mask);\n //TODO check if IP format is valid\n\n $allow = false;\n\n $headers = $this->getBe2billRemoteAddrHeaders();\n\n $firstIp2Long = $this->getFirtAddress($ip, $mask, true);\n $lastIp2Long = $this->getLastAddress($ip, $mask, true);\n\n foreach ($headers as $var) {\n if ($this->_getRequest()->getServer($var, false)) {\n $remoteAdr2Long = ip2long($_SERVER[$var]);\n if (($remoteAdr2Long >= $firstIp2Long) && ($remoteAdr2Long <= $lastIp2Long)) {\n $allow = true;\n break;\n }\n }\n }\n\n return $allow;\n }", "private function isIPAddressMeetRange() {\n\t\tif(get_option(\"wp_broadbean_iprange\") == \"\") {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn ip_in_range($this->ip_request, get_option(\"wp_broadbean_iprange\"));\n\t\t}\n\t}", "protected function validateIp(): bool\n {\n $meta = $this->getGitHubApiMeta();\n\n $ip = @$_SERVER['REMOTE_ADDR'];\n $ranges = (array) ($meta['hooks'] ?? []);\n\n // Check if IP comes from a GitHub hook.\n foreach ($ranges as $range) {\n if (Utils::cidrMatch($ip, $range)) {\n return true;\n }\n }\n\n return false;\n }", "function validateIp($ip) {\n\treturn inet_pton($ip);\n }", "public static function isValidAddress($ip_address)\n {\n return filter_var($ip_address, FILTER_VALIDATE_IP) !== false;\n }", "function validate_ip($ip)\n{\n if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) === false) {\n return false;\n }\n return true;\n}", "function f_validateIP($ip)\r\n{\r\n if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE) === false) {\r\n return false;\r\n }\r\n return true;\r\n}", "public static function cidr_match($ip, $cidr) {\n if(!preg_match(self::IP_REGEX, $ip) || !preg_match(self::CIDR_REGEX, $cidr, $parts)) {\n throw new InvalidArgumentException(self::INVALID_ARGUMENT);\n }\n \n $ip = ip2long($ip);\n $n = ip2long($parts[1]);\n $b = 32 - intval($parts[2]);\n \n if($ip === false || $n === false || $b < 0 || $b > 32) {\n throw new InvalidArgumentException(self::INVALID_ARGUMENT);\n }\n \n return ((self::lrs($ip, $b) << $b) === (self::lrs($n, $b) << $b));\n }", "public static function is_private_ip($ip) { \n\t\treturn ! filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE);\n\t}", "function valid_ip($ip)\n\t{\n\t\t$ip_segments = explode('.', $ip);\n\n\t\t// Always 4 segments needed\n\t\tif (count($ip_segments) != 4)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t// IP can not start with 0\n\t\tif ($ip_segments[0][0] == '0')\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t// Check each segment\n\t\tforeach ($ip_segments as $segment)\n\t\t{\n\t\t\t// IP segments must be digits and can not be\n\t\t\t// longer than 3 digits or greater then 255\n\t\t\tif ($segment == '' OR preg_match(\"/[^0-9]/\", $segment) OR $segment > 255 OR strlen($segment) > 3)\n\t\t\t{\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\n\t\treturn TRUE;\n\t}", "static function isUserIPInList($ipAddress){\n\t\t//IP list of specific anonymous users\n\t\t$ini = eZINI::instance('ssoip.ini');\n \t$ipList = $ini->variable('AuthSettings', 'IP');\n \t if ( $ipAddress && is_array( $ipList ) ){\n\t\t\t//If IP address of current user exists and IP list available\n \t\tforeach( $ipList as $itemToMatch => $id ){\n \t\tif ( ip_in_range($ipAddress, $itemToMatch) ){\n \t\t\treturn $id;\n \t\t}\n \t}\n }\n\t\t//Current user not identified as specific anonymous user\n \treturn false;\n \t}", "static function Match6($ip, $cidr) {\n\t\tif (is_array($cidr)) {\n\t\t\tforeach($cidr as $mask) {\n\t\t\t\tif (self::Match6($ip, $mask)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\t$ip = inet_pton($ip);\n\t\tif ($ip===false) { return false; }\n\n\t\tlist($net,$maskbits) = explode('/',\"$cidr/\");\n\t\t$net = inet_pton($net);\n\t\tif ($net===false) { return false; }\n\n\t\t$binaryip = self::InetToBits($ip);\n\t\t$binarynet = self::InetToBits($net);\n\t\tif ($binarynet===false) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$ip_net_bits = substr($binaryip,0,(int)$maskbits);\n\t\t$net_bits = substr($binarynet,0,(int)$maskbits);\n\n\t\treturn ($ip_net_bits==$net_bits);\n\t}", "public static function ip_is_listed( $ip, $ip_list ) {\n\t\t$expanded = array();\n\t\tforeach ( $ip_list as $address ){\n\t\t\t$expanded = array_merge( $expanded, self::expandIPBlockToArray( $address ) );\n\t\t}\n\n\t\treturn in_array( $ip, $expanded, true );\n\t}", "public function checkIp($ip) {\n $this->db->query('SELECT Ip FROM Ip WHERE Ip=:ip');\n $this->db->bind(':ip', $ip);\n $row = $this->db->single();\n\n if ($row) {\n return true;\n } else {\n return false;\n }\n }", "public static function is_ip_address($maybe_ip)\n {\n }", "static function searchNetworksContainingIP($IP, $entityID = -1, $recursive = true,\n $fields = \"\", $where = \"\") {\n\n return self::searchNetworks('contains', ['address' => $IP,\n 'netmask' => [0xffffffff, 0xffffffff,\n 0xffffffff, 0xffffffff],\n 'fields' => $fields,\n 'where' => $where],\n $entityID, $recursive);\n }", "public static function check_ip($ip, $ips) {\n\n if (!Validator::is_ip($ip))\n return false;\n\n $method = substr_count($ip, ':') > 1 ? 'check_ipv6' : 'check_ipv4';\n $ips = is_array($ips) ? $ips : array($ips);\n foreach ($ips as $_ip) {\n if (self::$method($ip, $_ip)) {\n return true;\n }\n }\n\n return false;\n }", "private function _isNetworkSpecified()\n {\n return ($this->getNetworkAddress() && $this->getNetworkMask());\n }", "function verify_address($address) // Colorize: green\n { // Colorize: green\n return isset($address) // Colorize: green\n && // Colorize: green\n is_string($address) // Colorize: green\n && // Colorize: green\n ( // Colorize: green\n filter_var($address, FILTER_VALIDATE_IP) // Colorize: green\n || // Colorize: green\n filter_var($address, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME) // Colorize: green\n ); // Colorize: green\n }", "public static function matchCIDR($ip, $range)\n {\n list($net, $mask) = explode('/', $range);\n\n // Check IP version\n $ipv = self::detectIPVersion($ip);\n $rangev = self::detectIPVersion($net);\n\n // Return false if it's not a valid IP\n if ($ipv !== $rangev && !$ipv) {\n return false;\n }\n\n // v4\n if ($ipv === 4) {\n return self::matchCIDRv4($ip, $net, $mask);\n }\n\n // v6\n if ($ipv === 6) {\n return self::matchCIDRv6($ip, $net, $mask);\n }\n\n // Return false by default\n return false;\n }", "public function validate_ip($ip) {\n if (filter_var($ip, FILTER_VALIDATE_IP, \n FILTER_FLAG_IPV4 | \n FILTER_FLAG_IPV6 |\n FILTER_FLAG_NO_PRIV_RANGE | \n FILTER_FLAG_NO_RES_RANGE) === false)\n return false;\n self::$ip = $ip;\n return true;\n }", "protected function validateIp($value){\n\t\treturn filter_var($value, FILTER_VALIDATE_IP) !== false;\n\t}", "private static function matchCIDRv4($ip, $net, $mask)\n {\n // Convert IP and Net address to long\n $ip = ip2long($ip);\n $net = ip2long($net);\n\n // Generate mask\n $mask = -1 << (32 - $mask);\n\n // Do the check\n return ($ip & $mask) === $net;\n }", "public static function checkIp6(string $requestIp, string $subnet) {\n\t\tif (!((extension_loaded('sockets') && \\defined('AF_INET6')) || @inet_pton('::1'))) {\n\t\t\tthrow new Exception('Unable to check Ipv6. Check that PHP was not compiled with option \"disable-ipv6\".');\n\t\t}\n\n\t\tif (false !== strpos($subnet, '/')) {\n\t\t\tlist($address, $netmask) = explode('/', $subnet, 2);\n\n\t\t\tif ('0' === $netmask) {\n\t\t\t\treturn (bool) unpack('n*', @inet_pton($address));\n\t\t\t}\n\n\t\t\tif ($netmask < 1 || $netmask > 128) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\t$address = $subnet;\n\t\t\t$netmask = 128;\n\t\t}\n\n\t\t$bytesAddr = unpack('n*', @inet_pton($address));\n\t\t$bytesTest = unpack('n*', @inet_pton($requestIp));\n\n\t\tif (!$bytesAddr || !$bytesTest) {\n\t\t\treturn false;\n\t\t}\n\n\t\tfor ($i = 1, $ceil = ceil($netmask / 16); $i <= $ceil; ++$i) {\n\t\t\t$left = $netmask - 16 * ($i - 1);\n\t\t\t$left = ($left <= 16) ? $left : 16;\n\t\t\t$mask = ~(0xffff >> $left) & 0xffff;\n\t\t\tif (($bytesAddr[$i] & $mask) != ($bytesTest[$i] & $mask)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "public function testIPIsValid()\n {\n $settings = require(__DIR__ . '/../src/settings.php');\n $geo_ip = new GeoIP($settings['settings']);\n\n $this->assertTrue($geo_ip->validateIP('10.0.0.1'));\n }", "public function validIp($ip, $type = 'any', $strict = true)\n {\n switch ($type) {\n case 'any':\n return $this->validIpv4($ip, $strict) || $this->validIpv6($ip, $strict);\n break;\n case 'ipv4':\n return $this->validIpv4($ip, $strict);\n break;\n case 'ipv6':\n return $this->validIpv6($ip, $strict);\n break;\n }\n return false;\n }", "function geoCheckIP($ip)\n{\n\t if(!filter_var($ip, FILTER_VALIDATE_IP))\n\t {\n\t\t\t throw new InvalidArgumentException(\"IP is not valid\");\n\t }\n\n\t //contact ip-server\n\t \n\t //$response=@file_get_contents('http://www.netip.de/search?query='.$ip);\n\t $response=@file_get_contents('http://api.hostip.info/country.php?ip='.$ip);\n\t \n\t if (empty($response))\n\t {\n\t\t\t throw new InvalidArgumentException(\"Error contacting Geo-IP-Server\");\n\t }\n\n\t /*\n\t //Array containing all regex-patterns necessary to extract ip-geoinfo from page\n\t $patterns=array();\n\t $patterns[\"domain\"] = '#Domain: (.*?)&nbsp;#i';\n\t $patterns[\"country\"] = '#Country: (.*?)&nbsp;#i';\n\t $patterns[\"state\"] = '#State/Region: (.*?)<br#i';\n\t $patterns[\"town\"] = '#City: (.*?)<br#i';\n\n\t //Array where results will be stored\n\t $ipInfo=array();\n\n\t //check response from ipserver for above patterns\n\t foreach ($patterns as $key => $pattern)\n\t {\n\t\t\t //store the result in array\n\t\t\t $ipInfo[$key] = preg_match($pattern,$response,$value) && !empty($value[1]) ? $value[1] : 'not found';\n\t }\n\n\t return $ipInfo;\n\t */\n\t return $response;\n}", "function checkCIDRBlacklist($ip)\n{\n $us_backlist = array(\n //'23','24','50','63','64','65','66','67','68','69','70','71','72','73','74','75','76','96','97',\n //'98','99','100','104','107','108','142','162','163','172','173','174','184','192','198','199','204','205','206','207','208','209','216'\n );\n $cidr = substr($ip, 0, strpos($ip, '.')); // xxx\n if(!empty($us_backlist) && in_array($cidr, $us_backlist))\n return true;\n\n $blacklist = array(\n //'27.67',\n //'27.74',\n //'171.253',\n //'171.249',\n //'59.153',\n //'113.185',\n //'113.161',\n //'115.84',\n //'115.73',\n //'117.0',\n //'117.1',\n //'117.2',\n //'117.3',\n //'117.4',\n //'117.5',\n //'125.212',\n //'123.31',\n //'123.24',\n //'101.99',\n //'58.187', // FPT\n //'183.80', // FPT\n //'183.81', // FPT\n //'42.112', // FPT\n //'42.117', // FPT\n //'1.52', // FPT\n //'1.53', // FPT\n );\n //$cidr = substr($ip, 0, strrpos($ip, '.')); // xxx.xxx.xxx\n $cidr = substr($ip, 0, strpos($ip, '.', strpos($ip, '.') + 1)); // xxx.xxx\n if(!empty($blacklist) && in_array($cidr, $blacklist))\n return true;\n else\n return false;\n}", "function is_subnet($subnet) {\n\tif (!is_string($subnet))\n\treturn false;\n\n\tlist($hp,$np) = explode('/', $subnet);\n\n\tif (!is_ipaddr($hp))\n\treturn false;\n\n\tif (!is_numeric($np) || ($np < 1) || ($np > 32))\n\treturn false;\n\n\treturn true;\n}" ]
[ "0.72038114", "0.6880698", "0.6820507", "0.6743495", "0.6717032", "0.66977155", "0.6692251", "0.66622865", "0.659471", "0.65540147", "0.65382695", "0.6482406", "0.6455845", "0.64519805", "0.6438251", "0.64145136", "0.6395711", "0.6395322", "0.63698393", "0.63661224", "0.63656557", "0.6359051", "0.6358512", "0.6354498", "0.63269603", "0.6324633", "0.6295125", "0.62701756", "0.62623656", "0.6262127", "0.62143624", "0.62140197", "0.6201224", "0.62000024", "0.6171233", "0.61655533", "0.61368316", "0.6093504", "0.60879105", "0.6085047", "0.6038916", "0.6029092", "0.6020446", "0.601921", "0.6011661", "0.6006659", "0.59982735", "0.59890205", "0.5985009", "0.5969396", "0.5958856", "0.59572434", "0.5944646", "0.5918927", "0.59134305", "0.59072", "0.5903647", "0.58863467", "0.58725244", "0.58688563", "0.58681184", "0.5857723", "0.5850116", "0.5837542", "0.5822816", "0.58174944", "0.58108187", "0.5805609", "0.5789011", "0.57857984", "0.5784803", "0.57728374", "0.5772487", "0.5769011", "0.5762811", "0.5753719", "0.573203", "0.57311976", "0.5727716", "0.5727168", "0.57131916", "0.5698096", "0.56910676", "0.5687107", "0.56732213", "0.56562465", "0.5654934", "0.56436896", "0.5633215", "0.5622838", "0.5618174", "0.5605708", "0.56020707", "0.5602038", "0.56017643", "0.56006134", "0.5582086", "0.55802673", "0.55691344", "0.5569061" ]
0.7276029
0
\brief Recreate network tree Among others, the migration create plan tree network. This method allows to recreate the tree. You can also use it if you suspect the network tree to be corrupted. First, reset the tree, then, update each network by its own field, letting CommonImplicitTreeDropdown working such as it would in case of standard update
\brief Восстановить дерево сети Среди прочего, миграция создает плановое дерево сети. Этот метод позволяет восстановить дерево. Вы также можете использовать его, если подозреваете, что дерево сети повреждено. Сначала сбросьте дерево, затем обновите каждую сеть по своему полю, позволяя CommonImplicitTreeDropdown работать так, как это делается в случае стандартного обновления.
static function recreateTree() { global $DB; // Reset the tree $DB->update( 'glpi_ipnetworks', [ 'ipnetworks_id' => 0, 'level' => 1, 'completename' => new \QueryExpression($DB->quoteName('name')) ], [true] ); // Foreach IPNetwork ... $iterator = $DB->request([ 'SELECT' => 'id', 'FROM' => self::getTable() ]); $network = new self(); while ($network_entry = $iterator->next()) { if ($network->getFromDB($network_entry['id'])) { $input = $network->fields; // ... update it by its own entries $network->update($input); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function brokeTree()\n {\n $i = 0;\n foreach ($this->nodeIdList as $node) {\n $this->getDb()->createCommand()->update(\n self::tableName(),\n [\n $this->leftAttribute => ++$i,\n $this->rightAttribute => ++$i,\n $this->depthAttribute => 0,\n '_tree' => $this->globalParentNode,\n ],\n ['=', 'id', $node]\n )->query();\n }\n }", "function reorder_nodes()\n\t{\n\t\t\n\t\t// @todo introduce some tests here to make sure data is a valid nested set etc.\n\t\t// completely reliant on clean outut from js here\n\t\t\n\t\t$tree_id = $this->EE->input->get_post('tree_id');\n\n\t\t$this->EE->ttree->check_tree_table_exists($tree_id);\n\t\t\n\t\t$tree_settings = $this->EE->ttree->get_tree_settings($tree_id);\n\t\t\n\t\t$sent_last_updated = $this->EE->input->get_post('last_updated');\n\n\t\tif($sent_last_updated != $tree_settings['last_updated'])\n\t\t{\n\t\t\t$resp['data'] = 'last_update_mismatch';\t\n\t\t\t$this->EE->output->send_ajax_response($resp);\n\t\t}\n\n\t\t$node_id = '';\n\t\t$lft = '';\n\t\t$rgt = '';\n\n\t\t$taxonomy_order = $this->EE->input->get_post('taxonomy_order');\n\t\t$taxonomy_order = rtrim($taxonomy_order, '|');\n\n\t\tif($taxonomy_order)\n\t\t{\n\t\t\t$m = explode(\"|\", $taxonomy_order);\n\t\t\t\n\t\t\t$lq = \"LOCK TABLE exp_taxonomy_tree_\".$tree_id.\" WRITE\";\n\t\t\t$res = $this->EE->db->query($lq);\n\n\t\t\tforeach($m as $items)\n\t\t\t{\n\n\t\t\t\t$item = explode(',', $items);\n\t\t\t\t\n\t\t\t\tif(isset($item[0]) && $item[0] != '')\n\t\t\t\t{\n\t\t\t\t\t$node_id \t= str_replace(\"id:\", \"\", $item[0]);\n\t\t\t\t\t$lft\t\t= str_replace(\"lft:\", \"\", $item[1]);\n\t\t\t\t\t$rgt \t\t= str_replace(\"rgt:\", \"\", $item[2]);\n\t\t\t\t}\n\n \tif($node_id != 'root')\n \t{\n\t \t $data = array(\n\t\t 'node_id' \t=> $node_id,\n\t\t 'lft' \t\t=> $lft,\n\t\t 'rgt' \t\t=> $rgt\n\t \t);\n\t \t\n\t \t$this->EE->db->where('node_id', $node_id);\n\t\t\t\t\t$this->EE->db->update('exp_taxonomy_tree_'.$tree_id, $data);\n\t \t\n\t }\n\t \n\t if($node_id == 'root')\n \t{\n\t \t $data = array(\n\t\t 'lft' \t\t=> $lft,\n\t\t 'rgt' \t\t=> $rgt\n\t \t);\n\t \t\n\t \t$this->EE->db->where('lft', $lft);\n\t\t\t\t\t$this->EE->db->update('exp_taxonomy_tree_'.$tree_id, $data);\n\t \t\n\t }\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$ulq = \"UNLOCK TABLES\";\n\t\t\t$res = $this->EE->db->query($ulq);\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t// update the last_updated timestamp\n\t\t$this->EE->ttree->set_last_update_timestamp($tree_id);\n\t\t\n\t\t// last_updated timestamp has been updated, so fetch again.\n\t\tunset($this->EE->session->cache['taxonomy']['tree'][$tree_id]['settings']);\n\t\t$tree_settings = $this->EE->ttree->get_tree_settings($tree_id);\n\t\t\n\t\t$resp['data'] = 'Node order updated';\n\t\t$resp['last_updated'] = $tree_settings['last_updated'];\n\t\t\n\t\tunset($data);\n\t\t\n\t\t// update our stashed tree array\n\t\t$this->EE->ttree->rebuild_tree_array($tree_id);\n\t\t$this->EE->output->send_ajax_response($resp);\t\n\n\t}", "public function rebuildTree()\n {\n $sql = \"SELECT REBUILD_TREE();\";\n $result = new Resultset(null, $this, $this->getReadConnection()->query($sql));\n\n if (!$result)\n throw new Exception(\"Rebuild tree failed\");\n return $result;\n }", "function hierarchize_refresh_tree($brainstormid, $groupid=0){\r\n global $CFG, $USER;\r\n\r\n // get those responses who are new\r\n $sql = \"\r\n SELECT\r\n r.id,r.id\r\n FROM\r\n {$CFG->prefix}brainstorm_responses as r\r\n WHERE\r\n r.brainstormid = {$brainstormid} AND\r\n r.groupid = {$groupid} AND\r\n r.id NOT IN\r\n (SELECT\r\n od.itemsource\r\n FROM\r\n {$CFG->prefix}brainstorm_operatordata as od\r\n WHERE\r\n od.brainstormid = $brainstormid AND\r\n operatorid = 'hierarchize' AND\r\n od.groupid = {$groupid} AND\r\n od.userid = {$USER->id})\r\n \";\r\n // echo $sql;\r\n $diff = get_records_sql($sql);\r\n $maxordering = brainstorm_tree_get_max_ordering($brainstormid, null, $groupid, 1, 0);\r\n if ($diff){\r\n $treerecord->brainstormid = $brainstormid;\r\n $treerecord->userid = $USER->id;\r\n $treerecord->groupid = $groupid;\r\n $treerecord->operatorid = 'hierarchize';\r\n $treerecord->itemdest = 0;\r\n $treerecord->intvalue = $maxordering + 1;\r\n $treerecord->timemodified = time();\r\n foreach($diff as $adif){\r\n $treerecord->itemsource = $adif->id;\r\n if (!insert_record('brainstorm_operatordata', $treerecord)){\r\n error(\"Could not insert tree regeneration records\");\r\n }\r\n $treerecord->intvalue++;\r\n }\r\n }\r\n}", "function _calculateTree() {\n include_once(\"bitlib/SQL/Tree.php\");\n include_once(\"bitlib/functions/common.php\");\n $db = common::getDB($GLOBALS[\"BX_config\"][\"dsn\"]);\n $t = new SQL_Tree($db);\n $t->FullPath=\"fulluri\";\n $t->Path=\"uri\";\n $t->FullTitlePath=\"fulltitlepath\";\n $t->Title=\"title_de\";\n \n $t->importTree(1);\n }", "function reset() {\n\t\t$this->recursive = -1;\n\t\t$nodes = array_keys($this->Node->find('list', array(\n\t\t\t'conditions' => array('Node.id >' => 0),\n\t\t\t'order' => 'id',\n\t\t\t'recursive' => -1\n\t\t)));\n\t\tset_time_limit (max(count($nodes) / 10, 30));\n\t\t$this->unbindModel(array('belongsTo' => array('Node')), false);\n\t\t$order = 'Revision.id DESC';\n\t\t$fields = array('id');\n\t\tforeach ($nodes as $id) {\n\t\t\t$langs = $this->find('list', array(\n\t\t\t\t'fields' => array('lang', 'lang'),\n\t\t\t\t'conditions' => array('node_id' => $id)\n\t\t\t));\n\t\t\tforeach ($langs as $lang) {\n\t\t\t\t$conditions = array(\n\t\t\t\t\t'node_id' => $id,\n\t\t\t\t\t'lang' => $lang,\n\t\t\t\t\t'NOT' => array('status' => 'rejected')\n\t\t\t\t);\n\t\t\t\t$count = $this->find('count', compact('conditions'));\n\t\t\t\tif (!$count) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$conditions['Revision.status'] = 'current';\n\t\t\t\tif ($this->find('count', compact('conditions')) === 1) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$conditions['Revision.status'] = 'previous';\n\t\t\t\t$last = $this->find('first', compact('conditions', 'order', 'fields'));\n\t\t\t\tif (!$last) {\n\t\t\t\t\tunset($conditions['Revision.status']);\n\t\t\t\t\t$last = $this->find('first', compact('conditions', 'order', 'fields'));\n\t\t\t\t}\n\t\t\t\t$this->updateAll(array('status' => '\"current\"'), array('Revision.id' => $last['Revision']['id']));\n\t\t\t\t$conditions['Revision.status'] = 'current';\n\t\t\t\t$conditions['NOT'] = array('Revision.id' => $last['Revision']['id']);\n\t\t\t\t$this->updateAll(array('Revision.status' => '\"previous\"'), $conditions);\n\t\t\t}\n\t\t}\n\t}", "function update_tree()\n\t{\n\t\n\t\t$data = array();\n\t\t$field_prefs = array();\n\t\t\n\t\t// get all our post data\n\t\t$data['id'] \t\t= $this->EE->input->post('id');\n\t\t$data['site_id']\t= $this->site_id;\n\t\t$data['label']\t\t= $this->EE->input->post('label');\n\t\t$data['fields'] \t= $this->EE->input->post('fields');\n\t\t$data['template_preferences'] = $this->EE->input->post('template_preferences');\n\t\t$data['channel_preferences'] = $this->EE->input->post('channel_preferences');\n\t\t$data['permissions'] = $this->EE->input->post('member_group_preferences');\n\t\t$data['max_depth'] = (int) $this->EE->input->post('max_depth');\n\t\t\n\t\t// implode posted array data\n\t\t$data['template_preferences'] = (is_array($data['template_preferences']) ? implode('|', $data['template_preferences']) : '');\n\t\t$data['channel_preferences'] = (is_array($data['channel_preferences']) ? implode('|', $data['channel_preferences']) : '');\n\t\t$data['permissions'] \t\t = (is_array($data['permissions']) ? implode('|', $data['permissions']) : '');\n\t\t\n\t\t// prep our custom field data\n\t\tif($data['fields'] && is_array($data['fields']))\n\t\t{\n\t\t\tforeach($data['fields'] as $key => $field)\n\t\t\t{\n\t\t\t\tif($field['label'] && $field['name'])\n\t\t\t\t{\n\t\t\t\t\t$field_prefs[$key] = $field;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$data['fields'] = (count($field_prefs) > 0) ? base64_encode(serialize($field_prefs)) : '';\n\n\t\t$data = $this->EE->security->xss_clean($data);\n\n\t\t// do we have an id? update...\n\t\tif( $data['id'] )\n\t\t{\n\t\t\t$this->EE->db->query($this->EE->db->update_string('exp_taxonomy_trees', $data, \"id = \".$data['id']));\n\t\t\t$this->EE->session->set_flashdata('message_success', lang('properties_updated'));\n\t\t\t$ret = ($this->EE->input->post('update_and_return')) ? $this->_base_url : $this->_base_url.AMP.'method=edit_tree'.AMP.'tree_id='.$data['id'];\n\t\t\t$this->EE->functions->redirect($ret);\t\n\t\t}\n\t\t// if not then create the new tree table\n\t\telse\n\t\t{\n\t\t\tunset($data['id']);\n\t\t\t$this->EE->db->query($this->EE->db->insert_string('exp_taxonomy_trees', $data));\n\t\t\t$tree_id = $this->EE->db->insert_id();\n\t\t\t// build our tree table\n\t\t\t$this->EE->ttree->build_tree_table($tree_id);\n\t\t\t// notify of success and redirect\n\t\t\t$this->EE->session->set_flashdata('message_success', lang('tree_added'));\n\t\t\t$ret = ($this->EE->input->post('update_and_return')) ? $this->_base_url : $this->_base_url.AMP.'method=edit_tree'.AMP.'tree_id='.$tree_id;\n\t\t\t$this->EE->functions->redirect($ret);\t\n\t\t}\n\t\n\t}", "public function run()\n {\n DB::table('binary_tree_nodes')->insert([\n [\n 'parent_id' => null, //1\n 'team_id' => 1,\n 'root_node_id' => 1,\n 'user_id' => 1,\n 'is_active' => true,\n 'is_blocked' => false,\n 'is_free' => false,\n 'is_blocked_global' => false,\n 'is_free_global' => false,\n ],\n [\n 'parent_id' => 1, // 2\n 'team_id' => 1,\n 'root_node_id' => 1,\n 'user_id' => 1,\n 'is_active' => true,\n 'is_blocked' => false,\n 'is_free' => false,\n 'is_blocked_global' => false,\n 'is_free_global' => false,\n ],\n [\n 'parent_id' => 1, // 3\n 'team_id' => 2,\n 'root_node_id' => 1,\n 'user_id' => 1,\n 'is_active' => true,\n 'is_blocked' => false,\n 'is_free' => false,\n 'is_blocked_global' => false,\n 'is_free_global' => false,\n ],\n [\n 'parent_id' => 2, // 4\n 'team_id' => 1,\n 'root_node_id' => 4,\n 'user_id' => null,\n 'is_active' => false,\n 'is_blocked' => false,\n 'is_free' => true,\n 'is_blocked_global' => false,\n 'is_free_global' => true,\n ],\n [\n 'parent_id' => 2, // 5\n 'team_id' => 2,\n 'root_node_id' => 5,\n 'user_id' => null,\n 'is_active' => false,\n 'is_blocked' => true,\n 'is_free' => false,\n 'is_blocked_global' => true,\n 'is_free_global' => false,\n ],\n [\n 'parent_id' => 3, // 6\n 'team_id' => 1,\n 'root_node_id' => 6,\n 'user_id' => null,\n 'is_active' => false,\n 'is_blocked' => true,\n 'is_free' => false,\n 'is_blocked_global' => true,\n 'is_free_global' => false,\n ],\n [\n 'parent_id' => 3, // 7\n 'team_id' => 2,\n 'root_node_id' => 7,\n 'user_id' => null,\n 'is_active' => false,\n 'is_blocked' => true,\n 'is_free' => false,\n 'is_blocked_global' => true,\n 'is_free_global' => false,\n ],\n [\n 'parent_id' => 4, // 8\n 'team_id' => 1,\n 'root_node_id' => 4,\n 'user_id' => null,\n 'is_active' => false,\n 'is_blocked' => true,\n 'is_free' => false,\n 'is_blocked_global' => true,\n 'is_free_global' => false,\n ],\n [\n 'parent_id' => 4, // 9\n 'team_id' => 2,\n 'root_node_id' => 4,\n 'user_id' => null,\n 'is_active' => false,\n 'is_blocked' => true,\n 'is_free' => false,\n 'is_blocked_global' => true,\n 'is_free_global' => false,\n ],\n [\n 'parent_id' => 5, // 10\n 'team_id' => 1,\n 'root_node_id' => 5,\n 'user_id' => null,\n 'is_active' => false,\n 'is_blocked' => true,\n 'is_free' => false,\n 'is_blocked_global' => true,\n 'is_free_global' => false,\n ],\n [\n 'parent_id' => 5, // 11\n 'team_id' => 2,\n 'root_node_id' => 5,\n 'user_id' => null,\n 'is_active' => false,\n 'is_blocked' => true,\n 'is_free' => false,\n 'is_blocked_global' => true,\n 'is_free_global' => false,\n ],\n [\n 'parent_id' => 6, // 12\n 'team_id' => 1,\n 'root_node_id' => 6,\n 'user_id' => null,\n 'is_active' => false,\n 'is_blocked' => true,\n 'is_free' => false,\n 'is_blocked_global' => true,\n 'is_free_global' => false,\n ],\n [\n 'parent_id' => 6, // 13\n 'team_id' => 2,\n 'root_node_id' => 6,\n 'user_id' => null,\n 'is_active' => false,\n 'is_blocked' => true,\n 'is_free' => false,\n 'is_blocked_global' => true,\n 'is_free_global' => false,\n ],\n [\n 'parent_id' => 7, // 14\n 'team_id' => 1,\n 'root_node_id' => 7,\n 'user_id' => null,\n 'is_active' => false,\n 'is_blocked' => true,\n 'is_free' => false,\n 'is_blocked_global' => true,\n 'is_free_global' => false,\n ],\n [\n 'parent_id' => 7, // 15\n 'team_id' => 2,\n 'root_node_id' => 7,\n 'user_id' => null,\n 'is_active' => false,\n 'is_blocked' => true,\n 'is_free' => false,\n 'is_blocked_global' => true,\n 'is_free_global' => false,\n ],\n ]);\n }", "function upgrade_network()\n {\n }", "public static function reset() {\n\t\t// Tell the router to generate a new top level group\n\t\tstatic::getRouter()->resetMainGroup();\n\t}", "function edit_nodes()\n\t{\n\t\t\n\t\t$tree_id = $this->EE->input->get('tree_id');\n\t\t\n\t\t$this->EE->ttree->check_tree_table_exists($tree_id, true);\n\t\t\n\t\t$tree_settings = $this->EE->ttree->get_tree_settings($tree_id);\n\t\t\n\t\t// check this user has access to this tree\n\t\t$permissions = explode('|', $tree_settings['permissions']);\n\t\tif( !has_access_to_tree($this->EE->session->userdata['group_id'], $permissions) )\n\t\t{\n\t\t\t$this->EE->session->set_flashdata('message_failure', lang('unauthorised'));\n\t\t\t$this->EE->functions->redirect($this->_base_url);\n\t\t}\n\n\t\t$root_array = $this->EE->ttree->get_root();\n\t\t\n\t\t// if we don't have a root redirect and prompt to enter one\n\t\tif( !$root_array)\n\t\t{\n\t\t\t$this->EE->functions->redirect($this->_base_url.AMP.'method=manage_node'.AMP.'tree_id='.$tree_id.AMP.'add_root=1');\n\t\t}\n\t\t\n\t\t$vars = array();\n\t\t$vars['root_insert'] = $this->EE->input->get('root_insert');\n\t\t$vars['tree_id'] = $tree_id;\n\t\t$vars['update_action'] = $this->_form_base_url.AMP.'method=reorder_nodes'.AMP.'tree_id='.$tree_id;\n\t\t$vars['last_updated'] = $tree_settings['last_updated'];\n\t\t$vars['title_extra'] = $tree_settings['label'];\n\t\t$vars['max_depth'] = (int) $tree_settings['max_depth'];\n\t\t\n\t\t$tree_array = $this->EE->ttree->get_tree_array($tree_id);\n\t\t\n\t\t$vars['taxonomy_list'] = $this->EE->ttree->build_cp_list($tree_array);\n\t\t\n\t\treturn $this->content_wrapper('edit_nodes', 'edit_nodes', $vars);\n\n\t}", "function _modifyTree () {\r\n return true;\r\n }", "function BuildTree($items)\r\n\t{\r\n\t\tif (!empty($items))\r\n\t\t{\r\n\t\t\t# Columns\r\n\t\t\t# * Gather all columns required for display and relation.\r\n\t\t\t# Children\r\n\t\t\t# * Map child names to child index.\r\n\r\n\t\t\t$cols[$this->ds->table] = array($this->ds->id => 1);\r\n\t\t\tif (!empty($this->ds->DisplayColumns))\r\n\t\t\tforeach (array_keys($this->ds->DisplayColumns) as $col)\r\n\t\t\t\t$cols[$this->ds->table][$col] = $this->ds->id == $col;\r\n\r\n\t\t\tif (!empty($this->ds->children))\r\n\t\t\tforeach ($this->ds->children as $ix => $child)\r\n\t\t\t{\r\n\t\t\t\t$children[$child->ds->table] = $ix;\r\n\t\t\t\t$cols[$child->ds->table][$child->parent_key] = 1;\r\n\t\t\t\t$cols[$child->ds->table][$child->child_key] = 0;\r\n\t\t\t\tif (!empty($child->ds->DisplayColumns))\r\n\t\t\t\tforeach (array_keys($child->ds->DisplayColumns) as $col)\r\n\t\t\t\t{\r\n\t\t\t\t\t$cols[$child->ds->table][$col] = 0;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t# Flats\r\n\t\t\t# * Convert each item into separated TreeNodes\r\n\t\t\t# * Associate all indexes by table, then id\r\n\r\n\t\t\t$flats = array();\r\n\r\n\t\t\t# Iterate all the resulting database rows.\r\n\t\t\tforeach ($items as $ix => $item)\r\n\t\t\t{\r\n\r\n\t\t\t\t# Iterate the columns that were created in step 1.\r\n\t\t\t\tforeach ($cols as $table => $columns)\r\n\t\t\t\t{\r\n\t\t\t\t\t# This will store all the associated data in the treenode\r\n\t\t\t\t\t# for the editor to reference while processing the tree.\r\n\t\t\t\t\t$data = array();\r\n\t\t\t\t\t$skip = false;\r\n\r\n\t\t\t\t\t# Now we're iterating the display columns.\r\n\t\t\t\t\tforeach ($columns as $column => $id)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t# This column is not associated with a database row.\r\n\t\t\t\t\t\tif (is_numeric($column)) continue;\r\n\r\n\t\t\t\t\t\t# Table names are included to avoid ambiguity.\r\n\t\t\t\t\t\t$colname = $table.'_'.$column;\r\n\r\n\t\t\t\t\t\t# ID would be specified if this is specified as a keyed\r\n\t\t\t\t\t\t# value.\r\n\t\t\t\t\t\tif ($id)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (empty($item[$colname]))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t$skip = true;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$idcol = $colname;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$data[$this->ds->StripTable($colname)] = $item[$this->ds->StripTable($colname)];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!$skip)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$tn = new TreeNode($data);\r\n\t\t\t\t\t\t$tn->id = $item[$idcol];\r\n\t\t\t\t\t\t$flats[$table][$item[$idcol]] = $tn;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t# Tree\r\n\t\t\t# * Construct tree out of all items and children.\r\n\r\n\t\t\t$tree = new TreeNode('Root');\r\n\r\n\t\t\tforeach ($flats as $table => $items)\r\n\t\t\t{\r\n\t\t\t\tforeach ($items as $ix => $node)\r\n\t\t\t\t{\r\n\t\t\t\t\t$child_id = isset($children[$table]) ? $children[$table] : null;\r\n\r\n\t\t\t\t\tif (isset($children[$table]))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$ckeycol = $this->ds->children[$child_id]->child_key;\r\n\t\t\t\t\t\t$pid = $node->data[\"{$table}_{$ckeycol}\"];\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse $pid = 0;\r\n\r\n\t\t\t\t\t$node->data['_child'] = $child_id;\r\n\r\n\t\t\t\t\tif ($pid != 0)\r\n\t\t\t\t\t\t$flats[$this->ds->table][$pid]->children[] = $node;\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$tree->children[] = $node;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t# Put child table children above related children, helps to\r\n\t\t\t# understand the display.\r\n\t\t\tif (count($this->ds->children) > 0) $this->FixTree($tree);\r\n\t\t\treturn $tree;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "function edit_tree()\n\t{\n\n\t\t$tree_id = $this->EE->input->get('tree_id');\n\t\t$this->EE->ttree->check_tree_table_exists($tree_id);\n\t\t\n\t\t$this->EE->cp->add_to_head('<link type=\"text/css\" href=\"'.$this->_theme_base_url.'css/taxonomy.css\" rel=\"stylesheet\" />');\n\n\t\t$new = $this->EE->input->get('new');\n\t\t\n\t\t$vars = array();\n\t\t\n\t\t// fetch the tree\n\t\t$this->EE->db->where_in('id', $tree_id);\n\t\t$vars['tree'] = $this->EE->db->get('taxonomy_trees')->result_array();\n\t\t\n\t\t// make sure if a tree is requested it exists\n\t\t// unless we're adding a new one that is...\n\t\tif( !$vars['tree'] && $new != 1)\n\t\t{\n\t\t\t$this->EE->session->set_flashdata( 'message_failure', lang('invalid_tree') );\n\t\t\t$this->EE->functions->redirect($this->_base_url);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t$vars['tree'] = (isset($vars['tree'][0])) ? $vars['tree'][0] : '';\n\t\t$vars['tree']['template_preferences'] = (isset($vars['tree']['template_preferences'])) ? explode('|', $vars['tree']['template_preferences']) : '';\n\t\t$vars['tree']['channel_preferences'] = (isset($vars['tree']['channel_preferences'])) ? explode('|', $vars['tree']['channel_preferences']) : '';\n\t\t$vars['tree']['permissions'] = (isset($vars['tree']['permissions'])) ? explode('|', $vars['tree']['permissions']) : '';\n\t\t\n\t\t$vars['tree']['fields'] = (isset($vars['tree']['fields'])) ? array_sort($this->unserialize($vars['tree']['fields']), 'order', SORT_ASC) : '';\n\t\t$vars['tree']['max_depth'] = (isset($vars['tree']['max_depth'])) ? $vars['tree']['max_depth'] : 0;\n\t\t$vars['member_groups'] = array();\n\n\t\t\n\t\t// -----------\n\t\t// Build templates, channels, and member_group select options\n\t\t// -----------\n\t\t\n\t\t\t// fetch our templates\n\t\t\t$templates = $this->EE->template_model->get_templates($this->site_id)->result_array();\n\t\t\t\n\t\t\t// must have templates!\n\t\t\tif ( !$templates )\n\t\t\t{\n\t\t\t\t$this->EE->session->set_flashdata('message_failure', lang('no_templates_exist'));\n\t\t\t\t$this->EE->functions->redirect($this->_base_url);\n\t\t\t}\n\t\t\t\n\t\t\t// build up our templates array for our multiselect options\n\t\t\tforeach( $templates as $template )\n\t\t\t{\n\t\t\t\t$vars['templates'][$template['template_id']] = '/'.$template['group_name'].'/'.$template['template_name'];\n\t\t\t}\n\n\t\t\t// fetch our channels\n\t\t\t$channels = $this->EE->ttree->get_channels($this->site_id);\n\t\t\t\n\t\t\t// must have channels!\n\t\t\tif (!$channels)\n\t\t\t{\n\t\t\t\t$this->EE->session->set_flashdata('message_failure', $this->EE->lang->line('no_channels_exist'));\n\t\t\t\t$this->EE->functions->redirect($this->_base_url);\n\t\t\t}\n\t\t\t\n\t\t\t// build our channels array for our multiselect options\n\t\t\tforeach( $channels as $channel )\n\t\t\t{\n\t\t\t\t$vars['channels'][$channel['channel_id']] = $channel['channel_title'];\n\t\t\t}\n\n\t\t\t// fetch our member_groups\n\t\t\t$member_groups = $this->EE->member_model->get_member_groups()->result_array();\n\t\t\t\n\t\t\t// build our member_groups array for our multiselect options\n\t\t\tforeach( $member_groups as $member_group )\n\t\t\t{\n\t\t\t\t// only add to the array if the member group can actuall access the taxonomy module \n\t\t\t\tif( $this->EE->ttree->can_access_taxonomy($member_group['group_id']) )\n\t\t\t\t{\n\t\t\t\t\t$vars['member_groups'][$member_group['group_id']] = $member_group['group_title'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\n\t\t// -----------\n\n\t\tif($new)\n\t\t{\n\t\t\t$vars['tree']['id'] = NULL;\n\t\t\t$vars['tree']['label'] = NULL;\n\t\t\treturn $this->content_wrapper('edit_tree', 'add_tree', $vars);\n\t\t}\n\n\t\treturn $this->content_wrapper('edit_tree', 'edit_tree', $vars);\n\t\n\t}", "protected function rewindRefactoredNodes()\n {\n $this->refactoredNodes = 0;\n }", "public function beforeSave()\n {\n $this->rebuildTree();\n }", "public function routerRebuilding() {\n $this->rebuilding = TRUE;\n }", "public function rebuildtree(){\n\t\t//Rebuild categories ads trigger count.\n\n\t\t//Rebuild nested set - get cat\n\t\tBLog::addToLog('[Items] rebuilding nested sets...');\n\t\t//\n\t\t$bcache=\\Brilliant\\BFactory::getCache();\n\t\tif($bcache){\n\t\t\t$bcache->invalidate();\n\t\t\t}\n\t\t//\n\t\t$catslist=$this->itemsFilter(array());\n\t\tBLog::addToLog('[Items] Total categories count:'.count($catslist).'...');\n\n\t\t$rootcats=array();\n\t\t//\n\t\tforeach($catslist as $cat){\n\t\t\t$cat->level=0;\n\t\t\t$cat->lft=0;\n\t\t\t$cat->rgt=0;\n\t\t\tif(empty($cat->{$this->parentKeyName})){\n\t\t\t\t$rootcats[]=$cat;\n\t\t\t\t}\n\t\t\t}\n\t\t//Sort root categories.\n\t\t$n=count($rootcats);\n\t\tBLog::addToLog('[Items] Root categories count:'.$n.'...');\n\t\tfor($i=0; $i<$n; $i++){\n\t\t\t$m=$i;\n\t\t\tfor($j=$i+1; $j<$n; $j++){\n\t\t\t\tif($rootcats[$j]->ordering < $rootcats[$m]->ordering){\n\t\t\t\t\t$m=$j;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tif($m!=$i){\n\t\t\t\t$t=$rootcats[$i];\n\t\t\t\t$rootcats[$i]=$rootcats[$m];\n\t\t\t\t$rootcats[$m]=$t;\n\t\t\t\t}\n\t\t\t}\n\n\t\t//Foreach by root categories...\n\t\tforeach($rootcats as $rcat){\n\t\t\tBLog::addToLog('[Items] Processing root category ['.$rcat->id.']');\n\n\t\t\t$rcat->level=1;\n\t\t\t$lft=1; $rgt=2;\n\t\t\t$this->rebuildtree_recursive($rcat,$lft,$rgt);\n\t\t\t$rcat->lft=1;\n\t\t\t$rcat->rgt=$rgt;\n\t\t\t}\n\t\t$db=\\Brilliant\\BFactory::getDBO();\n\t\tif(empty($db)){\n\t\t\treturn false;\n\t\t\t}\n\t\tBLog::addToLog('[Items] Updating nested set...');\n\t\tforeach($catslist as $ct){\n\t\t\t$qr='UPDATE `'.$this->tableName.'` set `'.$this->leftKeyName.'`='.$ct->lft.', `'.$this->rightKeyName.'`='.$ct->rgt.', `'.$this->levelKeyName.'`='.$ct->level.' WHERE `'.$this->primaryKeyName.'`='.$ct->id;\n\t\t\t$q=$db->query($qr);\n\t\t\tif(empty($q)){\n\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t//Invalidate all cache.\n\t\t$bcache=\\Brilliant\\BFactory::getCache();\n\t\tif($bcache){\n\t\t\t$bcache->invalidate();\n\t\t\t}\n\t\treturn true;\n\t\t}", "function FixTree(&$tree)\r\n\t{\r\n\t\tusort($tree->children, array($this, \"SortByChild\"));\r\n\t\tif (!empty($tree->children))\r\n\t\tforeach ($tree->children as $cnode) $this->FixTree($cnode);\r\n\t}", "function _move_cleanup($copy = false)\r\n\t{\r\n\t\t$relations = $this->_relations;\r\n\r\n\t\t$deletes = array();\r\n\t\t$updates = array();\r\n\t\t$parent_updates = array();\r\n\t\tforeach($relations AS $key => $val)\r\n\t\t{\r\n\t\t\t$clone_id = $val['clone_id'];\r\n\t\t\t$parent_id = $val['parent_id'];\r\n\t\t\t$clone = $this->get_node($clone_id);\r\n\t\t\tif ($copy)\r\n\t\t\t{ \r\n\t\t\t\tcontinue;\r\n\t\t\t} \n\t\t\t\n\t\t\tif($parent_id !== false)\n\t\t\t{\n\t\t\t\t$sql = sprintf('UPDATE %s SET parent_id=%s WHERE id=%s',\r\n\t\t\t\t\t\t\t\t\t\t\t\t$this->_node_table,\r\n\t\t\t\t\t\t\t\t\t\t\t\t$parent_id,\r\n\t\t\t\t\t\t\t\t\t\t\t\t$key);\r\n\t\t\t\t$parent_updates[] = $sql;\n\t\t\t}\n\r\n\t\t\t$deletes[] = $key; \r\n\t\t\t// It's isn't a rootnode\r\n\t\t\tif ($clone['id'] != $clone['root_id'])\r\n\t\t\t{\r\n\t\t\t\t$sql = sprintf('UPDATE %s SET id=%s WHERE id=%s',\r\n\t\t\t\t\t\t\t\t\t\t\t\t$this->_node_table,\r\n\t\t\t\t\t\t\t\t\t\t\t\t$key,\r\n\t\t\t\t\t\t\t\t\t\t\t\t$clone_id);\r\n\t\t\t\t$updates[] = $sql;\r\n\t\t\t} \r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$sql = sprintf('UPDATE %s SET id=%s, root_id=%s WHERE id=%s',\r\n\t\t\t\t\t\t\t\t\t\t\t\t$this->_node_table,\r\n\t\t\t\t\t\t\t\t\t\t\t\t$key,\r\n\t\t\t\t\t\t\t\t\t\t\t\t$clone_id,\r\n\t\t\t\t\t\t\t\t\t\t\t\t$clone_id);\r\n\t\t\t\t$updates[] = $sql;\r\n\t\t\t\t$oroot_id = $clone['root_id'];\r\n\r\n\t\t\t\t$sql = sprintf('UPDATE %s SET root_id=%s WHERE root_id=%s',\r\n\t\t\t\t\t\t\t\t\t\t\t\t$this->_node_table,\r\n\t\t\t\t\t\t\t\t\t\t\t\t$key,\r\n\t\t\t\t\t\t\t\t\t\t\t\t$oroot_id\n\t\t\t\t);\r\n\t\t\t\t$updates[] = $sql;\r\n\t\t\t} \r\n\t\t} \r\n\r\n\t\tforeach ($deletes as $delete)\r\n\t\t{\r\n\t\t\t$this->delete_node($delete);\r\n\t\t} \r\n\r\n\t\tfor($i = 0;$i < count($updates);$i++)\r\n\t\t{\r\n\t\t\t$this->db->sql_exec($updates[$i]);\r\n\t\t} \r\n\r\n\t\tfor($i = 0;$i < count($parent_updates);$i++)\r\n\t\t{\r\n\t\t\t$this->db->sql_exec($parent_updates[$i]);\r\n\t\t} \n\t\t\n\t\t$this->_relations = array();\r\n\r\n\t\treturn true;\r\n\t}", "function update_node()\n\t{\n\t\t\n\t\t// @todo form validation properly\n\t\t$this->EE->load->library('form_validation');\n\t\t$this->EE->form_validation->set_rules('label', 'Label', 'required');\n\t\t\n\t\tif ($this->EE->form_validation->run('label') == FALSE)\n\t\t{\n\t\t show_error('\"Label\" is a required field');\n\t\t}\n\n\t\t$tree_id \t= $this->EE->input->post('tree_id');\n\t\t$is_root\t= $this->EE->input->post('is_root');\n\t\t\n\t\t$data = array();\n\t\t$data['label'] \t\t= htmlspecialchars($this->EE->input->post('label'), ENT_COMPAT, 'UTF-8');\n\t\t$data['template_path'] \t= $this->EE->input->post('template');\n\t\t$data['entry_id'] \t= $this->EE->input->post('entry_id');\n\t\t$data['node_id'] \t= $this->EE->input->post('node_id');\n\t\t$data['custom_url']\t= $this->EE->input->post('custom_url');\n\t\t$data['field_data']\t= ( is_array($this->EE->input->post('custom_fields')) ) ? base64_encode(serialize($this->EE->input->post('custom_fields'))) : '';\n\t\t\n\t\t$data = $this->EE->security->xss_clean($data);\n\t\t\n\t\t$this->EE->ttree->check_tree_table_exists($tree_id);\n\t\t\n\t\t// are we adding a root node\n\t\tif($is_root)\n\t\t{\n\t\t\t// returns true if root has been added\n\t\t\tif($this->EE->ttree->insert_root($data))\n\t\t\t{\n\t\t\t\t$this->EE->session->set_flashdata('message_success', $this->EE->lang->line('root_added'));\n\t\t\t}\n\t\t\t// we already have a root!\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->EE->session->set_flashdata('message_failure', lang('root_already_exists'));\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t// are we updating\n\t\telseif($data['node_id'])\n\t\t{\n\t\t\t$this->EE->ttree->update_node_by_node_id($data['node_id'], $data);\n\t\t}\n\t\t// we're inserting a new node\n\t\telse\n\t\t{\n\t\t\t$parent_lft = $this->EE->input->post('parent');\n\t\t\t$this->EE->ttree->append_node_last($parent_lft, $data);\n\t\t}\n\t\t\n\t\tunset($data);\n\t\t\n\t\t// insert our tree array\n\t\t$data['tree_array'] = base64_encode(serialize( $this->EE->ttree->tree_to_array() ));\n\t\t$data['last_updated'] = time();\n\t\t$this->EE->db->where('id', $tree_id);\n\t\t$this->EE->db->update('exp_taxonomy_trees', $data); \n\t\t\n\t\t$this->EE->functions->redirect($this->_base_url.AMP.'method=edit_nodes'.AMP.'tree_id='.$tree_id);\n\t\n\t}", "function cognitivefactory_tree_up($cognitivefactoryid, $userid, $groupid, $id, $istree = 1) {\n global $CFG, $DB;\n\n $res = $DB->get_record('cognitivefactory_opdata', array('id' => $id));\n if (!$res) return;\n $operator = ($istree) ? 'hierarchize' : 'order' ;\n $accessClause = cognitivefactory_get_accessclauses($userid, $groupid, false);\n $treeClause = ($istree) ? \" AND itemdest = {$res->itemdest} \" : '';\n\n if ($res->intvalue > 1) {\n $newordering = $res->intvalue - 1;\n\n $sql = \"\n SELECT \n id\n FROM \n {cognitivefactory_opdata} AS od\n WHERE \n cognitivefactoryid = {$cognitivefactoryid} AND\n operatorid = '{$operator}' AND\n intvalue = {$newordering}\n {$treeClause}\n {$accessClause}\n \";\n // echo $sql;\n $result = $DB->get_record_sql($sql);\n $resid = $result->id;\n\n // swapping\n $opdata = new StdClass();\n $opdata->id = $resid;\n $opdata->intvalue = $res->intvalue;\n $DB->update_record('cognitivefactory_opdata', $opdata);\n\n $opdata = new StdClass();\n $opdata->id = $id;\n $opdata->intvalue = $newordering;\n $DB->update_record('cognitivefactory_opdata', $opdata);\n }\n}", "public function rebuild($rootNodeId): void;", "function cognitivefactory_tree_down($cognitivefactoryid, $userid, $groupid, $id, $istree=1) {\n global $CFG, $DB;\n\n $res = $DB->get_record('cognitivefactory_opdata', array('id' => $id));\n $operator = ($istree) ? 'hierarchize' : 'order' ;\n $accessClause = cognitivefactory_get_accessclauses($userid, $groupid, false);\n $treeClause = ($istree) ? \" AND itemdest = {$res->itemdest} \" : '';\n\n $sql = \"\n SELECT \n MAX(intvalue) AS ordering\n FROM \n {cognitivefactory_opdata} AS od\n WHERE\n cognitivefactoryid = {$cognitivefactoryid} AND\n operatorid = '{$operator}'\n {$treeClause}\n {$accessClause}\n \";\n $resmaxordering = $DB->get_record_sql($sql);\n $maxordering = $resmaxordering->ordering;\n if ($res->intvalue < $maxordering) {\n $newordering = $res->intvalue + 1;\n\n $sql = \"\n SELECT \n id\n FROM \n {cognitivefactory_opdata} AS od\n WHERE \n cognitivefactoryid = {$cognitivefactoryid} AND\n operatorid = '{$operator}' AND\n intvalue = {$newordering}\n {$treeClause}\n {$accessClause}\n \";\n $result = $DB->get_record_sql($sql);\n $resid = $result->id;\n\n // swapping\n $opdata = new StdClass();\n $opdata->id = $resid;\n $opdata->intvalue = $res->intvalue;\n $DB->update_record('cognitivefactory_opdata', $opdata);\n\n $opdata = new StdClass();\n $opdata->id = $id;\n $opdata->intvalue = $newordering;\n $DB->update_record('cognitivefactory_opdata', $opdata);\n }\n}", "function testUpdatePackageTree() {\n\t\t$packages = array('cake', 'model', 'datasource', 'dbo');\n\t\t$result = (bool) $this->ApiPackage->updatePackageTree($packages);\n\t\t$this->assertTrue($result);\n\n\t\t$result = $this->ApiPackage->findAllByParentId(4);\n\t\t$this->assertEqual(count($result), 2);\n\n\t\t$packages = array('cake', 'model', 'datasource', 'dbo');\n\t\t$result = (bool) $this->ApiPackage->updatePackageTree($packages);\n\t\t$this->assertTrue($result);\n\n\t\t$result = $this->ApiPackage->findAllBySlug('model');\n\t\t$this->assertEqual(count($result), 1, 'Too many model slugs');\n\t}", "public function run()\n {\n $nodes = [\n ['id' => 1, 'name' => 'Organization','parent_id' => null],\n ['id' => 2, 'name' => 'School A', 'parent_id' => 1],\n ['id' => 3, 'name' => 'Classroom A','parent_id' => 2],\n ['id' => 4, 'name' => 'Family AA', 'parent_id' => 3],\n ['id' => 5, 'name' => 'Family AB', 'parent_id' => 3],\n ['id' => 6, 'name' => 'Node AAA', 'parent_id' => 4],\n ['id' => 7, 'name' => 'Node AAB', 'parent_id' => 6],\n ['id' => 8, 'name' => 'Node ABA', 'parent_id' => 5],\n ['id' => 9, 'name' => 'Node ABB', 'parent_id' => 8],\n\n ['id' => 10, 'name' => 'School B', 'parent_id' => 1],\n ['id' => 11, 'name' => 'Classroom BA','parent_id' => 10],\n ['id' => 12, 'name' => 'Family BA', 'parent_id' => 11],\n ['id' => 13, 'name' => 'Family BB', 'parent_id' => 11],\n ['id' => 14, 'name' => 'Classroom BB', 'parent_id' => 10],\n\n ['id' => 15, 'name' => 'School C', 'parent_id' => 1],\n ['id' => 16, 'name' => 'Classroom CA','parent_id' => 15],\n ['id' => 17, 'name' => 'Family CA', 'parent_id' => 16],\n ['id' => 18, 'name' => 'Family CB', 'parent_id' => 16],\n ['id' => 19, 'name' => 'Classroom CB', 'parent_id' => 15]\n ];\n\n foreach ($nodes as $node)\n {\n Node::create($node);\n }\n\n\n }", "public function createHierarchy(){\n\t\tmysqli_query($this->db, \"TRUNCATE TABLE hierarchy\");\n\t\t\n\t\t$insert_sql = \"INSERT INTO hierarchy VALUES\";\n\t\tforeach ($this->structure as $key => $value) {\n\t\t\t$position = $value['number'] + 1;\n\t\t\t$rows[] = \"('', '{$key}', '{$position}')\";\n\t\t}\n\t\t$insert_sql = $insert_sql.implode(\",\", $rows);\n\t\tmysqli_query($this->db, $insert_sql);\n\t}", "function updateCreate(){\n \t\t\n \t\t//dsm($this->goodEbsLeaflets);\n \t\tforeach($this->goodEbsLeaflets as $leafletCode => $goodEbsLeaflet):\n \t\t\n \t\t\t//dsm($leafletCode);\t\n \t\t\n\t \t\t$query = new EntityFieldQuery();\n\t \t\t$query->entityCondition('entity_type', 'node')\n\t \t\t->entityCondition('bundle', 'leaflet')\n\t \t\t->fieldCondition('field_leaflet_code', 'value', $leafletCode, '=');\n\t \t\t\n\t \t\t$result = $query->execute();\n\t \t\t\n\t \t\t\n\t \t\tif (count($result) == 0):\n\t \t\t\t//dsm(\"Didn't find an existing node - its a create\");\n\t \t\t\t\t\n\t \t\t\t$node = new stdClass();\n\t \t\t\t$this->setNodeValues($node, $this->goodEbsLeaflets[$leafletCode]);\n\t \t\t\t\t\n\t \t\t\t// Prepare node for saving. Does creation date and node->uid\n\t \t\t\t$node = node_submit($node);\n\t \t\t\t//dsm($node);\n\t \t\t\tnode_save($node);\n\t \t\t\t\t\n\t \t\t\t$this->log[] = get_class($this).\": Created node id \".$node->nid.\" \".$leafletCode.\" \".$node->title;\n\t \t\t\t\t \t\t\n\t \t\telseif (count($result) == 1):\n\t \t\t\t//dsm('Its an update for '.$leafletCode. 'with nid = '.$leaflet_nid[0]);\n\t \t\t\t$leaflet_nid = array_keys($result['node']);\n\t \t\t\t$node = node_load($leaflet_nid[0]);\n\t \t\t\n\t \t\t\t//$link = l(\"node id $leaflet_nid[0]\", \"node/$leaflet_nid[0]\", array('attributes' => array('target'=>'_blank')));\n\t \t\t\n\t \t\t\t//Start with the assumption that no update is required\n\t \t\t\t//Individual functions that populate a field may flag\n\t \t\t\t//that an update IS required for this node\n\t \t\t\t$this->nodeNeedsUpdate[$leaflet_nid[0]] = false;\n\t \t\t\t\t\n\t \t\t\t$oldStatus = $node->status;\n\t \t\t\t\n\t \t\t\t$this->setNodeValues($node, $this->goodEbsLeaflets[$leafletCode]);\n\t \t\t\t\n\t \t\t\t//republishing a node\n\t \t\t\tif ($node->status != $oldStatus):\n\t \t\t\t\t$this->nodeNeedsUpdate[$leaflet_nid[0]] = true;\n\t \t\t\tendif;\n\t \t\t\t\n\t \t\t\t/*\n\t \t\t\tif ($node->nid == '14196'){\n\t \t\t\t\tdsm($node);\n\t \t\t\t}*/\n\t \t\t\t\n\t \t\t\t//if set to manual, don't update\n\t \t\t\tif ($node->field_source['und'][0]['value'] == 'manual'):\n\t \t\t\t\t$this->nodeNeedsUpdate[$leaflet_nid[0]] = false;\n\t \t\t\t\t$this->log[] = get_class($this).\": Didn't update ('manual' set) node id \".$node->nid.\" \".$leafletCode.\" \".$node->title;\n\t \t\t\tendif;\n\t \t\t\t\n\t \t\t\t\n\t \t\t\t//dsm($node);\n\t \t\t\t// Prepare node for saving\n\t \t\t\t//Does creation date and node->uid\n\t \t\t\t\n\t \t\t\t$node = node_submit($node);\n\t \t\t\t\t\n\t \t\t\tif ($this->nodeNeedsUpdate[$leaflet_nid[0]] == true){\n\t \t\t\t\tnode_save($node);\n\t \t\t\t\t$this->log[] = get_class($this).\": Updated node id \".$node->nid.\" \".$leafletCode.\" \".$node->title;\n\t \t\t\t} else {\n\t \t\t\t\t$this->log[] = get_class($this).\": No changes for node id \".$node->nid.\" \".$leafletCode.\" \".$node->title;\n\t \t\t\t}\n\t \t\t\t\t\n\t \t\telseif (count($result) > 1):\n\t \t\t\t//dsm('duplicates leaflets. Report, do nothing.');\n\t \t\tendif;\n \t\t\n \t\t\n \t\tendforeach; \t\t\n \t}", "public function initializeTreeData() {}", "public function initializeTreeData() {}", "public function generate_parent(){\n\n // kode rekening\n $kode_rekening = KodeRekening::where(\"is_deleted\", 0)->get(); // collection semua data di databse\n\n // supaya tidak semua data di update, hanya yang perlu saja yang di update\n $data_to_update = [];\n //looping\n foreach($kode_rekening as $idx => $row){\n // array data yang perlu di update\n $new_data_update = [];\n\n // mencari parent dari kode rekening yang sedang di loop , contoh 41 | saya mencari parent si 41 dari seluruh data di database\n $find_parent = $this->find_parent($kode_rekening, $row->kode_rekening);\n\n if($find_parent != null){\n $new_data_update = [\n \"parent_id\" => $find_parent->id,\n 'id' => $row->id\n ];\n\n $data_to_update[] = $new_data_update;\n }\n }\n\n //generate query update case\n $update_string = \"UPDATE mst_kode_rekening\n SET parent_id = CASE\";\n\n $id_where = [];\n foreach($data_to_update as $idx => $row){\n $update_string .= \" WHEN id = \". $row[\"id\"] .\" THEN \".$row[\"parent_id\"].\" \";\n $id_where[] = $row[\"id\"];\n }\n $update_string .=\"\n END\n WHERE id IN (\".implode($id_where, \",\").\")\";\n DB::update($update_string);\n\n // set tidak punya parent maka saya set level 1\n DB::update(\"UPDATE mst_kode_rekening SET level = 1 WHERE parent_id = 0 \");\n //indikator lamun misalna si data masih punya child , contoh , saya di level 1 , check level 2 aya teu\n $have_child = true;\n //set default level 1\n $level = 1; // <-- 2\n // while\n while($have_child){\n //ieu pengecekan level selanjutnya\n $get_child = collect(DB::select(DB::raw(\"SELECT COUNT(*) count FROM mst_kode_rekening WHERE parent_id IN (SELECT id FROM mst_kode_rekening WHERE level = {$level})\")))->first();\n\n if($get_child->count > 0){\n $next_level = $level+1;\n DB::update(\"UPDATE mst_kode_rekening SET level = {$next_level} WHERE parent_id in (SELECT id FROM mst_kode_rekening WHERE level = {$level})\");\n $level++;\n } else {\n $have_child = false;\n }\n }\n\n // update anu parent_id na 0 == 1\n // select * from mst_kode_rekening where parent_id = (id = level 1) update jadi level 2\n // select * from mst_kode_rekening where parent_id = (id = level 2) update jadi level 3\n\n //query == null\n }", "public function testSetParentByNodes() {\n\n\t\t$objBuilder = new LeftRightTreeTraversal\\TreeBuilder();\n\n\t\t$objNode1 = new LeftRightTreeTraversal\\Node(1);\n\t\t$objNode2 = new LeftRightTreeTraversal\\Node(2);\n\n\t\t$this->boolean($objBuilder->setParentByNodes($objNode1, $objNode2))->isTrue();\n\t\t$hashChecks = array(\n\t\t\t1 => array(\n\t\t\t\t'id' \t\t=> 1,\n\t\t\t\t'parent'\t=> null,\n\t\t\t\t'left'\t\t=> 0,\n\t\t\t\t'right'\t\t=> 3\n\t\t\t),\n\t\t\t2 => array(\n\t\t\t\t'id' \t\t=> 2,\n\t\t\t\t'parent'\t=> 1,\n\t\t\t\t'left'\t\t=> 1,\n\t\t\t\t'right'\t\t=> 2\n\t\t\t)\n\t\t);\n\n\t\t$arrayResult = $objBuilder->compute()->export();\n\t\t$this->array($arrayResult)->size->isEqualTo(2);\n\t\tforeach ($arrayResult as $hashNode) {\n\t\t\t$this\n\t\t\t\t->array($hashNode)\n\t\t\t\t\t->hasKey('id')\n\t\t\t\t\t->hasKey('left')\n\t\t\t\t\t->hasKey('right')\n\t\t\t\t->integer($hashNode['id'])\n\t\t\t\t\t->isEqualTo($hashChecks[$hashNode['id']]['id'])\n\t\t\t\t->integer($hashNode['left'])\n\t\t\t\t\t->isEqualTo($hashChecks[$hashNode['id']]['left'])\n\t\t\t\t->integer($hashNode['right'])\n\t\t\t\t\t->isEqualTo($hashChecks[$hashNode['id']]['right'])\n\t\t\t;\n\t\t}\n\n\t\t/*\n\t\t * Same tests, inverted\n\t\t */\n\n\t\t$objBuilder = new LeftRightTreeTraversal\\TreeBuilder();\n\n\t\t$objNode1 = new LeftRightTreeTraversal\\Node(1);\n\t\t$objNode2 = new LeftRightTreeTraversal\\Node(2);\n\n\t\t$this->boolean($objBuilder->setParentByNodes($objNode2, $objNode1))->isTrue();\n\t\t$hashChecks = array(\n\t\t\t1 => array(\n\t\t\t\t'id' \t\t=> 1,\n\t\t\t\t'parent'\t=> 2,\n\t\t\t\t'left'\t\t=> 1,\n\t\t\t\t'right'\t\t=> 2\n\t\t\t),\n\t\t\t2 => array(\n\t\t\t\t'id' \t\t=> 2,\n\t\t\t\t'parent'\t=> null,\n\t\t\t\t'left'\t\t=> 0,\n\t\t\t\t'right'\t\t=> 3\n\t\t\t)\n\t\t);\n\n\t\t$arrayResult = $objBuilder->compute()->export();\n\t\t$this->array($arrayResult)->size->isEqualTo(2);\n\t\tforeach ($arrayResult as $hashNode) {\n\t\t\t$this\n\t\t\t->array($hashNode)\n\t\t\t\t->hasKey('id')\n\t\t\t\t->hasKey('left')\n\t\t\t\t->hasKey('right')\n\t\t\t->integer($hashNode['id'])\n\t\t\t\t->isEqualTo($hashChecks[$hashNode['id']]['id'])\n\t\t\t->integer($hashNode['left'])\n\t\t\t\t->isEqualTo($hashChecks[$hashNode['id']]['left'])\n\t\t\t->integer($hashNode['right'])\n\t\t\t\t->isEqualTo($hashChecks[$hashNode['id']]['right'])\n\t\t\t;\n\t\t}\n\t}", "protected function _unmarkInternalTree(): void\n {\n $config = $this->getConfig();\n $this->_table->updateAll(\n function (QueryExpression $exp) use ($config) {\n $leftInverse = clone $exp;\n $leftInverse->setConjunction('*')->add('-1');\n $rightInverse = clone $leftInverse;\n\n return $exp\n ->eq($config['leftField'], $leftInverse->add($config['leftField']))\n ->eq($config['rightField'], $rightInverse->add($config['rightField']));\n },\n fn (QueryExpression $exp) => $exp->lt($config['leftField'], 0)\n );\n }", "public function actionAjaxFillTree()\n {\n \t$this->allowUser(SUPERADMINISTRATOR);\n // accept only AJAX request (comment this when debugging)\n if (!Yii::app()->request->isAjaxRequest) {\n exit();\n }\n // parse the user input\n $parentId = \"NULL\";\n if (isset($_GET['root']) && $_GET['root'] !== 'source') {\n $parentId = (int) $_GET['root'];\n }\n // read the data (this could be in a model)\n $children = Yii::app()->db->createCommand(\n \"SELECT m1.id, m1.name AS text, m2.id IS NOT NULL AS hasChildren \"\n . \"FROM cms_term AS m1 LEFT JOIN cms_term AS m2 ON m1.id=m2.parent_id \"\n . \"WHERE m1.parent_id <=> $parentId \"\n . \"GROUP BY m1.id ORDER BY m1.order ASC\"\n )->queryAll();\n\t\t\n\t\t$cnt = 0;\n\t\tforeach ($children as $child){\n\t\t//\tif ($child['hasChildren']==0) {\n\t\t//\t\t$children[$cnt]['text'] = '<a href='.Yii::app()->baseUrl.'\"/backend.php/term/update/'.$child['id'].'\">'.$child['text'].'</a>';\n\t\t//\t} else {\n\t\t\t\n\t\t\t\t$children[$cnt]['text'] = $child['text']\n\t\t\t\t.'<a href='.Yii::app()->baseUrl.'\"/backend.php/term/update/'.$child['id'].'\"> '.TbHtml::icon(TbHtml::ICON_PENCIL)\n\t\t\t\t.'</a> <a href='.Yii::app()->baseUrl.'\"/backend.php/TermDescription/update/'.$child['id'].'\"> '.TbHtml::icon(TbHtml::ICON_EDIT).'</a>';\n\t\t\t$cnt++;\t\n\t\t}\n\t\t\n\t\t\n echo str_replace(\n '\"hasChildren\":\"0\"',\n '\"hasChildren\":false',\n CTreeView::saveDataAsJson($children)\n );\n }", "static function to_tree($data)\n {\n //Cap 1\n for ($i = 3; $i >= 1; $i--)\n {\n //echo $i . \"============<br/>\";\n foreach ($data as $key=>$value)\n {\n //if ($key == 1485 || $key == 192 || $key == 193 || $key == 29)\n //echo \"$key = \" . $data[$key][\"ten\"] . \"<br/>\";\n \n //if (!isset($data[$key][\"tree\"])) $data[$key][\"tree\"] = false;\n //if ($value[\"parent\"] > 0 && !$data[$key][\"tree\"])\n if ($value[\"cap\"] == $i)\n {\n //if (!isset($data[$value[\"parent\"]][\"child\"])){\n //\t$data[$value[\"parent\"]][\"child\"] = array();\n //}\n $data[$value[\"parent\"]][\"child\"][$key] = $value;\n //if ($key == 1485 || $key == 192 || $key == 193 || $key == 29)\n //echo \"&nbsp;&nbsp;&nbsp;&nbsp;Dua \" . $value[\"ten\"] . \" vao \" . $value[\"parent\"] . \" \" . $data[$value[\"parent\"]][\"ten\"] . \" <br/>\";\n //$data[$key][\"tree\"] = true;\n //$data[$value[\"parent\"]][\"tree\"] = false;\n }\n }\n }\n //Khu bo\n foreach ($data as $key=>$value)\n {\n if ($value[\"parent\"] > 0)\n {\n unset($data[$key]);\n }\n }\n \n return $data;\n }", "function build_tree_table( $tree_id )\n\t{\n\t\n\t\t$fields = array(\n\t\t\t'node_id' => array(\n\t\t\t\t'type' => 'mediumint',\n\t\t\t\t'constraint'\t => '8',\n\t\t\t\t'unsigned'\t\t => TRUE,\n\t\t\t\t'auto_increment' => TRUE,\n\t\t\t\t'null' => FALSE\n\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t'lft' => array(\n\t\t\t\t'type' => 'mediumint',\n\t\t\t\t'constraint' => '8',\n\t\t\t\t'unsigned' =>\tTRUE\n\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t'rgt' => array(\n\t\t\t\t'type' => 'mediumint',\n\t\t\t\t'constraint'\t=> '8',\n\t\t\t\t'unsigned'\t=>\tTRUE\n\t\t\t),\n\n\t\t\t'depth' => array(\n\t\t\t\t'type' => 'mediumint',\n\t\t\t\t'constraint'\t=> '8',\n\t\t\t\t'unsigned'\t=>\tTRUE\n\t\t\t),\n\n\t\t\t'parent' => array(\n\t\t\t\t'type' => 'mediumint',\n\t\t\t\t'constraint'\t=> '8',\n\t\t\t\t'unsigned'\t=>\tTRUE\n\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t'moved'\t=> array(\n\t\t\t\t'type' => 'tinyint',\n\t\t\t\t'constraint'\t=> '1',\n\t\t\t\t'null' => FALSE\n\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t'label'\t=> array(\n\t\t\t\t'type' => 'varchar', \n\t\t\t\t'constraint' => '255'\n\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t'entry_id' => array(\n\t\t\t\t'type' => 'int',\n\t\t\t\t'constraint' => '10', \n\t\t\t\t'null' => TRUE),\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t'template_path' => array(\n\t\t\t\t'type' => 'varchar', \n\t\t\t\t'constraint' => '255'\n\t\t\t),\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t'custom_url' => array(\n\t\t\t\t'type' => 'varchar', \n\t\t\t\t'constraint' => '250', \n\t\t\t\t'null' => TRUE\n\t\t\t),\n\n\t\t\t'type' => array(\n\t\t\t\t'type' => 'varchar', \n\t\t\t\t'constraint' => '250', \n\t\t\t\t'null' => TRUE\n\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t'field_data' => array(\n\t\t\t\t'type' => 'text'\n\t\t\t)\t\t\t\n\t\t);\n\t\t\t\n\t\tee()->load->dbforge();\n\t\tee()->dbforge->add_field( $fields );\n\t\tee()->dbforge->add_key( 'node_id', TRUE );\n\t\tee()->dbforge->create_table( 'taxonomy_tree_'.$tree_id );\n\t\t\n\t\tunset($fields);\n\t\t\t\t\n\t}", "protected static function repairTrees($classes)\n {\n $processed = array();\n\n try {\n \\D::manager()->clear();\n } catch (\\Exception $e) {}\n\n foreach ($classes as $class) {\n if (is_subclass_of($class, 'CMF\\\\Model\\\\Node')) {\n\n $metadata = $class::metadata();\n $className = $metadata->rootEntityName;\n if (in_array($className, $processed)) continue;\n $processed[] = $className;\n\n try {\n\n $rootNode = $className::getRootNode(true);\n $repo = \\D::manager()->getRepository($className);\n $qb = $repo->getNodesHierarchyQueryBuilder($rootNode);\n $treeValid = $repo->verify();\n\n if ($treeValid !== true) {\n $repo->recover();\n \\D::manager()->flush();\n \\D::manager()->clear();\n }\n\n } catch (\\Exception $e) { }\n\n }\n }\n }", "private function setTrees()\n {\n if (empty($this->generator->types[CustomsInterface::CUSTOM_TYPES_TREES][ApiInterface::RAML_PROPS]) === false) {\n foreach ($this->generator->types[CustomsInterface::CUSTOM_TYPES_TREES][ApiInterface::RAML_PROPS] as $propKey => $propVal) {\n if (is_array($propVal) && empty($this->generator->types[ucfirst($propKey)]) === false) {\n // ensure that there is a type of propKey ex.: Menu with parent_id field set\n $this->openEntity(ConfigInterface::TREES);\n $this->setParamDefault($propKey, $propVal[ApiInterface::RAML_KEY_DEFAULT]);\n $this->closeEntities();\n }\n }\n }\n }", "public function afterUpdate(): void\n {\n if ($this->oldParentId != $this->owner->getAttribute($this->ownerParentIdAttribute)) {\n $this->rebuildTreePath();\n }\n }", "function admin_reparent()\n\t{\n\t\tif(!$this->RequestHandler->prefers('json'))\n\t\t{\n\t\t\t$this->cakeError('error404');\n\t\t\treturn;\n\t\t}\n\n\t\tif(!isset($this->params['form']['node']))\n\t\t{\n\t\t\t$this->cakeError('missing_field', array('field' => 'Node'));\n\t\t\treturn;\n\t\t}\n\n\t\tif(!is_numeric($this->params['form']['node']))\n\t\t{\n\t\t\t$this->cakeError('invalid_field', array('field' => 'Node'));\n\t\t\treturn;\n\t\t}\n\n\t\tif(!isset($this->params['form']['parent']))\n\t\t{\n\t\t\t$this->cakeError('missing_field', array('field' => 'Parent'));\n\t\t\treturn;\n\t\t}\n\n\t\tif(!is_numeric($this->params['form']['parent']))\n\t\t{\n\t\t\t$this->cakeError('invalid_field', array('field' => 'Parent'));\n\t\t\treturn;\n\t\t}\n\n\t\tif(!isset($this->params['form']['position']))\n\t\t{\n\t\t\t$this->cakeError('missing_field', array('field' => 'Position'));\n\t\t\treturn;\n\t\t}\n\n\t\tif(!is_numeric($this->params['form']['position']))\n\t\t{\n\t\t\t$this->cakeError('invalid_field', array('field' => 'Position'));\n\t\t\treturn;\n\t\t}\n\n\t\t$node_id = $this->params['form']['node'];\n\t\t$parent_id = $this->params['form']['parent'];\n\t\t$position = $this->params['form']['position'];\n\n\t\t$node = $this->Navigation->find('first', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'Navigation.id' => $node_id,\n\t\t\t),\n\t\t\t'recursive' => -1,\n\t\t));\n\t\tif(empty($node))\n\t\t{\n\t\t\t$this->cakeError('invalid_field', array('field' => 'Node'));\n\t\t\treturn;\n\t\t}\n\n\t\t$parent = $this->Navigation->find('first', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'Navigation.id' => $parent_id,\n\t\t\t),\n\t\t\t'recursive' => -1,\n\t\t));\n\t\tif(empty($parent))\n\t\t{\n\t\t\t$this->cakeError('invalid_field', array('field' => 'Parent'));\n\t\t\treturn;\n\t\t}\n\n\t\t$data = array(\n\t\t\t'Navigation' => array(\n\t\t\t\t'id' => $node_id,\n\t\t\t\t'parent_id' => $parent_id,\n\t\t\t),\n\t\t);\n\t\tif(!$this->Navigation->save($data))\n\t\t{\n\t\t\t$this->cakeError('internal_error', array('action' => 'Reparent', 'resource' => 'Navigation'));\n\t\t\treturn;\n\t\t}\n\n\t\t$this->Navigation->moveup($node_id, true);\n\t\tif($position > 0)\n\t\t{\n\t\t\t$this->Navigation->movedown($node_id, $position);\n\t\t}\n\n\t\t$this->set('response', array('success' => 1));\n\t}", "public function rebuild()\r\n {\r\n $this->delete(array());\r\n\r\n $table = new Car_Types();\r\n\r\n $this->rebuildStep($table, array(0), 0);\r\n }", "function cognitivefactory_tree_right($cognitivefactoryid, $userid, $groupid, $id) {\n global $CFG, $DB;\n\n $accessClause = cognitivefactory_get_accessclauses($userid, $groupid, false);\n\n /// get ordering and parent for the moving node\n $sql = \"\n SELECT \n itemdest, \n intvalue\n FROM \n {cognitivefactory_opdata} AS od\n WHERE \n id = $id\n \";\n $res = $DB->get_record_sql($sql);\n $ordering = $res->intvalue;\n $fatherid = $res->itemdest;\n\n /// get previous record if not first. It will become our parent.\n if ($ordering > 1) {\n $orderingbis = $ordering - 1;\n\n $sql = \"\n SELECT \n id,\n id\n FROM \n {cognitivefactory_opdata} AS od\n WHERE \n cognitivefactoryid = {$cognitivefactoryid} AND\n operatorid = 'hierarchize' AND\n intvalue = $orderingbis AND \n itemdest = $fatherid\n {$accessClause}\n \";\n $resid = $DB->get_record_sql($sql);\n $newfatherid = $resid->id;\n\n /// get our upward brothers. They should be ordered back from ordering\n $sql = \"\n SELECT \n id, \n intvalue\n FROM \n {cognitivefactory_opdata} AS od\n WHERE \n cognitivefactoryid = {$cognitivefactoryid} AND\n operatorid = 'hierarchize' AND\n intvalue > $ordering AND \n itemdest = $fatherid \n {$accessClause}\n ORDER BY \n intvalue\n \";\n $newbrotherordering = $ordering;\n\n /// order back all upward brothers\n if ($resbrothers = $DB->get_records_sql($sql)) {\n foreach ($resbrothers as $resbrother) {\n $opdata = new StdClass();\n $opdata->id = $resbrother->id;\n $opdata->intvalue = $newbrotherordering;\n $DB->update_record('cognitivefactory_opdata', $opdata);\n $newbrotherordering = $newbrotherordering + 1;\n }\n }\n\n $maxordering = cognitivefactory_tree_get_max_ordering($cognitivefactoryid, null, $groupid, true, $newfatherid);\n $newordering = $maxordering + 1;\n\n // assigning father's id\n $object = new StdClass();\n $opdata->id = $id;\n $opdata->itemdest = $newfatherid;\n $opdata->intvalue = $newordering;\n $DB->update_record('cognitivefactory_opdata', $opdata);\n }\n}", "private function fixBrokenAgents()\n {\n\n DB::transaction(function () {\n // Move nodes\n\n // 24751\n $rootNode = $this->getNodeByAgentTsa('TSA5524585');\n $newNode = $this->getByUserId(24751);\n $this->addLeftLeg(\n BinaryPlanManager::getLastLeftNode($rootNode),\n $newNode\n );\n\n // 21786\n $rootNode = $this->getNodeByAgentTsa('TSA4224936');\n $newNode = $this->getByUserId(21786);\n $this->addLeftLeg(\n BinaryPlanManager::getLastLeftNode($rootNode),\n $newNode\n );\n\n // 25350\n $rootNode = $this->getNodeByAgentTsa('TSA7121786');\n $newNode = $this->getByUserId(25350);\n $this->addLeftLeg(\n BinaryPlanManager::getLastLeftNode($rootNode),\n $newNode\n );\n\n // 20348\n // kelvin dickson - 20348\n $rootNode = $this->getNodeByAgentTsa('TSA1520348');\n // add willy horn to kelly\n $this->addLeftLeg($rootNode, $this->getNodeByAgentTsa('TSA6419208'));\n $rasaanNode = $this->getNodeByAgentTsa('TSA6619189');\n $bernardNode = $this->getNodeByAgentTsa('TSA3719536');\n $this->addRightLeg($rasaanNode, $bernardNode);\n\n // 24035\n $rasaanNode = $this->getNodeByAgentTsa('TSA6619189');\n $newNode = $this->getByUserId(24035);\n $this->addLeftLeg(\n BinaryPlanManager::getLastLeftNode($rasaanNode),\n $newNode\n );\n\n // 25003\n $rootNode = $this->getNodeByAgentTsa('TSA9618374');\n $newNode = $this->getByUserId(25003);\n $this->addRightLeg(\n BinaryPlanManager::getLastRightNode($rootNode),\n $newNode\n );\n\n\n // 18374\n $rootNode = $this->getNodeByAgentTsa('TSA7116435');\n $newNode = $this->getByUserId(18374);\n $this->addRightLeg(\n BinaryPlanManager::getLastRightNode($rootNode),\n $newNode\n );\n\n // 23837\n $rootNode = $this->getNodeByAgentTsa('TSA3319909');\n $newNode = $this->getByUserId(23837);\n $this->addRightLeg(\n BinaryPlanManager::getLastRightNode($rootNode),\n $newNode\n );\n\n // 19005\n $rootNode = $this->getNodeByAgentTsa('TSA6924197');\n $newNode = $this->getByUserId(19005);\n $this->addLeftLeg(\n BinaryPlanManager::getLastLeftNode($rootNode),\n $newNode\n );\n\n // 22645\n $rootNode = $this->getNodeByAgentTsa('TSA1218899');\n $newNode = $this->getByUserId(22645);\n $this->addLeftLeg(\n BinaryPlanManager::getLastLeftNode($rootNode),\n $newNode\n );\n\n // 24154\n $from = $this->getByUserId(24154);\n $to = $this->getNodeByAgentTsa('TSA4725350');\n BinaryPlanManager::moveNode($from, $to, BinaryPlanManager::DIRECTION_LEFT, false, true);\n\n // 21796\n $rootNode = $this->getNodeByAgentTsa('TSA8824514');\n $newNode = $this->getByUserId(21796);\n $this->addLeftLeg(\n BinaryPlanManager::getLastLeftNode($rootNode),\n $newNode\n );\n\n // 24692\n $rootNode = $this->getNodeByAgentTsa('TSA8824514');\n $newNode = $this->getByUserId(24692);\n $this->addLeftLeg(\n BinaryPlanManager::getLastLeftNode($rootNode),\n $newNode\n );\n\n // 14515\n $rootNode = $this->getNodeByAgentTsa('TSA4119395');\n $newNode = $this->getByUserId(14515);\n $this->addLeftLeg(\n BinaryPlanManager::getLastLeftNode($rootNode),\n $newNode\n );\n\n // 20752\n $rootNode = $this->getNodeByAgentTsa('TSA6923837');\n $newNode = $this->getByUserId(20752);\n $this->addRightLeg(\n BinaryPlanManager::getLastRightNode($rootNode),\n $newNode\n );\n\n // 2812\n $rootNode = $this->getNodeByAgentTsa('TSA9296164');\n $newNode = $this->getByUserId(2812);\n $this->addRightLeg(\n BinaryPlanManager::getLastRightNode($rootNode),\n $newNode\n );\n\n // 14726\n $rootNode = $this->getNodeByAgentTsa('TSA1012649');\n $newNode = $this->getByUserId(14726);\n $this->addLeftLeg(\n BinaryPlanManager::getLastLeftNode($rootNode),\n $newNode\n );\n\n // 20058\n $rootNode = $this->getNodeByAgentTsa('TSA4419945');\n $newNode = $this->getByUserId(20058);\n $this->addRightLeg(\n BinaryPlanManager::getLastRightNode($rootNode),\n $newNode\n );\n\n $this->removeNodes();\n\n BinaryPlanNode::fixTree();\n });\n }", "public function run()\n {\n User::factory(20)->create();\n Comment::factory(1000)->create();\n Comment::where('id','<', 101)->update(['parent_id' => null]);\n }", "private function build_tree()\n\t\t{\n\t\t\t$this->html_result .= '<ul class=\"'.$this->style.'_ul_first\" onkeydown=\"return input_main_key(event,\\''.$this->internal_id.'\\')\">';\n\n\t\t\t//==================================================================\n\t\t\t// Always first this row in tree ( edit mode only )\n\t\t\t//==================================================================\n\t\t\tif ($this->edit_mode)\n\t\t\t{\n\t\t\t\t$this->html_result .= '<div class=\"'.$this->style.'_interow\" id=\"'.$this->internal_id.'INT_0\" OnClick=\"add_new_node(\\''.$this->internal_id.'\\',0)\"></div>';\n\t\t\t}\n\t\t\t//==================================================================\n\t\t\t\n\t\t\t$this->scan_level(0,$this->get_any_child(1));\n\n\t\t\t$this->html_result .= '<ul class=\"'.$this->style.'_ul\">';\n\t\t}", "function makeTree($uid, $add_content, $mode) {\n\t\tglobal $add_content;\n\t\t//Execute query depending on mode\n\t\tif ($mode == 'circumstance_tree' || $mode == 'usergroup_tree') {\n\t\t\t$temp_enablefields1 = str_replace('tx_civserv_navigation', 'nv1', $this->cObj->enableFields('tx_civserv_navigation'));\n\n\t\t\t$temp_enablefields2 = str_replace('tx_civserv_navigation', 'nv2', $this->cObj->enableFields('tx_civserv_navigation'));\n\n\t\t\t// we need double quotation marks here!!! because of the single quotation marks within $temp_enablefields1 and $temp_enablefields2\n\t\t\t$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t\t\t\t\t\t\"nv1.uid as uid,\n\t\t\t\t\t\t\t\t nv1.nv_name as name\",\n\t\t\t\t\t\t\t\t\"tx_civserv_navigation as nv1,\n\t\t\t\t\t\t\t\t tx_civserv_navigation_nv_structure_mm as nvmm,\n\t\t\t\t\t\t\t\t tx_civserv_navigation as nv2\",\n\t\t\t\t\t\t\t\t\"1 \".\n\t\t\t\t\t\t\t\t$temp_enablefields1.\n\t\t\t\t\t\t\t\t$temp_enablefields2.\n\t\t\t\t\t\t\t\t\" AND nv1.uid = nvmm.uid_local\n\t\t\t\t\t\t\t\t AND nv1.uid = nvmm.uid_local\n\t\t\t\t\t\t\t\t AND nv2.uid = nvmm.uid_foreign\n\t\t\t\t\t\t\t\t AND nv2.uid = \" . intval($uid) ,\n\t\t\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t\t\t\"name\",\n\t\t\t\t\t\t\t\t\"\");\n\t\t}\n\t\t// test bk: add organisational code\n\t\tif($this->conf['displayOrganisationCode']){\n\t\t\t$orderby='or1.or_code, or1.sorting';\n\t\t}else{\n\t\t\t$orderby='or1.sorting, or2.sorting';\n\t\t}\n\t\tif ($mode == 'organisation_tree') {\n\t\t\t$temp_enablefields1 = str_replace('tx_civserv_organisation', 'or1', $this->cObj->enableFields('tx_civserv_organisation'));\n\n\t\t\t$temp_enablefields2 = str_replace('tx_civserv_organisation', 'or2', $this->cObj->enableFields('tx_civserv_organisation'));\n\n\t\t\t// we need double quotation marks here!!! because of the single quotation marks within $temp_enablefields1 and $temp_enablefields2\n\t\t\t$result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t\t\t\t\t\t\"or1.uid as uid,\n\t\t\t\t\t\t\t\t or1.or_code as code,\n\t\t\t\t\t\t\t\t or1.or_name as name\",\n\t\t\t\t\t\t\t\t\"tx_civserv_organisation as or1,\n\t\t\t\t\t\t\t\t tx_civserv_organisation_or_structure_mm as ormm,\n\t\t\t\t\t\t\t\t tx_civserv_organisation as or2\",\n\t\t\t\t\t\t\t\t\"1 \".\n\t\t\t\t\t\t\t\t $temp_enablefields1.\n\t\t\t\t\t\t\t\t $temp_enablefields2.\n\t\t\t\t\t\t\t\t \" AND or1.uid = ormm.uid_local\n\t\t\t\t\t\t\t\t AND or2.uid = ormm.uid_foreign\n\t\t\t\t\t\t\t\t AND or2.uid = \" . intval($uid) ,\n\t\t\t\t\t\t\t\t\"\",\n\t\t\t\t\t\t\t\t$orderby,\n\t\t\t\t\t\t\t\t\"\");\n\n\t\t}\n\t\t//Check if query returned any results\n\t\tif ($GLOBALS['TYPO3_DB']->sql_num_rows($result) > 0) {\n\t\t\t$add_content = $add_content . '<ul>';\n\t\t\twhile ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {\n\t\t\t\t$uid = $row['uid']; // or1 res. nv1\n\t\t\t\t$makelink=false;\n\t\t\t\tif($this->conf['no_link_empty_nv']){\n#\t\t\t\t\tdebug('no_link_empty_nv gesetzt!');\n\t\t\t\t}else{\n#\t\t\t\t\tdebug('no_link_empty_nv NICHT gesetzt!');\n\t\t\t\t}\n\t\t\t\t$res_connected_services = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query(\n\t\t\t\t\t\t'tx_civserv_service.sv_name',\n\t\t\t\t\t\t'tx_civserv_service',\n\t\t\t\t\t\t'tx_civserv_service_sv_navigation_mm',\n\t\t\t\t\t\t'tx_civserv_navigation',\n\t\t\t\t\t\t'AND tx_civserv_service_sv_navigation_mm.uid_foreign = '. intval($uid), //just in case\n\t\t\t\t\t\t'');\n\t\t\t\tswitch ($mode) {\n\t\t\t\t\tcase 'circumstance_tree':\n\t\t\t\t\t\t$link_mode = 'circumstance';\n\t\t\t\t\t\tif(($GLOBALS['TYPO3_DB']->sql_num_rows($res_connected_services) < 1) && $this->conf['no_link_empty_nv']){\n\t\t\t\t\t\t\t$makelink = false;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$makelink = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'usergroup_tree':\n\t\t\t\t\t\t$link_mode = 'usergroup';\n\t\t\t\t\t\tif(($GLOBALS['TYPO3_DB']->sql_num_rows($res_connected_services) < 1) && $this->conf['no_link_empty_nv']){\n\t\t\t\t\t\t\t$makelink = false;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$makelink = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'organisation_tree':\n\t\t\t\t\t\t$link_mode = 'organisation';\n\n\t\t\t\t\t\t$makelink = true; // we want detail-information to all organisations\n/*\n// no! we want detail-information to all organisations - not only to those who offer services.....\n\t\t\t\t\t\t$res_connected_services = $GLOBALS['TYPO3_DB']->exec_SELECT_mm_query(\n\t\t\t\t\t\t\t\t'tx_civserv_service.sv_name',\n\t\t\t\t\t\t\t\t'tx_civserv_service',\n\t\t\t\t\t\t\t\t'tx_civserv_service_sv_organisation_mm',\n\t\t\t\t\t\t\t\t'tx_civserv_organisation',\n\t\t\t\t\t\t\t\t'AND tx_civserv_service_sv_organisation_mm.uid_foreign = '.intval($uid),\n\t\t\t\t\t\t\t\t'');\n*/\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif($this->conf['hide_empty_nv'] && $makelink == false){\n\t\t\t\t\t$this->makeTree($uid, $add_content, $mode);\n\t\t\t\t}else{\n\t\t\t\t\t$add_content .= '<li>';\n\t\t\t\t\t$add_content .= $makelink ? '<a href=\"' . htmlspecialchars($this->pi_linkTP_keepPIvars_url(array(mode => $link_mode,id => $row['uid']),1,1)) . '\">' : '';\n\t\t\t\t\t// test bk: add organisational code\n\t\t\t\t\tif($this->conf['displayOrganisationCode'] && !($mode=='usergroup_tree' || $mode=='circumstance_tree')){\n\t\t\t\t\t\t$add_content .= $row['code'].' '.$row['name'];\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$add_content .= $row['name'];\n\t\t\t\t\t}\n\t\t\t\t\t$add_content .= $makelink ? '</a>': '';\n\t\t\t\t\t$this->makeTree($uid, $add_content, $mode);\n\t\t\t\t\t$add_content .= \"</li>\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t$add_content = $add_content . \"</ul>\\n\";\n\t\t}\n\t\treturn $add_content;\n\t}", "function getMakeModelTree($makeModelRequest) {\r\r\n\t\tif($makeModelRequest == null) {\r\r\n\t\t\tthrow new InvalidArgumentException(\"makeModelRequest\");\r\r\n\t\t}\r\r\n\t\t\r\r\n\t\t$url_string = 'https://gateway.developer.telekom.com/plone/autoscout24/rest';\r\r\n\t\t\r\r\n\t\t$url_string .= '/'.$this->environment;\r\r\n\t\t$url_string .= '/makeModelTree';\r\r\n\r\r\n\t\t\r\r\n\t\t\t\r\r\n\t\t$request_array = array();\r\r\n\t\t\t\r\r\n\t\t\t\r\r\n\t\tif($makeModelRequest != null) {\r\r\n\t\t\t$request_array = AutoScout24DataFactory::jsonizeMakeModelRequest($makeModelRequest);\r\r\n\t\t}\r\r\n\t\t\r\r\n\r\r\n\t\t$curl_session = curl_init($url_string);\r\r\n\t\t\r\r\n\t\t$curl_options = array(\r\r\n\t\t\tCURLOPT_CUSTOMREQUEST => 'POST',\r\r\n\t\t\tCURLOPT_RETURNTRANSFER => true,\r\r\n\t\t\tCURLOPT_SSL_VERIFYPEER => false,\r\r\n\t\t\tCURLOPT_HTTPHEADER => array(\r\r\n\t\t\t\t'Authorization: TAuth realm=\"https://odg.t-online.de\",tauth_token=\"'.$this->token_getter->getToken()->getToken().'\"',\r\r\n\t\t\t\t'User-Agent: Telekom PHP SDK/3.1.10',\r\r\n\t\t\t\t'Accept: application/json',\r\r\n\t\t\t\t'Content-Type: application/json'\r\r\n\t\t\t),\r\r\n\t\t\tCURLOPT_POSTFIELDS => $request_array\r\r\n\t\t);\r\r\n\t\t\r\r\n\t\tif($this->additional_curl_options != null) {\r\r\n\t\t\t$curl_options = $curl_options + $this->additional_curl_options;\r\r\n\t\t}\r\r\n\t\t\r\r\n\t\tcurl_setopt_array($curl_session, $curl_options);\r\r\n\t\t\r\r\n\t\t$curl_response = curl_exec($curl_session);\r\r\n\t\t\r\r\n\t\tif($curl_response !== false) {\r\r\n\t\t\treturn AutoScout24DataFactory::createGetMakeModelTreeResponse($curl_response);\r\r\n\t\t} else {\r\r\n\t\t\tthrow new Exception(curl_error($curl_session));\r\r\n\t\t}\r\r\n\t}", "function automap_fetch_tree($dir, $MAPCFG, $params, &$saved_config, $obj_name, $layers_left, &$this_tree_lvl) {\n // Stop recursion when the number of layers counted down\n if($layers_left != 0) {\n try {\n global $_BACKEND;\n if($dir == 'childs') {\n if($obj_name == '<<<monitoring>>>') {\n try {\n $relations = $_BACKEND->getBackend($params['backend_id'][0])->getHostNamesWithNoParent();\n } catch(BackendConnectionProblem $e) {\n $relations = array();\n }\n } elseif (cfg('global', 'shinken_features')) {\n if ($params['min_business_impact']){\n $tmp_array = array_flip(list_business_impact());\n $min_business_impact = $tmp_array[$params['min_business_impact']];\n }\n $relations = $_BACKEND->getBackend($params['backend_id'][0])->getDirectChildDependenciesNamesByHostName($obj_name, $min_business_impact);\n } else {\n $relations = $_BACKEND->getBackend($params['backend_id'][0])->getDirectChildNamesByHostName($obj_name);\n }\n } else {\n if (cfg('global', 'shinken_features')) {\n if ($params['min_business_impact']){\n $tmp_array = array_flip(list_business_impact());\n $min_business_impact = $tmp_array[$params['min_business_impact']];\n }\n $relations = $_BACKEND->getBackend($params['backend_id'][0])->getDirectParentDependenciesNamesByHostName($obj_name, $min_business_impact);\n } else {\n $relations = $_BACKEND->getBackend($params['backend_id'][0])->getDirectParentNamesByHostName($obj_name);\n }\n }\n } catch(BackendException $e) {\n $relations = array();\n }\n\n foreach($relations AS $rel_name) {\n if (in_array($rel_name, $params['ignore_hosts']) == True){\n continue;\n }\n $obj = automap_obj($MAPCFG, $params, $saved_config, $rel_name);\n\n // Add to tree\n $this_tree_lvl[$obj['object_id']] = $obj;\n\n // < 0 - there is no limit\n // > 0 - there is a limit but it is no reached yet\n if($layers_left < 0 || $layers_left > 0) {\n automap_fetch_tree($dir, $MAPCFG, $params, $saved_config, $rel_name, $layers_left - 1, $this_tree_lvl[$obj['object_id']]['.'.$dir]);\n }\n }\n }\n}", "public function reSetDepth()\n\t{\t\t\n\t\tif ($this->getParentId() !== 0 && $this->getParentId() != null)\n\t\t{\n\t\t\t$parentCat = $this->getParentCategory();\n\t\t\t$this->setDepth($parentCat->getDepth() + 1);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->setDepth(0);\n\t\t}\n\t}", "function installTreeToPackage() {\n\t\tif (!is_array($this->packageInfo)) { \n\t\t\tif ($this->debug) { echo \"ERROR - no package info found<BR>\\n\"; }\nexit();\n\t\t\treturn; \n\t\t}\n\t\t$info = $this->packageInfo['info'];\n\t\t$configs = $this->packageInfo['configs'];\n\t\t$mid = $info['name'];\n\t\tlcRegistry::delete($mid);\n\t\t$reg = lcRegistry::load($mid);\n\t\t$reg->mid = $mid;\n\t\t$reg->moduleName = $mid;\n\t\t$reg->displayName = $info['displayName'];\n\t\t$reg->version = $info['version'];\n\t\t$reg->author = $info['author'];\n\t\t$reg->copyright = $info['copyright'];\n\t\t$reg->lastModified = date(\"Y-m-d h:i:s\");\n\t\t$reg->save();\n\t\twhile(list($k,$v) = @each($configs['config'])) {\n\t\t\textract($v);\n\t\t\t$reg->config[$key] = $default;\n\t\t\t$reg->type[$key] = $type;\n\t\t\t$reg->extra[$key] = @implode(\"\\n\",$options);\n\t\t}\n\t\t$reg->saveConfig();\n\t\texec(\"cp \".$this->dir.\" \".SERVICE_PATH.\"/\".$this->moduleName.\"/ -R\");\n\t}", "public function perform()\n {\n if($this->dontPerform == TRUE)\n {\n return;\n }\n\n // forward to node x without update\n if(isset($_POST['gotonode']) && ($_POST['gotonode'] != ''))\n {\n $this->unlockLink();\n $this->redirect((int)$_POST['gotonode']); \n }\n\n // change nothing and switch back\n if(isset($_POST['canceledit']) && ($_POST['canceledit'] == '1'))\n {\n $this->unlockLink();\n $this->redirect((int)$_POST['id_node']); \n }\n \n if( isset($_POST['modifylinkdata']) )\n {\n $this->updateLinkData();\n }\n\n // get whole node tree\n $this->model->action('navigation','getTree', \n array('id_node' => 0,\n 'result' => & $this->tplVar['tree'],\n 'fields' => array('id_parent','status','id_node','title'))); \n \n // get demanded link data\n $this->model->action('link','getLink', \n array('result' => & $this->tplVar['link'],\n 'id_link' => (int)$_REQUEST['id_link'],\n 'error' => & $this->tplVar['error'],\n 'fields' => array('id_link','title','url',\n 'description','status','hits')));\n\n // convert some field values to safely include it in template html form fields\n $this->convertHtmlSpecialChars( $this->tplVar['link'], array('title','url') ); \n\n // get node data of this link\n $this->model->action('navigation','getNode', \n array('result' => & $this->tplVar['node'],\n 'id_node' => (int)$this->current_id_node,\n 'error' => & $this->tplVar['error'],\n 'fields' => array('title','id_node'))); \n \n // get navigation node branch of the current node\n $this->model->action('navigation','getBranch', \n array('result' => & $this->tplVar['branch'],\n 'id_node' => (int)$this->current_id_node,\n 'error' => & $this->tplVar['error'],\n 'fields' => array('title','id_node'))); \n\n // we need the url vars to open this page by the keyword map window\n if($this->config['link']['use_keywords'] == 1)\n {\n if(isset($_REQUEST['addkey']))\n {\n $this->addKeyword();\n }\n $this->getLinkKeywords();\n }\n }", "private function _getTree($create = false) {}", "public function moveAsRoot() {\n if (!$this->hasManyRoots)\n throw new CException(Yii::t('yiiext', 'Many roots mode is off.'));\n\n if ($this->getIsNewRecord())\n throw new CException(Yii::t('yiiext', 'The node should not be new record.'));\n\n if ($this->getIsDeletedRecord())\n throw new CDbException(Yii::t('yiiext', 'The node should not be deleted.'));\n\n if ($this->isRoot())\n throw new CException(Yii::t('yiiext', 'The node already is root node.'));\n\n $db = $this->getDbConnection();\n $extTransFlag = $db->getCurrentTransaction();\n\n if ($extTransFlag === null)\n $transaction = $db->beginTransaction();\n\n try {\n $left = $this->{$this->leftAttribute};\n $right = $this->{$this->rightAttribute};\n $levelDelta = 1 - $this->{$this->levelAttribute};\n $delta = 1 - $left;\n\n $this->updateAll(\n array(\n $this->leftAttribute => new CDbExpression($db->quoteColumnName($this->leftAttribute) . sprintf('%+d', $delta)),\n $this->rightAttribute => new CDbExpression($db->quoteColumnName($this->rightAttribute) . sprintf('%+d', $delta)),\n $this->levelAttribute => new CDbExpression($db->quoteColumnName($this->levelAttribute) . sprintf('%+d', $levelDelta)),\n $this->rootAttribute => $owner->getPrimaryKey(),\n ), $db->quoteColumnName($this->leftAttribute) . '>=' . $left . ' AND ' .\n $db->quoteColumnName($this->rightAttribute) . '<=' . $right . ' AND ' .\n $db->quoteColumnName($this->rootAttribute) . '=' . CDbCriteria::PARAM_PREFIX . CDbCriteria::$paramCount, array(CDbCriteria::PARAM_PREFIX . CDbCriteria::$paramCount++ => $this->{$this->rootAttribute}));\n\n $this->shiftLeftRight($right + 1, $left - $right - 1);\n\n if ($extTransFlag === null)\n $transaction->commit();\n\n $this->correctCachedOnMoveBetweenTrees(1, $levelDelta, $this->getPrimaryKey());\n } catch (Exception $e) {\n if ($extTransFlag === null)\n $transaction->rollBack();\n\n throw $e;\n }\n\n return true;\n }", "function manage_node()\n\t{\n\t\n\t\t$tree_id = $this->EE->input->get('tree_id');\n\t\t\n\t\t$this->EE->ttree->check_tree_table_exists($tree_id, true);\n\t\t\n\t\t$this->EE->load->model('channel_entries_model');\n\t\t\t\t\n\t\t$vars = array();\n\t\t\n\t\t$vars['tree_settings'] \t= $this->EE->ttree->get_tree_settings($tree_id);\n\t\t\n\t\t// check this user has access to this tree\n\t\t$permissions = explode('|', $vars['tree_settings']['permissions']);\n\t\tif( !has_access_to_tree($this->EE->session->userdata['group_id'], $permissions) )\n\t\t{\n\t\t\t$this->EE->session->set_flashdata('message_failure', lang('unauthorised'));\n\t\t\t$this->EE->functions->redirect($this->_base_url);\n\t\t}\n\t\t\n\t\t$vars['title_extra'] = $vars['tree_settings']['label'];\n\t\t$vars['root_insert'] = $this->EE->input->get('add_root');\n\t\t$vars['channel_entries'] = array();\n\t\t$vars['templates'] = array();\n\t\t$vars['tree_id'] = $tree_id;\n\t\t$vars['parent_select'] = array();\n\t\t$vars['node_id'] = $this->EE->input->get('node_id');\n\t\t$vars['label'] = '';\n\t\t$vars['template_path'] = '';\n\t\t$vars['entry_id'] = '';\n\t\t$vars['custom_url'] = '';\n\t\t$vars['field_data'] = '';\n\t\t$vars['site_pages'] = $this->EE->config->item('site_pages');\n\t\t$vars['hide'] = \" class='js_hide'\";\n\t\t$vars['select_page_uri_option'] = '';\n\t\t\t\n\t\t// get template info from selected templates\n\t\t$template_ids = explode('|', $vars['tree_settings']['template_preferences']);\n\t\t$templates = $this->EE->ttree->get_templates($template_ids, $tree_id);\n\t\t\n\t\t// build our options for the template form_dropdown\n\t\tif( count($templates))\n\t\t{\n\t\t\t// output our initial value only if there's more than one template\n\t\t\tif(count($templates) != 1)\n\t\t\t{\n\t\t\t\t$vars['templates'][0] = '--';\n\t\t\t}\n\t\t\tforeach($templates as $template)\n\t\t\t{\n\t\t\t\t// strip /index from each template\n\t\t\t\t$vars['templates'][ $template['template_id'] ] = str_replace('index/', '', '/'.$template['group_name'].'/'.$template['template_name'].'/');\n\t\t\t}\n\t\t}\n\t\t\n\t\t// get channel entries from selected templates\n\t\t$channel_ids = explode('|', $vars['tree_settings']['channel_preferences']);\n\t\t$fields_needed = array(\"entry_id\", \"channel_id\", \"title\");\n\t\t$channel_entries = $this->EE->channel_entries_model->get_entries($channel_ids, $fields_needed)->result_array();\n\t\t$channels = $this->EE->ttree->get_channels($this->site_id);\n\t\t\n\t\t// build an array of channel_ids => channel_titles\n\t\tforeach($channels as $channel)\n\t\t{\n\t\t\t$channel_names[$channel['channel_id']] = $channel['channel_title'];\n\t\t}\n\t\t// build our channel_entries form_dropdown array\n\t\tif( count($channel_entries))\n\t\t{\n\t\t\t$vars['channel_entries'][0] = '--';\n\t\t\tforeach($channel_entries as $entry)\n\t\t\t{\n\t\t\t\t$vars['channel_entries'][ $entry['entry_id'] ] = '['.$channel_names[$entry['channel_id']].'] &rarr; '.$entry['title'];\n\t\t\t}\n\t\t}\n\n\t\t// sort the entries alphabetically\n\t\tnatcasesort($vars['channel_entries']);\n\t\t\n\t\t// build our nodes array for the select parent form_dropdown\n\t\t// only if we're not inserting a root\n\t\tif(!$vars['root_insert'] && !$vars['node_id'])\n\t\t{\n\t\t\t$parent_select = array();\n\t\t\t$disabled_parents = array();\n\t\t\t\n\t\t\t$flat_tree = $this->EE->ttree->get_flat_tree(1);\n\t\t\t\n\t\t\t// go through our parent options\n\t\t\tforeach($flat_tree as $node)\n\t\t\t{\n\t\t\t\t// find out if any are at or beyond our max_depth limit\n\t\t\t\tif($node['level'] >= $vars['tree_settings']['max_depth'] && $vars['tree_settings']['max_depth'] != 0)\n\t\t\t\t{\n\t\t\t\t\t// store for later\n\t\t\t\t\t$disabled_parents[] = $node['lft'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$parent_select[$node['lft']] = str_repeat('-&nbsp;', $node['level']).$node['label'];\n\t\t\t}\n\t\t\t\n\t\t\t// put our dropdown field into a var\n\t\t\t$vars['parent_select'] = form_dropdown('parent', $parent_select);\n\t\t\t\n\t\t\t// do we have any disabled parents?\n\t\t\tif(count($disabled_parents))\n\t\t\t{\t\n\t\t\t\t// disable each parent we're not allowing.\n\t\t\t\t// haven't figured out a better way of doing this ?\n\t\t\t\tforeach($disabled_parents as $disabled_parent)\n\t\t\t\t{\n\t\t\t\t\t$vars['parent_select'] = str_replace('value=\"'.$disabled_parent.'\"', 'value=\"'.$disabled_parent.'\" disabled=\"disabled\"', $vars['parent_select']);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t// are we editing a node, get node's existing values\n\t\tif($vars['node_id'])\n\t\t{\n\t\t\t$this_node = $this->EE->ttree->get_node_by_node_id($vars['node_id']);\n\t\t\t\n\t\t\tif(count($this_node))\n\t\t\t{\n\t\t\t\t$vars['label'] = $this_node['label'];\n\t\t\t\t$vars['template_path'] = $this_node['template_path'];\n\t\t\t\t$vars['entry_id'] = $this_node['entry_id'];\n\t\t\t\t$vars['custom_url'] = $this_node['custom_url'];\n\t\t\t\t$vars['field_data'] = ($this_node['field_data']) ? $this->unserialize($this_node['field_data']) : '';\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t// build options for 'use page uri' checkbox\n\t\t$checked = false;\n\t\t\t\t\t\t\n\t\tif(isset($this_node['custom_url']) && $this_node['custom_url'] == \"[page_uri]\")\n\t\t{\n\t\t\t//check it, and show it\n\t\t\t$checked = TRUE;\n\t\t\t$vars['hide'] = \"\";\n\t\t}\n\t\t\n\t\t$vars['site_pages_checkbox_options'] = array(\n\t\t\t\t\t\t\t\t\t\t\t\t 'name' => 'use_page_uri',\n\t\t\t\t\t\t\t\t\t\t\t\t 'id' => 'use_page_uri',\n\t\t\t\t\t\t\t\t\t\t\t\t 'value' => '1',\n\t\t\t\t\t\t\t\t\t\t\t\t 'checked' => $checked\n\t\t\t\t\t\t\t\t\t\t\t );\n\t\t\n\t\t$vars['has_page_ajax_url'] = str_replace('&amp;','&', $this->_base_url.AMP.\"method=check_entry_has_pages_uri\".AMP.\"tree_id=\".$tree_id.AMP.\"node_entry_id=\");\n\t\t\n\t\t// put the select entry field into a variable\n\t\t$entries_select_dropdown = form_dropdown('entry_id', $vars['channel_entries'], $vars['entry_id']);\n\t\t\n\t\t// fetch our existing entry_ids\n\t\t$entry_ids_in_tree = $this->EE->ttree->get_tree_entry_ids($tree_id);\n\n\t\tif($entry_ids_in_tree)\n\t\t{\n\t\t\t// loop through our entries and str_replace the disabled=\"disabled\" in there :(\n\t\t\tforeach($entry_ids_in_tree as $row)\n\t\t\t{\n\t\t\t\t// don't want to disable our current node though :)\n\t\t\t\tif($row['entry_id'] != $vars['entry_id'])\n\t\t\t\t{\n\t\t\t\t\t$entries_select_dropdown = str_replace('value=\"'.$row['entry_id'].'\"', 'value=\"'.$row['entry_id'].'\" disabled=\"disabled\"', $entries_select_dropdown);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$vars['entries_select_dropdown'] = $entries_select_dropdown;\n\t\t\n\t\tunset($entries_select_dropdown);\n\n\t\treturn $this->content_wrapper('manage_node', 'manage_node', $vars);\n\n\t}", "function SetTreeData($data){\n $this->InitControl($data);\n\n }", "protected function _populateNodes()\n {\n // and some for user 1 and some for user 2.\n // five nodes for each area.\n $nodes = $this->_catalog->getModel('nodes');\n for ($i = 1; $i <= 10; $i++) {\n $node = $nodes->fetchNew();\n $node->subj = \"Subject Line $i: \" . substr(md5($i), 0, 5);\n $node->body = \"Body for $i ... \" . md5($i);\n $node->area_id = $i % 2 + 1; // sometimes 1, sometimes 2\n $node->user_id = ($i + 1) % 2 + 1; // sometimes 2, sometimes 1\n $node->save();\n }\n }", "function admin_reorder()\n\t{\n\t\tif(!$this->RequestHandler->prefers('json'))\n\t\t{\n\t\t\t$this->cakeError('error404');\n\t\t\treturn;\n\t\t}\n\n\t\tif(!isset($this->params['form']['node']))\n\t\t{\n\t\t\t$this->cakeError('missing_field', array('field' => 'Node'));\n\t\t\treturn;\n\t\t}\n\n\t\tif(!is_numeric($this->params['form']['node']))\n\t\t{\n\t\t\t$this->cakeError('invalid_field', array('field' => 'Node'));\n\t\t\treturn;\n\t\t}\n\n\t\tif(!isset($this->params['form']['delta']))\n\t\t{\n\t\t\t$this->cakeError('missing_field', array('field' => 'Delta'));\n\t\t\treturn;\n\t\t}\n\n\t\tif(!is_numeric($this->params['form']['delta']))\n\t\t{\n\t\t\t$this->cakeError('invalid_field', array('field' => 'Delta'));\n\t\t\treturn;\n\t\t}\n\n\t\t$node_id = $this->params['form']['node'];\n\t\t$delta = $this->params['form']['delta'];\n\n\t\t$node = $this->Navigation->find('first', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'Navigation.id' => $node_id,\n\t\t\t),\n\t\t\t'recursive' => -1,\n\t\t));\n\t\tif(empty($node))\n\t\t{\n\t\t\t$this->cakeError('invalid_field', array('field' => 'Node'));\n\t\t\treturn;\n\t\t}\n\n\t\t$response = array('success' => 1);\n\n\t\tif($delta > 0)\n\t\t{\n\t\t\tif($this->Navigation->movedown($node_id, abs($delta)))\n\t\t\t{\n\t\t\t\t$response = array('success' => 1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->cakeError('internal_error', array('action' => 'Reorder', 'resource' => 'Navigation'));\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\telse if($delta < 0)\n\t\t{\n\t\t\tif($this->Navigation->moveup($node_id, abs($delta)))\n\t\t\t{\n\t\t\t\t$response = array('success' => 1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->cakeError('internal_error', array('action' => 'Reorder', 'resource' => 'Navigation'));\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t$this->set('response', $response);\n\t}", "function getModifiedDeepCopy($rootNode, $nonleafNodeChildlessTransformation = null, $leafNodeTransformation = null) {\r\n\r\n if (is_null($nonleafNodeChildlessTransformation)) {\r\n\r\n $nonleafNodeChildlessTransformation = function($treeNode) { \r\n\r\n $outputTreeNode = TreeNode::createStubNode();\r\n\r\n $outputTreeNode->setName($treeNode->getName());\r\n\r\n return $outputTreeNode;\r\n\r\n };\r\n\r\n }\r\n\r\n if (is_null($leafNodeTransformation)) {\r\n\r\n $leafNodeTransformation = function($treeNode) {\r\n\r\n $outputTreeNode = TreeNode::createStubNode();\r\n\r\n $outputTreeNode->setName($treeNode->getName());\r\n \r\n $outputTreeNode->setValue($treeNode->getValue());\r\n\r\n return $outputTreeNode;\r\n\r\n };\r\n\r\n }\r\n\r\n // check whether tree instance is the empty tree instance\r\n\r\n if (is_null($rootNode)) {\r\n\r\n return null;\r\n\r\n }\r\n\r\n // check whether root node is a valid tree node\r\n\r\n TreeNode::checkTreeNode($rootNode);\r\n\r\n // check whether tree instance is the trivial tree instance\r\n\r\n if (!$rootNode->hasChildren()) {\r\n\r\n return $leafNodeTransformation($rootNode);\r\n\r\n }\r\n\r\n // initialize output tree\r\n\r\n $outputRootNode = $nonleafNodeChildlessTransformation($rootNode);\r\n\r\n // initialize previous level input and previous level output non-leaf node tracking data structures\r\n\r\n $previousLevelNonLeafNodes = array($rootNode);\r\n\r\n $outputPreviousLevelNonLeafNodes = array($outputRootNode);\r\n\r\n // traverse tree levels one level at a time starting at the current level just below the root node\r\n\r\n while (count($previousLevelNonLeafNodes) > 0) {\r\n\r\n // set up input and output non-leaf node tracking data structures\r\n\r\n $currentLevelNonLeafNodes = array();\r\n\r\n $outputCurrentLevelNonLeafNodes = array();\r\n\r\n // simultaneously iterate through previous level input and previous level output non-leaf nodes\r\n\r\n for ($previousLevelNonLeafNodeIndex = 0; $previousLevelNonLeafNodeIndex < count($previousLevelNonLeafNodes); $previousLevelNonLeafNodeIndex++) {\r\n\r\n $previousLevelNonLeafNode = $previousLevelNonLeafNodes[$previousLevelNonLeafNodeIndex];\r\n\r\n $outputPreviousLevelNonLeafNode = $outputPreviousLevelNonLeafNodes[$previousLevelNonLeafNodeIndex];\r\n\r\n // set up data structure to collect transformations of all children of input current level non-leaf node\r\n\r\n $outputPreviousLevelNonLeafNodeChildren = array();\r\n\r\n // iterate through children of current previous level input non-leaf node\r\n\r\n foreach ($previousLevelNonLeafNode->getChildren() as $currentLevelNode) {\r\n\r\n // carry out safety check\r\n\r\n TreeNode::checkTreeNode($currentLevelNode);\r\n\r\n // check whether current level input node is a non-leaf node\r\n\r\n if ($currentLevelNode->hasChildren()) {\r\n\r\n // set up output (at the moment childless) transformed non-leaf node\r\n\r\n $outputCurrentLevelNode = $nonleafNodeChildlessTransformation($currentLevelNode);\r\n\r\n // update input and output non-leaf node tracking data structures\r\n\r\n array_push($currentLevelNonLeafNodes, $currentLevelNode);\r\n\r\n array_push($outputCurrentLevelNonLeafNodes, $outputCurrentLevelNode);\r\n\r\n } else {\r\n\r\n // set up output transformed leaf node\r\n\r\n $outputCurrentLevelNode = $leafNodeTransformation($currentLevelNode);\r\n\r\n }\r\n\r\n // keep track of output current level child node for previous level non-leaf node\r\n\r\n array_push($outputPreviousLevelNonLeafNodeChildren, $outputCurrentLevelNode);\r\n\r\n }\r\n\r\n // set children for output previous level non-leaf node\r\n\r\n $outputPreviousLevelNonLeafNode->setChildren($outputPreviousLevelNonLeafNodeChildren);\r\n\r\n }\r\n\r\n // update input and output non-leaf node tracking data structures\r\n\r\n $previousLevelNonLeafNodes = $currentLevelNonLeafNodes;\r\n\r\n $outputPreviousLevelNonLeafNodes = $outputCurrentLevelNonLeafNodes;\r\n\r\n }\r\n\r\n return $outputRootNode;\r\n\r\n }", "public function resetInTreeCache()\n\t{\n\t\t$this->in_tree_cache = array();\n\t}", "private function resetTransactionNestingLevel(): void\n {\n if (! $this->selfReflectionNestingLevelProperty instanceof ReflectionProperty) {\n $reflection = new ReflectionClass(\\Doctrine\\DBAL\\Connection::class);\n\n // Private property has been renamed in DBAL 2.9.0+\n if ($reflection->hasProperty('transactionNestingLevel')) {\n $this->selfReflectionNestingLevelProperty = $reflection->getProperty('transactionNestingLevel');\n } else {\n $this->selfReflectionNestingLevelProperty = $reflection->getProperty('_transactionNestingLevel');\n }\n\n $this->selfReflectionNestingLevelProperty->setAccessible(true);\n }\n\n $this->selfReflectionNestingLevelProperty->setValue($this, 0);\n }", "public function rebuild()\n\t{\n\t\t$id=3;\n\t\t$dataAlbum = $this->admin->data_album($id);\n\t\t$namaAlbum = $dataAlbum->row()->nama_album;\n\t\t$albumKey = $dataAlbum->row()->kode_album;\n\t\t$data['title'] = \"Dashboard | FaceVoting Versi 1.0\";\n\t\t$data['getRebuild']= $this->_prosesRebuild($namaAlbum,$albumKey);\n\t\t$view ='v_rebuildalbum';\n\t\t$this->_template($data,$view);\n\t}", "public function testNewNodePrependToRoot()\n {\n $model2 = Animal::findOne(2);\n $root = $model2->getRoot();\n $model4 = Animal::findOne(4);\n \n $model = new Animal();\n $model->name = 'new';\n \n $this->assertTrue($model->prependTo($root));\n $this->assertSame($root, $model->getRoot());\n $this->assertSame('', $model->path);\n $this->assertEquals(1, $model->level);\n $this->assertEquals(1, $model->weight);\n \n $model2->refresh();\n $this->assertEquals(3, $model2->weight);\n $model4->refresh();\n $this->assertEquals(5, $model4->weight);\n \n }", "function attemptDirectLinkFix() {\n\t\t$ref = array();\n\t\tforeach ($this->assets as $id => $asset) {\n\t\t\t$ref[$asset->lft] = $asset;\n\t\t}\n\t\tforeach ($this->assets as $id => $asset) {\n\t\t\tif ((!isset($asset->parent_asset)) && ($asset->errors)) {\n\t\t\t\tif (isset($ref[($asset->lft-1)])) {\n\t\t\t\t\t$asset->parent_asset = $ref[($asset->lft-1)];\n\t\t\t\t\t$asset->parent_asset->addChild($asset);\n\t\t\t\t\t$asset->fixes[] = 'Parent assigned by attemptDirectLinkFix';\n\t\t\t\t\t$this->removeRoot($asset->id);\n\t\t\t\t\t$this->fixed[] = $asset;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected function _rebuildRoutes() {\n \\Drupal::service('router.builder')->rebuild();\n }", "protected function initTree()\n {\n Table9Peer::doDeleteAll();\n $ret = array();\n // shuffling the results so the db order is not the natural one\n $fixtures = array(\n 't2' => array(2, 3, 1),\n 't5' => array(7, 12, 2),\n 't4' => array(5, 6, 2),\n 't7' => array(10, 11, 3),\n 't1' => array(1, 14, 0),\n 't6' => array(8, 9, 3),\n 't3' => array(4, 13, 1),\n );\n /* in correct order, this is:\n 't1' => array(1, 14, 0),\n 't2' => array(2, 3, 1),\n 't3' => array(4, 13, 1),\n 't4' => array(5, 6, 2),\n 't5' => array(7, 12, 2),\n 't6' => array(8, 9, 3),\n 't7' => array(10, 11, 3),\n */\n foreach ($fixtures as $key => $data) {\n $t = new PublicTable9();\n $t->setTitle($key);\n $t->setLeftValue($data[0]);\n $t->setRightValue($data[1]);\n $t->setLevel($data[2]);\n $t->save();\n $ret[$key]= $t;\n }\n // reordering the results in the fixtures\n ksort($ret);\n\n return array_values($ret);\n }", "private static function refreshNestings(): void\n {\n if ($ids = array_keys (self::$instancesById)) {\n $rows = Application::getInstance()->getVxPDO()->doPreparedQuery(\n sprintf(\"SELECT foldersid, l, r, level FROM folders WHERE foldersid IN (%s)\", implode(',', array_fill(0, count($ids), '?'))),\n $ids\n );\n\n foreach($rows as $row) {\n $instance = self::$instancesById[$row['foldersid']];\n $instance->level = $instance->data['level'] = $row['level'];\n $instance->r = $instance->data['r'] = $row['r'];\n $instance->l = $instance->data['l'] = $row['l'];\n }\n }\n\t}", "public function run()\n {\n $nodes = [\n [\n 'name' => 'developvbox',\n 'limit_vcpus' => '24',\n 'limit_memory' => '128G',\n ],[\n 'name' => 'X1Carbon',\n 'limit_vcpus' => '8',\n 'limit_memory' => '10G',\n ],\n [\n 'name' => 'node01',\n 'limit_vcpus' => '24',\n 'limit_memory' => '128G',\n ],\n ];\n\n foreach ($nodes as $n) {\n (new \\App\\Models\\Node($n))->save();\n }\n }", "private function rebuildLevel()\n\t{\n\t\techo \"Rebuilding \" . $this->OutputPath . PHP_EOL;\n\n\t\t$InstanceFiles = $this->orderInstances();\n\t\t$this->WriteFile = fopen( $this->OutputPath, \"w\" );\n\t\tfwrite( $this->WriteFile, $this->getHeader( sizeof( $InstanceFiles ) ) );\n\n\t\tforeach( $InstanceFiles as $InstanceFile )\n\t\t{\n\t\t\t$this->Instance = json_decode( file_get_contents( $InstanceFile ) );\n\n\t\t\tif( ! $this->Instance || empty( $this->Instance ) )\n\t\t\t{\n\t\t\t\tvar_dump( $InstanceFile );\n\t\t\t\tdie( 'failed to decode json!' );\n\t\t\t}\n\t\t\t$this->processInstance();\n\t\t}\n\n\t\tfclose( $this->WriteFile );\n\t}", "protected function _getTree($create = false) {}", "function migrate_nodes($drupal_content_type, $scs_content_type) {\n $dbresult = db_query('SELECT nid FROM node WHERE type = \"%s\"', $drupal_content_type);\n $num = 0;\n while ($obj = db_fetch_object($dbresult)) {\n $num++;\n $node = node_load($obj->nid);\n $json = drupal_to_js($node);\n $url = variable_get('backend_url', null) . '/' . $scs_content_type;\n $metodo = 'POST';\n $reqresult = drupal_http_request ( \n $url, \n array ( 'Content-Type' => 'application/json' ),\n $metodo,\n $json,\n 1,\n 30.0\n );\n\t\t\t\t\t\t\t\t\t \n print(\"\\n\" . \"reqresult: \" . print_r($reqresult->data, FALSE) . \"\\n\");\n print(\"\\n\" . \"reqresult: \" . print_r($reqresult->error, FALSE) . \"\\n\");\n }\n return(\"\\nMigrated \" . $num . \" items for content type \" . $drupal_content_type . \" to \" . $scs_content_type . \"\\n\");\n}", "function pico_sync_cattree($mydirname)\n{\n\t$db = XoopsDatabaseFactory::getDatabaseConnection();\n\n\t// rebuild tree informations\n\tlist($tree_array, $subcattree, $contents_total, $subcategories_total, $subcategories_ids_cs) = pico_makecattree_recursive($mydirname, 0);\n\t//array_shift( $tree_array ) ;\n\t$paths = [];\n\t$previous_depth = 0;\n\n\tif (!empty($tree_array)) foreach ($tree_array as $key => $val) {\n\t\t// build the absolute path of the category\n\t\t$depth_diff = $val['depth'] - $previous_depth;\n\t\t$previous_depth = $val['depth'];\n\t\tif ($depth_diff > 0) {\n\t\t\tfor ($i = 0; $i < $depth_diff; $i++) {\n\t\t\t\t$paths[$val['cat_id']] = $val['cat_title'];\n\t\t\t}\n\t\t} else if (0 !== $val['cat_id']) {\n\t\t\tfor ($i = 0; $i < -$depth_diff + 1; $i++) {\n\t\t\t\tarray_pop($paths);\n\t\t\t}\n\t\t\t$paths[$val['cat_id']] = $val['cat_title'];\n\t\t}\n\n\t\t// redundant array\n\t\t$redundants = [\n\t\t\t'cat_id' => $val['cat_id'],\n\t\t\t'depth' => $val['depth'],\n\t\t\t'cat_title' => $val['cat_title'],\n\t\t\t'contents_count' => $val['contents_count'],\n\t\t\t'contents_total' => $val['contents_total'],\n\t\t\t'subcategories_count' => $val['subcategories_count'],\n\t\t\t'subcategories_total' => $val['subcategories_total'],\n\t\t\t'subcategories_ids_cs' => $val['subcategories_ids_cs'],\n\t\t\t'subcattree_raw' => $val['subcattree_raw'],\n ];\n\n\t\t$db->queryF(\n 'UPDATE '\n . $db->prefix($mydirname . '_categories') . ' SET cat_depth_in_tree='\n . (int)$val['depth'] . ', cat_order_in_tree='\n . ($key) . ', cat_path_in_tree='\n . $db->quoteString(pico_common_serialize($paths)) . ', cat_redundants='\n . $db->quoteString(pico_common_serialize($redundants)) . ' WHERE cat_id='\n . $val['cat_id']);\n\t}\n}", "public function modifyNode($dn, $newParams) {\n if(isset($newParams[\"id\"]))\n $newParams = array($newParams);\n\n $connId = $this->getConnection();\n $properties = $this->getNodeProperties($dn);\n $properties = $this->helper->formatToPropertyArray($properties);\n\n $idRegexp = \"/^(.*)_(\\d*)$/\";\n $affectsDN = false;\n\n foreach($newParams as $parameter) {\n\n // ignore inherited params\n if(isset($parameter[\"parent\"]))\n if($parameter[\"parent\"] != \"\")\n continue;\n\n $idElems = array();\n preg_match($idRegexp,$parameter[\"id\"],$idElems);\n if(count($idElems) != 3) {\n throw new AppKitException(\"Invalid ID given to modifyNode \".$parameter[\"id\"]);\n }\n $curProperty = $idElems[1];\n $curIndex = $idElems[2];\n if(!isset($properties[$curProperty]))\n continue;\n if(is_array($properties[$curProperty])) {\n\n $properties[$curProperty][$curIndex] = $parameter[\"value\"];\n if(in_array($curProperty,self::$dnDescriptors))\n $affectsDN = $curProperty.\"=\".$parameter[\"value\"];\n } else {\n $properties[$curProperty] = $parameter[\"value\"];\n if(in_array($curProperty,self::$dnDescriptors))\n $affectsDN = $curProperty.\"=\".$parameter[\"value\"];\n }\n }\n // if the dn is affected, the node must be moved instead of being modified\n if($affectsDN) {\n $dnToPreserve = explode(\",\",$dn,2);\n $dnToPreserve = $dnToPreserve[1];\n // add new node and remove old\n $newDN = $affectsDN.\",\".$dnToPreserve;\n\n\n \n if(!@ldap_add($connId,$newDN,$properties)) {\n throw new AgaviException(\"Could not modify \".$dn. \":\".$this->getError());\n }\n // recursive clone\n if($childs = $this->listDN($dn)) {\n foreach($childs as $key=>$child) {\n if(!is_int($key))\n continue;\n\n $this->moveNode((isset($child[\"aliasdn\"]) ? $child[\"aliasdn\"] : $child[\"dn\"]),$newDN);\n }\n }\n $this->rechainAliasesForNode($dn,$newDN);\n $this->removeNodes($dn, false); // leave broken aliases for safety\n } else {\n\n if(!@ldap_modify($connId,$dn,$properties)) {\n throw new AgaviException(\"Could not modify \".$dn. \":\".$this->getError());\n }\n }\n return $dn;\n }", "public function tree_backup_create($description = \"\", $username = \"Automatic\") {\n global $db, $langval;\n\n $prev_langval = $langval;\n\n // Kompletten baum in den cache laden\n $this->tree_cache_elements();\n\n $ar_backup = $this->cache_nodes;\n // Texte verschieben\n foreach ($ar_backup as $id_node => $data) {\n $langval = 128;\n $text = array();\n $text[\"T1\"] = $data[\"T1\"];\n $text[\"V1\"] = $data[\"V1\"];\n $text[\"V2\"] = $data[\"V2\"];\n\n $ar_backup[$id_node][\"backup_text\"] = array();\n $ar_backup[$id_node][\"backup_text\"][$langval] = $text;\n\n while ($langval > 1) {\n if ($langval & $data[\"BF_LANG_KAT\"]) {\n $data_lang = $this->element_read($id_node, $langval);\n\n $text_lang = array();\n $text_lang[\"T1\"] = $data_lang[\"T1\"];\n $text_lang[\"V1\"] = $data_lang[\"V1\"];\n $text_lang[\"V2\"] = $data_lang[\"V2\"];\n\n $ar_backup[$id_node][\"backup_text\"][$langval] = $text_lang;\n }\n $langval /= 2;\n }\n\n unset($ar_backup[$id_node][\"T1\"]);\n unset($ar_backup[$id_node][\"V1\"]);\n unset($ar_backup[$id_node][\"V2\"]);\n }\n\n $langval = $prev_langval;\n\n $backup = array();\n $backup[\"DATA\"] = serialize($ar_backup);\n $backup[\"DATA_FIELDS\"] = serialize($db->fetch_table(\"SELECT * FROM `\".$this->table.\"2field`\"));\n $backup[\"DESCRIPTION\"] = $description;\n $backup[\"CREATED_BY\"] = $username;\n\n if ($this->backupid = $db->update($this->table.\"_restore\", $backup)) {\n return true;\n }\n return false;\n }", "private function tree_apply_changes($changes) {\n global $db;\n\n foreach ($changes as $id => $change) {\n $change[\"ID_KAT\"] = $id;\n if ($updateid = $db->update($this->table, $change))\n unset($this->cache_nodes[$updateid]);\n }\n\n return $this->tree_create_nestedset();\n }", "public function calc_tree()\n\t{\n\t\t$this->readTree(TRUE);\t\t\t// Make sure we have accurate data\n\t\tforeach ($this->class_parents as $cp)\n\t\t{\n\t\t\t$rights = array();\n\t\t\t$this->rebuild_tree($cp,$rights);\t\t// increasing rights going down the tree\n\t\t}\n\t}", "public function buildNodes() {\n\t\t// build pip nodes\n\t\t$this->buildPluginNodes();\n\t\t\n\t\t// remove package\n\t\t$this->buildPackageNode();\n\t}", "private function recreateCategory(): void\n {\n $this->category = $this->categoryFactory->create();\n $this->category->load(2);\n }", "protected function update_network_to_1_3_0() {\n\n\t\t$this->update_points_type_settings_to_1_3_0();\n\t}", "public function resetRelations()\n\t{\n\t\t$this->relations = array();\n\t}", "public function run()\n {\n\t DB::table('networks')->insert([\n\t 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t 'updated_at' => Carbon\\Carbon::now()->toDateTimeString()\n\t ]);\n\n\t for($i=1; $i<=5; $i++){\n\n\t\t DB::table('network_nodes')->insert([\n\t\t 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t 'network_id' => 1,\n\t\t 'node' => $i\n\t\t ]);\n\n\t\t DB::table('user_nodes')->insert([\n\t\t 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t 'user_id' => $i,\n\t\t 'node_id' => $i\n\t\t ]);\n\n\t }\n\n\t for($i=1; $i<=5; $i++){\n\n\n\t \tfor($j=1; $j<=5; $j++){\n\t \t\tif($j != $i){\n\n\t\t\t\t DB::table('network_edges')->insert([\n\t\t\t\t 'created_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t\t 'updated_at' => Carbon\\Carbon::now()->toDateTimeString(),\n\t\t\t\t 'network_id' => 1,\n\t\t\t\t 'source' => $i,\n\t\t\t\t 'target' => $j\n\t\t\t\t ]);\n\n\n\t \t\t}\n\n\n\t \t}\n\n\t }\n\n }", "public static function rebuild_tree($model, $local_parent, $site_id, $left)\n\t{\n\t\t# the right value of this node is the left value + 1\n\t\t$right = $left+1;\n\t\t\n\t\t$navigation_items = ORM::factory($model)\n\t\t\t->where(array(\n\t\t\t\t'fk_site'\t\t=> $site_id,\n\t\t\t\t'local_parent'\t=> $local_parent,\n\t\t\t))\n\t\t\t->orderby('position', 'asc')\n\t\t\t->find_all();\t\n\n\t\tforeach($navigation_items as $item)\n\t\t{\n\t\t # recursive function for each child of this node\n\t\t # $right is the current right value;\n\t\t # incremented by the rebuild_tree function\n\t\t $right = Tree::rebuild_tree($model, $item->id, $site_id, $right);\n\t\t}\n\t\t\n\t\t# we've got the left value, and now that we've processed\n\t\t# the children of this node we also know the right value\n\t\t$item = ORM::factory($model, $local_parent); \n\t\t$item->lft = $left;\n\t\t$item->rgt = $right;\n\t\t$item->save();\t\t\n\n\t\t# return the right value of this node + 1\n\t\treturn $right+1;\n\t}", "private function updateNetworks()\n {\n foreach ($this->networks as $net_key => $net_value) {\n $url = $net_value['template'];\n\n foreach ($this->args as $arg_key => $arg_value) {\n $url = str_replace('{' . $arg_key . '}', $arg_value, $url);\n }\n\n $this->networks[$net_key]['url'] = $url;\n }\n }", "function create_left_node($id, $values)\r\n\t{\r\n\t\t$this->_verify_user_values($values); \r\n\t\t// invalid target node, bail out\r\n\t\tif (!($this_node = $this->get_node($id)))\r\n\t\t{\r\n \tdebug :: error(NESE_ERROR_NOT_FOUND,\r\n \t\t __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__, \r\n \t\tarray('id' => $id)\r\n \t);\n \treturn false;\r\n\t\t} \r\n\r\n\t\t$lock = $this->_set_lock();\n\t\t\r\n\t\t// If the target node is a rootnode we virtually want to create a new root node\r\n\t\tif ($this_node['root_id'] == $this_node['id'])\r\n\t\t{\r\n\t\t\treturn $this->create_root_node($values, $id, false, NESE_MOVE_BEFORE);\r\n\t\t} \r\n\r\n\t\t$insert_data = array();\r\n\t\t$parent = $this->get_parent($id);\r\n\t\t$insert_data['parent_id'] = $parent['id'];\r\n\r\n\t\t$sql = array();\r\n\t\t$sql[] = sprintf('UPDATE %s SET ordr=ordr+1\r\n WHERE root_id=%s AND ordr>=%s AND level=%s AND l BETWEEN %s AND %s',\r\n\t\t\t\t\t\t\t\t\t\t\t$this->_node_table,\r\n\t\t\t\t\t\t\t\t\t\t\t$this_node['root_id'],\r\n\t\t\t\t\t\t\t\t\t\t\t$this_node['ordr'],\r\n\t\t\t\t\t\t\t\t\t\t\t$this_node['level'],\r\n\t\t\t\t\t\t\t\t\t\t\t$parent['l'], $parent['r']); \n\t\t\t\r\n\t\t// Update all nodes which have dependent left and right values\r\n\t\t$sql[] = sprintf('UPDATE %s SET\r\n\t\t\t l=CASE WHEN l >= %s THEN l+2 ELSE l END,\r\n\t\t\t r=CASE WHEN (r >= %s OR l >= %s) THEN r+2 ELSE r END\r\n\t\t\t WHERE root_id=%s',\r\n\t\t\t\t\t\t\t\t\t\t\t$this->_node_table,\r\n\t\t\t\t\t\t\t\t\t\t\t$this_node['l'],\r\n\t\t\t\t\t\t\t\t\t\t\t$this_node['r'],\r\n\t\t\t\t\t\t\t\t\t\t\t$this_node['l'],\r\n\t\t\t\t\t\t\t\t\t\t\t$this_node['root_id']);\r\n\r\n\t\t$insert_data['ordr'] = $this_node['ordr'];\r\n\t\t$insert_data['l'] = $this_node['l'];\r\n\t\t$insert_data['r'] = $this_node['l'] + 1;\r\n\t\t$insert_data['root_id'] = $this_node['root_id'];\r\n\t\t$insert_data['level'] = $this_node['level'];\r\n\r\n\t\tif (!$this->_dumb_mode || !$node_id = isset($values['id']))\r\n\t\t{\r\n\t\t\t$node_id = $insert_data['id'] = $this->db->get_max_column_value($this->_node_table, 'id') + 1;\r\n\t\t} \r\n\t\telse\r\n\t\t{\r\n\t\t\t$node_id = $values['id'];\r\n\t\t} \r\n\r\n\t\tif (!$qr = $this->_values2insert_query($values, $insert_data))\r\n\t\t{\r\n\t\t\t$this->_release_lock();\r\n\t\t\treturn false;\r\n\t\t} \r\n\t\t// Insert the new node\r\n\t\t$sql[] = sprintf('INSERT INTO %s (%s) VALUES (%s)', $this->_node_table, implode(', ', array_keys($qr)), implode(', ', $qr));\r\n\t\tforeach ($sql as $qry)\r\n\t\t{\r\n\t\t\t$this->db->sql_exec($qry);\r\n\t\t} \r\n\r\n\t\t$this->_release_lock();\r\n\t\treturn $node_id;\r\n\t}", "public function run()\n {\n DB:: table('modules')->truncate();\n DB:: table('modules')->insert(array(\n // Cashier\n array('id' => 1, 'parent_id' => 0, 'description'=>'Cashier', 'icon' => 'fas fa-laptop', 'path' => 'cashier', 'rank' => 1),\n // Master List\n array('id' => 2, 'parent_id' => 0, 'description'=>'Master List', 'icon' => 'fas fa-clipboard-list', 'path' => '', 'rank' => 2),\n array('id' => 3, 'parent_id' => 2, 'description'=>'Product', 'icon' => 'fa fa-address-card-o', 'path' => '', 'rank' => 2),\n array('id' => 4, 'parent_id' => 3, 'description'=>'Product List', 'icon' => 'fas fa-box', 'path' => 'product_list', 'rank' => 2),\n array('id' => 5, 'parent_id' => 3, 'description'=>'Category', 'icon' => 'fas fa-th', 'path' => 'product_category', 'rank' => 2),\n array('id' => 6, 'parent_id' => 2, 'description'=>'Discount', 'icon' => '', 'path' => '', 'rank' => 2),\n array('id' => 7, 'parent_id' => 6, 'description'=>'Discount List', 'icon' => 'fa fa-address-card-o', 'path' => 'discount_list', 'rank' => 2),\n array('id' => 27, 'parent_id' => 0, 'description'=>'Bus', 'icon' => '', 'path' => '', 'rank' => 2),\n array('id' => 28, 'parent_id' => 27, 'description'=>'Bus List', 'icon' => 'fas fa-bus', 'path' => 'bus_list', 'rank' => 1),\n array('id' => 29, 'parent_id' => 27, 'description'=>'Bus Type', 'icon' => 'fas fa-th', 'path' => 'bus_type', 'rank' => 2),\n array('id' => 30, 'parent_id' => 27, 'description'=>'Route Management', 'icon' => 'fas fa-map-marker', 'path' => 'route_management', 'rank' => 3),\n // Trip\n array('id' => 31, 'parent_id' => 0, 'description'=>'Bus Trip', 'icon' => 'fa fa-road', 'path' => '', 'rank' => 3),\n array('id' => 32, 'parent_id' => 31, 'description'=>'Bus Trip', 'icon' => 'fa fa-road', 'path' => 'bus_trip', 'rank' => 1),\n array('id' => 33, 'parent_id' => 31, 'description'=>'Bus Trip Ticket', 'icon' => 'fa-ticket-alt', 'path' => 'bus_trip_ticket', 'rank' => 2),\n // Inventory\n array('id' => 8, 'parent_id' => 0, 'description'=>'Inventory', 'icon' => 'fa fa-archive', 'path' => 'counter', 'rank' => 4),\n array('id' => 9, 'parent_id' => 8, 'descri4ption'=>'Inventory', 'icon' => '', 'path' => '', 'rank' => 2),\n array('id' => 10, 'parent_id' => 9, 'description'=>'Product Inventory', 'icon' => '', 'path' => '', 'rank' => 2),\n array('id' => 11, 'parent_id' => 9, 'description'=>'Daily Production Count', 'icon' => '', 'path' => 'production_count', 'rank' => 2),\n array('id' => 12, 'parent_id' => 9, 'description'=>'Quantity Adjustment', 'icon' => '', 'path' => 'product_quantity_adjustment', 'rank' => 2),\n array('id' => 13, 'parent_id' => 8, 'description'=>'Manufacturing', 'icon' => '', 'path' => '', 'rank' => 2),\n array('id' => 14, 'parent_id' => 13, 'description'=>'Ingredient Supply', 'icon' => '', 'path' => 'ingredient_supply', 'rank' => 2),\n array('id' => 15, 'parent_id' => 13, 'description'=>'Formulation', 'icon' => '', 'path' => 'formulation', 'rank' => 2),\n array('id' => 16, 'parent_id' => 13, 'description'=>'Ingredient List', 'icon' => '', 'path' => 'ingredient_list', 'rank' => 2),\n array('id' => 17, 'parent_id' => 0, 'description'=>'Others', 'icon' => '', 'path' => '', 'rank' => 2),\n array('id' => 18, 'parent_id' => 17, 'description'=>'Quantity Adjustment', 'icon' => '', 'path' => 'quantity_adjustment_type', 'rank' => 2),\n // Transactions\n array('id' => 19, 'parent_id' => 0, 'description'=>'Transaction', 'icon' => 'fa fa-clipboard', 'path' => '', 'rank' => 5),\n array('id' => 20, 'parent_id' => 19, 'description'=>'Pending Transactions', 'icon' => '', 'path' => 'transaction_history', 'rank' => 2),\n array('id' => 21, 'parent_id' => 19, 'description'=>'Transaction History', 'icon' => '', 'path' => 'transaction_history', 'rank' => 2),\n // Reports\n array('id' => 22, 'parent_id' => 0, 'description'=>'Reports', 'icon' => 'fa fa-file-alt', 'path' => '', 'rank' => 6),\n array('id' => 23, 'parent_id' => 22, 'description'=>'X Reading', 'icon' => '', 'path' => 'x_reading', 'rank' => 1),\n array('id' => 24, 'parent_id' => 22, 'description'=>'Z Reading', 'icon' => '', 'path' => 'z_reading', 'rank' => 2),\n array('id' => 25, 'parent_id' => 22, 'description'=>'Daily Sales Report', 'icon' => '', 'path' => 'daily_sales_report', 'rank' => 3),\n array('id' => 26, 'parent_id' => 22, 'description'=>'Product Sales Summary', 'icon' => '', 'path' => 'product_sales_summary', 'rank' => 4),\n\n array('id' => 34, 'parent_id' => 22, 'description'=>'Bus Daily Sales Report', 'icon' => '', 'path' => 'bus_daily_sales_report', 'rank' => 5),\n array('id' => 35, 'parent_id' => 22, 'description'=>'Route Sales Summary', 'icon' => '', 'path' => 'route_sales_summary', 'rank' => 6),\n array('id' => 36, 'parent_id' => 22, 'description'=>'Bus Collection Summary', 'icon' => '', 'path' => 'bus_collection_summary', 'rank' => 7)\n // LAST ID 36\n ));\n }", "function moveTestSuite(&$smartyObj,$template_dir,&$tprojectMgr,$argsObj)\r\n{\r\n $exclude_node_types=array('testplan' => 1, 'requirement' => 1, 'requirement_spec' => 1);\r\n\r\n $tprojectMgr->tree_manager->change_parent($argsObj->objectID,$argsObj->containerID);\r\n $tprojectMgr->tree_manager->change_child_order($argsObj->containerID,$argsObj->objectID,\r\n $argsObj->target_position,$exclude_node_types);\r\n\r\n $guiObj = new stdClass();\r\n $guiObj->id = $argsObj->tprojectID;\r\n $guiObj->refreshTree = $argsObj->refreshTree;\r\n\r\n $tprojectMgr->show($smartyObj,$guiObj,$template_dir,$argsObj->tprojectID,null,'ok');\r\n}", "public static function buildTree($nodes){\n\t\t// Initialize hierarchy and lookup arrays\n\t\tself::$hierarchy = array();\n\t\tself::$lookup = array();\n\t\t// Walk through nodes\n\t\tarray_walk($nodes, 'hierarchy::addNode');\n\t\t// Return the hierarchical (tree) hierarchy\n\t\treturn self::$hierarchy;\n\t}", "function update_tables($inst=null) {\n// create the nodes of all the tables\n\tglobal $conn,$DB,$DTB_PRE,$TB_PRE,$wise_table,$VWMLDBM;\n\tif($inst==1) {\n\t\tif($_SESSION['vwmldbm_inst']!=1) return; // inst=1 is super inst,so access should be protected\n\t}\n\telseif($inst>1 && $inst!=$_SESSION['vwmldbm_inst'] && $_SESSION['vwmldbm_inst']!=1) return; // inst=1 can access other inst\n\telseif(!$inst) $inst=$_SESSION['vwmldbm_inst']; \n\n// SJH_MOD \n\tif($TB_PRE==\"\" || $TB_PRE==null) $sql=\"select no from {$DTB_PRE}vwmldbm_tb where name like '%'\";\n\telse $sql=\"select no from {$DTB_PRE}vwmldbm_tb where name like '$TB_PRE\".\"\\_%'\";\n\n\t$res_tables=mysqli_query($conn,$sql);\n \n\tif($res_tables) {\n\t\twhile($rs_tables=mysqli_fetch_array($res_tables)) $wise_table[]=Table_node::get_new_node($rs_tables['no'],$inst);\n\t}\n\t$num_tables=0;\n\tfor($i=0;$i<count($wise_table);$i++){\n\t\tif($wise_table[$i]->tb_no==\"\") continue; // skip unnecessary tables\n\t\t$num_tables++;\n\t}\n\techo \"The number of tables: <b>$num_tables</b> <br>\";\n\t\n\tif($num_tables<1) return;\n\n// update upLinks and downlinks\n\t$res_f=mysqli_query($conn,\"select * from {$DTB_PRE}vwmldbm_rmd_fkey_info \");\n\t\n\tif($res_f) {\n\t\tif(mysqli_num_rows($res_f)<1) return; // there is no data in wise_rmd_feky_info\n\t\twhile($rs_f=mysqli_fetch_array($res_f)) {\n\t\t\t$from_tb_no=get_tree_no($rs_f['from_db'],$rs_f['from_tb'],$inst);\n\t\t\t$to_tb_no=get_tree_no($rs_f['to_db'],$rs_f['to_tb'],$inst);\n\t\t\t//echo $from_tb_no .\" => \".$to_tb_no.\"<br>\";\n\t\t\tupdate_node($from_tb_no,$to_tb_no);\n\t\t}\n\t}\n\n\t\n// root/terminal node unmarking\t\n\tfor($i=0;$i<count($wise_table);$i++){\n\t\tif(count($wise_table[$i]->upLink))\n\t\t\t$wise_table[$i]->is_root=false;\n\t\tif(count($wise_table[$i]->downLink)){\n\t\t\t$wise_table[$i]->is_terminal=false;\n\t\t}\n\t}\n\t\n\t\n// Find each root node and do the df_traversal.\n\n\tfor($i=0;$i<count($wise_table);$i++){\n\t\tif($wise_table[$i]->is_root) { // root node found\n\t\t\tif($wise_table[$i]->is_terminal) {\n\t\t\t\t//echo \"#\".$wise_table[$i]->tb_no.\" is an isolated node.<br>\";\n\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\tforeach($wise_table[$i]->downLink as $child) \n\t\t\t\t\tdf_traversal(find_node($child),$wise_table[$i]);\n\t\t\t}\n\t\t}\n\t}\n\t\n\n// Update the orders of creation into wise2_vwmldbm_tb\n\t$how_many_in_each_level=array();\n\tfor($i=0;$i<count($wise_table);$i++){\n\t\t$how_many_in_each_level[$wise_table[$i]->level]++;\t\n\t}\n\t$cnt=0;\n\tfor($i=0;$i<count($wise_table);$i++){ // update the isolated nodes\n\t\tif($wise_table[$i]->tb_no==\"\") continue; // skip unnecessary tables\n\t\tif(type_of_table($DB,$TB_PRE,get_tb_name($wise_table[$i]->tb_no),$inst)=='V') continue; // skip VIEW\n\t\tif($wise_table[$i]->is_root==true && $wise_table[$i]->is_terminal==true) $wise_table[$i]->order_of_creation=++$cnt;\n\t}\n\tfor($i=count($how_many_in_each_level)-1;$i>=0;$i--){ // update all other nodes\n\t\tfor($j=0;$j<count($wise_table);$j++){\n\t\t\tif($wise_table[$j]->tb_no==\"\") continue; // skip unnecessary tables\n\t\t\tif(type_of_table($DB,$TB_PRE,get_tb_name($wise_table[$i]->tb_no,$inst))=='V') continue; // skip VIEW\n\t\t\tif($wise_table[$j]->is_root==true && $wise_table[$j]->is_terminal==true) continue; // these isolated nodes were counted already before.\n\t\t\tif($wise_table[$j]->level==$i){\n\t\t\t\t$wise_table[$j]->order_of_creation=++$cnt;\t\t\t\n\t\t\t}\n\t\t}\n\t}\n // update the order of creation info into wise2.wise2_system.wise_table\t\n\tfor($i=0;$i<count($wise_table);$i++){ // Tables (not views)\n\t\tif($wise_table[$i]->tb_no==\"\") continue; // skip unnecessary tables\n\t\t$tb_name=get_tb_name($wise_table[$i]->tb_no,$inst);\n\t\tif(type_of_table($DB,$TB_PRE,$tb_name)=='V') continue; // skip VIEW\n\t\t\t\n\t\tmysqli_query($conn,\"update {$DTB_PRE}vwmldbm_tb set creating_order='\".$wise_table[$i]->order_of_creation.\"' where name='$tb_name'\");\n\t\t//echo $wise_table[$i]->tb_no.\": \".$wise_table[$i]->order_of_creation.\"<br>\";\t\n\t}\n\n// Determine the creating order of views from installation file\n\tif(file_exists($VWMLDBM['wise_rt'].\"/install/sql/view.php\")){\t\t\n\t\t$sql_view=array();\n\t\trequire_once($VWMLDBM['wise_rt'].\"/install/sql/view.php\");\t\n\t}\n\t\n// Remark: during the init_inst, view.php didn't become the part of the array.\n// But second time is okay. So for now let it go.\n//echo \"COUNT SQL_VIEW=\".count($sql_view);\n\n\tfor($i=0;$i<count($wise_table);$i++){ // Views (not tables)\n\t\tif($wise_table[$i]->tb_no==\"\") continue; // skip unnecessary tables\n\t\t$tb_name=get_tb_name($wise_table[$i]->tb_no,$inst);\n\t\tif(type_of_table($DB,$TB_PRE,$tb_name)!='V') continue; // skip Tables (Not views)\n\t\t$view_name=substr($tb_name,strlen($TB_PRE)+1);\n\t\tif($sql_view) $tb_c_order=array_search($view_name,array_keys($sql_view))+$cnt+1;\n\t\t\n\t\tmysqli_query($conn,\"update {$DTB_PRE}vwmldbm_tb set creating_order='$tb_c_order' where name='$tb_name'\");\t\n\t}\n}", "public function reorder()\n {\n $node = $this->page->find($this->request->get('nodeToChangeParent'));\n\n if ($this->request->get('parent') === '#') {\n $node->makeRoot();\n $this->changeSiblingsPositions($node, $this->request->get('position'));\n } else {\n $parent = $this->page->find($this->request->get('parent'));\n $node->makeChildOf($parent);\n $this->changeSiblingsPositions($node, $this->request->get('position'));\n }\n\n return [\n 'Position changed' => true,\n ];\n }", "public function reset(): void {\n $this->node = $this->dfa->getStartNode();\n $this->errorState = false;\n $this->finalState = $this->dfa->isFinal($this->node);\n }", "public function cleanUp()\n\t{\n\t\tif (file_exists(__DIR__ . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'elements-tree.php')) {\n\t\t\tinclude(__DIR__ . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'elements-tree.php');\n\t\t\tif (!isset($elements) or !is_array($elements))\n\t\t\t\treturn;\n\n\t\t\t$db = \\Model\\Db\\Db::getConnection();\n\n\t\t\tforeach ($elements as $el => $elData) {\n\t\t\t\tif (!$elData['table'])\n\t\t\t\t\tcontinue;\n\n\t\t\t\tif ($elData['order_by'] and $elData['order_by']['custom']) {\n\t\t\t\t\t$qryOrderBy = [];\n\t\t\t\t\tforeach ($elData['order_by']['depending_on'] as $field)\n\t\t\t\t\t\t$qryOrderBy[] = $field;\n\t\t\t\t\t$qryOrderBy[] = $elData['order_by']['field'];\n\n\t\t\t\t\t$righe = $db->selectAll($elData['table'], [], [\n\t\t\t\t\t\t'order_by' => $qryOrderBy,\n\t\t\t\t\t\t'stream' => true,\n\t\t\t\t\t]);\n\n\t\t\t\t\t$lastParent = null;\n\t\t\t\t\t$currentOrder = 0;\n\t\t\t\t\tforeach ($righe as $r) {\n\t\t\t\t\t\t$parentString = [];\n\t\t\t\t\t\tforeach ($elData['order_by']['depending_on'] as $field)\n\t\t\t\t\t\t\t$parentString[] = $r[$field];\n\t\t\t\t\t\t$parentString = implode(',', $parentString);\n\t\t\t\t\t\tif ($parentString and $parentString !== $lastParent) {\n\t\t\t\t\t\t\t$lastParent = $parentString;\n\t\t\t\t\t\t\t$currentOrder = 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$currentOrder++;\n\n\t\t\t\t\t\tif ($r[$elData['order_by']['field']] != $currentOrder) {\n\t\t\t\t\t\t\t$db->update($elData['table'], $r[$elData['primary']], [\n\t\t\t\t\t\t\t\t$elData['order_by']['field'] => $currentOrder,\n\t\t\t\t\t\t\t]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function mktree_ops(array &$ops, replica $r, $parent_id, $depth=2, $max_depth=12) {\n if($depth > $max_depth) {\n return;\n }\n for($i=0; $i < 2; $i++) {\n $name = sprintf( \"%s\", $i == 0 ? 'a' : 'b' );\n $ops[] = new op_move($r->tick(), $parent_id, $name, $child_id = new_id());\n mktree_ops($ops, $r, $child_id, $depth+1, $max_depth);\n }\n}", "public function networkPrune()\n {\n return $this->postJson(\n $this->uri->expand(\n 'networks/prune',\n array()\n ),\n array()\n )->then(array($this->parser, 'expectJson'));\n }", "public function reset(): void\n {\n $this->level = 0;\n $this->statements = [];\n }", "final function resetDpLiving()\n {\n $this->resetDpNpc();\n }", "protected function rebuild()\n {\n $this->cleanCaches();\n $mi = new ModuleInstaller();\n $mi->silent = true;\n $mi->rebuild_modules();\n }", "public function recover(): void\n {\n $this->_table->getConnection()->transactional(function (): void {\n $this->_recoverTree();\n });\n }", "function cognitivefactory_tree_updateordering($cognitivefactoryid, $groupid, $userid, $id, $istree) {\n\n // getting ordering value of the current node\n global $CFG, $DB;\n\n $res = $DB->get_record('cognitivefactory_opdata', array('id' => $id));\n if (!$res) return;\n\n $accessClause = cognitivefactory_get_accessclauses($userid, $groupid);\n $treeClause = ($istree) ? \" AND itemdest = {$res->itemdest} \" : '';\n\n // getting subsequent nodes that have same father\n $sql = \"\n SELECT \n id \n FROM \n {cognitivefactory_opdata} AS od\n WHERE \n cognitivefactoryid = {$cognitivefactoryid} AND\n operatorid = 'hierarchize' AND\n intvalue > {$res->intvalue}\n {$treeClause}\n {$accessClause}\n ORDER BY \n intvalue\n \";\n\n // reordering subsequent nodes using an object\n if ( $nextsubs = $DB->get_record_sql($sql)) {\n $ordering = $res->intvalue + 1;\n foreach ($nextsubs as $asub) {\n $opdata = new StdClass();\n $opdata->id = $asub->id;\n $opdata->intvalue = $ordering;\n $DB->update_record('cognitivefactory_opdata', $opdata);\n $ordering++;\n }\n }\n}", "public function rebuild_tree($left = 1, $target = NULL)\n {\n // check if using target or self as root and load if not loaded\n if (is_null($target) AND ! $this->loaded)\n {\n return FALSE;\n }\n elseif (is_null($target))\n {\n $target = $this;\n }\n\n if ( ! $target->loaded)\n {\n $target = $this->factory_item($target);\n }\n\n // Use the current node left value for entire tree\n if (is_null($left))\n {\n $left = $target->left;\n }\n\n $target->lock();\n $right = $left + 1;\n $children = $target->children();\n\n foreach ($children as $child)\n {\n $right = $child->rebuild_tree($right);\n }\n\n $target->left = $left;\n $target->right = $right;\n $target->save();\n $target->unlock();\n\n return $right + 1;\n }", "public function tree_preview_changes($changes) {\n global $db;\n\n // Kompletten baum in den cache laden\n $this->tree_cache_elements();\n // Änderungen vorcachen\n foreach ($changes as $id => $data) {\n if (isset($this->cache_nodes[$id])) {\n $this->cache_nodes[$id] = array_merge($this->cache_nodes[$id], $data);\n } else {\n // New node\n $this->cache_nodes[$id] = $data;\n }\n }\n\n $root = $this->tree_get_parent();\n $node = $this->element_read($root);\n if (!$root) {\n // Root-Knoten nicht gefunden\n $this->error = \"ERR_ROOT_NOT_FOUND\";\n return false;\n }\n $nestedset_ar = array();\n $nestedset_ar[] = array(\n \t\t\"id\" \t\t=> $root,\n \t\t\"title\"\t\t=> $node[\"V1\"],\n \t\t\"childs\"\t=> $this->node_create_nestedset_cached($root)\n );\n\n $nestedset = array();\n // $nestedset_ar als Nested-Set nach -> $nestedset\n $this->tree_create_nestedset_from_array($nestedset_ar, $nestedset);\n if (!$this->tree_check_nestedset($nestedset)) {\n $this->error = \"ERR_BROKEN_TREE\";\n return false;\n }\n return $this->tree_get($nestedset);\n }", "private function eval_treeview()\n {\n static $bool_drsFirstPrompt = true;\n\n // LOOP each filter\n foreach ( ( array ) $this->conf_view[ 'filter.' ] as $table => $fields )\n {\n // CONTINUE : table hasn't any dot\n if ( rtrim( $table, '.' ) == $table )\n {\n continue;\n }\n // CONTINUE : table hasn't any dot\n\n foreach ( array_keys( ( array ) $fields ) as $field )\n {\n // CONTINUE : field has an dot\n if ( rtrim( $field, '.' ) != $field )\n {\n continue;\n }\n // CONTINUE : field has an dot\n // Class var table.field\n $tableField = $table . $field;\n\n $conf_view = $this->conf_view;\n $cObj_name = $conf_view[ 'filter.' ][ $table ][ $field . '.' ][ 'treeview.' ][ 'enabled' ];\n $cObj_conf = $conf_view[ 'filter.' ][ $table ][ $field . '.' ][ 'treeview.' ][ 'enabled.' ];\n $treeviewEnabled = $this->pObj->cObj->cObjGetSingle( $cObj_name, $cObj_conf );\n\n // CONTINUE : field has an dot\n if ( !$treeviewEnabled )\n {\n continue;\n }\n // CONTINUE : field has an dot\n // DRS\n if ( $this->pObj->b_drs_warn )\n {\n if ( $bool_drsFirstPrompt )\n {\n $prompt = 'DON\\'T USE AJAX: The treeview of ' . $tableField . ' is enabled. ' .\n 'You will get unexpected effects!';\n t3lib_div :: devLog( '[WARN/FILTER] ' . $prompt, $this->pObj->extKey, 2 );\n $bool_drsFirstPrompt = false;\n }\n }\n // DRS\n // #i0117, 141223, dwildt, 1+\n $this->treeviewTableFields[] = $tableField;\n\n switch ( $this->conf_view[ 'filter.' ][ $table ][ $field ] )\n {\n case( 'CATEGORY_MENU' ):\n $this->eval_treeviewCategoryMenu( $tableField );\n break;\n case( 'TREEVIEW' ):\n $this->eval_treeviewCheckbox( $tableField );\n // #43692, 121206, dwildt, 13+\n // Adding jQuery\n $bool_success_jQuery = $this->pObj->objJss->load_jQuery();\n if ( $bool_success_jQuery )\n {\n if ( $this->pObj->b_drs_javascript )\n {\n $prompt = 'Current filter is a treeview.';\n t3lib_div::devlog( '[INFO/JSS] ' . $prompt, $this->pObj->extKey, 0 );\n $prompt = 'jQuery will be loaded.';\n t3lib_div::devlog( '[INFO/JSS] ' . $prompt, $this->pObj->extKey, 0 );\n }\n }\n // Adding jQuery\n // #43692, 121206, dwildt, 13+\n break;\n default:\n $header = 'Evaluation of treeview filter failed!';\n $text = '' . $tableField . ' is configured as ' . $this->conf_view[ 'filter.' ][ $table ][ $field ] . '\n <br />\n But ' . $tableField . '.treeview.enabled is true. This isn\\'t proper.\n <br />\n Please take care of a proper TypoScript configuration.<br />\n Remove ' . $tableField . '.treeview.enabled or set it to false.';\n $this->pObj->drs_die( $header, $text );\n break;\n }\n }\n }\n // LOOP each filter\n\n return;\n }" ]
[ "0.60080266", "0.56274223", "0.5486264", "0.54171586", "0.53880537", "0.5298186", "0.5275199", "0.52409387", "0.51710075", "0.5131758", "0.51309633", "0.5115454", "0.51113147", "0.5085477", "0.50829095", "0.5061777", "0.50433534", "0.5042315", "0.5038402", "0.5030509", "0.5021052", "0.49822104", "0.49767187", "0.49671724", "0.49483812", "0.49264535", "0.49219477", "0.48343953", "0.48273307", "0.48273307", "0.48138082", "0.47998708", "0.4777493", "0.47647116", "0.47562546", "0.4723171", "0.47090372", "0.4700485", "0.4690662", "0.4686887", "0.4682901", "0.46692944", "0.46644676", "0.46487808", "0.46432033", "0.46367815", "0.46358904", "0.4635812", "0.462818", "0.46175253", "0.46053678", "0.4599926", "0.45997664", "0.45956632", "0.4584488", "0.45732203", "0.4566312", "0.45662084", "0.4557132", "0.45553133", "0.45509332", "0.45472828", "0.45382234", "0.45357615", "0.4530133", "0.45233876", "0.4522503", "0.45170206", "0.45071056", "0.45039913", "0.4501027", "0.44994423", "0.4497436", "0.44889054", "0.4485589", "0.44853327", "0.44786373", "0.44674447", "0.44644317", "0.445529", "0.4451783", "0.44467548", "0.44448608", "0.4435611", "0.44231707", "0.442048", "0.4417921", "0.4414899", "0.44056845", "0.44007614", "0.4399307", "0.43929374", "0.4391828", "0.4391715", "0.43869776", "0.43867716", "0.43858197", "0.43824732", "0.43757972", "0.43693706" ]
0.7536038
0
Moves an existing list item to a new position. The position is in front of the item with the ID given in $ref or at the end of the list if $ref is null. // item ID list in database: 1, 2, 3, 4 $listManager>moveItem( 2, 4 ); // result: 1, 3, 2, 4 // item ID list in database: 1, 2, 3, 4 $listManager>moveItem( 2, null ); // result: 1, 3, 4, 2 The method updates the position of the record with the given ID in $id and of all records afterwards. The gap left behind by the moved record is closed automatically. To retrive the items according to the new positions, you have to sort them by the '.lists.position' key: $search = $listManager>createSearch(); $search>setSortations( array( $search>sort( '+', 'product.lists.position' ) ) ); $result = $listManager>searchItems( $search );
Перемещает существующий элемент списка в новое положение. Положение находится перед элементом с указанным идентификатором в $ref или в конце списка, если $ref равно null. // список идентификаторов элементов в базе данных: 1, 2, 3, 4 $listManager>moveItem( 2, 4 ); // результат: 1, 3, 2, 4 // список идентификаторов элементов в базе данных: 1, 2, 3, 4 $listManager>moveItem( 2, null ); // результат: 1, 3, 4, 2 Метод обновляет положение записи с указанным идентификатором в $id и всех последующих записей. Пробел, оставленный перемещенной записью, автоматически заполняется. Чтобы получить элементы в соответствии с новыми положениями, необходимо отсортировать их по ключу '.lists.position': $search = $listManager>createSearch(); $search>setSortations( array( $search>sort( '+', 'product.lists.position' ) ) ); $result = $listManager>searchItems( $search );
public function moveItem( $id, $ref = null );
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function moveItemAt($currentPosition, $newPosition = 0);", "public function moveItem(Item $item, int $position): Item;", "public function move($id) {\n $item = $this->getItem($id);\n $table_name = \"items\";\n $connection = db_connect();\n if ($connection->connect_error) {\n die(\"Connection failed: \" . $connection->connect_error);\n }\n //prepare statement\n if (!($sql = $connection->prepare(\"UPDATE $table_name SET category=? WHERE id=?\"))) {\n echo \"Prepare failed: (\" . $mysqli->errno . \") \" . $mysqli->error;\n }\n $current = $item->getCategory();\n $new = $current + 1;\n //bind variables\n if (!($sql->bind_param(\"ii\", $new, $id))) {\n echo \"Binding parameters failed: (\" . $sql->errno . \") \" . $sql->error;\n }\n //run query\n if (!$sql->execute()) {\n echo \"Execute failed: (\" . $sql->errno . \") \" . $sql->error;\n }\n //close\n $sql->close();\n }", "function reorderItem($db, $resource_pk, $item_pk, $new_pos) {\r\n\r\n $item = getItem($db, $resource_pk, $item_pk);\r\n\r\n $ok = !empty($item->item_pk);\r\n if ($ok) {\r\n $old_pos = $item->sequence;\r\n $ok = ($old_pos != $new_pos);\r\n }\r\n if ($ok) {\r\n $prefix = DB_TABLENAME_PREFIX;\r\n if ($new_pos <= 0) {\r\n $sql = <<< EOD\r\nUPDATE {$prefix}item\r\nSET sequence = sequence - 1\r\nWHERE (resource_link_pk = :resource_pk) AND (sequence > :old_pos)\r\nEOD;\r\n } else if ($old_pos < $new_pos) {\r\n $sql = <<< EOD\r\nUPDATE {$prefix}item\r\nSET sequence = sequence - 1\r\nWHERE (resource_link_pk = :resource_pk) AND (sequence > :old_pos) AND (sequence <= :new_pos)\r\nEOD;\r\n } else {\r\n $sql = <<< EOD\r\nUPDATE {$prefix}item\r\nSET sequence = sequence + 1\r\nWHERE (resource_link_pk = :resource_pk) AND (sequence < :old_pos) AND (sequence >= :new_pos)\r\nEOD;\r\n }\r\n\r\n $query = $db->prepare($sql);\r\n $query->bindValue('resource_pk', $resource_pk, PDO::PARAM_INT);\r\n $query->bindValue('old_pos', $old_pos, PDO::PARAM_INT);\r\n if ($new_pos > 0) {\r\n $query->bindValue('new_pos', $new_pos, PDO::PARAM_INT);\r\n }\r\n\r\n $ok = $query->execute();\r\n\r\n if ($ok && ($new_pos > 0)) {\r\n $item->sequence = $new_pos;\r\n $ok = saveItem($db, $resource_pk, $item);\r\n }\r\n\r\n }\r\n\r\n return $ok;\r\n\r\n }", "function Move(){\n //--get request values\n $move_library = $this->Request->Value(\"move_library\");\n $item_id = $this->Request->Value(\"item_id\");\n $move_id = $this->Request->Value(\"move_id\");\n\n if (intval($move_id) == 0)\n return false;\n //--get move config file and move storage object\n $move_config = Engine::getLibrary($this->Kernel, $move_library, \"move_library_config_\" . $this->move_library);\n $move_Storage = DataFactory::GetStorage($this, $move_config->GetItem(\"MAIN\", \"TABLE\"));\n\n //--get move field\n if ($move_config->HasItem(\"MAIN\", \"MOVE_FIELD\")) {\n $move_field = $move_config->GetItem(\"MAIN\", \"MOVE_FIELD\");\n }\n else {\n if ($move_Storage->HasColumn(\"_priority\") !== false) {\n $move_field = \"_priority\";\n }\n else {\n $inc_column = $move_Storage->GetIncrementalColumn();\n $move_field = $inc_column[\"name\"];\n }\n }\n\n //get key field\n $inc_column = $move_Storage->GetIncrementalColumn();\n $key_field = $inc_column[\"name\"];\n //get current item\n $item = $move_Storage->Get(array(\n $key_field => $item_id));\n $move_item = $move_Storage->Get(array($key_field => $move_id));\n\n //--if near item not found\n if (intval($move_item[$key_field]) == 0) {\n return false;\n }\n\n if ($move_field != $key_field) { //-- change records (if priority field not a key field)\n $upd_array = array(\n $key_field => $item[$key_field] ,\n $move_field => $move_item[$move_field]);\n\n $move_Storage->Update($upd_array);\n $upd_array = array(\n $key_field => $move_item[$key_field] ,\n $move_field => $item[$move_field]);\n $move_Storage->Update($upd_array);\n }\n else { //-- change records (if priority field is a key field)\n $move_Storage->exchangeIncrementals($item_id, $move_id);\n\n //--check if library have a sub-categories\n if ($move_config->HasItem(\"MAIN\", \"USE_SUB_CATEGORIES\")) {\n $use_sub_categories = $move_config->GetItem(\"MAIN\", \"USE_SUB_CATEGORIES\");\n }\n else {\n $use_sub_categories = false;\n }\n\n //--if library use subcategories\n if ($use_sub_categories) {\n $sub_categories_count = $move_config->GetItem(\"MAIN\", \"SUB_CATEGORIES_COUNT\");\n for ($i = 0; $i < sizeof($sub_categories_count); $i ++) {\n $library = $move_config->GetItem(\"sub_category_\" . $i, \"APPLY_LIBRARY\");\n $link_field = $move_config->GetItem(\"sub_category_\" . $i, \"LINK_FIELD\");\n $sub_listSettings = Engine::getLibrary($this->Kernel, $library, \"sub_ListSettings_\" . $library);\n $sub_table = $sub_listSettings->GetItem(\"MAIN\", \"TABLE\");\n $this->Kernel->ImportClass(\"data.\" . strtolower($sub_table), $sub_table);\n $sub_Storage = new $sub_table($this->Kernel->Connection, $this->Kernel->Settings->GetItem(\"database\", $sub_table));\n $_sub_column = $sub_Storage->getIncrementalColumn();\n\n $upd_array1 = array();\n $upd_array2 = array();\n\n //move first record subitems\n $_list = $sub_Storage->GetList(array(\n $key_field => $item_id));\n if ($_list->RecordCount != 0) {\n while ($_sub_item = $_list->Read())\n $upd_array1[] = $_sub_item[$_sub_column[\"name\"]];\n }\n\n //move second record subitems\n $_list = $sub_Storage->GetList(array(\n $key_field => $move_id));\n if ($_list->RecordCount != 0) {\n while ($_sub_item = $_list->Read())\n $upd_array2[] = $_sub_item[$_sub_column[\"name\"]];\n }\n }\n //--move group for second and first record\n if (count($upd_array1))\n $sub_Storage->GroupUpdate($_sub_column[\"name\"], $upd_array1, array(\n $key_field => $move_id));\n if (count($upd_array2))\n $sub_Storage->GroupUpdate($_sub_column[\"name\"], $upd_array2, array(\n $key_field => $item_id));\n\n }\n\n //check if library is multiple\n if ($move_config->HasItem(\"MAIN\", \"IS_MULTILEVEL\")) {\n $is_multilevel = $move_config->GetItem(\"MAIN\", \"IS_MULTILEVEL\");\n if ($is_multilevel) {\n $parent_field = $move_config->GetItem(\"MAIN\", \"PARENT_FIELD\");\n $upd_array1 = array();\n $upd_array2 = array();\n //move first record childs\n $_list = $move_Storage->GetList(array(\n $parent_field => $item_id));\n if ($_list->RecordCount != 0) {\n while ($_sub_item = $_list->Read())\n $upd_array1[] = $_sub_item[$key_field];\n }\n\n //move second record childs\n $_list = $move_Storage->GetList(array(\n $parent_field => $move_id));\n if ($_list->RecordCount != 0) {\n while ($_sub_item = $_list->Read())\n $upd_array2[] = $_sub_item[$key_field];\n }\n if (count($upd_array1))\n $move_Storage->GroupUpdate($key_field, $upd_array1, array(\n $parent_field => $move_id));\n if (count($upd_array2))\n $move_Storage->GroupUpdate($key_field, $upd_array2, array(\n $parent_field => $item_id));\n }\n }\n return true;\n }\n\n }", "function wpcf_custom_types_menu_order_move( &$menu, $item_move, $item_target ) {\n\n // if item move comes after target we have to select the next element,\n // otherwise the $item_move would be added before the target.\n if( $item_move > $item_target )\n $item_target++;\n\n // if $item_target is the last menu item, place $item_move to the end of the array\n if( !isset( $menu[$item_target]) ) {\n $tmp_menu_item = $menu[$item_move];\n unset( $menu[$item_move] );\n $menu[] = $tmp_menu_item;\n\n // $item_target is not the last menu, place $item_move after it\n } else {\n $cut_moving_element = array_splice( $menu, $item_move, 1 );\n array_splice( $menu, $item_target, 0, $cut_moving_element );\n }\n\n}", "function moveItemUp()\r\n\t{\r\n\t\t$this->content_obj->moveItemUp();\r\n\t\t$_SESSION[\"il_pg_error\"] = $this->pg_obj->update();\r\n\t\t$this->ctrl->returnToParent($this, \"jump\".$this->hier_id);\r\n\t}", "public abstract function moveToNext($referenceId = null);", "abstract public function moveLeft($id);", "public function moveAction(){\r\n // get variables from request\r\n $query = $this->getRequest()->getQuery()->toArray();\r\n $blockId = $query['block_id'];\r\n $navId = $query['id'];\r\n $position = $query['position'];\r\n // get navigation block model\r\n $navBlockModel = $this->getServiceLocator()->get('DotsNavBlock\\Db\\Model\\NavigationBlock');\r\n // get an instance of the item that changes position and set the new position\r\n $nav = $navBlockModel->getById($navId);\r\n $nav->position = $position;\r\n // get all other items from the navigation\r\n $items = $navBlockModel->getAllByColumnsOrderByPosition(array(\r\n 'block_id = ?' => $blockId,\r\n 'id != ?' => $navId\r\n ));\r\n\r\n // update positions for all items\r\n $pos = 1;\r\n if ($items){\r\n foreach ($items as $itm){\r\n if ($pos==$position){\r\n $pos++;\r\n }\r\n $itm->position = $pos++;\r\n $navBlockModel->persist($itm);\r\n }\r\n }\r\n $navBlockModel->persist($nav);\r\n // save everything in the DB\r\n $navBlockModel->flush();\r\n\r\n return $this->jsonResponse(array('success' => true));\r\n }", "public static function move($itemid, $new_catid) {\n global $manager;\n\n $itemid = intval($itemid);\n $new_catid = intval($new_catid);\n\n $new_blogid = getBlogIDFromCatID($new_catid);\n\n $param = array(\n 'itemid' => $itemid,\n 'destblogid' => $new_blogid,\n 'destcatid' => $new_catid\n );\n $manager->notify('PreMoveItem', $param);\n\n\n // update item table\n $query = 'UPDATE '.sql_table('item').\" SET iblog=$new_blogid, icat=$new_catid WHERE inumber=$itemid\";\n sql_query($query);\n\n // update comments\n $query = 'UPDATE '.sql_table('comment').\" SET cblog=\" . $new_blogid.\" WHERE citem=\" . $itemid;\n sql_query($query);\n\n $param = array(\n 'itemid' => $itemid,\n 'destblogid' => $new_blogid,\n 'destcatid' => $new_catid\n );\n $manager->notify('PostMoveItem', $param);\n }", "function MoveListItem($udListDefinitionId, $listItemId, $direction)\n\t{\n\t\t$result = $this->sendRequest(\"MoveListItem\", array(\"UdListDefinitionId\"=>$udListDefinitionId, \"ListItemId\"=>$listItemId, \"Direction\"=>$direction));\t\n\t\treturn $this->getResultFromResponse($result, true);\n\t}", "function moveItemDown()\r\n\t{\r\n\t\t$this->content_obj->moveItemDown();\r\n\t\t$_SESSION[\"il_pg_error\"] = $this->pg_obj->update();\r\n\t\t$this->ctrl->returnToParent($this, \"jump\".$this->hier_id);\r\n\t}", "function OnMoveUp(){\n $this->Move();\n $message = \"&MESSAGE=MSG_ITEM_MOVED\";\n $this->AfterSubmitRedirect(\"?\".($this->Package!=\"\" ? \"package=\".$this->Package.\"&\" : \"\").\"page=\" . $this->listHandler . \"&\" . $this->library_ID . \"_start=\" . $this->start . \"&\" . $this->library_ID . \"_order_by=\" . $this->order_by . \"&library=\" . $this->library_ID . \"&\" . $this->library_ID . \"_parent_id=\" . $this->parent_id . \"\" . $message . \"\" . \"&\" . str_replace(\"&amp;\", \"&\", rawurldecode($this->restore)));\n }", "public function move() {\n\t\t\tif (!empty($this->params['pass'][0]) && !empty($this->params['pass'][1])) {\n\t\t\t\t/* Get move direction and id of menu item */\n\t\t\t\t$moveDir = Sanitize::escape($this->params['pass'][0]);\n\t\t\t\t$this->menuId = Sanitize::escape($this->params['pass'][1]);\n\t\t\t\t\n\t\t\t\t/* Move menu item up oder down */\n\t\t\t\tif ($moveDir == 'up') {\n\t\t\t\t\t$this->MyMenu->moveup($this->menuId, 1);\n\t\t\t\t} else if ($moveDir == 'down') {\n\t\t\t\t\t$this->MyMenu->movedown($this->menuId, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t/* Get list of menu items */\n\t\t\t$this->menuList = $this->getThreadedList();\n\t\t\t$this->set('menuList', $this->menuList);\n\t\t\t\n\t\t\t$this->render('list');\n\t\t}", "public function move($id)\n\t{\n\t\t$itemId = $this->wishlist->item($id)->get('id');\n\n\t\t$this->delete($id);\n\n\t\treturn Redirect::to(\"cart/$itemId/add\");\n\t}", "public static function move($field_id, $field_move, $field_type)\n\t{\t\t\n\t\t$sql = 'SELECT pf_order\n\t\t\t\tFROM ' . SQL_PREFIX . 'profil_fields\n\t\t\t\tWHERE pf_id = ' . $field_id . '\n\t\t\t\t\tAND pf_type = ' . $field_type;\n\t\t$pf_order = Fsb::$db->get($sql, 'pf_order');\n\t\t\n\t\t$move = intval($pf_order) + $field_move;\n\t\t$sql = 'SELECT pf_order, pf_id\n\t\t\t\tFROM ' . SQL_PREFIX . 'profil_fields\n\t\t\t\tWHERE pf_order = ' . $move . '\n\t\t\t\t\tAND pf_type = ' . $field_type;\n\t\t$result = Fsb::$db->query($sql);\n\t\t$dest = Fsb::$db->row($result);\n\t\tFsb::$db->free($result);\n\t\t\n\t\tif ($dest)\n\t\t{\n\t\t\tFsb::$db->update('profil_fields', array(\n\t\t\t\t'pf_order' =>\t$dest['pf_order'],\n\t\t\t), 'WHERE pf_id = ' . $field_id);\n\t\t\t\n\t\t\tFsb::$db->update('profil_fields', array(\n\t\t\t\t'pf_order' =>\t$pf_order,\n\t\t\t), 'WHERE pf_id = ' . $dest['pf_id']);\n\t\t}\n\t}", "public function moveItemAt($currentPosition, $newPosition = 0)\n {\n // @todo Implement usort() method with TCEforms in mind\n throw new \\RuntimeException('This method is not yet supported.', 1322545626);\n }", "function OnMoveDown(){\n $this->Move();\n $message = \"&MESSAGE=MSG_ITEM_MOVED\";\n $this->AfterSubmitRedirect(\"?\".($this->Package!=\"\" ? \"package=\".$this->Package.\"&\" : \"\").\"page=\" . $this->listHandler . \"&\" . $this->library_ID . \"_start=\" . $this->start . \"&\" . $this->library_ID . \"_order_by=\" . $this->order_by . \"&library=\" . $this->library_ID . \"&\" . $this->library_ID . \"_parent_id=\" . $this->parent_id . \"\" . $message . \"\" . \"&\" . str_replace(\"&amp;\", \"&\", rawurldecode($this->restore)));\n }", "abstract public function moveRight($id);", "function moveTo($list,$indexToMove,$toList){\r\n\t\tif($toList==null) $toList=new LinkedList();\r\n\t\tif($toList->searchObject($list->getIndex($indexToMove))) return false; //Metoda nie przeniesie objektu jeśli miałby on kolidować z innym objektem o tej samej wartości\r\n\t\t\t$movingObject=$list->getIndex($indexToMove);\r\n\t\t\t$list->deleteIndex($indexToMove);\t\t\r\n\t\t\t$toList->insertLastObj($movingObject);\r\n\t\treturn true;\t\r\n\t}", "abstract public function moveCard(int $card_id, string $location, int $location_arg = 0);", "public function orderedMove() {\n\t\t$modelName = $this->Controller->modelClass;\n\t\t$this->Controller->{$modelName}->transaction();\n\n\t\tif (!$this->Controller->{$modelName}->Behaviors->attached('Sequence')) {\n\t\t\t$this->Controller->notice(\n\t\t\t\t__d('infinitas', 'A problem occured moving the ordered record.'),\n\t\t\t\tarray(\n\t\t\t\t\t'level' => 'error',\n\t\t\t\t\t'redirect' => true\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\t$fields = array_values($this->Controller->{$modelName}->sequenceGroupFields());\n\t\t$fields[] = $this->Controller->{$modelName}->alias . '.' . $this->Controller->{$modelName}->primaryKey;\n\t\t$data = $this->Controller->{$modelName}->find('first', array(\n\t\t\t'fields' => $fields,\n\t\t\t'conditions' => array(\n\t\t\t\t$this->Controller->{$modelName}->alias . '.' . $this->Controller->{$modelName}->primaryKey => $this->Controller->request->data[$modelName][$this->Controller->{$modelName}->primaryKey]\n\t\t\t),\n\t\t\t'callbacks' => false\n\t\t));\n\t\t$data[$modelName]['ordering'] = $this->Controller->request->params['named']['position'];\n\n\t\ttry {\n\t\t\tif ($this->Controller->{$modelName}->save($data, array('validate' => false))) {\n\t\t\t\t$this->Controller->{$modelName}->transaction(true);\n\t\t\t\t$this->Controller->notice(\n\t\t\t\t\t__d('infinitas', 'The record was moved'),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'redirect' => ''\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t} catch(Exception $e) {\n\t\t\t$this->Controller->{$modelName}->transaction(false);\n\t\t\t$this->Controller->notice(\n\t\t\t\t$e->getMessage(),\n\t\t\t\tarray(\n\t\t\t\t\t'level' => 'error',\n\t\t\t\t\t'redirect' => false\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "public function test_move_item(): void\n {\n // Arrange\n $user = UserFactory::createOne()->object();\n $collectionLevel1 = CollectionFactory::createOne(['owner' => $user]);\n $collectionLevel2 = CollectionFactory::createOne(['parent' => $collectionLevel1, 'owner' => $user]);\n $collectionLevel3 = CollectionFactory::createOne(['parent' => $collectionLevel2, 'owner' => $user]);\n $item = ItemFactory::createOne(['collection' => $collectionLevel3, 'owner' => $user]);\n\n // Act\n $newCollection = CollectionFactory::createOne(['owner' => $user]);\n $item->setCollection($newCollection->object());\n $item->save();\n\n $this->refreshCachedValuesQueue->process();\n\n // Assert\n $this->assertSame(1, $newCollection->getCachedValues()['counters']['items']);\n $this->assertSame(0, $collectionLevel1->getCachedValues()['counters']['items']);\n $this->assertSame(0, $collectionLevel2->getCachedValues()['counters']['items']);\n $this->assertSame(0, $collectionLevel3->getCachedValues()['counters']['items']);\n }", "public static function moveItem($id, $direction, $rubriek, $isTitle)\n\t{\n\t\t// veronderstelling : het sortnr is van 1 tot x genummerd - geordend per rubriek (title) voor elk type\n\t\t// haal nu alles op van de desbetreffende rubriek geordend per type\n\t\t\n\t\t// Haal het item met deze id\n\t\t// bewaar het sortnr --> sortnrDitItem\n\t\t\n\t\t$ditItem = Document::find($id);\n\t\t\n\t\t$sortnrDitItem = $ditItem->sortnr;\n\t\t$ditItemTitel = $ditItem->title;\n\t\t\n\t\t\n\t\t// Als direction == up\n\t\tif ($direction == 'up')\n\t\t{\n\t\t\t\t\n\t\t\t// Als sortnr == 1 --> return (wijzig niets want het staat al vooraan)\n\t\t\tif ($sortnrDitItem == 1) return;\n\t\t\t// Als isTitle --> \n\t\t\tif ($isTitle == 'yes')\n\t\t\t{\n\t\t\t\t// haal vorige titel ( vooral sortnr vorige belangrijk - en let op : is er wel een vorige?)\n\t\t\t\t// haal eerst vorig item\n\t\t\t\t$vorigSortnr = $sortnrDitItem-1;\n\t\t\t\t$vorigItem = Document::whereRaw('type = ? and sortnr = ?', array($rubriek, $vorigSortnr))->get();\n\t\t\t\n\t\t\t\t\n\t\t\t\t$vorigeTitel = $vorigItem[0]->title;\n\t\t\t\t$hulpsortnr = $vorigSortnr - 1;\n\t\t\t\t$vorigeTitelItem = $vorigItem;\t\n\t\t\t\t\t\t\n\t\t\t\tdo {\n\t\t\t\t\t$zelfdetitel = true;\n\t\t\t\t\tif ($hulpsortnr <= 0) break;\n\t\t\t\t\t$vorigItem = Document::whereRaw('type = ? and sortnr = ?', array($rubriek, $hulpsortnr))->get();\n\t\t\t\t\tif ($vorigItem[0]->title == $vorigeTitel)\n\t\t\t\t\t{\n\t\t\t\t\t\t$vorigeTitelItem = $vorigItem;\n\t\t\t\t\t\t$hulpsortnr--;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$zelfdetitel = false;\n\t\t\t\t\t}\n\t\t\t\t} while ($zelfdetitel);\n\t\t\t\t\n//\t\t\t\tvar_dump($vorigeTitelItem);\n//\t\t\t\tdie(\" vorig item (rubriek = {$rubriek} en sortnr = {$vorigSortnr}) - en $vorigeTitelItem[0]->id\");\n\t\t\t\t// haal volgende titel ( vooral sortnr volgende belangrijk - en let op : is er wel een volgende?)\n\t\t\t\t$maxSortnr = DB::table('documents')->where('type', $rubriek)->max('sortnr');\n\t\t\t\t$huidigeTitel = $ditItem->title;\n\t\t\t\t$hulpsortnr = $sortnrDitItem + 1;\n\t\t\t\t\n\t\t\t\tif ($hulpsortnr > $maxSortnr) $eindeDezeRubriekSortnr = $sortnrDitItem;\n\t\t\t\telse\n\t\t\t\t\tdo{\n\t\t\t\t\t\t$zelfdetitel = true;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($hulpsortnr >= $maxSortnr) break;\n\t\t\t\t\t\n\t\t\t\t\t\t$volgendItem = Document::whereRaw('type = ? and sortnr = ?', array($rubriek, $hulpsortnr))->get();\n\t\t\n\t\t\t\t\t\tif ($volgendItem[0]->title == $huidigeTitel)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$eindeDezeRubriekSortnr = $volgendItem[0]->sortnr;\n\t\t\t\t\t\t\t$hulpsortnr++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$zelfdetitel = false;\n\t\t\t\t\t\t\t$hulpsortnr++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t} while ($zelfdetitel);\n\t\t\t\t\t\n\t\t\t\t// hier is vorige reeks en huidige reeks gekend\t\t\n\t\t\t\t// vorige reeks\n\t\t\t\t$startVorigSortnr = $vorigeTitelItem[0]->sortnr;\n\t\t\t\t$eindeVorigSortnr = $sortnrDitItem - 1;\n\t\t\t\t\t\t\t\t\n\t\t\t\t// maak nu een array van de id's van beide groepen\n\t\t\t\tfor ($i=$startVorigSortnr; $i <= $eindeVorigSortnr; $i++)\n\t\t\t\t{\n\t\t\t\t\t$item = Document::whereRaw('type = ? and sortnr = ?', array($rubriek, $i))->get();\n\t\t\t\t\t$vorige[] = $item[0]->id;\n\t\t\t\t}\n\t\t\t\t// Zoek het einde van deze rubriek\n\t\t\t\t$laatste = Document::whereRaw('type= ? and sortnr = ?', array($rubriek, $sortnrDitItem))->max('sortnr');\n\t\t\t\tprint(\"($rubriek, $id)<br />\");\n\t\t\t\tvar_dump($laatste);die(\"dfdsqfdsf\");\n\t\t\t\t// maak nu de array van de id's van volgende\n\t\t\t\tfor ($i=$sortnrDitItem; $i <= $eindeDezeRubriekSortnr; $i++)\n\t\t\t\t{\n\t\t\t\t\t$item = Document::whereRaw('type = ? and sortnr = ?', array($rubriek, $i))->get();\n\t\t\t\t\t$volgende[] = $item[0]->id;\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t$sortnr = $startVorigSortnr;\n\t\t\t\tforeach($volgende AS $id)\n\t\t\t\t{\n\t\t\t\t\tDB::table('documents')->where('id', $id)->update(array('sortnr'=> $sortnr));\n\t\t\t\t\t$sortnr++;\n\t\t\t\t}\n\t\t\t\tforeach($vorige AS $id)\n\t\t\t\t{\n\t\t\t\t\tDB::table('documents')->where('id', $id)->update(array('sortnr' => $sortnr));\n\t\t\t\t\t$sortnr++;\n\t\t\t\t}\n\n\t\t\t} else { // Anders (als geen isTitle)\n\t\t\t // wissel de huidige met de vorige, als de vorige nog tot deze rubriek behoort \n\t\t\t // het wisselen is enkel de sortnr's wisselen\n\n\t\t\t if ($sortnrDitItem == 1) return;\n\t\t\t $vorigSortnr = $sortnrDitItem - 1;\n\t\t\t $vorigItem = $item = Document::whereRaw('type = ? and sortnr = ?', array($rubriek, $vorigSortnr))->get();\t\t\t\t \n//\t\t\t if ($vorigItem[0]->title != $ditItemTitel) return;\n\t\t\t DB::table('documents')->where('id', $ditItem->id)->update(array('sortnr' => $vorigSortnr));\n\t\t\t DB::table('documents')->where('id', $vorigItem[0]->id)->update(array('sortnr' => $sortnrDitItem));\t\t\n\t\t\t}\n\t\t} else { // Als direction == down\n\t\t\t// Haal het hoogste sortnr op\n\t\t\t$maxSortnr = DB::table('documents')->where('type', $rubriek)->max('sortnr');\n\t\t\t// Als het sortnr van het huidige item == maxSortnr --> return\n\t\t\tif ($sortnrDitItem == $maxSortnr) return;\t\t\t\n\t\t\tif ($isTitle == 'yes')\n\t\t\t{\n\t\t\t\t// is dit de laatste Titel?\n\t\t\t\t$ditItemTitle = $ditItem->title;\n\t\t\t\t$runningSortnr = $sortnrDitItem+1;\n\t\t\t\t$verderdoen = true;\n\t\t\t\t$huidige[] = $ditItem->id;\n\t\t\t\tdo {\n\t\t\t\t\tif ($runningSortnr > $maxSortnr) break;\n\t\t\t\t\telse {\n\t\t\t\t\t\t$item = Document::whereRaw('type = ? and sortnr = ?', array($rubriek, $runningSortnr))->get();\t\t\t\t\t\t\n\t\t\t\t\t\tif ($item[0]->title != $ditItemTitle) break;\n\t\t\t\t\t\t$huidige[] = $item[0]->id;\n\t\t\t\t\t\t$runningSortnr++;\n\t\t\t\t\t}\n\t\t\t\t} while ($verderdoen);\n\t\t\t\tif ($runningSortnr >= $maxSortnr) return;\n\t\t\t\t\n\t\t\t\t// zoek nu de items met volgende titel\n\t\t\t\t$volgendeTitel = $item[0]->title;\n\t\t\t\t$volgende[] = $item[0]->id;\n\t\t\t\t$verderdoen = true;\n\t\t\t\tdo{\n\t\t\t\t\t$runningSortnr++;\n\t\t\t\t\tif ($runningSortnr > $maxSortnr) break;\n\t\t\t\t\t\n\t\t\t\t\t$item = Document::whereRaw('type = ? and sortnr = ?', array($rubriek, $runningSortnr))->get();\n\t\t\t\t\tif ($item[0]->title != $volgendeTitel) break;\n\t\t\t\t\t$volgende[] = $item[0]->id;\n\t\t\t\t} while ($verderdoen);\n\t\t\t\t\n\t\t\t\t// dit is niet de laatste rubriek --> we verwisselen dus\n\t\t\t\t$sortnr = $sortnrDitItem;\n\t\t\t\tforeach($volgende AS $id)\n\t\t\t\t{\n\t\t\t\t\tDB::table('documents')->where('id', $id)->update(array('sortnr' => $sortnr));\n\t\t\t\t\t$sortnr++;\n\t\t\t\t}\n\t\t\t\tforeach($huidige AS $id)\n\t\t\t\t{\n\t\t\t\t\tDB::table('documents')->where('id', $id)->update(array('sortnr' => $sortnr));\n\t\t\t\t\t$sortnr++;\n\t\t\t\t}\n\t\t\t\t\t\t\t\n\n\t\t\t} else {\n\t\t\t\t// Hier moeten we gewoon deze verwisselen met de volgende - let op als je aan het einde van deze rubriek bent!\n\t\t\t\t$maxSortnr = DB::table('documents')->where('type', $rubriek)->max('sortnr');\n\t\t\t\t$volgendSortnr = $sortnrDitItem +1;\n\t\t\t\tif ($volgendSortnr > $maxSortnr) return;\n\t\t\t\t$volgendItem = $item = Document::whereRaw('type = ? and sortnr = ?', array($rubriek, $volgendSortnr))->get();\n//\t\t\t\tif ($volgendItem[0]->title != $ditItemTitel) return;\n\t\t\t DB::table('documents')->where('id', $ditItem->id)->update(array('sortnr' => $volgendSortnr));\n\t\t\t DB::table('documents')->where('id', $volgendItem[0]->id)->update(array('sortnr' => $sortnrDitItem));\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "public function moveAction(Request $request, Context $context, EditToken $token, LayoutInterface $layout, int $containerId, int $itemId, int $newPosition)\n {\n $this->ensureLayout($token, $layout);\n\n $container = $layout->findContainer($containerId);\n $parent = $layout->findContainerOf($itemId);\n $item = null;\n $position = null;\n\n if ($containerId) {\n $container = $layout->findContainer($containerId);\n } else {\n $container = $layout->getTopLevelContainer();\n }\n\n /** @var \\MakinaCorpus\\Layout\\Grid\\ItemInterface $item */\n foreach ($parent->getAllItems() as $index => $child) {\n if ($child->getStorageId() == $itemId) {\n $item = $child;\n $position = $index;\n break;\n }\n }\n\n if ($item instanceof ColumnContainer) {\n throw new GenericError(\"you cannot move a column\");\n }\n if (!$parent instanceof TopLevelContainer && !$parent instanceof ColumnContainer) {\n // @codeCoverageIgnoreStart\n // This is an impossible use case with non-broken data\n throw new GenericError(\"you cannot move items from a non-vertical container\");\n // @codeCoverageIgnoreEnd\n }\n if (!$container instanceof TopLevelContainer && !$container instanceof ColumnContainer) {\n throw new GenericError(\"you cannot move items into a non-vertical container\");\n }\n\n $parent->removeAt($position);\n $container->addAt($item, $newPosition);\n $item->toggleUpdateStatus(true);\n\n $context->getTokenStorage()->update($token->getToken(), $layout);\n\n $this->prepareResponse($request, $context, $token);\n\n return $this->handleResponse($request, ['success' => true, 'output' => $this->renderer->renderItemIn($item, $container, $newPosition)]);\n }", "public function move($itemId, $toWarehouseId, $qty)\n {\n $stockClass = config('mojito.stockClass', 'Stock');\n $pivotFrom = $stockClass::where('warehouse_id', '=', $this->id)->where('item_id', '=', $itemId)->first();\n if ($pivotFrom == null) {\n return null;\n }\n\n $pivotTo = $stockClass::where('warehouse_id', '=', $toWarehouseId)->where('item_id', '=', $itemId)->first();\n\n if ($pivotTo != null) {\n $destQty = Unit::convert($qty, $pivotFrom->unit_id, $pivotTo->unit_id);\n } else {\n $destQty = $qty;\n }\n\n if ($pivotTo == null) {\n $stockClass::create([\n 'warehouse_id' => $toWarehouseId,\n 'item_id' => $itemId,\n 'quantity' => $qty,\n 'unit_id' => $pivotFrom->unit_id,\n 'alert' => 0,\n ]);\n } else {\n $pivotTo->update([\"quantity\" => $pivotTo->quantity + $destQty]);\n }\n $pivotFrom->update([\"quantity\" => $pivotFrom->quantity - $qty]);\n\n return StockMovement::create([\n 'item_id' => $itemId,\n 'from_warehouse_id' => $this->id,\n 'to_warehouse_id' => $toWarehouseId,\n 'quantity' => $qty,\n 'action' => Warehouse::ACTION_MOVE\n ]);\n }", "function move($dir=\\Scrivo\\SequenceNo::MOVE_DOWN) {\n\n\t\t$this->context->checkPermission(\\Scrivo\\AccessController::WRITE_ACCESS);\n\n\t\t\\Scrivo\\SequenceNo::position($this->context, \"list_item_definition\",\n\t\t\t\"application_definition_id\", $this->id, $dir);\n\t}", "public function reorder_onMove()\n {\n $sourceNode = Page::find(post('sourceNode'));\n $targetNode = post('targetNode') ? Page::find(post('targetNode')) : null;\n\n if ($sourceNode == $targetNode) {\n return;\n }\n\n switch (post('position')) {\n case 'before':\n $sourceNode->moveBefore($targetNode);\n break;\n case 'after':\n $sourceNode->moveAfter($targetNode);\n break;\n case 'child':\n $sourceNode->makeChildOf($targetNode);\n break;\n default:\n $sourceNode->makeRoot();\n break;\n }\n }", "protected function _render_state_move()\n\t{\n\t\t$this->_ci->load->model('admin/grocery_order_model');\n\n\t\t$item_id = intval($this->_ci->input->get('item', TRUE));\n\t\t$previous_id = intval($this->_ci->input->get('previous', TRUE));\n\n\t\t$data['success'] = TRUE;\n\n\t\t// get order previous item\n\t\tif($previous_id == 0)\n\t\t{\n\t\t\t$item_order = 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$previous_item = $this->_ci->grocery_order_model->get_item($this->_table, $this->_primary_key_field, $previous_id);\n\t\t\tif(!empty($previous_item))\n\t\t\t{\n\t\t\t\t$item_order = intval($previous_item[$this->_order_field]) + 1;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$data['success'] = FALSE;\n\t\t\t}\n\t\t}\n\n\t\t// update items\n\t\tif($data['success'] === TRUE)\n\t\t{\n\t\t\t// update item with new order\n\t\t\t$update_item_success = $this->_ci->grocery_order_model->update_item($this->_table, $this->_primary_key_field, $item_id, array($this->_order_field => $item_order));\n\n\t\t\tif($update_item_success)\n\t\t\t{\n\t\t\t\t// update everything after item order\n\t\t\t\t$this->_ci->grocery_order_model->update_order_items_after($this->_table, $this->_primary_key_field, $item_id, $this->_order_field, $item_order, $this->_where);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$data['success'] = FALSE;\n\t\t\t}\n\t\t}\n\n\t\t// set error\n\t\tif($data['success'] === FALSE)\n\t\t{\n\t\t\t$data['message'] = \"Er is iets fout gegaan bij het verplaatsen van het item. Probeer nogmaals.\";\n\t\t}\n\n\t\t// after move callback\n\t\tif(!is_null($this->_callback_after_move))\n\t\t{\n\t\t\t$this->_callback_after_move['class']->{$this->_callback_after_move['method']}($item_id);\n\t\t}\n\n\t\t$this->_json_response($data);\n\t}", "protected function moveContainedElements($uid) {\n\t\t$movedRecord = BackendUtility::getRecord('tt_content', $uid);\n\t\tif (($movedRecord['CType'] === 'list') && ($movedRecord['list_type'] === 'kbnescefe_pi1')) {\n\t\t\t$attachedRecords = BackendUtility::getRecordsByField('tt_content', 'kbnescefe_parentElement',intval($uid), '', '', 'sorting DESC');\n\t\t\tif (is_array($attachedRecords) && count($attachedRecords)) {\n\t\t\t\t$cmd = array();\n\t\t\t\t$data = array();\n\t\t\t\tforeach ($attachedRecords as $row) {\n\t\t\t\t\t$cmd['tt_content'][$row['uid']]['move'] = $movedRecord['pid'];\n\t\t\t\t\tif (intval($row['sys_language_uid']) !== -1) {\n\t\t\t\t\t\t// Only set same language as container if current element has not set \"All languages\"\n\t\t\t\t\t\t$data['tt_content'][$row['uid']]['sys_language_uid'] = $movedRecord['sys_language_uid'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$localDataHandler = $this->getDataHandlerInstance();\n\t\t\t\t$localDataHandler->start($data, $cmd);\n\t\t\t\t$localDataHandler->process_cmdmap();\n\t\t\t\tif (is_array($data) && count($data)) {\n\t\t\t\t\t$localDataHandler->process_datamap();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static final function transfer($id,&$old_parent,$old_pos,&$new_par,$new_pos){\n\t\t$new_parent = $new_par; //in case referred object is removed by calling remove kids.\n\t\tdebug('transfer '.$id.' o.pos '.$old_pos.' n_pos '.$new_pos);\n\t\tif($new_pos >= 0 && $os = $old_parent->remove_kids($id,$old_pos,1)){\n\n\t\t\tnotice('after rmove '.$os[0]->abb.': '.$os[0]->folder_name);\n\t\t\t//notice('new Pos= '.$new_pos);\n\t\t\t//notice('np');\n\t\t\t//print_r($new_parent);\n\t\t\t//notice('extracted');\n\t\t\t//print_r($o);\n\t\t\tif ($new_parent->insert_kids($os,$new_pos))\n\t\t\t{\n\t\t\t\tnotice('after insert '.$os[0]->abb.': '.$os[0]->folder_name);\n\t\t\t\t\n\t\t\t$new_parent->reposition_kids();\n\t\t\t/*\n\t\t\t\tif ($new_parent->id == $old_parent->id && $new_parent->object_type == $old_parent->object_type)\n\t\t\t\t\t\t$new_parent->reposition_kids(min($old_pos,$new_pos));\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t\t$old_parent->reposition_kids($old_pos); //update left+right values\n\t\t\t\t\t\t$new_parent->reposition_kids($new_pos);\n\t\t\t\t}\n\t\t\t*/\n\t\t\t} else {\n\t\t\t\tthrow new Exception('Transfer failed!!!');\n\t\t\t}\n\t\t}else\n\t\t\terror('cannot insert => cannot make transfer!');\n\t}", "function reorganizar($ref, $refId) {\n foreach ($this->Lista('WHERE a.ref = :ref AND a.refid = :refid AND a.status != 99 ORDER BY a.position ASC', ['ref' => $ref, 'refid' => $refId]) as $i => $img) {\n $img->setPosition($i + 1);\n $this->Save($img);\n }\n }", "function movePosition($i) {\n global $connection, $user;\n\n $batch_id = $this->getBatchId();\n $username = $_SESSION[\"username\"];\n\n // Check if there is a file at the new position\n $nextposition = $i;\n $sql = 'select position from TR_BATCH_IMAGE where tr_batch_id = ? and position = ?';\n if ($statement = $connection->prepare($sql)) {\n $statement->bind_param(\"ii\",$batch_id,$nextposition);\n $statement->execute();\n $statement->bind_result($position2);\n $statement->store_result();\n if ($statement->fetch()) {\n // nothing\n } else {\n // No such position, go back to beginning, set position to 1\n $nextposition = 1;\n }\n $statement->close();\n } else {\n throw new Exception(\"Database connection failed\");\n }\n\n // Update position\n $sql = \"update TR_USER_BATCH set position = ? where username = ? and tr_batch_id = ?\";\n if ($statement = $connection->prepare($sql)) {\n $statement->bind_param(\"isi\",$nextposition,$username,$batch_id);\n $statement->execute();\n\n //if (mysql_affected_rows() < 1) {\n // throw new Exception(\"Could not update position [$nextposition] for batch [$batch_id], user [$username]\");\n //}\n\n $statement->close();\n } else {\n throw new Exception(\"Database connection failed\");\n }\n\n return $this->getFile($nextposition);\n }", "public function updateStockMovement($item_id, $quantity,$oldquantity){\n $this->insertStockMovement($item_id, $quantity, false, $oldquantity);\n }", "public function update_position($p_object_id, $p_option = null, $p_insertion = null, $p_pos = null)\n {\n $l_data = $this->m_mptt->get_by_node_id($p_object_id);\n\n if (is_object($l_data))\n {\n $l_array = $l_data->get_row(IDOIT_C__DAO_RESULT_TYPE_ARRAY);\n\n $l_sql = \"UPDATE isys_catg_location_list SET\n\t\t\t\tisys_catg_location_list__pos = \" . $this->convert_sql_int($p_pos) . \",\n\t\t\t\tisys_catg_location_list__insertion = \" . $this->convert_sql_int($p_insertion) . \",\n\t\t\t\tisys_catg_location_list__option = \" . $this->convert_sql_id($p_option) . \"\n\t\t\t\tWHERE isys_catg_location_list__id = \" . $this->convert_sql_id($l_array[\"isys_catg_location_list__id\"]) . \";\";\n\n if ($this->update($l_sql))\n {\n return $this->apply_update();\n } // if\n } // if\n\n return false;\n }", "function itemOrderAction(DocumentParser $modx, DatabaseUtils $db)\n{\n $DIR_UP = 1;\n $DIR_DOWN = 2;\n\n $tableName = $db->getTableName('menu_items');\n $itemId = getIntParam('id');\n $parentId = getIntParam('parentId', 0);\n $menuId = getIntParam('menuId');\n $dir = getIntParam('dir');\n\n if (!$itemId) sendError(__FUNCTION__ . ': itemId undefined');\n if (!$menuId) sendError(__FUNCTION__ . ': menuId undefined');\n if (!$dir) sendError(__FUNCTION__ . ': direction order undefined');\n\n $parentIdWhereCondition = is_null($parentId) ? \"`parent_id` IS NULL\" : \"`parent_id`={$parentId}\";\n\n $result = $modx->db->select(\n '*',\n $tableName,\n \"`menu_id`={$menuId} AND {$parentIdWhereCondition}\",\n \"`order_index`, `id` ASC\"\n );\n\n // check indexes\n $items = [];\n $orderCounter = 1;\n $moveItem = null;\n while ($row = $modx->db->getRow($result)) {\n $item = $db->castTypes('menu_items', $row, true);\n $item['orderIndex'] = $orderCounter;\n $items[$orderCounter] = $item;\n if ($item['id'] == $itemId) $moveItem = $orderCounter;\n $orderCounter++;\n }\n\n if ($dir == $DIR_DOWN and $items[$moveItem]['orderIndex'] < count($items)) {\n $items[$moveItem]['orderIndex']++;\n $items[$moveItem + 1]['orderIndex']--;\n }\n\n if ($dir == $DIR_UP and $items[$moveItem]['orderIndex'] > 1) {\n $items[$moveItem]['orderIndex']--;\n $items[$moveItem - 1]['orderIndex']++;\n }\n\n foreach ($items as $_item) {\n $modx->db->update(['order_index' => $_item['orderIndex']], $tableName, \"`id` = {$_item['id']}\");\n }\n// $forUp = array_splice($items, $moveItem['order_index']-1, 1);\n\n// $nextDecrement = false;\n// foreach ($items as &$_item) {\n// if ($_item['id'] == $itemId && $dir==$DIR_DOWN) {\n// $_item['orderIndex']++;\n// $nextDecrement = true;\n// continue;\n// }\n// if ($nextDecrement && $dir==$DIR_DOWN) {\n// $_item['orderIndex']--;\n// break;\n// }\n// }\n\n// if (!$itemData['id']) {\n//\n// $itemData['id'] = $modx->db->insert($itemData, $tableName);\n// if (!$itemData['id']) sendError(__FUNCTION__ . ': пункт меню не создан');\n//\n// } else {\n//\n// if (!$modx->db->update($itemData, $tableName, \"id = {$itemData['id']}\")) {\n// sendError(__FUNCTION__ . ': menu item is not saved');\n// }\n//\n// }\n\n sendResponse([\n 'itemId' => $itemId,\n // 'forUp' => $forUp,\n 'items' => $items,\n // 'item' => $db->keysConvertToCamelCase($itemData),\n ], 'Пункт меню создан/обновлен');\n}", "public abstract function moveToPrevious($referenceId = null);", "public function move($file_id, $new_name = false, $location = false, $new_location = 'local', $container = '')\n {\n $file = File::find($file_id);\n\n $local_filename = $file->filename;\n\n if (! $file) {\n return $this->result(false, trans('files.item_not_found'), $new_name ? $new_name : $file_id);\n }\n\n // this keeps a long running transaction from stalling the site\n session_write_close();\n\n // this would be used when move() is used during a rackspace or amazon upload as the location in the\n // database is not the actual file location, its location is local temporarily\n if ($location) $file->folder->location = $location;\n\n // if both locations are on the local filesystem then we just rename\n if ($file->folder->location === 'local' and $new_location === 'local') {\n // if they were helpful enough to provide an extension then remove it\n $file_slug = $this->createSlug(str_replace($file->extension, '', $new_name));\n $filename = $file_slug.$file->extension;\n\n // does the source exist?\n if (file_exists($this->path.$file->filename)) {\n $i = 1;\n\n // create a unique filename if the target already exists\n while (file_exists($this->path.$filename)) {\n // Example: test-image2.jpg\n $filename = $file_slug.$i.$file->extension;\n $i++;\n }\n\n $data = array('id' => $file_id,\n 'name' => $new_name,\n 'filename' => $filename,\n 'location' => $new_location,\n 'container' => $container);\n\n $file->filename = $filename;\n $file->name = $new_name;\n $file->save();\n\n @rename($this->path.$file->filename, $this->path.$filename);\n\n return $this->result(true, trans('files.item_updated'), $new_name, $data);\n } else {\n return $this->result(false, trans('files.item_not_found'), $file->name);\n }\n } elseif ($file->folder->location === 'local' and $new_location) {\n // we'll be pushing the file from here to the cloud\n ci()->storage->load_driver($new_location);\n\n $containers = ci()->storage->list_containers();\n\n // if we try uploading to a non-existant container it gets ugly\n if (in_array($container, $containers)) {\n // make a unique object name\n $object = now().'.'.$new_name;\n\n $path = ci()->storage->upload_file($container, $this->path.$file->filename, $object, null, 'public');\n\n if ($new_location === 'amazon-s3') {\n // if amazon didn't throw an error we'll create a path to store like rackspace does\n $url = ci()->parser->parse_string(Setting::get('files_s3_url'), array('bucket'=> $container), true);\n $path = rtrim($url, '/').'/'.$object;\n }\n\n // save its location\n $file->filename = $object;\n $file->path = $path;\n $file->save();\n\n $data = array('filename' => $object, 'path' => $path);\n\n // now we create a thumbnail of the image for the admin panel to display\n if ($file->type == 'i') {\n ci()->load->library('image_lib');\n\n $config['image_library'] = 'gd2';\n $config['source_image'] = $this->path.$file->filename;\n $config['new_image'] = $this->_cache_path.$data['filename'];\n $config['maintain_ratio']\t= false;\n $config['width'] = 75;\n $config['height'] = 50;\n ci()->image_lib->initialize($config);\n ci()->image_lib->resize();\n }\n\n // get rid of the \"temp\" file\n @unlink($this->path.$file->filename);\n @unlink($this->path.$local_filename);\n\n $extra_data = array('id' => $file_id,\n 'name' => $new_name,\n 'location' => $new_location,\n 'container' => $container);\n\n return $this->result(true, trans('files.file_uploaded'), $new_name, $extra_data + $data);\n }\n\n return $this->result(false, trans('files.invalid_container'), $container);\n } elseif ($file->folder->location and $new_location === 'local') {\n // pull it from the cloud to our filesystem\n ci()->load->helper('file');\n ci()->load->spark('curl/1.2.1');\n\n // download the file... dum de dum\n $curl_result = ci()->curl->simple_get($file->path);\n\n if ($curl_result) {\n // if they were helpful enough to provide an extension then remove it\n $file_slug = $this->createSlug(str_replace($file->extension, '', $new_name));\n $filename = $file_slug.$file->extension;\n\n // create a unique filename if the target already exists\n $i = 0;\n while (file_exists($this->path.$filename)) {\n // Example: test-image2.jpg\n $filename = $file_slug.$i.$file->extension;\n $i++;\n }\n\n // ...now save it\n write_file($this->path.$filename, $curl_result, 'wb');\n\n $data = array('id' => $file_id,\n 'name' => $new_name,\n 'location' => $new_location,\n 'container' => $container);\n\n return $this->result(true, trans('files.file_moved'), $file->name, $data);\n } else {\n return $this->result(false, trans('files.unsuccessful_fetch'), $file);\n }\n } elseif ($file->folder->location and $new_location) {\n // pulling from the cloud and then pushing to another part of the cloud :P\n ci()->load->helper('file');\n ci()->storage->load_driver($new_location);\n\n // make a really random temp file name\n $temp_file = $this->path.md5(microtime()).'_temp_'.$new_name;\n\n // and we download...\n $curl_result = ci()->curl->simple_get($file);\n\n if ($curl_result) {\n write_file($temp_file, $curl_result, 'wb');\n } else {\n return $this->result(false, trans('files.unsuccessful_fetch'), $file);\n }\n\n // make a unique object name\n $object = now().'.'.$new_name;\n\n $path = ci()->storage->upload_file($container, $temp_file, $object, null, 'public');\n\n if ($new_location === 'amazon-s3') {\n // if amazon didn't throw an error we'll create a path to store like rackspace does\n $url = ci()->parser->parse_string(Setting::get('files_s3_url'), array('bucket'=> $container), true);\n $path = rtrim($url, '/').'/'.$object;\n }\n\n $data = array('filename' => $object, 'path' => $path);\n\n $file->filename = $object;\n $file->path = path;\n $file->save();\n\n // get rid of the \"temp\" file\n @unlink($temp_file);\n\n $extra_data = array('id' => $file_id,\n 'name' => $new_name,\n 'location' => $new_location,\n 'container' => $container);\n\n return $this->result(true, trans('files.file_moved'), $file->name, $extra_data + $data);\n }\n }", "public function move_node($p_mode,$source_id,$target_id)\n\t\t{\n\t\t\t$item_node_info = $this->get_id_info($source_id); \n\t\t\t\n\t\t\t$parent_source = $item_node_info[0];\n\t\t\t$order_source = $item_node_info[1];\n\t\t\t//==================================================================\n\t\t\t\n\t\t\t\n\t\t\tif($p_mode == 'B') // BROTHER\n\t\t\t{\n\t\t\t\t//==================================================================\n\t\t\t\t$item_node_info = $this->get_id_info($target_id);\n\t\t\t\t\n\t\t\t\tif($target_id == 0 )\n\t\t\t\t{\n\t\t\t\t\t// First item of tree\n\t\t\t\t\t$parent_target = 0;\n\t\t\t\t\t$order_target = 0;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$parent_target = $item_node_info[0];\n\t\t\t\t\t$order_target = $item_node_info[1]+1;\n\t\t\t\t}\n\t\t\t\t//==================================================================\n\t\t\n\t\t\t\t//==================================================================\n\t\t\t\t// renumbering order from target id to prepare place\n\t\t\t\t//==================================================================\n\t\t\t\t$query = \"UPDATE `\".$this->tree_node.\"`\n\t\t\t\t\t\t\tSET `order` = `order` + 1\n\t\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t\t`application_release` = '\".$this->application_release.\"'\n\t\t\t\t\t\t\t\tAND `parent` = \".$parent_target.\"\n\t\t\t\t\t\t\t\tAND `order` >= \".$order_target.\"\n\t\t\t\t\t\t\tORDER BY `order` desc\";\n\t\t\t\t$result = $this->link_mt->query($query);\n\t\t\t\t//==================================================================\n\t\t\t\n\t\t\t\t//==================================================================\n\t\t\t\t// move item !!!!!\n\t\t\t\t//==================================================================\n\t\t\t\t$query = \"UPDATE `\".$this->tree_node.\"`\n\t\t\t\t\t\t\tSET `parent` = \".$parent_target.\",\n\t\t\t\t\t\t\t\t`order` = \".$order_target.\"\n\t\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t\t`application_release` = '\".$this->application_release.\"'\n\t\t\t\t\t\t\t\tAND `id` = \".$source_id.\"\n\t\t\t\t\t\t \";\n\t\t\t\t\n\t\t\t\t$result = $this->link_mt->query($query);\n\t\t\t\t//==================================================================\t\n\t\t\n\t\t\t\t//==================================================================\n\t\t\t\t// renumbering order to fill hole\n\t\t\t\t//==================================================================\n\t\t\t\t$query = \"UPDATE `\".$this->tree_node.\"`\n\t\t\t\t\t\t\tSET `order` = `MTN`.`order` - 1\n\t\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t\t`application_release` = '\".$this->application_release.\"'\n\t\t\t\t\t\t\t\tAND `parent` = \".$parent_target.\"\n\t\t\t\t\t\t\t\tAND `order` > \".$order_source.\" \n\t\t\t\t\t\t\tORDER BY `order` asc\";\n\t\t\t\t$result = $this->link_mt->query($query);\n\t\t\t\t//==================================================================\n\t\t\t}\n\t\t\telse // CHILDREN\n\t\t\t{\n\t\t\t\t//==================================================================\n\t\t\t\t// Recover information of target id\n\t\t\t\t//==================================================================\n\t\t\t\t$parent_target = $target_id;\n\t\t\t\t$order_target = 0;\n\t\t\t\t//==================================================================\n\t\t\n\t\t\t\t//==================================================================\n\t\t\t\t// renumbering order from target id to prepare place\n\t\t\t\t//==================================================================\n\t\t\t\t$query = \"UPDATE `\".$this->tree_node.\"`\n\t\t\t\t\t\t\tSET `order` = `order` + 1\n\t\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t\t`application_release` = '\".$this->application_release.\"'\n\t\t\t\t\t\t\t\tAND `parent` = \".$parent_target.\"\n\t\t\t\t\t\t\t\tAND `order` >= \".$order_target.\"\n\t\t\t\t\t\t\t\tORDER BY `order` desc\";\n\t\t\t\t\n\t\t\t\t$result = $this->link_mt->query($query);\n\t\t\t\t//==================================================================\n\t\t\t\n\t\t\t\t//==================================================================\n\t\t\t\t// move item !!!!!\n\t\t\t\t//==================================================================\n\t\t\t\t$query = \"UPDATE `\".$this->tree_node.\"`\n\t\t\t\t\t\t\tSET `parent` = \".$parent_target.\",\n\t\t\t\t\t\t\t\t`order` = \".$order_target.\"\n\t\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t\t`application_release` = '\".$this->application_release.\"'\n\t\t\t\t\t\t\t\tAND `id` = \".$source_id.\"\n\t\t\t\t\t\t \";\n\t\t\t\t\n\t\t\t\t$result = $this->link_mt->query($query);\n\t\t\t\t//==================================================================\n\t\t\t\n\t\t\t\t//==================================================================\n\t\t\t\t// renumbering order from source id to fill hole\n\t\t\t\t//==================================================================\n\t\t\t\t$query = \"UPDATE `\".$this->tree_node.\"`\n\t\t\t\t\t\t\tSET `order` = `order` - 1\n\t\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t\t`application_release` = '\".$this->application_release.\"'\n\t\t\t\t\t\t\t\tAND `parent` = \".$parent_source.\"\n\t\t\t\t\t\t\t\tAND `order` >= \".$order_source.\"\n\t\t\t\t\t\t\t\tORDER BY `order` asc\";\n\t\t\t\t\n\t\t\t\t$result = $this->link_mt->query($query);\n\t\t\t\t//==================================================================\n\t\t\t}\n\t\t\t\n\t\t\t$this->myfocus = $source_id; // Focus on target item\n\t\t\techo $source_id;\n\t\t}", "function move($id, $target_id, $child_num = 0)\n\t{\n\t\tglobal $system, $DBPrefix, $db;\n\t\tif(!is_numeric($id) || !is_numeric($target_id) || !is_numeric($child_num))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tif($target_id != 0)\n\t\t{\n\t\t\t$query = \"SELECT left_id, right_id, level FROM \" . $DBPrefix . \"categories WHERE cat_id = :cat_id OR cat_id = :target_id\";\n\t\t\t// I want the to be returned in order.\n\t\t\t$query .= ' ORDER BY cat_id ' . (($id < $target_id) ? 'ASC' : 'DESC');\n\n\t\t\t$params = array();\n\t\t\t$params[] = array(':cat_id', $id, 'int');\n\t\t\t$params[] = array(':target_id', $target_id, 'int');\n\t\t\t$db->query($query, $params);\n\t\t\tif($db->numrows() != 2)\n\t\t\t{ // Both rows must exist.\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$data = $db->fetchall();\n\t\t\t$a = $data[0]; // This is being moved.\n\t\t\t$b = $data[1]; // This is the target.\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$query = \"SELECT left_id, right_id, level FROM \" . $DBPrefix . \"categories WHERE cat_id = :cat_id\";\n\t\t\t$params = array();\n\t\t\t$params[] = array(':cat_id', $id, 'int');\n\t\t\t$db->query($query, $params);\n\n\t\t\tif($db->numrows() != 1)\n\t\t\t{ // Row must exist.\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$a = $db->result(); // This is being moved.\n\n\t\t\t// Virtual root element.\n\t\t\t$b = $this->get_virtual_root();\n\t\t}\n\n\t\t// We need to get the children.\n\t\t$children = $this->get_children($b['left_id'], $b['right_id'], $b['level']);\n\n\t\tif(count($children) == 0)\n\t\t{\n\t\t\t$child_num = 0;\n\t\t}\n\t\tif($child_num == 0 || (count($children) - $child_num) <= 0 || (count($children) + $child_num + 1) < 0)\n\t\t{\n\t\t\t// First child.\n\t\t\t$boundry = array('left_id', 'right_id', 'right_id', $b['left_id']);\n\t\t}\n\t\telseif($child_num != 0)\n\t\t{\n\t\t\t// Some other child.\n\t\t\tif($child_num < 0)\n\t\t\t{\n\t\t\t\t$child_num = count($children) + $child_num + 1;\n\t\t\t}\n\t\t\tif($child_num > count($children))\n\t\t\t{\n\t\t\t\t$child_num = count($children);\n\t\t\t}\n\t\t\t$boundry = array('right_id', 'left_id', 'right_id', $children[$child_num - 1]['right_id']);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Math.\n\t\t$diff = $a['right_id'] - $a['left_id'] + 1; // The \"size\" of the tree.\n\n\t\tif($a['left_id'] < $boundry[3])\n\t\t{\n\t\t\t$size = $boundry[3] - $diff;\n\t\t\t$dist = $boundry[3] - $diff - $a['left_id'] + 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$size = $boundry[3];\n\t\t\t$dist = $boundry[3] - $a['left_id'] + 1;\n\t\t}\n\t\t// Level math.\n\t\t$ldiff = ($a['level'] - $b['level'] - 1) * -1;\n\t\t// We have all what we need.\n\n\t\t$query = array();\n\n\t\t// Give the needed rows negative id's.\n\t\t$query = \"UPDATE \" . $DBPrefix . \"categories SET left_id = left_id * -1, right_id = right_id * -1 WHERE left_id >= \" . $a['left_id'] . \" AND right_id <= \" . $a['right_id'];\n\t\t$db->direct_query($query);\n\t\t// Remove the hole.\n\t\t$query = \"UPDATE \" . $DBPrefix . \"categories SET left_id = left_id - \" . $diff . \" WHERE right_id > \" . $a['right_id'] . \" AND left_id > \" . $a['right_id'];\n\t\t$db->direct_query($query);\n\t\t$query = \"UPDATE \" . $DBPrefix . \"categories SET right_id = right_id - \" . $diff . \" WHERE right_id > \" . $a['right_id'];\n\t\t$db->direct_query($query);\n\t\t// Add hole\n\t\t$query = \"UPDATE \" . $DBPrefix . \"categories SET left_id = left_id + \" . $diff . \" WHERE \" . $boundry[0] . \" > \" . $size . \" AND \" . $boundry[1] . \" > \" . $size;\n\t\t$db->direct_query($query);\n\t\t$query = \"UPDATE \" . $DBPrefix . \"categories SET right_id = right_id + \" . $diff . \" WHERE \" . $boundry[2] . \" > \" . $size;\n\t\t$db->direct_query($query);\n\t\t// Fill hole & update rows & multiply by -1\n\t\t$query = \"UPDATE \" . $DBPrefix . \"categories SET left_id = (left_id - (\" . $dist . \")) * -1, right_id = (right_id - (\" . $dist . \")) * -1, level = level + (\" . $ldiff . \") WHERE left_id < 0\";\n\t\t$db->direct_query($query);\n\t\treturn true;\n\t}", "public function moveItemToPosition($itemAnchor, $position)\n {\n if ($itemAnchor instanceof MenuItem) {\n $itemAnchor = $itemAnchor->getAnchor();\n }\n\n $item = $this->findMenuItem($itemAnchor);\n if (false === $item) {\n throw new \\InvalidArgumentException(\"Menu item `{$itemAnchor}` does not exist! It's impossible to change position.\");\n }\n\n if (!$item->hasParent()) {\n throw new \\InvalidArgumentException(\"Menu item `{$itemAnchor}` does not have any parent! It's impossible to change position.\");\n }\n\n $parent = $item->getParent();\n $children = $parent->getChildren();\n\n $partBefore = array();\n $partActual = array();\n $partAfter = array();\n $change = false;\n\n $actualPosition = 0;\n foreach ($children as $child) {\n $actualPosition++;\n if ($actualPosition === $position) {\n if ($child->getAnchor() === $itemAnchor) {\n $partActual[$actualPosition] = $child;\n } else {\n $partAfter[$actualPosition] = $child;\n }\n $change = true;\n } else {\n if ($child->getAnchor() === $itemAnchor) {\n $partActual[$actualPosition] = $child;\n } else if (true === $change) {\n $partAfter[$actualPosition] = $child;\n } else {\n $partBefore[$actualPosition] = $child;\n }\n }\n }\n\n $parent->removeChildren();\n\n foreach ($partBefore as $child) {\n $parent->addChild($child);\n }\n foreach ($partActual as $child) {\n $parent->addChild($child);\n }\n foreach ($partAfter as $child) {\n $parent->addChild($child);\n }\n }", "function move_tree($id, $target_id, $pos, $copy = false)\r\n\t{\r\n\t\tif ($id == $target_id && !$copy)\r\n\t\t{\n \tdebug :: write_error(NESE_ERROR_RECURSION,\r\n \t\t __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__\r\n \t);\n \treturn false;\r\n\t\t} \r\n\t\t// Get information about source and target\r\n\t\tif (!($source = $this->get_node($id)))\r\n\t\t{\n \tdebug :: write_error(NESE_ERROR_NOT_FOUND,\r\n \t\t __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__, \r\n \t\tarray('id' => $id)\r\n \t);\n \treturn false;\r\n\t\t} \r\n\r\n\t\tif (!($target = $this->get_node($target_id)))\r\n\t\t{\n \tdebug :: write_error(NESE_ERROR_NOT_FOUND,\r\n \t\t __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__, \r\n \t\tarray('target_id' => $target_id)\r\n \t);\n \treturn false;\r\n\t\t} \r\n\r\n\t\t$lock = $this->_set_lock(true);\r\n\r\n\t\t$this->_relations = array(); \r\n\r\n\t\tif (!$copy)\r\n\t\t{ \r\n\t\t\t// We have a recursion - let's stop\r\n\t\t\tif (($target['root_id'] == $source['root_id']) &&\r\n\t\t\t\t\t(($source['l'] <= $target['l']) &&\r\n\t\t\t\t\t\t($source['r'] >= $target['r'])))\r\n\t\t\t{\r\n\t\t\t\t$this->_release_lock(true);\n\t\t\t\t\n\t \tdebug :: write_error(NESE_ERROR_RECURSION,\r\n\t \t\t __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__\r\n\t \t);\n\t \treturn false;\r\n\t\t\t} \r\n\t\t\t// Insert/move before or after\r\n\t\t\tif (($source['root_id'] == $source['id']) &&\r\n\t\t\t\t\t($target['root_id'] == $target['id']) && ($pos != NESE_MOVE_BELOW))\r\n\t\t\t{ \r\n\t\t\t\t// We have to move a rootnode which is different from moving inside a tree\r\n\t\t\t\t$nid = $this->_move_root2root($source, $target, $pos);\r\n\t\t\t\t$this->_release_lock(true);\r\n\t\t\t\treturn $nid;\r\n\t\t\t} \r\n\t\t} \n\t\telseif (($target['root_id'] == $source['root_id']) &&\r\n\t\t\t\t\t\t(\t($source['l'] < $target['l']) &&\r\n\t\t\t\t\t\t\t($source['r'] > $target['r'])))\r\n\t\t{\r\n\t\t\t$this->_release_lock(true);\n\t\t\t\r\n \tdebug :: write_error(NESE_ERROR_RECURSION,\r\n \t\t __FILE__ . ' : ' . __LINE__ . ' : ' . __FUNCTION__\r\n \t);\n \treturn false;\r\n\t\t} \r\n\t\t// We have to move between different levels and maybe subtrees - let's rock ;)\r\n\t\t$move_id = $this->_move_across($source, $target, $pos, true);\r\n\t\t$this->_move_cleanup($copy);\r\n\t\t$this->_release_lock(true);\r\n\r\n\t\tif (!$copy)\r\n\t\t{\r\n\t\t\treturn $id;\r\n\t\t} \r\n\t\telse\r\n\t\t{\r\n\t\t\treturn $move_id;\r\n\t\t} \r\n\t}", "public function page_move_smiley()\n\t{\n\t\t$move = ($this->mode == 'up') ? -1 : 1;\n\n\t\t// Position du smiley courant\n\t\t$sql = 'SELECT smiley_order, smiley_cat\n\t\t\t\tFROM ' . SQL_PREFIX . 'smilies\n\t\t\t\tWHERE smiley_id = ' . intval($this->id);\n\t\t$d = Fsb::$db->request($sql);\n\n\t\tif ($d)\n\t\t{\n\t\t\t// ID du smiley a switcher\n\t\t\t$sql = 'SELECT smiley_id\n\t\t\t\t\tFROM ' . SQL_PREFIX . 'smilies\n\t\t\t\t\tWHERE smiley_cat = ' . $d['smiley_cat'] . '\n\t\t\t\t\t\tAND smiley_order = ' . ($d['smiley_order'] + $move);\n\t\t\t$swap_smiley_id = Fsb::$db->get($sql, 'smiley_id');\n\n\t\t\tif ($swap_smiley_id)\n\t\t\t{\n\t\t\t\t// Mise a jour de la position des deux smilies\n\t\t\t\tFsb::$db->update('smilies', array(\n\t\t\t\t\t'smiley_order' =>\t($d['smiley_order'] + $move),\n\t\t\t\t), 'WHERE smiley_id = ' . intval($this->id));\n\n\t\t\t\tFsb::$db->update('smilies', array(\n\t\t\t\t\t'smiley_order' =>\t$d['smiley_order'],\n\t\t\t\t), 'WHERE smiley_id = ' . $swap_smiley_id);\n\n\t\t\t\tFsb::$db->destroy_cache('smilies_');\n\t\t\t}\n\t\t}\n\t\tHttp::redirect('index.' . PHPEXT . '?p=posts_smiley');\n\t}", "function action_spipbb_move()\n{\n\tglobal $spip_lang_left, $spipbb_fromphpbb, $dir_lang, $time_start;\n\t$securiser_action = charger_fonction('securiser_action', 'inc');\n\t$arg = $securiser_action();\n\n\tlist($objet, $id_item, $statut) = preg_split('/\\W/', $arg);\n\n\t$id_item = intval($id_item);\n\t$redirige = urldecode(_request('redirect'));\n\t$id_rubrique = _request('id_rubrique');\n\n\tif (!empty($id_rubrique)) $redirige = parametre_url($redirige, 'id_rubrique', $id_rubrique, '&') ;\n\tif (!$id_item) {\n\t\tredirige_par_entete($redirige);\n\t\texit;\n\t}\n\n\t$row = sql_fetsel(\"id_\".$objet.\" , titre\", \"spip_\".$objet.\"s\", \"id_\".$objet.\"='$id_item'\");\n\tif (!$row) {\n\t\tredirige_par_entete($redirige);\n\t\texit;\n\t}\n\n\tswitch ($statut) {\n\tcase \"up\" :\n\t\t$move_increment = -15;\n\t\tbreak;\n\tcase 'down' :\n\t\t$move_increment = +15;\n\t\tbreak;\n\tdefault :\n\t\t$move_increment = 0;\n\t\tbreak;\n\t}\n\tif (!function_exists('recuperer_numero')) include_spip('inc/filtres');\n\n\t$ancien_numero = recuperer_numero($row['titre']) ;\n\t$nouveau_numero = $ancien_numero + $move_increment;\n\n\tif ( ($move_increment==0) OR ($nouveau_numero<5)) {\n\t\tredirige_par_entete($redirige);\n\t\texit;\n\t}\n\n\t$titre = supprimer_numero($row['titre']);\n\tif ($nouveau_numero<10) $titre = \"0\" . $nouveau_numero . \". \".trim($titre);\n\telse $titre = $nouveau_numero . \". \".trim($titre);\n\n\t@sql_updateq(\"spip_\".$objet.\"s\", array(\n\t\t\t\t\t'titre'=>$titre\n\t\t\t\t\t),\n\t\t\t\"id_$objet='$id_item'\");\n\n\tspipbb_renumerote();\n}", "public function updateItem( $id, $preparedItem ) {\n\t}", "public function updateItem($_id) {\n\t}", "public function removeItem ( $item ) {\n\n if ( is_object( $item ) ) {\n \\Maven\\Loggers\\Logger::log()->message( 'Maven/Cart/removeItem: Object: ' . $item->getIdentifier() );\n } else {\n \\Maven\\Loggers\\Logger::log()->message( 'Maven/Cart/removeItem: Identifier: ' . $item );\n }\n\n\n $item = is_object( $item ) ? $item : $this->getOrder()->getItem( $item );\n\n $orderApi = new OrdersApi( );\n\n\n//\t\tdie(print_r($this->getOrder()->getItems(),true));\n //TODO: Check if the item exists, we have to remove it and add the new one.\n if ( $this->getOrder()->itemExists( $item->getIdentifier() ) ) {\n\n \\Maven\\Loggers\\Logger::log()->message( 'Maven/Cart/removeItem: Item found: ' . $item->getIdentifier() );\n\n $orderApi->removeItem( $this->order, $item );\n\n \\Maven\\Loggers\\Logger::log()->message( 'Maven/Cart/removeItem: Updating order after item removed: ' . $item->getIdentifier() );\n $this->update();\n\n return Message\\MessageManager::createSuccessfulMessage( 'Item removed sucessfully', $this->order );\n }\n\n return Message\\MessageManager::createSuccessfulMessage( 'Item not found', $this->order );\n }", "public function element_move($id, $id_target, $inherit_childs = true) {\n global $db;\n\n $source = $this->element_read($id);\n $target = $this->element_read($id_target);\n if ((!$target) || $this->element_is_child($id_target, $id)) {\n $this->error = \"ERR_INVALID_TARGET\";\n return false;\n }\n if (($source[\"KAT_TABLE\"] != $target[\"KAT_TABLE\"]) && ($id_target != $this->tree_get_parent())) {\n $this->error = \"ERR_TABLE_MISMATCH\";\n return false;\n }\n\n $new = array(\"ID_KAT\" => $id, \"PARENT\" => $id_target);\n if ($this->updateid = $db->update($this->table, $new)) {\n unset($this->cache_nodes[$this->updateid]);\n if (!$inherit_childs) {\n // Kind-Elemente eine Ebene aufwärts verschieben\n $db->querynow(\"UPDATE `\".$this->table.\"` SET PARENT=\".$source[\"PARENT\"].\"\n WHERE ROOT=\".$this->root.\" AND PARENT=\".$source[\"ID_KAT\"]);\n } else {\n $this->undo_add_action(\"MOVE\", $id, $id_target, $source[\"PARENT\"]);\n }\n $this->reload = true;\n return true;\n } else {\n $this->error = \"ERR_INSERT_FAILED\";\n return false;\n }\n }", "public function move(&$key, &$record, $flags) {\n return null;\n }", "function components_move()\n\t{\n\t\t//--------------------------------------------\n\t\t// INIT\n\t\t//--------------------------------------------\n\n\t\t$com_id \t= intval($this->ipsclass->input['com_id']);\n\t\t$move \t= trim($this->ipsclass->input['move']);\n\t\t$components = array();\n\t\t$final_coms = array();\n\t\t$used_pos = array();\n\t\t$max_pos = 0;\n\n\t\t//--------------------------------------------\n\t\t// Checks...\n\t\t//--------------------------------------------\n\n\t\tif ( ! $com_id OR ! $move )\n\t\t{\n\t\t\t$this->ipsclass->main_msg = \"No ID was passed, please try again\";\n\t\t\t$this->components_list();\n\t\t\treturn;\n\t\t}\n\n\t\t//--------------------------------------------\n\t\t// Get components from database\n\t\t//--------------------------------------------\n\n\t\t$this->ipsclass->DB->build_query( array( 'select' => '*',\n\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 'order' => 'com_position ASC' ) );\n\t\t$this->ipsclass->DB->exec_query();\n\n\t\twhile( $c = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$max_pos += 1;\n\n\t\t\tif ( in_array( $c['com_position'], $used_pos ) )\n\t\t\t{\n\n\t\t\t\t$c['com_position'] = $max_pos;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$used_pos[] = $c['com_position'];\n\t\t\t}\n\n\t\t\t$components[ $c['com_id'] ] = $c['com_position'];\n\t\t}\n\n\t\tasort($components);\n\n\t\t$i \t\t = 0;\n\t\t$did_move = 0;\n\n\t\tforeach( $components as $k => $v )\n\t\t{\n\t\t\t$i++;\n\n\t\t\tif( $k == $com_id )\n\t\t\t{\n\t\t\t\tif( $move == 'up' )\n\t\t\t\t{\n\t\t\t\t\t// Move up (lower #)\n\t\t\t\t\t$last = array_pop( $final_coms );\n\t\t\t\t\t$final_coms[ $k ] = $i - 1;\n\n\t\t\t\t\tforeach( $components as $k2 => $v2 )\n\t\t\t\t\t{\n\t\t\t\t\t\tif ( $v2 == $last )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$final_coms[ $k2 ] = $i;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Move down (higher #)\n\n\t\t\t\t\t$final_coms[ $k ] = $i + 1;\n\t\t\t\t\t$did_move = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ( $did_move == 1 )\n\t\t\t\t{\n\t\t\t\t\t$final_coms[ $k ] = $i - 1;\n\t\t\t\t\t$did_move = 0;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$final_coms[ $k ] = $i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t/*echo \"<pre>\";\n\t\tprint_r($final_coms);\n\t\texit;*/\n\n\t\tforeach( $final_coms as $k => $v )\n\t\t{\n\t\t\t$this->ipsclass->DB->do_update( 'components', array( 'com_position' => $v ), 'com_id='.$k );\n\t\t}\n\n\t\t$this->components_rebuildcache();\n\n\t\t$this->ipsclass->main_msg = \"Component item repositioned\";\n\t\t$this->components_list();\n\t}", "public function MoveToCart($item){\n\n $cart=Cart::instance('saveForLater')->get($item);\n\n Cart::instance('saveForLater')->remove($item);\n\n\n $item=Cart::instance('default')->search(function ($cartItem, $rowId) use($cart){\n return $cartItem->id === $cart->id;\n });\n\n\n if ($item->isNotEmpty()) {\n return redirect()->route('cart.index')\n ->with('success_message','This item is already added in your cart!');\n }\n Cart::instance('default')->add($cart->id,$cart->name,$cart->qty,$cart->price)\n ->associate('App\\Models\\Product');\n\n return back()->with('success_message','Item has been Moved to your Cart!');\n }", "function _relocate_children($old_ID, $new_ID)\n {\n }", "public function moveRecord_firstElementPostProcess($table, $uid, $destPid, $moveRec, $updateFields, \\TYPO3\\CMS\\Core\\DataHandling\\DataHandler $parentObject) {\n\t\tif ($table === 'tt_content') {\n\t\t\t$currentRecord = BackendUtility::getRecord('tt_content', $uid);\n\t\t\t$parentObject->moveInfo[$uid] = 'element';\n\t\t\tif (($currentRecord['CType'] === 'list') && ($currentRecord['list_type'] === 'kbnescefe_pi1')) {\n\t\t\t\t// Remember container records which have been moved\n\t\t\t\t$parentObject->moveInfo[$uid] = 'container';\n\t\t\t}\n\t\t}\n\t}", "function move($myHomeManager) {\n $homeManager = $myHomeManager;\n $homeManager->retrieveItems();\n if (isset($_POST['id'])) {\n $id = $_POST['id'];\n $homeManager->move($id);\n }\n header('Location: ../Views/index.php');\n}", "public function move($key, $before)\n {\n $element = $this->offsetGet($key);\n\n if ($element) {\n $this->offsetUnset($key);\n\n if ($before) {\n $before = $this->offsetGet($before->getKey());\n $this->add($before, $element->getKey(), $element->getValue());\n } else {\n $this->unshift($element->getKey(), $element->getValue());\n }\n }\n }", "public function shift() { \n $item = $this->offsetGet(0);\n \n $this->itemsCollection()->update(array(), array('$pop' => array(\n self::ITEMS_OBJECT_NAME => -1\n )));\n \n $this->decrementLength();\n \n return $item;\n }", "public static function move_up($id = 0, $page = '', $sql_cond = '') {\n global $database;\n global $session;\n //get this sort id\n $obj = static::find_by_id($id, $sql_cond);\n //get prev sort id\n $obj_prev = static::find_prev_sort_id($obj->sort_id, $sql_cond);\n if (!isset($obj_prev->sort_id)) {\n $session->message(read_xmls('/site/msg/cantmoveup'));\n return redirect_to(search_for_flag($page, 'checked_row', $id));\n } else {\n\n // update query\n //update prev sort_id -- NULL\n $sql1 = \"UPDATE \" . static::$table_name . \" SET sort_id=0 WHERE sort_id = \" . $database->escape_value($obj_prev->sort_id) . \" {$sql_cond} \";\n //update curr sort_id = prev sort_id\n $sql2 = \"UPDATE \" . static::$table_name . \" SET sort_id=\" . $database->escape_value($obj_prev->sort_id) . \" WHERE sort_id = \" . $obj->sort_id . \" {$sql_cond} \";\n //update prev sort_id = curr sort_id\n $sql3 = \"UPDATE \" . static::$table_name . \" SET sort_id=\" . $database->escape_value($obj->sort_id) . \" WHERE sort_id = 0 {$sql_cond} \";\n //echo $sql1 .\"<br />\". $sql2.\"<br />\". $sql3; exit;\n // Run Queries\n $database->query($sql1);\n $database->query($sql2);\n $database->query($sql3);\n $session->message(read_xmls('/site/msg/donesort'));\n\n return redirect_to(search_for_flag($page, 'checked_row', $id));\n }\n }", "public function update_sortorder($cardid, $cardtarget) {\n global $DB;\n\n $cards = $this->getcards();\n\n // Remove the moving card from array.\n $movingcard = false;\n foreach ($cards as $card) {\n if ($card->record->id == $cardid) {\n $movingcard = $card;\n unset($cards[$card->record->id]);\n }\n }\n\n // Reverse the array, then add the movingcard after the targetcard.\n $cardsreversed = array_reverse($cards);\n\n $reverseneworder = [];\n foreach ($cardsreversed as $card) {\n $reverseneworder[] = $card;\n if ($card->record->id == $cardtarget) {\n $reverseneworder[] = $movingcard;\n }\n }\n\n $neworder = array_reverse($reverseneworder);\n\n $order = 1;\n foreach ($neworder as $card) {\n $DB->set_field('swipe_item', 'sortorder', $order++, array('id' => $card->record->id));\n }\n }", "function move($source, $destination);", "function updateItem($item) {\n\t\tglobal $dbh;\n\t\t$stmt = $dbh->prepare('UPDATE ITEM SET (NULL, ?, ?, ?, ?, ?) WHERE itemID = ?');\n\t\t$success = $stmt->execute(array($item['content'],\n\t\t\t\t\t\t\t\t\t\t$item['image'],\n\t\t\t\t\t\t\t\t\t\t$item['checked'],\n\t\t\t\t\t\t\t\t\t\t$item['listID'],\n\t\t\t\t\t\t\t\t\t\t$list['itemID']));\n\t\treturn $success;\n\t}", "public function editItem($id,$item)\n\t{\n $this->db->trans_start();\n\t\t$this->db->where('id',$id);\n\t\t$this->db->update('item',$item);\n $this->db->trans_complete();\n\t}", "private function removeItem($id){\n $this->totalQty -= $this->items[$id]['qty'];\n $this->totalPrice -= $this->items[$id]['price'];\n unset($this->items[$id]);\n }", "public function moveItemToLastPosition($itemAnchor)\n {\n if ($itemAnchor instanceof MenuItem) {\n $itemAnchor = $itemAnchor->getAnchor();\n }\n\n $item = $this->findMenuItem($itemAnchor);\n if (false === $item) {\n throw new \\InvalidArgumentException(\"Menu item `{$itemAnchor}` does not exist! It's impossible to change position.\");\n }\n if (!$item->hasParent()) {\n throw new \\InvalidArgumentException(\"Menu item `{$itemAnchor}` does not have any parent! It's impossible to change position.\");\n }\n\n $parent = $item->getParent();\n $children = $parent->getChildren();\n\n $partBefore = array();\n $actualPosition = 0;\n foreach ($children as $child) {\n $actualPosition++;\n if ($child->getAnchor() !== $itemAnchor) {\n $partBefore[$actualPosition] = $child;\n }\n }\n $parent->removeChildren();\n foreach ($partBefore as $child) {\n $parent->addChild($child);\n }\n $parent->addChild($item);\n }", "public function repositionMenuItem()\n {\n $menuId = \\Request::get('menu_id');\n $action = \\Request::get('action');\n $affectedItemId = \\Request::get('affected_item_id');\n $targetItemId = \\Request::get('target_item_id');\n\n // Prepare affected menu item\n $affectedNode = $this->menuItemRepository->find($affectedItemId, $this->menuItemGateway);\n\n if (!$affectedNode) {\n throw new PhotonException('MENU_ITEM_NOT_FOUND', ['affected_item_id' => $affectedItemId]);\n }\n\n // Second node placeholder\n $secondNode = null;\n\n // Prepare scope node\n if ($menuId && $action === 'setScope') {\n $scopeNode = $this->menuRepository->find($menuId, $this->menuGateway);\n\n if (!$scopeNode) {\n throw new PhotonException('MENU_NOT_FOUND', ['menu_id' => $menuId]);\n }\n\n $secondNode = $scopeNode;\n }\n\n // Prepare targeted node\n if ($targetItemId) {\n $targetNode = $this->menuItemRepository->find($targetItemId, $this->menuItemGateway);\n\n if (!$targetNode) {\n throw new PhotonException('MENU_ITEM_NOT_FOUND', ['target_item_id' => $targetItemId]);\n }\n\n $secondNode = $targetNode;\n }\n\n $affectedNode = $this->nodeRepository->performNodeAction($affectedNode, $action, $secondNode);\n\n return $this->responseRepository->make('REPOSITION_NODE_SUCCESS', ['affected_node' => $affectedNode]);\n }", "public function reorder($ids)\n {\n foreach ($ids as $position => $id) {\n DB::table('menu_page')\n ->where('menu_id', '=', $this->id)\n ->where('page_id', '=', $id)\n ->update(['position' => $position]);\n }\n }", "public function element_move_before($id, $id_target, $inherit_childs = true) {\n global $db;\n\n $source = $this->element_read($id);\n $target = $this->element_read($id_target);\n if ((!$target) || $this->element_is_child($id_target, $id)) {\n $this->error = \"ERR_INVALID_TARGET\";\n return false;\n }\n $target_parent = $this->element_read($target[\"PARENT\"]);\n if (!empty($target_parent[\"KAT_TABLE\"]) && ($source[\"KAT_TABLE\"] != $target_parent[\"KAT_TABLE\"]) &&\n \t\t($target[\"PARENT\"] != $this->tree_get_parent())) {\n $this->error = \"ERR_TABLE_MISMATCH\";\n return false;\n }\n\n $new = array(\n \t\"ID_KAT\" => $id,\n \t\"PARENT\" => $target_parent[\"ID_KAT\"],\n \t\"ORDER_FIELD\" => ($target[\"ORDER_FIELD\"]-1)\n );\n if ($this->updateid = $db->update($this->table, $new)) {\n unset($this->cache_nodes[$this->updateid]);\n if (!$inherit_childs) {\n // Kind-Elemente eine Ebene aufwärts verschieben\n $db->querynow(\"UPDATE `\".$this->table.\"` SET PARENT=\".$source[\"PARENT\"].\", ORDER_FIELD=\".$source[\"ORDER_FIELD\"].\"\n WHERE ROOT=\".$this->root.\" AND PARENT=\".$source[\"ID_KAT\"]);\n } else {\n $this->undo_add_action(\"MOVE\", $id, $target_parent[\"ID_KAT\"], $source[\"PARENT\"]);\n }\n $this->reload = true;\n return true;\n } else {\n $this->error = \"ERR_INSERT_FAILED\";\n return false;\n }\n }", "public function switchItemPositions(Item $item1, Item $item2): void;", "public function MoveItem($request)\n {\n return $this->makeRequest(__FUNCTION__, $request);\n }", "public function move($id, $parentId = 0, $nearId = 0)\n {\n $row = $this->db->findOne([$this->db->primaryKey() => (int)$id]);\n if ($row) {\n $left = $row['left'];\n $right = $row['right'];\n $level = $row['level'];\n } else {\n return false;\n }\n\n $parent = $this->db->findOne([$this->db->primaryKey() => (int)$parentId]);\n if ($parent) {\n $levelUp = $parent['level'];\n } else {\n $levelUp = 0;\n }\n\n // define right key node for which we insert a node (branch)\n // transfer to the root\n if ($parent == 0) {\n $ret = $this->db->find([], ['sort' => ['right' => -1], 'limit' => 1]);\n if (!empty($ret)) {\n foreach ($ret as $row) {\n $nearRight = $row['right'];\n }\n }\n } else {\n // moved to another node\n $parent = $this->db->findOne([$this->db->primaryKey() => (int)$parent]);\n $nearRight = $parent['right'] - 1;\n\n if (!empty($nearId)) {\n $near = $this->db->findOne([$this->db->primaryKey() => (int)$nearId]);\n if ($near) {\n $nearRight = $near['right'];\n } else {\n $nearRight = $parent['right'];\n }\n }\n }\n\n // define the offset\n $skewLevel = $levelUp - $level + 1; // level offset variable node\n $skewTree = $right - $left + 1; // shift keys tree\n //We get the id nodes movable branch\n $ids = [];\n $rows = $this->db->find(\n [\n 'left' =>\n [\n '$lte' => $left\n ]\n ,\n 'right' =>\n [\n '$gte' => $right\n ]\n ]\n );\n foreach ($rows as $row) {\n $ids[] = $row[$this->db->primaryKey()];\n }\n // move to higher units\n if ($right < $nearRight) {\n $skewEdit = $nearRight - $left + 1;\n $this->db->update(\n [\n 'right' =>\n [\n '$lt' => $left,\n '$gt' => $nearRight\n ]\n ],\n ['$inc' => [\n 'right' => $skewTree\n ]\n ]\n );\n $this->db->update(\n [\n 'left' =>\n [\n '$lt' => $left,\n '$gt' => $nearRight\n ]\n ],\n ['$inc' => [\n 'left' => $skewTree\n ]\n ]\n );\n // move the entire branch\n $this->db->update(\n [\n $this->db->primaryKey() =>\n [\n '$in' => $ids\n ]\n ],\n ['$inc' => [\n 'left' => $skewEdit,\n 'right' => $skewEdit,\n 'level' => $skewLevel,\n ]\n ]\n );\n } // move to lower-level units\n else {\n $skewEdit = $nearRight - $left + 1 - $skewTree;\n $this->db->update(\n [\n 'right' =>\n [\n '$lte' => $nearRight,\n '$gt' => $right\n ]\n ],\n ['$inc' => [\n 'right' => -$skewTree\n ]\n ]\n );\n $this->db->update(\n [\n 'left' =>\n [\n '$lt' => $nearRight,\n '$gt' => $left\n ]\n ],\n ['$inc' => [\n 'left' => -$skewTree\n ]\n ]\n );\n // move the entire branch\n $this->db->update(\n [\n $this->db->primaryKey() =>\n [\n '$in' => $ids\n ]\n ],\n ['$inc' => [\n 'left' => $skewEdit,\n 'right' => $skewEdit,\n 'level' => $skewLevel,\n ]\n ]\n );\n }\n return true;\n }", "public static function move_down($id = 0, $page = '', $sql_cond = '') {\n global $database;\n global $session;\n //get this sort id\n $obj = static::find_by_id($id, $sql_cond);\n\n //get prev sort id\n $obj_next = static::find_next_sort_id($obj->sort_id, $sql_cond);\n if (!isset($obj_next->sort_id)) {\n $session->message(read_xmls('/site/msg/cantmovedown'));\n return redirect_to(search_for_flag($page, 'checked_row', $id));\n } else {\n\n // update query\n $sql1 = \"UPDATE \" . static::$table_name . \" SET sort_id=0 WHERE sort_id = \" . $database->escape_value($obj_next->sort_id) . \" {$sql_cond} \";\n //update curr sort_id = prev sort_id\n $sql2 = \"UPDATE \" . static::$table_name . \" SET sort_id=\" . $database->escape_value($obj_next->sort_id) . \" WHERE sort_id = \" . $database->escape_value($obj->sort_id) . \" {$sql_cond} \";\n //update prev sort_id = curr sort_id\n $sql3 = \"UPDATE \" . static::$table_name . \" SET sort_id=\" . $database->escape_value($obj->sort_id) . \" WHERE sort_id = 0 {$sql_cond} \";\n // Run Queries\n $database->query($sql1);\n $database->query($sql2);\n $database->query($sql3);\n $session->message(read_xmls('/site/msg/donesort'));\n return redirect_to(search_for_flag($page, 'checked_row', $id));\n }\n }", "function remove($item)\r\n {\r\n //Finds the pointer\r\n $index=$this->indexof($item);\r\n\r\n //Deletes the index if it exists\r\n if ($index>=0)\r\n {\r\n $this->delete($index);\r\n }\r\n\r\n return($index);\r\n }", "function remove($item) {\n\t\t\t$numItems = count($this->items);\n\n\t\t\tfor($i = 0; $i < count($this->items); $i++) {\n\t\t\t\t$_item = $this->items[$i];\n\n\t\t\t\t// grab the last item's value, overwrite it \n\t\t\t\t// to the found item, then pop it off the stack\n\t\t\t\tif($_item->equals($item)) {\n\t\t\t\t\t$this->items[$i] = $this->items[$numItems - 1];\n\t\t\t\t\tarray_pop($this->items);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function moveDashlet(\n\t $id,\n\t $group,\n\t $position\n\t )\n\t{\n\t}", "protected function movePage()\n\t{\n\t\tglobal $lng, $ilCtrl;\n\n\t\t// current_page is already set to new position\n\t\t$target_page = $this->current_page-1;\n\t\t$source_page = $_REQUEST[\"old_pos\"]-1;\n\n\t\t$pages = $this->object->getSurveyPages();\n\t\tforeach($pages[$source_page] as $question)\n\t\t{\n\t\t\t$questions[] = $question[\"question_id\"];\n\t\t}\n\n\t\t// move to first position\n\t\t$position = 0;\n\t\tif($_REQUEST[\"pgov\"] != \"fst\")\n\t\t{\n\t\t\t$position = 1;\n\t\t}\n\n\t\t$target = $pages[$target_page];\n\t\t$target = array_shift($target);\n\t\t$this->object->moveQuestions($questions, $target[\"question_id\"], $position);\n\n\t\tif($target_page < $source_page && $position)\n\t\t{\n\t\t $this->current_page++;\n\t\t}\n\n\t\tilUtil::sendSuccess($lng->txt(\"survey_page_moved\"), true);\n\t\t$ilCtrl->setParameter($this, \"pgov\", $this->current_page);\n\t\t$ilCtrl->redirect($this, \"renderPage\");\n\t}", "public function element_move_into($id, $id_target, $inherit_childs = true) {\n global $db;\n\n $source = $this->element_read($id);\n $target = $this->element_read($id_target);\n if ((!$target) || $this->element_is_child($id_target, $id)) {\n $this->error = \"ERR_INVALID_TARGET\";\n return false;\n }\n if (($source[\"KAT_TABLE\"] != $target[\"KAT_TABLE\"]) && ($id_target != $this->tree_get_parent())) {\n $this->error = \"ERR_TABLE_MISMATCH\";\n return false;\n }\n\n $new = array(\n \t\"ID_KAT\" => $id,\n \t\"PARENT\" => $id_target,\n \t\"ORDER_FIELD\" => 0\n );\n if ($this->updateid = $db->update($this->table, $new)) {\n unset($this->cache_nodes[$this->updateid]);\n if (!$inherit_childs) {\n // Kind-Elemente eine Ebene aufwärts verschieben\n $db->querynow(\"UPDATE `\".$this->table.\"` SET PARENT=\".$source[\"PARENT\"].\", ORDER_FIELD=\".$source[\"ORDER_FIELD\"].\"\n WHERE ROOT=\".$this->root.\" AND PARENT=\".$source[\"ID_KAT\"]);\n } else {\n $this->undo_add_action(\"MOVE\", $id, $id_target, $source[\"PARENT\"]);\n }\n $this->reload = true;\n return true;\n } else {\n $this->error = \"ERR_INSERT_FAILED\";\n return false;\n }\n }", "function _recursiveMoveMenuItem($result)\n\t{\n\t\t$i = 0;\n\t\twhile(count($result->child))\n\t\t{\n\t\t\tunset($node);\n\t\t\t$node = array_shift($result->child);\n\n\t\t\t$this->moveMenuItem($this->menuSrl, $node->parent_node, $i, $node->node, 'move');\n\t\t\t$this->_recursiveMoveMenuItem($node);\n\t\t\t$i = $node->node;\n\t\t}\n\t}", "public function moveTop($id)\n {\n return $this->sendrequest('movetop', $id);\n }", "function update_list( $id, $name, $can_delete, $items )\n\t{\n\t\t$this->db->set('name', $name );\n if( $can_delete !== NULL ) {\n $this->db->set('can_delete', $can_delete );\n } \n $this->db->where( 'id', $id );\n\t\t$this->db->update('lists');\n\t\t\n // Save the list items\n\t\t$this->db->where( 'list_id', $id );\n\t\t$this->db->delete( 'list_items' );\n\t\tfor( $i = 0; $i < count($items); $i++ ) {\n $this->db->set('list_id', $id );\n $this->db->set('data_id', $items[$i]['id']);\n\t\t\t$this->db->set('title', $items[$i]['title']);\n\t\t\t$this->db->set('type', $items[$i]['type']);\n\t\t\t$this->db->set('sort_order', $i + 1);\n\t\t\t$this->db->insert('list_items');\n }\n\t}", "public function move_up($id = null) {\n\t\t$this->SurveyInstanceObject->id = $id;\n\t\tif (!$this->SurveyInstanceObject->exists()) {\n\t\t\tthrow new NotFoundException(__('Invalid survey instance object'));\n\t\t}\n\n\t\t// Permission check to ensure a user is allowed to edit this survey\n\t\t$user = $this->User->read(null, $this->Auth->user('id'));\n\t\t$surveyInstanceObject = $this->SurveyInstanceObject->read(null, $id);\n\t\t$surveyInstance = $this->SurveyInstance->read(null, $surveyInstanceObject['SurveyInstanceObject']['survey_instance_id']);\n\t\t$survey = $this->Survey->read(null, $surveyInstance['SurveyInstance']['survey_id']);\n\t\tif (!$this->SurveyAuthorisation->checkResearcherPermissionToSurvey($user, $survey))\n\t\t{\n\t\t\t$this->Session->setFlash(__('Permission Denied'));\n\t\t\t$this->redirect(array('controller' => 'surveys', 'action' => 'index'));\n\t\t}\n\n\t\t$above = $this->SurveyInstanceObject->find('first',\n\t\t\t\tarray('conditions' => array('survey_instance_id' => $surveyInstanceObject['SurveyInstanceObject']['survey_instance_id'],\n\t\t\t\t\t\t'order < ' => $surveyInstanceObject['SurveyInstanceObject']['order']),\n\t\t\t\t\t\t'order' => 'SurveyInstanceObject.order desc',\n\t\t\t\t\t\t'limit' => 1));\n\n\t\tif ($above)\n\t\t{\n\t\t\t$top_order = $above['SurveyInstanceObject']['order'];\n\t\t\t$bottom_order = $surveyInstanceObject['SurveyInstanceObject']['order'];\n\t\t\t\t\n\t\t\t$above['SurveyInstanceObject']['order'] = $bottom_order;\n\t\t\t$surveyInstanceObject['SurveyInstanceObject']['order'] = $top_order;\n\t\t\t\t\n\t\t\t$this->SurveyInstanceObject->save($above);\n\t\t\t$this->SurveyInstanceObject->save($surveyInstanceObject);\n\t\t}\n\n\t\t$this->redirect(array('controller' => 'surveyInstances', 'action' => 'edit', $surveyInstance['SurveyInstance']['id']));\n\t}", "public function setSortNewItemsPosition($a_position)\n\t{\n\t\t$this->new_items_position = (int)$a_position;\n\t}", "public function moveItem($sourcePath, $destinationPath, $options = [])\n {\n rename($this->_getFullPath($sourcePath), $this->_getFullPath($destinationPath));\n }", "function updateById($item_id, $parent_id=null, $group_id=null, $title=null,\n $description=null, $create_date=null, $update_date=null, \n $user_id=null, $rank=null, $item_type=null, $link_url=null,\n $wiki_page=null, $file_is_embedded=null) { \n \n $argArray = array();\n\t\t\n if($parent_id !== null) {\n $argArray[] = 'parent_id='.((int) $parent_id);\n }\n\n if($group_id !== null) {\n $argArray[] = 'group_id='.((int) $group_id);\n }\n\n if($title !== null) {\n $argArray[] = 'title='.$this->da->quoteSmart($title);\n }\n\n if($description !== null) {\n $argArray[] = 'description='.$this->da->quoteSmart($description);\n }\n\n if($create_date !== null) {\n $argArray[] = 'create_date='.((int) $create_date);\n }\n\n if($update_date !== null) {\n $argArray[] = 'update_date='.((int) $update_date);\n }\n\n if($user_id !== null) {\n $argArray[] = 'user_id='.((int) $user_id);\n }\n\n if($rank !== null) {\n $argArray[] = 'rank='.((int) $rank);\n }\n\n if($item_type !== null) {\n $argArray[] = 'item_type='.((int) $item_type);\n }\n\n if($link_url !== null) {\n $argArray[] = 'link_url='.$this->da->quoteSmart($link_url);\n }\n\n if($wiki_page !== null) {\n $argArray[] = 'wiki_page='.$this->da->quoteSmart($wiki_page);\n }\n\n if($file_is_embedded !== null) {\n $argArray[] = 'file_is_embedded='.((int) $file_is_embedded);\n }\n \n $sql = 'UPDATE plugin_docman_item'\n .' SET '.implode(', ', $argArray)\n .' WHERE item_id='.((int) $item_id);\n\n $inserted = $this->update($sql);\n if ($inserted) {\n $this->_updateUpdateDateOfParent($this->da->quoteSmart($item_id));\n }\n return $inserted;\n }", "function update_list($id, $name, $default = \"false\", $sort_order = 99)\n\t{\n\t\t// build the XML put data\n\t\t$url = $this->get_list_url($id);\n\n\t\t$xml_data = '\n<entry xmlns=\"http://www.w3.org/2005/Atom\">\n <id>'.$url.'</id>\n <title type=\"text\">'.$name.'</title>\n <author />\n <updated>2008-04-16T18:39:35.710Z</updated>\n <content type=\"application/vnd.ctct+xml\">\n <ContactList xmlns=\"http://ws.constantcontact.com/ns/1.0/\"\n id=\"'.$url.'\">\n <OptInDefault>'.$default.'</OptInDefault>\n <Name>'.$name.'</Name>\n <ShortName>'.$name.'</ShortName>\n <SortOrder>'.$sort_order.'</SortOrder>\n </ContactList>\n </content>\n <link href=\"/ws/customers/'.$this->api_username.'/lists/'.$id.'\" rel=\"update\" />\n</entry>\n';\n\n\t\t$this->http_set_content_type('application/atom+xml');\n\t\t$xml = $this->load_url(\"lists/$id\", 'put', $xml_data, 204);\n\n\t\tif(intval($this->http_response_code) === 204):\n\t\t\treturn true;\n\t\tendif;\n\t\treturn false;\n\t}", "public function move($action, $id) {\n Diagram::move($action, $id);\n url::admin_redirect(\"/diagram_manage/index/$id/move_done/#diagram_$id\");\n }", "public function updateItem($id, $qty) {\n if ($qty === 0) {\n $this->deleteItem($id);\n } else if ( ($qty > 0) && ($qty != $this->items[$id])) {\n $this->items[$id] = $qty;\n }\n }", "function carr_move_media_menu() {\n\tglobal $menu;\n\n\t$menu[24] = $menu[10];\n\tunset( $menu[10] );\n}", "function _changeSiblingRanking($parentId, $ordering, $item_id = false) {\n $rank = 0;\n switch ($ordering) {\n case 'beginning':\n case 'end':\n $_select = $ordering == 'end' ? 'MAX(rank)+1' : 'MIN(rank)-1';\n $sql = sprintf('SELECT %s AS rank'.\n ' FROM plugin_docman_item'.\n ' WHERE parent_id = %d',\n $_select,\n $parentId);\n $dar = $this->retrieve($sql);\n if ($dar && $dar->valid()) {\n $row = $dar->current();\n $rank = $row['rank'];\n }\n break;\n case 'down':\n case 'up':\n if($item_id !== false) {\n if ($ordering == 'down') {\n $op = '>';\n $order = 'ASC';\n } else {\n $op = '<';\n $order = 'DESC';\n }\n $sql = sprintf('SELECT i1.item_id as item_id, i1.rank as rank'.\n ' FROM plugin_docman_item i1'.\n ' INNER JOIN plugin_docman_item i2 USING(parent_id)'.\n ' WHERE i2.item_id = %d'.\n ' AND i1.rank %s i2.rank'.\n ' ORDER BY i1.rank %s'.\n ' LIMIT 1', \n $item_id,\n $op,\n $order);\n $dar = $this->retrieve($sql);\n if ($dar && $dar->valid()) {\n $row = $dar->current();\n \n $sql = sprintf('UPDATE plugin_docman_item i1, plugin_docman_item i2'.\n ' SET i1.rank = i2.rank, i2.rank = %d'.\n ' WHERE i1.item_id = %d '.\n ' AND i2.item_id = %d',\n $row['rank'],\n $row['item_id'],\n $item_id);\n $res = $this->update($sql);\n //$can_update = false;\n // Message for setNewParent function\n $rank = -1;\n }\n }\n break;\n default:\n $rank = $ordering?$ordering:0;\n $sql = sprintf('UPDATE plugin_docman_item'.\n ' SET rank = rank + 1 '.\n ' WHERE parent_id = %d '.\n ' AND rank >= %d',\n $parentId,\n $rank);\n $this->update($sql);\n break;\n }\n\n return $rank;\n }", "protected function _move($id, $table, $mode = 'up', array $where = array())\n\t{\n\t\t$dbo = JFactory::getDbo();\n\n\t\tif (!is_array($table))\n\t\t{\n\t\t\t// if the table is a string we need to push\n\t\t\t// it in an associative array\n\t\t\t$table = array('table' => $table);\n\t\t}\n\n\t\t// get database requirements\n\t\t$ordcol = isset($table['ordering']) ? $table['ordering'] \t: 'ordering';\n\t\t$idcol \t= isset($table['pk']) \t\t? $table['pk'] \t\t\t: 'id';\n\t\t$table \t= isset($table['table'])\t? $table['table']\t\t: '';\n\n\t\t// get selected record\n\t\t$q = $dbo->getQuery(true)\n\t\t\t->select($dbo->qn(array($idcol, $ordcol)))\n\t\t\t->from($dbo->qn($table))\n\t\t\t->where($dbo->qn($idcol) . ' = ' . $dbo->q($id));\n\t\t\n\t\t$dbo->setQuery($q, 0, 1);\n\t\t$dbo->execute();\n\n\t\tif (!$dbo->getNumRows())\n\t\t{\n\t\t\t// row not found\n\t\t\treturn;\n\t\t}\n\n\t\t$data = $dbo->loadObject();\n\n\t\t// get next/prev record\n\t\t$q = $dbo->getQuery(true)\n\t\t\t->select($dbo->qn(array($idcol, $ordcol)))\n\t\t\t->from($dbo->qn($table))\n\t\t\t->where($dbo->qn($ordcol) . ' ' . ($mode == 'up' ? '<' : '>') . ' ' . $data->{$ordcol})\n\t\t\t->order($dbo->qn($ordcol) . ' ' . ($mode == 'up' ? 'DESC' : 'ASC'));\n\n\t\t// create WHERE statement with custom claus\n\t\tforeach ($where as $column => $values)\n\t\t{\n\t\t\tif (is_array($values) && count($values) > 1)\n\t\t\t{\n\t\t\t\t$values = array_map(array($dbo, 'q'), $values);\n\t\t\t\t$q->where($dbo->qn($column) . ' IN (' . implode(',', $values) . ')');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$values = is_array($values) ? array_shift($values) : $values;\n\t\t\t\t$q->where($dbo->qn($column) . ' = ' . $dbo->q($values));\n\t\t\t}\n\t\t}\n\t\t\n\t\t$dbo->setQuery($q, 0, 1);\n\t\t$dbo->execute();\n\n\t\tif (!$dbo->getNumRows())\n\t\t{\n\t\t\t// the row is probably the first/last\n\t\t\treturn;\n\t\t}\n\n\t\t$next = $dbo->loadObject();\t\n\n\t\t// swap orderings\n\t\t$tmp \t\t\t = $data->{$ordcol};\n\t\t$data->{$ordcol} = $next->{$ordcol};\n\t\t$next->{$ordcol} = $tmp;\n\n\t\t// update the records\n\t\t$dbo->updateObject($table, $data, $idcol);\n\t\t$dbo->updateObject($table, $next, $idcol);\n\t}", "public function treeMove($direction) {\n\t\t$model = $this->Controller->modelClass;\n\t\t$check = $this->Controller->{$model}->find('first', array(\n\t\t\t'fields' => array($model . '.id'),\n\t\t\t'conditions' => array($model . '.id' => $this->Controller->data[$model]['id']),\n\t\t\t'recursive' => -1,\n\t\t\t'callbacks' => false\n\t\t));\n\n\t\tif (empty($check[$model]['id'])) {\n\t\t\t$this->Controller->notice(__d('libs', 'Nothing found to move'), array(\n\t\t\t\t'redirect' => false\n\t\t\t));\n\t\t\treturn false;\n\t\t}\n\n\t\t$message = __d('libs', 'Error occured reordering the records');\n\t\tswitch(strtolower($direction)) {\n\t\t\tcase 'up':\n\t\t\t\t$message = __d('libs', 'The record was moved up');\n\t\t\t\tif (!$this->Controller->{$model}->moveUp($check[$model]['id'], abs(1))) {\n\t\t\t\t\t$message = __d('libs', 'Unable to move the record up');\n\t\t\t\t} else {\n\t\t\t\t\t$this->Controller->{$model}->afterSave(false);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 'down':\n\t\t\t\t$message = __d('libs', 'The record was moved down');\n\t\t\t\tif (!$this->Controller->{$model}->moveDown($check[$model]['id'], abs(1))) {\n\t\t\t\t\t$message = __d('libs', 'Unable to move the record down');\n\t\t\t\t} else {\n\t\t\t\t\t$this->Controller->{$model}->afterSave(false);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$this->Controller->notice($message, array('redirect' => false));\n\n\t\treturn true;\n\t}", "function set_position($newposition) {\n\t\t$this->position = $newposition;\n\t}", "protected function _processPositions($menuitem, $newParent, $afterMenuitemId){\n\t\t$table = $this->getMainTable();\n\t\t$adapter= $this->_getWriteAdapter();\n\t\t$positionField = $adapter->quoteIdentifier('position');\n\t\t\n\t\t$bind = array(\n\t\t\t'position' => new Zend_Db_Expr($positionField . ' - 1')\n\t\t);\n\t\t$where = array(\n\t\t\t'parent_id = ?' => $menuitem->getParentId(),\n\t\t\t$positionField . ' > ?' => $menuitem->getPosition()\n\t\t);\n\t\t$adapter->update($table, $bind, $where);\n\t\t\n\t\t/**\n\t\t * Prepare position value\n\t\t */\n\t\tif ($afterMenuitemId) {\n\t\t\t$select = $adapter->select()\n\t\t\t\t->from($table,'position')\n\t\t\t\t->where('entity_id = :entity_id');\n\t\t\t$position = $adapter->fetchOne($select, array('entity_id' => $afterMenuitemId));\n\t\t\t$bind = array(\n\t\t\t\t'position' => new Zend_Db_Expr($positionField . ' + 1')\n\t\t\t);\n\t\t\t$where = array(\n\t\t\t\t'parent_id = ?' => $newParent->getId(),\n\t\t\t\t$positionField . ' > ?' => $position\n\t\t\t);\n\t\t\t$adapter->update($table, $bind, $where);\n\t\t} \n\t\telseif ($afterMenuitemId !== null) {\n\t\t\t$position = 0;\n\t\t\t$bind = array(\n\t\t\t\t'position' => new Zend_Db_Expr($positionField . ' + 1')\n\t\t\t);\n\t\t\t$where = array(\n\t\t\t\t'parent_id = ?' => $newParent->getId(),\n\t\t\t\t$positionField . ' > ?' => $position\n\t\t\t);\n\t\t\t$adapter->update($table, $bind, $where);\n\t\t} \n\t\telse {\n\t\t\t$select = $adapter->select()\n\t\t\t\t->from($table,array('position' => new Zend_Db_Expr('MIN(' . $positionField. ')')))\n\t\t\t\t->where('parent_id = :parent_id');\n\t\t\t$position = $adapter->fetchOne($select, array('parent_id' => $newParent->getId()));\n\t\t}\n\t\t$position += 1;\n\t\treturn $position;\n\t}", "function moveGroup() {\n\t\t$groupId = (int) Request::getUserVar('id');\n\t\t$this->validate($groupId);\n\n\t\t$group =& $this->group;\n\t\t$groupDao =& DAORegistry::getDAO('GroupDAO');\n\t\t$direction = Request::getUserVar('d');\n\n\t\tif ($direction != null) {\n\t\t\t// moving with up or down arrow\n\t\t\t$group->setSequence($group->getSequence() + ($direction == 'u' ? -1.5 : 1.5));\n\n\t\t} else {\n\t\t\t// Dragging and dropping\n\t\t\t$prevId = Request::getUserVar('prevId');\n\t\t\tif ($prevId == null)\n\t\t\t\t$prevSeq = 0;\n\t\t\telse {\n\t\t\t\t$journal =& Request::getJournal();\n\t\t\t\t$prevGroup =& $groupDao->getById($prevId, ASSOC_TYPE_JOURNAL, $journal->getId());\n\t\t\t\t$prevSeq = $prevGroup->getSequence();\n\t\t\t}\n\n\t\t\t$group->setSequence($prevSeq + .5);\n\t\t}\n\n\n\t\t$groupDao->updateObject($group);\n\t\t$groupDao->resequenceGroups($group->getAssocType(), $group->getAssocId());\n\n\t\t// Moving up or down with the arrows requires a page reload.\n\t\t// In the case of a drag and drop move, the display has been\n\t\t// updated on the client side, so no reload is necessary.\n\t\tif ($direction != null) {\n\t\t\tRequest::redirect(null, null, 'groups');\n\t\t}\n\t}", "public function remove($item) {\n $index = self::IndexOf($item);\n self::RemoveAt($index);\n }", "public function moveUp($id)\n {\n return $this->sendrequest('moveup', $id);\n }", "private function _get_position($item_title, $item_id, $tag_ids, $sort_field, $sort_direction, $search_type, $include_albums) {\n\n // Convert ASC/DESC to < or > characters.\n if (!strcasecmp($sort_direction, \"DESC\")) {\n $comp = \">\";\n } else {\n $comp = \"<\";\n }\n\n // Figure out how many items are _before the current item.\n $items_model = ORM::factory(\"item\");\n if ($search_type == \"AND\") {\n $items_model->select('COUNT(\"*\") AS result_count');\n } else {\n $items_model->select(\"items.id\");\n }\n $items_model->viewable();\n $items_model->join(\"items_tags\", \"items.id\", \"items_tags.item_id\");\t\t\n $items_model->open();\n $items_model->where(\"items_tags.tag_id\", \"=\", $tag_ids[0]);\n $counter = 1;\n while ($counter < count($tag_ids)) {\n $items_model->or_where(\"items_tags.tag_id\", \"=\", $tag_ids[$counter]);\n $counter++;\n }\n $items_model->close();\n if ($include_albums == false) {\n $items_model->and_where(\"items.type\", \"!=\", \"album\");\n }\n $items_model->and_where($sort_field, $comp, $item_title);\n $items_model->order_by($sort_field, $sort_direction);\n $items_model->group_by(\"items.id\");\n if ($search_type == \"AND\") {\n $items_model->having(\"result_count\", \"=\", count($tag_ids));\n }\n $position = count($items_model->find_all());\n\n // In case multiple items have identical sort criteria, query for\n // everything with the same criteria, and increment the position\n // one at a time until we find the right item.\t\n $items_model = ORM::factory(\"item\");\n if ($search_type == \"AND\") {\n $items_model->select(\"items.id\");\n $items_model->select('COUNT(\"*\") AS result_count');\n } else {\n $items_model->select(\"items.id\");\n }\n $items_model->viewable();\n $items_model->join(\"items_tags\", \"items.id\", \"items_tags.item_id\");\t\t\n $items_model->open();\n $items_model->where(\"items_tags.tag_id\", \"=\", $tag_ids[0]);\n $counter = 1;\n while ($counter < count($tag_ids)) {\n $items_model->or_where(\"items_tags.tag_id\", \"=\", $tag_ids[$counter]);\n $counter++;\n }\n $items_model->close();\n if ($include_albums == false) {\n $items_model->and_where(\"items.type\", \"!=\", \"album\");\n }\n $items_model->and_where($sort_field, \"=\", $item_title);\n $items_model->order_by($sort_field, $sort_direction);\n $items_model->group_by(\"items.id\");\n if ($search_type == \"AND\") {\n $items_model->having(\"result_count\", \"=\", count($tag_ids));\n }\n $match_items = $items_model->find_all();\n foreach ($match_items as $one_item) {\n $position++;\n if ($one_item->id == $item_id) {\n break;\n }\n }\n\n return ($position);\n }", "public function move( $args, $assoc_args ) {\n\n\t\tlist( $widget_id ) = $args;\n\t\tif ( ! $this->validate_sidebar_widget( $widget_id ) ) {\n\t\t\tWP_CLI::error( \"Widget doesn't exist.\" );\n\t\t}\n\n\t\tif ( empty( $assoc_args['position'] ) && empty( $assoc_args['sidebar-id'] ) ) {\n\t\t\tWP_CLI::error( 'A new position or new sidebar must be specified.' );\n\t\t}\n\n\t\tlist( $name, $option_index, $current_sidebar_id, $current_sidebar_index ) = $this->get_widget_data( $widget_id );\n\n\t\t$new_sidebar_id = ! empty( $assoc_args['sidebar-id'] ) ? $assoc_args['sidebar-id'] : $current_sidebar_id;\n\t\t$this->validate_sidebar( $new_sidebar_id );\n\n\t\t$new_sidebar_index = ! empty( $assoc_args['position'] ) ? $assoc_args['position'] - 1 : $current_sidebar_index;\n\t\t// Moving between sidebars adds to the top.\n\t\tif ( $new_sidebar_id !== $current_sidebar_id && $new_sidebar_index === $current_sidebar_index ) {\n\t\t\t// Human-readable positions are different than numerically indexed array.\n\t\t\t$new_sidebar_index = 0;\n\t\t}\n\n\t\t$this->move_sidebar_widget( $widget_id, $current_sidebar_id, $new_sidebar_id, $current_sidebar_index, $new_sidebar_index );\n\n\t\tWP_CLI::success( 'Widget moved.' );\n\n\t}", "public function updateItem($item) {\n\t\tif(isset($item['id'])){\n\t\t\t$id = $item['id'];\n\t\t\tunset($item['id']);\n\t\t\t\n\t\t\t$params['set'] =$item;\n\t\t\t$params['condition'] = array('id' => $id); \n\t\t\treturn tdb::update(self::$tablename,$params);\n\t\t}\n\t\treturn false;\n\t}", "public function testMove()\n {\n $this->rlpMapper->save($this->content1, '/products/news/content1-news', 'default', 'de');\n $this->sessionManager->getSession()->save();\n\n // move\n $this->rlpMapper->move('/products/news/content1-news', '/products/asdf/content2-news', 'default', 'de');\n $this->sessionManager->getSession()->save();\n\n $oldNode = $this->session->getNode('/cmf/default/routes/de/products/news/content1-news');\n $newNode = $this->session->getNode('/cmf/default/routes/de/products/asdf/content2-news');\n\n $oldNodeMixins = $oldNode->getMixinNodeTypes();\n $newNodeMixins = $newNode->getMixinNodeTypes();\n\n $this->assertEquals('sulu:path', $newNodeMixins[0]->getName());\n $this->assertEquals('sulu:path', $oldNodeMixins[0]->getName());\n\n $this->assertTrue($oldNode->getPropertyValue('sulu:history'));\n $this->assertEquals($newNode, $oldNode->getPropertyValue('sulu:content'));\n $this->assertEquals($this->content1, $newNode->getPropertyValue('sulu:content'));\n\n // get content from new path\n $result = $this->rlpMapper->loadByResourceLocator('/products/asdf/content2-news', 'default', 'de');\n $this->assertEquals($this->content1->getIdentifier(), $result);\n\n // get content from history should throw an exception\n $this->setExpectedException('Sulu\\Component\\Content\\Exception\\ResourceLocatorMovedException');\n $result = $this->rlpMapper->loadByResourceLocator('/products/news/content1-news', 'default', 'de');\n }", "public function moveRecord_afterAnotherElementPostProcess($table, $uid, $destPid, $origDestPid, $moveRec, $updateFields, \\TYPO3\\CMS\\Core\\DataHandling\\DataHandler $parentObject) {\n\t\tif ($table === 'tt_content') {\n\n\t\t\t// As we are moving after another element kbnescefe parameters wont be set but have to get set at this place (aqui!)\n\t\t\t$updateData = array();\n\t\t\tif (is_array($afterElement = BackendUtility::getRecord('tt_content', abs($origDestPid)))) {\n\t\t\t\t$this->sanitizePasteUpdate($updateData, $afterElement);\n\t\t\t}\n\t\t\t$GLOBALS['TYPO3_DB']->exec_UPDATEquery('tt_content', 'uid='.intval($uid), $updateData);\n\n\t\t\t// Remember container records which have been moved\n\t\t\t$currentRecord = BackendUtility::getRecord('tt_content', $uid);\n\t\t\t$parentObject->moveInfo[$uid] = 'element';\n\t\t\tif (($currentRecord['CType'] === 'list') && ($currentRecord['list_type'] === 'kbnescefe_pi1')) {\n\t\t\t\t$parentObject->moveInfo[$uid] = 'container';\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.68663216", "0.6846594", "0.6497256", "0.6324369", "0.5946858", "0.587347", "0.5845341", "0.5823462", "0.5803777", "0.57702416", "0.56238693", "0.56192786", "0.5615383", "0.55051905", "0.54752904", "0.5465182", "0.54567224", "0.54193634", "0.5408741", "0.53931135", "0.53856057", "0.5384543", "0.5378307", "0.5377163", "0.53473014", "0.5318353", "0.5304258", "0.52693784", "0.5264342", "0.5254106", "0.5191499", "0.51866937", "0.51789933", "0.5160325", "0.51486903", "0.5148062", "0.5131861", "0.5128152", "0.5125697", "0.50945514", "0.5092103", "0.50901675", "0.49897945", "0.49709278", "0.4967871", "0.4964051", "0.49518347", "0.49363256", "0.49237856", "0.49209672", "0.4917034", "0.49131167", "0.49085584", "0.4895044", "0.48938963", "0.48929194", "0.48924986", "0.48734513", "0.487145", "0.4860512", "0.484511", "0.48431173", "0.48287696", "0.48016825", "0.47966605", "0.47931683", "0.47906792", "0.478543", "0.47711593", "0.4762765", "0.47624522", "0.47551703", "0.4752572", "0.4746255", "0.4730657", "0.47236592", "0.47192368", "0.47003186", "0.46919537", "0.46845382", "0.46715268", "0.4669481", "0.46652037", "0.46564642", "0.46558172", "0.46528643", "0.46504262", "0.46457627", "0.46451515", "0.46402192", "0.46369806", "0.46364346", "0.46302307", "0.46289763", "0.46287704", "0.46223798", "0.4615407", "0.46145266", "0.4614373", "0.46102983" ]
0.8479897
0
save picture data to db
сохранить данные изображения в базу данных
function store_pic_data($data){ $insert_data['pic_title'] = $data['pic_title']; $insert_data['pic_desc'] = $data['pic_desc']; $insert_data['pic_file'] = $data['pic_file']; $query = $this->db->insert('pictures', $insert_data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function insertImageToDb() \n {\n }", "public function save(Photo $photo);", "public function saveToDb()\n\t{\n\t\tparent::saveToDb();\n\t\t$this->insertAttachment();\n\t}", "public function saveImage($data)\n\t{\n if (!empty($data)) {\n return $this->imagesModel->create($data);\n }\n\t}", "public function store_in_database(){\n\tif(isset($_POST['submit'])){\n\t\t$image_path = $_POST['path'];\n\t\tupdate_option('pochomaps_map_image', $image_path);\n\t}\n}", "function savePicture($filepath,$data)\n {\n $file = fopen($filepath,\"w+\");\n fwrite($file,$data);\n fclose($file);\n }", "public function save()\n\t{\n\t\t\tif($this->youser_id===null)\n\t\t\t{\n\t\t\t\t$this->youser_id = md5(uniqid(\"device_pictures\", true).\"/\".time());\n\t\t\t}\n\t\t\t$db = DBManager::Get(\"devices\");\n\t\t\t$db->query(\"INSERT INTO device_pictures (device_pictures_id, device_id, device_id_int, master_image, device_pictures_type, angle, situation, position, original_filename, youser_id, timestamp) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, NOW()) ON DUPLICATE KEY UPDATE device_pictures_id=VALUES(device_pictures_id), device_id=VALUES(device_id), device_id_int=VALUES(device_id_int), master_image=VALUES(master_image), device_pictures_type=VALUES(device_pictures_type), angle=VALUES(angle), situation=VALUES(situation), position=VALUES(position), original_filename=VALUES(original_filename), youser_id=VALUES(youser_id), timestamp=VALUES(timestamp)\",$this->device_pictures_id, $this->device_id, $this->device_id_int, $this->master_image, $this->device_pictures_type, $this->angle, $this->situation, $this->position, $this->original_filename, $this->youser_id);\n\t\t\t\n\t\t\treturn $db->affected_rows()>0;\n\t}", "public function save(){\n\n // Authenticate as admin\n $user = User::fetch_by_session();\n if($user === false) return $this->zajlib->json(['status'=>'error', 'message'=>'Your user session has expired!']);\n if($user->data->admin != 'admin') return $this->zajlib->json(['status'=>'error', 'message'=>'Your user account does not have rights to perform this action!']);\n\n // Fetch the photo\n $photo = Photo::fetch($_POST['id']);\n $photo->set_with_data($_POST, ['name', 'alttext', 'caption']);\n $photo->save();\n\n return $this->zajlib->json(['status'=>'ok']);\n }", "private function __writeDbImageToFile($image_data, $filepath) {\n\n $image_string = base64_decode($image_data);\n $image = imagecreatefromstring($image_string);\n imagejpeg($image, $filepath);\n }", "public function upload_photo(){\n $sql=\"INSERT INTO photos \";\n $sql.=\"(name,size,type,date,img_navigacija_id) VALUES ('{$this->name}',$this->size,'{$this->type}',NOW(),2)\";\n self::$connect->query($sql);\n\n\n }", "public function save()\n {\n\n $photo = $this->flyer->addPhoto($this->makePhoto());\n\n\n // move the photo to the images folder\n $this->file->move($photo->baseDir(), $photo->name);\n\n\n// Image::make($this->path)\n// ->fit(200)\n// ->save($this->thumbnail_path);\n\n // generate a thumbnail\n $this->thumbnail->make($photo->path, $photo->thumbnail_path);\n }", "public function save()\n {\n $dir = $this->pathTmpImage;\n\n $files = scandir($dir);\n\n foreach ($files as $file) {\n if ($file == $_POST['image']) { \n copy($this->pathTmpImage . $file, $this->pathResult . $file);\n }\n }\n\n //$this->dbInsert($_POST['image']);\n\n unlink($this->pathTmpImage . $_POST['image']);\n }", "function saveImage()\n\t{\n\n\t\tif (!$this->ImageStream) {\n\t\t\t$this->printError('image not loaded');\n\t\t}\n\n\t\tswitch ($this->type) {\n\t\t\tcase 1:\n\t\t\t\t/* store a interlaced gif image */\n\t\t\t\tif ($this->interlace === true) {\n\t\t\t\t\timageinterlace($this->ImageStream, 1);\n\t\t\t\t}\n\n\t\t\t\timagegif($this->ImageStream, $this->sFileLocation);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t/* store a progressive jpeg image (with default quality value)*/\n\t\t\t\tif ($this->interlace === true) {\n\t\t\t\t\timageinterlace($this->ImageStream, 1);\n\t\t\t\t}\n\n\t\t\t\timagejpeg($this->ImageStream, $this->sFileLocation, $this->jpegquality);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t/* store a png image */\n\t\t\t\timagepng($this->ImageStream, $this->sFileLocation);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->printError('invalid imagetype');\n\n\t\t\t\tif (!file_exists($this->sFileLocation)) {\n\t\t\t\t\t$this->printError('file not stored');\n\t\t\t\t}\n\t\t}\n\t}", "function save_image(array $image)\n{\n $db = get_connection();\n\n $sql = <<<SQL\n INSERT INTO product_images\n (product_id, src, description)\n VALUES\n (:product_id, :src, :description)\nSQL;\n\n $statement = $db->prepare($sql);\n $statement->execute([\n ':product_id' => $image['product_id'],\n ':src' => $image['src'],\n ':description' => $image['description'],\n ]);\n}", "public function Save()\n {\n $required = array(\n \"title\" => \"Título\",\n \"src\" => \"Imagem\"\n );\n $this->validateData($required);\n parent::Save();\n }", "public function save()\n {\n // save the new Promo data table //\n $cropimg_data = $_POST['cropimg'];\n // smth like:- data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABaoAAAH0CAYAAADc0hrzAAAgAElEQVR4Xmy9Sax0a5aetWLv6JvT/P9t8ubNyqYyCyxbLmyMSypsIbCFZBDyDBkDLldhWTBhwgwJiQETJIYuMWcMEkhGmAmdBEJ\n\n $cropimg_remove_array1 = explode(\";\", $cropimg_data);\n // smth like:- base64,iVBORw0KGgoAAAANSUhEUgAABaoAAAH0CAYAAADc0hrzAAAgAElEQVR4Xmy9Sax0a5aetWLv6JvT/P9t8ubNyqYyCyxbLmyMSypsIbCFZBDyDBkDLldhWTBhwgwJiQETJIYuMWcMEkhGmAmdBEJ\n\n $cropimg_remove_array2 = explode(\",\", $cropimg_remove_array1[1]);\n // smth like:- iVBORw0KGgoAAAANSUhEUgAABaoAAAH0CAYAAADc0hrzAAAgAElEQVR4Xmy9Sax0a5aetWLv6JvT/P9t8ubNyqYyCyxbLmyMSypsIbCFZBDyDBkDLldhWTBhwgwJiQETJIYuMWcMEkhGmAmdBEJ\n\n $cropimg = base64_decode($cropimg_remove_array2[1]);\n\n $imageName = 'promo_'.time() . '.png';\n\n $dir_to_save = \"./assets/jollof_banners/fashionhompage_banner/\";\n if (!is_dir($dir_to_save)) {\n mkdir($dir_to_save);\n }\n file_put_contents($dir_to_save.$imageName, $cropimg);\n \n \n \n $input_date=$_POST['promo_date'];\n $date_start=date(\"Y-m-d H:i:s\",strtotime($input_date));\n \n $promo_duration = $this->promo->promodurationinfo($_POST['promo_duration']);\n \n if($promo_duration->durationname == '1 Day'){$date_end= date('Y-m-d H:i:s',strtotime('+1 day',$input_date));}\n else if($promo_duration->durationname == '1 Week') {$date_end= date('Y-m-d H:i:s',strtotime('+1 week',strtotime($input_date)));}\n else if($promo_duration->durationname == '1 Month'){$date_end= date('Y-m-d H:i:s',strtotime('+1 month',strtotime($input_date)));}\n else if($promo_duration->durationname == '3 Month'){$date_end= date('Y-m-d H:i:s',strtotime('+3 week',strtotime($input_date)));}\n else if($promo_duration->durationname == '6 Month'){$date_end= date('Y-m-d H:i:s',strtotime('+6 week',strtotime($input_date)));}\n else if($promo_duration->durationname == '1 Year') {$date_end= date('Y-m-d H:i:s',strtotime('+1 year',strtotime($input_date)));}\n \n $data_New = array( \n 'imageurl' => $_POST['promo_url'],\n 'imagename' => $imageName,\n 'bannertypeid' => $_POST[\"promotype\"],\n 'promodurationid'=> $_POST[\"promo_duration\"],\n 'usertype' => $this->session->Type,\n 'merchantid' => $this->session->merchant_id,\n 'userid' => $this->session->User_id,\n 'username' => $this->session->companyname,\n 'payment' => 'FREE',\n 'startdate' => $date_start,\n 'enddate' => $date_end,\n 'status' => 0\n );\n $insert_data = $this->Generic->add($data_New, $tablename=\"img_ads\");// insert to db\n\n if($insert_data) \n {\n $this->session->set_flashdata('success','success');\n $this->session->set_flashdata('message', 'Promo Saved');\n $Json_resultSave = array (\n 'status' => '1',\n 'content' => $imageName\n );\n echo json_encode($Json_resultSave);\n exit();\n }\n else \n { \n $this->session->set_flashdata('error','error');\n $this->session->set_flashdata('message', 'An error occur when Adding New Promo');\n $Json_resultSave = array (\n 'status' => '0',\n 'content' => 'There was a problem!! Pls Try Again.....'\n );\n echo json_encode($Json_resultSave);\n exit();\n }\n }", "function saveData(){\r\n require_once('Database.php');\r\n $database = new Database(\"localhost\", \"root\", \"\", \"practica\");\r\n $database->connect();\r\n\r\n //Take input and test it for special characters\r\n $firstname = test_input($_POST['firstname']);\r\n $lastname = test_input($_POST['lastname']);\r\n $email = test_input($_POST['email']);\r\n $number = test_input($_POST['number']);\r\n\r\n $age = test_input($_POST['age']);\r\n $address = test_input($_POST['address']);\r\n $sex = test_input($_POST['sex']);\r\n $sizes = test_input($_POST['size']);\r\n\r\n $image = test_input($_POST['image']);\r\n\r\n //Prepare and execute statement, returning 1 for success and 0 for failure\r\n if($stmt = $database->conn->prepare(\"INSERT INTO form (firstname, lastname, email, phoneNumber, age, address, gender, sizes, image)\r\n VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?)\")){\r\n $stmt->bind_param('sssiissss', $firstname, $lastname, $email,\r\n $number, $age, $address, $sex, $sizes, $image);\r\n\r\n $stmt->execute();\r\n\r\n $stmt->close();\r\n echo 1;\r\n }\r\n else{\r\n echo 0;\r\n }\r\n\r\n $database->disconnect();\r\n }", "public function saveAction()\n {\n $data = $this->getRequest()->getPost();\n if ($data) {\n try {\n if (isset($data['image']['delete'])) {\n $data['image'] = '';\n } else {\n unset($data['image']);\n\n if (isset($_FILES)) {\n if ($_FILES['image']['name']) {\n if ($this->getRequest()->getParam('id')) {\n $model = Mage::getModel('pugnet_uploader/images')->load($this->getRequest()->getParam('id'));\n if ($model->getData('image')) {\n $io = new Varien_Io_File();\n $io->rm(Mage::getBaseDir('media') . DS . implode(DS, explode('/', $model->getData('image'))));\n }\n }\n $path = Mage::getBaseDir('media') . DS . 'uploader' . DS . 'images' . DS;\n $uploader = new Varien_File_Uploader('image');\n $uploader->setAllowedExtensions(['jpg', 'png', 'gif']);\n $uploader->setAllowRenameFiles(false);\n $uploader->setFilesDispersion(false);\n $destFile = $path . $_FILES['image']['name'];\n $filename = $uploader->getNewFileName($destFile);\n $uploader->save($path, $filename);\n\n $data['image'] = 'uploader/images/' . $filename;\n }\n }\n }\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n $this->_redirectReferer();\n }\n\n try {\n $model = Mage::getModel('pugnet_uploader/images')\n ->addData($data)\n ->setId($this->getRequest()->getParam('id'))\n ->save();\n\n Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Image was successfully saved'));\n Mage::getSingleton('adminhtml/session')->setItemsData(false);\n $this->_redirectReferer();\n\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n Mage::getSingleton('adminhtml/session')->setItemsData($this->getRequest()->getPost());\n $this->_redirectReferer();\n }\n }\n Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Image has not been saved'));\n $this->_redirectReferer();\n }", "private function SaveSingleImage()\n\t{\n\t\t//Abfragen und überprüfen der ID\n\t\t$id = functions::GetVar($_GET, 'id');\n\t\tif(!is_numeric($id))\n\t\t{\n\t\t\tfunctions::Output_fehler('Es wurde keine g&uuml;ltige ID &uuml;bergeben!');\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//Initialisieren des Datenspeichers\n\t\t$daten = array();\n\t\t\n\t\t//ISO-Wert auslesen und kontrollieren\n\t\t$daten['iso'] = functions::GetVar($_POST, 'iso');\n\t\tif(!is_numeric($daten['iso']))\n\t\t{\n\t\t\tfunctions::Output_warnung('Es wurde kein g&uuml;ltiger ISO-Wert angegeben!');\n\t\t\t$daten['iso'] = 0;\n\t\t}\n\t\t\n\t\t//Auslesen des Kommentars\n\t\t$daten['comment'] = Functions::GetVar($_POST, 'comment');\n\t\t//Auslesen der verwendeten Kamera\n\t\t$daten['kamera'] = Functions::GetVar($_POST, 'kamera');\n\t\t\n\t\t\n\t\tswitch ($_POST['originalChoice'])\n\t\t{\n\t\t\tcase 'delete':\n\t\t\t\t//Es soll kein Bild vorhanden sein, das bestehende Bild wird gelöscht\n\t\t\t\t$daten['pfad_sg'] = $this -> GetPathSg($id);\n\t\t\t\tFilebase::RemoveFileById($daten['pfad_sg']);\n\t\t\t\t$daten['pfad_sg'] = null;\n\t\t\t\tbreak;\n\t\t\tcase 'filesystem':\n\t\t\t\t//Es soll ein Bild aus der Filebase angezeigt werden\n\t\t\t\t$filebasePath = FILEBASE . Functions::GetVar($_POST, 'originalPath');\n\t\t\t\t$daten['pfad_sg'] = '';\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\t$daten['pfad_sg'] = Filebase::GetFileId($filebasePath);\n\t\t\t\t}\n\t\t\t\tcatch (Exception $ex)\n\t\t\t\t{\n\t\t\t\t\tfunctions::Output_fehler('Die angegebene Datei konnte nicht in der Filebase gefunden werden!');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase 'upload':\n\t\t\t\t//Es soll ein Bild über den Browser geuploaded werden\n\t\t\t\t$up = Functions::Upload(FILEBASE . 'galerie/originalimages/', 'newOriginalImage');\n\t\t\t\tif(!$up)\n\t\t\t\t{\n\t\t\t\t\tfunctions::Output_fehler('Die Datei konnte nicht auf dem Server gespeichert werden!');\n\t\t\t\t}\n\t\t\t\t$daten['pfad_sg'] = Filebase::AddFile($up);\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t//Auslesen der Datumsinformationen\n\t\t$date = array();\n\t\t$date['year'] = functions::GetVar($_POST, 'datumYear');\n\t\t$date['month'] = functions::GetVar($_POST, 'datumMonth');\n\t\t$date['day'] = functions::GetVar($_POST, 'datumDay');\n\t\t$date['hour'] = functions::GetVar($_POST, 'datumHour');\n\t\t$date['minute'] = functions::GetVar($_POST, 'datumMinute');\n\t\t$date['second'] = functions::GetVar($_POST, 'datumSecond');\n\n\t\t//Prüfen ob das Datum korrekt ist\n\t\tif(!checkdate($date['month'], $date['day'], $date['year']))\n\t\t{\n\t\t\tFunctions::Output_fehler('Es wurde ein ung&uuml;ltiges Datum eingegeben!');\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//Zusammensetzend es Datumstrings\n\t\t$dateString = $date['year'] . '-' . $date['month'] . '-' . $date['day'] . ' ' . $date['hour'] . ':' . $date['minute'] . ':' . $date['second'];\n\t\t\n\t\n\t\t//Galerie-ID auslesen und prüfen\n\t\t$gid = functions::GetVar($_POST, 'galerie');\n\t\tif(!is_numeric($gid))\n\t\t{\n\t\t\tfunctions::Output_fehler('Es wurde keine g&uuml;ltige Galerie-ID ¨&uuml;bergeben!');\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//Speichern der Informationen\n\t\ttry \n\t\t{\n\t\t\tSqlManager::GetInstance() -> Update('modgaleriebilder', array('gallerieId' => $gid , 'datum' => $dateString, 'iso' => $daten['iso'], 'comment' => $daten['comment'], 'kamera' => $daten['kamera'], 'path_sg' => $daten['pfad_sg']), 'id=\\''. $id .'\\'');\n\t\t}\n\t\tcatch (SqlManagerException $ex)\n\t\t{\n\t\t\tFunctions::Output_fehler('Die Eigenschaften des Bildes konnten nicht gespeichert werden: ' . $ex);\n\t\t\treturn;\n\t\t}\n\t\tfunctions::Output_bericht('Eigenschaften wurden erfolgreich gespeichert!');\n\t}", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function save();", "public function savePhoto( $f_name, $file_data_to_store)\n {\n $this->logger->info('DBService : savePhoto');\n \n $sql = \"INSERT INTO minstagram(photo_name, photo)\" . \"VALUES(:p_name, :p_data)\";\n\n $stmt = $this->pdo->prepare($sql);\n $stmt->bindParam(':p_name', $f_name);\n $stmt->bindParam(':p_data', $file_data_to_store, \\PDO::PARAM_LOB);\n \n $stmt->execute();\n }", "function image_record() {\n\t\t$picIMEI = $_POST['picIMEI'];\n\t\t$time_stamp = $_POST['time_stamp'];\n\t\t$piclat = $_POST['piclat'];\n\t\t$piclon = $_POST['piclon'];\n\t\t$image_name = $_POST['image_name'];\n\t\t$accel_x = $_POST['accel_x'];\n\t\t$accel_y = $_POST['accel_y'];\n\t\t$accel_z = $_POST['accel_z'];\n\n\t\t$insert = $this -> conn -> insertnewrecords('image_record', 'imei_number, reading_timesamp,lat,log,accel_x,accel_y,accel_z,image_filename', '\"' . $picIMEI . '\",\"' . $time_stamp . '\",\"' . $piclat . '\",\"' . $piclon . '\",\"' . $accel_x . '\",\"' . $accel_y . '\",\"' . $accel_z . '\",\"' . $image_name . '\"');\n\t\tif (!empty($insert)) {\n\t\t\t$post = array('status' => \"true\", \"message\" => \"Thanks for your feedback\");\n\t\t} else {\n\t\t\t$post = array('status' => \"false\", \"message\" => \"error\");\n\t\t}\n\n\t\techo $this -> json($post);\n\t}", "public function writeimg() {\n\t\t$data = Input::all();\n\t\t$img = $data['imgdata'];\n\t\t$student_id = $data['student_id'];\n\t\t$img = str_replace('data:image/png;base64,', '', $img);\n\t\t$img = str_replace(' ', '+', $img);\n\t\t$imgdat = base64_decode($img);\n\t\t$myPublicFolder = public_path();\n\t\t$savePath = $myPublicFolder.\"/photo\";\n\t\t$path = $savePath.\"/$student_id.png\";\n\t\tFile::delete($path);\n\t\tFile::put($path , $imgdat);\n\t\t$last_add = Student::orderby('id', 'desc')->first();\n\t\tStudent::where('student_id', '=', $student_id)->update(array('pic' => \"$student_id.png\"));\n\t\treturn View::make('finish', array('imgid' => Student::where('student_id', '=', $student_id)->firstOrFail()->group));\n\t}", "function imageSave($property, UploadedFile $file);", "private function saveToDatabse($data) {\n global $wpdb;\n $query = \"insert into `\" . $wpdb->prefix . \"roni_images` (`attachment_id`, `title`, `description`, `image_path`, `image_thumb_path`, `author_name`, `author_email`, `number_of_votes`, `created`) values ('\" . $data['attachment_id'] . \"', '\" . $data['title'] . \"' , '\" . $data['description'] . \"', '\" . $data['image_path'] . \"', '\" . $data['image_thumb_path'] . \"', '\" . $data['author_name'] . \"', '\" . $data['author_email'] . \"', '\" . $data['number_of_votes'] . \"', '\" . date(\"Y-m-d H:i:s\") . \"'); \";\n\n if ( $wpdb -> query( $query ) ) {\n return true;\n } else {\n return false;\n }\n }", "function save_camp_image(){\n\t\n\t\n\t$data = $_POST['data'];\n\tlist($type, $data) = explode(';', $data);\n\tlist(, $data) = explode(',', $data);\n\t$data = base64_decode($data);\t\t\n\t$img_name = 'tshirt'.time().'.png';\n\t\n\t$upload_dir = wp_upload_dir();\t\n\t\n\t$target_path_image = $upload_dir['path'].'/'.$img_name;\n\t\n\tfile_put_contents($target_path_image, $data);\n\t\n\techo json_encode(array('action'=>'done','img'=>$img_name));\t\n\tdie();\n}", "public function save() {\n $db = Db::instance();\n // omit id \n $db_properties = array(\n 'firstName' => $this->firstName,\n 'lastName' => $this->lastName,\n 'description' => $this->description,\n 'user' => $this->user,\n 'password' => $this->password,\n 'image' => $this->image,\n 'gender' => $this->gender,\n 'topic_id' => $this->topic_id,\n 'topic_id1' => $this->topic_id1,\n 'role_id' => $this->role_id,\n );\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "private function save()\n {\n $this->collage->setImageFormat('jpeg');\n return $this->collage->writeImage($this->name);\n }", "public function saveImageToUser($image, $user);", "public function savePhoto(){\n if($this->imageFile && $this->photo = $this->upload($this->user_id, $this->getPrimaryKey())) {\n //off the events to avoid infinite loop\n $this->off(self::EVENT_AFTER_INSERT, [$this, 'savePhoto']);\n $this->off(self::EVENT_AFTER_UPDATE, [$this, 'savePhoto']);\n \n return $this->save(false);\n } \n return true;\n }", "public function saveData()\r\n {\r\n \r\n }", "function save(&$image) {\r\r\n\t\treturn $this->__write($image);\r\r\n\t\t}", "public function images_save($data_images = array()) \n {\n $query = $this->db->insert($this->program_images,$data_images);\n if($query)\n {\n return TRUE;\n }\n else\n {\n return FALSE;\n }\n }", "abstract public function save($img, $filename);", "function image_record(){\n\t\t\t$picIMEI=$_POST['picIMEI'];\n\t\t\t$time_stamp=$_POST['time_stamp'];\n\t\t\t$piclat=$_POST['piclat'];\n\t\t\t$piclon=$_POST['piclon'];\n\t\t\t$image_name=$_POST['image_name'];\n\t\t\t$accel_x=$_POST['accel_x'];\n\t\t\t$accel_y=$_POST['accel_y'];\n\t\t\t$accel_z=$_POST['accel_z'];\n\t\t\n\t\t\t\t$insert = $this -> conn -> insertnewrecords('image_record','imei_number, reading_timesamp,lat,log,accel_x,accel_y,accel_z,image_filename', '\"' . $picIMEI . '\",\"' . $time_stamp . '\",\"' . $piclat . '\",\"' . $piclon . '\",\"' . $accel_x . '\",\"' . $accel_y . '\",\"' . $accel_z . '\",\"' . $image_name . '\"');\n\t\t\t\tif(!empty($insert)){\n\t\t\t\t\t$post = array('status' => \"true\",\"message\" => \"Thanks for your feedback\");\n\t\t\t\t}else{\n\t\t\t\t\t$post = array('status' => \"false\",\"message\" => \"error\");\n\t\t\t\t}\n\t\t\t\n\t\t\techo $this -> json($post);\n\t\t}", "public function save()\n {\n $this->validate();\n $this->validate(['image' => 'required|image']);\n\n // try to upload image and resize by ImageSaverController config\n try {\n $imageSaver = new ImageSaverController();\n $this->imagePath = $imageSaver->loadImage($this->image->getRealPath())->saveAllSizes();\n }catch (\\RuntimeException $exception){\n dd($exception);\n }\n\n $this->PostSaver();\n\n $this->resetAll();\n $this->ChangeCreatedMode();\n $this->swAlert([\n 'title' => 'Good job',\n 'text' => 'successfully added',\n 'icon' => 'success'\n ]);\n $this->render();\n }", "public function saveToDatabase($data)\n {\n }", "private function savePhoto()\n {\n $image = Image::make($this->filePath);\n\n File::exists($this->sanghaPhotosPath()) or File::makeDirectory($this->sanghaPhotosPath());\n\n $image->resize(400, null, function ($constraint) {\n $constraint->aspectRatio();\n $constraint->upsize();\n })\n ->save($this->sanghaPhotosPath() . $this->fileName)\n ->resize(200, null, function ($constraint) {\n $constraint->aspectRatio();\n })\n ->save($this->sanghaPhotosPath() . 'tn_' . $this->fileName);\n\n }", "abstract public function save();", "abstract public function save();", "abstract public function save();", "abstract public function save();", "abstract public function save();", "public function store()\n\t{\n\t\t$review = new Review;\n\t\t$review->title = Input::get('title');\n\t\t$review->body = Input::get('body');\n\t\t//$review->picture = Input::file('picture');\n\t\t$review->review = Input::get('review');\n\t\t$review->place = Input::get('place');\n\t\t$review->lat = Input::get('lat');\n\t\t$review->lng = Input::get('lng');\n\t\t$review->category = Input::get('category');\n\t\t$review->picture = Input::has('picture');\n\t\t$review->save();\n\t\t//Review::create(Input::all());\n\n\t\tFile::put('img/review'.$review->id.\".jpg\", base64_decode(Input::get('picture')));\n\n\n\t}", "private function _saveData($vars){\n\n /**\n * @var $images \\Vg\\Images\n */\n $images = new Images();\n\n try{\n $images->setName($vars['filename'])\n ->setPath($vars['path'])\n ->setCreatedAt($vars['created_at'])\n ->save();\n return $images->getId();\n\n }catch(\\PropelException $e){\n throw new Error('ERROR: '. $e->getMessage());\n }\n }", "public function store()\n {\n if(!Csrf::checkToken($this->_request->getInput('_CSRF')))\n {\n $response = [\n 'status' => 'error',\n 'message' => 'csrf'\n ];\n return $this->_response->returnJson($response);\n }\n if($this->crop())\n {\n try {\n $this->_propertyImage->pid = $this->_pid;\n $this->_propertyImage->image_full_path = $this->_imageOut;\n $this->_propertyImage->save();\n }catch(Exception $e) {\n $response = [\n 'status' => 'error',\n 'message' => GENERIC_UPLOAD_ERROR_MESSAGE\n ];\n return $this->_response->returnJson($response);\n }\n $response = [\n 'status' => 'success',\n 'url' => $this->_imageOut\n ];\n return $this->_response->returnJson($response);\n }\n $response = [\n 'status' => 'error',\n 'message' => GENERIC_UPLOAD_ERROR_MESSAGE\n ];\n return $this->_response->returnJson($response);\n }", "protected function saveImage()\n {\n if ( $this->initialImage != $this->image )\n {\n $this->deleteOldImage();\n\n $imageHandler= new CImageHandler();\n $imageHandler->load( $this->getTempFolder( TRUE ) . $this->image );\n $imageHandler->save($this->getImagesFolder( TRUE ) . $imageHandler->getBaseFileName() );\n\n $settings = $this->getThumbsSettings();\n\n if ( !empty( $settings ) )\n {\n $imageHandler= new CImageHandler();\n $imageHandler->load( $this->getTempFolder( TRUE ) . $this->image );\n\n foreach( $settings as $prefix => $dimensions )\n {\n list( $width, $height ) = $dimensions;\n $imageHandler\n ->thumb( $width, $height )\n ->save( $this->getImagesFolder( TRUE ) . $prefix . $imageHandler->getBaseFileName() );\n }\n }\n\n @unlink( $this->getTempFolder( TRUE ) . $this->image );\n }\n }", "public function save()\n\t{\n\t\t$database\t= new database();\n\t\tif ( isset($this->_properties['planning_gallery_id']) && $this->_properties['planning_gallery_id'] > 0) \n\t\t{\n\t\t\t$sql\t= \"UPDATE planning_gallery SET title = '\". $database->real_escape_string($this->title) .\"', alt = '\". $database->real_escape_string($this->alt) .\"', image_name = '\". $database->real_escape_string($this->image_name) .\"', description = '\". $database->real_escape_string($this->description) .\"' WHERE planning_gallery_id = '$this->planning_gallery_id'\";\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$order_id\t= self::get_max_order_id() + 1;\n\t\t\t//$order_id\t= self::get_default_image($planning_id);\n\t\t\t$sql\t\t= \"INSERT INTO planning_gallery \n\t\t\t\t\t\t(planning_id, title, alt, image_name, description, added_date, order_id, status) \n\t\t\t\t\t\tVALUES (\n\t\t\t\t\t\t\t\t'\" . $database->real_escape_string($this->planning_id) . \"',\n\t\t\t\t\t\t\t\t'\" . $database->real_escape_string($this->title) . \"',\n\t\t\t\t\t\t\t\t'\" . $database->real_escape_string($this->alt) . \"',\n\t\t\t\t\t\t\t\t'\" . $database->real_escape_string($this->image_name) . \"',\n\t\t\t\t\t\t\t\t'\" . $database->real_escape_string($this->description) . \"',\n\t\t\t\t\t\t\t\tNOW(),\n\t\t\t\t\t\t\t\t'\" . $database->real_escape_string($order_id) . \"',\n\t\t\t\t\t\t\t\t'Y'\n\t\t\t\t\t\t\t\t)\";\n\t\t}\n\t\t//print $sql; \n\t\t//exit;\n\t\t$result\t\t\t= $database->query($sql);\n\t\t\n\t\tif($database->affected_rows == 1)\n\t\t{\n\t\t\t// $this->check_exists_in_temp_table($this->image_name);\n\t\t\tif($this->planning_gallery_id == 0)\n\t\t\t{\n\t\t\t\t$this->planning_gallery_id\t= $database->insert_id;\n\t\t\t\tif($_SESSION['inserted_ids'] != '')\n\t\t\t\t{\n\t\t\t\t $inserted_ids\t= $_SESSION['inserted_ids']. ','. $database->insert_id;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$_SESSION['inserted_ids']\t= $database->insert_id;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$this->initialize($this->planning_gallery_id);\n\t\t}\n\t\n\t\t$this->message = cnst11;\n\t\treturn true;\n\t}", "public function store(Request $request)\n {\n $picture=new picture();\n //投稿した画像とコメントをDBに格納させる\n $picture->user_name=$request->user_name;\n $picture->content=$request->content;\n $filename=$request->file('thefile')->store('public'); //storageフォルダに投稿した画像を保存しファイルパスを格納\n $picture->image=str_replace('public/','',$filename); //ファイル名から「public/」を取り除く\n $picture->save();\n //tinkerコマンドと同じ\n return redirect()->route('picture.show',['id'=>$picture->id]);\n }", "protected function save()\n {\n switch ($this->image_info['mime']) {\n \n case 'image/gif':\n imagegif($this->image, $this->getPath(true));\n break;\n \n case 'image/jpeg':\n imagejpeg($this->image, $this->getPath(true), $this->quality);\n break;\n \n case 'image/jpg':\n imagejpeg($this->image, $this->getPath(true), $this->quality);\n break;\n \n case 'image/png':\n imagepng($this->image, $this->getPath(true), round($this->quality / 10));\n break;\n \n default:\n $_errors[] = $this->image_info['mime'] . ' images are not supported';\n return $this->errorHandler();\n break;\n }\n \n chmod($this->getPath(true), 0777);\n }", "public function save($file = NULL)\n {\n if($file === NULL && $this->storage)\n {\n $this->storage->save($this);\n }\n elseif($file !== NULL)\n {\n $this->savePicture($file);\n }\n else\n {\n trigger_error('Image file to save is not defined', E_USER_WARNING);\n }\n }", "function save ($input) {\r\n // Do your processing\r\n // Save to database of something\r\n //processin here cuz\r\n\r\n// $fp = fopen('images/test.txt', 'w');//opens file in append mode \r\n// fwrite($fp, $input); \r\n// fclose($fp);\r\n\r\n// $fp = fopen('images/len.txt', 'w');//opens file in append mode \r\n// fwrite($fp, strlen($input)); \r\n// fclose($fp);\r\n\r\n $img = str_replace('data:image/png;base64,', '', $input);\r\n $img = str_replace(' ', '+', $img);\r\n\r\n// $fp = fopen('images/img2.txt', 'w');//opens file in append mode \r\n// fwrite($fp, $img); \r\n// fclose($fp);\r\n\r\n $fileData = base64_decode($img);\r\n file_put_contents('images/photo.png',$fileData);\r\n return true;\r\n}", "public function saveToDB()\n {\n }", "public function saveGame($name, $data, $imageData) {\n $savedGames = fopen(\"../../../ressources/savedGames/\".$name.\".json\", \"wb\");\n $savedGamesImg = fopen(\"../../../ressources/savedGames/\".$name.\".txt\", \"wb\");\n\tfwrite($savedGames, $data);\n\tfwrite($savedGamesImg, $imageData);\n\tfclose($savedGames);\n\tfclose($savedGamesImg);\n }", "public function store(){\n $validateactualite = $this->validate([\n 'titre'=>'required',\n 'sous_titre'=>'required',\n 'descri'=>'required'\n ]);\n $this->validate([\n 'photo'=>'required'\n ]);\n $record = actualite::create($validateactualite);\n $this->photo->storePubliclyAs('public/actualite/', $record->id.'.png');\n //$this->photos[$index]->storePubliclyAs('public/galleries/', $data->id.'.png' );\n session()->flash('message', 'actualite enregistré avec succès');\n $this->emit('Added');\n $this->dispatchBrowserEvent('Added');\n $this->resetFields();\n }", "public function save_to_db() {\r\n if ($this->id) {\r\n $stmt = $this->pdo->prepare(\"UPDATE contract SET\r\n companyName=:companyName,\r\n Signature=:Signature\r\n WHERE id=:identity\r\n \");\r\n $input_parameters = array(\r\n ':identity' => $this->id,\r\n ':companyName' => $this->companyName,\r\n ':sygnatura' => $this->signature,\r\n );\r\n $upload = $stmt->execute(\r\n $input_parameters\r\n );\r\n }\r\n//po��czenie z baz� i sprawdzenie czy ju� jest taka umowa\r\n else {\r\n $stmt = $this->pdo->prepare(\"SELECT * FROM contract WHERE Signature=:signature\");\r\n $stmt->bindParam(':signature', $this->signature, PDO::PARAM_STR);\r\n\r\n if ($stmt->rowCount() > 0)\r\n return self::SAVE_ERROR_DUPLICATE_SIGNATURE;\r\n $stmt = $this->pdo->prepare(\"INSERT INTO contract VALUES (NULL, :companyName, :signature,NULL, NULL )\");\r\n $upload = $stmt->execute(\r\n array(\r\n ':signature' => $this->signature,\r\n ':companyName' => $this->companyName\r\n )\r\n );\r\n }\r\n// komunikat o zapisie\r\n if ($upload)\r\n return self::SAVE_OK;\r\n else\r\n return self::SAVE_ERROR_DB;\r\n }", "public function saveimageAction()\n {\n $response = $this->getResponse();\n\n $userid= $this->params()->fromPost('userid');\n $createdTime= $this->params()->fromPost('createdtime');\n $imageType = $this->params()->fromPost('imagetype');\n $imageType = substr($imageType, -3, 3);\n $AVAorCOV = $this->params()->fromPost('albumtype');\n\n $documentService = $this->getDocumentService();\n\n $successModel = new SuccessModel();\n $result = $successModel->saveNewImageAvatar($userid, $createdTime,$documentService, $imageType, $AVAorCOV );\n\n if($result)\n {\n return $response->setContent(\\Zend\\Json\\Json::encode(array(\n 'success' => 1,\n )));\n }\n else\n {\n return $response->setContent(\\Zend\\Json\\Json::encode(array(\n 'success' => 0,\n )));\n }\n }", "public function picture()\n\t\t{\n\t\t\tif(!Auth::check())\n\t\t\t\treturn 'fail';\n\n\t\t\t$user = Auth::user();\n\t\t\t$profile = Profile::find($user->id);\n\t\t\t$profile->picture = Input::get('picture');\n\n\t\t\tif ($profile->save())\n\t\t\t\treturn 'success';\n\t\t}", "abstract public function save( $data );", "function saveData() {\n\n\t\t$this->getMapper()->saveData();\t\n\t\t\n\t\t\n\t}", "private function _getDataImg(){\n $this->Photo->createDirectoryIfNotExist(REPO_PHOTO, 0755);\n $idUser = $this->User->getIdUser($_SESSION['login']);\n\t\t$this->Photo->createDirectoryIfNotExist(REPO_PHOTO.$idUser.DS, 0755);\n $this->Photo->createDirectoryIfNotExist(REPO_PHOTO.$idUser.DS.'min'.DS, 0755);\n\n if (isset($_SESSION['filter']) && $_SESSION['filter'] !== 'none'){\n $filter = $_SESSION['filter'];\n } else {\n $filter = 'none';\n }\n if (!empty($_SESSION['objFilter']) && $_SESSION['objFilter'] !== null){\n $filterObj = $_SESSION['objFilter'];\n } else {\n $filterObj = 'noneObj';\n }\n $tabPathId = $this->Photo->savePhotoTmpToDb($idUser, $_POST['img64'], REPO_PHOTO.DS.$idUser, $filter, $filterObj);\n $_POST['img64'] = \"\";\n return $tabPathId;\n\t}", "public abstract function save();", "function save() {\n \n\t if ($this->id == NULL) {\n\t \t\n\t\t mysql_query(\"INSERT INTO `videothumbs` ( `videoid`, `url`) VALUES ( '\".$this->videoid.\"', '\".$this->url.\"');\") or die(\"Query failed with error: \".mysql_error());\n\t\t $this->id = mysql_insert_id();\n\t \n\t } else {\n\t\t\t\t\n\t\t mysql_query(\"UPDATE `videothumbs` SET `videoid` = '\".$this->videoid.\"', `url` = '\".$this->url.\"' WHERE `id` = \".$this->id.\";\") or die(\"Query failed with error: \".mysql_error());\n\t }\n\t \n }", "private function _imgSave(){\r\n\r\n\r\n $result = new stdClass();\r\n $response = 400;\r\n\r\n if($this->hasLogin()){\r\n\r\n /*\r\n \t*\r\n \t*\r\n \t*\tCheck the method used is POST\r\n \t*\r\n \t*\r\n \t*/\r\n \tif($_SERVER['REQUEST_METHOD'] == 'POST'){\r\n\r\n $url = strtok($_POST['url'], '?');\r\n\r\n $sourcePath = ROOT.'/site/files/_tmp/'.basename($url);\r\n $img = getimagesize($sourcePath);\r\n $new_name = uniqid();\r\n\r\n switch($img['mime']){\r\n case 'image/png':\r\n $new_name .= '.png';\r\n break;\r\n case 'image/jpeg':\r\n $new_name .= '.jpg';\r\n break;\r\n case 'image/gif':\r\n $new_name .= '.gif';\r\n break;\r\n default:\r\n echo \"Only PNG, JPEG or GIF images are allowed!\";\r\n exit;\r\n }\r\n\r\n $targetPath = ROOT.'/site/files/'.$new_name;\r\n $webPath = WEBROOT.'/site/files/'.$new_name;\r\n\r\n if(rename($sourcePath, $targetPath)){\r\n $result->url = $webPath;\r\n $result->size = [$img[0],$img[1]];\r\n $result->alt = 'an image';\r\n $response = 200;\r\n } else {\r\n $response = 400;\r\n }\r\n\r\n }\r\n }\r\n\r\n http_response_code($response);\r\n echo json_encode($result);\r\n exit;\r\n\r\n\r\n }", "public function save($data);", "public function save($data);", "public function save($data);", "public function saveWithPhoto($data)\n {\n //Inicia la transacción\n $this->begin();\n //Intenta crear el usuario con los datos pasados\n if ($this->create($data)) {\n //Intenta subit y actualizar la foto\n if ($this->updatePhoto()) {\n //Se confirma la transacción\n $this->commit();\n return true;\n }\n }\n\n //Si alga falla se regresa la transacción\n $this->rollback();\n return false;\n }", "public function postPicture(){\r\n if(!$this->hasLoginCheck())\r\n return;\r\n $blogItem = new BlogItemModel();\r\n// $path,$desc,$tag\r\n $path=$_POST['path'];\r\n $desc=$_POST['content'];\r\n $tag=$_POST['tag'];\r\n $blogItem->addPicture($path,$desc,$tag);\r\n echo json_encode(array('status'=>'true'));\r\n }", "public function save($value){\n $target_path = IMG_PATH.DS.$this->file_name;\n try {\n //move the uploaded file to target path\n move_uploaded_file($value, $target_path);\n return $this->_add_photo();\n } catch (Exception $e) {\n throw $e;\n }\n }", "function savephoto ($path,$thumb=true) {\n $req = new IMDB_Request(\"\");\n $photo_url = $this->photo ($thumb);\n if (!$photo_url) return FALSE;\n $req->setURL($photo_url);\n $req->sendRequest();\n if (strpos($req->getResponseHeader(\"Content-Type\"),'image/jpeg') === 0\n || strpos($req->getResponseHeader(\"Content-Type\"),'image/gif') === 0\n || strpos($req->getResponseHeader(\"Content-Type\"), 'image/bmp') === 0 ){\n\t$fp = $req->getResponseBody();\n }else{\n\t$this->debug_scalar(\"<BR>*photoerror* \".$photo_url.\": Content Type is '\".$req->getResponseHeader(\"Content-Type\").\"'<BR>\");\n\treturn false;\n }\n $fp2 = fopen ($path, \"w\");\n if ((!$fp) || (!$fp2)){\n $this->debug_scalar(\"image error...<BR>\");\n return false;\n }\n fputs ($fp2, $fp);\n return TRUE;\n }", "function uploadImageIntoDB($file)\n {\n $pfad = $file[tmp_name];\n $typ = GetImageSize($pfad);\n // Bild hochladen\n $filehandle = fopen($pfad,'r');\n $filedata = base64_encode(fread($filehandle, filesize($pfad)));\n $dbtype = $typ['mime'];\n return array(\"bild\"=>$filedata,\"typ\"=>$dbtype);\n }", "public function save(array $options = []) {\n/* if (preg_match('/image/', $this->mime_type)) {\n $this->isImage = true;\n $manager = new ImageManager(array('driver' => 'gd'));\n $image = Storage::disk('public')->get($this->myFile);\n $imageOrig = $manager->make($image); \n //Get width and height of the image\n $this->img_width = $imageOrig->width();\n $this->img_height = $imageOrig->height();\n }*/\n parent::save($options);\n $this->createThumbs();\n }", "function save();", "function save();", "function SaveImage($con, $image, $caption){\n\t\tmysqli_select_db($con, \"image_db\");\n\t\t$qry = \"INSERT INTO image_db (image,caption) values ('$image', '$caption')\";\n\t\t\n\t\t$result = mysqli_query($con, $qry) or die (\"Error: \".mysqli_error($con));\n\t\t\n\t\tif($result){\n\t\t\techo \"<br/>Image Uploaded<br/><br/><br/>\";\n\t\t}\n\t\telse{\n\t\t\techo \"<br/>Image NOT Uploaded\";\n\t\t}\n\t}", "public function save() {}", "public function save() {}", "public function save() {}", "function guardarImagen($name, $tipo, $path, $id){\n\t\n\t$path=\"img\\modelos\\\\\".$id.\"_\".$path;\n\t//Si reemplaza la imagen\n\t$existeImagen= sprintf(\"SELECT * FROM imagenes WHERE modelo_idmodelo = '%s' AND\n\t\t\ttipo = '%s' \", $id,$tipo);\n\t$result = mysql_query( $existeImagen);\n\t//Borrar la imagen antigua\n\tif($data=mysql_fetch_array($result)){\n\t\t\n\t\t//unlink('..\\\\'.$data['path']);\n\t\t//mysql_query(\"DELETE FROM imagenes WHERE idimagenes='\".$data[\"idimagenes\"].\"'\");\n\t}\t\n\t$insertImagen= sprintf(\"INSERT INTO imagenes (tipo, path, modelo_idmodelo)\n\t\t\tVALUES ('%s','%s','%s');\",$tipo, mysql_real_escape_string($path), $id);\n\t//Guardar la imagen nueva\n\tmove_uploaded_file($_FILES[$name][\"tmp_name\"],\n\t\t\t\"..\\img\\modelos\\\\\" .$id.\"_\". $_FILES[$name][\"name\"]);\n\t$result = mysql_query( $insertImagen);\n}", "function imageAllSave(Request $request);", "public function guardar(Request $request)\n {\n $salon= new salon;\n // $salon->foto=$request->foto;\n $salon->nombre=$request->nombre;\n $salon->descripcion=$request->descripcion;\n $salon->ubicacion=$request->ubicacion;\n $salon->estado=$request->estado;\n $salon->precio=$request->precio;\n\n if($request->foto==null)\n {//si no tiene imagen entonces se le asigna una imagen por defecto\n $salon->foto ='defecto.png';\n }else\n {\n /*guardando la super imagen */\n $explode=explode(',',$request->foto);\n $decoded=\\base64_decode($explode[1]);\n if(str_contains($explode[0],'jpeg')){\n $extension='jpg';\n }else{\n $extension='png';\n }\n $fileName = \\Str::random().'.'.$extension;\n $path= 'img'.'/'.$fileName;\n \\file_put_contents($path,$decoded);\n /*terminando de guardar la superImagen */\n $salon->foto=$fileName; \n }\n\n\n $salon->save();\n\n /*REGISTRA EL MOVIMIENTO EN LA BITACORA */\n $objdate = new DateTime();\n $fechaactual= $objdate->format('Y-m-d');\n $horaactual=$objdate->format('H:i:s');\n $bitacora = new bitacora();\n $bitacora->idEmpleado = session('idemp');\n $bitacora->fecha = $fechaactual;\n $bitacora->hora = $horaactual;\n $bitacora->tabla = 'salon';\n $bitacora->codigoTabla = $salon->id;\n $bitacora->transaccion = 'crear';\n $bitacora->save();\n }", "function save_img() {\n imagejpeg($this->img, 'captcha.jpg');\n\n // Libération de la mémoire\n imagedestroy($this->img);\n \n }" ]
[ "0.7369128", "0.70571727", "0.6836592", "0.676557", "0.67205864", "0.6650237", "0.663833", "0.652806", "0.65073305", "0.6482809", "0.6481554", "0.64766437", "0.64660317", "0.64202", "0.6417862", "0.64090043", "0.6383119", "0.6353745", "0.63455117", "0.6327706", "0.6327706", "0.6327706", "0.6327706", "0.6327706", "0.6327706", "0.6327706", "0.6327706", "0.6327706", "0.6327706", "0.6327706", "0.6327706", "0.6327706", "0.6327706", "0.6327706", "0.6327706", "0.6327706", "0.6327706", "0.6317963", "0.63062936", "0.62995", "0.6285018", "0.6284257", "0.62721413", "0.62682897", "0.6252942", "0.6251622", "0.62468666", "0.62198496", "0.62139225", "0.6210886", "0.621", "0.62039715", "0.61974484", "0.61943907", "0.619202", "0.6185144", "0.6185144", "0.6185144", "0.6185144", "0.6185144", "0.61663485", "0.6159701", "0.61522865", "0.6128152", "0.6128", "0.611679", "0.6115169", "0.61108303", "0.61041015", "0.6098948", "0.609377", "0.6085746", "0.60799295", "0.6075536", "0.6075412", "0.6073208", "0.60432094", "0.60414654", "0.60377574", "0.60308534", "0.6030234", "0.602665", "0.602665", "0.602665", "0.6003795", "0.6000399", "0.59989387", "0.5996541", "0.5991389", "0.59807223", "0.59769976", "0.59769976", "0.5976186", "0.59684813", "0.59684813", "0.5967243", "0.5954598", "0.59521073", "0.59473896", "0.5941855" ]
0.7265487
1
Return array of contract type options
Вернуть массив вариантов типа контракта
public static function contract_options() { return array( '' => '', 'RENT' => __( 'Rent', 'inventor-properties' ), 'SALE' => __( 'Sale', 'inventor-properties' ), ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCcTypesAsOptionArray()\n {\n $model = Mage::getModel('payment/source_cctype')\n ->setAllowedTypes(array('VI', 'MC', 'JCB', 'DINCLB'));\n return $model->toOptionArray();\n }", "public function getTypeOptions()\n {\n $calendars = Config::get('vojtasvoboda.proeventspreview::calendars');\n $return = [];\n\n foreach($calendars as $key => $calendar) {\n $return[$key] = $calendar['name'];\n }\n\n return $return;\n }", "public function getCcAvailableTypes()\n {\n //Listando apenas cielo pois já contem todas as bandeiras\n $_types = Mage::getModel('gwap/source_cctypes_cielo')->toOptionArray();\n //$_types[] = Mage::getModel('gwap/source_cctypes_redecard')->toOptionArray();\n \n $types = array();\n foreach ($_types as $data) {\n if (isset($data['label']) && isset($data['value']) && $data['value']!='') {\n $types[substr_replace($data['value'],'',-2)] = $data['label'];\n }\n }\n \n if ($method = $this->getMethod()) {\n //Armazena os cartões habilitados nas duas operadoras\n $availableTypes = $method->getConfigData('cctypes_rcard');\n $availableTypes .= ','.$method->getConfigData('cctypes_cielo');\n \n if ($availableTypes) {\n $availableTypes = explode(',', $availableTypes);\n $allTypes = array();\n // Remove 2 ultimos caracteres do cartão\n foreach($availableTypes as $substype){\n $allTypes[] = substr_replace($substype,'',-2);\n }\n //Compara com cartões disponíveis\n foreach ($types as $code=>$name) {\n if (!in_array($code, $allTypes)) {\n unset($types[$code]);\n }\n }\n }\n }\n return $types;\n }", "public function toOptionArray()\n {\n $options = array();\n\n foreach ($this->getTransactionTypes() as $code => $name) {\n $options[] = array(\n 'value' => $code,\n 'label' => $name\n );\n }\n\n return $options;\n }", "public function get_type_options() : array {\n\n\t\t/**\n\t\t * Filters Call to Action type options.\n\t\t * \n\t\t * @param array Type options to be filtered.\n\t\t */\n\t\treturn apply_filters(\n\t\t\t'cta_type_options', // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound\n\t\t\t[\n\t\t\t\t'subscribe' => __( 'Subscribe', 'civil-first-fleet' ),\n\t\t\t\t'newsletter' => __( 'Newsletter Sign up', 'civil-first-fleet' ),\n\t\t\t]\n\t\t);\n\t}", "public static function getForOptions()\n {\n return [\n 'Buyer' => self::FOR_BUYER,\n 'Freelancer' => self::FOR_FREELANCER,\n 'Fee' => self::FOR_WAWJOB\n ];\n }", "public function getCcTypes() {\n\n\t\t$cc_types = new Cardconnect_Ccgateway_Adminhtml_Model_System_Config_Source_Cardtype();\n\t\t$types = $cc_types->toOptionArray();\n\n $availableTypes = Mage::getModel('ccgateway/standard')->getConfigData('card_type');\n\n if ($availableTypes) {\n $availableTypes = explode(',', $availableTypes);\n\t\t\t$result = array(); \n\t\t\tforeach ($types as $val) { \n\t\t\t if (($key = array_search($val['value'], $availableTypes, TRUE))!==false) { \n\t\t\t\t $result[] = $val; \n\t\t\t\t unset($availableTypes[$key]); \n\t\t\t }\n\t\t\t}\n }\n\n return $result; \n }", "static function getPayMethodsOptions($type = 0)\n\t{\n\t\tglobal $ilDB, $lng;\n\t\t\n\t\t$res = $ilDB->query('SELECT * FROM payment_paymethods WHERE pm_enabled = 1');\n\t\t$options = array();\n\t\t\n\t\t//this is only for additional entries in SelectInputGUIs\n\t\tswitch($type)\n\t\t{\n\t\t\tcase 'all':\t\n\t\t\t\t$options['all'] = $lng->txt('pay_all');\n\t\t\t\tbreak;\n\t\t\tcase 'not_specified': \t\n\t\t\t\t$options[0] = $lng->txt('paya_pay_method_not_specified');\n\t\t\t\tbreak;\n\t\t\t//default: break;\n\t\t}\n\t\t\n\t\twhile($row = $ilDB->fetchAssoc($res))\n\t\t{\n\t\t\t$options[$row['pm_id']] = ilPayMethods::getStringByPaymethod($row['pm_title']);\n\t\t}\t\t\n\t\n\t\treturn $options;\n\t}", "public static function getTypeOptions($for = 'all')\n {\n $options = [];\n\n switch ($for) {\n case \"all\":\n case \"buyer\":\n case \"freelancer\":\n $options = array_flip(self::$str_transaction_type);\n break;\n\n case \"hourly_contract\":\n case \"fixed_contract\":\n if ($for == \"hourly_contract\") {\n $vs = [\n self::TYPE_HOURLY, self::TYPE_BONUS, self::TYPE_REFUND\n ];\n } else {\n $vs = [\n self::TYPE_FIXED, self::TYPE_BONUS, self::TYPE_REFUND\n ];\n }\n\n foreach($vs as $v) {\n $options[self::$str_transaction_type[$v]] = $v;\n }\n break;\n }\n \n return $options;\n }", "function osa_options_class_types() {\r\n\r\n $options = array();\r\n // $options['cello'] = 'Cello';\r\n $options['bass'] = 'Double Bass';\r\n $options['guitar'] = 'Guitar';\r\n $options['koday'] = 'Koday Only';\r\n $options['ecm'] = 'Suzuki Baby';\r\n $options['theory'] = 'Theory';\r\n $options['viace'] = 'Violin - Advanced';\r\n $options['violin'] = 'Violin';\r\n\r\n return $options;\r\n}", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "public function getOptions(): array;", "protected function getOptions(): array\n {\n return [\n 'cost' => $this->cost\n ];\n }", "protected function getOptions()\n {\n return [\n 'type', InputOption::VALUE_REQUIRED, 'Conveyor'\n ];\n }", "public function getOptions() : array;", "public function options(): array\n\t{\n\t\treturn collect(trans('site::order.help.in_stock_type', []))\n\t\t\t->prepend(trans('site::messages.select_no_matter'), '')\n\t\t\t->toArray();\n\t}", "public function getOptions() : array\n {\n $reflection = new \\ReflectionClass(get_class($this));\n return array_values($reflection->getConstants());\n }", "private function getOptionItems()\n {\n $contract = new ContractRepository();\n $employee = new EmployeeRepository();\n $salaryComponent = new SalaryComponentRepository();\n return [\n 'contractItems' => ['' => __('crud.option.contract_placeholder')] + $contract->pluck(),\n 'employeeItems' => ['' => __('crud.option.employee_placeholder')] + $employee->pluck(),\n 'salaryComponentItems' => ['' => __('crud.option.salaryComponent_placeholder')] + $salaryComponent->pluck()\n ];\n }", "public function getTypeOptions()\n {\n return [\n self::TYPE_GENERIC => Yii::t('app', 'Generic'),\n ];\n }", "public function getTypeOptions()\n {\n return [\n self::TYPE_afschrijving => Yii::t('app', 'Afgeschreven'),\n self::TYPE_overdatum => Yii::t('app', 'Over datum')\n ];\n }", "public function getPaymentCurrencyOptions()\n { \n // Return the options as array\n return $this->currencyManager->toOptionArray();\n }", "function moduleOptions() {\n $sq = new sql;\n $txt = new Text($this->language, \"module_isic_card\");\n\n $list = array();\n $list[\"\"] = $txt->display(\"choose_card_type\");\n $res =& $this->db->query(\"SELECT * FROM `module_isic_card_type` ORDER BY `name`\");\n while ($data = $res->fetch_assoc()) {\n $list[$data[\"id\"]] = $data[\"name\"];\n }\n\n /*\n $list = array();\n $list[\"\"] = $txt->display(\"choose_form_type\");\n $list[1] = $txt->display(\"form_type1\");\n $list[2] = $txt->display(\"form_type2\");\n $list[3] = $txt->display(\"form_type3\");\n */\n // ####\n return array($txt->display(\"card_type\"), \"select\", $list);\n // name, type, list\n }", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "protected function getOptions()\n {\n return [\n ['primary', 'p', InputOption::VALUE_OPTIONAL, 'Set primary key field for this Bond.'],\n ['subject', 's', InputOption::VALUE_OPTIONAL, 'Set subject for this Bond.'],\n ['host', null, InputOption::VALUE_OPTIONAL, 'Set host Blueprint class (and primary key) for this Bond.'],\n ['guest', null, InputOption::VALUE_OPTIONAL, 'Set guest Blueprint class (and primary key) for this Bond.'],\n ];\n }", "public static function get_type_option_names() {\n return array('clientid', 'secret', 'pluginname');\n }", "protected function getOptions()\n {\n return [\n ['type', 't', InputOption::VALUE_OPTIONAL, 'Responder type (plain or extended).'],\n ];\n }", "public function getWhatRequiredOptions()\n {\n $options = array(\n 1 => \"Refund\",\n 2 => \"Replacement\",\n 3 => \"Spare Part\",\n 4 => \"Other\"\n );\n return $options;\n }", "public function getInputTypesWithOptions()\n {\n $types = [];\n foreach ($this->inputTypes as $code => $inputType) {\n if ($inputType->isManageOptions()) {\n $types[] = $code;\n }\n }\n\n return $types;\n }", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn [\n\t\t\t\n\t\t];\n\t}", "protected function getOptions()\n {\n return array(\n\n );\n }", "protected function getOptions()\r\n {\r\n return [\r\n\r\n ];\r\n }", "public static function getTypeArray() {\n return array( \n 'to' => 'EthD20',\n 'from' => 'EthD20',\n 'gas' => 'EthQ',\n 'gasPrice' => 'EthQ',\n 'value' => 'EthQ',\n 'data' => 'EthD',\n 'nonce' => 'EthQ',\n );\n }", "public function toOptionArray()\n\t{\n $payments = Mage::getModel('payment/config')->getActiveMethods();\n $methods = [];\n\n foreach ($payments as $paymentCode=>$paymentModel) \n {\n $paymentTitle = Mage::getStoreConfig('payment/'.$paymentCode.'/title');\n $methods[$paymentCode] = array(\n\n 'label' => $paymentTitle,\n 'value' => $paymentCode,\n );\n }\n return $methods;\n\t}", "public function getCalculatorOptions()\n {\n return Driver::isShipping()->isConfigured()->orderBy('name')->lists('name', 'class');\n }", "abstract public function getOptions();", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "protected function _getOptions() { return array(); }", "public function getOptions()\n {\n return array();\n }", "protected function getOptions()\n {\n return array(\n );\n }", "protected function getOptions()\n {\n return array(\n );\n }", "protected function getOptions()\n {\n return array(\n );\n }", "protected function getOptions()\r\n\t{\r\n\t\treturn array();\r\n\t}", "protected function getOptions() {\n\t\treturn array(\n\t\t);\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n\t{\n\t\treturn array();\n\t}", "protected function getOptions()\n {\n return array(\n array('type', null, InputOption::VALUE_OPTIONAL, 'An example option.', null),\n );\n }", "protected function getOptions() : array\n {\n return [];\n }", "protected function getOptions()\n {\n return [\n ];\n }", "protected function getOptions()\n {\n return [\n ];\n }", "protected function getOptions()\n {\n return [\n ];\n }", "protected function getOptions()\n {\n return [\n ];\n }", "protected function getOptions()\n {\n return [\n ];\n }", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [];\n\t}" ]
[ "0.7189024", "0.6917305", "0.6905179", "0.68355936", "0.6751767", "0.6741231", "0.6716977", "0.6662023", "0.6647714", "0.6623095", "0.66026396", "0.66026396", "0.66026396", "0.66026396", "0.66026396", "0.66026396", "0.66026396", "0.65639895", "0.6514214", "0.64429045", "0.6438834", "0.6437904", "0.6412902", "0.64028716", "0.63751537", "0.62861073", "0.6284947", "0.62826914", "0.62826914", "0.62826914", "0.62826914", "0.62826914", "0.62826914", "0.62826914", "0.62826914", "0.62826914", "0.62826914", "0.62826914", "0.62826914", "0.62826914", "0.62826914", "0.62826914", "0.62826914", "0.62790686", "0.62759906", "0.6274508", "0.62716526", "0.6267205", "0.6264967", "0.6264967", "0.6264967", "0.6264967", "0.62395376", "0.6223507", "0.6217583", "0.62142766", "0.62046254", "0.6202407", "0.6201463", "0.6193692", "0.6193692", "0.6193692", "0.6193692", "0.6193692", "0.6193692", "0.6193692", "0.61907214", "0.6187646", "0.61848605", "0.61848605", "0.61848605", "0.6179753", "0.6163328", "0.61627984", "0.61627984", "0.61627984", "0.61627984", "0.61627984", "0.61627984", "0.61627984", "0.61627984", "0.61627984", "0.61627984", "0.61627984", "0.61627984", "0.61627984", "0.6156752", "0.6155487", "0.61525404", "0.61525404", "0.61525404", "0.61525404", "0.61525404", "0.6145905", "0.6145905", "0.6145905", "0.6145905", "0.6145905", "0.6145905", "0.6145905" ]
0.7462306
0