query
stringlengths 9
43.3k
| document
stringlengths 17
1.17M
| metadata
dict | negatives
listlengths 0
30
| negative_scores
listlengths 0
30
| document_score
stringlengths 5
10
| document_rank
stringclasses 2
values |
---|---|---|---|---|---|---|
Test validity of post actions. | public function test_is_valid_post_action() {
$post_types = array(
'course' => false,
'section' => false,
'lesson' => false,
'llms_membership' => false,
'llms_access_plan' => false,
'llms_order' => false,
'llms_transaction' => false,
'post' => false,
'page' => false,
);
$tests = array(
'course.deleted' => array_merge( $post_types, array( 'course' => true ) ),
'section.deleted' => array_merge( $post_types, array( 'section' => true ) ),
'lesson.deleted' => array_merge( $post_types, array( 'lesson' => true ) ),
'membership.deleted' => array_merge( $post_types, array( 'llms_membership' => true ) ),
'access_plan.deleted' => array_merge( $post_types, array( 'llms_access_plan' => true ) ),
'order.deleted' => array_merge( $post_types, array( 'llms_order' => true ) ),
'transaction.deleted' => array_merge( $post_types, array( 'llms_transaction' => true ) ),
);
foreach ( $tests as $topic => $post_types ) {
$webhook = LLMS_REST_API()->webhooks()->create( array(
'delivery_url' => 'https://fake.tld',
'topic' => $topic,
) );
foreach ( $post_types as $type => $expect ) {
$post_id = $this->factory->post->create( array( 'post_type' => $type ) );
$this->assertEquals( $expect, LLMS_Unit_Test_Util::call_method( $webhook, 'is_valid_post_action', array( $post_id ) ) );
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function PostActions()\n {\n }",
"private function checkFieldAction($postParams): bool\n {\n if (in_array($postParams['action'], ['allow', 'deny'])) {\n return true;\n }\n return false;\n }",
"public function isPost();",
"public function postAction() {}",
"protected function registerPostActions() {\n $this->registerPostAction(\"create\", isset($_POST[\"submit-btn\"]) && $_POST[\"submit-btn\"] == \"save\" && !isset($_GET[\"edit\"]));\n $this->registerPostAction(\"update\", isset($_POST[\"submit-btn\"]) && $_POST[\"submit-btn\"] == \"save\" && isset($_GET[\"edit\"]));\n $this->registerPostAction(\"delete\", isset($_POST[\"delete-btn\"]) && $_POST[\"delete-btn\"] == \"delete\", false);\n }",
"public function postTesting() {}",
"protected function validatePOST() {\n return true;\n }",
"function validate_save_post()\n {\n }",
"private function checkPost() {\r\n \r\n if (!is_null(filter_input(INPUT_POST, self::FORM_NAME_GAME_ADD))) {\r\n $this->dealWithAddNewGame();\r\n } else if (!is_null(filter_input(INPUT_POST, self::FORM_NAME_GAME_EDIT))) {\r\n $this->dealWithEditGame();\r\n }\r\n }",
"public function validate_post() {\n $validation = Validator::make($this->attributes, $this->rules);\n if ($validation->passes()) {\n return TRUE;\n }\n $this->errors = $validation->messages();\n return FALSE;\n }",
"private function requested_post_is_valid(){\n return (get_post_type((int) $_GET['post_id']) === $this->post_type && get_post_status((int) $_GET['post_id']) === 'publish');\n }",
"public function testDeleteOnPost() {\n\t\t$Action = $this->_actionSuccess();\n\t\t$this->setReflectionClassInstance($Action);\n\t\t$this->callProtectedMethod('_post', array(1), $Action);\n\t}",
"public function testPostRequestShouldTriggerPostAction()\n\t{\n\t\t$this->request->setMethod('POST');\n\t\t$this->dispatch('/api/event');\n\t\t\n\t\t$this->assertModule('api');\n\t\t$this->assertController('event');\n\t\t$this->assertAction('post');\n\t}",
"protected function assertPostConditions() {\n\t\tprint \"---------------------------------------------------------------- \\n\";\n\t}",
"public static function isPost(): bool {\r\n return static :: isMethod('post');\r\n }",
"public function postTest() {}",
"public function is_post() {\n return $this->method == 'post';\n }",
"public function isPost()\n\t{\n\t\treturn $this->httpMethod() == self::MethodPost;\n\t}",
"function acf_validate_save_post()\n {\n }",
"function acf_validate_save_post()\n {\n }",
"function acf_validate_save_post()\n {\n }",
"function acf_validate_save_post()\n {\n }",
"public function isPost(): bool {}",
"public function testAddPostValidateFail() {\n\t\t$this->blogEntriesEditMock->NetCommonsWorkflow->expects($this->once())\n\t\t\t->method('parseStatus')\n\t\t\t->will($this->returnValue(1));\n\n\t\tRolesControllerTest::login($this);\n\n\t\t// validate error発生でhandleValidationError()が呼ばれる。\n\t\t$this->blogEntriesEditMock->expects($this->once())\n\t\t\t->method('handleValidationError')\n\t\t\t->with($this->isType('array'));\n\t\t$this->testAction(\n\t\t\t'/blogs/blog_entries_edit/add/1',\n\t\t\tarray(\n\t\t\t\t'method' => 'post',\n\t\t\t)\n\t\t);\n\n\t\tAuthGeneralControllerTest::logout($this);\n\t}",
"public function postAction()\n {\n // Nothing to do\n }",
"public function isPost()\n {\n return $this->_getMethod() === \\Yana\\Http\\Requests\\MethodEnumeration::POST;\n }",
"protected function test() {\n $output = true;\n $results = $this->env->post_to_api(\n \"add-post\",\n $this->state[\"fields\"], $this->state[\"files\"]\n );\n if (!$results) {\n $output = false;\n } else if (property_exists($results, \"error\")) {\n echo \"{$results->error}\\n\";\n echo \"Failed to add post (API Level).\\n\";\n $output = false;\n } else if (!Post::get_by_id($results->post->id)) {\n echo \"Failed to add post (Database Level).\\n\";\n $output = false;\n } else if (!$results->post->is_upvoted) {\n echo \"The new post is not upvoted by the logged in user.\\n\";\n $output = false;\n }\n return $output;\n }",
"public function post()\n {\n return count($_POST) > 0;\n }",
"public function checkActions() {\n if (isset($this->request_json->action)) {\n\n if (is_array($this->request_json->action)) {\n $this->request_json->action = array_pop($this->request_json->action);\n }\n $vars = array('data' => (array) $this->request_json);\n $this->hook('action_' . $this->request_json->action, $vars);\n exit;\n }\n }",
"public function isPost()\n {\n $request = $this->getRequest();\n return $request->isPost();\n }"
]
| [
"0.7193369",
"0.6864593",
"0.6773083",
"0.67485297",
"0.67264366",
"0.67017955",
"0.6691384",
"0.6637242",
"0.6620985",
"0.66118336",
"0.6546393",
"0.65440536",
"0.6527647",
"0.645493",
"0.6445409",
"0.6433633",
"0.6432179",
"0.6406805",
"0.6402916",
"0.6402916",
"0.6402916",
"0.6402916",
"0.63905",
"0.6379832",
"0.63512945",
"0.63485134",
"0.6347685",
"0.6334976",
"0.63223785",
"0.63124454"
]
| 0.8205673 | 0 |
Test ping() on unresolveable urls. | public function test_ping_unreachable() {
$webhook = LLMS_REST_API()->webhooks()->create( array(
'delivery_url' => 'https://fake.tld',
'topic' => 'course.created',
) );
remove_filter( 'llms_rest_webhook_pre_ping', '__return_true' );
$ret = $webhook->ping();
$this->assertIsWPError( $ret );
$this->assertWPErrorCodeEquals( 'llms_rest_webhook_ping_unreachable', $ret );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function purgeInvalidUrls();",
"function sanitize_trackback_urls($to_ping)\n {\n }",
"private function isUnreachable(array $ping): bool\n {\n $needles = 'perdidos|lost';\n\n $result = $ping[count($ping) - 1];\n\n $unreachable = false;\n\n foreach (explode('|', $needles) as $needle) {\n $search = strpos($result, '100% '.$needle);\n\n if ($search !== false) {\n $unreachable = true;\n break;\n }\n }\n\n return $unreachable;\n }",
"public function pingUrl($url){\n\n\t\t$url = str_replace(\"https://\", \"\", str_replace(\"http://\", \"\", str_replace(\"www.\", \"\", $url)));\n\n\t\t$url_host = explode(\"/\", $url);\n\n\t\t/* Ping the host name and set the time before and after pinging to measure load time */\n\n\t\t$startTime = microtime(true) * 1000;\n\n\t\texec(\"ping -c 1 \".$url_host[0], $out);\n\n\t\t$stopTime = microtime(true) * 1000;\n\n\t\t/* If pinging is successful return the time taken for the transaction else return false */\n\n\t\tif ($out && count($out) >= 6){\n\n\t\t\treturn ($stopTime - $startTime);\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\n\t}",
"function pre_ping( &$links ) {\n\t\tforeach ( $links as $i => $link )\n\t\t\tif ( 0 === strpos( $link, home_url() ) )\n\t\t\t\tunset( $links[$i] );\n\t}",
"public function testDoPingInvalid(){\n \tPayU::$apiLogin = 'invalidLogin';\n \tPayU::$apiKey = 'invalidKey';\n \tEnvironment::setReportsCustomUrl(PayUTestUtil::REPORTS_CUSTOM_URL);\n \n \t$response = PayUReports::doPing();\n \t$this->assertEquals(PayUResponseCode::SUCCESS, $response->code);\n }",
"function is_url_real ($url_to_shorten)\n{\n $test_flag = true;\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $url_to_shorten);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n $response = curl_exec($ch);\n if( curl_getinfo($ch, CURLINFO_HTTP_CODE) == '404' ||\n FALSE == $response )\n {\n dumper($response);\n $test_flag = false;\n }\n curl_close($ch);\n return $test_flag;\n}",
"public function test_ping_non_200_status() {\n\n\t\t$webhook = LLMS_REST_API()->webhooks()->create( array(\n\t\t\t'delivery_url' => 'https://mock.tld/400',\n\t\t\t'topic' => 'course.created',\n\t\t) );\n\n\t\tadd_filter( 'pre_http_request', array( $this, 'mock_request' ), 10, 3 );\n\t\tremove_filter( 'llms_rest_webhook_pre_ping', '__return_true' );\n\n\t\t$ret = $webhook->ping();\n\t\t$this->assertIsWPError( $ret );\n\t\t$this->assertWPErrorCodeEquals( 'llms_rest_webhook_ping_not_200', $ret );\n\n\t}",
"public function test_cannot_fetch_hits_of_invalid_shortlink()\n {\n $this->get(route('shortlink.fetch.hits', ['code' => 'invalid']))->assertStatus(404);\n }",
"public function testRejectAutomatchUrlUsingGET()\n {\n }",
"public function checkisOnCurrentHostInvalidHosts() {}",
"public function ping()\r\n {\r\n $ch = curl_init();\r\n curl_setopt($ch, CURLOPT_URL, \"http://\".WEMO_IP.\":\".WEMO_PORT);\r\n curl_setopt($ch, CURLOPT_NOBODY, true);\r\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n curl_setopt($ch, CURLOPT_VERBOSE, false);\r\n curl_setopt($ch, CURLOPT_TIMEOUT, 5);\r\n $result = curl_exec($ch);\r\n $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\r\n curl_close($ch);\r\n if($httpcode >= 200 && $httpcode <500){\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }",
"function urlOK($url)\n{\n $headers = @get_headers($url);\n if(strpos($headers[0],'200')===false){return false;}else{return true;}\n}",
"function is_url_hostname_resolvable($url) {\n\t$urlhostname = parse_url($url, PHP_URL_HOST);\n\tif (empty($urlhostname)) {\n\t\treturn false;\n\t}\n\tputenv(\"RES_OPTIONS=timeout:3 attempts:1\");\n\t$resolvable = ($urlhostname !== gethostbyname($urlhostname));\n\tputenv(\"RES_OPTIONS\");\n\treturn $resolvable;\n}",
"function checkForBadLink($url) {\n\t\t$link = getDbConnect();\n\t\t$preparedStatement = $link->prepare(\"select hash from google_safe_browsing where hash = :hash;\");\n\t\t$preparedStatement->execute(array(\":hash\" => md5($url)));\n\t\treturn count($preparedStatement->fetchAll()) == 0;\n\t}",
"function url_exists($url) {\n $a_url = parse_url($url);\n if (!isset($a_url['port'])) $a_url['port'] = 80;\n $errno = 0;\n $errstr = '';\n $timeout = 5;\n if(isset($a_url['host']) && $a_url['host']!=gethostbyname($a_url['host'])){\n $fid = @fsockopen($a_url['host'], $a_url['port'], $errno, $errstr, $timeout);\n if (!$fid) return false;\n $page = isset($a_url['path']) ?$a_url['path']:'';\n $page .= isset($a_url['query'])?'?'.$a_url['query']:'';\n fputs($fid, 'HEAD '.$page.' HTTP/1.0'.\"\\r\\n\".'Host: '.$a_url['host'].\"\\r\\n\\r\\n\");\n $head = fread($fid, 4096);\n fclose($fid);\n return preg_match('#^HTTP/.*\\s+[200|302]+\\s#i', $head);\n } else {\n return false;\n }\n }",
"function url_test( $url ) {\n $timeout = 10;\n $ch = curl_init();\n curl_setopt ( $ch, CURLOPT_URL, $url );\n curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, 1 );\n curl_setopt ( $ch, CURLOPT_TIMEOUT, $timeout );\n $http_respond = curl_exec($ch);\n $http_respond = trim( strip_tags( $http_respond ) );\n $http_code = curl_getinfo( $ch, CURLINFO_HTTP_CODE );\n if ( ( $http_code == \"200\" ) || ( $http_code == \"302\" ) ) {\n return true;\n } else {\n // return $http_code;, possible too\n return false;\n }\n curl_close( $ch );\n}",
"public function testMissingParameterAddCheckUrl() {\n $check = $this->default_check;\n $check['url'] = null;\n $this->pingdom->addCheck($check);\n }",
"function url_exists($url){ \r\n $url_data = parse_url($url); // scheme, host, port, path, query\r\n if(!fsockopen($url_data['host'], isset($url_data['port']) ? $url_data['port'] : 80)){\r\n $this->set_message('url_exists', 'The URL you entered is not accessible.');\r\n return FALSE;\r\n } \r\n \r\n return TRUE;\r\n }",
"function helperCheckForWrongUrl() {\n\t\t$status = array();\n\n\t\tif ($GLOBALS['TSFE']->config['config']['baseURL'] != '' || $GLOBALS['TSFE']->config['config']['absRefPrefix']) {\n\t\t\t$currentDomain = t3lib_div::getIndpEnv('TYPO3_HOST_ONLY');\n\t\t\t$linkDomain = $this->pi_getPageLink($GLOBALS['TSFE']->id);\n\n\t\t\tif ($linkDomain != '' && strpos($linkDomain, $currentDomain) === false) {\n\t\t\t\t$status['current']\t= $currentDomain;\n\t\t\t\t$status['link']\t\t\t= $linkDomain;\n\t\t\t}\n\t\t}\n\n\t\treturn $status;\n\t}",
"public function badUrlProvider() {\n\n $badRedirects[\"ip: 127.0.0.1\"] = array(\"http://127.0.0.1\", false);\n\n // Anything that resolves to zero needs to be tested carefully due to falsiness\n $badRedirects[\"ip: 0\"] = array(\"http://0/data.json\", false);\n\n // Hex is bad\n $badRedirects[\"ip: hex\"] = array(\"http://0x7f000001/data.json\", false);\n\n // So is octal\n $badRedirects[\"ip: octal\"] = array(\"http://0123/data.json\", false);\n\n // We don't like mixed hex and octal either\n $badRedirects[\"ip: mixed hex/octal/decimal\"] = array(\"http://0x7f.0x0.0.0/data.json\", false);\n\n // We don't even like dotted-quads\n $badRedirects[\"ip: dotted-quad\"] = array(\"http://111.22.34.56/data.json\", false);\n\n // Don't you come around here with any of that IPv6 crap\n $badRedirects[\"ipv6: localhost\"] = array(\"http://[::1]\", false);\n\n // Domains that resolve to IPv4 localhost? NFW.\n $badRedirects[\"localhost.ip4\"] = array(\"https://localhost.ip4/\", [['type' => 'A', 'ip' => '127.0.0.1']]);\n\n // Domains that resolve to IPv6 localhost? Get out!\n $badRedirects[\"localhost.ip6\"] = array(\"https://localhost.ip6:443\", [['type' => 'AAAA', 'ipv6' => '::1']]);\n\n // Domains that resolve to IPv6 addresses that represent IPv4 private ranges? Not on our watch!\n $badRedirects[\"localhost2.ip6\"] = array(\"http://localhost2.ip6:80\", [['type' => 'AAAA', 'ipv6' => '::ffff:127.0.0.1']]);\n $badRedirects[\"private1.ip6\"] = array(\"https://private1.ip6:80\", [['type' => 'AAAA', 'ipv6' => '::ffff:192.168.1.18']]);\n $badRedirects[\"private2.ip6\"] = array(\"https://private2.ip6:80\", [['type' => 'AAAA', 'ipv6' => '::ffff:10.0.0.1']]);\n $badRedirects[\"private3.ip6\"] = array(\"http://private3.ip6:80\", [['type' => 'AAAA', 'ipv6' => '::ffff:127.0.0.2']]);\n\n // Domains that resolve to IPv6 link-local adddresses? Hell no!\n $badRedirects[\"linklocal.ip6\"] = array(\"https://linklocal.ip6/\", [['type' => 'AAAA', 'ipv6' => 'fe80::']]);\n\n return $badRedirects;\n }",
"public function test_cannot_fetch_link_from_invalid_shortlink()\n {\n $this->get(route('shortlink.fetch.link', ['code' => 'invalid']))->assertStatus(404);\n }",
"public function checkUrl($url)\n {\n $client = new Client();\n $maxCheck = 10;\n\n while ($maxCheck) {\n try {\n $request = $client->get($url)->getBody()->getContents();\n return $request;\n } catch (Exception $e) {\n if ($e->getCode() == 404) {\n //url is gone\n session()->put('errorURL', 'URL not available');\n session()->put('errorCode', 404);\n } else {\n if (array_key_exists('Host', $e->getRequest()->getHeaders())) {\n //check connection\n session()->put('errorURL', 'Time has running out. Please check the connection');\n session()->put('errorCode', 500);\n } else {\n //url must be using http or https\n session()->put('errorURL', 'Must be a valid URL.');\n session()->put('errorCode', 500);\n }\n }\n $maxCheck--;\n }\n //sleep(1);\n }\n return 0;\n }",
"public function SendHttpPing()\n\t{\n\t\tfor ( $Z = 0; $Z < count($this->url); $Z++ )\n\t\t{\n\t\t\tarray_push( $this->result_ping , exec( 'httping -c ' . $this->try_count . ' ' . $this->url[$Z] ) );\n\t\t\tif ( self::PING_ERR == $this->result_ping[$Z] )\n\t\t\t{\n\t\t\t\t$this->result_ping[$Z]='';\n\t\t\t}\n\t\t}\n\n\t\t/* Data Setting */\n\t\t$this->CheckHttpResponse();\t\n\t}",
"function url_exists($url){\n\t$url = str_replace(\"http://\", \"\", $url);\n\tif (strstr($url, \"/\")) {\n\t\t$url = explode(\"/\", $url, 2);\n\t\t$url[1] = \"/\".$url[1];\n\t} else {\n\t\t$url = array($url, \"/\");\n\t}\n\n\t$fh = fsockopen($url[0], 80);\n\tif ($fh) {\n\t\tfputs($fh,\"GET \".$url[1].\" HTTP/1.1\\nHost:\".$url[0].\"\\n\\n\");\n\t\tif (fread($fh, 22) == \"HTTP/1.1 404 Not Found\") { return FALSE; }\n\t\telse { return TRUE; }\n\n\t} else { \n\t\t//echo '<p>no fh</p>';\n\t\treturn FALSE;\n\t}\n}",
"public function checkPageUnavailableHandler() {}",
"private function checkUrlStatus()\n {\n $request = curl_init($this->url);\n\n curl_setopt($request, CURLOPT_HEADER, true);\n curl_setopt($request, CURLOPT_NOBODY, true);\n curl_setopt($request, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($request, CURLOPT_TIMEOUT, 10);\n\n curl_exec($request);\n $httpCode = curl_getinfo($request, CURLINFO_HTTP_CODE);\n curl_close($request);\n\n if ($httpCode >= 200 && $httpCode < 400) {\n return true;\n }\n\n return false;\n }",
"function test_link($url){\n ini_set('default_socket_timeout', 1);\n\n if(!$fp = @fopen($url, \"r\")) {\n return false;\n } else {\n fclose($fp);\n return true;\n }\n\n}",
"public function testErrorIsThrownIfURLNotFound()\n {\n $this->mockHttpResponses([new Response(404, [], view('tests.google-404')->render())]);\n\n self::$importer->get('google-not-found-url', now()->subYear(), now()->addYear());\n }",
"public function ping() {\n\t\t# Stub. Not essential to override.\n\t\treturn true;\n\t}"
]
| [
"0.6295189",
"0.6264078",
"0.6139497",
"0.60235614",
"0.6020266",
"0.59973687",
"0.59854585",
"0.5954944",
"0.58971256",
"0.5896851",
"0.5878519",
"0.577199",
"0.5758186",
"0.57438564",
"0.57373136",
"0.5736262",
"0.5716192",
"0.5661775",
"0.56495243",
"0.56481093",
"0.56447625",
"0.5642327",
"0.55866295",
"0.5561271",
"0.5551181",
"0.5541001",
"0.55358034",
"0.55345625",
"0.5518682",
"0.5504893"
]
| 0.68528694 | 0 |
Test ping() on non 200 responses. | public function test_ping_non_200_status() {
$webhook = LLMS_REST_API()->webhooks()->create( array(
'delivery_url' => 'https://mock.tld/400',
'topic' => 'course.created',
) );
add_filter( 'pre_http_request', array( $this, 'mock_request' ), 10, 3 );
remove_filter( 'llms_rest_webhook_pre_ping', '__return_true' );
$ret = $webhook->ping();
$this->assertIsWPError( $ret );
$this->assertWPErrorCodeEquals( 'llms_rest_webhook_ping_not_200', $ret );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function ping()\r\n {\r\n $ch = curl_init();\r\n curl_setopt($ch, CURLOPT_URL, \"http://\".WEMO_IP.\":\".WEMO_PORT);\r\n curl_setopt($ch, CURLOPT_NOBODY, true);\r\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n curl_setopt($ch, CURLOPT_VERBOSE, false);\r\n curl_setopt($ch, CURLOPT_TIMEOUT, 5);\r\n $result = curl_exec($ch);\r\n $httpcode = curl_getinfo($ch, CURLINFO_HTTP_CODE);\r\n curl_close($ch);\r\n if($httpcode >= 200 && $httpcode <500){\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }",
"public function test_ping_unreachable() {\n\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\tremove_filter( 'llms_rest_webhook_pre_ping', '__return_true' );\n\n\t\t$ret = $webhook->ping();\n\t\t$this->assertIsWPError( $ret );\n\t\t$this->assertWPErrorCodeEquals( 'llms_rest_webhook_ping_unreachable', $ret );\n\n\t}",
"public function ping(){\n http_response_code(200);\n ob_end_flush();\n }",
"public function ping() {\n\t\t# Stub. Not essential to override.\n\t\treturn true;\n\t}",
"public function testDoPingInvalid(){\n \tPayU::$apiLogin = 'invalidLogin';\n \tPayU::$apiKey = 'invalidKey';\n \tEnvironment::setReportsCustomUrl(PayUTestUtil::REPORTS_CUSTOM_URL);\n \n \t$response = PayUReports::doPing();\n \t$this->assertEquals(PayUResponseCode::SUCCESS, $response->code);\n }",
"function ping() {\n $params = array();\n return $this->callServer(\"ping\", $params);\n }",
"function ping($host)\n{\n exec(sprintf('ping -c 1 -W 5 %s', escapeshellarg($host)), $res, $rval);\n return $rval === 0;\n}",
"public function testDoPing(){\n \tPayU::$apiLogin = PayUTestUtil::API_LOGIN;\n \tPayU::$apiKey = PayUTestUtil::API_KEY;\n \tEnvironment::setReportsCustomUrl(PayUTestUtil::REPORTS_CUSTOM_URL);\n\n \t \n \t$response = PayUReports::doPing();\n \t$this->assertEquals(PayUResponseCode::SUCCESS, $response->code);\n }",
"protected function Ping()\n\t{\n\t\theader(BITS_HEADER_ACK);\n\t}",
"public function ping() {\n $makeBaseURL = self::makeBaseURL($this->getConfig()['base_url']);\n $client = ObjectFactory::getGuzzleClient([\n 'base_uri' => $makeBaseURL,\n ]);\n\n return $client->get('ping');\n }",
"public function ping(): bool\n {\n $result = static::sendGetRequest(\"ping\", null);\n\n return is_object($result->getData());\n }",
"public function ping()\n\t{\n\t\t$endpoint = sprintf('/%s/admin/ping', $this->options->getContext());\n\n\t\t$query = array(\n\t\t\t'query' => array(\n\t\t\t\t'wt' => 'json'\n\t\t\t)\n\t\t);\n\n\t\t$options = array_merge($this->options->getHttpOptions(), $query);\n\n\t\t$request = $this->http->get($endpoint, array(), $options);\n\n\t\ttry {\n\t\t\t$response = $this->http->send($request);\n\t\t} catch (ClientErrorResponseException $e) {\n\t\t\treturn false;\n\t\t} catch (CurlException $e) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $response->isSuccessful();\n\t}",
"public function ping()\n {\n return $this->browser->get('_ping')->then(array($this->parser, 'expectPlain'));\n }",
"public function ping()\n {\n // And try to make the request\n try {\n $response = $this->client->post('lists', $this->config);\n $result = @json_decode($response->getBody());\n\n if ($response->getStatusCode() == 200 && $result && empty($result->error)) {\n return true;\n }\n\n Log::error(\"[SENDLANE] Failed to ping service.\");\n } catch(\\Exception $e) {\n Log::error(\"[SENDLANE] Error when pinging service. \" . $e->getMessage());\n }\n\n return false;\n }",
"public function ping()\n {\n }",
"public function SendHttpPing()\n\t{\n\t\tfor ( $Z = 0; $Z < count($this->url); $Z++ )\n\t\t{\n\t\t\tarray_push( $this->result_ping , exec( 'httping -c ' . $this->try_count . ' ' . $this->url[$Z] ) );\n\t\t\tif ( self::PING_ERR == $this->result_ping[$Z] )\n\t\t\t{\n\t\t\t\t$this->result_ping[$Z]='';\n\t\t\t}\n\t\t}\n\n\t\t/* Data Setting */\n\t\t$this->CheckHttpResponse();\t\n\t}",
"public function ping()\n {\n $this->sendCommand('PING');\n return trim($this->getResponse()) === 'PONG';\n }",
"public function ping()\n {\n return $this->client->publicRequest('GET', '/api/v3/ping');\n }",
"public static function ping()\n {\n return parent::ping();\n }",
"public function ping()\n {\n return $this->get('/ping');\n }",
"protected function ping()\n {\n return parent::request('', Request::GET);\n }",
"public function isPing()\n {\n return self::STATUS_PING == $this->status;\n }",
"public function ping()\n {\n $apiCall = '/helper/ping';\n $payload = \"\";\n $data = $this->requestMonkey($apiCall, $payload);\n $data = json_decode($data, true);\n if (isset($data['error']))\n throw new MailchimpAPIException($data);\n else\n return $data['msg'];\n }",
"public function ping(): bool\n {\n $ping = $this->send(\"PING\");\n\n if($ping == \"PONG\") {\n return true;\n }\n\n $this->message = trans('clamavfileupload::clamav.not_running');\n ClamavIsNotRunning::dispatch();\n\n return false;\n }",
"public function ping(): array;",
"public function pingUrl($url){\n\n\t\t$url = str_replace(\"https://\", \"\", str_replace(\"http://\", \"\", str_replace(\"www.\", \"\", $url)));\n\n\t\t$url_host = explode(\"/\", $url);\n\n\t\t/* Ping the host name and set the time before and after pinging to measure load time */\n\n\t\t$startTime = microtime(true) * 1000;\n\n\t\texec(\"ping -c 1 \".$url_host[0], $out);\n\n\t\t$stopTime = microtime(true) * 1000;\n\n\t\t/* If pinging is successful return the time taken for the transaction else return false */\n\n\t\tif ($out && count($out) >= 6){\n\n\t\t\treturn ($stopTime - $startTime);\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\n\t}",
"function wooflash_get_ping_status() {\n // Generate a token based on necessary parameters.\n\n $ts = wooflash_get_isotime();\n\n try {\n $accesskeyid = get_config('wooflash', 'accesskeyid');\n } catch (Exception $e) {\n // Could not get access key id => ping can be considered failed.\n return false;\n }\n\n $data_token = [\n 'accessKeyId' => $accesskeyid,\n 'ts' => $ts,\n 'version' => get_config('mod_wooflash')->version,\n ];\n $data = [\n 'accessKeyId' => $accesskeyid,\n 'ts' => $ts,\n 'token' => wooflash_generate_token('PING?' . wooflash_http_build_query($data_token)),\n 'version' => get_config('mod_wooflash')->version,\n ];\n\n $ping_url = wooflash_get_ping_url();\n\n // Use curl to make a call and check the result.\n\n $curl = new wooflash_curl();\n $headers = [];\n $headers[0] = \"Content-Type: application/json\";\n $headers[1] = \"X-Wooflash-PluginVersion: \" . get_config('mod_wooflash')->version;\n $curl->setHeader($headers);\n $response = $curl->get(\n $ping_url . '?' . wooflash_http_build_query($data)\n );\n $curlinfo = $curl->info;\n\n if (!$response || !is_array($curlinfo) || $curlinfo['http_code'] != 200) {\n return false;\n }\n\n $response_data = json_decode($response);\n return $response_data->keysAreValid;\n}",
"function handle_ping()\n{\n global $ctx;\n $rs = &$ctx['rs'];\n $rs['endpoint'] = $ctx['endpoint'];\n $rs['success'] = TRUE;\n $rs['msg'] = 'pong';\n\n return json_encode($ctx['rs']);\n}",
"public function getIsAlive() {\n $response = RiiakUtils::httpRequest('GET', RiiakUtils::buildUrl($this) . '/ping');\n return ($response != NULL) && ($response['body'] == 'OK');\n }",
"public function ping()\n {\n try {\n $this->pdo->query('SELECT 1');\n } catch (PDOException $e) {\n return false;\n }\n\n return true;\n }"
]
| [
"0.74605244",
"0.72552174",
"0.72188735",
"0.6934992",
"0.6770625",
"0.66013384",
"0.65839064",
"0.6576252",
"0.65338784",
"0.6524114",
"0.65189195",
"0.6494526",
"0.6441195",
"0.64316696",
"0.64275175",
"0.6398713",
"0.63833714",
"0.63263375",
"0.63076246",
"0.62390965",
"0.6235091",
"0.6221909",
"0.61529166",
"0.6149646",
"0.6144287",
"0.6131587",
"0.60759467",
"0.6062701",
"0.60567284",
"0.5971976"
]
| 0.77054477 | 0 |
Test the delivery failure setter. | public function test_set_delivery_failure() {
$webhook = LLMS_REST_API()->webhooks()->create( array(
'delivery_url' => 'https://mock.tld',
'topic' => 'student.created',
'status' => 'active',
) );
$i = 1;
while ( $i <= 6 ) {
$webhook = LLMS_Unit_Test_Util::call_method( $webhook, 'set_delivery_failure' );
$this->assertEquals( $i, $webhook->get( 'failure_count' ) );
$this->assertEquals( 6 === $i ? 'disabled' : 'active', $webhook->get( 'status' ) );
$i++;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setFailure()\n\t{\n\t\t$this->assert_succeed=false;\n\t\treturn $this;\n\t}",
"public function testFaultyProperties()\n {\n $international = new International();\n\n try {\n $international->setProduct(str_repeat('a', 10));\n $this->fail('BpostInvalidValueException not launched');\n } catch (BpostInvalidValueException $e) {\n // Nothing, the exception is good\n } catch (Exception $e) {\n $this->fail('BpostInvalidValueException not caught');\n }\n\n // Exceptions were caught,\n $this->assertTrue(true);\n }",
"public function testStoreMethodGivenFailedValidation()\n {\n $listener = m::mock('\\Orchestra\\Contracts\\Auth\\Listener\\PasswordResetLink');\n $validator = m::mock('\\Orchestra\\Foundation\\Validations\\AuthenticateUser');\n $resolver = m::mock('\\Illuminate\\Contracts\\Validation\\Validator');\n $password = m::mock('\\Illuminate\\Contracts\\Auth\\PasswordBroker');\n\n $input = $this->getStoreInput();\n\n $stub = new PasswordBroker($validator, $password);\n\n $validator->shouldReceive('validate')->once()->with($input)->andReturn($resolver);\n $resolver->shouldReceive('fails')->once()->andReturn(true)\n ->shouldReceive('getMessageBag')->once()->andReturn([]);\n $listener->shouldReceive('resetLinkFailedValidation')->once()->with([])->andReturn('reset.failed.validation');\n\n $this->assertEquals('reset.failed.validation', $stub->store($listener, $input));\n }",
"public function testSetInvalidProperty() {\n $permission = new GroupPermission();\n $permission->set('invalid property', 'a value');\n }",
"function setFailMsg($msg) { $this->_failMsg = $msg; }",
"public function setFailed()\n {\n $this->attributes['status'] = 'failed';\n self::save();\n }",
"public function setFailed()\n {\n $this->attributes['status'] = 'failed';\n self::save();\n }",
"public function testFailure()\n {\n $this->_package->fail(\"Failed test\");\n $this->assertFalse($this->_result->wasSuccessful());\n }",
"public function setFailed()\n {\n $this->update(['status' => static::STATUS_FAILED]);\n }",
"public function testFailureHandling()\n {\n $connection = new Connection();\n\n $this->assertFalse($connection->isFailureExpected(), 'No failure code set yet');\n $this->assertFalse(\n $connection->isFailureExpected(Connection::FAIL_COND_SEARCH),\n 'None planned for the search scope either'\n );\n $this->assertFalse(\n $connection->isFailureExpected(Connection::FAIL_COND_PERSIST),\n 'None planned for the persistence scope either'\n );\n\n $connection->setFailure();\n $this->assertTrue($connection->isFailureExpected(), 'Default failure registered');\n $this->assertTrue(\n $connection->isFailureExpected(Connection::FAIL_COND_SEARCH),\n 'Defaults covers also search scope'\n );\n $this->assertTrue(\n $connection->isFailureExpected(Connection::FAIL_COND_PERSIST),\n 'Defaults covers also persistence scope'\n );\n\n $connection->setFailure(Connection::ERR_SIZE_LIMIT);\n $this->assertTrue(\n $connection->isFailureExpected(),\n 'Code is set but all scopes should still be covered'\n );\n $this->assertTrue(\n $connection->isFailureExpected(Connection::FAIL_COND_SEARCH),\n 'Overall scope covers also search scope'\n );\n $this->assertTrue(\n $connection->isFailureExpected(Connection::FAIL_COND_PERSIST),\n 'Overall scope covers also persistence scope'\n );\n\n $connection->setFailure(Connection::ERR_DEFAULT, Connection::FAIL_COND_SEARCH);\n $this->assertFalse(\n $connection->isFailureExpected(),\n 'Only the search scope will trigger the failure'\n );\n $this->assertTrue(\n $connection->isFailureExpected(Connection::FAIL_COND_SEARCH),\n 'Search scope is indeed covered'\n );\n $this->assertFalse(\n $connection->isFailureExpected(Connection::FAIL_COND_PERSIST),\n 'Persistence scope does not match the expected scope'\n );\n\n $connection->setFailure(Connection::ERR_DEFAULT, Connection::FAIL_COND_PERSIST);\n $this->assertFalse(\n $connection->isFailureExpected(),\n 'Only the persistence scope will trigger the failure'\n );\n $this->assertFalse(\n $connection->isFailureExpected(Connection::FAIL_COND_SEARCH),\n 'Search scope does not match the expected scope'\n );\n $this->assertTrue(\n $connection->isFailureExpected(Connection::FAIL_COND_PERSIST),\n 'Persistence scope is indeed covered'\n );\n }",
"public function testCanSetAndGetDeliveryPoint()\n {\n $mockDeliveryPoint = '6300 Ocean Dr';\n\n $this->dataCenter->setDeliveryPoint($mockDeliveryPoint);\n\n $this->assertEquals($mockDeliveryPoint, $this->dataCenter->getDeliveryPoint());\n }",
"function testResendPassword() {\n $this->assertFalse($this->oObject->resendPassword());\n }",
"public function setFailed()\n {\n $this->attributes['status'] = 4;\n self::save();\n }",
"public function testSendFailure()\n {\n $this->setMockHttpResponse('JsonPurchaseResponseFailure.txt');\n $response = $this->request->send();\n\n $data = $this->request->getData();\n\n $code = $response->response->getStatusCode();\n $this->assertFalse($response->isSuccessful());\n $this->assertEquals(500, $data['amount']);\n $this->assertEquals(200, $code);\n $this->assertNull($response->getCode());\n $this->assertSame(\"REFUSED\", $response->getMessage());\n $this->assertSame('e0bf69e8-8c98-4e01-893b-d040fa41dd9b', $response->getTransactionReference());\n $this->assertSame('TEST_RU_7a22d2ec-6725-48b7-b8e7-243f03914b27', $response->getCardReference());\n }",
"public function testSetMaxLengthFailsWithStringValue() {\r\n\t\ttry {\r\n\t\t\t// first test negative number length is not allowed - should throw exception\r\n\t\t\t$this->testObject->setMaxLength ( 'abc' );\r\n\t\t} \r\n\r\n\t\tcatch ( Exception $expected ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t$this->fail ( 'an expected exception has not been raised.' );\r\n\t}",
"public function test_event_notification_with_failed_notification()\n {\n $this->event_notification_helper('failed_event_method', false);\n }",
"public function testOtherError()\n {\n $expectedBody = $this->getExpectedBody(\n [\n ['SKU' => 'test123']\n ],\n []\n );\n\n $this->mockEndpoint();\n $this->mockCurl($expectedBody, 200, 'An error response', 'An error');\n\n $error = '';\n try {\n $this->subject->addData(['SKU' => 'test123']);\n $response = $this->subject->send();\n\n $this->assertEquals(\n 'An error response',\n $response[0]['body']\n );\n } catch (Exception $e) {\n $error = $e->getMessage();\n }\n\n $this->assertEquals(\n 'Error: An error',\n $error\n );\n }",
"function testResendVerification() {\n $this->assertFalse($this->oObject->resendVerification());\n }",
"public function testUpdateMethodGivenFailed()\n {\n $listener = m::mock('\\Orchestra\\Contracts\\Auth\\Listener\\PasswordReset');\n $validator = m::mock('\\Orchestra\\Foundation\\Validations\\AuthenticateUser');\n $password = m::mock('\\Illuminate\\Contracts\\Auth\\PasswordBroker');\n\n $input = $this->getUpdateInput();\n\n $stub = new PasswordBroker($validator, $password);\n\n $password->shouldReceive('reset')->once()\n ->with($input, m::type('Closure'))\n ->andReturnUsing(function ($d, $c) {\n return Password::INVALID_TOKEN;\n });\n $listener->shouldReceive('passwordResetHasFailed')->once()->with(Password::INVALID_TOKEN)->andReturn('reset.failed');\n\n $this->assertEquals('reset.failed', $stub->update($listener, $input));\n }",
"public function testIsValidException()\n\t{\n\t\t$data = $this->getMock('Blackbox_Data', array());\n\t\t$data->expects($this->never())->method('__set');\n\t\t$data->expects($this->never())->method('__unset');\n\n\t\t$this->target->isValid($data, $this->state_data);\n\t}",
"public function test_if_failed_update()\n {\n }",
"public function failure(){\n\t}",
"public function failed()\n {\n $this->status = JSendResponse::STATUS_FAIL;\n\n return $this;\n }",
"public function testDownloadChangesetFailure()\n\t{\n\t\t$id = '123';\n\n\t\t$returnData = new stdClass;\n\t\t$returnData->code = 500;\n\t\t$returnData->body = $this->errorString;\n\t\t$returnData->create = new SimpleXMLElement($this->sampleXml);\n\n\t\t$path = 'changeset/' . $id . '/download';\n\n\t\t$this->client->expects($this->once())\n\t\t->method('get')\n\t\t->with($path)\n\t\t->will($this->returnValue($returnData));\n\n\t\t$this->object->downloadChangeset($id);\n\t}",
"public function testSetMaxLengthFailsWithNegativeValue() {\r\n\t\ttry {\r\n\t\t\t// first test negative number length is not allowed - should throw exception\r\n\t\t\t$this->testObject->setMaxLength ( - 1 );\r\n\t\t} \r\n\r\n\t\tcatch ( Exception $expected ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t$this->fail ( 'an expected exception has not been raised.' );\r\n\t}",
"public function testRetrieveUnsuccessfulReason()\n {\n }",
"public function __set( $propertyName, $propertyValue )\n {\n throw new Atc_Mail_Transport_Exception( 'Invalid property assignment: ' . $propertyName . ' => ' . $propertyValue );\n }",
"public function testIsFailure()\n\t{\n\t\t/* default value of a filter is false */\n\t\t$this->assertFalse($this->filter->isFailure());\n\t}",
"public function testToFail()\n {\n $this->assertTrue(false, 'He sido creada para fallar');\n }",
"public function setDelivery($value)\n {\n return $this->set(self::delivery, $value);\n }"
]
| [
"0.66873527",
"0.6552462",
"0.6300537",
"0.6157473",
"0.6115165",
"0.6106833",
"0.6106833",
"0.61029744",
"0.60515296",
"0.6012674",
"0.5961611",
"0.59534323",
"0.5908091",
"0.5804586",
"0.5784538",
"0.57357496",
"0.5735722",
"0.57313514",
"0.57271254",
"0.5703072",
"0.5690825",
"0.56715834",
"0.5659287",
"0.5598641",
"0.55775905",
"0.55417055",
"0.5539281",
"0.55134594",
"0.5485544",
"0.54788023"
]
| 0.7385457 | 0 |
Test the status condition of the should_deliver() method. | public function test_should_deliver_status() {
$webhook = LLMS_REST_API()->webhooks()->create( array(
'delivery_url' => 'https://mock.tld',
'topic' => 'student.created',
) );
// Inactive.
$this->assertFalse( LLMS_Unit_Test_Util::call_method( $webhook, 'should_deliver', array( array( $this->factory->student->create() ) ) ) );
// Active.
$webhook->set( 'status', 'active' )->save();
$this->assertTrue( LLMS_Unit_Test_Util::call_method( $webhook, 'should_deliver', array( array( $this->factory->student->create() ) ) ) );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function isRedelivered();",
"public function testGetEmailSendStatusForRecipient()\n {\n $eventCategories = [\n \"TransactionalSendEvents.EmailSent\",\n \"TransactionalSendEvents.EmailQueued\",\n \"TransactionalSendEvents.EmailNotSent\"\n ];\n\n $client = $this->getClient();\n\n // Create the email definition\n $provisioner = new EmailDefinitionProvisioner();\n $provisioner->setContainer($this->container);\n\n $definition = $provisioner->provision(EmailDefinitionProvider::getTestModel());\n $definition = $client->createEmailDefinition($definition);\n\n // Construct the email request\n $recipient = RecipientProvider::getTestModel();\n $messageKey = $recipient->getMessageKey();\n $recipient->setMessageKey(null);\n\n $messageRequestBody = new SendEmailToSingleRecipientRequest([\n \"definitionKey\" => $definition->getDefinitionKey(),\n \"recipient\" => $recipient\n ]);\n\n // SUT\n $client->sendEmailToSingleRecipient($messageKey, $messageRequestBody);\n\n // Effect check\n $result = $client->getEmailSendStatusForRecipient($messageKey);\n\n try {\n Assert::assertNotNull($result->getRequestId());\n Assert::assertContains($result->getEventCategoryType(), $eventCategories);\n } catch (ExpectationFailedException $e) {\n throw $e;\n } finally {\n $client->deleteEmailDefinition($definition->getDefinitionKey());\n $provisioner->deplete($definition);\n }\n }",
"function testDelayed() {\n \t\t$message = AngieApplication::mailer()->send(new AnonymousUser('Ilija', '[email protected]'), 'Test simple', 'Testing quick send', array(\n \t\t 'sender' => new AnonymousUser('Ilija Studen', '[email protected]'), \n \t\t), AngieMailerDelegate::SEND_DAILY);\n \t\t\n \t\t$this->assertIsA($message, 'OutgoingMessage');\n \t\t\n \t\t$this->assertTrue($message->isLoaded());\n \t\t$this->assertEqual($message->getSenderName(), 'Ilija Studen');\n \t\t$this->assertEqual($message->getSenderEmail(), '[email protected]');\n \t\t$this->assertEqual($message->getSubject(), 'Test simple');\n \t\t$this->assertEqual($message->getBody(), 'Testing quick send');\n \t\t$this->assertEqual($message->getMailingMethod(), AngieMailerDelegate::SEND_DAILY);\n \t}",
"public function test_should_deliver_already_processed() {\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\t'status' => 'active',\n\t\t) );\n\n\t\t$student_id = $this->factory->student->create();\n\n\t\t// Not processed.\n\t\t$this->assertTrue( LLMS_Unit_Test_Util::call_method( $webhook, 'should_deliver', array( array( $student_id ) ) ) );\n\n\t\t// Process the hook.\n\t\t$webhook->process_hook( $student_id );\n\n\t\t// Processed.\n\t\t$this->assertFalse( LLMS_Unit_Test_Util::call_method( $webhook, 'should_deliver', array( array( $student_id ) ) ) );\n\n\t}",
"public function testSendEmailSuccess()\r\n {\r\n $client = $this->createAuthenticatedClient(\"superadmin\", \"123456\");\r\n $container = $client->getContainer();\r\n\r\n $entityManager = $container->get('doctrine.orm.entity_manager');\r\n $user = $entityManager->getRepository('Yilinker:User')\r\n ->findOneBy(array(\"username\" => \"superadmin\"));\r\n\r\n $verificationService = new Verification($entityManager);\r\n $verificationService->createVerificationToken($user);\r\n\r\n // Enable the profiler for the next request (it does nothing if the profiler is not available)\r\n $client->enableProfiler();\r\n\r\n $client->request('GET', '/user/send-verification');\r\n\r\n $mailCollector = $client->getProfile()\r\n ->getCollector('swiftmailer');\r\n\r\n // Check that an email was sent\r\n $this->assertEquals(1, $mailCollector->getMessageCount());\r\n\r\n $collectedMessages = $mailCollector->getMessages();\r\n $message = $collectedMessages[0];\r\n\r\n // Asserting email data\r\n $this->assertInstanceOf('Swift_Message', $message);\r\n $this->assertEquals('Yilinker Account Confirmation', $message->getSubject());\r\n $this->assertEquals('[email protected]', key($message->getFrom()));\r\n $this->assertEquals($user->getEmail(), key($message->getTo()));\r\n }",
"public function isValidForDelivery();",
"protected function checkStatus()\n {\n $status = $this->autoTestController->checkStatus(Tools::getValue('queueItemId', 0));\n\n if ($status['finished']) {\n $this->autoTestController->stop(\n function () {\n return LoggerService::getInstance();\n }\n );\n }\n\n PacklinkPrestaShopUtility::dieJson($status);\n }",
"function testSendMail()\n {\n $result = $this->mailgunModel->sendMail($this->dataTest);\n $this->assertEquals(\"200\", $result->http_response_code);\n $this->assertEquals(\"Queued. Thank you.\", $result->http_response_body->message);\n $this->assertNotNull($result->http_response_body->id);\n }",
"public function isDelivered() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn InputValidator::isEmpty($this->deliveryDate) ? false: true;\r\n\t}",
"public function test_set_delivery_failure() {\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\t'status' => 'active',\n\t\t) );\n\n\t\t$i = 1;\n\t\twhile ( $i <= 6 ) {\n\n\t\t\t$webhook = LLMS_Unit_Test_Util::call_method( $webhook, 'set_delivery_failure' );\n\n\t\t\t$this->assertEquals( $i, $webhook->get( 'failure_count' ) );\n\t\t\t$this->assertEquals( 6 === $i ? 'disabled' : 'active', $webhook->get( 'status' ) );\n\t\t\t$i++;\n\n\t\t}\n\n\t}",
"public function testStatusDone()\n\t{\n\t\t$service = $this->getService();\n\t\t$this->mockResponseFromFile('catalogs.publish.done');\n\t\t$response = $service->publishStatus()->pin(\"DEADBEEF\")->execute();\n\t\t$this->assertIsArray($response);\n\t\t$this->assertArrayHasKey('kind', $response);\n\t\t$this->assertArrayHasKey('selfLink', $response);\n\t\t$this->assertArrayHasKey('status', $response);\n\t\t$this->assertEquals('store#catalogPublishStatus', $response['kind']);\n\t\t$this->assertEquals('done', $response['status']);\n\t}",
"public function test_queue_mail()\n {\n $user = User::factory()->create();\n $brand = new Brand();\n\n Mail::fake();\n Mail::to($user->email)->send(new ConfirmBrandDelete($brand));\n Mail::assertSent(ConfirmBrandDelete::class);\n }",
"public function test_deliverOrder_deliverInvoiceOrder_without_orderrows_use_admin_service_deliverOrders_and_is_accepted() {\n $createOrderBuilder = TestUtil::createOrder(); \n $createResponse = $createOrderBuilder->useInvoicePayment()->doRequest();\n\n $this->assertEquals(1, $createResponse->accepted);\n \n $orderId = $createResponse->sveaOrderId; \n $DeliverOrderBuilder = WebPay::deliverOrder( Svea\\SveaConfig::getDefaultConfig() )\n //->addOrderRow( TestUtil::createOrderRow() )\n ->setCountryCode(\"SE\")\n ->setOrderId( $orderId )\n ->setInvoiceDistributionType(\\DistributionType::POST)\n ;\n \n // example of raw deliver orders response to parse\n //\n //stdClass Object\n //(\n // [ErrorMessage] => \n // [ResultCode] => 0\n // [OrdersDelivered] => stdClass Object\n // (\n // [DeliverOrderResult] => stdClass Object\n // (\n // [ClientId] => 79021\n // [DeliveredAmount] => 250.00\n // [DeliveryReferenceNumber] => 1033890\n // [OrderType] => Invoice\n // [SveaOrderId] => 414157\n // )\n //\n // )\n //\n //) \n $deliverResponse = $DeliverOrderBuilder->deliverInvoiceOrder()->doRequest();\n \n ////print_r( $deliverResponse ); \n //Svea\\AdminService\\DeliverOrdersResponse Object\n //(\n // [clientId] => 79021\n // [amount] => 250.00\n // [invoiceId] => \n // [contractNumber] => \n // [orderType] => Invoice\n // [orderId] => 414168\n // [accepted] => 1\n // [resultcode] => 0\n // [errormessage] => \n //)\n \n $this->assertInstanceOf( \"Svea\\AdminService\\DeliverOrdersResponse\", $deliverResponse );\n $this->assertEquals(1, $deliverResponse->accepted);\n $this->assertEquals(0, $deliverResponse->resultcode);\n $this->assertEquals(null, $deliverResponse->errormessage);\n \n $this->assertEquals( 79021, $deliverResponse->clientId );\n $this->assertEquals( 250.00, $deliverResponse->amount);\n $this->assertStringMatchesFormat( \"%d\", $deliverResponse->invoiceId); // %d => an unsigned integer value\n $this->assertEquals( null, $deliverResponse->contractNumber);\n $this->assertEquals( \"Invoice\", $deliverResponse->orderType);\n $this->assertStringMatchesFormat( \"%d\", $deliverResponse->orderId); // %d => an unsigned integer value\n }",
"function send() {\n\t\ttry {\n\t\t\tif ( ! $this->preSend() )\n\t\t\t\treturn false;\n\n\t\t\t$this->mock_sent[] = array(\n\t\t\t\t'to' => $this->to,\n\t\t\t\t'cc' => $this->cc,\n\t\t\t\t'bcc' => $this->bcc,\n\t\t\t\t'header' => $this->MIMEHeader,\n\t\t\t\t'body' => $this->MIMEBody,\n\t\t\t);\n\n\t\t\treturn true;\n\t\t} catch ( phpmailerException $e ) {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function testGetSmsSendStatusForRecipient()\n {\n $eventCategories = [\n \"TransactionalSendEvents.SMSSent\",\n \"TransactionalSendEvents.SMSQueued\",\n \"TransactionalSendEvents.SMSNotSent\"\n ];\n\n $client = $this->getClient();\n\n // Create the email definition\n $provisioner = new SmsDefinitionProvisioner();\n $provisioner->setContainer($this->container);\n\n $definition = $provisioner->provision(SmsDefinitionProvider::getTestModel());\n $definition = $client->createSmsDefinition($definition);\n\n // Construct the email request\n $recipient = RecipientProvider::getTestModel();\n $messageKey = $recipient->getMessageKey();\n $recipient->setMessageKey(null);\n\n $body = new SendSmsToSingleRecipientRequest([\n \"definitionKey\" => $definition->getDefinitionKey(),\n \"recipient\" => $recipient\n ]);\n\n // SUT\n $client->sendSmsToSingleRecipient($messageKey, $body);\n\n // Effect check\n $result = $client->getSmsSendStatusForRecipient($messageKey);\n\n try {\n Assert::assertNotNull($result->getRequestId());\n Assert::assertContains($result->getEventCategoryType(), $eventCategories);\n } catch (ExpectationFailedException $e) {\n throw $e;\n } finally {\n $client->deleteSmsDefinition($definition->getDefinitionKey());\n $provisioner->deplete($definition);\n }\n }",
"public function isRedelivery();",
"public function testStatusConfirm()\n {\n\n }",
"protected function sendTestMail() {}",
"public function testSend()\n {\n $message = new Message($this->getMessage());\n\n $message->from('[email protected]', 'ExampleSender')\n ->to($this->sinkRecipient, 'Destination Recipient');\n\n /*\n $res = $this->transport->send($message->getSwiftMessage());\n */\n\n $this->assertEquals(1, $res);\n }",
"public function test_manual_deliverOrder_deliverCardOrder_use_ConfirmTransaction_and_is_accepted() {\n $this->markTestIncomplete(\n 'skeleton for manual test, needs a pre-existing card transactionId with status AUTHORIZED'\n );\n \n // 1. remove (put in a comment) the above code to enable the test\n // 2. run the test, and check status of transaction in backoffice logs\n \n $orderId = 585714; // pre-existing card transactionId with status AUTHORIZED \n \n $DeliverOrderBuilder = WebPay::deliverOrder( Svea\\SveaConfig::getDefaultConfig() )\n ->setCountryCode(\"SE\")\n ->setOrderId( $orderId )\n ;\n \n $response = $DeliverOrderBuilder->deliverCardOrder()->doRequest();\n\n ////print_r( $response );\n $this->assertEquals(1, $response->accepted);\n $this->assertInstanceOf( \"Svea\\HostedService\\ConfirmTransactionResponse\", $response ); \n }",
"public function test_send_email_have_clean_exit()\n {\n $company = factory(Company::class)->create();\n $this->mockEmail(\n env('MAIL_FROM_ADDRESS'),\n env('MAIL_FROM_NAME'),\n $company,\n 'Licence Reminder',\n 'emails.company-reminder'\n );\n\n $this->seeInDatabase('companies', ['id' => $company->id]);\n\n $sendEmail = new ActionCommandSendReminderEmailCommand($company->id);\n $actualNumberOfEmailSent = $sendEmail->execute();\n\n $this->assertEquals(1, $actualNumberOfEmailSent);\n }",
"public function testSendSuccess()\n {\n $this->setMockHttpResponse('RefundRequestSuccess.txt');\n\n $this->request->setPassword($this->password);\n /** @var RefundResponse $response */\n $response = $this->request->send();\n\n $this->assertTrue($response->isSuccessful());\n $this->assertEquals($response->getCode(), 0);\n $this->assertEquals($response->getOrderId(), 487016);\n $this->assertEquals($response->getOperationId(), 359999);\n }",
"public function testSendEmailNotification()\n {\n // Set obj_reference to a task\n $task = $this->entityLoader->create(\"task\");\n $task->setValue(\"name\", \"A test task\");\n $this->entityLoader->save($task);\n $this->testEntities[] = $task;\n\n // Create a new notification\n $notification = $this->entityLoader->create(\"notification\");\n $notification->setValue(\"f_email\", true);\n $notification->setValue(\"owner_id\", $this->testUser->getId());\n $notification->setValue(\"creator_id\", $this->user->getId());\n $notification->setValue(\"obj_reference\", \"task:\" . $task->getId(), $task->getName());\n\n // Setup testable transport\n $transport = new InMemory();\n $notification->setMailTransport($transport);\n\n // Call onBeforeSave manually\n $notification->onBeforeSave($this->account->getServiceManager());\n\n $message = $transport->getLastMessage();\n\n // Make sure the message was sent to the owner_id\n $this->assertEquals(\n $this->testUser->getValue(\"email\"),\n $message->getTo()->current()->getEmail()\n );\n\n // Check that we sent from the creator name\n $this->assertEquals(\n $this->user->getName(),\n $message->getFrom()->current()->getName()\n );\n\n // Make sure dropbox email is generated for replying to\n $this->assertContains(\n $this->account->getName() . \"-com-task.\" . $task->getId(),\n $message->getFrom()->current()->getEmail()\n );\n }",
"function deliverOrder($orderNum)\n\t\t{\n\t\t\t$db = dbConnect::getInstance();\n \t\t $mysqli = $db->getConnection();\n\t\t\t $query = \" update check_tb set status = '2' where id='\".$orderNum.\"' \"; \n $res=$mysqli->query($query) or die (mysqli_error($mysqli));\n $mysqli->query(\"CREATE EVENT updateStatus\".$orderNum.\" ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 MINUTE DO \n \tupdate check_tb set status = '1' where id='\".$orderNum.\"' ;\n \t\") or die (mysqli_error($mysqli));\n\t\t\tif($res)\n\t\t\t{\n\n\t\t\t\treturn true;\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\t\n\t\t\t}\n\t\t}",
"public function testIsAvailableSuccess()\n {\n $orderId = 123;\n\n /** @var CaseInterface|\\PHPUnit_Framework_MockObject_MockObject $case */\n $case = $this->getMockBuilder(CaseInterface::class)\n ->disableOriginalConstructor()\n ->getMock();\n\n $case->expects($this->once())\n ->method('getGuaranteeDisposition')\n ->willReturn(CaseEntity::GUARANTEE_APPROVED);\n\n $this->caseManagement->expects($this->once())\n ->method('getByOrderId')\n ->with($orderId)\n ->willReturn($case);\n\n /** @var OrderInterface|\\PHPUnit_Framework_MockObject_MockObject $order */\n $order = $this->getMockBuilder(OrderInterface::class)\n ->getMockForAbstractClass();\n\n $this->orderRepository->expects($this->once())\n ->method('get')\n ->with($orderId)\n ->willReturn($order);\n\n $this->assertTrue($this->cancelGuaranteeAbility->isAvailable($orderId));\n }",
"public function testSendEmailFail()\r\n {\r\n $client = $this->createAuthenticatedClient(\"superadmin\", \"123456\");\r\n $container = $client->getContainer();\r\n\r\n $entityManager = $container->get('doctrine.orm.entity_manager');\r\n $user = $entityManager->getRepository('Yilinker:User')->findOneBy(array(\"username\" => \"superadmin\"));\r\n $user->setIsEmailVerified(true);\r\n\r\n $verificationService = new Verification($entityManager);\r\n $verificationService->createVerificationToken($user);\r\n\r\n // Enable the profiler for the next request (it does nothing if the profiler is not available)\r\n $client->enableProfiler();\r\n\r\n $client->request('GET', '/user/send-verification');\r\n\r\n $mailCollector = $client->getProfile()->getCollector('swiftmailer');\r\n\r\n // Check that an email was not sent\r\n $this->assertEquals(0, $mailCollector->getMessageCount());\r\n }",
"public function test__it_should_be_able_to_close_stock_removal_when_products_status_is_back_or_sent()\n {\n $removal = Removal::create();\n\n // enviado\n RemovalProduct::create([\n 'stock_removal_id' => $removal->id,\n 'status' => 2,\n ]);\n\n // devolvido\n RemovalProduct::create([\n 'stock_removal_id' => $removal->id,\n 'status' => 3,\n ]);\n\n $this->json('POST', \"/api/estoque/retirada/fechar/{$removal->id}\")\n ->seeStatusCode(200);\n }",
"public function test_send_returnsSelf_ifStatusIsBad()\n\t{\n\t\t$this->url->getQuery()->setParameter('code', 301);\n\t\t\n\t\t$request = new Request\\Get((string) $this->url);\n\t\t\n\t\t$client = new Client();\n\t\t\n\t\t$this->assertSame($client, $client->send($request));\n\t\t\n\t\treturn;\n\t}",
"public function isDeliverable()\n {\n $deliverable = false;\n\n foreach ($this->getItems() as $item) {\n if ($item->Deliverable) {\n $deliverable = true;\n }\n }\n\n return $deliverable;\n }",
"public function testGet()\n\t{ \n\t\t$c = get_c();\n\n\t\t$result = $c->PostTask('tasks.add_delayed', array(4,4));\n\t\t$this->assertFalse($result->ready());\n\t\t$this->assertNull($result->result); \n\t\t$rv = $result->get();\n\t\t$this->assertEquals(8, $rv);\n\t\t$this->assertEquals(8, $result->result);\n\t\t$this->assertTrue($result->successful());\n\t}"
]
| [
"0.65737",
"0.64255226",
"0.6284848",
"0.6266403",
"0.6175211",
"0.6107369",
"0.6006396",
"0.59937835",
"0.5992358",
"0.59757423",
"0.59074706",
"0.58830893",
"0.58819234",
"0.5877905",
"0.58589333",
"0.58466536",
"0.5838033",
"0.58056027",
"0.5802977",
"0.5794272",
"0.57470304",
"0.57126707",
"0.57064307",
"0.5641944",
"0.5625085",
"0.5621521",
"0.56205153",
"0.5612993",
"0.55835754",
"0.5581395"
]
| 0.74917156 | 0 |
Test should_deliver() method with already processed hooks(). | public function test_should_deliver_already_processed() {
$webhook = LLMS_REST_API()->webhooks()->create( array(
'delivery_url' => 'https://mock.tld',
'topic' => 'student.created',
'status' => 'active',
) );
$student_id = $this->factory->student->create();
// Not processed.
$this->assertTrue( LLMS_Unit_Test_Util::call_method( $webhook, 'should_deliver', array( array( $student_id ) ) ) );
// Process the hook.
$webhook->process_hook( $student_id );
// Processed.
$this->assertFalse( LLMS_Unit_Test_Util::call_method( $webhook, 'should_deliver', array( array( $student_id ) ) ) );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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}",
"function testDelayed() {\n \t\t$message = AngieApplication::mailer()->send(new AnonymousUser('Ilija', '[email protected]'), 'Test simple', 'Testing quick send', array(\n \t\t 'sender' => new AnonymousUser('Ilija Studen', '[email protected]'), \n \t\t), AngieMailerDelegate::SEND_DAILY);\n \t\t\n \t\t$this->assertIsA($message, 'OutgoingMessage');\n \t\t\n \t\t$this->assertTrue($message->isLoaded());\n \t\t$this->assertEqual($message->getSenderName(), 'Ilija Studen');\n \t\t$this->assertEqual($message->getSenderEmail(), '[email protected]');\n \t\t$this->assertEqual($message->getSubject(), 'Test simple');\n \t\t$this->assertEqual($message->getBody(), 'Testing quick send');\n \t\t$this->assertEqual($message->getMailingMethod(), AngieMailerDelegate::SEND_DAILY);\n \t}",
"public function test_enqueue_multi_hooks() {\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' => 'enrollment.created',\n\t\t) );\n\n\t\t$this->assertFalse( has_action( 'llms_user_course_enrollment_created', array( $webhook, 'process_hook' ) ) );\n\t\t$this->assertFalse( has_action( 'llms_user_membership_enrollment_created', array( $webhook, 'process_hook' ) ) );\n\t\t$webhook->enqueue();\n\t\t$this->assertEquals( 10, has_action( 'llms_user_course_enrollment_created', array( $webhook, 'process_hook' ) ) );\n\t\t$this->assertEquals( 10, has_action( 'llms_user_membership_enrollment_created', array( $webhook, 'process_hook' ) ) );\n\n\t}",
"public function test_enqueue_single_hook() {\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$this->assertFalse( has_action( 'save_post_course', array( $webhook, 'process_hook' ) ) );\n\t\t$webhook->enqueue();\n\t\t$this->assertEquals( 10, has_action( 'save_post_course', array( $webhook, 'process_hook' ) ) );\n\n\t}",
"public function testMailHook()\n\t{\n\t\t$campaignData['client_id'] = 1;\n\t\t$campaignData['domain'] = 'mg.amsvr.co.uk';\n\t\t$campaignData['mail_from'] = new Email('[email protected]');\n\n\t\t$clientData['name'] = 'vendirun';\n\t\t$clientData['api_key'] = 'pra869z5';\n\t\t$clientData['web_hook_end_point'] = 'http://app.vendirun.local/api/v1/mailwebhook';\n\n\t\t$campaign = new Campaign($campaignData);\n\t\t$client = new Client($clientData);\n\t\t$webHookRelay = new App\\AmbitiousMailSender\\Base\\Services\\WebHookRelay\\StandardWebHookRelay();\n\n\t\t$vars = [\n\t\t\t'domain' => 'mg.amsvr.co.uk',\n\t\t\t'event' => 'dropped',\n\t\t\t'recipient' => '[email protected]'\n\t\t];\n\n\t\t$result = $webHookRelay->relay($vars, $client, new \\App\\AmbitiousMailSender\\Base\\Services\\HttpRequest\\GuzzleHttpRequest());\n\n\t\t$this->assertEquals($campaign->domain(), 'mg.amsvr.co.uk');\n\t\t$this->assertEquals($result, true);\n\t}",
"public function testReceiveNotification()\n {\n Config::set('xchainqueue.jobClass', 'MockXchainHandlerJob');\n\n $xchain_queue_helper = app('XchainQueueHelper')->mockWebhookReceiver();\n $request = $xchain_queue_helper->buildReceiveRequest();\n\n // receive the request\n $response = $xchain_queue_helper->receiveRequest($request);\n\n // check the events\n $called_events = MockXchainHandlerJob::getCalledEvents();\n PHPUnit::assertCount(1, $called_events);\n }",
"public function test_wp_mail_can_be_shortcircuited() {\n\t\t$result1 = wp_mail( WP_TESTS_EMAIL, 'Foo', 'Bar' );\n\n\t\tadd_filter( 'pre_wp_mail', '__return_false' );\n\t\t$result2 = wp_mail( WP_TESTS_EMAIL, 'Foo', 'Bar' );\n\t\tremove_filter( 'pre_wp_mail', '__return_false' );\n\n\t\t$this->assertTrue( $result1 );\n\t\t$this->assertFalse( $result2 );\n\t}",
"private function prepareForTests()\n {\n \\Mail::pretend(true);\n }",
"public function isRedelivered();",
"protected function sendTestMail() {}",
"public function test_enqueue_custom_action() {\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' => 'action.mock_hook',\n\t\t) );\n\n\t\t$this->assertFalse( has_action( 'mock_hook', array( $webhook, 'process_hook' ) ) );\n\t\t$webhook->enqueue();\n\t\t$this->assertEquals( 10, has_action( 'mock_hook', array( $webhook, 'process_hook' ) ) );\n\n\t}",
"public function test_set_delivery_failure() {\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\t'status' => 'active',\n\t\t) );\n\n\t\t$i = 1;\n\t\twhile ( $i <= 6 ) {\n\n\t\t\t$webhook = LLMS_Unit_Test_Util::call_method( $webhook, 'set_delivery_failure' );\n\n\t\t\t$this->assertEquals( $i, $webhook->get( 'failure_count' ) );\n\t\t\t$this->assertEquals( 6 === $i ? 'disabled' : 'active', $webhook->get( 'status' ) );\n\t\t\t$i++;\n\n\t\t}\n\n\t}",
"public function test_queue_mail()\n {\n $user = User::factory()->create();\n $brand = new Brand();\n\n Mail::fake();\n Mail::to($user->email)->send(new ConfirmBrandDelete($brand));\n Mail::assertSent(ConfirmBrandDelete::class);\n }",
"public function testPostWebhooks()\n {\n }",
"public function testGetWebhookEvents()\n {\n }",
"public function testPostVoicemailMessages()\n {\n }",
"public function testEmailSend() {\n\n }",
"private function testEmail(){\n $this->user_panel->checkSecurity();\n $this->mail_handler->testEmailFunction();\n }",
"public function testEmailCampaignPost()\n {\n }",
"public function testOtherMethod()\n {\n $this->kernel->expects($this->never())\n ->method('getStore')\n ;\n $matcher = $this->getMock('Symfony\\Component\\HttpFoundation\\RequestMatcher');\n $matcher->expects($this->never())\n ->method('isRequestAllowed')\n ;\n\n $purgeSubscriber = new PurgeSubscriber([\n 'purge_client_matcher' => $matcher,\n 'purge_method' => 'FOO',\n ]);\n $request = Request::create('http://example.com/foo', 'PURGE');\n $event = new CacheEvent($this->kernel, $request);\n\n $purgeSubscriber->handlePurge($event);\n $this->assertNull($event->getResponse());\n }",
"public function testOnBeforeSend()\n {\n $this->event\n ->expects($this->once())\n ->method('offsetGet')\n ->with('request')\n ->will($this->returnValue($this->request))\n ;\n\n $this->request\n ->expects($this->once())\n ->method('getQuery')\n ->will($this->returnValue($this->query))\n ;\n\n $this->query\n ->expects($this->once())\n ->method('set')\n ->with('api_key', 'testkey')\n ;\n\n $this->plugin->onBeforeSend($this->event);\n }",
"public function testGetWebhooks()\n {\n }",
"public function testSendEmail()\n {\n // workflow, rule, action and object\n $workflow = factory(WorkflowEloquent::class)->create([\n 'user_id' => $this->user->getKey(),\n ]);\n $action1 = factory(ActionEloquent::class)->create([\n 'action_type' => ActionEloquent::ACTION_TYPE_EXECUTE,\n 'target_class' => 'mailer',\n 'target_field' => 'send',\n 'value' => '',\n ]);\n $workflow->actions()->sync([$action1->getKey() ]); //, $action2->getKey()\n $object = factory(ObjectEloquent::class)->create([\n 'workflow_id' => $workflow->getKey(),\n 'object_class' => 'tags.id',\n 'object_type' => $this->tag->getKey(),\n ]);\n\n\n // rule\n $rule1 = factory(RuleEloquent::class)->create([\n 'name' => 'do email to client person',\n 'workflow_id' => $workflow->getKey(),\n 'rule_type' => RuleEloquent::FIELD_TYPE_NUMBER,\n 'operator' => RuleEloquent::OPERATOR_EQUAL,\n 'field_name' => 'person_contexts.stage_id',\n 'value' => $this->stageId,\n 'runnable_once' => 1, // only once\n ]);\n\n $action1->rules()->sync([ $rule1->getKey()]);\n\n // run action runner\n $kernel = $this->app->make(Kernel::class);\n $status = $kernel->handle(\n $input = new ArrayInput(array(\n 'command' => 'workflow:action-run',\n 'workflow' => $workflow->getKey(),\n 'action' => $action1->getKey(),\n )),\n $output = new BufferedOutput\n );\n //echo $output->fetch();\n $this->assertEquals($status, 0);\n\n // check status\n $this->seeInDatabase('action_logs',[\n 'action_id' => $action1->getKey(),\n 'workflow_id' => $workflow->getKey(),\n 'status' => LogInterface::LOG_STATUS_SUCCESS,\n 'object_class' => $this->person->getLoggableType(), //$leadContext->getLoggableType(),\n 'object_id' => $this->person->getKey(), //$leadContext->getKey(),\n 'user_id' => $this->user->getKey(),\n ]);\n\n $this->cleanUpRecords(new PersonObserver, $this->person);\n }",
"public function testGetWebhook()\n {\n }",
"public function perform()\n {\n $hook = $this->args['hook'];\n $subscriber = $this->args['subscriber'];\n $event_data = $this->args['event_data'];\n $url = (array_key_exists('url', $subscriber['variables'])) ? $subscriber['variables']['url'] : '';\n\n $classname = 'AllPlayers\\\\Webhooks\\\\' . $hook['name'];\n $webhook = new $classname($subscriber['variables']);\n $webhook_data = array(\n 'event_name' => $hook['name'],\n 'event_data' => $event_data\n );\n if (!empty($this->test_url)) {\n $webhook_data['original_url'] = $url;\n $url = $this->test_url;\n }\n $webhook->post($url);\n $result = $webhook->send($webhook_data);\n }",
"public function postTesting() {}",
"protected function beforeSending()\n {\n }",
"public function testSendMessage()\n {\n Config::set('mail-tracker.expire-days', 1);\n Config::set('mail-tracker.inject-pixel', 1);\n Config::set('mail-tracker.track-links', 1);\n\n $old_email = MailTracker::sentEmailModel()->newQuery()->create([\n 'hash' => Str::random(32),\n ]);\n $old_url = MailTracker::sentEmailUrlClickedModel()->newQuery()->create([\n 'sent_email_id' => $old_email->id,\n 'hash' => Str::random(32),\n ]);\n // Go into the future to make sure that the old email gets removed\n \\Carbon\\Carbon::setTestNow(\\Carbon\\Carbon::now()->addWeek());\n $str = Mockery::mock(Str::class);\n app()->instance(Str::class, $str);\n $str->shouldReceive('random')\n ->times(2)\n ->andReturn('random-hash');\n\n Event::fake([\n EmailSentEvent::class\n ]);\n\n $faker = Factory::create();\n $email = $faker->email;\n $subject = $faker->sentence;\n $name = $faker->firstName . ' ' .$faker->lastName;\n View::addLocation(__DIR__);\n try {\n Mail::send('email.test', [], function ($message) use ($email, $subject, $name) {\n $message->from('[email protected]', 'From Name');\n $message->sender('[email protected]', 'Sender Name');\n\n $message->to($email, $name);\n\n $message->cc('[email protected]', 'CC Name');\n $message->bcc('[email protected]', 'BCC Name');\n\n $message->replyTo('[email protected]', 'Reply-To Name');\n\n $message->subject($subject);\n\n $message->priority(3);\n });\n } catch (TransportException $e) {\n }\n\n Event::assertDispatched(EmailSentEvent::class);\n\n $this->assertDatabaseHas('sent_emails', [\n 'hash' => 'random-hash',\n 'recipient_name' => $name,\n 'recipient_email' => $email,\n 'sender_name' => 'From Name',\n 'sender_email' => '[email protected]',\n 'subject' => $subject,\n 'opened_at' => null,\n 'clicked_at' => null,\n ]);\n $sent_email = MailTracker::sentEmailModel()->newQuery()->where([\n 'hash' => 'random-hash',\n ])->first();\n $this->assertEquals($name.' <'.$email.'>', $sent_email->recipient);\n $this->assertEquals('From Name <[email protected]>', $sent_email->sender);\n $this->assertNull($old_email->fresh());\n $this->assertNull($old_url->fresh());\n }",
"function send() {\n\t\ttry {\n\t\t\tif ( ! $this->preSend() )\n\t\t\t\treturn false;\n\n\t\t\t$this->mock_sent[] = array(\n\t\t\t\t'to' => $this->to,\n\t\t\t\t'cc' => $this->cc,\n\t\t\t\t'bcc' => $this->bcc,\n\t\t\t\t'header' => $this->MIMEHeader,\n\t\t\t\t'body' => $this->MIMEBody,\n\t\t\t);\n\n\t\t\treturn true;\n\t\t} catch ( phpmailerException $e ) {\n\t\t\treturn false;\n\t\t}\n\t}",
"public static function shouldReceive()\n {\n }"
]
| [
"0.6287777",
"0.6016036",
"0.6001454",
"0.59350926",
"0.5934533",
"0.592048",
"0.58115554",
"0.57402754",
"0.57313395",
"0.5717726",
"0.57007784",
"0.5683815",
"0.5617648",
"0.5603163",
"0.5546209",
"0.5519887",
"0.55197656",
"0.5497974",
"0.54967594",
"0.54606134",
"0.54454464",
"0.54348916",
"0.5426086",
"0.5423542",
"0.54233384",
"0.541942",
"0.53987217",
"0.53898805",
"0.5382738",
"0.53754663"
]
| 0.7709307 | 0 |
Getter for private price | function getPrice()
{
return $this->price;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getPrice() {\n }",
"public function get_price(){\n\t\treturn $this->price;\n\t}",
"public function getPrice(){\n return $this->price;\n }",
"public function getPrice();",
"public function getPrice();",
"public function getPrice();",
"public function getPrice();",
"public function getPrice()\n {\n return $this->price;\n }",
"public function getPrice()\n {\n return $this->price;\n }",
"public function getPrice(){\n return $this->price;\n }",
"public function getPrice(){\n return $this->price;\n }",
"abstract public function getPrice();",
"public function getPrice()\n {\n }",
"public function getPrice()\n {\n }",
"public function getPrice()\n {\n return $this->price;\n }",
"public function getPrice()\n {\n return $this->price;\n }",
"public function getPrice()\n {\n return $this->price;\n }",
"public function getPrice()\n {\n return $this->price;\n }",
"public function getPrice()\n {\n return $this->price;\n }",
"public function getPrice()\n {\n return $this->price;\n }",
"public function getPrice()\n {\n return $this->price;\n }",
"public function getPrice()\n {\n return $this->price;\n }",
"public function getPrice()\n {\n return $this->price;\n }",
"public function getPrice()\n {\n return $this->price;\n }",
"public function getPrice()\n {\n return $this->price;\n }",
"public function getPrice()\n {\n return $this->price;\n }",
"public function getPrice()\n {\n return $this->price;\n }",
"public function getPrice()\n {\n return $this->price;\n }",
"public function getPrice()\n {\n return $this->price;\n }",
"public function getPrice()\n {\n return $this->price;\n }"
]
| [
"0.8351246",
"0.83403164",
"0.83267134",
"0.8311731",
"0.8311731",
"0.8311731",
"0.8311731",
"0.82948905",
"0.82948905",
"0.8276768",
"0.8276768",
"0.8265917",
"0.82334334",
"0.82334334",
"0.80865043",
"0.80865043",
"0.80865043",
"0.80865043",
"0.80865043",
"0.80865043",
"0.80865043",
"0.80865043",
"0.80865043",
"0.80865043",
"0.80865043",
"0.80865043",
"0.80865043",
"0.80865043",
"0.80865043",
"0.80865043"
]
| 0.8390842 | 0 |
Setter for private price | function setPrice($new_price)
{
$this->price = $new_price;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setPrice($price)\n {\n $this->price = $price;\n }",
"public function setPrice($price)\n {\n $this->price = $price;\n }",
"function setItem_price($price){\n $this->item_price = $price;\n }",
"public function setPrice($price)\n {\n return $this->set('price', $price);\n }",
"function setPrice( $value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $this->Price = $value;\n setType( $this->Price, \"double\" );\n }",
"public function setPrice($price){\n $this->price = $price;\n return $this;\n }",
"public function setPrice($price)\n {\n $this->price = $price;\n\n return $this;\n }",
"public function setPrice($price)\n {\n $this->price = (double)$price;\n $this->recalculatePriceTotal();\n }",
"public function setPrice($price) {\n $this->_price = $price;\n return $this;\n }",
"public function setPrice ($price){\n\t\tif(!is_numeric($price)){\n\t\t\treturn;\n\t\t}\n\t\t$this->Item['price'] = $price;\n\t}",
"public function setPrice($price)\r\n {\r\n $this->price = $price;\r\n\r\n return $this;\r\n }",
"public function setPrice($val)\n {\n $this->_propDict[\"price\"] = floatval($val);\n return $this;\n }",
"public function setProductPrice($product_price){\n $this->product_price = $product_price;\n }",
"public function setPrice(float $price):void\n {\n $this->price = $price;\n }",
"public function setPrice(?float $price): self\n {\n $this->initialized['price'] = true;\n $this->price = $price;\n\n return $this;\n }",
"public function setPrice(?float $price): self\n {\n $this->initialized['price'] = true;\n $this->price = $price;\n\n return $this;\n }",
"public function setPrice($price)\n {\n $this->price = $price;\n\n return $this;\n }",
"public function setPrice($value)\n {\n $this->price = $value;\n $this->recalculate();\n }",
"public function setPrice(int $price) : self\n {\n $this->price = $price;\n return $this;\n }",
"public function setPrice($price)\n {\n $this->price = $price;\n\n return $this;\n }",
"public function setPrice($price)\n {\n $this->price = $price;\n\n return $this;\n }",
"public function setPrice($price)\n {\n $this->price = $price;\n\n return $this;\n }",
"public function setPrice($price)\n {\n $this->price = $price;\n\n return $this;\n }",
"public function setPrice($price)\n {\n $this->price = $price;\n\n return $this;\n }",
"public function setPrice($price)\n {\n $this->price = $price;\n\n return $this;\n }",
"public function setPrice($price)\n {\n $this->price = $price;\n\n return $this;\n }",
"public function setPrice($price)\n {\n $this->price = $price;\n\n return $this;\n }",
"public function setPrice($price)\n {\n $this->price = $price;\n\n return $this;\n }",
"public function getPrice(){\n return $this->price;\n }",
"public function setPrice($price)\n {\n $this->set('price', $price)\n ->setPriceoverridden(true);\n\n return $this;\n }"
]
| [
"0.8387861",
"0.803968",
"0.80267525",
"0.7894892",
"0.7838796",
"0.7759153",
"0.77490103",
"0.7634211",
"0.7561446",
"0.75385493",
"0.74996215",
"0.74546003",
"0.7429336",
"0.74203455",
"0.7391433",
"0.7391433",
"0.7309564",
"0.72874904",
"0.72758925",
"0.72284347",
"0.72284347",
"0.72284347",
"0.72284347",
"0.72284347",
"0.72284347",
"0.72284347",
"0.72284347",
"0.72284347",
"0.7224217",
"0.71981"
]
| 0.8331726 | 1 |
Getter for private miles | function getMiles()
{
return $this->miles;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getSmiles() {\n\t\treturn $this->smiles;\n\t}",
"public function getMileage() {\n return $this->get(self::MILEAGE);\n }",
"function getTotalMiles(){\n $steps_per_mile = $GLOBALS['STEPS_PER_MILE'];\n return round(getTotalSetps() / $steps_per_mile, 2);\n}",
"public static function getMileageString(){\n $mileagePref = sfContext::getInstance()->getUser()->getAttribute('mileage',null,'subscriber');\n $mileString = \"miles\";\n if($mileagePref==0){\n $mileString=\"km\";\n }\n return $mileString;\n }",
"public function getMileage()\n {\n $value = $this->get(self::MILEAGE);\n return $value === null ? (integer)$value : $value;\n }",
"function setMiles($new_miles)\n {\n $this->miles = $new_miles;\n }",
"public static function getMetersFromMileage($mileage){\n sfContext::getInstance()->getLogger()->info('@@@@@@@@@getMetersFromMileageIN '.$mileage);\n $mileagePref = sfContext::getInstance()->getUser()->getAttribute('mileage',null,'subscriber');\n $meterMile=0;\n if($mileage){\n if($mileagePref==1){//miles\n $meterMile = $mileage/.000621371192;\n }else{\n $meterMile = $mileage*1000;\n }\n }\n sfContext::getInstance()->getLogger()->info('@@@@@@@@@getMetersFromMileageOUT '.$mileagePref.' '.$meterMile);\n return $meterMile;\n }",
"public function getMilage()\n {\n }",
"function miles_distance($lat1, $lng1, $lat2, $lng2, $miles = true){\n\t $pi80 = M_PI / 180;\n\t $lat1 *= $pi80;\n\t $lng1 *= $pi80;\n\t $lat2 *= $pi80;\n\t $lng2 *= $pi80;\n\t \n\t $r = 6372.797; // mean radius of Earth in km\n\t $dlat = $lat2 - $lat1;\n\t $dlng = $lng2 - $lng1;\n\t $a = sin($dlat / 2) * sin($dlat / 2) + cos($lat1) * cos($lat2) * sin($dlng / 2) * sin($dlng / 2);\n\t $c = 2 * atan2(sqrt($a), sqrt(1 - $a));\n\t $km = $r * $c;\n\t \n\t return ($miles ? ($km * 0.621371192) : $km);\n \t}",
"function meters_to_miles($distance)\n\t\t{\n\t\t\t\n\t\t\treturn round($distance/1609.34, 2);\n\t\t}",
"public function isMileDistanceUnit()\n {\n return ($this->getDistanceUnit() == 'mi') ? true : false;\n }",
"public function getMammalLegs() {\n return $this->number_of_legs;\n }",
"public function getDistance();",
"public static function getMileageFromMeters($meterMile){\n sfContext::getInstance()->getLogger()->info('@@@@@@@@@getMileageFromMetersIN '.$meterMile);\n $mileagePref = sfContext::getInstance()->getUser()->getAttribute('mileage',null,'subscriber');\n $mileage=0;\n if($meterMile){\n if($mileagePref==1){//miles\n $mileage = $meterMile*.000621371192;\n }else{\n $mileage = $meterMile/1000;\n }\n }\n sfContext::getInstance()->getLogger()->info('@@@@@@@@@getMileageFromMetersOUT '.$mileagePref.' '.$mileage);\n return round($mileage,2);\n }",
"function getDistance() {\n\t\treturn $this->dist2loc;\n\t}",
"public function getMap() : Map {\n // return the private property as-is\n return $this->map;\n }",
"public static function kmToMiles($km)\n {\n return $km * self::KM_IN_MILES;\n }",
"function __construct($Latitude, $Longitude, $Miles) {\n global $maxLat, $minLat, $maxLong, $minLong;\n $EQUATOR_LAT_MILE = 69.172; // in MIles\n $maxLat = $Latitude + $Miles / $EQUATOR_LAT_MILE;\n $minLat = $Latitude - ($maxLat - $Latitude);\n $maxLong = $Longitude + $Miles / (cos($minLat * M_PI / 180) * $EQUATOR_LAT_MILE);\n $minLong = $Longitude - ($maxLong - $Longitude);\n }",
"public function getDistance()\n {\n return $this->distance;\n }",
"protected function get_visibility( ) {\n// if visibility is limited to an integer mile plus a fraction part.\n// Format is mmSM for mm = statute miles, or m n/dSM for m = mile and n/d = fraction of a mile,\n// or just a 4-digit number nnnn (with leading zeros) for nnnn = meters.\n\n static $integerMile = '';\n $this->wxInfo['ITEMS'][$this->tend]['CODE_HVISIBILITY'] = $this->current_group_text;\n if (strlen($this->current_group_text) == 1) { // visibility is limited to a whole mile plus a fraction part\n $integerMile = $this->current_group_text . ' ';\n $visibility_code = $this->current_group_text;\n $this->current_ptr++;\n }\n elseif (substr($this->current_group_text,-2) == 'SM') { // visibility is in miles\n $this->current_group_text = substr($this->current_group_text,0,strlen($this->current_group_text)-2);\n if (substr($this->current_group_text,0,1) == 'M') {\n//$prefix = 'less than ';\n $this->current_group_text = substr($this->current_group_text, 1);\n $this->wxInfo['ITEMS'][$this->tend]['HVISIBILITY_QUALIFIER'] = -1;\n } else if (substr($this->current_group_text,0,1) == 'P') {\n//$prefix = 'plus than ';\n $this->current_group_text = substr($this->current_group_text, 1);\n $this->wxInfo['ITEMS'][$this->tend]['HVISIBILITY_QUALIFIER'] = 1;\n } else {\n//$prefix = '';\n $this->wxInfo['ITEMS'][$this->tend]['HVISIBILITY_QUALIFIER'] = 0;\n }\n if (($integerMile == '' && preg_match('#[/]#',$this->current_group_text,$pieces)) || $this->current_group_text == '1') $unit = ' mile';\n else $unit = ' miles';\n\n $this->wxInfo['ITEMS'][$this->tend]['HVISIBILITY'] = convertLength($this->current_group_text, 'Mile');\n $this->current_ptr++;\n $this->current_group++;\n }\n elseif (substr($this->current_group_text,-2) == 'KM') { // unknown (Reported by NFFN in Fiji)\n $this->current_ptr++;\n $this->current_group++;\n }\n elseif (preg_match('#^([0-9]{4})(NDV)?$#',$this->current_group_text,$pieces)) { // visibility is in meters\n if ($this->current_group_text == '9999') {\n $this->wxInfo['ITEMS'][$this->tend]['HVISIBILITY'] = convertLength(10000, 'Meter');\n $this->wxInfo['ITEMS'][$this->tend]['HVISIBILITY_QUALIFIER'] = 1;\n } else if ($this->current_group_text == '0000') {\n $this->wxInfo['ITEMS'][$this->tend]['HVISIBILITY'] = convertLength(50, 'Meter');\n $this->wxInfo['ITEMS'][$this->tend]['HVISIBILITY_QUALIFIER'] = -1;\n } else {\n $distance = convertLength($this->current_group_text, 'Meter');\n $this->wxInfo['ITEMS'][$this->tend]['HVISIBILITY'] =$distance;\n $this->wxInfo['ITEMS'][$this->tend]['HVISIBILITY_QUALIFIER'] = 0;\n }\n $this->current_ptr++;\n $this->current_group++;\n }\n elseif ($this->current_group_text == 'CAVOK') { // good weather\n $this->wxInfo['ITEMS'][$this->tend]['HVISIBILITY'] = convertLength(10000, 'Meter');\n $this->wxInfo['ITEMS'][$this->tend]['HVISIBILITY_QUALIFIER'] = 1;\n//$this->wxInfo['ITEMS'][$this->tend]['CONDITIONS'] = '';\n $this->wxInfo['ITEMS'][$this->tend]['CLOUDS'] = $this->get_i18nClouds('CLR');\n $this->wxInfo['ITEMS'][$this->tend]['CODE_HVISIBILITY'] = $this->current_group_text;\n $this->current_ptr++;\n $this->current_group++;\n if ($this->mode=='METAR') {\n $this->current_group += 3; // can skip the next 3 groups\n }\n }\n else {\n $this->wxInfo['ITEMS'][$this->tend]['CODE_HVISIBILITY'] = NULL;\n $this->current_group++;\n }\n }",
"public function getMontantHt() {\n return $this->montantHt;\n }",
"public function getLat();",
"public function getPerimeter() {\r\n return $this -> lato * 4;\r\n }",
"public function get_energymeters() {\n\t\t//Returns true or false. Values are set in $thermometers.\n\t\treturn $this->_get_energymeters();\n\t}",
"public function get_longitude()\n {\n }",
"public function setMileage($value) {\n return $this->set(self::MILEAGE, $value);\n }",
"public function get_longitude()\n {\n }",
"function getYTile( $lat, $lon, $zoom ) {\n return floor((1 - log(tan(deg2rad($lat)) + 1 / cos(deg2rad($lat))) / pi()) /2 * pow(2, $zoom));\n}",
"public function getDistanceInMeters()\n {\n $reflectedMethod = new \\ReflectionMethod($this, 'calculateDistance');\n $reflectedMethod->setAccessible(true);\n $route = $reflectedMethod->invoke($this);\n\n if (is_null($route) === false && isset($route->distance->value)) {\n return $route->distance->value;\n }\n\n throw new DistanceUnavailableException('Google does not return a valid distance');\n }",
"public function get_windmeters() {\n\t\t//Returns true or false. Values are set in $windmeters.\n\t\treturn $this->_get_windmeter();\n\t}"
]
| [
"0.6799576",
"0.6795047",
"0.6690637",
"0.6031188",
"0.60289484",
"0.59786355",
"0.5879974",
"0.5796738",
"0.55998087",
"0.5596299",
"0.5548546",
"0.55426836",
"0.5447765",
"0.54397196",
"0.5395008",
"0.53061396",
"0.52956563",
"0.52625287",
"0.52316535",
"0.5205676",
"0.5196819",
"0.51862925",
"0.5183191",
"0.5180789",
"0.51740724",
"0.5173302",
"0.5172938",
"0.5164108",
"0.51401526",
"0.51370424"
]
| 0.80574423 | 0 |
Setter for private miles | function setMiles($new_miles)
{
$this->miles = $new_miles;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getMiles()\n {\n return $this->miles;\n }",
"public function &setSmiles($smiles) {\n\t\t$this->smiles=$smiles;\n\t\treturn $this;\n\t}",
"public function setMileage($value) {\n return $this->set(self::MILEAGE, $value);\n }",
"public function setMileage($value)\n {\n return $this->set(self::MILEAGE, $value);\n }",
"public function getSmiles() {\n\t\treturn $this->smiles;\n\t}",
"function getTotalMiles(){\n $steps_per_mile = $GLOBALS['STEPS_PER_MILE'];\n return round(getTotalSetps() / $steps_per_mile, 2);\n}",
"public function moveForward($miles)\n {\n }",
"public function getMileage() {\n return $this->get(self::MILEAGE);\n }",
"function __construct($Latitude, $Longitude, $Miles) {\n global $maxLat, $minLat, $maxLong, $minLong;\n $EQUATOR_LAT_MILE = 69.172; // in MIles\n $maxLat = $Latitude + $Miles / $EQUATOR_LAT_MILE;\n $minLat = $Latitude - ($maxLat - $Latitude);\n $maxLong = $Longitude + $Miles / (cos($minLat * M_PI / 180) * $EQUATOR_LAT_MILE);\n $minLong = $Longitude - ($maxLong - $Longitude);\n }",
"public static function getMileageString(){\n $mileagePref = sfContext::getInstance()->getUser()->getAttribute('mileage',null,'subscriber');\n $mileString = \"miles\";\n if($mileagePref==0){\n $mileString=\"km\";\n }\n return $mileString;\n }",
"public function __construct(){\n //Despite what Singing Science Records might tell us, the phrase \"the earth is a ball\" is not entirely accurate.\n //It's more of a round-ish potato. So lat and lon values can \"stretch\"\n //Lon: -76.673608 to -76.582241 is exactly five miles along North Avenue, sez Bing.\n // So abs(76.582241 - 76.673608)/5 = 1 mile worth of radius = this->lonmile\n $this->lonmile = abs(76.582241 - 76.673608)/5;\n //Lat (via four miles on Light Street): \n $this->latmile = abs(39.327998 - 39.271404)/4;\n //--- A couple more ... ---\n //Roughly how many feet do we want in each block?\n define('feetperblock',250);\n //How many items must be present in a sampled grid radius before our script takes notice?\n define('threshold',1);\n //WHere is our csv file full of items? And where are the lat/lon columns?\n define('csvfile','homicide_victims_2015.csv');\n define('latindex',9);\n define('lonindex',10);\n\n }",
"function meters_to_miles($distance)\n\t\t{\n\t\t\t\n\t\t\treturn round($distance/1609.34, 2);\n\t\t}",
"public function getMileage()\n {\n $value = $this->get(self::MILEAGE);\n return $value === null ? (integer)$value : $value;\n }",
"public function setMinDamage(){ $this->minDamage = 10; }",
"public function setDistance($value) {\n\t\t$this->_distance = $value;\n\t}",
"public function setStartingMileageAttribute($input)\n {\n if ($input != '') {\n $this->attributes['starting_mileage'] = $input;\n } else {\n $this->attributes['starting_mileage'] = null;\n }\n }",
"public static function getMetersFromMileage($mileage){\n sfContext::getInstance()->getLogger()->info('@@@@@@@@@getMetersFromMileageIN '.$mileage);\n $mileagePref = sfContext::getInstance()->getUser()->getAttribute('mileage',null,'subscriber');\n $meterMile=0;\n if($mileage){\n if($mileagePref==1){//miles\n $meterMile = $mileage/.000621371192;\n }else{\n $meterMile = $mileage*1000;\n }\n }\n sfContext::getInstance()->getLogger()->info('@@@@@@@@@getMetersFromMileageOUT '.$mileagePref.' '.$meterMile);\n return $meterMile;\n }",
"private static function modifyLongitude($lat, $long, $deltaMiles) {\t return $long + $deltaMiles / (MILES_PER_DEGREE_LONG_EQUATOR * cos(deg2rad($lat)));\n\t}",
"public function setZoom($nom){\n\t\t$zoom = (int) $zoom;\n\t\t// On vérifie ensuite si ce nombre est bien strictement positif.\n\t\tif ($zoom > 0){\n\t\t\t// Si c'est le cas, c'est tout bon, on assigne la valeur à l'attribut correspondant.\n\t\t\t$this->_zoom = $zoom;\n\t\t}\n\t}",
"public function isMileDistanceUnit()\n {\n return ($this->getDistanceUnit() == 'mi') ? true : false;\n }",
"public static function kmToMiles($km)\n {\n return $km * self::KM_IN_MILES;\n }",
"public static function getMileageFromMeters($meterMile){\n sfContext::getInstance()->getLogger()->info('@@@@@@@@@getMileageFromMetersIN '.$meterMile);\n $mileagePref = sfContext::getInstance()->getUser()->getAttribute('mileage',null,'subscriber');\n $mileage=0;\n if($meterMile){\n if($mileagePref==1){//miles\n $mileage = $meterMile*.000621371192;\n }else{\n $mileage = $meterMile/1000;\n }\n }\n sfContext::getInstance()->getLogger()->info('@@@@@@@@@getMileageFromMetersOUT '.$mileagePref.' '.$mileage);\n return round($mileage,2);\n }",
"public function setToTile() {\n\t\t$this->_query['tile'] = true;\n\t\t\n\t\treturn $this;\n\t}",
"public function setPrivate($private)\n {\n $this->entity->setPrivate($private);\n }",
"public function convertKilometrePerHourToMilesPerHour($value) {\n\t\tif(is_numeric($value)) {\n\t\t\treturn round( ($value * 0.6214), 0);\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function __construct($local)\n\t\t{\n\t\t#with each new location at a set rate\n\t\t$this->_clothes = 10 + 2.5 * $local;\n\t\t$this->_food = .2 + .1 * $local;\n\t\t$this->_bait = 2 + 2.5 * $local;\n\t\t$this->_parts = 10 + 2.5 * $local;\n\t\t$this->_yoke = 40 + 5 * $local;\n\t\t}",
"public function toMiles($distance) {\n return number_format(((float) $distance * 0.621371192), 2, '.', ',');\n\t}",
"public function testSetLgZone() {\n\n $obj = new ParamEtiquettes();\n\n $obj->setLgZone(\"lgZone\");\n $this->assertEquals(\"lgZone\", $obj->getLgZone());\n }",
"function setPlace( &$value )\n {\n $this->Place = $value;\n }",
"public function convertMetrePerSecondToMilesPerHour($value) {\n\t\tif(is_numeric($value)) {\n\t\t\treturn round( ($value * 2.2369), 0);\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}"
]
| [
"0.67732",
"0.63133293",
"0.60233355",
"0.590643",
"0.5761558",
"0.5716598",
"0.5462038",
"0.54413044",
"0.52922094",
"0.52546537",
"0.51283056",
"0.5088644",
"0.50481683",
"0.50445056",
"0.49762404",
"0.4970867",
"0.49461687",
"0.49068218",
"0.48862824",
"0.48784584",
"0.48215592",
"0.47917888",
"0.47908944",
"0.47640693",
"0.47617236",
"0.474954",
"0.4740779",
"0.47287196",
"0.47144622",
"0.46981657"
]
| 0.7666276 | 0 |
make the search view for the create action depending of the submit command [save, cancel] | function createSearchView(){
// fe_user access management
$access = $this->accessObj->checkAccess('','pageSearch','create');
if(!(bindec($access) & bindec('1000'))){
$this->cmd = 'canNotCreate';
// Get the FORM
$content = $this->get_include_contents('view_canNotAccess.php');
// return view
return $content;
}
// debug($GLOBALS['TSFE']->fe_user->user['ses_userid']);
// session
$submittedKey = $this->caller->piVars['formsession']['key'];
$formSession = $GLOBALS["TSFE"]->fe_user->getKey('ses',$this->extKey);
$keyExist = ($submittedKey == $formSession['key'])?true:false;
$this->generateSessionKey();
// Check if the form for double click and multiple submit
if(!$keyExist && ($this->submit['save'] || $this->submit['update'] || $this->submit['cancel'])){
$this->cmd = 'nsubmitError';
}elseif($this->submit['save'] && !$this->rec_id){
$this->cmd = 'save';
$this->caller->piVars['search']['roles'] = 1; // validate roles
// validation configuration title = required, date = date
// contol/validation here as piVars[lotNew][catmatterrial] is empty for radio buttons
if(!$this->caller->piVars['search']['catmatterrial']){
$this->caller->piVars['search']['catmatterrial'] = '';
}
// create validator
$validator = t3lib_div::makeInstance('tx_vdexcavationexchange_validator');
$valid = $validator->validate('search',$this->caller->piVars['search']);
$this->validation = $validator->get_errorMsgs(); // [field][msg]
// use the piVars value for the data
$this->data['uid'] = '';
$this->data['fe_cruser_id'] = $GLOBALS['TSFE']->fe_user->user['ses_userid'];
$this->data = array_merge($this->data, $this->caller->piVars['search']);
// validation end
if($valid ){
// SAVE data
$queryConf['startingPoint'] = $this->startingPoint;
$recID = $this->model->insert($this->data,$queryConf);
if($recID){
$this->rec_id = $recID;
// EMAIL SEND
if($this->conf[sendEmail]){
$emailres = $this->emailObj->send();
$this->cmd = $emailres?'emailSuccess':'emailFailed';
}
if(1){
$this->clearFormKey();
// Redirect to the page "Mon dossier"
Header('Location: '.t3lib_div::locationHeaderUrl($this->redirectToMyAds));
exit;
}else{
// get record back
$this->cmd = 'update';
$this->data['uid'] = $recID;
$queryConf['noAccessClause'] = 1;
$rec = $this->model->select($recID, $queryConf);
$this->data = $rec[$this->rec_id];
}
}else{
$this->cmd = 'saveFailed';
}
}else{
$this->cmd = 'saveNotValid';
// Can not save -> display the FORM with errors
}
}elseif($this->submit['update']){
// 1 display the form back fir update
$this->cmd = 'update';
$this->clearFormKey();
// Redirect to the page "Mon dossier"
Header('Location: '.t3lib_div::locationHeaderUrl($this->redirectToMyAds));
exit;
}elseif($this->submit['cancel']){
$this->cmd = 'cancel';
// reset values for the form
unset($this->caller->piVars);
}else{
// *****************************************
// default case "edit empty form"
// *****************************************
$this->cmd = 'new';
unset($this->rec_id);
unset($this->data);
unset($this->caller->piVars);
}
// Get the FORM
$content = $this->get_include_contents('view_searchForm.php');
// return search view
return $content;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return view('search.create');\n }",
"public function actionCreate()\n\t{\n\t parent::actionCreate();\n\t $dodetail=new Dodetail('search');\n\t $dodetail->unsetAttributes(); // clear any default values\n\t if(isset($_GET['Dodetail']))\n\t\t$dodetail->attributes=$_GET['Dodetail'];\n\n\t\t$customer=new Customer('search');\n\t $customer->unsetAttributes(); // clear any default values\n\t if(isset($_GET['Customer']))\n\t\t$customer->attributes=$_GET['Customer'];\n\n\t\t$product=new Product('search');\n\t $product->unsetAttributes(); // clear any default values\n\t if(isset($_GET['Product']))\n\t\t$product->attributes=$_GET['Product'];\n\n\t\t$unitofmeasure=new Unitofmeasure('search');\n\t $unitofmeasure->unsetAttributes(); // clear any default values\n\t if(isset($_GET['Unitofmeasure']))\n\t\t$unitofmeasure->attributes=$_GET['Unitofmeasure'];\n\n $soheader=new Soheader('search');\n\t $soheader->unsetAttributes(); // clear any default values\n\t if(isset($_GET['Soheader']))\n\t\t$soheader->attributes=$_GET['Soheader'];\n\n $project=new Project('search');\n\t $project->unsetAttributes(); // clear any default values\n\t if(isset($_GET['Project']))\n\t\t$project->attributes=$_GET['Project'];\n\n\t\t$model=new Doheader;\n\t\t$model->recordstatus=0;\n\t\tif (Yii::app()->request->isAjaxRequest)\n {\n\t\t\tif ($model->save()) {\n\t\t\t echo CJSON::encode(array(\n\t\t\t\t 'status'=>'success',\n\t\t\t\t 'doheaderid'=>$model->doheaderid,\n\t\t\t\t 'divcreate'=>$this->renderPartial('_form', array('model'=>$model,\n\t\t\t\t\t'dodetail'=>$dodetail,\n\t\t\t\t\t'customer'=>$customer,\n\t\t\t\t\t'product'=>$product,\n\t\t\t\t\t'unitofmeasure'=>$unitofmeasure,\n 'soheader'=>$soheader,\n 'project'=>$project), true)\n\t\t\t\t ));\n\t\t\t Yii::app()->end();\n\t\t\t}\n }\n\t}",
"public function searchAction() {\n parent::searchAction();\n }",
"public function searchAction() {\n\t\t$modelName = $this->_getParam('model');\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$this->view->cols = $model->info('cols');\n\t\t$this->view->model = $this->_getParam('model');\n\t\t$this->view->config = Marcel_Backoffice_Config::getInstance()->getConfig();\n\t\t\n\t\tif ($this->_request->isPost()) {\n\t\t\t$fields = array();\n\t\t\t$func \t= array();\n\t\t\t$query \t= array();\n\t\t\tforeach ($_POST['query'] as $key => $q) {\n\t\t\t\tif (isset($_POST['fields'][$key]) && !empty($_POST['fields'][$key])) {\n\t\t\t\t\t$fields[$key] = $_POST['fields'][$key];\n\t\t\t\t\t$func[$key] \t= $_POST['func'][$key];\n\t\t\t\t\t$query[$key] \t= $_POST['query'][$key];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$data = array('fields' => $fields, 'func' => $func, 'query' => $query);\n\t\t\t$data = serialize($data);\n\t\t\t$this->_helper->redirector('list', null, null, array('model' => $modelName, 'data' => $data));\n\t\t}\n\t}",
"public function search()\r\n {\r\n $this->setTpl('search.htm');\r\n $this->setControllerTitle('Apollo');\r\n $this->setCurrentControllerName('Rechecher une condition');\r\n }",
"public function actionSearch()\n {\n }",
"public function onSearch()\n {\n // get the search form data\n $data = $this->form->getData();\n \n if ($this->formFilters)\n {\n foreach ($this->formFilters as $filterKey => $formFilter)\n {\n $operator = isset($this->operators[$filterKey]) ? $this->operators[$filterKey] : 'like';\n $filterField = isset($this->filterFields[$filterKey]) ? $this->filterFields[$filterKey] : $formFilter;\n $filterFunction = isset($this->filterTransformers[$filterKey]) ? $this->filterTransformers[$filterKey] : null;\n \n // check if the user has filled the form\n if (isset($data->{$formFilter}) AND $data->{$formFilter})\n {\n // $this->filterTransformers\n if ($filterFunction)\n {\n $fieldData = $filterFunction($data->{$formFilter});\n }\n else\n {\n $fieldData = $data->{$formFilter};\n }\n \n // creates a filter using what the user has typed\n if (stristr($operator, 'like'))\n {\n $filter = new TFilter($filterField, $operator, \"%{$fieldData}%\");\n }\n else\n {\n $filter = new TFilter($filterField, $operator, $fieldData);\n }\n \n // stores the filter in the session\n TSession::setValue($this->activeRecord.'_filter', $filter); // BC compatibility\n TSession::setValue($this->activeRecord.'_filter_'.$formFilter, $filter);\n TSession::setValue($this->activeRecord.'_'.$formFilter, $data->{$formFilter});\n }\n else\n {\n TSession::setValue($this->activeRecord.'_filter', NULL); // BC compatibility\n TSession::setValue($this->activeRecord.'_filter_'.$formFilter, NULL);\n TSession::setValue($this->activeRecord.'_'.$formFilter, '');\n }\n }\n }\n \n TSession::setValue($this->activeRecord.'_filter_data', $data);\n TSession::setValue(get_class($this).'_filter_data', $data);\n \n // fill the form with data again\n $this->form->setData($data);\n \n $param=array();\n $param['offset'] =0;\n $param['first_page']=1;\n $this->onReload($param);\n }",
"protected function buildSearchFormForAction($method) {\n\t\t/*\n\t\t * Set all of our Models\n\t\t */\n\t include(\"Writeit.php\");\n\t\t$this->setSearchTypesModel(new Model_Table_SearchTypes());\n\t\t$this->setSearchFieldsModel(new Model_Table_SearchFields());\n\t\t$this->setSearchFormatsModel(new Model_Table_SearchFormats());\n\t\t$this->setSearchColumnsModel(new Model_Table_SearchColumns());\n\t\t$this->setSearchFormatColumnsModel(\n\t\t\t\tnew Model_Table_SearchFormatColumns()\n\t\t);\n\t\t// writevar($method,'this is the method passed into the buildsearchformaction');\n\t\t// pass in student or personnel from the helper/navigation tab main\n\t\t/*\n\t\t * Check to see if the search type needs to be built.\n\t\t */\n\t\t$searchDefinition = My_SearchHelper::getDefenitionForSearchType($method);\n\t//\twritevar($searchDefinition,'this is the search definition'); // This setsup that gawd awfull sql query to passz to the model somewhere\n\t\t$this->_searchTypesModel->setRowForType($method);\n\t\tif (!$this->_searchTypesModel->isSearchType()) {\n\t\t\t$this->buildSearchType(\n\t\t\t\t$method,\n\t\t\t\tMy_SearchHelper::getDefenitionForSearchType($method)\n\t\t\t);\n\t\t}\n\t\t\n\t\t/*\n\t\t * Setup the default search form.\n\t\t */\n\t\t$searchTypeId = $this->_searchTypesModel->getRowId();\n\t\t$this->_searchForm = new Form_DefaultSearch(\n\t\t\t\t$this->_searchFormatsModel\n\t\t\t\t ->getSearchFormatsForTypeId($searchTypeId),\n\t\t\t\t$this->_searchColumnsModel\n\t\t\t\t ->getSearchColumnsForTypeId($searchTypeId),\n\t\t\t\t$this->_searchFieldsModel\n\t\t\t\t ->getSearchFieldsForTypeId($searchTypeId)\n\t\t);\n\t\t$this->_searchForm->type_id->setValue($searchTypeId);\n\t\t$this->_searchForm->format->addMultiOptions(\n\t\t\t\t$this->_searchFormatsModel\n\t\t\t\t ->getSearchFormatsForTypeIdAndUser(\n\t\t\t\t \t\t$searchTypeId,\n\t\t\t\t \t\t$this->_user->sessIdUser\n\t\t\t\t)\n\t\t);\n\t\t$this->_searchForm->format->addMultiOptions(\n\t\t\t\tarray(\n\t\t\t\t\t\t'custom' => '(Create Custom Format)'\n\t\t\t\t)\n\t\t);\n\t\t/*\n\t\t * Add the active select if its a student search. \n\t\t */\n\t\tif ($method == 'student') {\n\t\t\t$this->_searchForm->addActiveOption();\n\t\t}\n\t\t/*\n\t\t * Grab either the default search format id or \n\t\t * the format id used on the last user search.\n\t\t */\n\t\tif (!empty($this->_user->user->searchCacheKey[$searchTypeId])) {\n\t\t\tif (Model_CacheManager::isCached(\n\t\t\t\t\tZend_Registry::get('searchCache'), \n\t\t\t\t\t$this->_user->user->searchCacheKey[$searchTypeId]\n\t\t\t)) {\n\t\t\t\t$this->setSavedSearchModel(new Model_Table_SavedSearch());\n\t\t\t\t$this->_savedSearchModel->setRow(\n\t\t\t\t\t\t$this->_user->sessIdUser,\n\t\t\t\t\t\t$searchTypeId,\n\t\t\t\t\t\t$this->_user->user->searchCacheKey[$searchTypeId]\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t$this->_searchForm->maxRecs->setValue(\n\t\t\t\t\t\t$this->_savedSearchModel->getRpp()\n\t\t\t\t);\n\t\t\t\t$formatId = $this->_savedSearchModel->getLastSearchFormat();\n\t\t\t\t\n\t\t\t\tif ($formatId !== false) {\n\t\t\t\t\t$savedFields = new Model_Table_SavedFields();\n\t\t\t\t\t$fields = $savedFields->getSavedFields(\n\t\t\t\t\t\t\t$this->_savedSearchModel->getLastSearchId()\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t$this->view->populateSearchFields = $fields;\n\t\t\t\t\t\n\t\t\t\t\t$this->view->cacheKey = $this->_user->user->searchCacheKey[$searchTypeId];\n\t\t\t\t\t$this->view->headScript()->appendFile('/js/defaultSearchToKey.js');\n\t\t\t\t} else {\n\t\t\t\t\t$this->resetToDefaultSearch($searchTypeId);\n\t\t\t\t}\t\n\t\t\t} else {\n\t\t\t\t$this->resetToDefaultSearch($searchTypeId);\n\t\t\t}\n\t\t} else {\n\t\t\t$this->resetToDefaultSearch($searchTypeId);\n\t\t}\n\t\t\n\t\tif (empty($formatId)) {\n\t\t\t$formatId = $this->_searchFormatsModel\n\t\t\t->getDefaultSearchFormatForTypeId(\n\t\t\t\t\t$searchTypeId\n\t\t\t);\n\t\t}\n\t\t$this->_searchForm->format->setValue($formatId);\n\t\t$this->_searchForm->defaultFormatColumns(\n\t\t\t\t$this->_searchFormatColumnsModel\n\t\t\t\t ->getColumnsForFormat($formatId)\t\n\t\t);\n\t\t\n\t\t$this->view->searchForm = $this->_searchForm;\n\t\t$this->view->formTitle = $this->_searchTypesModel\n\t\t\t\t\t\t\t\t\t ->getDisplayName();\n\t}",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function action_create()\n {\n $this->action_edit(FALSE);\n }",
"private function new_search()\n {\n $this->template = FALSE;\n \n $articulo = new articulo();\n $codfamilia = '';\n if( isset($_REQUEST['codfamilia']) )\n {\n $codfamilia = $_REQUEST['codfamilia'];\n }\n \n $con_stock = isset($_REQUEST['con_stock']);\n $this->results = $articulo->search($this->query, 0, $codfamilia, $con_stock);\n \n /// añadimos la busqueda\n foreach($this->results as $i => $value)\n {\n $this->results[$i]->query = $this->query;\n $this->results[$i]->dtopor = 0;\n }\n \n header('Content-Type: application/json');\n echo json_encode($this->results);\n }",
"public function search() {\n include 'views/search-form.php';\n }",
"public function onSearch()\n {\n // get the search form data\n $data = $this->form->getData();\n $filters = [];\n\n TSession::setValue(__CLASS__.'_filter_data', NULL);\n TSession::setValue(__CLASS__.'_filters', NULL);\n\n if (isset($data->inscricao_evento_id) AND ( (is_scalar($data->inscricao_evento_id) AND $data->inscricao_evento_id !== '') OR (is_array($data->inscricao_evento_id) AND (!empty($data->inscricao_evento_id)) )) )\n {\n\n $filters[] = new TFilter('inscricao_id', 'in', \"(SELECT id FROM inscricao WHERE evento_id = '{$data->inscricao_evento_id}')\");// create the filter \n }\n\n // fill the form with data again\n $this->form->setData($data);\n\n // keep the search data in the session\n TSession::setValue(__CLASS__.'_filter_data', $data);\n TSession::setValue(__CLASS__.'_filters', $filters);\n }",
"public function searchFormAction() {\n\n // Validate request methods\n $this->validateRequestMethod();\n $response = array();\n $viewer = Engine_Api::_()->user()->getViewer();\n if (!Engine_Api::_()->authorization()->isAllowed('sitereview_listing', $viewer, 'view'))\n $this->respondWithError('unauthorized');\n\n try {\n $response = Engine_Api::_()->getApi('Siteapi_Core', 'Sitereview')->getWishlistSearchForm();\n\n $this->respondWithSuccess($response, true);\n } catch (Expection $ex) {\n $this->respondWithValidationError('internal_server_error', $ex->getMessage());\n }\n }",
"function go_search_view($mode=\"EDIT\") {\n\n\tif(!has_user_permission(__FUNCTION__)) return; \n\n\tglobal $ROW, $TEMPLATE;\n\tLOG_MSG('INFO',\"go_search_view(): START ROW=\".print_r($ROW,true));\n\n\t// Don't load for add mode or when reloading the form\n\tif ( $mode != \"ADD\" && (!isset($ROW[0]) || get_arg($ROW[0],'STATUS') !== 'RELOAD') ) {\n\n\t\t// Get the Search ID\n\t\t$search_id=get_arg($_GET,\"search_id\");\n\n\t\t// Validate the ID\n\t\tif (\n\t\t\t!validate(\"Search Id\",$search_id,1,11,\"int\")\n\t\t) { \n\t\t\tLOG_MSG('ERROR',\"go_search_view(): Invalid Search ID [$search_id]!\");\n\t\t\treturn;\n\t\t}\n\n\t\t// Get from DB\n\t\t$ROW=db_search_select($search_id);\n\t\tif ( $ROW[0]['STATUS'] != \"OK\" ) {\n\t\t\tadd_msg(\"ERROR\",\"There was an error loading the Search. Please try again later. <br/>\");\n\t\t\treturn;\n\t\t}\n\n\t\t// No rows found\n\t\tif ( $ROW[0]['NROWS'] == 0 ) {\n\t\t\tadd_msg(\"ERROR\",\"No Searchs found! <br />Click on <strong>Add Search</strong> to create a one.<br /><br />\"); \n\t\t\treturn;\n\t\t}\n\t}\n\n\t$disabled=\"\";\n\t// Setup display parameters\n\tswitch($mode) {\n\t\tcase \"ADD\":\n\t\t\t\t$_do=\"add\";\n\t\t\t\tbreak;\n\t\tcase \"EDIT\":\n\t\t\t\t$_do=\"save\";\n\t\t\t\tbreak;\n\t\tcase \"DELETE\":\n\t\t\t\t$_do=\"remove\";\n\t\t\t\t$disabled=\"disabled\";\n\t\t\t\tbreak;\n\t\tcase \"VIEW\":\n\t\tdefault:\n\t\t\t\t$disabled=\"disabled\";\n\t\t\t\tbreak;\n\t}\n\n\t// To get driver details\n if ( ($row_driver=db_get_list('ARRAY','name,driver_id','tDriver','travel_id='.TRAVEL_ID)) === false ) return;\n\n // To get supervisor details\n if ( ($row_supervisor=db_get_list('ARRAY','name,supervisor_id','tSupervisor','travel_id='.TRAVEL_ID)) === false ) return;\n\n // To get client details\n if ( ($row_client=db_get_list('ARRAY','name,client_id','tClient','travel_id='.TRAVEL_ID)) === false ) return;\n\n // To get cleaner details\n if ( ($row_cleaner=db_get_list('ARRAY','name,cleaner_id','tCleaner','travel_id='.TRAVEL_ID)) === false ) return;\n\n\tif ( isset( $TEMPLATE ) ) { $template=$TEMPLATE; } else { $template=TEMPLATE_DIR.\"record.html\"; } \n\tinclude($template); \n\n\tLOG_MSG('INFO',\"go_search_view(): END\");\n}",
"public function actionCreate()\n {\n\t//save pin from distributor\n $session = new Session;\n $session->open();\n\n $ort = $session['distributor_pin'];\n\n //check if pin is valid/exists\n $searchDistributor = new DistributorSearch();\n $distributorProvider = $searchDistributor->search(['DistributorSearch'=>['pin'=>$ort]]);\n\n if(count($distributorProvider->getModels()) == 0)\n throw new \\yii\\web\\ForbiddenHttpException;\n\n $arrDistributor = $distributorProvider->getModels();\n\n $model = new Problem();\n\t$modelWaiter = new WaiterSearch();\n\t$modelBike = new BikeSearch();\n\t$modelDistributor = $arrDistributor[0];\n\n\t$arrPost = Yii::$app->request->post();\n\n\n if(count($arrPost) > 0){\n $arrPost['Problem']['appearance_date'] = date('d.m.Y H:i');\n $arrPost['WaiterSearch']['distributor'] = $modelDistributor->id;\n $searchWaiter = new WaiterSearch();\n $waiterProvider = $searchWaiter->search($arrPost);\n $arrWaiter = $waiterProvider->getModels();\n if(count($arrWaiter) == 0){\n $modelWaiter->load($arrPost);\n $modelWaiter->save();\n }else{\n $modelWaiter = $arrWaiter[0];\n }\n $arrPost['Problem']['waiter'] = $modelWaiter->id;\n $arrPost['WaiterSearch']['id'] = $modelWaiter->id;\n\n\t\t$searchBike = new BikeSearch();\n $bikeProvider = $searchBike->search($arrPost);\n $arrBike = $bikeProvider->getModels();\n if(count($arrBike) == 0){\n $modelBike->load($arrPost);\n $modelBike->save();\n }else{\n $modelBike = $arrBike[0];\n }\n $arrPost['Problem']['bike'] = $modelBike->id;\n $arrPost['BikeSearch']['id'] = $modelBike->id;\n }\n\n if ($model->load($arrPost) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n\t\t'modelDistributor' => $arrDistributor[0],\n\t\t'modelWaiter' => $modelWaiter,\n\t\t'modelBike' => $modelBike,\n ]);\n }\n }",
"public function searchAction(){\r\n \t$request = $this->getRequest();\r\n \t$q = $request->query->get('q');\r\n \tif(trim($q) == null || trim($q) == \"Encontre cupons de compra coletiva\"){\r\n \t\treturn $this->redirectFlash($this->generateUrl('aggregator_aggregator_index'), 'Digite um termo para a busca', 'error');\r\n \t}\r\n \t$ret['q'] = $q;\r\n \t$ret['breadcrumbs'][]['title'] = 'Resultado da busca por \"'.$q.'\" em '.$this->get('session')->get('reurbano.user.cityName');\r\n \treturn $ret;\r\n }",
"public function create()\n {\n // I skip using this create function because I use a modal form for inserting data using modal in index view via index function.\n }",
"public function actionSearch()\n {\n $this->render(\"Search\");\n }",
"public function searchAction()\n {\n $cleanTypes = $this->_getTypesList();\n $this->view->documentTypes = $cleanTypes;\n }",
"public function actionIndex()\n {\n $queryOptions = [];\n\t\t$orderByQuery = $this->getOrderByQuery();\n\n switch ((sizeof(\\Yii::$app->request->get()) == 0)) {\n case true:\n $queryOptions = array_merge([\n\t\t\t\t'distinct' => true,\n 'select' => [\n $this->model->tableName().'.*',\n \\nitm\\helpers\\QueryFilter::getHasNewQuery($this->model),\n ],\n 'andWhere' => ['closed' => false],\n ], $queryOptions);\n break;\n }\n\n return parent::actionIndex(RequestSearch::className(), [\n 'construct' => [\n 'queryOptions' => $queryOptions,\n 'defaults' => [\n 'orderby' => $orderByQuery,\n 'params' => ['closed' => false],\n ],\n ],\n ]);\n }",
"public function actionSeleccion_orden_compra()\n {\n $searchModel = new OrdenCompraSearch();\n $searchModel->scenario = \"seleccion\";\n $searchModel->ejercicio_oc = date (\"Y\"); \n $orden = null;\n $mensaje_busqueda = '';\n $params = Yii::$app->request->queryParams; \n \n\n $searchModel->load($params);\n if (isset($params[$searchModel->formName()]))\n {\n\n $numero = $params[$searchModel->formName()]['numero_oc'];\n $numero = str_pad($numero,6,'0',STR_PAD_LEFT);\n $params[$searchModel->formName()]['numero_oc']=$numero;\n $ejercicio = $params[$searchModel->formName()]['ejercicio_oc'];\n $ejercicio = str_pad($ejercicio,4,'0',STR_PAD_LEFT);\n\n //$params[$searchModel->formName()]['OC_NRO'] = $ejercicio.$numero;\n //print_r($params[$searchModel->formName()]['OC_NRO']); \n $orden = OrdenCompra::findOne(['OC_NRO'=>$ejercicio.$numero]);\n if (!isset($orden)){\n $this->importar_ordenes_rafam($ejercicio,$numero);\n $orden = OrdenCompra::findOne(['OC_NRO'=>$ejercicio.$numero]);\n if (!isset($orden)){\n $orden = '';\n $mensaje_busqueda = 'La Orden de Compra no existe';\n }\n }else{\n if ($orden->OC_FINALIZADA){\n $orden = '';\n $mensaje_busqueda = 'La Orden de Compra fue recibida totalmente';\n }\n }\n }\n\n return $this->render('seleccion_orden_compra', [\n 'searchModel' => $searchModel,\n 'orden'=>$orden,\n 'mensaje_busqueda'=>$mensaje_busqueda\n ]);\n }",
"function searchAction() {\n\t\t$this->getModel()->setPage($this->getPageFromRequest());\n\t\t$this->getInputManager()->setLookupGlobals(utilityInputManager::LOOKUPGLOBALS_GET);\n\t\t$inData = $this->getInputManager()->doFilter();\n\t\t$this->addInputToModel($inData, $this->getModel());\n\t\t$oView = new userView($this);\n\t\t$oView->showSearchLeaderboard();\n\t}",
"public function searchprocessAction() {\n\t\t$this->_helper->ajaxgrid->setConfig ( Invoices::grid() )->search ();\n\t}",
"public function indexAction() {\n \n //GET NAVIGATION\n $this->view->navigationStore = Engine_Api::_()->getApi('menus', 'core')\n ->getNavigation('sitestore_admin_main', array(), 'sitestore_admin_main_sitestoreoffer'); \n\n //CREATE NAVIGATION TABS\n $this->view->navigation = Engine_Api::_()->getApi('menus', 'core')->getNavigation('sitestoreoffer_admin_main', array(), 'sitestoreoffer_admin_main_manage');\n\n //FORM GENERATION\n $this->view->formFilter = $formFilter = new Sitestoreoffer_Form_Admin_Manage_Filter();\n\n //FETCH OFFER DATAS\n $tableUser = Engine_Api::_()->getItemTable('user')->info('name');\n $tableSitestore = Engine_Api::_()->getItemTable('sitestore_store')->info('name');\n $table = Engine_Api::_()->getDbtable('offers', 'sitestoreoffer');\n $rName = $table->info('name');\n $select = $table->select()\n ->setIntegrityCheck(false)\n ->from($rName)\n ->joinLeft($tableUser, \"$rName.owner_id = $tableUser.user_id\", 'username')\n ->joinLeft($tableSitestore, \"$rName.store_id = $tableSitestore.store_id\", 'title AS sitestore_title');\n $values = array();\n if ($formFilter->isValid($this->_getAllParams())) {\n $values = $formFilter->getValues();\n }\n\n foreach ($values as $key => $value) {\n if (null === $value) {\n unset($values[$key]);\n }\n }\n if (isset($_POST['search'])) {\n if (!empty($_POST['owner'])) {\n $this->view->owner = $_POST['owner'];\n $select->where($tableUser . '.username LIKE ?', '%' . $_POST['owner'] . '%');\n }\n if (!empty($_POST['title'])) {\n $this->view->title = $_POST['title'];\n $select->where($rName . '.title LIKE ?', '%' . $_POST['title'] . '%');\n }\n if (!empty($_POST['sitestore_title'])) {\n $this->view->sitestore_title = $_POST['sitestore_title'];\n $select->where($tableSitestore . '.title LIKE ?', '%' . $_POST['sitestore_title'] . '%');\n }\n if (!empty($_POST['hotoffer'])) {\n $this->view->hotoffer = $_POST['hotoffer'];\n $_POST['hotoffer']--;\n $select->where($rName . '.hotoffer = ? ', $_POST['hotoffer']);\n }\n \n if (!empty($_POST['coupon_code'])) {\n $this->view->coupon_code = $_POST['coupon_code'];\n $select->where($rName . '.coupon_code LIKE ?', '%' . $_POST['coupon_code'] . '%');\n }\n }\n $values = array_merge(array(\n 'order' => 'offer_id',\n 'order_direction' => 'DESC',\n ), $values);\n\n $this->view->assign($values);\n $select->order((!empty($values['order']) ? $values['order'] : 'offer_id' ) . ' ' . (!empty($values['order_direction']) ? $values['order_direction'] : 'DESC' ));\n include APPLICATION_PATH . '/application/modules/Sitestore/controllers/license/license2.php';\n }",
"public function actionSearch()\n {\n $this->requirePostRequest();\n\n $data = Craft::$app->getRequest()->getBodyParams();\n $resoParams = RetsRabbit::$plugin->getForms()->toReso($data);\n $search = RetsRabbit::$plugin->getSearches()->newPropertySearch([\n 'params' => $resoParams\n ]);\n\n if (RetsRabbit::$plugin->getSearches()->saveSearch($search)) {\n Craft::$app->session->setNotice(Craft::t('rets-rabbit', 'Search saved'));\n\n return $this->redirectToPostedUrl(['searchId' => $search->id]);\n }\n\n Craft::$app->session->setError(Craft::t('rets-rabbit', \"Couldn't save search.\"));\n Craft::$app->urlManager->setRouteParams([\n 'search' => $search\n ]);\n\n return $this->redirectToPostedUrl();\n }",
"public function onSearch()\n {\n // get the search form data\n $data = $this->form->getData();\n $filters = [];\n\n TSession::setValue(__CLASS__.'_filter_data', NULL);\n TSession::setValue(__CLASS__.'_filters', NULL);\n\n if (isset($data->exemplar_id) AND ( (is_scalar($data->exemplar_id) AND $data->exemplar_id !== '') OR (is_array($data->exemplar_id) AND (!empty($data->exemplar_id)) )) )\n {\n\n $filters[] = new TFilter('exemplar_id', '=', $data->exemplar_id);// create the filter \n }\n\n if (isset($data->leitor_id) AND ( (is_scalar($data->leitor_id) AND $data->leitor_id !== '') OR (is_array($data->leitor_id) AND (!empty($data->leitor_id)) )) )\n {\n\n $filters[] = new TFilter('leitor_id', '=', $data->leitor_id);// create the filter \n }\n\n if (isset($data->dt_emprestimo) AND ( (is_scalar($data->dt_emprestimo) AND $data->dt_emprestimo !== '') OR (is_array($data->dt_emprestimo) AND (!empty($data->dt_emprestimo)) )) )\n {\n\n $filters[] = new TFilter('dt_emprestimo', '>=', $data->dt_emprestimo);// create the filter \n }\n\n if (isset($data->dt_emprestimo_final) AND ( (is_scalar($data->dt_emprestimo_final) AND $data->dt_emprestimo_final !== '') OR (is_array($data->dt_emprestimo_final) AND (!empty($data->dt_emprestimo_final)) )) )\n {\n\n $filters[] = new TFilter('dt_emprestimo', '<=', $data->dt_emprestimo_final);// create the filter \n }\n\n if (isset($data->dt_previsao) AND ( (is_scalar($data->dt_previsao) AND $data->dt_previsao !== '') OR (is_array($data->dt_previsao) AND (!empty($data->dt_previsao)) )) )\n {\n\n $filters[] = new TFilter('dt_previsao', '>=', $data->dt_previsao);// create the filter \n }\n\n if (isset($data->dt_prevista_final) AND ( (is_scalar($data->dt_prevista_final) AND $data->dt_prevista_final !== '') OR (is_array($data->dt_prevista_final) AND (!empty($data->dt_prevista_final)) )) )\n {\n\n $filters[] = new TFilter('dt_previsao', '<=', $data->dt_prevista_final);// create the filter \n }\n\n if (isset($data->dt_devolucao) AND ( (is_scalar($data->dt_devolucao) AND $data->dt_devolucao !== '') OR (is_array($data->dt_devolucao) AND (!empty($data->dt_devolucao)) )) )\n {\n\n $filters[] = new TFilter('dt_devolucao', '>=', $data->dt_devolucao);// create the filter \n }\n\n if (isset($data->dt_devolucao_final) AND ( (is_scalar($data->dt_devolucao_final) AND $data->dt_devolucao_final !== '') OR (is_array($data->dt_devolucao_final) AND (!empty($data->dt_devolucao_final)) )) )\n {\n\n $filters[] = new TFilter('dt_devolucao', '<=', $data->dt_devolucao_final);// create the filter \n }\n\n $param = array();\n $param['offset'] = 0;\n $param['first_page'] = 1;\n\n // fill the form with data again\n $this->form->setData($data);\n\n // keep the search data in the session\n TSession::setValue(__CLASS__.'_filter_data', $data);\n TSession::setValue(__CLASS__.'_filters', $filters);\n\n $this->onReload($param);\n }",
"public function newAction()\n {\n //the same form is used to create and edit\n $this->_forward('edit');\n }",
"public function actionCreate()\n { \n $model = $this->getNewModel();\n $this->performAjaxValidation($model);\n $accoutordersearch = new Order;\n $accoutordersearch->unsetAttributes();\n $accoutordersearch->acnt_no = $model->acnt_no;\n \n if ( isset( $_POST['Account'] ) )\n {\n $this->saveAndRedirect($model);\n }\n else\n {\n if (Yii::app()->request->isAjaxRequest)\n {\n echo 'Nothing to save';\n Yii::app()->end();\n }\n }\n $this->render( 'create', array(\n 'model' => $model, 'accoutordersearch' => $accoutordersearch,\n ) );\n }",
"function do_performSearch() {\n $datavars = KTUtil::arrayGet($_REQUEST, 'boolean_search');\n if (!is_array($datavars)) {\n $datavars = unserialize($datavars);\n }\n \n if (empty($datavars)) {\n $this->errorRedirectToMain(_kt('You need to have at least 1 condition.'));\n }\n\n $sName = $this->oValidator->validateEntityName(\n 'KTSavedSearch', \n KTUtil::arrayGet($_REQUEST, 'name'), \n array('extra_condition' => 'is_condition', 'redirect_to' => array('new'))\n );\n \n $sNamespace = KTUtil::nameToLocalNamespace('Saved searches', $sName);\n\n $oSearch = KTSavedSearch::createFromArray(array(\n 'name' => $sName,\n 'namespace' => $sNamespace,\n 'iscondition' => true,\n 'iscomplete' => true,\n 'userid' => null,\n 'search' => $datavars,\n ));\n\n $this->oValidator->notError($oSearch, array(\n 'redirect_to' => 'main',\n 'message' => _kt('Search not saved'),\n ));\n $this->successRedirectToMain(_kt('Dynamic condition saved'));\n }"
]
| [
"0.6689552",
"0.6522414",
"0.6449044",
"0.63827217",
"0.6276094",
"0.6194052",
"0.61494035",
"0.61195695",
"0.61074775",
"0.6092032",
"0.6070536",
"0.6042858",
"0.60165423",
"0.59867793",
"0.5985733",
"0.59633327",
"0.59622526",
"0.5953381",
"0.593459",
"0.59075683",
"0.59030163",
"0.5885542",
"0.58853",
"0.5881706",
"0.5876371",
"0.587409",
"0.5871203",
"0.5849024",
"0.5840189",
"0.5839772"
]
| 0.6818632 | 0 |
genereate session and form key | function generateSessionKey(){
// genereate session and form key
$this->formSession['key'] = rand();
$GLOBALS["TSFE"]->fe_user->setKey('ses',$this->extKey, $this->formSession);
$GLOBALS["TSFE"]->storeSessionData();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getFormkey()\n {\n // generate the key and store it inside the class\n $this->formkey = $this->generateFormkey();\n // store the form key in the session\n $_SESSION['formkey'] = $this->formkey;\n // output the form key\n return \"<input type='hidden' name='formkey' value='\" . $this->formkey . \"' />\";\n }",
"private function generateFormkey()\n {\n $ip = $_SERVER['REMOTE_ADDR'];\n // mt_rand() is better than rand()\n $uniqid = uniqid(mt_rand(), true);\n\n return md5($ip . $uniqid);\n }",
"function generateFormToken( $form ) {\r\n\t\t\r\n\t\t // generate a token from an unique value\r\n\t\t\t$token = md5( uniqid( microtime( ), true) ); \r\n\t\t\t\r\n\t\t\t// Write the generated token to the session variable to check it against the hidden field when the form is sent\r\n\t\t\t$_SESSION[$form.'_token'] = $token; \r\n\t\t\t\r\n\t\t\treturn $token;\r\n\t\r\n\t\t}",
"public function getFormKey()\n {\n return Mage::getSingleton('core/session')->getFormKey();\n }",
"function generateFormToken($form) {\n\t\t$token = md5(uniqid(microtime(), true));\n\n\t\t// Write the generated token to the session variable to check it against the hidden field when the form is sent\n\t\t$_SESSION[$form . '_token'] = $token;\n\t\treturn $token;\n\t}",
"function add_form_key($form_name)\n{\n\tglobal $config, $template, $user;\n\n\t$now = time();\n\t$token_sid = ($user->data['user_id'] == ANONYMOUS && !empty($config['form_token_sid_guests'])) ? $user->session_id : '';\n\t$token = sha1($now . $user->data['user_form_salt'] . $form_name . $token_sid);\n\n\t$s_fields = build_hidden_fields(array(\n\t\t'creation_time' => $now,\n\t\t'form_token'\t=> $token,\n\t));\n\n\t$template->assign_vars(array(\n\t\t'S_FORM_TOKEN'\t=> $s_fields,\n\t));\n}",
"function generate_form_token($form) {\n\t// Generate a token from an unique value\n\t$token = md5(uniqid(microtime(), true));\n\n\t// Write the generated token to the session variable\n\t// to check it against the hidden field when the form is sent\n\t$_SESSION[$form . '_token'] = $token;\n\n\treturn $token;\n}",
"private function setSessionKey()\n {\n $this->sessionKey = 'formfactory.captcha.' . $this->formRequestClass;\n }",
"public function getSessionKey();",
"public static function generate($form) {\n\t\t$token = md5( uniqid(microtime(), true) );\n\t\t\n\t\t// Write the generated token to the session variable to check it against the hidden field when the form is sent\n\t\t$_SESSION[ $form . self::TOKEN_SUFIX ] = $token; \n\t\t\n\t\treturn $token;\n\t}",
"public static function generateKey () {\n $session = bin2hex(random_bytes(16));\n if (static::count([ 'key' => $session ]) == 1) {\n return static::generateSession();\n }\n return $session;\n }",
"public static function generate(){\r\n return Session::put(Config::get('session/token_name'), md5(uniqid()));\r\n }",
"public static function generate(){\n\t\treturn Session::put(Config::get('session/token_name'), md5(uniqid()));\t\t// Now we build the session class to utilis this method.\n\t}",
"function clearFormKey(){\n\t\t // session genereate key\n\t\t$this->formSession['key'] = null;\n\t}",
"public function generateFormToken($form)\n\t{\n\t\t$token = md5(uniqid(microtime(), true));\n \n\t\t// Write the generated token to the session variable to check it against the hidden field when the form is sent\n\t\t$_SESSION[$form.'_token'] = $token;\n \n\t\treturn $token;\n\t}",
"public function generateId()\n {\n $session_id = $this->request->param($this->sid_key, '');\n $_session_id = explode('-',$session_id ? xn_decrypt($session_id):'');\n $this->ip = isset($this->request->server['REMOTE_ADDR'])?$this->request->server['REMOTE_ADDR']:'127.0.0.1';\n $this->useragent = isset($this->request->server['USER-AGENT'])? md5($this->request->server['USER-AGENT']):'';\n $this->sid = ($_session_id[2]&&$this->useragent==$_session_id[1]) ? $_session_id[2] : get_uniqid(32);\n $this->sess_key = $_session_id[2]==$this->sid ? $session_id : xn_encrypt(getut().'-'.$this->useragent.'-'.$this->sid.'-'.$this->ip);\n }",
"function generate_token()\n {\n $this->load->helper('security');\n $res = do_hash(time().mt_rand());\n $new_key = substr($res,0,config_item('rest_key_length'));\n return $new_key;\n }",
"public static function regenerateSessionid();",
"protected function generateSessionToken() {}",
"public function generateFormToken($form){\n\t\t $token = md5(uniqid(microtime(), true));\n\t\t // generar fecha de generación del token\n\t\t $token_time = time();\n\t\t // escribir la información del token en sesión para poder\n\t\t // comprobar su validez cuando se reciba un token desde un formulario\n\t\t $_SESSION['csrf'][$form.'_token'] = array('token'=>$token, 'time'=>$token_time);; \n\t\t return $token;\n\t\t}",
"private function key() {\n return sprintf('form_%s_%d', $this->module->name, $this->module->id);\n }",
"function generate_key()\n\t{\n\t\treturn $this->key_prefix . md5( $this->key_prefix . microtime() . uniqid() . 'teamps' );\n\t}",
"public function generateAuthKey() {\n\t\t$this->txt_auth_key = Yii::$app->security->generateRandomString ();\n\t}",
"protected function generate_tok()\r\n {\r\n return $_SESSION['token'] = base64_encode(openssl_random_pseudo_bytes(32));\r\n }",
"public static function csrfGenerate($key)\n {\t\t\n\t\t$token = sha1( time() . $_SERVER['REMOTE_ADDR'] . Security::randomGenerator(15) );\n $_SESSION['csrf'][$key] = $token;\n\n return $token;\n }",
"public static function generate() \n{\n // set the `$tokenKey variable` by calling `get method` on `Config object`\n $tokenKey = Config::get('session.tokenKey');\n \n\n /* uniqid() - generates a unique ID based on the microtime (the current time in microseconds).\n Returns the unique identifier, as a string.\n Parametrs: 2 Optional parametrs.\n https://www.w3schools.com/php/func_misc_uniqid.asp */\n $random_string = uniqid();\n\n /* md5 — Calculate the md5 hash of a string\n Returns the calculated MD5 hash on success, or FALSE on failure\n Parametrs:\n 1) string\tRequired. The string to be calculated\n 2) raw\tOptional. Specifies hex or binary output format:\n TRUE - Raw 16 character binary format\n FALSE - Default. 32 character hex number\n https://www.w3schools.com/php/func_string_md5.asp */\n $token = md5($random_string);\n\n // add new element in the $_SESSION[] array\n return Session::put($tokenKey, $token);\n}",
"private function generateKey(): string\n\t{\n\t\t// `+` and `/` are replaced by `-` and `_`, resp.\n\t\t// The other characters (a-z, A-Z, 0-9) are legal within an URL.\n\t\t// As the number of bytes is divisible by 3, no trailing `=` occurs.\n\t\treturn strtr(base64_encode(random_bytes(3 * self::RANDOM_ID_LENGTH / 4)), '+/', '-_');\n\t}",
"abstract protected function generateKey();",
"public static function generateToken()\r\n {\r\n $_SESSION['CSRF_TOKEN'] = bin2hex(openssl_random_pseudo_bytes(32));\r\n }",
"public function generateAuthKey() {\n $this->llaveAutenticacion = Yii::$app->security->generateRandomString();\n }"
]
| [
"0.781944",
"0.742085",
"0.71514356",
"0.70864606",
"0.69766563",
"0.6976595",
"0.69587946",
"0.6912166",
"0.68557924",
"0.6851927",
"0.68401754",
"0.6837951",
"0.6806785",
"0.6806595",
"0.67806846",
"0.67467606",
"0.67209613",
"0.65797734",
"0.65732676",
"0.65649",
"0.6520691",
"0.6512221",
"0.64739525",
"0.6462935",
"0.64617556",
"0.6445221",
"0.64325064",
"0.64058185",
"0.6394622",
"0.63925433"
]
| 0.8588646 | 0 |
clear the form key | function clearFormKey(){
// session genereate key
$this->formSession['key'] = null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function clearInput()\n {\n $this->newPassword = '';\n $this->newPasswordConfirmation = '';\n $this->currentPassword = '';\n }",
"public function clear(string $key) : void;",
"public function clear(/*string*/ $key) /*void*/\n {\n unset($_SESSION[self::KEY][$key]);\n }",
"public function clearForms(){\n if( is::existset(munla::$session, 'forms') )\n unset(munla::$session['forms']);\n }",
"function clear(){\r\n\t\t$_SESSION[self::_KEY_][get_class($this)]->reset();\r\n\t}",
"function clear($key) {\n\t\tunset($this->args[$key]);\n\t}",
"public static function clear_key($k)\n\t{\n\t\tif(!$k)\n\t\t\treturn '';\n \t$k = htmlspecialchars(urldecode($k));\n \t$k = str_replace('..','',$k);\n \t$k = preg_replace('/\\_\\_(.+?)\\_\\_/','',$k);\n \t$k = preg_replace('/^([\\w\\.\\-\\_]+)$/','$1',$k);\n \treturn $k;\n\t}",
"private function resetInputFields(){\n $this->title = '';\n $this->original_url = '';\n $this->platform_id = '';\n }",
"public function clear() {\n foreach ($this->Fields as $key => $item) {\n $this->$key = null;\n }\n }",
"function clear_form_fields()\n{\n $str='';\n $str.='<script>\n\t\t\t\t\t\t\t $(\".form-horizontal\")[0].reset();\n\t\t\t\t\t\t\t </script>';\n return $str;\n}",
"public function Clear()\n {\n unset($this->_keyValPairs);\n $this->_keyValPairs = array();\n }",
"function setFormKey($key);",
"function action_clear() {\n\t\t\t$this->SESS->remove('objbrowser', 'choosen');\n\t\t}",
"function un_Set($key)\n {\n unset($this->keyvalList[$key]);\n unset($_SESSION[$key]);\n }",
"public function clear_style_keys()\t{\n\t\tglobal $phpbbForum;\n\t\t\n\t\t$phpbbForum->erase_style_keys();\n\t\t$this->styleKeys = array();\n\t}",
"function reset($key = false) {\n\t\t// writeToFile(\"reset:\" . $key);\n\n\t\tif($key) {\n\t\t\tunset($_SESSION[\"SV\"][$key]);\n\t\t}\n\t\telse {\n\t\t\tsession_unset();\n\t\t}\n\t}",
"public function disableFormKey()\r\n {\r\n Mage::getSingleton('core/session')->setData('_form_key', 'disabled');\r\n }",
"public function reset()\n {\n $this->values[self::KEY] = null;\n $this->values[self::VALUE] = null;\n }",
"public function reset()\n {\n $this->values[self::KEY] = null;\n $this->values[self::VALUE] = null;\n }",
"public function clear()\n {\n $this->inputFieldsGroup->clear();\n $this->inputFilesGroup->clear();\n $this->inputImagesGroup->clear();\n $this->inputConditionsGroup->clear();\n }",
"public function __unset($key) {\n\t\t$this->vars[$key] = '';\n\t}",
"public function clear( );",
"public function reset()\n {\n $this->values[self::_REQUEST] = null;\n $this->values[self::_CHANGE] = null;\n }",
"private function resetInputFields(){\n $this->name = '';\n }",
"public function removeKeyboard()\n {\n }",
"function clear_input_data()\r\n{\r\n if (isset($_SESSION['input'])) {\r\n $_SESSION['input'] = [];\r\n }\r\n}",
"public function resetInputFields(){\n $this->title = '';\n $this->content = '';\n }",
"public function __unset($key)\n {\n\t\t$this->_setSmartyMethod('clear_assign', array($key));\n //$this->_smarty()->clear_assign($key);\n }",
"public function clear_menu( )\n {\n $this->variables = array();\n }",
"function clear() {}"
]
| [
"0.7059604",
"0.68118227",
"0.6601355",
"0.6572244",
"0.6474494",
"0.64300543",
"0.6373123",
"0.62818336",
"0.6250565",
"0.6244337",
"0.6240946",
"0.6233312",
"0.6229625",
"0.6121275",
"0.61193526",
"0.6084725",
"0.60825163",
"0.6077097",
"0.6077097",
"0.6065231",
"0.6055698",
"0.60492814",
"0.6048209",
"0.6035225",
"0.6020748",
"0.6017456",
"0.6009822",
"0.60091025",
"0.6007826",
"0.5990681"
]
| 0.84970975 | 0 |
Returns the TableMap related to this object. This method is not needed for general use but a specific application could have a need. | public static function getTableMap()
{
return Propel::getServiceContainer()->getDatabaseMap(MetaTableMap::DATABASE_NAME)->getTable(MetaTableMap::TABLE_NAME);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getTableMap()\n {\n return Propel::getServiceContainer()->getDatabaseMap(ItemTableMap::DATABASE_NAME)->getTable(ItemTableMap::TABLE_NAME);\n }",
"public function getTableMap()\n {\n return $this->aTables;\n }",
"public static function getTableMap()\n {\n return Propel::getServiceContainer()->getDatabaseMap(AliFcTableMap::DATABASE_NAME)->getTable(AliFcTableMap::TABLE_NAME);\n }",
"public static function getTableMap()\n\t{\n\t\treturn Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME);\n\t}",
"public static function getTableMap()\n\t{\n\t\treturn Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME);\n\t}",
"public static function getTableMap()\n\t{\n\t\treturn Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME);\n\t}",
"public static function getTableMap()\n\t{\n\t\treturn Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME);\n\t}",
"public static function getTableMap()\n\t{\n\t\treturn Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME);\n\t}",
"public static function getTableMap()\n {\n return Propel::getServiceContainer()->getDatabaseMap(MenuConfigTableMap::DATABASE_NAME)->getTable(MenuConfigTableMap::TABLE_NAME);\n }",
"public static function getTableMap()\n {\n return Propel::getServiceContainer()->getDatabaseMap(EmployeeTableMap::DATABASE_NAME)->getTable(EmployeeTableMap::TABLE_NAME);\n }",
"public static function getTableMap()\n {\n return Propel::getServiceContainer()->getDatabaseMap(AliEmbonusTableMap::DATABASE_NAME)->getTable(AliEmbonusTableMap::TABLE_NAME);\n }",
"public static function getTableMap()\n {\n return Propel::getServiceContainer()->getDatabaseMap(ChoiceFilterTableMap::DATABASE_NAME)->getTable(ChoiceFilterTableMap::TABLE_NAME);\n }",
"public static function getTableMap()\n {\n return Propel::getServiceContainer()->getDatabaseMap(ApInvoiceTableMap::DATABASE_NAME)->getTable(ApInvoiceTableMap::TABLE_NAME);\n }",
"public static function getTableMap()\n {\n return Propel::getServiceContainer()->getDatabaseMap(AliEcommisionTableMap::DATABASE_NAME)->getTable(AliEcommisionTableMap::TABLE_NAME);\n }",
"public static function getTableMap()\n {\n return Propel::getServiceContainer()->getDatabaseMap(VideoTableMap::DATABASE_NAME)->getTable(VideoTableMap::TABLE_NAME);\n }",
"public static function getTableMap()\n {\n return Propel::getServiceContainer()->getDatabaseMap(ArtistTableMap::DATABASE_NAME)->getTable(ArtistTableMap::TABLE_NAME);\n }",
"public static function getTableMap()\n {\n return Propel::getServiceContainer()->getDatabaseMap(UseractionsTableMap::DATABASE_NAME)->getTable(UseractionsTableMap::TABLE_NAME);\n }",
"public static function getTableMap()\n {\n return Propel::getDatabaseMap(ReportPeer::DATABASE_NAME)->getTable(ReportPeer::TABLE_NAME);\n }",
"public static function getTableMap()\n {\n return Propel::getServiceContainer()->getDatabaseMap(TPreguntaTableMap::DATABASE_NAME)->getTable(TPreguntaTableMap::TABLE_NAME);\n }",
"public static function getTableMap()\n {\n return Propel::getServiceContainer()->getDatabaseMap(CiUsuariosTableMap::DATABASE_NAME)->getTable(CiUsuariosTableMap::TABLE_NAME);\n }",
"public static function getTableMap()\n {\n return Propel::getDatabaseMap(SertifikasiPdPeer::DATABASE_NAME)->getTable(SertifikasiPdPeer::TABLE_NAME);\n }",
"public static function getTableMap()\n {\n return Propel::getDatabaseMap(RuangLongitudinalPeer::DATABASE_NAME)->getTable(RuangLongitudinalPeer::TABLE_NAME);\n }",
"public static function getTableMap()\n {\n return Propel::getServiceContainer()->getDatabaseMap(EmailManagerHistoryTableMap::DATABASE_NAME)->getTable(EmailManagerHistoryTableMap::TABLE_NAME);\n }",
"public static function getTableMap()\n {\n return Propel::getDatabaseMap(GsDailyDefinedDosePeer::DATABASE_NAME)->getTable(GsDailyDefinedDosePeer::TABLE_NAME);\n }",
"public static function getTableMap()\n {\n return Propel::getServiceContainer()->getDatabaseMap(CKOrderXmlTableMap::DATABASE_NAME)->getTable(CKOrderXmlTableMap::TABLE_NAME);\n }",
"public static function getTableMap()\n {\n return Propel::getDatabaseMap(CastleTypePeer::DATABASE_NAME)->getTable(CastleTypePeer::TABLE_NAME);\n }",
"public static function getTableMap()\n {\n return Propel::getDatabaseMap(GsGeneriekeProductenPeer::DATABASE_NAME)->getTable(GsGeneriekeProductenPeer::TABLE_NAME);\n }",
"public function getQualifiedMapTable() {\n $options = $this->connection->getConnectionOptions();\n $prefix = $this->connection->tablePrefix($this->mapTable);\n if ($prefix) {\n return $this->mapTable;\n }\n else {\n return $options['database'] . '.' . $this->mapTable;\n }\n }",
"public static function getTableMap()\n {\n return Propel::getServiceContainer()->getDatabaseMap(EvaluacionPreguntaTableMap::DATABASE_NAME)->getTable(EvaluacionPreguntaTableMap::TABLE_NAME);\n }",
"public static function buildTableMap()\n {\n $dbMap = Propel::getServiceContainer()->getDatabaseMap(ItemTableMap::DATABASE_NAME);\n if (!$dbMap->hasTable(ItemTableMap::TABLE_NAME)) {\n $dbMap->addTableObject(new ItemTableMap());\n }\n }"
]
| [
"0.7656332",
"0.7633176",
"0.7556668",
"0.7547383",
"0.7547383",
"0.7547383",
"0.7547383",
"0.7547383",
"0.7527291",
"0.75024045",
"0.7461885",
"0.73794323",
"0.7272856",
"0.72666883",
"0.7250619",
"0.7237963",
"0.71342504",
"0.7131581",
"0.7061312",
"0.70287883",
"0.7027691",
"0.69496924",
"0.6887373",
"0.6874758",
"0.6865463",
"0.6842149",
"0.6530789",
"0.64424026",
"0.64046246",
"0.62678856"
]
| 0.7748421 | 0 |
Performs an INSERT on the database, given a Meta or Criteria object. | public static function doInsert($criteria, ConnectionInterface $con = null)
{
if (null === $con) {
$con = Propel::getServiceContainer()->getWriteConnection(MetaTableMap::DATABASE_NAME);
}
if ($criteria instanceof Criteria) {
$criteria = clone $criteria; // rename for clarity
} else {
$criteria = $criteria->buildCriteria(); // build Criteria from Meta object
}
if ($criteria->containsKey(MetaTableMap::COL_ID) && $criteria->keyContainsValue(MetaTableMap::COL_ID) ) {
throw new PropelException('Cannot insert a value for auto-increment primary key ('.MetaTableMap::COL_ID.')');
}
// Set the correct dbName
$query = MetaQuery::create()->mergeWith($criteria);
// use transaction because $criteria could contain info
// for more than one table (I guess, conceivably)
return $con->transaction(function () use ($con, $query) {
return $query->doInsert($con);
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function doInsert($criteria, ConnectionInterface $con = null)\n {\n if (null === $con) {\n $con = Propel::getServiceContainer()->getWriteConnection(UseractionsTableMap::DATABASE_NAME);\n }\n\n if ($criteria instanceof Criteria) {\n $criteria = clone $criteria; // rename for clarity\n } else {\n $criteria = $criteria->buildCriteria(); // build Criteria from Useractions object\n }\n\n if ($criteria->containsKey(UseractionsTableMap::COL_ID) && $criteria->keyContainsValue(UseractionsTableMap::COL_ID) ) {\n throw new PropelException('Cannot insert a value for auto-increment primary key ('.UseractionsTableMap::COL_ID.')');\n }\n\n\n // Set the correct dbName\n $query = UseractionsQuery::create()->mergeWith($criteria);\n\n // use transaction because $criteria could contain info\n // for more than one table (I guess, conceivably)\n return $con->transaction(function () use ($con, $query) {\n return $query->doInsert($con);\n });\n }",
"public static function doInsert($criteria, ConnectionInterface $con = null)\n {\n if (null === $con) {\n $con = Propel::getServiceContainer()->getWriteConnection(AliEmbonusTableMap::DATABASE_NAME);\n }\n\n if ($criteria instanceof Criteria) {\n $criteria = clone $criteria; // rename for clarity\n } else {\n $criteria = $criteria->buildCriteria(); // build Criteria from AliEmbonus object\n }\n\n if ($criteria->containsKey(AliEmbonusTableMap::COL_AID) && $criteria->keyContainsValue(AliEmbonusTableMap::COL_AID) ) {\n throw new PropelException('Cannot insert a value for auto-increment primary key ('.AliEmbonusTableMap::COL_AID.')');\n }\n\n\n // Set the correct dbName\n $query = AliEmbonusQuery::create()->mergeWith($criteria);\n\n // use transaction because $criteria could contain info\n // for more than one table (I guess, conceivably)\n return $con->transaction(function () use ($con, $query) {\n return $query->doInsert($con);\n });\n }",
"public static function doInsert($criteria, ConnectionInterface $con = null)\n {\n if (null === $con) {\n $con = Propel::getServiceContainer()->getWriteConnection(AliEcommisionTableMap::DATABASE_NAME);\n }\n\n if ($criteria instanceof Criteria) {\n $criteria = clone $criteria; // rename for clarity\n } else {\n $criteria = $criteria->buildCriteria(); // build Criteria from AliEcommision object\n }\n\n if ($criteria->containsKey(AliEcommisionTableMap::COL_ID) && $criteria->keyContainsValue(AliEcommisionTableMap::COL_ID) ) {\n throw new PropelException('Cannot insert a value for auto-increment primary key ('.AliEcommisionTableMap::COL_ID.')');\n }\n\n\n // Set the correct dbName\n $query = AliEcommisionQuery::create()->mergeWith($criteria);\n\n // use transaction because $criteria could contain info\n // for more than one table (I guess, conceivably)\n return $con->transaction(function () use ($con, $query) {\n return $query->doInsert($con);\n });\n }",
"public static function doInsert($criteria, ConnectionInterface $con = null)\n {\n if (null === $con) {\n $con = Propel::getServiceContainer()->getWriteConnection(ApInvoiceTableMap::DATABASE_NAME);\n }\n\n if ($criteria instanceof Criteria) {\n $criteria = clone $criteria; // rename for clarity\n } else {\n $criteria = $criteria->buildCriteria(); // build Criteria from ApInvoice object\n }\n\n\n // Set the correct dbName\n $query = ApInvoiceQuery::create()->mergeWith($criteria);\n\n // use transaction because $criteria could contain info\n // for more than one table (I guess, conceivably)\n return $con->transaction(function () use ($con, $query) {\n return $query->doInsert($con);\n });\n }",
"public static function doInsert($criteria, ConnectionInterface $con = null)\n {\n if (null === $con) {\n $con = Propel::getServiceContainer()->getWriteConnection(AliFcTableMap::DATABASE_NAME);\n }\n\n if ($criteria instanceof Criteria) {\n $criteria = clone $criteria; // rename for clarity\n } else {\n $criteria = $criteria->buildCriteria(); // build Criteria from AliFc object\n }\n\n if ($criteria->containsKey(AliFcTableMap::COL_AID) && $criteria->keyContainsValue(AliFcTableMap::COL_AID) ) {\n throw new PropelException('Cannot insert a value for auto-increment primary key ('.AliFcTableMap::COL_AID.')');\n }\n\n\n // Set the correct dbName\n $query = AliFcQuery::create()->mergeWith($criteria);\n\n // use transaction because $criteria could contain info\n // for more than one table (I guess, conceivably)\n return $con->transaction(function () use ($con, $query) {\n return $query->doInsert($con);\n });\n }",
"public static function doInsert($criteria, ConnectionInterface $con = null)\n {\n if (null === $con) {\n $con = Propel::getServiceContainer()->getWriteConnection(ItemTableMap::DATABASE_NAME);\n }\n\n if ($criteria instanceof Criteria) {\n $criteria = clone $criteria; // rename for clarity\n } else {\n $criteria = $criteria->buildCriteria(); // build Criteria from Item object\n }\n\n if ($criteria->containsKey(ItemTableMap::COL_ITEM_ID) && $criteria->keyContainsValue(ItemTableMap::COL_ITEM_ID) ) {\n throw new PropelException('Cannot insert a value for auto-increment primary key ('.ItemTableMap::COL_ITEM_ID.')');\n }\n\n\n // Set the correct dbName\n $query = ItemQuery::create()->mergeWith($criteria);\n\n // use transaction because $criteria could contain info\n // for more than one table (I guess, conceivably)\n return $con->transaction(function () use ($con, $query) {\n return $query->doInsert($con);\n });\n }",
"abstract protected function doInsert($subject, Statement $insertStatement);",
"public function insert() {\r\n\t\t$this->getMapper()->insert($this);\r\n\t}",
"public static function doInsert($criteria, ConnectionInterface $con = null)\n {\n if (null === $con) {\n $con = Propel::getServiceContainer()->getWriteConnection(TPreguntaTableMap::DATABASE_NAME);\n }\n\n if ($criteria instanceof Criteria) {\n $criteria = clone $criteria; // rename for clarity\n } else {\n $criteria = $criteria->buildCriteria(); // build Criteria from TPregunta object\n }\n\n if ($criteria->containsKey(TPreguntaTableMap::COL_TPRE_TIPO) && $criteria->keyContainsValue(TPreguntaTableMap::COL_TPRE_TIPO) ) {\n throw new PropelException('Cannot insert a value for auto-increment primary key ('.TPreguntaTableMap::COL_TPRE_TIPO.')');\n }\n\n\n // Set the correct dbName\n $query = TPreguntaQuery::create()->mergeWith($criteria);\n\n // use transaction because $criteria could contain info\n // for more than one table (I guess, conceivably)\n return $con->transaction(function () use ($con, $query) {\n return $query->doInsert($con);\n });\n }",
"protected function insert() {\n $dbh = $this->getDbh();\n $table = $this->tableName;\n $data = [];\n\n foreach ($this->fillable as $key => $value) {\n $data[$key] = $this->$key;\n }\n\n $query = 'INSERT INTO `' . $table . '` VALUES (NULL,';\n $first = true;\n foreach ($data AS $k => $value) {\n if (!$first)\n $query .= ', ';\n else\n $first = false;\n $query .= ':'.$k;\n }\n $query .= ')';\n\n $msc = microtime(true);\n\n $sth = $dbh->prepare($query);\n $sth->execute($data);\n\n $msc = microtime(true) - $msc;\n $line = \"insert() => \" . $query . \" with \" . implode(\"', '\", $data);\n $this->writeRequestLog($line, $msc);\n\n return true;\n }",
"protected function _insert()\n {\n \t$metadata = $this->_table->info(Zend_Db_Table_Abstract::METADATA);\n \t\n \tif(isset($metadata['created_at']))\n\t\t\t$this->_data['created_at'] = new Zend_Date ();\n \tif(isset($metadata['updated_at']))\n\t\t\t$this->_data['updated_at'] = new Zend_Date ();\n }",
"public function insert(DataObject $insertObject, Database_Config $databaseConfig = NULL);",
"public static function doInsert($criteria, ConnectionInterface $con = null)\n {\n if (null === $con) {\n $con = Propel::getServiceContainer()->getWriteConnection(VideoTableMap::DATABASE_NAME);\n }\n\n if ($criteria instanceof Criteria) {\n $criteria = clone $criteria; // rename for clarity\n } else {\n $criteria = $criteria->buildCriteria(); // build Criteria from Video object\n }\n\n if ($criteria->containsKey(VideoTableMap::COL_ID) && $criteria->keyContainsValue(VideoTableMap::COL_ID) ) {\n throw new PropelException('Cannot insert a value for auto-increment primary key ('.VideoTableMap::COL_ID.')');\n }\n\n\n // Set the correct dbName\n $query = VideoQuery::create()->mergeWith($criteria);\n\n // use transaction because $criteria could contain info\n // for more than one table (I guess, conceivably)\n return $con->transaction(function () use ($con, $query) {\n return $query->doInsert($con);\n });\n }",
"public function insert()\n\t{\n\t\t$sql_array = array();\n\t\tforeach ($this->object_config as $name => $null)\n\t\t{\n\t\t\t$sql_array[$name] = $this->validate_property($this->$name, $this->object_config[$name]);\n\t\t}\n\n\t\t$sql = 'INSERT INTO ' . $this->sql_table . ' ' . $this->db->sql_build_array('INSERT', $sql_array);\n\t\t$this->db->sql_query($sql);\n\n\t\tif ($id = $this->db->sql_nextid())\n\t\t{\n\t\t\t$this->{$this->sql_id_field} = $id;\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public static function doInsert($criteria, ConnectionInterface $con = null)\n {\n if (null === $con) {\n $con = Propel::getServiceContainer()->getWriteConnection(ArtistTableMap::DATABASE_NAME);\n }\n\n if ($criteria instanceof Criteria) {\n $criteria = clone $criteria; // rename for clarity\n } else {\n $criteria = $criteria->buildCriteria(); // build Criteria from Artist object\n }\n\n if ($criteria->containsKey(ArtistTableMap::ID) && $criteria->keyContainsValue(ArtistTableMap::ID) ) {\n throw new PropelException('Cannot insert a value for auto-increment primary key ('.ArtistTableMap::ID.')');\n }\n\n\n // Set the correct dbName\n $query = ArtistQuery::create()->mergeWith($criteria);\n\n try {\n // use transaction because $criteria could contain info\n // for more than one table (I guess, conceivably)\n $con->beginTransaction();\n $pk = $query->doInsert($con);\n $con->commit();\n } catch (PropelException $e) {\n $con->rollBack();\n throw $e;\n }\n\n return $pk;\n }",
"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}",
"protected function performInsert()\n {\n $attributes = $this->getAttributes();\n $updatedField = $this->getApi()->{'create'.ucfirst($this->getEntity())}($attributes);\n $this->fill($updatedField);\n $this->exists = true;\n $this->wasRecentlyCreated = true;\n\n return true;\n }",
"public function insert($object, $meta=null)\n {\n $query = new Query\\Insert;\n\n if (is_array($meta)) {\n throw new \\BadMethodCallException(\"Please use insertTable()\");\n }\n\n if ($meta) {\n $meta = !$meta instanceof Meta ? $this->mapper->getMeta($meta) : $meta;\n } else {\n $meta = $this->mapper->getMeta(get_class($object));\n }\n\n if (!$meta->canInsert) {\n throw new Exception(\"Meta {$meta->id} prohibits insert\");\n }\n\n event_before: {\n if (isset($meta->on['beforeInsert'])) {\n foreach ($meta->on['beforeInsert'] as $cb) { $cb = [$object, $cb]; $cb(); }\n }\n if (isset($this->on['beforeInsert'])) {\n foreach ($this->on['beforeInsert'] as $cb) { $cb($object, $meta); }\n }\n }\n\n query: {\n $query->values = $this->mapper->mapObjectToRow($object, $meta, 'insert');\n if (!$query->table) {\n $query->table = $meta->table;\n }\n\n list ($sql, $params, $props) = $query->buildQuery($meta);\n $stmt = $this->getConnector()->prepare($sql);\n $stmt->execute($params);\n }\n \n $lastInsertId = null;\n\n // we need to be careful with \"lastInsertId\": SQLite generates one even without a PRIMARY\n if ($object && $meta->primary) {\n $lastInsertId = $this->getConnector()->lastInsertId();\n if ($lastInsertId && $meta->autoinc) {\n $field = $meta->fields[$meta->autoinc];\n $handler = $this->mapper->determineTypeHandler(Mapper::AUTOINC_TYPE);\n if (!$handler) {\n throw new \\UnexpectedValueException();\n }\n $meta->setValue($object, $meta->autoinc, $lastInsertId);\n }\n }\n \n event_after: {\n if (isset($meta->on['afterInsert'])) {\n foreach ($meta->on['afterInsert'] as $cb) { $cb = [$object, $cb]; $cb(); }\n }\n if (isset($this->on['afterInsert'])) {\n foreach ($this->on['afterInsert'] as $cb) { $cb($object, $meta); }\n }\n }\n\n return $lastInsertId;\n }",
"public function insert(stubObject $entity);",
"public static function doInsert($values, PropelPDO $con = null)\n\t{\n\t\tif ($con === null) {\n\t\t\t$con = Propel::getConnection(CoursePeer::DATABASE_NAME, Propel::CONNECTION_WRITE);\n\t\t}\n\n\t\tif ($values instanceof Criteria) {\n\t\t\t$criteria = clone $values; // rename for clarity\n\t\t} else {\n\t\t\t$criteria = $values->buildCriteria(); // build Criteria from Course object\n\t\t}\n\n\n\t\t// Set the correct dbName\n\t\t$criteria->setDbName(self::DATABASE_NAME);\n\n\t\ttry {\n\t\t\t// use transaction because $criteria could contain info\n\t\t\t// for more than one table (I guess, conceivably)\n\t\t\t$con->beginTransaction();\n\t\t\t$pk = BasePeer::doInsert($criteria, $con);\n\t\t\t$con->commit();\n\t\t} catch(PropelException $e) {\n\t\t\t$con->rollBack();\n\t\t\tthrow $e;\n\t\t}\n\n\t\treturn $pk;\n\t}",
"public static function doInsert($criteria, ConnectionInterface $con = null)\n {\n if (null === $con) {\n $con = Propel::getServiceContainer()->getWriteConnection(EmployeeTableMap::DATABASE_NAME);\n }\n\n if ($criteria instanceof Criteria) {\n $criteria = clone $criteria; // rename for clarity\n } else {\n $criteria = $criteria->buildCriteria(); // build Criteria from Employee object\n }\n\n if ($criteria->containsKey(EmployeeTableMap::COL_OID) && $criteria->keyContainsValue(EmployeeTableMap::COL_OID) ) {\n throw new PropelException('Cannot insert a value for auto-increment primary key ('.EmployeeTableMap::COL_OID.')');\n }\n\n\n // Set the correct dbName\n $query = EmployeeQuery::create()->mergeWith($criteria);\n\n // use transaction because $criteria could contain info\n // for more than one table (I guess, conceivably)\n return $con->transaction(function () use ($con, $query) {\n return $query->doInsert($con);\n });\n }",
"public final function insert()\n {\n // Run beforeCreate event methods and stop when one of them return bool false\n if ($this->runBefore('create') === false)\n return false;\n\n // Create tablename\n $tbl = '{db_prefix}' . $this->tbl;\n\n // Prepare query and content arrays\n $fields = array();\n $values = array();\n $keys = array();\n\n // Build insert fields\n foreach ( $this->data as $fld => $val )\n {\n // Skip datafields not in definition\n if (!$this->isField($fld))\n continue;\n\n // Regardless of all further actions, check and cleanup the value\n $val = $this->checkFieldvalue($fld, $val);\n\n // Put fieldname and the fieldtype to the fields array\n $fields[$fld] = $this->getFieldtype($fld);\n\n // Object or array values are stored serialized to db\n $values[] = is_array($val) || is_object($val) ? serialize($val) : $val;\n }\n\n // Add name of primary key field\n $keys[0] = $this->pk;\n\n // Run query and store insert id as pk value\n $this->data->{$this->pk} = $this->db->insert('insert', $tbl, $fields, $values, $keys);\n\n return $this->data->{$this->pk};\n }",
"public function insert($vo) {\n //get instance of date to store in Db\n $date = date(\"Y-m-d h:m:s\");\n // Prepare the insert statement SQL *Talked more on this in acompanying document*\n $stmt = $this->getPdo()->prepare(\n 'INSERT INTO '.$this->_tableName.' ('.\n 'strProductName,'.\n 'strProductDesc,'.\n 'strProductCode,'.\n 'intStock,'.\n 'dtmAdded,'.\n 'dtmDiscontinued,'.\n 'decPrice'.\n ') '.\n 'VALUES ('.\n ':productName,'.\n ':productDesc,'.\n ':productCode,'.\n ':intStock,'.\n ':dtmAdded,'.\n ':dtmDiscontinued,'.\n ':decPrice'.\n ')'\n );\n // Set Params to insert\n //Set Datatype based on PDO param constants, Adds extra level of protection\n $stmt->bindParam(':productName', $vo->getStrProductName(), PDO::PARAM_STR);\n $stmt->bindParam(':productDesc', $vo->getStrProductDesc(), PDO::PARAM_STR);\n $stmt->bindParam(':productCode', $vo->getStrProductCode(), PDO::PARAM_STR);\n $stmt->bindParam(':intStock', $vo->getIntStock(), PDO::PARAM_INT);\n $stmt->bindParam(':dtmAdded', $date, PDO::PARAM_STR);\n $stmt->bindParam(':dtmDiscontinued', $vo->getDtmDiscontinued(), PDO::PARAM_STR);\n $stmt->bindParam(':decPrice', $vo->getDecPrice(), PDO::PARAM_STR);\n\n // Try to execute the statement, catch exception if fails.\n try {\n $stmt->execute();\n }\n // Catch and output any exceptions\n catch (PDOException $e)\n {\n var_Dump($e);\n }\n }",
"public function insert(DataObject $entity){\n }",
"public static function doInsert($criteria, ConnectionInterface $con = null)\n {\n if (null === $con) {\n $con = Propel::getServiceContainer()->getWriteConnection(EvaluacionPreguntaTableMap::DATABASE_NAME);\n }\n\n if ($criteria instanceof Criteria) {\n $criteria = clone $criteria; // rename for clarity\n } else {\n $criteria = $criteria->buildCriteria(); // build Criteria from EvaluacionPregunta object\n }\n\n if ($criteria->containsKey(EvaluacionPreguntaTableMap::COL_EVPR_CODIGO) && $criteria->keyContainsValue(EvaluacionPreguntaTableMap::COL_EVPR_CODIGO) ) {\n throw new PropelException('Cannot insert a value for auto-increment primary key ('.EvaluacionPreguntaTableMap::COL_EVPR_CODIGO.')');\n }\n\n\n // Set the correct dbName\n $query = EvaluacionPreguntaQuery::create()->mergeWith($criteria);\n\n // use transaction because $criteria could contain info\n // for more than one table (I guess, conceivably)\n return $con->transaction(function () use ($con, $query) {\n return $query->doInsert($con);\n });\n }",
"function insert($sql){\n\n\t\tglobal $way;\n\t\t$way -> query($sql);\n\n\t}",
"public function insert($data);",
"protected function saveInsert()\n {\n }",
"public static function doInsert($criteria, ConnectionInterface $con = null)\n {\n if (null === $con) {\n $con = Propel::getServiceContainer()->getWriteConnection(CKOrderXmlTableMap::DATABASE_NAME);\n }\n\n if ($criteria instanceof Criteria) {\n $criteria = clone $criteria; // rename for clarity\n } else {\n $criteria = $criteria->buildCriteria(); // build Criteria from CKOrderXml object\n }\n\n if ($criteria->containsKey(CKOrderXmlTableMap::COL_ID) && $criteria->keyContainsValue(CKOrderXmlTableMap::COL_ID) ) {\n throw new PropelException('Cannot insert a value for auto-increment primary key ('.CKOrderXmlTableMap::COL_ID.')');\n }\n\n\n // Set the correct dbName\n $query = CKOrderXmlQuery::create()->mergeWith($criteria);\n\n // use transaction because $criteria could contain info\n // for more than one table (I guess, conceivably)\n return $con->transaction(function () use ($con, $query) {\n return $query->doInsert($con);\n });\n }",
"public static function doInsert($criteria, ConnectionInterface $con = null)\n {\n if (null === $con) {\n $con = Propel::getServiceContainer()->getWriteConnection(EmailManagerHistoryTableMap::DATABASE_NAME);\n }\n\n if ($criteria instanceof Criteria) {\n $criteria = clone $criteria; // rename for clarity\n } else {\n $criteria = $criteria->buildCriteria(); // build Criteria from EmailManagerHistory object\n }\n\n if ($criteria->containsKey(EmailManagerHistoryTableMap::ID) && $criteria->keyContainsValue(EmailManagerHistoryTableMap::ID) ) {\n throw new PropelException('Cannot insert a value for auto-increment primary key ('.EmailManagerHistoryTableMap::ID.')');\n }\n\n\n // Set the correct dbName\n $query = EmailManagerHistoryQuery::create()->mergeWith($criteria);\n\n try {\n // use transaction because $criteria could contain info\n // for more than one table (I guess, conceivably)\n $con->beginTransaction();\n $pk = $query->doInsert($con);\n $con->commit();\n } catch (PropelException $e) {\n $con->rollBack();\n throw $e;\n }\n\n return $pk;\n }"
]
| [
"0.66511565",
"0.6605639",
"0.6516866",
"0.6433935",
"0.6431932",
"0.6413759",
"0.6410449",
"0.63487864",
"0.6339228",
"0.631065",
"0.6286958",
"0.6273669",
"0.6269011",
"0.6267522",
"0.6233077",
"0.61884815",
"0.61806804",
"0.61639947",
"0.6156789",
"0.61479306",
"0.6103456",
"0.6095237",
"0.60898507",
"0.6060074",
"0.60302633",
"0.5989087",
"0.598886",
"0.596739",
"0.59628785",
"0.5956517"
]
| 0.69838357 | 0 |
Returns request info table | public function getRequestsTable()
{
return Mage::getResourceModel('mp_debug/requestInfo')->getMainTable();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getTableStructure(Request $request) {\n $table = $request->table;\n return json_encode(DB::select(\"describe $table\"));\n }",
"public function getTableInformation() {}",
"public function getInfo() \n {\n return $this->requestInfo;\n }",
"public function getListRequest()\n {\n $db = $this->dblocal;\n try\n {\n $stmt = $db->prepare(\"SELECT @rownum := @rownum + 1 AS urutan,t.* FROM m_request t, \n (SELECT @rownum := 0) r ORDER BY id_request ASC\");\n $stmt->execute();\n $stat[0] = true;\n $stat[1] = $stmt->fetchAll(PDO::FETCH_ASSOC);\n return $stat;\n }\n catch(PDOException $ex)\n {\n $stat[0] = false;\n $stat[1] = $ex->getMessage();\n return $stat;\n }\n }",
"protected function getRequestData()\n {\n return \\Includes\\Utils\\ArrayManager::filterByKeys(\n \\XLite\\Core\\Request::getInstance()->getData(),\n array('paymentStatus', 'shippingStatus', 'adminNotes')\n );\n }",
"public function getTableData(Request $request) {\n $table_name = $request->table_name;\n $limit = $request->limit;\n return DB::table($table_name)->paginate($limit);\n }",
"function GetRequestDetails(){\n\t\t\n\t\tif(!empty($this->input->post('idrequest')))\n\t\t\t$this->db->where('a.id_request_sd',$this->input->post('idrequest'));\n\n\t\tif(!empty($this->input->post('idstatus')))\n\t\t\t$this->db->where_in('a.id_status',$this->input->post('idstatus'));\n\n\t\t$result = $this->db->select('a.id_request_sd,a.`order`,b.`client`,b.project ')\n\t\t\t\t\t\t->from('dis_request_sd_detail a')\n\t\t\t\t\t\t->JOIN('access_order b',' a.`order`=b.`order`')\n \n\t\t\t\t\t\t->get();\n\n\t\t\n\t\t\treturn $result->result();\n\t\t\n\n\t\t\n\t}",
"protected function getTablesFromRequest()\n {\n $tables = array();\n $dbLength = mb_strlen($this->db);\n foreach ($_REQUEST['t_h'] as $key => $value) {\n if ($value) {\n $tables[] = mb_substr($key, $dbLength + 1);\n }\n }\n\n return $tables;\n }",
"public function getHyperTable(Request $request) {\n $table_name = $request->table_name;\n\n $get_table = HTCentralModel::select('id')->where('table_name', $table_name)->get();\n if (!isset($get_table[0])) {\n $output = array('status' => 500, 'message' => 'table does not exist');\n return json_encode($output);\n } else {\n $table_id = $get_table[0]->id;\n $get_columns = HTColumnsModel::select('id', 'hyper_column_name', 'hyper_column_icon', 'hyper_column_type')->where('table_id', $table_id)->get();\n return json_encode($get_columns);\n }\n\n }",
"public function getRequestsDataWithKey() {\n \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.status = \"L\"';\n \n $requests = $this->conn->query($sql)->fetchAll();\n \n $requestData = [];\n foreach($requests as $request) {\n $requestData[$request['id']] = $request;\n }\n \n return $requestData;\n }",
"public function getKPRequestList(Request $request)\n {\n $requests = CustomRequest::join('students AS stndt', 'requests.student_id', '=', 'stndt.id')\n ->join('study_programs AS std_prgm', 'std_prgm.id', '=', 'stndt.study_program_id')\n ->leftJoin('session_statuses AS session_status', function ($join) {\n $join->on('session_status.student_id', '=', 'stndt.id')\n ->on('session_status.type', '=', 'requests.type');\n })\n ->select([\n 'requests.id',\n 'requests.status',\n 'requests.type',\n 'requests.title',\n 'stndt.npm AS npm',\n DB::raw('SUBSTR(stndt.npm, 1, 2) as generation'),\n 'stndt.name AS name',\n 'stndt.email AS email',\n 'std_prgm.name AS study_program_name',\n 'requests.status_sidang AS session_status_status',\n ])\n ->where('requests.type', CreationType::KP)\n ->where('requests.status', '!=', RequestStatus::Draft);\n\n return Datatables::of($requests)\n ->setRowClass(function () {\n return \"custom-tr-text-ellipsis\";\n })\n ->filterColumn('generation', function ($query, $keyword) {\n $query->whereRaw(\"CONCAT(SUBSTR(stndt.npm, 1, 2),'-',SUBSTR(stndt.npm, 1, 2)) like ?\", [\"%{$keyword}%\"]);\n })\n ->filterColumn('npm', function ($query, $keyword) {\n $query->whereRaw(\"CONCAT(stndt.npm,'-',stndt.npm) like ?\", [\"%{$keyword}%\"]);\n })\n ->filterColumn('name', function ($query, $keyword) {\n $query->whereRaw(\"CONCAT(stndt.name,'-',stndt.name) like ?\", [\"%{$keyword}%\"]);\n })\n ->filterColumn('email', function ($query, $keyword) {\n $query->whereRaw(\"CONCAT(stndt.email,'-',stndt.email) like ?\", [\"%{$keyword}%\"]);\n })\n ->filterColumn('study_program_name', function ($query, $keyword) {\n $query->whereRaw(\"CONCAT(std_prgm.name,'-',std_prgm.name) like ?\", [\"%{$keyword}%\"]);\n })\n ->filterColumn('session_status_status', function ($query, $keyword) {\n $query->where('status_sidang', $keyword);\n })\n ->editColumn('status', function(CustomRequest $request) {\n return $this->getRecordsStatusLabel($request);\n })\n ->editColumn('session_status_status', function(CustomRequest $request) {\n return $this->getRecordsSessionStatusLabel($request);\n })\n ->editColumn('type', function(CustomRequest $request) {\n return $this->getRecordsTypeLabel($request);\n })\n ->addColumn('actions', function (CustomRequest $request) {\n return $this->getActionsButtons($request, ['reject' => 'm-t-3', 'accept' => 'm-t-3']);\n })\n ->rawColumns(['actions', 'type', 'status', 'session_status_status'])\n ->make(true);\n }",
"function getRequestInfo($data)\n{\n\t//Array data:\n\t// request -> either 'succeeded' or 'failed'\n\t// reason -> why request succeeded or failed \n\t$requestArray = array(\n\t\t\t\t\"request\" => \"\",\n\t\t\t\t\"reason\" => \"\"\n\t\t\t\t);\n\t$requestRequestArray = getData($data, \"Page/Request/Status\");\n\t$reasonRequestArray = getData($data, \"Page/Request/Status/\" . $reasonRequestArray[0]);\n\t$requestArray['request'] = $requestRequestArray[0];\n\t$requestArray['reason'] = $reasonRequestArray[0];\n\t\n\treturn $requestArray;\n\t\n\t\n}",
"private function getRequestData()\n {\n $request = Shopware()->Front()->Request();\n\n return array(\n 'Class' => get_class($request),\n 'Module' => $request->getModuleName(),\n 'Controller' => $request->getControllerName(),\n 'Action' => $request->getActionName(),\n 'IP' => $request->getClientIp(),\n 'Http host' => $request->getHttpHost(),\n 'Request uri' => $request->getRequestUri(),\n 'Scheme' => $request->getScheme(),\n 'Server' => $request->getServer(),\n 'Base url' => $request->getBaseUrl(),\n 'Base url (raw)' => $request->getBaseUrl(true),\n 'Parameters' => $request->getParams(),\n 'Path information' => $request->getPathInfo(),\n 'Base path' => $request->getBasePath(),\n 'Header' => (function_exists('getallheaders')) ? getallheaders() : array(),\n );\n }",
"function Info()\n\t{\n\t\t$arrReturn['TableName'] = $this->_strName;\n\t\tif ($this->_bolRowHighlighting)\n\t\t{\n\t\t\t$arrReturn['RowHighlighting'] = \"True\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$arrReturn['RowHighlighting'] = \"False\";\n\t\t}\n\t\t\n\t\tif ($this->_bolDetail)\n\t\t{\n\t\t\t$arrReturn['ShowDetail'] = \"True\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$arrReturn['ShowDetail'] = \"False\";\n\t\t}\n\n\t\tif ($this->_bolToolTips)\n\t\t{\n\t\t\t$arrReturn['ToolTips'] = \"True\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$arrReturn['ToolTips'] = \"False\";\n\t\t}\n\t\t\n\t\tif ($this->_bolLinked)\n\t\t{\n\t\t\t$arrReturn['Linked'] = \"True\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$arrReturn['Linked'] = \"False\";\n\t\t}\n\t\t\n\t\t$arrReturn['Header']\t\t= $this->_arrHeader;\n\t\t$arrReturn['Widths']\t\t= $this->_arrWidths;\n\t\t$arrReturn['Alignments']\t= $this->_arrAlignments;\n\t\t$arrReturn['LinkedTables']\t= $this->_arrlinkedTables;\n\t\t$arrReturn['Rows']\t\t\t= $this->_arrRows;\n\t\t\n\t\t\n\t\treturn $arrReturn;\n\t}",
"public function getAllInfoActivity()\n {\n return QcOverTimeRequest::where('action', $this->getDefaultHasAction())->get();\n }",
"public function _GetCacheTableInfos()\n {\n $aTableInfo = parent::_GetCacheTableInfos();\n $activePage = $this->getActivePageService()->getActivePage();\n $aTableInfo[] = array('table' => 'cms_tpl_page', 'id' => $activePage->id);\n $aTableInfo[] = array('table' => 'cms_portal', 'id' => '');\n $aTableInfo[] = array('table' => 'cms_division', 'id' => '');\n\n return $aTableInfo;\n }",
"function get_request_summary($requestid)\n\t{\n\t\t$this->db->select('lic_file_downloads.*, resources.filename as filepath');\n\t\t$this->db->join('resources', 'resources.resource_id = lic_file_downloads.fileid');\t\t\n\t\t$this->db->where('requestid', $requestid);\n\t\treturn $this->db->get('lic_file_downloads')->result_array();\n\t}",
"function table()\n {\n\n $db = $this->getDatabaseConnection();\n $dbtype = $db->phptype; // Database type is stored here. Crazy but true.\n\n return array('user_id' => DB_DATAOBJECT_INT + DB_DATAOBJECT_NOTNULL,\n 'yubikey_id' => DB_DATAOBJECT_STR + DB_DATAOBJECT_NOTNULL,\n 'created' => DB_DATAOBJECT_STR + DB_DATAOBJECT_DATE + DB_DATAOBJECT_TIME + DB_DATAOBJECT_NOTNULL,\n 'modified' => ($dbtype == 'mysql' || $dbtype == 'mysqli') ?\n DB_DATAOBJECT_MYSQLTIMESTAMP + DB_DATAOBJECT_NOTNULL :\n DB_DATAOBJECT_STR + DB_DATAOBJECT_DATE + DB_DATAOBJECT_TIME\n );\n }",
"public function getUserGroupRequestTable()\n {\n if (!$this->userGroupRequestTable) {\n $sm = $this->getServiceLocator();\n $this->userGroupRequestTable = $sm->get('Group\\Model\\UserGroupRequestTable');\n }\n return $this->userGroupRequestTable;\n }",
"protected function select($request) {\r\n $message = \"\";\r\n try {\r\n $results = $this->connection->query($request);\r\n } catch (PDOException $e) {\r\n $json= json_decode(file_get_contents(\"./framework/lang/\".$this->lang.\"/information.json\"));\r\n $message=$json->Error->ErrorType->FailExecRequest;\r\n $message = $message .$request.\" \". $e->getMessage();\r\n return $message;\r\n }\r\n $table = $results->fetchALL(PDO::FETCH_ASSOC); // on dit qu'on veut que le résultat soit récupérable sous forme de tableau)\r\n return $table;\r\n }",
"function tableInfo($table) {\r\n\t\t$res = $this->db->Execute($this->db->metaColumnsSQL);\r\n\t\t$info = $res->FetchRow();\r\n\t\t$newInfo = array('Typ' => $info['Engine'],\r\n\t\t\t\t\t\t 'Kodowanie' => $info['Collation'],\r\n\t\t\t\t\t\t 'Ilość rekordów' => $info['Rows'],\r\n\t\t\t\t\t\t 'Data utworzenia' => $info['Create_time'],\r\n\t\t\t\t\t\t 'Data ostatniej modyfikacji' => $info['Update_time'],\r\n\t\t\t\t\t\t 'Następny numer' => empty($info['Auto_increment']) ? 1 : $info['Auto_increment']\r\n\t\t\t\t\t\t);\r\n\t\treturn $newInfo;\r\n\t}",
"public function index(Request $request)\n {\n // $re = requestt::all(); \n // return $re;\n \n $req = DB::table('cbnv')\n ->join('requests','requests.id_author','=','cbnv.id')\n ->join('bophan','bophan.id','=','cbnv.id_bophan')\n// ->select('request.id','cbnv.id_bophan','bophan.name','request.title','request.description','request.id_author','request.due','request.category')\n ->select('requests.*','cbnv.id_bophan','cbnv.name')\n ->get();\n \n return response()->json($req);\n }",
"public function getRequestData();",
"public function getRequests()\n {\n return $this->hasMany(Request::className(), ['PK_Trip' => 'PK_Trip']);\n }",
"public function getAction($request) {\n $table = $request[0];\n\n\tif (is_array($request) && strcmp($table, 'tasks') == 0) {\n $sql = \"SELECT * FROM `$table`\";\n return $this->db->query($sql);\n }\n\n return null;\n }",
"public function index(Request $request)\n {\n if($request->query('req')) {\n switch($request->query('req'))\n {\n case \"dt\":\n if($request->session()->get('rombel_id')) {\n $kkm = Kkm::where([\n ['rombel_id', '=', $request->session()->get('rombel_id')],\n ['periode_id', '=', $request->session()->get('periode_aktif')]\n ])->with('mapels')->get();\n }\n\n return DataTables::of($kkm)->addIndexColumn()->toJson();\n break;\n }\n }\n }",
"public function conciergeRequestDetails(Request $request){\n if($request->isMethod(\"post\")){\n try{\n $response['data'] = Requests::where([['id','=',$request['id']]])->with(['categories','users','requestDetail'])->first()->toArray();\n $response['message'] = \"Request details data.\"; \n $response['status'] = \"true\"; \n }catch(Exception $e){\n $response['status'] = \"false\"; \n $response['data'] = [];\n $response['message'] = $e->getMessage(); \n }\n $this->response($response); \n }\n }",
"public function get_fields_for_response($request)\n {\n }",
"public function loadInfo()\n\t{\n\t\t$this->_info = $this->_adapter->describeTable($this->_identifier);\n\t}",
"public function getTableData()\n\t{\n\t}"
]
| [
"0.668056",
"0.65945596",
"0.62213683",
"0.62172675",
"0.6194118",
"0.6160408",
"0.6068965",
"0.604819",
"0.60102564",
"0.59300107",
"0.5895395",
"0.5856982",
"0.58289963",
"0.58281136",
"0.582055",
"0.5815674",
"0.5782675",
"0.5740051",
"0.57181734",
"0.5706997",
"0.5700029",
"0.5654859",
"0.5652438",
"0.5647439",
"0.5610759",
"0.5602495",
"0.55940163",
"0.5592983",
"0.55825526",
"0.5581107"
]
| 0.7889726 | 0 |
Register custom edd_pup_email post type for storing sent updates | function edd_pup_post_types() {
$edd_pup_email_labels = array(
'name' => __('Product Update Emails', 'post type general name', 'edd-pup' ),
'singular_name' => __('Product Update Email', 'post type singular name', 'edd-pup' ),
'add_new' => __( 'Add New', 'edd-pup' ),
'add_new_item' => __( 'Add New Update Email', 'edd-pup' ),
'edit_item' => __( 'Edit Update Email', 'edd-pup' ),
'new_item' => __( 'New Update Email', 'edd-pup' ),
'all_items' => __( 'All Update Emails', 'edd-pup' ),
'view_item' => __( 'View Update Email', 'edd-pup' ),
'search_items' => __( 'Search Update Emails', 'edd-pup' ),
'not_found' => __( 'No Update Email found', 'edd-pup' ),
'not_found_in_trash'=> __( 'No update emails found in Trash', 'edd-pup' ),
'parent_item_colon' => '',
'menu_name' => __( 'Product Updates', 'edd-pup' )
);
$edd_pup_email_args = array(
'labels' => apply_filters( 'edd_pup_email_labels', $edd_pup_email_labels ),
'public' => true,
'exclude_from_search' => true,
'publicly_queryable' => false,
'query_var' => false,
'rewrite' => false,
'show_ui' => true,
'show_in_menu' => 'edit.php?post_type=download&page=edd-prod-updates',
'show_in_nav_menus' => false,
'capability_type' => 'install_plugins',
//'map_meta_cap' => true,
'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt', 'revisions' ),
'can_export' => true
);
register_post_type( 'edd_pup_email', $edd_pup_email_args );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function addPostType()\n {\n WordPress::registerType('lbwp-nl', 'Newsletter', 'Newsletter', array(\n 'show_in_menu' => 'newsletter',\n 'publicly_queryable' => false,\n 'exclude_from_search' => true,\n 'supports' => array('title')\n ), 'n');\n }",
"public function registerCustomPostTypes() {\n\n\n }",
"public function register_qmgt_custom_post() {\r\n\t\trequire_once( QMGT_ROOT . '/qmgt-custom-post-type.php');\r\n\t}",
"public static function registerWPPostType()\n {\n register_post_type\n (\n 'fs_feed_entry',\n array\n (\n 'label' => 'Feed Entries',\n 'labels' => array\n (\n 'name' => 'Feed Entries',\n 'singular_name' => 'Feed Entry',\n 'add_new' => 'Add New',\n 'add_new_item' => 'Add New Feed Entry',\n 'edit_item' => 'Edit Feed Entry',\n 'new_item' => 'New Feed Entry',\n 'view_item' => 'View Feed Entry',\n 'search_items' => 'Search Feed Entries',\n 'not_found' => 'No Feed Entries Found',\n 'not_found_in_trash' => 'No Feed Entries Found In Trash',\n 'parent_item_colon' => 'Parent Feed Entries:',\n 'edit' => 'Edit',\n 'view' => 'View Feed Entry'\n ),\n 'public' => false,\n 'show_ui' => true\n )\n );\n }",
"protected function addPostTypeConfigs()\n {\n // TODO: add post type configs\n }",
"function foucs_contact_custom_post_type() {\n\t$labels = array(\n\t\t'name' \t\t\t\t=> 'Messages',\n\t\t'singular_name' \t=> 'Message',\n\t\t'menu_name'\t\t\t=> 'Messages',\n\t\t'name_admin_bar'\t=> 'Message',\n\t);\n\t\n\t$args = array(\n\t\t'labels'\t\t\t=> $labels,\n\t\t'show_ui'\t\t\t=> true,\n\t\t'show_in_menu'\t\t=> true,\n\t\t'capability_type'\t=> 'post',\n\t\t'hierarchical'\t\t=> false,\n\t\t'menu_position'\t\t=> 26,\n\t\t'menu_icon'\t\t\t=> 'dashicons-email-alt',\n\t\t'supports'\t\t\t=> array( 'title', 'editor', 'author' )\n\t);\n\t\n\tregister_post_type( 'foucs-contact', $args );\n\t\n}",
"function wpbm_register_post_type(){\n include('inc/admin/register/wpbm-register-post.php');\n register_post_type( 'WP Blog Manager', $args );\n }",
"function edd_pup_create_duplicate_email( $post_id = 0 ) {\r\n\r\n\tif ( $post_id == 0 ) {\r\n\t\treturn false;\r\n\t}\r\n\r\n\t$post = get_post( $post_id );\r\n\r\n\t$new_post = array(\r\n\t 'post_content' => $post->post_content,\r\n\t 'post_name' => '',\r\n\t 'post_title' => $post->post_title .' '. __( 'Copy', 'edd-pup' ),\r\n\t 'post_status' => 'draft',\r\n\t 'post_type' => 'edd_pup_email',\r\n\t 'post_author' => '',\r\n\t 'ping_status' => 'closed',\r\n\t 'post_parent' => 0,\r\n\t 'menu_order' => 0,\r\n\t 'to_ping' => '',\r\n\t 'pinged' => '',\r\n\t 'post_password' => '',\r\n\t 'guid' => '',\r\n\t 'post_content_filtered' => '',\r\n\t 'post_excerpt' => $post->post_excerpt,\r\n\t 'comment_status' => 'closed'\r\n\t);\r\n\r\n\t// Create post and get the ID\r\n\t$create_id = wp_insert_post( $new_post );\r\n\r\n\t// Insert custom meta for newly created post\r\n\tif ( 0 != $create_id )\t{\r\n\r\n\t\t$meta = get_post_custom( $post_id );\r\n\r\n\t\tadd_post_meta ( $create_id, '_edd_pup_from_name', $meta['_edd_pup_from_name'][0], true );\r\n\t\tadd_post_meta ( $create_id, '_edd_pup_from_email', $meta['_edd_pup_from_email'][0], true );\r\n\t\tadd_post_meta ( $create_id, '_edd_pup_subject', $post->excerpt, true );\r\n\t\tadd_post_meta ( $create_id, '_edd_pup_message', $post->post_content, true );\r\n\t\tadd_post_meta ( $create_id, '_edd_pup_updated_products', maybe_unserialize( $meta['_edd_pup_updated_products'][0] ), true );\r\n\t\tadd_post_meta ( $create_id, '_edd_pup_recipients', $meta['_edd_pup_recipients'][0] );\r\n\t\tadd_post_meta ( $create_id, '_edd_pup_filters', maybe_unserialize( $meta['_edd_pup_filters'][0] ), true );\r\n\t}\r\n\r\n\tif ( 0 != $create_id) {\r\n\t\treturn $create_id;\r\n\t} else {\r\n\t\treturn false;\r\n\t}\r\n}",
"function carbon_register_post_type($settings){\n\n $labels = array(\n 'name' => _x($settings['plural'],'post type plural name','carbon'),\n 'singular_name' => _x($settings['singular'],'post type singular name','carbon'),\n 'add_new' => _x('Add New',$settings['singular'],'carbon'),\n 'add_new_item' => __('Add New ' .$settings['singular']),\n 'edit_item' => __('Edit ' .$settings['singular']),\n 'new_item' => __('New ' .$settings['singular']),\n 'all_items' => __('All ' .$settings['plural']),\n 'view_item' => __('View ' .$settings['singular']),\n 'search_items' => __('Search ' .$settings['plural']),\n 'not_found' => __('No ' .$settings['plural'].' found'),\n 'not_found_in_trash' => __('No ' .$settings['plural'].' found in Trash'),\n 'parent_item_colon' => ':',\n 'menu_name' => $settings['plural'],\n );\n\n $args = array(\n 'labels' => $labels,\n 'can_export' => (isset($settings['can_export']) ? $settings['can_export'] : true), // defaults true\n 'capability_type' => (isset($settings['capability_type']) ? $settings['behavior'] : 'post'), // default post\n // 'capabilities' // default capability_type\n 'exclude_from_search' => (isset($settings['exclude_from_search']) ? $settings['exclude_from_search'] : false), // default opposite of public\n 'hierarchical' => (isset($settings['hierarchical']) ? $settings['hierarchical'] : false), // default false\n 'has_archive' => (isset($settings['has_archive']) ? $settings['has_archive'] : false), // default false\n // 'permalink_epmask' // default EP_PERMALINK\n 'public' => (isset($settings['public']) ? $settings['public'] : true), // default false\n 'publicly_queryable' => (isset($settings['publicly_queryable']) ? $settings['publicly_queryable'] : true), // default public\n 'query_var' => (isset($settings['query_var']) ? $settings['query_var'] : true), // default true type\n 'show_ui' => (isset($settings['show_ui']) ? $settings['show_ui'] : true), // default public\n 'show_in_menu' => (isset($settings['show_in_menu']) ? $settings['show_in_menu'] : true), // default public\n 'show_in_admin_bar' => (isset($settings['show_in_admin_bar']) ? $settings['show_in_admin_bar'] : true), // default show_in_menu\n 'menu_position' => (isset($settings['menu_position']) ? $settings['menu_position'] : null), // default null\n 'menu_icon' => (isset($settings['menu_icon']) ? $settings['menu_icon'] : 'dashicons-admin-post'),\n 'supports' => (isset($settings['supports']) ? $settings['supports'] : array('title', 'editor', 'excerpt', 'thumbnail', 'revisions', 'page-attributes')), // default title editor\n 'taxonomies' => (isset($settings['taxonomies']) ? $settings['taxonomies'] : array()), // default none\n // 'register_meta_box_cb' // default none\n 'rewrite' => (isset($settings['rewrite']) ? $settings['rewrite'] : array( // default true name\n 'slug' => (isset($settings['slug']) ? $settings['slug'] : $settings['type']), // default type\n 'with_front' => (isset($settings['with_front']) ? $settings['with_front'] : false), // default true\n 'feeds' => (isset($settings['feeds']) ? $settings['feeds'] : false), // default has_archive\n 'pages' => (isset($settings['pages']) ? $settings['pages'] : true), // defaults true\n // 'ep_mask' // default permalink_epmask EP_PERMALINK\n )),\n );\n register_post_type($settings['type'], $args);\n }",
"public function notify_blog_post( $post, $type ) {\n\t\tif ( defined( 'WP_IMPORTING' ) && WP_IMPORTING ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$user_id = 'new' === $type ? $post->post_author : get_current_user_id();\n\t\t$user = get_user_by( 'id', $user_id );\n\n\t\t$content = wp_trim_words(\n\t\t\tstrip_shortcodes( has_excerpt( $post ) ? $post->post_excerpt : $post->post_content ),\n\t\t\t55\n\t\t);\n\n\t\t$args = array(\n\t\t\t'action' => 'wporg_handle_activity',\n\t\t\t'type' => $type,\n\t\t\t'source' => 'wordpress',\n\t\t\t'user' => $user->user_login,\n\t\t\t'post_id' => $post->ID,\n\t\t\t'blog' => get_bloginfo( 'name' ),\n\t\t\t'blog_url' => site_url(),\n\t\t\t'post_type' => $post->post_type,\n\t\t\t'title' => get_the_title( $post ),\n\t\t\t'content' => $content,\n\t\t\t'url' => get_permalink( $post->ID ),\n\t\t);\n\n\t\tProfiles\\api( $args );\n\t}",
"function bf_register_custom_post_type() {\r\n /* Añado las etiquetas que aparecerán en el escritorio de WordPress */\r\n\t$labels = array(\r\n\t\t'name' => _x( 'Ponentes', 'post type general name', 'text-domain' ),\r\n\t\t'singular_name' => _x( 'Ponente', 'post type singular name', 'text-domain' ),\r\n\t\t'menu_name' => _x( 'Ponentes', 'admin menu', 'text-domain' ),\r\n\t\t'add_new' => _x( 'Añadir nuevo', 'ponente', 'text-domain' ),\r\n\t\t'add_new_item' => __( 'Añadir nuevo ponente', 'text-domain' ),\r\n\t\t'new_item' => __( 'Nuevo Ponente', 'text-domain' ),\r\n\t\t'edit_item' => __( 'Editar Ponente', 'text-domain' ),\r\n\t\t'view_item' => __( 'Ver ponente', 'text-domain' ),\r\n\t\t'all_items' => __( 'Todos los ponentes', 'text-domain' ),\r\n\t\t'search_items' => __( 'Buscar ponentes', 'text-domain' ),\r\n\t\t'not_found' => __( 'No hay ponentes.', 'text-domain' ),\r\n\t\t'not_found_in_trash' => __( 'No hay ponentes en la papelera.', 'text-domain' )\r\n\t);\r\n\r\n /* Configuro el comportamiento y funcionalidades del nuevo custom post type */\r\n\t$args = array(\r\n\t\t'labels' => $labels,\r\n\t\t'description' => __( 'Descripción.', 'text-domain' ),\r\n\t\t'public' => true,\r\n\t\t'publicly_queryable' => true,\r\n\t\t'show_ui' => true,\r\n\t\t'show_in_menu' => true,\r\n\t\t'show_in_nav_menus' => true,\r\n\t\t'query_var' => true,\r\n\t\t'rewrite' => array( 'slug' => 'ponente' ),\r\n\t\t'capability_type' => 'post',\r\n\t\t'hierarchical' => false,\r\n\t\t'menu_position' => null,\r\n 'menu_icon' => 'dashicons-businessman',\r\n\t\t'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' ),\r\n\t\t'show_in_rest'\t \t => true,\r\n\t\t'public' \t\t\t => true,\r\n\t\t'has_archive' \t\t => true,\r\n\t\t'taxonomies' => array('category','categoria-conferencias')\r\n\t);\r\n\r\n\tregister_post_type('ponentes', $args );\r\n}",
"function tower_custom_post_types() {\n foreach (TOWER_CUSTOM_POSTS as $key => $custom_type) {\n register_post_type($key, $custom_type['config']);\n }\n}",
"private static function register_entries_post_type() {\n\t\tif ( post_type_exists( self::$entries_post_type ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$post_type_args = apply_filters(\n\t\t\t'wphf_register_post_type_' . self::$entries_post_type,\n\t\t\tarray(\n\t\t\t\t'labels' => array(\n\t\t\t\t\t'name' => __( 'Form Entires', 'fff-rest-contact-form' ),\n\t\t\t\t\t'singular_name' => __( 'Form Entry', 'fff-rest-contact-form' ),\n\t\t\t\t),\n\t\t\t\t'public' => false,\n\t\t\t\t'show_ui' => true,\n\t\t\t\t'supports' => false,\n\t\t\t)\n\t\t);\n\n\t\tregister_post_type( self::$entries_post_type, $post_type_args );\n\t}",
"public function add_welcome_email() {\n $post_exists = post_exists( '[{{{site.name}}}] Welcome!' );\n \n if ( $post_exists != 0 && get_post_status( $post_exists ) == 'publish' )\n return;\n \n // Create post object\n $my_post = array(\n 'post_title' => __( '[{{{site.name}}}] Welcome!', 'buddypress-welcome-email' ),\n 'post_content' => __( 'Welcome to [{{{site.name}}}]!', 'buddypress-welcome-email' ), // HTML email content.\n 'post_excerpt' => __( 'Welcome to [{{{site.name}}}]!', 'buddypress-welcome-email' ), // Plain text email content.\n 'post_status' => 'publish',\n 'post_type' => bp_get_email_post_type() // this is the post type for emails\n );\n \n // Insert the email post into the database\n $post_id = wp_insert_post( $my_post );\n \n if ( $post_id ) {\n // add our email to the taxonomy term 'activation_completed'\n // Email is a custom post type, therefore use wp_set_object_terms\n \n $tt_ids = wp_set_object_terms( $post_id, 'activation_completed', bp_get_email_tax_type() );\n foreach ( $tt_ids as $tt_id ) {\n $term = get_term_by( 'term_taxonomy_id', (int) $tt_id, bp_get_email_tax_type() );\n wp_update_term( (int) $term->term_id, bp_get_email_tax_type(), array(\n 'description' => 'Recipient has successfully activated an account.',\n ) );\n }\n }\n }",
"function save_user_story_backend($post_id) {\n $post = get_post($post_id);\n \n if ('user_story' == $_POST['post_type']) {\n if (!current_user_can('edit_page', $post_id)) return;\n\t$user_assigned = get_field('assigned_to');\n\tif(get_post_meta($post_id,'assigned_email', true)!=$user_assigned['user_email']){//different value then send email \n\t\tupdate_post_meta($post_id,'assigned_email',$user_assigned['user_email']);\n\t\tsend_email_assigned($user_assigned['user_email'],$post->post_title,get_permalink($post_id)); //send email\n\t}\n\t\n }\t\n}",
"function notify_post($post_id) {\n\n if( ( $_POST['post_status'] == 'publish' ) && ( $_POST['original_post_status'] != 'publish' ) && ( $_POST['post_type'] == 'events' ) ) {\n\n send_event_email($post_id);\n\n }\n\n}",
"public static function post_type(){}",
"function saveAndSend(){\n\t$to = $_POST['email'];\n\t$title = get_the_title($_POST['emailID']).' Copy';\n\t$messagetext = get_the_content($_POST['emailID']);\n\t$id = $_POST['emailID'];\n\n $noofprop = explode(',',get_post_meta($_POST['emailID'],'property_data', true));\n $properties = array();\n foreach ($noofprop as $item) {\n \t\n \t$notes = get_post_meta($id, 'propnotes_'.$item, true);\n \t$price = get_post_meta($id, 'propprice_'.$item, true);\n\n \t$array1 = array($item,$notes,$price);\n \t$properties[] = $array1;\n\n }\n\n //Send the email and get a report back\n\telegeantSend($to,$messagetext,$properties);\n \n\t//Save the email as a post and get a report back\n\telegantSave($title,$to,$messagetext,$properties); \n\n\t//redirect to the list emails screen. \n\twp_redirect(get_admin_url().'/admin.php?page=existing-elegant-emails');\n\texit;\n\n}",
"protected function getNotification_Type_PostService()\n {\n $instance = new \\phpbb\\notification\\type\\post(${($_ = isset($this->services['dbal.conn']) ? $this->services['dbal.conn'] : ($this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this))) && false ?: '_'}, ${($_ = isset($this->services['language']) ? $this->services['language'] : $this->getLanguageService()) && false ?: '_'}, ${($_ = isset($this->services['user']) ? $this->services['user'] : $this->getUserService()) && false ?: '_'}, ${($_ = isset($this->services['auth']) ? $this->services['auth'] : ($this->services['auth'] = new \\phpbb\\auth\\auth())) && false ?: '_'}, './../', 'php', 'phpbb_user_notifications');\n\n $instance->set_user_loader(${($_ = isset($this->services['user_loader']) ? $this->services['user_loader'] : $this->getUserLoaderService()) && false ?: '_'});\n $instance->set_config(${($_ = isset($this->services['config']) ? $this->services['config'] : $this->getConfigService()) && false ?: '_'});\n\n return $instance;\n }",
"public static function register_post_types() {}",
"function register_post_types(){\n }",
"function register_post_types(){\n }",
"function edd_pup_save_email( $data, $email_id = null ) {\r\n\r\n\t// Set variables that are the same for all customers\r\n\t$from_name = isset( $data['from_name'] ) ? $data['from_name'] : get_bloginfo('name');\r\n\t$from_email = isset( $data['from_email'] ) ? $data['from_email'] : get_bloginfo('admin_email');\r\n\t$subject = apply_filters( 'edd_purchase_subject', ! empty( $data['subject'] )\r\n\t\t? wp_strip_all_tags( $data['subject'], true )\r\n\t\t: __( 'New Product Update', 'edd-pup' ) );\r\n\t$products = isset( $data['products'] ) ? $data['products'] : '';\r\n\t$filters = array(\r\n\t\t'bundle_1' => $data['bundle_1'],\r\n\t\t'bundle_2' => $data['bundle_2']);\r\n\r\n\t// Remove product_dropdown placeholder from being saved as a product\r\n\tif ( isset( $products[0] ) ) {\r\n\t\tunset( $products[0]);\r\n\t}\r\n\r\n\tif ( 0 != $email_id ) {\r\n\r\n\t\t// Don't save any changes unless email is editable\r\n\t\tif ( get_post_status( $email_id ) != 'draft' ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$updateargs = array(\r\n\t\t\t'ID' => $email_id,\r\n\t\t\t'post_content' => $data['message'],\r\n\t\t\t'post_title' => $data['title'],\r\n\t\t\t'post_excerpt' => $data['subject']\r\n\t\t);\r\n\r\n\t\t// Get number of recipients for this email\r\n\t\t$recipients = edd_pup_customer_count( $email_id, $products, true, $filters );\r\n\r\n\t\t$update_id = wp_update_post( $updateargs );\r\n\t\tupdate_post_meta ( $email_id, '_edd_pup_from_name', $from_name );\r\n\t\tupdate_post_meta ( $email_id, '_edd_pup_from_email', $from_email );\r\n\t\tupdate_post_meta ( $email_id, '_edd_pup_subject', $data['subject'] );\r\n\t\tupdate_post_meta ( $email_id, '_edd_pup_message', $data['message'] );\r\n\t\tupdate_post_meta ( $email_id, '_edd_pup_updated_products', $products );\r\n\t\tupdate_post_meta ( $email_id, '_edd_pup_recipients', $recipients );\r\n\t\tupdate_post_meta ( $email_id, '_edd_pup_filters', $filters );\r\n\r\n\t\tif ( ( $update_id != 0 ) && ( $update_id == $email_id ) ) {\r\n\t\t\treturn $email_id;\r\n\t\t}\r\n\r\n\t} else {\r\n\t\t// Build post parameters array for custom post\r\n\t\t$post = array(\r\n\t\t 'post_content' => $data['message'],\r\n\t\t 'post_name' => '',\r\n\t\t 'post_title' => $data['title'],\r\n\t\t 'post_status' => 'draft',\r\n\t\t 'post_type' => 'edd_pup_email',\r\n\t\t 'post_author' => '',\r\n\t\t 'ping_status' => 'closed',\r\n\t\t 'post_parent' => 0,\r\n\t\t 'menu_order' => 0,\r\n\t\t 'to_ping' => '',\r\n\t\t 'pinged' => '',\r\n\t\t 'post_password' => '',\r\n\t\t 'guid' => '',\r\n\t\t 'post_content_filtered' => '',\r\n\t\t 'post_excerpt' => $data['subject'], //maybe $headers\r\n\t\t 'comment_status' => 'closed'\r\n\t\t);\r\n\r\n\t\t// Create post and get the ID\r\n\t\t$create_id = wp_insert_post( $post );\r\n\r\n\t\t// Get number of recipients for this email\r\n\t\t$recipients = edd_pup_customer_count( $create_id, $products, true, $filters );\r\n\r\n\t\t// Insert custom meta for newly created post\r\n\t\tif ( 0 != $create_id )\t{\r\n\t\t\tadd_post_meta ( $create_id, '_edd_pup_from_name', $from_name, true );\r\n\t\t\tadd_post_meta ( $create_id, '_edd_pup_from_email', $from_email, true );\r\n\t\t\tadd_post_meta ( $create_id, '_edd_pup_subject', $data['subject'], true );\r\n\t\t\tadd_post_meta ( $create_id, '_edd_pup_message', $data['message'], true );\r\n\t\t\tadd_post_meta ( $create_id, '_edd_pup_updated_products', $products, true );\r\n\t\t\tadd_post_meta ( $create_id, '_edd_pup_recipients', $recipients );\r\n\t\t\tadd_post_meta ( $create_id, '_edd_pup_filters', $filters, true );\r\n\t\t}\r\n\r\n \tif ( 0 != $create_id) {\r\n\t\t\treturn $create_id;\r\n\t\t}\r\n\t}\r\n}",
"function carbon_register_post_types(){\n\n // carbon_register_post_type(array(\n // 'singular' => 'Type', // required\n // 'plural' => 'Types', // required\n // 'type' => 'type', // required\n // 'slug' => 'types/type',\n // 'menu_icon' => 'dashicons-admin-post',\n // 'has_archive' => true,\n // 'exclude_from_search' => true,\n // ));\n }",
"private function registerCPT()\n {\n if (!isset($this->config['cpt'])) {\n return;\n }\n\n foreach ($this->config['cpt'] as $cpt) {\n $staff = new PostType($cpt['name']);\n }\n }",
"function mfn_news_post_type()\n{\n mfn_register_types();\n}",
"public function register_log_storage() {\n\t\tregister_post_type(\n\t\t\t$this->post_type,\n\t\t\t[\n\t\t\t\t'capabilities' => [\n\t\t\t\t\t'publish_posts' => 'manage_options',\n\t\t\t\t\t'edit_others_posts' => 'manage_options',\n\t\t\t\t\t'delete_posts' => 'manage_options',\n\t\t\t\t\t'delete_others_posts' => 'manage_options',\n\t\t\t\t\t'read_private_posts' => 'manage_options',\n\t\t\t\t\t'edit_post' => 'manage_options',\n\t\t\t\t\t'delete_post' => 'manage_options',\n\t\t\t\t\t'read_post' => 'manage_options',\n\t\t\t\t],\n\t\t\t\t'label' => _x( 'E-mail log entries', 'Post Type General Name', 'simple-smtp' ),\n\t\t\t]\n\t\t);\n\t}",
"function workshop_attendee_cpt_init() {\n $labels = array(\n 'singular' => __( 'Attendee', 'workshop' ),\n 'plural' => __( 'Attendees', 'workshop' ),\n 'all_items' => __( 'All Attendees', 'workshop' ),\n 'add_new_item' => __( 'Add New Attendee', 'workshop' ),\n 'edit_item' => __( 'Edit Attendee', 'workshop' ),\n 'new_item' => __( 'New Attendee', 'workshop' ),\n 'view_item' => __( 'View Attendee', 'workshop' ),\n 'search_items' => __( 'Search Attendees', 'workshop' ),\n 'not_found' => __( 'No Attendees found', 'workshop' ),\n 'not_found_in_trash'=> __( 'No Attendees found in Trash', 'workshop' ),\n 'update_item' => __( 'Update Attendee', 'workshop' ),\n 'metabox_about' => __( 'About Attendee', 'workshop' ),\n );\n\n // Register a post type to store our Attendees that aren't WP users\n $args = array(\n // 'label' => $labels['singular'],\n 'labels' => $labels,\n 'public' => true,\n 'publicly_queryable' => false,\n 'exclude_from_search' => true,\n 'show_in_menu' => false,\n 'supports' => array( 'thumbnail' ),\n 'taxonomies' => array( 'chapter' ), // $attendee_taxonomy\n 'rewrite' => false,\n 'query_var' => false,\n );\n register_post_type( 'attendee', $args );\n}",
"function omfg_mobile_pro_create_site_posttypes() {\n\tdo_action('omfg_mobile_pro_create_site_posttypes');\n}",
"function learndash_register_essay_post_type() {\n\t\n\t$labels = array(\n\t\t'name' => esc_html_x( 'Submitted Essays', 'Post Type General Name', 'learndash' ),\n\t\t'singular_name' => esc_html_x( 'Submitted Essay', 'Post Type Singular Name', 'learndash' ),\n\t\t'menu_name' => esc_html__( 'Submitted Essays', 'learndash' ),\n\t\t'name_admin_bar' => esc_html__( 'Submitted Essays', 'learndash' ),\n\t\t'parent_item_colon' => esc_html__( 'Parent Submitted Essay:', 'learndash' ),\n\t\t'all_items' => esc_html__( 'All Submitted Essays', 'learndash' ),\n\t\t'add_new_item' => esc_html__( 'Add New Submitted Essay', 'learndash' ),\n\t\t'add_new' => esc_html__( 'Add New', 'learndash' ),\n\t\t'new_item' => esc_html__( 'New Submitted Essay', 'learndash' ),\n\t\t'edit_item' => esc_html__( 'Edit Submitted Essay', 'learndash' ),\n\t\t'update_item' => esc_html__( 'Update Submitted Essay', 'learndash' ),\n\t\t'view_item' => esc_html__( 'View Submitted Essay', 'learndash' ),\n\t\t'view_items' => esc_html__( 'View Submitted Essays', 'learndash' ),\n\t\t'search_items' => esc_html__( 'Search Submitted Essays', 'learndash' ),\n\t\t'not_found' => esc_html__( 'Submitted Essay Not found', 'learndash' ),\n\t\t'not_found_in_trash' => esc_html__( 'Submitted Essay Not found in Trash', 'learndash' ),\n\t\t'item_published'\t =>\tesc_html__( 'Submitted Essay Published', 'learndash' ),\n\t\t'item_published_privately' => esc_html__( 'Submitted Essay Published Privately', 'learndash' ),\n\t\t'item_reverted_to_draft' => esc_html__( 'Submitted Essay Reverted to Draft', 'learndash' ),\n\t\t'item_scheduled'\t =>\tesc_html__( 'Submitted Essay Scheduled', 'learndash' ),\n\t\t'item_updated'\t\t =>\tesc_html__( 'Submitted Essay Updated', 'learndash' ),\n\n\t);\n\n\t$capabilities = array(\n\t\t'edit_essay' => 'edit_essay',\n\t\t'read_essay' => 'read_essay',\n\t\t'delete_essay' => 'delete_essay',\n\t\t'edit_essays' => 'edit_essays',\n\t\t'edit_others_essays' => 'edit_others_essays',\n\t\t'publish_essays' => 'publish_essays',\n\t\t'read_private_essays' => 'read_private_essays',\n\t);\n\n\tif ( learndash_is_admin_user() ) {\n\t\t$show_in_admin_bar = false;\n\t} else if ( learndash_is_group_leader_user() ) {\n\t\t$show_in_admin_bar = false;\n\t} else {\n\t\t$show_in_admin_bar = false;\n\t}\n\n\t$args = array(\n\t\t'label' => esc_html__( 'sfwd-essays', 'learndash' ),\n\t\t'description' => esc_html__( 'Submitted essays via a quiz question.', 'learndash' ),\n\t\t'labels' => $labels,\n\t\t'supports' => array( 'title', 'editor', 'comments', 'author'),\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_in_menu' => false,\n\t\t'show_in_admin_bar'\t => $show_in_admin_bar,\n\t\t'query_var' \t\t => true,\n\t\t'rewrite' \t\t\t => array( 'slug' => 'essay' ), \n\t\t'menu_position' => 5,\n\t\t'show_in_admin_bar' => false,\n\t\t'show_in_nav_menus' => false,\n\t\t'can_export' => true,\n\t\t'has_archive' => false,\n\t\t'show_in_rest' => false,\n\t\t'exclude_from_search' => true,\n\t\t'publicly_queryable' => true,\n\t\t'capability_type' => 'essay',\n\t\t'capabilities' => $capabilities,\n\t\t'map_meta_cap' => true,\n\t);\n\n\t$args = apply_filters( 'learndash-cpt-options', $args, 'sfwd-essays' );\n\n\tregister_post_type( 'sfwd-essays', $args );\n}"
]
| [
"0.63563013",
"0.60867864",
"0.5967338",
"0.59473747",
"0.58608115",
"0.585454",
"0.5831829",
"0.5815284",
"0.5811542",
"0.5765343",
"0.5751757",
"0.5750803",
"0.57366484",
"0.572792",
"0.570748",
"0.5706455",
"0.5685867",
"0.5643686",
"0.5627878",
"0.562038",
"0.56163037",
"0.55991596",
"0.5587584",
"0.5582016",
"0.5573539",
"0.55710113",
"0.55669695",
"0.5559782",
"0.554398",
"0.5542673"
]
| 0.7173928 | 0 |
Returns a form to add a new grade letter to a given set. | public function addForm(GradeLetterSetInterface $grade_letter_set) {
$grade_letter = $this->entityTypeManager()
->getStorage('grade_letter')
->create(['grade_letter_set' => $grade_letter_set->id()]);
return $this->entityFormBuilder()->getForm($grade_letter, 'add');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n return view('admin.marks.grade.add');\n }",
"public function create()\n {\n $data = [];\n foreach ($this->fields as $field => $default) {\n $data[$field] = old($field, $default);\n }\n $data['allGrades'] = Grade::lists('grade')->all();\n return view('admin.grade.create', $data);\n }",
"public function addGrade()\n {\n $this->load->helper('url');\n\n $name = $this->input->post('name');\n $data = array(\n 'grade_name' => $name\n );\n return $this->db->insert('grade', $data);\n }",
"public function pageTitle(GradeLetterSetInterface $grade_letter_set) {\n return $this->t('Grade letters: @set', ['@set' => $grade_letter_set->label()]);\n }",
"public function create()\n {\n return view('admin.grades.create');\n }",
"function update_tt_1_alkes_form() {\n\t\treturn $this->add_tt_1_alkes_form();\n\t}",
"public function create()\n {\n return view('grade.create');\n }",
"public function create()\n {\n return view('grade.create');\n }",
"function getSetupForm($options = array()){\n $form = parent::getSetupForm($options);\n $form->setLegend('Category Options');\n \n $set = $form->createElement('select', 'set');\n $set->setLabel('Set: ');\n $set->setRequired('true');\n \n $service = new Content_Model_CategorySet_Service();\n $results = $service->getObjects();\n\n $options = array();\n foreach($results as $value){\n $options[$value->id] = $value->title;\n }\n\n //$template->addMultiOption('None','');\n $set->setMultiOptions($options);\n $form->addElement($set);\n \n return $form;\n }",
"function add_tt_1_alkes_form() {\n\t\tinclude_once 'class.xform.inc.php';\n\t\t//if (! $this->get_permission('fill_this')) return $this->intruder();\n\t\tglobal $_SESSION, $_GET, $adodb, $ses;\n\t\t$record = $_GET;\n\t\t$label_arr = $this->tt_1_alkes_label;\n\t\t$optional_arr = $this->optional_arr;\n\n\t\tif($_GET['no_tt']){$field_arr[] = xform::xf('urut_no_tt','C','255');}\n\t\t$field_arr[] = xform::xf('kode_subdit','C','255');\n\t\t$field_arr[] = xform::xf('kode_pendaftar','C','255');\n\t\t$field_arr[] = xform::xf('insert_by','C','255');\n\t\t$field_arr[] = xform::xf('date_insert','N','8');\n\t\t$field_arr[] = xform::xf('jenis_izin_produksi','N','8');\n\n\t\t$rs = $adodb->Execute(\"SELECT * FROM tt_1_alkes WHERE no_tt='{$record['no_tt']}'\");\n\t\tif ($rs && ! $rs->EOF) {\n\t\t\t$value_arr = $rs->fields;\n\t\t\t$optional_arr['no_tt'] = 'protect';\n\t\t\t$mode = 'edit';\n\n\t\t} else {\n\t\t\t$value_arr = array ();\n\t\t\t$mode = 'add';\n\t\t}\n\n\t\t$optional_arr['nama_tt_1_alkes_rule'] = '';\n\t\t$optional_arr['insert_by_rule'] = '';\n\t\t$optional_arr['date_insert_rule'] = '';\n\t\t\n\t\tglobal $adodb;\n\t\t$rsx = $adodb->Execute(\"SELECT no_tt FROM tt_1_alkes ORDER BY no_tt DESC LIMIT 1\");\n\t\t$no_ttx = $rsx->fields['no_tt'];\n\t\t$no_ttx = $no_ttx +1;\n\t\teval($this->save_config);\n\t\t$optional_arr['urut_no_tt'] = 'user_defined';\n\t\t$value_arr['urut_no_tt'] = '<input type=\"text\" name=\"urut_no_tt\" value=\"'.$value_arr['urut_no_tt'].'\" readonly class=\"text\">';\n\t\tif($value_arr['jenis_izin_produksi']==\"0\"){$select1 = \"selected\";$select2 = \"\";}else{if($value_arr['jenis_izin_produksi']==\"1\"){$select1 = \"\";$select2 = \"selected\";}else{$select1 = \"\";$select2 = \"\";}}\n\t\t$optional_arr['jenis_izin_produksi'] = 'user_defined';\n\t\t$value_arr['jenis_izin_produksi'] = '<select name=\"jenis_izin_produksi\" class=\"text\"><option>- Jenis Izin Produksi -</option><option value=\"0\" '.$select1.'>Izin Produksi Alkes</option><option value=\"1\" '.$select2.'>Izin Produksi PKRT</option></select>';\n\t\t$this->subdit_form($config);\n\t\t$this->pendaftar_form($config);\n\n\n\n\t\t$label_arr['submit_val'] = \"Submit\";\n\t\t$label_arr['form_extra'] = \"<input type=hidden name=action value='post$mode'>\"; // default null\n\t\t$label_arr['form_extra'] .= \"<input type=hidden name=oldpkvalue value='{$record['no_tt']}'>\";\n\t\t$label_arr['form_title'] = \"Form \".ucwords($mode).\" Tanda Terima Registrasi Izin Produksi\";\n\t\t$label_arr['form_width'] = '100%';\n\t\t$label_arr['form_name'] = 'theform';\n\n\t\t$_form = new form();\n\t\t$_form->set_config(\n\t\t\tarray (\n\t\t\t\t'field_arr'\t=> $field_arr,\n\t\t\t\t'label_arr'\t=> $label_arr,\n\t\t\t\t'value_arr'\t=> $value_arr,\n\t\t\t\t'optional_arr'\t=> $optional_arr\n\t\t\t)\n\t\t);\n\t\treturn $_form->parse_field();\n\t}",
"public function letterGrade($mark){\n if($mark<50)\n return 'F';\n else if($mark<55)\n return 'D';\n else if($mark<60)\n return 'C-';\n else if($mark<64)\n return 'C';\n else if($mark<68)\n return 'C+';\n else if($mark<72)\n return 'B-';\n else if($mark<76)\n return 'B';\n else if($mark<80)\n return 'B+';\n else if($mark<85)\n return 'A-';\n else if($mark<90)\n return 'A';\n else\n return 'A+';\n }",
"public function grade() \n {\n if (permission::permitted('grades')=='fail'){ return redirect()->route('denied'); }\n\n $data = table::grade()->get();\n return view('admin.fields.grade', compact('data'));\n }",
"public function create()\n {\n $grade = new Grade;\n return view('pages.grade.create', compact('grade'));\n }",
"function add_grade($grade) {\n $this->grades[] = $grade;\n }",
"public function create()\n {\n return view('pay-grades.create');\n }",
"public function create()\n {\n //Retorna a la vista para crear\n return view('grades.create');\n }",
"public function getAddForm();",
"public function addNewKlant(){\n\n\t\tif(empty($this->tussenvoegsels)){\n\t\t\t$this->tussenvoegsel = NULL;}\n\n\t\t$values = \"'\".$this->achternaam.\"', '\".$this->voorletters.\"', '\".$this->tussenvoegsels.\"', '\".$this->roepnaam.\"', '\".$this->geboortedatum.\"', '\".$this->adres.\"', '\".$this->postcode.\"', '\".$this->woonplaats.\"', '\".$this->gebruikersnaam.\"', '\".md5($this->wachtwoord).\"'\";\n\t\t$db = new database();\n\t\t$db->insert(\"klant\",\"achternaam, voorletters, tussenvoegsels, roepnaam, geboortedatum, adres, postcode, woonplaats, gebruikersnaam, wachtwoord\", $values\n\t\t\t);\n\t\techo \"geregistreerd\";\n\t}",
"function addGrade($grades) {\n\n $columns = implode(\", \", array_keys($grades));\n $escaped_values = array_map($this->db->prepare, array_values($grades));\n $values = implode(\", \", $escaped_values);\n $sql = \"INSERT INTO `grades`($columns) VALUES ($values)\";\n\n $this->executeQuery($sql);\n }",
"public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }",
"public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"private function setGrade($final = 0)\r\n\t{\r\n\t\tif($final >= 80)\r\n\t\t\treturn 'A';\r\n\t\telseif ($final >= 70)\r\n\t\t\treturn 'B';\r\n\t\telseif ($final >= 60)\r\n\t\t\treturn 'C';\r\n\t\telseif ($final >= 40)\r\n\t\t\treturn 'D';\r\n\t\telse\r\n\t\t\treturn 'E';\r\n\t\t\r\n\t}",
"protected function addInformationLetter(ilPropertyFormGUI $a_form = null)\n\t{\n\t\tglobal $tpl, $ilTabs, $ilCtrl, $lng;\n\n\t\t$ilTabs->setBackTarget($lng->txt(\"back\"),\n\t\t\t$ilCtrl->getLinkTarget($this, \"listInformationLetters\"));\n\n\t\tif(!$a_form)\n\t\t{\n\t\t\t$a_form = $this->initInformationLetterForm(\"create\");\n\t\t}\n\t\t$tpl->setContent($a_form->getHTML());\n\t}",
"public function add()\n {\n $grade = Grade::all();\n $teacher = LTeacher::all();\n $schoolyear = Schoolyear::all();\n\n return view('school.modules.class.add',['grades' => $grade,'schoolyear' => $schoolyear,'teachers' => $teacher]); \n }",
"public function create()\n {\n $grades = Grade::all();\n $main_grades = array();\n\n if($grades != null){\n\n foreach($grades as $grade){\n if($grade->parent_id == null){\n $main_grades[$grade->id] = $grade->name. \" - \". $grade->code;\n }\n }\n }\n return view('grades.create')->with('grades', $main_grades);\n }",
"public function get_add(){\n return View::make('stance.add')->with('title', 'Submit a Stance')->with('subtitle', 'Try to make your views official party Stances');;\n }",
"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 prim_options_four_grade() {\n $four_grade = array(\n 'instammer_inte_alls' => t('Instämmer inte alls'),\n 'instammer_inte' => t('Instämmer inte'),\n 'instammer_delvis' => t('Instämmer delvis'),\n 'instämmer_helt' => t('Instämmer helt'),\n );\n\n return $four_grade;\n}",
"public function getAdd()\n {\n return view(\"Policy::add-edit\");\n }",
"public function create()\n {\n return view('admin.award.form');\n }"
]
| [
"0.62090445",
"0.56181234",
"0.5591897",
"0.53484005",
"0.532908",
"0.53154874",
"0.5289482",
"0.5289482",
"0.51657945",
"0.51657265",
"0.51602215",
"0.5154638",
"0.51522547",
"0.507936",
"0.507358",
"0.5066151",
"0.5044087",
"0.503726",
"0.5016711",
"0.5006856",
"0.4989982",
"0.4981467",
"0.49571824",
"0.49349087",
"0.4932598",
"0.4887278",
"0.4883995",
"0.48823977",
"0.48728386",
"0.48721826"
]
| 0.73690534 | 0 |
The _title_callback for the entity.grade_letter_set.list_form route. | public function pageTitle(GradeLetterSetInterface $grade_letter_set) {
return $this->t('Grade letters: @set', ['@set' => $grade_letter_set->label()]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function titleCallback() {\r\n return [\r\n '#markup' => $this->t('The title of this page is dynamically changed by the title callback for this route defined in menu_example.routing.yml.'),\r\n ];\r\n }",
"public function title_callback()\n {\n printf(\n '<input type=\"text\" id=\"title\" name=\"my_option_name[title]\" value=\"%s\" />',\n isset( $this->options['title'] ) ? esc_attr( $this->options['title']) : ''\n );\n }",
"public function get_title()\n {\n }",
"public function get_title()\n {\n }",
"public static function title_callback()\n {\n printf(\n '<input type=\"text\" id=\"title\" name=\"event_settings[title]\" value=\"%s\" />',\n self::option('title')\n );\n }",
"public function title_callback()\n {\n printf(\n '<input type=\"text\" id=\"my_title\" name=\"my_title\" value=\"%s\" />',\n isset( $this->options['my_title'] ) ? esc_attr( $this->options['my_title']) : ''\n );\n }",
"public function protected_title_format()\n {\n }",
"public function protected_title_format()\n {\n }",
"public function protected_title_format()\n {\n }",
"public abstract function getTitle();",
"public function get_title();",
"public function title_callback()\r\n {\r\n printf(\r\n '<input type=\"text\" id=\"title\" name=\"theme_option[title]\" value=\"%s\" />',\r\n isset($this->options['title']) ? esc_attr($this->options['title']) : ''\r\n );\r\n }",
"abstract protected function getTitle();",
"public function titleCallback(array $_title_arguments = [], $_title = '') {\n $_title_arguments += ['case_number' => '2', 'title' => $_title];\n return t($_title_arguments['title']) . ' - Case ' . $_title_arguments['case_number'];\n }",
"public function getTitle();",
"public function getTitle();",
"public function getTitle();",
"public function getTitle();",
"public function getTitle();",
"public function getTitle();",
"public function getTitle();",
"public function getTitle();",
"public function getTitle();",
"public function getTitle();",
"public function getTitle();",
"public function getTitle();",
"public function getTitle();",
"public function getTitle();",
"public function getTitle();",
"abstract public function getActionTitle();"
]
| [
"0.596037",
"0.5734841",
"0.56518763",
"0.565083",
"0.5606321",
"0.5581974",
"0.5565584",
"0.5565584",
"0.5565584",
"0.5537674",
"0.55373",
"0.55359185",
"0.551061",
"0.5509766",
"0.54326826",
"0.54326826",
"0.54326826",
"0.54326826",
"0.54326826",
"0.54326826",
"0.54326826",
"0.54326826",
"0.54326826",
"0.54326826",
"0.54326826",
"0.54326826",
"0.54326826",
"0.54326826",
"0.54326826",
"0.54181105"
]
| 0.60366726 | 0 |
This function logs off Admin using admin's id | public function logAdminOff()
{
//session must be started before anything
session_start ();
// Add the session name user_id to a variable $id
$id = $_SESSION['user_id'];
//if we have a valid session
if ( $_SESSION['logged_in'] == TRUE )
{
$lastActive = date("l, M j, Y, g:i a");
$online= 'OFF';
$sql = "SELECT id,online, last_active FROM users WHERE id = '".$id."'";
$res = $this->processSql($sql);
if ($res){
$update = "UPDATE users SET online ='".$online."', last_active ='".$lastActive."' WHERE id = '".$id."'";
$result = $this->processSql($update);
}
//unset the sessions (all of them - array given)
unset ( $_SESSION );
//destroy what's left
session_destroy ();
header("Location: ".APP_PATH."admin_login");
}
//It is safest to set the cookies with a date that has already expired.
if ( isset ( $_COOKIE['cookie_id'] ) && isset ( $_COOKIE['authenticate'] ) ) {
/**
* uncomment the following line if you wish to remove all cookies
* (don't forget to comment or delete the following 2 lines if you decide to use clear_cookies)
*/
//clear_cookies ();
setcookie ( "cookie_id", '', time() - 3600);
setcookie ( "authenticate", '', time() - 3600 );
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function logoff() {}",
"public function logoff() {}",
"public function logoff() {}",
"public function logOff();",
"public function logoff();",
"public function logoutFromAdmin()\n {\n $this->getHelperWait()->waitForElementPresent('//a[@class=\"link-logout\"]');\n $this->getHelperCommon()->click($this->getLogoutLinkXpath());\n }",
"public function logoutFromAdmin()\n {\n $this->getHelperWait()->waitForElementPresent('//a[@class=\"link-logout\"]');\n $this->getHelperCommon()->click($this->getLogoutLinkXpath());\n }",
"public function Logoff();",
"static public function logOut(){\n \tself::setId(1);\n }",
"public function adminLogout(){\n unset($_SESSION['adminID']);\n unset($_SESSION['AdminType']);\n unset($_SESSION['adminEmail']);\n header('location:' . URLROOT . '/admins/loginAdmin');\n }",
"public function logout()\n {\n $adminId = $this->session->userdata('admin_id');\n $this->session->unset_userdata('user_id');\n $this->session->sess_destroy();\n redirect(base_url());\n }",
"function disableAdministrator($id) {\r\n\r\n\t\t$this->query('UPDATE admins SET `enabled` = 0 WHERE id= '. $id .';');\r\n\r\n\t}",
"function admin_logout() {\n\t\t$this->Member->create();\n\t\t$db = $this->Member->getDataSource();\n\t\t$data['Member']['login_status'] = $db->expression(\"NOW()\");\n\t\t$data['Member']['id'] = $this->Session->read('Admin.id');\n\t\t$this->Member->save($data);\n\t\t\n\t\t$this->Session->delete('Admin.id');\n\t\t$this->Session->delete('Admin.email');\n\t\t$this->Session->delete('Admin.loginStatus');\n\t\t$this->Session->delete('Admin.group_id');\n\t\t$this->redirect(array(\n\t\t\t'action' => 'login',\n\t\t\t'admin' => true\n\t\t));\n\t}",
"function admin_logout() {\n\t\t\n\t\t$this->Member->create();\n\t\t$db = $this->Member->getDataSource();\n\t\t$data['Member']['login_status'] = $db->expression(\"NOW()\");\n\t\t$data['Member']['id'] = $this->Session->read('Admin.id');\n\t\t$this->Member->save($data);\n\t\t\n\t\t$this->Session->delete('Admin.id');\n\t\t$this->Session->delete('Admin.email');\n\t\t$this->Session->delete('Admin.loginStatus');\n\t\t$this->Session->delete('Admin.group_id');\n\t\t$this->redirect(array(\n\t\t\t'action' => 'login',\n\t\t\t'admin' => true\n\t\t));\n\t}",
"function hapus_admin($id_admin)\n\t\t{\n\t\t\t$this->db->where('id_admin', $id_admin);\n\t\t\t$this->db->delete('admin');\n\t\t}",
"public function logoff(){\n\t ServiceSession::destroy();\n\t Redirect::to(\"/login\")->do();\n\t }",
"public function logoutAdmin() {\n //start session\t\t\n $admin_name = $this->session->userdata('admin_name');\n\n //if logout success then destroy session and unset session variables\n $this->session->unset_userdata(array('admin_name'));\n $this->session->sess_destroy();\n redirect('admin_login');\n }",
"public function logOffEmployee()\n {\n $this->destroyEmployeeHash($_SESSION[\"emp_id\"], $_SESSION[\"emp_hash\"]);\n $this->destroyEmployeeSession();\n }",
"function user_logging_out($user_id) {\n \n }",
"function admin()\n{\n # clear the user session by default upon reaching this page\n clearUserSession();\n\n header('Location: ./adminLogin');\n exit;\n}",
"function logout() {\n\t\tunset($_SESSION['admin']);\n\t\t$this->redirect('admin/index');\n\t}",
"function admin_logout() {\r\n\r\n $this->Session->delete(md5(SITE_TITLE) . 'USERID');\r\n $this->Session->delete(md5(SITE_TITLE) . 'USERNAME');\r\n $this->Session->delete(md5(SITE_TITLE) . 'USEREMAIL');\r\n $this->Session->delete(md5(SITE_TITLE) . 'USERTYPE');\r\n $this->redirect(DEFAULT_ADMINURL);\r\n }",
"public function loginTerakhirAdmin($id){\n $sql = \"update admin set terakhir_login = NOW() where id_admin = '$id'\";\n return $this->db->query($sql);\n }",
"function admin_disable($id = null) {\n\n\t\t$user = $this->User->read(null, $id);\n\n\t\t/**\n\t\t * Read the \"Status\" component for more informations.\n\t\t * Dir : controllers/components/status.php\n\t\t */\n\t\tif (!empty($user)) {\n\n\t\t\t$user['User']['status'] = 1;\n\n\t\t\t/**\n\t\t\t * Change the user status.\n\t\t\t * Redirect the administrator to index page.\n\t\t\t */\n\t\t\tif ($this->User->save($user)) {\n\t\t\t\t$this->Session->setFlash(__d('core', 'The user has been disabled.', true));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t}\n\t\t}\n\n\t}",
"public function logoff()\n\t{\n\t\t$this->session->sess_destroy();\n\t\tredirect(base_url());\n\t}",
"function logout() {\n $this->session->unset_userdata(APP_PFIX . 'admin');\n redirect('login', 'refresh');\n }",
"function Admin_authetic(){\n\t\t\t\n\t\tif(!$_SESSION['adminid']) {\n\t\t\t$this->redirectUrl(\"login.php\");\n\t\t}\n\t}",
"static function deleteAdmin($idAdmin)\n {\n\n $con=Database::getConnection();\n $req=$con->prepare('DELETE FROM admin WHERE _idAdmin=?');\n $req->execute(array($idAdmin));\n\n }",
"public function logOut() {\n\t$this->isauthenticated = false;\n\tunset($_SESSION['clpauthid'], $_SESSION['clpareaname'], $_SESSION['clpauthcontainer']);\n\tsession_regenerate_id();\n}",
"public function Logout() {\n\n $cookie = json_decode(\\FluitoPHP\\Request\\Request::GetInstance()->\n Cookie($this->\n config['id']), true);\n\n if (isset($cookie['salt_id'])) {\n\n $this->\n database->\n Conn($this->\n GetConn())->\n Helper()->\n Delete($this->\n GetPrefix() . 'usersalt', array(\n array(\n 'column' => 'salt_id',\n 'operator' => '=',\n 'rightvalue' => $cookie['salt_id']\n )\n ))->\n Query();\n\n \\FluitoPHP\\Response\\Response::GetInstance()->\n SetCookie($this->\n config['id'], '', 0, '', '', false, true);\n }\n\n $this->\n currentUser = null;\n }"
]
| [
"0.73247254",
"0.7324561",
"0.7323886",
"0.7278227",
"0.7236932",
"0.71489424",
"0.71489424",
"0.71393776",
"0.6864469",
"0.6864211",
"0.68536705",
"0.68169934",
"0.6750211",
"0.674706",
"0.67367476",
"0.66950923",
"0.6636226",
"0.659901",
"0.65096974",
"0.6439133",
"0.64244896",
"0.6389527",
"0.63352644",
"0.632796",
"0.63200957",
"0.6302843",
"0.6289886",
"0.6281739",
"0.6278016",
"0.6271911"
]
| 0.788539 | 0 |
This method adminUpdatePass is used to change any admin level password and even user password | public function adminUpdatePass($uid,$pass)
{
$uid = $this->secureInput($uid);
$pass = $this->secureInput($pass);
//Encrypt password for database
$salt1 = 's+(_a*';
$salt2 = '@-)(%#';
$new_password = md5($salt1.$pass.$salt2);
$sql = "UPDATE users SET password = '" . $new_password . "' WHERE id = '" . $uid . "'";
$res = $this->processSql($sql);
if($res) return 99;
return 1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function update_password() {\n\t\t$old_password = $_POST['old_password'];\n\t\t$new_password = $_POST['new_password'];\n\t\tif (!empty($old_password) && !empty($new_password)) {\n\t\t\t$admin_records = $this -> conn -> get_table_row_byidvalue('pg_track_admin', 'admin_password', md5($old_password));\n\t\t\tif (!empty($admin_records)) {\n\t\t\t\t$data['admin_password'] = md5($new_password);\n\t\t\t\t$update_toekn = $this -> conn -> updatetablebyid('pg_track_admin', 'admin_status', 1, $data);\n\t\t\t\t$post = array(\"status\" => \"true\", \"message\" => \"Password changed successfully\");\n\t\t\t} else {\n\t\t\t\t$post = array(\"status\" => \"false\", \"message\" => \"Invalid Old Password\");\n\t\t\t}\n\t\t} else {\n\t\t\t$post = array(\"status\" => \"false\", \"message\" => \"Missing parameter\", 'old_password' => $old_password, 'new_password' => $new_password);\n\t\t}\n\t\techo $this -> json($post);\n\t}",
"function change_pwd_update_register(){\n\t\tglobal $CFG;\n\t\t$old_password = $this->My_addslashes(md5($_POST[\"old_password\"]));\n\t\t \n\t\t$new_password = md5($_POST[\"new_password\"]);\n\t \n\t\tif($this->chkPasswordInAdmin($old_password,$_SESSION['adminid'])){\n\t\t\t\t$UpQuery = \"UPDATE \".$CFG['table']['admin'].\" SET password = '\".$this->filterInput($new_password).\"' WHERE admin_id = \". $this->filterInput($_SESSION['adminid']);\n\t\t\t\t$UpResult = mysql_query($UpQuery) or die($this->mysql_error($UpQuery));\n\t\t\t}\n\t\telse{\t\n\t\t\techo \"Invalid_Old_Pwd\";\t\t\t\n\t\t\texit();\n\t\t\t}\n\t}",
"public function changeAdminUserPassword() {\n\t\t$data = $this->request->data['User'];\n\n\t\t$this->User->id = $userId = $data['id'];\n\t\tif ($this->User->saveField('password', $data['new_password'])) {\n\t\t\t$isPasswordChanged = ($data['current_password'] !== $data['new_password']) ? true : false;\n\t\t\tif ($isPasswordChanged && ($userId !== $this->Auth->User('id'))) {\n\t\t\t\t$this->__sendPasswordChangedEmail($data);\n\t\t\t}\n\t\t\t$this->Session->setFlash(__('Password changed successfully.'), 'success');\n\t\t} else {\n\t\t\t$this->Session->setFlash(__('Could not change the password due a server problem, try again later.'), 'error');\n\t\t}\n\n\t\t$this->redirect('/admin/users/editAdmin/' . $userId);\n\t}",
"function update_password(){\n\t\t$old_password=$_POST['old_password'];\n\t\t$new_password=$_POST['new_password'];\n\t\tif(!empty($old_password) && !empty($new_password)){\n\t\t\t$admin_records = $this -> conn -> get_table_row_byidvalue('pg_track_admin', 'admin_password', md5($old_password));\n\t\t\tif(!empty($admin_records)){\n\t\t\t\t$data['admin_password']=md5($new_password);\n\t\t\t\t$update_toekn=$this -> conn -> updatetablebyid('pg_track_admin', 'admin_status',1, $data);\n\t\t\t\t$post = array(\"status\" => \"true\", \"message\" => \"Password changed successfully\");\n\t\t\t}else{\n\t\t\t\t$post = array(\"status\" => \"false\", \"message\" => \"Invalid Old Password\");\n\t\t\t}\n\t\t}else{\n\t\t$post = array(\"status\" => \"false\", \"message\" => \"Missing parameter\",'old_password'=>$old_password,'new_password'=>$new_password);\n\t}\n\techo $this -> json($post);\n\t}",
"function update_pass() {\n\n global $conn;\n\n $stmt = $conn->prepare('\n UPDATE Customer SET Pass = :Pass\n WHERE Customer_id = :Customer_id\n ');\n\n $encrypted_pass = sha1($this->Pass);\n\n $stmt->bindParam(':Pass', $encrypted_pass);\n $stmt->bindParam(':Customer_id', $this->Customer_id);\n\n return $stmt->execute();\n }",
"function update_password()\n {\n }",
"function adminUpdateUserPassword()\n {\n \t# retrieve username passed in from GET Superglobal\n \tif(isset($_GET['userName']))\n\t{\n\t\t$userName=filter_input(INPUT_GET,'userName',FILTER_SANITIZE_STRING);\n\t}\n\t\n\t# submit update and check if was success\n \t$success=updatePassWord($userName);\n\t\n\techo 'Successful='.$success;\n }",
"function dbUpdatePassword($pass)\n {\n $this->password = $pass;\n /* Standard replace does not replace passwords */\n $args = [\n 'password%sql' => array('MD5(%s)', $this->password)\n ];\n dibi::query('UPDATE user SET ', $args, 'WHERE `id`=%i', $this->id);\n }",
"function admin_change_password() {\r\n\r\n $this->layout = 'default';\r\n\r\n $this->checklogin();\r\n\r\n// echo ' e10adc39491e240';\r\n// echo \"<br>\".$new = $this->encrypt_data(123456);\r\n// echo \"<br>old \".$old = $this->decrypt_data($new);\r\n\r\n if(!empty($this->data))\r\n {\r\n //$this->pre($this->data);\r\n //exit;\r\n\r\n $errorarray = array();\r\n\r\n if (isset($this->data['User']['oldpwd']) && (trim($this->data['User']['oldpwd']) == '' || trim($this->data['User']['oldpwd']=='Password'))) {\r\n $errorarray['enter_oldpwd'] = ENTER_OLD_PASSWORD;\r\n }\r\n else\r\n {\r\n $check_len_pass = strlen(trim($this->data['User']['oldpwd']));\r\n\r\n if($check_len_pass<5)\r\n $errorarray['oldpwd_minlen'] = PASSWORD_LENGTH;\r\n else\r\n {\r\n $check_user = $this->User->find('first', array('conditions' => array('status' => 0, 'password'=>md5($this->data['User']['oldpwd']) ,'id'=>$this->Session->read(md5(SITE_TITLE).'USERID'))));\r\n\r\n// $this->pre($check_user);\r\n// exit;\r\n if(empty($check_user))\r\n {\r\n $errorarray['pass_not_match'] = OLDNOTMATCH;\r\n }\r\n }\r\n }\r\n\r\n if (isset($this->data['User']['newpwd']) && (trim($this->data['User']['newpwd']) == '' || trim($this->data['User']['newpwd']=='Password'))) {\r\n $errorarray['newpass'] = ENTER_NEW_PASSWORD;\r\n }\r\n else\r\n {\r\n $check_len_pass = strlen(trim($this->data['User']['newpwd']));\r\n\r\n if($check_len_pass<5)\r\n $errorarray['newpass_minlen'] = NEW_PASSWORD_LENGTH;\r\n }\r\n if (isset($this->data['User']['confirmpwd']) && (trim($this->data['User']['confirmpwd']) == '' || trim($this->data['User']['confirmpwd']) == 'Password')) {\r\n $errorarray['confpass'] = ENTER_CONFPASS;\r\n }\r\n else\r\n {\r\n $check_len_confpass = strlen(trim($this->data['User']['confirmpwd']));\r\n\r\n if($check_len_confpass<5)\r\n $errorarray['confpass_minlen'] = CONF_PASSWORD_LENGTH;\r\n }\r\n\r\n if (trim($this->data['User']['newpwd']) != '' && trim($this->data['User']['confirmpwd']) != '' && strlen(trim($this->data['User']['newpwd']))>=5 && strlen(trim($this->data['User']['confirmpwd']))>=5 && trim($this->data['User']['newpwd']) != trim($this->data['User']['confirmpwd'])) {\r\n $errorarray['conflict'] = NEWCONFPASS;\r\n }\r\n\r\n\r\n $this->set('errorarray',$errorarray);\r\n\r\n if(empty($errorarray))\r\n {\r\n// $this->pre($errorarray);\r\n// exit;\r\n\r\n $update_user_dtl['User']['id'] = $this->Session->read(md5(SITE_TITLE).'USERID');\r\n $update_user_dtl['User']['password'] = md5($this->data['User']['newpwd']);\r\n $update_user_dtl['User']['encrypt_password'] = $this->encrypt_pass($this->data['User']['newpwd']);\r\n\r\n //$this->pre($this->Session->read());\r\n\r\n $name = $this->Session->read(md5(SITE_TITLE).'USERNAME');\r\n $email = $this->Session->read(md5(SITE_TITLE).'USEREMAIL');\r\n $new_pass = $this->data['User']['newpwd'];\r\n\r\n //$this->email_client_changepassword($name,$email,$new_pass);\r\n// $this->pre($update_user_dtl);\r\n// exit;\r\n\r\n $this->User->save($update_user_dtl);\r\n $this->redirect(DEFAULT_ADMINURL . 'users/change_password/succhange');\r\n }\r\n// $this->pre($errorarray);\r\n// exit;\r\n }\r\n }",
"protected function changePassword() {}",
"public function userPasswordUpdate() {\n $password = Hash::make($this->request->input(\"new_password\"));\n $updateArray = [\n \"password\" => $password\n ];\n $whereArray = [\n [\"user_id\", '=', $this->request->input(\"user_id\")]\n ];\n $this->usersModel->setTableName(\"cvd_users\");\n $this->usersModel->setInsertUpdateData($updateArray);\n $this->usersModel->setWhere($whereArray);\n $this->usersModel->updateData();\n }",
"function regiomino_user_change_password($account, $password) {\r\n\t//watchdog('pwdaction', '@password', array('@password' => $password));\r\n $edit['pass'] = $password;\r\n user_save($account, $edit);\r\n}",
"function admin_password($id = null) {\n\n\t\t/**\n\t\t * If $id is not set and $this->data is empty, an error message is displayed.\n\t\t * $this->data = Datas from the form\n\t\t * $id = The user ID\n\t\t */\n\t\tif (!$id && empty($this->data)) {\n\t\t\t$this->Session->setFlash(__d('core', 'Invalid user.', true), 'default', array('class' => 'error'));\n\t\t\t$this->redirect(array('action' => 'password'));\n\t\t}\n\n\t\tif (!empty($this->data)) {\n\n\t\t\t/**\n\t\t\t * Save the user password after edit.\n\t\t\t */\n\t\t\tif ($this->User->save($this->data)) {\n\n\t\t\t\t/**\n\t\t\t\t * Select the subdomain name with the ID.\n\t\t\t\t * It's necessary for the insert in the \"robot\" table.\n\t\t\t\t * @var string\n\t\t\t\t */\n\t\t\t\t$data = $this->Robot->search($id, 'User');\n\n\t\t\t\t/**\n\t\t\t\t * Insert the edit action in the \"logs\" table.\n\t\t\t\t */\n\t\t\t\t$this->Logs->insert($this->Auth->user('id'), '<strong>[ ' . $data['User']['name'] . ' ]</strong> ' . __d('core', 'User password changed by (' . $this->Auth->user('name') . ').', true) , 'CORE', $_SERVER[\"REMOTE_ADDR\"]);\n\n\t\t\t\t/**\n\t\t\t\t * If the new user password is edited, a success message is displayed.\n\t\t\t\t * Redirect to the index page.\n\t\t\t\t */\n\t\t\t\t$this->Session->setFlash(__d('core', 'The user password has been changed.', true));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t/**\n\t\t\t\t * If the user password is not edited, an error message is displayed.\n\t\t\t\t */\n\t\t\t\t$this->Session->setFlash(__d('core', 'The user password has not been changed.', true), 'default', array('class' => 'error'));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Display datas.\n\t\t */\n\t\tif (empty($this->data)) {\n\t\t\t$this->data = $this->User->read(null, $id);\n\t\t}\n\n\t}",
"public function change_pass()\n\t{\n\t\t$form = array();\n\n\t\t$form['validation']['params'] = array('password_old', 'password', 'password_confirm');\n\n\t\t$form['submit'] = function ($params) {\n\t\t\treturn $this->_change_pass_submit();\n\n\n\t\t};\n\n\t\t$form['form'] = function () {\n\t\t\tpage_info('title', lang('title_change_pass'));\n\n\t\t\t$this->_display();\n\t\t};\n\n\t\t$this->_form($form);\n\t}",
"public function account_change_password()\n\t{\n\t\t$user_session = $this->session->all_userdata();\n\t\t$user_id = $user_session['user_id'];\n\t\t\n\t\t// print_r($user_id);\n\t\t// die;\n\n\t\t$new_password = $this->input->post('new_password');\n\t\t$retype_password = $this->input->post('retype_password');\n\n\t\tif ($new_password != $retype_password)\n\t\t{\n\t\t\t$this->system_message->set_error(\"Password Miss Match\");\n\n\t\t}\n\t\telse{\n\t\t\t$data = array('password' => $this->input->post('new_password'));\n\t\t\tif (!empty($new_password) && !empty($retype_password))\n\t\t\t{\n\t\t\t\tif ($this->ion_auth->update($this->mUser->id, $data))\n\t\t\t\t{\n\t\t\t\t\t$this->custom_model->my_update(array('password_show'=>$new_password),array('id' => $user_id),'admin_users');\n\t\t\t\t\techo \"success\"; die;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo \"error\"; die;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo \"error\"; die;\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"function eventUpdatePassword(){\r\n\t\t$userid = util::getData(\"id\");\r\n\t\t$password1 = util::getData(\"password1\");\r\n\t\t$password2 = util::getData(\"password2\");\r\n\r\n\t\tif(!$this->canUpdateUser($userid))\r\n\t\t\treturn $this->setEventResult(false, \"You cannot update this account\");\r\n\r\n\t\t$result = dkpAccountUtil::SetOfficerAccountPassword($this->guild->id, $userid, $password1, $password2);\r\n\r\n\t\tif($result != dkpAccountUtil::UPDATE_OK)\r\n\t\t\t$this->setEventResult(false, dkpAccountUtil::GetErrorString($result));\r\n\t\telse\r\n\t\t\t$this->setEventResult(true,\"Password Changed!\");\r\n\r\n\t}",
"function User_Changepass(){\r\n\t\tif( ($token = Str_filter($_POST['token'])) && ($old_password = Str_filter($_POST['old_password'])) && ($new_password = Str_filter($_POST['new_password'])) ){\r\n\t\t\tif($username = AccessToken_Getter($token)){\r\n\t\t\t\tif($user = Mongodb_Reader(\"todo_users\",array(\"username\" => $username),1)){\t\t\t\t\r\n\t\t\t\t\tif(md5($old_password) == $user['password']){\r\n\t\t\t\t\t\tMongodb_Updater(\"todo_users\",array(\"username\" => $username),array(\"password\" => md5($new_password)));\r\n\t\t\t\t\t\t$res = Return_Error(false,0,\"修改成功\",array(\"username\" => $username));\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$res = Return_Error(true,6,\"密码不正确\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$res = Return_Error(true,5,\"该用户不存在\");\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t$res = Return_Error(true,7,\"token无效或登录超时\");\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t$res = Return_Error(true,4,\"提交的数据为空\");\r\n\t\t}\r\n\t\techo $res;\r\n\t}",
"public function updatepwd($new_pass,$user_id)\n {\n $data = array(\n 'password' => $new_pass\n );\n return $this->db->where('id', $user_id)\n ->update('user', $data);\n }",
"function dbUpdatePassword($pass)\n {\n /* Set the password */\n $this->password = $pass;\n /* Standard replace does not replace passwords */\n $args = [\n 'password%sql' => array('MD5(%s)', $this->password)\n ];\n dibi::query('UPDATE `student` SET ', $args, 'WHERE `id`=%i', $this->id);\n }",
"public function testUpdatePasswordNotGiven(): void { }",
"function admin_change_password() {\n\t\t/*\techo '<pre>';\n\t\tprint_r($this->data);\n\t\tdie;*/\n\t\t\n\t\tConfigure::write('debug', 0);\n\t\t$this->layout = \"admin\";\n\t\t$this->set(\"changepassword\", \"selected\"); //set main navigation class\n\t\t$this->set('manageClass', 'selected');\n\t\t$uid = $this->Session->read('Admin.id');\n\t\t$email = $this->Session->read('Admin.email');\n\t\t$userdata = $this->Member->find('first', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'Member.id' => $this->Session->read('Admin.id'),\n\t\t\t\t'Member.email' => $email\n\t\t\t)\n\t\t));\n\t\t\n\t\tif ($userdata) {\n\t\t\tif (!empty($this->data)) {\n\t\t\t\t$this->Member->updateAll(array(\n\t\t\t\t\t'Member.pwd' => \"'\" . md5($this->data['Member']['pwd']) . \"'\",\n\t\t\t\t\t'Member.email' => \"'\" . $this->data['Member']['email'] . \"'\"\n\t\t\t\t), array(\n\t\t\t\t\t'Member.email' => $email,\n\t\t\t\t\t'Member.id' => $this->Session->read('Admin.id')\n\t\t\t\t) //(conditions) where userid=schoolid\n\t\t\t\t\t);\n\t\t\t\t\n\t\t\t\t$this->Session->setFlash('Password changed successfully');\n\t\t\t\t$this->redirect(array(\n\t\t\t\t\t'action' => 'change_password',\n\t\t\t\t\t'admin' => true\n\t\t\t\t));\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\telse {\n\t\t}\n\t\t\n\t}",
"private function changePassword()\n {\n try\n {\n global $userquery; \n\n $request = $_REQUEST;\n\n if(!userid())\n throw_error_msg(\"Please login to perform this action\");\n\n if(!isset($request['old_pass']) || $request['old_pass']==\"\")\n throw_error_msg(\"provide old_pass\");\n\n //new_pass\n if(!isset($request['new_pass']) || $request['new_pass']==\"\")\n throw_error_msg(\"provide new_pass\");\n\n //c_new_pass\n if(!isset($request['c_new_pass']) || $request['c_new_pass']==\"\")\n throw_error_msg(\"provide c_new_pass\");\n\n if($request['c_new_pass']!=$request['c_new_pass'])\n throw_error_msg(\"new password and confirm password do not match\");\n\n $request['userid'] = userid();\n $userquery->change_password($request);\n\n if( error() )\n {\n throw_error_msg(error('single')); \n }\n else\n {\n $data = array('code' => \"204\", 'status' => \"success\", \"msg\" => \"success\", \"data\" => \"password has been changed successfully\");\n $this->response($this->json($data)); \n } \n\n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n }\n }",
"public function update(){\n\t\t$sql = \"update user set pass='\".$this->pass.\"' where id='\".$this->id.\"'\";\n\t\treturn\tExecutor::doit($sql);\n\t}",
"public function changePwd(){\n $uesr_id=$_SESSION['admin_id'];\n\t\t$sql=\"select * from users where id='$uesr_id'\";\n\t\t$query = mysqli_query($this->connrps, $sql);\n\t\twhile ($row = mysqli_fetch_array($query)) {\n\t\t\t$username = $row['username'];\n\t\t\t$password = $row['password'];\n\t\t}\n\t\t$cur_password=base64_encode($_POST['currentPassword']);\n\t\t$new_pwd=base64_encode($_POST['newPassword']);\n\t\t$confirm_pwd=base64_encode($_POST['confirmPassword']);\n\t\tif ($cur_password != $password) {\n\t\t\t$message= \"Current password does not matched.\";\n\t\t\t$_SESSION['error_msg'] = $message;\n\t\t\treturn 0;\n\t\t}else if ($new_pwd != $confirm_pwd) {\n\t\t\t$message= \"Confirm password does not matched\";\n\t\t\t$_SESSION['error_msg'] = $message;\n\t\t\treturn 0;\n\t\t}else {\n\t\t\t$query_updt = \"UPDATE users SET password = '$new_pwd' WHERE id='$uesr_id'\";\n\t\t\t$query_updt = mysqli_query($this->connrps, $query_updt);\n\t\t\t$message= \"New password has been updated successfully\";\n\t\t\t$_SESSION['succ_msg'] = $message;\n\t\t\treturn 1;\n\t\t}\n\t}",
"public function changeUserPassword($uid,$newPassword);",
"public function editPassword($pword)\n\t\t{\n\t\t\tglobal $password;\n\t\t\tglobal $user_id;\n\t\t\n\t\t\t$pword = addslashes($pword);\n\n\t\t\tif(strlen($pword) <= 32)\n\t\t\t{\n\t\t\t$qry = 'UPDATE admin_table SET password = \"' . $pword . '\" WHERE user_id = '. $user_id;\n\t\t\t$result = mysql_query($qry, $GLOBALS['connection']);\n\t\t\t}\n\t\t\n\t\t\t$password = $pword;\n\t\t}",
"public function resetAdminUserPwdAction()\n\t{\n\t // \t $return = $user->resetPassword('admin');\n\t // \t var_export($return);\n\t // \t echo PHP_EOL;\n\t // \t echo $return['password'];\n\t // \t return false;\n\t}",
"public function Change_user_password() {\n\t\t$this->load->helper('pass');\n\t\t$user = $this->administration->getMyUser($this->user_id);\n\t\t//password\n\t\t$old_pass = $this->input->post('oldPassword');\n\t\t$newPass = $this->input->post('newPassword');\n\t\t$confirmNewPass = $this->input->post('confirmNewPassword');\n\t\tif($newPass == $confirmNewPass) {\n\t\t\t//check if old password is corrent\n\t\t\t$verify = $this->members->validateUser($user->Username,$old_pass);\n\t\t\tif($verify) {\n\t\t\t\t//validate if the password is in the correct format\n\t\t\t\t$valid_new_pass = checkPasswordCharacters($newPass);\n\t\t\t\tif($valid_new_pass) {\n\t\t\t\t\t$change_pass = $this->members->simple_pass_change($user->ID,$newPass);\n\t\t\t\t\tif($change_pass) {\n\t\t\t\t\t\techo '1';\n\t\t\t\t\t}else {\n\t\t\t\t\t\techo '6';\t\n\t\t\t\t\t}\n\t\t\t\t}else {\n\t\t\t\t\techo '7';\t\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\techo '8';\t\n\t\t\t}\n\t\t}else {\n\t\t\techo '9';\t\n\t\t}\n\t}",
"public function change_admin_password_form() {\n\t if ($this->lang->line('admin_menu_change_password') != '') \n\t\t$this->data['heading']= stripslashes($this->lang->line('admin_menu_change_password')); \n\t\telse $this->data['heading'] = 'Change Password';\n if ($this->checkLogin('A') == '') {\n redirect(ADMIN_ENC_URL);\n } else {\n \n $this->load->view(ADMIN_ENC_URL.'/templates/header.php', $this->data);\n $this->load->view(ADMIN_ENC_URL.'/adminsettings/changepassword.php', $this->data);\n $this->load->view(ADMIN_ENC_URL.'/templates/footer.php', $this->data);\n }\n }",
"public function update_password($new_pass, $userid)\n\t{\n\t\t$data = array(\n 'password' => md5($new_pass)\n );\n\t\t$this->db->where('id', $userid);\n\t\t$this->db->update('es_admin', $data);\n\t\treturn true;\n\t}"
]
| [
"0.75358766",
"0.7421558",
"0.7404768",
"0.73266023",
"0.7326007",
"0.732272",
"0.7262627",
"0.7256923",
"0.72232723",
"0.718764",
"0.7180864",
"0.7168249",
"0.7151536",
"0.71377766",
"0.709438",
"0.70587313",
"0.70568264",
"0.70350397",
"0.70310634",
"0.7028615",
"0.6990548",
"0.69616836",
"0.695467",
"0.69546396",
"0.6923447",
"0.69179964",
"0.6914745",
"0.6909851",
"0.68994987",
"0.68895465"
]
| 0.7526254 | 1 |
This method adminEditUserProfile is used to edit users in the Admin platform | public function adminEditUserProfile($id,$title,$full_name,$dob,$gender,$address,$phone)
{
$title = $this->secureInput($title);
$full_name = $this->secureInput($full_name);
$dob = $this->secureInput($dob);
$gender = $this->secureInput($gender);
$address = $this->secureInput($address);
//$city = $this->secureInput($city);
//$state = $this->secureInput($state);
//$country = $this->secureInput($country);
$phone = $this->secureInput($phone);
//$sql = "UPDATE users SET title = '" . $title . "', full_name = '" . $full_name . "', dob = '" . $dob . "', gender = '" . $gender . "', address = '" . $address . "', city = '" . $city . "', state = '" . $state . "', country = '" . $country . "', phone = '" . $phone . "', level_access = '" . $level_access . "' WHERE id = '" . $id . "'";
$sql = "UPDATE users SET title = '" . $title . "', full_name = '" . $full_name . "', dob = '" . $dob . "', gender = '" . $gender . "', address = '" . $address . "', phone = '" . $phone . "' WHERE id = '" . $id . "'";
$res = $this->processSql($sql);
if(!$res) return 4;
return 99;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function p_editProfile() {\n\t$_POST['modified'] = Time::now();\n \n $w = \"WHERE user_id = \".$this->user->user_id;\n\t\t\n\t# Insert\n\tDB::instance(DB_NAME)->update(\"users\", $_POST, $w);\n \n Router::redirect(\"/users/profile\");\n\n }",
"public function actioneditProfile()\n\t{\t\n\t\t$data = array();\n\t\t$data['city'] = $_POST['city'];\n\t\t\n\t\t\n\t\t$userObj = new Users();\n\t\t$userObj->setData($data);\n\t\t$userObj->insertData($_POST['userId']);\n\t\tYii::app()->user->setFlash('success',\"Successfully updated\");\n\t\t$this->redirect('admin/users');\n\t\t//Yii::app()->user->setFlash('error',\"Please update your profile\");\n\t\t//$this->render('userProfile',$profileData);\n\t\n\t}",
"public function actionEditUserProfile()\n {\n $userID = $_GET['userid'];\n $data = $this->model->getUserProfile($userID);\n $this->view = new ViewIndex(\"EditUserProfile\", $data);\n $this->view->render();\n //$this->view->generate('viewEditProfile.php', 'viewTemplate.php', $data);\n }",
"public function actionUpdateUser()\n {\n\n\n if ($model = UserProfile::find()->where(['user_id' => Yii::$app->user->identity->id])->one()) {\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n return $this->redirect(['view']);\n\n } else {\n\n return $this->render('update', [\n\n 'model' => $model,\n\n ]);\n }\n\n } else {\n\n return $this->redirect(['create']);\n\n }\n\n\n// $model = $this->findModel($id);\n//\n// if ($model->load(Yii::$app->request->post()) && $model->save()) {\n// return $this->redirect(['view', 'id' => $model->id]);\n// } else {\n// return $this->render('update', [\n// 'model' => $model,\n// ]);\n// }\n }",
"public function edit_self(ProfileUser $editted_profile) {\r\n\t\tif ($this->user_id) {\r\n\t\t\t$sql = \"UPDATE `users` SET program = '$editted_profile->program' AND level = '$editted_profile->level' AND commuter = '$editted_profile->commuter' AND bio = '$editted_profile->bio' WHERE user_id = '$this->user_id' LIMIT 1\";\r\n\t\t\t$result = $this->dbc->query($sql)\r\n\t\t\tor die ($this->dbc->error);\r\n\t\t}\r\n\t}",
"public function adminEditProfile($id,$title,$full_name,$dob,$gender,$address,$phone)\n\t{\n $title = $this->secureInput($title);\n $full_name = $this->secureInput($full_name);\n $dob = $this->secureInput($dob);\n $gender = $this->secureInput($gender);\n $address = $this->secureInput($address);\n //$city = $this->secureInput($city);\n //$state = $this->secureInput($state);\n //$country = $this->secureInput($country);\n $phone = $this->secureInput($phone);\n\n//$sql = \"UPDATE users SET title = '\" . $title . \"', full_name = '\" . $full_name . \"', dob = '\" . $dob . \"', gender = '\" . $gender . \"', address = '\" . $address . \"', city = '\" . $city . \"', state = '\" . $state . \"', country = '\" . $country . \"', phone = '\" . $phone . \"' WHERE id = '\" . $id . \"'\";\n\n$sql = \"UPDATE users SET title = '\" . $title . \"', full_name = '\" . $full_name . \"', dob = '\" . $dob . \"', gender = '\" . $gender . \"', address = '\" . $address . \"', phone = '\" . $phone . \"' WHERE id = '\" . $id . \"'\";\n\n \t$res = $this->processSql($sql);\n\t\t\tif(!$res) return 4;\n\t\t\treturn 99;\n\t}",
"public function editadminprofile($id)\n\t{\n\t\t//$encripted_pass = password_hash($this->input->post('password'), PASSWORD_BCRYPT, $options);\n\n\t\t$data = array(\n\t\t\t'name'\t=> $this->input->post('name'),\n\t\t\t'contact'\t=> $this->input->post('contact'),\n\t\t\t//'password' => $encripted_pass,\n\n\t\t);\n\n\t\treturn $query = $this->db->where('id', $id)->update('users', $data);\n\t}",
"function admin_edit($id = null) {\n\n\t\t/**\n\t\t * If $id is not set and $this->data is empty, an error message is displayed.\n\t\t * $this->data = Datas from the form\n\t\t * $id = The user ID\n\t\t */\n\t\tif (!$id && empty($this->data)) {\n\t\t\t$this->Session->setFlash(__d('core', 'Invalid user.', true), 'default', array('class' => 'error'));\n\t\t\t$this->redirect(array('action' => 'index'));\n\t\t}\n\n\t\tif (!empty($this->data)) {\n\n\t\t\t/**\n\t\t\t * Save the user after edit.\n\t\t\t */\n\t\t\tif ($this->User->save($this->data)) {\n\n\t\t\t\t/**\n\t\t\t\t * Insert the edit action in the \"logs\" table.\n\t\t\t\t */\n\t\t\t\t$this->Logs->insert($this->Auth->user('id'), '<strong>[ ' . $this->data['User']['name'] . ' ]</strong> ' . __d('core', 'User edited by (' . $this->Auth->user('name') . ').', true) , 'CORE', $_SERVER[\"REMOTE_ADDR\"]);\n\n\t\t\t\t/**\n\t\t\t\t * If the new user is edited, a success message is displayed.\n\t\t\t\t * Redirect to the index page.\n\t\t\t\t */\n\t\t\t\t$this->Session->setFlash(__d('core', 'The user has been edited.', true));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\n\t\t\t} else {\n\t\t\t\t/**\n\t\t\t\t * If the user is not edited, an error message is displayed.\n\t\t\t\t */\n\t\t\t\t$this->Session->setFlash(__d('core', 'The user has not been edited.', true), 'default', array('class' => 'error'));\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Display datas.\n\t\t */\n\t\tif (empty($this->data)) {\n\t\t\t$this->data = $this->User->read(null, $id);\n\t\t}\n\n\t\t/**\n\t\t * Select all profiles (Administrator or Member).\n\t\t * @var array\n\t\t */\n\t\t$profiles = $this->User->Profile->find('list');\n\n\t\t/**\n\t\t * Select all offers enabled.\n\t\t * @var array\n\t\t */\n\t\t$offers = $this->User->Offer->find('list');\n\n\t\t/**\n\t\t * Put all profiles in \"profiles\" and offers in \"offers\".\n\t\t * $profiles and $offers will be available in the view.\n\t\t */\n\t\t$this->set(compact('profiles', 'offers'));\n\n\t}",
"public function editAccountAction()\n {\n //Current customer Data.\n $cst = $this->model->getByUserName($_SESSION['userName']);\n if (empty($_POST) === false) {\n //User want to Update his Data.\n if (isset($_POST['update'])) {\n $message = \"\";\n $currentUserName = $cst->getuserName();\n //Check if customer`s new User Name or \n //new Email exists in Data Base.\n if ($currentUserName != $_POST['userName'])\n $message = $this->checkIfExists($_POST['userName'], \"\");\n if (!$message)\n if ($cst->getemail() != $_POST['email'])\n $message = $this->checkIfExists(\"\", $_POST['email']);\n if ($message != \"\")\n $this->regMassage($message);\n //Upadating Customer`s Data.\n else {\n $cst = $this->customerCreate();\n $this->update($cst, $currentUserName);\n $_SESSION['userName'] = $_POST['userName'];\n }\n }\n }\n\n $vars['update'] = \"\";\n $vars['customer'] = $cst;\n $this->view->render('edit profile', $vars);\n }",
"public function post_edit() {\n //try to edit the user\n if (AuxUser::editUser()) {\n //if the edit process worked, redirect to the profile page\n echo '<script>alert(\"User data edited\");</script>';\n Response::redirect('/profile');\n } else {\n //if not, print the error message\n echo '<script>alert(\"No data was updated, Please confirm that you change at least one field\");</script>';\n Response::redirect('/user/edit', 'refresh');\n }\n }",
"public function editAction()\n {\n $identity = Zend_Auth::getInstance()->getIdentity();\n $users = new Users_Model_User_Table();\n $row = $users->getById($identity->id);\n\n $form = new Users_Form_Users_Profile();\n $form->setUser($row);\n\n if ($this->_request->isPost()\n && $form->isValid($this->_getAllParams())) {\n\n $row->setFromArray($form->getValues());\n $row->save();\n\n $row->login(false);\n\n $this->_helper->flashMessenger('Profile Updated');\n $this->_helper->redirector('index');\n }\n $this->view->form = $form;\n }",
"public function p_edit() { if(!$this->user) {\n Router::redirect('/');\n }\n \n $this->user->user_id = DB::instance(DB_NAME)->sanitize($this->user->user_id);\n $q = 'SELECT first_name, last_name, email\n FROM users\n WHERE user_id = \"'.$this->user->user_id.'\"';\n $user = DB::instance(DB_NAME)->select_row($q);\n \n $_POST = DB::instance(DB_NAME)->sanitize($_POST);\n \n $_POST['first_name'] = htmlspecialchars($_POST['first_name'], ENT_QUOTES, 'UTF-8');\n $_POST['last_name'] = htmlspecialchars($_POST['last_name'], ENT_QUOTES, 'UTF-8');\n \n $q = 'SELECT count(*)\n FROM users\n WHERE email = \"'.$_POST['email'].'\"'; \n $count = DB::instance(DB_NAME)->select_rows($q); \n //if the user enters an email which already exists in the data base kick them back\n if(intval($count[0]['count(*)']) >= 1) {\n Router::redirect('/users/edit/error');\n } else {\n \n if($_POST['first_name'] != NULL)\n {\n $user['first_name'] = $_POST['first_name'];\n }\n if($_POST['last_name'] != NULL )\n {\n $user['last_name'] = $_POST['last_name'];\n }\n if($_POST['email'] != NULL )\n {\n $user['email'] = $_POST['email'];\n }\n \n \n \n DB::instance(DB_NAME)->update(\"users\", $user, \"WHERE user_id =\".$this->user->user_id);\n Router::redirect('/users/profile/'.$this->user->user_id);\n }\n \n \n }",
"public function edit(Admin $admin) {\n\t\t//\n\t}",
"public function edituser(){\n\t\t$id = $this->uri->segment(3);\n\n\t\t$headerData = null;\n\t\t$sidebarData = null;\n\t\t$page = 'admin/edit_londontec_users';\n\t\t$mainData = array(\n\t\t\t'pagetitle' => 'Edit Londontec users',\n\t\t\t'londontec_users' => $this->setting_model->Get_Single('londontec_users','user_id',$id)\n\t\t);\n\t\t$footerData = null;\n\n\t\t$this->template($headerData, $sidebarData, $page, $mainData, $footerData);\n\t}",
"public function p_profile_edit() {\n $duplicate = DB::instance(DB_NAME)->select_field(\"SELECT email FROM users WHERE email = '\" . $_POST['email'] . \"' AND email != '\" . $this->user->email . \"'\");\n\n //If email already exists \n if($duplicate){ \n \n //Redirect to error page \n Router::redirect('/users/profile/?duplicate=true');\n }\n\n\n // Encrypt the password \n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']); \n\n // Create an encrypted token via their email address and a random string\n $_POST['token'] = sha1(TOKEN_SALT.$_POST['email'].Utils::generate_random_string()); \n\n $q = \"UPDATE users\n SET first_name = '\".$_REQUEST['first_name'].\"',\n last_name = '\".$_REQUEST['last_name'].\"',\n email = '\".$_REQUEST['email'].\"'\n WHERE id = '\".$this->user->id.\"'\";\n\n DB::instance(DB_NAME)->query($q);\n Router::redirect(\"/users/profile\");\n\n \n }",
"public function actionEdit()\r\n\t{\r\n\t\t//disable jquery autoload\r\n\t\tYii::app()->clientScript->scriptMap=array(\r\n\t\t\t'jquery.js'=>false,\r\n\t\t);\r\n\t\t$model = $this->loadUser();\r\n\t\t$profile=$model->profile;\r\n\t\t\r\n\t\t// ajax validator\r\n\t\tif(isset($_POST['ajax']) && $_POST['ajax']==='profile-form')\r\n\t\t{\r\n\t\t\techo UActiveForm::validate(array($model,$profile));\r\n\t\t\tYii::app()->end();\r\n\t\t}\r\n\t\t\r\n\t\tif(isset($_POST['User']))\r\n\t\t{\r\n\t\t\t\r\n \r\n\t\t\t$model->attributes=$_POST['User'];\r\n\t\t\t$profile->attributes=$_POST['Profile'];\r\n\t\t\tif($model->validate()&&$profile->validate()) {\r\n\t\t\t\t$model->save();\r\n\t\t\t\t$profile->save();\r\n \r\n $usermodel= $this->Usermodel();\r\n if($usermodel)\r\n {\r\n if($usermodel==1)\r\n {\r\n $usr_model= Guardians::model()->findByAttributes(array('uid'=> Yii::app()->user->id));\r\n $usr_model->email= $model->email; \r\n $usr_model->save();\r\n }\r\n if($usermodel==2)\r\n {\r\n $usr_model= Students::model()->findByAttributes(array('uid'=> Yii::app()->user->id));\r\n $usr_model->email=$model->email;\r\n $usr_model->save();\r\n }\r\n if($usermodel==3)\r\n {\r\n $usr_model= Employees::model()->findByAttributes(array('uid'=> Yii::app()->user->id));\r\n $usr_model->email= $model->email;\r\n $usr_model->save();\r\n }\r\n }\r\n \r\n //Yii::app()->user->updateSession();\r\n\t\t\t\tYii::app()->user->setFlash('profileMessage',Yii::t('app',\"Changes is saved.\"));\r\n\t\t\t\t$this->redirect(array('/user/accountProfile'));\r\n\t\t\t} else $profile->validate();\r\n\t\t}\r\n\r\n\t\t$this->render('edit',array(\r\n\t\t\t'model'=>$model,\r\n\t\t\t'profile'=>$profile,\r\n\t\t));\r\n\t}",
"private function __setProfileFormData() {\n\t\t$adminUser = $this->Auth->user();\n\n\t\t$this->request->data['User'] = $adminUser;\n\t\t$this->request->data['User']['old_email'] = $adminUser['email'];\n\n\t\t$dob = $adminUser['date_of_birth'];\n\t\tif (!is_null($dob) && ($dob !== '')) {\n\t\t\tlist($dobYear, $dobMonth, $dobDay) = explode('-', $dob);\n\t\t\t$formattedDob = sprintf('%s-%s-%s', $dobMonth, $dobDay, $dobYear);\n\t\t\t$this->request->data['User']['date_of_birth'] = $formattedDob;\n\t\t}\n\n\t\t$gender = $adminUser['gender'];\n\n\t\t$profileImg = Common::getUserThumb($adminUser['id'], $adminUser['type'], 'medium', 'user_pic');\n\n\t\t$superAdminStatus = __('No');\n\t\tif (intval($adminUser['type']) === User::ROLE_SUPER_ADMIN) {\n\t\t\t$superAdminStatus = __('Yes');\n\t\t}\n\n\t\t$timezoneList = $this->Timezone->get_timezone_list();\n\n\t\t// form details\n\t\t$formId = 'AdminProfileEditForm';\n\t\t$changePasswordFormId = 'AdminChangePasswordForm';\n\t\t$changePasswordFields = $this->__listAdminUserChangePasswordFormFields();\n\t\t$inputDefaults = array(\n\t\t\t'label' => false,\n\t\t\t'div' => false\n\t\t);\n\n\t\t// validation\n\t\t$modelName = 'User';\n\t\t$this->JQValidator->addValidation($modelName, $this->AdminChangePasswordForm->validate, $changePasswordFormId);\n\t\t$this->JQValidator->addValidation($modelName, $this->AdminProfileForm->validate, $formId);\n\n\t\t$title_for_layout = 'Edit Profile';\n\n\t\t$this->set(compact('title_for_layout', 'modelName', 'changePasswordFields', 'formId', 'changePasswordFormId', 'timezoneList', 'inputDefaults', 'gender', 'profileImg', 'superAdminStatus'));\n\t}",
"public function updateProfile()\n {\n $breadCrumb = $this->userEngine->breadcrumbGenerate('profileEdit');\n\n return $this->loadPublicView('user.profile-edit', $breadCrumb['data']);\n }",
"function adminProfile(){\n $this->check_admin_user_session();\n //pr(get_admin_session_data());\n $data['title']='Admin Profile';\n $data['trainer'] = $this->common_model->getsingle(USERS,array('id' => get_admin_session_data()['userId']));\n $this->load->admin_render('adminProfile',$data);\n }",
"public function updateprofileAction()\n\t{\n\t\t$this->view->headTitle(\"Update Your Profile\");\n\t\t\n\t\t//if not logged in, user can't edit profile\n\t\tif(!$this->loggedEmail){\n\t\t\t$this->_redirect('/'); \n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$user = new Default_Model_User();\n\t\t$resultRow = $user->getUserByEmail($this->loggedEmail);\n\t\t\n\t\tif($this->getRequest()->isPost()){\n\t\t\t\n\t\t\t$resultRow->email = $this->getRequest()->getPost('email');\n\t\t\t$resultRow->first_name = $this->getRequest()->getPost('first_name');\n\t\t\t$resultRow->last_name = $this->getRequest()->getPost('last_name');\n\t\t\t$resultRow->gender = $this->getRequest()->getPost('gender');\n\t\t\t$resultRow->address = $this->getRequest()->getPost('address');\n\t\t\t\n\t\t\tif(strlen($this->getRequest()->getPost('password'))){\n\t\t\t\t$resultRow->password = $this->getRequest()->getPost('password');\n\t\t\t}\n\t\t\t$resultRow->updated_at = date('Y-m-d H:i:s');\n\t\t\t$resultRow->save();\n\t\t\t\n\t\t} \n\t\t\t\n\t\t$this->view->email = $resultRow->email;\n\t\t$this->view->first_name = $resultRow->first_name;\n\t\t$this->view->last_name = $resultRow->last_name;\n\t\t$this->view->gender = $resultRow->gender;\n\t\t$this->view->address = $resultRow->address;\n\t\t$this->view->handle = $resultRow->handle;\n\t\n\t}",
"public static function edit_profile() {\n\t\twp_enqueue_media();\n\t\twp_enqueue_script( 'ur-my-account' );\n\n\t\t$user_id = get_current_user_id();\n\t\t$form_id = ur_get_form_id_by_userid( $user_id );\n\n\t\t$profile = user_registration_form_data( $user_id, $form_id );\n\n\t\t$user_data = get_userdata( $user_id );\n\t\t$user_data = $user_data->data;\n\n\t\t$form_data_array = ( $form_id ) ? UR()->form->get_form( $form_id, array( 'content_only' => true ) ) : array();\n\n\t\tif ( ! empty( $form_data_array ) ) {\n\n\t\t\tif ( count( $profile ) < 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Prepare values.\n\t\t\tforeach ( $profile as $key => $field ) {\n\t\t\t\t$value = get_user_meta( get_current_user_id(), $key, true );\n\t\t\t\t$profile[ $key ]['value'] = apply_filters( 'user_registration_my_account_edit_profile_field_value', $value, $key );\n\t\t\t\t$new_key = str_replace( 'user_registration_', '', $key );\n\n\t\t\t\tif ( in_array( $new_key, ur_get_registered_user_meta_fields() ) ) {\n\t\t\t\t\t$value = get_user_meta( get_current_user_id(), ( str_replace( 'user_', '', $new_key ) ), true );\n\t\t\t\t\t$profile[ $key ]['value'] = apply_filters( 'user_registration_my_account_edit_profile_field_value', $value, $key );\n\t\t\t\t} elseif ( isset( $user_data->$new_key ) && in_array( $new_key, ur_get_user_table_fields() ) ) {\n\t\t\t\t\t$profile[ $key ]['value'] = apply_filters( 'user_registration_my_account_edit_profile_field_value', $user_data->$new_key, $key );\n\n\t\t\t\t} elseif ( isset( $user_data->display_name ) && 'user_registration_display_name' === $key ) {\n\t\t\t\t\t$profile[ $key ]['value'] = apply_filters( 'user_registration_my_account_edit_profile_field_value', $user_data->display_name, $key );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tur_get_template(\n\t\t\t\t'myaccount/form-edit-profile.php',\n\t\t\t\tarray(\n\t\t\t\t\t'profile' => apply_filters( 'user_registration_profile_to_edit', $profile ),\n\t\t\t\t\t'form_data_array' => $form_data_array,\n\t\t\t\t)\n\t\t\t);\n\t\t} else {\n\t\t\techo '<h1>' . esc_html__( 'No profile details found.', 'user-registration' ) . '</h1>';\n\t\t}\n\t}",
"public function postEdit()\n {\n // If we are not authentified, redirect to the login page.\n if(Auth::guest()) return Redirect::action('frontend\\UserController@getLogin');\n\n $loggedUser = Auth::user();\n\n $user = API::put('api/v1/user/' . $loggedUser->id, Input::all());\n\n // If the API throws a ValidationException $user will be a JSON string with our errors.\n if(is_string($user)) {\n $errors = json_decode($user, true);\n return Redirect::action('frontend\\UserController@getIndex')\n ->withErrors($errors);\n } else {\n return Redirect::action('frontend\\UserController@getIndex')\n ->with('success', 'Profile edited!');\n }\n }",
"public function update_profile() {\n\t\tloggedOnly();\n\n\t\t// Busca o usuario\n\t\t$user = auth();\n\n\t\t// Pega o email\n\t\t$email = $this->input->post( 'email' ) ? \n\t\t\t\t $this->input->post( 'email' ) :\n\t\t\t\t $user->email;\n\n\t\t// Verifica se o email foi alterado\n\t\tif( $email !== $user->email ) {\n\n\t\t\t// Verifica se o email é unico\n\t\t\tif( $this->User->email( $email ) ) {\n\t\t\t\treturn reject( 'E-mail ja cadastrado no sistema' );\n\t\t\t}\n\t\t\t\n\t\t\t// Seta o email\n\t\t\t$user->email = $email;\n\t\t}\n\n\t\t// Verifica se a senha foi alterada\n\t\tif( $password = $this->input->post( 'password' ) ) {\n\t\t\t$user->setPassword( $password );\n\t\t}\n\n\t\t// seta o nome\n\t\t$user->name = $this->input->post( 'name' ) ? \n\t\t\t\t\t $this->input->post( 'name' ) : \n\t\t\t\t\t $user->name;\n\n\t\t// Verifica se a foto foi alterada\n\t\tif( $base64 = $this->input->post( 'image' ) ) {\n\n\t\t\t// Guarda a imagem\n\t\t\tif( $midia_id = $this->__saveUserImage( $base64 ) ) {\n\t\t\t\t$user->midia_id = $midia_id;\n\t\t\t} else return reject( 'Erro ao salvar a imagem do usuário' );\n\t\t}\n\n\t\t// salvar a alteração\n\t\tif( $user->save() ) {\n\t\t\treturn resolve( $user->authData() );\n\t\t} else return reject( 'Erro ao realizar a ação' );\n\t}",
"protected function edit() {\n\t\t// Make sure a user exists.\n\t\tif (empty($this->user)) {\n\t\t\t$_SESSION['title'] = 'Error';\n\t\t\t$_SESSION['data'] = array(\n\t\t\t\t'error' => 'The selected user was invalid.',\n\t\t\t\t'link' => 'management/users'\n\t\t\t);\n\t\t\tredirect(ABSURL . 'error');\n\t\t}\n\n\t\t// Prepare data for contents.\n\t\tnonce_generate();\n\t\t$data = array(\n\t\t\t'user' =>& $this->user\n\t\t);\n\t\t$this->title = 'Edit User: ' . $this->user['username'];\n\t\t$this->content = $this->View->getHtml('content-users-edit', $data, $this->title);\n\t}",
"public function update_userdetails_by_admin($data)\n {\n foreach($data as $key=>$val) $$key=get_magic_quotes_gpc()?$val:addslashes($val);\n \n $query = new Query;\n\n $result = $query->createCommand()->update('core_users', ['user_name' => $name,'company_name' => $company_name,'company_address' => $address,'designation' => $designation,'company_email' => $company_email], 'user_id = \"'.$userid.'\"')->execute();\n\n if ($result == 1){\n return \"SUCCESS\";\n }else{\n return \"FAILED\";\n }\n }",
"public function edit(){\r\n\t\t$id = $this->uri->segment(2);\r\n\r\n\t\t$data = $this->admin_users_model->get_by(array('id'=>$id)); \r\n\t\tif($data){ \r\n\t\t\tforeach($data as $row){\r\n\t\t\t $data['id'] = $row->id;\r\n\t\t\t\t$data['name'] = $row->name;\t\r\n\t\t\t $data['userName'] = $row->LoginName;\r\n\t\t\t\t$data['email'] = $row->UserEmail;\r\n\t\t\t\t$data['mobile'] = $row->UserMobile;\r\n\t\t\t\t$data['avatar'] = $row->UserAvatar;\r\n\t\t\t $data['yahoo'] = $row->yahoo;\r\n\t\t\t\t$data['twitter'] = $row->twitter;\r\n\t\t\t\t$data['facebook'] = $row->facebook;\r\n\t\t\t\t$data['instagram'] = $row->instagram;\t\r\n\t\t\t\t$data['about'] = $row->about;\t\t\t\r\n\t\t\t\t}\r\n\t\t\t$this->out('adminUser','editUser',$data);\t\r\n\t\t\t} else{\r\n\t\t\t\tredirect('admin-users-list');\r\n\t\t\t\t}\r\n\t\t}",
"public function actionEditProfile()\n {\n $model = Yii::$app->user->identity;\n\n if ($model->load(Yii::$app->request->post()))\n {\n $model->name = Yii::$app->request->post('User')['name'];\n $model->phone = Yii::$app->request->post('User')['phone'];\n $model->email = Yii::$app->request->post('User')['email'];\n $model->infected = Yii::$app->request->post('User')['infected'];\n $model->province = Yii::$app->request->post('User')['province'];\n\n if ($model->validate())\n {\n if ($model->save()) {\n Yii::$app->session->setFlash('success', 'Perfil actulizado con éxito!');\n }\n\n else {\n Yii::$app->session->setFlash('error', 'Error con los datos introducidos: ' . HelperFunctions::errors($model));\n }\n\n return $this->refresh();\n }\n }\n return $this->render('edit-profile',['model' => $model]);\n }",
"public function edit(){\n\t\t\tif(isset($_POST['submit'])){\n\t\t\t\t//MAP DATA\n\t\t\t\t$user = $this->_map_posted_data();\n\t\t\t\t$user->set_user_id($_POST['id']);\n\t\t\t\t$this->userrepository->update($user);\n\t\t\t\theader(\"Location: index.php/admin/index/edit\");\n\t\t\t}else{\n\t\t\t\t$view_page = \"adminusersview/edit\";\n\t\t\t\t$id = $_GET['id'];\n\t\t\t\t$user = $this->userrepository->get_by_id($id);\n\t\t\t\tif(is_null($user)){\n\t\t\t\t\theader(\"Location: index.php/admin/index\");\n\t\t\t\t}\n\t\t\t\tinclude_once(ROOT_PATH.\"admin/views/admin/container.php\");\n\t\t\t}\n\t\t}",
"public function edit_profile($username, $data) {\n\t\t$this->db->where('username', $username)\n\t\t\t\t ->update('user', $data);\n\t}",
"public function webeditprofile($user_id,$data)\n {\n \n $editprofile = DB::table('users')->where('id',$user_id)->update($data);\n return redirect('myprofile');\n\n }"
]
| [
"0.73264414",
"0.7244814",
"0.704167",
"0.67556953",
"0.67549616",
"0.6740283",
"0.6709447",
"0.6586142",
"0.65252715",
"0.6494943",
"0.6443907",
"0.6438174",
"0.6436072",
"0.64330643",
"0.6429838",
"0.64277494",
"0.6426377",
"0.6421336",
"0.64068174",
"0.640609",
"0.6389824",
"0.6374015",
"0.63735974",
"0.63731354",
"0.6367371",
"0.63657355",
"0.6358771",
"0.63417864",
"0.63385594",
"0.6329409"
]
| 0.7387842 | 0 |
This method adminSuspendUser is used to suspend user by the Admin | public function adminSuspendUser($id)
{
$sql = "SELECT id,active FROM users WHERE id = '".$id."'";
$res = $this->processSql($sql);
if ($res){
$update = "UPDATE users SET active = 2 WHERE id = '".$id."'";
$result = $this->processSql($update);
if ($result)
return 99;
return 1;
} else return 2;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function suspend_user(User $user){\n //If the user is active suspend them if not reinstate them\n if ($user->active == 1) {\n $user->active = 0;\n $user->save();\n session()->flash('status', $user->username . ' was successfully suspended');\n return redirect()->back();\n }\n $user->active = 1;\n $user->save();\n session()->flash('status', $user->username . ' was successfully reinstated');\n return redirect()->back();\n }",
"public function suspend_user(){\n\t\t\t\n\t\t\t//escaping the post values\n\t\t\t$uid = html_escape($this->input->post('userID'));\n\t\t\t$id = preg_replace('#[^0-9]#i', '', $uid); // filter everything but numbers\n\n\t\t\t$detail = $this->db->select('*')->from('users')->where('id',$id)->get()->row();\n\t\t\t\n\t\t\tif($detail){\n\n\t\t\t\t\t//$data['id'] = $detail->id;\n\t\t\t\t\t$update = array(\n\t\t\t\t\t\t'status' => '1',\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\tif($this->Users->update_user($update, $id)){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$data['success'] = true;\n\t\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\">×</button> User has been suspended!</div>';\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$data['success'] = false;\n\t\t\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\">×</button> Method error</div>';\n\t\t\t\t\t}\n\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\">×</button> No such user!</div>';\n\t\t\t}\n\t\t\techo json_encode($data);\n\t\t}",
"public function suspendUser(Request $request)\n {\n try {\n $this->logger->info(\"Entering AdminController.suspendUser()\");\n // Takes the user's id\n $id = $request->input('ID');\n // Calls the business service\n $service = new UserBusinessService();\n // suspends the user\n $service->suspendUser($id);\n // redirects to the admin page\n $this->logger->info(\"Exiting AdminController.suspendUser()\");\n return redirect(\"/admin\");\n }\n \n catch (Exception $e){\n //Best practice: catch all exceptions, log the exception, and display the common error page (or use global exception handling\n //log the exception and display exception view\n $this->logger->error(\"Exception: \", array(\"message\" => $e->getMessage()));\n $data = ['errorMSG' => $e->getMessage()];\n return view('exception')->with($data);\n }\n }",
"public function adminUnsuspendUser($id)\n\t{\n\t\t$sql = \"SELECT id,active FROM users WHERE id = '\".$id.\"'\";\n\t\t$res = $this->processSql($sql);\n\t\tif ($res){\n\t\t\t$update = \"UPDATE users SET active = 1 WHERE id = '\".$id.\"'\";\n\t\t\t$result = $this->processSql($update);\n\t\t\tif ($result)\n\t\t\treturn 99;\n\t\t\treturn 1;\n\t\t} else return 2;\n\t}",
"public function suspend($id)\n {\n if(!is_numeric($id))\n {\n // @codeCoverageIgnoreStart\n return \\App::abort(404);\n // @codeCoverageIgnoreEnd\n }\n\n // Form Processing\n $result = $this->adminsuspendUserForm->suspend( Input::all() );\n\n if( $result['success'] )\n {\n // Success!\n Session::flash('success', $result['message']);\n return Redirect::to('admin/users');\n\n } else {\n Session::flash('error', $result['message']);\n return Redirect::action('UseradminController@suspend', array($id))\n ->withInput()\n ->withErrors( $this->adminsuspendUserForm->errors() );\n }\n }",
"public function suspend(User $user)\n {\n $user->suspended = ! $user->suspended;\n $user->save();\n $action = $user->suspended ? 'suspended' : 'restored';\n\n return redirect()->route('backend.corporate.users.index')\n ->with('success', \"User $action successfully.\");\n }",
"function suspendUser($username, $email, $recovery){\n\t$con = new mysqli('localhost','heng','@powell135','200ok');\n\tif ($con -> connect_errno){\n \treturn CONNECTION_FAIL;\n\t}\n\t\n\t$query = \"UPDATE jnjn_user SET suspended='1', recovery='$recovery' WHERE username='$username' and email='$email'\";\n\t$con -> query($query);\n\tif($con -> affected_rows == 1)\n\t\treturn SUCCESS;\n\telse\n\t\treturn FAIL;\n}",
"function check_suspension($user_id) {\n\t\t$user = get_user_by('ID', $user_id);\n\t\tupdate_user_meta($user_id, 'suspended', $_POST['suspend']);\n\t}",
"public function suspendUser($user_id)\n\t{\n\t\tif($this->getUserStatusId($user_id) === 1)\n\t\t{\n\t\t\t$this->where('id', '=', $user_id)->update(['user_status' => 2]);\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public function setStatusSuspend($v)\n {\n if ($v !== null) {\n $v = (int) $v;\n }\n\n if ($this->status_suspend !== $v) {\n $this->status_suspend = $v;\n $this->modifiedColumns[AliMemberTableMap::COL_STATUS_SUSPEND] = true;\n }\n\n return $this;\n }",
"public function suspend($id) {\n\t\treturn $this->updateUser(array('suspended' => true));\n\t}",
"public function suspend(UserModel $user)\n {\n LarabarLogger::info(\"-> SuspendUserBusinessService::suspend (\" .\n $user->getId() . \")\");\n try {\n\n // create new SuspendUserDataAccessService\n $conn = DatabaseAccess::connect();\n $service = new SuspendUserDataAccessService($conn);\n\n // check for existing suspension\n if ($service->checkSuspended($user))\n return FALSE;\n\n // return success of suspension\n return $service->suspend($user);\n } catch (Exception $e) {\n LarabarLogger::error(\"SuspendUserBusinessService::suspend error: \" .\n $e->getMessage());\n return FALSE;\n }\n }",
"abstract protected function doSuspend();",
"function suspendUsers($getSelectedUser, $addedOn, $username)\n{\n require('../core/db2.php');\n\n $sql = \"UPDATE users SET \n registration_status = 'Pending',\n approved_by = '$username',\n approved_on = '$addedOn'\n WHERE username = '$getSelectedUser'\";\n if ($con->query($sql) === true) {\n echo \"\";\n } else {\n // echo \"Error: \" . $sql . \"<br>\" . $con->error;\n echo \"Error\";\n }\n}",
"public function suspendUser($username)\n {\n $conn = new DBConnect();\n $dbObj = $conn->getDBConnect();\n $this->DAO = new SecurityDAO($dbObj);\n return $this->DAO->suspendUser($username);\n }",
"public function onToggleSuspension(Request $request)\n {\n $this->logger->info(\"\\Entering \" . substr(strrchr(__METHOD__, \"\\\\\"), 1));\n\n // Sets a user equal to this method's getUserFromId method, using the request input\n $user = $this->getUserFromId($request->input('idToToggle'));\n\n // Creates an account business service\n $bs = new AccountBusinessService();\n \n // Calls the toggleSuspend bs method\n // flag is rows affected\n $flag = $bs->toggleSuspension($user);\n \n // If flag is 0, returns error page\n if ($flag == 0) {\n $this->logger->info(\"/Exiting \" . substr(strrchr(__METHOD__, \"\\\\\"), 1) . \" to error view. Flag: \" . $flag);\n $data = [\n 'process' => \"Toggle Suspend User\",\n 'back' => \"getAllUsers\"\n ];\n return view('error')->with($data);\n }\n\n // Returns this method's onGetAllUsers method\n $this->logger->info(\"/Exiting \" . substr(strrchr(__METHOD__, \"\\\\\"), 1) . \"with \" . $flag);\n return $this->onGetAllUsers();\n }",
"public function notifyAdminCompanySuspended(Users_Model_User $admin, Companies_Model_Company $company) {\r\n $templateVars = array(\r\n 'userName' => empty($admin->name) ? $admin->mail : $admin->name,\r\n 'companyLink' => \r\n $this->getView()->serverUrl() .\r\n $this->getView()->urlGenerator()->companyUrl($company),\r\n 'company' => $company\r\n );\r\n\r\n $this->getView()->assign($templateVars);\r\n $mailBody = $this->getView()->render('admin/company-suspended.phtml');\r\n\r\n $mailConfig = array(\r\n 'toMail' => $admin->mail,\r\n 'body' => $mailBody,\r\n 'fromText' => 'Revudio',\r\n 'subject' => 'Company Account Suspended');\r\n\r\n $mail = new Main_Mail_Smtp($mailConfig);\r\n $mail->send();\r\n }",
"public function unsuspendUser($user_id)\n\t{\n\t\tif($this->getUserStatusId($user_id) === 2)\n\t\t{\n\t\t\t$this->where('id', '=', $user_id)->update(['user_status' => 1]);\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"function qa_suspend_event_reports($suspend = true)\n{\n\tglobal $qa_event_reports_suspended;\n\n\t$qa_event_reports_suspended += ($suspend ? 1 : -1);\n}",
"private function __sendAdminDeactivatedEmail($adminUserData) {\n\t\t$adminUser = $adminUserData['User'];\n\t\t$email = $adminUser['email'];\n\t\t$templateData = array(\n\t\t\t'username' => $adminUser['username']\n\t\t);\n\n\t\t$Api = new ApiController();\n\t\t$Api->constructClasses();\n\t\t$templateId = EmailTemplateComponent::ADMIN_DEACTIVATED_EMAIL_TEMPLATE;\n\t\t$Api->sendHTMLMail($templateId, $templateData, $email);\n\t}",
"public function suspensionStatus($user)\n {\n $conn = DatabaseAccess::connect();\n $service = new SuspendUserDataAccessService($conn);\n return $service->checkSuspended($user);\n }",
"public function Suspend( Array $idArray )\n {\n\t\t\t$dataArray = array(\n \"idArray\"=>$idArray\n );\n \n $response = ServiceAPIUtils::CallAPIService( $dataArray,\"/User/Suspend/123\", \"json\" );\n \n return $response;\n }",
"function admin_disable($id = null) {\n\n\t\t$user = $this->User->read(null, $id);\n\n\t\t/**\n\t\t * Read the \"Status\" component for more informations.\n\t\t * Dir : controllers/components/status.php\n\t\t */\n\t\tif (!empty($user)) {\n\n\t\t\t$user['User']['status'] = 1;\n\n\t\t\t/**\n\t\t\t * Change the user status.\n\t\t\t * Redirect the administrator to index page.\n\t\t\t */\n\t\t\tif ($this->User->save($user)) {\n\t\t\t\t$this->Session->setFlash(__d('core', 'The user has been disabled.', true));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t}\n\t\t}\n\n\t}",
"public function onResetPassword(AdminEvent $event)\n {\n $user = $event->{AdminEvent::ENTITY};\n $password = $event->{AdminEvent::PASSWORD};\n $this->mailUser(\n $user->getEmail(),\n $user->getRealname(),\n $this->_(self::EMAIL_RESET_SUBJECT),\n $this->_(self::EMAIL_RESET_BODY,[\n \"username\"=>$user->getUsername(),\n \"password\"=>$password\n ])\n );\n return;\n }",
"protected function isAdminUser() {}",
"private function __sendAdminActivatedEmail($adminUserData) {\n\t\t$adminUser = $adminUserData['User'];\n\t\t$email = $adminUser['email'];\n\t\t$templateData = array(\n\t\t\t'username' => $adminUser['username']\n\t\t);\n\n\t\t$Api = new ApiController();\n\t\t$Api->constructClasses();\n\t\t$templateId = EmailTemplateComponent::ADMIN_ACTIVATED_EMAIL_TEMPLATE;\n\t\t$Api->sendHTMLMail($templateId, $templateData, $email);\n\t}",
"public static function admin_user_block(Request $request, $id = null, $status = null) {\n try {\n $user = User::findorfail($id);\n\n if ($status == 1) {\n\n if ($user->status == 'block')\n return Redirect::back()->withErrors(__('admin_user.user_a_block'))->withInput();\n\n DB::Table('users')->where('id', $user->id)->update(array(\n 'status' => 'block',\n 'updated_at' => new \\DateTime\n ));\n\n return Redirect::back()->with('status', __('admin_user.user_block'));\n }\n else {\n if ($user->status == 'active')\n return Redirect::back()->withErrors(__('admin_user.user_a_unblock'))->withInput();\n\n DB::Table('users')->where('id', $user->id)->update(array(\n 'status' => 'active',\n 'updated_at' => new \\DateTime\n ));\n\n return Redirect::back()->with('status', __('admin_user.user_unblock'));\n }\n } catch (\\Exception $e) {\n return Redirect::back()->witherrors($e->getMessage())->withInput();\n }\n }",
"public function changeAdminUserPassword() {\n\t\t$data = $this->request->data['User'];\n\n\t\t$this->User->id = $userId = $data['id'];\n\t\tif ($this->User->saveField('password', $data['new_password'])) {\n\t\t\t$isPasswordChanged = ($data['current_password'] !== $data['new_password']) ? true : false;\n\t\t\tif ($isPasswordChanged && ($userId !== $this->Auth->User('id'))) {\n\t\t\t\t$this->__sendPasswordChangedEmail($data);\n\t\t\t}\n\t\t\t$this->Session->setFlash(__('Password changed successfully.'), 'success');\n\t\t} else {\n\t\t\t$this->Session->setFlash(__('Could not change the password due a server problem, try again later.'), 'error');\n\t\t}\n\n\t\t$this->redirect('/admin/users/editAdmin/' . $userId);\n\t}",
"public function toggleUserAdminStatus($uid)\n {\n $udata = $this->getUserById((int)$uid);\n $up = ($udata[0]->admin == 1) ?\n array('admin' => null) : array('admin' => '1');\n $this->updateUserinfo($uid, $up);\n }",
"public function adminUserConditionMatchesAdminUser() {}"
]
| [
"0.6922233",
"0.6681482",
"0.6630469",
"0.65889746",
"0.64379996",
"0.63799727",
"0.6273933",
"0.62619567",
"0.6259323",
"0.61608636",
"0.6151945",
"0.6097674",
"0.6021083",
"0.59933406",
"0.59037346",
"0.587682",
"0.5868132",
"0.5859588",
"0.57343274",
"0.5627123",
"0.56263393",
"0.5622966",
"0.55327976",
"0.5527826",
"0.55254847",
"0.55142134",
"0.54940593",
"0.54890996",
"0.54548466",
"0.5453845"
]
| 0.723834 | 0 |
This method adminUnsuspendUser is used to unsuspend user by the Admin | public function adminUnsuspendUser($id)
{
$sql = "SELECT id,active FROM users WHERE id = '".$id."'";
$res = $this->processSql($sql);
if ($res){
$update = "UPDATE users SET active = 1 WHERE id = '".$id."'";
$result = $this->processSql($update);
if ($result)
return 99;
return 1;
} else return 2;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function unsuspendUser($user_id)\n\t{\n\t\tif($this->getUserStatusId($user_id) === 2)\n\t\t{\n\t\t\t$this->where('id', '=', $user_id)->update(['user_status' => 1]);\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public function unsuspendUser($username)\n {\n $conn = new DBConnect();\n $dbObj = $conn->getDBConnect();\n $this->DAO = new SecurityDAO($dbObj);\n return $this->DAO->unsuspendUser($username);\n }",
"private function __sendAdminDeactivatedEmail($adminUserData) {\n\t\t$adminUser = $adminUserData['User'];\n\t\t$email = $adminUser['email'];\n\t\t$templateData = array(\n\t\t\t'username' => $adminUser['username']\n\t\t);\n\n\t\t$Api = new ApiController();\n\t\t$Api->constructClasses();\n\t\t$templateId = EmailTemplateComponent::ADMIN_DEACTIVATED_EMAIL_TEMPLATE;\n\t\t$Api->sendHTMLMail($templateId, $templateData, $email);\n\t}",
"function _deactivate_user() {\n\t\t$sql=\"SELECT GROUP_CONCAT(id_user) as id FROM \".TABLE_PREFIX.\"user WHERE DATEDIFF(current_date(),last_login) = \".$this->_input['day'].\" AND id_admin <> 1 \";\n\t\t$ids= getsingleindexrow($sql);\n\t\tif($this->_input['day'] && $this->_input[\"flag\"] == 1){\n\t\t if($ids['id']!=\"\"){\n\t\t\t $arr['user_status']=0;\n\t\t\t $this->obj_user->update_this(\"user\",$arr,\"id_user IN (\".$ids['id'].\")\");\n\t\t\t $this->obj_user->update_this(\"meme\",$arr,\"id_user IN (\".$ids['id'].\")\");\n\t\t\t $this->obj_user->update_this(\"reply\",$arr,\"id_user IN (\".$ids['id'].\")\");\n\t\t\t $this->obj_user->update_this(\"caption\",$arr,\"id_user IN (\".$ids['id'].\")\");\n\t\t\t print \"Succesfully Done\";\n\t\t }else{\n\t\t\t print \"No user found\";\n\t\t\t exit;\n\t\t }\n\t\t }else{\n\t\t if($ids['id']!=\"\"){\n\t\t\t $arr=explode(\",\", $ids['id']);\n\t\t\t for($x=0;$x<count($arr);$x++){\n\t\t\t $del=$this->unlink_files($arr[$x]);\n\t\t\t }\n\t\t\t $this->obj_user->deleteuser($ids['id']);\n\t\t }\n\t\t}\n\t}",
"public function suspend_user(User $user){\n //If the user is active suspend them if not reinstate them\n if ($user->active == 1) {\n $user->active = 0;\n $user->save();\n session()->flash('status', $user->username . ' was successfully suspended');\n return redirect()->back();\n }\n $user->active = 1;\n $user->save();\n session()->flash('status', $user->username . ' was successfully reinstated');\n return redirect()->back();\n }",
"function unsuspend($office, $sale_id)\n {\n // $sale_id = $this->input->post('suspended_sale_id');\n $this->sale_lib->clear_all();\n $this->sale_ticket_lib->copy_entire_sale($sale_id, strtolower(get_class()));\n $this->sale_lib->set_suspended_sale_id($sale_id);\n $this->_reload(array(), false);\n }",
"public function adminSuspendUser($id)\n\t{\n\t\t$sql = \"SELECT id,active FROM users WHERE id = '\".$id.\"'\";\n\t\t$res = $this->processSql($sql);\n\t\tif ($res){\n\t\t\t$update = \"UPDATE users SET active = 2 WHERE id = '\".$id.\"'\";\n\t\t\t$result = $this->processSql($update);\n\t\t\tif ($result)\n\t\t\treturn 99;\n\t\t\treturn 1;\n\t\t} else return 2;\n\t}",
"function admin_logout() {\n\t\t\n\t\t$this->Member->create();\n\t\t$db = $this->Member->getDataSource();\n\t\t$data['Member']['login_status'] = $db->expression(\"NOW()\");\n\t\t$data['Member']['id'] = $this->Session->read('Admin.id');\n\t\t$this->Member->save($data);\n\t\t\n\t\t$this->Session->delete('Admin.id');\n\t\t$this->Session->delete('Admin.email');\n\t\t$this->Session->delete('Admin.loginStatus');\n\t\t$this->Session->delete('Admin.group_id');\n\t\t$this->redirect(array(\n\t\t\t'action' => 'login',\n\t\t\t'admin' => true\n\t\t));\n\t}",
"public function logAdminOff()\n {\n //session must be started before anything\n session_start ();\n\n // Add the session name user_id to a variable $id\n $id = $_SESSION['user_id'];\n\n //if we have a valid session\n if ( $_SESSION['logged_in'] == TRUE )\n {\n $lastActive = date(\"l, M j, Y, g:i a\");\n $online= 'OFF';\n $sql = \"SELECT id,online, last_active FROM users WHERE id = '\".$id.\"'\";\n $res = $this->processSql($sql);\n if ($res){\n $update = \"UPDATE users SET online ='\".$online.\"', last_active ='\".$lastActive.\"' WHERE id = '\".$id.\"'\";\n $result = $this->processSql($update);\n }\n //unset the sessions (all of them - array given)\n unset ( $_SESSION );\n //destroy what's left\n session_destroy ();\n\n header(\"Location: \".APP_PATH.\"admin_login\");\n }\n\n\n \t\t//It is safest to set the cookies with a date that has already expired.\n \t\tif ( isset ( $_COOKIE['cookie_id'] ) && isset ( $_COOKIE['authenticate'] ) ) {\n \t\t\t/**\n \t\t\t\t* uncomment the following line if you wish to remove all cookies\n \t\t\t\t* (don't forget to comment or delete the following 2 lines if you decide to use clear_cookies)\n \t\t\t*/\n \t\t\t//clear_cookies ();\n \t\t\tsetcookie ( \"cookie_id\", '', time() - 3600);\n \t\t\tsetcookie ( \"authenticate\", '', time() - 3600 );\n \t\t}\n\n \t}",
"public function resetAdminUserPwdAction()\n\t{\n\t // \t $return = $user->resetPassword('admin');\n\t // \t var_export($return);\n\t // \t echo PHP_EOL;\n\t // \t echo $return['password'];\n\t // \t return false;\n\t}",
"function admin_logout() {\n\t\t$this->Member->create();\n\t\t$db = $this->Member->getDataSource();\n\t\t$data['Member']['login_status'] = $db->expression(\"NOW()\");\n\t\t$data['Member']['id'] = $this->Session->read('Admin.id');\n\t\t$this->Member->save($data);\n\t\t\n\t\t$this->Session->delete('Admin.id');\n\t\t$this->Session->delete('Admin.email');\n\t\t$this->Session->delete('Admin.loginStatus');\n\t\t$this->Session->delete('Admin.group_id');\n\t\t$this->redirect(array(\n\t\t\t'action' => 'login',\n\t\t\t'admin' => true\n\t\t));\n\t}",
"public function removeUserAdminPermissions ( Request $request )\n {\n \n $id = $request['id'];\n $user = User::find( $id );\n\n if( $user->id == \\Auth::user()->id )\n {\n return(\n back()\n ->with( [ 'flash_error' => 'You cannot update your own admin access.' ] )\n );\n }\n\n $user->is_admin = false;\n $user->save();\n\n return(\n back()\n ->with( [ 'flash_success' => 'You have successfully removed this users admin access.' ] )\n );\n \n }",
"function AdminUsers_uninstall()\n\t{\n\t}",
"function revoke_super_admin($user_id)\n {\n }",
"public function logoutFromAdmin()\n {\n $this->getHelperWait()->waitForElementPresent('//a[@class=\"link-logout\"]');\n $this->getHelperCommon()->click($this->getLogoutLinkXpath());\n }",
"public function logoutFromAdmin()\n {\n $this->getHelperWait()->waitForElementPresent('//a[@class=\"link-logout\"]');\n $this->getHelperCommon()->click($this->getLogoutLinkXpath());\n }",
"public function uninstall() {\n\t\t$this->load->model( 'user/user_group' );\n\t\t// access - modify pavomenu edit\n\t\t$this->model_user_user_group->removePermission( $this->user->getId(), 'access', 'extension/module/pavomenu/menu' );\n\t\t$this->model_user_user_group->removePermission( $this->user->getId(), 'modify', 'extension/module/pavomenu/menu' );\n\t\t// END REMOVE USER PERMISSION\n\t}",
"public function adminLogout(){\n unset($_SESSION['adminID']);\n unset($_SESSION['AdminType']);\n unset($_SESSION['adminEmail']);\n header('location:' . URLROOT . '/admins/loginAdmin');\n }",
"public function admin_logout() {\n $newdata = array(\n 'last_logout_date' => date(\"Y-m-d H:i:s\")\n );\n $collection = SUBADMIN;\n if ($this->session->userdata(APP_NAME.'_session_admin_name') == $this->config->item('admin_name')) {\n $collection = ADMIN;\n }\n $condition = array('admin_id' => $this->checkLogin('A'));\n $this->admin_model->update_details($collection, $newdata, $condition);\n $admindata = array(\n APP_NAME.'_session_admin_id' => '',\n APP_NAME.'_session_admin_name' => '',\n APP_NAME.'_session_admin_email' => '',\n APP_NAME.'_session_admin_mode' => '',\n APP_NAME.'_session_admin_privileges' => ''\n );\n $this->session->unset_userdata($admindata);\n $this->setErrorMessage('success', 'Successfully logout from your account','admin_adminlogin_logout_account');\n redirect(ADMIN_ENC_URL);\n }",
"public function unblockUser($id)\n {\n $this->db->set('status_id', '0');\n $this->db->where('id', $id);\n $this->db->update('inm_user');\n return true;\n }",
"public function deactivateAdmin($id) {\n\t\t$this->__allowSuperAdminOnly();\n\t\t$adminUserData = $this->User->findById($id);\n\t\tif (!empty($adminUserData)) {\n\t\t\t$success = $this->User->blockUser($id);\n\t\t\tif ($success === true) {\n\t\t\t\t$this->__sendAdminDeactivatedEmail($adminUserData);\n\t\t\t\t$adminUsername = $adminUserData['User']['username'];\n\t\t\t\t$message = __('Successfully deactivated the user \"%s\".', $adminUsername);\n\t\t\t\t$this->Session->setFlash($message, 'success');\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Failed to deactivate the admin user.'), 'error');\n\t\t\t}\n\t\t} else {\n\t\t\t$this->Session->setFlash(__('No admin with id: %d.', $id), 'error');\n\t\t}\n\t\t$this->redirect('admins');\n\t}",
"public function suspendUser(Request $request)\n {\n try {\n $this->logger->info(\"Entering AdminController.suspendUser()\");\n // Takes the user's id\n $id = $request->input('ID');\n // Calls the business service\n $service = new UserBusinessService();\n // suspends the user\n $service->suspendUser($id);\n // redirects to the admin page\n $this->logger->info(\"Exiting AdminController.suspendUser()\");\n return redirect(\"/admin\");\n }\n \n catch (Exception $e){\n //Best practice: catch all exceptions, log the exception, and display the common error page (or use global exception handling\n //log the exception and display exception view\n $this->logger->error(\"Exception: \", array(\"message\" => $e->getMessage()));\n $data = ['errorMSG' => $e->getMessage()];\n return view('exception')->with($data);\n }\n }",
"public function suspend_user(){\n\t\t\t\n\t\t\t//escaping the post values\n\t\t\t$uid = html_escape($this->input->post('userID'));\n\t\t\t$id = preg_replace('#[^0-9]#i', '', $uid); // filter everything but numbers\n\n\t\t\t$detail = $this->db->select('*')->from('users')->where('id',$id)->get()->row();\n\t\t\t\n\t\t\tif($detail){\n\n\t\t\t\t\t//$data['id'] = $detail->id;\n\t\t\t\t\t$update = array(\n\t\t\t\t\t\t'status' => '1',\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\tif($this->Users->update_user($update, $id)){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$data['success'] = true;\n\t\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\">×</button> User has been suspended!</div>';\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$data['success'] = false;\n\t\t\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\">×</button> Method error</div>';\n\t\t\t\t\t}\n\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\">×</button> No such user!</div>';\n\t\t\t}\n\t\t\techo json_encode($data);\n\t\t}",
"public function logoutAdmin() {\n //start session\t\t\n $admin_name = $this->session->userdata('admin_name');\n\n //if logout success then destroy session and unset session variables\n $this->session->unset_userdata(array('admin_name'));\n $this->session->sess_destroy();\n redirect('admin_login');\n }",
"function admin_logout() {\r\n\r\n $this->Session->delete(md5(SITE_TITLE) . 'USERID');\r\n $this->Session->delete(md5(SITE_TITLE) . 'USERNAME');\r\n $this->Session->delete(md5(SITE_TITLE) . 'USEREMAIL');\r\n $this->Session->delete(md5(SITE_TITLE) . 'USERTYPE');\r\n $this->redirect(DEFAULT_ADMINURL);\r\n }",
"public function unblockUser($id)\n {\n $this->db->set('status_id', '0');\n $this->db->where('id', $id);\n $this->db->update('temp_user');\n return true;\n }",
"public function testAdministrativeUserRevokingAdminStatus()\n {\n $user = factory(User::class)->make(['root_admin' => true]);\n $service = $this->getService();\n $service->setUserLevel(User::USER_LEVEL_ADMIN);\n\n $this->repository->shouldReceive('update')->with($user->id, ['root_admin' => false])->once()->andReturnNull();\n\n $response = $service->handle($user, ['root_admin' => false]);\n $this->assertInstanceOf(Collection::class, $response);\n $this->assertTrue($response->has('model'));\n $this->assertTrue($response->has('exceptions'));\n }",
"public function unimpersonateUser()\n {\n $realId = $this->session->remove('__realId');\n if ($realId !== null) {\n $this->user->identity->remove();\n $this->session->set($this->user->idParam, $realId);\n $identity = User::findOne($realId);\n $this->user->setIdentity($identity);\n $this->restoreBackedUpToken();\n }\n }",
"function suspendUser($username, $email, $recovery){\n\t$con = new mysqli('localhost','heng','@powell135','200ok');\n\tif ($con -> connect_errno){\n \treturn CONNECTION_FAIL;\n\t}\n\t\n\t$query = \"UPDATE jnjn_user SET suspended='1', recovery='$recovery' WHERE username='$username' and email='$email'\";\n\t$con -> query($query);\n\tif($con -> affected_rows == 1)\n\t\treturn SUCCESS;\n\telse\n\t\treturn FAIL;\n}",
"function clearAdminSession()\n\t {\n\t \n\t \t$array_items = array ('admin_id','email','admin_logged_in','admin_type','admin_role_id','admin_info');\n\t $this->session->unset_userdata($array_items);\n\t\t\n\t }"
]
| [
"0.6534979",
"0.6343875",
"0.6299367",
"0.6223075",
"0.6145516",
"0.61081266",
"0.6107037",
"0.5993959",
"0.59900695",
"0.5989623",
"0.5984633",
"0.5933161",
"0.5931366",
"0.5928358",
"0.5899688",
"0.5899688",
"0.5890018",
"0.5876326",
"0.5866735",
"0.5854037",
"0.5842",
"0.58375114",
"0.5805202",
"0.57980853",
"0.57483256",
"0.57306796",
"0.5703968",
"0.5695214",
"0.56879866",
"0.5670837"
]
| 0.7243841 | 0 |
This method adminShowUserStatus is used to display the active status of the user in the Admin Panel | public function adminShowUserActiveStatus($id)
{
$sql = "SELECT id,active FROM users WHERE id = '".$id."'";
$row = $this->fetchOne($sql);
if($row['active'] == 0){$active = "<em><span style='color:#f40000;'>Not Confirmed</span></em>";}
if($row['active'] == 1){$active = "<em><span style='color:#008040;'>Active</span></em>";}
if($row['active'] == 2){$active = "<em><span style='color:#DB7093;'>Suspended</span></em>";}
return $active;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(User_status $userstatus)\n {\n //\n }",
"public function getStatus() \n {\n if ($this->status) \n {\n \techo 'user status : присутствует<br><br><br>';\n }\n else\n {\n \techo 'user status : отсутствует<br><br><br>';\t\n }\n }",
"function um_online_show_user_status( $args ) {\n\t\tif ( $this->is_hidden_status( um_profile_id() ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tUM()->Online()->enqueue_scripts();\n\n\t\t$args['is_online'] = UM()->Online()->is_online( um_profile_id() );\n\n\t\tob_start();\n\n\t\tUM()->get_template( 'online-marker.php', um_online_plugin, $args, true );\n\n\t\tob_end_flush();\n\t}",
"public function display_user_status($status){\n\t\tif($status == '0'){\n\t\t\t$st = 'Active';\n\t\t}elseif($status == '1'){\t\n\t \t\t$st = 'Inactive';\n\t\t}\n\t\treturn $st;\n\t}",
"public function adminShowUserOnlineStatus($id)\n\t{\n\t\t$sql = \"SELECT id,online FROM users WHERE id = '\".$id.\"'\";\n\t\t$row = $this->fetchOne($sql);\n if($row['online'] == \"ON\"){$online = \"<span style='color:#008040;'>Online</span>\";}\n\t\tif($row['online'] == \"OFF\" || $row['online'] == \"0\"){$online = \"<span style='color:#B2BEB5;'>Offline</span>\";}\n return $online;\n\n\t}",
"public function index() {\n\n $uid = $this->session->userdata('uid');\n $data['poweruser'] = $this->Userauth->powerUser($uid);\n\n /* * * end check user status ** */\n\n $this->load->model('Users');\n\n $this->load->view('home/adminhome', $data);\n }",
"function isAdminUser($userstatus) {\n\t\tif ($userstatus == 'Y') {\t\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"function showUsersStatus($user){\n\t if (sizeof($this->members) == 1){\n\t $table = '<h4 class=\"text-warning\">\n No other members here...</h4>';\n\t } else {\n\t $table = '<table class=\"table table-striped table-hover\">\n\t\t\t\t<tHead>\n\t\t\t\t<tr>\n\t\t\t\t<th>Name</th><th>Status</th><th>Level</th>\n\t\t\t\t</tr>\n\t\t\t\t</tHead>\n\t\t\t\t<tBody>';\n\t foreach ($this->members as $member){\n\t if($member->getUserID() != $user->getUserID()){\n\t $table .= $member->getUserStatusAsRow();\n\t }\n\t }\n\t $table .= '\n\t\t\t\t</tBody></table>';\n\t }\n\t\t\n\t\treturn $table;\n\t}",
"public function admin_user_list() {\n $this->paginate = array(\n 'limit' => 10,\n 'order' => array('User.created' => 'desc' ),\n 'conditions' => array('User.status' => 1),\n );\n $data = $this->paginate('User');\n $this->set('user', $data);\n $this->render('/Users/user_list');\n }",
"public function show($status)\n {\n $limit =env('limt');\n $expload= explode('-', $status);\n $array = ['id','created_at'];\n\n if (in_array($expload[0], $array)) {\n $users= User::orderBy($expload[0],$expload[1])\n ->paginate($limit);\n }else{\n $users= User::where('admin',$status)\n ->paginate($limit);\n }\n\n return view('admin.users.all',compact('users'));\n\n\n }",
"public function getUserAdmin()\n {\n if ($this->user->isOnline()) {\n return '<div class=\"user-block\">\n\t\t\t\t\t<img class=\"img-circle\" src=\"' . $this->user->avatar_square_tiny . '\" alt=\"User Image\">\n\t\t\t\t\t<span class=\"username\"><a href=\"' . $this->user->url .'\" target=\"_blank\">' . $this->user->name . '</a></span>\n\t\t\t\t\t<span class=\"description\"><i class=\"fa fa-circle text-success\"></i> Online</span>\n\t\t\t\t</div>';\n } else {\n return '<div class=\"user-block\">\n\t\t\t\t\t\t<img class=\"img-circle\" src=\"' . $this->user->avatar_square_tiny . '\" alt=\"User Image\">\n\t\t\t\t\t\t<span class=\"username\"><a href=\"' . $this->user->url .'\" target=\"_blank\">' . $this->user->name . '</a></span>\n\t\t\t\t\t\t<span class=\"description\"><i class=\"fa fa-circle text-danger\"></i> Offline</span>\n\t\t\t\t\t</div>';\n }\n }",
"function admin_enable($id = null) {\n\n\t\t$user = $this->User->read(null, $id);\n\n\t\t/**\n\t\t * Read the \"Status\" component for more informations.\n\t\t * Dir : controllers/components/status.php\n\t\t */\n\t\tif (!empty($user)) {\n\n\t\t\t$user['User']['status'] = 0;\n\n\t\t\t/**\n\t\t\t * Change the user status.\n\t\t\t * Redirect the administrator to index page.\n\t\t\t */\n\t\t\tif ($this->User->save($user)) {\n\t\t\t\t$this->Session->setFlash(__d('core', 'The user has been enabled.', true));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t}\n\t\t}\n\n\t}",
"public function update_user_status(){\n\tif($this->session->userdata('logged_in')){\n\t\t//cleanup old logins\n\t\t$this->um_users_model->cleanup_expired_logins();\n\t\t//report the current status\n\t\t$session_data= $this->session->userdata('logged_in');\n\t\t$dbdata=array(\n\t\t\t'loggedusername'=>$session_data['username'],\n\t\t\t'ip'=>$this->session->userdata('ip_address'),\n\t\t\t'lastactivity'=>time(),\n\t\t\t'useragent'=>$this->session->userdata('user_agent'),\n\t\t\t'online'=>$this->um_users_model->get_user_online_setting($session_data['username'])\n\t\t);\n\t\t\n\t\tif($this->um_users_model->is_user_logged_in($session_data['username'])){\n\t\t\t$this->um_users_model->update_user_logged_in($session_data['username'],$dbdata);\n\t\t}else{\n\t\t\t$this->um_users_model->register_user_as_logged_in($dbdata);\n\t\t}\n\t\n\t}\n\t}",
"public function adminControl()\n {\n $row = $this->currentUserData();\n if(isset($_SESSION['sess_user_type']) &&\n $_SESSION['sess_user_type'] == 'admin' && $row['user_type'] == 'admin'){\n return true;\n }\n }",
"public function getStatusAdmin()\n {\n switch ($this->status) {\n case 0:\n return '<span class=\"label label-danger\">Open</span>';\n case 1:\n return '<span class=\"label label-success\">Closed</span>';\n }\n }",
"public static function adminLoggedIn(){\n //Hvis en bruker ikke er logget inn eller han ikke er admin, vil han bli sent til login.php\n if (!isset($_SESSION['user']) || !$_SESSION['user']->isAdmin()) {\n //Lagrer siden brukeren er på nå slik at han kan bli redirigert hit etter han har logget inn\n $alert = new Alert(Alert::ERROR, \"Du er nødt til å være administrator for å se den siden. Du er ikke administrator.\");\n $alert->displayOnIndex();\n\n }\n }",
"public function index()\n {\n $users = AdminUser::with(['role','office_location'])->where('role_id','!=',$this->customer_role_id)->where('id','!=',$this->superadmin_id)->where('status','=',1)->get();\n $status = [\"1\"=>\"Active\",\"0\"=>'Inactive'];\n return view('admin.adminusers.index',compact('users','status'));\n }",
"public function active_userstatus($id)\n {\n \n $query = new Query;\n\n $result = $query->createCommand()->update('core_users', ['user_status' => '2'], 'user_id = \"'.$id.'\"')->execute();\n\n if ($result == 1){\n return \"SUCCESS\";\n }else{\n return \"FAILED\";\n }\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 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 }",
"function visible_to_admin_user()\n\t{\n\t\treturn true;\n\t}",
"function um_online_show_status( $value, $data ) {\n\t\tif ( $this->is_hidden_status( um_user('ID') ) ) {\n\t\t\treturn $value;\n\t\t}\n\n\t\tUM()->Online()->enqueue_scripts();\n\n\t\t$args['is_online'] = UM()->Online()->is_online( um_user('ID') );\n\n\t\tob_start();\n\n\t\tUM()->get_template( 'online-text.php', um_online_plugin, $args, true );\n\n\t\t$output = ob_get_clean();\n\t\treturn $output;\n\t}",
"public function showUsersMainPanel()\n\t{\n $user = \\Auth::user();\n $users \t\t\t = User::all();\n $total_users \t = \\DB::table('users')->count();\n\n $total_users_confirmed = \\DB::table('users')->count();\n $total_users_confirmed = \\DB::table('users')->where('active', '1')->count();\n $total_users_locked = \\DB::table('users')->where('resent', '>', 3)->count();\n\n $total_users_new = \\DB::table('users')->where('active', '0')->count();\n\n return view('admin.show-users', [\n 'user' \t\t\t => $user,\n 'users' => $users,\n 'total_users' => $total_users\n ]\n );\n }",
"public function setAdminStatus(Request $request, User $user)\n {\n $status = '';\n\n if ($request->isSuperAdmin) {\n $user->toggleRole(Role::getSuperAdminRole());\n $status = $user->is('superadmin') ? 'User is now a Super Administrator' : 'User is no longer a Super Administrator';\n } else {\n $user->toggleRole(Role::getAdminRole());\n $status = $user->is('admin') ? 'User is now an Administrator' : 'User is no longer an Administrator';\n }\n\n if ($request->ajax()) {\n return response()->json(['response' => $status]);\n }\n\n return back();\n }",
"public function show(AdminUser $adminUser)\n {\n //\n }",
"public function changeUserStatusAction()\n {\n $id = $this->_getParam('id');\n $guid = $this->_getParam('guid');\n $usersNs = new Zend_Session_Namespace(\"members\");\n if($usersNs->userId==$id)\n {\n $this->_flashMessenger->addMessage(array('error'=>'You cannot change your status!' ));\n $this->_helper->_redirector->gotoUrl($this->view->seoUrl('/security/user')); \n exit;\n } \n $this->view->user_id = $id;\n $model1 = new Security_Model_User();\n $model = $model1->fetchRow(\"id='{$id}' and row_guid='{$guid}'\");\n if(false===$model )\n {\n $this->_flashMessenger->addMessage(array('error'=>'Invalid request! Please try again.'));\n $this->_helper->_redirector->gotoUrl($this->view->seoUrl('/security/user')); \n }\n \n \n if($model->getStatus()==1)\n $model->setStatus (0);\n else\n $model->setStatus (1);\n \n if($model->save())\n {\n $this->_flashMessenger->addMessage(array('success'=>'Status changed for '.$model->getFirstName().' '.$model->getLastName().' [ ID : '.$model->getId().', Status : '.$model->getStatus().']'));\n $this->_helper->_redirector->gotoUrl($this->view->seoUrl('/security/user/index')); \n }\n else\n {\n $this->_flashMessenger->addMessage(array('error'=>'Failed to change the status for '.$model->getFirstName().' '.$model->getLastName().' [ ID : '.$model->getId().', Status : '.$model->getStatus().']'));\n $this->_helper->_redirector->gotoUrl($this->view->seoUrl('/security/user/index')); \n }\n \n }",
"public function activeAction()\n {\n $all = $this->users->query()\n ->where('active IS NOT NULL')\n ->andWhere('deleted is NULL')\n ->execute();\n \n $this->theme->setTitle(\"Users that are active\");\n $this->views->add('users/list-all', [\n 'users' => $all,\n 'title' => \"Users that are active\",\n ]);\n }",
"public static function checkUserStatus(){\n\n if (auth()->user()->is_status == '3') {\n $rul = 'profile/create';\n }elseif (auth()->user()->is_status=='2'){\n $service = self::checkService();\n if ($service==false){\n $rul = \"choose-service\";\n }else{\n $rul = self::dashboard($service);\n }\n }elseif (auth()->user()->is_status=='1'){\n $rul = 'profile done!';\n }elseif (auth()->user()->is_status==0){\n $rul = 'profile inactive!';\n }else{\n $rul = '/home';\n }\n return $rul;\n }",
"public function userActive(){\n if(isset($_GET['id'])&& isset($_GET['token'])){\n $md5_id=$_GET['id'];\n $user=$this->f_usersmodel->getFirstRowWhere('users',array('md5_id'=>$md5_id));\n if($user->token==$_GET['token']){\n $this->f_usersmodel->Update_where('users',array('id'=>$user->id),array('active'=>1));\n }\n $seo = array(\n 'title' => \"Kích hoạt tài khoản\"\n );\n $data = array();\n $this->LoadHeader(null,$seo,false);\n $this->load->view('users/success_active_user',$data);\n $this->LoadFooter();\n\n }else\n {redirect(base_url());}\n }",
"public function admin_index() {\n $this->paginate = array(\n 'limit' => 10,\n 'order' => array(\n 'User.username' => 'asc',\n ) ,\n 'conditions' => array(\n 'User.status' => 1,\n ),\n );\n $users = $this->paginate('User');\n $this->set(compact('users'));\n }"
]
| [
"0.72927225",
"0.7060739",
"0.6993221",
"0.6936649",
"0.6857118",
"0.6703886",
"0.66794753",
"0.66788554",
"0.6640974",
"0.657097",
"0.6564247",
"0.65639675",
"0.6480753",
"0.64790833",
"0.6469503",
"0.6459574",
"0.6426486",
"0.6425466",
"0.64028734",
"0.6401621",
"0.6397641",
"0.6382139",
"0.6347792",
"0.6337888",
"0.6322377",
"0.63183826",
"0.62979704",
"0.6291361",
"0.6275788",
"0.6255982"
]
| 0.73365635 | 0 |
This method adminShowUserOnlineStatus is used to display the online status of the user in the Admin Panel | public function adminShowUserOnlineStatus($id)
{
$sql = "SELECT id,online FROM users WHERE id = '".$id."'";
$row = $this->fetchOne($sql);
if($row['online'] == "ON"){$online = "<span style='color:#008040;'>Online</span>";}
if($row['online'] == "OFF" || $row['online'] == "0"){$online = "<span style='color:#B2BEB5;'>Offline</span>";}
return $online;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function um_online_show_user_status( $args ) {\n\t\tif ( $this->is_hidden_status( um_profile_id() ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tUM()->Online()->enqueue_scripts();\n\n\t\t$args['is_online'] = UM()->Online()->is_online( um_profile_id() );\n\n\t\tob_start();\n\n\t\tUM()->get_template( 'online-marker.php', um_online_plugin, $args, true );\n\n\t\tob_end_flush();\n\t}",
"public function ChangeUserOnlineStatus()\n {\n $output['token'] = $this->security->get_csrf_hash();\n header('Content-Type: application/json');\n $output['response'] = $this->database->ChangeUserOnlineStatus('online');\n exit(json_encode($output));\n }",
"function um_online_show_status( $value, $data ) {\n\t\tif ( $this->is_hidden_status( um_user('ID') ) ) {\n\t\t\treturn $value;\n\t\t}\n\n\t\tUM()->Online()->enqueue_scripts();\n\n\t\t$args['is_online'] = UM()->Online()->is_online( um_user('ID') );\n\n\t\tob_start();\n\n\t\tUM()->get_template( 'online-text.php', um_online_plugin, $args, true );\n\n\t\t$output = ob_get_clean();\n\t\treturn $output;\n\t}",
"public function OnlineStatus(){\n\t\t\t$result = $this->makeCallToAPI('OnlineStatus', true, null, array(\n\t\t\t\t'Online' => array('boolean'=>array()),\n\t\t\t\t'LoginEnabled' => array('boolean'=>array())\n\t\t\t));\n\t\t\treturn new WebUI\\OnlineStatus($result->Online, $result->LoginEnabled);\n\t\t}",
"function online_offline_status ($user_id, $forum_mod)\n{\n \tglobal $lang, $board_config, $userdata, $images, $phpbb_theme, $phpEx;\n\t$status['color'] = '';\n\tif ( $user_id['user_id'] != ANONYMOUS )\n\t{\n\t\tif ( $user_id['user_allow_viewonline'] && !$board_config['pnphpbb2_members_online'] )\n\t\t{\n\t\t\tif ( $user_id['user_session_time'] >= (time()-60) )\n\t \t \t{\n\t\t\t\t// Check admin/mod status\n\t\t\t\tif ( $user_id['user_level'] == ADMIN )\n\t\t\t\t{\n\t\t\t\t\t$status['image'] = ( $images['user_admin'] ) ? '<a href=\"' . append_sid(\"viewonline.$phpEx\") . '\"><img src=\"' . $images['user_admin'] . '\" alt=\"' . sprintf($lang['Admin_online_color'], '', '') . '\" title=\"' . sprintf($lang['Admin_online_color'], '', '') . '\" border=\"0\" hspace=\"3\" align=\"top\" /></a>' : '';\n\t\t\t\t\t$status['color'] = 'style=\"color:#' . $phpbb_theme['fontcolor3'] . '\"';\n\t\t\t\t}\n\t\t\t\telse if ( $forum_mod )\n\t\t\t\t{\n\t\t\t \t\t$status['image'] = ( $images['user_mod'] ) ? '<a href=\"' . append_sid(\"viewonline.$phpEx\") . '\"><img src=\"' . $images['user_mod'] . '\" alt=\"' . $lang['Moderator'] . '\" title=\"' . $lang['Moderator'] . '\" border=\"0\" hspace=\"3\" align=\"top\" /></a>' : '';\n\t\t\t\t\t$status['color'] = 'style=\"color:#' . $phpbb_theme['fontcolor2'] . '\"';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t$status['image'] = ( $images['user_online'] ) ? '<a href=\"' . append_sid(\"viewonline.$phpEx\") . '\"><img src=\"' . $images['user_online'] . '\" alt=\"' . $lang['Online'] . '\" title=\"' . $lang['Online'] . '\" border=\"0\" hspace=\"3\" align=\"top\" /></a>' : '';\n\t\t\t\t}\t\n\t\t\t\t$status['text'] = $lang['Status'] . '<b><a href=\"' . append_sid(\"viewonline.$phpEx\") . '\"' . $status['color'] . '>' . $lang['Online'] . '</a></b>';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n \t\t\t\t$status['text'] = $lang['Status'] . $lang['Offline'];\n\t\t\t\t$status['image'] = ( $images['user_offline'] ) ? '<img src=\"' . $images['user_offline'] . '\" alt=\"' . $lang['Offline'] . '\" title=\"' . $lang['Offline'] . '\" hspace=\"3\" align=\"top\" />' : '';\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\t$status['text'] = \"\";\n\t\t$status['image'] = \"\";\n\t}\n\t\n\treturn $status;\n}",
"public function updateUserOnline()\n {\n $this->is_online = 1;\n $this->save();\n }",
"public function changeonlinestatus()\r\n {\r\n \tif ($this->isPost()) {\r\n \t\t$userloginid = session('userloginid');\r\n \t\tif (empty($userloginid)) {\r\n \t\t\t$this->ajaxReturn(0,\"没有登录呢\",'wrong');\r\n \t\t} else {\r\n \t\t\t$onlineValue = (int)$_POST['val_online'];\r\n \t\t\t$IUserLogin = D(\"IUserLogin\");\r\n \t\t\tif ($onlineValue == 2) {\r\n \t\t\t\t$newOnlineData = array(\r\n\t\t \t\t\t'uid' => $userloginid,\r\n\t\t \t\t\t'online' => 1,\r\n \t\t\t\t);\r\n \t\t\t\t$IUserLogin->save($newOnlineData);\r\n \t\t\t\t$this->ajaxReturn(1,\"已经切换为正常在线状态\",'yes');\r\n \t\t\t} else {\r\n \t\t\t\t$newOnlineData = array(\r\n\t\t \t\t\t'uid' => $userloginid,\r\n\t\t \t\t\t'online' => 2,\r\n \t\t\t\t);\r\n \t\t\t\t$IUserLogin->save($newOnlineData);\r\n \t\t\t\t$this->ajaxReturn(2,\"已经切换为潜水状态\",'yes');\r\n \t\t\t}\r\n \t\t\t$this->ajaxReturn(0,\"处理错误\",'wrong');\r\n \t\t}\r\n \t}\r\n }",
"public function ShowDetail(){\n \n \n \n echo \"<div id='online'>Online : \" . $this->User_Online . \"</div>\";\n \n }",
"public function getOnlineStatus (Request $request) {\n\n \t$status = $this->profileRepo->getUserOnlineStatus($request->user_id);\n \t\n \tif($status) \n \t\treturn response()->json(['user_id' => $request->user_id, 'online' => '1']);\n \telse\n \treturn response()->json(['user_id' => $request->user_id, 'online' => '0']);\n }",
"public function setStatusOnline()\r\n {\r\n return $this->exec('status_online');\r\n }",
"public function onlineMember(){\n\t\t$result=$this->model->memberOnline();\n\t\techo $result;\n\t}",
"public function adminShowUserActiveStatus($id)\n\t{\n\t\t$sql = \"SELECT id,active FROM users WHERE id = '\".$id.\"'\";\n\t\t$row = $this->fetchOne($sql);\n if($row['active'] == 0){$active = \"<em><span style='color:#f40000;'>Not Confirmed</span></em>\";}\n\t\tif($row['active'] == 1){$active = \"<em><span style='color:#008040;'>Active</span></em>\";}\n\t\tif($row['active'] == 2){$active = \"<em><span style='color:#DB7093;'>Suspended</span></em>\";}\n return $active;\n\n\t}",
"public function setOnline($status) {\n\t\t$this->data['var isOnline'] = $status ? 'true' : 'false';\n\t}",
"public function getUserAdmin()\n {\n if ($this->user->isOnline()) {\n return '<div class=\"user-block\">\n\t\t\t\t\t<img class=\"img-circle\" src=\"' . $this->user->avatar_square_tiny . '\" alt=\"User Image\">\n\t\t\t\t\t<span class=\"username\"><a href=\"' . $this->user->url .'\" target=\"_blank\">' . $this->user->name . '</a></span>\n\t\t\t\t\t<span class=\"description\"><i class=\"fa fa-circle text-success\"></i> Online</span>\n\t\t\t\t</div>';\n } else {\n return '<div class=\"user-block\">\n\t\t\t\t\t\t<img class=\"img-circle\" src=\"' . $this->user->avatar_square_tiny . '\" alt=\"User Image\">\n\t\t\t\t\t\t<span class=\"username\"><a href=\"' . $this->user->url .'\" target=\"_blank\">' . $this->user->name . '</a></span>\n\t\t\t\t\t\t<span class=\"description\"><i class=\"fa fa-circle text-danger\"></i> Offline</span>\n\t\t\t\t\t</div>';\n }\n }",
"public static function adminLoggedIn(){\n //Hvis en bruker ikke er logget inn eller han ikke er admin, vil han bli sent til login.php\n if (!isset($_SESSION['user']) || !$_SESSION['user']->isAdmin()) {\n //Lagrer siden brukeren er på nå slik at han kan bli redirigert hit etter han har logget inn\n $alert = new Alert(Alert::ERROR, \"Du er nødt til å være administrator for å se den siden. Du er ikke administrator.\");\n $alert->displayOnIndex();\n\n }\n }",
"public function onlineStatus()\n\t {\t\n\t\tif($this->isOnline()){\n\t\t\treturn 'online';\n\t\t}\n\t\treturn 'offline';\n\t }",
"public function getUsersOnline()\r\n {\r\n $result = $this->getBitrixApi(array(\r\n 'FILTER' => array('IS_ONLINE' => 'Y',),\r\n ), 'user.get');\r\n\r\n if ($result) {\r\n if (isset($result['total']) && $result['total'] > 0) {\r\n return $result['result'];\r\n } else {\r\n return false;\r\n }\r\n } else {\r\n return false;\r\n }\r\n\r\n }",
"public function update_user_status(){\n\tif($this->session->userdata('logged_in')){\n\t\t//cleanup old logins\n\t\t$this->um_users_model->cleanup_expired_logins();\n\t\t//report the current status\n\t\t$session_data= $this->session->userdata('logged_in');\n\t\t$dbdata=array(\n\t\t\t'loggedusername'=>$session_data['username'],\n\t\t\t'ip'=>$this->session->userdata('ip_address'),\n\t\t\t'lastactivity'=>time(),\n\t\t\t'useragent'=>$this->session->userdata('user_agent'),\n\t\t\t'online'=>$this->um_users_model->get_user_online_setting($session_data['username'])\n\t\t);\n\t\t\n\t\tif($this->um_users_model->is_user_logged_in($session_data['username'])){\n\t\t\t$this->um_users_model->update_user_logged_in($session_data['username'],$dbdata);\n\t\t}else{\n\t\t\t$this->um_users_model->register_user_as_logged_in($dbdata);\n\t\t}\n\t\n\t}\n\t}",
"function admin_enable($id = null) {\n\n\t\t$user = $this->User->read(null, $id);\n\n\t\t/**\n\t\t * Read the \"Status\" component for more informations.\n\t\t * Dir : controllers/components/status.php\n\t\t */\n\t\tif (!empty($user)) {\n\n\t\t\t$user['User']['status'] = 0;\n\n\t\t\t/**\n\t\t\t * Change the user status.\n\t\t\t * Redirect the administrator to index page.\n\t\t\t */\n\t\t\tif ($this->User->save($user)) {\n\t\t\t\t$this->Session->setFlash(__d('core', 'The user has been enabled.', true));\n\t\t\t\t$this->redirect(array('action' => 'index'));\n\t\t\t}\n\t\t}\n\n\t}",
"function d4os_io_db_070_os_users_online_users_count() {\n d4os_io_db_070_set_active('os_robust');\n $now_online = db_result(db_query(\"SELECT COUNT(*) FROM {GridUser}\"\n . \" WHERE Online = 'true'\"\n . \" AND Login < (UNIX_TIMESTAMP(FROM_UNIXTIME(UNIX_TIMESTAMP(now()))))\"\n . \" AND Logout < (UNIX_TIMESTAMP(FROM_UNIXTIME(UNIX_TIMESTAMP(now()))))\"));\n d4os_io_db_070_set_active('default');\n return $now_online;\n}",
"public function index() {\n\n $uid = $this->session->userdata('uid');\n $data['poweruser'] = $this->Userauth->powerUser($uid);\n\n /* * * end check user status ** */\n\n $this->load->model('Users');\n\n $this->load->view('home/adminhome', $data);\n }",
"public function isOnline() {\n\t\tif ($this->lastActivityTime && $this->lastActivityTime > (TIME_NOW - USER_ONLINE_TIMEOUT) && (WCF::getUser()->userID == $this->userID || !$this->invisible || WCF::getUser()->getPermission('admin.general.canViewInvisible') || ($this->invisible == 2 && UserProfile::isBuddy($this->userID)))) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public static function updateWhoIsOnline()\n {\n $users = User::all();\n foreach($users as $u)\n {\n $lastPing = $u->last_ping;\n $twoMinAgo = Carbon::now()->subMinutes(2);\n $result = Carbon::createFromFormat('Y-m-d H:i:s', $lastPing);\n\n if($twoMinAgo->lt($result))\n {\n $u->is_online = 1;\n $u->save();\n }\n else\n {\n $u->is_online = 0;\n $u->save();\n }\n }\n }",
"public function setOnline($v)\n {\n if ($v !== null) {\n $v = (int) $v;\n }\n\n if ($this->online !== $v) {\n $this->online = $v;\n $this->modifiedColumns[AliMemberTableMap::COL_ONLINE] = true;\n }\n\n return $this;\n }",
"public function frontpage_online_box($users) {\n $online_box = \"<h4>Users online</h4>\n <div class='success' style='margin: 8px;'>\".$users.\"</div>\";\n return $online_box;\n }",
"function status() {\n\t\t//If the user id does not exist, then the admin level is 0\n\t\tif(!isset($_SESSION['language_server_rand_ID']) || !isset($_SESSION['language_server_' . $_SESSION['language_server_rand_ID']])) {\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\t//Because the id was hidden using a rand function, we should get the value into a more readable var\n\t\t$id = $_SESSION['language_server_' . $_SESSION['language_server_rand_ID']];\n\t\t$user = $_SESSION['language_server_user'];\n\t\t\n\t\t//If the mysql command fails at any point, then the admin level is 0\n\t\t$connection = new mysqli(IP, USER, PASSWORD, DATABASE);\n\t\tif ($connection->connect_errno)\n\t\t{\n\t\t\techo \"Cannot establish connection: (\" . $connection->errno . \") \" . $connection->error;\n\t\t\treturn 0;\n\t\t}\n\t\t$command = 'SELECT admin FROM accounts WHERE username = ? && account_id = ? LIMIT 0, 1;';\n\t\tif(!($stmt = $connection->prepare($command)))\n\t\t{\n\t\t\techo \"Prepare failed: (\" . $connection->errno . \") \" . $connection->error;\n\t\t\treturn 0;\n\t\t}\n\t\tif(!$stmt->bind_param('ss', $user, $id))\n\t\t{\n\t\t\techo \"Binding parameters failed: (\" . $stmt->errno . \") \" . $stmt->error;\n\t\t\treturn 0;\n\t\t}\n\t\telseif (!$stmt->execute())\n\t\t{\n\t\t\techo \"Execute failed: (\" . $stmt->errno . \") \" . $stmt->error;\n\t\t\treturn 0;\n\t\t}\n\t\t$results = $stmt->get_result();\n\t\t$connection->close();\n \tif($results->num_rows != 0) {\n\t \t$results->data_seek(0);\n\t\t\t$result = $results->fetch_assoc();\n\t\t\treturn $result['admin'];\n\t\t}\n\t\telse {\n\t\t\treturn 0;\n\t\t}\n\t}",
"public function isOnline($me, $isOnline){\r\n $poll = $this->pdo->query(\"UPDATE users SET user_isOnline = '$isOnline' WHERE user_id = '$me'\");\r\n }",
"public function isOnline($uname,$pass){\n\t\t$user = $this->find('first',array('user_name'=>$uname,'password'=>$pass));\n\t\tif(!empty($user)){\n\t\t\treturn $user['User']['online_flag']== 1;\n\t\t}\t\t\n\t}",
"public function getStatus() \n {\n if ($this->status) \n {\n \techo 'user status : присутствует<br><br><br>';\n }\n else\n {\n \techo 'user status : отсутствует<br><br><br>';\t\n }\n }",
"function changeStatus($status)\n\t{\n\t\t$where = array('uid' => session_get('uid'));\n\t\t$this->DB->database_update('users', array('online' => $status), $where);\n\t}"
]
| [
"0.7768013",
"0.73282367",
"0.7308808",
"0.7203117",
"0.7012117",
"0.7003874",
"0.6898104",
"0.68629706",
"0.68089515",
"0.6733769",
"0.6654864",
"0.6612957",
"0.653987",
"0.6494962",
"0.6490876",
"0.64895713",
"0.64105815",
"0.63739973",
"0.63658345",
"0.63438535",
"0.6336998",
"0.63178957",
"0.63105243",
"0.6267628",
"0.6260778",
"0.6247079",
"0.6218499",
"0.6215656",
"0.62051183",
"0.61737734"
]
| 0.8179271 | 0 |
/ Creates or gets an object CITY | private function createCity()
{
// Checks/Creates a new CITY
$nameCity = $_POST["name_city"];
if ((CityDAO::findOneBy("name_city", $nameCity)) == null) {
$city = new City;
$city->setName_city($_POST["name_city"]);
if (($city->getValid_city()) == true) {
CityDAO::createCity($city);
$city = CityDAO::findOneBy("name_city", $nameCity);
}
} else {
$city = CityDAO::findOneBy("name_city", $nameCity);
}
return $city;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function city();",
"public function getCity()\n {\n $res = $this->getEntity()->getCity();\n\t\tif($res == null)\n\t\t{\n\t\t\tSDIS62_Model_DAO_Abstract::getInstance($this::$type_objet)->create($this);\n\t\t\treturn $this->getEntity()->getCity();\n\t\t}\n\t\treturn $res;\n }",
"public function getOrt() {\n $cid = $this->getCityId();\n try {\n return new Yourdelivery_Model_City($cid);\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n return null;\n }\n }",
"public function getCity() {}",
"public function getCity(): CityInterface;",
"function _param_geowidget_maybeyourcity_form_loadcity_callback() {\n $city = &drupal_static(__FUNCTION__);\n if (!isset($city)) {\n if ($cache = cache_get('geowidget')) {\n $city = $cache->data;\n } else {\n $city = db_select('geowidget_city', 'c')\n ->fields('c', array('id', 'parent_id', 'title', 'geoname_id'))\n ->execute()\n ->fetchAll();\n\n cache_clear_all('geowidget', 'cache', TRUE);\n cache_set('geowidget', $city, 'cache', time() + 360);\n }\n }\n return $city;\n}",
"protected function createObjects() {\n\t\t$this->txtId = $this->mctCity->txtId_Create();\n\t\t$this->txtCountryId = $this->mctCity->txtCountryId_Create();\n\t\t$this->txtPostalCode = $this->mctCity->txtPostalCode_Create();\n\t\t$this->txtName = $this->mctCity->txtName_Create();\n\t\t$this->txtAdminName1 = $this->mctCity->txtAdminName1_Create();\n\t\t$this->txtAdminCode1 = $this->mctCity->txtAdminCode1_Create();\n\t\t$this->txtAdminName2 = $this->mctCity->txtAdminName2_Create();\n\t\t$this->txtAdminCode2 = $this->mctCity->txtAdminCode2_Create();\n\t\t$this->txtAdminName3 = $this->mctCity->txtAdminName3_Create();\n\t\t$this->txtAdminCode3 = $this->mctCity->txtAdminCode3_Create();\n\t\t$this->txtLatitude = $this->mctCity->txtLatitude_Create();\n\t\t$this->txtLongitude = $this->mctCity->txtLongitude_Create();\n\t\t$this->txtAccuracy = $this->mctCity->txtAccuracy_Create();\n\t}",
"public function getCity();",
"public function getCity(): City\n {\n return $this->city;\n }",
"protected function giveCity()\n\t{\n\t\treturn \"Orland\";\n\t}",
"function __construct($cityId)\n {\n }",
"public function __construct($city)\n {\n $this->city = $city;\n }",
"function getCity() {\r\r\n\t\treturn $this->city;\r\r\n\t}",
"public function _construct()\n {\n $this->_init('city/city', 'city_id');\n }",
"public function getCity()\n {\n return $this->hasOne(City::className(), ['id' => 'city_id']);\n }",
"public function getCity()\n {\n return $this->hasOne(City::className(), ['id' => 'city_id']);\n }",
"public function getCity()\n {\n return $this->hasOne(City::className(), ['id' => 'city_id']);\n }",
"public function getCity()\n {\n return $this->hasOne(City::className(), ['id' => 'city_id']);\n }",
"public function getCity()\n {\n return $this->hasOne(City::class, ['id' => 'city_id']);\n }",
"public function getCity() \n {\n return $this->city;\n }",
"public function __construct(City $city)\n {\n $this->city = $city;\n }",
"public function addNewPersonToCity()\n {\n }",
"public static function show()\n {\n return City::get();\n }",
"public function testConstructor()\n {\n // $id = null case\n $result = new City();\n $this->assertEquals('Sizzle\\Bacon\\Database\\City', get_class($result));\n $this->assertFalse(isset($result->name));\n\n // $id specified case\n $result = new City($this->existing_city->id);\n foreach (get_object_vars($result) as $key => $value) {\n $this->assertEquals($this->existing_city->$key, $value);\n }\n }",
"public function getCity()\n {\n return $this;\n }",
"public function getCity(){\r\n\t\treturn $this->city;\r\n\t}",
"function geowidget_maybeyourcity_form_set_city_callback($form, $form_state) {\n if ($form['city_id'] != null) {\n $city = city_load($form['city_id']['#value']);\n if ($city) {\n $_SESSION['geowidget'] = array(\n 'id' => $city->id,\n 'title' => $city->title,\n );\n $form['text_maybe_city']['#value'] = $city->title;\n $form['text_maybe_city']['#suffix'] = '';\n unset($form['maybe_you_city']);\n }\n }\n return $form;\n}",
"public function getCity()\r\n {\r\n return $this->_city;\r\n }",
"public function single($id)\n {\n $data = City::findOrFail($id);\n return new CityResource($data);\n }",
"public function getCity()\r\n {\r\n return $this->city;\r\n }"
]
| [
"0.65880746",
"0.6568893",
"0.6429964",
"0.62304544",
"0.6218825",
"0.6216072",
"0.6169241",
"0.61492217",
"0.6050136",
"0.60417056",
"0.601241",
"0.59102744",
"0.5888355",
"0.5839148",
"0.5838323",
"0.5838323",
"0.5838323",
"0.5838323",
"0.580614",
"0.5795519",
"0.5740097",
"0.57323813",
"0.572788",
"0.5727056",
"0.57173836",
"0.56885487",
"0.5668755",
"0.56469023",
"0.5621108",
"0.5616921"
]
| 0.7191974 | 0 |
Formats a property name | public function formatPropertyName(string $propertyName): string; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function formatName($name);",
"protected function getRealNameProperty(string $property) : string\n\t{\n\t}",
"private function _propertyNameConverter($a_sProperty)\n {\n return ucfirst(preg_replace(\"/(_)(\\w)/e\", \"strtoupper('\\\\2')\", $a_sProperty));\n }",
"protected static function normalizePropertyName($property)\n {\n return str_replace(' ', '', ucwords(str_replace('_', ' ', $property)));\n }",
"function getPropertyName() ;",
"public function getPropertyName() {}",
"public function getPropertyName() {}",
"public function getPropertyName() {}",
"public function getPropertyName();",
"public function getPropertyName();",
"function property($property_name, $default = NULL, $formatted = false)\n {\n $property_value = $this->get_property($property_name, $default);\n if ($property_value != NULL)\n {\n if ($formatted)\n {\n if (preg_match(\"/^(body|meta).(.*)$/\", $property_name, $match))\n {\n $property_prefix = $match[1];\n $property_name_cut = $match[2];\n }\n else\n {\n die(\"Invalid property name: $property_name.\\n\");\n }\n\n if ($property_prefix == \"meta\")\n {\n $meta_type = $this->_meta_property_types[$property_name];\n $before = \"<meta $meta_type=\\\"$property_name_cut\\\" content=\\\"\";\n $after = \"\\\" />\";\n }\n else if ($property_prefix == \"body\")\n {\n $before = \" $property_name_cut=\\\"\";\n $after = \"\\\"\";\n }\n else\n {\n die(\"Impossible branch: $property_name => $property_prefix $property_name_cut\");\n }\n }\n else\n {\n $before = \"\";\n $after = \"\";\n }\n\n print \"$before$property_value$after\";\n }\n }",
"public function getProperty2Name() {}",
"public function getProperty()\n\t{\n\t\treturn empty($this->property) ? strtolower($this->getName()) : $this->property;\n\t}",
"public function get_formatted_name() {\n\n\t\t\t/**\n\t\t\t * FILTER: slp_formatted_location_name_elements\n\t\t\t *\n\t\t\t * @params string[] and array of the property names we want to use to build the string.\n\t\t\t *\n\t\t\t * @return string[] modified list of property names\n\t\t\t */\n\t\t\t$name_parts = apply_filters( 'slp_formatted_location_name_elements', array(\n\t\t\t\t'store',\n\t\t\t\t'city',\n\t\t\t\t'state',\n\t\t\t\t'country',\n\t\t\t) );\n\n\t\t\t// Get the valid non-empty properties.\n\t\t\t//\n\t\t\t$valid_parts = array();\n\t\t\tforeach ( $name_parts as $property ) {\n\t\t\t\tif ( property_exists( $this, $property ) && ( ! empty ( $this->$property ) ) ) {\n\t\t\t\t\t$valid_parts[] = $this->$property;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * FILTER: slp_formatted_location_name_separator\n\t\t\t *\n\t\t\t * @params string the separator for the name defaults to a space\n\t\t\t *\n\t\t\t * @return string the modified separator used for the join\n\t\t\t */\n\t\t\t$part_separator = apply_filters( 'slp_formatted_location_name_separator', ' ' );\n\n\t\t\t/**\n\t\t\t * FILTER: slp_formatted_location_name\n\t\t\t *\n\t\t\t * @params string the formatted name\n\t\t\t *\n\t\t\t * @return string the modified name\n\t\t\t */\n\t\t\treturn apply_filters( 'slp_formatted_location_name', join( $part_separator, $valid_parts ) );\n\t\t}",
"public function propertyFormat($propertyName, &$isReference = null){\r\n $matchesarray = array();\r\n preg_match('/.*:ref/', $propertyName, $matchesarray);\r\n if(count($matchesarray) > 0){\r\n $array = explode( ':', $matchesarray[0]);\r\n $propertyName = $array[0];\r\n $isReference = true;\r\n return $propertyName;\r\n }\r\n $isReference = false;\r\n return $propertyName;\r\n }",
"function getPropName() {\n return $this->propName;\n }",
"public static function format_field_name(string $field_name)\n {\n }",
"public function getProperty1Name() {}",
"protected function resolvePropertyName($name)\n {\n if ($name instanceof AbstractLiteral) {\n return $name->toString();\n }\n if(is_numeric($name) && is_integer(($name + 0))){\n return ($name + 0);\n }\n return strval($name);\n }",
"protected function propertyToKey($property){\n\t\t$parts = preg_split('/(?=[A-Z])/', $property);\n\t\t$column = null;\n\n\t\tforeach($parts as $part){\n\t\t\tif($column === null){\n\t\t\t\t$column = $part;\n\t\t\t} else {\n\t\t\t\t$column .= '_' . lcfirst($part);\n\t\t\t}\n\t\t}\n\n\t\treturn $column;\n\t}",
"private static function format($name, $value)\n {\n return $value ?: ucwords(str_replace('_', ' ', $name));\n }",
"protected function camelCase($property){\n\t\t$split = explode('_', $property);\n\t\t$ucFirst = implode('', array_map('ucfirst', $split));\n\t\t$camelCase = lcfirst($ucFirst);\n\t\treturn $camelCase;\n\t}",
"private function getMethodName($property)\n {\n $parts = explode('_', $property);\n $first = strtolower(array_shift($parts));\n\n $name = array_map(function($n) { return ucfirst(strtolower($n)); }, $parts);\n array_unshift($name, $first);\n\n return implode('', $name);\n }",
"public function getProperty()\n {\n if (!$this->property) {\n $this->property = Inflector::underscore($this->alias);\n }\n\n return $this->property;\n }",
"public function get_property_name( $field_slug ) {\n\t\t\treturn preg_replace( '/^sl_/', '', $field_slug );\n\t\t}",
"function FormatFieldName($getFieldName){\r\n\t\t\tglobal $prefArray;\r\n\t\t\tif(!empty($prefArray)){\r\n\t\t\t\tforeach($prefArray as $key=>$value) {\r\n\t\t\t\t\tif($getFieldName == $value['field']){\r\n\t\t\t\t\t\tif(!empty($value['instruction'])){\r\n\t\t\t\t\t\t\t$key = $value['instruction'];\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t$key = str_replace(\"_\",\" \",$key['field']);\r\n\t\t\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn ucwords($key);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t//return $prefArray[$getFieldName];\r\n\t\t\t}else{\r\n\t\t\t\t$tmpFieldName = str_replace(\"_\",\" \",$getFieldName);//(converts 'job_store_name' to 'Job Store Name')\r\n\t\t\t\treturn(ucwords($tmpFieldName));\r\n\t\t\t}\r\n\t\t}",
"private function getColumnPropertyName( Column $column ) : string\n {\n\n return lcfirst(str_replace( '_', '', ucwords( $column->getName(), '_' )));\n\n }",
"public function asPropertyFQSENString(): string\n {\n return $this->getClassFQSEN()->__toString() .\n ($this->isStatic() ? '::$' : '->') .\n $this->name;\n }",
"function graphql_format_field_name($field_name)\n {\n }",
"protected function formatParamName($name)\n {\n return sprintf('$<strong>%s</strong>', $name);\n }"
]
| [
"0.68388075",
"0.67244846",
"0.666132",
"0.6584001",
"0.6570602",
"0.6443444",
"0.6443444",
"0.6443444",
"0.64387023",
"0.64387023",
"0.63829005",
"0.6350105",
"0.6289119",
"0.62091076",
"0.62049377",
"0.613412",
"0.6123073",
"0.6115935",
"0.6078977",
"0.60524064",
"0.6020561",
"0.6000524",
"0.5982662",
"0.59735435",
"0.59535736",
"0.5903229",
"0.58768404",
"0.5858057",
"0.58281446",
"0.58142096"
]
| 0.8041927 | 0 |
Remove the scope from the given Eloquent query builder. | public function remove(Builder $builder)
{
/** @var \Illuminate\Database\Eloquent\Model|ScopedByTenant $model */
$model = $builder->getModel();
$query = $builder->getQuery();
foreach ((array) $query->wheres as $key => $where)
{
// If the where clause is a tenant constraint, we will remove it from the query
// and reset the keys on the wheres. This allows this developer to include
// the tenant model in a relationship result set that is lazy loaded.
if ($this->isTenantConstraint($where, $model))
{
unset($query->wheres[$key]);
$query->wheres = array_values($query->wheres);
// Just bail after this first one in case the user has manually specified
// the same where clause for some weird reason or by some nutso coincidence.
break;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function remove(Builder $query, Model $model) {}",
"public function remove(Builder $builder)\n\t{\n\t\t$query = $builder->getQuery();\n\n\t\t$column = $builder->getModel()->getQualifiedPublishedColumn();\n\n\t\t$bindingKey = 0;\n\n\t\tforeach ((array) $query->wheres as $key => $where)\n\t\t{\n\t\t\tif ($this->isPublishedConstraint($where, $column))\n\t\t\t{\n\t\t\t\t$this->removeWhere($query, $key);\n\t\t\t\t$this->removeBinding($query, $bindingKey);\n\t\t\t}\n\t\t}\n\t}",
"public function remove(Builder $builder, Model $model)\n {\n $query = $builder->getQuery();\n\n if (is_null($query->wheres)) {\n return;\n }\n\n $bindingKey = 0;\n\n $scopeConstraints = $this->getScopeConstraints($model);\n\n foreach ((array) $query->wheres as $key => $where) {\n $bindingsCount = $this->countBindings($where);\n\n if (in_array($where, $scopeConstraints)) {\n $this->removeWhere($query, $key);\n\n $this->removeBindings($query, $bindingKey, $bindingsCount);\n } else {\n $bindingKey += $bindingsCount;\n }\n }\n\n $query->wheres = array_values($query->wheres);\n }",
"public function newQueryWithoutScope($scope);",
"public function remove(Builder $builder, Model $model)\n {\n $query = $builder->getQuery();\n\n foreach ((array) $query->wheres as $key => $where)\n {\n // If the where clause is a soft delete date constraint, we will remove it from\n // the query and reset the keys on the wheres. This allows this developer to\n // include deleted model in a relationship result set that is lazy loaded.\n if ($where['column'] == 'characterization_type' && $where['value'] == $this->type)\n {\n unset($query->wheres[$key]);\n }\n }\n\n $query->wheres = array_values($query->wheres);\n }",
"public function remove(Builder $builder, Model $model)\n {\n $builder->withoutGlobalScope($this);\n\n $column = $model->getQualifiedStatusColumn();\n $query = $builder->getQuery();\n\n $bindingKey = 0;\n\n foreach ((array)$query->wheres as $key => $where) {\n if ($this->isModerationConstraint($where, $column)) {\n $this->removeWhere($query, $key);\n\n // Here SoftDeletingScope simply removes the where\n // but since we use Basic where (not Null type)\n // we need to get rid of the binding as well\n $this->removeBinding($query, $bindingKey);\n }\n\n // Check if where is either NULL or NOT NULL type,\n // if that's the case, don't increment the key\n // since there is no binding for these types\n if (!in_array($where['type'], ['Null', 'NotNull'])) $bindingKey++;\n }\n\n }",
"public function remove(Builder $builder, Model $model)\n {\n $query = $builder->getQuery();\n\n foreach((array)$query->wheres as $key => $where) {\n\n if($where['column'] == 'dealer_id') {\n\n unset($query->wheres[$key]);\n\n $query->wheres = array_values($query->wheres);\n }\n }\n }",
"public function remove(Builder $builder, Model $model)\n {\n $query = $builder->getQuery();\n\n $wheres = [\n 'type' => 'Basic',\n 'column' => 'post_type',\n 'operator' => '>=',\n 'value' => 'form',\n 'boolean' => 'and',\n ];\n\n foreach ((array) $query->wheres as $key => $where) {\n if ($where['type'] !== 'Basic'\n || (string) $where['column'] !== '('.self::$apiEnabledScopeColumn.')'\n || $where['operator'] !== '>='\n || (int) $where['value'] !== 1\n || $where['boolean'] !== 'and') {\n continue;\n }\n\n unset($query->wheres[$key]);\n\n $query->wheres = array_values($query->wheres);\n }\n }",
"protected function removeWhere(BaseBuilder $query, $key)\n\t{\n\t\tunset($query->wheres[$key]);\n\n\t\t$query->wheres = array_values($query->wheres);\n\t}",
"public function scopeNotForging(Builder $query)\n {\n return $query->where('rank', '>', 51)->orderBy('rank', 'ASC');\n }",
"protected function removeBinding(BaseBuilder $query, $key)\n\t{\n\t\t$bindings = $query->getRawBindings()['where'];\n\n\t\tunset($bindings[$key]);\n\n\t\t$query->setBindings($bindings);\n\t}",
"public function ScopeUnDeleted($query)\n {\n return $query->where('deleted_at', null);\n }",
"public function scopeSimple($query)\n {\n return $query->where('group_id', NULL);\n }",
"public function clearScope() {\n\t\treturn $this->setScope( \"\" );\n\t}",
"public function scopeUndispatched($query) {\n return $query->where('order_status_id', '=', 2);\n }",
"public function scopeForging(Builder $query)\n {\n return $query->where('rank', '<=', 51)->orderBy('rank', 'ASC');\n }",
"public function scopeUniqueVisitor(Builder $query);",
"public function removeQuery($query)\r\n {\r\n if (is_object($query)) {\r\n $query = $query->getKey();\r\n }\r\n\r\n if (isset($this->facetQueries[$query])) {\r\n unset($this->facetQueries[$query]);\r\n }\r\n\r\n return $this;\r\n }",
"public function scopeWithoutOld( $query )\n {\n return $query -> where('id', '>', 9664);\n }",
"public function remove(Builder $builder)\n\t{\n\t}",
"public function scopedeluser($query,$id){\n return $query->where('id',$id)->delete();\n }",
"public function scopeWithoutsort($query)\n {\n return $query->newQueryWithoutScope('order');\n }",
"public function scopeWithoutSelf($query)\n {\n return auth()->check() ? $query->where('user_id', '!=', auth()->id()) : $query;\n }",
"protected function removeWhere(Query $query, $key)\n {\n unset($query->wheres[$key]);\n }",
"public function scopeNotRemoved($query)\n {\n return $query->where('removed', false);\n }",
"public function clearWhere()\n {\n \t$this->_where = null;\n }",
"public function resetScope();",
"public function resetBuilder()\n {\n $this->where = [];\n $this->whereNot = [];\n $this->inRange = [];\n $this->notInRange = [];\n $this->exist = [];\n $this->whereTerms = [];\n $this->match = [];\n $this->query = new BoolQuery();\n $this->filter = new BoolQuery();\n\n return $this;\n }",
"private function cleanQuery()\n {\n $this->where = [];\n $this->bind = [];\n\n return $this;\n }",
"public function scopeDeactivated($query)\n {\n return $query->where($this->ends_at_field, '<', date('Y-m-d H:i:s'));\n }"
]
| [
"0.65368086",
"0.6483229",
"0.6292898",
"0.6257863",
"0.61098635",
"0.60537565",
"0.604043",
"0.59647316",
"0.59578437",
"0.5855346",
"0.58245295",
"0.58234406",
"0.5773652",
"0.5762988",
"0.5739198",
"0.5729482",
"0.572618",
"0.5713466",
"0.5713089",
"0.559689",
"0.5554645",
"0.5553157",
"0.5492065",
"0.5457984",
"0.5454816",
"0.5433548",
"0.5413994",
"0.5409539",
"0.5406989",
"0.5406187"
]
| 0.7017195 | 0 |
Determine if the given where clause is a tenant constraint. | protected function isTenantConstraint(array $where, $model)
{
return $where['type'] == 'raw' && $where['sql'] == $model->getTenantWhereClause();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function wac_is_tenant($user=''){\n\t if ($user && !empty($user)) {\n\t\tif (!is_object($user)) {\n\t\t\t$user = new WP_User(absint($user));\n\t\t}\n\t\treturn (is_array($user->roles) && in_array('subscriber', $user->roles));\n\t} else {\n\t\treturn false;\n\t}\n}",
"protected function isSubquery($constraint)\n\t{\n\t\treturn in_array($constraint, $this->subqueries);\n\t}",
"function tenantHasDatabaseTable(Tenant $tenant, string $tableName): bool\n{\n $tenant->makeCurrent();\n\n $tenantHasDatabaseTable = Schema::connection('tenant')->hasTable($tableName);\n\n Tenant::forgetCurrent();\n\n return $tenantHasDatabaseTable;\n}",
"protected function isSubclause($constraint)\n\t{\n\t\treturn in_array($constraint, $this->subclauses);\n\t}",
"public function authorize()\n {\n $user = auth('web')->user();\n\n $uuidTenant = isset($user) ? $user->tenant->uuid : $this->segment(4);\n\n if(!app(TenantRepository::class)->getTenantByUuid($uuidTenant)) {\n return false; // 404\n }\n\n return true;\n }",
"protected function isConstraint($constraint)\n\t{\n\t\treturn in_array($constraint, $this->constraints);\n\t}",
"public function getTenant()\n {\n return $this->tenant;\n }",
"public function isBusinessUnit($domainObject);",
"public function isOrganization($domainObject);",
"public function getWhereClauseForEnabledFieldsIncludesDeletedCheckInBackend() {}",
"protected function isPublishedConstraint(array $where, $column)\n\t{\n\t\treturn ($where['type'] == 'Basic' && $where['column'] == $column && $where['value'] == 1);\n\t}",
"public static function is_business_plan() {\n\t\treturn in_array( self::get_plan(), [ 'business', 'agency' ], true );\n\t}",
"public function existConstraints($tablename=''):bool\n {\n foreach ($this->columns as $colname => &$column)\n if ($column->constraint !== null) \n return ( ($tablename=='') ||\n (isset($this->joins[$colname]) && ($this->joins[$colname]->tablename==$tablename)));\n \n return false;\n }",
"protected function whereExists(Builder $builder, $where): string\n {\n return 'exists ('.$this->compileSelect($where['query']).')';\n }",
"public function authorize()\n {\n if (env('APP_ENV') == 'testing') {\n return true;\n }\n\n return tenant(auth()->user()->id)->hasPermissionTo('delete fixed asset');\n }",
"public function apply(Builder $builder)\n\t{\n\t\tif (is_null(self::getTenantId()))\n\t\t{\n\t\t\tif (self::$enabled) throw new TenantIdNotSetException;\n\n\t\t\treturn;\n\t\t}\n\n\t\t/** @var \\Illuminate\\Database\\Eloquent\\Model|ScopedByTenant $model */\n\t\t$model = $builder->getModel();\n\n\t\t// Use whereRaw instead of where to avoid issues with bindings when removing\n\t\t$builder->whereRaw($model->getTenantWhereClause());\n\t}",
"public function getTenantId(): ?string;",
"protected function isModerationConstraint(array $where, $column)\n {\n return $where['column'] == $column;\n }",
"public function isUser($domainObject);",
"public function getTenantId()\n {\n if (array_key_exists(\"tenantId\", $this->_propDict)) {\n return $this->_propDict[\"tenantId\"];\n } else {\n return null;\n }\n }",
"public function getTenantId()\n {\n if (array_key_exists(\"tenantId\", $this->_propDict)) {\n return $this->_propDict[\"tenantId\"];\n } else {\n return null;\n }\n }",
"public function getTenantId()\n {\n if (array_key_exists(\"tenantId\", $this->_propDict)) {\n return $this->_propDict[\"tenantId\"];\n } else {\n return null;\n }\n }",
"public function getTenantId()\n {\n if (array_key_exists(\"tenantId\", $this->_propDict)) {\n return $this->_propDict[\"tenantId\"];\n } else {\n return null;\n }\n }",
"public function getTenantId()\n {\n if (array_key_exists(\"tenantId\", $this->_propDict)) {\n return $this->_propDict[\"tenantId\"];\n } else {\n return null;\n }\n }",
"public function getTenantId()\n {\n if (array_key_exists(\"tenantId\", $this->_propDict)) {\n return $this->_propDict[\"tenantId\"];\n } else {\n return null;\n }\n }",
"public function isViewDataTableId($viewDataTableId)\n {\n $myIds = ViewDataTableManager::getIdsWithInheritance(get_called_class());\n\n return in_array($viewDataTableId, $myIds);\n }",
"public function isTransactionPart()\n {\n return $this->_transaction != null;\n }",
"protected function isIntranet(): bool\n\t{\n\t\treturn\n\t\t\tisset($this->arResult['SITE']['DOMAIN_ID']['CURRENT']) &&\n\t\t\t(\n\t\t\t\t$this->arResult['SITE']['DOMAIN_ID']['CURRENT'] === '0' ||\n\t\t\t\t$this->arResult['SITE']['DOMAIN_ID']['CURRENT'] === ''\n\t\t\t);\n\t}",
"public static function findByName(string $name): TenantContract\n {\n $tableColumn = config('permission.table_column.tenant.name');\n $tenant = static::where($tableColumn, $name)->first();\n\n if (! $tenant) {\n throw TenantDoesNotExist::create($name);\n }\n\n return $tenant;\n }",
"public function tenant()\n {\n return $this->belongsTo(User::class, 'user_id', 'id');\n }"
]
| [
"0.61155045",
"0.56254387",
"0.5602561",
"0.53432614",
"0.52982426",
"0.51760066",
"0.4957612",
"0.4832978",
"0.48291656",
"0.481554",
"0.47444353",
"0.47385257",
"0.46842396",
"0.4616265",
"0.46128848",
"0.46128705",
"0.4595339",
"0.45950687",
"0.45690006",
"0.45294273",
"0.45294273",
"0.45294273",
"0.45294273",
"0.45294273",
"0.45294273",
"0.4528952",
"0.44974843",
"0.4494289",
"0.44452718",
"0.444292"
]
| 0.7373448 | 0 |
Test that add employee fails if last name is not numeric | public function test_reject_lname()
{
$controller = new Controller();
$result = $controller->addEmpOwner('abc', '0', null);
$this->assertEquals($result, false);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function addemployee($empyname,$empymbl,$empemail,$empdesignation)\n\t{\n\t\t$names = array('name' => $empyname ,'mobile' =>$empymbl,'\temail' => $empemail, 'designation' => $empdesignation);\n\t\t$add_query = $this->insert( 'payrentz_employees', $names );\n\t\tif( $add_query )\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t}",
"private function addEmployee()\n\t{\n\t\tif (false === $this->flag)\n\t\t{\n\t\t\tif (isset($this->dataArray))\n\t\t\t{\n\t\t\t\tif ('' === $this->dataArray['pass_employee'])\n\t\t\t\t{\n\t\t\t\t\t$this->error['ERROR_PASS'] = ERROR_EMPTY;\n\t\t\t\t\t$pass = false;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (false === $this->validatorObj\n\t\t\t\t\t\t\t->checkPass($this->dataArray['pass_employee']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->error['ERROR_PASS'] = ERROR_WRONG_DATA;\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$pass = $this->dataArray['pass_employee'];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ('' === $this->dataArray['name_employee'])\n\t\t\t\t{\n\t\t\t\t\t$this->error['ERROR_NAME'] = ERROR_EMPTY;\n\t\t\t\t\t$name = false;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (false === $this->validatorObj\n\t\t\t\t\t\t\t->checkForm($this->dataArray['name_employee']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->error['ERROR_NAME'] = ERROR_WRONG_DATA;\n\t\t\t\t\t\t$name = false;\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$name = $this->dataArray['name_employee'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ('' === $this->dataArray['email_employee'])\n\t\t\t\t{\n\t\t\t\t\t$this->error['ERROR_EMAIL'] = ERROR_EMPTY;\n\t\t\t\t\t$email = false;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (false === $this->validatorObj\n\t\t\t\t\t\t\t->checkEmail($this->dataArray['email_employee']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->error['ERROR_EMAIL'] = ERROR_WRONG_DATA;\n\t\t\t\t\t\t$email = false;\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$email = $this->dataArray['email_employee'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (false !== $name && false !== $pass && false !== $email)\n\t\t\t\t{\n\t\t\t\t\t$arr = $this->queryToDbObj\n\t\t\t\t\t\t->getEmployeeForCheckExists($email);\n\t\t\t\t\tif (!empty($arr))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->error['ERROR_STATUS'] = ERROR_EXISTS;\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$key_employee = $this->encodeObj->generateCode($name);\n\t\t\t\t\t\t$pass = md5($key_employee . $pass . SALT);\n\t\t\t\t\t\t$arr = $this->queryToDbObj\n\t\t\t\t\t\t\t->setNewEmployee($name, $pass, $email,\n\t\t\t\t\t\t\t\t$key_employee);\n\t\t\t\t\t\tif ($arr)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$success['ADD'] = 'User add';\n\n\t\t\t\t\t\t\treturn $success;\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\tif (!empty($this->error))\n\t\t{\n\t\t\treturn $this->error;\n\t\t}\n\t\treturn true;\n\t}",
"public function testAddLargeNumberFails(): void\n {\n $stringCalculator = new StringCalc();\n // The actual result of the method.\n $calcResult = $stringCalculator->Add(\"2,1001\");\n // Assert that the expected result matches the actual result.\n $this->assertEquals(2, $calcResult); \n }",
"private function validateLastName($last)\n {\n if (strlen($last) > 25 || strlen($last) < 2) {\n array_push($this->errorArray, \"Your last name must be between 25 & 2 characters\");\n return;\n }\n }",
"public function addEmpOwner($fname,$lname, $skills)\n {\n if (!preg_match(\"/^[a-zA-Z'-]+$/\", $fname)) {\n $error = 'fname';\n header(\"Location: empOwnerAdd.php?error=$error\"); //Check first name\n return false;\n } \n \n if (!preg_match(\"/^[a-zA-Z'-]+$/\", $lname)) {\n $error = 'lname';\n header(\"Location: empOwnerAdd.php?error=$error\"); //Check last name\n return false;\n } \n else {\n $empID = NULL;\n $q = $this->db->prepare(\"INSERT INTO Employees (empID, fName, lName)\n VALUES (?,?,?);\");\n $q->bind_param('sss', $empID, $fname, $lname);\n $q->execute();\n //Insert new employee\n \n //get employees id\n $q = $this->db->prepare(\"select empID from Employees where fName = ? and empID >= all(select empID from Employees)\");\n $q->bind_param('s', $fname);\n $q->execute();\n $empID = $q->get_result();\n $row = mysqli_fetch_assoc($empID);\n \n // add skills\n foreach ($skills as $key => $value)\n {\n if ($value == 1)\n { \n $q = $this->db->prepare(\"insert into haveSkill (empID, typeId) values (?, ?)\");\n $q->bind_param('ss', $row['empID'], $key);\n $q->execute();\n }\n }\n \n return true;\n }\n \n }",
"public function testRegisterInvalidFirstName() {\n\t\t$data = $this->getUserData(\n\t\t\t'othrus',\n\t\t\t'aasd asdf fsd 5', // 31 chars\n\t\t\t$this->surname,\n\t\t\t'[email protected]'\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\t\n\t\t$this->assertResponseStatus(400);\n\t\t$this->assertTrue($resp_data->error);\n\t}",
"public function testCreateEmployee()\n {\n }",
"public function testValidateStringNumber(): void\n {\n $this->assertFalse($this->validate('1'));\n }",
"public function testRegisterInvalidSurname() {\n\t\t$data = $this->getUserData(\n\t\t\t'othrus',\n\t\t\t$this->first_name,\n\t\t\t'abcd efgh 3',\n\t\t\t'[email protected]'\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\t\n\t\t$this->assertResponseStatus(400);\n\t\t$this->assertTrue($resp_data->error);\n\t}",
"public function testAddInvalidAccount()\n {\n $this->addToServers($this->objects[1]);\n }",
"public function testExcepcionSiSeCreaEmpleadoConApellidoVacio(){\n\t\t\t$this->expectException(\\Exception::class);\n\t\t\t$emp= $this-> crear($nombre=\"Franco\", $Apellido=\"\");\n\t\t}",
"public function storeNewEmployer($input);",
"function add_employee( $empl_name, $pre_address, $per_address, $date_of_birth, $age, $mobile_phone, $email, $grade, $department, $designation, $gross_salary, $basic, $date_of_join){\n\t \t\n\t\t$date_of_birt = date2sql($date_of_birth); \n\t\t$date_of_joint = date2sql($date_of_join); \n\t\t$sql = \"INSERT INTO \".TB_PREF.\"kv_empl_info ( empl_name, pre_address, per_address, date_of_birth, age, mobile_phone, email, grade, department, designation, gross_salary, basic, date_of_join) VALUES (\"\n\t\t\n\t\t.db_escape($empl_name).\", \"\n\t\t.db_escape($pre_address).\", \"\n\t\t.db_escape($per_address).\", \"\t\t\n\t\t.db_escape($date_of_birt).\", \"\n\t\t.db_escape($age).\", \"\n\t\t.db_escape($mobile_phone).\", \" \n\t\t.db_escape($email).\", \" \n\t\t.db_escape($grade).\", \" \n\t\t.db_escape($department).\", \" \n\t\t.db_escape($designation).\", \" \n\t\t.db_escape($gross_salary).\",\"\n\t\t.db_escape($basic).\",\"\n\t\t.db_escape($date_of_joint).\")\";\n\n\tdb_query($sql,\"The employee could not be added\");\n\treturn db_insert_id(); \n}",
"public function testRegistrationNoLastname()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/add_user')\n ->type('username', 'Tester1')\n ->type('first_name', 'Test')\n ->type('last_name', '')\n ->type('password', 'abcd1234')\n ->type('password_confirmation', 'abcd1234')\n ->click('button[type=\"submit\"]')\n\n // we're still on the registration page\n ->assertSee('Save');\n });\n }",
"function validateOnAdd( $entity ){\n\t\t$username = $entity->getUsername();\n\t\t$criteria = new UserCriteria();\n\t\t$criteria->setUsername($username);\n\t\t$criteria->setOidNotEqual( $entity->getOid() );\n\t\t\n\t\t\n\t\t//Logger::log(\"oid del usuario \" . $entity->getOid(), __CLASS__);\n\t\t\n\t\t$count = $this->getCount($criteria);\n\t\t\n\t\tif( $count > 0){\n\t\t\tthrow new ServiceException( \"user.add.username.repetead\" );\n\t\t}\n\t\t\n\t\t\n\t}",
"public function testAddAddlValidation()\n {\n $init = 'test';\n $str = new \\Pv\\PString($init, array('length[1]'));\n $str->addValidation('numeric');\n $valid = $str->getValidation();\n\n $this->assertEquals(count($valid), 2);\n $this->assertTrue($valid[1] instanceof \\Pv\\Validate\\Numeric);\n }",
"private function validateLastName($ln){\n if(strlen($ln)<2 || strlen($ln)>25){\n array_push($this->errorArray, Constants::$lastNameCharecters);\n }\n }",
"public function validateLastname($lastname){\n if(preg_match(\"/^([a-zA-Z' ]+)$/\",$lastname)){\n return true;\n }else{\n return false;\n }\n }",
"public function testEmployeeCreate()\n {\n $user = factory(User::class)->create();\n $company_id = factory(Company::class)->create()->id;\n\n $response = $this->actingAs($user)->JSON('POST', '/employees', ['first_name' => 'Adam', 'last_name' => 'Kovalski','email' => '[email protected]', 'phone' => '+48123456789', 'company_id' => $company_id]);\n $response->assertStatus(302);\n }",
"public function testReturnsTrueWhenLastNameIsValid()\n {\n $validator = new ContactValidator();\n $this->assertTrue($validator->validateLastName('Sanchez'));\n }",
"public function getLastName_always_returnCorrectly()\n {\n $this->assertEquals($this->user['user_metadata']['lastname'], $this->entity->getLastName());\n }",
"public function test_create_user_invalid_name()\n {\n $response = $this->json('POST', '/user_create',\n [\n 'name' => str_repeat('a', 51), \n 'email' => $this->email,\n 'password' => $this->password]);\n $response\n ->assertStatus(200)\n ->assertExactJson([\n $this->all_message => $this->user_create_invalid_name,\n ]);\n }",
"public function addStaff($name, $lastName, $position, $salary, $date_start, $date_end, $dni, \n $address, $phone, $shirt_size, $pant_size) {\n $inputs = array(\n \"name\"=> $name, \n \"lastName\"=> $lastName,\n \"position\"=> $position,\n \"salary\"=> $salary,\n \"date_start\"=> $date_start,\n \"date_end\"=> $date_end,\n \"dni\"=> $dni,\n \"address\"=> $address,\n \"phone\"=> $phone,\n \"shirt_size\"=> $shirt_size,\n \"pant_size\"=> $pant_size\n );\n\n if ($this->isFormRegisterNotEmpty($name, $lastName, $position, $salary, $date_start, $date_end, $dni, \n $address, $phone, $shirt_size, $pant_size)) {\n\n $staffTemp = new Staff();\n $staffTemp->setDni($dni); \n \n\t\t\t\tif ($this->staffDAO->getByDni($staffTemp) == null) { \n if ($this->add($name, $lastName, $position, $salary, $date_start, $date_end, $dni, \n $address, $phone, $shirt_size, $pant_size)) { \n\n return $this->addStaffPath(null, STAFF_ADDED);\n\n } else { \n return $this->addStaffPath(DB_ERROR, null, $inputs); \n }\n } \n return $this->addStaffPath(STAFF_ERROR, null, $inputs);\n } \n return $this->addStaffPath(EMPTY_FIELDS, null, $inputs); \n }",
"public function testSePuedeCrearYObtenerNombreYApellido()\n { \n $emp= $this->crear();\n $this->assertEquals(\"Ricardo Montaner\", $emp->getNombreApellido());\n }",
"public function testExcepcionSiSeCreaEmpleadoConNombreVacio(){\n\t\t\t$this->expectException(\\Exception::class);\n\t\t\t$emp= $this-> crear($nombre=\"\");\n\t\t}",
"public function testReturnsFalseWhenLastNameIsEmpty()\n {\n $validator = new ContactValidator();\n $this->assertFalse($validator->validateLastName(''));\n }",
"public function testsIncreaseWithNonNumericString()\n {\n static::setExpectedExceptionRegExp('LogicException');\n $this->box->increase('test');\n }",
"function valid_name($name){\r\n for($i = 0; $i < strlen($name); $i++){\r\n if( is_numeric( $name[$i] ) ){\r\n return False;\r\n }\r\n }\r\n return True;\r\n }",
"private function validateLastName($ln)\r\n {\r\n if (strlen($ln) > 25 || strlen($ln) < 2) {\r\n array_push($this->errorArray, Constants::$lastNameCharacters);\r\n return;\r\n }\r\n\r\n }",
"public function testRegisterInvalidUsername() {\n\t\t$data = $this->getUserData(\n\t\t\t'12a-_#',\n\t\t\t$this->first_name,\n\t\t\t$this->surname,\n\t\t\t'[email protected]'\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\t\n\t\t$this->assertResponseStatus(400);\n\t\t$this->assertTrue($resp_data->error);\n\t}"
]
| [
"0.6075681",
"0.5846861",
"0.5829091",
"0.5791799",
"0.5774359",
"0.56641465",
"0.56063277",
"0.559172",
"0.5565928",
"0.5545326",
"0.5528292",
"0.55096835",
"0.549548",
"0.5488454",
"0.54717135",
"0.5455502",
"0.54068595",
"0.5393927",
"0.5373917",
"0.5371742",
"0.5366353",
"0.5366192",
"0.5363376",
"0.53632367",
"0.5359157",
"0.53495806",
"0.5345672",
"0.53400266",
"0.5317411",
"0.5312088"
]
| 0.6423358 | 0 |
TODO: Implement componentChuangTi() method. | public function componentChuangTi()
{
return $this->component->componentChuangTi()."并加了滚动条<<";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function CUX9002($component) {\n if ($component['parent_device_interface'] == 'CUxD' && $component['visible'] == 'true' && isset($component['TEMPERATURE'])) {\n $datapoints = array();\n \n if(isset($component['TEMPERATURE'])) {\n $datapoints[] = '<span class=\"info\" data-id=\"' . $component['TEMPERATURE'] . '\" data-component=\"' . $component['component'] . '\" data-datapoint=\"TEMPERATURE\"></span>';\n }\n if(isset($component['HUMIDITY'])) {\n $datapoints[] = '<span class=\"info\" data-id=\"' . $component['HUMIDITY'] . '\" data-component=\"' . $component['component'] . '\" data-datapoint=\"HUMIDITY\"></span>';\n }\n if(isset($component['DEW_POINT'])) {\n $datapoints[] = '<span class=\"info\" data-id=\"' . $component['DEW_POINT'] . '\" data-component=\"' . $component['component'] . '\" data-datapoint=\"DEW_POINT\"></span>';\n }\n if(isset($component['ABS_HUMIDITY'])) {\n $datapoints[] = '<span class=\"info\" data-id=\"' . $component['ABS_HUMIDITY'] . '\" data-component=\"' . $component['component'] . '\" data-datapoint=\"ABS_HUMIDITY\"></span>';\n }\n if(isset($component['TEMP_MIN_24H'])) {\n $datapoints[] = '<span class=\"info\" data-id=\"' . $component['TEMP_MIN_24H'] . '\" data-component=\"' . $component['component'] . '\" data-datapoint=\"TEMP_MIN_24H\"></span>';\n }\n if(isset($component['TEMP_MAX_24H'])) {\n $datapoints[] = '<span class=\"info\" data-id=\"' . $component['TEMP_MAX_24H'] . '\" data-component=\"' . $component['component'] . '\" data-datapoint=\"TEMP_MAX_24H\"></span>';\n }\n if(isset($component['HUM_MIN_24H'])) {\n $datapoints[] = '<span class=\"info\" data-id=\"' . $component['HUM_MIN_24H'] . '\" data-component=\"' . $component['component'] . '\" data-datapoint=\"HUM_MIN_24H\"></span>';\n }\n if(isset($component['HUM_MAX_24H'])) {\n $datapoints[] = '<span class=\"info\" data-id=\"' . $component['HUM_MAX_24H'] . '\" data-component=\"' . $component['component'] . '\" data-datapoint=\"HUM_MAX_24H\"></span>';\n }\n \n return '<div class=\"hh\">'\n . '<div class=\"pull-left\"><img src=\"../assets/icons/' . $component[\"icon\"] . '\" class=\"icon\">' . $component['name'] . '</div>'\n . '<div class=\"pull-right\">'\n . implode('', $datapoints)\n . '</div>'\n . '<div class=\"clearfix\"></div>'\n . '</div>';\n }\n}",
"function HM_PB_4_FM($component) {\n if ($component['parent_device_interface'] == 'BidCos-RF' && $component['visible'] == 'true' && isset($component['PRESS_SHORT'])) {\n return '<div class=\"hh\">'\n . '<div class=\"pull-left\"><img src=\"../assets/icons/' . $component[\"icon\"] . '\" class=\"icon\">' . $component['name'] . '</div>'\n . '<div class=\"pull-right\">'\n . '<span class=\"set btn-text\" data-set-id=\"' . $component['PRESS_SHORT'] . '\" data-set-value=\"1\">Kurz</span>'\n . '<span class=\"set btn-text\" data-set-id=\"' . $component['PRESS_LONG'] . '\" data-set-value=\"1\">Lang</span>'\n . '</div>'\n . '<div class=\"clearfix\"></div>'\n . '</div>';\n }\n}",
"function getComponent()\n {\n }",
"public function getComponent()\n {\n }",
"public function ApplyChanges() {\n parent::ApplyChanges();\n\n $ModulInfo = IPS_GetInstance($this->InstanceID);\n $ModulName = $ModulInfo['ModuleInfo']['ModuleName'];\n\n $HourUpdateTimer = $this->ReadPropertyInteger(\"IntervalUpdateTimer\");\n $HourNotificationTimer = $this->ReadPropertyInteger(\"IntervalNotificationTimer\");\n $MinuteUpdateTimer = $this->ReadPropertyInteger(\"IntervalUpdateTimerMinute\");\n $MinuteNotificationTimer = $this->ReadPropertyInteger(\"IntervalNotificationTimerMinute\");\n $HourResetTimer = $this->ReadPropertyInteger(\"IntervalHtmlResetColorTodayTimer\");\n $EnableResetTimer = $this->ReadPropertyBoolean(\"cbxHtmlResetColorToday\");\n \n If ((($HourUpdateTimer > 23) || ($HourNotificationTimer > 23)) || (($HourUpdateTimer < 0) || ($HourNotificationTimer < 0)))\n {\n $this->SetStatus(202);\n $this->SendDebug($ModulName, $this->Translate(\"The hour of a time is wrong!\"), 0);\n }\n else {\n $this->SetStatus(102);\n }\n\n $this->SetNewTimerInterval($HourUpdateTimer.\":\".$MinuteUpdateTimer.\":17\", \"UpdateTimer\");\n $this->SetNewTimerInterval($HourUpdateTimer.\":\".$MinuteNotificationTimer.\":07\", \"NotificationTimer\");\n If($EnableResetTimer)\n {\n $this->SetNewTimerInterval($HourResetTimer.\":\".\"00\".\":14\", \"ResetFontTimer\");\n }\n If ($this->ReadPropertyBoolean(\"cbxGS\"))\n {\n $this->RegisterVariableString(\"YellowBagTime\", $this->Translate(\"Packaging waste event\"));\n $this->RegisterVariableString(\"YellowBagTimes\", $this->Translate(\"Packaging waste\"), \"~TextBox\");\n $this->EnableAction(\"YellowBagTimes\");\n }\n Else\n {\n $this->UnregisterVariable(\"YellowBagTimes\");\n $this->UnregisterVariable(\"YellowBagTime\");\n }\n If ($this->ReadPropertyBoolean(\"cbxHM\"))\n {\n $this->RegisterVariableString(\"WasteTime\", $this->Translate(\"Household garbage event\"));\n $this->RegisterVariableString(\"WasteTimes\", $this->Translate(\"Household garbage\"), \"~TextBox\");\n $this->EnableAction(\"WasteTimes\");\n }\n Else\n {\n $this->UnregisterVariable(\"WasteTimes\");\n $this->UnregisterVariable(\"WasteTime\");\n }\n If ($this->ReadPropertyBoolean(\"cbxPP\"))\n {\n $this->RegisterVariableString(\"PaperTime\", $this->Translate(\"Cardboard bin event\"));\n $this->RegisterVariableString(\"PaperTimes\", $this->Translate(\"Cardboard bin\"), \"~TextBox\");\n $this->EnableAction(\"PaperTimes\");\n }\n Else\n {\n $this->UnregisterVariable(\"PaperTimes\");\n $this->UnregisterVariable(\"PaperTime\");\n }\n\n If ($this->ReadPropertyBoolean(\"cbxBO\"))\n {\n $this->RegisterVariableString(\"BioTime\", $this->Translate(\"Organic waste event\"));\n $this->RegisterVariableString(\"BioTimes\", $this->Translate(\"Organic waste\"), \"~TextBox\");\n $this->EnableAction(\"BioTimes\");\n }\n Else\n {\n $this->UnregisterVariable(\"BioTime\");\n $this->UnregisterVariable(\"BioTimes\");\n }\n If ($this->ReadPropertyBoolean(\"cbxPT\"))\n {\n $this->RegisterVariableString(\"PollutantsTime\", $this->Translate(\"Pollutants event\"));\n $this->RegisterVariableString(\"PollutantsTimes\", $this->Translate(\"Pollutants\"), \"~TextBox\");\n $this->EnableAction(\"PollutantsTimes\");\n }\n Else\n {\n $this->UnregisterVariable(\"PollutantsTimes\");\n $this->UnregisterVariable(\"PollutantsTime\");\n }\n }",
"public function hapus_toko(){\n\t}",
"public function getKieToiletCuciTangan()\n {\n return $this->kie_toilet_cuci_tangan;\n }",
"public function component()\n {\n return 'nova-timenow';\n }",
"public abstract function fillComponent(&$smarty_tpl);",
"public static function fcomptage(){\n\t\tglobal $comptage;\n\t\t$comptage++;\n\t}",
"function ToonFormulierAfspraak()\n{\n\n}",
"function os2forms_nemid_webform_edit_component($component) {\n $form = array();\n $form['value'] = array(\n '#type' => 'textfield',\n '#title' => t('Default value'),\n '#default_value' => $component['value'],\n '#description' => t('The default value of the field.') . ' ' . theme('webform_token_help'),\n '#size' => 60,\n '#maxlength' => 1024,\n '#weight' => 0,\n );\n $form['display']['placeholder'] = array(\n '#type' => 'textfield',\n '#title' => t('Placeholder'),\n '#default_value' => $component['extra']['placeholder'],\n '#description' => t('The placeholder will be shown in the field until the user starts entering a value.'),\n '#weight' => 10,\n '#parents' => array('extra', 'placeholder'),\n );\n $form['display']['disabled'] = array(\n '#type' => 'checkbox',\n '#title' => t('Readonly'),\n '#default_value' => $component['extra']['disabled'],\n '#description' => t('Make this field non-editable. Useful for setting an unchangeable default value.'),\n '#weight' => 20,\n '#parents' => array('extra', 'disabled'),\n );\n $form['display']['element_hidden'] = array(\n '#type' => 'checkbox',\n '#title' => t('Hidden'),\n '#default_value' => $component['extra']['hidden'],\n '#description' => t('Make this field hidden.'),\n '#weight' => 10,\n '#parents' => array('extra', 'hidden'),\n );\n return $form;\n}",
"public function traerCualquiera()\n {\n }",
"public function component(Component $component)\n {\n }",
"public function accueil() {\r\n $tickets = $this->ticket->getTickets();\r\n $vue = new Vue(\"Accueil\");\r\n $vue->generer(array('tickets' => $tickets));\r\n }",
"public function get_component_name() {\n return $this->plugintype.'_'.$this->pluginname;\n }",
"function loadComponetTempalte( $name ) {\n include ROOT_DIR . \"/tmpl/components/{$name}.php\";\n}",
"public function getKieGuruCuciTangan()\n {\n return $this->kie_guru_cuci_tangan;\n }",
"public function testComponentReturnsNullForUnknownComponent() {\n $node = self::nodeStub();\n $webform = new Webform($node);\n $this->assertNull($webform->component(12));\n }",
"public function setComponent($component);",
"function before_render_tealium_html() {\r\n \r\n }",
"public function renderComponents() //:void\n {\n $l10n = [\n 'shareYourFavourites' => __('Share your favorites with this link', 'modularity-like'),\n ];\n wp_localize_script(\n 'like-posts-js',\n 'likedPostsLang',\n $l10n\n );\n wp_localize_script(\n 'like-posts-js',\n 'likedPostsComponents',\n $this->components\n );\n }",
"public function actionTemoignageAboutUs() {\n //for tour Type\n if(Yii::$app->request->isAjax){\n $page = Yii::$app->request->get('page');\n $testis = \\app\\modules\\whoarewe\\api\\Catalog::items([\n 'where' => [\n 'category_id' => 13\n ],\n 'pagination' => ['pageSize' => 5, 'pageSizeLimit' => [$page, $page + 1]]\n ]);\n return $this->renderPartial(IS_MOBILE ? '//page2016/mobile/confiance' : '//page2016/temoignage',[\n 'testis' => $testis,\n ]);\n }\n $type = Yii::$app->request->get('type');\n $filterType = [];\n if($type && $type != 'all')\n $filterType = ['tTourTypes' => $type];\n //for tour themes\n $theme = Yii::$app->request->get('theme');\n $filterTheme = [];\n if($theme && $theme != 'all')\n $filterTheme = ['tTourThemes' => $theme];\n //for country\n $country = Yii::$app->request->get('country');\n $filterCountry = [];\n if($country && $country != 'all'){\n if(strpos($country, '-') === false){\n $filterCountry = ['countries' => ['IN', [$country]]];\n }\n else{\n foreach (explode('-',$country) as $key => $value) {\n $filterCountry[] = $value;\n }\n $filterCountry = ['countries' => ['IN', $filterCountry]];\n }\n }\n \n $filter = [];\n $filter = $filter + $filterCountry + $filterTheme + $filterType;\n \n $theEntry = \\app\\modules\\whoarewe\\api\\Catalog::cat(URI);\n $this->entry = $theEntry;\n $this->getSeo($theEntry->model->seo);\n //get data category & items portrain\n $thePortrait = \\app\\modules\\whoarewe\\api\\Catalog::cat(12);\n $queryPort = clone $thePortrait;\n $queryFindLarge = clone $queryPort;\n $topPortrait = $queryFindLarge->items(['filters' => [\n 'islarge' => 'on'\n ]]);\n $topPortrait = $topPortrait[0];\n $portraits = $thePortrait->items([\n 'pagination'=>['pageSize' => 0],\n 'where' => ['!=','item_id', $topPortrait->model->item_id],\n 'orderBy' => ['on_top_flag' => SORT_ASC, 'on_top' => SORT_ASC]\n ]);\n $totalCountPort = count($queryPort->items(['pagination' => ['pageSize'=>0],\n 'where' => ['!=','item_id', $topPortrait->model->item_id]\n ]));\n \n $pagesPort = new Pagination([\n 'totalCount' => $totalCountPort,\n 'defaultPageSize' => 3\n ]);\n //get data category & items testi\n //process data testi\n $theTesti = \\app\\modules\\whoarewe\\api\\Catalog::cat(13);\n $totalCountTesti = count($theTesti->items(['pagination' => ['pageSize'=>0],\n 'filters' => $filter]));\n //$queryTesti = clone $theTesti;\n if(Yii::$app->request->get('see-more') != NULL){\n $pagesize = Yii::$app->request->get('see-more');\n }else{\n $pagesize = 5;\n }\n \n $testis = \\app\\modules\\whoarewe\\api\\Catalog::items([\n 'where' => [\n 'category_id' => 13\n ],\n 'pagination' => ['pageSize' => $pagesize],\n 'filters' => $filter\n ]);\n \n\n// $pageTesti = new Pagination([\n// 'totalCount' => $totalCountTesti,\n// 'defaultPageSize' => 5,\n// ]);\n// $this->pagination = $pageTesti->pageCount;\n return $this->render(IS_MOBILE ? '//page2016/mobile/confiance' : '//page2016/temoignage',[\n 'theEntry' => $theEntry,\n 'thePortrait' => $thePortrait,\n 'portraits' => $portraits,\n 'topPortrait' => $topPortrait,\n 'pagesPort' => $pagesPort,\n 'theTesti' => $theTesti,\n 'testis' => $testis,\n 'pagesize' => $pagesize,\n 'totalCountTesti' => $totalCountTesti,\n 'root' => $this->getRootAboutUs()\n ]);\n }",
"public function actionTvic10a()\n {\n $unit = Yii::$app->levelcomponent->getUnit();\n\n $Tahun = 2019; //Yii::$app->pengaturan->getTahun();\n $tahun = $Tahun;\n\n $TaSubUnit = TaSubUnit::find()->where(['Kd_Urusan'=>$unit->Kd_Urusan, 'Kd_Bidang'=>$unit->Kd_Bidang, 'Kd_Unit'=>$unit->Kd_Unit, 'Kd_Sub'=>$unit->Kd_Sub_Unit])->one();\n\n $dataKegiatan = TaProgram::find()->where(['Tahun'=>$TaSubUnit->Tahun ,'Kd_Urusan'=>$TaSubUnit->Kd_Urusan, 'Kd_Bidang'=>$TaSubUnit->Kd_Bidang, 'Kd_Unit'=>$TaSubUnit->Kd_Unit, 'Kd_Sub'=>$TaSubUnit->Kd_Sub])->all();\n\n $dataKeteranganKeg = TaKegiatan::find()->where(['Tahun'=>$TaSubUnit->Tahun ,'Kd_Urusan'=>$TaSubUnit->Kd_Urusan, 'Kd_Bidang'=>$TaSubUnit->Kd_Bidang, 'Kd_Unit'=>$TaSubUnit->Kd_Unit, 'Kd_Sub'=>$TaSubUnit->Kd_Sub])->all();\n \n\n\n return $this->render('Tvic10a', [\n 'tahun' => $tahun,\n 'subunit' => $TaSubUnit,\n 'dataKegiatan'=>$dataKegiatan,\n 'dataKeteranganKeg' => $dataKeteranganKeg\n \n ]);\n }",
"function rename_component_init()\n{\n global $rename_component_name;\n\n // Boolean to check for latest version\n $versionok = rename_component_checkversion();\n\n // Component description\n $desc = _(\"This component allows administrators to manage renaming of hosts and services in bulk.\");\n\n if (!$versionok) {\n $desc = \"<b>\" . _(\"Error: This component requires Nagios XI 2012R1.0 or later with Enterprise Features enabled.\") . \"</b>\";\n }\n\n // All components require a few arguments to be initialized correctly. \n $args = array(\n COMPONENT_NAME => $rename_component_name,\n COMPONENT_VERSION => '1.5.1',\n COMPONENT_DATE => '07/12/2016',\n COMPONENT_AUTHOR => \"Nagios Enterprises, LLC\",\n COMPONENT_DESCRIPTION => $desc,\n COMPONENT_TITLE => _(\"Bulk Renaming Tool\")\n );\n\n // Register this component with XI \n register_component($rename_component_name, $args);\n\n // Only add this menu if the user is an admin / register the addmenu function\n if ($versionok) {\n register_callback(CALLBACK_MENUS_INITIALIZED, 'rename_component_addmenu');\n }\n}",
"public function getComponentName(): string;",
"public function get_component() : string\n {\n return $this->component;\n }",
"static function setComponent($component, $view, $section, $simple = false)\n {\n self::$components[]=array(\"component\" => $component,\n \"view\" => $view,\n \"section\" => $section,\n \"simple\" => $simple,\n );\n }",
"final function velcom(){\n }",
"public function getUserConfiguredElementTyposcript() {}"
]
| [
"0.5323066",
"0.5265673",
"0.52466875",
"0.50726074",
"0.503523",
"0.5018427",
"0.49438304",
"0.4920958",
"0.48846748",
"0.48582053",
"0.48265767",
"0.48157826",
"0.48023802",
"0.47955188",
"0.47786856",
"0.47675002",
"0.4763385",
"0.47454122",
"0.4729784",
"0.47074646",
"0.47049084",
"0.46996525",
"0.46932286",
"0.46819896",
"0.46815717",
"0.46751556",
"0.46738207",
"0.46667022",
"0.4665276",
"0.46527496"
]
| 0.7086113 | 0 |
Returns the maximum number of bytes required to display a column | function db2_field_display_size($stmt, $column)
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getColumnLength()\n {\n $columnLength = self::INITIAL_COLUMN_LENGTH;\n while ($columnLength < $this->maximumLength) {\n $columnLength *= self::COLUMN_LENGTH_STEPS;\n }\n\n return $columnLength;\n }",
"public function getMaxColumnNameLength();",
"public function Size() {\n return $this->RowCount() * $this->_coln;\n }",
"public function columnCount()\r\n\t{\r\n\t\treturn intval($this->columnCount);\r\n\t}",
"function getTableSize(){\r\n\tglobal $db;\r\n\t$size = 0;\r\n\t$unit = 'B';\r\n\t$query = $db->query('SHOW TABLE STATUS');\r\n\twhile ($rt = $db->fetch_array($query)) {\r\n\t\t$size += $rt['Index_length'];\r\n\t\t$size += $rt['Data_length'];\r\n\t}\r\n\treturn $size;\r\n}",
"public function getColumns()\n {\n return strlen($this->string);\n }",
"public function numberOfColumns(): int\n {\n return $this->nCols;\n }",
"public function size() : int\n {\n return $this->numRows() * $this->numColumns();\n }",
"public function getMaxSize(): int;",
"public function GetColumnCount() : INT\r\n {\r\n return($this->preparedStatement->columnCount());\r\n }",
"public function max_width() {\n\t\t$upper_breakpoint_val = end( $this->breakpoints );\n\t\t$upper_breakpoint = key( $this->breakpoints );\n\t\t$col_width = $this->column_widths[ $upper_breakpoint ];\n\t\t$margins = $this->margins[ $upper_breakpoint ];\n\t\t$gutters = $this->gutters[ $upper_breakpoint ];\n\t\t$max_cols = $this->columns[ $upper_breakpoint ];\n\t\t$max_width = ( (int) $max_cols * (int) $col_width ) + ( ( (int) $max_cols - 1 ) * (int) $gutters ) + ( (int) $margins * 2 );\n\n\t\treturn $max_width;\n\t}",
"public function getMaxWidth() {}",
"public function getMaxWidth() {}",
"public function getMaxWidth() {}",
"public function getMaxWidth() {}",
"public function getMaxWidth() {}",
"public function getMigrationsColumnLength(): int\n {\n return 255;\n }",
"public function getMaxSize() : int {\n\t\treturn $this->generator->getMaxSize();\n\t}",
"public function getNumColumns() {\n\t\treturn $this->_num_cols;\n\t}",
"abstract public function getColumnsCount();",
"public function getRowsSize();",
"public function available(){\n\t\t\t\treturn\t$this->_maxColHeight - $this->height();\n\t\t}",
"public function getRightColumnSize(): int\n {\n return $this->rightColumnSize;\n }",
"protected function get_max_length(): int\n\t{\n\t\treturn $this->end < $this->total ? $this->length : -1;\n\t}",
"public function GetMaxSize ();",
"public function getMaximumLineLength() {}",
"public function getFieldSize() : int\n\t{\n\t\treturn $this->fieldSize;\n\t}",
"public function columnCount();",
"public function getMaxSize() {\n return number_format($this->_max / 1024, 1) . ' KB';\n }",
"public function getMaxPadSize() {\n\treturn $this->textStorageSize - $this->getOverheadSize($this->algoBlockSize - 1);\n }"
]
| [
"0.72303176",
"0.69949406",
"0.69189703",
"0.6884645",
"0.6730413",
"0.67117816",
"0.6702595",
"0.66797954",
"0.66477513",
"0.66350555",
"0.6591475",
"0.65858424",
"0.65858424",
"0.6585286",
"0.6585286",
"0.6585286",
"0.6583971",
"0.6565333",
"0.6560915",
"0.64838666",
"0.6432379",
"0.64257663",
"0.64187855",
"0.63936156",
"0.63936025",
"0.63879704",
"0.6384237",
"0.6383657",
"0.63781595",
"0.63711554"
]
| 0.7278497 | 0 |
Serializes the given array of parameters into a valid query string. Use this function instead of http_query_params() when submitting to the Salsa framework, because keys with multiple values should not have array brackets added to them. The parameters can either be an array of arrays where each inner array contains a single key and value, or it can be an array of key/value pairs where a key with multiple values stores its values in an array. | function serializeParams($params) {
// Serialize the parameters ourselves so that multiple values are not wrapped
$q = array();
foreach ($params as $key => $val) {
if (is_array($val)) {
foreach ($val as $k => $v) {
// If the array is numerically indexed, use the parent key
if (is_int($k)) {
$k = $key;
}
$q[] = "$k=" . urlencode($v);
}
}
else {
$q[] = "$key=" . urlencode($val);
}
}
return implode('&', $q);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function http_serialize_params($params) {\n\t\t$query_string = array();\n\t\tif(is_array($params)):\n\t\t\tforeach($params as $key => $value):\n\t\t\t\tif(is_array($value)):\n\t\t\t\t\tforeach($value as $k => $fieldvalue):\n\t\t\t\t\t\t$query_string[] = urlencode($key) . '=' . rawurlencode($fieldvalue);\n\t\t\t\t\tendforeach;\n\t\t\t\telse:\n\t\t\t\t\t$query_string[] = urlencode($key) . '=' . rawurlencode($value);\n\t\t\t\tendif;\n\t\t\tendforeach;\n\t\telse:\n\t\t\treturn $params;\n\t\tendif;\n\t\treturn implode('&', $query_string);\n\t}",
"public static function paramsToQueryString(array $params = []) : string\n {\n $query_string = [];\n foreach ($params as $name => $value) {\n if (empty($name)) {\n continue;\n }\n if (is_array($value)) {\n // recursion case\n $result_string = static::paramsToQueryString($value);\n if (!empty($result_string)) {\n $query_string[] = $result_string;\n }\n } else {\n // base case\n $value = (string)$value;\n $query_string[] = $name . '=' . rawurlencode($value);\n }\n }\n return implode('&', $query_string);\n }",
"protected function _buildQuery( $params ) {\n if (!is_array($params)) {\n // POST string body is sent as-is\n return $params;\n }\n $namevals = array();\n foreach ($params as $name => $value) {\n if (is_array($value)) {\n if ($value === array_values($value)) {\n // encode a numerically indexed array as a[]=&a[]=\n foreach ($value as $val)\n $namevals[] = \"{$name}[]=$val\";\n }\n else {\n foreach ($value as $nam => $val)\n $namevals[] = \"{$name}[$nam]=$val\";\n }\n }\n else {\n $namevals[] = \"$name=$value\";\n }\n }\n return implode('&', $namevals);\n }",
"public static function serializeQueryParams(array $queryParams)\n {\n $params = '';\n foreach ($queryParams as $key => $value) {\n $params .= $key . '=' . $value . '&';\n }\n\n return substr($params, 0, -1);\n }",
"public function build_http_query($params) {\n\t\tif (!$params) return '';\n\n\t\t// Urlencode both keys and values\n\t\t$keys = $this->urlencode_rfc3986(array_keys($params));\n\t\t$values = $this->urlencode_rfc3986(array_values($params));\n\t\t$params = array_combine($keys, $values);\n\n\t\t// Parameters are sorted by name, using lexicographical byte value ordering.\n\t\t// Ref: Spec: 9.1.1 (1)\n\t\tuksort($params, 'strcmp');\n\n\t\t$pairs = array();\n\t\tforeach ($params as $parameter => $value) {\n\t\t\tif (is_array($value)) {\n\t\t\t\t// If two or more parameters share the same name, they are sorted by their value\n\t\t\t\t// Ref: Spec: 9.1.1 (1)\n\t\t\t\tnatsort($value);\n\n\t\t\t\tforeach ($value as $duplicate_value) {\n\t\t\t \t\t$pairs[] = $parameter . '=' . $duplicate_value;\n\t\t\t\t}\n\t\t \t} else {\n\t\t\t $pairs[] = $parameter . '=' . $value;\n\t\t\t}\n\t\t}\n\n\t\t// For each parameter, the name is separated from the corresponding value by an '=' character (ASCII code 61)\n\t\t// Each name-value pair is separated by an '&' character (ASCII code 38)\n\t\treturn implode('&', $pairs);\n\t}",
"public static function array_to_query_string($array, $encodeValues = FALSE) {\n $params = [];\n if (is_array($array)) {\n arsort($array);\n foreach ($array as $a => $b) {\n if ($encodeValues) {\n $b = urlencode($b);\n }\n $params[] = \"$a=$b\";\n }\n }\n return implode('&', $params);\n }",
"protected function buildQuery(array $parameters)\n {\n\t// no parameters?\n\tif(empty($parameters)) return '';\n\n\t// encode the keys\n\t$keys = self::urlencode_rfc3986(array_keys($parameters));\n\n\t// encode the values\n\t$values = self::urlencode_rfc3986(array_values($parameters));\n\n\t// reset the parameters\n\t$parameters = array_combine($keys, $values);\n\n\t// sort parameters by key\n\tuksort($parameters, 'strcmp');\n\n\t// loop parameters\n\tforeach ($parameters as $key => $value) {\n\t // sort by value\n\t if(is_array($value)) $parameters[$key] = natsort($value);\n\t}\n\n\t// process parameters\n\tforeach ($parameters as $key => $value) {\n\t $chunks[] = $key . '=' . str_replace('%25', '%', $value);\n\t}\n\n\t// return\n\treturn implode('&', $chunks);\n }",
"public static function prepareParameters(array $params) {\n $query = http_build_query($params);\n return $query;\n }",
"function array_toquerystring ($args) {\r\n if (!is_array($args)) {\r\n return false;\r\n }\r\n $out = '';\r\n foreach($args as $name => $value)\r\n {\r\n if(is_array($value))\r\n {\r\n foreach($value as $key => $val) {\r\n $out .= $name.'['.$key.']'.'=';\r\n $out .= $val.'&';\r\n\r\n }\r\n }else{\r\n $out .= $name.'=';\r\n $out .= $value.'&';\r\n }\r\n }\r\n return substr($out,0,-1); //trim the last & }\r\n}",
"public static function query_string($array)\n\t{\n\t\treturn http_build_query($array);\n\t}",
"protected function _getParametersAsString(array $parameters) {\n $queryParameters = array();\n foreach ($parameters as $key => $value) {\n $queryParameters[] = $key . '=' . $this->_urlencode($value);\n }\n return implode('&', $queryParameters);\n }",
"function _getParametersAsString(array $parameters)\n {\n $queryParameters = array();\n foreach ($parameters as $key => $value) {\n $queryParameters[] = $key . '=' . $this->_urlencode($value);\n }\n return implode('&', $queryParameters);\n }",
"public static function query($array)\n {\n return http_build_query($array, null, '&', PHP_QUERY_RFC3986);\n }",
"public static function query(array $array): string\n {\n return http_build_query($array, '', '&', PHP_QUERY_RFC3986);\n }",
"public static function urlEncode(array $params) {\n\t\t$qs = array();\n\n\t\tforeach ($params as $key => $value) {\n\t\t\t$qs[] = urlencode($key) . '=' . urlencode($value);\n\t\t}\n\n\t\treturn implode('&', $qs);\n\t}",
"public function makeQueryString($params)\n {\n $query = array();\n $paramsReturn = array();\n foreach($params as $p => $param)\n {\n if($param > 0 && $param != '' && !is_array($param))\n {\n $paramName = str_replace('.', '_', $p);\n $query[] = $p.' = :'.$paramName;\n $paramsReturn[$paramName] = $param;\n }\n elseif(is_array($param))\n {\n if($param['type'] == 'BETWEEN' && $param['to'] > $param['from'])\n {\n $paramNameFrom = str_replace('.', '_', $p.'_from');\n $paramNameTo = str_replace('.', '_', $p.'_to');\n $query[] = $p.' BETWEEN :'.$paramNameFrom.' AND :'.$paramNameTo;\n $paramsReturn[$paramNameFrom] = $param['from'];\n $paramsReturn[$paramNameTo] = $param['to'];\n }\n }\n }\n $queryString = implode(' AND ', $query);\n return array('query' => $queryString, 'params' => $paramsReturn);\n }",
"public static function createStringFromArray($params)\n {\n ksort($params);\n $query = array();\n foreach ($params as $key => $value) {\n if (!is_scalar($value)) {\n throw new \\InvalidArgumentException('Non-scalar value in parameter: '. $key);\n }\n if (!preg_match('/^sop_/', $key)) {\n $query[] = $key. '='. $value;\n }\n }\n return implode('&', $query);\n }",
"public function formQueryParameters(\n ?array $parameters,\n ?array $metadata\n )\n {\n // Init array\n $query = array();\n\n // Add separator if either parameters or JSON encoded parameter 'metadata' is present and create array to store all parameters + possible metadata\n if (!empty($parameters) || !empty($metadata)) {\n $query['parametersSeparator'] = '?';\n }\n\n // Init query parameters array\n $queryParameters = array();\n\n // Add normal key=value parameters if needed, basically everything else except logout\n if ($parameters !== null) {\n $queryParameters = array_merge($queryParameters, $parameters);\n }\n\n // Add metadata='JSON encoded values'\n if ($metadata !== null) {\n $jsonMetadata = array('metadata' => json_encode($metadata));\n $queryParameters = array_merge($queryParameters, $jsonMetadata);\n }\n\n // Build query if necessary\n if (!empty($queryParameters)) {\n $query['parameters'] = http_build_query($queryParameters);\n }\n\n return $query;\n }",
"function queryString($param_array){\n\t$cnt = 0;\n\t$qstring = null;\n\tforeach ($param_array as $key => $value){\n\t\tif($cnt > 0){\n\t\t\t$qstring .= \"&\" . $key . \"=\" . $value;\n\t\t} else {\n\t\t\t$qstring = $key . \"=\" . $value;\n\t\t}\n\t\t$cnt++;\n\t}\n\treturn $qstring;\n}",
"protected function _buildQueryString($params = array()) {\n if (!is_array($params)) {\n $params = array();\n }\n return count($params) ? http_build_query($params) : \"\";\n }",
"function assoc_array_to_qs( $array = NULL, $get_query_string = TRUE ) {\n\n\t$out = NULL;\n\n\tif ( ! isset( $array ) AND $get_query_string ) {\n\n\t\t$CI =& get_instance();\n\n\t\t$array = $CI->input->get();\n\n\t}\n\n\tif ( is_array( $array ) ) {\n\n\t\t$out = http_build_query( $array, '', '&' );\n\n\t}\n\n\treturn $out ? '?' . $out : '';\n\n}",
"private function generateQueryString(array $queryParams)\n {\n $queryString = http_build_query($queryParams, null, \"&\", PHP_QUERY_RFC3986);\n $queryString = preg_replace(\"/%5B[0-9]*%5D=/\", \"=\", $queryString);\n\n return $queryString;\n }",
"function buildQueryString(Array $array)\n{\n ksort($array);\n $result = [];\n foreach($array as $key => $value) {\n $result[] = \"{$key}={$value}\";\n }\n\n return implode('&', $result);\n}",
"private static function formatParameters(array $params)\n {\n return '[' . implode(', ', array_map(static function ($param) {\n if (is_resource($param)) {\n return (string) $param;\n }\n\n $json = @json_encode($param);\n\n if (! is_string($json) || $json === 'null' && is_string($param)) {\n // JSON encoding failed, this is not a UTF-8 string.\n return sprintf('\"%s\"', preg_replace('/.{2}/', '\\\\x$0', bin2hex($param)));\n }\n\n return $json;\n }, $params)) . ']';\n }",
"private static function build_query($query_array) {\n\t\t\treturn http_build_query($query_array, '', '&', PHP_QUERY_RFC3986);\n\t\t}",
"private function compressParams($params) {\n\t\tif(!$params || (is_array($params) && !count($params)))\n\t\t\treturn '';\n\t\t$params = array();\n\t\tforeach($params as $key=>$value) {\n\t\t\tif(is_array($value))\n\t\t\t\tforeach($value as $sub_value)\n\t\t\t\t\t$params[] = $key.'[]='.$sub_value;\n\t\t\telse\n\t\t\t\t$params[] = $key.'='.$value;\n\t\t}\n\t\treturn implode('&', $params);\n\t}",
"protected function _buildURLParams(array $params)\n {\n $parameters = null;\n foreach ($params as $param => $value) {\n if (is_array($value)) {\n $parameters .= $this->_buildURLParams($value);\n }\n else {\n $parameters .= $param . '=' . urlencode($value) . '&';\n }\n }\n\n return $parameters;\n }",
"function httpBuildQuery($params, $key=null) {\n $ret = array();\n \n foreach((array) $params as $name => $val) {\n $name = urlencode($name);\n if($key !== null) {\n $name = $key . \"[\" . $name . \"]\";\n }\n \n if(is_array($val) || is_object($val)) {\n $ret[] = $this->httpBuildQuery($val, $name);\n } elseif($val !== null) {\n $ret[] = $name . \"=\" . urlencode($val);\n }\n }\n \n return implode(\"&\", $ret);\n }",
"private function GetQueryString($params = array())\n\t{\n\t\tif (count($params) < 1)\n\t\t\treturn null;\n\n\t\t$query = $this->ParameterArrayToQueryVarArray($params);\n\n\t\tif (count($query) < 1)\n\t\t\treturn null;\n\n\t\t$querystr = null;\n\n\t\tforeach ($query as $var => $val) {\n\t\t\tif (empty($val))\n\t\t\t\tcontinue;\n\t\t\tif (!empty($querystr))\n\t\t\t\t$querystr .= '&';\n\t\t\t$querystr .= $var . '=' . rawurlencode($val);\n\t\t}\n\n\t\treturn $querystr;\n\t}",
"public function serialize(array $data)\n {\n return http_build_query($data);\n }"
]
| [
"0.77913237",
"0.74117875",
"0.7366841",
"0.7148972",
"0.70763654",
"0.6943893",
"0.6941809",
"0.6940649",
"0.6938825",
"0.69071275",
"0.683627",
"0.68131775",
"0.6811471",
"0.6713391",
"0.6692591",
"0.6658548",
"0.6637812",
"0.661461",
"0.6542088",
"0.649114",
"0.6485011",
"0.64826715",
"0.6423823",
"0.640967",
"0.63909644",
"0.6383721",
"0.63523716",
"0.63422906",
"0.63246435",
"0.6319504"
]
| 0.7662161 | 1 |
Saves this object to Salsa. | public function save() {
$conn = GFSalsaConnector::instance();
if ($conn) {
$conn->saveObject($this->object, $this);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public final function save() {\n }",
"public function save() {}",
"public function save() {}",
"public function save() {}",
"public final function save()\n {\n }",
"public function save()\n {\n }",
"public function save() {\n\t\t\t\n\t\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 save()\r\n {\r\n \r\n }",
"public function save() {\n }",
"public function save() {\n }",
"public function save()\n {\n $this->checkForNecessaryProperties();\n\n $this->update($this->getCurrentId(), $this->data);\n }",
"public function save() {\n }"
]
| [
"0.7570095",
"0.75594485",
"0.75594485",
"0.7558281",
"0.74639535",
"0.74569625",
"0.7383238",
"0.7375309",
"0.7375309",
"0.7375309",
"0.7375309",
"0.7375309",
"0.7375309",
"0.7375309",
"0.7375309",
"0.7375309",
"0.7375309",
"0.7375309",
"0.7375309",
"0.7375309",
"0.7375309",
"0.7375309",
"0.7375309",
"0.7375309",
"0.7375309",
"0.7359384",
"0.7271339",
"0.7271339",
"0.71876544",
"0.7165732"
]
| 0.81126297 | 0 |
Create a lock exception that indicates a failure to lock due to the resource already being locked. | public static function alreadyLocked(
$resource,
LockMode $mode,
Exception $previous = null
) {
return new self(
sprintf(
'Failed to acquire %s lock on "%s", resource is already locked.',
$mode,
$resource
),
0,
$previous
);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testLockReleaseFailsNotLockedAnymore() {\n\n\t\t\t$lockName = uniqid();\n\n\t\t\tSharedLock::lock($lockName, 0, 10);\n\n\t\t\t// simulate that the database lock was not hold\n\t\t\tif ($this->sqlExecute('DELETE FROM ' . SharedLock::getTable() . ' WHERE name = :name', [':name' => $lockName])->rowCount() != 1) {\n\t\t\t\t$this->fail('Test-Scenario-Error: Simulating lock deleted failed');\n\t\t\t}\n\n\t\t\t$this->setExpectedException(SharedLockReleaseException::class);\n\n\t\t\tSharedLock::unlock($lockName);\n\t\t}",
"public function testException() {\n $lockedOperation = new LockedOperation(new ExceptionLockHandler());\n $lockable = new MyLockable();\n $op = function() {\n return TRUE;\n };\n\n $result = FALSE;\n\n try {\n $result = $lockedOperation->execute($op, $lockable);\n }\n catch(\\LockMan\\Exception\\LockReleaseException $e) {\n $result = $e->getResult();\n }\n\n $this->assertTrue($result);\n }",
"public static function create_lock($lock_name, $release_timeout = \\null)\n {\n }",
"public static function newLock($name) {\n $namespace = PhabricatorLiskDAO::getStorageNamespace();\n $namespace = PhabricatorHash::digestToLength($namespace, 20);\n\n $full_name = 'ph:'.$namespace.':'.$name;\n\n $length_limit = 64;\n if (strlen($full_name) > $length_limit) {\n throw new Exception(\n pht(\n 'Lock name \"%s\" is too long (full lock name is \"%s\"). The '.\n 'full lock name must not be longer than %s bytes.',\n $name,\n $full_name,\n new PhutilNumber($length_limit)));\n }\n\n $lock = self::getLock($full_name);\n if (!$lock) {\n $lock = new PhabricatorGlobalLock($full_name);\n self::registerLock($lock);\n }\n\n return $lock;\n }",
"public function testLockReleaseFailsConnectionLoss() {\n\n\t\t\t$lockName = uniqid();\n\n\t\t\tSharedLock::lock($lockName, 0, 10);\n\n\t\t\t// simulate that the database lock was not hold\n\t\t\ttry {\n\t\t\t\t$this->sqlExecute('KILL connection_id()');\n\t\t\t}\n\t\t\tcatch (\\PDOException $ex) {\n\t\t\t\tif ($ex->getCode() != 70100)\n\t\t\t\t\tthrow $ex;\n\t\t\t}\n\n\t\t\t$this->setExpectedException(SharedLockReleaseException::class);\n\n\t\t\tSharedLock::unlock($lockName);\n\t\t}",
"protected function getPermanentLockedException()\n {\n $exception = new PermanentLockedUserException($this->getAppString('LBL_LOGIN_ATTEMPTS_OVERRUN'));\n $exception->setWaitingErrorMessage($this->getAppString('LBL_LOGIN_ADMIN_CALL'));\n return $exception;\n }",
"public function testAssertTTLFailsNotLockedAnymore() {\n\n\t\t\t$lockName = uniqid();\n\n\t\t\tSharedLock::lock($lockName, 0, 10);\n\n\t\t\t// simulate that the database lock was not hold\n\t\t\tif ($this->sqlExecute('DELETE FROM ' . SharedLock::getTable() . ' WHERE name = :name', [':name' => $lockName])->rowCount() != 1) {\n\t\t\t\t$this->fail('Test-Scenario-Error: Simulating lock deleted failed');\n\t\t\t}\n\n\t\t\t$this->setExpectedException(SharedLockRemainingTTLException::class);\n\n\t\t\tSharedLock::assertTTL($lockName, 1);\n\t\t}",
"private function _acquireLock()\n {\n // set the correct path to the lock resource based on dir and file name.\n $lockResource = $this->_lockPath . \"/\" . self::PID_FILE_NAME;\n echo \"Acquiring exclusive lock $lockResource\\n\";\n\n // Check to see if lock file exists.\n if (file_exists($lockResource)) {\n // If the lock file exists and is not stale, the process is running,\n // leave the process and don't release current lock.\n if (!((filectime($lockResource) + self::PID_FILE_MAX_TIME) <= time())) {\n $this->leave(\n \"Error: database manager is either already running or it did \" .\n \"not exit cleanly during the previous run.\\nPID: $lockResource\\n\",\n false);\n }\n }\n\n // Touches the pid file in order to create it if it does not exist.\n return touch($lockResource);\n }",
"public function testLockedMethod() {\n $lockedOperation = new LockedOperation(self::$lockHandler);\n $lockable = new MyLockable();\n $foo = new Foo();\n\n $result = FALSE;\n\n try {\n $result = $lockedOperation->execute(array($foo, 'bar'), $lockable);\n }\n catch (Exception $ex) {\n // this shouldn't happen.\n }\n\n $this->assertTrue($result);\n $this->assertFalse(isset($ex));\n }",
"public function acquireExclusiveLock() {}",
"public function acquire() {\n\t\t$noWait = TRUE;\n\t\t$isAcquired = FALSE;\n\n\t\t$filePath = $this->getValidFilePath();\n\n\t\t// try to acquire lock\n\t\tfor ($i = 0; $i < $this->getRetries(); $i++) {\n\t\t\t$filePointer = @fopen($filePath, 'w+');\n\t\t\tif ($filePointer !== FALSE) {\n\t\t\t\tif (flock($filePointer, LOCK_EX | LOCK_UN) === TRUE) {\n\t\t\t\t\t$noWait = ($i === 0);\n\t\t\t\t\t$isAcquired = TRUE;\n\t\t\t\t}\n\t\t\t\tfclose($filePointer);\n\t\t\t\tif ($isAcquired) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// sleep for retryInterval\n\t\t\t$this->_waitForRetry();\n\t\t}\n\n\t\t// @todo write own exception class\n\t\tif (!$isAcquired) {\n\t\t\tthrow new Exception('Lock file could not be acquired.');\n\t\t}\n\n\t\t// fix permissions\n\t\tt3lib_div::fixPermissions($filePath);\n\n\t\t$this->_isAcquired = $isAcquired;\n\n\t\treturn $noWait;\n\t}",
"public function trylock() {}",
"abstract protected function acquireLock($name, $timeout = 0);",
"function lock_acquire($name, $timeout = 30.0) {\n global $locks;\n\n // Insure that the timeout is at least 1 ms.\n $timeout = max($timeout, 0.001);\n $expire = microtime(TRUE) + $timeout;\n if (isset($locks[$name])) {\n // Try to extend the expiration of a lock we already acquired.\n $success = (bool) db_update('semaphore')\n ->fields(array('expire' => $expire))\n ->condition('name', $name)\n ->condition('value', _lock_id())\n ->execute();\n if (!$success) {\n // The lock was broken.\n unset($locks[$name]);\n }\n return $success;\n }\n else {\n // Optimistically try to acquire the lock, then retry once if it fails.\n // The first time through the loop cannot be a retry.\n $retry = FALSE;\n // We always want to do this code at least once.\n do {\n try {\n db_insert('semaphore')\n ->fields(array(\n 'name' => $name,\n 'value' => _lock_id(),\n 'expire' => $expire,\n ))\n ->execute();\n // We track all acquired locks in the global variable.\n $locks[$name] = TRUE;\n // We never need to try again.\n $retry = FALSE;\n }\n catch (PDOException $e) {\n // Suppress the error. If this is our first pass through the loop,\n // then $retry is FALSE. In this case, the insert must have failed\n // meaning some other request acquired the lock but did not release it.\n // We decide whether to retry by checking lock_may_be_available()\n // Since this will break the lock in case it is expired.\n $retry = $retry ? FALSE : lock_may_be_available($name);\n }\n // We only retry in case the first attempt failed, but we then broke\n // an expired lock.\n } while ($retry);\n }\n return isset($locks[$name]);\n}",
"public function acquireSharedLock() {}",
"private function createLock($key) {\n // but we'll ignore that out of convenience\n @apc_add($key . '.lock', '', 5);\n }",
"public function testLockSsnFailsOnLock()\n\t{\n\t\t$this->store->lockSsn('123456789');\n\t\t$this->assertFalse($this->store->lockSsn('123456789'));\n\t}",
"abstract protected function lock(): void;",
"function create_lock(string $key): bool\n{\n if (is_lock($key)) {\n return false;\n }\n $logger = \\Logger::getLogger(\"files.lock\");\n $lockfn = get_lock_filename($key);\n $logger->debug(\"Lock filename: '$lockfn'\");\n if (file_exists($lockfn)) {\n unlink($lockfn);\n }\n touch($lockfn);\n $exists = file_exists($lockfn);\n if (!$exists) {\n $logger->error(\"Could not create lock file - $lockfn\");\n return false;\n }\n return true;\n}",
"private function createLock($key) {\n // but we'll ignore that out of convenience\n @apc_add ( $key . '.lock', '', 5 );\n }",
"public function testAssertTTLFailsNotEnoughRemaining() {\n\n\t\t\t$lockName = uniqid();\n\n\t\t\tSharedLock::lock($lockName, 0, 10);\n\n\t\t\t$this->setExpectedException(SharedLockRemainingTTLException::class);\n\n\t\t\tSharedLock::assertTTL($lockName, 20);\n\t\t}",
"public function lock()\n {\n if ($this->isLocked()) {\n throw new RuntimeException('Cannot lock: already locked');\n }\n\n $this->conn->set('lock:' . $this->name, $this->id);\n }",
"function lock() {\n global $_Query_lock_depth;\n if ($_Query_lock_depth < 0) {\n Fatal::internalError('Negative lock depth');\n }\n if ($_Query_lock_depth == 0) {\n $row = $this->select1($this->mkSQL('select get_lock(%Q, %N) as locked',\n OBIB_LOCK_NAME, OBIB_LOCK_TIMEOUT));\n if (!isset($row['locked']) or $row['locked'] != 1) {\n Fatal::cantLock();\n }\n }\n $_Query_lock_depth++;\n }",
"function lock(Sabre_DAV_Locks_LockInfo $lockInfo);",
"public function walletlock()\n\t{\n\t\treturn $this->_get_error($this->connect('walletlock'));\n\t}",
"function trylock($obj) {\n\n\t\t$this->send(self::REQ_TRY_LOCK, $obj);\n\n\t\tlist($op, $p) = $this->receive();\n\n\t\tswitch ($op) {\n\t\t\tcase self::REP_LOCK_ACQUIRED:\n\t\t\t\treturn true;\n\t\t\t\tbreak;\n\t\t\tcase self::REP_LOCK_WBLOCK:\n\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new LockException($this->decode_reply($op) . \": \" . $p);\n\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public function testParallelLockExpired(): void\n {\n $testLifeTime = 2;\n \\Closure::bind(function (Cache $class) use ($testLifeTime) {\n $class->defaultLifetime = $testLifeTime;\n }, null, $this->cacheInstance1)($this->cacheInstance1);\n\n $identifier1 = \\uniqid('lock_name_1_', true);\n\n $this->assertTrue($this->cacheInstance1->lock($identifier1, 0));\n $this->assertTrue($this->cacheInstance2->lock($identifier1, $testLifeTime + 1));\n\n $this->cacheInstance2->unlock($identifier1);\n }",
"public function testAcquire() {\n\n\t\t\t$lockName = uniqid();\n\n\t\t\t// simply try to lock\n\t\t\tSharedLock::lock($lockName, 5, 10);\n\t\t}",
"public function testParallelLock(): void\n {\n $identifier1 = \\uniqid('lock_name_1_', true);\n\n $this->assertTrue($this->cacheInstance1->lock($identifier1));\n\n $this->assertFalse($this->cacheInstance1->lock($identifier1, 0));\n $this->assertFalse($this->cacheInstance2->lock($identifier1, 0));\n }",
"protected function breakIfLocked(string $key)\n {\n if (isset($this->immutablePairs[$key])) {\n throw new LockedException();\n }\n }"
]
| [
"0.66719204",
"0.6241131",
"0.61270505",
"0.6115395",
"0.5988975",
"0.5827146",
"0.5808766",
"0.5804378",
"0.57868963",
"0.57607096",
"0.5670026",
"0.5609787",
"0.5608432",
"0.5563541",
"0.5485648",
"0.5476079",
"0.5428137",
"0.5416461",
"0.541054",
"0.5370346",
"0.5366885",
"0.5366586",
"0.53663796",
"0.5307231",
"0.53069377",
"0.5282999",
"0.5273568",
"0.5266804",
"0.52661973",
"0.5253333"
]
| 0.67340326 | 0 |
Returns an \Google\Rpc\Status object from an gRPC function call status value, with details decoded to Any if available. | public static function parseStatus($status) {
$rpcStatus = new \Google\Rpc\Status();
if (isset($status->metadata['grpc-status-details-bin'])) {
if (is_array($status->metadata['grpc-status-details-bin']) && count($status->metadata['grpc-status-details-bin']) > 0) {
$rpcStatus->mergeFromString($status->metadata['grpc-status-details-bin'][0]);
return $rpcStatus;
}
}
$rpcStatus->setCode($status->code);
$rpcStatus->setMessage($status->details);
return $rpcStatus;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function checkStatus($status) {\n $rpcStatus = self::parseStatus($status);\n if ($rpcStatus->getCode() != \\Grpc\\STATUS_OK) {\n throw new Exception($rpcStatus);\n }\n return $rpcStatus;\n }",
"public function call() : GetStatusInterface;",
"function api_status()\n{\n $result;\n return _do_api_call('GET', '/api/v1/status', null, $result);\n}",
"protected static function parseStatus() {\n // Load from cache (if exists).\n if (($status = static::parseStatusCache())) {\n return $status;\n }\n\n // Load Drupal core status via Drush.\n /** @var \\Thunder\\Robo\\Utility\\Drush $drush */\n $drush = Robo::getContainer()->get('drush');\n $output = $drush->exec()\n ->arg('core-status')\n ->option('format=json')\n ->silent(TRUE)\n ->run()\n ->getMessage();\n\n // Unable to parse Drupal core status JSON.\n if (!($status = @json_decode($output))) {\n print $output;\n\n throw new \\Exception(__CLASS__ . ' - Unable to parse Drupal status.');\n }\n\n // Cast status.\n $status = new DrupalCoreStatus((object) $status);\n\n // Save to cache (if bootstrapped).\n if (static::statusIsBootstrapped($status)) {\n static::parseStatusCache($status);\n }\n\n return $status;\n }",
"public function get_status($mixed = null) {\n\t\t$validParameters = array(\n\t\t\t'(orderv2\\get_status)',\n\t\t);\n\t\t$args = func_get_args();\n\t\t$this->_checkArguments($args, $validParameters);\n\t\treturn $this->__soapCall('get_status', $this->make_soap_params($mixed));\n\t}",
"public function callGetServiceStatus() {\n\t\t$requestArray = $this->signArray();\n\t\treturn $this->getServiceStatus($requestArray);\n\t}",
"public function getStatus()\n {\n return $this->_makeCall('status');\n }",
"public function addStatuses(\\google\\rpc\\Status $value){\n return $this->_add(1, $value);\n }",
"#[Pure]\n public function getResponseStatus() {}",
"#[Pure]\n public function getResponseStatus() {}",
"public function getStatus()\n {\n if (array_key_exists(\"status\", $this->_propDict)) {\n if (is_a($this->_propDict[\"status\"], \"\\Beta\\Microsoft\\Graph\\Model\\TeamsAsyncOperationStatus\") || is_null($this->_propDict[\"status\"])) {\n return $this->_propDict[\"status\"];\n } else {\n $this->_propDict[\"status\"] = new TeamsAsyncOperationStatus($this->_propDict[\"status\"]);\n return $this->_propDict[\"status\"];\n }\n }\n return null;\n }",
"abstract public function GetStatus();",
"function convertResolutionStatus($status) {\n switch ($status) {\n case 'pending':\n return 'Pending';\n break;\n case 'passed':\n return 'Passed';\n break;\n case 'failed':\n return 'Failed';\n break;\n case 'in_session':\n return 'In Session';\n break;\n case 'shelved':\n return 'Shelved';\n break;\n }\n}",
"function getFunctionStatus($funcname, $funcresult, $pid, $dsid) {\n $type = gettype($funcresult);\n if ($funcresult == MS_SUCCESS) {\n $this->log->lwrite($funcname . \" function successful\", 'SOAP_LOG', $pid, $dsid, NULL, 'INFO');\n $result = MS_SUCCESS;\n }\n else {\n $this->log->lwrite($funcname . \" function failed with code $funcresult\", 'SOAP_LOG', $pid, $dsid, NULL, 'ERROR');\n if ($type == 'integer') {\n $result = $funcresult;\n }\n else {\n $result = MS_SYSTEM_EXCEPTION; //make sure we return an int;\n }\n }\n return $result;\n }",
"function getStatus();",
"public static function convertObjectStatus($value){\n $status=ConstantDefine::getObjectStatus();\n if(isset($status[$value])){\n return $status[$value];\n } else {\n return t('undefined');\n }\n }",
"function f_valida_status ($return) {\n # recebo object{} po $return\n\n # transforma em array\n $return = (json_decode($return, true));\n\n # Verifica se existe status\n if(array_key_exists('status', $return['0'])){\n # converto para smal case o texto solicitado\n $return['0']['status'] = strtolower($return['0']['status']);\n\n switch ($return['0']['status']) {\n # caso seja ativo\n case 'active':\n return true;\n break;\n case 'actived':\n return true;\n break;\n case 'ativo':\n return true;\n break;\n case 'desativo':\n return true;\n break;\n\n # caso seja desativado retorna falso\n case 'dasebled':\n return false;\n break;\n case 'desable':\n return false;\n break;\n case 'inative':\n return false;\n break;\n case 'inativo':\n return false;\n break;\n case 'desativo':\n return false;\n break;\n\n # caso seja removido retorna falso\n case 'exclude':\n return 'excluded';\n break;\n case 'removed':\n return 'excluded';\n break;\n case 'excluido':\n return 'excluded';\n break;\n }\n }\n\n # Caso não tenha status passa como valido\n else{\n return true;\n }\n}",
"protected function get_status_info() {\n\n\t\t$status = new stdClass();\n\n\t\tif ( $this->transaction_approved() ) {\n\n\t\t\t$status->code = $this->bank_resp_code;\n\t\t\t$status->message = $this->bank_message;\n\n\t\t} else {\n\n\t\t\tif ( $this->has_gateway_error() ) {\n\n\t\t\t\t$status->code = $this->exact_resp_code;\n\t\t\t\t$status->message = $this->exact_message;\n\n\t\t\t} else {\n\n\t\t\t\t$status->code = $this->bank_resp_code;\n\t\t\t\t$status->message = $this->bank_message;\n\t\t\t}\n\n\t\t}\n\n\t\treturn $status;\n\t}",
"public function getResponseStatus( $value, $defaultValue, $mergeInputSettings = null, $mergeLabelSettings = null, $mergeOptions = null )\n {\n $items = array(\n '' => array( 'value' => '', 'text' => '' ),\n 'draft' => array( 'value' => 'draft', 'text' => 'Draft' ),\n 'active' => array( 'value' => 'active', 'text' => 'Active' ),\n 'inactive' => array( 'value' => 'inactive', 'text' => 'Inactive' ),\n 'deleted' => array( 'value' => 'deleted', 'text' => 'Deleted' ),\n );\n\n $inputSettings = array(\n 'value' => $value,\n 'defaultValue' => $defaultValue,\n 'name' => 'responseStatus',\n 'items' => $items,\n );\n\n $labelSettings = array(\n 'text' => 'Status',\n );\n\n $options = array(\n 'attributes' => array(\n 'class' => 'form-item--small'\n )\n );\n\n if ( $mergeInputSettings ) {\n $inputSettings = array_merge( $inputSettings, $mergeInputSettings );\n }\n\n if ( $mergeLabelSettings ) {\n $labelSettings = array_merge( $labelSettings, $mergeLabelSettings );\n }\n\n if ( $mergeOptions ) {\n $options = array_merge( $options, $mergeOptions );\n }\n\n return $this->getSelect( $inputSettings, $labelSettings, $options );\n }",
"public function getStatusMessage();",
"public function status(): mixed\n {\n return new Status('status');\n }",
"private function change_status(int $status, callable $callable)\n\t{\n\t\t$this->status = $status;\n\t\t$rc = $callable();\n\t\t$this->status = $status + 1;\n\n\t\treturn $rc;\n\t}",
"function getStatus() ;",
"function getStatus() ;",
"function getStatus() ;",
"public static function getStatusCodeMessage($status)\n\t\t{\n\t\t\t// via parse_ini_file()... however, this will suffice\n\t\t\t// for an example\n\t\t\t$codes = Array(\n\t\t\t\t100 => 'Continue',\n\t\t\t\t101 => 'Switching Protocols',\n\t\t\t\t200 => 'OK',\n\t\t\t\t201 => 'Created',\n\t\t\t\t202 => 'Accepted',\n\t\t\t\t203 => 'Non-Authoritative Information',\n\t\t\t\t204 => 'No Content',\n\t\t\t\t205 => 'Reset Content',\n\t\t\t\t206 => 'Partial Content',\n\t\t\t\t300 => 'Multiple Choices',\n\t\t\t\t301 => 'Moved Permanently',\n\t\t\t\t302 => 'Found',\n\t\t\t\t303 => 'See Other',\n\t\t\t\t304 => 'Not Modified',\n\t\t\t\t305 => 'Use Proxy',\n\t\t\t\t306 => '(Unused)',\n\t\t\t\t307 => 'Temporary Redirect',\n\t\t\t\t400 => 'Bad Request',\n\t\t\t\t401 => 'Unauthorized',\n\t\t\t\t402 => 'Payment Required',\n\t\t\t\t403 => 'Forbidden',\n\t\t\t\t404 => 'Not Found',\n\t\t\t\t405 => 'Method Not Allowed',\n\t\t\t\t406 => 'Not Acceptable',\n\t\t\t\t407 => 'Proxy Authentication Required',\n\t\t\t\t408 => 'Request Timeout',\n\t\t\t\t409 => 'Conflict',\n\t\t\t\t410 => 'Gone',\n\t\t\t\t411 => 'Length Required',\n\t\t\t\t412 => 'Precondition Failed',\n\t\t\t\t413 => 'Request Entity Too Large',\n\t\t\t\t414 => 'Request-URI Too Long',\n\t\t\t\t415 => 'Unsupported Media Type',\n\t\t\t\t416 => 'Requested Range Not Satisfiable',\n\t\t\t\t417 => 'Expectation Failed',\n\t\t\t\t500 => 'Internal Server Error',\n\t\t\t\t501 => 'Not Implemented',\n\t\t\t\t502 => 'Bad Gateway',\n\t\t\t\t503 => 'Service Unavailable',\n\t\t\t\t504 => 'Gateway Timeout',\n\t\t\t\t505 => 'HTTP Version Not Supported',\n\t\t\t\t600 => 'OK',\n\t\t\t\t601 => 'Bad request',\n\t\t\t\t602 => 'You must be authorized to view this page.',\n\t\t\t\t603 => 'The requested URL ' . $_SERVER['REQUEST_URI'] . ' was not found.',\n\t\t\t\t604 => 'The server encountered an error processing your request.',\n\t\t\t\t605 => 'The requested method is not implemented.',\n\t\t\t\t606 => 'You have exceeded api call limit for the hour',\n\t\t\t\t607 => 'You have exceeded api call limit for the day'\n\t\t\t);\n\t\n\t\t\treturn (isset($codes[$status])) ? $codes[$status] : '';\n\t\t}",
"public function getStatus(): UnitEnum|string;",
"public static function unpackStatusDetails($rpcStatus) {\n $ret = [];\n foreach ($rpcStatus->getDetails() as $det) {\n $ret[] = $det->unpack();\n }\n return $ret;\n }",
"public function getStatus(): \\stdClass\n {\n return $this->get('status');\n }",
"public function getServiceStatus($request)\n {\n require_once (dirname(__FILE__) . '/Model/GetServiceStatusResponse.php');\n return MarketplaceWebServiceProducts_Model_GetServiceStatusResponse::fromXML($this->_invoke('GetServiceStatus'));\n }"
]
| [
"0.60457575",
"0.6005664",
"0.54863447",
"0.5470027",
"0.53710616",
"0.53211653",
"0.53138286",
"0.5304601",
"0.52753896",
"0.52753896",
"0.51966995",
"0.517098",
"0.51434726",
"0.5124029",
"0.5111796",
"0.5087603",
"0.50686485",
"0.5046276",
"0.502438",
"0.49887228",
"0.4984013",
"0.49758866",
"0.49705675",
"0.49705675",
"0.4970176",
"0.49500167",
"0.4946424",
"0.49244392",
"0.49152225",
"0.48987678"
]
| 0.6830664 | 0 |
Unpacks the list of details messages from an RPC status. | public static function unpackStatusDetails($rpcStatus) {
$ret = [];
foreach ($rpcStatus->getDetails() as $det) {
$ret[] = $det->unpack();
}
return $ret;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function parseStatus($status) {\n $rpcStatus = new \\Google\\Rpc\\Status();\n if (isset($status->metadata['grpc-status-details-bin'])) {\n if (is_array($status->metadata['grpc-status-details-bin']) && count($status->metadata['grpc-status-details-bin']) > 0) {\n $rpcStatus->mergeFromString($status->metadata['grpc-status-details-bin'][0]);\n return $rpcStatus;\n }\n }\n $rpcStatus->setCode($status->code);\n $rpcStatus->setMessage($status->details);\n return $rpcStatus;\n }",
"abstract protected function getStatusesInfos();",
"function VM_parseStatus($type, $status)\n{\n\tswitch ($type)\n\t{\n\t\tcase VM_SW_VBOX:\n\t\t\tforeach (explode(\"\\n\",$status) AS $line)\n\t\t\t{\n\t\t\t\t//Split the variable name and the value\n\t\t\t\t$varVal = explode(\": \",$line);\n\n\t\t\t\t//Parse the parameters\n\t\t\t\tswitch($varVal[0])\n\t\t\t\t{\n\t\t\t\t\tcase \"Name\": $out['vmName'] = $varVal[1]; break;\n\t\t\t\t\tcase \"Floppy\": $out['floppy'] = VM_parseVBOXdisk($varVal[1]); break;\n\t\t\t\t\tcase \"Primary master\": $out['hda'] = VM_parseVBOXdisk($varVal[1]); break;\n\t\t\t\t\tcase \"Primary slave\": $out['hdb'] = VM_parseVBOXdisk($varVal[1]); break;\n\t\t\t\t\tcase \"Secondary slave\": $out['hdc'] = VM_parseVBOXdisk($varVal[1]); break;\n\t\t\t\t\tcase \"DVD\": $out['dvd'] = VM_parseVBOXdisk($varVal[1]); break;\n\t\t\t\t\tcase \"State\": $out['state'] = VM_parseVBOXstate($varVal[1]); break;\n\t\t\t\t\tcase \"NIC 1\": $out['nic1'] = VM_parseVBOXNic($line); break;\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t}\n\treturn($out);\n}",
"public function process()\n\t{\n\t\t$this->status = 1;\n\t\tif (($ip = \\App\\RequestUtil::getRemoteIP(true)) && ($blackList = \\App\\Mail\\Rbl::findIp($ip))) {\n\t\t\tforeach ($blackList as $row) {\n\t\t\t\tif (1 !== (int) $row['status'] && (\\App\\Mail\\Rbl::LIST_TYPE_BLACK_LIST === (int) $row['type']) || (\\App\\Mail\\Rbl::LIST_TYPE_PUBLIC_BLACK_LIST === (int) $row['type'])) {\n\t\t\t\t\t$this->status = 0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (!$this->status) {\n\t\t\t\t$this->description = \\App\\Language::translate('LBL_BLACK_LIST_ALERT', 'OSSMail');\n\t\t\t}\n\t\t}\n\t}",
"function getDetailedStatus() ;",
"public function get_message_structure($uid) {\n\t\t$this->clean($uid, 'uid');\n\t\t$part_num = 1;\n\t\t$struct = array();\n\t\t$command = \"UID FETCH $uid BODYSTRUCTURE\\r\\n\";\n\t\t$this->send_command($command);\n\t\t$result = $this->get_response(false, true);\n\n\t\twhile (isset($result[0][0]) && isset($result[0][1]) && $result[0][0] == '*' && strtoupper($result[0][1]) == 'OK') {\n\t\t\tarray_shift($result);\n\t\t}\n\t\t$status = $this->check_response($result, true);\n\t\t$response = array();\n\t\tif (!isset($result[0][4])) {\n\t\t\t$status = false;\n\t\t}\n\t\tif ($status) {\n\t\t\tif (strtoupper($result[0][4]) == 'UID') {\n\t\t\t\t$response = array_slice($result[0], 7, -1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$response = array_slice($result[0], 5, -1);\n\t\t\t}\n\t\t\t$response = $this->split_toplevel_result($response);\n\t\t\tif (count($response) > 1) {\n\t\t\t\t$struct = $this->parse_multi_part($response, 1, 1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$struct[1] = $this->parse_single_part($response);\n\t\t\t}\n\t\t}\n\n\t\treturn $struct;\n\t}",
"public function getMessageByStatus($status, $status_detail)\n {\n $status = $this->validStatusTwoPayments($status);\n $status_detail = $this->validStatusTwoPayments($status_detail);\n\n $message = [\n \"title\" => \"\",\n \"message\" => \"\"\n ];\n\n $rawMessage = $this->_statusMessage->getMessage($status);\n $message['title'] = __($rawMessage['title']);\n\n if ($status == 'rejected') {\n $message['message'] = __($this->_statusDetailMessage->getMessage($status_detail));\n } else {\n $message['message'] = __($rawMessage['message']);\n }\n\n return $message;\n }",
"public function fetchPageInfo(string $status): array\n {\n return parent::restGetPageInfo(['companies', $this->client->getCompanyId(), 'tickets', $status],\n ['api_key' => $this->client->getApiKey()]);\n }",
"function messageStatus($ids)\n {\n\n if (!is_array($ids)) {\n $ids = array($ids);\n }\n\n $ids = implode(',', $ids);\n\n $url = sprintf('cmd=message_status&ids=%s',\n urlencode($ids));\n\n $response = $this->_callURL($url);\n\n if (is_a($response, 'PEAR_Error')) {\n return PEAR::raiseError(sprintf(_(\"Send failed.\")));\n }\n\n $result = array();\n\n if (!array_key_exists('error_code', $response)) {\n\n if (count(explode(',', $ids)) == 1) {\n\n $result[$ids] = array(\n 0 => 1,\n 1 => $response[$ids]\n );\n } else {\n foreach ($response as $id => $message) {\n $result[$id] = array(1, $message);\n }\n }\n } else {\n\n if (count(explode(',', $ids)) == 1) {\n\n $result[$to] = array(\n 0 => 0,\n 1 => $response['error_message']\n );\n } else {\n foreach (explode(',', $ids) as $id) {\n $result[$id] = array(0, $response['error_message']);\n }\n }\n }\n\n return $result;\n }",
"public function getUpdateInfo($mbooth_xml, $status = 1){\n\t\t$result = array();\n\n\t\t$current_version = $this->getVersion($mbooth_xml);\n\t\t$customer_url = HTTP_SERVER;\n\t\t$query = $this->db->query(\"SELECT * FROM `\" . DB_PREFIX . \"language` WHERE language_id = \" . (int)$this->config->get('config_language_id') ); \n\t\t$language_code = $query->row['code'];\n\t\t$ip = $this->request->server['REMOTE_ADDR'];\n\n\t\t$request = 'http://opencart.dreamvention.com/api/1/index.php?route=extension/check&mbooth=' . $mbooth_xml . '&store_url=' . $customer_url . '&module_version=' . $current_version . '&language_code=' . $language_code . '&opencart_version=' . VERSION . '&ip='.$ip . '&status=' .$status;\n\n\t\t$curl = curl_init();\n\t\tcurl_setopt($curl, CURLOPT_URL, $request);\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n\t\t$result['data'] = curl_exec($curl);\n\t\t$result['code'] = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n\t\tcurl_close($curl);\n\n\t\treturn $result;\n\t}",
"protected function processMessages()\n {\n while ($done = curl_multi_info_read($this->multiHandle)) {\n $request = $this->resourceHash[(int)$done['handle']];\n $this->processResponse($request, $this->handles[$request], $done);\n }\n }",
"function displayStatusList($data) {\n\t\t\n\t\t$display = '';\n\t\t\n\t\tforeach($data as $value) {\n\t\t\t$id = $value['id'];\n\t\t\t$from_id = $value['from_id'];\n\t\t\t$from_name = $value['from_name'];\n\t\t\t$type = $value['type'];\n\t\t\t$message = $value['message'];\n\t\t\t$picture = $value['picture'];\n\t\t\t$link = $value['link'];\n\t\t\t$source = $value['source'];\n\t\t\t$name = $value['name'];\n\t\t\t$caption = $value['caption'];\n\t\t\t$description = $value['description'];\n\t\t\t$icon = $value['icon'];\n\t\t\t$created = $value['created'];\n\t\t\t$attribution = $value['attribution'];\n\t\t\t$likes_nb = $value['likes_nb'];\n\t\t\t$comments = $value['comments'];\n\t\t\t$comments_nb = $value['comments_nb'];\n\t\t\t$action_comment = $value['action_comment'];\n\t\t\t$picture_url = $value['picture_url'];\n\t\t\t$profile_url = $value['profile_url'];\n\t\t\t\n\t\t\t$display .= '<table id=\"itemBox\" value=\"'.$id.'\" border=0 style=\"padding-top: 0px;padding-bottom: 10px;border-bottom: 1px solid #cfcfcf;\" width=100% cellpadding=0 cellspacing=0><tr>';\n\t\t\t\n\t\t\t$display .= '<td width=20 valign=\"top\">';\n\t\t\t$display .= '<a href=\"'.$profile_url.'\" title=\"'.$from_name.'\" target=\"_blank\"><img src=\"'.$picture_url.'\" style=\"padding-right:10px;\"></a>';\n\t\t\t$display .= '</td>';\n\t\t\t\n\t\t\t$display .= '<td valign=\"top\">';\n\t\t\t\t\n\t\t\t\t$display .= '<table width=100% cellpadding=0 cellspacing=0><tr><td>';\n\t\t\t\t$display .= '<p style=\"padding-bottom:8px;\"><a href=\"'.$profile_url.'\" title=\"'.$from_name.'\" target=\"_blank\">'.$from_name.'</a> ';\n\t\t\t\tif($message!='') $display .= ''.$message.'';\n\t\t\t\t$display .= '</p>';\n\t\t\t\t\t\t\n\t\t\t\tif($type=='status') {\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if($type=='photo') {\n\t\t\t\t\t$display .= '<a href=\"'.$link.'\" target=\"_blank\"><img src=\"'.$picture.'\" style=\"padding-right:10px;\" align=\"left\"></a>';\n\t\t\t\t\tif($name!='') $display .= '<a href=\"'.$link.'\" target=\"_blank\">'.$name.'</a><br>';\n\t\t\t\t\tif($caption!='') $display .= '<small><span>'.$caption.'</a></small>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if($type=='link') {\n\t\t\t\t\tif($picture!='') $display .= '<a href=\"'.$link.'\" target=\"_blank\" title=\"'.$name.'\"><img src=\"'.$picture.'\" style=\"padding-right:10px;\" align=\"left\"></a>';\n\t\t\t\t\t$display .= '<a href=\"'.$link.'\" target=\"_blank\" title=\"'.$caption.'\">'.$name.'</a><br>';\n\t\t\t\t\tif($caption!='') $display .= '<small><span>'.$caption.'</a></small><br>';\n\t\t\t\t\tif($description!='') $display .= '<small><span>'.$description.'</a></small>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse {\n\t\t\t\t\t\n\t\t\t\t\t$display .= '<div id=\"domImage\" class=\"videoPlayBox\" style=\"float:left;\" >';\n\t\t\t\t\t\t$display .= '<a href=\"'.$link.'\" target=\"_blank\" title=\"'.$name.'\">';\n\t\t\t\t\t\t\tif($picture!='') {\n\t\t\t\t\t\t\t\t$display .= '<img src=\"'.$picture.'\" width=80 height=55 style=\"padding-right:10px;\"/>';\n\t\t\t\t\t\t\t\t$display .= '<span class=\"play\"></span>';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t$display .= '</a>';\n\t\t\t\t\t$display .= '</div>';\n\t\t\t\t\t\n\t\t\t\t\tif($name!='') $display .= '<a href=\"'.$link.'\" target=\"_blank\">'.$name.'</a><br>';\n\t\t\t\t\tif($description!='') $display .= '<small><span>'.$description.'</span></small>';\n\t\t\t\t}\n\t\t\t\t$display .= '</td></tr>';\n\t\t\t\t\n\t\t\t\t$display .= '<tr><td style=\"padding-top:5px;\">';\n\t\t\t\tif($icon!='') $display .= '<img src=\"'.$icon.'\"> ';\n\t\t\t\t$display .= '<small>';\n\t\t\t\t$display .= '<a href=\"'.$action_comment.'\" target=\"_blank\" title=\"'.$created.'\" class=\"grey prettyDate\">'.$created.'</a>';\n\t\t\t\t//if($attribution!='') $display .= '<span> via '.$attribution.'</span>';\n\t\t\t\t$display .= '</small>';\n\t\t\t\t\n\t\t\t\t//$display .= ' - <small><a id=\"openCloseAddComment\" href=\"#\">Comment</a></small> - <a href=\"comments.php\" rel=\"external\" data-transition=\"slide\">gogogo</a>';\n\t\t\t\t\n\t\t\t\t// ##################### //\n\t\t\t\t// START Comment Section //\n\t\t\t\t// ##################### //\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t$commentCriteria = array();\n\t\t\t\t$commentCriteria['resourceid'] = $id;\n\t\t\t\t$commentCriteria['commentCount'] = $comments_nb;\n\t\t\t\t$commentCriteria['collapse'] = 1; //comments collapsed\n\t\t\t\t$commentCriteria['hideOnAction'] = 1;\n\t\t\t\t\n\t\t\t\t//comments display\n\t\t\t\t$display .= '<div id=\"domAddCommentBox\" style=\"padding-top:10px;display:none;\">';\n\t\t\t\t\t$display .= $this->displayAddComment($commentCriteria);\n\t\t\t\t$display .= '</div>';\n\t\t\t\t$display .= '<div style=\"padding-top:5px;\">';\n\t\t\t\t\t$display .= $this->displayComments($commentCriteria);\n\t\t\t\t$display .= '</div>';\n\t\t\t\t*/\n\t\t\t\t\n\t\t\t\t// ################### //\n\t\t\t\t// END Comment Section //\n\t\t\t\t// ################### //\n\t\t\t\t\n\t\t\t\t$display .= '</td></tr></table>';\n\t\t\t\t\n\t\t\t$display .= '</td>';\n\t\t\t$display .= '</tr></table><br>';\n\t\t}\n\t\t\n\t\treturn $display;\n\t}",
"protected function prepareUpdateData(array $status) {\n $updates = [];\n\n // @todo Calling locale_translation_build_projects() is an expensive way to\n // get a module name. In follow-up issue\n // https://www.drupal.org/node/1842362 the project name will be stored to\n // display use, like here.\n $this->moduleHandler->loadInclude('locale', 'compare.inc');\n $project_data = locale_translation_build_projects();\n\n foreach ($status as $project) {\n foreach ($project as $langcode => $project_info) {\n // No translation file found for this project-language combination.\n if (empty($project_info->type)) {\n $updates[$langcode]['not_found'][] = [\n 'name' => $project_info->name == 'drupal' ? $this->t('Drupal core') : $project_data[$project_info->name]->info['name'],\n 'version' => $project_info->version,\n 'info' => $this->createInfoString($project_info),\n ];\n }\n // Translation update found for this project-language combination.\n elseif ($project_info->type == LOCALE_TRANSLATION_LOCAL || $project_info->type == LOCALE_TRANSLATION_REMOTE) {\n $local = $project_info->files[LOCALE_TRANSLATION_LOCAL] ?? NULL;\n $remote = $project_info->files[LOCALE_TRANSLATION_REMOTE] ?? NULL;\n $recent = _locale_translation_source_compare($local, $remote) == LOCALE_TRANSLATION_SOURCE_COMPARE_LT ? $remote : $local;\n $updates[$langcode]['updates'][] = [\n 'name' => $project_info->name == 'drupal' ? $this->t('Drupal core') : $project_data[$project_info->name]->info['name'],\n 'version' => $project_info->version,\n 'timestamp' => $recent->timestamp,\n ];\n }\n }\n }\n return $updates;\n }",
"function wpmantis_get_status_translation()\n{\n\t$options = get_option('wp_mantis_options');\n\textract($options);\n\t$client = new SoapClient($mantis_soap_url);\n\ttry\n\t{\t\n\t\t$results = $client->mc_enum_status($mantis_user, $mantis_password);\n\t\t\n\t\tforeach ($results as $result)\n\t\t{\n\t\t\t\t$id = $result->id;\n\t\t\t\t$name = $result->name;\n\t\t\t\t\n\t\t\t\t$mantis_statuses[$id] = $name;\n\t\t}\n\t\t$options['mantis_statuses'] = $mantis_statuses;\n\t\tupdate_option('wp_mantis_options', $options);\n\t\t\n\t\t?>\n <div id=\"message\" class=\"updated fade\">\n <p><?php _e('Options saved.', 'wp-mantis'); ?></p>\n </div>\n <?php\n\t}\n\tcatch(SoapFault $e)\n\t{\n\t\tthrow $e;\n\t\t?>\n <div id=\"message\" class=\"error fade\">\n <p><?php printf(__('Error: %s', 'wp-mantis'), $e->getMessage()); ?></p>\n </div>\n <?php\n\t}\n}",
"function odd_admin_preprocess_status_messages(&$variables) {\n $variables['message_classes'] = [];\n $variables['message_icons'] = [];\n\n // Set the message classes and icons.\n foreach ($variables['message_list'] as $type => $messages) {\n $variables['message_classes'][$type] = $type;\n\n switch ($type) {\n case 'status':\n $variables['message_classes'][$type] = 'success';\n $variables['message_icons'][$type] = 'info circle icon';\n break;\n\n case 'error':\n $variables['message_icons'][$type] = 'remove circle icon';\n break;\n\n case 'warning':\n $variables['message_icons'][$type] = 'warning circle icon';\n break;\n\n default:\n $variables['message_icons'][$type] = 'announcement icon';\n }\n }\n}",
"protected function _updateRefundDetails()\n {\n $sQuery = \"SELECT BESTITAMAZONREFUNDID\n FROM bestitamazonrefunds\n WHERE STATE = 'Pending'\n AND BESTITAMAZONREFUNDID != ''\";\n\n $aResult = $this->_getContainer()->getDatabase()->getAll($sQuery);\n\n $this->_oLogger->info(\n 'Fetched orders and processed',\n array('orderNumbers' => array_keys($aResult))\n );\n\n foreach ($aResult as $aRow) {\n $oData = $this->_getContainer()->getClient()->getRefundDetails($aRow['BESTITAMAZONREFUNDID']);\n\n if (isset($oData->GetRefundDetailsResult->RefundDetails->RefundStatus->State)) {\n $this->_addToMessages(\n \"Refund ID: {$oData->GetRefundDetailsResult->RefundDetails->RefundReferenceId} - \"\n .\"Status: {$oData->GetRefundDetailsResult->RefundDetails->RefundStatus->State}<br/>\"\n );\n }\n }\n }",
"public function getStatusLogMessages() {\n foreach($this->statusLogs as $log) {\n $log = explode(\",\", $log);\n $logMessage = &$log[0];\n $logTimestamp = &$log[1];\n $this->statusLogMessages[] = array($this->statusTemplates[ $logMessage ], date(\"Y:m:d h:i:s\", $logTimestamp));\n }\n\n return $this->statusLogMessages;\n }",
"public static function getAllStatus(): array\n {\n $statuses = array();\n //====================================================================//\n // Complete Status Informations\n foreach (SplashStatus::getAll() as $status) {\n $statuses[] = array(\n 'code' => $status,\n 'field' => 'SPLASH_ORDER_'.strtoupper($status),\n 'name' => str_replace(\"Order\", \"Status \", $status),\n 'desc' => 'Order Status for '.str_replace(\"Order\", \"\", $status)\n );\n }\n\n return $statuses;\n }",
"function SwissPostApiGetTransferStatus(Varien_Event_Observer $observer){\n $result = $observer->getData('result');\n $order_refs = $observer->getData('order_refs');\n if($result && $result->getValues()){\n $values = $result->getValues();\n foreach ($order_refs as $order_ref){\n foreach ($values as $status){\n if(stripos($status['order_ref'], $order_ref) !== false){ \n $order = Mage::helper('swisspostsales/Order')->__fromOrderRef($order_ref);\n if($order){\n Mage::helper('swisspostsales/Order')->processTransferStatus($order, $status);\n // set final status\n if(Mage::helper('swisspostsales/Order')->isCompleted($order)){\n Mage::helper('swisspostsales/Order')->__toCompleted($order);\n }\n }\n }\n }\n }\n }\n }",
"function ostGetOrderStatues( $fullList = true, $format = 'just' )\r\n{\r\n\t$data = array();\r\n\tif ( $fullList )\r\n\t{\r\n\t\t$q = db_phquery( \"SELECT * FROM ?#ORDER_STATUSES_TABLE WHERE statusID=?\", ostGetCanceledStatusId() );\r\n\t\t$row = db_fetch_assoc( $q );\r\n\t\tLanguagesManager::ml_fillFields(ORDER_STATUSES_TABLE, $row);\r\n\r\n\t\t$r = array( \"statusID\" => $row[\"statusID\"],\r\n\t\t\t\t\"status_name\" => $row[\"status_name\"], \r\n\t\t\t\t\"sort_order\" => $row[\"sort_order\"],\r\n\t\t \"color\" => $row[\"color\"]);\r\n\t\t_correctOrderStatusName( $r );\r\n\t\t$data[] = $r;\r\n\t}\r\n\r\n\t$q = db_phquery(\"\r\n\t\tSELECT *, \".LanguagesManager::sql_prepareField('status_name').\" AS status_name FROM ?#ORDER_STATUSES_TABLE\r\n\t\tWHERE statusID!=? ORDER BY sort_order ASC, status_name ASC\", ostGetCanceledStatusId() );\r\n\twhile( $r = db_fetch_assoc( $q ) )\r\n\t{\r\n\t\tLanguagesManager::ml_fillFields(ORDER_STATUSES_TABLE, $r);\r\n\t\t//if($format!='html')\r\n\t\t//\t$r[\"status_name\"] = xHtmlSpecialChars($r[\"status_name\"]);\r\n\r\n\t\t$data[] = $r;\r\n\t}\r\n\r\n\tswitch ($format){\r\n\t\tdefault:\r\n\t\tcase 'just':\r\n\t\t\tbreak;\r\n\t\tcase 'html':\r\n\t\t\t$data = xHtmlSpecialChars($data);\r\n\t\t\tbreak;\r\n\t}\r\n\treturn $data;\r\n}",
"public function getBriefInfoMessages()\n {\n $array = imap_headers($this->imap);\n $newArray = [];\n foreach ($array as $key => $string) {\n $newArray[] = ['id'=>$key+1, 'info' => $string];\n };\n return $newArray;\n }",
"abstract public static function getStatuses();",
"private function parse()\r\n\t{\r\n\t\t// Suppress annoying notices/warnings\r\n\t\tset_error_handler(function() { /* Nothing */ }, E_NOTICE|E_WARNING);\r\n\r\n\t\t$structure = mailparse_msg_get_structure($this->resource);\r\n\t\t$this->parts = array();\r\n\t\tforeach ($structure as $part_id) {\r\n\t\t\t$part = mailparse_msg_get_part($this->resource, $part_id);\r\n\t\t\t$this->parts[$part_id] = mailparse_msg_get_part_data($part);\r\n\t\t}\r\n\r\n\t\trestore_error_handler();\r\n\t}",
"public function extractStatusCode($headers) {\n\t\tforeach($headers as $header) {\n\t\t\t// Checks if the header is the status header\n\t\t\tif(preg_match(\"/HTTP\\/[0-9A-Za-z +]/i\", $header)) {\n\t\t\t\t// If it is save the status\n\t\t\t\t$status = preg_match(\"/HTTP\\/[0-9]\\.[0-9] ([^ ]*) (.*)/i\", $header, $matches);\n\t\t\t\t\n\t\t\t\treturn array($matches[1], $matches[2]);\n\t\t\t}\n\t\t}\n\t}",
"protected function processDetails($data, Result &$result)\n {\n\n // Offload the parsing for these values\n $properties = $this->processProperties($data);\n\n // Always dedicated\n $result->add('dedicated', 1);\n\n // Iterate over the properties\n foreach ($properties as $key => $value) {\n $result->add($key, $value);\n }\n\n // We need to manually figure out the number of players\n $result->add(\n 'numplayers',\n ($properties['virtualserver_clientsonline'] - $properties['virtualserver_queryclientsonline'])\n );\n\n unset($data, $properties, $key, $value);\n }",
"public function getStatus(): array\n {\n $this->parseResponse();\n return $this->getData();\n }",
"function xmlrpc_decoder($xmlrpc_val)\n {\n $kind = $xmlrpc_val->kindOf();\n\n if ($kind == 'scalar')\n {\n return $xmlrpc_val->scalarval();\n }\n elseif ($kind == 'array')\n {\n reset($xmlrpc_val->me);\n list($a,$b) = each($xmlrpc_val->me);\n $size = count($b);\n\n $arr = array();\n\n for ($i = 0; $i < $size; $i++)\n {\n $arr[] = $this->xmlrpc_decoder($xmlrpc_val->me['array'][$i]);\n }\n return $arr;\n }\n elseif ($kind == 'struct')\n {\n reset($xmlrpc_val->me['struct']);\n $arr = array();\n\n while (list($key,$value) = each($xmlrpc_val->me['struct']))\n {\n $arr[$key] = $this->xmlrpc_decoder($value);\n }\n return $arr;\n }\n }",
"function getStatusList() {\n $statusList = array();\n foreach (Constants::$statusNames as $id => $name) {\n $statusList[$id] = \"$id - $name\";\n }\n return $statusList;\n}",
"function get_all_woo_status_ps_sms()\n{\n if (!function_exists('wc_get_order_statuses'))\n return;\n $statuses = wc_get_order_statuses() ? wc_get_order_statuses() : array();\n $opt_statuses = array();\n foreach ((array) $statuses as $status_val => $status_name) {\n $opt_statuses[substr($status_val, 3)] = $status_name;\n }\n return $opt_statuses;\n}",
"protected function getItemStatusesForBib($id)\n {\n $bib = $this->getBibRecord($id, 'bibLevel');\n $offset = 0;\n $limit = 50;\n $fields = 'location,status,barcode,callNumber,fixedFields';\n if ('m' !== $bib['bibLevel']['code']) {\n // Fetch varFields for volume information\n $fields .= ',varFields';\n }\n $statuses = [];\n while (!isset($result) || $limit === $result['total']) {\n $result = $this->makeRequest(\n ['v3', 'items'],\n [\n 'bibIds' => $bib['id'],\n 'deleted' => 'false',\n 'suppressed' => 'false',\n 'fields' => $fields,\n 'limit' => $limit,\n 'offset' => $offset\n ],\n 'GET'\n );\n if (empty($result['entries'])) {\n if (!empty($result['httpStatus']) && 404 !== $result['httpStatus']) {\n $msg = \"Item status request failed: {$result['httpStatus']}\";\n if (!empty($result['description'])) {\n $msg .= \" ({$result['description']})\";\n }\n throw new ILSException($msg);\n }\n return $statuses;\n }\n\n foreach ($result['entries'] as $i => $item) {\n $location = $this->translateLocation($item['location']);\n list($status, $duedate, $notes) = $this->getItemStatus($item);\n $available = $status == 'Available';\n // OPAC message\n if (isset($item['fixedFields']['108'])) {\n $opacMsg = $item['fixedFields']['108'];\n if (trim($opacMsg['value']) != '-') {\n $notes[] = $this->translateOpacMessage(\n trim($opacMsg['value'])\n );\n }\n }\n\n $volume = isset($item['varFields']) ? $this->extractVolume($item)\n : '';\n\n $entry = [\n 'id' => $bib['id'],\n 'item_id' => $item['id'],\n 'location' => $location,\n 'availability' => $available,\n 'status' => $status,\n 'reserve' => 'N',\n 'callnumber' => isset($item['callNumber'])\n ? preg_replace('/^\\|a/', '', $item['callNumber']) : '',\n 'duedate' => $duedate,\n 'number' => $volume,\n 'barcode' => $item['barcode'],\n 'sort' => $i\n ];\n if ($notes) {\n $entry['item_notes'] = $notes;\n }\n\n if ($this->isHoldable($item) && $this->itemHoldAllowed($item, $bib)\n ) {\n $entry['is_holdable'] = true;\n $entry['level'] = 'copy';\n $entry['addLink'] = true;\n } else {\n $entry['is_holdable'] = false;\n }\n\n $statuses[] = $entry;\n }\n $offset += $limit;\n }\n\t\t\n usort($statuses, [$this, 'statusSortFunction']);\n return $statuses;\n }"
]
| [
"0.6145925",
"0.55883074",
"0.54974544",
"0.51672685",
"0.5161105",
"0.5130639",
"0.51132905",
"0.5093189",
"0.5000037",
"0.49716765",
"0.49681187",
"0.4937946",
"0.4927822",
"0.4906892",
"0.49065286",
"0.48609373",
"0.48331052",
"0.48274112",
"0.4823618",
"0.48066503",
"0.47967747",
"0.47791764",
"0.4769313",
"0.4751438",
"0.47489926",
"0.47413713",
"0.47402042",
"0.47319782",
"0.47223872",
"0.47153318"
]
| 0.7520613 | 0 |
Determine if Destination Phone Number is not given. | public function destinationNotGiven()
{
return empty($this->destination);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _hasDestinationAddress()\n {\n $hasDestinationAddress = false;\n if ($this->_request->getHeader() && $this->_request->getHeader()->getDefaultLocations()) {\n $locations = $this->_request->getHeader()->getDefaultLocations();\n\n if (isset($locations[self::TAX_LOCATION_PURPOSE_SHIP_TO])) {\n $shipToLocation = $locations[self::TAX_LOCATION_PURPOSE_SHIP_TO];\n $address = $shipToLocation->getAddress();\n $city = (string)$address->getCity();\n $zip = $address->getZipcode();\n $state = $address->getState();\n $hasDestinationAddress = (($city && $state) || $zip) ? true : false;\n }\n }\n\n return $hasDestinationAddress;\n }",
"function custom_rules_is_destination_set(){\n\treturn isset( $_GET['destination'] );\n}",
"public function is_phonenumber($contact_no){\t\t\n\t\tif (!empty($contact_no) && !ctype_digit($contact_no)){\n\t\t\treturn true;\n\t\t}\n }",
"public function is_phonenumber($contact_no){\t\t\n\t\tif (!empty($contact_no) && !ctype_digit($contact_no)){\n\t\t\treturn true;\n\t\t}\n }",
"public function has_phone() {\r\n return ! empty( $this->phone );\r\n }",
"public function test_phone_returns_false_when_not_optional_input_not_phone() {\n\t\t$optional = false;\n\t\t$result = self::$validator->validate('not a phone num', $optional);\n\t\t$this->assertFalse( $result );\n\t}",
"public function test_phone_returns_false_when_optional_input_not_phone() {\n\t\t$optional = true;\n\t\t$result = self::$validator->validate('not a phone num', $optional);\n\t\t$this->assertFalse( $result );\n\t}",
"public function PhoneNoCheck($phone=\"\"){\n\t\t\t\n\t\t// if (preg_match(\"/^\\(?(\\d{3})\\)?[-\\. ]?(\\d{3})[-\\. ]?(\\d{4})$/\",$phone))\n\t\t if (preg_match(\"/^\\s*(?:\\+?(\\d{1,3}))?[-. (]*(\\d{3})[-. )]*(\\d{3})[-. ]*(\\d{4})(?: *x(\\d+))?\\s*$/\",$phone))\n\t\t\treturn true;\n\t\telse\n\t\t return false;\n\t\t}",
"private function is_address_passed_by_URL() {\n if ( ! isset( $this->is_address_in_url ) ) {\n $this->is_address_in_url = $this->slplus->SmartOptions->url_allow_address->is_true && ! empty( $_REQUEST['address'] );\n }\n\n return $this->is_address_in_url;\n }",
"function checkAddress(){\n $country = $_POST[\"country\"];\n $city = $_POST[\"city\"];\n $street = $_POST[\"street\"];\n $number = $_POST[\"number\"];\n if(empty($country) || empty($city) || empty($street) || empty($number)){\n return false; \n }\n return true; \n }",
"public function testValidatePhoneNumber__ReturnsValid_GivenCountrycodeNoDialingCodeRequiredFalse()\n {\n $person = new StdPerson;\n\n $this->assertEquals(\n 'Please enter a valid phone number',\n $person->validatePhoneNumber(\"+44 360832\", false)\n );\n }",
"public function isAddressValid()\n {\n //TODO: consider does it make sense to have a special validation by country? how does the app handle different country addresses ?\n $addressValid = trim($this->Streetname1) != '' && trim($this->PostalCode) != '' && trim($this->City) != '' && trim($this->Country) != '' ;\n\n if (!$addressValid) {\n $this->errors[] = 'Invalid Shipping Address';\n }\n\n return $addressValid;\n }",
"public function hasTelephone(): bool;",
"public function testValidatePhoneNumber__ReturnsValid_GivenCountrycodeNoDialingCodeRequiredTrue()\n {\n $person = new StdPerson;\n\n $this->assertEquals(\n 'Please enter a valid phone number',\n $person->validatePhoneNumber(\"+44 360832\", true)\n );\n }",
"function checkPhoneNumberValidity($phoneNum='')\n\t{\n\t\tglobal $db737;\n\t\tif(!$phoneNum)\n\t\t\treturn;\n\t\t$phoneNumber =phoneNumberCheck($phoneNum);\n\t\tif($phoneNumber){\n\t\t\t$sql =\"select PHONE_NUM from newjs.PHONE_JUNK WHERE PHONE_NUM IN('$phoneNumber','0$phoneNumber')\";\n\t\t $res = mysql_query($sql,$db737) or die(\"$sql\".mysql_error($db737));\n\t\t if($row = mysql_fetch_array($res))\n\t\t\t\t$phoneJunk =true;\n\t\t}\n\t\tif($phoneNumber && !$phoneJunk)\n\t\t\treturn $phoneNumber;\n\t\treturn;\t\n\t}",
"public function hasAddress()\n {\n return $this->address !== null;\n }",
"public function hasPhone()\n {\n return $this->get(self::PHONE) !== null;\n }",
"public function hasTelephoneExtension(): bool;",
"public function isSetShipFromAddress()\n {\n return !is_null($this->_fields['ShipFromAddress']['FieldValue']);\n }",
"function isLegalPhoneNum($test)\n{\n\tif(preg_match(\"/^\\([0-9]{3}\\) [0-9]{4}-[0-9]{4}$/\", $test))\n\t{\n\t\treturn true;\n\t}\n\treturn false;\n}",
"function valid_gsm_no($mobile,$formating=0)\n//Check whether a given no. is valid gsm no. or not.\n{\n\tif($formating)\n\t{\n\t\tif(strlen($mobile)==10)\n\t\t\t$mobile='91'.$mobile;\n\t}\n\tif( strlen($mobile)!=12 || !(ctype_digit($mobile)) )\n\t\treturn 0;\n\telse\n\t{\n\t\tif((substr($mobile,2,2)=='94' or substr($mobile,2,2)=='96' or substr($mobile,2,2)=='97' or substr($mobile,2,2)=='98' or substr($mobile,2,2)=='99'))\n return 1;\n\t}\n\treturn 0;\n}",
"private static function validate_number(&$phone)\n\t{\n\t\tif (substr($phone, 0, 1) == '+') {\n\t\t\t$phone = substr($phone, 1);\n\t\t}\n\n\n\t\tif (is_numeric($phone)) {\n\n\t\t\t// test if there's a 1 prepended.\n\t\t\tif (strlen($phone) === 11 && $phone[0] == 1) {\n\t\t\t\t//pop 1 off. \n\t\t\t\t$phone = substr($phone, 1);\n\t\t\t\treturn true;\n\n\t\t\t} elseif (strlen($phone) === 10) {\n\t\t\t\t// it's a 10 digit number... I guess that works.\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// is invalid if no return by here. \n\t\treturn false;\n\t}",
"public function size_of_phonenumber($contact_no){\t\n\t\tif (!empty($contact_no) && ctype_digit($contact_no)){\t\t\t\n\t\t\tif (strlen($contact_no) < 10){\n\t\t\t\treturn true;\n\t\t\t}else if(strlen($contact_no) > 12){\n\t\t\t\treturn true;\n\t\t\t}\n \t }\n }",
"private function isTelephoneRequired()\n {\n return $this->eavConfig->getAttribute('customer_address', 'telephone')->getIsRequired();\n }",
"public function size_of_phonenumber($contact_no){\t\n\t\tif (!empty($contact_no) && ctype_digit($contact_no)){\t\t\t\n\t\t\tif (strlen($contact_no) < 10){\n\t\t\t\treturn true;\n\t\t\t}else if(strlen($contact_no) > 10){\n\t\t\t\treturn true;\n\t\t\t}\n \t }\n }",
"public function hasAddressNList()\n {\n return $this->address_n !== null;\n }",
"public function isReplyTo() {}",
"function validPhone($phone)\r\n {\r\n\r\n return !empty($phone) && ctype_digit($phone);\r\n\r\n }",
"public function validateContactNumber()\n {\n if(! ctype_digit($this->Landline))\n $this->addError('Landline', 'Invalid landline.');\n }",
"function validate_phone($phone)\n{\n $filtered_phone_number = filter_var($phone, FILTER_SANITIZE_NUMBER_INT);\n // Check the lenght of number\n // This can be customized if you want phone number from a specific country\n if (strlen($filtered_phone_number) != 12) {\n return false;\n } else {\n return true;\n }\n}"
]
| [
"0.61624336",
"0.609918",
"0.6098938",
"0.6098938",
"0.59879285",
"0.5969876",
"0.59543926",
"0.58334345",
"0.5771173",
"0.5673848",
"0.56382227",
"0.55993104",
"0.5522818",
"0.54450727",
"0.5419923",
"0.54123366",
"0.53205234",
"0.5306646",
"0.53057647",
"0.5280935",
"0.5269527",
"0.5262592",
"0.52566284",
"0.5238246",
"0.5236202",
"0.5223606",
"0.5207423",
"0.5198903",
"0.51957697",
"0.51757807"
]
| 0.6958185 | 0 |
Determine if Content is not given. | public function contentNotGiven()
{
return empty($this->content);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function noContent()\n {\n return is_null($this->content) || empty($this->content);\n }",
"public function hasNoContent()\n {\n return $this->properties['content'] === null;\n }",
"public function hasContent(){ return !empty($this->content); }",
"public function hasContent()\n {\n return false;\n }",
"public function hasContent() {}",
"abstract public function hasContent();",
"protected function isContentCorrect() {}",
"public function hasContent(): bool\n {\n return (empty($this->content) === false);\n }",
"public function hasContent(): bool\n {\n return !empty($this->getAssetId());\n }",
"public static function hasContent(): bool\n {\n return true;\n }",
"public function noContent()\n {\n return $this->factory->noContent();\n }",
"public function getOptionalContent() {}",
"public function hasContent()\n {\n return isset($this->content);\n }",
"public function isEmpty()\n {\n return $this->getContent()->isEmpty();\n }",
"public function isEmpty()\n {\n return $this->getContent()->isEmpty();\n }",
"public function hasContent(){\n return $this->_has(4);\n }",
"public function ensureContent();",
"public function hasContent(){\n return $this->_has(6);\n }",
"public function hasContent()\n {\n return ($this->contentStream !== null);\n }",
"public function hasInfluencedContent();",
"public function ensureContent() {}",
"function verify_content($content) // Colorize: green\n { // Colorize: green\n return isset($content) // Colorize: green\n && // Colorize: green\n is_string($content) // Colorize: green\n && // Colorize: green\n $content != \"\"; // Colorize: green\n }",
"private function processUnavailable($content)\n\t{\n\t\t$unavailable = ($content === false) ? true : false;\n\t\t$this->available = !$unavailable;\n\t\treturn $unavailable;\n\t}",
"public function hasContent()\n {\n $c = $this->_getParentContentData();\n if (!$c) return false;\n return $c->hasContent();\n }",
"protected function isContentToBeParsed() {\n\t\t$result = FALSE;\n\t\t$currentPageUid = $GLOBALS['TSFE']->id;\n\t\t// get rootline of the current page\n\t\t$rootline = $GLOBALS['TSFE']->sys_page->getRootline($currentPageUid);\n\t\t// build an array of uids of pages the rootline\n\t\tfor ($i=count($rootline)-1; $i>=0; $i--) {\n\t\t\t$pageUidsInRootline[] = $rootline[\"$i\"]['uid'];\n\t\t}\n\t\t// check if the root page is in the rootline of the current page\n\t\tforeach (t3lib_div::trimExplode(',',$this->settings['includeRootPages'],1) as $includeRootPageUid) {\n\t\t\tif (t3lib_div::inArray((array)$pageUidsInRootline,$includeRootPageUid))\n\t\t\t\t$result = TRUE;\n\t\t}\n\t\tforeach (t3lib_div::trimExplode(',',$this->settings['excludeRootPages'],1) as $excludeRootPageUid) {\n\t\t\tif (t3lib_div::inArray((array)$pageUidsInRootline,$excludeRootPageUid))\n\t\t\t\t$result = FALSE;\n\t\t}\n\t\tif (t3lib_div::inList($this->settings['includePages'],$currentPageUid)) {\n\t\t\t$result = TRUE;\n\t\t}\n\t\tif (t3lib_div::inList($this->settings['excludePages'],$currentPageUid)) {\n\t\t\t$result = FALSE;\n\t\t}\n\t\tif ( $GLOBALS['TSFE']->page['f3_contentparser_dont_parse'] == 1) {\n\t\t\t$result = FALSE;\n\t\t}\n\t\t// if ( $this->cObj->getFieldVal('f3_contentparser_dont_parse') == 1) {\n\t\t// \t$result = FALSE;\n\t\t// }\n\n\t\treturn $result;\n\t}",
"public function testContentErrors() {\n //Check the content is required\n $badData = $this->goodData;\n $badData['content'] = '';\n $this->assertFalse($this->Links->save($this->Links->newEntity($badData)));\n }",
"public static function NOisValidElement($content)\r\n {\r\n //TODO also allowing instances of \\SimpleXMLElement, \\DOMElement etc.\r\n return $content instanceof \\P7Tools\\Xml\\Element;\r\n }",
"function isContentToSkip() {\n\t\t$result = true; // true, if the page should be skipped\n\t\t$currentPageUid = $GLOBALS['TSFE']->id;\n\n\t\t// get rootline of the current page\n\t\t$rootline = $GLOBALS['TSFE']->sys_page->getRootline($currentPageUid);\n\t\t// build an array of uids of pages the rootline\n\t\tfor ($i = count($rootline) - 1; $i >= 0; $i--) {\n\t\t\t$pageUidsInRootline[] = $rootline[\"$i\"]['uid'];\n\t\t}\n\t\t// check if the root page is in the rootline of the current page\n\t\t$includeRootPagesUids = GeneralUtility::trimExplode(',', $this->conf['includeRootPages'], 1);\n\t\tforeach ($includeRootPagesUids as $includeRootPageUid) {\n\t\t\tif (GeneralUtility::inArray((array)$pageUidsInRootline, $includeRootPageUid)) {\n\t\t\t\t$result = false;\n\t\t\t}\n\t\t}\n\t\t$excludeRootPagesUids = GeneralUtility::trimExplode(',', $this->conf['excludeRootPages'], 1);\n\t\tforeach ($excludeRootPagesUids as $excludeRootPageUid) {\n\t\t\tif (GeneralUtility::inArray((array)$pageUidsInRootline, $excludeRootPageUid)) {\n\t\t\t\t$result = true;\n\t\t\t}\n\t\t}\n\t\tif (GeneralUtility::inList($this->conf['includePages'], $currentPageUid)) {\n\t\t\t$result = false;\n\t\t}\n\t\tif (GeneralUtility::inList($this->conf['excludePages'], $currentPageUid)) {\n\t\t\t$result = true;\n\t\t}\n\t\tif ($GLOBALS['TSFE']->page['tx_contagged_dont_parse'] == 1) {\n\t\t\t$result = true;\n\t\t}\n\t\tif (!empty($this->cObj)) {\n\t\t\tif ($this->cObj->getFieldVal('tx_contagged_dont_parse') == 1) {\n\t\t\t\t$result = true;\n\t\t\t}\n\t\t}\n\n\t\treturn $result;\n\t}",
"public function isMissing() {}",
"public function testContentThrowsExceptionOnEmptyInput(): void\n {\n $this->expectException(\\InvalidArgumentException::class);\n $this->expectExceptionMessage('Content must not be empty.');\n\n DiscordMessage::create()->content('');\n }"
]
| [
"0.77942765",
"0.75691473",
"0.728232",
"0.7028354",
"0.6984877",
"0.6954475",
"0.68799704",
"0.6762135",
"0.66672355",
"0.6613082",
"0.6483971",
"0.6455813",
"0.6425926",
"0.6299224",
"0.6299224",
"0.6235261",
"0.6143375",
"0.60713166",
"0.60684365",
"0.60565555",
"0.60005623",
"0.59517545",
"0.5921357",
"0.5825323",
"0.58229125",
"0.58141494",
"0.57726574",
"0.57395804",
"0.57268506",
"0.57122046"
]
| 0.84199256 | 0 |
The number of pixels to crop from the top. The default is 0. Generated from protobuf field int32 top_pixels = 1; | public function getTopPixels()
{
return $this->top_pixels;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setTopPixels($var)\n {\n GPBUtil::checkInt32($var);\n $this->top_pixels = $var;\n\n return $this;\n }",
"public function top($top=10) {\n return $this->limit($top, 0);\n }",
"public function getTopWidth() {\n return $this->topWidth;\n }",
"public function top_down_crop( $args ) {\n\t\t\t$size = $this->get_dimensions( $args );\n\n\t\t\tif ( empty( $size ) ) {\n\t\t\t\treturn array();\n\t\t\t}\n\n\t\t\treturn $this->set_conditional_args(\n\t\t\t\tarray(\n\t\t\t\t\t'w' => $size['width'],\n\t\t\t\t\t'crop' => '0,0,100,' . $size['height'],\n\t\t\t\t)\n\t\t\t);\n\t\t}",
"public function getTop();",
"public function show_topBoards($num_top = 10, $output_method = 'echo')\n {\n return $this->call_method(\"show/topBoards\",\n array('num_top' => $num_top,\n 'output_method' => $output_method,\n )\n );\n }",
"public function getTop()\n {\n if (array_key_exists(\"top\", $this->_propDict)) {\n return $this->_propDict[\"top\"];\n } else {\n return null;\n }\n }",
"function klippe_mikado_get_top_bar_height() {\n\t\tif ( klippe_mikado_is_top_bar_enabled() ) {\n\t\t\t$top_bar_height_meta = klippe_mikado_filter_px( klippe_mikado_options()->getOptionValue( 'top_bar_height' ) );\n\t\t\t$top_bar_height = ! empty( $top_bar_height_meta ) ? $top_bar_height_meta : 37;\n\t\t\t\n\t\t\treturn $top_bar_height;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}",
"function superfood_elated_get_top_bar_height() {\n if (superfood_elated_is_top_bar_enabled()) {\n $top_bar_height = superfood_elated_filter_px(superfood_elated_options()->getOptionValue('top_bar_height'));\n\n return $top_bar_height !== '' ? intval($top_bar_height) : 30;\n }\n\n return 0;\n }",
"function _fillTop()\n {\n return $this->_top + $this->_padding['top'];\n }",
"public function getPaddingTop() {}",
"function klippe_mikado_get_top_bar_background_height() {\n\t\t$top_bar_height_meta = klippe_mikado_filter_px( klippe_mikado_options()->getOptionValue( 'top_bar_height' ) );\n\t\t$header_height_meta = klippe_mikado_filter_px( klippe_mikado_options()->getOptionValue( 'menu_area_height' ) );\n\t\t\n\t\t$top_bar_height = ! empty( $top_bar_height_meta ) ? $top_bar_height_meta : 37;\n\t\t$header_height = ! empty( $header_height_meta ) ? $header_height_meta : 82;\n\t\t\n\t\t$top_bar_background_height = round( $top_bar_height ) + round( $header_height / 2 );\n\t\t\n\t\treturn $top_bar_background_height;\n\t}",
"public function revealTopCard(): int;",
"public function getBottomPixels()\n {\n return $this->bottom_pixels;\n }",
"private static function checkTopSize(array $sizes, int $topSize) : array {\n return array_filter($sizes, function ($item) use ($topSize) { return $item <= $topSize; });\n }",
"public function setTop($val)\n {\n $this->_propDict[\"top\"] = floatval($val);\n return $this;\n }",
"public function setTopWidth($topWidth) {\n $this->topWidth = $topWidth;\n return $this;\n }",
"public function writeTop() {}",
"public function getTop()\n {\n return (\n $this->top === null ?\n $this :\n $this->top\n );\n }",
"public function top();",
"public function getLargest()\n {\n return $this->getVersionAlgorithm()->largestDim()->byImage($this)->first();\n }",
"public function crop(int $width = null, int $height = null, int $left = 0, int $top = 0): static\n {\n $this->cropWidth = $width;\n $this->cropHeight = $height;\n $this->cropLeft = $left;\n $this->cropTop = $top;\n\n return $this;\n }",
"public function setBottomPixels($var)\n {\n GPBUtil::checkInt32($var);\n $this->bottom_pixels = $var;\n\n return $this;\n }",
"public function top(int $top): ODataQueryBuilder {\n if ($top < 1) {\n throw new \\Exception('$top must be greater than 0.', 500);\n }\n\n $this->top = $top;\n\n return $this;\n }",
"public function setTop($stri_top) {\t$this->stri_top = $stri_top ;}",
"public function getIsTop()\n {\n return $this->isTop;\n }",
"public function getMapCropTopLeft(): XY\n {\n return $this->mapCropTopLeft;\n }",
"function newsroom_elated_get_header_top() {\n\n $params = array(\n 'column_widths' => '33-33-33',\n 'show_header_top' => newsroom_elated_options()->getOptionValue('top_bar') == 'yes' ? true : false,\n 'top_bar_in_grid' => newsroom_elated_options()->getOptionValue('top_bar_in_grid') == 'yes' ? true : false\n );\n\n $params = apply_filters('newsroom_elated_header_top_params', $params);\n\n newsroom_elated_get_module_template_part('templates/parts/header-top', 'header', '', $params);\n }",
"public function searchTop($params, $top)\n {\n $query = Image::find()\n ->where(['status' => Image::STATUS_ACCEPTED])\n ->andWhere(['<=', 'not_sexy', Image::MAX_NOT_SEXY_VALUE]);\n\n $date = $this->getTopDate($top);\n if ($date) {\n $query ->andWhere(['>=', 'downloaded_at', $date->format('Y-m-d H:i:s')]);\n }\n\n // add conditions that should always apply here\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'sort' => ['defaultOrder' => ['likes' => SORT_DESC, 'id' => SORT_ASC]],\n 'pagination' => [\n 'pageSizeParam' => self::PER_PAGE_PARAM,\n 'defaultPageSize' => self::DEFAULT_ITEMS_PER_PAGE,\n 'pageSizeLimit' => [1, self::PAGE_SIZE_LIMIT],\n 'validatePage' => false,\n ],\n ]);\n\n $this->load($params);\n\n if (!$this->validate()) {\n // uncomment the following line if you do not want to return any records when validation fails\n // $query->where('0=1');\n return $dataProvider;\n }\n\n return $dataProvider;\n }",
"protected function getBoardStart(): int\n {\n $height = $this->board->height();\n\n if ($this->getPlayer()->doesMoveUpwards()) {\n return array_shift($height);\n } else {\n return array_pop($height);\n }\n }"
]
| [
"0.78183144",
"0.5869395",
"0.5826788",
"0.560903",
"0.54920566",
"0.54258245",
"0.5353075",
"0.51547664",
"0.51093024",
"0.5076525",
"0.50702274",
"0.5063386",
"0.50165087",
"0.50109863",
"0.4957579",
"0.4934075",
"0.49149325",
"0.48484072",
"0.48225054",
"0.4774411",
"0.47526455",
"0.4752517",
"0.47476995",
"0.47387785",
"0.47384542",
"0.4729081",
"0.4726243",
"0.4698699",
"0.46724755",
"0.46710777"
]
| 0.7505231 | 1 |
The number of pixels to crop from the top. The default is 0. Generated from protobuf field int32 top_pixels = 1; | public function setTopPixels($var)
{
GPBUtil::checkInt32($var);
$this->top_pixels = $var;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getTopPixels()\n {\n return $this->top_pixels;\n }",
"public function top($top=10) {\n return $this->limit($top, 0);\n }",
"public function getTopWidth() {\n return $this->topWidth;\n }",
"public function top_down_crop( $args ) {\n\t\t\t$size = $this->get_dimensions( $args );\n\n\t\t\tif ( empty( $size ) ) {\n\t\t\t\treturn array();\n\t\t\t}\n\n\t\t\treturn $this->set_conditional_args(\n\t\t\t\tarray(\n\t\t\t\t\t'w' => $size['width'],\n\t\t\t\t\t'crop' => '0,0,100,' . $size['height'],\n\t\t\t\t)\n\t\t\t);\n\t\t}",
"public function getTop();",
"public function show_topBoards($num_top = 10, $output_method = 'echo')\n {\n return $this->call_method(\"show/topBoards\",\n array('num_top' => $num_top,\n 'output_method' => $output_method,\n )\n );\n }",
"public function getTop()\n {\n if (array_key_exists(\"top\", $this->_propDict)) {\n return $this->_propDict[\"top\"];\n } else {\n return null;\n }\n }",
"function klippe_mikado_get_top_bar_height() {\n\t\tif ( klippe_mikado_is_top_bar_enabled() ) {\n\t\t\t$top_bar_height_meta = klippe_mikado_filter_px( klippe_mikado_options()->getOptionValue( 'top_bar_height' ) );\n\t\t\t$top_bar_height = ! empty( $top_bar_height_meta ) ? $top_bar_height_meta : 37;\n\t\t\t\n\t\t\treturn $top_bar_height;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}",
"function superfood_elated_get_top_bar_height() {\n if (superfood_elated_is_top_bar_enabled()) {\n $top_bar_height = superfood_elated_filter_px(superfood_elated_options()->getOptionValue('top_bar_height'));\n\n return $top_bar_height !== '' ? intval($top_bar_height) : 30;\n }\n\n return 0;\n }",
"function _fillTop()\n {\n return $this->_top + $this->_padding['top'];\n }",
"public function getPaddingTop() {}",
"function klippe_mikado_get_top_bar_background_height() {\n\t\t$top_bar_height_meta = klippe_mikado_filter_px( klippe_mikado_options()->getOptionValue( 'top_bar_height' ) );\n\t\t$header_height_meta = klippe_mikado_filter_px( klippe_mikado_options()->getOptionValue( 'menu_area_height' ) );\n\t\t\n\t\t$top_bar_height = ! empty( $top_bar_height_meta ) ? $top_bar_height_meta : 37;\n\t\t$header_height = ! empty( $header_height_meta ) ? $header_height_meta : 82;\n\t\t\n\t\t$top_bar_background_height = round( $top_bar_height ) + round( $header_height / 2 );\n\t\t\n\t\treturn $top_bar_background_height;\n\t}",
"public function revealTopCard(): int;",
"public function getBottomPixels()\n {\n return $this->bottom_pixels;\n }",
"private static function checkTopSize(array $sizes, int $topSize) : array {\n return array_filter($sizes, function ($item) use ($topSize) { return $item <= $topSize; });\n }",
"public function setTop($val)\n {\n $this->_propDict[\"top\"] = floatval($val);\n return $this;\n }",
"public function setTopWidth($topWidth) {\n $this->topWidth = $topWidth;\n return $this;\n }",
"public function writeTop() {}",
"public function getTop()\n {\n return (\n $this->top === null ?\n $this :\n $this->top\n );\n }",
"public function top();",
"public function getLargest()\n {\n return $this->getVersionAlgorithm()->largestDim()->byImage($this)->first();\n }",
"public function crop(int $width = null, int $height = null, int $left = 0, int $top = 0): static\n {\n $this->cropWidth = $width;\n $this->cropHeight = $height;\n $this->cropLeft = $left;\n $this->cropTop = $top;\n\n return $this;\n }",
"public function setBottomPixels($var)\n {\n GPBUtil::checkInt32($var);\n $this->bottom_pixels = $var;\n\n return $this;\n }",
"public function top(int $top): ODataQueryBuilder {\n if ($top < 1) {\n throw new \\Exception('$top must be greater than 0.', 500);\n }\n\n $this->top = $top;\n\n return $this;\n }",
"public function setTop($stri_top) {\t$this->stri_top = $stri_top ;}",
"public function getIsTop()\n {\n return $this->isTop;\n }",
"public function getMapCropTopLeft(): XY\n {\n return $this->mapCropTopLeft;\n }",
"function newsroom_elated_get_header_top() {\n\n $params = array(\n 'column_widths' => '33-33-33',\n 'show_header_top' => newsroom_elated_options()->getOptionValue('top_bar') == 'yes' ? true : false,\n 'top_bar_in_grid' => newsroom_elated_options()->getOptionValue('top_bar_in_grid') == 'yes' ? true : false\n );\n\n $params = apply_filters('newsroom_elated_header_top_params', $params);\n\n newsroom_elated_get_module_template_part('templates/parts/header-top', 'header', '', $params);\n }",
"public function searchTop($params, $top)\n {\n $query = Image::find()\n ->where(['status' => Image::STATUS_ACCEPTED])\n ->andWhere(['<=', 'not_sexy', Image::MAX_NOT_SEXY_VALUE]);\n\n $date = $this->getTopDate($top);\n if ($date) {\n $query ->andWhere(['>=', 'downloaded_at', $date->format('Y-m-d H:i:s')]);\n }\n\n // add conditions that should always apply here\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'sort' => ['defaultOrder' => ['likes' => SORT_DESC, 'id' => SORT_ASC]],\n 'pagination' => [\n 'pageSizeParam' => self::PER_PAGE_PARAM,\n 'defaultPageSize' => self::DEFAULT_ITEMS_PER_PAGE,\n 'pageSizeLimit' => [1, self::PAGE_SIZE_LIMIT],\n 'validatePage' => false,\n ],\n ]);\n\n $this->load($params);\n\n if (!$this->validate()) {\n // uncomment the following line if you do not want to return any records when validation fails\n // $query->where('0=1');\n return $dataProvider;\n }\n\n return $dataProvider;\n }",
"protected function getBoardStart(): int\n {\n $height = $this->board->height();\n\n if ($this->getPlayer()->doesMoveUpwards()) {\n return array_shift($height);\n } else {\n return array_pop($height);\n }\n }"
]
| [
"0.7506199",
"0.5869752",
"0.5827541",
"0.56089354",
"0.5492722",
"0.54249483",
"0.53541404",
"0.5156555",
"0.51109195",
"0.50767887",
"0.5070655",
"0.5064516",
"0.501633",
"0.5011204",
"0.49574482",
"0.49340606",
"0.49146357",
"0.48486662",
"0.4823193",
"0.4774982",
"0.4753325",
"0.47520214",
"0.47459975",
"0.47388878",
"0.47380728",
"0.4730818",
"0.4727728",
"0.46990025",
"0.46719047",
"0.46712932"
]
| 0.7817146 | 0 |
The number of pixels to crop from the bottom. The default is 0. Generated from protobuf field int32 bottom_pixels = 2; | public function getBottomPixels()
{
return $this->bottom_pixels;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setBottomPixels($var)\n {\n GPBUtil::checkInt32($var);\n $this->bottom_pixels = $var;\n\n return $this;\n }",
"public function getTopPixels()\n {\n return $this->top_pixels;\n }",
"public function setTopPixels($var)\n {\n GPBUtil::checkInt32($var);\n $this->top_pixels = $var;\n\n return $this;\n }",
"public function bottom();",
"public function getPaddingBottom() {}",
"public function getHeight();",
"public function getHeight();",
"public function getHeight();",
"public function getHeight();",
"public function getHeight();",
"public function getMapCropBottomRight(): XY\n {\n return $this->mapCropBottomRight;\n }",
"public function getSpriteHeightPixels()\n {\n return $this->sprite_height_pixels;\n }",
"public function getPixelHeight()\n {\n return isset($this->pixel_height) ? $this->pixel_height : null;\n }",
"function _fillBottom()\n {\n return $this->_bottom - $this->_padding['bottom'];\n }",
"public function getPreviewPixelHeightUnwrapped()\n {\n return $this->readWrapperValue(\"preview_pixel_height\");\n }",
"public function getPixelHeightUnwrapped()\n {\n return $this->readWrapperValue(\"pixel_height\");\n }",
"public function getHeight()\n\t{\n\t\treturn $this->image->getHeight();\n\t}",
"public function getPreviewPixelHeight()\n {\n return isset($this->preview_pixel_height) ? $this->preview_pixel_height : null;\n }",
"function getHeight() {\r\n\t\treturn imagesy($this->image);\r\n\t}",
"public function getHeight() { return 0; }",
"public function setSpriteHeightPixels($var)\n {\n GPBUtil::checkInt32($var);\n $this->sprite_height_pixels = $var;\n\n return $this;\n }",
"public function getHeight() {}",
"public function getHeight() {}",
"public function getHeight() {}",
"public function getHeight() {}",
"public function getHeight() {}",
"public function getHeight() {}",
"public function getHeight() {}",
"function get_height() {\n //based on image height\n return $this->_height;\n }",
"function getHeight() \n {\n return imagesy($this->image);\n }"
]
| [
"0.7410081",
"0.5712564",
"0.56967044",
"0.5403689",
"0.5251172",
"0.5225131",
"0.5225131",
"0.5225131",
"0.5225131",
"0.5225131",
"0.5214864",
"0.52140945",
"0.5112615",
"0.5102811",
"0.505641",
"0.50516784",
"0.50420356",
"0.5020071",
"0.50070626",
"0.50031316",
"0.4956012",
"0.49415648",
"0.49415523",
"0.49411827",
"0.49411827",
"0.49411827",
"0.49411827",
"0.49411827",
"0.49177456",
"0.48997307"
]
| 0.724426 | 1 |
The number of pixels to crop from the bottom. The default is 0. Generated from protobuf field int32 bottom_pixels = 2; | public function setBottomPixels($var)
{
GPBUtil::checkInt32($var);
$this->bottom_pixels = $var;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getBottomPixels()\n {\n return $this->bottom_pixels;\n }",
"public function getTopPixels()\n {\n return $this->top_pixels;\n }",
"public function setTopPixels($var)\n {\n GPBUtil::checkInt32($var);\n $this->top_pixels = $var;\n\n return $this;\n }",
"public function bottom();",
"public function getPaddingBottom() {}",
"public function getHeight();",
"public function getHeight();",
"public function getHeight();",
"public function getHeight();",
"public function getHeight();",
"public function getSpriteHeightPixels()\n {\n return $this->sprite_height_pixels;\n }",
"public function getMapCropBottomRight(): XY\n {\n return $this->mapCropBottomRight;\n }",
"public function getPixelHeight()\n {\n return isset($this->pixel_height) ? $this->pixel_height : null;\n }",
"function _fillBottom()\n {\n return $this->_bottom - $this->_padding['bottom'];\n }",
"public function getPreviewPixelHeightUnwrapped()\n {\n return $this->readWrapperValue(\"preview_pixel_height\");\n }",
"public function getPixelHeightUnwrapped()\n {\n return $this->readWrapperValue(\"pixel_height\");\n }",
"public function getHeight()\n\t{\n\t\treturn $this->image->getHeight();\n\t}",
"public function getPreviewPixelHeight()\n {\n return isset($this->preview_pixel_height) ? $this->preview_pixel_height : null;\n }",
"function getHeight() {\r\n\t\treturn imagesy($this->image);\r\n\t}",
"public function getHeight() { return 0; }",
"public function setSpriteHeightPixels($var)\n {\n GPBUtil::checkInt32($var);\n $this->sprite_height_pixels = $var;\n\n return $this;\n }",
"public function getHeight() {}",
"public function getHeight() {}",
"public function getHeight() {}",
"public function getHeight() {}",
"public function getHeight() {}",
"public function getHeight() {}",
"public function getHeight() {}",
"function get_height() {\n //based on image height\n return $this->_height;\n }",
"function getHeight() \n {\n return imagesy($this->image);\n }"
]
| [
"0.7243026",
"0.571388",
"0.5696839",
"0.5400286",
"0.52503675",
"0.522488",
"0.522488",
"0.522488",
"0.522488",
"0.522488",
"0.52154994",
"0.5213884",
"0.51136756",
"0.5101056",
"0.5057477",
"0.5053238",
"0.5042362",
"0.502049",
"0.5007128",
"0.50030035",
"0.49569115",
"0.4941395",
"0.4941377",
"0.4941011",
"0.4941011",
"0.4941011",
"0.4941011",
"0.4941011",
"0.4917006",
"0.48995355"
]
| 0.740729 | 0 |
The number of pixels to crop from the left. The default is 0. Generated from protobuf field int32 left_pixels = 3; | public function getLeftPixels()
{
return $this->left_pixels;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setLeftPixels($var)\n {\n GPBUtil::checkInt32($var);\n $this->left_pixels = $var;\n\n return $this;\n }",
"public function getLeftColumnSize(): int\n {\n return $this->leftColumnSize;\n }",
"public function getLeft() {}",
"public function getLeftCnt()\n {\n return $this->get(self::_LEFT_CNT);\n }",
"public function getPaddingLeft() {}",
"function getLeft() ;",
"public function getLeft()\n {\n return $this->left;\n }",
"public function getLeft()\n {\n return $this->left;\n }",
"function calculateLeftPosition(array $prevItem, $margin = 0)\n{\n $left = $prevItem['left'] + $prevItem['width'] + $margin;\n return $left + 1;\n}",
"function _fillLeft()\n {\n return $this->_left + $this->_padding['left'];\n }",
"public function getLeft(): MarginInterface\n {\n return $this->left;\n }",
"public function getLeftCount()\n {\n return $this->get(self::_LEFT_COUNT);\n }",
"public function getCropX()\n {\n return $this->_daImage->getCropX( $this->getId() );\n }",
"public function setPaddingLeft($paddingLeft) {}",
"public function getItemsLeft()\n {\n return $this->itemsLeft;\n }",
"public function getLeft()\n {\n if (array_key_exists(\"left\", $this->_propDict)) {\n return $this->_propDict[\"left\"];\n } else {\n return null;\n }\n }",
"public function setLeftCnt($value)\n {\n return $this->set(self::_LEFT_CNT, $value);\n }",
"public function getLeftBisectorPositions()\n\t{\n\t\t$countSide = $this->getSideCount();\n\t\t$array = array();\n\t\tfor ($i = 1; $i <= $countSide; $i++) {\n\t\t\t$array[] = ($i - 1) * $countSide + $i;\n\t\t}\n\n\t\treturn $array;\n\t}",
"function getIOPsLeft() {\n return $this->iops_left;\n }",
"public function marginLeft() {\n\t}",
"public function setLeftCount($value)\n {\n return $this->set(self::_LEFT_COUNT, $value);\n }",
"public function getLeftSide() {\n return $this->left;\n }",
"public function setLeftColumnSize(int $leftColumnSize): void\n {\n $this->leftColumnSize = $leftColumnSize;\n }",
"private function writeMarginLeft(): void\n {\n $record = 0x0026; // Record identifier\n $length = 0x0008; // Bytes to follow\n\n $margin = $this->phpSheet->getPageMargins()->getLeft(); // Margin in inches\n\n $header = pack('vv', $record, $length);\n $data = pack('d', $margin);\n if (self::getByteOrder()) { // if it's Big Endian\n $data = strrev($data);\n }\n\n $this->append($header . $data);\n }",
"public function left ( $count = 0 ) {\n $this->_currentPosition = array(\n $this->_currentPosition[0] - $count,\n $this->_currentPosition[1],\n );\n return $this;\n }",
"private function getLeftShift()\n {\n if ($this->currentPage < 3) {\n $shift = 3;\n } else {\n $shift = 1;\n }\n return $shift;\n }",
"public function setLeft($val)\n {\n $this->_propDict[\"left\"] = floatval($val);\n return $this;\n }",
"public function getRightPixels()\n {\n return $this->right_pixels;\n }",
"function get_left($key)\n\t{\n\t\t$ret \t= $this->_post_data(\"http://bypasscaptcha.com/ex_left.php\", array(\"key\" => $key));\n\t\t$dict \t= $this->_get_result($ret);\n\t\t$left\t= (isset($dict['Left'])) ? $dict['Left'] : FALSE;\n\t\t\n\t\treturn $left;\n\t}",
"public function setStructureLeftParalPanoramic($value) {\n switch ($value) {\n case 0 : // Sin da�o\n return 0;\n break;\n case 7 : // Deformacion Fuerte\n return 44;\n break;\n case 8 : // Deformacion medio\n return 42;\n break;\n case 6 : // Malo\n return 50;\n break;\n case 9 : // Golpe\n return 0;\n break;\n case 10 : // Rayon\n return 2;\n break;\n case 11 : // Reparacion Buena\n return 0;\n break;\n case 12 : // Reparacion Mala\n return 40;\n break;\n case 13 : // Sumido\n return 5;\n break;\n }\n }"
]
| [
"0.75383747",
"0.6012024",
"0.5606183",
"0.5599118",
"0.55883694",
"0.5489636",
"0.54555756",
"0.54555756",
"0.5425044",
"0.5422692",
"0.5407979",
"0.54032046",
"0.533785",
"0.5299609",
"0.5279458",
"0.52545726",
"0.5243257",
"0.51992595",
"0.51441187",
"0.5127499",
"0.51233494",
"0.5097848",
"0.5091913",
"0.4999755",
"0.49866346",
"0.4949837",
"0.49368608",
"0.4920147",
"0.49172932",
"0.4910377"
]
| 0.73960835 | 1 |
The number of pixels to crop from the left. The default is 0. Generated from protobuf field int32 left_pixels = 3; | public function setLeftPixels($var)
{
GPBUtil::checkInt32($var);
$this->left_pixels = $var;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getLeftPixels()\n {\n return $this->left_pixels;\n }",
"public function getLeftColumnSize(): int\n {\n return $this->leftColumnSize;\n }",
"public function getLeft() {}",
"public function getLeftCnt()\n {\n return $this->get(self::_LEFT_CNT);\n }",
"public function getPaddingLeft() {}",
"function getLeft() ;",
"public function getLeft()\n {\n return $this->left;\n }",
"public function getLeft()\n {\n return $this->left;\n }",
"function calculateLeftPosition(array $prevItem, $margin = 0)\n{\n $left = $prevItem['left'] + $prevItem['width'] + $margin;\n return $left + 1;\n}",
"function _fillLeft()\n {\n return $this->_left + $this->_padding['left'];\n }",
"public function getLeft(): MarginInterface\n {\n return $this->left;\n }",
"public function getLeftCount()\n {\n return $this->get(self::_LEFT_COUNT);\n }",
"public function getCropX()\n {\n return $this->_daImage->getCropX( $this->getId() );\n }",
"public function setPaddingLeft($paddingLeft) {}",
"public function getItemsLeft()\n {\n return $this->itemsLeft;\n }",
"public function getLeft()\n {\n if (array_key_exists(\"left\", $this->_propDict)) {\n return $this->_propDict[\"left\"];\n } else {\n return null;\n }\n }",
"public function setLeftCnt($value)\n {\n return $this->set(self::_LEFT_CNT, $value);\n }",
"public function getLeftBisectorPositions()\n\t{\n\t\t$countSide = $this->getSideCount();\n\t\t$array = array();\n\t\tfor ($i = 1; $i <= $countSide; $i++) {\n\t\t\t$array[] = ($i - 1) * $countSide + $i;\n\t\t}\n\n\t\treturn $array;\n\t}",
"function getIOPsLeft() {\n return $this->iops_left;\n }",
"public function marginLeft() {\n\t}",
"public function setLeftCount($value)\n {\n return $this->set(self::_LEFT_COUNT, $value);\n }",
"public function getLeftSide() {\n return $this->left;\n }",
"public function setLeftColumnSize(int $leftColumnSize): void\n {\n $this->leftColumnSize = $leftColumnSize;\n }",
"private function writeMarginLeft(): void\n {\n $record = 0x0026; // Record identifier\n $length = 0x0008; // Bytes to follow\n\n $margin = $this->phpSheet->getPageMargins()->getLeft(); // Margin in inches\n\n $header = pack('vv', $record, $length);\n $data = pack('d', $margin);\n if (self::getByteOrder()) { // if it's Big Endian\n $data = strrev($data);\n }\n\n $this->append($header . $data);\n }",
"public function left ( $count = 0 ) {\n $this->_currentPosition = array(\n $this->_currentPosition[0] - $count,\n $this->_currentPosition[1],\n );\n return $this;\n }",
"private function getLeftShift()\n {\n if ($this->currentPage < 3) {\n $shift = 3;\n } else {\n $shift = 1;\n }\n return $shift;\n }",
"public function setLeft($val)\n {\n $this->_propDict[\"left\"] = floatval($val);\n return $this;\n }",
"public function getRightPixels()\n {\n return $this->right_pixels;\n }",
"function get_left($key)\n\t{\n\t\t$ret \t= $this->_post_data(\"http://bypasscaptcha.com/ex_left.php\", array(\"key\" => $key));\n\t\t$dict \t= $this->_get_result($ret);\n\t\t$left\t= (isset($dict['Left'])) ? $dict['Left'] : FALSE;\n\t\t\n\t\treturn $left;\n\t}",
"public function setStructureLeftParalPanoramic($value) {\n switch ($value) {\n case 0 : // Sin da�o\n return 0;\n break;\n case 7 : // Deformacion Fuerte\n return 44;\n break;\n case 8 : // Deformacion medio\n return 42;\n break;\n case 6 : // Malo\n return 50;\n break;\n case 9 : // Golpe\n return 0;\n break;\n case 10 : // Rayon\n return 2;\n break;\n case 11 : // Reparacion Buena\n return 0;\n break;\n case 12 : // Reparacion Mala\n return 40;\n break;\n case 13 : // Sumido\n return 5;\n break;\n }\n }"
]
| [
"0.7395889",
"0.6012423",
"0.560514",
"0.56000024",
"0.5588442",
"0.5488483",
"0.54552317",
"0.54552317",
"0.5426301",
"0.54219174",
"0.54082954",
"0.54043895",
"0.5336721",
"0.5299679",
"0.5280053",
"0.5253579",
"0.5243798",
"0.5199345",
"0.5144588",
"0.51279",
"0.5124281",
"0.509672",
"0.5092413",
"0.5000385",
"0.4987759",
"0.49493992",
"0.4936321",
"0.49185562",
"0.49157596",
"0.49097615"
]
| 0.7537483 | 0 |
The number of pixels to crop from the right. The default is 0. Generated from protobuf field int32 right_pixels = 4; | public function getRightPixels()
{
return $this->right_pixels;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setRightPixels($var)\n {\n GPBUtil::checkInt32($var);\n $this->right_pixels = $var;\n\n return $this;\n }",
"public function getRightColumnSize(): int\n {\n return $this->rightColumnSize;\n }",
"function _fillRight()\n {\n return $this->_right - $this->_padding['right'];\n }",
"public function getPaddingRight() {}",
"public function getRight() {}",
"public function setPaddingRight($paddingRight) {}",
"public function getRightSide() {\n return $this->right;\n }",
"public function getMapCropBottomRight(): XY\n {\n return $this->mapCropBottomRight;\n }",
"public function getLeftPixels()\n {\n return $this->left_pixels;\n }",
"public function getRightBisectorPositions()\n\t{\n\t\t$countSide = $this->getSideCount();\n\t\t$array = array();\n\t\tfor ($i = 1; $i <= $countSide; $i++) {\n\t\t\t$array[] = $countSide * $i - ($i - 1);\n\t\t}\n\n\t\treturn $array;\n\t}",
"public function getRight()\n {\n return $this->right;\n }",
"public function getRight()\n {\n return $this->right;\n }",
"public function getRight(): MarginInterface\n {\n return $this->right;\n }",
"function getRight() ;",
"static public function shiftRightUnsigned ($left, $right) {\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:482: lines 482-488\n\t\tif ($right === 0) {\n\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:483: characters 4-15\n\t\t\treturn $left;\n\t\t} else if ($left >= 0) {\n\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:485: characters 4-78\n\t\t\treturn ($left >> $right) & ~((1 << (8 * PHP_INT_SIZE - 1)) >> ($right - 1));\n\t\t} else {\n\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:487: characters 4-56\n\t\t\treturn ($left >> $right) & (2147483647 >> ($right - 1));\n\t\t}\n\t}",
"function getIOPsRight() {\n return $this->iops_right;\n }",
"public function testResizeRatioModePreserveAndCropRight()\n {\n // crop right\n Tinebase_ImageHelper::resize($this->_testImage, 50, 100, Tinebase_ImageHelper::RATIOMODE_PRESERVANDCROP);\n $this->assertEquals(50, $this->_testImage->width);\n // only works on my system^tm\n //$tmpPath = tempnam(Tinebase_Core::getTempDir(), 'tine20_tmp_gd');\n //file_put_contents($tmpPath, $this->_testImage->blob);\n //$this->assertFileEquals(dirname(__FILE__) . '/ImageHelper/phpunit-logo-preserveandcrop-50-100.gif', $tmpPath);\n //unlink($tmpPath);\n }",
"public function right ( $count = 0 ) {\n $this->_currentPosition = array(\n $this->_currentPosition[0] + $count,\n $this->_currentPosition[1],\n );\n return $this;\n }",
"public function getPreviewPixelWidthUnwrapped()\n {\n return $this->readWrapperValue(\"preview_pixel_width\");\n }",
"function getIOPsEyeRight() {\n return $this->iopsEyeRight;\n }",
"public function testDimensionsOutboundsCrop()\n {\n $dimensions = Dimensions::create(\n 450,\n 450,\n 300,\n 150,\n ElcodiMediaImageResizeTypes::OUTBOUND_CROP\n );\n\n $this->assertEquals(0, $dimensions->getSrcX());\n $this->assertEquals(112.5, $dimensions->getSrcY());\n $this->assertEquals(450, $dimensions->getSrcWidth());\n $this->assertEquals(225, $dimensions->getSrcHeight());\n\n $this->assertEquals(0, $dimensions->getDstX());\n $this->assertEquals(0, $dimensions->getDstY());\n $this->assertEquals(300, $dimensions->getDstWidth());\n $this->assertEquals(150, $dimensions->getDstHeight());\n $this->assertEquals(300, $dimensions->getDstFrameX());\n $this->assertEquals(150, $dimensions->getDstFrameY());\n }",
"public function top_down_crop( $args ) {\n\t\t\t$size = $this->get_dimensions( $args );\n\n\t\t\tif ( empty( $size ) ) {\n\t\t\t\treturn array();\n\t\t\t}\n\n\t\t\treturn $this->set_conditional_args(\n\t\t\t\tarray(\n\t\t\t\t\t'w' => $size['width'],\n\t\t\t\t\t'crop' => '0,0,100,' . $size['height'],\n\t\t\t\t)\n\t\t\t);\n\t\t}",
"public function marginRight() {\n\t}",
"public static function right_sidebar() {\n\t\t$layout_type = WpvTemplates::get_layout();\n\n\t\tif($layout_type == 'right-only' || $layout_type == 'left-right'): ?>\n\t\t\t<aside class=\"<?php echo apply_filters('wpv_right_sidebar_class', 'right', $layout_type) ?>\">\n\t\t\t\t<?php WpvSidebars::getInstance()->get_sidebar('right'); ?>\n\t\t\t</aside>\n\t\t<?php endif;\n\t}",
"public function setLeftPixels($var)\n {\n GPBUtil::checkInt32($var);\n $this->left_pixels = $var;\n\n return $this;\n }",
"protected function getMaxRight() {\n $maxRight = Db::test('SELECT MAX(rgt) max_right FROM categories')->fetchObject();\n return $maxRight->max_right ?: false;\n }",
"public function getCropY()\n {\n return $this->_daImage->getCropY( $this->getId() );\n }",
"public function setRightColumnSize(int $rightColumnSize): void\n {\n $this->rightColumnSize = $rightColumnSize;\n }",
"public function getCropOriginalDimension(array $field_values, array $properties) {\n /** @var \\Drupal\\Core\\Image\\Image $image */\n $image = \\Drupal::service('image.factory')->get($field_values['file-uri']);\n if (!$image->isValid()) {\n throw new \\RuntimeException('This image file is nos valid.');\n }\n\n $delta = $this->getThumbnailCalculatedProperties($image)['delta'];\n\n // Get Center coordinate of crop zone.\n $axis_coordinate = $this->getAxisCoordinates(\n ['x' => $properties['x'], 'y' => $properties['y']],\n ['width' => $properties['width'], 'height' => $properties['height']]\n );\n\n // Calculate coordinates (position & sizes) of crop zone.\n $crop_coordinates = $this->getCoordinates([\n 'width' => $properties['width'],\n 'height' => $properties['height'],\n 'x' => $axis_coordinate['x'],\n 'y' => $axis_coordinate['y'],\n ], $delta);\n\n return $crop_coordinates;\n }",
"private function getRightShift()\n {\n $all_pages = self::getPages($this->records, $this->recordsInPage);\n if ($this->currentPage >= $all_pages - 1) {\n $shift = 3;\n } else {\n $shift = 1;\n }\n return $shift;\n }"
]
| [
"0.75342387",
"0.5966398",
"0.5687922",
"0.5541123",
"0.52726257",
"0.52210253",
"0.52174103",
"0.51583695",
"0.5138109",
"0.5112237",
"0.5034175",
"0.5034175",
"0.50271606",
"0.50037146",
"0.496971",
"0.489657",
"0.484291",
"0.47995794",
"0.47890052",
"0.47868595",
"0.47858384",
"0.47636107",
"0.47572026",
"0.4732477",
"0.47066894",
"0.47000337",
"0.46882534",
"0.46747822",
"0.46550298",
"0.46191487"
]
| 0.73755795 | 1 |
The number of pixels to crop from the right. The default is 0. Generated from protobuf field int32 right_pixels = 4; | public function setRightPixels($var)
{
GPBUtil::checkInt32($var);
$this->right_pixels = $var;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getRightPixels()\n {\n return $this->right_pixels;\n }",
"public function getRightColumnSize(): int\n {\n return $this->rightColumnSize;\n }",
"function _fillRight()\n {\n return $this->_right - $this->_padding['right'];\n }",
"public function getPaddingRight() {}",
"public function getRight() {}",
"public function setPaddingRight($paddingRight) {}",
"public function getRightSide() {\n return $this->right;\n }",
"public function getMapCropBottomRight(): XY\n {\n return $this->mapCropBottomRight;\n }",
"public function getLeftPixels()\n {\n return $this->left_pixels;\n }",
"public function getRightBisectorPositions()\n\t{\n\t\t$countSide = $this->getSideCount();\n\t\t$array = array();\n\t\tfor ($i = 1; $i <= $countSide; $i++) {\n\t\t\t$array[] = $countSide * $i - ($i - 1);\n\t\t}\n\n\t\treturn $array;\n\t}",
"public function getRight()\n {\n return $this->right;\n }",
"public function getRight()\n {\n return $this->right;\n }",
"public function getRight(): MarginInterface\n {\n return $this->right;\n }",
"function getRight() ;",
"static public function shiftRightUnsigned ($left, $right) {\n\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:482: lines 482-488\n\t\tif ($right === 0) {\n\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:483: characters 4-15\n\t\t\treturn $left;\n\t\t} else if ($left >= 0) {\n\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:485: characters 4-78\n\t\t\treturn ($left >> $right) & ~((1 << (8 * PHP_INT_SIZE - 1)) >> ($right - 1));\n\t\t} else {\n\t\t\t#/Users/ut/haxe/versions/4.0.0-rc.1/std/php/Boot.hx:487: characters 4-56\n\t\t\treturn ($left >> $right) & (2147483647 >> ($right - 1));\n\t\t}\n\t}",
"function getIOPsRight() {\n return $this->iops_right;\n }",
"public function testResizeRatioModePreserveAndCropRight()\n {\n // crop right\n Tinebase_ImageHelper::resize($this->_testImage, 50, 100, Tinebase_ImageHelper::RATIOMODE_PRESERVANDCROP);\n $this->assertEquals(50, $this->_testImage->width);\n // only works on my system^tm\n //$tmpPath = tempnam(Tinebase_Core::getTempDir(), 'tine20_tmp_gd');\n //file_put_contents($tmpPath, $this->_testImage->blob);\n //$this->assertFileEquals(dirname(__FILE__) . '/ImageHelper/phpunit-logo-preserveandcrop-50-100.gif', $tmpPath);\n //unlink($tmpPath);\n }",
"public function right ( $count = 0 ) {\n $this->_currentPosition = array(\n $this->_currentPosition[0] + $count,\n $this->_currentPosition[1],\n );\n return $this;\n }",
"public function getPreviewPixelWidthUnwrapped()\n {\n return $this->readWrapperValue(\"preview_pixel_width\");\n }",
"public function testDimensionsOutboundsCrop()\n {\n $dimensions = Dimensions::create(\n 450,\n 450,\n 300,\n 150,\n ElcodiMediaImageResizeTypes::OUTBOUND_CROP\n );\n\n $this->assertEquals(0, $dimensions->getSrcX());\n $this->assertEquals(112.5, $dimensions->getSrcY());\n $this->assertEquals(450, $dimensions->getSrcWidth());\n $this->assertEquals(225, $dimensions->getSrcHeight());\n\n $this->assertEquals(0, $dimensions->getDstX());\n $this->assertEquals(0, $dimensions->getDstY());\n $this->assertEquals(300, $dimensions->getDstWidth());\n $this->assertEquals(150, $dimensions->getDstHeight());\n $this->assertEquals(300, $dimensions->getDstFrameX());\n $this->assertEquals(150, $dimensions->getDstFrameY());\n }",
"function getIOPsEyeRight() {\n return $this->iopsEyeRight;\n }",
"public function top_down_crop( $args ) {\n\t\t\t$size = $this->get_dimensions( $args );\n\n\t\t\tif ( empty( $size ) ) {\n\t\t\t\treturn array();\n\t\t\t}\n\n\t\t\treturn $this->set_conditional_args(\n\t\t\t\tarray(\n\t\t\t\t\t'w' => $size['width'],\n\t\t\t\t\t'crop' => '0,0,100,' . $size['height'],\n\t\t\t\t)\n\t\t\t);\n\t\t}",
"public function marginRight() {\n\t}",
"public static function right_sidebar() {\n\t\t$layout_type = WpvTemplates::get_layout();\n\n\t\tif($layout_type == 'right-only' || $layout_type == 'left-right'): ?>\n\t\t\t<aside class=\"<?php echo apply_filters('wpv_right_sidebar_class', 'right', $layout_type) ?>\">\n\t\t\t\t<?php WpvSidebars::getInstance()->get_sidebar('right'); ?>\n\t\t\t</aside>\n\t\t<?php endif;\n\t}",
"public function setLeftPixels($var)\n {\n GPBUtil::checkInt32($var);\n $this->left_pixels = $var;\n\n return $this;\n }",
"protected function getMaxRight() {\n $maxRight = Db::test('SELECT MAX(rgt) max_right FROM categories')->fetchObject();\n return $maxRight->max_right ?: false;\n }",
"public function getCropY()\n {\n return $this->_daImage->getCropY( $this->getId() );\n }",
"public function setRightColumnSize(int $rightColumnSize): void\n {\n $this->rightColumnSize = $rightColumnSize;\n }",
"public function getCropOriginalDimension(array $field_values, array $properties) {\n /** @var \\Drupal\\Core\\Image\\Image $image */\n $image = \\Drupal::service('image.factory')->get($field_values['file-uri']);\n if (!$image->isValid()) {\n throw new \\RuntimeException('This image file is nos valid.');\n }\n\n $delta = $this->getThumbnailCalculatedProperties($image)['delta'];\n\n // Get Center coordinate of crop zone.\n $axis_coordinate = $this->getAxisCoordinates(\n ['x' => $properties['x'], 'y' => $properties['y']],\n ['width' => $properties['width'], 'height' => $properties['height']]\n );\n\n // Calculate coordinates (position & sizes) of crop zone.\n $crop_coordinates = $this->getCoordinates([\n 'width' => $properties['width'],\n 'height' => $properties['height'],\n 'x' => $axis_coordinate['x'],\n 'y' => $axis_coordinate['y'],\n ], $delta);\n\n return $crop_coordinates;\n }",
"private function getRightShift()\n {\n $all_pages = self::getPages($this->records, $this->recordsInPage);\n if ($this->currentPage >= $all_pages - 1) {\n $shift = 3;\n } else {\n $shift = 1;\n }\n return $shift;\n }"
]
| [
"0.7375101",
"0.5967311",
"0.5685744",
"0.5540168",
"0.5270685",
"0.5221875",
"0.5216116",
"0.515659",
"0.51358575",
"0.5110921",
"0.50324863",
"0.50324863",
"0.5025464",
"0.50018907",
"0.49695528",
"0.4895476",
"0.48412743",
"0.47977966",
"0.47890064",
"0.4785433",
"0.47850066",
"0.47615087",
"0.47562778",
"0.47321135",
"0.47057003",
"0.47000927",
"0.46860737",
"0.4676723",
"0.4652955",
"0.46192396"
]
| 0.75350577 | 0 |
Return an array with cleaned cms block data ready to be saved. $increment is used when an error occurs to show the data set with the problem. | protected function _cleanBlockData($block, $increment)
{
$id = $block['identifier'];
if (!preg_match("/^[a-zA-Z0-9-_]+$/", $id)) {
Mage::throwException(Mage::helper('pragmatic_configuration')->__(
Pragmatic_Configuration_Helper_Data::MISSING_ARGUMENTS . '</br>' . self::CMS_BLOCKS_IDENTIFIER_ERROR,
self::CMS_BLOCKS_FILE_NAME . '.' . Pragmatic_Configuration_Helper_Data::FILE_DEFAULT_EXTENSION,
++$increment
));
}
if (!isset($block['identifier']) || !isset($block['title']) || !isset($block['content'])) {
Mage::throwException(Mage::helper('pragmatic_configuration')->__(
Pragmatic_Configuration_Helper_Data::MISSING_ARGUMENTS,
self::CMS_BLOCKS_FILE_NAME . '.' . Pragmatic_Configuration_Helper_Data::FILE_DEFAULT_EXTENSION,
++$increment
));
}
$block['status'] =
isset($block['status']) && ($block['status'] == 'Enabled' || $block['status'] === 1) ? true : false;
if ($id = $this->load($block['identifier'])->getId()) {
$block['block_id'] = $id;
}
return $block;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function run()\n {\n \n\n \\DB::table('blocks')->delete();\n \n \\DB::table('blocks')->insert(array (\n 0 => \n array (\n 'sectionID' => 'CHV1SEC1',\n 'blockID' => 'CHV1SEC1BLK1',\n 'dependencyID' => '',\n 'name' => 'HOW MANY STAFF MEMBERS HAVE BEEN TRAINED IN THE FOLLOWING?',\n 'created_at' => '2015-07-18 18:18:47',\n 'updated_at' => '2015-07-18 18:18:47',\n 'deleted_at' => NULL,\n ),\n 1 => \n array (\n 'sectionID' => 'CHV1SEC1',\n 'blockID' => 'CHV1SEC1BLK2',\n 'dependencyID' => '',\n 'name' => 'HEALTH SERVICES',\n 'created_at' => '2015-07-18 18:18:47',\n 'updated_at' => '2015-07-18 18:18:47',\n 'deleted_at' => NULL,\n ),\n 2 => \n array (\n 'sectionID' => 'CHV1SEC1',\n 'blockID' => 'CHV1SEC1BLK3',\n 'dependencyID' => '',\n 'name' => 'INFRASTRUCTURE: IMCI Consultation Room',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 3 => \n array (\n 'sectionID' => 'CHV1SEC2',\n 'blockID' => 'CHV1SEC2BLK01',\n 'dependencyID' => '',\n 'name' => 'GUIDELINES AND JOBS AIDS AVAILABILITY',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 4 => \n array (\n 'sectionID' => 'CHV1SEC2',\n 'blockID' => 'CHV1SEC2BLK02',\n 'dependencyID' => '',\n 'name' => 'DOES THE UNIT HAVE THE FOLOWING TOOLS?',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 5 => \n array (\n 'sectionID' => 'CHV1SEC2',\n 'blockID' => 'CHV1SEC2BLK03',\n 'dependencyID' => '',\n 'name' => 'TOTAL U5 CHILDREN SEEN IN THE LAST 1 MONTH',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 6 => \n array (\n 'sectionID' => 'CHV1SEC2',\n 'blockID' => 'CHV1SEC2BLK04',\n 'dependencyID' => '',\n 'name' => 'ARE THE FOLLOWING DANGER SIGNS ASSESSED IN ONGOING SESSION FOR A CHILD',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 7 => \n array (\n 'sectionID' => 'CHV1SEC2',\n 'blockID' => 'CHV1SEC2BLK05',\n 'dependencyID' => '',\n 'name' => 'ASSESSMENT FOR THE MAIN SYMPTOMS IN AN ONGOING SESSION FOR A CHILD',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 8 => \n array (\n 'sectionID' => 'CHV1SEC2',\n 'blockID' => 'CHV1SEC2BLK06',\n 'dependencyID' => 'CHV1SEC2BLK5RW02COL02chsyes_no1',\n 'name' => 'Coughing/Difficulty Breathing',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 9 => \n array (\n 'sectionID' => 'CHV1SEC2',\n 'blockID' => 'CHV1SEC2BLK07',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 10 => \n array (\n 'sectionID' => 'CHV1SEC2',\n 'blockID' => 'CHV1SEC2BLK08',\n 'dependencyID' => 'CHV1SEC2BLK7RW02COL02chsyes_no1',\n 'name' => 'Diarrhoea',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 11 => \n array (\n 'sectionID' => 'CHV1SEC2',\n 'blockID' => 'CHV1SEC2BLK09',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 12 => \n array (\n 'sectionID' => 'CHV1SEC2',\n 'blockID' => 'CHV1SEC2BLK10',\n 'dependencyID' => 'CHV1SEC2BLK9RW02COL02chsyes_no1',\n 'name' => 'Fever',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 13 => \n array (\n 'sectionID' => 'CHV1SEC2',\n 'blockID' => 'CHV1SEC2BLK11',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 14 => \n array (\n 'sectionID' => 'CHV1SEC2',\n 'blockID' => 'CHV1SEC2BLK12',\n 'dependencyID' => 'CHV1SEC2BLK11RW02COL02chsyes_no1',\n 'name' => 'Ear Infection',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 15 => \n array (\n 'sectionID' => 'CHV1SEC3',\n 'blockID' => 'CHV1SEC3BLK1',\n 'dependencyID' => '',\n 'name' => 'Malnutrition',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 16 => \n array (\n 'sectionID' => 'CHV1SEC3',\n 'blockID' => 'CHV1SEC3BLK2',\n 'dependencyID' => '',\n 'name' => 'Anaemia',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 17 => \n array (\n 'sectionID' => 'CHV1SEC3',\n 'blockID' => 'CHV1SEC3BLK3',\n 'dependencyID' => '',\n 'name' => 'Condition',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 18 => \n array (\n 'sectionID' => 'CHV1SEC4',\n 'blockID' => 'CHV1SEC4BLK1',\n 'dependencyID' => '',\n 'name' => 'MAIN SUPPLIER',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 19 => \n array (\n 'sectionID' => 'CHV1SEC4',\n 'blockID' => 'CHV1SEC4BLK2',\n 'dependencyID' => '',\n 'name' => 'INDICATE AVAILABILITY, LOCATION, SUPPLIER AND QUANTITIES ON HAND OF THE FOLLOWING COMMODITIES',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 20 => \n array (\n 'sectionID' => 'CHV1SEC4',\n 'blockID' => 'CHV1SEC4BLK3',\n 'dependencyID' => '',\n 'name' => 'MAIN SUPPLIER',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 21 => \n array (\n 'sectionID' => 'CHV1SEC4',\n 'blockID' => 'CHV1SEC4BLK4',\n 'dependencyID' => '',\n 'name' => 'INDICATE AVAILABILITY, LOCATION, SUPPLIER AND QUANTITIES ON HAND OF THE FOLLOWING COMMODITIES',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 22 => \n array (\n 'sectionID' => 'CHV1SEC5',\n 'blockID' => 'CHV1SEC5BLK1',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 23 => \n array (\n 'sectionID' => 'CHV1SEC5',\n 'blockID' => 'CHV1SEC5BLK2',\n 'dependencyID' => '',\n 'name' => 'ORAL REHYDRATION THERAPY CORNER ASSESSMENT',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 24 => \n array (\n 'sectionID' => 'CHV1SEC6',\n 'blockID' => 'CHV1SEC6BLK1',\n 'dependencyID' => '',\n 'name' => 'INDICATE THE AVAILABILITY, LOCATION AND FUNCTIONALITY OF THE FOLLOWING EQUIPMENT AT THE ORT CORNER',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 25 => \n array (\n 'sectionID' => 'CHV1SEC7',\n 'blockID' => 'CHV1SEC7BLK1',\n 'dependencyID' => '',\n 'name' => 'MAIN SUPPLIER',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 26 => \n array (\n 'sectionID' => 'CHV1SEC7',\n 'blockID' => 'CHV1SEC7BLK2',\n 'dependencyID' => '',\n 'name' => 'INDICATE THE AVAILABILITY OF THE FOLLOWING SUPPLIES',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 27 => \n array (\n 'sectionID' => 'CHV1SEC8',\n 'blockID' => 'CHV1SEC8BLK1',\n 'dependencyID' => '',\n 'name' => 'MAIN SUPPLIER',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 28 => \n array (\n 'sectionID' => 'CHV1SEC8',\n 'blockID' => 'CHV1SEC8BLK2',\n 'dependencyID' => '',\n 'name' => 'INDICATE THE AVAILABILITY AND LOCATION OF THE FOLLOWING RESOURCES',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 29 => \n array (\n 'sectionID' => 'CHV1SEC9',\n 'blockID' => 'CHV1SEC9BLK1',\n 'dependencyID' => '',\n 'name' => 'COMMUNITY STRATEGY',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 30 => \n array (\n 'sectionID' => 'CHV2SEC1',\n 'blockID' => 'CHV2SEC1BLK1',\n 'dependencyID' => '',\n 'name' => 'H',\n 'created_at' => '2015-07-18 18:18:47',\n 'updated_at' => '2015-07-18 18:18:47',\n 'deleted_at' => NULL,\n ),\n 31 => \n array (\n 'sectionID' => 'CHV2SEC1',\n 'blockID' => 'CHV2SEC1BLK2',\n 'dependencyID' => '',\n 'name' => 'H',\n 'created_at' => '2015-07-18 18:18:47',\n 'updated_at' => '2015-07-18 18:18:47',\n 'deleted_at' => NULL,\n ),\n 32 => \n array (\n 'sectionID' => 'CHV2SEC2',\n 'blockID' => 'CHV2SEC2BLK1',\n 'dependencyID' => '',\n 'name' => 'GUIDELINES AND JOBS AIDS AVAILABILITY',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 33 => \n array (\n 'sectionID' => 'CHV2SEC2',\n 'blockID' => 'CHV2SEC2BLK2',\n 'dependencyID' => '',\n 'name' => 'DOES THE UNIT HAVE THE FOLOWING TOOLS?',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 34 => \n array (\n 'sectionID' => 'CHV2SEC3',\n 'blockID' => 'CHV2SEC3BLK96A',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 35 => \n array (\n 'sectionID' => 'CHV2SEC3',\n 'blockID' => 'CHV2SEC3BLK96D',\n 'dependencyID' => 'CHV2SEC3BLK96ARW01COL02chsyes_no1',\n 'name' => '2015',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 36 => \n array (\n 'sectionID' => 'CHV2SEC3',\n 'blockID' => 'CHV2SEC3BLK97A',\n 'dependencyID' => 'CHV2SEC3BLK96ARW01COL02chsyes_no1',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 37 => \n array (\n 'sectionID' => 'CHV2SEC3',\n 'blockID' => 'CHV2SEC3BLK97D',\n 'dependencyID' => 'CHV2SEC3BLK97ARW01COL02chsyes_no1',\n 'name' => '2014',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 38 => \n array (\n 'sectionID' => 'CHV2SEC3',\n 'blockID' => 'CHV2SEC3BLK98A',\n 'dependencyID' => 'CHV2SEC3BLK97ARW01COL02chsyes_no1',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 39 => \n array (\n 'sectionID' => 'CHV2SEC3',\n 'blockID' => 'CHV2SEC3BLK98D',\n 'dependencyID' => 'CHV2SEC3BLK98ARW01COL02chsyes_no1',\n 'name' => '2013',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 40 => \n array (\n 'sectionID' => 'CHV2SEC3',\n 'blockID' => 'CHV2SEC3BLK99A',\n 'dependencyID' => 'CHV2SEC3BLK98ARW01COL02chsyes_no1',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 41 => \n array (\n 'sectionID' => 'CHV2SEC3',\n 'blockID' => 'CHV2SEC3BLK99D',\n 'dependencyID' => 'CHV2SEC3BLK99ARW01COL02chsyes_no1',\n 'name' => '2012',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 42 => \n array (\n 'sectionID' => 'CHV2SEC4',\n 'blockID' => 'CHV2SEC4BLK1',\n 'dependencyID' => '',\n 'name' => 'MAIN SUPPLIER',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 43 => \n array (\n 'sectionID' => 'CHV2SEC4',\n 'blockID' => 'CHV2SEC4BLK2',\n 'dependencyID' => '',\n 'name' => 'INDICATE THE AVAILABILITY AND MAIN REASON FOR UNAVAILABILITY FOR THE COMMODITIES BELOW',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 44 => \n array (\n 'sectionID' => 'CHV2SEC5',\n 'blockID' => 'CHV2SEC5BLK1',\n 'dependencyID' => '',\n 'name' => 'ORAL REHYDRATION THERAPY CORNER ASSESSMENT',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 45 => \n array (\n 'sectionID' => 'CHV2SEC6',\n 'blockID' => 'CHV2SEC6BLK1',\n 'dependencyID' => '',\n 'name' => 'MAIN SUPPLIER',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 46 => \n array (\n 'sectionID' => 'CHV2SEC6',\n 'blockID' => 'CHV2SEC6BLK2',\n 'dependencyID' => '',\n 'name' => 'INDICATE THE AVAILABILITY OF THE FOLLOWING SUPPLIES',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 47 => \n array (\n 'sectionID' => 'CHV2SEC7',\n 'blockID' => 'CHV2SEC7BLK1',\n 'dependencyID' => '',\n 'name' => 'MAIN SUPPLIER',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 48 => \n array (\n 'sectionID' => 'CHV2SEC7',\n 'blockID' => 'CHV2SEC7BLK2',\n 'dependencyID' => '',\n 'name' => 'INDICATE THE AVAILABILITY AND LOCATION OF THE FOLLOWING RESOURCES',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 49 => \n array (\n 'sectionID' => 'CHV2SEC8',\n 'blockID' => 'CHV2SEC8BLK1',\n 'dependencyID' => '',\n 'name' => 'COMMUNITY STRATEGY',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 50 => \n array (\n 'sectionID' => 'IMCIV1SEC1',\n 'blockID' => 'IMCIV1SEC1BLK4',\n 'dependencyID' => '',\n 'name' => 'HCW Profile',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 51 => \n array (\n 'sectionID' => 'IMCIV1SEC1',\n 'blockID' => 'IMCIV1SEC1BLK5',\n 'dependencyID' => '',\n 'name' => 'Work Station Profile',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 52 => \n array (\n 'sectionID' => 'IMCIV1SEC2',\n 'blockID' => 'IMCIV1SEC2BLK1',\n 'dependencyID' => '',\n 'name' => 'Child Profile',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 53 => \n array (\n 'sectionID' => 'IMCIV1SEC2',\n 'blockID' => 'IMCIV1SEC2BLK2',\n 'dependencyID' => '',\n 'name' => 'Are the following Services Offered to a child?',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 54 => \n array (\n 'sectionID' => 'IMCIV1SEC2',\n 'blockID' => 'IMCIV1SEC2BLK3',\n 'dependencyID' => '',\n 'name' => 'Are the following Danger Signs assessed in ongoing session for a child?',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 55 => \n array (\n 'sectionID' => 'IMCIV1SEC3',\n 'blockID' => 'IMCIV1SEC3BLK01',\n 'dependencyID' => '',\n 'name' => 'Assessment of the main Symptoms in an ongoing session for a child',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 56 => \n array (\n 'sectionID' => 'IMCIV1SEC3',\n 'blockID' => 'IMCIV1SEC3BLK02',\n 'dependencyID' => 'IMCIV1SEC3BLK1RW02COL02ztyes_no1',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 57 => \n array (\n 'sectionID' => 'IMCIV1SEC3',\n 'blockID' => 'IMCIV1SEC3BLK03',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 58 => \n array (\n 'sectionID' => 'IMCIV1SEC3',\n 'blockID' => 'IMCIV1SEC3BLK04',\n 'dependencyID' => 'IMCIV1SEC3BLK3RW02COL02ztyes_no1',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 59 => \n array (\n 'sectionID' => 'IMCIV1SEC3',\n 'blockID' => 'IMCIV1SEC3BLK05',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 60 => \n array (\n 'sectionID' => 'IMCIV1SEC3',\n 'blockID' => 'IMCIV1SEC3BLK06',\n 'dependencyID' => 'IMCIV1SEC3BLK5RW02COL02ztyes_no1',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 61 => \n array (\n 'sectionID' => 'IMCIV1SEC3',\n 'blockID' => 'IMCIV1SEC3BLK07',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 62 => \n array (\n 'sectionID' => 'IMCIV1SEC3',\n 'blockID' => 'IMCIV1SEC3BLK08',\n 'dependencyID' => 'IMCIV1SEC3BLK7RW02COL02ztyes_no1',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 63 => \n array (\n 'sectionID' => 'IMCIV1SEC3',\n 'blockID' => 'IMCIV1SEC3BLK09',\n 'dependencyID' => '',\n 'name' => '5A. Feeding Problem',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 64 => \n array (\n 'sectionID' => 'IMCIV1SEC3',\n 'blockID' => 'IMCIV1SEC3BLK10',\n 'dependencyID' => '',\n 'name' => '5B. Weight',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 65 => \n array (\n 'sectionID' => 'IMCIV1SEC3',\n 'blockID' => 'IMCIV1SEC3BLK11',\n 'dependencyID' => '',\n 'name' => '6. Special Treatment Needs',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 66 => \n array (\n 'sectionID' => 'IMCIV1SEC4',\n 'blockID' => 'IMCIV1SEC4BLK01',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 67 => \n array (\n 'sectionID' => 'IMCIV1SEC4',\n 'blockID' => 'IMCIV1SEC4BLK02',\n 'dependencyID' => 'IMCIV1SEC4BLK1RW01COL02ztyes_no1',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 68 => \n array (\n 'sectionID' => 'IMCIV1SEC4',\n 'blockID' => 'IMCIV1SEC4BLK03',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 69 => \n array (\n 'sectionID' => 'IMCIV1SEC4',\n 'blockID' => 'IMCIV1SEC4BLK04',\n 'dependencyID' => 'IMCIV1SEC4BLK3RW01COL02ztyes_no1',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 70 => \n array (\n 'sectionID' => 'IMCIV1SEC4',\n 'blockID' => 'IMCIV1SEC4BLK05',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 71 => \n array (\n 'sectionID' => 'IMCIV1SEC4',\n 'blockID' => 'IMCIV1SEC4BLK06',\n 'dependencyID' => 'IMCIV1SEC4BLK5RW01COL02ztyes_no1',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 72 => \n array (\n 'sectionID' => 'IMCIV1SEC4',\n 'blockID' => 'IMCIV1SEC4BLK07',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 73 => \n array (\n 'sectionID' => 'IMCIV1SEC4',\n 'blockID' => 'IMCIV1SEC4BLK08',\n 'dependencyID' => 'IMCIV1SEC4BLK7RW01COL02ztyes_no1',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 74 => \n array (\n 'sectionID' => 'IMCIV1SEC4',\n 'blockID' => 'IMCIV1SEC4BLK10',\n 'dependencyID' => '',\n 'name' => '5A. Feeding Problem',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 75 => \n array (\n 'sectionID' => 'IMCIV1SEC4',\n 'blockID' => 'IMCIV1SEC4BLK11',\n 'dependencyID' => '',\n 'name' => '5B. Weight',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 76 => \n array (\n 'sectionID' => 'IMCIV1SEC4',\n 'blockID' => 'IMCIV1SEC4BLK12',\n 'dependencyID' => '',\n 'name' => '6. Special Treatment Needs',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 77 => \n array (\n 'sectionID' => 'IMCIV1SEC5',\n 'blockID' => 'IMCIV1SEC5BLK1',\n 'dependencyID' => '',\n 'name' => 'MALNUTRITION',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 78 => \n array (\n 'sectionID' => 'IMCIV1SEC5',\n 'blockID' => 'IMCIV1SEC5BLK2',\n 'dependencyID' => '',\n 'name' => 'ANAEMIA',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 79 => \n array (\n 'sectionID' => 'IMCIV1SEC5',\n 'blockID' => 'IMCIV1SEC5BLK3',\n 'dependencyID' => '',\n 'name' => 'CONDITION',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 80 => \n array (\n 'sectionID' => 'IMCIV1SEC5',\n 'blockID' => 'IMCIV1SEC5BLK4',\n 'dependencyID' => '',\n 'name' => 'TREATMENT AND COUNSELLING',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 81 => \n array (\n 'sectionID' => 'IMCIV1SEC6',\n 'blockID' => 'IMCIV1SEC6BLK1',\n 'dependencyID' => '',\n 'name' => 'Consultation Observation',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 82 => \n array (\n 'sectionID' => 'IMCIV1SEC6',\n 'blockID' => 'IMCIV1SEC6BLK2',\n 'dependencyID' => '',\n 'name' => 'Exit Interview with Caregiver',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 83 => \n array (\n 'sectionID' => 'IMCIV1SEC6',\n 'blockID' => 'IMCIV1SEC6BLK3',\n 'dependencyID' => '',\n 'name' => 'Assessment Outcome',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 84 => \n array (\n 'sectionID' => 'IMCIV1SEC6',\n 'blockID' => 'IMCIV1SEC6BLK4',\n 'dependencyID' => '',\n 'name' => 'Criteria For Certification : Section A',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 85 => \n array (\n 'sectionID' => 'IMCIV1SEC6',\n 'blockID' => 'IMCIV1SEC6BLK5',\n 'dependencyID' => '',\n 'name' => 'Checked For The Following: Section B',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 86 => \n array (\n 'sectionID' => 'IMCIV1SEC6',\n 'blockID' => 'IMCIV1SEC6BLK6',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 87 => \n array (\n 'sectionID' => 'IMCIV1SEC6',\n 'blockID' => 'IMCIV1SEC6BLK7',\n 'dependencyID' => '',\n 'name' => 'CERTIFICATION',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 88 => \n array (\n 'sectionID' => 'IMCIV1SEC6',\n 'blockID' => 'IMCIV1SEC6BLK8',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 89 => \n array (\n 'sectionID' => 'IMCIV1SEC6',\n 'blockID' => 'IMCIV1SEC6BLK9',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 90 => \n array (\n 'sectionID' => 'MNHV1SEC1',\n 'blockID' => 'MNHV1SEC1BLK1',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 91 => \n array (\n 'sectionID' => 'MNHV1SEC1',\n 'blockID' => 'MNHV1SEC1BLK2',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 92 => \n array (\n 'sectionID' => 'MNHV1SEC1',\n 'blockID' => 'MNHV1SEC1BLK3',\n 'dependencyID' => '',\n 'name' => 'PROVISION OF SERVICES',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 93 => \n array (\n 'sectionID' => 'MNHV1SEC1',\n 'blockID' => 'MNHV1SEC1BLK4',\n 'dependencyID' => '',\n 'name' => 'Health Facility Management',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 94 => \n array (\n 'sectionID' => 'MNHV1SEC2',\n 'blockID' => 'MNHV1SEC2BLK1',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 95 => \n array (\n 'sectionID' => 'MNHV1SEC2',\n 'blockID' => 'MNHV1SEC2BLK2',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 96 => \n array (\n 'sectionID' => 'MNHV1SEC2',\n 'blockID' => 'MNHV1SEC2BLK3',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 97 => \n array (\n 'sectionID' => 'MNHV1SEC2',\n 'blockID' => 'MNHV1SEC2BLK4',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 98 => \n array (\n 'sectionID' => 'MNHV1SEC2',\n 'blockID' => 'MNHV1SEC2BLK5',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 99 => \n array (\n 'sectionID' => 'MNHV1SEC2',\n 'blockID' => 'MNHV1SEC2BLK6',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 100 => \n array (\n 'sectionID' => 'MNHV1SEC2',\n 'blockID' => 'MNHV1SEC2BLK7',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 101 => \n array (\n 'sectionID' => 'MNHV1SEC3',\n 'blockID' => 'MNHV1SEC3BLK1',\n 'dependencyID' => '',\n 'name' => 'GUIDELINES AVAILABILITY',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 102 => \n array (\n 'sectionID' => 'MNHV1SEC3',\n 'blockID' => 'MNHV1SEC3BLK2',\n 'dependencyID' => '',\n 'name' => 'JOB AIDS AVAILABILITY',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 103 => \n array (\n 'sectionID' => 'MNHV1SEC3',\n 'blockID' => 'MNHV1SEC3BLK3',\n 'dependencyID' => '',\n 'name' => 'TOOLS AVAILABILITY',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 104 => \n array (\n 'sectionID' => 'MNHV1SEC4',\n 'blockID' => 'MNHV1SEC4BLK1',\n 'dependencyID' => '',\n 'name' => 'HOW MANY STAFF MEMBERS HAVE BEEN TRAINED IN THE FOLLOWING?',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 105 => \n array (\n 'sectionID' => 'MNHV1SEC5',\n 'blockID' => 'MNHV1SEC5BLK1',\n 'dependencyID' => '',\n 'name' => 'MAIN SUPPLIER',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 106 => \n array (\n 'sectionID' => 'MNHV1SEC5',\n 'blockID' => 'MNHV1SEC5BLK2',\n 'dependencyID' => '',\n 'name' => 'INDICATE THE AVAILABILITY, MAIN REASON FOR UNAVAILABILITY, DURATION OF UNAVAILABILITY & WHAT HAPPENED WHEN THE COMMODITY WAS NOT AVAILABLE',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 107 => \n array (\n 'sectionID' => 'MNHV1SEC6',\n 'blockID' => 'MNHV1SEC6BLK2',\n 'dependencyID' => '',\n 'name' => 'INDICATE THE AVAILABILITY, MAIN REASON FOR UNAVAILABILITY, DURATION OF UNAVAILABILITY & WHAT HAPPENED WHEN THE COMMODITY WAS NOT AVAILABLE',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 108 => \n array (\n 'sectionID' => 'MNHV1SEC7',\n 'blockID' => 'MNHV1SEC7BLK1',\n 'dependencyID' => '',\n 'name' => 'Equipment Availability',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 109 => \n array (\n 'sectionID' => 'MNHV1SEC7',\n 'blockID' => 'MNHV1SEC7BLK2',\n 'dependencyID' => '',\n 'name' => 'Testing Supplies',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 110 => \n array (\n 'sectionID' => 'MNHV1SEC7',\n 'blockID' => 'MNHV1SEC7BLK21',\n 'dependencyID' => '',\n 'name' => 'SECTION 7 OF 8: II. KITS/SETS AVAILABILITY',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 111 => \n array (\n 'sectionID' => 'MNHV1SEC7',\n 'blockID' => 'MNHV1SEC7BLK3',\n 'dependencyID' => '',\n 'name' => 'Delivery Kit Components',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 112 => \n array (\n 'sectionID' => 'MNHV1SEC7',\n 'blockID' => 'MNHV1SEC7BLK4',\n 'dependencyID' => '',\n 'name' => 'MAIN SUPPLIER',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 113 => \n array (\n 'sectionID' => 'MNHV1SEC7',\n 'blockID' => 'MNHV1SEC7BLK5',\n 'dependencyID' => '',\n 'name' => 'INDICATE THE AVAILABILITY AND MAIN REASON FOR UNAVAILABILITY FOR THE FOLLOWING KITS/SETS',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 114 => \n array (\n 'sectionID' => 'MNHV1SEC8',\n 'blockID' => 'MNHV1SEC8BLK1',\n 'dependencyID' => '',\n 'name' => 'INDICATE THE AVAILABILITY AND LOCATION OF THE FOLLOWING RESOURCES',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 115 => \n array (\n 'sectionID' => 'MNHV1SEC8',\n 'blockID' => 'MNHV1SEC8BLK2',\n 'dependencyID' => '',\n 'name' => 'INDICATE THE STORAGE AND ACCESS TO WATER',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 116 => \n array (\n 'sectionID' => 'MNHV1SEC8',\n 'blockID' => 'MNHV1SEC8BLK3',\n 'dependencyID' => '',\n 'name' => 'INDICATE THE AVAILABILITY AND STORAGE, SUPPLIER AND SOURCE OF THE FOLLOWING',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 117 => \n array (\n 'sectionID' => 'MNHV1SEC8',\n 'blockID' => 'MNHV1SEC8BLK4',\n 'dependencyID' => '',\n 'name' => 'PROVISION FOR WASTE DISPOSAL',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 118 => \n array (\n 'sectionID' => 'MNHV1SEC9',\n 'blockID' => 'MNHV1SEC9BLK1',\n 'dependencyID' => '',\n 'name' => 'COMMUNITY STRATEGY',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 119 => \n array (\n 'sectionID' => 'MNHV2SEC1',\n 'blockID' => 'MNHV2SEC1BLK1',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 120 => \n array (\n 'sectionID' => 'MNHV2SEC1',\n 'blockID' => 'MNHV2SEC1BLK2',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 121 => \n array (\n 'sectionID' => 'MNHV2SEC1',\n 'blockID' => 'MNHV2SEC1BLK3',\n 'dependencyID' => '',\n 'name' => 'PROVISION OF SERVICES',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 122 => \n array (\n 'sectionID' => 'MNHV2SEC1',\n 'blockID' => 'MNHV2SEC1BLK4',\n 'dependencyID' => '',\n 'name' => 'Health Facility Management',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 123 => \n array (\n 'sectionID' => 'MNHV2SEC2',\n 'blockID' => 'MNHV2SEC2BLK1',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 124 => \n array (\n 'sectionID' => 'MNHV2SEC2',\n 'blockID' => 'MNHV2SEC2BLK2',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 125 => \n array (\n 'sectionID' => 'MNHV2SEC2',\n 'blockID' => 'MNHV2SEC2BLK3',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 126 => \n array (\n 'sectionID' => 'MNHV2SEC2',\n 'blockID' => 'MNHV2SEC2BLK4',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 127 => \n array (\n 'sectionID' => 'MNHV2SEC2',\n 'blockID' => 'MNHV2SEC2BLK5',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 128 => \n array (\n 'sectionID' => 'MNHV2SEC2',\n 'blockID' => 'MNHV2SEC2BLK6',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 129 => \n array (\n 'sectionID' => 'MNHV2SEC2',\n 'blockID' => 'MNHV2SEC2BLK7',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 130 => \n array (\n 'sectionID' => 'MNHV2SEC3',\n 'blockID' => 'MNHV2SEC3BLK1',\n 'dependencyID' => '',\n 'name' => 'GUIDELINES AVAILABILITY',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 131 => \n array (\n 'sectionID' => 'MNHV2SEC3',\n 'blockID' => 'MNHV2SEC3BLK2',\n 'dependencyID' => '',\n 'name' => 'JOB AIDS AVAILABILITY',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 132 => \n array (\n 'sectionID' => 'MNHV2SEC3',\n 'blockID' => 'MNHV2SEC3BLK3',\n 'dependencyID' => '',\n 'name' => 'TOOLS AVAILABILITY',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 133 => \n array (\n 'sectionID' => 'MNHV2SEC4',\n 'blockID' => 'MNHV2SEC4BLK1',\n 'dependencyID' => '',\n 'name' => 'HOW MANY STAFF MEMBERS HAVE BEEN TRAINED IN THE FOLLOWING?',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 134 => \n array (\n 'sectionID' => 'MNHV2SEC5',\n 'blockID' => 'MNHV2SEC5BLK1',\n 'dependencyID' => '',\n 'name' => 'MAIN SUPPLIER',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 135 => \n array (\n 'sectionID' => 'MNHV2SEC5',\n 'blockID' => 'MNHV2SEC5BLK2',\n 'dependencyID' => '',\n 'name' => 'INDICATE THE AVAILABILITY, MAIN REASON FOR UNAVAILABILITY, DURATION OF UNAVAILABILITY & WHAT HAPPENED WHEN THE COMMODITY WAS NOT AVAILABLE',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 136 => \n array (\n 'sectionID' => 'MNHV2SEC6',\n 'blockID' => 'MNHV2SEC6BLK1',\n 'dependencyID' => '',\n 'name' => 'Equipment Availability',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 137 => \n array (\n 'sectionID' => 'MNHV2SEC6',\n 'blockID' => 'MNHV2SEC6BLK2',\n 'dependencyID' => '',\n 'name' => 'Testing Supplies',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 138 => \n array (\n 'sectionID' => 'MNHV2SEC6',\n 'blockID' => 'MNHV2SEC6BLK3',\n 'dependencyID' => '',\n 'name' => 'Delivery Kit Components',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 139 => \n array (\n 'sectionID' => 'MNHV2SEC6',\n 'blockID' => 'MNHV2SEC6BLK4',\n 'dependencyID' => '',\n 'name' => 'MAIN SUPPLIER',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 140 => \n array (\n 'sectionID' => 'MNHV2SEC6',\n 'blockID' => 'MNHV2SEC6BLK5',\n 'dependencyID' => '',\n 'name' => 'INDICATE THE AVAILABILITY AND MAIN REASON FOR UNAVAILABILITY FOR THE FOLLOWING KITS/SETS',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 141 => \n array (\n 'sectionID' => 'MNHV2SEC7',\n 'blockID' => 'MNHV2SEC7BLK1',\n 'dependencyID' => '',\n 'name' => 'INDICATE THE AVAILABILITY AND LOCATION OF THE FOLLOWING RESOURCES',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 142 => \n array (\n 'sectionID' => 'MNHV2SEC7',\n 'blockID' => 'MNHV2SEC7BLK2',\n 'dependencyID' => '',\n 'name' => 'INDICATE THE STORAGE AND ACCESS TO WATER',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 143 => \n array (\n 'sectionID' => 'MNHV2SEC7',\n 'blockID' => 'MNHV2SEC7BLK3',\n 'dependencyID' => '',\n 'name' => 'INDICATE THE AVAILABILITY AND STORAGE, SUPPLIER AND SOURCE OF THE FOLLOWING',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 144 => \n array (\n 'sectionID' => 'MNHV2SEC7',\n 'blockID' => 'MNHV2SEC7BLK4',\n 'dependencyID' => '',\n 'name' => 'PROVISION FOR WASTE DISPOSAL',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 145 => \n array (\n 'sectionID' => 'MNHV2SEC8',\n 'blockID' => 'MNHV2SEC8BLK1',\n 'dependencyID' => '',\n 'name' => 'COMMUNITY STRATEGY',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n ));\n \n \n }",
"protected function _getBlockArray()\n {\n return array(\n \n /*\n * Minicart section\n */\n array(\n 'version' => '0.0.1',\n 'identifier' => 'header_contact_information',\n 'stores' => [0],\n 'title' => 'Header Contact Information',\n 'content' => <<<HTML\n<div id=\"phone-hrs\">\n <a href=\"https://goo.gl/maps/seJQCD3gzao\" target=\"_blank\">Visit Us</a> or Call Us: <a id=\"phone-number\" href=\"tel:+18009387925\">(800) 938-7925</a> Today's Hours: 7:00am - 6:00pm\n</div>\nHTML\n ),\n array(\n 'version' => '0.0.3',\n 'identifier' => 'home_sidebar',\n 'stores' => [0],\n 'title' => 'Home Sidebar',\n 'content' => <<<HTML\n<div class=\"sidebar\">\n <div class=\"home-side-menu\">\n <h2 class=\"side-menu-title\">CATEGORIES</h2>\n {{block class=\"Smartwave\\Megamenu\\Block\\Topmenu\" name=\"sw.sidenav\" template=\"Smartwave_Megamenu::sidemenu.phtml\" ttl=\"3600\"}} </div>\n <!-- start -->\n <div id=\"ads-slider-demo-9\">\n <div class=\"item\">\n <h2><a href=\"#\">Blog Articles</a></h2>\n <ul class=\"recent-blog\" style=\"list-style:none; padding-inline-start:12px; padding-right:12px;\">\n <li><a title=\"Bosch Laser Level - GLL3-330CG\" href=\"https://www.masterwholesale.com/blog/bosch-green-line-laser-level-review/\" target=\"_blank\">Review: Bosch Green Line Laser Level</a></li>\n <li><a title=\"Makita LXT Lithium Ion Cordless Brushless Angle Grinder\" href=\"https://www.masterwholesale.com/blog/makita-18v-lxt-lithium-ion-cordless-brushless-angle-grinder-review/\" target=\"_blank\">Review: Makita <span>LXT Cordless Brushless Angle Grinder </span></a></li>\n <li><a title=\"Mixing Laticrete PermaColor Grout\" href=\"https://www.masterwholesale.com/blog/how-to-mix-small-batch-laticrete-permacolor-select-grout/\" target=\"_blank\">How to Mix a Small Batch of Laticrete PermaColor Grout</a></li>\n <li><a title=\"Polishing Tile Edges with Diamond Hand Polishing Pads\" href=\"https://www.masterwholesale.com/blog/polish-stone-porcelain-tile-diamond-hand-polishing-pads/\" target=\"_blank\">How to Polish Tile Edges w/ Diamond Hand Polishing Pads</a></li>\n <li><a title=\"Stoning Porcelain and Stone Tile\" href=\"https://www.masterwholesale.com/blog/stone-edge-porcelain-tile-stone/\" target=\"_blank\">How to Stone or Edge Porcelain and Stone Tiles</a></li>\n <li><a title=\"Bridge Saw vs Sliding Table Saw\" href=\"https://www.masterwholesale.com/blog/366-2/\" target=\"_blank\">Bridge Saw vs Sliding Table Saw</a></li>\n <li><a title=\"How to Core with a Diamond Core Drill Bit\" href=\"https://www.masterwholesale.com/blog/dry-core-drill-tile-stone/\" target=\"_blank\">How to Dry Core Drill on Stone or Tile</a></li>\n <li><a title=\"How to Reopen a diamond Core Bit \" href=\"https://www.masterwholesale.com/blog/master-wholesale-reopen-diamond-core-bit/\" target=\"_blank\">How to Sharpen or Reopen a Diamond Core Bit</a></li>\n <li><a title=\"Resin Glass Blade Shootout\" href=\"https://www.masterwholesale.com/blog/resin-glass-blade-shootout/\" target=\"_blank\">Resin Glass Blade Shootout with Blake Adsero</a></li>\n <li><a title=\"Makita Polishing Kit\" href=\"https://www.masterwholesale.com/blog/makita-pw5001c-wet-polishing-kit-master-wholesale/\" target=\"_blank\">How to Polish an Exposed Edge on Stone Tile</a></li>\n <li><a title=\"Deluxe Dry Polishing Kit\" href=\"https://www.masterwholesale.com/blog/?p=254\" target=\"_self\">MWI Deluxe Dry Polishing Kit Demo</a></li>\n <li><a title=\"Laser Level Shootout\" href=\"https://www.masterwholesale.com/blog/laser-level-shootout/\" target=\"_self\">Laser Level Shootout</a></li>\n <li><a title=\"Ishii Tile Cutters\" href=\"https://www.masterwholesale.com/blog/how-to-assemble-and-use-the-ishii-blue-tile-cutters/\" target=\"_self\">How to Assemble and Use Ishii BlueTile Cutters</a></li>\n <li><a title=\"Diamond Blade Shootout\" href=\"https://www.masterwholesale.com/blog/tile-saw-diamond-blade-shootout/\" target=\"_self\">Tile Saw Diamond Blade Shootout</a></li>\n </ul>\n </div>\n </div>\n <!-- end --> \n <!-- start -->\n <div id=\"ads-slider-demo-9\" class=\"owl-carousel\">\n <div class=\"item\" style=\"text-align:center;\"> <img src=\"\" alt=\"\" style=\"display:inline-block;\"/> </div>\n </div>\n <!-- end --> \n <!-- start -->\n <div id=\"ads-slider-demo-9\">\n <div class=\"item\" style=\"text-align:center;\"> {{block class=\"Magento\\Framework\\View\\Element\\Template\" name=\"single_special\" template=\"Magento_Catalog::product/view/single_special.phtml\" ttl=\"3600\"}} </div>\n </div>\n <!-- end --> \n </div>\nHTML\n ),\n );\n }",
"public function saveBlocks($data, $brochure, $page){\n\t\n\t\t$db = JFactory::getDBO();\n\t\n\t\tforeach( $data as $key => $block ){\n\t\t\n\t\t\t$block_id = explode('-',$key);\n\t\t\t\n\t\t\t$query = \"DELETE FROM #__zbrochure_block_content \"\n\t\t\t.\"WHERE block_id = \".(int)$block_id[1].\" AND brochure_id = \".(int)$brochure.\" AND page = \".(int)$page\n\t\t\t;\n\t\t\t\n\t\t\t$this->_db->setQuery( $query );\n\t\t\t$this->_db->Query();\n\t\t\n\t\t\t$row = $this->getTable('blockcontent');\n\t\n\t\t \tif( !$row->bind( $block ) ){\n\t\t \t\n\t\t\t\t$this->setError($this->_db->getErrorMsg());\n\t\t\t\treturn false;\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$row->brochure_id \t= $brochure;\n\t\t\t$row->block_bro\t= json_encode($row->block_bro);\n\t\t\t$row->page \t\t\t= $page;\n\t\t\t$row->block_id\t\t= $block_id[1];\n\t\t\t\n\t\t\t//alright, good to go. Store it to the Joomla db\n\t\t\tif( !$row->store() ){\n\t\t\t\t$this->setError($this->_db->getErrorMsg());\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\n\t\t}\n\t\n\t}",
"public function getBlocksDataFullRaw(): void\n\t{\n\t\t// Get global settings direct from file.\n\t\t$settings = $this->getSettingsManifest();\n\n\t\t$namespace = $settings['namespace'];\n\n\t\t$blocks = \\array_map(\n\t\t\tstatic function ($block) use ($namespace) {\n\t\t\t\t// Check if blocks-namespace is defined in block or in global manifest settings.\n\t\t\t\t$block['namespace'] = $namespace;\n\t\t\t\t$block['blockFullName'] = \"{$namespace}/{$block['blockName']}\";\n\n\t\t\t\treturn $block;\n\t\t\t},\n\t\t\t$this->getBlocksManifests()\n\t\t);\n\n\t\t// Register store and set all the data.\n\t\tComponents::setStore();\n\t\tComponents::setSettings($settings);\n\t\tComponents::setBlocks($blocks);\n\t\tComponents::setComponents($this->getComponentsManifests());\n\t\tComponents::setVariations($this->getVariationsManifests());\n\t\tComponents::setConfigFlags();\n\t\tComponents::setPaths();\n\n\t\tif (Components::getConfigUseWrapper()) {\n\t\t\tComponents::setWrapper($this->getWrapperManifest());\n\t\t}\n\t}",
"function serialize_blocks($blocks)\n {\n }",
"function gallery2_sidebarblock_modify($blockinfo)\n{\n // get current content\n if (!is_array($blockinfo['content'])) {\n $vars = @unserialize($blockinfo['content']);\n } else {\n $vars = $blockinfo['content'];\n }\n\n $vars['blockid'] = $blockinfo['bid'];\n return $vars;\n}",
"public function run()\n {\n $this->disableForeignKeys();\n $this->truncate('blocks');\n\n /*\n * ABOUT US PAGE BLOCKS\n */\n $blocks = [\n [\n 'page_id' => 1,\n 'title' => 'History',\n 'title_ru' => 'История',\n 'title_it' => 'Mostra di più',\n 'body' => 'The collection is inspired by the Renaissance town of Verona, symbol of the classic and highly appreciated Italian style, romantic and elegant at a time. Special care is devoted to details, the selection of tissues, and the coordination of color nuances.\n ',\n 'body_ru' => 'Коллекция вдохновлена эпохой Возрождения Вероны, символом классического и высоко оцененного итальянского стиля, романтического и элегантного за один раз. Особое внимание уделяется деталям, выбору тканей и координации цветовых нюансов.',\n 'body_it' => 'La collezione è ispirata alla città rinascimentale di Verona, simbolo del classico stile italiano molto apprezzato, romantico ed elegante alla volta. La cura particolare è dedicata ai dettagli, alla selezione dei tessuti e al coordinamento delle sfumature di colore.\n ',\n 'image' => null,\n 'title_limit' => 15,\n 'body_limit' => 300,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => 'Expression of style',\n 'title_ru' => 'Выражение стиля',\n 'title_it' => 'Espressione dello stile',\n 'body_it' => 'Anche nell\\'area dell\\'ufficio un nuovo concetto di spazio, adattato alle vostre esigenze, riesce a ripristinare un design elegante e raffinato che si esprime in una cura amorosa per i dettagli, in una lavorazione a mano che esalta le texture, dando complementi di mobili con un unico e Fascino senza tempo.',\n 'body_ru' => 'Кроме того, в офисной зоне новая концепция пространства, адаптированная к вашим потребностям, оживляет элегантный и изысканный дизайн, который выражается в любящей заботе о деталях, в ручном производстве, которое превозносит текстуры, придавая вам мебельные дополнения с уникальным и Вневременное очарование',\n 'body' => 'Also in the office area a new concept of space, tailored to your needs, to revive an elegant and refined design that expresses itself in a loving care for details, in a hand manufacturing that exalt the textures, giving you furniture complements with a unique and timeless charm',\n 'image' => 'under-history-right.jpg',\n 'title_limit' => 25,\n 'body_limit' => 330,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body' => 'The lifelong experience is being reflected in almost every project. At Cavio-Casa, we are welcoming challenges to foster our creativity. People inspire us and we want to inspire them too.<br><br>Everything we do at Cavio-Casa is guided by our vision to ensure that we all go the extra mile to help our customers reach their audiences. So far, we have achieved to play a dynamic role in shaping the jewelry industry.\n ',\n 'body_ru' => 'Жизненный опыт отражается почти во всех проектах. В Cavio-Casa мы приветствуем проблемы, способствующие нашему творчеству. Люди вдохновляют нас, и мы хотим их вдохновить. <br><br> Все, что мы делаем в Cavio-Casa, руководствуется нашим видением, чтобы все мы прошли лишнюю милю, чтобы помочь нашим клиентам достичь своей аудитории. До сих пор мы достигли динамичной роли в формировании ювелирной промышленности.',\n 'body_it' => 'L\\'esperienza permanente si riflette in quasi tutti i progetti. A Cavio-Casa, stiamo accogliendo sfide per promuovere la nostra creatività. La gente ci ispira e vogliamo ispirare anche loro<br><br> Tutto quello che facciamo a Cavio-Casa è guidato dalla nostra visione per assicurarci che tutti noi passiamo il miglio supplementare per aiutare i nostri clienti a raggiungere il loro pubblico. Finora abbiamo raggiunto un ruolo dinamico nella progettazione dell\\'industria dei gioielli.',\n 'image' => 'under-history-left.jpg',\n 'title_limit' => null,\n 'body_limit' => 500,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => 'Philosofhy',\n 'title_ru' => 'Философия',\n 'title_it' => 'Filosofia',\n 'body' => 'The collection is inspired by the Renaissance town of Verona, symbol of the classic and highly appreciated Italian style, romantic and elegant at a time. Special care is devoted to details, the selection of tissues, and the coordination of color nuances.',\n 'body_ru' => 'Коллекция вдохновлена эпохой Возрождения Вероны, символом классического и высоко оцененного итальянского стиля, романтического и элегантного за один раз. Особое внимание уделяется деталям, выбору тканей и координации цветовых нюансов.',\n 'body_it' => 'La collezione è ispirata alla città rinascimentale di Verona, simbolo del classico stile italiano molto apprezzato, romantico ed elegante alla volta. La cura particolare è dedicata ai dettagli, alla selezione dei tessuti e al coordinamento delle sfumature di colore.',\n 'image' => null,\n 'title_limit' => 15,\n 'body_limit' => 300,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body_it' => 'Tutto quello che facciamo a Cavio-Casa è guidato dalla nostra visione per assicurare che tutti noi andiamo il miglio supplementare per aiutare i nostri clienti a raggiungere il loro pubblico. Finora abbiamo raggiunto un ruolo dinamico nella progettazione dell\\'industria dei gioielli<br><br> L\\'esperienza permanente si riflette in quasi tutti i progetti. A Cavio-Casa, stiamo accogliendo sfide per promuovere la nostra creatività. Le persone ci ispirano e vogliamo ispirare anche loro.',\n 'body_ru' => 'Все, что мы делаем в Cavio-Casa, руководствуется нашим видением, чтобы все мы прошли лишнюю милю, чтобы помочь нашим клиентам достичь своей аудитории. До сих пор мы достигли динамичной роли в формировании ювелирной промышленности.<br>Жизненный опыт отражается почти во всех проектах. В Cavio-Casa мы приветствуем проблемы, способствующие нашему творчеству. Люди вдохновляют нас, и мы хотим вдохновить их тоже.',\n 'body' => 'Everything we do at Cavio-Casa is guided by our vision to ensure that we all go the extra mile to help our customers reach their audiences. So far, we have achieved to play a dynamic role in shaping the jewelry industry.<br>The lifelong experience is being reflected in almost every project. At Cavio-Casa, we are welcoming challenges to foster our creativity. People inspire us and we want to inspire them too.',\n 'image' => null,\n 'title_limit' => null,\n 'body_limit' => 500,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body' => 'We have been renowned for the high quality of our hand-made products, the innovative ideas, the effective co-operation with clients around the world and the ability to tailor our services to each customer’s needs surpassing their expectations.<br><br>We are always next to you, full of new ideas, determination and love because we believe in what we do.',\n 'image' => null,\n 'body_ru' => 'Мы были известны высоким качеством наших изделий ручной работы, инновационными идеями, эффективным сотрудничеством с клиентами по всему миру и возможностью адаптировать наши услуги к потребностям каждого клиента, превосходящим их ожидания. <br><br> Мы всегда рядом с вами, полны новых идей, решительности и любви, потому что мы верим в то, что делаем.',\n 'body_it' => 'Siamo stati rinomati per l\\'alta qualità dei nostri prodotti fatti a mano, le idee innovative, l\\'efficace collaborazione con i clienti in tutto il mondo e la capacità di adattare i nostri servizi alle esigenze di ogni cliente che supera le loro aspettative.<br><br> Siamo sempre accanto a voi, pieno di nuove idee, determinazione e amore perché crediamo in ciò che facciamo.',\n 'title_limit' => null,\n 'body_limit' => 500,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body_ru' => '<span class=colored>Свобода</span>для сопоставления<br>разных материалов и отделок<br>и <span class=colored>ошеломляющий</span>визуал.',\n 'image' => null,\n 'body' => 'The <span class=colored>freedom</span>to to juxtapose<br>different materials, finishes<br>and <span class=colored>stunning</span>visual.',\n 'body_it' => 'La <span class=colored>libertà</span>Per giungere a destra<br>Materiali diversi, finiture<br>e <span class=colored>stunning</span>visivo.',\n 'title_limit' => null,\n 'body_limit' => 150,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => 'Mood',\n 'title_ru' => 'Настроение',\n 'title_it' => 'Umore',\n 'body' => 'Special care is devoted to details, the selection of tissues, and the coordination of color nuances. The collection is inspired by the Renaissance town of Verona, symbol of the classic and highly appreciated Italian style, romantic and elegant at a time.',\n 'body_ru' => 'Особое внимание уделяется деталям, выбору тканей и координации цветовых нюансов. Коллекция вдохновлена эпохой Возрождения Вероны, символом классического и высоко оцененного итальянского стиля, романтического и элегантного за один раз.',\n 'body_it' => 'La cura particolare è dedicata ai dettagli, alla selezione dei tessuti e al coordinamento delle sfumature di colore. La collezione è ispirata alla città rinascimentale di Verona, simbolo del classico stile italiano molto apprezzato, romantico ed elegante alla volta.',\n 'image' => null,\n 'title_limit' => 15,\n 'body_limit' => 300,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => 'Expression',\n 'title_ru' => 'Выражение',\n 'title_it' => 'Espressione',\n 'body' => 'Also in the office area a new concept of space, tailored to your needs, to revive an elegant and refined design that expresses itself in a loving care for details.',\n 'body_ru' => 'Кроме того, в офисе новая концепция пространства, адаптированная к вашим потребностям, оживляет элегантный и изысканный дизайн, который выражает себя в любящей заботе о деталях.',\n 'body_it' => 'Anche nell\\'area dell\\'ufficio un nuovo concetto di spazio, adattato alle vostre esigenze, riesumina un design elegante e raffinato che si esprime in una cura amorosa per i dettagli.',\n 'image' => null,\n 'title_limit' => 12,\n 'body_limit' => 190,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => 'Style',\n 'title_ru' => 'Стиль',\n 'title_it' => 'Stile',\n 'body' => 'In a hand manufacturing that exalt the textures, giving you furniture complements with a unique and timeless charm.\n ',\n 'body_ru' => 'В ручном производстве, которые превозносят текстуры, дают вам комплименты мебели с уникальным и неподвластным времени очарованием.',\n 'body_it' => 'In una produzione a mano che esalta le texture, dandovi complimenti per mobili con un fascino unico e senza tempo.',\n 'image' => null,\n 'title_limit' => 12,\n 'body_limit' => 190,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => 'Quality',\n 'title_ru' => 'Качество',\n 'title_it' => 'Qualità',\n 'body' => 'Also in the office area a new concept of space, tailored to your needs, to revive an elegant and refined design that expresses itself in a loving care for details.\n ',\n 'body_ru' => 'Кроме того, в офисе новая концепция пространства, адаптированная к вашим потребностям, оживляет элегантный и изысканный дизайн, который выражает себя в любящей заботе о деталях.',\n 'body_it' => 'Anche nell\\'area dell\\'ufficio un nuovo concetto di spazio, adattato alle vostre esigenze, riesumina un design elegante e raffinato che si esprime in una cura amorosa per i dettagli.',\n 'image' => null,\n 'title_limit' => 12,\n 'body_limit' => 190,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n /*\n * Contacts PAGE BLOCKS\n */\n [\n 'page_id' => 2,\n 'title' => 'CAVIO Factory & Showroom',\n 'title_ru' => 'CAVIO Фабрики & Посредники',\n 'title_it' => 'CAVIO Factory & Showroom',\n 'body' => 'Viale Europa, 6/a, 37050<br>San Pietro di Morubio (VR)\n Italia<br><br>Telefone: <a href=\"tel:+39 045 71 44 503\" class=tel>+39 045 71 44 503</a><br>Fax:\n <a href=\"tel:+39 045 71 44 277\" class=tel>+39 045 71 44 277</a><br><br><a\n href=mailto:[email protected] class=\"colored_link anim-underline\">[email protected]</a>',\n 'body_ru' => 'Viale Europa, 6/a, 37050<br>San Pietro di Morubio (VR)\n Italia<br><br>Telefone: <a href=\"tel:+39 045 71 44 503\" class=tel>+39 045 71 44 503</a><br>Fax:\n <a href=\"tel:+39 045 71 44 277\" class=tel>+39 045 71 44 277</a><br><br><a\n href=mailto:[email protected] class=\"colored_link anim-underline\">[email protected]</a>',\n 'body_it' => 'Viale Europa, 6/a, 37050<br>San Pietro di Morubio (VR)\n Italia<br><br>Telefone: <a href=\"tel:+39 045 71 44 503\" class=tel>+39 045 71 44 503</a><br>Fax:\n <a href=\"tel:+39 045 71 44 277\" class=tel>+39 045 71 44 277</a><br><br><a\n href=mailto:[email protected] class=\"colored_link anim-underline\">[email protected]</a>',\n 'image' => 'cont-r.jpg',\n 'title_limit' => 26,\n 'body_limit' => 400,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 2,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body' => '',\n 'body_ru' => '',\n 'body_it' => '',\n 'image' => 'cont-map.jpg',\n 'title_limit' => null,\n 'body_limit' => null,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 2,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body' => '',\n 'body_ru' => '',\n 'body_it' => '',\n 'image' => 'cont-bottom.jpg',\n 'title_limit' => null,\n 'body_limit' => null,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 8,\n 'title' => 'Our philosofy',\n 'title_ru' => 'Наша философия',\n 'title_it' => 'La filosofia',\n 'body' => '<div class=wrap-phil-p><p>Italian furniture showroom CAVIO found its adherents in 38 countries, including Switzerland, France, Sweden, Netherlands, Germany, Australia and the United States.</div><div class=wrap-phil-p><p>In Kiev, the Italian furniture CAVIO presented in several showrooms, conveniently located on the left and right banks.</div><div class=wrap-phil-p><p>Here, professional consultants will help you to implement a holistic complete interior - from the kitchen, bedroom, living room and study to the children\\'s room <a href=# class=link-arrow>→</a></div>',\n 'body_ru' => '<div class=wrap-phil-p><p>Italian furniture showroom CAVIO found its adherents in 38 countries, including Switzerland, France, Sweden, Netherlands, Germany, Australia and the United States.</div><div class=wrap-phil-p><p>In Kiev, the Italian furniture CAVIO presented in several showrooms, conveniently located on the left and right banks.</div><div class=wrap-phil-p><p>Here, professional consultants will help you to implement a holistic complete interior - from the kitchen, bedroom, living room and study to the children\\'s room <a href=# class=link-arrow>→</a></div>',\n 'body_it' => '<div class=wrap-phil-p><p>Italian furniture showroom CAVIO found its adherents in 38 countries, including Switzerland, France, Sweden, Netherlands, Germany, Australia and the United States.</div><div class=wrap-phil-p><p>In Kiev, the Italian furniture CAVIO presented in several showrooms, conveniently located on the left and right banks.</div><div class=wrap-phil-p><p>Here, professional consultants will help you to implement a holistic complete interior - from the kitchen, bedroom, living room and study to the children\\'s room <a href=# class=link-arrow>→</a></div>',\n 'image' => 'phil-image.jpg',\n 'title_limit' => 15,\n 'body_limit' => 810,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 9,\n 'title' => 'Privacy Policy',\n 'title_ru' => 'Политика приватности',\n 'title_it' => 'Politica sulla riservatezza',\n 'body' => '',\n 'body_ru' => '',\n 'body_it' => '',\n 'image' => null,\n 'title_limit' => 30,\n 'body_limit' => null,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n\n /*\n * Showroom page\n */\n\n [\n 'page_id' => 5,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body' => '',\n 'body_ru' => '',\n 'body_it' => '',\n 'title_limit' => null,\n 'body_limit' => null,\n 'image' => 'show_r-slide-2.jpg',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 5,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body' => '',\n 'body_ru' => '',\n 'body_it' => '',\n 'title_limit' => null,\n 'body_limit' => null,\n 'image' => 'show_r-slide-3.jpg',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 5,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body' => '',\n 'body_ru' => '',\n 'body_it' => '',\n 'title_limit' => null,\n 'body_limit' => null,\n 'image' => 'show_r-slide-1.jpg',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 5,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body' => 'Don’t found showroom<br>near you? <span class=colored>Contact main</span><br>',\n 'body_ru' => 'Не нашли салон рядом<br>с вами? <span class=colored>Обратитесь в главный</span><br>',\n 'body_it' => 'Non ho trovato lo showroom<br>vicino a te? <span class=colored>Contatto principale</span><br>',\n 'image' => null,\n 'title_limit' => null,\n 'body_limit' => 100,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 5,\n 'title' => 'Main Showroom',\n 'title_ru' => 'Главный магазин',\n 'title_it' => 'Showroom principale',\n 'body' => 'Viale Europa, 6/a, 37050<br>San Pietro di Morubio (VR) Italia<br><br>Telefone: <a href=tel:+390457144503 class=tel>+39 045 71 44 503</a><br>Fax: <a href=tel:+390457144277 class=tel>+39 045 71 44 277</a><br><br><a href=mailto:[email protected] class=\"colored_link anim-underline\">[email protected]</a>',\n 'body_ru' => 'Viale Europa, 6/a, 37050<br>San Pietro di Morubio (VR) Italia<br><br>Telefone: <a href=tel:+390457144503 class=tel>+39 045 71 44 503</a><br>Fax: <a href=tel:+390457144277 class=tel>+39 045 71 44 277</a><br><br><a href=mailto:[email protected] class=\"colored_link anim-underline\">[email protected]</a>',\n 'body_it' => 'Viale Europa, 6/a, 37050<br>San Pietro di Morubio (VR) Italia<br><br>Telefone: <a href=tel:+390457144503 class=tel>+39 045 71 44 503</a><br>Fax: <a href=tel:+390457144277 class=tel>+39 045 71 44 277</a><br><br><a href=mailto:[email protected] class=\"colored_link anim-underline\">[email protected]</a>',\n 'image' => 'main-showroom.jpg',\n 'title_limit' => null,\n 'body_limit' => 320,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n\n\n ];\n\n DB::table('blocks')->insert($blocks);\n\n\n $this->enableForeignKeys();\n }",
"private function parse(array $block): array\n {\n $raw = get_field('data');\n $className = trim(array_key_exists('className', $block) ? $block['className'] : '');\n\n unset($raw['']);\n\n $data = array(\n 'block' => (object) [\n 'id' => $block['id'],\n 'classList' => !empty($className) ? explode(' ', $className) : [],\n 'className' => $className,\n 'anchor' => !empty($block['anchor']) ? $block['anchor'] : $block['id']\n ],\n 'raw' => !empty($block['data']) ? (object) $block['data'] : (object) [],\n 'data' => !empty($raw) ? (object) $raw : (object) [],\n 'template' => 'blocks::' . $this->getId()\n );\n\n return $this->filter($data, $block);\n }",
"protected function _collectBlocks()\n {\n if ($blocks = $this->_layoutHandleUpdatesXml->xpath('//block/label/..')) {\n /* @var $block Mage_Core_Model_Layout_Element */\n foreach ($blocks as $block) {\n if ((string)$block->getAttribute('name') && $this->_filterBlock($block)) {\n $helper = Mage::helper(Mage_Core_Model_Layout::findTranslationModuleName($block));\n $this->_blocks[(string)$block->getAttribute('name')] = $helper->__((string)$block->label);\n }\n }\n }\n asort($this->_blocks, SORT_STRING);\n }",
"public function splitIntoBlockDataProvider() {}",
"public static function get_block_data()\n {\n }",
"private function _getDataProviderEmpty3()\n {\n return [\n [\n 'containerDesignBlockId' => ' ',\n 'titleDesignBlockId' => ' ',\n 'titleDesignTextId' => ' ',\n 'descriptionDesignBlockId' => ' ',\n 'descriptionDesignTextId' => ' ',\n 'paginationDesignBlockId' => ' ',\n 'paginationItemDesignBlockId' => ' ',\n 'paginationItemDesignTextId' => ' ',\n ],\n [\n 'containerDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'titleDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'titleDesignTextModel' => [\n 'size' => 0\n ],\n 'descriptionDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'descriptionDesignTextModel' => [\n 'size' => 0\n ],\n 'paginationDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'paginationItemDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'paginationItemDesignTextModel' => [\n 'size' => 0\n ],\n ],\n [\n 'containerDesignBlockId' => null,\n 'titleDesignBlockId' => null,\n 'titleDesignTextId' => null,\n 'descriptionDesignBlockId' => null,\n 'descriptionDesignTextId' => null,\n 'paginationDesignBlockId' => null,\n 'paginationItemDesignBlockId' => null,\n 'paginationItemDesignTextId' => null,\n ],\n [\n 'containerDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'titleDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'titleDesignTextModel' => [\n 'size' => 0\n ],\n 'descriptionDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'descriptionDesignTextModel' => [\n 'size' => 0\n ],\n 'paginationDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'paginationItemDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'paginationItemDesignTextModel' => [\n 'size' => 0\n ],\n ],\n ];\n }",
"function getBlockOutputs() {\n\tglobal $settings;\n\t//echo \"getting blocks\";\n\t\n\t$blockOutput = array();\n\t\n\t$blocksTmp = file_get_contents($settings['channelMemoryMapsFile']);\n\t\n\t//print_r($blocksTmp);\n\t\n\t$blocks = explode(\"\\n\",$blocksTmp);\n\t\n\t//print_r($blocks);\n\t$blockIndex=0;\n\t\n\tfor($blockIndex =0; $blockIndex<=count($blocks)-1;$blockIndex++) {\n\t\t$blockParts = explode(\",\",$blocks[$blockIndex]);\n\t\t$blockOutput[] = $blockParts[0];\n\t\t//$blockIndex++;\n\t\t//$blockOutput [] =\n\t}\n\t//print_r($blockOutput);\n\t\n\treturn $blockOutput;\n}",
"public function load_blocks_list() {\n $tmp_blocks = apply_filters('wpucacheblocks_blocks', array());\n $blocks = array();\n foreach ($tmp_blocks as $id => $block) {\n /* Path ex : /tpl/header/block.php */\n if (!isset($block['fullpath']) && !isset($block['path'])) {\n /* A path should always be defined */\n continue;\n }\n /* Full path to the file */\n if (!isset($block['fullpath'])) {\n $block['fullpath'] = get_stylesheet_directory() . $block['path'];\n }\n\n /* Reload hooks */\n if (!isset($block['reload_hooks']) || !is_array($block['reload_hooks'])) {\n $block['reload_hooks'] = array();\n } else {\n /* Keep a list of all hooks used */\n foreach ($block['reload_hooks'] as $hook) {\n $this->reload_hooks[$hook] = $hook;\n }\n }\n\n if (!isset($block['minify'])) {\n $block['minify'] = true;\n }\n\n /* Expiration time */\n if (!isset($block['expires'])) {\n $block['expires'] = 3600;\n } else {\n /* Allow infinite lifespan for a cached block ( no front reload ) */\n if ($block['expires'] == 0) {\n $block['expires'] = false;\n }\n }\n $blocks[$id] = $block;\n }\n return $blocks;\n }",
"private function _getDataProviderEmpty4()\n {\n return [\n [\n 'containerDesignBlockModel' => [\n 'marginTop' => ' '\n ],\n 'titleDesignBlockModel' => [\n 'marginTop' => ' '\n ],\n 'titleDesignTextModel' => [\n 'size' => ' '\n ],\n 'descriptionDesignBlockModel' => [\n 'marginTop' => ' '\n ],\n 'descriptionDesignTextModel' => [\n 'size' => ' '\n ],\n 'paginationDesignBlockModel' => [\n 'marginTop' => ' '\n ],\n 'paginationItemDesignBlockModel' => [\n 'marginTop' => ' '\n ],\n 'paginationItemDesignTextModel' => [\n 'size' => ' '\n ],\n ],\n [\n 'containerDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'titleDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'titleDesignTextModel' => [\n 'size' => 0\n ],\n 'descriptionDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'descriptionDesignTextModel' => [\n 'size' => 0\n ],\n 'paginationDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'paginationItemDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'paginationItemDesignTextModel' => [\n 'size' => 0\n ],\n ],\n [\n 'containerDesignBlockModel' => [],\n 'titleDesignBlockModel' => [],\n 'titleDesignTextModel' => [],\n 'descriptionDesignBlockModel' => [],\n 'descriptionDesignTextModel' => [],\n 'paginationDesignBlockModel' => [],\n 'paginationItemDesignBlockModel' => [],\n 'paginationItemDesignTextModel' => [],\n ],\n [\n 'containerDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'titleDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'titleDesignTextModel' => [\n 'size' => 0\n ],\n 'descriptionDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'descriptionDesignTextModel' => [\n 'size' => 0\n ],\n 'paginationDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'paginationItemDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'paginationItemDesignTextModel' => [\n 'size' => 0\n ],\n ],\n ];\n }",
"function createBlock( $block_index=null ){\n global $mysqli, $counterparty;\n $data = (object) $counterparty->execute('get_block_info', array('block_index' => $block_index));\n $data->block_hash_id = createTransaction($data->block_hash);\n $data->previous_block_hash_id = createTransaction($data->previous_block_hash);\n $data->ledger_hash_id = createTransaction($data->ledger_hash);\n $data->txlist_hash_id = createTransaction($data->txlist_hash);\n $data->messages_hash_id = createTransaction($data->messages_hash);\n $results = $mysqli->query(\"SELECT block_index FROM blocks WHERE block_index='{$data->block_index}' LIMIT 1\");\n if($results){\n if($results->num_rows){\n $row = $results->fetch_assoc();\n $id = $row['id'];\n $sql = \"UPDATE blocks SET\n block_time = '{$data->block_time}',\n block_hash_id = '{$data->block_hash_id}',\n previous_block_hash_id = '{$data->previous_block_hash_id}',\n ledger_hash_id = '{$data->ledger_hash_id}',\n txlist_hash_id = '{$data->txlist_hash_id}',\n messages_hash_id = '{$data->messages_hash_id}',\n difficulty = '{$data->difficulty}'\n WHERE\n block_index='{$block_index}'\";\n $results = $mysqli->query($sql);\n if($results){\n return $id;\n } else {\n byeLog('Error while trying to update block ' . $data->block_index);\n }\n } else {\n // Grab data on the asset from api and set some values before stashing info in db\n $sql = \"INSERT INTO blocks (block_index, block_time, block_hash_id, previous_block_hash_id, ledger_hash_id, txlist_hash_id, messages_hash_id, difficulty) values (\n '{$data->block_index}',\n '{$data->block_time}',\n '{$data->block_hash_id}',\n '{$data->previous_block_hash_id}',\n '{$data->ledger_hash_id}',\n '{$data->txlist_hash_id}',\n '{$data->messages_hash_id}',\n '{$data->difficulty}')\";\n $results = $mysqli->query($sql);\n if($results){\n return $mysqli->insert_id;\n } else {\n byeLog('Error while trying to create block ' . $data->block_index);\n }\n }\n } else {\n byeLog('Error while trying to lookup record in blocks table');\n }\n}",
"function serialize_block($block)\n {\n }",
"public function run()\n {\n \tDB::table('blocks')->delete();\n\n \t\tDB::table('blocks')->insert([\n\n //header\n \t\t\t['block_type'=>'header','title_en'=>'CALL US','title_ar'=>'اتصل بنا','title_enabled'=>'0',\n \t\t\t\t'value_en'=>'423423423423','value_ar'=>'23432566','image'=>'','has_image'=>'0'],\n ['block_type'=>'header','title_en'=>'EMAIL US','title_ar'=>'EMAIL US','title_enabled'=>'0',\n 'value_en'=>'info@gap_polymers.com','value_ar'=>'info@gap_polymers.com','image'=>'','has_image'=>'0'],\n ['block_type'=>'header','title_en'=>'MARKET','title_ar'=>'MARKET','title_enabled'=>'0',\n 'value_en'=>'256.78 + 4.26','value_ar'=>'256.78 + 4.26','image'=>'','has_image'=>'0'],\n\n\n //social \n ['block_type'=>'social','title_en'=>'facebook','title_ar'=>'facebook','title_enabled'=>'1',\n 'value_en'=>'https://www.facebook.com/','value_ar'=>'https://www.facebook.com/','image'=>'','has_image'=>'0'],\n ['block_type'=>'social','title_en'=>'twitter','title_ar'=>'twitter','title_enabled'=>'1',\n 'value_en'=>'https://www.twitter.com/','value_ar'=>'https://www.twitter.com/','image'=>'','has_image'=>'0'],\n ['block_type'=>'social','title_en'=>'linkedin','title_ar'=>'linkedin','title_enabled'=>'1',\n 'value_en'=>'https://www.linkedin.com/','value_ar'=>'https://www.linkedin.com/','image'=>'','has_image'=>'0'],\n ['block_type'=>'social','title_en'=>'google-plus','title_ar'=>'google-plus','title_enabled'=>'1',\n 'value_en'=>'https://www.google.com/','value_ar'=>'https://www.google.com/','image'=>'','has_image'=>'0'],\n ['block_type'=>'social','title_en'=>'instagram','title_ar'=>'instagram','title_enabled'=>'1',\n 'value_en'=>'https://www.instagram.com/','value_ar'=>'https://www.instagram.com/','image'=>'','has_image'=>'0'],\n\n //Homepage Stats\n ['block_type'=>'homepage-stats','title_en'=>'Offices Worldwide','title_ar'=>'Offices Worldwide','title_enabled'=>'0','value_en'=>'26','value_ar'=>'26','image'=>'','has_image'=>'1'],\n ['block_type'=>'homepage-stats','title_en'=>'Satisfied Employees','title_ar'=>'Satisfied Employees','title_enabled'=>'0','value_en'=>'10000','value_ar'=>'10000','image'=>'','has_image'=>'1'],\n ['block_type'=>'homepage-stats','title_en'=>'Refineries & Operations','title_ar'=>'Refineries & Operations','title_enabled'=>'0','value_en'=>'35','value_ar'=>'35','image'=>'','has_image'=>'1'],\n ['block_type'=>'homepage-stats','title_en'=>'Awards & Recognitions\n ','title_ar'=>'Awards & Recognitions\n ','title_enabled'=>'0','value_en'=>'126','value_ar'=>'126','image'=>'','has_image'=>'1'],\n\n //Homepage Categories text\n ['block_type'=>'homepage-categories','title_en'=>'empty','title_ar'=>'empty','title_enabled'=>'1','value_en'=>'Objectively whiteboard transparent models for prospective information. Authoritatively myocardinate.','value_ar'=>'Objectively whiteboard transparent models for prospective \n information. Authoritatively myocardinate.','image'=>'','has_image'=>'0'],\n\n\n //Footer\n ['block_type'=>'footer','title_en'=>'HEAD OFFICE','title_ar'=>'HEAD OFFICE','title_enabled'=>'0','value_en'=>'PO Box 16122, Collins Street West, \n Victoria 8007 Australia','value_ar'=>'PO Box 16122, Collins Street West, \n Victoria 8007 Australia','image'=>'','has_image'=>'0'],\n ['block_type'=>'footer','title_en'=>'CALL US','title_ar'=>'CALL US','title_enabled'=>'0','value_en'=>'SUPPORT: 1800 425 4646 OFFICE: +1 (253) 2587 220','value_ar'=>'SUPPORT: 1800 425 4646 OFFICE: +1 (253) 2587 220','image'=>'','has_image'=>'0'],\n ['block_type'=>'footer','title_en'=>'EMAIL US','title_ar'=>'EMAIL US','title_enabled'=>'0','value_en'=>'[email protected] <br> [email protected]','value_ar'=>'[email protected] <br> [email protected]','image'=>'','has_image'=>'0'],\n ['block_type'=>'footer','title_en'=>'empty','title_ar'=>'empty','title_enabled'=>'1','value_en'=>'Our mission in business is to become the pioneer in our field by giving our customers the exceptional services that even the biggest multinational firm would have a hard time providing. Our business principle is to have long term relation with mutual benefits under the umbrella of U WIN I WIN . !','value_ar'=>'Our mission in business is to become the pioneer in our field by giving our customers the exceptional services that even the biggest multinational firm would have a hard time providing. Our business principle is to have long term relation with mutual benefits under the umbrella of U WIN I WIN . !','image'=>'','has_image'=>'0'],\n\n //About us\n ['block_type'=>'About-QuickFact','title_en'=>'Quick Fact','title_ar'=>'Quick Fact','title_enabled'=>'0','value_en'=>'Distinctively fashion in the effect of standard products communities via seamless applications. Authoritatively recaptiualize.','value_ar'=>'Distinctively fashion in the effect of standard products communities via seamless applications. Authoritatively recaptiualize.','image'=>'','has_image'=>'0'],\n //About YellowBox\n ['block_type'=>'About-YellowBox','title_en'=>'empty','title_ar'=>'empty','title_enabled'=>'1','value_en'=>'Wealth can only be accumulated by the earnings of industry and the savings of frugality.','value_ar'=>'Wealth can only be accumulated by the earnings of industry and the savings of frugality.','image'=>'','has_image'=>'0'],\n //About Stats\n ['block_type'=>'About-Stats','title_en'=>'Offices Worldwide','title_ar'=>'Offices Worldwide','title_enabled'=>'0','value_en'=>'26','value_ar'=>'26','image'=>'','has_image'=>'1'],\n ['block_type'=>'About-Stats','title_en'=>'Satisfied Employees','title_ar'=>'Satisfied Employees','title_enabled'=>'0','value_en'=>'10000','value_ar'=>'10000','image'=>'','has_image'=>'1'],\n ['block_type'=>'About-Stats','title_en'=>'Refineries & Operations','title_ar'=>'Refineries & Operations','title_enabled'=>'0','value_en'=>'35','value_ar'=>'35','image'=>'','has_image'=>'1'],\n ['block_type'=>'About-Stats','title_en'=>'Awards & Recognitions\n ','title_ar'=>'Awards & Recognitions\n ','title_enabled'=>'0','value_en'=>'126','value_ar'=>'126','image'=>'','has_image'=>'1'],\n\n //Industry\n ['block_type'=>'Industry-QuickFact','title_en'=>'Quick Fact','title_ar'=>'Quick Fact','title_enabled'=>'0','value_en'=>'Distinctively fashion in the effect of standard products communities via seamless applications. Authoritatively recaptiualize.','value_ar'=>'Distinctively fashion in the effect of standard products communities via seamless applications. Authoritatively recaptiualize.','image'=>'','has_image'=>'0'],\n\n ['block_type'=>'Industry-YellowBox','title_en'=>'empty','title_ar'=>'empty','title_enabled'=>'1','value_en'=>'Wealth can only be accumulated by the earnings of industry and the savings of frugality.','value_ar'=>'Wealth can only be accumulated by the earnings of industry and the savings of frugality.','image'=>'','has_image'=>'0'],\n\n //Industry Stats\n ['block_type'=>'Industry-Stats','title_en'=>'Offices Worldwide','title_ar'=>'Offices Worldwide','title_enabled'=>'0','value_en'=>'26','value_ar'=>'26','image'=>'','has_image'=>'1'],\n ['block_type'=>'Industry-Stats','title_en'=>'Satisfied Employees','title_ar'=>'Satisfied Employees','title_enabled'=>'0','value_en'=>'10000','value_ar'=>'10000','image'=>'','has_image'=>'1'],\n ['block_type'=>'Industry-Stats','title_en'=>'Refineries & Operations','title_ar'=>'Refineries & Operations','title_enabled'=>'0','value_en'=>'35','value_ar'=>'35','image'=>'','has_image'=>'1'],\n ['block_type'=>'Industry-Stats','title_en'=>'Awards & Recognitions\n ','title_ar'=>'Awards & Recognitions\n ','title_enabled'=>'0','value_en'=>'126','value_ar'=>'126','image'=>'','has_image'=>'1'],\n\n //Mission\n ['block_type'=>'Mission-QuickFact','title_en'=>'Quick Fact','title_ar'=>'Quick Fact','title_enabled'=>'0','value_en'=>'Distinctively fashion in the effect of standard products communities via seamless applications. Authoritatively recaptiualize.','value_ar'=>'Distinctively fashion in the effect of standard products communities via seamless applications. Authoritatively recaptiualize.','image'=>'','has_image'=>'0'],\n\n //Approach\n ['block_type'=>'Approach-QuickFact','title_en'=>'Quick Fact','title_ar'=>'Quick Fact','title_enabled'=>'0','value_en'=>'Distinctively fashion in the effect of standard products communities via seamless applications. Authoritatively recaptiualize.','value_ar'=>'Distinctively fashion in the effect of standard products communities via seamless applications. Authoritatively recaptiualize.','image'=>'','has_image'=>'0'],\n ['block_type'=>'Approach-YellowBox','title_en'=>'empty','title_ar'=>'empty','title_enabled'=>'1','value_en'=>'Wealth can only be accumulated by the earnings of industry and the savings of frugality.','value_ar'=>'Wealth can only be accumulated by the earnings of industry and the savings of frugality.','image'=>'','has_image'=>'0'],\n\n //Our Team\n ['block_type'=>'Team-QuickFact','title_en'=>'Quick Fact','title_ar'=>'Quick Fact','title_enabled'=>'0','value_en'=>'Distinctively fashion in the effect of standard products communities via seamless applications. Authoritatively recaptiualize.','value_ar'=>'Distinctively fashion in the effect of standard products communities via seamless applications. Authoritatively recaptiualize.','image'=>'','has_image'=>'0'],\n ['block_type'=>'Team-Leaders','title_en'=>'OUR LEADERS','title_ar'=>'OUR LEADERS','title_enabled'=>'0','value_en'=>'Objectively whiteboard transparent models for prospective information. Authoritatively myocardinate.','value_ar'=>'Objectively whiteboard transparent models for prospective information. Authoritatively myocardinate.','image'=>'','has_image'=>'0'],\n\n //Career\n ['block_type'=>'Career-Work','title_en'=>'COME. WORK WITH US','title_ar'=>'COME. WORK WITH US','title_enabled'=>'0','value_en'=>'Objectively whiteboard transparent models for prospective information. Authoritatively myocardinate.','value_ar'=>'Objectively whiteboard transparent models for prospective information. Authoritatively myocardinate.','image'=>'','has_image'=>'0'],\n\n //Blog\n ['block_type'=>'Blog-QuickFact','title_en'=>'Quick Fact','title_ar'=>'Quick Fact','title_enabled'=>'0','value_en'=>'Distinctively fashion in the effect of standard products communities via seamless applications. Authoritatively recaptiualize.','value_ar'=>'Distinctively fashion in the effect of standard products communities via seamless applications. Authoritatively recaptiualize.','image'=>'','has_image'=>'0'],\n\n \t\t]);\n }",
"protected function fetchBlocks()\n {\n if (null === $this->blocks)\n {\n $this->blocks = array();\n\n $allBlocks = ContentBlockQuery::create()\n ->find()\n ;\n\n foreach ($allBlocks as $block)\n {\n /* @var $block ContentBlock */\n $this->blocks[$block->getName()][$block->getLocale()] = $block;\n }\n }\n }",
"function block_core_gallery_data_id_backcompatibility($parsed_block)\n {\n }",
"public function getProcessingBlocks()\n {\n static $resultBlocks = array();\n\n if (empty($resultBlocks)) {\n $blocks = explode(';', $this->getStoreConfig(self::XML_PATH_OTHER_BLOCKS));\n\n $resultBlocks = array();\n foreach ($blocks as $blockName) {\n $blockName = trim($blockName);\n if (!empty($blockName)) {\n $resultBlocks[] = $blockName;\n }\n }\n }\n\n return $resultBlocks;\n }",
"public function renderBlockContent() {\n $plugin_block = $this->blockManager\n ->createInstance('purpose_attributes_report_block', []);\n $access_result = $plugin_block->access($this->currentUser());\n if (is_object($access_result) && $access_result->isForbidden() || is_bool($access_result) && !$access_result) {\n return [];\n }\n $build = $plugin_block->build();\n return $build;\n }",
"function gutenberg_prepare_blocks_for_js() {\n\t$block_registry = WP_Block_Type_Registry::get_instance();\n\t$blocks = array();\n\t$keys_to_pick = array( 'title', 'description', 'icon', 'category', 'keywords', 'supports', 'attributes' );\n\n\tforeach ( $block_registry->get_all_registered() as $block_name => $block_type ) {\n\t\tforeach ( $keys_to_pick as $key ) {\n\t\t\tif ( ! isset( $block_type->{ $key } ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( ! isset( $blocks[ $block_name ] ) ) {\n\t\t\t\t$blocks[ $block_name ] = array();\n\t\t\t}\n\n\t\t\t$blocks[ $block_name ][ $key ] = $block_type->{ $key };\n\t\t}\n\t}\n\n\treturn $blocks;\n}",
"private function __parseRequestData() {\n\t\t$data = $this->data;\n\t\tif ($data['Block']['public_type'] === Block::TYPE_LIMITED) {\n\t\t\t//$data['Block']['from'] = implode('-', $data['Block']['from']);\n\t\t\t//$data['Block']['to'] = implode('-', $data['Block']['to']);\n\t\t} else {\n\t\t\tunset($data['Block']['from'], $data['Block']['to']);\n\t\t}\n\n\t\treturn $data;\n\t}",
"protected function _afterSave(\\Magento\\Framework\\Model\\AbstractModel $object)\r\n {\r\n if($object->getBlockType() == \"page\") {\r\n $oldStores = $this->lookupStoreIds($object->getId());\r\n $newStores = (array)$object->getStores();\r\n if (empty($newStores)) {\r\n $newStores = (array)$object->getStoreId();\r\n }\r\n\r\n $table = $this->getTable('ves_blockbuilder_cms');\r\n $insert = array_diff($newStores, $oldStores);\r\n $delete = array_diff($oldStores, $newStores);\r\n\r\n if ($delete) {\r\n $where = [\r\n 'block_id = ?' => (int) $object->getId(),\r\n 'store_id IN (?)' => $delete\r\n ];\r\n\r\n $this->getConnection()->delete($table, $where);\r\n }\r\n\r\n if ($insert) {\r\n $data = [];\r\n foreach ($insert as $storeId) {\r\n $data[] = [\r\n 'block_id' => (int) $object->getId(),\r\n 'store_id' => (int) $storeId\r\n ];\r\n }\r\n\r\n $this->getConnection()->insertMultiple($table, $data);\r\n }\r\n\r\n }\r\n\r\n //Store widget short code into table ves_blockbuilder_widget\r\n if($widgets = $object->getWpowidget()){\r\n $data = [];\r\n $table = $this->getTable('ves_blockbuilder_widget');\r\n foreach($widgets as $wkey=>$val){\r\n $widget_shortcode = isset($val['config'])?$val['config']:\"\";\r\n if($widget_shortcode) {\r\n if ($wkey) {\r\n $where = [\r\n 'block_id = ?' => (int) $object->getId()\r\n ];\r\n\r\n $this->getConnection()->delete($table, $where);\r\n\r\n $data[] = [\r\n 'block_id' => (int) $object->getId(),\r\n 'widget_key' => $wkey,\r\n 'widget_shortcode' => $widget_shortcode,\r\n 'created' => date( 'Y-m-d H:i:s' )\r\n ];\r\n }\r\n \r\n }\r\n }\r\n if ($data) {\r\n $this->getConnection()->insertMultiple($table, $data);\r\n }\r\n \r\n }\r\n\r\n return parent::_afterSave($object);\r\n }",
"function save_adrotate_blocks_to_page() {\n\t\tglobal $post;\n\t\tforeach($_POST as $key => $value) {\n\t\t\tif(substr($key, 0, 15) == 'adrotate_block_') {\n\t\t\t\t$block_position = substr($key, 15);\n\t\t\t\tupdate_post_meta($post->ID, $block_position, $value);\n\t\t\t} elseif(substr($key, 0, 15) == 'adrotate_title_') {\n\t\t\t\t$block_title = substr($key, 15) . '_title';\n\t\t\t\tupdate_post_meta($post->ID, $block_title, $value);\n\t\t\t}\n\t\t}\n\t}",
"private function _getDataProviderEmpty2()\n {\n return [\n [\n 'containerDesignBlockModel' => null,\n 'titleDesignBlockModel' => null,\n 'titleDesignTextModel' => null,\n 'descriptionDesignBlockModel' => null,\n 'descriptionDesignTextModel' => null,\n 'paginationDesignBlockModel' => null,\n 'paginationItemDesignBlockModel' => null,\n 'paginationItemDesignTextModel' => null,\n ],\n [\n 'containerDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'titleDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'titleDesignTextModel' => [\n 'size' => 0\n ],\n 'descriptionDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'descriptionDesignTextModel' => [\n 'size' => 0\n ],\n 'paginationDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'paginationItemDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'paginationItemDesignTextModel' => [\n 'size' => 0\n ],\n ],\n [\n 'containerDesignBlockModel' => ' ',\n 'titleDesignBlockModel' => ' ',\n 'titleDesignTextModel' => ' ',\n 'descriptionDesignBlockModel' => ' ',\n 'descriptionDesignTextModel' => ' ',\n 'paginationDesignBlockModel' => ' ',\n 'paginationItemDesignBlockModel' => ' ',\n 'paginationItemDesignTextModel' => ' ',\n ],\n [\n 'containerDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'titleDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'titleDesignTextModel' => [\n 'size' => 0\n ],\n 'descriptionDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'descriptionDesignTextModel' => [\n 'size' => 0\n ],\n 'paginationDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'paginationItemDesignBlockModel' => [\n 'marginTop' => 0\n ],\n 'paginationItemDesignTextModel' => [\n 'size' => 0\n ],\n ],\n ];\n }",
"public function displayAjaxSaveBlockContent()\n {\n $errors = [];\n\n $picto = Tools::getValue('picto');\n $id_block = empty(Tools::getValue('id_block')) ? null : Tools::getValue('id_block');\n $type_link = (int) Tools::getValue('typelink');\n $id_cms = Tools::getValue('id_cms');\n $psr_languages = (array) json_decode(Tools::getValue('lang_values'));\n\n $blockPsr = new ReassuranceActivity($id_block);\n if (!$id_block) {\n // Last position\n $blockPsr->position = Db::getInstance()->getValue('SELECT MAX(position) AS max FROM ' . _DB_PREFIX_ . 'psreassurance');\n $blockPsr->position = $blockPsr->position ? $blockPsr->position + 1 : 1;\n $blockPsr->status = false;\n }\n $blockPsr->handleBlockValues($psr_languages, $type_link, $id_cms);\n $blockPsr->icon = $picto;\n if (empty($picto)) {\n $blockPsr->custom_icon = '';\n }\n $blockPsr->date_add = date('Y-m-d H:i:s');\n $blockPsr->date_update = date('Y-m-d H:i:s');\n\n if (isset($_FILES) && !empty($_FILES)) {\n $customImage = $_FILES['file'];\n $fileTmpName = $customImage['tmp_name'];\n $filename = $customImage['name'];\n\n // validateUpload return false if no error (false -> OK)\n $validUpload = ImageManager::validateUpload($customImage);\n if (is_bool($validUpload) && $validUpload === false) {\n move_uploaded_file($fileTmpName, $this->module->folder_file_upload . $filename);\n $blockPsr->custom_icon = $this->module->img_path_perso . '/' . $filename;\n $blockPsr->icon = '';\n } else {\n $errors[] = $validUpload;\n }\n }\n if (empty($errors)) {\n if ($id_block) {\n $blockPsr->update();\n } else {\n $blockPsr->add();\n }\n }\n\n // Response\n $this->ajaxRenderJson(empty($errors) ? 'success' : 'error');\n }",
"private static function ParseBlock ($data) {\n $info = explode(': ', trim($data), 2);\n if (count($info) == 1) {\n return ['field' => '', 'data' => $info[0]];\n }\n return ['field' => $info[0], 'data' => $info[1]];\n }",
"public function get_block()\n {\n\n\t\tglobal $charset;\n\n \t$column = 2;\n \t$data = array();\n\n\t\t$content = $this->get_content_html();\n\n\t\t$content_html = '\n\t\t\t <div class=\"panel panel-default\" id=\"intro\">\n\t\t\t <div class=\"panel-heading\">\n\t\t\t '.get_lang('SessionsInformation').'\n\t\t\t <div class=\"pull-right\"><a class=\"btn btn-danger btn-xs\" onclick=\"javascript:if(!confirm(\\''.addslashes(api_htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES,$charset)).'\\')) return false;\" href=\"index.php?action=disable_block&path='.$this->path.'\">\n\t\t\t <em class=\"fa fa-times\"></em>\n\t\t\t </a></div>\n\t\t\t </div>\n\t\t\t <div class=\"panel-body\">\n\t\t\t\t\t\t\t'.$content.'\n\t\t\t </div>\n\t\t\t </div>\n\t\t\t\t';\n\n \t$data['column'] = $column;\n \t$data['content_html'] = $content_html;\n\n \treturn $data;\n }"
]
| [
"0.5926632",
"0.58423537",
"0.57672715",
"0.57574046",
"0.57038057",
"0.563428",
"0.5588727",
"0.55608344",
"0.5548304",
"0.55258083",
"0.54540616",
"0.54233074",
"0.5397172",
"0.53936857",
"0.5305415",
"0.52967525",
"0.52832526",
"0.528198",
"0.5262164",
"0.5246427",
"0.5240763",
"0.5234559",
"0.5228095",
"0.5222054",
"0.5211479",
"0.5191526",
"0.5190268",
"0.51763093",
"0.5167075",
"0.5165153"
]
| 0.6757152 | 0 |
Add given amount to the wallet's balance. | public function add(float $amount)
{
$this->balance += $amount;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function deposit($amount) {\n $this->balance += $amount;\n }",
"public function update($amount)\n {\n $currentBalance = auth()->user()->balance->amount;\n $newAmount = $currentBalance + $amount;\n auth()->user()->balance()->update(['amount' => $newAmount]);\n }",
"public function incrementWalletBalanceBy(Deposit $deposit, $amount) : void\n {\n DB::transaction(function () use ($deposit, $amount) {\n $deposit->wallet->increment('balance', $amount);\n });\n }",
"public function deposit($amount)\n {\n $this->balance += $amount;\n $this->save();\n }",
"public function saveNewBalance($amount)\n {\n return tap($this->fill([\n 'accountBalance' => $this->accountBalance + $amount,\n ]))->save();\n }",
"public function addExpense($amount)\n {\n $account = Account::findOne([\n 'username' => $this->getCurrentUser()->username,\n ]);\n\n $account->balance -= $amount;\n\n $account->update(true, ['balance']);\n }",
"public function addIncome($amount, $username)\n {\n $account = Account::findOne([\n 'username' => $username,\n ]);\n\n $account->balance += $amount;\n\n $account->update(true, ['balance']);\n }",
"public function addWallet(Wallet $wallet): void\n {\n if (!$this->wallet->contains($wallet)) {\n $this->wallet[] = $wallet;\n }\n }",
"public function deposit($amount)\n {\n $this->increase($amount);\n \n return;\n }",
"public function updateAccountBalance($amount)\n {\n return $amount == 0 ? $this : $this->saveNewBalance($amount);\n }",
"public function addDebitForward(float $amount): self\n {\n $this->debitForward += $amount;\n\n return $this;\n }",
"abstract protected function doAddAmount(CampaignFunding $funding, string $amount): string;",
"public function addItemDiscountAmount($amount)\n {\n $this->itemDiscountAmount += $amount;\n }",
"public function incrementLocalLeave($amount = 1) {\n $this->localBalance = $this->localBalance + $amount;\n }",
"public function addBalance(KittyInterface $kitty, UserInterface $user, $balance);",
"public function addPayment(Money $payment)\n {\n $paidAmount = $this->getAmountPaid()->add($payment);\n\n $this->paidAmount = $paidAmount->getAmount();\n\n if ($this->paidAmount > $this->price) {\n $this->paid();\n }\n }",
"public function setAmount($balance)\n {\n $this->amount = (int) $balance;\n }",
"public function addStat(float $amount, string ...$pathToStat): void\n {\n $amount += $this->getStat(...$pathToStat);\n\n $this->setStat($amount, ...$pathToStat);\n }",
"public function setTransactionAmount($value) \n {\n $this->_fields['TransactionAmount']['FieldValue'] = $value;\n return;\n }",
"public function addTransaction(\\CGROSS\\Drinkaccounting\\Domain\\Model\\Transaction $transaction) {\n\t\t// Calc transaction balance\n\t\t$transaction->setBalanceOld($this->getBalance());\n\t\t$transaction->setBalanceNew($this->getBalance() + $transaction->getSum());\n\t\t// Calc new account balance\n\t\t$this->setBalance($this->getBalance() + $transaction->getSum());\n\t\t$transaction->setAccount($this);\n\t\t$this->transactions->add($transaction);\n\t}",
"public function increaseBalance($amount, $user)\n {\n Stripe::setApiKey(config('services.stripe.secret'));\n\n $intent = PaymentIntent::create([\n 'amount' => $amount,\n 'currency' => 'eur',\n 'metadata' => ['user_id' => $user->id],\n ]);\n\n return $intent;\n }",
"public function addCredits($amount)\n {\n $credit = $this->credit;\n $credit->amount = $credit->amount + $amount;\n $credit->save();\n return $credit;\n }",
"public function addShippingDiscountAmount($amount)\n {\n $this->shippingDiscountAmount += $amount;\n }",
"public function setAmount($amount);",
"function withdraw($amount) {\n if ($this->balance < $amount) {\n // should we fail or just withdraw less?\n // for now we will fail\n throw new Exception(\"account overdraw! $this->balance < $amount\");\n }\n $this->balance -= $amount;\n }",
"public function decrementWalletBalanceBy(Deposit $deposit, $amount) : void\n {\n DB::transaction(function () use ($deposit, $amount) {\n $deposit->wallet->decrement('balance', $amount);\n });\n }",
"public function setAmount(\\horstoeko\\ubl\\entities\\cbc\\Amount $amount)\n {\n $this->amount = $amount;\n return $this;\n }",
"function add_money($account,$total_money,$input_money){\n\t\t$total_money += $input_money;\n\t\tglobal $connection;\n\t\t$query_mn = mysqli_query($connection,\"UPDATE khachhang SET `money`=$total_money WHERE account='$account'\" );\n\t\treturn $total_money;\n\t}",
"public function setAmount($amount)\n {\n $this->amount = $amount;\n }",
"public function setAmount($amount)\n {\n $this->amount = $amount;\n }"
]
| [
"0.7237583",
"0.7155315",
"0.70709586",
"0.70252115",
"0.6732435",
"0.6690789",
"0.6642856",
"0.63571393",
"0.632327",
"0.62026334",
"0.61598295",
"0.6017044",
"0.60105515",
"0.59672403",
"0.59567493",
"0.595033",
"0.5860283",
"0.5845227",
"0.58408636",
"0.58024466",
"0.5769062",
"0.57553506",
"0.5746136",
"0.5743291",
"0.5704675",
"0.56984234",
"0.5678985",
"0.5662253",
"0.56618035",
"0.56618035"
]
| 0.7998861 | 0 |
Subtract given amount from the wallet's balance. | public function subtract(float $amount)
{
$this->balance -= $amount;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function decrementWalletBalanceBy(Deposit $deposit, $amount) : void\n {\n DB::transaction(function () use ($deposit, $amount) {\n $deposit->wallet->decrement('balance', $amount);\n });\n }",
"function deposit($amount) {\n $this->balance += $amount;\n }",
"public function revert($amount)\n {\n $amount = (double)$amount;\n\n if ($amount > 0 && $this->isValid(true, true, false, false)) {\n $this->setBalanceDelta(\n $amount\n )->setBalance(\n $this->getBalance() + $amount\n )->setHistoryAction(\n \\Magento\\GiftCardAccount\\Model\\History::ACTION_UPDATED\n );\n }\n\n return $this;\n }",
"public function deductCredits($amount)\n {\n $credit = $this->credit;\n $credit->amount = $credit->amount - $amount;\n $credit->save();\n return $credit;\n }",
"public function deposit($amount)\n {\n $this->balance += $amount;\n $this->save();\n }",
"function removeBalance($dbh, $userID, $amount)\n\t{\n\t\t$sth = $dbh -> prepare(\"Select Balance From Bettors Where BettorID = :userID\");\n\t\t$sth->bindValue(':userID', $userID);\n\t\t\n\t\t$sth->execute();\n\n\t\t$oldBalance = $sth->fetch();\n\t\t$newBalance = $oldBalance[0] - $amount;\n\t\t\n\t\t\n\t\t$sth = $dbh -> prepare(\"Update Bettors Set Balance = :newBalance Where BettorID = :userID\");\n\t\t$sth->bindValue(':newBalance', $newBalance);\n\t\t$sth->bindValue(':userID', $userID);\n\t\t\n\t\t$sth->execute();\n\n\t}",
"public function deposit($amount)\n {\n $this->increase($amount);\n \n return;\n }",
"public function subtract(Money $money): self;",
"abstract protected function doSubtractAmount(CampaignFunding $funding, string $amount): string;",
"public function debit(float $amount)\n {\n return $this->query->create(['amount' => $amount, 'type_id' => Transaction::TYPE_DEBIT]);\n }",
"function withdraw($amount) {\n if ($this->balance < $amount) {\n // should we fail or just withdraw less?\n // for now we will fail\n throw new Exception(\"account overdraw! $this->balance < $amount\");\n }\n $this->balance -= $amount;\n }",
"public function decreaseAmount(): void;",
"public function debit(int $accountNumber, float $amount): void\n {\n $this->getAccount($accountNumber)->debit($amount);\n }",
"public function subtract_chips_from_client($client_id,$balance)\n {\n $sql=\"UPDATE clients SET client_balance=client_balance-$balance where client_id=$client_id\";\n return $this->db->query($sql);\n }",
"public function subtract($value);",
"public function get_balance($wallet_id) { \n\n\t// Get balance\n\t$balance = DB::queryFirstField(\"SELECT sum(amount) FROM coin_inputs WHERE wallet_id = %d AND is_spent = 0\", $wallet_id);\n\tif ($balance == '') { $balance = 0; }\n\n\t// Withdraw pending sends\n\t$pending_sends = DB::queryFirstField(\"SELECT sum(amount) FROM coin_sends WHERE wallet_id = %d AND status = 'pending'\", $wallet_id);\n\t$balance -= $pending_sends;\n\n\t// Return\n\treturn fmoney_coin($balance);\n\n}",
"public function deductFromBalance($deductionAmount, $currencyCode, $accountId = Account::LOGGED_IN_ACCOUNT) {\n\n $accountBalance = $this->getAccountBalance($accountId);\n\n $accountBalancePrecision = Configuration::readParameter(\"account.balance.precision\") ?? 2;\n\n\n // Convert the amount being ensured into account balance currency\n $convertedAmount = $this->pricingService->convertAmountToCurrency($deductionAmount, $currencyCode, $accountBalance->getBalanceCurrencyCode(), $accountBalancePrecision);\n\n // If insufficient balance throw an exception\n if ($convertedAmount > $accountBalance->getBalance())\n throw new InsufficientBalanceException();\n\n /**\n * @var DatabaseConnection $databaseConnection\n */\n $databaseConnection = Container::instance()->get(DatabaseConnection::class);\n $databaseConnection->execute(\"UPDATE kc_account_balance SET balance = ROUND(balance - ?, $accountBalancePrecision) WHERE account_id = ?\", $convertedAmount, $accountId);\n\n }",
"public function decrby(string $key, int $amount): int\r\n\t{\r\n\t\treturn $this->connection->decrBy($key, $amount);\r\n\t}",
"public static function unlockFunds($from, $amount){\n\t\t$fromuser = \\CouchDB::getDoc($from, \"users\");\n\t\tif ($fromuser->wallet->locked < $amount){\n\t\t\t//you broke dawg\n\t\t\treturn \\Shared\\Error::handleError(\"nofunds\");\n\t\t}else{\n\t\t\t$response = Dogecoin::move(\"LOCKED-FEE\", $from, $amount);\n\t\t\t$fromuser->wallet->locked -= $amount;\n\t\t\t$response = \\CouchDB::setDoc($fromuser, \"users\");\n\t\t\treturn $amount;\n\t\t}\n\t\t//something went wrong, but i have no idea what that might be.\n\t\treturn 0;\n\t}",
"public function updateAccountBalance($amount)\n {\n return $amount == 0 ? $this : $this->saveNewBalance($amount);\n }",
"function deleteFromAccountBalance($username,$subtractAmount,$currentBal)\n{\n $mysql_server = '192.168.1.101';\n $mysqli = new mysqli($mysql_server, \"badgers\", \"honey\", \"user_info\");\n \n \n $newBalance = $currentBal - $subtractAmount;\n \n $qry = \"UPDATE bank SET balance='$newBalance' WHERE username='$username'\";\n $result = $mysqli->query($qry);\n \n \n}",
"public function decrement($column, $amount = 1)\n\t{\n\t\treturn $this->_adjust($column, $amount, ' - ');\n\t}",
"public function difference(Money $money): Money;",
"public function addExpense($amount)\n {\n $account = Account::findOne([\n 'username' => $this->getCurrentUser()->username,\n ]);\n\n $account->balance -= $amount;\n\n $account->update(true, ['balance']);\n }",
"public function balance()\n {\n $credit = $this->query->where('type_id', Transaction::TYPE_CREDIT)->sum('amount');\n $debit = $this->query->where('type_id', Transaction::TYPE_DEBIT)->sum('amount');\n return $credit - $debit;\n }",
"public function refund( \\IPS\\nexus\\Transaction $transaction, $amount = NULL )\n\t{\n\t\t$extra = json_decode( $transaction->extra, TRUE );\n\t\t\n\t\t$this->api( array(\n\t\t\t'x_type'\t\t=> 'CREDIT',\n\t\t\t'x_trans_id'\t=> $transaction->gw_id,\n\t\t\t'x_amount'\t\t=> (string) ( $amount ?: $transaction->amount->amount ),\n\t\t\t'x_card_num'\t=> $extra['lastFour']\n\t\t) );\n\t}",
"public function destroy(TransferAmount $transferAmount)\n {\n //\n }",
"public function update($amount)\n {\n $currentBalance = auth()->user()->balance->amount;\n $newAmount = $currentBalance + $amount;\n auth()->user()->balance()->update(['amount' => $newAmount]);\n }",
"public function getBalance(): Money\n {\n if ($this->transactions()->count() > 0) {\n $balance = $this->transactions()->sum('credit') - $this->transactions()->sum('debit');\n } else {\n $balance = 0;\n }\n\n return new Money($balance, new Currency($this->currency));\n }",
"public function actionDepositMoney()\n {\n // Recevei the POST params\n $request = Yii::$app->request;\n $user_id = $request->post('user_id');\n $amount_currency = $request->post('amount_currency');\n $wallet_currency = $request->post('wallet_currency');\n $amount = $request->post('amount');\n\n // Check the mandatory fields\n if (empty($user_id)) {\n throw new BadRequestHttpException('The user ID must be informed.');\n } else if (empty($amount_currency)) {\n throw new BadRequestHttpException('The amount currency must be informed.');\n } else if (empty($wallet_currency)) {\n throw new BadRequestHttpException('The wallet currency must be informed.');\n } else if (empty($amount)) {\n throw new BadRequestHttpException('The amount must be informed.');\n } else {\n // Prepare the input\n $amount = floatval($amount);\n $amount_currency = strtoupper($amount_currency);\n $wallet_currency = strtoupper($wallet_currency);\n\n // Try to retrieve the wallet info\n $wallet = Wallet::find()->where(['user_id' => $user_id])->andWhere(['currency' => $wallet_currency])->one();\n\n // Check if the wallet exists\n if (isset($wallet) && !empty($wallet)) {\n // Check if needs to convert\n if (strcmp($amount_currency, $wallet_currency) != 0) {\n // Gets the new currency quotation\n $result = $this->actionConvertCurrency($amount_currency, $wallet_currency, $amount);\n\n // Check if the conversion happend succesfully\n if (isset($result) && !empty($result)) {\n // Set the new wallet balance with conversion\n $wallet->balance += $result['converted_amount'];\n } else {\n throw new HttpException('It was not possible to contact the currency exchange server.');\n }\n } else {\n // Set the new wallet balance without conversion\n $wallet->balance += $amount;\n }\n\n // Update the the wallet balance\n if ($wallet->save()) {\n // Log the transaction as complete\n if (isset($result) && !empty($result)) {\n $this->logTransaction(Transaction::DEPOSIT, $amount, $result['converted_amount'], '', $wallet->code,\n $amount_currency, $wallet_currency, Transaction::COMPLETE);\n } else {\n $this->logTransaction(Transaction::DEPOSIT, $amount, 0, '', $wallet->code,\n $amount_currency, $wallet_currency, Transaction::COMPLETE);\n }\n\n // Return the wallet updated\n return $wallet;\n } else {\n // Log the transaction as incomplete\n if (isset($result) && !empty($result)) {\n $this->logTransaction(Transaction::DEPOSIT, $amount, $result['converted_amount'], '', $wallet->code,\n $amount_currency, $wallet_currency, Transaction::INCOMPLETE);\n } else {\n $this->logTransaction(Transaction::DEPOSIT, $amount, 0, '', $wallet->code,\n $amount_currency, $wallet_currency, Transaction::INCOMPLETE);\n }\n\n throw new ServerErrorHttpException(\"It wasn't possible to complete the deposit\");\n }\n } else {\n throw new BadRequestHttpException('The wallet ' . $wallet_currency . ' was not found.');\n }\n }\n }"
]
| [
"0.73041844",
"0.6778433",
"0.6609438",
"0.6576733",
"0.65555",
"0.6495017",
"0.6474183",
"0.634022",
"0.63376766",
"0.6236585",
"0.6143148",
"0.61239904",
"0.59572625",
"0.5808311",
"0.57343996",
"0.5732986",
"0.5708801",
"0.5694564",
"0.567307",
"0.5650533",
"0.5634415",
"0.5559383",
"0.55287004",
"0.5518107",
"0.5517533",
"0.55148476",
"0.5509778",
"0.5508689",
"0.5503936",
"0.54937446"
]
| 0.80076396 | 0 |
get list of invoice fields with description | public function fields()
{
$fullResult = $this->client->call(
'crm.invoice.fields'
);
return $fullResult;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_fields()\n {\n return [\n \"isys_catg_invoice_list__denotation\" => \"LC__CMDB__CATG__TITLE\",\n \"isys_catg_invoice_list__amount\" => \"LC__CMDB__CATG__INVOICE__AMOUNT\",\n \"isys_catg_invoice_list__date\" => \"LC__CMDB__CATG__INVOICE__DATE\",\n \"isys_catg_invoice_list__edited\" => \"LC__CMDB__CATG__INVOICE__EDITED\",\n \"isys_catg_invoice_list__financial_accounting_delivery\" => \"LC__CMDB__CATG__INVOICE__FINANCIAL_ACCOUNTING_DELIVERY\",\n \"isys_catg_invoice_list__charged\" => \"LC__CMDB__CATG__INVOICE__CHARGED\",\n ];\n }",
"public function getListFields();",
"public function listFields()\n\t{\n\t\treturn array('id' => 'ID', 'title' => 'Title', 'estimated' => 'Estimated', 'status' => 'Status', 'getPercentageComplete' => 'Percentage Complete');\n\t}",
"public function getFields();",
"public function getFields();",
"public function getFields();",
"public function getFields();",
"public function getFields();",
"public function getFields();",
"public function getFieldDescriptions()\n {\n return array(\n 'shipment.created_at' => 'Read only.',\n 'shipment.updated_at' => 'Read only.',\n 'shipment.order_increment_id' => 'Required to create a shipment.',\n 'shipment.items' => 'Required to create a shipment.',\n 'shipment.entity_id' => 'Read only.',\n 'shipment.external_order_id' => 'Read only.'\n );\n }",
"function getFields();",
"public function getFields() {}",
"public function getFields() {}",
"public function getFields() {}",
"public function fields();",
"public function fields();",
"public function fields();",
"public function fields();",
"public function fields();",
"public function getFrontendFields();",
"function get_field_list()\r\n\t{\r\n\t\t$fields = array();\r\n\r\n\t\tif (Authority::can('edit', 'admin/item/definition'))\r\n\t\t{\r\n\t\t\t$id_definition = $this->input->post('id_item_definition');\r\n\r\n\t\t\t$fields = $this->extend_field_model->get_lang_list(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'parent' => 'item',\r\n\t\t\t\t\t'id_parent' => $id_definition\r\n\t\t\t\t),\r\n\t\t\t\tSettings::get_lang('default')\r\n\t\t\t);\r\n\r\n\t\t\t// Set type names\r\n\t\t\tforeach($fields as &$field)\r\n\t\t\t{\r\n\t\t\t\t$field['type_name'] = self::$_TYPE_NAMES[$field['type']];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//\r\n\t\t$this->template['id_item_definition'] = $id_definition;\r\n\t\t$this->template['fields'] = $fields;\r\n\r\n\t\t$this->output('item/definition/fields');\r\n\t}",
"public function getFieldsList(){\n return $this->_get(1);\n }",
"public function bankdetailFields()\n {\n $fullResult = $this->client->call(\n 'crm.requisite.bankdetail.fields'\n );\n return $fullResult;\n }",
"function get_desc_file_fields() {\n\treturn array (\n\t\t\t\"Taxonomic name (Name)\",\n\t\t\t\"Diagnostic Description\",\n\t\t\t\"Distribution\",\n\t\t\t\"Habitat\",\n\t\t\t\"Size\",\n\t\t\t\"Habitus image\",\n\t\t\t\"Morphological Description\",\n\t\t\t\"Habitat image\",\n\t\t\t\"Simlar Species (Name)\",\n\t\t\t\"Pronotum image\",\n\t\t\t\"Elytral microsculpture\",\n\t\t\t\"Genitalia left image\",\n\t\t\t\"General description\",\n\t\t\t\"Genetics\" \n\t);\n}",
"function get_fields() {\n global $Tainacan_Item_Metadata;\n return $Tainacan_Item_Metadata->fetch($this, 'OBJECT');\n\n }",
"public static function fields()\n {\n return [\n 'nice_quote_id' => 'text',\n 'date' => 'text',\n 'netdays' => 'text',\n 'total' => 'text',\n 'status' => 'text',\n ];\n }",
"abstract public function getFields();",
"abstract public function getFields();",
"public function getFieldDescription($fieldName);",
"public static function get_fields()\n {\n }"
]
| [
"0.7274115",
"0.6763548",
"0.67042637",
"0.6695244",
"0.6695244",
"0.6695244",
"0.6695244",
"0.6695244",
"0.6695244",
"0.66423136",
"0.65728533",
"0.6552799",
"0.6552799",
"0.6552799",
"0.6525986",
"0.6525986",
"0.6525986",
"0.6525986",
"0.6525986",
"0.6523639",
"0.64692956",
"0.6453477",
"0.64148045",
"0.64106",
"0.63863",
"0.6371083",
"0.6304324",
"0.6304324",
"0.6294852",
"0.62888503"
]
| 0.74043864 | 0 |
Set Head and Data encrypt key | public function setKey($headKey,$dataKey){
$this->head_key = $headKey;
$this->data_key = $dataKey;
## If head key == null, no encryption at all ##
if(is_null($this->head_key))
$this->flag &= (self::FLAG_ENCRYPTION ^ 0xFF);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function _setupKey() {\n\t\tif ( ! isset( $this->key ) ) {\n\t\t\t$this->setKey( '' );\n\t\t}\n\n\t\t// Key has already been expanded in Crypt_RC2::setKey():\n\t\t// Only the first value must be altered.\n\t\t$l = unpack( 'Ca/Cb/v*', $this->key );\n\t\tarray_unshift( $l, $this->pitable[ $l['a'] ] | ( $l['b'] << 8 ) );\n\t\tunset( $l['a'] );\n\t\tunset( $l['b'] );\n\t\t$this->keys = $l;\n\t}",
"protected function setKey()\n {\n $paymentGateway = \\App\\Models\\PaymentGateway::where('name', 'paystack')->first();\n $this->secretKey = $paymentGateway['information']['private_key'];\n $this->publicKey = $paymentGateway['information']['public_key'];\n }",
"public function setKeyFromData()\n\t{\n\t\t$key = isset($this->data[$this->primaryKey])\n\t\t\t? $this->data[$this->primaryKey]\n\t\t\t: null;\n\n\t\tif ($key !== null && !is_numeric($key)) {\n\t\t\t$key = Hash::decode($key);\n\t\t}\n\n\t\t$this->key = $key;\n\t}",
"abstract public function encrypt($data);",
"public function set_key($key) {\r\n\t\t$this->encryption_key = $key;\r\n\t}",
"public function setKey($key = '')\n {\n $this->encryptionKey = $key;\n }",
"function setEncryptionKey($key){\n\t\tif($key!=\"\"){\n\t\t\t$this->rc4key=$key;\n\t\t\t$this->rc4 = new rc4crypt();\n\t\t\treturn true;\n\t\t} else return false;\n\t}",
"public static function aes128Encrypt($key, $data) {}",
"function encryptData($payload, $key) {\r\n \r\n $chiper = \"des-ede3\"; //Algorthim used to encrypt\r\n if((strlen($payload)%8)!=0) {\r\n //Perform right padding\r\n $payload = $this->rightPadZeros($payload);\r\n }\r\n $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length($chiper));\r\n $encrypted = openssl_encrypt($payload, $chiper, $key,OPENSSL_RAW_DATA,$iv);\r\n \r\n $encrypted=unpack('C*', ($encrypted));\r\n $encrypted=$this->byteArray2Hex($encrypted);\r\n return strtoupper($encrypted); \r\n}",
"function encryptData($value){\n\t\t\tglobal $key;\n $cipher = new Crypt_Rijndael(CRYPT_RIJNDAEL_MODE_ECB);\n\t\t\t$cipher->setKey($key);\n\t\t\treturn $cipher->encrypt($value);\n\t\t}",
"private function set_keys() {\n\t\t$this->skeleton->load('customers_id', !empty($_SESSION['customer_id'])?$_SESSION['customer_id']:NULL);\n\t\t$this->skeleton->load('customers_extra_logins_id', !empty($_SESSION['customer_extra_login_id'])?$_SESSION['customer_extra_login_id']:NULL);\n\n\t\t// this will set the ID as the session value, if one is found, otherwise if there is an existing cart for this user, pull it out\n\t\tif (empty($this->id()) && $header = self::fetch('cart_header_by_key', [':cart_key' => $this->get_cart_key()])) {\n\t\t\t$this->id($header['cart_id']);\n\t\t}\n\n\t\t//var_dump([$this->skeleton->get('customers_id'), $_SESSION['customer_id']]);\n\t}",
"public function setKey($key)\n\t{\t\n\t\t$this->aes->setKey($key);\n\t}",
"public function encrypt() \r\n {\r\n //TODO: Implement encrypt method\r\n }",
"public function encode($key, $data);",
"function key_setup($key) {\r\n\t\tif(is_array($key))\r\n \t$this->key = $key;\r\n\t\telse if(isset($key) && !empty($key))\r\n\t\t\t$this->key = $this->_str2long(str_pad($key, 16, $key));\r\n\t\telse\r\n\t\t\t$this->key = array(0,0,0,0);\r\n }",
"public function encrypt();",
"public function set_auth_key($data) {\n\t\t$this->UserAuth = ClassRegistry::init('UserAuth');\n\t\t$input = array(\n\t\t\t'key'\t=> $data['key'],\n\t\t\t'params'\t=> serialize($data),\n\t\t\t'created_at' => date('Y-m-d H:i:s'),\n\t\t\t);\n\t\t$this->UserAuth->create();\n\t\t$this->UserAuth->save($input);\n\t\treturn;\n\t}",
"function _setup()\r\n {\r\n // Each number in $rcon is equal to the previous number multiplied by two in Rijndael's finite field.\r\n // See http://en.wikipedia.org/wiki/Finite_field_arithmetic#Multiplicative_inverse\r\n static $rcon = array(0,\r\n 0x01000000, 0x02000000, 0x04000000, 0x08000000, 0x10000000,\r\n 0x20000000, 0x40000000, 0x80000000, 0x1B000000, 0x36000000,\r\n 0x6C000000, 0xD8000000, 0xAB000000, 0x4D000000, 0x9A000000,\r\n 0x2F000000, 0x5E000000, 0xBC000000, 0x63000000, 0xC6000000,\r\n 0x97000000, 0x35000000, 0x6A000000, 0xD4000000, 0xB3000000,\r\n 0x7D000000, 0xFA000000, 0xEF000000, 0xC5000000, 0x91000000\r\n );\r\n\r\n if (!$this->changed) {\r\n return;\r\n }\r\n\r\n if (!$this->explicit_key_length) {\r\n // we do >> 2, here, and not >> 5, as we do above, since strlen($this->key) tells us the number of bytes - not bits\r\n $length = strlen($this->key) >> 2;\r\n if ($length > 8) {\r\n $length = 8;\r\n } else if ($length < 4) {\r\n $length = 4;\r\n }\r\n $this->Nk = $length;\r\n $this->key_size = $length << 2;\r\n }\r\n\r\n $this->key = str_pad(substr($this->key, 0, $this->key_size), $this->key_size, chr(0));\r\n $this->encryptIV = $this->decryptIV = $this->iv = str_pad(substr($this->iv, 0, $this->block_size), $this->block_size, chr(0));\r\n\r\n // see Rijndael-ammended.pdf#page=44\r\n $this->Nr = max($this->Nk, $this->Nb) + 6;\r\n\r\n // shift offsets for Nb = 5, 7 are defined in Rijndael-ammended.pdf#page=44,\r\n // \"Table 8: Shift offsets in Shiftrow for the alternative block lengths\"\r\n // shift offsets for Nb = 4, 6, 8 are defined in Rijndael-ammended.pdf#page=14,\r\n // \"Table 2: Shift offsets for different block lengths\"\r\n switch ($this->Nb) {\r\n case 4:\r\n case 5:\r\n case 6:\r\n $this->c = array(0, 1, 2, 3);\r\n break;\r\n case 7:\r\n $this->c = array(0, 1, 2, 4);\r\n break;\r\n case 8:\r\n $this->c = array(0, 1, 3, 4);\r\n }\r\n\r\n $key = $this->key;\r\n\r\n $w = array_values(unpack('N*words', $key));\r\n\r\n $length = $this->Nb * ($this->Nr + 1);\r\n for ($i = $this->Nk; $i < $length; $i++) {\r\n $temp = $w[$i - 1];\r\n if ($i % $this->Nk == 0) {\r\n // according to <http://php.net/language.types.integer>, \"the size of an integer is platform-dependent\".\r\n // on a 32-bit machine, it's 32-bits, and on a 64-bit machine, it's 64-bits. on a 32-bit machine,\r\n // 0xFFFFFFFF << 8 == 0xFFFFFF00, but on a 64-bit machine, it equals 0xFFFFFFFF00. as such, doing 'and'\r\n // with 0xFFFFFFFF (or 0xFFFFFF00) on a 32-bit machine is unnecessary, but on a 64-bit machine, it is.\r\n $temp = (($temp << 8) & 0xFFFFFF00) | (($temp >> 24) & 0x000000FF); // rotWord\r\n $temp = $this->_subWord($temp) ^ $rcon[$i / $this->Nk];\r\n } else if ($this->Nk > 6 && $i % $this->Nk == 4) {\r\n $temp = $this->_subWord($temp);\r\n }\r\n $w[$i] = $w[$i - $this->Nk] ^ $temp;\r\n }\r\n\r\n // convert the key schedule from a vector of $Nb * ($Nr + 1) length to a matrix with $Nr + 1 rows and $Nb columns\r\n // and generate the inverse key schedule. more specifically,\r\n // according to <http://csrc.nist.gov/archive/aes/rijndael/Rijndael-ammended.pdf#page=23> (section 5.3.3), \r\n // \"The key expansion for the Inverse Cipher is defined as follows:\r\n // 1. Apply the Key Expansion.\r\n // 2. Apply InvMixColumn to all Round Keys except the first and the last one.\"\r\n // also, see fips-197.pdf#page=27, \"5.3.5 Equivalent Inverse Cipher\"\r\n $temp = array();\r\n for ($i = $row = $col = 0; $i < $length; $i++, $col++) {\r\n if ($col == $this->Nb) {\r\n if ($row == 0) {\r\n $this->dw[0] = $this->w[0];\r\n } else {\r\n // subWord + invMixColumn + invSubWord = invMixColumn\r\n $j = 0;\r\n while ($j < $this->Nb) {\r\n $dw = $this->_subWord($this->w[$row][$j]);\r\n $temp[$j] = $this->dt0[$dw & 0xFF000000] ^ \r\n $this->dt1[$dw & 0x00FF0000] ^ \r\n $this->dt2[$dw & 0x0000FF00] ^ \r\n $this->dt3[$dw & 0x000000FF];\r\n $j++;\r\n }\r\n $this->dw[$row] = $temp;\r\n }\r\n\r\n $col = 0;\r\n $row++;\r\n }\r\n $this->w[$row][$col] = $w[$i];\r\n }\r\n\r\n $this->dw[$row] = $this->w[$row];\r\n\r\n $this->changed = false;\r\n }",
"function SetKey( $i ) { $this->_key = $i; $this->SetValue('_key', $i ); }",
"protected function _generateKey()\n {\n $key = '';\n ksort($this->_keyData); //so that the order of the array doesn't matter in the key that is generated.\n foreach ($this->_keyData as $i => $val) {\n //\"clean\" the data some\n if (is_numeric($val)) {\n $val = (float)$val;\n //force it to be 4 decimal places every single time, and use thousands\n //seperator, just because we can and we need all numbers to be uniform\n //so they look the same even after getting sent to the database and coming back again.\n $val = number_format($val, 4, '.', ',');\n } else {\n $val = trim($val);\n }\n //NOTE: May need to do further \"cleaning\" to ensure value always stays\n //the same even after getting sent to and from the DB... if so do that\n //cleaning here, NOT outside of this class... we need 1 solution in 1\n //place, not 20 different solutions...\n\n $key = \"$i:_:{$key}:_:$val\";\n }\n //If debug enabled, show what the key is before hash, so we can troubleshoot\n //problems caused by the key changing when trying to decrypt.\n if (self::DEBUG) {\n trigger_error('DEBUG CRYPT: Key used before hash=' . $key);\n }\n $this->_keyString = sha1($key);\n }",
"public function key_setup($key)\n\t{\n if (is_array($key))\n\t\t{\n $this->key = $key;\n }\n\t\telseif (isset($key) AND ! empty($key))\n\t\t{\n $this->key = $this->_str2long(str_pad($key, 16, $key));\n }\n\t\telse\n\t\t{\n $this->key = array(0,0,0,0);\n\t\t}\n\t}",
"public function SetKey($key = ''){\n \tself::$userKey = $key;\n }",
"public function key();",
"public function key();",
"public function key();",
"public function key();",
"public function key();",
"public function key();",
"public function key();",
"public function key();"
]
| [
"0.6520946",
"0.6087283",
"0.60700047",
"0.60217834",
"0.5934271",
"0.59120196",
"0.58619297",
"0.58487666",
"0.5840298",
"0.58187973",
"0.57934856",
"0.5788164",
"0.5785163",
"0.5738115",
"0.5703209",
"0.5666118",
"0.5665999",
"0.56433344",
"0.5637107",
"0.5635322",
"0.56312084",
"0.56304306",
"0.5614942",
"0.5614942",
"0.5614942",
"0.5614942",
"0.5614942",
"0.5614942",
"0.5614942",
"0.5614942"
]
| 0.7957481 | 0 |
Submits the property array to the services layer's property functions. | function submit( \EndpointLocation $endpoint, \User $user, array $propArr, $preventOverwrite) {
// $newValues = getSerPropDataFromWeb();
// $serviceID = $newValues['SERVICEPROPERTIES']['SERVICE'];
// if($newValues['SERVICEPROPERTIES']['NAME'] == null || $newValues['SERVICEPROPERTIES']['VALUE'] == null){
// show_view('error.php', "A property name and value must be provided.");
// die();
// }
$serv = \Factory::getServiceService();
$sp = $serv->addEndpointProperties($endpoint, $user, $propArr, $preventOverwrite);
$params['propArr'] = $propArr;
$params['endpoint'] = $endpoint;
show_view("service/added_endpoint_properties.php", $params);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function apply(array $propertyValues);",
"public function setPropArray($array)\n {\n $this->engine->assign($array);\n }",
"function add_endpoint_properties() {\n $dn = Get_User_Principle();\n $user = \\Factory::getUserService()->getUserByPrinciple($dn);\n\n //Check the portal is not in read only mode, returns exception if it is and user is not an admin\n checkPortalIsNotReadOnlyOrUserIsAdmin($user);\n\n\n\n\n if($_POST) { \t// If we receive a POST request it's for new properties\n\n //COMMENT\n $preventOverwrite = true;\n\n //Get the parent service we want to add properties to.\n //I'm trying to use \"parent\" rather than \"service\" wherever possible to make this code more generic.\n $endpoint = \\Factory::getServiceService()->getEndpoint($_REQUEST['PARENT']);\n //this is a little awkward, as we have to handle 3 cases here. Submitting a single property,\n //submitting a .property text file/block, or submitting the parsed and confirmed properties.\n\n //Figure out where the request has come from and format the inputs accordingly.\n //throw new \\Exception(var_dump($_REQUEST));\n\n //if the request is for a multi property input, parse the file and generate the array of properties\n //this will go to confirm()\n if(isset($_REQUEST['PROPERTIES'])) {\n $propertyArray = parse_properties($_REQUEST['PROPERTIES']);\n //throw new \\Exception(var_dump($propertyArray));\n }\n //if the request is from the multi property confirmation page\n //reconstruct the indexed array of kvps\n //this will go to submit()\n elseif (isset($_REQUEST['selectedProps'])){\n $propertyArray = array();\n foreach ($_REQUEST['selectedProps'] as $i=>$propKey){\n $propertyArray[] = array($propKey, $_REQUEST['selectedPropsVal'][$i]);\n }\n }\n //if the request is for a single property, skip the confirmation view and submit the request directly\n //this will go to submit()\n elseif (isset($_REQUEST['KEYPAIRNAME']) && isset($_REQUEST['KEYPAIRVALUE'])) {\n $propertyArray = array(\n array(\n $_REQUEST['KEYPAIRNAME'], $_REQUEST['KEYPAIRVALUE']\n )\n );\n //will go straight to submit()\n $_REQUEST['UserConfirmed'] = \"true\";\n //since the user is only adding a single property, warn them if it already exists\n $preventOverwrite = true;\n } else {\n //you really shouldn't end up here unless you are mangling your post requests\n throw new Exception(\"Properties could not be parsed\");\n }\n\n if(isset($_REQUEST['PREVENTOVERWRITE'])){\n $preventOverwrite = false;\n }\n\n //quick sanity check, are we actually adding any properties?\n if(empty($propertyArray)){\n show_view('error.php', \"At least one property name and value must be provided.\");\n die();\n }\n\n //Now we have our $propertyArray, either send it to the confirmation page or actually submit the props\n if(isset($_REQUEST['UserConfirmed'])) {\n submit($endpoint, $user, $propertyArray, $preventOverwrite);\n }\n else {\n confirm($propertyArray, $endpoint, $user);\n }\n } else { \t\t\t// If there is no post data, draw the new properties form\n draw($user);\n }\n}",
"function set_property(){\n }",
"private function setProperties($array)\n\t{\t\n\t\tif(is_array($array)){\n\t\t\tforeach($array as $key => $value)\n\t\t\t\t$this->$key = $value;\n\t\t}\n\t}",
"function setProperties($properties_array)\n {\n return $this->instance->setProperties($properties_array);\n }",
"public function setProperties(array $properties);",
"public function setPropArrayByRef(&$array)\n {\n $this->engine->assignByRef($array);\n }",
"protected function setProperties($array) {\n\t\tforeach (array_keys($this->data) as $field) {\n\t\t\t$this->data[$field]['value'] = $array[$field];\n\t\t}\n\t\treturn True;\n\t}",
"function setMultiple($properties) {\n foreach ($properties as $property => $value) {\n $this->set($property, $value);\n }\n }",
"public function handlePropertyValueUpdates()\n {\n $locales = [];\n if (class_exists(Locale::class)) {\n $locales = Locale::listLocales()->where('is_enabled', true)->all();\n }\n\n $formData = array_wrap(post('PropertyValues', []));\n if (count($formData) < 1) {\n PropertyValue::where('product_id', $this->id)->whereNull('variant_id')->delete();\n }\n\n $properties = Property::whereIn('id', array_keys($formData))->get();\n $propertyValues = PropertyValue::where('product_id', $this->id)->whereNull('variant_id')->get();\n\n foreach ($formData as $id => $value) {\n $property = $properties->find($id);\n\n $pv = $propertyValues->where('property_id', $id)->first()\n ?? new PropertyValue([\n 'product_id' => $this->id,\n 'property_id' => $id,\n ]);\n\n $pv->value = $value;\n foreach ($locales as $locale) {\n $transValue = post(\n sprintf('RLTranslate.%s.PropertyValues.%d', $locale->code, $id),\n post(sprintf('PropertyValues.%d', $id)) // fallback\n );\n $transValue = $this->handleTranslatedPropertyValue(\n $property,\n $pv,\n $value,\n $transValue,\n $locale->code\n );\n $pv->setAttributeTranslated('value', $transValue, $locale->code);\n }\n\n // If the value became empty delete it.\n if (($value === null || $value === '') && $pv->exists) {\n $pv->delete();\n } else {\n $pv->save();\n }\n\n // Transfer any deferred media\n if ($property->type === 'image') {\n $media = DeferredBinding::where('master_type', PropertyValue::class)\n ->where('master_field', 'image')\n ->where('session_key', post('_session_key'))\n ->get();\n\n foreach ($media as $m) {\n $slave = $m->slave_type::find($m->slave_id);\n $slave->field = 'image';\n $slave->attachment_type = PropertyValue::class;\n $slave->attachment_id = $pv->id;\n $slave->save();\n $m->delete();\n }\n }\n }\n }",
"public function update() {\n\t\t// When loaded, fully sync the property array.\n\t\tif ($this->loadedSettings !== false) {\n\t\t\t$properties = array();\n\t\t\t$ownProperties = $this->bean->ownProperty;\n\t\t\tforeach ($this->properties as $k => $v) {\n\t\t\t\t$found = false;\n\t\t\t\tforeach ($ownProperties as $property) {\n\t\t\t\t\tif ($property->name === $k) {\n\t\t\t\t\t\t$property->value = $v;\n\t\t\t\t\t\t$found = true;\n\t\t\t\t\t\t$properties[] = $property;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!$found) {\n\t\t\t\t\t$property = R::dispense('property');\n\t\t\t\t\t$property->name = $k;\n\t\t\t\t\t$property->value = $v;\n\t\t\t\t\t$properties[] = $property;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->bean->ownProperty = $properties;\n\t\t\t// When loaded, only add and modify properties, but do not delete any\n\t\t} elseif (!empty($this->properties)) {\n\t\t\t$ownProperties = $this->bean->ownProperty;\n\t\t\tforeach ($this->properties as $k => $v) {\n\t\t\t\t$found = false;\n\t\t\t\tforeach ($ownProperties as $property) {\n\t\t\t\t\tif ($property->name === $k) {\n\t\t\t\t\t\t$property->value = $v;\n\t\t\t\t\t\t$found = true;\n\t\t\t\t\t\t$this->bean->ownProperty[$property->id] = $property;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!$found) {\n\t\t\t\t\t$property = R::dispense('property');\n\t\t\t\t\t$property->name = $k;\n\t\t\t\t\t$property->value = $v;\n\t\t\t\t\t$this->bean->ownProperty[] = $property;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function updateProperties ($prj_uid, $act_uid, $arrayProperty)\n {\n //Copy of processmaker/workflow/engine/methods/tasks/tasks_Ajax.php //case \"saveTaskData\":\n try {\n $prj_uid = $this->validateProUid ($prj_uid);\n $act_uid = $this->validateActUid ($act_uid);\n $arrayProperty[\"TAS_UID\"] = $act_uid;\n $arrayProperty[\"PRO_UID\"] = $prj_uid;\n $task = new \\Task();\n\n $arrayResult = array();\n\n if ( isset ($arrayProperty[\"TAS_SELFSERVICE_TIMEOUT\"]) && $arrayProperty[\"TAS_SELFSERVICE_TIMEOUT\"] == \"1\" )\n {\n if ( !is_numeric ($arrayProperty[\"TAS_SELFSERVICE_TIME\"]) || $arrayProperty[\"TAS_SELFSERVICE_TIME\"] == '' )\n {\n throw (new \\Exception (\"Invalid value specified for 'tas_selfservice_time'\"));\n }\n }\n\n foreach ($arrayProperty as $k => $v) {\n $arrayProperty[$k] = str_replace (\"@amp@\", \"&\", $v);\n }\n\n if ( isset ($arrayProperty[\"TAS_SEND_LAST_EMAIL\"]) )\n {\n $arrayProperty[\"TAS_SEND_LAST_EMAIL\"] = ($arrayProperty[\"TAS_SEND_LAST_EMAIL\"] == \"TRUE\") ? \"TRUE\" : \"FALSE\";\n }\n else\n {\n if ( isset ($arrayProperty[\"SEND_EMAIL\"]) )\n {\n $arrayProperty[\"TAS_SEND_LAST_EMAIL\"] = ($arrayProperty[\"SEND_EMAIL\"] == \"TRUE\") ? \"TRUE\" : \"FALSE\";\n }\n else\n {\n //$arrayProperty[\"TAS_SEND_LAST_EMAIL\"] = trim ($aTaskInfo->getTasSendLastEmail ()) !== \"\" ? $arrayProperty[\"TAS_SEND_LAST_EMAIL\"] : \"FALSE\";\n }\n }\n\n if ( isset ($arrayProperty[\"TAS_RECEIVE_LAST_EMAIL\"]) )\n {\n $arrayProperty[\"TAS_RECEIVE_LAST_EMAIL\"] = $arrayProperty[\"TAS_RECEIVE_LAST_EMAIL\"] === \"TRUE\" ? \"TRUE\" : \"FALSE\";\n }\n\n switch ($arrayProperty[\"TAS_ASSIGN_TYPE\"]) {\n case 'BALANCED':\n case 'MANUAL':\n case 'REPORT_TO':\n $this->unsetVar ($arrayProperty, \"TAS_ASSIGN_VARIABLE\");\n $this->unsetVar ($arrayProperty, \"TAS_GROUP_VARIABLE\");\n $this->unsetVar ($arrayProperty, \"TAS_SELFSERVICE_TIMEOUT\");\n $this->unsetVar ($arrayProperty, \"TAS_SELFSERVICE_TIME\");\n $this->unsetVar ($arrayProperty, \"TAS_SELFSERVICE_TIME_UNIT\");\n $this->unsetVar ($arrayProperty, \"TAS_SELFSERVICE_TRIGGER_UID\");\n $this->unsetVar ($arrayProperty, \"TAS_SELFSERVICE_EXECUTION\");\n break;\n case 'EVALUATE':\n if ( empty ($arrayProperty[\"TAS_ASSIGN_VARIABLE\"]) )\n {\n throw (new \\Exception (\"Invalid value specified for 'tas_assign_variable'\"));\n }\n $this->unsetVar ($arrayProperty, \"TAS_GROUP_VARIABLE\");\n $this->unsetVar ($arrayProperty, \"TAS_SELFSERVICE_TIMEOUT\");\n $this->unsetVar ($arrayProperty, \"TAS_SELFSERVICE_TIME\");\n $this->unsetVar ($arrayProperty, \"TAS_SELFSERVICE_TIME_UNIT\");\n $this->unsetVar ($arrayProperty, \"TAS_SELFSERVICE_TRIGGER_UID\");\n $this->unsetVar ($arrayProperty, \"TAS_SELFSERVICE_EXECUTION\");\n break;\n case 'SELF_SERVICE':\n case 'SELF_SERVICE_EVALUATE':\n if ( $arrayProperty[\"TAS_ASSIGN_TYPE\"] == \"SELF_SERVICE_EVALUATE\" )\n {\n if ( empty ($arrayProperty[\"TAS_GROUP_VARIABLE\"]) )\n {\n throw (new \\Exception (\"Invalid value specified for 'tas_group_variable'\"));\n }\n }\n else\n {\n $arrayProperty[\"TAS_GROUP_VARIABLE\"] = '';\n }\n $arrayProperty[\"TAS_ASSIGN_TYPE\"] = \"SELF_SERVICE\";\n if ( !($arrayProperty[\"TAS_SELFSERVICE_TIMEOUT\"] == 0 || $arrayProperty[\"TAS_SELFSERVICE_TIMEOUT\"] == 1) )\n {\n throw (new \\Exception (\"Invalid value specified for 'tas_selfservice_timeout'\"));\n }\n if ( $arrayProperty[\"TAS_SELFSERVICE_TIMEOUT\"] == \"1\" )\n {\n if ( empty ($arrayProperty[\"TAS_SELFSERVICE_TIME\"]) )\n {\n throw (new \\Exception (\"Invalid value specified for 'tas_assign_variable'\"));\n }\n if ( empty ($arrayProperty[\"TAS_SELFSERVICE_TIME_UNIT\"]) )\n {\n throw (new \\Exception (\"Invalid value specified for 'tas_selfservice_time_unit'\"));\n }\n if ( empty ($arrayProperty[\"TAS_SELFSERVICE_TRIGGER_UID\"]) )\n {\n throw (new \\Exception (\"Invalid value specified for 'tas_selfservice_trigger_uid'\"));\n }\n if ( empty ($arrayProperty[\"TAS_SELFSERVICE_EXECUTION\"]) )\n {\n throw (new \\Exception (\"Invalid value specified for 'tas_selfservice_execution'\"));\n }\n }\n else\n {\n $this->unsetVar ($arrayProperty, \"TAS_SELFSERVICE_TIME\");\n $this->unsetVar ($arrayProperty, \"TAS_SELFSERVICE_TIME_UNIT\");\n $this->unsetVar ($arrayProperty, \"TAS_SELFSERVICE_TRIGGER_UID\");\n $this->unsetVar ($arrayProperty, \"TAS_SELFSERVICE_EXECUTION\");\n }\n break;\n case \"MULTIPLE_INSTANCE_VALUE_BASED\":\n if ( trim ($arrayProperty[\"TAS_ASSIGN_VARIABLE\"]) == \"\" )\n {\n throw new \\Exception (\"ID_INVALID_VALUE_CAN_NOT_BE_EMPTY\");\n }\n break;\n }\n\n $arrayProperty[\"TAS_TRANSFER_FLY\"] = isset ($arrayProperty[\"TAS_TIMEUNIT\"]) && trim ($arrayProperty[\"TAS_TIMEUNIT\"]) !== \"\" ? \"FALSE\" : \"TRUE\";\n\n //Validating TAS_TRANSFER_FLY value\n if ( $arrayProperty[\"TAS_TRANSFER_FLY\"] == \"FALSE\" )\n {\n if ( !isset ($arrayProperty[\"TAS_DURATION\"]) )\n {\n throw (new \\Exception (\"Invalid value specified for 'tas_duration'\"));\n }\n $valuesTimeUnit = array('DAYS', 'HOURS', 'MINUTES');\n if ( (!isset ($arrayProperty[\"TAS_TIMEUNIT\"])) ||\n (!in_array ($arrayProperty[\"TAS_TIMEUNIT\"], $valuesTimeUnit)) )\n {\n throw (new \\Exception (\"Invalid value specified for 'tas_timeunit'\"));\n }\n $valuesTypeDay = array('1', '2', '');\n if ( (!isset ($arrayProperty[\"TAS_TYPE_DAY\"])) ||\n (!in_array ($arrayProperty[\"TAS_TYPE_DAY\"], $valuesTypeDay)) )\n {\n throw (new \\Exception (\"Invalid value specified for 'tas_type_day'\"));\n }\n if ( !isset ($arrayProperty[\"TAS_CALENDAR\"]) )\n {\n throw (new \\Exception (\"Invalid value specified for 'tas_calendar'\"));\n }\n }\n else\n {\n $this->unsetVar ($arrayProperty, \"TAS_DURATION\");\n $this->unsetVar ($arrayProperty, \"TAS_TIMEUNIT\");\n $this->unsetVar ($arrayProperty, \"TAS_TYPE_DAY\");\n $this->unsetVar ($arrayProperty, \"TAS_CALENDAR\");\n }\n if ( isset ($arrayProperty[\"TAS_SEND_LAST_EMAIL\"]) && $arrayProperty[\"TAS_SEND_LAST_EMAIL\"] == \"TRUE\" )\n {\n if ( empty ($arrayProperty[\"TAS_DEF_SUBJECT_MESSAGE\"]) )\n {\n throw (new \\Exception (\"Invalid value specified for 'tas_def_subject_message'\"));\n }\n $valuesDefMessageType = array('template', 'text');\n if ( (!isset ($arrayProperty[\"TAS_DEF_MESSAGE_TYPE\"])) ||\n (!in_array ($arrayProperty[\"TAS_DEF_MESSAGE_TYPE\"], $valuesDefMessageType)) )\n {\n throw (new \\Exception (\"Invalid value specified for 'tas_def_message_type'\"));\n }\n if ( $arrayProperty[\"TAS_DEF_MESSAGE_TYPE\"] == 'template' )\n {\n if ( empty ($arrayProperty[\"TAS_DEF_MESSAGE_TEMPLATE\"]) )\n {\n throw (new \\Exception (\"Invalid value specified for 'tas_def_message_template'\"));\n }\n $this->unsetVar ($arrayProperty, \"TAS_DEF_MESSAGE\");\n }\n else\n {\n if ( empty ($arrayProperty[\"TAS_DEF_MESSAGE\"]) )\n {\n throw (new \\Exception (\"Invalid value specified for 'tas_def_message'\"));\n }\n $this->unsetVar ($arrayProperty, \"TAS_DEF_MESSAGE_TEMPLATE\");\n }\n //Additional configuration\n if ( isset ($arrayProperty[\"TAS_DEF_MESSAGE_TYPE\"]) )\n {\n if ( !isset ($arrayProperty[\"TAS_DEF_MESSAGE_TEMPLATE\"]) )\n {\n $arrayProperty[\"TAS_DEF_MESSAGE_TEMPLATE\"] = \"alert_message.html\";\n }\n // $oConf->aConfig = array(\"TAS_DEF_MESSAGE_TYPE\" => $arrayProperty[\"TAS_DEF_MESSAGE_TYPE\"], \"TAS_DEF_MESSAGE_TEMPLATE\" => $arrayProperty[\"TAS_DEF_MESSAGE_TEMPLATE\"]);\n // $oConf->saveConfig (\"TAS_EXTRA_PROPERTIES\", $arrayProperty[\"TAS_UID\"], \"\", \"\");\n }\n }\n else\n {\n $this->unsetVar ($arrayProperty, \"TAS_DEF_SUBJECT_MESSAGE\");\n $this->unsetVar ($arrayProperty, \"TAS_DEF_MESSAGE_TYPE\");\n $this->unsetVar ($arrayProperty, \"TAS_DEF_MESSAGE\");\n $this->unsetVar ($arrayProperty, \"TAS_DEF_MESSAGE_TEMPLATE\");\n }\n if ( isset ($arrayProperty[\"TAS_RECEIVE_LAST_EMAIL\"]) && $arrayProperty[\"TAS_RECEIVE_LAST_EMAIL\"] == \"TRUE\" )\n {\n if ( empty ($arrayProperty[\"TAS_RECEIVE_SUBJECT_MESSAGE\"]) )\n {\n throw (new \\Exception (\"Invalid value specified for 'tas_receive_subject_message'\"));\n }\n if ( !isset ($arrayProperty[\"TAS_RECEIVE_MESSAGE_TYPE\"]) )\n {\n $arrayProperty[\"TAS_RECEIVE_MESSAGE_TYPE\"] = \"text\";\n }\n $valuesDefMessageType = array('text', 'template');\n if ( !in_array ($arrayProperty[\"TAS_RECEIVE_MESSAGE_TYPE\"], $valuesDefMessageType) )\n {\n throw (new \\Exception (\"Invalid value specified for 'tas_receive_message_type'\"));\n }\n if ( !isset ($arrayProperty[\"TAS_RECEIVE_MESSAGE_TEMPLATE\"]) )\n {\n $arrayProperty[\"TAS_RECEIVE_MESSAGE_TEMPLATE\"] = \"alert_message.html\";\n }\n if ( $arrayProperty[\"TAS_RECEIVE_MESSAGE_TYPE\"] == 'template' )\n {\n if ( empty ($arrayProperty[\"TAS_RECEIVE_MESSAGE_TEMPLATE\"]) )\n {\n throw (new \\Exception (\"Invalid value specified for 'tas_receive_message_template'\"));\n }\n $this->unsetVar ($arrayProperty, \"TAS_RECEIVE_MESSAGE\");\n }\n else\n {\n if ( empty ($arrayProperty[\"TAS_RECEIVE_MESSAGE\"]) )\n {\n throw (new \\Exception (\"Invalid value specified for 'tas_receive_message'\"));\n }\n $this->unsetVar ($arrayProperty, \"TAS_RECEIVE_MESSAGE_TEMPLATE\");\n }\n }\n else\n {\n $this->unsetVar ($arrayProperty, \"TAS_RECEIVE_SERVER_UID\");\n $this->unsetVar ($arrayProperty, \"TAS_RECEIVE_SUBJECT_MESSAGE\");\n $this->unsetVar ($arrayProperty, \"TAS_RECEIVE_MESSAGE\");\n $this->unsetVar ($arrayProperty, \"TAS_RECEIVE_MESSAGE_TYPE\");\n $this->unsetVar ($arrayProperty, \"TAS_RECEIVE_MESSAGE_TEMPLATE\");\n }\n\n $result = $task->updateTaskProperties ($arrayProperty);\n\n if ( !empty ($arrayProperty['CONSOLIDATE_DATA']) )\n {\n\n if ( !empty ($arrayProperty['CONSOLIDATE_DATA']['consolidated_dynaform']) )\n {\n\n $consolidated = new \\ConsolidatedCases();\n\n $dataConso = array(\n 'con_status' => $arrayProperty['CONSOLIDATE_DATA']['consolidated_enable'],\n 'tas_uid' => $arrayProperty['TAS_UID'],\n 'dyn_uid' => $arrayProperty['CONSOLIDATE_DATA']['consolidated_dynaform'],\n 'pro_uid' => $arrayProperty['PRO_UID'],\n 'rep_uid' => $arrayProperty['CONSOLIDATE_DATA']['consolidated_report_table'],\n 'table_name' => $arrayProperty['CONSOLIDATE_DATA']['consolidated_table'],\n 'title' => $arrayProperty['CONSOLIDATE_DATA']['consolidated_title']\n );\n\n $consolidated->saveConsolidated ($dataConso);\n }\n }\n\n $arrayResult[\"status\"] = \"OK\";\n\n if ( $result == 3 )\n {\n $arrayResult[\"status\"] = \"CRONCL\";\n }\n return $arrayResult;\n } catch (Exception $e) {\n throw $e;\n }\n }",
"function setProperty() {\n $instance = $this->CI->ciwy->current_instance[$this->component_name];\n $properties = func_get_arg(0);\n if (is_array($properties)) {\n foreach($properties as $key => $val) {\n if ( ! isset($this->component_property[$key])) {\n $message = '[' . $this->CI->ciwy->library_name . '] '. $key . ' is not a '.$this->component_name .' Property.';\n log_message('error', $message);\n show_error($message);\n } else {\n $this->CI->ciwy->component_config[$instance]['Config'][$key] = $val;\n }\n }\n }\n }",
"public function setState( array $properties )\n {\n foreach ( $properties as $name => $value )\n {\n $this->properties[$name] = $value;\n }\n }",
"public function run(){\r\n\t\tforeach ($this->propertyObj->ViewAllDetailedProperty as $key => $value) {\r\n\r\n\t\t\t$propertyXmlConvert = PropertyHelper::convert($value);\r\n\r\n\r\n\t\t\t//Check if that property already exists through \"PropertyCode\" field\r\n\t\t\tif( $property = $this->propertyExists($propertyXmlConvert['code'] ) ){\r\n\t\t\t\t\r\n\t\t\t\t//If Change code has changed mean property has an updated data\r\n\t\t\t\tif($this->propertyUpdated($property->change_code, $propertyXmlConvert['change_code'])){\r\n\r\n\t\t\t\t\t$this->updatedProperties[] = $propertyXmlConvert;\r\n\t\t\t\t\r\n\t\t\t\t\t//Save it To Update Property Array\r\n\t\t\t\t\t$this->updateProperty($property->code, $propertyXmlConvert);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t//Create New Property But Only Those Which are Not Archived or archived == false and also Status == \"Active\"\r\n\t\t\t\t\r\n\t\t\t\tif( ($value->PropertyStatus == \"Active\") && ($value->PropertyArchived == \"false\" ) ){\r\n\r\n\t\t\t\t\t$this->createProperty($propertyXmlConvert);\r\n\t\t\t\t\t//Save it To New Property Array\r\n\t\t\t\t\t$this->newProperties[] = $propertyXmlConvert;\r\n\t\t\t\t\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $this;\t\r\n\r\n\t}",
"protected function addMultiProperty($property, $typoscript, $submittedValues) {\n\n\t\t$entryArray[0] = array();\n\n\t\t// (e.g. postProcessor.1.properties.1.zip = zip-fieldname\n\t\t// or postProcessor.1.properties.2.field = phone-fieldname)\n\n\t\tforeach ($typoscript as $key => $field) {\n\n\t\t\tif ($key == 'type.') {\n\t\t\t\t$entryArray[0]['type'] = self::getPropertyTypes($typoscript[$key]);\n\n\t\t\t} elseif ($key == 'messenger') {\n\t\t\t\t// addInstantmessenger() takes the type of messenger as an additional parameter\n\t\t\t\t// (e.g. postProcessor.1.properties.1.messenger = X-JABBER)\n\t\t\t\t$entryArray[0][$key] = $typoscript[$key];\n\n\t\t\t} elseif (isset($submittedValues[$field])) {\n\t\t\t\tif ($key == 'field') {\n\t\t\t\t\t$entryArray[0]['value'] = $submittedValues[$field];\n\n\t\t\t\t} else {\n\t\t\t\t\t$entryArray[0][$key] = $submittedValues[$field];\n\t\t\t\t}\n\n\t\t\t} elseif ($key == 'field' && $property != 'Address') {\n\t\t\t\t// all this properties except address require 'value'\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t$this->vcard->{'add' . $property}($entryArray);\n\t}",
"private function createParamArray()\n {\n $data = [];\n /** @var Property $property */\n foreach($this->properties as $name => $property)\n {\n if ($property->initialized() && !$property->isReadOnly())\n {\n $data[$property->name()] = $property->preparedForDb();\n }\n }\n return $data;\n }",
"public function setProperties(array $properties) \n\t{\n\t\tforeach ($properties as $name => $value) {\n\t\t\t$this->set($name, $value);\n\t\t}\n\t}",
"public function setProperties($properties)\n {\n\n }",
"private function setServices(&$properties, $thisUrl, $collection) {\r\n \r\n if (!isset($properties['services'])) {\r\n $properties['services'] = array();\r\n }\r\n \r\n /*\r\n * Visualize\r\n */\r\n if (isset($properties['wms'])) {\r\n $this->setVisualizeService($properties, $collection);\r\n }\r\n \r\n /*\r\n * Download\r\n */\r\n if (isset($properties['resource'])) {\r\n $this->setDownloadService($properties, $thisUrl, $collection);\r\n }\r\n \r\n }",
"public function setProperties(array $data)\n {\n $this->properties = $data;\n }",
"public function initMutateProperty()\n {\n foreach ( $this->initMutateProperties as $property ) {\n $this->mutateProperties[ $property ] = $this->{$property};\n }\n $this->view->addParams( [\n 'mutateProperties' => $this->mutateProperties\n ] );\n }",
"public function setProperties(array $properties)\n {\n $this->properties = $properties;\n }",
"public function fill(array $properties)\n {\n foreach($properties as $arg => $value) {\n $this->setPublicProperty($arg, $value);\n }\n }",
"public function __construct(Array $properties = array())\n\t{\n\t\t$this->reset();\n\t\t\n\t\tforeach ($properties AS $property => $value)\n\t\t{\n\t\t\t$method_name = 'set_' .$property;\n\t\t\t\n\t\t\tif (method_exists($this, $method_name))\n\t\t\t{\n\t\t\t\t$this->$method_name($value);\n\t\t\t}\n\t\t}\n\t}",
"function setValues($array){\r\n\t\tforeach($array as $key => $val)\r\n\t\t\tif(property_exists($this,$key))\r\n\t\t\t\t$this->$key = $val;\r\n\t}",
"protected function setProperties()\n {\n foreach ($this->data as $key => $value) {\n $this->$key = $value;\n }\n }",
"public function create($propertyValues = []);",
"abstract protected function properties();"
]
| [
"0.6206211",
"0.581474",
"0.5745868",
"0.55925703",
"0.557418",
"0.5565261",
"0.5539747",
"0.54685867",
"0.54608595",
"0.5442219",
"0.5425256",
"0.53968215",
"0.5382193",
"0.53785175",
"0.5342999",
"0.5339228",
"0.52974784",
"0.5276255",
"0.525637",
"0.5252854",
"0.5244384",
"0.524225",
"0.52416825",
"0.52180994",
"0.5205205",
"0.51963216",
"0.5192281",
"0.5180541",
"0.51495314",
"0.513982"
]
| 0.5932248 | 1 |
Finds and displays a Perfil entity. | public function showAction($id) {
$this->get('session')->getFlashBag()->clear();
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('UsuarioBundle:Perfil')->find($id);
if (!$entity) {
throw $this->createNotFoundException('No se ha podido encontrar la entidad Perfil.');
}
return $this->render('UsuarioBundle:Perfil:show.html.twig', array(
'entity' => $entity,
));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Perfil $perfil)\n {\n //\n }",
"public function actionPerfil($id)\n {\n return $this->render('perfil', [\n 'model' => $this->findModel($id),\n ]);\n }",
"public function show($Perprof)\n {\n if(Auth()->guard()->check() && Auth::user()->profornot == 0){\n $idperf=0;\n return redirect('/profile/create');\n }\n else\n {\n $Perprof=Artistprofile::find($Perprof) ?? abort(404);;\n return view(\"profiles.personalprofile\",compact('Perprof')); \n }\n }",
"public function Perfil(){\n $pvd = new tutoria();\n\n //Se obtienen los datos del tutoria.\n if(isset($_REQUEST['persona_id'])){\n $pvd = $this->model->Obtener($_REQUEST['persona_id']);\n }\n\n //Llamado de las vistas.\n require_once '../Vista/Tutoria/perfil-tutoria.php';\n\t}",
"public function show(ProfilUser $profilUser)\n {\n //\n }",
"public function perfil($id){\n $user = User::find($id);\n /*var_dump($user->name);\n die();*/\n return view('user.perfil', [\n 'user' => $user\n ]);\n }",
"public function showProfil()\n {\n $profils = Profil::all();\n return view('profils/showProfil', ['profils' => $profils]);\n }",
"public function perfil($id)\n {\n $empresa = User::findOrFail($id);\n return view('asesor.empresa.perfil',compact('empresa'));\n }",
"public function Perfil(){\n $pvd = new alumno();\n\n //Se obtienen los datos del alumno.\n if(isset($_REQUEST['persona_id'])){\n $pvd = $this->model->Obtener($_REQUEST['persona_id']);\n }\n\n //Llamado de las vistas.\n require_once '../Vista/Alumno/perfil-alumno.php';\n\t}",
"public function showAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n //recupérer le repo\n $repository = $em->getRepository('InsatGl2Bundle:Personne');\n\n $personnes = $repository->findAll();\n\n\n return $this->render('@InsatGl2\\Personne\\show.html.twig',\n array(\n 'personnes'=> $personnes\n ));\n }",
"function loadPerfil(){\n\t\t$r = $this->dper->getPerfilById($this->id);\n\t\tif($r != -1){\n\t\t\t$this->nombre = $r[\"nombre\"];\n\t\t}else{\n\t\t\t$this->nombre = \"\";\n\t\t}\n\t}",
"public function show(Profesor $profesor)\n {\n\n }",
"public function editAction($id) {\n $this->get('session')->getFlashBag()->clear();\n\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('UsuarioBundle:Perfil')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha podido encontrar la entidad Perfil.');\n }\n\n $editForm = $this->createForm(new PerfilType(), $entity);\n\n return $this->render('UsuarioBundle:Perfil:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n ));\n }",
"public function show()\n {\n $user_identifier = $this->session->userdata('identifier');\n $user_details = $this->user_m->read($user_identifier);\n $this->data['user_details'] = $user_details;\n $this->load_view('Profil Akun', 'user/profil');\n }",
"public function show(Profesor $profesor)\n {\n //\n }",
"public function show($id)\n\t{\n\t\treturn \"Profil de l'utilisateur \" . $id;\n\t}",
"public function show($id_perfil)\n {\n $operfiles = Perfil::where('id_perfil', '=', $id_perfil)->get();\n return view('perfiles.v_perfiles', compact('operfiles'));\n }",
"public function showPerfil(){\n\n $idUsuario = Auth::id();\n $OTasignadas=ot_orden_trabajo::where('OT_USER_ENCARGADO',$idUsuario)->paginate(5);\n $OTcreadas=ot_orden_trabajo::where('OT_USER_ID_CREADOR',$idUsuario)->paginate(5);\n // $buscarReporte=rep_reporte::where('REP_USER_ID', $idUsuario)->get();\n // $imagenes=ft_fotos::all();\n $fotoPerfil=user::where('id',$idUsuario)->get();\n // dd($fotoPerfil);\n // $ordenDeTrabajo = DB::table('OT_ORDEN_TRABAJO')->get();\n\n return view('PERFIL.inicioPerfil', compact('OTasignadas','OTcreadas','fotoPerfil' ));\n }",
"public function perfil() {\n require_once 'views/usuarios/perfil.php';\n }",
"public function getPerfil()\n {\n return User::find(Auth::user()->id);\n }",
"public function showAction()\n {\n\t\tif (!$this->get('security.context')->isGranted('ROLE_SUBCRIBERUSER')) {\n throw new AccessDeniedException();\n }\n\n // get loged in user Id\t\n\t\t$userId = $this->get('security.context')->getToken()->getUser()->getId();\n \n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('WebsolutioDemoBundle:UserProfile')->findOneByUser($userId);\n\n if (!$entity) {\n\t\t\treturn $this->redirect($this->generateUrl('userprofile_create_profile'));\n\t\t} else {\n\t\t\treturn $this->redirect($this->generateUrl('userprofile_show', array('id' => $userId)));\n \t\n\t\t}\n\n return $this->render('WebsolutioDemoBundle:UserProfile:index.html.twig', array(\n 'entity' => $entity \n ));\n }",
"public function show(Person $person)\n {\n //\n }",
"public function show(Person $person)\n {\n //\n }",
"public function listProById()\n {\n\n // obtener el perfil por id\n $id = 3985390143818633;\n print_r($this->getProfile($id)); \n\n }",
"public function profile() {\n $this->restrictToRoleId(2);\n \n // Exécute la view\n $this->show('user/profile');\n }",
"public function edit(Perfil $perfil)\n {\n //\n }",
"public function displayperson() {\r\n if (isset($_GET['id'])) {\r\n $display = $this->model->displayPerson($_GET['id']);\r\n }\r\n return $this->view('/company/displayperson', $display);\r\n }",
"public function runShowPerfil($request)\n {\n $dataJson = $this->hoSegUsuariosModel->reCargarPerfiles();\n $this->json($dataJson);\n }",
"public function show(Personal $personal)\n {\n //\n }",
"public function show(Personal $personal)\n {\n //\n }"
]
| [
"0.77946544",
"0.6630333",
"0.6584973",
"0.65097666",
"0.65093625",
"0.64703286",
"0.63999575",
"0.63156223",
"0.6314044",
"0.6289836",
"0.6258189",
"0.62382877",
"0.6219034",
"0.6206361",
"0.6197468",
"0.6119564",
"0.60810536",
"0.60679233",
"0.60515773",
"0.60374165",
"0.6015543",
"0.6007734",
"0.6007734",
"0.60046065",
"0.60044867",
"0.59965074",
"0.59946513",
"0.5984317",
"0.5967469",
"0.5967469"
]
| 0.74478984 | 1 |
Displays a form to create a new Perfil entity. | public function newAction() {
$this->get('session')->getFlashBag()->clear();
$entity = new Perfil();
$form = $this->createForm(PerfilType::class, $entity);
return $this->render('UsuarioBundle:Perfil:new.html.twig', array(
'entity' => $entity,
'form' => $form->createView()
));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionCreate()\n {\n $model = new PerfilUsuario();\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 createAction()\n {\n if (!$this->request->isPost()) {\n $this->dispatcher->forward([\n 'controller' => \"adm_perfil\",\n 'action' => 'index'\n ]);\n\n return;\n }\n\n $adm_perfil = new AdmPerfil();\n $adm_perfil->nombrePerfil = $this->request->getPost(\"nombrePerfil\");\n $adm_perfil->descPerfil = $this->request->getPost(\"descPerfil\");\n \n\n if (!$adm_perfil->save()) {\n foreach ($adm_perfil->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n $this->dispatcher->forward([\n 'controller' => \"adm_perfil\",\n 'action' => 'new'\n ]);\n\n return;\n }\n\n $this->flash->success(\"adm_perfil was created successfully\");\n\n $this->dispatcher->forward([\n 'controller' => \"adm_perfil\",\n 'action' => 'index'\n ]);\n }",
"public function createAction(Request $request) {\n $this->get('session')->getFlashBag()->clear();\n $em = $this->getDoctrine()->getManager();\n $entity = new Perfil();\n $form = $this->createForm(PerfilType::class, $entity);\n // $form->submit($request);\n $form->handleRequest($request);\n \n $data = $form->getData('pac_usuariobundle_perfiltype')->getRoles()->toArray();\n if ($form->isValid()) { \n if (count($entity->getRolesArray()) == 0) {\n $this->setFlash('error', 'Debe elegir por lo menos un Rol');\n return $this->render('UsuarioBundle:Perfil:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }\n if (array_key_exists('roles', $data)) {\n $roles_seleccionados = $data['roles'];\n if (!$this->pagInicioDefaultValid($roles_seleccionados)) {\n $this->setFlash('error', 'Debe elegir una página inicio default que esté relacionada con el Rol');\n return $this->render('UsuarioBundle:Perfil:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }\n }\n $em = $this->getDoctrine()->getManager();\n $entity->setFechaAlta(new \\DateTime());\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('perfil'));\n }\n $this->setFlash('error', 'No se han realizado los siguientes cambios.');\n\n return $this->render('UsuarioBundle:Perfil:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }",
"public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function addPerfilAction() {\n $perfil= new Perfiles();\n $perfil->setIdperfilUsuario(\"Sec\");\n $perfil->setNombrePerfil(\"Secretaria\");\n $perfil->setDescripcionPerfil(\"Perfil Agregado desde UsuariosController\");\n \n $em=$this->getDoctrine()->getEntityManager();\n $em->persist($perfil);\n $flush=$em->flush();\n \n if($flush!=null){echo \"El perfil no se ha creado correctamente\";}\n else{echo \"Perfil Creado\";}\n \n die();\n }",
"public function createProfil()\n {\n $profils = Profil::all();\n return view('profils.addProfil', ['profils' => $profils]);\n }",
"public function create()\n {\n $misPerfiles = Perfil::getId();\n return view('usuarios.create', compact('misPerfiles'));\n }",
"public function create()\n {\n return view('admin.profesores.create');\n }",
"public function create()\n {\n return view('films.create');\n }",
"public function create()\n {\n return view('profiles.dataprofileForm');\n }",
"public function newAction()\n {\n $entity = new Propietario();\n $form = $this->createCreateForm($entity);\n\n return $this->render(\n 'BookingBundle:Propietario:new.html.twig',\n array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n )\n );\n }",
"public function newAction()\r\n {\r\n $entity = new Utilisateur();\r\n $form = $this->createCreateForm($entity);\r\n\r\n return $this->render('UtilisateurBundle:Utilisateur:new.html.twig', array(\r\n 'entity' => $entity,\r\n 'form' => $form->createView(),\r\n ));\r\n }",
"public function newAction()\n {\n if (!$this->get('security.context')->isGranted('ROLE_ADMIN') ) {\n return $this->redirect($this->generateUrl('error'), 302); \n }\n $entity = new Grupos();\n $form = $this->createCreateForm($entity);\n\n return $this->render('SytemSGBundle:Grupos:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n //\n return view('profesores.create');\n }",
"public function create()\n {\n //\n return view('profesores.create');\n }",
"public function create()\n {\n //\n return view('profesores/create');\n }",
"public function create()\n {\n //\n return view('profesor.create');\n }",
"public function create()\n {\n return view('user.profile_form_create');\n }",
"public function create()\n { \n $perfiles=Perfil::all();\n return view('usuario.create',compact('perfiles'));\n }",
"public function create()\n {\n return view('Profile.profile-form_create');\n }",
"public function actionCreate() {\n\t\t$request = Yii::app()->request;\n $form = new PersonaForm(\"new\");\n if($request->isPostRequest) {\n $form->attributes = $request->getPost('PersonaForm');\n if($form->validate()) {\n PersonaManager::savePersona($form);\n Yii::app()->user->setFlash('general-success', \"$form->nombre $form->apellido ha sido creado.\");\n $this->redirect('admin');\n }\n }\n $this->render('create', array('model'=>$form));\n }",
"public function create(): View\n {\n return view('films.filmsCreate');\n }",
"public function create()\n {\n return view('filme.create');\n }",
"public function newAction()\n {\n $entity = new Paciente();\n $form = $this->createForm(new PacienteType(), $entity);\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function create()\n {\n $roles = Role::all();\n $perfiles = Perfil::pluck('name','id');\n\n return view('usuarios.formulario',compact('roles','perfiles'));\n }",
"public function newAction()\n {\n $entity = new Fichepatient();\n $form = $this->createCreateForm($entity);\n\n return $this->render('MedecinIBundle:Fichepatient:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new PersonnelPersonnel();\n $form = $this->createCreateForm($entity);\n $formpers = $this->container->get('form.factory')->createBuilder(new NomenclatureSoussituationadministrativeType())->getForm();\n return $this->render('SiseCoreBundle:PersonnelPersonnel:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'formpers' => $formpers->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Feriado();\n $form = $this->createCreateForm($entity);\n\n return $this->render('BaseBundle:Feriado:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('profesores.crear');\n }",
"public function create()\n {\n $nationalities = Nationality::orderBy('name', 'desc')->get();\n $producers = Producer::orderBy('name', 'desc')->get();\n $categories = Category::orderBy('name', 'desc')->get();\n return view(\"films.form\", [\n 'nationalities' => $nationalities,\n 'producers' => $producers,\n 'categories' => $categories\n ]);\n }"
]
| [
"0.74496865",
"0.7315969",
"0.7091535",
"0.7061191",
"0.7042456",
"0.7010299",
"0.7004303",
"0.69816256",
"0.6946137",
"0.6901151",
"0.6886123",
"0.68705976",
"0.68635625",
"0.6860156",
"0.6860156",
"0.68388826",
"0.6836366",
"0.681081",
"0.6809406",
"0.67692304",
"0.6735839",
"0.6726403",
"0.6725298",
"0.67194456",
"0.6690414",
"0.6681174",
"0.6663613",
"0.66568553",
"0.66416454",
"0.6623631"
]
| 0.84691286 | 0 |
Displays a form to edit an existing Perfil entity. | public function editAction($id) {
$this->get('session')->getFlashBag()->clear();
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('UsuarioBundle:Perfil')->find($id);
if (!$entity) {
throw $this->createNotFoundException('No se ha podido encontrar la entidad Perfil.');
}
$editForm = $this->createForm(new PerfilType(), $entity);
return $this->render('UsuarioBundle:Perfil:edit.html.twig', array(
'entity' => $entity,
'edit_form' => $editForm->createView(),
));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Perfil $perfil)\n {\n //\n }",
"public function edit()\n {\n $user = Auth::user();\n $perfil = Perfil::find($user->perfil_id);\n if($user->perfil_id == null || !$perfil){\n return redirect()->route('app.registro');\n }\n return view('aplicacion.registro.frmRegistro', compact('user', 'perfil'))->with(['URL' => route('app.perfil.put', $user->perfil_id), 'method' => 'PUT']);\n }",
"function edit($idperfil)\n { \n // check if the perfil exists before trying to edit it\n $data['perfil'] = $this->Perfil_model->get_perfil($idperfil);\n \n if(isset($data['perfil']['idperfil']))\n {\n if(isset($_POST) && count($_POST) > 0) \n { \n $params = array(\n\t\t\t\t\t'nombre' => $this->input->post('nombre'),\n\t\t\t\t\t'descripcion' => $this->input->post('descripcion'),\n );\n\n $this->Perfil_model->update_perfil($idperfil,$params); \n redirect('perfil/index');\n }\n else\n {\n $data['_view'] = 'perfil/edit';\n $this->load->view('layouts/main',$data);\n }\n }\n else\n show_error('The perfil you are trying to edit does not exist.');\n }",
"public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }",
"public function editar_perfil()\n\t{\n\t\t//Se valida la existencia de los datos del usuario que inicio sesion dentro de la session\n\t\tif($this->session->userdata('id_usuario_prueba') != null){\n\t\t\t$data = [\n\t\t\t\t\"page\" => \"Perfil\"\n\t\t\t];\n\t\t\t$this->load->view('layout/layout_open');\n\t\t\t$this->load->view('layout/layout_menu', $data);\n\t\t\t$this->load->view('usuarios/editar_perfil');\n\t\t\t$this->load->view('layout/layout_close');\n\t\t}else{\n\t\t\theader(\"Location:\" . base_url());\n\t\t}\n\t}",
"public function getEditarPerfil()\n\t{\n\t\treturn view('usuario.actualizar');\n\t}",
"public function edit()\n {\n return view('profil.edit', ['user' => auth()->user(), 'page' => 0]);\n }",
"public function editAction()\n {\n $profileRepoFactory = new Application_Factory_ProfileRepository();\n $profileModelFactory = new Application_Factory_ProfileModel();\n $profileForm = new Application_Form_Profile(['id' => 'edit-profile']);\n\n $profileForm->submit->setLabel(\"Save\");\n $profileRepo = $profileRepoFactory->createService();\n\n $this->view->profileForm = $profileForm;\n\n //GET request handler\n $visitEditProfilePage = !$this->getRequest()->isPost();\n if ($visitEditProfilePage) {\n $profileId = (int) $this->getParam('id', 0);\n $profileEntity = $profileRepo->findById($profileId);\n $profileForm->bindFromProfile($profileEntity);\n return; //render edit profile form\n }\n\n //POST request handler\n $postInvalidProfile = !$profileForm->isValid($this->getRequest()->getPost());\n if ($postInvalidProfile) {\n return; //represent profile form with error messages\n }\n\n //Persit filtered profile to persistent\n $profileRepo->save($profileModelFactory->createService($profileForm->getValues()));\n $this->_helper->redirector('index', 'profile', 'default');\n }",
"public function editAction()\r\n {\r\n \r\n $id= $this->container->get('security.context')->getToken()->getUser()->getId();\r\n $em = $this->getDoctrine()->getManager();\r\n $entity = $em->getRepository('UtilisateurBundle:Utilisateur')->find($id);\r\n \r\n if (!$entity) {\r\n throw $this->createNotFoundException('Unable to find Utilisateur entity.');\r\n }\r\n\r\n $editForm = $this->createEditForm($entity);\r\n $deleteForm = $this->createDeleteForm($id);\r\n\r\n return $this->render('UtilisateurBundle:Default:info.html.twig', array(\r\n 'entity' => $entity,\r\n 'edit_form' => $editForm->createView(),\r\n 'delete_form' => $deleteForm->createView(),\r\n ));\r\n }",
"public function editarPerfilAction()\n {\n \tif($this->identity())\n \t{\n \t\t$formManager = $this->container->get('FormElementManager'); \n $editarUsuarioForm = $formManager->get(EditarUsuarioForm::class);\n \t\t\n \t\t$cambiarClaveForm = new \\Users\\Form\\CambiarClaveForm($this->getRequest()->getBaseUrl() . '/captcha/');\n \t\t\n \t\t$subirImagenForm = new \\Users\\Form\\SubirImagenForm(); \t\t\n \t\t\n \t\t$codUsuario = $this->identity()['codUsuario'];\n \t\t$usuario = $this->usuarioTable->obtenerUsuario($codUsuario);\n \t\t$editarUsuarioForm->bind($usuario);\n \t\t\n \t\t$request = $this->getRequest();\n \t\n \t\tif($request->isPost())\n \t\t{ \t\n \t\t\t$editarUsuarioForm->setData($request->getPost());\n \t\t\t \n \t\t\tif ($editarUsuarioForm->isValid())\n \t\t\t{\n \t\t\t\t$usuario = $editarUsuarioForm->getData();\n\t\t\t\t \n\t\t\t if($this->usuarioTable->guardarUsuario($usuario))\n\t\t\t {\n\t\t\t\t $this->flashMessenger()->addMessage('¡Sus datos han sido cambiado correctamente!');\n\t\t\t\t return $this->redirect()->toRoute('perfil');\n\t\t\t\t }\n \t\t\t\t \t\n \t\t\t}\n \t\n \t\t}\n \t\n \t\t$view = new ViewModel(array(\n \t\t\t\t'editarUsuarioForm' => $editarUsuarioForm,\n \t\t\t\t'cambiarClaveForm' => $cambiarClaveForm,\n \t\t\t\t'messages' => $this->flashmessenger()->getMessages(),\n \t\t\t\t'errorMessages' => $this->flashmessenger()->getErrorMessages(),\n \t\t));\n \t\n \t\t//$this->layout('layout/layout');\n \t\treturn $view;\n \t}\n \t \n \treturn $this->redirect()->toRoute('ingresar');\n }",
"public function edit($id)\n {\n $perfil = Perfil::find($id);\n return view('perfil.editar', ['perfil'=>$perfil]);\n }",
"public function profileEdit($id){\n $data = Owner::find($id);\n\n return view('adminlte::layouts.owner.updateProfil')->with('data',$data);\n }",
"public function edit() {\n $perfil = \\Auth::user();\n return view('users.profile', ['user' => $perfil]);\n }",
"public function edit() {\n if (!Auth::check()) return redirect()->to('login');\n $pageData = self::getData('edit');\n return view('profile-edit', $pageData);\n }",
"public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }",
"public function editProfil($id)\n {\n $profil = Profil::find($id);\n return view('profils.updateProfil', ['profil' => $profil]);\n }",
"public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('SiseCoreBundle:PersonnelPersonnel')->find($id);\n $formpers = $this->container->get('form.factory')->createBuilder(new NomenclatureSoussituationadministrativeType())->getForm();\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find PersonnelPersonnel entity.');\n }\n $editForm = $this->createEditForm($entity);\n // $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('SiseCoreBundle:PersonnelPersonnel:edit.html.twig', array(\n 'entity' => $entity,\n 'code' => $id,\n 'edit_form' => $editForm->createView(),\n // 'delete_form' => $deleteForm->createView(),\n 'formpers' => $formpers->createView(),\n ));\n }",
"public function edit($id)\n {\n $profile = Profile::find($id);\n $seguros = Seguro::all();\n\n return view('backend.formularios.cliente.perfil.edit', [\n 'profile' => $profile,\n 'seguros' => $seguros,\n ]);\n }",
"public function edit(perfilCompe $perfilCompe)\n {\n //\n }",
"public function editAction(): void {\n View::renderTemplate('Profile/edit.twig', [\n 'user' => $this->user\n ]);\n }",
"public function updateAction($id) {\n $this->get('session')->getFlashBag()->clear();\n\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('UsuarioBundle:Perfil')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha podido encontrar la entidad Perfil.');\n }\n\n $editForm = $this->createForm(new PerfilType(), $entity);\n\n $request = $this->getRequest();\n\n $data = $request->request->get('pac_usuariobundle_perfiltype');\n\n $editForm->submit($request);\n\n if ($editForm->isValid()) {\n if (!array_key_exists('roles', $data)) {\n $this->setFlash('error', 'Debe elegir por lo menos un Rol');\n return $this->render('UsuarioBundle:Perfil:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n ));\n }\n if (array_key_exists('roles', $data)) {\n $roles_seleccionados = $data['roles'];\n if (!$this->pagInicioDefaultValid($roles_seleccionados)) {\n $this->setFlash('error', 'Debe elegir una página inicio default que esté relacionada con el Rol');\n return $this->render('UsuarioBundle:Perfil:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n ));\n }\n }\n $em->persist($entity);\n $em->flush();\n\n $this->setFlash('success', 'Los cambios se han realizado con éxito');\n return $this->render('UsuarioBundle:Perfil:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n ));\n }\n\n $this->setFlash('error', 'No se han podido realizar los siguientes cambios.');\n return $this->render('UsuarioBundle:Perfil:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n ));\n }",
"public function edit()\n {\n return view('admin.profile.edit');\n }",
"function editarPerfil(){\n \t//Llamo a la vista editar perfil\n \trequire \"app/Views/EditarPerfil.php\";\n \t\t$usuario = new Usuario();\n\t\t//Paso datos\n \t\t$usuario->nombre=$_POST['nombre'];\n \t\t$usuario->apellidoPaterno=$_POST['apellido_p'];\n \t\t$usuario->apellidoMaterno=$_POST['apellido_m'];\n \t\t$usuario->nombreUsuario=$_POST['nom_usuario'];\n \t\t$usuario->correo=$_POST['correo'];\n \t\t$usuario->contrasenia=$_POST['contrasenia'];\n \t\t$usuario->sexo=$_POST['sexo'];\n \t\t$usuario->descripcion=$_POST['descripcion'];\n \t\t$usuario->id=$_POST['id'];\n \t\t$usuario->contrasenia['password'];\n \t\t$usuario->editarUsuario();\n header(\"Location:/Proyecto/index.php?controller=Publicaciones&action=home\");\t\n }",
"public function editAction()\n {\n $identity = Zend_Auth::getInstance()->getIdentity();\n $users = new Users_Model_User_Table();\n $row = $users->getById($identity->id);\n\n $form = new Users_Form_Users_Profile();\n $form->setUser($row);\n\n if ($this->_request->isPost()\n && $form->isValid($this->_getAllParams())) {\n\n $row->setFromArray($form->getValues());\n $row->save();\n\n $row->login(false);\n\n $this->_helper->flashMessenger('Profile Updated');\n $this->_helper->redirector('index');\n }\n $this->view->form = $form;\n }",
"public function newAction() {\n $this->get('session')->getFlashBag()->clear();\n $entity = new Perfil();\n $form = $this->createForm(PerfilType::class, $entity);\n\n return $this->render('UsuarioBundle:Perfil:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }",
"public function edit()\n {\n return view('pages.editprofile');\n }",
"public function edit()\n {\n return view('/profile/edit');\n }",
"public function edit()\n {\n return view('profile.edit');\n }",
"public function edit()\n {\n return view('profile.edit');\n }"
]
| [
"0.782798",
"0.7491285",
"0.7452297",
"0.74431556",
"0.7436722",
"0.7402764",
"0.73588485",
"0.7286256",
"0.72851634",
"0.721166",
"0.7120933",
"0.7093856",
"0.70919305",
"0.702277",
"0.7012684",
"0.70020497",
"0.6995061",
"0.69900155",
"0.69880456",
"0.69611454",
"0.6951167",
"0.69393474",
"0.6931464",
"0.6918275",
"0.69180864",
"0.69096625",
"0.6886174",
"0.68821007",
"0.68693924",
"0.68693924"
]
| 0.801416 | 0 |
Add new Endpoint (PjSIP Endpoint) and its configuration | function addNewEndpoint() {
$sql
= "INSERT INTO $this->table (
id,
transport,
aors,
auth,
context,
use_avpf,
media_encryption,
dtls_ca_file,
dtls_cert_file,
dtls_verify,
dtls_setup,
ice_support,
outbound_auth,
force_rport,
rtp_symmetric,
media_use_received_transport,
media_address,
disallow,
allow,
direct_media,
rtcp_mux,
date_created
)
VALUES
(
'$this->id',
'$this->transport',
'$this->id',
'$this->id',
'$this->context',
'$this->use_avpf',
'$this->media_encryption',
'$this->dtls_ca_file',
'$this->dtls_cert_file',
'$this->dtls_verify',
'$this->dtls_setup',
'$this->ice_support',
'$this->outbound_auth',
'$this->force_rport',
'$this->rtp_symmetric',
'$this->media_use_received_transport',
'$this->media_address',
'$this->disallow',
'$this->allow',
'$this->direct_media',
'$this->rtcp_mux',
'$this->date'
);";
$sql_extensions = "INSERT INTO $this->table_ctn_extensions (id) VALUES ('$this->id') ";
// echo $sql . '<br>';
$this->doSql($sql);
$this->doSql($sql_extensions);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function setEndpoint($endpoint): void {\r\n $this->endpoint = $endpoint;\r\n }",
"public function setEndPoint($endpoint): self\n {\n $this->endpoint .= $endpoint;\n return $this;\n }",
"function processAddition()\n{\n\n\t$dataCorrect = true;\n\n\t$endpoint_schedule = (int)$_POST['endpoint-schedule'];\n\tif (!scheduleExists($endpoint_schedule))\n\t{\n\t\t$dataCorrect = false;\n\t\taddFurtherMessage(_('This schedule does not exist'));\n\t}\n\n\t$endpoint_name = trim($_POST['endpoint-name']);\n\tif (empty($endpoint_name) || mb_strlen($endpoint_name, 'UTF-8') > 64)\n\t{\n\t\t$dataCorrect = false;\n\t\taddFurtherMessage(_('Bad endpoint name'));\n\t}\n\n\t$endpoint_ip = trim($_POST['endpoint-ip']);\n\tif (preg_match('/^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$/', $endpoint_ip) !== 1)\n\t{\n\t\t$dataCorrect = false;\n\t\taddFurtherMessage(_('Bad endpoint IP address'));\n\t}\n\n\t$endpoint_mount = trim($_POST['endpoint-mount']);\n\tif (preg_match('/^[a-zA-Z0-9\\-\\_\\.]{1,15}$/', $endpoint_mount) !== 1)\n\t{\n\t\t$dataCorrect = false;\n\t\taddFurtherMessage(_('Bad mount point name'));\n\t}\n\n\t$endpoint_password = trim($_POST['endpoint-password']);\n\tif (empty($endpoint_password) || mb_strlen($endpoint_password, 'UTF-8') > 128)\n\t{\n\t\t$dataCorrect = false;\n\t\taddFurtherMessage(_('Password cannot be empty or longer than 128 symbols'));\n\t}\n\n\t$endpoint_port = (int)$_POST['endpoint-port'];\n\tif ($endpoint_port <= 0 || $endpoint_port > 65535)\n\t{\n\t\t$dataCorrect = false;\n\t\taddFurtherMessage(_('Bad inbound port'));\n\t}\n\n\tif ($dataCorrect)\n\t{\n\t\t$eid = addEndpoint($endpoint_name,\n\t\t\t\t\t$endpoint_ip,\n\t\t\t\t\t$endpoint_port,\n\t\t\t\t\t$endpoint_mount,\n\t\t\t\t\t$endpoint_password,\n\t\t\t\t\t$endpoint_schedule\n\t\t\t\t);\n\n\t\tsaveLiquidsoapScripts($eid);\n\t\taddDeferredCommand('cs_reloadEndpoints');\n\t}\n\n\theader ('HTTP/1.1 302 Added');\n\theader ('Location: /endpoints');\n\tdie();\n}",
"function drush_pm_signup_signup_endpoint_create($label, $name = NULL) {\n\n $endpoint = new DefaultSignupEndpoint();\n $endpoint->labelForExport($label, $name);\n $name = $endpoint->getName();\n\n $check = SignupEndpoint::loadByName($name);\n if ($check === FALSE) {\n $endpoint->save();\n drush_log(dt(\"Signup endpoint @name created\", array('@name' => $name)), 'ok');\n }\n else {\n drush_set_error(dt(\"Signup endpoint @name already exists\", array('@name' => $name)));\n }\n}",
"public function add_endpoints() {\n\t\tadd_rewrite_endpoint( self::$endpoint, EP_ROOT | EP_PAGES );\n\t\t//flush_rewrite_rules();\n\t}",
"public function setEndpoint($var)\n {\n GPBUtil::checkString($var, True);\n $this->endpoint = $var;\n\n return $this;\n }",
"public function setEndpoint($var)\n {\n GPBUtil::checkString($var, True);\n $this->endpoint = $var;\n\n return $this;\n }",
"public function endpoint(Endpoint $endpoint)\n {\n $this->endpoints[] = $endpoint;\n\n switch ($endpoint->getHttpMethod()) {\n\n case HttpMethods::GET:\n\n $this->get($endpoint->getPath(), $endpoint->getHandlerMethod(), $this->createRouteName($endpoint));\n break;\n\n case HttpMethods::POST:\n\n $this->post($endpoint->getPath(), $endpoint->getHandlerMethod(), $this->createRouteName($endpoint));\n break;\n\n case HttpMethods::PUT:\n\n $this->put($endpoint->getPath(), $endpoint->getHandlerMethod(), $this->createRouteName($endpoint));\n break;\n\n case HttpMethods::DELETE:\n\n $this->delete($endpoint->getPath(), $endpoint->getHandlerMethod(), $this->createRouteName($endpoint));\n break;\n }\n\n return $this;\n }",
"public function add_endpoint( $endpoint = '', $endpoint_type = EP_ROOT, $callback = array() ) {\n\t\tif ( ! isset( $this->endpoints[ $endpoint ] ) ) {\n\t\t\t$this->endpoints[ $endpoint ] = array(\n\t\t\t\t'type' => $endpoint_type,\n\t\t\t\t'callback' => $callback,\n\t\t\t);\n\t\t}\n\t\treturn $this;\n\t}",
"public function addEndpoints()\n {\n foreach ($this->endpoints as $endpoint) {\n add_rewrite_endpoint(pll__($endpoint), EP_ROOT | EP_PAGES);\n }\n }",
"public function setEndpoint(string $endpoint) {\n if (!empty($endpoint)) {\n $this->endpoint = $endpoint;\n }\n }",
"function submit( \\EndpointLocation $endpoint, \\User $user, array $propArr, $preventOverwrite) {\n// $newValues = getSerPropDataFromWeb();\n// $serviceID = $newValues['SERVICEPROPERTIES']['SERVICE'];\n// if($newValues['SERVICEPROPERTIES']['NAME'] == null || $newValues['SERVICEPROPERTIES']['VALUE'] == null){\n// show_view('error.php', \"A property name and value must be provided.\");\n// die();\n// }\n $serv = \\Factory::getServiceService();\n $sp = $serv->addEndpointProperties($endpoint, $user, $propArr, $preventOverwrite);\n\n $params['propArr'] = $propArr;\n $params['endpoint'] = $endpoint;\n\n show_view(\"service/added_endpoint_properties.php\", $params);\n}",
"function add_endpoint_trigger( $vars ) {\n\t\t$vars[] = 'pt_endpoint';\n\t\t$vars[] = 'ptgetinfo';\n\t\treturn $vars;\n\n\t}",
"public function add_endpoints() {\n\t\tadd_rewrite_endpoint( $this->endpoint, EP_ROOT | EP_PAGES );\n\t}",
"function add_endpoint_properties() {\n $dn = Get_User_Principle();\n $user = \\Factory::getUserService()->getUserByPrinciple($dn);\n\n //Check the portal is not in read only mode, returns exception if it is and user is not an admin\n checkPortalIsNotReadOnlyOrUserIsAdmin($user);\n\n\n\n\n if($_POST) { \t// If we receive a POST request it's for new properties\n\n //COMMENT\n $preventOverwrite = true;\n\n //Get the parent service we want to add properties to.\n //I'm trying to use \"parent\" rather than \"service\" wherever possible to make this code more generic.\n $endpoint = \\Factory::getServiceService()->getEndpoint($_REQUEST['PARENT']);\n //this is a little awkward, as we have to handle 3 cases here. Submitting a single property,\n //submitting a .property text file/block, or submitting the parsed and confirmed properties.\n\n //Figure out where the request has come from and format the inputs accordingly.\n //throw new \\Exception(var_dump($_REQUEST));\n\n //if the request is for a multi property input, parse the file and generate the array of properties\n //this will go to confirm()\n if(isset($_REQUEST['PROPERTIES'])) {\n $propertyArray = parse_properties($_REQUEST['PROPERTIES']);\n //throw new \\Exception(var_dump($propertyArray));\n }\n //if the request is from the multi property confirmation page\n //reconstruct the indexed array of kvps\n //this will go to submit()\n elseif (isset($_REQUEST['selectedProps'])){\n $propertyArray = array();\n foreach ($_REQUEST['selectedProps'] as $i=>$propKey){\n $propertyArray[] = array($propKey, $_REQUEST['selectedPropsVal'][$i]);\n }\n }\n //if the request is for a single property, skip the confirmation view and submit the request directly\n //this will go to submit()\n elseif (isset($_REQUEST['KEYPAIRNAME']) && isset($_REQUEST['KEYPAIRVALUE'])) {\n $propertyArray = array(\n array(\n $_REQUEST['KEYPAIRNAME'], $_REQUEST['KEYPAIRVALUE']\n )\n );\n //will go straight to submit()\n $_REQUEST['UserConfirmed'] = \"true\";\n //since the user is only adding a single property, warn them if it already exists\n $preventOverwrite = true;\n } else {\n //you really shouldn't end up here unless you are mangling your post requests\n throw new Exception(\"Properties could not be parsed\");\n }\n\n if(isset($_REQUEST['PREVENTOVERWRITE'])){\n $preventOverwrite = false;\n }\n\n //quick sanity check, are we actually adding any properties?\n if(empty($propertyArray)){\n show_view('error.php', \"At least one property name and value must be provided.\");\n die();\n }\n\n //Now we have our $propertyArray, either send it to the confirmation page or actually submit the props\n if(isset($_REQUEST['UserConfirmed'])) {\n submit($endpoint, $user, $propertyArray, $preventOverwrite);\n }\n else {\n confirm($propertyArray, $endpoint, $user);\n }\n } else { \t\t\t// If there is no post data, draw the new properties form\n draw($user);\n }\n}",
"public function endpointCreate($id) {\n\n $user = Auth::user();\n $timeline = $user->timeline;\n $userWallet = $timeline->wallet()->first();\n $userWalletPayId = $userWallet->pay_id;\n\n $application = Application::where('id', $id)\n ->where('user_id', $user->id)\n ->first();\n\n if ( ! $application ) {\n return response()->json([\n 'status' => '500',\n 'message' => 'WRONG_PARAMS',\n ]);\n }\n\n $value_site = $this->request->get('site');\n $value_redirect = $this->request->get('redirect');\n\n if ( ! $value_site ) {\n return response()->json([\n 'status' => '500',\n 'message' => 'SITE_IS_REQUIRED',\n ]);\n }\n\n $value_domain = $value_site;\n\n if ( ! $value_domain ) {\n return response()->json([\n 'status' => '500',\n 'message' => 'ERROR_IN_DOMAIN',\n ]);\n }\n\n\n if ($value_redirect) {\n\n }\n\n $endpoints = ApplicationEndpoint::where('app_id', $application->id)->get();\n if (count($endpoints) >= 5) {\n return response()->json([\n 'status' => '500',\n 'message' => 'ENDPOINT_LIMIT_REACHED',\n ]);\n }\n\n $endpoint = new ApplicationEndpoint();\n $endpoint->app_id = $application->id;\n $endpoint->name = bin2hex(random_bytes(10));\n $endpoint->domain = $value_domain;\n $endpoint->url = $value_site;\n $endpoint->redirect = $value_redirect;\n\n $endpoint->save();\n\n return response()->json([\n 'status' => '200',\n 'message' => 'created',\n 'data' => array(\n 'name' => $endpoint->name,\n 'site' => $endpoint->url,\n 'redirect' => $endpoint->redirect\n )\n ]);\n }",
"public function setEndpoint($endpoint) {\r\n\t\t$this->endpoint = $endpoint;\r\n\t\treturn $this;\r\n\t}",
"public function setEndpoint(array $endpoint): void\n {\n if (!array_key_exists('url', $endpoint) || !array_key_exists('region', $endpoint)) {\n throw new RuntimeException('$endpoint must contain `url` and `region` keys');\n }\n\n $this->endpoint = $endpoint;\n $this->auth->setEndpoint($endpoint);\n }",
"public function setEndpoint($url);",
"public function setEndpoint($endpoint = '')\n {\n $endpoint = 'tickets/' . $endpoint;\n\n parent::setEndpoint($endpoint);\n }",
"public function setEndpoint($endpoint)\n {\n $this->endpoint = $endpoint;\n return $this;\n }",
"public function sc_add_endpoints() {\n\n\t\t\tif ( $this->is_wc_gte_26() ) {\n\t\t\t\tadd_rewrite_endpoint( WC_SC_Display_Coupons::$endpoint, EP_ROOT | EP_PAGES );\n\t\t\t\t$this->sc_check_if_flushed_rules();\n\t\t\t}\n\n\t\t}",
"private function loadEndpoints() {\n $this->endpoints = array(\n '2020-08-06' => array(\n 'base_api_endpoint' => 'https://cloudapi.inflowinventory.com/',\n 'categories' => $this->companyID . '/categories/'\n )\n );\n }",
"protected function register_rewrite_endpoints() {\n\t\tif ( ! empty( $this->endpoints ) ) {\n\t\t\tforeach ( $this->endpoints as $slug => $arr ) {\n\t\t\t\tadd_rewrite_endpoint( $slug, $arr['type'] );\n\t\t\t}\n\t\t}\n\t}",
"function setEndpoint($description = null);",
"private function endPointInfo () \n {\n \n $array = array(\n \"endpoints\" => array(\n \"endpoint\" => array(\n \"endp\" => \"new\",\n \"act\" => \"init\",\n \"url\" => \"api.php?endp=new&act=init\",\n \"response_fields\" => array(\n \"message_id\",\n \"source_id\",\n \"poller\",\n \"time\",\n \"type\",\n \"status\",\n \"service\",\n \"alert_id\",\n \"host\",\n \"ip\",\n \"uid\",\n \"gid\",\n \"flg_stat\"\n )\n )\n )\n );\n \n \n header('Content-Type: application/json');\n echo json_encode($array);\n }",
"public function setEndpoint($endpoint)\n {\n $this->endpoint = $endpoint;\n\n return $this;\n }",
"public static function register(EndpointNameSpace $namespace, $method, self $endpoint) {\n\t\tself::$namespaces[$namespace->getSlug()] = $namespace;\n\t\tself::$endpoints_by_method[$namespace->getSlug()][$method][$endpoint->getSlug()] = $endpoint;\n\t\tself::$endpoints_by_slug[$namespace->getSlug()][$endpoint->getSlug()][$method] = $endpoint;\n\t}",
"function addNewDIDEndpoint() {\n\n $sql\n = \"INSERT INTO $this->table (\n id,\n transport,\n aors,\n context,\n dtls_ca_file,\n dtls_cert_file,\n dtls_verify,\n dtls_setup,\n outbound_auth,\n disallow,\n allow,\n direct_media,\n date_created\n )\n VALUES \n (\n '$this->id',\n '$this->transport',\n '$this->id',\n '$this->context',\n '$this->dtls_ca_file',\n '$this->dtls_cert_file',\n '$this->dtls_verify',\n '$this->dtls_setup',\n '$this->outbound_auth',\n '$this->disallow',\n '$this->allow',\n '$this->direct_media',\n '$this->date'\n );\";\n\n $setDID = (strpos($this->id, '+') === false) ? \"+$this->id\" : $this->id;\n\n $sql_did = \"INSERT INTO $this->table_ctn_did (id_endpoint, did, status) VALUES ('$this->id', '$setDID', 0)\";\n\n // echo $sql . '<br>';\n $this->doSql($sql);\n $this->doSql($sql_did);\n }",
"function generateEndpoint($endpoint, $agnostic_deploy_url) {\n// $endpoint['auth_type'], $endpoint['server_url'], $agnostic_deploy_url, $endpoint['name'], $endpoint['api_version']\n// $type, $authentication_method, $url, $deploy_url, $name, $api_version\n\t$endpoint_js = '\"' . $endpoint['name'] . '\": new Endpoint({';\n\n\tif ($endpoint['authentication_method'] == 'oauth1' || $endpoint['authentication_method'] == 'oauth2') {\n\t\t$endpoint_js .= '\"authType\": \"oauth\",';\n\t} else {\n\t\t$endpoint_js .= '\"authType\": \"basic\",';\n\t}\n\t\n\tif ($endpoint['api_version'] != \"\") {\n\t\t$endpoint_js .= '\"apiVersion\": \"' . $endpoint['api_version'] . '\",' . \"\\n\";\n\t}\n\t\n// \t$endpoint_js .= '\"platform\": \"' . $endpoint['server_type'] . '\",';\n\t$endpoint_js .= '\"platform\": \"connections\",' . \"\\n\";\n\t\n\tif ($endpoint['authentication_method'] == 'oauth1') {\n\t\t$endpoint_js .= '\"authenticator\": new OAuth({\"loginUi\": null,\n\t\t\t\t\"url\": \"' . $agnostic_deploy_url . '\"}),';\n\t} else if ($endpoint['authentication_method'] == 'basic') {\n\t\t$endpoint_js .= '\"authenticator\": new Basic({';\n\t\t$endpoint_js .= '\"url\": \"' . $agnostic_deploy_url . '\", \"actionUrl\": \"' . plugins_url(PLUGIN_NAME) . '/core/index.php?classpath=services&class=Proxy&method=route&endpointName=' . $endpoint['name'] . '&basicAuthRequest=true&_redirectUrl=' . getCurrentPage() . '\"}),';\n\t}\n// \t$endpoint_js .= '\"proxyPath\": \"connections\",';\n\t$endpoint_js .= '\"proxyPath\": \"\",' . \"\\n\";\n// \t$endpoint_js .= '\"proxyPath\": \"' . $type . '\",';\n// \tif ($endpoint['server_type'] == 'smartcloud') {\n// \t\t$endpoint_js .= '\"isSmartCloud\": true,';\n// \t}\n\t$endpoint_js .= '\"isAuthenticated\": \"false\",' . \"\\n\";\n\t$endpoint_js .= '\"transport\": new Transport({}),' . \"\\n\";\n\t$endpoint_js .= '\"serviceMappings\": {},' . \"\\n\";\n\t$endpoint_js .= '\"name\": \"' . $endpoint['name'] . '\",' . \"\\n\";\n\t\n\tif ($type == 'smartcloud') {\n\t\t$endpoint_js .= '\"authenticationErrorCode\": \"403\",' . \"\\n\";\n\t} else {\n\t\t$endpoint_js .= '\"authenticationErrorCode\": \"401\",' . \"\\n\";\n\t}\n\t$endpoint_js .= '\"baseUrl\": \"' . $endpoint['url'] . '\",' . \"\\n\";\n\n\t$endpoint_js .=\t'\"proxy\": new Proxy({' . \"\\n\";\n\t$endpoint_js .=\t'\"proxyUrl\": \"' . plugins_url(PLUGIN_NAME) . '/core/index.php?classpath=services&endpointName=' . $endpoint['name'] . '&class=Proxy&method=route&_redirectUrl=\"})}),';\n\n\treturn $endpoint_js;\n}"
]
| [
"0.6048906",
"0.59958667",
"0.5965083",
"0.59391725",
"0.5923971",
"0.5902114",
"0.5902114",
"0.58900595",
"0.5798003",
"0.5787253",
"0.5743309",
"0.5675196",
"0.56693876",
"0.56576073",
"0.56292415",
"0.5613681",
"0.5611268",
"0.55757433",
"0.55425256",
"0.55333066",
"0.5513977",
"0.54728925",
"0.5416597",
"0.54043776",
"0.54025674",
"0.5366575",
"0.53660655",
"0.535131",
"0.53415346",
"0.53063756"
]
| 0.6767754 | 0 |
Add new DID Endpoint (PjSIP Endpoint) and its configuration | function addNewDIDEndpoint() {
$sql
= "INSERT INTO $this->table (
id,
transport,
aors,
context,
dtls_ca_file,
dtls_cert_file,
dtls_verify,
dtls_setup,
outbound_auth,
disallow,
allow,
direct_media,
date_created
)
VALUES
(
'$this->id',
'$this->transport',
'$this->id',
'$this->context',
'$this->dtls_ca_file',
'$this->dtls_cert_file',
'$this->dtls_verify',
'$this->dtls_setup',
'$this->outbound_auth',
'$this->disallow',
'$this->allow',
'$this->direct_media',
'$this->date'
);";
$setDID = (strpos($this->id, '+') === false) ? "+$this->id" : $this->id;
$sql_did = "INSERT INTO $this->table_ctn_did (id_endpoint, did, status) VALUES ('$this->id', '$setDID', 0)";
// echo $sql . '<br>';
$this->doSql($sql);
$this->doSql($sql_did);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function addNewEndpoint() {\n\n $sql\n = \"INSERT INTO $this->table (\n id,\n transport,\n aors,\n auth,\n context,\n use_avpf,\n media_encryption,\n dtls_ca_file,\n dtls_cert_file,\n dtls_verify,\n dtls_setup,\n ice_support,\n outbound_auth,\n force_rport,\n rtp_symmetric,\n media_use_received_transport,\n media_address,\n disallow,\n allow,\n direct_media,\n rtcp_mux,\n date_created\n )\n VALUES \n (\n '$this->id',\n '$this->transport',\n '$this->id',\n '$this->id',\n '$this->context',\n '$this->use_avpf',\n '$this->media_encryption',\n '$this->dtls_ca_file',\n '$this->dtls_cert_file',\n '$this->dtls_verify',\n '$this->dtls_setup',\n '$this->ice_support',\n '$this->outbound_auth',\n '$this->force_rport',\n '$this->rtp_symmetric',\n '$this->media_use_received_transport',\n '$this->media_address',\n '$this->disallow',\n '$this->allow',\n '$this->direct_media',\n '$this->rtcp_mux',\n '$this->date'\n );\";\n\n $sql_extensions = \"INSERT INTO $this->table_ctn_extensions (id) VALUES ('$this->id') \";\n\n// echo $sql . '<br>';\n $this->doSql($sql);\n $this->doSql($sql_extensions);\n }",
"function drush_pm_signup_signup_endpoint_create($label, $name = NULL) {\n\n $endpoint = new DefaultSignupEndpoint();\n $endpoint->labelForExport($label, $name);\n $name = $endpoint->getName();\n\n $check = SignupEndpoint::loadByName($name);\n if ($check === FALSE) {\n $endpoint->save();\n drush_log(dt(\"Signup endpoint @name created\", array('@name' => $name)), 'ok');\n }\n else {\n drush_set_error(dt(\"Signup endpoint @name already exists\", array('@name' => $name)));\n }\n}",
"private function setEndpoint($endpoint): void {\r\n $this->endpoint = $endpoint;\r\n }",
"public function endpointCreate($id) {\n\n $user = Auth::user();\n $timeline = $user->timeline;\n $userWallet = $timeline->wallet()->first();\n $userWalletPayId = $userWallet->pay_id;\n\n $application = Application::where('id', $id)\n ->where('user_id', $user->id)\n ->first();\n\n if ( ! $application ) {\n return response()->json([\n 'status' => '500',\n 'message' => 'WRONG_PARAMS',\n ]);\n }\n\n $value_site = $this->request->get('site');\n $value_redirect = $this->request->get('redirect');\n\n if ( ! $value_site ) {\n return response()->json([\n 'status' => '500',\n 'message' => 'SITE_IS_REQUIRED',\n ]);\n }\n\n $value_domain = $value_site;\n\n if ( ! $value_domain ) {\n return response()->json([\n 'status' => '500',\n 'message' => 'ERROR_IN_DOMAIN',\n ]);\n }\n\n\n if ($value_redirect) {\n\n }\n\n $endpoints = ApplicationEndpoint::where('app_id', $application->id)->get();\n if (count($endpoints) >= 5) {\n return response()->json([\n 'status' => '500',\n 'message' => 'ENDPOINT_LIMIT_REACHED',\n ]);\n }\n\n $endpoint = new ApplicationEndpoint();\n $endpoint->app_id = $application->id;\n $endpoint->name = bin2hex(random_bytes(10));\n $endpoint->domain = $value_domain;\n $endpoint->url = $value_site;\n $endpoint->redirect = $value_redirect;\n\n $endpoint->save();\n\n return response()->json([\n 'status' => '200',\n 'message' => 'created',\n 'data' => array(\n 'name' => $endpoint->name,\n 'site' => $endpoint->url,\n 'redirect' => $endpoint->redirect\n )\n ]);\n }",
"function processAddition()\n{\n\n\t$dataCorrect = true;\n\n\t$endpoint_schedule = (int)$_POST['endpoint-schedule'];\n\tif (!scheduleExists($endpoint_schedule))\n\t{\n\t\t$dataCorrect = false;\n\t\taddFurtherMessage(_('This schedule does not exist'));\n\t}\n\n\t$endpoint_name = trim($_POST['endpoint-name']);\n\tif (empty($endpoint_name) || mb_strlen($endpoint_name, 'UTF-8') > 64)\n\t{\n\t\t$dataCorrect = false;\n\t\taddFurtherMessage(_('Bad endpoint name'));\n\t}\n\n\t$endpoint_ip = trim($_POST['endpoint-ip']);\n\tif (preg_match('/^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$/', $endpoint_ip) !== 1)\n\t{\n\t\t$dataCorrect = false;\n\t\taddFurtherMessage(_('Bad endpoint IP address'));\n\t}\n\n\t$endpoint_mount = trim($_POST['endpoint-mount']);\n\tif (preg_match('/^[a-zA-Z0-9\\-\\_\\.]{1,15}$/', $endpoint_mount) !== 1)\n\t{\n\t\t$dataCorrect = false;\n\t\taddFurtherMessage(_('Bad mount point name'));\n\t}\n\n\t$endpoint_password = trim($_POST['endpoint-password']);\n\tif (empty($endpoint_password) || mb_strlen($endpoint_password, 'UTF-8') > 128)\n\t{\n\t\t$dataCorrect = false;\n\t\taddFurtherMessage(_('Password cannot be empty or longer than 128 symbols'));\n\t}\n\n\t$endpoint_port = (int)$_POST['endpoint-port'];\n\tif ($endpoint_port <= 0 || $endpoint_port > 65535)\n\t{\n\t\t$dataCorrect = false;\n\t\taddFurtherMessage(_('Bad inbound port'));\n\t}\n\n\tif ($dataCorrect)\n\t{\n\t\t$eid = addEndpoint($endpoint_name,\n\t\t\t\t\t$endpoint_ip,\n\t\t\t\t\t$endpoint_port,\n\t\t\t\t\t$endpoint_mount,\n\t\t\t\t\t$endpoint_password,\n\t\t\t\t\t$endpoint_schedule\n\t\t\t\t);\n\n\t\tsaveLiquidsoapScripts($eid);\n\t\taddDeferredCommand('cs_reloadEndpoints');\n\t}\n\n\theader ('HTTP/1.1 302 Added');\n\theader ('Location: /endpoints');\n\tdie();\n}",
"public function setEndPoint($endpoint): self\n {\n $this->endpoint .= $endpoint;\n return $this;\n }",
"public function setEndpoint($var)\n {\n GPBUtil::checkString($var, True);\n $this->endpoint = $var;\n\n return $this;\n }",
"public function setEndpoint($var)\n {\n GPBUtil::checkString($var, True);\n $this->endpoint = $var;\n\n return $this;\n }",
"public function endpoint(Endpoint $endpoint)\n {\n $this->endpoints[] = $endpoint;\n\n switch ($endpoint->getHttpMethod()) {\n\n case HttpMethods::GET:\n\n $this->get($endpoint->getPath(), $endpoint->getHandlerMethod(), $this->createRouteName($endpoint));\n break;\n\n case HttpMethods::POST:\n\n $this->post($endpoint->getPath(), $endpoint->getHandlerMethod(), $this->createRouteName($endpoint));\n break;\n\n case HttpMethods::PUT:\n\n $this->put($endpoint->getPath(), $endpoint->getHandlerMethod(), $this->createRouteName($endpoint));\n break;\n\n case HttpMethods::DELETE:\n\n $this->delete($endpoint->getPath(), $endpoint->getHandlerMethod(), $this->createRouteName($endpoint));\n break;\n }\n\n return $this;\n }",
"function add_endpoint_properties() {\n $dn = Get_User_Principle();\n $user = \\Factory::getUserService()->getUserByPrinciple($dn);\n\n //Check the portal is not in read only mode, returns exception if it is and user is not an admin\n checkPortalIsNotReadOnlyOrUserIsAdmin($user);\n\n\n\n\n if($_POST) { \t// If we receive a POST request it's for new properties\n\n //COMMENT\n $preventOverwrite = true;\n\n //Get the parent service we want to add properties to.\n //I'm trying to use \"parent\" rather than \"service\" wherever possible to make this code more generic.\n $endpoint = \\Factory::getServiceService()->getEndpoint($_REQUEST['PARENT']);\n //this is a little awkward, as we have to handle 3 cases here. Submitting a single property,\n //submitting a .property text file/block, or submitting the parsed and confirmed properties.\n\n //Figure out where the request has come from and format the inputs accordingly.\n //throw new \\Exception(var_dump($_REQUEST));\n\n //if the request is for a multi property input, parse the file and generate the array of properties\n //this will go to confirm()\n if(isset($_REQUEST['PROPERTIES'])) {\n $propertyArray = parse_properties($_REQUEST['PROPERTIES']);\n //throw new \\Exception(var_dump($propertyArray));\n }\n //if the request is from the multi property confirmation page\n //reconstruct the indexed array of kvps\n //this will go to submit()\n elseif (isset($_REQUEST['selectedProps'])){\n $propertyArray = array();\n foreach ($_REQUEST['selectedProps'] as $i=>$propKey){\n $propertyArray[] = array($propKey, $_REQUEST['selectedPropsVal'][$i]);\n }\n }\n //if the request is for a single property, skip the confirmation view and submit the request directly\n //this will go to submit()\n elseif (isset($_REQUEST['KEYPAIRNAME']) && isset($_REQUEST['KEYPAIRVALUE'])) {\n $propertyArray = array(\n array(\n $_REQUEST['KEYPAIRNAME'], $_REQUEST['KEYPAIRVALUE']\n )\n );\n //will go straight to submit()\n $_REQUEST['UserConfirmed'] = \"true\";\n //since the user is only adding a single property, warn them if it already exists\n $preventOverwrite = true;\n } else {\n //you really shouldn't end up here unless you are mangling your post requests\n throw new Exception(\"Properties could not be parsed\");\n }\n\n if(isset($_REQUEST['PREVENTOVERWRITE'])){\n $preventOverwrite = false;\n }\n\n //quick sanity check, are we actually adding any properties?\n if(empty($propertyArray)){\n show_view('error.php', \"At least one property name and value must be provided.\");\n die();\n }\n\n //Now we have our $propertyArray, either send it to the confirmation page or actually submit the props\n if(isset($_REQUEST['UserConfirmed'])) {\n submit($endpoint, $user, $propertyArray, $preventOverwrite);\n }\n else {\n confirm($propertyArray, $endpoint, $user);\n }\n } else { \t\t\t// If there is no post data, draw the new properties form\n draw($user);\n }\n}",
"function submit( \\EndpointLocation $endpoint, \\User $user, array $propArr, $preventOverwrite) {\n// $newValues = getSerPropDataFromWeb();\n// $serviceID = $newValues['SERVICEPROPERTIES']['SERVICE'];\n// if($newValues['SERVICEPROPERTIES']['NAME'] == null || $newValues['SERVICEPROPERTIES']['VALUE'] == null){\n// show_view('error.php', \"A property name and value must be provided.\");\n// die();\n// }\n $serv = \\Factory::getServiceService();\n $sp = $serv->addEndpointProperties($endpoint, $user, $propArr, $preventOverwrite);\n\n $params['propArr'] = $propArr;\n $params['endpoint'] = $endpoint;\n\n show_view(\"service/added_endpoint_properties.php\", $params);\n}",
"function add_endpoint_trigger( $vars ) {\n\t\t$vars[] = 'pt_endpoint';\n\t\t$vars[] = 'ptgetinfo';\n\t\treturn $vars;\n\n\t}",
"public function setEndpoint(string $endpoint) {\n if (!empty($endpoint)) {\n $this->endpoint = $endpoint;\n }\n }",
"public function add_endpoint( $endpoint = '', $endpoint_type = EP_ROOT, $callback = array() ) {\n\t\tif ( ! isset( $this->endpoints[ $endpoint ] ) ) {\n\t\t\t$this->endpoints[ $endpoint ] = array(\n\t\t\t\t'type' => $endpoint_type,\n\t\t\t\t'callback' => $callback,\n\t\t\t);\n\t\t}\n\t\treturn $this;\n\t}",
"public function setEndpoint(array $endpoint): void\n {\n if (!array_key_exists('url', $endpoint) || !array_key_exists('region', $endpoint)) {\n throw new RuntimeException('$endpoint must contain `url` and `region` keys');\n }\n\n $this->endpoint = $endpoint;\n $this->auth->setEndpoint($endpoint);\n }",
"public function setEndpoint($endpoint) {\r\n\t\t$this->endpoint = $endpoint;\r\n\t\treturn $this;\r\n\t}",
"public function setEndpoint($endpoint = '')\n {\n $endpoint = 'tickets/' . $endpoint;\n\n parent::setEndpoint($endpoint);\n }",
"public function setEndpoint($endpoint)\n {\n $this->endpoint = $endpoint;\n return $this;\n }",
"private function updateEndpointExtensionPropertiesPost ($endpoint, $extensionPropKVArray) {\n #Post requests will fail if the property with that value already exists or the property limit has been reached\n #TODO:This will return the wrong error code if something else goes wrong\n try {\n $this->serviceService->addEndpointPropertiesAPI($endpoint, $extensionPropKVArray, true, $this->userIdentifierType, $this->userIdentifier);\n } catch(\\Exception $e) {\n $this->exceptionWithResponseCode(409, $e->getMessage());\n }\n }",
"public function CreateEndpoint(\\Google\\Cloud\\Ids\\V1\\CreateEndpointRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.ids.v1.IDS/CreateEndpoint',\n $argument,\n ['\\Google\\LongRunning\\Operation', 'decode'],\n $metadata, $options);\n }",
"public function add_endpoints() {\n\t\tadd_rewrite_endpoint( self::$endpoint, EP_ROOT | EP_PAGES );\n\t\t//flush_rewrite_rules();\n\t}",
"public function addDps(){\n \n // Vérifier que les informations envoyées par le formulaire sont correctes\n $validationAttributes = $this->validate();\n\n\n DemandeDps::create($validationAttributes[\"newDps\"]);\n\n $this->newDps=[];\n $this->dispatchBrowserEvent(\"showSuccessMessage\",[\"message\"=>\"Dps cree avec succés!\"]);\n }",
"public function setEndpoint($endpoint)\n {\n $this->endpoint = $endpoint;\n\n return $this;\n }",
"public static function register(EndpointNameSpace $namespace, $method, self $endpoint) {\n\t\tself::$namespaces[$namespace->getSlug()] = $namespace;\n\t\tself::$endpoints_by_method[$namespace->getSlug()][$method][$endpoint->getSlug()] = $endpoint;\n\t\tself::$endpoints_by_slug[$namespace->getSlug()][$endpoint->getSlug()][$method] = $endpoint;\n\t}",
"public function endPointInvalidInstance()\n {\n $config = new stubSoapClientConfiguration(new stdClass(), 'urn:foo');\n }",
"public function insert(): self\n {\n /** @var self $data */\n $data = $this;\n\n if(!$this->validate(\"post\", $missing))\n {\n throw new \\Exception(\"[MVQN\\REST\\Endpoints\\Endpoint] Annotations for the '\".get_class($this).\"' class require valid values be set \".\n \"on all of the following properties before attempting an insert():\\n> \".implode(\"\\n> \", $missing).\"\\n\");\n }\n\n /** @var self $endpoint */\n $endpoint = self::post($data);\n return $endpoint;\n }",
"function setEndpoint($description = null);",
"public function setEndpoint(Endpoint $endpoint)\n {\n $this->repository($endpoint);\n\n return $this;\n }",
"public function addEndpoints()\n {\n foreach ($this->endpoints as $endpoint) {\n add_rewrite_endpoint(pll__($endpoint), EP_ROOT | EP_PAGES);\n }\n }",
"public static function get_endpoint($id) {\n return new endpoint($id);\n }"
]
| [
"0.6671735",
"0.56919837",
"0.56461567",
"0.5527685",
"0.5523189",
"0.55213225",
"0.548775",
"0.548775",
"0.54315096",
"0.52542317",
"0.5238219",
"0.522786",
"0.52208567",
"0.51515716",
"0.5143248",
"0.5117222",
"0.5090628",
"0.50615823",
"0.5051509",
"0.50009984",
"0.49671373",
"0.49459854",
"0.49425355",
"0.4903904",
"0.48246863",
"0.4806299",
"0.48044094",
"0.4755662",
"0.4742536",
"0.47352257"
]
| 0.6561428 | 1 |
Add new Trunk (PjSIP Endpoint) and its configuration | function addNewTrunk() {
$sql
= "INSERT INTO $this->table (
id,
transport,
aors,
context,
dtls_ca_file,
dtls_cert_file,
dtls_verify,
dtls_setup,
outbound_auth,
disallow,
allow,
direct_media,
date_created
)
VALUES
(
'$this->id',
'$this->transport',
'$this->id',
'$this->context',
'$this->dtls_ca_file',
'$this->dtls_cert_file',
'$this->dtls_verify',
'$this->dtls_setup',
'$this->outbound_auth',
'$this->disallow',
'$this->allow',
'$this->direct_media',
'$this->date'
);";
$setDID = (strpos($this->id, '+') === false) ? "+$this->id" : $this->id;
$sql_trunk = "INSERT INTO ctn_trunks (id_endpoint, name, status) VALUES ('$this->id', '$this->name', 0)";
// echo $sql . '<br>';
$this->doSql($sql);
$this->doSql($sql_trunk);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function addNewEndpoint() {\n\n $sql\n = \"INSERT INTO $this->table (\n id,\n transport,\n aors,\n auth,\n context,\n use_avpf,\n media_encryption,\n dtls_ca_file,\n dtls_cert_file,\n dtls_verify,\n dtls_setup,\n ice_support,\n outbound_auth,\n force_rport,\n rtp_symmetric,\n media_use_received_transport,\n media_address,\n disallow,\n allow,\n direct_media,\n rtcp_mux,\n date_created\n )\n VALUES \n (\n '$this->id',\n '$this->transport',\n '$this->id',\n '$this->id',\n '$this->context',\n '$this->use_avpf',\n '$this->media_encryption',\n '$this->dtls_ca_file',\n '$this->dtls_cert_file',\n '$this->dtls_verify',\n '$this->dtls_setup',\n '$this->ice_support',\n '$this->outbound_auth',\n '$this->force_rport',\n '$this->rtp_symmetric',\n '$this->media_use_received_transport',\n '$this->media_address',\n '$this->disallow',\n '$this->allow',\n '$this->direct_media',\n '$this->rtcp_mux',\n '$this->date'\n );\";\n\n $sql_extensions = \"INSERT INTO $this->table_ctn_extensions (id) VALUES ('$this->id') \";\n\n// echo $sql . '<br>';\n $this->doSql($sql);\n $this->doSql($sql_extensions);\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}",
"function addNewDIDEndpoint() {\n\n $sql\n = \"INSERT INTO $this->table (\n id,\n transport,\n aors,\n context,\n dtls_ca_file,\n dtls_cert_file,\n dtls_verify,\n dtls_setup,\n outbound_auth,\n disallow,\n allow,\n direct_media,\n date_created\n )\n VALUES \n (\n '$this->id',\n '$this->transport',\n '$this->id',\n '$this->context',\n '$this->dtls_ca_file',\n '$this->dtls_cert_file',\n '$this->dtls_verify',\n '$this->dtls_setup',\n '$this->outbound_auth',\n '$this->disallow',\n '$this->allow',\n '$this->direct_media',\n '$this->date'\n );\";\n\n $setDID = (strpos($this->id, '+') === false) ? \"+$this->id\" : $this->id;\n\n $sql_did = \"INSERT INTO $this->table_ctn_did (id_endpoint, did, status) VALUES ('$this->id', '$setDID', 0)\";\n\n // echo $sql . '<br>';\n $this->doSql($sql);\n $this->doSql($sql_did);\n }",
"function addPOSEntry()\n{\n\n}",
"function add_endpoint_trigger( $vars ) {\n\t\t$vars[] = 'pt_endpoint';\n\t\t$vars[] = 'ptgetinfo';\n\t\treturn $vars;\n\n\t}",
"function ciniki_artcatalog_trackingAdd(&$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 'artcatalog_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Artcatalog Item'), \n 'name'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Name'), \n 'external_number'=>array('required'=>'no', 'blank'=>'yes', 'default'=>'', 'name'=>'Number'), \n 'start_date'=>array('required'=>'no', 'blank'=>'yes', 'default'=>'', 'type'=>'date', 'name'=>'Start'), \n 'end_date'=>array('required'=>'no', 'blank'=>'yes', 'default'=>'', 'type'=>'date', 'name'=>'End'), \n 'notes'=>array('required'=>'no', 'blank'=>'yes', 'default'=>'', 'name'=>'Notes'), \n )); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n $args = $rc['args'];\n\n if( $args['artcatalog_id'] == '0' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.artcatalog.39', 'msg'=>'No artcatalog item specified'));\n }\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', 'artcatalog', 'private', 'checkAccess');\n $rc = ciniki_artcatalog_checkAccess($ciniki, $args['tnid'], 'ciniki.artcatalog.trackingAdd'); \n if( $rc['stat'] != 'ok' ) { \n return $rc;\n } \n\n if( isset($args['name']) ) {\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'makePermalink');\n $args['permalink'] = ciniki_core_makePermalink($ciniki, $args['name'] . '-' . ($args['start_date']==''?'0000-00-00':$args['start_date']));\n }\n\n //\n // Update tracking\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectAdd');\n return ciniki_core_objectAdd($ciniki, $args['tnid'], 'ciniki.artcatalog.place', $args);\n}",
"function processAddition()\n{\n\n\t$dataCorrect = true;\n\n\t$endpoint_schedule = (int)$_POST['endpoint-schedule'];\n\tif (!scheduleExists($endpoint_schedule))\n\t{\n\t\t$dataCorrect = false;\n\t\taddFurtherMessage(_('This schedule does not exist'));\n\t}\n\n\t$endpoint_name = trim($_POST['endpoint-name']);\n\tif (empty($endpoint_name) || mb_strlen($endpoint_name, 'UTF-8') > 64)\n\t{\n\t\t$dataCorrect = false;\n\t\taddFurtherMessage(_('Bad endpoint name'));\n\t}\n\n\t$endpoint_ip = trim($_POST['endpoint-ip']);\n\tif (preg_match('/^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}$/', $endpoint_ip) !== 1)\n\t{\n\t\t$dataCorrect = false;\n\t\taddFurtherMessage(_('Bad endpoint IP address'));\n\t}\n\n\t$endpoint_mount = trim($_POST['endpoint-mount']);\n\tif (preg_match('/^[a-zA-Z0-9\\-\\_\\.]{1,15}$/', $endpoint_mount) !== 1)\n\t{\n\t\t$dataCorrect = false;\n\t\taddFurtherMessage(_('Bad mount point name'));\n\t}\n\n\t$endpoint_password = trim($_POST['endpoint-password']);\n\tif (empty($endpoint_password) || mb_strlen($endpoint_password, 'UTF-8') > 128)\n\t{\n\t\t$dataCorrect = false;\n\t\taddFurtherMessage(_('Password cannot be empty or longer than 128 symbols'));\n\t}\n\n\t$endpoint_port = (int)$_POST['endpoint-port'];\n\tif ($endpoint_port <= 0 || $endpoint_port > 65535)\n\t{\n\t\t$dataCorrect = false;\n\t\taddFurtherMessage(_('Bad inbound port'));\n\t}\n\n\tif ($dataCorrect)\n\t{\n\t\t$eid = addEndpoint($endpoint_name,\n\t\t\t\t\t$endpoint_ip,\n\t\t\t\t\t$endpoint_port,\n\t\t\t\t\t$endpoint_mount,\n\t\t\t\t\t$endpoint_password,\n\t\t\t\t\t$endpoint_schedule\n\t\t\t\t);\n\n\t\tsaveLiquidsoapScripts($eid);\n\t\taddDeferredCommand('cs_reloadEndpoints');\n\t}\n\n\theader ('HTTP/1.1 302 Added');\n\theader ('Location: /endpoints');\n\tdie();\n}",
"public function test_add_new_talkpoint_to_non_existent_activity() {\n $client = new Client($this->_app);\n $client->request('GET', '/999/add');\n }",
"function add($name,$endpoint){\n \n // create row in workspace table.\n $data = array(\n 'name' => strtolower($name),\n 'endpoint' => $endpoint,\n );\n $this->team->db->insert('workspaces', $data);\n \n include_once(\"public/arc2/ARC2.php\");\n\n // Config mysql\n $config_Mysql = array(\n // db \n 'db_host' => $this->team->db->hostname, // default: localhost\n 'db_name' => $this->team->db->database,\n 'db_user' => $this->team->db->username,\n 'db_pwd' => $this->team->db->password,\n // store \n 'store_name' => $name,\n );\n\n $store_Mysql = ARC2::getStore($config_Mysql);\n \n /* create MySQL tables \n *\n * _g2t\n * _id2val\n * _o2val\n * _s2val\n * _setting\n * _triple\n */\n $store_Mysql->setUp(); \n \n //echo \"END FUNCTION add(name,endpoint) Workspaces_model.php<br />\";\n }",
"public function setup_hotspot($param){\n $input = array(\n 'command' => '/ip/hotspot/add',\n ''\n );\n $out = array_merge($input, $param);\n return $this->query($out);\n }",
"public function addNewShippingRow(){\n\t\t$map_id = $this->Generic_model->general_fetch_array_return_row('map_attributes_values', array('attribute_id'=>$this->input->post('newRowAttr'), 'value'=>$this->input->post('newRowValue')))->map_id;\n\t\t$details = array(\n\t\t\t'pid' => $this->uri->segment(4),\n\t\t\t'map_id' => $map_id,\n\t\t\t'cost' => $this->input->post('costRowNew')\n\t\t);\n\t\t$response = $this->Generic_model->general_insert('stock_master', $details);\n\t\tif($response){\n\t\t\t$this->session->set_flashdata('success', 'Product Updated successfully with new variant.');\n\t\t}else{\n\t\t\t$this->session->set_flashdata('failure', 'Oops!! Something went wrong. Try again...');\n\t\t}\n\t\tredirect('admin/product/editProduct/'.$this->uri->segment(4));\n\t}",
"function insert() {\n $centinela = new Centinela();\n $flag = $centinela->accessTo('conf/conf_viazul_routes');\n if ($flag) {\n $result = $this->conn->insert();\n die($result);\n } else {\n $this->redirectError();\n }\n }",
"function add_trackers_federated($params)\n {\n $this->db->insert('trackers_federated',$params);\n return $this->db->insert_id();\n }",
"public function test_add_new_talkpoint_route() {\n global $CFG, $DB;\n list(, , $talkpoint) = $this->_setup_single_user_in_single_talkpoint();\n\n // request the page\n $client = new Client($this->_app);\n $crawler = $client->request('GET', '/' . $talkpoint->id . '/add');\n $this->assertTrue($client->getResponse()->isOk());\n\n // spit a dummy file\n file_put_contents('/tmp/mod_talkpoint_web_test.txt', 'dummy contents');\n\n // create a dummy file\n $uploadedfile = new Symfony\\Component\\HttpFoundation\\File\\UploadedFile(\n '/tmp/mod_talkpoint_web_test.txt',\n 'mod_talkpoint_web_test.txt',\n 'text/plain'\n );\n\n // post some data\n $form = $crawler->selectButton(get_string('savechanges'))->form();\n $client->submit($form, array(\n 'form[title]' => 'Title 001',\n 'form[uploadedfile]' => $uploadedfile,\n 'form[mediatype]' => 'file',\n ));\n\n $created = $DB->get_record('talkpoint_talkpoint', array('instanceid' => $talkpoint->id));\n $url = $CFG->wwwroot . SLUG . $this->_app['url_generator']->generate('talkpoint', array(\n 'id' => $created->id,\n ));\n $this->assertTrue($client->getResponse()->isRedirect($url));\n\n // ensure the new file exists in the expected location\n $this->assertStringEqualsFile($CFG->dataroot . '/into/mod_talkpoint/' . $talkpoint->id . '/' . $created->id . '/mod_talkpoint_web_test.txt', 'dummy contents');\n }",
"function time4vps_ClientAreaChangePTR($params, $details)\n{\n $error = null;\n $ips = [];\n\n if (!empty($_POST['ip']) && !empty($_POST['ptr'])) {\n $error = time4vps_ChangePTR($params, $_POST['ip'], $_POST['ptr']);\n if ($error === 'success') {\n time4vps_MarkServerDetailsObsolete($params);\n time4vps_Redirect(time4vps_ActionLink($params, 'ChangePTR'));\n }\n }\n\n try {\n time4vps_InitAPI($params);\n $server = time4vps_ExtractServer($params);\n $ips = $server->additionalIPs();\n $ips = array_shift($ips);\n } catch (Exception $e) {\n $error = $e->getMessage();\n }\n\n return [\n 'tabOverviewReplacementTemplate' => 'templates/clientarea/pages/changeptr.tpl',\n 'templateVariables' => [\n 'details' => $details,\n 'error' => $error,\n 'ips' => $ips\n ]\n ];\n}",
"public function push_point_info() {\n\t\t$this->_check_access(); //拒绝非法IP执行任务\n\t\t$this->_write_log(__FUNCTION__);\n\t\t$this->load->model('soma/sales_point_model', 'sp_model');\n\t\t$res = $this->sp_model->push_point_info();\n\t\techo $res ? 'SUCCESS' : 'Failed';\n\t}",
"public function addNewClient() {\n\t\t$this->Db->query(\"INSERT INTO `yp_sessions` (`hash`, `last_time`) \n\t\t\tVALUES ('{$this->_thisClientHash()}', '{$this->Request->time}');\");\n\n\t\t\n\t}",
"public function hookNewOrder($params)\r\n {\r\n $carrier = new Carrier((int) $params['order']->id_carrier);\r\n $result = TipsaAdminComun::getTipsaCarriers(\"`id_reference` = \" . (int) $carrier->id_reference);\r\n\r\n if (!$result) {\r\n return false;\r\n }\r\n\r\n $tipo_servicio = $result['code'];\r\n\r\n $office = Db::getInstance()->getRow(\r\n \"SELECT * FROM `\" . _DB_PREFIX_ . \"tipsa_address`\r\n WHERE `id_cart` = \" . (int) $params['cart']->id . \" AND `id_carrier` = \" . (int) $params['order']->id_carrier\r\n );\r\n try {\r\n if ($tipo_servicio == $this->service_codes_yupick) {\r\n if ($office) {\r\n // get current customer address\r\n $address = new Address($params['order']->id_address_delivery);\r\n // Create a new address with the point location\r\n $address_point = new Address();\r\n //loop through address fields in case the shop has added custom or required fields\r\n foreach ($address as $name => $value) {\r\n if (!is_array($value) && !in_array($name, array('date_upd', 'date_add', 'id', 'country'))) {\r\n switch ($name) {\r\n case 'id_customer':\r\n $address_point->id_customer = $params['order']->id_customer;\r\n break;\r\n case 'address1':\r\n $address_point->address1 = $office['address'];\r\n break;\r\n case 'address2':\r\n $address_point->address2 = $office['firstname'];\r\n break;\r\n case 'postcode':\r\n $address_point->postcode = $office['postcode'];\r\n break;\r\n case 'city':\r\n $address_point->city = $office['city'];\r\n break;\r\n case 'alias':\r\n $address_point->alias = $office['alias'];\r\n break;\r\n case 'phone_mobile':\r\n if (!empty($office['phone_mobile'])) {\r\n $address_point->phone_mobile = $office['phone_mobile'];\r\n } else {\r\n $address_point->phone_mobile = \"0\";\r\n }\r\n break;\r\n case 'phone':\r\n $address_point->phone = $office['phone'] != '' ? $office['phone'] : \"0\";\r\n break;\r\n case 'deleted':\r\n $address_point->deleted = true;\r\n break;\r\n default:\r\n $address_point->$name = $value;\r\n }\r\n }\r\n }\r\n\r\n $address_point->save();\r\n if ($address_point->id) {\r\n $order = $params['order'];\r\n $order->id_address_delivery = $address_point->id;\r\n $order->update();\r\n }\r\n }\r\n }\r\n Db::getInstance()->update(\r\n 'tipsa_address',\r\n array('state' => 1, 'id_order' => (int) $params['order']->id),\r\n \"`state` = 0 AND `id_cart` = \" . (int) $params['cart']->id . \" AND `id_carrier` = \" . (int) $params['order']->id_carrier\r\n );\r\n } catch (Exception $e) {\r\n //In case of error, just do the most important\r\n return $e->message();\r\n }\r\n\r\n //Delete old quotes. Need to be in Days because Paypal or card payment validation can last some time\r\n Db::getInstance()->Execute(\r\n \"DELETE FROM \" . _DB_PREFIX_ . \"tipsa_address\r\n WHERE date < DATE_SUB(NOW(), INTERVAL 7 DAY) AND state = 0\"\r\n );\r\n }",
"public function add($param)\n {\n $sentence = new SentenceUtil();\n $sentence->addCommand('/ip/hotspot/add');\n foreach ($param as $name => $value) {\n $sentence->setAttribute($name, $value);\n }\n $this->talker->send($sentence);\n\n return 'Sucsess';\n }",
"public function Create() {\n parent::Create();\n\n\t\t\t$this->RegisterPropertyString(\"Password\", \"\");\n\n\t\t\t$this->RegisterPropertyString(\n\t\t\t\t'RadioStations', '[{\"position\":1,\"station\":\"NDR2 Niedersachsen\",\"station_url\":\"http://172.27.2.205:9981/stream/channel/800c150e9a6b16078a4a3b3b5aee0672\"},\n\t\t\t\t{\"position\":2,\"station\":\"MDR Jump\",\"station_url\":\"http://172.27.2.205:9981/stream/channel/0888328132708be0905731457bba8ae0\"},\n\t\t\t\t{\"position\":3,\"station\":\"Inselradio Mallorca\",\"station_url\":\"http://172.27.2.205:9981/stream/channel/14f799071150331b9a7994ca8c61f8c7\"}]'\n );\n\n $this->RegisterPropertyBoolean(\"HideVolume\",false);\n $this->RegisterPropertyBoolean(\"HideTitle\",false);\n $this->RegisterPropertyBoolean(\"HideTimeElapsed\",false);\n\n\t\t\t$this->RegisterTimer(\"KeepAliveTimer\", 1000, 'MPDP_KeepAlive($_IPS[\\'TARGET\\']);');\n\t\t}",
"public function add_configuration() {\n\t\tENDA_Woocommerce_Bundle_Shipping::display_configuration_layer();\n\t\texit();\n\t}",
"public function add()\n\t{\n\t\tEvent::add('ushahidi_filter.map_base_layers', array($this, '_add_layer'));\n\t\tif (Router::$controller != 'settings')\n\t\t{\n\t\t\tEvent::add('ushahidi_filter.map_layers_js', array($this, '_add_map_layers_js'));\n\t\t}\n\t}",
"public static function construirLocalPeticion()\r\n {\r\n $url = SessionController::extraerVariable(\"protocolo_api\") . \"://\" . SessionController::extraerVariable(\"host_api\");\r\n SessionController::guardarVariable(\"url_api\", $url);\r\n }",
"protected function add() {\n\t}",
"public function addAction() {\r\n\t\t$channel_id = intval($this->getInput('channel_id'));\r\n\t\t$this->assign('ad_types', $this->ad_types[$channel_id]);\r\n\t\t$this->assign('channel_id', $channel_id);\r\n\t\t$ad_type = $this->getInput('ad_type');\r\n\t\t$this->assign('ad_type', $ad_type);\r\n\t\t\r\n\t\tif($channel_id == 2 || $channel_id == 6) {\r\n\t\t list(, $ptypes) = Type_Service_Ptype::getsBy(array('status'=>1,'pid'=>0), array('sort'=>'DESC', 'id'=>'DESC'));\r\n\t\t $this->assign('ptype', $ptypes);\r\n\t\t}\r\n\t\t\r\n\t\tif($channel_id == 2) {\r\n\t\t $this->assign('actions', $this->client_actions);\r\n\t\t}\r\n\t\t\r\n\t\t//module channel\r\n\t\tlist($modules, $channel_names) = Gou_Service_ChannelModule::getsModuleChannel();\r\n\t\t$this->assign('modules', $modules);\r\n\t\t$this->assign('channel_names', $channel_names);\r\n\t}",
"public function p_newentry($trip_id) {\n if (empty($_POST['title'])) {\n Router::redirect(\"/trips/newentry/blank\");\n }\n \n $here = Geolocate::locate();\n $_POST['state'] = $here['state'];\n $_POST['city'] = $here['city'];\n $_POST['ip'] = $here['ip'];\n\n # Associate this trip with this user\n $_POST['user_id'] = $this->user->user_id;\n\n # Unix timestamp of when this trip was created / modified\n $_POST['created'] = Time::now();\n $_POST['modified'] = Time::now();\n\n $_POST['pic_id'] = \"\";\n $_POST['trip_id'] = $trip_id;\n $_POST['vid'] = \"\";\n $_POST['comment_id'] = \"\";\n\n DB::instance(DB_NAME)->insert(\"entries\", $_POST);\n\n Router::redirect(\"/trips/dashboard/\".$trip_id);\n }",
"public function addAction() {\n $configid = $this->getInput('id');\n $customAnimationEffect = Common::getConfig('deliveryConfig','customAnimationEffect');\n if($configid){\n \t$configInfo = Advertiser_Service_AdAppkeyConfigModel::getConfig($configid);\n \t$this->assign('config', $configInfo);\n }\n \t$this->assign('customAnimationEffect', $customAnimationEffect);\n }",
"public function addAt() {\n\t\t$at = json_decode(Flight::request()->query['at'],true);\n\t\t$date = date('H:i Y-m-d', $at['d']);\n\t\tswitch ($at['t']) {\n\t\t\tcase 'on': exec('at '.$date.' -q A -f /srv/www/home.fr/public/conf/aton.txt'); break;\n\t\t\tcase 'off': exec('at '.$date.' -q B -f /srv/www/home.fr/public/conf/atoff.txt'); break;\n\t\t\tcase 'tts': exec('at '.$date.' -q C -f /srv/www/home.fr/public/conf/attts.txt'); break;\n\t\t}\n\t\tFlight::json(array('Status' => 'OK','At' => $date, 'Type' => $at['t']));\n\t}",
"public static function addPanier() {\n //Si le produit n'existe pas\n if (!isset($_GET['id'])) {\n self::error();\n } else {\n $idProduit = $_GET['id'];\n //Si le panier est vide\n if (!isset($_SESSION['panier'])) {\n $stockProduit = 1;\n $_SESSION['panier'] = array('produit' . $idProduit => array('id' => $idProduit,\n 'stock' => $stockProduit),);\n } else {\n //Si le produit n'est pas deja present dans le panier\n if (!isset($_SESSION[\"panier\"][\"produit\" . $idProduit])) {\n $stockProduit = 1;\n $_SESSION[\"panier\"]['produit' . $idProduit] = array('id' => $idProduit,\n 'stock' => $stockProduit);\n } else {\n $_SESSION[\"panier\"][\"produit\" . $idProduit][\"stock\"] ++;\n }\n }\n }\n self::readPanier();\n }",
"public function p_add() {\n if (empty($_POST['title'])) {\n Router::redirect(\"/trips/new/missing\");\n }\n\n # Associate this trip with this user\n $_POST['user_id'] = $this->user->user_id;\n\n # Unix timestamp of when this trip was created / modified\n $_POST['created'] = Time::now();\n $_POST['modified'] = Time::now();\n\n $_POST['coverimg'] = \"fpo.jpg\";\n\n # Insert\n DB::instance(DB_NAME)->insert(\"trips\", $_POST);\n\n Router::redirect(\"/trips/index\");\n\n }"
]
| [
"0.598732",
"0.5393407",
"0.51709944",
"0.47963387",
"0.47838068",
"0.47777405",
"0.47478628",
"0.471056",
"0.46936607",
"0.46363983",
"0.45483202",
"0.45038366",
"0.44919908",
"0.44898278",
"0.44874975",
"0.44798538",
"0.44700283",
"0.44699684",
"0.44683516",
"0.4444366",
"0.44416815",
"0.44374686",
"0.44234347",
"0.44144788",
"0.44040778",
"0.43914723",
"0.43905383",
"0.4381632",
"0.43706575",
"0.43588778"
]
| 0.67534024 | 0 |
/$sql = "SELECT trunk.id_trunk AS trunk_id, trunk.name AS trunk_name, dids.did_number AS did_number, dids.id_did AS id_did FROM ctn_dids dids INNER JOIN ctn_trunks trunk ON dids.id_trunk = trunk.id_trunk"; | function getAllDIDEndpoints() {
$sql = "SELECT
trunk.id_trunk AS trunk_id,
trunk.name AS trunk_name,
dids.did_number AS did_number,
dids.id_did AS id_did,
users.user_id,
CONCAT(users.first_name, ' ', users.last_name) AS user_name
FROM
ctn_dids_temp3 dids
INNER JOIN ctn_trunks trunk ON dids.id_trunk = trunk.id_trunk
INNER JOIN ctn_users_ctn_dids users_to_dids ON dids.id_did = users_to_dids.id_did
INNER JOIN ctn_users users ON users.user_id = users_to_dids.user_id";
return $this->doQueryArray($sql);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getDIDInfo($did_id) {\n\n $sql = \"SELECT\n trunk.id_trunk AS trunk_id,\n trunk.name AS trunk_name,\n dids.id_did AS id_did,\n dids.did_number AS did_number\n FROM\n ctn_dids_temp3 dids\n INNER JOIN ctn_trunks trunk ON dids.id_trunk = trunk.id_trunk\n WHERE dids.did_number = '$did_id';\";\n $result = $this->doQueryArray($sql);\n\n return $result;\n }",
"function listQueryBaru() {\n\t\t\t$sql = \"select r.* from \".self::table('v_kelas3new').\" r join gate.ms_unit u on r.kodeunit = u.kodeunit\";\n\t\t\t\n\t\t\treturn $sql;\n\t\t}",
"public function cpJoin() {\n $sql=\"select packages.packageName, prices.id, prices.price, products.productName, products.cid, prices.productID, prices.areaID, prices.packageID \"\n . \"from prices\"\n . \" inner join packages on packages.packageID=prices.packageID\"\n . \" inner join products on prices.productID=products.productID where products.cid='9'\";\n $sth=$this->dbh->prepare($sql);\n \n $sth->execute();\n $result = $sth->fetchAll(PDO::FETCH_ASSOC);\n return $result;\n}",
"function queryOther($conn, $currentid, $currenttable, $currentfield){\n\t\t\t$otherquery = \"SELECT $currentfield FROM $currenttable WHERE id='$currentid'\";\n\t\t\t$result = $conn->query($otherquery);\n\t\t\techo \"Selected $currenttable: \";\n\t\t\tif ($result->num_rows > 0) {\n\t\t\t\twhile($row = $result->fetch_assoc()){\n\t\t\t\t\techo $row[\"$currentfield\"] . \" \";\n\t\t\t\t}\n\t\t\t}\n\t\t\techo \"</br>\";\n\t\t}",
"function trainer_view_sql()\n\t{\n\t\t$view_trainer=mysqli_query($this->con,\"SELECT trainer.*,categories.c_name FROM trainer,categories where trainer.c_id=categories.c_id and trainer.status=1 order by trainer.t_id desc\");\n\t\treturn $view_trainer\t;\n\t}",
"static function getLoadQry()\n {\n return \"SELECT `smartukm_band`.*, \n `td`.`td_demand`,\n `td`.`td_konferansier`\n \";\n }",
"function query_dcc()\n {\n // JOIN `mltest`.`dcc_residues`\n // ON nt_id = `mltest`.`dcc_residues`.`dcc_residues_id`\n // WHERE `ml_loop_positions`.release_id = '0.5'\n // ORDER BY loop_id ASC\n\n // SELECT LOOP_id,`mltest`.`dcc_residues`.*,loops_all.nt_ids,ml_loops.`motif_id` FROM `ml_loop_positions`\n // JOIN `mltest`.`dcc_residues`\n // JOIN loops_all\n // LEFT JOIN ml_loops\n // ON nt_id = `mltest`.`dcc_residues`.`dcc_residues_id` AND loop_info.loop_id=loop_id AND ml_loops.ml_loopsid=LOOP_id\n // WHERE `ml_loop_positions`.release_id = '0.5' AND ml_loops.ml_release_id='0.5'\n // ORDER BY loop_id ASC;\n\n $this->db->select()\n ->from('ml_loop_positions')\n ->join('__dcc_residues','nt_id = __dcc_residues.dcc_residues_id')\n ->join('loop_info','loop_id=loop_info.loop_id')\n ->join('ml_loops AS ML','loop_id=ML.loop_id','left')\n ->where('ml_loop_positions.release_id','0.5')\n ->where('ML.ml_release_id','0.5')\n ->group_by('loop_id') // NB! comment out or leave in?\n ->order_by('ML.motif_id','asc')\n ->order_by('loop_id','asc');\n// ->limit(10);\n $query = $this->db->get();\n\n return $query;\n }",
"private static function selectAndJoins()\n {\n $sql = \"SELECT * FROM \" . dbPerformance::DBNAME;\n\n $sql .= \" INNER JOIN \" . dbCompetition::DBNAME . \" ON \" . dbPerformance::DBNAME . \".\" . dbPerformance::COMPETITOINID . \" = \" . dbCompetition::DBNAME . \".\" . dbCompetition::ID;\n $sql .= \" INNER JOIN \" . dbDisziplin::DBNAME . \" ON \" . dbPerformance::DBNAME . \".\" . dbPerformance::DISZIPLINID . \" = \" . dbDisziplin::DBNAME . \".\" . dbDisziplin::ID;\n $sql .= \" INNER JOIN \" . dbAthletes::DBNAME . \" ON \" . dbPerformance::DBNAME . \".\" . dbPerformance::ATHLETEID . \" = \" . dbAthletes::DBNAME . \".\" . dbAthletes::ID;\n $sql .= \" LEFT JOIN \" . dbPerformanceDetail::DBNAME . \" ON \" . dbPerformance::DBNAME . \".\" . dbPerformance::ID . \" = \" . dbPerformanceDetail::DBNAME . \".\" . dbPerformanceDetail::PERFORMANCEID;\n\n $sql .= \" INNER JOIN \" . dbCompetitionLocations::DBNAME . \" ON \" . dbCompetition::DBNAME . \".\" . dbCompetition::LOCATIONID . \" = \" . dbCompetitionLocations::DBNAME . \".\" . dbCompetitionLocations::ID;\n $sql .= \" INNER JOIN \" . dbCompetitionNames::DBNAME . \" ON \" . dbCompetition::DBNAME . \".\" . dbCompetition::NAMEID . \" = \" . dbCompetitionNames::DBNAME . \".\" . dbCompetitionNames::ID;\n return $sql;\n }",
"function enquery_view_sql()\n\t{\n\t\t$view_enquery=mysqli_query($this->con,\"SELECT enquery.*,categories.c_name FROM enquery,categories where enquery.c_id=categories.c_id order by enquery.id desc\");\n\t\treturn $view_enquery;\n\t}",
"function selectwarehouse1($id){\n $query = $this->link->query(\"select distinct W.casualworker as id, concat(CW.names,' ',CW.lname) as cname\n from warehouse W\n join casualworkers CW on CW.casualworkersid = W.casualworker\n where W.regyear = '$id' \");\n $result = $query->fetchAll();\n return $result;\n }",
"function selectwarehouse($id){\n $query = $this->link->query(\"select concat(CW.names,' ',CW.lname) as cname, DATE_FORMAT(W.date,'%D %M %Y') as datee, W.bag, W.chalim, W.cg7, W.othervarieties, W.gradeouts, W.shell\n from warehouse W\n join casualworkers CW on CW.casualworkersid = W.casualworker\n where W.regyear = '$id' \");\n $result = $query->fetchAll();\n return $result;\n }",
"function getAllPatients()\n{\n //get all Patients\n $db = createDBconnection();\n $sql = \"SELECT patients.patient_id, patients.patient_name , clients.client_firstname, clients.client_lastname, species.species_description, patients.patient_gender, patients.patient_status\n FROM ((patients\n INNER JOIN clients ON patients.client_id = clients.client_id)\n INNER JOIN species ON patients.species_id = species.species_id)\n ORDER BY patients.patient_name ASC\";\n $result = $db->query($sql);\n\n return $result;\n}",
"public function selectvillagemaster()\n\t{\n\t\t$result = mysql_query(\"SELECT * FROM villagemaster LEFT JOIN mandalmaster ON villagemaster.mandalid=mandalmaster.mandalid\") or die(mysql_error());\n\t\treturn $result;\n\t}",
"function portfolio_view_sql()\n\t{\n\t\t$view_port=mysqli_query($this->con,\"SELECT portfolio.*,categories.c_name FROM portfolio,categories where portfolio.c_id=categories.c_id order by portfolio.p_id desc\");\n\t\treturn $view_port;\n\t}",
"function getDetalle($db,$idpedido) {\n $idpedido = mysqli_real_escape_string($db, $idpedido);\n //Trae el detalle de un pedido\n $query = \"SELECT c.idproducto, c.cantidad, c.precio, c.subtotal, p.nombre, p.foto \n FROM carrito c INNER JOIN productos p ON c.idproducto = p.id WHERE c.idpedido = \".$idpedido;\n //echo $query;\n\n return mysqli_query($db, $query);\n}",
"function getDataTable($table_name, $id = false, $debug = FALSE)\n{\n $table_from = get_sql_from($table_name);\n $table_fields = get_sql_fields($table_name);\n $where_id = \"\";\n if ($id) {\n $table_key_fieldName = getPKFieldName($table_name);\n $where_id = \"AND `$table_name`.`$table_key_fieldName`='$id'\";\n }\n\n $sql = \"SELECT {$table_fields} FROM {$table_from} \" . $where_id;\n if ($debug) {\n echo Notification::placeholder();\n echo Notification::show(array(\n 'message' => $sql,\n 'class' => 'warning',\n 'dismiss_seconds' => 0\n ));\n echo ob_get_clean();\n exit;\n }\n $res = sql($sql, $eo);\n return db_fetch_assoc($res);\n}",
"function get_water_pumped_history($order_id){\r\n $configs = include('config/config.php');\r\n $query = \"SELECT * FROM \" . $vogomo_pump_water_history_table . \" WHERE oid='\" . $order_id . \"' AND action='water_pumped'\";\r\n //echo $query;\r\n $result = $configs->query($query);\r\n return $result;\r\n}",
"function get_sql_select_torrents($torrents_ids,$orderby) {\n\tif (is_array($torrents_ids)) $torrents_ids = join(',',$torrents_ids);\n\treturn \"SELECT torrents.id, torrents.category, torrents.leechers, torrents.seeders, torrents.name, torrents.times_completed, torrents.size, torrents.added, torrents.comments,torrents.numfiles,torrents.filename,torrents.owner,torrents.team,\n\t \t\t\tcategories.name AS cat_name, categories.image AS cat_pic, users.username, teams.name AS teamName, teams.initials AS teamInitials, torrents.moder_status\n\t \t\t\tFROM torrents\n\t \t\t\tLEFT JOIN categories ON category = categories.id\n\t \t\t\tLEFT JOIN users ON torrents.owner = users.id\n\t \t\t\tLEFT JOIN teams ON (torrents.team > 0 AND torrents.team = teams.id)\n\t \t\t\tWHERE torrents.id IN ($torrents_ids) $orderby\";\n}",
"function get_p2hp_dn($dalnis) {\n return $this->db->select('*')\n ->from('tb_p2hp')\n //->join('tb_pka', 'tb_pka.id_pka = tb_p2hp.id_pka')\n ->join('tb_penugasan', 'tb_penugasan.id_tugas = tb_p2hp.fk_tgs')\n ->join('tb_tim', 'tb_tim.id_tim = tb_penugasan.id_tim')\n ->where('dalnis', $dalnis)\n //->order_by('id_p2hp', 'desc')\n ->get()->result();\n }",
"function breadCrumb($idLT) {\n $qr=\"\n SELECT TenTL, Ten \n FROM theloai,loaitin \n WHERE theloai.idTL = loaitin.idTL \n AND idLT = $idLT\n \";\n $connection = mysqli_connect('localhost','root','','khoaphamtraining');\n return mysqli_query($connection,$qr);\n \n}",
"public function listProductsPack($params)\n{\n // $prdId = $this->db->real_escape_string($params);\n // $qry = \"SELECT pr.prd_id, pr.prd_sku, pr.prd_name, pr.prd_price, pk.prd_parent \n // FROM ctt_products_packages AS pk\n // INNER JOIN ctt_products AS pr ON pr.prd_id = pk.prd_id\n // WHERE pk.prd_parent = $prdId AND prd_status =1;\";\n // return $this->db->query($qry);\n}",
"function sql_inner_join_statement(string $table_name, string $coloum_name, int $count)\n {\n $sql = \" FROM \" . $table_name . \" AS T1 \";\n for($i = 1; $i < $count; $i++){\n\n $t_index = $i + 1;\n $t_name = \"T$t_index\";\n \n $sql .= \"INNER JOIN $table_name AS $t_name USING ( \" . $coloum_name . \" ) \";\n }\n return $sql;\n }",
"function getUuid($db, $tabledefuuid, $id){\r\n\r\n $querystatement = \"\r\n SELECT\r\n `maintable`\r\n FROM\r\n `tabledefs`\r\n WHERE\r\n `uuid` = '\".$tabledefuuid.\"'\";\r\n\r\n $queryresult = $db->query($querystatement);\r\n\r\n $tablerecord = $db->fetchArray($queryresult);\r\n\r\n $querystatement = \"\r\n SELECT\r\n `uuid`\r\n FROM\r\n `\".$tablerecord[\"maintable\"].\"`\r\n WHERE\r\n `id` = \".((int) $id);\r\n\r\n $queryresult = $db->query($querystatement);\r\n\r\n if($db->numRows($queryresult))\r\n $therecord = $db->fetchArray($queryresult);\r\n else\r\n $therecord[\"uuid\"] = \"\";\r\n\r\n return $therecord[\"uuid\"];\r\n\r\n}",
"function dropbox_assignments()\n{\n global $class_id;\n /*/\n * SELECT *\n * FROM dropbox_assignments\n * WHERE class_id = $class_id\n /*/\n return good_query_table(\"SELECT * FROM dropbox_assignments WHERE class_id = $class_id\");\n}",
"function get_team_info($team_id) {\n global $db;\n $query = 'SELECT t.team_id\n , t.name\n , t.nickname\n , t.logo_file_name\n , l.name as league\n , l.abbr as league_abbr\n , s.name as sub_league_name\n , s.abbr as sub_league_abbr\n , d.name as div_name\n FROM teams t INNER JOIN leagues l ON t.league_id = l.league_id\n INNER JOIN sub_leagues s ON t.league_id = s.league_id AND t.sub_league_id = s.sub_league_id\n INNER JOIN divisions d ON t.league_id = d.league_id AND t.sub_league_id = d.sub_league_id\n AND t.division_id = d.division_id\n WHERE t.team_id = :team_id';\n $statement = $db->prepare($query);\n $statement->bindValue('team_id', $team_id);\n $statement->execute();\n $team_info = $statement->fetch();\n $statement->closeCursor();\n return $team_info;\n}",
"public function query(){\n // $this->db->select('idk,id_kain,nm_kain')\n $this->db->select('*')\n ->from($this->table);\n }",
"function getAllClientsAndSpecies()\n{\n $db = createDBconnection();\n $sql = \"SELECT * FROM clients ORDER BY client_lastname ASC\";\n $sql2 = \"SELECT * FROM species ORDER BY species_description ASC\";\n\n $result = array(\"clients\" => $db->query($sql), \"species\" => $db->query($sql2));\n\n\n return $result;\n}",
"private function joins()\r\n {\r\n /* SELECT* FROM DOCUMENT WHERE DOCUMENT.\"id\" IN ( SELECT ID FROM scholar WHERE user_company_id = 40 )*/\r\n\r\n $query = EyufScholar::find()\r\n ->select('id')\r\n ->where([\r\n 'user_company_id' => 40\r\n ])\r\n ->sql();\r\n\r\n $table = EyufDocument::find()\r\n ->where('\"id\" IN ' . $query)\r\n ->all();\r\n\r\n $second = EyufDocument::findAll(EyufScholar::find()\r\n ->select('id')\r\n ->where([\r\n 'user_company_id' => 40\r\n ])\r\n );\r\n\r\n vdd($second);\r\n }",
"public function getSystems()\r\n{\r\n $query_string = \"SELECT systemid, systemname \";\r\n $query_string .= \"FROM voting_system\";\r\n\r\n return $query_string;\r\n}",
"function detial_view_sql($c_id)\n\t{\n\t\t$view_detial=mysqli_query($this->con,\"select * from categories where c_id='$c_id' and status=1\");\n\t\treturn $view_detial;\n\t}"
]
| [
"0.600875",
"0.56606317",
"0.56321836",
"0.5589955",
"0.5589296",
"0.556478",
"0.5554434",
"0.55500907",
"0.55212325",
"0.5513531",
"0.5498857",
"0.547302",
"0.54379356",
"0.54214454",
"0.54079235",
"0.5405083",
"0.536676",
"0.5362389",
"0.53478885",
"0.53376156",
"0.5335582",
"0.5327644",
"0.53070873",
"0.52682453",
"0.5252946",
"0.5238273",
"0.52256733",
"0.5218087",
"0.521801",
"0.52035224"
]
| 0.57609284 | 1 |
Gets the allowAutoFilter property value. Represents the worksheet protection option of allowing using auto filter feature. | public function getAllowAutoFilter(): ?bool {
$val = $this->getBackingStore()->get('allowAutoFilter');
if (is_null($val) || is_bool($val)) {
return $val;
}
throw new \UnexpectedValueException("Invalid type found in backing store for 'allowAutoFilter'");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAllow() {\r\n return $this->allow;\r\n }",
"public function getAllow() {\r\n\t\treturn $this -> allow;\r\n\t}",
"private function allowsFilter()\n {\n return config('dingoquerymapper.allowFilters');\n }",
"public function getAllowCheck()\n {\n return $this->allow_check;\n }",
"public function getEnableRestriction()\n {\n return $this->enable_restriction;\n }",
"public function getAllowed() {\n return $this->_allowed;\n }",
"public function getAllow(): string\n {\n return $this->allow;\n }",
"public function isAllow()\n {\n return $this->allow;\n }",
"public function getAllowSendToCustomer()\n {\n return $this->allow_send_to_customer;\n }",
"public function getAllowSpecific();",
"public function filterable()\n {\n return true;\n }",
"public function getOnboardingFilter() {\n\n return (bool) $this->onboarding_filter;\n\n }",
"public function allowedFilters()\n {\n return [];\n }",
"public function setAllowAutoFilter(?bool $value): void {\n $this->getBackingStore()->set('allowAutoFilter', $value);\n }",
"public function getIsAutoPayAllowableValues()\r\n {\r\n return [\r\n self::IS_AUTO_PAY_TRUE,\r\n self::IS_AUTO_PAY_FALSE,\r\n ];\r\n }",
"public function filters() {\n return array(\"accessControl\");\n }",
"public function getFilter()\n {\n return($this->options['filter']);\n }",
"public function getExplicitlyAllowAndDeny() {}",
"function was_filter_forced() {\r\n\r\n\t\treturn parent::$forced_filter;\r\n\r\n\t}",
"protected function getFilter()\n {\n return $this->getSettingsValue('filter');\n }",
"public function getAutoRecordingAllowableValues()\n {\n return [\n self::AUTO_RECORDING_LOCAL,\n self::AUTO_RECORDING_CLOUD,\n self::AUTO_RECORDING_NONE,\n ];\n }",
"public function getShowInFilter()\n\t{\n\t\treturn $this->showInFilter;\n\t}",
"public function getIsAutoRenewAllowableValues()\r\n {\r\n return [\r\n self::IS_AUTO_RENEW_TRUE,\r\n self::IS_AUTO_RENEW_FALSE,\r\n ];\r\n }",
"public function getAllowSendDirectToAdmin()\n {\n return $this->allow_send_direct_to_admin;\n }",
"public function filters(){\n\t\treturn array( 'accessControl' );\n\t}",
"public function get_filtering()\r\n\t{\r\n\t\treturn $this->filtering->get_value();\r\n\t}",
"public function is_filterable() {\n\t\treturn $this->is_listable() && isset( $this->data['filterable'] ) && $this->data['filterable'];\n\t}",
"public function getEnableWebAccess()\n {\n return $this->enable_web_access;\n }",
"public function getFilter()\n {\n return $this->filter;\n }",
"public function getFilter()\n {\n return $this->filter;\n }"
]
| [
"0.61272043",
"0.60965157",
"0.5914038",
"0.59002703",
"0.5846899",
"0.57689255",
"0.57403725",
"0.5655327",
"0.54079866",
"0.540525",
"0.53709793",
"0.53391176",
"0.53368443",
"0.52995765",
"0.5241893",
"0.5238444",
"0.52225894",
"0.5190153",
"0.51338255",
"0.5119785",
"0.51059157",
"0.51000714",
"0.5075327",
"0.5074156",
"0.50243264",
"0.50227606",
"0.5020951",
"0.50189006",
"0.50066894",
"0.50066894"
]
| 0.6105411 | 1 |
Gets the allowDeleteColumns property value. Represents the worksheet protection option of allowing deleting columns. | public function getAllowDeleteColumns(): ?bool {
$val = $this->getBackingStore()->get('allowDeleteColumns');
if (is_null($val) || is_bool($val)) {
return $val;
}
throw new \UnexpectedValueException("Invalid type found in backing store for 'allowDeleteColumns'");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAllowableColumns()\n\t{\n\t\treturn $this->_arrColumns;\n\t}",
"public function getAllowDelete($value=''){\t\t\n\t\treturn $this->allow_delete;\n\t}",
"public function setAllowDeleteColumns(?bool $value): void {\n $this->getBackingStore()->set('allowDeleteColumns', $value);\n }",
"public function can_delete () {\r\n\r\n return $this->permissions[\"D\"] ? true : false;\r\n\r\n }",
"public function getAllowDeletions() : bool\n {\n return $this->allowDeletions;\n }",
"public static function getReservedColumns() {\n return array('deleted');\n }",
"public function allowDeletion()\n {\n return $this->allowDeletion;\n }",
"public function getCanDeleteProperty()\n {\n return $this->deleteConfirm === $this->staff->email;\n }",
"public function isDeleteable()\n {\n return $this->_isDeleteable;\n }",
"function canDelete() {\n return true;\n }",
"public function getColumnIsDeleted(): ?string\n {\n return $this->getColumn('is_deleted', 'is_deleted');\n }",
"public function canDelete()\n {\n return 1;\n }",
"public function canDelete()\n {\n return in_array('delete', $this->actions);\n }",
"public function getAllowSendDirectToAdmin()\n {\n return $this->allow_send_direct_to_admin;\n }",
"public function getAllowInsertColumns(): ?bool {\n $val = $this->getBackingStore()->get('allowInsertColumns');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowInsertColumns'\");\n }",
"public function csv_cols() {\n\n\t\t$columns = isset( $this->data['give_give_donations_export_option'] ) ? $this->data['give_give_donations_export_option'] : array();\n\n\t\t// We need columns.\n\t\tif ( empty( $columns ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->cols = $this->get_cols( $columns );\n\n\t\treturn $this->cols;\n\t}",
"public function setAllowDeletions(bool $allowDeletions) : self\n {\n $this->initialized['allowDeletions'] = true;\n $this->allowDeletions = $allowDeletions;\n return $this;\n }",
"public function isDestructiveDelete()\n {\n // @todo (Pablo - 2019-04-15) - Phase out support for $this->destructiveDelete\n return $this->destructiveDelete ?? static::DESTRUCTIVE_DELETE;\n }",
"public function canDelete()\n {\n return $this->canGet();\n }",
"protected function _can_delete($delete_id) {\n\t\treturn TRUE;\n\t}",
"protected function _can_delete($delete_id) {\n\t\treturn TRUE;\n\t}",
"protected function _can_delete($delete_id) {\r\n return true;\r\n }",
"public function getDeleteFlag()\r\n {\r\n return $this->deleteFlag;\r\n }",
"function allowDelete($allow){\n\t\t$this->canDelete=$allow;\n\t}",
"protected function _can_delete($delete_id)\n\t{\n\t\treturn TRUE;\n\t}",
"protected function _can_delete($delete_id)\n\t{\n\t\treturn TRUE;\n\t}",
"public function getIsDeleted()\n {\n return $this->isDeleted;\n }",
"public function getAllowDeleteRows(): ?bool {\n $val = $this->getBackingStore()->get('allowDeleteRows');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowDeleteRows'\");\n }",
"public function getColumns() {\n return $this->aColumns;\n }",
"public function getDeleteFilter()\n {\n return $this->deleteFilter;\n }"
]
| [
"0.6903301",
"0.63069546",
"0.61739475",
"0.60386527",
"0.59542465",
"0.5942869",
"0.58527577",
"0.57992935",
"0.57029754",
"0.5470657",
"0.5403663",
"0.5340378",
"0.52924037",
"0.5276455",
"0.52701366",
"0.5249442",
"0.5239597",
"0.52363193",
"0.518879",
"0.5179189",
"0.5179189",
"0.51653934",
"0.5161695",
"0.51302594",
"0.5117644",
"0.5117644",
"0.51097333",
"0.5108237",
"0.5065616",
"0.5065295"
]
| 0.6670619 | 1 |
Gets the allowDeleteRows property value. Represents the worksheet protection option of allowing deleting rows. | public function getAllowDeleteRows(): ?bool {
$val = $this->getBackingStore()->get('allowDeleteRows');
if (is_null($val) || is_bool($val)) {
return $val;
}
throw new \UnexpectedValueException("Invalid type found in backing store for 'allowDeleteRows'");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAllowDelete($value=''){\t\t\n\t\treturn $this->allow_delete;\n\t}",
"public function setAllowDeleteRows(?bool $value): void {\n $this->getBackingStore()->set('allowDeleteRows', $value);\n }",
"public function allowDeletion()\n {\n return $this->allowDeletion;\n }",
"function canDelete() {\n return true;\n }",
"public function can_delete () {\r\n\r\n return $this->permissions[\"D\"] ? true : false;\r\n\r\n }",
"public function canDelete()\n {\n return 1;\n }",
"function allowDelete($allow){\n\t\t$this->canDelete=$allow;\n\t}",
"public function isDeleteable()\n {\n return $this->_isDeleteable;\n }",
"public function getAllowDeletions() : bool\n {\n return $this->allowDeletions;\n }",
"protected function validateDelete() {\r\n\t\t// check permissions\r\n\t\tif (!WCF::getSession()->getPermission('admin.user.canDeleteUser')) {\r\n\t\t\treturn [];\r\n\t\t}\r\n\r\n\t\treturn $this->__validateAccessibleGroups(array_keys($this->objects));\r\n\t}",
"protected function beforeDelete()\n\t{\n\t\tif(parent::beforeDelete()){\n\t\t\t$avaiable = $this->chkAvaiableDelete($this->id);\n\t\t\tif($avaiable!=''){\n\t\t\t\techo $avaiable;\n\t\t\t\treturn false;\n\t\t\t}else\n\t\t\t\treturn true;\n\t\t}else \n\t\t\treturn false;\n\t}",
"public function canDelete()\n {\n return $this->canGet();\n }",
"public function canDelete()\n {\n if ( null === $this->_canDelete )\n {\n $model = new Application_Model_AudioJobMapper();\n $results = $model->fetchAll( 'service_id = ' . $this->id );\n $this->_canDelete = !(bool) count( $results );\n }\n return $this->_canDelete;\n }",
"public function getDeleteFlag()\r\n {\r\n return $this->deleteFlag;\r\n }",
"protected function _can_delete($delete_id) {\r\n return true;\r\n }",
"protected function _can_delete($delete_id) {\n\t\treturn TRUE;\n\t}",
"protected function _can_delete($delete_id) {\n\t\treturn TRUE;\n\t}",
"public function getDeleteDisabledProducts()\n {\n $value = $this->_config->get('general/delete_disabled_products');\n\n if ($value === null) {\n $value = false;\n }\n\n return (bool)$value && $this->getMode() === 'products';\n }",
"public function getCanDeleteProperty()\n {\n return $this->deleteConfirm === $this->staff->email;\n }",
"public function getAllowInsertRows(): ?bool {\n $val = $this->getBackingStore()->get('allowInsertRows');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowInsertRows'\");\n }",
"protected function _can_delete($delete_id)\n\t{\n\t\treturn TRUE;\n\t}",
"protected function _can_delete($delete_id)\n\t{\n\t\treturn TRUE;\n\t}",
"protected function canDelete($record) { return false; }",
"public function getAllowDeleteColumns(): ?bool {\n $val = $this->getBackingStore()->get('allowDeleteColumns');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowDeleteColumns'\");\n }",
"function DeleteRows() {\n\t\tglobal $Language, $Security;\n\t\tif (!$Security->CanDelete()) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoDeletePermission\")); // No delete permission\n\t\t\treturn FALSE;\n\t\t}\n\t\t$DeleteRows = TRUE;\n\t\t$sSql = $this->SQL();\n\t\t$conn = &$this->Connection();\n\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t$rs = $conn->Execute($sSql);\n\t\t$conn->raiseErrorFn = '';\n\t\tif ($rs === FALSE) {\n\t\t\treturn FALSE;\n\t\t} elseif ($rs->EOF) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoRecord\")); // No record found\n\t\t\t$rs->Close();\n\t\t\treturn FALSE;\n\n\t\t//} else {\n\t\t//\t$this->LoadRowValues($rs); // Load row values\n\n\t\t}\n\t\t$rows = ($rs) ? $rs->GetRows() : array();\n\t\t$conn->BeginTrans();\n\n\t\t// Clone old rows\n\t\t$rsold = $rows;\n\t\tif ($rs)\n\t\t\t$rs->Close();\n\n\t\t// Call row deleting event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$DeleteRows = $this->Row_Deleting($row);\n\t\t\t\tif (!$DeleteRows) break;\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$sKey = \"\";\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$sThisKey = \"\";\n\t\t\t\tif ($sThisKey <> \"\") $sThisKey .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\n\t\t\t\t$sThisKey .= $row['pegawai_id'];\n\t\t\t\tif ($sThisKey <> \"\") $sThisKey .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\n\t\t\t\t$sThisKey .= $row['tgl_shift'];\n\t\t\t\tif ($sThisKey <> \"\") $sThisKey .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\n\t\t\t\t$sThisKey .= $row['khusus_lembur'];\n\t\t\t\tif ($sThisKey <> \"\") $sThisKey .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\n\t\t\t\t$sThisKey .= $row['khusus_extra'];\n\t\t\t\tif ($sThisKey <> \"\") $sThisKey .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\n\t\t\t\t$sThisKey .= $row['temp_id_auto'];\n\t\t\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t\t\t$DeleteRows = $this->Delete($row); // Delete\n\t\t\t\t$conn->raiseErrorFn = '';\n\t\t\t\tif ($DeleteRows === FALSE)\n\t\t\t\t\tbreak;\n\t\t\t\tif ($sKey <> \"\") $sKey .= \", \";\n\t\t\t\t$sKey .= $sThisKey;\n\t\t\t}\n\t\t} else {\n\n\t\t\t// Set up error message\n\t\t\tif ($this->getSuccessMessage() <> \"\" || $this->getFailureMessage() <> \"\") {\n\n\t\t\t\t// Use the message, do nothing\n\t\t\t} elseif ($this->CancelMessage <> \"\") {\n\t\t\t\t$this->setFailureMessage($this->CancelMessage);\n\t\t\t\t$this->CancelMessage = \"\";\n\t\t\t} else {\n\t\t\t\t$this->setFailureMessage($Language->Phrase(\"DeleteCancelled\"));\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$conn->CommitTrans(); // Commit the changes\n\t\t} else {\n\t\t\t$conn->RollbackTrans(); // Rollback changes\n\t\t}\n\n\t\t// Call Row Deleted event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$this->Row_Deleted($row);\n\t\t\t}\n\t\t}\n\t\treturn $DeleteRows;\n\t}",
"public function canDelete()\n {\n return in_array('delete', $this->actions);\n }",
"protected function canDelete($record)\n {\n return true;\n }",
"public function authorize()\n {\n return $this->can('delete');\n }",
"function DeleteRows() {\n\t\tglobal $Language, $Security;\n\t\tif (!$Security->CanDelete()) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoDeletePermission\")); // No delete permission\n\t\t\treturn FALSE;\n\t\t}\n\t\t$DeleteRows = TRUE;\n\t\t$sSql = $this->SQL();\n\t\t$conn = &$this->Connection();\n\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t$rs = $conn->Execute($sSql);\n\t\t$conn->raiseErrorFn = '';\n\t\tif ($rs === FALSE) {\n\t\t\treturn FALSE;\n\t\t} elseif ($rs->EOF) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoRecord\")); // No record found\n\t\t\t$rs->Close();\n\t\t\treturn FALSE;\n\n\t\t//} else {\n\t\t//\t$this->LoadRowValues($rs); // Load row values\n\n\t\t}\n\t\t$rows = ($rs) ? $rs->GetRows() : array();\n\t\t$conn->BeginTrans();\n\n\t\t// Clone old rows\n\t\t$rsold = $rows;\n\t\tif ($rs)\n\t\t\t$rs->Close();\n\n\t\t// Call row deleting event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$DeleteRows = $this->Row_Deleting($row);\n\t\t\t\tif (!$DeleteRows) break;\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$sKey = \"\";\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$sThisKey = \"\";\n\t\t\t\tif ($sThisKey <> \"\") $sThisKey .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\n\t\t\t\t$sThisKey .= $row['id'];\n\t\t\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t\t\t$DeleteRows = $this->Delete($row); // Delete\n\t\t\t\t$conn->raiseErrorFn = '';\n\t\t\t\tif ($DeleteRows === FALSE)\n\t\t\t\t\tbreak;\n\t\t\t\tif ($sKey <> \"\") $sKey .= \", \";\n\t\t\t\t$sKey .= $sThisKey;\n\t\t\t}\n\t\t} else {\n\n\t\t\t// Set up error message\n\t\t\tif ($this->getSuccessMessage() <> \"\" || $this->getFailureMessage() <> \"\") {\n\n\t\t\t\t// Use the message, do nothing\n\t\t\t} elseif ($this->CancelMessage <> \"\") {\n\t\t\t\t$this->setFailureMessage($this->CancelMessage);\n\t\t\t\t$this->CancelMessage = \"\";\n\t\t\t} else {\n\t\t\t\t$this->setFailureMessage($Language->Phrase(\"DeleteCancelled\"));\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$conn->CommitTrans(); // Commit the changes\n\t\t} else {\n\t\t\t$conn->RollbackTrans(); // Rollback changes\n\t\t}\n\n\t\t// Call Row Deleted event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$this->Row_Deleted($row);\n\t\t\t}\n\t\t}\n\t\treturn $DeleteRows;\n\t}",
"function DeleteRows() {\n\t\tglobal $Language, $Security;\n\t\tif (!$Security->CanDelete()) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoDeletePermission\")); // No delete permission\n\t\t\treturn FALSE;\n\t\t}\n\t\t$DeleteRows = TRUE;\n\t\t$sSql = $this->SQL();\n\t\t$conn = &$this->Connection();\n\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t$rs = $conn->Execute($sSql);\n\t\t$conn->raiseErrorFn = '';\n\t\tif ($rs === FALSE) {\n\t\t\treturn FALSE;\n\t\t} elseif ($rs->EOF) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoRecord\")); // No record found\n\t\t\t$rs->Close();\n\t\t\treturn FALSE;\n\t\t}\n\t\t$rows = ($rs) ? $rs->GetRows() : array();\n\t\t$conn->BeginTrans();\n\n\t\t// Clone old rows\n\t\t$rsold = $rows;\n\t\tif ($rs)\n\t\t\t$rs->Close();\n\n\t\t// Call row deleting event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$DeleteRows = $this->Row_Deleting($row);\n\t\t\t\tif (!$DeleteRows) break;\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$sKey = \"\";\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$sThisKey = \"\";\n\t\t\t\tif ($sThisKey <> \"\") $sThisKey .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\n\t\t\t\t$sThisKey .= $row['row_id'];\n\t\t\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t\t\t$DeleteRows = $this->Delete($row); // Delete\n\t\t\t\t$conn->raiseErrorFn = '';\n\t\t\t\tif ($DeleteRows === FALSE)\n\t\t\t\t\tbreak;\n\t\t\t\tif ($sKey <> \"\") $sKey .= \", \";\n\t\t\t\t$sKey .= $sThisKey;\n\t\t\t}\n\t\t}\n\t\tif (!$DeleteRows) {\n\n\t\t\t// Set up error message\n\t\t\tif ($this->getSuccessMessage() <> \"\" || $this->getFailureMessage() <> \"\") {\n\n\t\t\t\t// Use the message, do nothing\n\t\t\t} elseif ($this->CancelMessage <> \"\") {\n\t\t\t\t$this->setFailureMessage($this->CancelMessage);\n\t\t\t\t$this->CancelMessage = \"\";\n\t\t\t} else {\n\t\t\t\t$this->setFailureMessage($Language->Phrase(\"DeleteCancelled\"));\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$conn->CommitTrans(); // Commit the changes\n\t\t} else {\n\t\t\t$conn->RollbackTrans(); // Rollback changes\n\t\t}\n\n\t\t// Call Row Deleted event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$this->Row_Deleted($row);\n\t\t\t}\n\t\t}\n\t\treturn $DeleteRows;\n\t}"
]
| [
"0.6327141",
"0.6290794",
"0.59920406",
"0.5732285",
"0.5719825",
"0.56162655",
"0.5603451",
"0.53365445",
"0.5307128",
"0.52257854",
"0.5187821",
"0.5178489",
"0.51286083",
"0.5121879",
"0.51210964",
"0.5107253",
"0.5107253",
"0.5090827",
"0.50636584",
"0.50303775",
"0.50214124",
"0.50214124",
"0.50060415",
"0.4980996",
"0.49520966",
"0.4950996",
"0.49389318",
"0.49051654",
"0.48906383",
"0.48867664"
]
| 0.645513 | 0 |
Gets the allowFormatCells property value. Represents the worksheet protection option of allowing formatting cells. | public function getAllowFormatCells(): ?bool {
$val = $this->getBackingStore()->get('allowFormatCells');
if (is_null($val) || is_bool($val)) {
return $val;
}
throw new \UnexpectedValueException("Invalid type found in backing store for 'allowFormatCells'");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setAllowFormatCells(?bool $value): void {\n $this->getBackingStore()->set('allowFormatCells', $value);\n }",
"public function getAllow() {\r\n\t\treturn $this -> allow;\r\n\t}",
"public function getAllow() {\r\n return $this->allow;\r\n }",
"function isProtectionEnabled()\n {\n return $this->_sheet || $this->_objects || $this->_scenarios || $this->_formatCells || $this->_formatColumns || $this->_formatRows || $this->_insertColumns || $this->_insertRows || $this->_insertHyperlinks || $this->_deleteColumns || $this->_deleteRows || $this->_selectLockedCells || $this->_sort || $this->_autoFilter || $this->_pivotTables || $this->_selectUnlockedCells;\n }",
"public function isProtectionEnabled()\n {\n return $this->sheet ||\n $this->objects ||\n $this->scenarios ||\n $this->formatCells ||\n $this->formatColumns ||\n $this->formatRows ||\n $this->insertColumns ||\n $this->insertRows ||\n $this->insertHyperlinks ||\n $this->deleteColumns ||\n $this->deleteRows ||\n $this->selectLockedCells ||\n $this->sort ||\n $this->autoFilter ||\n $this->pivotTables ||\n $this->selectUnlockedCells;\n }",
"public function isProtectionEnabled()\n {\n return $this->sheet ||\n $this->objects ||\n $this->scenarios ||\n $this->formatCells ||\n $this->formatColumns ||\n $this->formatRows ||\n $this->insertColumns ||\n $this->insertRows ||\n $this->insertHyperlinks ||\n $this->deleteColumns ||\n $this->deleteRows ||\n $this->selectLockedCells ||\n $this->sort ||\n $this->autoFilter ||\n $this->pivotTables ||\n $this->selectUnlockedCells;\n }",
"public function getDisplayFormatTypeAllowableValues()\n {\n return [\n self::DISPLAY_FORMAT_TYPE__DEFAULT,\n self::DISPLAY_FORMAT_TYPE_DATE,\n self::DISPLAY_FORMAT_TYPE_NUMBER,\n ];\n }",
"public function getAllowed() {\n return $this->_allowed;\n }",
"public function getAllowFormatColumns(): ?bool {\n $val = $this->getBackingStore()->get('allowFormatColumns');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowFormatColumns'\");\n }",
"public function getProtectionEligibility() {\n\t\treturn $this->_getField(self::$PROTECTION_ELIGIBILITY);\n\t}",
"public function getAllowFormatRows(): ?bool {\n $val = $this->getBackingStore()->get('allowFormatRows');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowFormatRows'\");\n }",
"public function isAllow()\n {\n return $this->allow;\n }",
"public function getEssTimesheetSettingAllowableValues()\n {\n return [\n self::ESS_TIMESHEET_SETTING_DISABLED,\n self::ESS_TIMESHEET_SETTING_READ_ONLY,\n self::ESS_TIMESHEET_SETTING_READ_WRITE,\n self::ESS_TIMESHEET_SETTING_EDIT_KIOSK,\n self::ESS_TIMESHEET_SETTING_EDIT_WORK_ZONE_CLOCK_ON_OFF,\n ];\n }",
"public function getAllow(): string\n {\n return $this->allow;\n }",
"public function getEnabled() {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (array_key_exists(6, $this->_result)) return (string) $this->_result[6];\n\t\t\telse parent::throwGetColException('Not set CampaignDefinitionsModel::getEnabled', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('No result From CampaignDefinitionsModel::getEnabled', __LINE__, __FILE__);\n\t}",
"public function getAllowCheck()\n {\n return $this->allow_check;\n }",
"function enableFormatting($format = true)\n {\n $this->formatFields = $format;\n }",
"public function getFormatting() {\n\t\treturn $this->formatting;\n\t}",
"public function GetAllowPorts () {\n\t\treturn $this->allowPorts;\n\t}",
"public function formatted() {\n\t\treturn parent::get('formatted') ? true : false;\n\t}",
"public function getProtectionEligibility()\n {\n return $this->protection_eligibility;\n }",
"public function getAllowableRenderModes()\n\t{\n\t\treturn $this->_arrAllowableRenderModes;\n\t}",
"function getCanDisable() {\n\t\treturn $this->getData('canDisable');\n\t}",
"public function GetAllowIPv4 () {\n\t\treturn $this->allowIPv4;\n\t}",
"public function getFormatSetting()\n {\n return $this->format_setting;\n }",
"public function applyFormat($format) {\n\t\tif ($this->isSupervisor) {\n\t\t\t$range = $this->getSelectedCells();\n\n\t\t\t// Uppercase coordinate\n\t\t\t$range = strtoupper($range);\n\n\t\t\t// Is it a cell range or a single cell?\n\t\t\tif (strpos($range, ':') === false) {\n\t\t\t\t$rangeA = $range;\n\t\t\t\t$rangeB = $range;\n\t\t\t} else {\n\t\t\t\t$a = explode(':', $range);\n\t\t\t\t$rangeA = $a[0];\n\t\t\t\t$rangeB = $a[1];\n\t\t\t}\n\n\t\t\t// Calculate range outer borders\n\t\t\t$rangeStart = Coordinates::parse($rangeA);\n\t\t\t$rangeEnd = Coordinates::parse($rangeB);\n\n\t\t\t// SIMPLE MODE:\n\t\t\t// Selection type, inspect\n\t\t\tif (1 == preg_match('/^[A-Z]+1:[A-Z]+1048576$/sD', $range)) {\n\t\t\t\t$selectionType = 'COLUMN';\n\t\t\t} elseif (1 == preg_match('/^A[0-9]+:XFD[0-9]+$/sD', $range)) {\n\t\t\t\t$selectionType = 'ROW';\n\t\t\t} else {\n\t\t\t\t$selectionType = 'CELL';\n\t\t\t}\n\n\t\t\t// First loop through columns, rows, or cells to find out which styles\n\t\t\t// are affected by this operation\n\t\t\t$oldXfIndexes = /*. (boolean[int]) .*/ array();\n\t\t\tswitch ($selectionType) {\n\t\t\t\tcase 'COLUMN':\n//\t\t\t\t\tfor ($col = $rangeStart[0]; $col <= $rangeEnd[0]; ++$col) {\n//\t\t\t\t\t\t$oldXfIndexes[$this->getActiveSheet()\n//\t\t\t\t\t\t\t\t->getColumnDimensionByColumn($col)\n//\t\t\t\t\t\t\t\t->getXfIndex()] = true;\n//\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ROW':\n//\t\t\t\t\tfor ($row = $rangeStart[1]; $row <= $rangeEnd[1]; ++$row) {\n//\t\t\t\t\t\tif ($this->getActiveSheet()->getRowDimension($row)->getXfIndex() === null) {\n//\t\t\t\t\t\t\t$oldXfIndexes[0] = true; // row without explicit style should be formatted based on default style\n//\t\t\t\t\t\t} else {\n//\t\t\t\t\t\t\t$oldXfIndexes[$this->getActiveSheet()->getRowDimension($row)->getXfIndex()] = true;\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'CELL':\n\t\t\t\t\tfor ($col = $rangeStart->getColumnNumber(); $col <= $rangeEnd->getColumnNumber(); ++$col) {\n\t\t\t\t\t\tfor ($row = $rangeStart->getRow(); $row <= $rangeEnd->getRow(); ++$row) {\n\t\t\t\t\t\t\t$oldXfIndexes[$this->getActiveSheet()->getCellByColumnAndRow($col, $row)->getXfIndex()] = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: throw new \\RuntimeException();\n\t\t\t}\n\n\t\t\t// clone each of the affected styles, apply the style array, and add\n\t\t\t// the new styles to the workbook\n\t\t\t$workbook = $this->workbook;\n\t\t\t$newXfIndexes = /*. (int[int]) .*/ array();\n\t\t\tforeach ($oldXfIndexes as $oldXfIndex => $dummy) {\n\t\t\t\t$style = $workbook->getCellXfByIndex($oldXfIndex);\n\t\t\t\t$newStyle = clone $style;\n\t\t\t\t$newStyle->applyFormat($format);\n\n\t\t\t\t$existingStyle = $this->applyFormat_searchEqualXf($newStyle);\n\t\t\t\tif ($existingStyle !== NULL) {\n\t\t\t\t\t// there is already such cell Xf in our collection\n\t\t\t\t\t$newXfIndexes[$oldXfIndex] = $existingStyle->getIndex();\n\t\t\t\t} else {\n\t\t\t\t\t// we don't have such a cell Xf, need to add\n\t\t\t\t\t$workbook->addCellXf($newStyle);\n\t\t\t\t\t$newXfIndexes[$oldXfIndex] = $newStyle->getIndex();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Loop through columns, rows, or cells again and update the XF index\n\t\t\tswitch ($selectionType) {\n\t\t\t\tcase 'COLUMN':\n//\t\t\t\t\tfor ($col = $rangeStart[0]; $col <= $rangeEnd[0]; ++$col) {\n//\t\t\t\t\t\t$columnDimension = $this->getActiveSheet()->getColumnDimensionByColumn($col);\n//\t\t\t\t\t\t$oldXfIndex = $columnDimension->getXfIndex();\n//\t\t\t\t\t\t$columnDimension->setXfIndex($newXfIndexes[$oldXfIndex]);\n//\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'ROW':\n//\t\t\t\t\tfor ($row = $rangeStart[1]; $row <= $rangeEnd[1]; ++$row) {\n//\t\t\t\t\t\t$rowDimension = $this->getActiveSheet()->getRowDimension($row);\n//\t\t\t\t\t\t$oldXfIndex = $rowDimension->getXfIndex() === null ?\n//\t\t\t\t\t\t\t\t0 : $rowDimension->getXfIndex(); // row without explicit style should be formatted based on default style\n//\t\t\t\t\t\t$rowDimension->setXfIndex($newXfIndexes[$oldXfIndex]);\n//\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'CELL':\n\t\t\t\t\tfor ($col = $rangeStart->getColumnNumber(); $col <= $rangeEnd->getColumnNumber(); ++$col) {\n\t\t\t\t\t\tfor ($row = $rangeStart->getRow(); $row <= $rangeEnd->getRow(); ++$row) {\n\t\t\t\t\t\t\t$cell = $this->getActiveSheet()->getCellByColumnAndRow($col, $row);\n\t\t\t\t\t\t\t$oldXfIndex = $cell->getXfIndex();\n\t\t\t\t\t\t\t$cell->setXfIndex($newXfIndexes[$oldXfIndex]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: throw new \\RuntimeException();\n\t\t\t}\n\t\t} else {\n\t\t\t$this->setFormatCode($format);\n\t\t}\n\t\treturn $this;\n\t}",
"static function get_allowable_export_formats() {\n //currently, only PDF and CSV export formats are fully implemented\n return array(php_report::$EXPORT_FORMAT_PDF,\n php_report::$EXPORT_FORMAT_CSV);\n }",
"protected function getCellStylesSectionContent()\n {\n return <<<EOD\n<cellStyles count=\"1\">\n <cellStyle builtinId=\"0\" name=\"Normal\" xfId=\"0\"/>\n</cellStyles>\nEOD;\n }",
"public function setAllowFormatRows(?bool $value): void {\n $this->getBackingStore()->set('allowFormatRows', $value);\n }",
"public function setAllowFormatColumns(?bool $value): void {\n $this->getBackingStore()->set('allowFormatColumns', $value);\n }"
]
| [
"0.559047",
"0.526853",
"0.52515465",
"0.52262",
"0.52095014",
"0.52095014",
"0.5194078",
"0.5158861",
"0.5134036",
"0.51298493",
"0.5116524",
"0.50194496",
"0.5006148",
"0.49115366",
"0.48806337",
"0.48334503",
"0.4783267",
"0.4777441",
"0.47748333",
"0.47291994",
"0.4707742",
"0.46871918",
"0.46724993",
"0.46594572",
"0.46462578",
"0.46456304",
"0.46271256",
"0.4611772",
"0.4562334",
"0.4557651"
]
| 0.6103196 | 0 |
Gets the allowFormatColumns property value. Represents the worksheet protection option of allowing formatting columns. | public function getAllowFormatColumns(): ?bool {
$val = $this->getBackingStore()->get('allowFormatColumns');
if (is_null($val) || is_bool($val)) {
return $val;
}
throw new \UnexpectedValueException("Invalid type found in backing store for 'allowFormatColumns'");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAllowableColumns()\n\t{\n\t\treturn $this->_arrColumns;\n\t}",
"public function setAllowFormatColumns(?bool $value): void {\n $this->getBackingStore()->set('allowFormatColumns', $value);\n }",
"public function getDisplayFormatTypeAllowableValues()\n {\n return [\n self::DISPLAY_FORMAT_TYPE__DEFAULT,\n self::DISPLAY_FORMAT_TYPE_DATE,\n self::DISPLAY_FORMAT_TYPE_NUMBER,\n ];\n }",
"public static function mla_manage_columns_filter( ) {\r\n\t\treturn apply_filters( 'mla_list_table_get_columns', self::$default_columns );\r\n\t}",
"public function getAllowFormatCells(): ?bool {\n $val = $this->getBackingStore()->get('allowFormatCells');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowFormatCells'\");\n }",
"public function checkEnableColumnEdit()\n\t{\n\t\treturn false;\n\t}",
"public function getAllowDeleteColumns(): ?bool {\n $val = $this->getBackingStore()->get('allowDeleteColumns');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowDeleteColumns'\");\n }",
"static function get_allowable_export_formats() {\n //currently, only PDF and CSV export formats are fully implemented\n return array(php_report::$EXPORT_FORMAT_PDF,\n php_report::$EXPORT_FORMAT_CSV);\n }",
"public function csv_cols() {\n\n\t\t$columns = isset( $this->data['give_give_donations_export_option'] ) ? $this->data['give_give_donations_export_option'] : array();\n\n\t\t// We need columns.\n\t\tif ( empty( $columns ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->cols = $this->get_cols( $columns );\n\n\t\treturn $this->cols;\n\t}",
"public function getInvalidColumns()\n {\n return $this->invalidColumns;\n }",
"public function columnOptions() {\n\t\treturn $this->columnNames;\n\t}",
"public function getAllow() {\r\n return $this->allow;\r\n }",
"public function getAllow() {\r\n\t\treturn $this -> allow;\r\n\t}",
"function getFixedColumns() { return $this->_fixedcolumns; }",
"public function getVisibleColumns()\n {\n $definitions = $this->defineListColumns();\n $columns = [];\n\n /*\n * Supplied column list\n */\n if ($this->columnOverride === null) {\n $this->columnOverride = $this->getSession('visible', null);\n }\n\n if ($this->columnOverride && is_array($this->columnOverride)) {\n\n $invalidColumns = array_diff($this->columnOverride, array_keys($definitions));\n if (!count($definitions)) {\n throw new ApplicationException(Lang::get(\n 'backend::lang.list.missing_column',\n ['columns'=>implode(',', $invalidColumns)]\n ));\n }\n\n $availableColumns = array_intersect($this->columnOverride, array_keys($definitions));\n foreach ($availableColumns as $columnName) {\n $definitions[$columnName]->invisible = false;\n $columns[$columnName] = $definitions[$columnName];\n }\n }\n /*\n * Use default column list\n */\n else {\n foreach ($definitions as $columnName => $column) {\n if ($column->invisible) {\n continue;\n }\n\n $columns[$columnName] = $definitions[$columnName];\n }\n }\n\n return $this->visibleColumns = $columns;\n }",
"public function getProtectionEligibility() {\n\t\treturn $this->_getField(self::$PROTECTION_ELIGIBILITY);\n\t}",
"function get_columns() {\n\t\t\n\t\t$columns = array(\n\t\t\t\t\t\t\t'cb' \t=> '<input type=\"checkbox\" />',\n\t\t\t\t\t\t\t'title'\t\t=> __( 'Style Name', 'blog-designer-pack' ),\n\t\t\t\t\t\t\t'id'\t\t=> __( 'Style ID', 'blog-designer-pack' ),\n\t\t\t\t\t\t);\n\t\treturn apply_filters('bdpp_style_columns', $columns);\n\t}",
"public function getAllowInsertColumns(): ?bool {\n $val = $this->getBackingStore()->get('allowInsertColumns');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowInsertColumns'\");\n }",
"public function getAllowed() {\n return $this->_allowed;\n }",
"function get_columns( ) {\r\n\t\treturn self::mla_manage_columns_filter();\r\n\t}",
"public function getAllowFlexibleColor()\n {\n return isset($this->allow_flexible_color) ? $this->allow_flexible_color : false;\n }",
"public function isAllow()\n {\n return $this->allow;\n }",
"public function getEnabled() {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (array_key_exists(6, $this->_result)) return (string) $this->_result[6];\n\t\t\telse parent::throwGetColException('Not set CampaignDefinitionsModel::getEnabled', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('No result From CampaignDefinitionsModel::getEnabled', __LINE__, __FILE__);\n\t}",
"public function GetAllowPorts () {\n\t\treturn $this->allowPorts;\n\t}",
"public static function getColumnOptions()\n {\n return array(\n TableType::SHOW_ALL_COLUMNS => array('name' => __('Show all columns and their headings', 'DataTableWidget-admin', false), 'isColumnFilter' => false),\n TableType::SHOW_SPECIFIC_COLUMNS => array('name' => __('Show specific columns and/or different headings', 'DataTableWidget-admin', false), 'isColumnFilter' => true)\n );\n }",
"public function getAllowSendDirectToAdmin()\n {\n return $this->allow_send_direct_to_admin;\n }",
"public function getColumnConfig();",
"public function getFormatColumnsAction() {\n\t\n\t\t$searchFormatColumns = new Model_Table_SearchFormatColumns();\n\t\techo Zend_Json::encode(\n\t\t\t$searchFormatColumns->getColumnsForFormat(\n\t\t\t\t\t$this->_request->getParam('format_id')\n\t\t\t)\n\t\t);\n\t\texit;\n\t}",
"public function getAllowFormatRows(): ?bool {\n $val = $this->getBackingStore()->get('allowFormatRows');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowFormatRows'\");\n }",
"public function allowExport()\n {\n return $this->option('useExporter');\n }"
]
| [
"0.65922856",
"0.582203",
"0.54824835",
"0.52862144",
"0.5285945",
"0.5209618",
"0.5175623",
"0.50377345",
"0.49993724",
"0.49905145",
"0.4980282",
"0.49741617",
"0.49583647",
"0.49522346",
"0.49357253",
"0.4885247",
"0.48716843",
"0.48587757",
"0.4850737",
"0.4842713",
"0.4838178",
"0.48320276",
"0.4804606",
"0.47802594",
"0.47756022",
"0.47634423",
"0.4755411",
"0.4750878",
"0.47039214",
"0.47039106"
]
| 0.6261939 | 1 |
Gets the allowFormatRows property value. Represents the worksheet protection option of allowing formatting rows. | public function getAllowFormatRows(): ?bool {
$val = $this->getBackingStore()->get('allowFormatRows');
if (is_null($val) || is_bool($val)) {
return $val;
}
throw new \UnexpectedValueException("Invalid type found in backing store for 'allowFormatRows'");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setAllowFormatRows(?bool $value): void {\n $this->getBackingStore()->set('allowFormatRows', $value);\n }",
"public function getAllowFormatCells(): ?bool {\n $val = $this->getBackingStore()->get('allowFormatCells');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowFormatCells'\");\n }",
"protected function rowStyleOptions() {\n // Get all available row plugins by default.\n $options = Views::fetchPluginNames('row', 'normal', [$this->base_table]);\n return $options;\n }",
"function enableFormatting($format = true)\n {\n $this->formatFields = $format;\n }",
"public function getAllowDeleteRows(): ?bool {\n $val = $this->getBackingStore()->get('allowDeleteRows');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowDeleteRows'\");\n }",
"function formatRow(){\n $this->hook('formatRow');\n }",
"public function getRowRanges()\n {\n return $this->row_ranges;\n }",
"public function canSelectRows()\n\t{\n\t\treturn false;\n\t}",
"public function canSelectRows()\n\t{\n\t\treturn false;\n\t}",
"public function isProtectionEnabled()\n {\n return $this->sheet ||\n $this->objects ||\n $this->scenarios ||\n $this->formatCells ||\n $this->formatColumns ||\n $this->formatRows ||\n $this->insertColumns ||\n $this->insertRows ||\n $this->insertHyperlinks ||\n $this->deleteColumns ||\n $this->deleteRows ||\n $this->selectLockedCells ||\n $this->sort ||\n $this->autoFilter ||\n $this->pivotTables ||\n $this->selectUnlockedCells;\n }",
"public function isProtectionEnabled()\n {\n return $this->sheet ||\n $this->objects ||\n $this->scenarios ||\n $this->formatCells ||\n $this->formatColumns ||\n $this->formatRows ||\n $this->insertColumns ||\n $this->insertRows ||\n $this->insertHyperlinks ||\n $this->deleteColumns ||\n $this->deleteRows ||\n $this->selectLockedCells ||\n $this->sort ||\n $this->autoFilter ||\n $this->pivotTables ||\n $this->selectUnlockedCells;\n }",
"public function getEnabled() {\n\t\tif ((bool) $this->_result) {\n\t\t\tif (array_key_exists(6, $this->_result)) return (string) $this->_result[6];\n\t\t\telse parent::throwGetColException('Not set CampaignDefinitionsModel::getEnabled', __LINE__, __FILE__);\n\t\t}\n\t\telse return parent::throwNoResException('No result From CampaignDefinitionsModel::getEnabled', __LINE__, __FILE__);\n\t}",
"function canSelectRows()\n\t{\n\t\treturn false;\n\t}",
"function isProtectionEnabled()\n {\n return $this->_sheet || $this->_objects || $this->_scenarios || $this->_formatCells || $this->_formatColumns || $this->_formatRows || $this->_insertColumns || $this->_insertRows || $this->_insertHyperlinks || $this->_deleteColumns || $this->_deleteRows || $this->_selectLockedCells || $this->_sort || $this->_autoFilter || $this->_pivotTables || $this->_selectUnlockedCells;\n }",
"public function getAllowInsertRows(): ?bool {\n $val = $this->getBackingStore()->get('allowInsertRows');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowInsertRows'\");\n }",
"public function getAllowFormatColumns(): ?bool {\n $val = $this->getBackingStore()->get('allowFormatColumns');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowFormatColumns'\");\n }",
"public function isRowAllowedToImport(array $rowData, $rowNum)\n {\n return $this->validateRow($rowData, $rowNum) && !isset($this->_rowsToSkip[$rowNum]);\n }",
"public function setAllowFormatCells(?bool $value): void {\n $this->getBackingStore()->set('allowFormatCells', $value);\n }",
"public function getAllow() {\r\n return $this->allow;\r\n }",
"public function GetAllowIPv4 () {\n\t\treturn $this->allowIPv4;\n\t}",
"public function getAllow() {\r\n\t\treturn $this -> allow;\r\n\t}",
"private function _getRow($ignoreMismatch = false)\n {\n $line = fgetcsv($this->_file, $this->_length, $this->_delimiter,\n $this->_enclosure, $this->_escape\n );\n\n // EOF\n if (false === $line && feof($this->_file))\n {\n return false;\n }\n\n // Empty line\n if (is_array($line) && empty($line))\n {\n return false;\n }\n\n $expectedHeaders = $this->_hasHeaders\n ? count($this->_headers)\n : $this->_headers;\n\n // Other error\n if (!$line)\n {\n throw new PHPMapper_Exception_Import(\n 'fgetcsv() failed when attempting to read line from file.'\n );\n }\n else if (!$ignoreMismatch && count($line) != $expectedHeaders)\n {\n throw new PHPMapper_Exception_Import(\n 'Line #' . $this->_lineNumber . ' has ' . count($line) . ' columns. Expecting '\n . $expectedHeaders . '.'\n );\n }\n else\n {\n $this->_lineNumber++;\n return $line;\n }\n }",
"public function getRowLimitPerWorker()\n {\n return $this->rowLimit;\n }",
"public function isAllow()\n {\n return $this->allow;\n }",
"public function import()\n {\n return !empty($this->configs['rows_edit']) && $this->configs['rows_edit'] == 1 ? self::rows() : 'files.rows.table_import';\n }",
"public function hasRowRange(){\n return $this->_has(3);\n }",
"public function getEnableRestriction()\n {\n return $this->enable_restriction;\n }",
"public function getRowValues()\n {\n return array(\n $this->getUsdModifier(),\n $this->getEurModifier(),\n $this->getPlnModifier()\n );\n }",
"public function getProtectionEligibility() {\n\t\treturn $this->_getField(self::$PROTECTION_ELIGIBILITY);\n\t}",
"public function hasAllowRowInterleaving(){\n return $this->_has(6);\n }"
]
| [
"0.6106124",
"0.5191988",
"0.5022328",
"0.48999047",
"0.48121318",
"0.4803483",
"0.4709482",
"0.47034046",
"0.47034046",
"0.46979687",
"0.46979687",
"0.46928847",
"0.46792164",
"0.46491912",
"0.46318963",
"0.46309066",
"0.4629201",
"0.45918235",
"0.45689112",
"0.45614251",
"0.45497045",
"0.4512973",
"0.44351712",
"0.43824005",
"0.43801028",
"0.43587154",
"0.43275625",
"0.42692953",
"0.42626518",
"0.4254169"
]
| 0.6178195 | 0 |
Gets the allowInsertColumns property value. Represents the worksheet protection option of allowing inserting columns. | public function getAllowInsertColumns(): ?bool {
$val = $this->getBackingStore()->get('allowInsertColumns');
if (is_null($val) || is_bool($val)) {
return $val;
}
throw new \UnexpectedValueException("Invalid type found in backing store for 'allowInsertColumns'");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAllowableColumns()\n\t{\n\t\treturn $this->_arrColumns;\n\t}",
"public function setAllowInsertColumns(?bool $value): void {\n $this->getBackingStore()->set('allowInsertColumns', $value);\n }",
"public function getAllowDeleteColumns(): ?bool {\n $val = $this->getBackingStore()->get('allowDeleteColumns');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowDeleteColumns'\");\n }",
"public function checkEnableColumnEdit()\n\t{\n\t\treturn false;\n\t}",
"public function getInvalidColumns()\n {\n return $this->invalidColumns;\n }",
"public static function mla_manage_columns_filter( ) {\r\n\t\treturn apply_filters( 'mla_list_table_get_columns', self::$default_columns );\r\n\t}",
"public function getAllowFormatColumns(): ?bool {\n $val = $this->getBackingStore()->get('allowFormatColumns');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowFormatColumns'\");\n }",
"public function setAllowDeleteColumns(?bool $value): void {\n $this->getBackingStore()->set('allowDeleteColumns', $value);\n }",
"public static function getReservedColumns() {\n return array('deleted');\n }",
"public function getImportedColumns()\n {\n return $this->importedColumns;\n }",
"function get_columns( ) {\r\n\t\treturn self::mla_manage_columns_filter();\r\n\t}",
"public function getVisibleColumns()\n {\n $definitions = $this->defineListColumns();\n $columns = [];\n\n /*\n * Supplied column list\n */\n if ($this->columnOverride === null) {\n $this->columnOverride = $this->getSession('visible', null);\n }\n\n if ($this->columnOverride && is_array($this->columnOverride)) {\n\n $invalidColumns = array_diff($this->columnOverride, array_keys($definitions));\n if (!count($definitions)) {\n throw new ApplicationException(Lang::get(\n 'backend::lang.list.missing_column',\n ['columns'=>implode(',', $invalidColumns)]\n ));\n }\n\n $availableColumns = array_intersect($this->columnOverride, array_keys($definitions));\n foreach ($availableColumns as $columnName) {\n $definitions[$columnName]->invisible = false;\n $columns[$columnName] = $definitions[$columnName];\n }\n }\n /*\n * Use default column list\n */\n else {\n foreach ($definitions as $columnName => $column) {\n if ($column->invisible) {\n continue;\n }\n\n $columns[$columnName] = $definitions[$columnName];\n }\n }\n\n return $this->visibleColumns = $columns;\n }",
"public function getAllowSendDirectToAdmin()\n {\n return $this->allow_send_direct_to_admin;\n }",
"public function getAllow() {\r\n\t\treturn $this -> allow;\r\n\t}",
"public function getAllowInsertRows(): ?bool {\n $val = $this->getBackingStore()->get('allowInsertRows');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowInsertRows'\");\n }",
"public function getAllowMissing()\n {\n return $this->allow_missing;\n }",
"public function getColumns() {\n return $this->aColumns;\n }",
"protected function getShowColumnCreateModal()\n {\n $arr_result = [];\n foreach ($this->Columns as $key => $value){\n if (!in_array($key, self::HIDDEN_COLUMNS) && !in_array($key, self::DISABLED_COLUMNS)){\n $arr_result[$key] = $value;\n }\n }\n return $arr_result;\n }",
"public function getAllow() {\r\n return $this->allow;\r\n }",
"public function getValidColumns(array $columns);",
"public function getAllowDeletions() : bool\n {\n return $this->allowDeletions;\n }",
"public function getColumns() {\n\t\treturn $this->columns;\n\t}",
"protected function getRequiredColumns() {\n return array(\n 'Additional Address 1',\n 'Additional Address 2',\n 'Assistant Contact',\n 'Assistant Name',\n 'Check Number',\n 'City',\n 'Contribution Type',\n 'Country',\n 'Description of Stock',\n 'Direct Mail Appeal',\n 'Do Not Email',\n 'Do Not Mail',\n 'Do Not Phone',\n 'Do Not SMS',\n 'Do Not Solicit',\n 'Email',\n 'External Batch Number',\n 'First Name',\n 'Gift Source',\n 'Groups',\n 'Is Opt Out',\n 'Last Name',\n 'Notes',\n 'No Thank You',\n 'Original Amount',\n 'Original Currency',\n 'Phone',\n 'Postal Code',\n 'Postmark Date',\n 'Prefix',\n 'Received Date',\n 'Relationship Type',\n 'Restrictions',\n 'Soft Credit To',\n 'State',\n 'Street Address',\n 'Suffix',\n 'Tags',\n 'Target Contact ID',\n 'Thank You Letter Date',\n 'Transaction ID',\n );\n }",
"public function getColumns() {\n return $this->columns;\n }",
"public function isAllow()\n {\n return $this->allow;\n }",
"public function getColumns()\n\t{\n\t\treturn $this->columns;\n\t}",
"public function getColumns()\n\t{\n\t\treturn $this->columns;\n\t}",
"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 }"
]
| [
"0.6955924",
"0.631058",
"0.58218086",
"0.542392",
"0.5360775",
"0.5234861",
"0.5228486",
"0.51920533",
"0.51700824",
"0.50791425",
"0.5063878",
"0.50584394",
"0.50516677",
"0.50186634",
"0.49649486",
"0.49558473",
"0.49284482",
"0.49251285",
"0.49181503",
"0.49180937",
"0.491462",
"0.48793286",
"0.4877281",
"0.48640046",
"0.48627996",
"0.4849923",
"0.4849923",
"0.4811101",
"0.4811101",
"0.4811101"
]
| 0.66593456 | 1 |
Gets the allowInsertHyperlinks property value. Represents the worksheet protection option of allowing inserting hyperlinks. | public function getAllowInsertHyperlinks(): ?bool {
$val = $this->getBackingStore()->get('allowInsertHyperlinks');
if (is_null($val) || is_bool($val)) {
return $val;
}
throw new \UnexpectedValueException("Invalid type found in backing store for 'allowInsertHyperlinks'");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setAllowInsertHyperlinks(?bool $value): void {\n $this->getBackingStore()->set('allowInsertHyperlinks', $value);\n }",
"protected function hasHyperlinks(Sheet &$oSheet) {\n\t\treturn (isset($this->aHyperlinks[$oSheet->getIdentifier()]) && !empty($this->aHyperlinks[$oSheet->getIdentifier()]));\n\t}",
"public function GetAllowDomains () {\n\t\treturn $this->allowDomains;\n\t}",
"public function getAllow() {\r\n\t\treturn $this -> allow;\r\n\t}",
"public function getAllow() {\r\n return $this->allow;\r\n }",
"public function can_showdirectlink() {\n return true;\n }",
"public function isAllow()\n {\n return $this->allow;\n }",
"static function prevent_image_hotlinks()\r\n {\r\n global $aio_wp_security;\r\n $rules = '';\r\n if ($aio_wp_security->configs->get_value('aiowps_prevent_hotlinking') == '1') {\r\n $url_string = AIOWPSecurity_Utility_Htaccess::return_regularized_url(AIOWPSEC_WP_HOME_URL);\r\n if ($url_string == FALSE) {\r\n $url_string = AIOWPSEC_WP_HOME_URL;\r\n }\r\n $rules .= AIOWPSecurity_Utility_Htaccess::$prevent_image_hotlinks_marker_start . PHP_EOL; //Add feature marker start\r\n $rules .= '<IfModule mod_rewrite.c>' . PHP_EOL;\r\n $rules .= 'RewriteEngine On' . PHP_EOL;\r\n $rules .= 'RewriteCond %{HTTP_REFERER} !^$' . PHP_EOL;\r\n $rules .= 'RewriteCond %{REQUEST_FILENAME} -f' . PHP_EOL;\r\n $rules .= 'RewriteCond %{REQUEST_FILENAME} \\.(gif|jpe?g?|png)$ [NC]' . PHP_EOL;\r\n $rules .= 'RewriteCond %{HTTP_REFERER} !^' . $url_string . ' [NC]' . PHP_EOL;\r\n $rules .= 'RewriteRule \\.(gif|jpe?g?|png)$ - [F,NC,L]' . PHP_EOL;\r\n $rules .= '</IfModule>' . PHP_EOL;\r\n $rules .= AIOWPSecurity_Utility_Htaccess::$prevent_image_hotlinks_marker_end . PHP_EOL; //Add feature marker end\r\n }\r\n\r\n return $rules;\r\n }",
"public function allowDeletion()\n {\n return $this->allowDeletion;\n }",
"public function GetAllowedHostnames () {\n\t\treturn $this->allowedHostnames;\n\t}",
"public function getAllow(): string\n {\n return $this->allow;\n }",
"protected function getAllowedLinkAttributes() {}",
"protected function getAllowedLinkAttributes() {}",
"public function get_allowed_urls()\n {\n }",
"protected function cleanUrlsEnabled()\n {\n return $this->cleanUrlsEnabled;\n }",
"public function isAllowPkInsert()\n {\n return $this->allowPkInsert;\n }",
"public function getAllowDelete($value=''){\t\t\n\t\treturn $this->allow_delete;\n\t}",
"public function getHttpUseHtxAllowableValues()\n {\n return [\n self::HTTP_USE_HTX_ENABLED,\nself::HTTP_USE_HTX_DISABLED, ];\n }",
"public function getIsMenuLinkEnabled(): bool;",
"public function isProtectionEnabled()\n {\n return $this->sheet ||\n $this->objects ||\n $this->scenarios ||\n $this->formatCells ||\n $this->formatColumns ||\n $this->formatRows ||\n $this->insertColumns ||\n $this->insertRows ||\n $this->insertHyperlinks ||\n $this->deleteColumns ||\n $this->deleteRows ||\n $this->selectLockedCells ||\n $this->sort ||\n $this->autoFilter ||\n $this->pivotTables ||\n $this->selectUnlockedCells;\n }",
"public function isProtectionEnabled()\n {\n return $this->sheet ||\n $this->objects ||\n $this->scenarios ||\n $this->formatCells ||\n $this->formatColumns ||\n $this->formatRows ||\n $this->insertColumns ||\n $this->insertRows ||\n $this->insertHyperlinks ||\n $this->deleteColumns ||\n $this->deleteRows ||\n $this->selectLockedCells ||\n $this->sort ||\n $this->autoFilter ||\n $this->pivotTables ||\n $this->selectUnlockedCells;\n }",
"public function isAllowedHistorySlugs()\n {\n return config('admin.sluggable_history', false) === true\n && $this->getProperty('sluggable_history') !== false;\n }",
"function isProtectionEnabled()\n {\n return $this->_sheet || $this->_objects || $this->_scenarios || $this->_formatCells || $this->_formatColumns || $this->_formatRows || $this->_insertColumns || $this->_insertRows || $this->_insertHyperlinks || $this->_deleteColumns || $this->_deleteRows || $this->_selectLockedCells || $this->_sort || $this->_autoFilter || $this->_pivotTables || $this->_selectUnlockedCells;\n }",
"public function getLinkshells() { return $this->Linkshells; }",
"public function getEnableWebAccess()\n {\n return $this->enable_web_access;\n }",
"public function getAllowSendDirectToAdmin()\n {\n return $this->allow_send_direct_to_admin;\n }",
"public function getEnabledLinks()\n {\n switch ($this->LinkMode) {\n \n case self::MODE_PAGES:\n \n $links = ArrayList::create();\n \n foreach ($this->LinkedPages() as $page) {\n $link = $page->toLink();\n $link->setParent($this);\n $links->push($link);\n }\n \n break;\n \n default:\n \n $links = $this->getLinks()->filterByCallback(function ($link) {\n return $link->isEnabled();\n });\n \n }\n \n return $links->sort($this->getSortOrder());\n }",
"function iis7_supports_permalinks()\n {\n }",
"public function getAllowCheck()\n {\n return $this->allow_check;\n }",
"public function getAdminLinks()\n {\n return $this->adminLinks;\n }"
]
| [
"0.66038895",
"0.5367217",
"0.5148911",
"0.5046614",
"0.4988993",
"0.49635375",
"0.49581042",
"0.491536",
"0.4888077",
"0.48060143",
"0.47825983",
"0.4779464",
"0.4779464",
"0.47724277",
"0.47573096",
"0.4725504",
"0.47017333",
"0.4669655",
"0.466447",
"0.46446723",
"0.46446723",
"0.46405256",
"0.46349227",
"0.4629812",
"0.4567371",
"0.45330745",
"0.44898328",
"0.44612986",
"0.442644",
"0.4420844"
]
| 0.6626818 | 0 |
Gets the allowInsertRows property value. Represents the worksheet protection option of allowing inserting rows. | public function getAllowInsertRows(): ?bool {
$val = $this->getBackingStore()->get('allowInsertRows');
if (is_null($val) || is_bool($val)) {
return $val;
}
throw new \UnexpectedValueException("Invalid type found in backing store for 'allowInsertRows'");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setAllowInsertRows(?bool $value): void {\n $this->getBackingStore()->set('allowInsertRows', $value);\n }",
"public function isAllowPkInsert()\n {\n return $this->allowPkInsert;\n }",
"public function getAllowDeleteRows(): ?bool {\n $val = $this->getBackingStore()->get('allowDeleteRows');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowDeleteRows'\");\n }",
"public function setAllowDeleteRows(?bool $value): void {\n $this->getBackingStore()->set('allowDeleteRows', $value);\n }",
"public function getAllowInsertColumns(): ?bool {\n $val = $this->getBackingStore()->get('allowInsertColumns');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowInsertColumns'\");\n }",
"public function getAllowFormatRows(): ?bool {\n $val = $this->getBackingStore()->get('allowFormatRows');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowFormatRows'\");\n }",
"public function canSelectRows()\n\t{\n\t\treturn false;\n\t}",
"public function canSelectRows()\n\t{\n\t\treturn false;\n\t}",
"function canSelectRows()\n\t{\n\t\treturn false;\n\t}",
"public function getEnableRestriction()\n {\n return $this->enable_restriction;\n }",
"function isProtectionEnabled()\n {\n return $this->_sheet || $this->_objects || $this->_scenarios || $this->_formatCells || $this->_formatColumns || $this->_formatRows || $this->_insertColumns || $this->_insertRows || $this->_insertHyperlinks || $this->_deleteColumns || $this->_deleteRows || $this->_selectLockedCells || $this->_sort || $this->_autoFilter || $this->_pivotTables || $this->_selectUnlockedCells;\n }",
"public function isProtectionEnabled()\n {\n return $this->sheet ||\n $this->objects ||\n $this->scenarios ||\n $this->formatCells ||\n $this->formatColumns ||\n $this->formatRows ||\n $this->insertColumns ||\n $this->insertRows ||\n $this->insertHyperlinks ||\n $this->deleteColumns ||\n $this->deleteRows ||\n $this->selectLockedCells ||\n $this->sort ||\n $this->autoFilter ||\n $this->pivotTables ||\n $this->selectUnlockedCells;\n }",
"public function isProtectionEnabled()\n {\n return $this->sheet ||\n $this->objects ||\n $this->scenarios ||\n $this->formatCells ||\n $this->formatColumns ||\n $this->formatRows ||\n $this->insertColumns ||\n $this->insertRows ||\n $this->insertHyperlinks ||\n $this->deleteColumns ||\n $this->deleteRows ||\n $this->selectLockedCells ||\n $this->sort ||\n $this->autoFilter ||\n $this->pivotTables ||\n $this->selectUnlockedCells;\n }",
"public function setAllowFormatRows(?bool $value): void {\n $this->getBackingStore()->set('allowFormatRows', $value);\n }",
"public function isRowAllowedToImport(array $rowData, $rowNum)\n {\n return $this->validateRow($rowData, $rowNum) && !isset($this->_rowsToSkip[$rowNum]);\n }",
"public function getAllow() {\r\n\t\treturn $this -> allow;\r\n\t}",
"public function allowDeletion()\n {\n return $this->allowDeletion;\n }",
"public function getAllow() {\r\n return $this->allow;\r\n }",
"public function isAllow()\n {\n return $this->allow;\n }",
"public function insert_rows($row=1, $numrows=1) {\n $this->worksheet->insertNewRowBefore($row, $numrows);\n }",
"public function getAllowDelete($value=''){\t\t\n\t\treturn $this->allow_delete;\n\t}",
"public function getImportedRowsCount()\n {\n return $this->importedRowsCount;\n }",
"public function setAllowInsertColumns(?bool $value): void {\n $this->getBackingStore()->set('allowInsertColumns', $value);\n }",
"public function getAllowed() {\n return $this->_allowed;\n }",
"public function import()\n {\n return !empty($this->configs['rows_edit']) && $this->configs['rows_edit'] == 1 ? self::rows() : 'files.rows.table_import';\n }",
"public function getInvalidRowsCount()\n {\n return count($this->_invalidRows);\n }",
"public function hasAllowRowInterleaving(){\n return $this->_has(6);\n }",
"protected function allow() {\n\t\t\n\t\treturn true;\n\t}",
"public function isValidCustomRow(){\n return $this->capacity === $this->getNbSeatsCustomRow();\n }",
"public function hasRowRange(){\n return $this->_has(3);\n }"
]
| [
"0.61855775",
"0.5611325",
"0.5558441",
"0.5145965",
"0.5119478",
"0.51138854",
"0.50534266",
"0.50534266",
"0.50307405",
"0.4917508",
"0.4908712",
"0.4892703",
"0.4892703",
"0.48723108",
"0.485548",
"0.4855328",
"0.4849522",
"0.47663546",
"0.47347417",
"0.4656507",
"0.4587393",
"0.45631483",
"0.45532796",
"0.45091897",
"0.4486048",
"0.44525215",
"0.4449376",
"0.4445812",
"0.44382474",
"0.4428364"
]
| 0.6309868 | 0 |
Gets the allowPivotTables property value. Represents the worksheet protection option of allowing using pivot table feature. | public function getAllowPivotTables(): ?bool {
$val = $this->getBackingStore()->get('allowPivotTables');
if (is_null($val) || is_bool($val)) {
return $val;
}
throw new \UnexpectedValueException("Invalid type found in backing store for 'allowPivotTables'");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setAllowPivotTables(?bool $value): void {\n $this->getBackingStore()->set('allowPivotTables', $value);\n }",
"public function isPivot(): bool\n {\n return true;\n }",
"public function allowedPermissions()\n {\n return $this->permissions()->wherePivot('has_access', true)->orderBy('name');\n }",
"public function getPivots(): array\n {\n return $this->pivots;\n }",
"public function getAllowed() {\n return $this->_allowed;\n }",
"public function hasPivotData(): bool;",
"function isProtectionEnabled()\n {\n return $this->_sheet || $this->_objects || $this->_scenarios || $this->_formatCells || $this->_formatColumns || $this->_formatRows || $this->_insertColumns || $this->_insertRows || $this->_insertHyperlinks || $this->_deleteColumns || $this->_deleteRows || $this->_selectLockedCells || $this->_sort || $this->_autoFilter || $this->_pivotTables || $this->_selectUnlockedCells;\n }",
"public function isProtectionEnabled()\n {\n return $this->sheet ||\n $this->objects ||\n $this->scenarios ||\n $this->formatCells ||\n $this->formatColumns ||\n $this->formatRows ||\n $this->insertColumns ||\n $this->insertRows ||\n $this->insertHyperlinks ||\n $this->deleteColumns ||\n $this->deleteRows ||\n $this->selectLockedCells ||\n $this->sort ||\n $this->autoFilter ||\n $this->pivotTables ||\n $this->selectUnlockedCells;\n }",
"public function isProtectionEnabled()\n {\n return $this->sheet ||\n $this->objects ||\n $this->scenarios ||\n $this->formatCells ||\n $this->formatColumns ||\n $this->formatRows ||\n $this->insertColumns ||\n $this->insertRows ||\n $this->insertHyperlinks ||\n $this->deleteColumns ||\n $this->deleteRows ||\n $this->selectLockedCells ||\n $this->sort ||\n $this->autoFilter ||\n $this->pivotTables ||\n $this->selectUnlockedCells;\n }",
"public function isAllow()\n {\n return $this->allow;\n }",
"public function canSetControllablePolicy()\n {\n return $this->canSetControllablePolicy;\n }",
"public function getAllow() {\r\n return $this->allow;\r\n }",
"public function getAllow() {\r\n\t\treturn $this -> allow;\r\n\t}",
"public function canSetControllablePolicy();",
"public function permissions()\n {\n return $this->belongsToMany(Permission::class)->withPivot('has_access');\n }",
"public static function allows ()\r\n {\r\n $acl = Session::get('acl');\r\n return $acl['allows'];\r\n }",
"public function permissions()\n {\n return [\n 'add parcels', 'edit parcels', 'delete parcels', 'send parcels', 'pick parcels'\n ];\n }",
"public function isPerishable(): bool\n {\n return static::$perishable;\n }",
"public function getPermitProperties()\n {\n return $this->permitProperties;\n }",
"public function getDefaultPublicityAllowableValues()\n {\n return [\n self::DEFAULT_PUBLICITY_PUBLIC,\n self::DEFAULT_PUBLICITY_ALLIANCE,\n self::DEFAULT_PUBLICITY_PRIVATE,\n ];\n }",
"public function getDataProtectionRequestsSubtabAllowableValues()\n {\n return [\n self::DATA_PROTECTION_REQUESTS_SUBTAB_DEFAULT_OR_INHERIT,\n self::DATA_PROTECTION_REQUESTS_SUBTAB_HIDE,\n self::DATA_PROTECTION_REQUESTS_SUBTAB_SHOW,\n ];\n }",
"public function getProtectionEligibility()\n {\n return $this->protection_eligibility;\n }",
"public function permissions()\n {\n return $this->belongsToMany(config('rbac.models.permission'))->withTimestamps()->withPivot('granted');\n }",
"public function getProtectionEligibility() {\n\t\treturn $this->_getField(self::$PROTECTION_ELIGIBILITY);\n\t}",
"public function AllowAccessToStepPublic()\n {\n return $this->AllowAccessToStep();\n }",
"public function canSetControllableAcl()\n {\n return $this->canSetControllableAcl;\n }",
"public function getSecuredPacketExemptionAllowed()\n {\n if (array_key_exists(\"securedPacketExemptionAllowed\", $this->_propDict)) {\n return $this->_propDict[\"securedPacketExemptionAllowed\"];\n } else {\n return null;\n }\n }",
"public function getEnforceAdmins() : ?bool\n {\n return $this->enforceAdmins;\n }",
"public function canManagePages();",
"public function perms()\n {\n return $this->belongsToMany(Config::get('guardian.permission'), Config::get('guardian.permission_role_table'), Config::get('guardian.role_foreign_key'), Config::get('guardian.permission_foreign_key'));\n }"
]
| [
"0.6193959",
"0.5860233",
"0.57325906",
"0.52527815",
"0.5249593",
"0.5188731",
"0.51376605",
"0.51086",
"0.51086",
"0.5026638",
"0.4991275",
"0.49473608",
"0.4888292",
"0.48681915",
"0.47798342",
"0.47457567",
"0.46659365",
"0.46457663",
"0.4632858",
"0.4618359",
"0.46172145",
"0.46159473",
"0.45750093",
"0.45628992",
"0.4560668",
"0.4559502",
"0.4523165",
"0.45207742",
"0.45142442",
"0.45117497"
]
| 0.63608164 | 0 |
Gets the allowSort property value. Represents the worksheet protection option of allowing using sort feature. | public function getAllowSort(): ?bool {
$val = $this->getBackingStore()->get('allowSort');
if (is_null($val) || is_bool($val)) {
return $val;
}
throw new \UnexpectedValueException("Invalid type found in backing store for 'allowSort'");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function allowedSorts()\n {\n return [];\n }",
"public function getSortFlags()\n {\n return $this->sortFlags;\n }",
"public function getSortTypeAllowableValues()\n {\n return [\n self::SORT_TYPE_ALPHABETICAL,\n self::SORT_TYPE_COUNT,\n self::SORT_TYPE_VALUE,\n ];\n }",
"public function getSortMode()\n {\n return $this->sortMode;\n }",
"public function getSortDirAllowableValues()\r\n {\r\n return [\r\n self::SORT_DIR_ASC,\r\n self::SORT_DIR_DESC,\r\n ];\r\n }",
"public function setAllowSort(?bool $value): void {\n $this->getBackingStore()->set('allowSort', $value);\n }",
"public function getSortOrderAllowableValues()\n {\n return [\n self::SORT_ORDER_ASC,\n self::SORT_ORDER_DESC,\n ];\n }",
"public function getAllow() {\r\n return $this->allow;\r\n }",
"public function getSort()\n {\n return $this->customSort;\n }",
"public function getIsSortable()\n {\n return $this->isSortable;\n }",
"public function getAllow() {\r\n\t\treturn $this -> allow;\r\n\t}",
"public function getSort() {\n return $this->sort;\n }",
"public function getOrderByAllowed(): string;",
"public function getSort()\n {\n return $this->__sort__;\n }",
"public function isSortable()\n {\n return $this->sortable;\n }",
"public function getSort()\n {\n return $this->sort;\n }",
"public function getSort()\n {\n return $this->sort;\n }",
"public function GetSortType() { return $this->SortType; }",
"public function getSort()\n {\n return $this->tpSort;\n }",
"public function getSort()\n {\n return $this->sortDirection;\n }",
"public function getIsSortable()\n {\n return false;\n }",
"function getSort() {\n return $this->sort;\n }",
"public function isSortable()\n {\n return $this->is_sortable;\n }",
"public function isAllow()\n {\n return $this->allow;\n }",
"public function getSortKeyAllowableValues()\r\n {\r\n return [\r\n self::SORT_KEY_ID,\r\n self::SORT_KEY_PUBLIC_IP_ADDRESS,\r\n self::SORT_KEY_PUBLIC_IPV6_ADDRESS,\r\n self::SORT_KEY_IP_VERSION,\r\n self::SORT_KEY_CREATED_AT,\r\n self::SORT_KEY_UPDATED_AT,\r\n self::SORT_KEY_PUBLIC_BORDER_GROUP,\r\n ];\r\n }",
"public function getSort()\n {\n if ($this->_sort === null) {\n $this->setSort([]);\n }\n\n return $this->_sort;\n }",
"public function getSort()\n {\n return 168;\n }",
"public function getAvailableSorts() {\n return $this->availableSorts;\n }",
"public function getSort()\n {\n return 125;\n }",
"public function isSortable(): bool\n {\n return $this->isSortable;\n }"
]
| [
"0.6732203",
"0.63428926",
"0.6210591",
"0.6125485",
"0.60372406",
"0.5883853",
"0.5879964",
"0.58413833",
"0.58407253",
"0.5784653",
"0.57801265",
"0.5759326",
"0.57544297",
"0.5754024",
"0.57457924",
"0.5734472",
"0.5734472",
"0.5728781",
"0.572367",
"0.5699828",
"0.56891865",
"0.5674597",
"0.5645822",
"0.5587548",
"0.5573929",
"0.55666035",
"0.5557367",
"0.55527294",
"0.5548256",
"0.55274004"
]
| 0.6387333 | 1 |
Sets the allowAutoFilter property value. Represents the worksheet protection option of allowing using auto filter feature. | public function setAllowAutoFilter(?bool $value): void {
$this->getBackingStore()->set('allowAutoFilter', $value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setAllow($value) {\r\n $this->allow = $value;\r\n }",
"public function setFilter($filter)\n {\n if($filter==self::FILTER_ALL or\n $filter==self::FILTER_ACCESSIBLE or\n $filter==self::FILTER_PUBLIC) $this->options['filter']=$filter;\n\n if($this->options['userMode']==self::USER_MODE_PUBLIC and\n !($this->options['filter']==self::FILTER_ACCESSIBLE or $this->options['filter']==self::FILTER_PUBLIC)) $this->options['filter']==self::FILTER_ACCESSIBLE;\n\n return($this->options['filter']);\n }",
"public function setFilter($arrFilter);",
"function allow_configured_filters() {\n return TRUE;\n }",
"public function beforeFilter() {\n if (is_object($this->Auth) && method_exists($this->Auth, 'allow')) {\n $this->Auth->allow();\n }\n }",
"function setFilter($filter) {\n\t\t$this->_filter = $filter;\n\t}",
"public function setAllow($allow) {\r\n\t\treturn $this -> allow = (array)$allow;\r\n\t}",
"private function allowsFilter()\n {\n return config('dingoquerymapper.allowFilters');\n }",
"public function setFilterable(bool $filterable=true): self;",
"public function beforeFilter()\n {\n parent::beforeFilter();\n $this->Auth->allow();\n\n }",
"public function beforeFilter() {\n parent::beforeFilter();\n //$this->Auth->allow();\n }",
"public function filterable()\n {\n return true;\n }",
"public function setFilter(?WorkbookFilter $value): void {\n $this->getBackingStore()->set('filter', $value);\n }",
"public function setFilter($filter){ }",
"protected function setFilter($aFilter)\n {\n // Set filter stuff from configuration.\n if (true === isset($aFilter['Directory'])) {\n foreach ($aFilter['Directory'] as $sDirectory) {\n $this->oObjectFilter->addDirectoryToFilter($sDirectory);\n }\n }\n\n if (true === isset($aFilter['Files'])) {\n foreach ($aFilter['Files'] as $sFile) {\n $this->oObjectFilter->addFileToFilter($sFile);\n }\n }\n\n if (true === isset($aFilter['WhiteListDirectories'])) {\n foreach ($aFilter['WhiteListDirectories'] as $sDirectory) {\n $this->oObjectFilter->addDirectoryToWhiteList($sDirectory);\n }\n }\n\n if (true === isset($aFilter['WhiteListFiles'])) {\n foreach ($aFilter['WhiteListFiles'] as $sFile) {\n $this->oObjectFilter->addFileToWhiteList($sFile);\n }\n }\n }",
"protected function setFilter($aFilter)\n {\n // Set filter stuff from configuration.\n if (true === isset($aFilter['Directory'])) {\n foreach ($aFilter['Directory'] as $sDirectory) {\n $this->oObjectFilter->addDirectoryToFilter($sDirectory);\n }\n }\n\n if (true === isset($aFilter['Files'])) {\n foreach ($aFilter['Files'] as $sFile) {\n $this->oObjectFilter->addFileToFilter($sFile);\n }\n }\n\n if (true === isset($aFilter['WhiteListDirectories'])) {\n foreach ($aFilter['WhiteListDirectories'] as $sDirectory) {\n $this->oObjectFilter->addDirectoryToWhiteList($sDirectory);\n }\n }\n\n if (true === isset($aFilter['WhiteListFiles'])) {\n foreach ($aFilter['WhiteListFiles'] as $sFile) {\n $this->oObjectFilter->addFileToWhiteList($sFile);\n }\n }\n }",
"function beforeFilter()\n {\n $this->Auth->allowedActions = array('index', 'user');\n parent::beforeFilter();\n }",
"function beforeFilter() {\n\t\t$this->Auth->allow('index','add','send','ttt');\n\t\tparent::beforeFilter(); \n\t\t$this->Auth->autoRedirect = false;\n\n\t\t// swiching off Security component for ajax call\n\t\tif( isset($this->Security) && $this->RequestHandler->isAjax() ) {\n\t\t\t$this->Security->enabled = false; \n\t\t}\t\n\t}",
"function beforeFilter(){\n\t\t\n\t\t$this->Auth->allowedActions = array(\n\t\t\t//allow cron to happen with no authentication, we don't need to.\n\t\t\t'cron',\n\t\t\t//allow add_memebers_status to happen with no authentication, to speed it up.\n\t\t\t//it is used by admin_add_members for the progress indicator.\n\t\t\t'admin_add_members_status'\n\t\t);\n\t}",
"public function allowedFilters()\n {\n return [];\n }",
"public function setFilter(string $filter);",
"public function setAllowFileManager($allow);",
"protected function setAuthorTableFilter( $bEnableAuthorTableFileter=false ) {\n $this->oProp->bEnableAuthorTableFileter = $bEnableAuthorTableFileter;\n }",
"public function beforeFilter() {\n\t\tparent::beforeFilter();\n\t\tif ($this->request->action == 'admin_toggle' || \n\t\t\t$this->request->action == 'admin_add_smart' ||\n\t\t\t$this->request->action == 'admin_save_condition' ) {\n\t\t\t$this->Components->disable('Security');\n\t\t}\n\t}",
"public function beforeFilter()\n {\n $this->Auth->allow('index');\n //$this->Auth->allow('ajax_mypage');\n $this->Auth->allow('ajax_index');\n }",
"public function beforeFilter() \n\t{\n\t\tparent::BeforeFilter();\n\t\t$this->Auth->allowedActions = array('index', 'view');\n\t}",
"public function beforeFilter() {\n \tparent::beforeFilter();\n\t\t$this->Auth->allow('');\n\t}",
"public function setOnboardingFilter(bool $onboarding_filter) {\n $this->onboarding_filter = (int) $onboarding_filter;\n\n }",
"function beforeFilter() \r\n\t{\r\n\t\tparent::beforeFilter();\r\n\t\t$this->Auth->allow('gateway');\r\n\r\n\t\t$this->autoRender = false;\r\n\r\n }",
"public function filterable($value) {\n return $this->setProperty('filterable', $value);\n }"
]
| [
"0.5925527",
"0.53225154",
"0.52137244",
"0.5204544",
"0.519892",
"0.5113878",
"0.508951",
"0.5057619",
"0.50349826",
"0.5010782",
"0.4989251",
"0.49856418",
"0.4970983",
"0.49706158",
"0.49438718",
"0.49438718",
"0.49438",
"0.4886379",
"0.48820034",
"0.48763442",
"0.48681644",
"0.48089102",
"0.48008242",
"0.48000333",
"0.4788545",
"0.4787281",
"0.47872746",
"0.47749805",
"0.47673854",
"0.4756692"
]
| 0.70581305 | 0 |
Sets the allowDeleteColumns property value. Represents the worksheet protection option of allowing deleting columns. | public function setAllowDeleteColumns(?bool $value): void {
$this->getBackingStore()->set('allowDeleteColumns', $value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setAllowDeletions(bool $allowDeletions) : self\n {\n $this->initialized['allowDeletions'] = true;\n $this->allowDeletions = $allowDeletions;\n return $this;\n }",
"function allowDelete($allow){\n\t\t$this->canDelete=$allow;\n\t}",
"public function setAllowInsertColumns(?bool $value): void {\n $this->getBackingStore()->set('allowInsertColumns', $value);\n }",
"public function getAllowableColumns()\n\t{\n\t\treturn $this->_arrColumns;\n\t}",
"public function setAllowFormatColumns(?bool $value): void {\n $this->getBackingStore()->set('allowFormatColumns', $value);\n }",
"public function getAllowDeleteColumns(): ?bool {\n $val = $this->getBackingStore()->get('allowDeleteColumns');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowDeleteColumns'\");\n }",
"public function setAllowDeleteRows(?bool $value): void {\n $this->getBackingStore()->set('allowDeleteRows', $value);\n }",
"public function setAllowSearchColumn($columns){\n\t\tif(is_array($columns))\n\t\t{\n\t\t\tforeach($columns AS $column)\n\t\t\t{\n\t\t\t\t$this->allowSearchColumns[] = $this->tablename . \".\" . $column;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->allowSearchColumns[] = $this->tablename . \".\" . $columns;\n\t\t}\n\t}",
"public static function getReservedColumns() {\n return array('deleted');\n }",
"public function getAllowDelete($value=''){\t\t\n\t\treturn $this->allow_delete;\n\t}",
"public function can_delete () {\r\n\r\n return $this->permissions[\"D\"] ? true : false;\r\n\r\n }",
"public function getAllowDeletions() : bool\n {\n return $this->allowDeletions;\n }",
"public function allowDeletion()\n {\n return $this->allowDeletion;\n }",
"function canDelete() {\n return true;\n }",
"public function checkEnableColumnEdit()\n\t{\n\t\treturn false;\n\t}",
"public function setAdminPermissions(array $permissions): void;",
"public function setColumns(array $columns);",
"public function disableDeleteClause() {}",
"protected function _can_delete($delete_id) {\r\n return true;\r\n }",
"function remove_admin_columns() {\n remove_post_type_support( 'post', 'comments' );\n remove_post_type_support( 'page', 'comments' );\n remove_post_type_support( 'attachment', 'comments' );\n remove_post_type_support( 'post', 'author' );\n remove_post_type_support( 'page', 'author' );\n}",
"public function setColumns(array $columns);",
"public function allowToSetOptions($allow){\n $this->allowToSetOptions = (bool)$allow;\n }",
"public function setAllowSendDirectToAdmin($var)\n {\n GPBUtil::checkBool($var);\n $this->allow_send_direct_to_admin = $var;\n }",
"public function setIsDeleteable($value)\n {\n $this->_isDeleteable = (bool) $value;\n return $this;\n }",
"public function setColumns($columns)\n {\n $this->columns = $columns;\n }",
"public function setAllow($value) {\r\n $this->allow = $value;\r\n }",
"public static function setColumns($columns) {\n\t\tself::$columns = $columns;\n\t}",
"public function canDelete()\n {\n return 1;\n }",
"public function getColumnListDDL($columns, $delimiter = ',');",
"public function deleteColumns( $columns )\r\n {\r\n rsort( $columns );\r\n foreach ($columns as $column) {\r\n $this->deleteColumn( $column );\r\n }\r\n }"
]
| [
"0.5950046",
"0.5890449",
"0.5841001",
"0.57903403",
"0.5676563",
"0.54180944",
"0.5368394",
"0.50802976",
"0.5071956",
"0.49379215",
"0.48585194",
"0.48417962",
"0.4823687",
"0.4715869",
"0.46943343",
"0.46924132",
"0.4592714",
"0.45750594",
"0.4565971",
"0.45096895",
"0.450495",
"0.4494992",
"0.44697863",
"0.44683847",
"0.44548494",
"0.44534925",
"0.4437608",
"0.44208267",
"0.441276",
"0.44086784"
]
| 0.7294771 | 0 |
Sets the allowDeleteRows property value. Represents the worksheet protection option of allowing deleting rows. | public function setAllowDeleteRows(?bool $value): void {
$this->getBackingStore()->set('allowDeleteRows', $value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function allowDelete($allow){\n\t\t$this->canDelete=$allow;\n\t}",
"public function setAllowFormatRows(?bool $value): void {\n $this->getBackingStore()->set('allowFormatRows', $value);\n }",
"public function setAllowInsertRows(?bool $value): void {\n $this->getBackingStore()->set('allowInsertRows', $value);\n }",
"public function setAllowDeletions(bool $allowDeletions) : self\n {\n $this->initialized['allowDeletions'] = true;\n $this->allowDeletions = $allowDeletions;\n return $this;\n }",
"public function setAllowDeleteColumns(?bool $value): void {\n $this->getBackingStore()->set('allowDeleteColumns', $value);\n }",
"public function getAllowDeleteRows(): ?bool {\n $val = $this->getBackingStore()->get('allowDeleteRows');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowDeleteRows'\");\n }",
"public function disableDeleteClause() {}",
"function DeleteRows() {\n\t\tglobal $Language, $Security;\n\t\tif (!$Security->CanDelete()) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoDeletePermission\")); // No delete permission\n\t\t\treturn FALSE;\n\t\t}\n\t\t$DeleteRows = TRUE;\n\t\t$sSql = $this->SQL();\n\t\t$conn = &$this->Connection();\n\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t$rs = $conn->Execute($sSql);\n\t\t$conn->raiseErrorFn = '';\n\t\tif ($rs === FALSE) {\n\t\t\treturn FALSE;\n\t\t} elseif ($rs->EOF) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoRecord\")); // No record found\n\t\t\t$rs->Close();\n\t\t\treturn FALSE;\n\n\t\t//} else {\n\t\t//\t$this->LoadRowValues($rs); // Load row values\n\n\t\t}\n\t\t$rows = ($rs) ? $rs->GetRows() : array();\n\t\t$conn->BeginTrans();\n\n\t\t// Clone old rows\n\t\t$rsold = $rows;\n\t\tif ($rs)\n\t\t\t$rs->Close();\n\n\t\t// Call row deleting event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$DeleteRows = $this->Row_Deleting($row);\n\t\t\t\tif (!$DeleteRows) break;\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$sKey = \"\";\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$sThisKey = \"\";\n\t\t\t\tif ($sThisKey <> \"\") $sThisKey .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\n\t\t\t\t$sThisKey .= $row['id'];\n\t\t\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t\t\t$DeleteRows = $this->Delete($row); // Delete\n\t\t\t\t$conn->raiseErrorFn = '';\n\t\t\t\tif ($DeleteRows === FALSE)\n\t\t\t\t\tbreak;\n\t\t\t\tif ($sKey <> \"\") $sKey .= \", \";\n\t\t\t\t$sKey .= $sThisKey;\n\t\t\t}\n\t\t} else {\n\n\t\t\t// Set up error message\n\t\t\tif ($this->getSuccessMessage() <> \"\" || $this->getFailureMessage() <> \"\") {\n\n\t\t\t\t// Use the message, do nothing\n\t\t\t} elseif ($this->CancelMessage <> \"\") {\n\t\t\t\t$this->setFailureMessage($this->CancelMessage);\n\t\t\t\t$this->CancelMessage = \"\";\n\t\t\t} else {\n\t\t\t\t$this->setFailureMessage($Language->Phrase(\"DeleteCancelled\"));\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$conn->CommitTrans(); // Commit the changes\n\t\t} else {\n\t\t\t$conn->RollbackTrans(); // Rollback changes\n\t\t}\n\n\t\t// Call Row Deleted event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$this->Row_Deleted($row);\n\t\t\t}\n\t\t}\n\t\treturn $DeleteRows;\n\t}",
"function canSelectRows()\n\t{\n\t\treturn false;\n\t}",
"function DeleteRows() {\n\t\tglobal $Language, $Security;\n\t\tif (!$Security->CanDelete()) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoDeletePermission\")); // No delete permission\n\t\t\treturn FALSE;\n\t\t}\n\t\t$DeleteRows = TRUE;\n\t\t$sSql = $this->SQL();\n\t\t$conn = &$this->Connection();\n\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t$rs = $conn->Execute($sSql);\n\t\t$conn->raiseErrorFn = '';\n\t\tif ($rs === FALSE) {\n\t\t\treturn FALSE;\n\t\t} elseif ($rs->EOF) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoRecord\")); // No record found\n\t\t\t$rs->Close();\n\t\t\treturn FALSE;\n\t\t}\n\t\t$rows = ($rs) ? $rs->GetRows() : array();\n\t\t$conn->BeginTrans();\n\n\t\t// Clone old rows\n\t\t$rsold = $rows;\n\t\tif ($rs)\n\t\t\t$rs->Close();\n\n\t\t// Call row deleting event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$DeleteRows = $this->Row_Deleting($row);\n\t\t\t\tif (!$DeleteRows) break;\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$sKey = \"\";\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$sThisKey = \"\";\n\t\t\t\tif ($sThisKey <> \"\") $sThisKey .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\n\t\t\t\t$sThisKey .= $row['row_id'];\n\t\t\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t\t\t$DeleteRows = $this->Delete($row); // Delete\n\t\t\t\t$conn->raiseErrorFn = '';\n\t\t\t\tif ($DeleteRows === FALSE)\n\t\t\t\t\tbreak;\n\t\t\t\tif ($sKey <> \"\") $sKey .= \", \";\n\t\t\t\t$sKey .= $sThisKey;\n\t\t\t}\n\t\t}\n\t\tif (!$DeleteRows) {\n\n\t\t\t// Set up error message\n\t\t\tif ($this->getSuccessMessage() <> \"\" || $this->getFailureMessage() <> \"\") {\n\n\t\t\t\t// Use the message, do nothing\n\t\t\t} elseif ($this->CancelMessage <> \"\") {\n\t\t\t\t$this->setFailureMessage($this->CancelMessage);\n\t\t\t\t$this->CancelMessage = \"\";\n\t\t\t} else {\n\t\t\t\t$this->setFailureMessage($Language->Phrase(\"DeleteCancelled\"));\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$conn->CommitTrans(); // Commit the changes\n\t\t} else {\n\t\t\t$conn->RollbackTrans(); // Rollback changes\n\t\t}\n\n\t\t// Call Row Deleted event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$this->Row_Deleted($row);\n\t\t\t}\n\t\t}\n\t\treturn $DeleteRows;\n\t}",
"function DeleteRows() {\n\t\tglobal $Language, $Security;\n\t\tif (!$Security->CanDelete()) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoDeletePermission\")); // No delete permission\n\t\t\treturn FALSE;\n\t\t}\n\t\t$DeleteRows = TRUE;\n\t\t$sSql = $this->SQL();\n\t\t$conn = &$this->Connection();\n\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t$rs = $conn->Execute($sSql);\n\t\t$conn->raiseErrorFn = '';\n\t\tif ($rs === FALSE) {\n\t\t\treturn FALSE;\n\t\t} elseif ($rs->EOF) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoRecord\")); // No record found\n\t\t\t$rs->Close();\n\t\t\treturn FALSE;\n\n\t\t//} else {\n\t\t//\t$this->LoadRowValues($rs); // Load row values\n\n\t\t}\n\t\t$rows = ($rs) ? $rs->GetRows() : array();\n\t\t$conn->BeginTrans();\n\n\t\t// Clone old rows\n\t\t$rsold = $rows;\n\t\tif ($rs)\n\t\t\t$rs->Close();\n\n\t\t// Call row deleting event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$DeleteRows = $this->Row_Deleting($row);\n\t\t\t\tif (!$DeleteRows) break;\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$sKey = \"\";\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$sThisKey = \"\";\n\t\t\t\tif ($sThisKey <> \"\") $sThisKey .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\n\t\t\t\t$sThisKey .= $row['pegawai_id'];\n\t\t\t\tif ($sThisKey <> \"\") $sThisKey .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\n\t\t\t\t$sThisKey .= $row['tgl_shift'];\n\t\t\t\tif ($sThisKey <> \"\") $sThisKey .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\n\t\t\t\t$sThisKey .= $row['khusus_lembur'];\n\t\t\t\tif ($sThisKey <> \"\") $sThisKey .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\n\t\t\t\t$sThisKey .= $row['khusus_extra'];\n\t\t\t\tif ($sThisKey <> \"\") $sThisKey .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\n\t\t\t\t$sThisKey .= $row['temp_id_auto'];\n\t\t\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t\t\t$DeleteRows = $this->Delete($row); // Delete\n\t\t\t\t$conn->raiseErrorFn = '';\n\t\t\t\tif ($DeleteRows === FALSE)\n\t\t\t\t\tbreak;\n\t\t\t\tif ($sKey <> \"\") $sKey .= \", \";\n\t\t\t\t$sKey .= $sThisKey;\n\t\t\t}\n\t\t} else {\n\n\t\t\t// Set up error message\n\t\t\tif ($this->getSuccessMessage() <> \"\" || $this->getFailureMessage() <> \"\") {\n\n\t\t\t\t// Use the message, do nothing\n\t\t\t} elseif ($this->CancelMessage <> \"\") {\n\t\t\t\t$this->setFailureMessage($this->CancelMessage);\n\t\t\t\t$this->CancelMessage = \"\";\n\t\t\t} else {\n\t\t\t\t$this->setFailureMessage($Language->Phrase(\"DeleteCancelled\"));\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$conn->CommitTrans(); // Commit the changes\n\t\t} else {\n\t\t\t$conn->RollbackTrans(); // Rollback changes\n\t\t}\n\n\t\t// Call Row Deleted event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$this->Row_Deleted($row);\n\t\t\t}\n\t\t}\n\t\treturn $DeleteRows;\n\t}",
"function DeleteRows() {\n\t\tglobal $Language, $Security;\n\t\tif (!$Security->CanDelete()) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoDeletePermission\")); // No delete permission\n\t\t\treturn FALSE;\n\t\t}\n\t\t$DeleteRows = TRUE;\n\t\t$sSql = $this->SQL();\n\t\t$conn = &$this->Connection();\n\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t$rs = $conn->Execute($sSql);\n\t\t$conn->raiseErrorFn = '';\n\t\tif ($rs === FALSE) {\n\t\t\treturn FALSE;\n\t\t} elseif ($rs->EOF) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoRecord\")); // No record found\n\t\t\t$rs->Close();\n\t\t\treturn FALSE;\n\t\t}\n\t\t$rows = ($rs) ? $rs->GetRows() : array();\n\t\t$conn->BeginTrans();\n\n\t\t// Clone old rows\n\t\t$rsold = $rows;\n\t\tif ($rs)\n\t\t\t$rs->Close();\n\n\t\t// Call row deleting event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$DeleteRows = $this->Row_Deleting($row);\n\t\t\t\tif (!$DeleteRows) break;\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$sKey = \"\";\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$sThisKey = \"\";\n\t\t\t\tif ($sThisKey <> \"\") $sThisKey .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\n\t\t\t\t$sThisKey .= $row['id'];\n\t\t\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t\t\t$DeleteRows = $this->Delete($row); // Delete\n\t\t\t\t$conn->raiseErrorFn = '';\n\t\t\t\tif ($DeleteRows === FALSE)\n\t\t\t\t\tbreak;\n\t\t\t\tif ($sKey <> \"\") $sKey .= \", \";\n\t\t\t\t$sKey .= $sThisKey;\n\t\t\t}\n\t\t}\n\t\tif (!$DeleteRows) {\n\n\t\t\t// Set up error message\n\t\t\tif ($this->getSuccessMessage() <> \"\" || $this->getFailureMessage() <> \"\") {\n\n\t\t\t\t// Use the message, do nothing\n\t\t\t} elseif ($this->CancelMessage <> \"\") {\n\t\t\t\t$this->setFailureMessage($this->CancelMessage);\n\t\t\t\t$this->CancelMessage = \"\";\n\t\t\t} else {\n\t\t\t\t$this->setFailureMessage($Language->Phrase(\"DeleteCancelled\"));\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$conn->CommitTrans(); // Commit the changes\n\t\t} else {\n\t\t\t$conn->RollbackTrans(); // Rollback changes\n\t\t}\n\n\t\t// Call Row Deleted event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$this->Row_Deleted($row);\n\t\t\t}\n\t\t}\n\t\treturn $DeleteRows;\n\t}",
"function canDelete() {\n return true;\n }",
"function DeleteRows() {\n\t\tglobal $Language, $Security;\n\t\tif (!$Security->CanDelete()) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoDeletePermission\")); // No delete permission\n\t\t\treturn FALSE;\n\t\t}\n\t\t$DeleteRows = TRUE;\n\t\t$sSql = $this->SQL();\n\t\t$conn = &$this->Connection();\n\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t$rs = $conn->Execute($sSql);\n\t\t$conn->raiseErrorFn = '';\n\t\tif ($rs === FALSE) {\n\t\t\treturn FALSE;\n\t\t} elseif ($rs->EOF) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoRecord\")); // No record found\n\t\t\t$rs->Close();\n\t\t\treturn FALSE;\n\n\t\t//} else {\n\t\t//\t$this->LoadRowValues($rs); // Load row values\n\n\t\t}\n\t\t$rows = ($rs) ? $rs->GetRows() : array();\n\t\t$conn->BeginTrans();\n\n\t\t// Clone old rows\n\t\t$rsold = $rows;\n\t\tif ($rs)\n\t\t\t$rs->Close();\n\n\t\t// Call row deleting event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$DeleteRows = $this->Row_Deleting($row);\n\t\t\t\tif (!$DeleteRows) break;\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$sKey = \"\";\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$sThisKey = \"\";\n\t\t\t\tif ($sThisKey <> \"\") $sThisKey .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\n\t\t\t\t$sThisKey .= $row['Id_tercero'];\n\t\t\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t\t\t$DeleteRows = $this->Delete($row); // Delete\n\t\t\t\t$conn->raiseErrorFn = '';\n\t\t\t\tif ($DeleteRows === FALSE)\n\t\t\t\t\tbreak;\n\t\t\t\tif ($sKey <> \"\") $sKey .= \", \";\n\t\t\t\t$sKey .= $sThisKey;\n\t\t\t}\n\t\t} else {\n\n\t\t\t// Set up error message\n\t\t\tif ($this->getSuccessMessage() <> \"\" || $this->getFailureMessage() <> \"\") {\n\n\t\t\t\t// Use the message, do nothing\n\t\t\t} elseif ($this->CancelMessage <> \"\") {\n\t\t\t\t$this->setFailureMessage($this->CancelMessage);\n\t\t\t\t$this->CancelMessage = \"\";\n\t\t\t} else {\n\t\t\t\t$this->setFailureMessage($Language->Phrase(\"DeleteCancelled\"));\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$conn->CommitTrans(); // Commit the changes\n\t\t} else {\n\t\t\t$conn->RollbackTrans(); // Rollback changes\n\t\t}\n\n\t\t// Call Row Deleted event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$this->Row_Deleted($row);\n\t\t\t}\n\t\t}\n\t\treturn $DeleteRows;\n\t}",
"function DeleteRows() {\n\t\tglobal $Language, $Security;\n\t\tif (!$Security->CanDelete()) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoDeletePermission\")); // No delete permission\n\t\t\treturn FALSE;\n\t\t}\n\t\t$DeleteRows = TRUE;\n\t\t$sSql = $this->SQL();\n\t\t$conn = &$this->Connection();\n\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t$rs = $conn->Execute($sSql);\n\t\t$conn->raiseErrorFn = '';\n\t\tif ($rs === FALSE) {\n\t\t\treturn FALSE;\n\t\t} elseif ($rs->EOF) {\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoRecord\")); // No record found\n\t\t\t$rs->Close();\n\t\t\treturn FALSE;\n\n\t\t//} else {\n\t\t//\t$this->LoadRowValues($rs); // Load row values\n\n\t\t}\n\t\t$rows = ($rs) ? $rs->GetRows() : array();\n\t\t$conn->BeginTrans();\n\n\t\t// Clone old rows\n\t\t$rsold = $rows;\n\t\tif ($rs)\n\t\t\t$rs->Close();\n\n\t\t// Call row deleting event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$DeleteRows = $this->Row_Deleting($row);\n\t\t\t\tif (!$DeleteRows) break;\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$sKey = \"\";\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$sThisKey = \"\";\n\t\t\t\tif ($sThisKey <> \"\") $sThisKey .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\n\t\t\t\t$sThisKey .= $row['Id_Item'];\n\t\t\t\t$conn->raiseErrorFn = $GLOBALS[\"EW_ERROR_FN\"];\n\t\t\t\t$DeleteRows = $this->Delete($row); // Delete\n\t\t\t\t$conn->raiseErrorFn = '';\n\t\t\t\tif ($DeleteRows === FALSE)\n\t\t\t\t\tbreak;\n\t\t\t\tif ($sKey <> \"\") $sKey .= \", \";\n\t\t\t\t$sKey .= $sThisKey;\n\t\t\t}\n\t\t} else {\n\n\t\t\t// Set up error message\n\t\t\tif ($this->getSuccessMessage() <> \"\" || $this->getFailureMessage() <> \"\") {\n\n\t\t\t\t// Use the message, do nothing\n\t\t\t} elseif ($this->CancelMessage <> \"\") {\n\t\t\t\t$this->setFailureMessage($this->CancelMessage);\n\t\t\t\t$this->CancelMessage = \"\";\n\t\t\t} else {\n\t\t\t\t$this->setFailureMessage($Language->Phrase(\"DeleteCancelled\"));\n\t\t\t}\n\t\t}\n\t\tif ($DeleteRows) {\n\t\t\t$conn->CommitTrans(); // Commit the changes\n\t\t} else {\n\t\t\t$conn->RollbackTrans(); // Rollback changes\n\t\t}\n\n\t\t// Call Row Deleted event\n\t\tif ($DeleteRows) {\n\t\t\tforeach ($rsold as $row) {\n\t\t\t\t$this->Row_Deleted($row);\n\t\t\t}\n\t\t}\n\t\treturn $DeleteRows;\n\t}",
"public function getAllowDelete($value=''){\t\t\n\t\treturn $this->allow_delete;\n\t}",
"public function setAllow($allow) {\r\n\t\treturn $this -> allow = (array)$allow;\r\n\t}",
"public function allowDeletion()\n {\n return $this->allowDeletion;\n }",
"function DeleteRows() {\r\n\t\tglobal $conn, $Language, $Security;\r\n\t\t$DeleteRows = TRUE;\r\n\t\t$sSql = $this->SQL();\r\n\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\r\n\t\t$rs = $conn->Execute($sSql);\r\n\t\t$conn->raiseErrorFn = '';\r\n\t\tif ($rs === FALSE) {\r\n\t\t\treturn FALSE;\r\n\t\t} elseif ($rs->EOF) {\r\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoRecord\")); // No record found\r\n\t\t\t$rs->Close();\r\n\t\t\treturn FALSE;\r\n\t\t} else {\r\n\t\t\t$this->LoadRowValues($rs); // Load row values\r\n\t\t}\r\n\t\tif (!$Security->CanDelete()) {\r\n\t\t\t$this->setFailureMessage($Language->Phrase(\"NoDeletePermission\")); // No delete permission\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\t$conn->BeginTrans();\r\n\r\n\t\t// Clone old rows\r\n\t\t$rsold = ($rs) ? $rs->GetRows() : array();\r\n\t\tif ($rs)\r\n\t\t\t$rs->Close();\r\n\r\n\t\t// Call row deleting event\r\n\t\tif ($DeleteRows) {\r\n\t\t\tforeach ($rsold as $row) {\r\n\t\t\t\t$DeleteRows = $this->Row_Deleting($row);\r\n\t\t\t\tif (!$DeleteRows) break;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($DeleteRows) {\r\n\t\t\t$sKey = \"\";\r\n\t\t\tforeach ($rsold as $row) {\r\n\t\t\t\t$sThisKey = \"\";\r\n\t\t\t\tif ($sThisKey <> \"\") $sThisKey .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\r\n\t\t\t\t$sThisKey .= $row['identries'];\r\n\t\t\t\tif ($sThisKey <> \"\") $sThisKey .= $GLOBALS[\"EW_COMPOSITE_KEY_SEPARATOR\"];\r\n\t\t\t\t$sThisKey .= $row['id'];\r\n\t\t\t\t$conn->raiseErrorFn = 'ew_ErrorFn';\r\n\t\t\t\t$DeleteRows = $this->Delete($row); // Delete\r\n\t\t\t\t$conn->raiseErrorFn = '';\r\n\t\t\t\tif ($DeleteRows === FALSE)\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tif ($sKey <> \"\") $sKey .= \", \";\r\n\t\t\t\t$sKey .= $sThisKey;\r\n\t\t\t}\r\n\t\t} else {\r\n\r\n\t\t\t// Set up error message\r\n\t\t\tif ($this->getSuccessMessage() <> \"\" || $this->getFailureMessage() <> \"\") {\r\n\r\n\t\t\t\t// Use the message, do nothing\r\n\t\t\t} elseif ($this->CancelMessage <> \"\") {\r\n\t\t\t\t$this->setFailureMessage($this->CancelMessage);\r\n\t\t\t\t$this->CancelMessage = \"\";\r\n\t\t\t} else {\r\n\t\t\t\t$this->setFailureMessage($Language->Phrase(\"DeleteCancelled\"));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($DeleteRows) {\r\n\t\t\t$conn->CommitTrans(); // Commit the changes\r\n\t\t} else {\r\n\t\t\t$conn->RollbackTrans(); // Rollback changes\r\n\t\t}\r\n\r\n\t\t// Call Row Deleted event\r\n\t\tif ($DeleteRows) {\r\n\t\t\tforeach ($rsold as $row) {\r\n\t\t\t\t$this->Row_Deleted($row);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $DeleteRows;\r\n\t}",
"public function canSelectRows()\n\t{\n\t\treturn false;\n\t}",
"public function canSelectRows()\n\t{\n\t\treturn false;\n\t}",
"function allowResize($allow){\n\t\t$this->headerResizable=$allow;\n\t}",
"public function setRows($rows) {\n $this->rows = $rows;\n }",
"public function setRows($rows);",
"abstract function allowDeleteAction();",
"public function allowToSetOptions($allow){\n $this->allowToSetOptions = (bool)$allow;\n }",
"public function deleteRow($row);",
"protected function canDelete($record)\n {\n return true;\n }",
"public function setAllow($value) {\r\n $this->allow = $value;\r\n }",
"public function deleteRows( $rows )\r\n {\r\n rsort( $rows );\r\n foreach ($rows as $row) {\r\n $this->deleteRow( $row );\r\n }\r\n }"
]
| [
"0.62545216",
"0.5846641",
"0.5784255",
"0.52910304",
"0.5195974",
"0.51091963",
"0.50455886",
"0.49867865",
"0.4981466",
"0.49717027",
"0.49549872",
"0.49489304",
"0.4936727",
"0.49312142",
"0.4919258",
"0.4884218",
"0.4853141",
"0.48246723",
"0.48138165",
"0.48099166",
"0.48099166",
"0.47687325",
"0.4742673",
"0.4741818",
"0.47124577",
"0.46824947",
"0.46782884",
"0.46769717",
"0.4669013",
"0.46676376"
]
| 0.72851735 | 0 |
Sets the allowFormatCells property value. Represents the worksheet protection option of allowing formatting cells. | public function setAllowFormatCells(?bool $value): void {
$this->getBackingStore()->set('allowFormatCells', $value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setAllowFormatRows(?bool $value): void {\n $this->getBackingStore()->set('allowFormatRows', $value);\n }",
"public function setAllowFormatColumns(?bool $value): void {\n $this->getBackingStore()->set('allowFormatColumns', $value);\n }",
"function enableFormatting($format = true)\n {\n $this->formatFields = $format;\n }",
"public function setAllow($allow) {\r\n\t\treturn $this -> allow = (array)$allow;\r\n\t}",
"public function setCellFormat($row, $column, $format) {\n\t}",
"public function setAllowableFormat($array_allowable_ext)\n {\n if ($array_allowable_ext == '*') {\n $this->allowable_ext = '*';\n return;\n }\n\n if (is_array($array_allowable_ext)) {\n $this->allowable_ext = $array_allowable_ext;\n } else {\n echo 'setAllowableFormat method error : The argument for must be an array';\n return;\n }\n }",
"public function setAllow($value) {\r\n $this->allow = $value;\r\n }",
"function allowResize($allow){\n\t\t$this->headerResizable=$allow;\n\t}",
"public function applyFormat($format) {\n\t\tif ($this->isSupervisor) {\n\t\t\t$range = $this->getSelectedCells();\n\n\t\t\t// Uppercase coordinate\n\t\t\t$range = strtoupper($range);\n\n\t\t\t// Is it a cell range or a single cell?\n\t\t\tif (strpos($range, ':') === false) {\n\t\t\t\t$rangeA = $range;\n\t\t\t\t$rangeB = $range;\n\t\t\t} else {\n\t\t\t\t$a = explode(':', $range);\n\t\t\t\t$rangeA = $a[0];\n\t\t\t\t$rangeB = $a[1];\n\t\t\t}\n\n\t\t\t// Calculate range outer borders\n\t\t\t$rangeStart = Coordinates::parse($rangeA);\n\t\t\t$rangeEnd = Coordinates::parse($rangeB);\n\n\t\t\t// SIMPLE MODE:\n\t\t\t// Selection type, inspect\n\t\t\tif (1 == preg_match('/^[A-Z]+1:[A-Z]+1048576$/sD', $range)) {\n\t\t\t\t$selectionType = 'COLUMN';\n\t\t\t} elseif (1 == preg_match('/^A[0-9]+:XFD[0-9]+$/sD', $range)) {\n\t\t\t\t$selectionType = 'ROW';\n\t\t\t} else {\n\t\t\t\t$selectionType = 'CELL';\n\t\t\t}\n\n\t\t\t// First loop through columns, rows, or cells to find out which styles\n\t\t\t// are affected by this operation\n\t\t\t$oldXfIndexes = /*. (boolean[int]) .*/ array();\n\t\t\tswitch ($selectionType) {\n\t\t\t\tcase 'COLUMN':\n//\t\t\t\t\tfor ($col = $rangeStart[0]; $col <= $rangeEnd[0]; ++$col) {\n//\t\t\t\t\t\t$oldXfIndexes[$this->getActiveSheet()\n//\t\t\t\t\t\t\t\t->getColumnDimensionByColumn($col)\n//\t\t\t\t\t\t\t\t->getXfIndex()] = true;\n//\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ROW':\n//\t\t\t\t\tfor ($row = $rangeStart[1]; $row <= $rangeEnd[1]; ++$row) {\n//\t\t\t\t\t\tif ($this->getActiveSheet()->getRowDimension($row)->getXfIndex() === null) {\n//\t\t\t\t\t\t\t$oldXfIndexes[0] = true; // row without explicit style should be formatted based on default style\n//\t\t\t\t\t\t} else {\n//\t\t\t\t\t\t\t$oldXfIndexes[$this->getActiveSheet()->getRowDimension($row)->getXfIndex()] = true;\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'CELL':\n\t\t\t\t\tfor ($col = $rangeStart->getColumnNumber(); $col <= $rangeEnd->getColumnNumber(); ++$col) {\n\t\t\t\t\t\tfor ($row = $rangeStart->getRow(); $row <= $rangeEnd->getRow(); ++$row) {\n\t\t\t\t\t\t\t$oldXfIndexes[$this->getActiveSheet()->getCellByColumnAndRow($col, $row)->getXfIndex()] = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: throw new \\RuntimeException();\n\t\t\t}\n\n\t\t\t// clone each of the affected styles, apply the style array, and add\n\t\t\t// the new styles to the workbook\n\t\t\t$workbook = $this->workbook;\n\t\t\t$newXfIndexes = /*. (int[int]) .*/ array();\n\t\t\tforeach ($oldXfIndexes as $oldXfIndex => $dummy) {\n\t\t\t\t$style = $workbook->getCellXfByIndex($oldXfIndex);\n\t\t\t\t$newStyle = clone $style;\n\t\t\t\t$newStyle->applyFormat($format);\n\n\t\t\t\t$existingStyle = $this->applyFormat_searchEqualXf($newStyle);\n\t\t\t\tif ($existingStyle !== NULL) {\n\t\t\t\t\t// there is already such cell Xf in our collection\n\t\t\t\t\t$newXfIndexes[$oldXfIndex] = $existingStyle->getIndex();\n\t\t\t\t} else {\n\t\t\t\t\t// we don't have such a cell Xf, need to add\n\t\t\t\t\t$workbook->addCellXf($newStyle);\n\t\t\t\t\t$newXfIndexes[$oldXfIndex] = $newStyle->getIndex();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Loop through columns, rows, or cells again and update the XF index\n\t\t\tswitch ($selectionType) {\n\t\t\t\tcase 'COLUMN':\n//\t\t\t\t\tfor ($col = $rangeStart[0]; $col <= $rangeEnd[0]; ++$col) {\n//\t\t\t\t\t\t$columnDimension = $this->getActiveSheet()->getColumnDimensionByColumn($col);\n//\t\t\t\t\t\t$oldXfIndex = $columnDimension->getXfIndex();\n//\t\t\t\t\t\t$columnDimension->setXfIndex($newXfIndexes[$oldXfIndex]);\n//\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'ROW':\n//\t\t\t\t\tfor ($row = $rangeStart[1]; $row <= $rangeEnd[1]; ++$row) {\n//\t\t\t\t\t\t$rowDimension = $this->getActiveSheet()->getRowDimension($row);\n//\t\t\t\t\t\t$oldXfIndex = $rowDimension->getXfIndex() === null ?\n//\t\t\t\t\t\t\t\t0 : $rowDimension->getXfIndex(); // row without explicit style should be formatted based on default style\n//\t\t\t\t\t\t$rowDimension->setXfIndex($newXfIndexes[$oldXfIndex]);\n//\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'CELL':\n\t\t\t\t\tfor ($col = $rangeStart->getColumnNumber(); $col <= $rangeEnd->getColumnNumber(); ++$col) {\n\t\t\t\t\t\tfor ($row = $rangeStart->getRow(); $row <= $rangeEnd->getRow(); ++$row) {\n\t\t\t\t\t\t\t$cell = $this->getActiveSheet()->getCellByColumnAndRow($col, $row);\n\t\t\t\t\t\t\t$oldXfIndex = $cell->getXfIndex();\n\t\t\t\t\t\t\t$cell->setXfIndex($newXfIndexes[$oldXfIndex]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: throw new \\RuntimeException();\n\t\t\t}\n\t\t} else {\n\t\t\t$this->setFormatCode($format);\n\t\t}\n\t\treturn $this;\n\t}",
"public function sendFormattedEmails($enableFormatting) {\n\t\t$this->enableFormatting = $enableFormatting;\n\t}",
"public function allowToSetOptions($allow){\n $this->allowToSetOptions = (bool)$allow;\n }",
"function isProtectionEnabled()\n {\n return $this->_sheet || $this->_objects || $this->_scenarios || $this->_formatCells || $this->_formatColumns || $this->_formatRows || $this->_insertColumns || $this->_insertRows || $this->_insertHyperlinks || $this->_deleteColumns || $this->_deleteRows || $this->_selectLockedCells || $this->_sort || $this->_autoFilter || $this->_pivotTables || $this->_selectUnlockedCells;\n }",
"public function getAllowFormatCells(): ?bool {\n $val = $this->getBackingStore()->get('allowFormatCells');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowFormatCells'\");\n }",
"public function setSecuredPacketExemptionAllowed($val)\n {\n $this->_propDict[\"securedPacketExemptionAllowed\"] = $val;\n return $this;\n }",
"public function setFormatting(array $formats) {\n\t\t$this->formatting = $formats;\n\t}",
"public function isProtectionEnabled()\n {\n return $this->sheet ||\n $this->objects ||\n $this->scenarios ||\n $this->formatCells ||\n $this->formatColumns ||\n $this->formatRows ||\n $this->insertColumns ||\n $this->insertRows ||\n $this->insertHyperlinks ||\n $this->deleteColumns ||\n $this->deleteRows ||\n $this->selectLockedCells ||\n $this->sort ||\n $this->autoFilter ||\n $this->pivotTables ||\n $this->selectUnlockedCells;\n }",
"public function isProtectionEnabled()\n {\n return $this->sheet ||\n $this->objects ||\n $this->scenarios ||\n $this->formatCells ||\n $this->formatColumns ||\n $this->formatRows ||\n $this->insertColumns ||\n $this->insertRows ||\n $this->insertHyperlinks ||\n $this->deleteColumns ||\n $this->deleteRows ||\n $this->selectLockedCells ||\n $this->sort ||\n $this->autoFilter ||\n $this->pivotTables ||\n $this->selectUnlockedCells;\n }",
"function allowUpdate($allow){\n\t\t$this->canUpdate=$allow;\n\t}",
"public function setAllowMult($allowMult) {}",
"public function setFormat($format);",
"public function setFormat($format);",
"public function setFormat($format);",
"function allowDelete($allow){\n\t\t$this->canDelete=$allow;\n\t}",
"public function SetAllowPorts ($allowPorts = TRUE) {\n\t\t$this->allowPorts = $allowPorts;\n\t\treturn $this;\n\t}",
"public function setNonEditable() {\n\n if($this->controlID != null) {\n throw new BadMethodCallException('You cannot set styles after the control is added to the UI.');\n }\n\n $this->style = self::NON_EDITABLE;\n }",
"public function setCellEdit($val=false)\n {\n $this->_cellEdit = $val;\n }",
"public function getDisplayFormatTypeAllowableValues()\n {\n return [\n self::DISPLAY_FORMAT_TYPE__DEFAULT,\n self::DISPLAY_FORMAT_TYPE_DATE,\n self::DISPLAY_FORMAT_TYPE_NUMBER,\n ];\n }",
"public function setAllowFileManager($allow);",
"public static function setNumberAttemptAllowed($nbAttempts){\n Configuration::where('id', 1)\n ->update(['number_attempt_allowed' => $nbAttempts]);\n }",
"protected function allow() {\n\t\t\n\t\treturn true;\n\t}"
]
| [
"0.5847468",
"0.5773738",
"0.5552536",
"0.5289825",
"0.5126817",
"0.50414896",
"0.50285006",
"0.49554473",
"0.49489468",
"0.4886032",
"0.4816252",
"0.46404022",
"0.4599852",
"0.44954088",
"0.44775325",
"0.44624624",
"0.44624624",
"0.44598743",
"0.43235242",
"0.42650455",
"0.42650455",
"0.42650455",
"0.42481762",
"0.42476615",
"0.4233581",
"0.4225677",
"0.4215597",
"0.41808683",
"0.4175589",
"0.41685143"
]
| 0.69705987 | 0 |
Sets the allowFormatColumns property value. Represents the worksheet protection option of allowing formatting columns. | public function setAllowFormatColumns(?bool $value): void {
$this->getBackingStore()->set('allowFormatColumns', $value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setAllowFormatCells(?bool $value): void {\n $this->getBackingStore()->set('allowFormatCells', $value);\n }",
"function enableFormatting($format = true)\n {\n $this->formatFields = $format;\n }",
"public function setAllowDeleteColumns(?bool $value): void {\n $this->getBackingStore()->set('allowDeleteColumns', $value);\n }",
"public function getAllowableColumns()\n\t{\n\t\treturn $this->_arrColumns;\n\t}",
"public function setAllowInsertColumns(?bool $value): void {\n $this->getBackingStore()->set('allowInsertColumns', $value);\n }",
"public function setAlterColumnFormat()\n {\n $this->format = '{type}{length}{notnull}{append}';\n }",
"public function setAllowFormatRows(?bool $value): void {\n $this->getBackingStore()->set('allowFormatRows', $value);\n }",
"public function getAllowFormatColumns(): ?bool {\n $val = $this->getBackingStore()->get('allowFormatColumns');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowFormatColumns'\");\n }",
"public function setExcelColumnFormat($format)\n {\n $this->header->excelColumnFormat = $format;\n return $this;\n }",
"public function setAllowSearchColumn($columns){\n\t\tif(is_array($columns))\n\t\t{\n\t\t\tforeach($columns AS $column)\n\t\t\t{\n\t\t\t\t$this->allowSearchColumns[] = $this->tablename . \".\" . $column;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->allowSearchColumns[] = $this->tablename . \".\" . $columns;\n\t\t}\n\t}",
"public function checkEnableColumnEdit()\n\t{\n\t\treturn false;\n\t}",
"public function setColumnFormat( $column, $sFormat ) {\n\t\t$this->columnsFormat[ $column ] = $sFormat;\n\t}",
"public function setAllow($allow) {\r\n\t\treturn $this -> allow = (array)$allow;\r\n\t}",
"function allowResize($allow){\n\t\t$this->headerResizable=$allow;\n\t}",
"public function setColWidth($column_start, $column_end, $width, $hidden = false, $format = null) {\n\t}",
"public function allowToSetOptions($allow){\n $this->allowToSetOptions = (bool)$allow;\n }",
"public function setAllowableFormat($array_allowable_ext)\n {\n if ($array_allowable_ext == '*') {\n $this->allowable_ext = '*';\n return;\n }\n\n if (is_array($array_allowable_ext)) {\n $this->allowable_ext = $array_allowable_ext;\n } else {\n echo 'setAllowableFormat method error : The argument for must be an array';\n return;\n }\n }",
"public function setFormat($format = null){\n\t\t$this->format = $this->columnLength = array();\n\n\t\tif(func_num_args() >= 1 && !is_array($a = func_get_arg(0)) && !($a instanceof \\Traversable))\n\t\t\t$format = func_get_args();\n\n\t\t// Set format\n\t\tif($format !== null){\n\t\t\t$format = $format instanceof \\Traversable ? iterator_to_array($format) : $format;\n\t\t\tif(!is_array($format))\n\t\t\t\tthrow new \\InvalidArgumentException('Format must be an array or a Traversable instance.');\n\t\t\t$this->format = array_map(function($v){return \"$v&N\";}, $format);\n\t\t}\n\n\t\treturn $this;\n\t}",
"public function setColumns(array $columns);",
"public function setColumns(array $columns);",
"public function setColumns($settings = array())\n {\n if (!$settings) {\n $settings = $this->fields;\n }\n $this->Columns = array();\n foreach ($settings as $column => $options) {\n if (!is_string($column)) {\n $column = $options;\n $options = false;\n }\n if (!isset($options['display'])) {\n $options['display'] = true;\n }\n if (strpos($column, '.') === false && $column != 'actions') {\n $column = sprintf('%s.%s', $this->defaultModel, $column);\n }\n if (!isset($options['type'])) {\n if (isset($options['switch'])) {\n $options['type'] = 'switch';\n } else {\n $options['type'] = 'cell';\n }\n }\n $class = ucfirst($options['type']).'Column';\n $this->Columns[$column] = new $class($this, $column, $options);\n }\n }",
"public function setAllow($value) {\r\n $this->allow = $value;\r\n }",
"public function setShouldFormatDates($shouldFormatDates)\n {\n $this->optionsManager->setOption(Options::SHOULD_FORMAT_DATES, $shouldFormatDates);\n\n return $this;\n }",
"public function setFormatting(array $formats) {\n\t\t$this->formatting = $formats;\n\t}",
"public function getDisplayFormatTypeAllowableValues()\n {\n return [\n self::DISPLAY_FORMAT_TYPE__DEFAULT,\n self::DISPLAY_FORMAT_TYPE_DATE,\n self::DISPLAY_FORMAT_TYPE_NUMBER,\n ];\n }",
"public function setColumns()\r\n\t{\r\n\t\t$columns = array_filter($this->getRules(), function($rule) {\r\n\t\t\tif($rule instanceof ColumnInterface) {\r\n\t\t\t\treturn $rule;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t$columns = array_map(function(ColumnInterface $rule) {\r\n\t\t\treturn $rule->getTitle();\r\n\t\t}, $columns);\r\n\r\n\t\t$this->columns = $columns;\r\n\t}",
"public static function mla_manage_columns_filter( ) {\r\n\t\treturn apply_filters( 'mla_list_table_get_columns', self::$default_columns );\r\n\t}",
"public function sendFormattedEmails($enableFormatting) {\n\t\t$this->enableFormatting = $enableFormatting;\n\t}",
"protected function _prepareColumns()\n {\n\n $this->addColumn(\n 'entity_id',\n array(\n 'header' => Mage::helper('bs_docwise')->__('Id'),\n 'index' => 'entity_id',\n 'type' => 'number'\n )\n );\n\n $this->addColumn(\n 'in_docwisements',\n array(\n 'header_css_class' => 'a-center',\n 'type' => 'checkbox',\n 'name' => 'in_docwisements',\n 'values'=> $this->_getSelectedDocwisements(),\n 'align' => 'center',\n 'index' => 'entity_id'\n )\n );\n\n $this->addColumn(\n 'doc_name',\n array(\n 'header' => Mage::helper('bs_docwise')->__('Document Name'),\n 'align' => 'left',\n 'index' => 'doc_name',\n )\n );\n\n\n $this->addColumn(\n 'doc_type',\n array(\n 'header' => Mage::helper('bs_docwise')->__('Document Type'),\n 'index' => 'doc_type',\n 'type' => 'options',\n 'options' => Mage::helper('bs_docwise')->convertOptions(\n Mage::getModel('bs_docwise/docwisement_attribute_source_doctype')->getAllOptions(false)\n )\n\n )\n );\n $this->addColumn(\n 'doc_date',\n array(\n 'header' => Mage::helper('bs_docwise')->__('Date'),\n 'index' => 'doc_date',\n 'type'=> 'date',\n\n )\n );\n\n $this->addColumn(\n 'download',\n array(\n 'header' => Mage::helper('bs_docwise')->__('View/Download'),\n 'type' =>'text',\n 'renderer' => 'bs_docwise/adminhtml_helper_column_renderer_download',\n\n 'filter' => false,\n 'sortable' => false,\n )\n );\n\n $this->addColumn(\n 'position',\n array(\n 'header' => Mage::helper('catalog')->__('Position'),\n 'name' => 'position',\n 'width' => 60,\n 'type' => 'number',\n 'validate_class' => 'validate-number',\n 'index' => 'position',\n 'editable' => true,\n )\n );\n $this->addColumn(\n 'action',\n array(\n 'header' => Mage::helper('bs_docwise')->__('Action'),\n 'width' => '100',\n 'type' => 'action',\n 'getter' => 'getId',\n 'actions' => array(\n array(\n 'caption' => Mage::helper('bs_docwise')->__('Edit'),\n 'url' => array('base'=> '*/docwise_docwisement/edit'),\n 'field' => 'id'\n )\n ),\n 'filter' => false,\n 'is_system' => true,\n 'sortable' => false,\n )\n );\n }",
"private function setColumnLength(array $row, $format = true){\n\t\tforeach($row as $i => $col){\n\t\t\t$len = IO::strlen(IO::render(isset($this->format[$i]) && $format ? $this->format[$i] : '%s', $col));\n\t\t\t$this->columnLength[$i] = $tmp = isset($this->columnLength[$i])\n\t\t\t\t? max($this->columnLength[$i], $len)\n\t\t\t\t: $len;\n\t\t\t$diff = strlen(Color::colorize($this->format[$i])) - Color::strlen($this->format[$i]);\n\t\t\t$this->plainColumnLength[$i] = $tmp - $diff;\n\t\t}\n\t}"
]
| [
"0.5695502",
"0.542236",
"0.5405737",
"0.5334911",
"0.5234388",
"0.5221826",
"0.5087807",
"0.5003635",
"0.49762374",
"0.49650043",
"0.49639156",
"0.49422345",
"0.4890542",
"0.4872179",
"0.48303664",
"0.47746363",
"0.4736848",
"0.47107637",
"0.46985918",
"0.46816823",
"0.46683207",
"0.4640095",
"0.4604881",
"0.45899954",
"0.45854175",
"0.45405373",
"0.4523871",
"0.45176333",
"0.45125452",
"0.4509704"
]
| 0.70476925 | 0 |
Sets the allowFormatRows property value. Represents the worksheet protection option of allowing formatting rows. | public function setAllowFormatRows(?bool $value): void {
$this->getBackingStore()->set('allowFormatRows', $value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function enableFormatting($format = true)\n {\n $this->formatFields = $format;\n }",
"public function setAllowFormatCells(?bool $value): void {\n $this->getBackingStore()->set('allowFormatCells', $value);\n }",
"public function setAllow($allow) {\r\n\t\treturn $this -> allow = (array)$allow;\r\n\t}",
"public function setAllowDeleteRows(?bool $value): void {\n $this->getBackingStore()->set('allowDeleteRows', $value);\n }",
"public function setAllowInsertRows(?bool $value): void {\n $this->getBackingStore()->set('allowInsertRows', $value);\n }",
"function set_rowspan($rowspan=0) {\n\n if (is_numeric($rowspan) && $rowspan > 1) {\n $this->_rowspan = $rowspan;\n }\n }",
"function allowResize($allow){\n\t\t$this->headerResizable=$allow;\n\t}",
"public function getAllowFormatRows(): ?bool {\n $val = $this->getBackingStore()->get('allowFormatRows');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowFormatRows'\");\n }",
"public function setAllowFormatColumns(?bool $value): void {\n $this->getBackingStore()->set('allowFormatColumns', $value);\n }",
"public function setRows($rows);",
"function formatRow(){\n $this->hook('formatRow');\n }",
"public function setRowsetClass($rowsetClass)\n {\n $this->_rowsetClass = (string)$rowsetClass;\n\n return $this;\n }",
"public function isRowAllowedToImport(array $rowData, $rowNum)\n {\n return $this->validateRow($rowData, $rowNum) && !isset($this->_rowsToSkip[$rowNum]);\n }",
"function canSelectRows()\n\t{\n\t\treturn false;\n\t}",
"public function canSelectRows()\n\t{\n\t\treturn false;\n\t}",
"public function canSelectRows()\n\t{\n\t\treturn false;\n\t}",
"public function setRows($rows) {\n $this->rows = $rows;\n }",
"public final function setRows(array $rows){\n\t\t$this->rows=$rows;\n\t\t$this->table=false;\n\t\t$this->table_header=false;\n\t\treturn $this;\n\t}",
"public function setRows(array $rows);",
"public function setRows(?array $rows) : self\n {\n $this->initialized['rows'] = true;\n $this->rows = $rows;\n return $this;\n }",
"public function setRows(array $rows)\n {\n $this->rows = $rows;\n return $this;\n }",
"public function setRows(array $rows)\n {\n $this->rows = $rows;\n\n return $this;\n }",
"public function setRows(array $rows)\n {\n $this->_rows = $rows;\n return $this;\n }",
"public function allowToSetOptions($allow){\n $this->allowToSetOptions = (bool)$allow;\n }",
"public function setRows($rows){\n\t\t$this->rows=$rows;\n\t}",
"private function setRowsPerPage($rows_per_page)\r\n\t{\r\n\t\tif(isset($rows_per_page) and is_numeric($rows_per_page))\r\n\t\t{\r\n\t\t\t$this->rows_per_page = (int) $rows_per_page;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// default number of rows to show per page\r\n\t\t\t$this->rows_per_page = 10;\r\n\t\t}\r\n\r\n\t\tif($this->rows_per_page < 1)\r\n\t\t{\r\n\t\t\t$this->rows_per_page = 10;\r\n\t\t}\r\n\t}",
"public function enableRowsNumberSelector()\n {\n $this->setAttribute('rowsNumberSelectorEnabled', true);\n\n return $this;\n }",
"function setRowPrototype($row) {\n\t\t$this->row = $row;\n\t\treturn $this;\n\t}",
"public function setRows(array $rows)\n {\n $this->rows = array();\n\n $this->addRows($rows);\n\n return $this;\n }",
"public function setAllow($value) {\r\n $this->allow = $value;\r\n }"
]
| [
"0.5622722",
"0.5590575",
"0.51335114",
"0.51315325",
"0.5056843",
"0.49894592",
"0.49873912",
"0.4941452",
"0.49378338",
"0.4873483",
"0.48092395",
"0.48006082",
"0.47676697",
"0.47378662",
"0.46661165",
"0.46661165",
"0.46586257",
"0.46517926",
"0.46499568",
"0.46354848",
"0.462744",
"0.4621426",
"0.46173236",
"0.461458",
"0.45562625",
"0.4513369",
"0.45014456",
"0.44965732",
"0.4458841",
"0.4450665"
]
| 0.7202399 | 0 |
Sets the allowInsertColumns property value. Represents the worksheet protection option of allowing inserting columns. | public function setAllowInsertColumns(?bool $value): void {
$this->getBackingStore()->set('allowInsertColumns', $value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setAllowDeleteColumns(?bool $value): void {\n $this->getBackingStore()->set('allowDeleteColumns', $value);\n }",
"public function getAllowableColumns()\n\t{\n\t\treturn $this->_arrColumns;\n\t}",
"public function setAllowFormatColumns(?bool $value): void {\n $this->getBackingStore()->set('allowFormatColumns', $value);\n }",
"public function getAllowInsertColumns(): ?bool {\n $val = $this->getBackingStore()->get('allowInsertColumns');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowInsertColumns'\");\n }",
"public function setAllowSearchColumn($columns){\n\t\tif(is_array($columns))\n\t\t{\n\t\t\tforeach($columns AS $column)\n\t\t\t{\n\t\t\t\t$this->allowSearchColumns[] = $this->tablename . \".\" . $column;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->allowSearchColumns[] = $this->tablename . \".\" . $columns;\n\t\t}\n\t}",
"public function checkEnableColumnEdit()\n\t{\n\t\treturn false;\n\t}",
"public function setAllowInsertRows(?bool $value): void {\n $this->getBackingStore()->set('allowInsertRows', $value);\n }",
"public function insert(array $columns);",
"public function insert(array $columns);",
"public function setColumns(array $columns);",
"public function admin_table_columns($_columns)\n {\n }",
"public function setColumns($columns)\n {\n $this->columns = $columns;\n }",
"function migrate()\n {\n if (!$this->object->_columns) {\n throw new E_ColumnsNotDefinedException(\"Columns not defined for {$this->get_table_name()}\");\n }\n $added = FALSE;\n $removed = FALSE;\n // Add any missing columns\n foreach ($this->object->_columns as $key => $properties) {\n if (!in_array($key, $this->object->_table_columns)) {\n if ($this->object->_add_column($key, $properties['type'], $properties['default_value'])) {\n $added = TRUE;\n }\n }\n }\n // Remove any columns not defined\n //\t\tforeach ($this->object->_table_columns as $key) {\n //\t\t\tif (!isset($this->object->_columns[$key])) {\n //\t\t\t\t$this->object->_remove_column($key);\n // $removed = TRUE;\n //\t\t\t}\n //\t\t}\n if ($added or $removed) {\n // var_dump($this->object->_table_columns);\n $this->object->lookup_columns();\n // var_dump($added, $removed);\n }\n }",
"public function setColumns(array $columns);",
"public function setColumns($columns) {\n\t\t$this->columns = $columns;\n\t}",
"public static function setColumns($columns) {\n\t\tself::$columns = $columns;\n\t}",
"public function setAllow($value) {\r\n $this->allow = $value;\r\n }",
"public function getAllowDeleteColumns(): ?bool {\n $val = $this->getBackingStore()->get('allowDeleteColumns');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowDeleteColumns'\");\n }",
"public function getValidColumns(array $columns);",
"private function setColumns(array $columns)\n {\n $this->columns = $columns;\n }",
"public function setColumns()\r\n\t{\r\n\t\t$columns = array_filter($this->getRules(), function($rule) {\r\n\t\t\tif($rule instanceof ColumnInterface) {\r\n\t\t\t\treturn $rule;\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t\t$columns = array_map(function(ColumnInterface $rule) {\r\n\t\t\treturn $rule->getTitle();\r\n\t\t}, $columns);\r\n\r\n\t\t$this->columns = $columns;\r\n\t}",
"public function allowToSetOptions($allow){\n $this->allowToSetOptions = (bool)$allow;\n }",
"public function setAllowedValues($values);",
"public function setAllowDeletions(bool $allowDeletions) : self\n {\n $this->initialized['allowDeletions'] = true;\n $this->allowDeletions = $allowDeletions;\n return $this;\n }",
"public function setAllow($allow) {\r\n\t\treturn $this -> allow = (array)$allow;\r\n\t}",
"public function addColumns()\n {\n add_filter( 'manage_edit-' . $this->post_type . '_columns', array($this, 'editColumns') ) ; // Add or Remove a Column\n add_action( 'manage_' . $this->post_type . '_posts_custom_column', array($this, 'manageColumns') ); //Show and Modify Column Data\n add_filter( 'manage_edit-' . $this->post_type . '_sortable_columns', array($this, 'sortableColumns') ); // Flags sortable Columns\n add_action( 'load-edit.php', array($this, 'loadSortColumns') );\n }",
"public function setColumns($columns)\n {\n $columns = MySQLParser::Columns($columns);\n if($columns) $this->columns = $columns;\n return (bool)($columns);\n }",
"protected function loadColumns(){\n\t\t\t$this->columns = array_diff(\n\t\t\t\tarray_keys(get_class_vars($this->class)),\n\t\t\t\t$this->getIgnoreAttributes()\n\t\t\t);\n\t\t}",
"public static function mla_manage_columns_filter( ) {\r\n\t\treturn apply_filters( 'mla_list_table_get_columns', self::$default_columns );\r\n\t}",
"public function setTableColumns($columns)\n {\n $this->tableColumns = $columns;\n }"
]
| [
"0.60530186",
"0.58602875",
"0.5782449",
"0.57082343",
"0.5362694",
"0.5218457",
"0.5208569",
"0.497807",
"0.497807",
"0.49355802",
"0.49227145",
"0.48658213",
"0.48605514",
"0.4856851",
"0.4824063",
"0.47963122",
"0.47334063",
"0.4700938",
"0.46467835",
"0.46426192",
"0.46247745",
"0.4611212",
"0.46108302",
"0.46068257",
"0.45971674",
"0.45772466",
"0.45685813",
"0.45610917",
"0.45383894",
"0.45046088"
]
| 0.72751385 | 0 |
Sets the allowInsertHyperlinks property value. Represents the worksheet protection option of allowing inserting hyperlinks. | public function setAllowInsertHyperlinks(?bool $value): void {
$this->getBackingStore()->set('allowInsertHyperlinks', $value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAllowInsertHyperlinks(): ?bool {\n $val = $this->getBackingStore()->get('allowInsertHyperlinks');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowInsertHyperlinks'\");\n }",
"public function setAllowSitemap($allow);",
"public function setAllowInsertRows(?bool $value): void {\n $this->getBackingStore()->set('allowInsertRows', $value);\n }",
"public function allowLinks($requiredAttributes = array(), $defaultAttributes = array(), $autoLinks = true)\n {\n $this->jevix->cfgAllowTags('a');\n\n $requiredAttributes = is_array($requiredAttributes) ? $requiredAttributes : array($requiredAttributes);\n if (!in_array('href', $requiredAttributes)) {\n $requiredAttributes[] = 'href';\n }\n $this->jevix->cfgSetTagParamsRequired('a', $requiredAttributes);\n\n if (count($defaultAttributes)) {\n $this->jevix->cfgSetTagParamsAutoAdd('a', $defaultAttributes);\n }\n\n $this->jevix->cfgSetAutoLinkMode($autoLinks);\n }",
"static function prevent_image_hotlinks()\r\n {\r\n global $aio_wp_security;\r\n $rules = '';\r\n if ($aio_wp_security->configs->get_value('aiowps_prevent_hotlinking') == '1') {\r\n $url_string = AIOWPSecurity_Utility_Htaccess::return_regularized_url(AIOWPSEC_WP_HOME_URL);\r\n if ($url_string == FALSE) {\r\n $url_string = AIOWPSEC_WP_HOME_URL;\r\n }\r\n $rules .= AIOWPSecurity_Utility_Htaccess::$prevent_image_hotlinks_marker_start . PHP_EOL; //Add feature marker start\r\n $rules .= '<IfModule mod_rewrite.c>' . PHP_EOL;\r\n $rules .= 'RewriteEngine On' . PHP_EOL;\r\n $rules .= 'RewriteCond %{HTTP_REFERER} !^$' . PHP_EOL;\r\n $rules .= 'RewriteCond %{REQUEST_FILENAME} -f' . PHP_EOL;\r\n $rules .= 'RewriteCond %{REQUEST_FILENAME} \\.(gif|jpe?g?|png)$ [NC]' . PHP_EOL;\r\n $rules .= 'RewriteCond %{HTTP_REFERER} !^' . $url_string . ' [NC]' . PHP_EOL;\r\n $rules .= 'RewriteRule \\.(gif|jpe?g?|png)$ - [F,NC,L]' . PHP_EOL;\r\n $rules .= '</IfModule>' . PHP_EOL;\r\n $rules .= AIOWPSecurity_Utility_Htaccess::$prevent_image_hotlinks_marker_end . PHP_EOL; //Add feature marker end\r\n }\r\n\r\n return $rules;\r\n }",
"function allowDelete($allow){\n\t\t$this->canDelete=$allow;\n\t}",
"protected function hasHyperlinks(Sheet &$oSheet) {\n\t\treturn (isset($this->aHyperlinks[$oSheet->getIdentifier()]) && !empty($this->aHyperlinks[$oSheet->getIdentifier()]));\n\t}",
"public function setAllow($value) {\r\n $this->allow = $value;\r\n }",
"function journalize_auto_link_urls_activate() {\n\t$options = get_option('journalize');\n\t$options['auto_link_urls'] = true;\n\tupdate_option('journalize', $options);\n}",
"public function setAllow($allow) {\r\n\t\treturn $this -> allow = (array)$allow;\r\n\t}",
"public function testEnableLink() {\n $enabledLink = $this->Links->find('all')\n ->where(['title' => 'Enabled link'])\n ->toArray()[0];\n $result = $this->Links->enable($enabledLink);\n $this->assertEquals(false, $result);\n }",
"public function SetAllowedHostnames ($allowedHostnames) {\n\t\tif (!is_array($allowedHostnames)) \n\t\t\t$allowedHostnames = func_get_args();\n\t\t$this->allowedHostnames = $allowedHostnames;\n\t\treturn $this;\n\t}",
"public function yoast_allow_rel() {\n\t\tglobal $allowedtags;\n\t\t$allowedtags['a']['rel'] = array ();\n\t}",
"function allowResize($allow){\n\t\t$this->headerResizable=$allow;\n\t}",
"public function allowToSetOptions($allow){\n $this->allowToSetOptions = (bool)$allow;\n }",
"protected function setupBulkSetLinkDefaults()\n {\n $this->crud->allowAccess('bulkSetLink');\n\n $this->crud->operation('list', function () {\n $this->crud->enableBulkActions();\n $this->crud->addButton('top', 'bulkSetLink', 'view', 'crud::buttons.bulk_set_link');\n });\n }",
"public function can_showdirectlink() {\n return true;\n }",
"public function setAllowInsertColumns(?bool $value): void {\n $this->getBackingStore()->set('allowInsertColumns', $value);\n }",
"function setUrlLink(){\n if( $this->id == 0 ) return;\n $url = $this->aFields[\"url\"]->toString();\n if( $url == \"\" ) return;\n $url = strip_tags( preg_replace( \"/[\\\"']/\", \"\", $url ) );\n if( !$this->aFields[\"url\"]->editable ) $this->aFields[\"url\"]->display = false;\n $this->aFields[\"url_link\"]->display = true;\n $this->aFields[\"url_link\"]->value = \"<a href=\\\"\".$url.\"\\\">\".$url.\"</a>\";\n }",
"public function setLinks($value)\n {\n return $this->setProperty(\"Links\", $value, true);\n }",
"protected function allow() {\n\t\t\n\t\treturn true;\n\t}",
"private function extend_links($links) {\n if (!$links) {\n return True;\n } \n foreach ($links as $link) {\n list($url, $title, $sort_order, $attributes) = $link;\n $this->add_link($url, $title, $sort_order, $attributes);\n }\n }",
"public function setUseRelativeUrls(bool $enable): void\n {\n $this->relativeUrls = $enable;\n }",
"protected function _allowFrontendUrls($row)\n {\n return true;\n }",
"private function _addExhibitAccessibleURLField()\n {\n $this->db->query(<<<SQL\n ALTER TABLE {$this->db->prefix}neatline_exhibits\n ADD COLUMN accessible_url TEXT NULL;\nSQL\n);\n }",
"public function doActionEnableCleanUrl()\n {\n if ($this->canEnableCleanURL()) {\n $cleanURLFlag = \\XLite\\Core\\Database::getRepo('XLite\\Model\\Config')->findOneBy(\n array(\n 'name' => 'clean_url_flag',\n 'category' => 'CleanURL'\n )\n );\n\n \\XLite\\Core\\Database::getRepo('XLite\\Model\\Config')->update(\n $cleanURLFlag,\n array(\n 'value' => true,\n )\n );\n\n \\XLite\\Core\\TopMessage::addInfo(static::t('Clean URLs are enabled'));\n }\n\n $this->doRedirect();\n }",
"abstract public function should_link_to_wp_admin();",
"function setLinks($link) \n {\n $this->links = $link;\n }",
"function iis7_supports_permalinks()\n {\n }",
"public function denyLink()\n {\n }"
]
| [
"0.54872",
"0.52379644",
"0.49146596",
"0.48699942",
"0.48645622",
"0.4860976",
"0.48375228",
"0.48201442",
"0.46735954",
"0.46371892",
"0.45623207",
"0.45289797",
"0.44884276",
"0.4476447",
"0.44753027",
"0.44711658",
"0.4467779",
"0.44459116",
"0.44298467",
"0.44095448",
"0.43921465",
"0.43782723",
"0.43611515",
"0.4346327",
"0.43449795",
"0.4309641",
"0.43059137",
"0.42984304",
"0.42975768",
"0.4265669"
]
| 0.75367516 | 0 |
Sets the allowInsertRows property value. Represents the worksheet protection option of allowing inserting rows. | public function setAllowInsertRows(?bool $value): void {
$this->getBackingStore()->set('allowInsertRows', $value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setAllowDeleteRows(?bool $value): void {\n $this->getBackingStore()->set('allowDeleteRows', $value);\n }",
"public function setAllowFormatRows(?bool $value): void {\n $this->getBackingStore()->set('allowFormatRows', $value);\n }",
"public function insert_rows($row=1, $numrows=1) {\n $this->worksheet->insertNewRowBefore($row, $numrows);\n }",
"public function setAllowInsertColumns(?bool $value): void {\n $this->getBackingStore()->set('allowInsertColumns', $value);\n }",
"public function getAllowInsertRows(): ?bool {\n $val = $this->getBackingStore()->get('allowInsertRows');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowInsertRows'\");\n }",
"public function setAllow($allow) {\r\n\t\treturn $this -> allow = (array)$allow;\r\n\t}",
"public function setRows($rows) {\n $this->rows = $rows;\n }",
"public function isAllowPkInsert()\n {\n return $this->allowPkInsert;\n }",
"function canSelectRows()\n\t{\n\t\treturn false;\n\t}",
"public function setRows($rows);",
"public function set_rows($rows)\n {\n $this->m_numRows = $rows;\n }",
"public function setAllow($value) {\r\n $this->allow = $value;\r\n }",
"public function canSelectRows()\n\t{\n\t\treturn false;\n\t}",
"public function canSelectRows()\n\t{\n\t\treturn false;\n\t}",
"public function isRowAllowedToImport(array $rowData, $rowNum)\n {\n return $this->validateRow($rowData, $rowNum) && !isset($this->_rowsToSkip[$rowNum]);\n }",
"public function setRows($rows){\n\t\t$this->rows=$rows;\n\t}",
"public function setRows(?array $rows) : self\n {\n $this->initialized['rows'] = true;\n $this->rows = $rows;\n return $this;\n }",
"function allowDelete($allow){\n\t\t$this->canDelete=$allow;\n\t}",
"public function allowToSetOptions($allow){\n $this->allowToSetOptions = (bool)$allow;\n }",
"public function setRows(array $rows);",
"function allowResize($allow){\n\t\t$this->headerResizable=$allow;\n\t}",
"public function setRows(array $rows)\n {\n $this->rows = $rows;\n\n return $this;\n }",
"public function insertRow($row_start, $row_end) {\n\t}",
"public function setRows(array $rows)\n {\n $this->_rows = $rows;\n return $this;\n }",
"public function setRows(array $rows)\n {\n $this->rows = $rows;\n return $this;\n }",
"public function setMinRow($value)\n {\n return $this->set('MinRow', $value);\n }",
"public function setRows(array $rows)\n {\n $this->rows = array();\n\n $this->addRows($rows);\n\n return $this;\n }",
"public final function setRows(array $rows){\n\t\t$this->rows=$rows;\n\t\t$this->table=false;\n\t\t$this->table_header=false;\n\t\treturn $this;\n\t}",
"public function insertRow(TableRow $row, $position = null);",
"public function setRows($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Google\\Analytics\\Admin\\V1alpha\\AccessRow::class);\n $this->rows = $arr;\n\n return $this;\n }"
]
| [
"0.59624255",
"0.59082437",
"0.55513334",
"0.5327459",
"0.5203638",
"0.520222",
"0.5091527",
"0.5046903",
"0.5039171",
"0.5023839",
"0.49943775",
"0.49585068",
"0.4940516",
"0.4940516",
"0.49382937",
"0.4922686",
"0.48744333",
"0.48642144",
"0.48157424",
"0.4763051",
"0.47610348",
"0.47350237",
"0.47311646",
"0.47239056",
"0.4723218",
"0.47188032",
"0.46530485",
"0.46368548",
"0.4581556",
"0.45646787"
]
| 0.70606667 | 0 |
Sets the allowPivotTables property value. Represents the worksheet protection option of allowing using pivot table feature. | public function setAllowPivotTables(?bool $value): void {
$this->getBackingStore()->set('allowPivotTables', $value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setAllow($value) {\r\n $this->allow = $value;\r\n }",
"public function isPivot(): bool\n {\n return true;\n }",
"public function allowToSetOptions($allow){\n $this->allowToSetOptions = (bool)$allow;\n }",
"public function getAllowPivotTables(): ?bool {\n $val = $this->getBackingStore()->get('allowPivotTables');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowPivotTables'\");\n }",
"public function canSetControllablePolicy();",
"public function setAllow($allow) {\r\n\t\treturn $this -> allow = (array)$allow;\r\n\t}",
"function setAllowedPager($value) {\n $this->allowedPager = $value;\n }",
"public function canSetControllableAcl();",
"public function setAllowFormatRows(?bool $value): void {\n $this->getBackingStore()->set('allowFormatRows', $value);\n }",
"public function setAllowCaptiveWebSheet(?bool $value): void {\n $this->getBackingStore()->set('allowCaptiveWebSheet', $value);\n }",
"public function setPermissions($permissions);",
"public function setPermissions($permissions) {}",
"public function setAllowDeleteRows(?bool $value): void {\n $this->getBackingStore()->set('allowDeleteRows', $value);\n }",
"public function setAllowFormatColumns(?bool $value): void {\n $this->getBackingStore()->set('allowFormatColumns', $value);\n }",
"function isProtectionEnabled()\n {\n return $this->_sheet || $this->_objects || $this->_scenarios || $this->_formatCells || $this->_formatColumns || $this->_formatRows || $this->_insertColumns || $this->_insertRows || $this->_insertHyperlinks || $this->_deleteColumns || $this->_deleteRows || $this->_selectLockedCells || $this->_sort || $this->_autoFilter || $this->_pivotTables || $this->_selectUnlockedCells;\n }",
"public function canSetControllablePolicy()\n {\n return $this->canSetControllablePolicy;\n }",
"function allowResize($allow){\n\t\t$this->headerResizable=$allow;\n\t}",
"public function setAllowFileManager($allow);",
"public function setPubliclyViewable($value)\n {\n $this->setItemValue('publicly_viewable', (bool)$value);\n }",
"public function setAllowFormatCells(?bool $value): void {\n $this->getBackingStore()->set('allowFormatCells', $value);\n }",
"public function setAllowSort(?bool $value): void {\n $this->getBackingStore()->set('allowSort', $value);\n }",
"public function set_public($value) {\r\n $this->public = $value;\r\n data::add(\"public\", $this->public == \"\" ? 1 : $this->public, $this->table_fields);\r\n }",
"public function setAllowInsertRows(?bool $value): void {\n $this->getBackingStore()->set('allowInsertRows', $value);\n }",
"public function setPublicAccess($publicAccess)\n {\n Validate::canCastAsString($publicAccess, 'publicAccess');\n $this->_publicAccess = $publicAccess;\n }",
"public function SetPermissions ($permissions);",
"public function setAdminPermissions(array $permissions): void;",
"public function setAppManagementPolicies($val)\n {\n $this->_propDict[\"appManagementPolicies\"] = $val;\n return $this;\n }",
"public function setAllowNonUploadedFiles($boolean);",
"public function setRequiredPermissions($permissions = array())\n {\n $this->requiredPermissions = $permissions;\n }",
"public function setAllowDeleteColumns(?bool $value): void {\n $this->getBackingStore()->set('allowDeleteColumns', $value);\n }"
]
| [
"0.5288091",
"0.5246147",
"0.50661004",
"0.5032595",
"0.4993113",
"0.49776793",
"0.47678944",
"0.47020853",
"0.46648976",
"0.4641757",
"0.46404558",
"0.460904",
"0.45961714",
"0.45941105",
"0.45598513",
"0.45568207",
"0.45516354",
"0.45198503",
"0.4491315",
"0.448665",
"0.44760984",
"0.4475484",
"0.44555214",
"0.44542578",
"0.44401127",
"0.4438526",
"0.44361076",
"0.44317868",
"0.4431552",
"0.44071168"
]
| 0.7523599 | 0 |
Sets the allowSort property value. Represents the worksheet protection option of allowing using sort feature. | public function setAllowSort(?bool $value): void {
$this->getBackingStore()->set('allowSort', $value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function allowColumnReorder($val){\n\t\t$this->headerSortable=$val;\n\t}",
"public function allowedSorts()\n {\n return [];\n }",
"public function setSort($x) { $this->sort = $x; }",
"public function setSort($value)\n {\n if (is_array($value)) {\n $config = ['class' => Sort::className()];\n if ($this->id !== null) {\n $config['sortParam'] = $this->id . '-sort';\n }\n $this->_sort = Yii::createObject(array_merge($config, $value));\n } elseif ($value instanceof Sort || $value === false) {\n $this->_sort = $value;\n } else {\n throw new InvalidParamException('Only Sort instance, configuration array or false is allowed.');\n }\n }",
"function setSort($sort) {\n $this->sort = $sort;\n }",
"public function setAllow($value) {\r\n $this->allow = $value;\r\n }",
"public function setSort($value)\n {\n $this->tpSort = (int) $value;\n }",
"public function setSort(?array $sort) : self\n {\n $this->initialized['sort'] = true;\n $this->sort = $sort;\n return $this;\n }",
"public function _setSort($sort) {\n $this->sort = $sort;\n }",
"protected static function setValidSortTypes()\r\n {\r\n }",
"public function setSorted()\n {\n $this->isSorted = true;\n }",
"public function setSortMode($value)\n {\n if (is_string($value) === false)\n throw new SystemException(SystemException::EX_INVALIDPARAMETER, 'Parameter = value');\n if ($value != 'ASC' && $value != 'DESC')\n throw new SystemException(SystemException::EX_INVALIDPARAMETER, 'Parameter = value; Must be \\'ASC\\' or \\'DESC\\'');\n $this->sortMode = $value;\n }",
"public function setSorting($arrSorting);",
"public function setSort(string $sort): void\n {\n $this->_sort = $sort;\n }",
"public function setSort($value)\n {\n return $this->set('Sort', $value);\n }",
"public function setSort($value)\n {\n return $this->set('Sort', $value);\n }",
"public function enableRecursiveSort()\n {\n $this->enableRecursiveSort = true;\n }",
"public function setAllow($allow) {\r\n\t\treturn $this -> allow = (array)$allow;\r\n\t}",
"public function setSort($sort=array())\n {\n $this->sort = is_array($sort) ? $sort : array();\n return $this;\n }",
"public function setSort(array $sort)\n {\n $sortables = [];\n \n foreach ($sort as $field => $order) {\n $sortables[] = $order == SORT_ASC ? $field : '-' . $field;\n }\n \n return $this->setArgs(['sort' => implode(\",\", $sortables)]);\n }",
"public function getSortTypeAllowableValues()\n {\n return [\n self::SORT_TYPE_ALPHABETICAL,\n self::SORT_TYPE_COUNT,\n self::SORT_TYPE_VALUE,\n ];\n }",
"private function setSort($sort)\n {\n $this->sort = [];\n $orders = array_filter(explode(',', $sort));\n array_map([$this, 'appendSort'], $orders);\n }",
"public function setIsSortable($value)\n {\n if (is_bool($value) === false)\n throw new SystemException(SystemException::EX_INVALIDPARAMETER, 'Parameter = value');\n \n $this->isSortable = $value;\n }",
"public function getSortDirAllowableValues()\r\n {\r\n return [\r\n self::SORT_DIR_ASC,\r\n self::SORT_DIR_DESC,\r\n ];\r\n }",
"public function setSortField ($value)\r\n\t{\r\n\t\t$this->sortField = $value;\r\n\t}",
"public function setSorts(array $sorts = [])\r\n {\r\n $this->sorts = Transform::sorts($sorts);\r\n }",
"public function allowToSetOptions($allow){\n $this->allowToSetOptions = (bool)$allow;\n }",
"public function getIsSortable()\n {\n return false;\n }",
"public function setSortMode($mode, $sortby = '')\n\t{\n\t\t$this->sort = $mode . ':' . $sortby;\n\t}",
"public function getAllowSort(): ?bool {\n $val = $this->getBackingStore()->get('allowSort');\n if (is_null($val) || is_bool($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'allowSort'\");\n }"
]
| [
"0.6181463",
"0.60906273",
"0.59463906",
"0.5871387",
"0.5754957",
"0.5746359",
"0.57399654",
"0.56595117",
"0.5632989",
"0.559002",
"0.5586106",
"0.55590856",
"0.54950637",
"0.54918736",
"0.54741746",
"0.5473151",
"0.54327303",
"0.54021007",
"0.53778446",
"0.53674567",
"0.5366506",
"0.5355049",
"0.5293724",
"0.5244838",
"0.5240557",
"0.5218356",
"0.52173036",
"0.51938",
"0.5152427",
"0.51385736"
]
| 0.7273288 | 0 |
Test repository method getUserRate | public function testGetUserRate()
{
// $rate = $this->em
// ->getRepository('WidgetBundle:Users')
// ->getUserRate(1);
//
// $this->assertEquals(23, $rate[0]['rate']);
$this->assertEquals(23, 23);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_my_rate($id) {\n $dql = \"SELECT r.user, u.username, count(r.sign) as cnt\n FROM AppGuestbookBundle:Rate r\n INNER JOIN AppUserBundle:User u\n WHERE u.id = r.user\n WHERE r.author = :id AND r.sign = 1\n GROUP BY r.user\n ORDER BY cnt DESC, u.username ASC\";\n\n $query = $this->getEntityManager()->createQuery($dql)\n ->setParameter(\"id\", $id);\n\n $up_for_me = $query->execute();\n\n /* down for me */\n $dql = \"SELECT r.user, u.username, count(r.sign) as cnt\n FROM AppGuestbookBundle:Rate r\n INNER JOIN AppUserBundle:User u\n WHERE u.id = r.user\n WHERE r.author = :id AND r.sign = -1\n GROUP BY r.user\n ORDER BY cnt DESC, u.username ASC\";\n\n $query = $this->getEntityManager()->createQuery($dql)\n ->setParameter(\"id\", $id);\n\n $down_for_me = $query->execute();\n\n /* my_up */\n $dql = \"SELECT r.author, u.username, count(r.sign) as cnt\n FROM AppGuestbookBundle:Rate r\n INNER JOIN AppUserBundle:User u\n WHERE u.id = r.author\n WHERE r.user = :id AND r.sign = 1\n GROUP BY r.author\n ORDER BY cnt DESC, u.username ASC\";\n\n $query = $this->getEntityManager()->createQuery($dql)\n ->setParameter(\"id\", $id);\n\n $my_up = $query->execute();\n\n /* my_down */\n $dql = \"SELECT r.author, u.username, count(r.sign) as cnt\n FROM AppGuestbookBundle:Rate r\n INNER JOIN AppUserBundle:User u\n WHERE u.id = r.author\n WHERE r.user = :id AND r.sign = -1\n GROUP BY r.author\n ORDER BY cnt DESC, u.username ASC\";\n\n $query = $this->getEntityManager()->createQuery($dql)\n ->setParameter(\"id\", $id);\n\n $my_down = $query->execute();\n\n $result = [];\n $result['up_for_me'] = $up_for_me;\n $result['down_for_me'] = $down_for_me;\n $result['my_up'] = $my_up;\n $result['my_down'] = $my_down;\n\n /* count sum */\n $up_for_me_sum = 0;\n for($i=0;$i<count($up_for_me);$i++)\n $up_for_me_sum += $up_for_me[$i]['cnt'];\n\n $down_for_me_sum = 0;\n for($i=0;$i<count($down_for_me);$i++)\n $down_for_me_sum += $down_for_me[$i]['cnt'];\n\n $my_up_sum = 0;\n for($i=0;$i<count($my_up);$i++)\n $my_up_sum += $my_up[$i]['cnt'];\n\n $my_down_sum = 0;\n for($i=0;$i<count($my_down);$i++)\n $my_down_sum += $my_down[$i]['cnt']; \n\n $result['my_up_sum'] = $my_up_sum;\n $result['my_down_sum'] = $my_down_sum;\n $result['my_all_sum'] = $my_up_sum + $my_down_sum;\n $result['up_for_me_sum'] = $up_for_me_sum;\n $result['down_for_me_sum'] = $down_for_me_sum;\n $result['for_me_all_sum'] = $up_for_me_sum - $down_for_me_sum;\n\n return $result;\n }",
"public function rate()\n {\n\n }",
"public function testGetRateLimits()\n {\n }",
"public function rateUser()\n {\n\t\t$userSession = \\Utility\\Singleton::getInstance(\"\\Control\\Session\");\n\t\t$userLog = $userSession->get('username');\n\t\t$user = new \\Foundation\\User();\n\t\t$view = \\Utility\\Singleton::getInstance(\"\\View\\Main\");\n\t\t$username=$view->get('userProfile');\n\t\t\n\t\t$hasAlreadyRated=$this->hasVoted($username, $userLog);\n\t\t$vote=$view->get('vote');\n\t\t\n if(!$hasAlreadyRated)\n {\t\t\t\n $votation=$user->usersVotation($username, $userLog, $vote);\n $reliabilityVotes = $user->getNumberOfReliabilityVotes($username);\n \n $user2=$user->getByUsername($username);\n $user2->updateReliabilityScore($reliabilityVotes,$vote);\n \n $isUpdated=$user->updateReliabilityScore($username,$user2->getReliability());\n\n return $votation; /** @todo add a return for the else statement*/\n\t\t}\n // else return something\n\t}",
"public function rate()\n {\n return $this->rate;\n }",
"public function rate()\n {\n return $this->rate;\n }",
"public function getRate()\n {\n return $this->rate;\n }",
"public function getRate()\n {\n return $this->rate;\n }",
"public function getRate()\n {\n return $this->rate;\n }",
"public function getRate()\n {\n return $this->rate;\n }",
"public function getRate()\n {\n return $this->rate;\n }",
"public function getStoreToOrderRate();",
"public function getRates()\n {\n return (new Rates)->fetchRates(); \n }",
"public function testGetUserRating()\n {\n $rating = new Rating($this->user->getId(), $this->video->getId(), 5);\n $inserted = $rating->insert();\n\n $rating = Rating::getUserRating($this->user->getId(), $this->video->getId());\n $this->assertEquals(5, $rating);\n }",
"public function getRate() {\n return $this->rate;\n }",
"public function getRating(Beer $beer, User $user=null);",
"public function getRating();",
"public function getRating();",
"public function getStoreToBaseRate();",
"public function testShouldAllowToGetCryptocurrencyRating()\n {\n define(\"COINMARKETCAP_URL\", $this->host);\n\n $cryptorating = new CryptoRating();\n $rating = $cryptorating->get();\n//file_put_contents(__DIR__ . \"/expected.json\", json_encode($rating));\n $expected = json_decode(file_get_contents(__DIR__ . \"/expected.json\"), true);\n $this->assertEquals($expected, $rating);\n }",
"public function getRate(Currency $currency);",
"public function getExchangeRate();",
"public function testReportsReputationHistoryGet()\n {\n }",
"public function testGetRates()\n {\n VCR::insertCassette('orders/getRates.yml');\n\n $order = Order::create(Fixture::basicOrder());\n\n $rates = $order->get_rates();\n\n $ratesArray = $rates['rates'];\n\n $this->assertIsArray($ratesArray);\n $this->assertContainsOnlyInstancesOf('\\EasyPost\\Rate', $ratesArray);\n }",
"public function testGetTotalRating()\n {\n $rating = new Rating($this->user->getId(), $this->video->getId(), 5);\n $rating->insert();\n\n $rating = new Rating($this->extraUser->getId(), $this->video->getId(), 2);\n $rating->insert();\n\n\n $totalRating = Rating::getTotalRating($this->video->getId());\n $this->assertEquals(7 / 2, $totalRating);\n }",
"public function getRate(sfUser $user)\n {\n if (!kRateTools::isGuardBindEnabled())\n {\n return null;\n }\n\n return $this->getRatesQuery()\n ->andWhere('n.user_id = ?', array($user->getGuardUser()->getId()))\n ->fetchOne();\n }",
"public function getUserStats($userId);",
"function intRate($type=null){\n\t\tglobal $driver;\n if($type==2){\n return 11.1;\n }else{\n $sql =\t\"SELECT interestrate FROM settings\"; //Retrieve the interest rate\n if($results\t= $driver->perform_request($sql)):\n $row\t= $driver->load_data($results,MYSQL_ASSOC);\n $interest = ($row['interestrate']>0)?($row['interestrate']):20;\n else:\n die('<p class=\"error\">Interest rate Error: '.mysql_error().'</p>');\n endif;\n return $interest; //The interest rate\n }\n}",
"public function test_it_can_tell_you_how_much_it_is_worth()\n {\n $user = factory(User::class)->create();\n // Who has set an hourly rate\n $settings = factory(UserSetting::class)->create(['user_id' => $user->id, 'hourly_rate' => 35]);\n // Given we have a project\n $project = factory(Project::class)->create(['user_id' => $user->id, 'total_seconds' => 7200]);\n\n // Get total Number of Seconds in Project\n $totalSeconds = $project->total_seconds;\n // Convert to hours\n $hours = floor($totalSeconds / 3600);\n // Multiply the users hourly rate by the number of hours to get total cost\n $total = $user->settings->hourly_rate * $hours;\n\n // They should be the same\n $this->assertSame($total, $project->total_cost_quoted);\n }",
"public function getCompanyRate($companyName,$rate) {\n\n$con = ($GLOBALS[\"___mysqli_ston\"] = mysqli_connect($this->myHost, $this->username, $this->password));\nif (!$con)\n {\n die('Could not connect: ' . ((is_object($GLOBALS[\"___mysqli_ston\"])) ? mysqli_error($GLOBALS[\"___mysqli_ston\"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)));\n }\n\n((bool)mysqli_query( $con, \"USE \" . $this->database));\n\n$result = mysqli_query($GLOBALS[\"___mysqli_ston\"], \"SELECT ($rate) as rate FROM Company WHERE companyName = '$companyName' \");\n\nwhile($row = mysqli_fetch_array($result))\n {\nreturn $row['rate'];\n }\n\n}"
]
| [
"0.68033165",
"0.6739725",
"0.6458764",
"0.64047",
"0.6158825",
"0.6158825",
"0.6139815",
"0.6139815",
"0.6139815",
"0.6139815",
"0.6139815",
"0.61303025",
"0.6114092",
"0.60608786",
"0.6044403",
"0.59355843",
"0.5923047",
"0.5923047",
"0.59197664",
"0.58874923",
"0.58788514",
"0.5854957",
"0.5848411",
"0.58370405",
"0.58215386",
"0.57682073",
"0.5727182",
"0.5715345",
"0.5714605",
"0.5693569"
]
| 0.8168837 | 0 |
Set node as current | public function setCurrentNode(NavigationNode $node)
{
if (isset($this->current)) {
$this->current->isCurrent = false;
}
$node->isCurrent = true;
$this->current = $node;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setCurrentNode(Node $node) : Node\n {\n $this->currentNode = $node;\n\n return $this->currentNode;\n }",
"public function completeNode() {\n $this->current = $this->current->parent();\n }",
"public function setCurrent($current)\n {\n if (!empty($current))\n $this->current = $current;\n }",
"function current(){}",
"function current(){}",
"function current(){}",
"function current(){}",
"function current(){}",
"public function set($s) {\r\n\t\t$this->current = $s;\r\n\t}",
"public static function setNode($node) {\r\n static::$node = $node;\r\n }",
"private function popNode()\r\n {\r\n $this->currentNode = $this->currentNode->parentNode;\r\n }",
"protected function _setCurrent($current)\n {\n $this->current = $current;\n\n return $this;\n }",
"public function getCurrentNode() : Node\n {\n return $this->currentNode;\n }",
"public function setCurrentChild(bool $currentChild): void;",
"public function setCurrent($current)\n {\n $this->current = $current;\n\n return $this;\n }",
"public function setActive(NodeInterface $active)\n {\n $this->active = $active;\n }",
"public function setCurrent(bool $current): void {\n\t\t$this->current = $current;\n\t}",
"public function setToNode(int $toNode): void {\n $this->toNode = $toNode;\n }",
"abstract protected function current();",
"public function fastForward()\n {\n $this->current = $this->top();\n }",
"public function resetCurrent(): void\n {\n $this->current = $this->lastPart = '';\n }",
"public function current(): Node\n {\n return $this->nodes[$this->pointer];\n }",
"public function setModeCurrent() {\n\t\t$this->mode = 'current';\n\t}",
"public function setRoot(&$node):RootedGraph;",
"public function setFromNode(int $fromNode): void {\n $this->fromNode = $fromNode;\n }",
"public function enterNode(Node $node)\n {\n }",
"public function setCur($key, \\RKW\\RkwSearch\\TreeTagger\\TreeTaggerRecord $item) {\n\n if ($this->checkData($item, 'cur', $key)) {\n $this->cur[$key] = $item;\n $this->bases[] = $item->getBase();\n }\n }",
"public function setParent(Module_Node_Model $parent = null);",
"public function current() {}",
"public function setParent(Node $parent)\n {\n $this->parent = $parent;\n }"
]
| [
"0.6608069",
"0.6550648",
"0.633251",
"0.6163777",
"0.6163777",
"0.6163777",
"0.6163777",
"0.6163777",
"0.6136825",
"0.5976348",
"0.5903528",
"0.5869445",
"0.5860498",
"0.5822216",
"0.5809531",
"0.58032036",
"0.5725372",
"0.56890494",
"0.5673381",
"0.5667274",
"0.5648879",
"0.5596918",
"0.556894",
"0.55547774",
"0.55522907",
"0.5545747",
"0.55346143",
"0.55271304",
"0.5516356",
"0.55162"
]
| 0.6649607 | 0 |
Handle the document "created" event. | public function created(Document $document)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function givenNewDocumentIsCreated()\n {\n }",
"public static function created($callback)\n {\n self::listenEvent('created', $callback);\n }",
"public function onCreated()\n {\n parent::onCreated();\n\n }",
"public function onCreated()\n {\n parent::onCreated();\n\n }",
"protected function created()\n {\n $this->response = $this->response->withStatus(201);\n $this->jsonBody($this->payload->getOutput());\n }",
"public function created(Post $post)\n {\n $post->recordActivity('created');\n }",
"function on_creation() {\n $this->init();\n }",
"public function postHeaderEvent() {\n\t\t\tcreateDocumentLink();\n\t\t}",
"public function postHeaderEvent() {\n\t\t\tcreateDocumentLink();\n\t\t}",
"public function postHeaderEvent() {\n\t\t\tcreateDocumentLink();\n\t\t}",
"function created()\n {\n /**\n * [signal]\n *\n * IDF_Project::created\n *\n * [sender]\n *\n * IDF_Project\n *\n * [description]\n *\n * This signal allows an application to perform special\n * operations at the creation of a project.\n *\n * [parameters]\n *\n * array('project' => $project)\n *\n */\n $params = array('project' => $this);\n Pluf_Signal::send('IDF_Project::created',\n 'IDF_Project', $params);\n }",
"public function created(Auditable $model)\n {\n Auditor::execute($model->setAuditEvent('created'));\n }",
"public function created()\n\t{\n\t\tif (!$this->ismilestone) {\n\t\t\t$this->createDefaultMilestone();\n\t\t}\n\n\t\t$this->versioningService->createVersion($this);\n\t}",
"public function created(Post $post)\n {\n //\n }",
"public function created()\n\t{\n\t\t$parent = $this->projectService->getProject($this->projectid);\n\t\tif ($parent) {\n\t\t\t$this->versioningService->createVersion($parent, 'featureupdate');\n\t\t}\n\t\t$this->versioningService->createVersion($this);\n\t}",
"private function _handleDocumentCreation(array $statusData)\n {\n $this->_handleInvoiceCreation($statusData);\n $this->_handleCreditmemoCreation($statusData);\n }",
"protected function onCreated()\n {\n return true;\n }",
"public static function created(callable $listener, $priority = 0)\n {\n static::listen(ModelEvent::CREATED, $listener, $priority);\n }",
"function after_create() {}",
"public function onPrePersist()\n {\n $this->created = new \\DateTime('now');\n }",
"public function create(Model\\Document\\Document $document): void\n {\n $path = $this->type.'/nuovo';\n $response = $this->client->request('POST', $path, $document);\n\n $result = Json::decode((string) $response->getBody(), true);\n (\\Closure::bind(function ($id, $token, $client): void {\n $this->id = $id;\n $this->token = $token;\n $this->client = $client;\n }, $document, Model\\Document\\Document::class))($result['new_id'], $result['token'], $this->client);\n }",
"public function onPrePersist()\n {\n $this->setCreated(new \\DateTime(\"now\"));\n }",
"public function onPrePersist()\n {\n $this->created = new \\DateTime(\"now\");\n }",
"public function create()\n\t{\n\t\t$this->authorize('manage', Document::class);\n\n\t\treturn view('docs.create');\n\t}",
"public static function created($callback, $priority = 0)\n {\n static::registerModelEvent('created', $callback, $priority);\n }",
"public function created($item)\n {\n $this->elastic->index($item->getTable(), $item->id, $item->toArray());\n }",
"private function createDocument() {\n $this->createObjectProperties();\n $this->createRelationships();\n $this->createIngestFileDatastreams();\n $this->createPolicy();\n $this->createDocumentDatastream();\n $this->createDublinCoreDatastream();\n $this->createCollectionPolicy();\n $this->createWorkflowStream();\n }",
"protected function _precreate() {\n }",
"public function create()\n {\n $documento = documento::get();\n \n return view('Document.newDocument',['documento'=>$documento]);\n }",
"public function instance_created() {\n if ($this->isready && !$this->prescan) {\n // It is supposed the store instance to expect an empty folder.\n $this->purge_all_definitions();\n }\n }"
]
| [
"0.66045624",
"0.622778",
"0.6096975",
"0.6096975",
"0.6038235",
"0.5979925",
"0.5867223",
"0.5838981",
"0.5838981",
"0.5838981",
"0.58366156",
"0.57841736",
"0.5776711",
"0.56983906",
"0.5663248",
"0.56577706",
"0.56277",
"0.5620191",
"0.5582137",
"0.55768204",
"0.5566712",
"0.55592644",
"0.55463713",
"0.5540446",
"0.5533944",
"0.54958713",
"0.5489284",
"0.5482064",
"0.54697454",
"0.54686743"
]
| 0.7634924 | 0 |
Handle the document "updated" event. | public function updated(Document $document)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function handleUpdated(Updated $event): void\n {\n $entity = $event->entity();\n\n $this->scheduleCreatingNewDocuments($entity);\n $this->scheduleRemovingOldDocuments($entity);\n\n $this->elasticsearchManager->commit();\n }",
"public function onUpdateRecord()\n {\n $this->updated = new \\DateTime();\n $this->rev++;\n }",
"public static function updated($callback)\n {\n self::listenEvent('updated', $callback);\n }",
"public function testUpdateDocumentMetadata()\n {\n }",
"public function onUpdate();",
"public function onUpdate();",
"public function onUpdate();",
"protected function _update()\n\t{\n\t}",
"protected function _update()\n {\n \n }",
"protected function _update()\n {\n \n }",
"protected function update() {}",
"public function update($uavmDocument);",
"public function update() {\r\n }",
"public function update()\n {\n }",
"public function _update()\n\t {\n\t \t$this->notifyObservers(__FUNCTION__);\n\t }",
"public function updating()\n {\n # code...\n }",
"protected function performUpdate() {}",
"public function update()\r\n {\r\n //\r\n }",
"protected function afterUpdating()\n {\n }",
"public function update()\n {\n //\n }",
"public function update()\n {\n //\n }",
"public function after_update() {}",
"public function updateDocument(){\n\n // should have created an instance of model and update the variable to now() or...\n\n // ... call the touch() mathod so the below code isn't currently working - so it's commented out\n\n /*\n $titleOfThisDocument = Input::get('toUpdate');\n\n $current_timestamp = Carbon::now()->timestamp;\n\n $documentToUpdate = DB::table('documents')->select()->where('title', $titleOfThisDocument); //->update(['updated_at' => $current_timestamp]);\n\n\n\n $documentToUpdate->updated_at = Carbon::now();\n $documentToUpdate->save();\n*/\n return redirect('/home');\n }",
"protected function onUpdated()\n {\n return true;\n }",
"public function update()\n {\n }",
"public function update()\n {\n }",
"public function update()\n {\n }",
"public function update()\n {\n }",
"public function update()\n {\n }",
"public function update()\n {\n }"
]
| [
"0.694832",
"0.65528476",
"0.6543152",
"0.6444287",
"0.6300758",
"0.6300758",
"0.6300758",
"0.62854874",
"0.62371033",
"0.62371033",
"0.6213151",
"0.61925334",
"0.6171606",
"0.61399823",
"0.6138751",
"0.6133197",
"0.6127765",
"0.6125354",
"0.61223173",
"0.6095574",
"0.6095574",
"0.60818726",
"0.6076828",
"0.60670835",
"0.60525644",
"0.60525644",
"0.60525644",
"0.60525644",
"0.60525644",
"0.60525644"
]
| 0.76224107 | 0 |
Handle the document "restored" event. | public function restored(Document $document)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function onRestored()\n {\n return true;\n }",
"function restore()\n {\n }",
"public function undoRestore ()\n {\n if (file_exists ( $this->_previewFilename ))\n {\n unlink($this->_previewFilename);\n }\n }",
"public function restore() {\n self::restoreAll($this->chapterID);\n }",
"public function onrestoreCallback($intID, $strTable, $arrData, $intVersion);",
"public function restore()\n {\n //\n }",
"public function updraft_ajaxrestore() {\n\t\t$this->prepare_restore();\n\t\tdie();\n\t}",
"public function restore()\n {\n }",
"public function restore() {}",
"public function restored(Auditable $model)\n {\n Auditor::execute($model->setAuditEvent('restored'));\n\n // Once the model is restored, we need to put everything back\n // as before, in case a legitimate update event is fired\n static::$restoring = false;\n }",
"public function restore();",
"public function restored(PurchaseReceipt $purchaseReceipt)\n {\n //\n }",
"protected static function restore() {}",
"public function restore(): void\n\t{\n\t\t$this->processor->restore();\n\t}",
"public function restored(Post $post)\n {\n $post->recordActivity('restored');\n }",
"public function afterRestore() : bool\n\t{\n\t\treturn true;\n\t}",
"public function restored(Remission $remission)\n {\n //\n }",
"function undo()\n {\n $this->document->eraseLast();\n }",
"public function restoring($model)\n\t{\n\t}",
"public function restored(Order $order)\n\t{\n\t\t//\n\t}",
"public function restored(Order $order)\n\t{\n\t\t//\n\t}",
"public function restoring(Auditable $model)\n {\n // When restoring a model, an updated event is also fired.\n // By keeping track of the main event that took place,\n // we avoid creating a second audit with wrong values\n static::$restoring = true;\n }",
"public function restored(Stock $stock)\n {\n //\n }",
"public function afterRestoreResponse($data)\n {\n }",
"public function restored(Historia $historia)\n {\n //\n }",
"public function restored(Installment $installment)\n {\n //\n }",
"public function restored(Conversation $conversation)\n {\n //\n }",
"public function restored(Article $article)\n {\n //\n }",
"public function after_restore(){\n \tglobal $DB;\n \t\n \t\n \t$pagemenuid = $this->get_activityid();\n\n \tif ($modulelinks = $DB->get_records('pagemenu_links', array('pagemenuid' => $pagemenuid))){\n \t\tforeach($modulelinks as $ml){\n \t\t\t\n \t\t\t$ml->previd = $this->get_mappingid('pagemenu_links', $ml->previd);\n \t\t\t$ml->nextid = $this->get_mappingid('pagemenu_links', $ml->nextid);\n\n\t\t\t\tif ($ml->type == 'module'){\n\t \t\t\tif ($link = $DB->get_record('pagemenu_link_data', array('linkid' => $ml->id))){\n\t \t\t\t\t$link->value = $this->get_mappingid('course_module', $link->value);\n\t \t\t\t\t$DB->update_record('pagemenu_link_data', $link);\n\t \t\t\t} else {\n\t\t\t\t\t\t$this->get_logger()->process(\"Failed to restore dependency for pagemenu link '$ml->name'. \", backup::LOG_ERROR); \t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$DB->update_record('pagemenu_links', $ml);\n \t\t}\n \t} \t \t\n }",
"public function after_restore($restore) {\n global $DB;\n\n $data = $this->get_decoded_data();\n if ($newitem = \\restore_dbops::get_backup_ids_record($restore->get_restoreid(), 'course_module', $data->dateitem)) {\n $data->dateitem = $newitem->newitemid;\n try {\n $DB->set_field('customcert_elements', 'data', $this->save_unique_data($data), array('id' => $this->get_id()));\n } catch (\\dml_exception $e) {\n unset($e);\n }\n }\n }"
]
| [
"0.6413487",
"0.61572343",
"0.61281914",
"0.60636044",
"0.5993769",
"0.5970906",
"0.59535384",
"0.59361774",
"0.58420205",
"0.5821794",
"0.5806341",
"0.5762178",
"0.5722664",
"0.5635696",
"0.557679",
"0.5553065",
"0.54790056",
"0.5474604",
"0.5469068",
"0.54620594",
"0.54620594",
"0.5417207",
"0.5408245",
"0.5404236",
"0.5389299",
"0.5373132",
"0.53699315",
"0.53501844",
"0.5348062",
"0.53417146"
]
| 0.7232875 | 0 |
Handle the document "force deleted" event. | public function forceDeleted(Document $document)
{
//
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function doDeleteDocument() {\n try{\n $this->service->remove($this->owner);\n }\n catch(NotFoundException $e)\n {\n trigger_error(\"Deleted document not found in search index.\", E_USER_NOTICE);\n }\n\n }",
"public function deleteDocument() {\n\n // should get instance of model and run delete-function\n\n // softdeletes-column is found inside database table\n\n return redirect('/home');\n }",
"public function onBeforeDelete();",
"public function onAfterDelete() {\n if (!($this->owner instanceof \\SiteTree))\n {\n $this->doDeleteDocumentIfInSearch();\n }\n }",
"protected function _postDelete() {}",
"protected function _postDelete() {}",
"function __safeDeleteDocument() {\n\t\ttry {\n\t\t\t$this->solr->deleteById($this->__createDocId());\n\t\t\t$this->solr->commit();\n\t\t\t$this->solr->optimize();\t\n\t\t} catch (Exception $e) {\n\t\t\t$this->log($e, 'solr');\n\t\t}\n\t}",
"public function deleted(Document $document)\n {\n if(isset($document->path)) {\n // delete the associated file\n $path = $document->path;\n $fileExists = Storage::disk('spaces')->exists($path);\n if($fileExists) {\n Storage::disk('spaces')->delete($path);\n }\n } \n }",
"protected function _preDelete() {}",
"public function onAfterDelete();",
"protected function onDeleted()\n {\n return true;\n }",
"public function handleDeleted(Deleted $event): void\n {\n $entity = $event->entity();\n\n $this->scheduleRemovingOldDocuments($entity);\n\n $this->elasticsearchManager->commit();\n }",
"public function delete($document_id);",
"public function onAfterDelete() {\n\t\tif (!$this->owner->ID || self::get_disabled() || self::version_exist($this->owner))\n\t\t\treturn;\n\t\t$this->onAfterDeleteCleaning();\n\t}",
"protected function afterDelete()\r\n {\r\n }",
"public function preDelete() { }",
"public function testOnDeletedDocument() {\n\n $obj = new FileSystemStorageProvider($this->logger, $this->directory);\n\n $obj->onDeletedDocument($this->doc1);\n $this->assertFileNotExists($this->directory . \"/1/2/4\");\n }",
"public static function forceDeleted($callback)\n {\n static::registerModelEvent('forceDeleted', $callback);\n }",
"protected function afterDelete()\n {\n }",
"public function forceDelete()\n {\n //\n }",
"public function onBeforeDelete() {\r\n\t\tparent::onBeforeDelete();\r\n\t}",
"public function onDelete(): void\n {\n if ($this->globals->getUpdated() !== (int) $_GET['id']) {\n $this->_entity->delete($_GET['id']);\n $this->globals->setUpdated($_GET['id']);\n $this->globals->unsetAlert();\n }\n }",
"protected function _postDelete()\n\t{\n\t}",
"public function deleted() {\n // TODO Implement this\n }",
"public function forceDelete();",
"public function handleDelete()\n {\n Craft::$app->getDb()->createCommand()\n ->delete(Table::REVISIONS, ['id' => $this->owner->revisionId])\n ->execute();\n }",
"function delete() {\n\n $document = Doctrine::getTable('DocDocument')->find($this->input->post('doc_document_id'));\n $node = Doctrine::getTable('Node')->find($document->node_id);\n\n if ($document && $document->delete()) {\n//echo '{\"success\": true}';\n\n $this->syslog->register('delete_document', array(\n $document->doc_document_filename,\n $node->getPath()\n )); // registering log\n\n $success = 'true';\n $msg = $this->translateTag('General', 'operation_successful');\n } else {\n//echo '{\"success\": false}';\n $success = 'false';\n $msg = $e->getMessage();\n }\n\n $json_data = $this->json->encode(array('success' => $success, 'msg' => $msg));\n echo $json_data;\n }",
"public static function deleted($callback)\n {\n self::listenEvent('deleted', $callback);\n }",
"protected function onDeleting()\n {\n return true;\n }",
"protected function _predelete() {\n }"
]
| [
"0.7502739",
"0.73461854",
"0.70802426",
"0.7055709",
"0.69611543",
"0.69611216",
"0.6902899",
"0.6897119",
"0.68208843",
"0.6817443",
"0.67831874",
"0.67417634",
"0.67088664",
"0.6694708",
"0.6646327",
"0.66438305",
"0.66282654",
"0.66268647",
"0.6569746",
"0.6557649",
"0.65484744",
"0.6533234",
"0.65216553",
"0.65176773",
"0.6484673",
"0.647861",
"0.6461836",
"0.64402264",
"0.6432077",
"0.64309967"
]
| 0.7822314 | 0 |
Helper method to create an exercise via HTTP POST. | protected function createExercise($params)
{
return $this->actingAs($this->testUser)->json("POST", route('exercises.store'), $params);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testMakePostRequest()\n {\n $client = new MockClient('https://api.xavierinstitute.edu', [\n new JsonResponse(['teacher' => 'Charles Xavier'], 201),\n ]);\n\n $this->assertEquals($client->post('teachers'), ['teacher' => 'Charles Xavier']);\n }",
"public function store(Request $request)\n {\n $title = $request->get('title');\n $teacher = session()->get('id');\n $grade = $request->get(\"grade\");\n $postingTime = $request->get(\"postingTime\");\n $deadlineSubmission = $request->get(\"deadlineSubmission\");\n $question = $request->get(\"question\");\n if ($title == 0) {\n $content = $request->get(\"content\");\n } else {\n $file = $request->file('file');\n $fileName = \"file-\" . time() . '.' . $file->getClientOriginalName();\n $file->move('upload', $fileName);\n $content = 'upload/' . $fileName;\n }\n\n\n $exercise = new Exercise();\n $exercise->title = $title;\n $exercise->question = $question;\n $exercise->content = $content;\n $exercise->postingTime = $postingTime;\n $exercise->deadlineSubmission = $deadlineSubmission;\n $exercise->status = \"1\";\n $exercise->idGrade = $grade;\n $exercise->idTeacher = $teacher;\n $exercise->save();\n return response()->json(['data' => $exercise], 200);\n }",
"public function addExercise($data){\n\n\t\t$defaults = array('title' => '',\n\t\t\t 'desc' => '',\n\t\t\t 'group_id' => 0,\n\t\t\t 'phone_group_id' => 0,\n\t\t\t 'type' => 0,\n\t\t\t 'phone_id' => 0);\n\n\t\t$data = escapeArray($data, $defaults);\n\n\t\t$sql = \"INSERT INTO `exercises` (`id`, `title`, `desc`, `type`, `group_id`, `phone_id`, `phone_group_id`, `user_id`, `updated`)\"\n\t\t\t. \" VALUES (NULL, '{$data['title']}', '{$data['desc']}', '{$data['type']}', '{$data['group_id']}', '{$data['phone_id']}', '{$data['phone_group_id']}', '\" \n\t\t\t. $this -> userId . \"', CURRENT_TIMESTAMP)\";\n\t\tmysql_unbuffered_query($sql);\n\t\treturn mysql_insert_id();\n\t}",
"public function make_exam()\n {\n $inputs = $this->check_make_input();\n // return json_encode($inputs);\n if (!is_array($inputs) || !$inputs) {\n $output[\"ok\"] = false;\n $output[\"message\"] = \"inputs faild\";\n return json_encode($output);\n }\n\n $user_id = $this->un_token($_POST[\"token\"]);\n if (!$user_id) {\n $output[\"ok\"] = false;\n $output[\"message\"] = \"User undefined\";\n return json_encode($output);\n }\n\n if (!$this->check_access_to_option($inputs, (int) $user_id)) {\n $output[\"ok\"] = false;\n $output[\"message\"] = \"access denied\";\n return json_encode($output);\n }\n\n $exam_generated = $this->exam_generator->new_exam($user_id, $inputs);\n return $exam_generated;\n if (!$exam_generated)\n\n $output[\"ok\"] = true;\n $output[\"message\"] = \"ok\";\n $output[\"exam\"] = $exam_generated;\n\n // return \"HH\";\n return json_encode($output);\n }",
"public function testCreateNewPost()\n {\n $response = $this->call('Post', '/post', [\n 'title' => 'Php Unit test',\n 'body' => 'Php unit test body',\n 'tag' => 'phpunit,test'\n ]);\n \n $this->seeHeader('content-type', 'application/json');\n $this->seeStatusCode(200);\n $this->seeInDatabase('posts', ['title' => 'Php Unit test']);\n \n $data = json_decode($response->getContent(true), true);\n $this->assertArrayHasKey('id', $data['data']);\n \n \n }",
"public function testInsertUrlUsingPOST()\n {\n }",
"public function submit_survey_post()\n\t\t{\n\t\t\t$testId = $this->post('testId');\n\t\t\t$uuid = $this->post('uuid');\n\t\t\t$weekSend = $this->post('weekSend');\n\t\t\tif(!empty($testId) &&\n\t\t\t\t!empty($uuid) &&\n\t\t\t\t!empty($weekSend)\n\t\t\t)\n\t\t\t{\n\t\t\t\t$insertData = array(\n\t\t\t\t\t'ts_uuid' => $uuid,\n\t\t\t\t\t'ts_test_id' => $testId,\n\t\t\t\t\t'ts_week' => $weekSend,\n\t\t\t\t\t'ts_submitted_on' => date('Y-m-d H:i:s')\n\t\t\t\t);\n\t\t\t\t$tempStatus = $this->Student_survey_model->insertSurvey($insertData);\n\t\t\t\tif($tempStatus)\n\t\t\t\t{\n\t\t\t\t\t$data['status'] = $this->lang->line('SUCCESS');\n\t\t\t\t\t$data['message'] = $this->lang->line('VALID_TOKEN_MESSAGE');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$data['status'] = $this->lang->line('FAIL');\n\t\t\t\t\t$data['message'] = $this->lang->line('unable_save_answer');\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$data['status'] = $this->lang->line('FAIL');\n\t\t\t\t$data['message'] = $this->lang->line('please_pass_required');\n\t\t\t}\n\t\t\t$this->response($data , 200);\n\t\t}",
"public function postAction()\n {\n \t$this->_object->title = $this->getRequest()->getParam('title');\n \t$this->_object->text = $this->getRequest()->getParam('text');\n \t$this->_object->answer = $this->getRequest()->getParam('answer');\n\t\t$this->_object->tag = $this->getRequest()->getParam('tags');\n\t\t$this->_objectMapper->save($this->_object);\n \t$this->getResponse()\n ->setHttpResponseCode(201);\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 }",
"public function test_store_post()\n {\n $topic = Topic::factory()->create();\n $resp =\n $this->actingAs($this->user)\n ->withHeaders([\n 'Content-Type' => 'application/json',\n 'Accept' => 'application/json',\n ])\n ->postJson(\n '/api/topics/' . $topic->id . '/posts',\n [\n \"body\" => \"testsqx test\",\n ]\n );\n $resp->assertStatus(201);\n }",
"public function post($t);",
"public function addSubmittedExercise() {\n\n\t\t//$answers_from_current_user = xaseAnswer::where(array('user_id' => $this->dic->user()->getId(), 'question_id' => $this->xase_question->getId()))->get();\n\n\n\t\t$all_items_assisted_exercise = xaseQuestion::where(array( 'assisted_exercise_id' => $this->assisted_exercise->getId() ))->get();\n\n\t\t$answers_from_current_user = xaseQuestionTableGUI::getAllUserAnswersFromAssistedExercise($all_items_assisted_exercise, $this->dic, $this->dic->user());\n\n\t\t/*\n\t\t * @var xaseAnswer $answers_from_current_user\n\t\t */\n\t\tforeach ($answers_from_current_user as $answer_from_current_user) {\n\t\t\tif (is_array($answers_from_current_user)) {\n\t\t\t\t$answer_from_current_user_object = xaseAnswer::where(array( 'id' => $answer_from_current_user['id'] ))->first();\n\t\t\t\t$answer_from_current_user_object->setAnswerStatus(xaseAnswer::ANSWER_STATUS_CAN_BE_VOTED);\n\t\t\t\t$answer_from_current_user_object->setSubmissionDate(date('Y-m-d H:i:s'));\n\t\t\t\t$answer_from_current_user_object->setIsAssessed(0);\n\t\t\t\t$answer_from_current_user_object->store();\n\t\t\t} else {\n\t\t\t\t$answer_from_current_user_object = xaseAnswer::where(array( 'id' => $answers_from_current_user['id'] ));\n\t\t\t\t$answer_from_current_user_object->setAnswerStatus(xaseAnswer::ANSWER_STATUS_CAN_BE_VOTED);\n\t\t\t\t$answer_from_current_user_object->setSubmissionDate(date('Y-m-d H:i:s'));\n\t\t\t\t$answer_from_current_user_object->setIsAssessed(0);\n\t\t\t\t$answer_from_current_user_object->store();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tilUtil::sendSuccess($this->obj_facade->getLanguageValue('success_message_exercise_submitted'), true);\n\t\t$this->obj_facade->getCtrl()->redirectByClass(xaseQuestionGUI::class, xaseQuestionGUI::CMD_INDEX);\n\t}",
"public function post_create() {\n\t\t$ext = 'json';\n\t\t$header = 'application/json';\n\n\t\tif (Request::accepts('text/xml')) {\n\t\t\t$ext = 'xml';\n\t\t\t$header = 'text/xml';\n\t\t}\n\n\t\t$todo = new Todo;\n\t\t$todo->title = Input::get('title');\n\t\t$todo->task = Input::get('task');\n\t\t$todo->due_date = Input::get('due_date');\n\t\t$todo->done = Input::get('done');\n\t\t$todo->save();\n\n\t\treturn Response::make('', '201',\n\t\t\t\tarray('Content-Type' => $header, 'Location' => 'todos/'\n\t\t\t\t\t\t. $todo->id));\n\t}",
"public function actionCreate() {\n $test = $this->tests->add($this->user->id);\n $values['test_id'] = $test->id;\n $this->questions->add($values);\n $this->redirect('Test:edit', $test->id);\n }",
"public function testPostHospital(){\r\n\t\t$this->http = new Client(['base_uri' => 'http://localhost/casecheckapp/public/index.php/']);\r\n\t\t\r\n\t\t//Test array\r\n\t\t$inputdata = ['json' => [\r\n 'name' => 'Hospital added',\r\n 'city' => 'Chicago',\r\n 'state' => 'IL',\r\n\t\t'address' =>'22 Random St']\r\n\t\t];\r\n\r\n\t\t//Test HTTP status ok\r\n\t\t$response= $this->http->post('api/v1/hospital',$inputdata);\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\t\r\n\t}",
"public function testCreateStuff()\n {\n $this->client->request(\n 'POST',\n '/api/teacher/courses',\n array(),\n array(),\n array(\n 'key' => '633',\n 'secret' => 'testpass',\n 'CONTENT_TYPE' => 'application/json'\n ),\n '{\"course\":\n {\n \"course_name\":\"Demo Course\",\n \"instructor_name\":\"Dan Green\",\n \"archived\":false\n }\n }'\n );\n\n\n $this->assertTrue($this->client->getResponse()->isSuccessful());\n\n\n exit;\n\n /*\n * Add an Assignment\n */\n $this->client->request(\n 'POST',\n '/api/teacher/assignments',\n array(),\n array(),\n array('CONTENT_TYPE' => 'application/json'),\n '{\n \"assignment\": {\n \"admin_id\": null,\n \"archived\": false,\n \"assignment_name\": \"Homework\",\n \"course_id\": 400,\n \"description\": \"Test Description,\",\n \"due_date\": \"2015-10-29 09:00\",\n \"time_of_day\": \"Morning\",\n \"time_visible\": false\n }\n }'\n );\n var_dump($this->client->getResponse()->getStatusCode());\n $this->assertEquals(\n 200, // or Symfony\\Component\\HttpFoundation\\Response::HTTP_OK\n $this->client->getResponse()->getStatusCode()\n );\n }",
"public function testCreateExperiment()\n {\n echo \"\\nTesting Experiment creation...\";\n $input = file_get_contents('exp.json');\n //echo $input;\n //$url = TestServiceAsReadOnly::$elasticsearchHost . \"/CIL_RS/index.php/rest/experiments?owner=wawong\";\n $url = TestServiceAsReadOnly::$elasticsearchHost . $this->context.\"/experiments?owner=wawong\";\n //echo \"\\n-------------------------\";\n //echo \"\\nURL:\".$url;\n //echo \"\\n-------------------------\";\n \n $params = json_decode($input);\n $data = json_encode($params); \n $response = $this->curl_post($url,$data);\n //echo \"\\n-----Create Experiment Response:\".$response;\n \n $result = json_decode($response);\n \n $this->assertTrue(!$result->success);\n \n }",
"public function testInsertSupplierUsingPOST()\n {\n }",
"public function experiments_post()\n {\n if(!$this->canWrite())\n {\n $array = $this->getErrorArray2(\"permission\", \"This user does not have the write permission\");\n $this->response($array);\n return;\n }\n \n $sutil = new CILServiceUtil();\n $jutil = new JSONUtil();\n $input = file_get_contents('php://input', 'r');\n \n if(is_null($input))\n {\n $mainA = array();\n $mainA['error_message'] =\"No input parameter\";\n $this->response($mainA);\n\n\n }\n $owner = $this->input->get('owner', TRUE);\n if(is_null($owner))\n $owner = \"unknown\";\n $params = json_decode($input);\n if(is_null($params))\n {\n $mainA = array();\n $mainA['error_message'] =\"Invalid input parameter:\".$input;\n $this->response($mainA);\n }\n \n $jutil->setExpStatus($params,$owner);\n \n if(is_null($params))\n {\n $mainA = array();\n $mainA['error_message'] =\"Invalid input parameter:\".$input;\n $this->response($mainA);\n\n }\n $result = $sutil->addExperiment($params);\n \n $this->response($result);\n }",
"private function createExperiment()\n {\n $input = file_get_contents('exp.json');\n //echo $input;\n //$url = TestServiceAsReadOnly::$elasticsearchHost . \"/CIL_RS/index.php/rest/experiments?owner=wawong\";\n $url = TestServiceAsReadOnly::$elasticsearchHost .$this->context.\"/experiments?owner=wawong\";\n \n $params = json_decode($input);\n $data = json_encode($params); \n $response = $this->curl_post($url,$data);\n \n \n $result = json_decode($response);\n $id = $result->_id;\n \n return $id;\n }",
"public function createAction()\n {\n\n if (!$this->request->isPost()) {\n return $this->dispatcher->forward(array(\n \"controller\" => \"answer\",\n \"action\" => \"index\"\n ));\n }\n\n $answ = new Answ();\n\n $answ->setAnswId($this->request->getPost(\"answid\"));\n $answ->setQuesId($this->request->getPost(\"quesid\"));\n $answ->setUserId($this->request->getPost(\"userid\"));\n $answ->setAgree($this->request->getPost(\"agree\"));\n $answ->setRank($this->request->getPost(\"rank\"));\n $answ->setComment($this->request->getPost(\"comment\"));\n $answ->setInans($this->request->getPost(\"inans\"));\n $answ->setRankId($this->request->getPost(\"rankid\"));\n $answ->setChgreason($this->request->getPost(\"chgreason\"));\n $answ->setChgcomment($this->request->getPost(\"chgcomment\"));\n $answ->setCrdt($this->request->getPost(\"crdt\"));\n $answ->setCrdtId($this->request->getPost(\"crdtid\"));\n $answ->setUpdt($this->request->getPost(\"updt\"));\n $answ->setUpdtId($this->request->getPost(\"updtid\"));\n $answ->setDelmark($this->request->getPost(\"delmark\"));\n \n\n if (!$answ->save()) {\n foreach ($answ->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n return $this->dispatcher->forward(array(\n \"controller\" => \"answer\",\n \"action\" => \"new\"\n ));\n }\n\n $this->flash->success(\"answ was created successfully\");\n\n return $this->dispatcher->forward(array(\n \"controller\" => \"answer\",\n \"action\" => \"index\"\n ));\n\n }",
"public function create()\n {\n $json = [\n 'status' => false,\n 'message' => 'You cannot create post',\n ];\n\n if($this->isUserAuth()){\n $template = new Template();\n\n $template->data['post_id'] = 0;\n\n $json = [\n 'status' => true,\n 'html' => $template->fetch('add_post_form'),\n ];\n }\n\n $this->jsonAnswer($json);\n }",
"public function createQuestion($examID, $text){\n \n $data = array(\n 'examID' => $examID,\n 'text' => $text\n );\n \n return $this->insert($data);\n }",
"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 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 postSubmission()\n {\n $this->app->response->setStatus( 201 );\n $body = $this->app->request->getBody();\n\n $submissions = Submission::decodeSubmission($body);\n\n // always been an array\n $arr = true;\n if ( !is_array( $submissions ) ){\n $submissions = array( $submissions );\n $arr = false;\n }\n\n\n $res = array( );\n foreach ( $submissions as $submission ){\n $fail = false;\n\n $process = new Process();\n $process->setRawSubmission($submission);\n\n $eid = $submission->getExerciseId();\n // load processor data from database\n $result = Request::routeRequest(\n 'GET',\n '/process/exercise/'.$eid,\n array(),\n '',\n $this->_processorDb,\n 'process'\n );\n\n $processors = null;\n if ( $result['status'] >= 200 &&\n $result['status'] <= 299 ){\n $processors = Process::decodeProcess( $result['content'] );\n } else {\n if ($result['status'] != 404){\n $submission->addMessage(\"Interner Fehler\");\n $res[] = $submission;\n $this->app->response->setStatus( 409 );\n continue;\n }\n }\n\n $result2 = Request::routeRequest(\n 'GET',\n '/exercisefiletype/exercise/'.$eid,\n array(),\n '',\n $this->_getExerciseExerciseFileType,\n 'exercisefiletype'\n );\n\n $exerciseFileTypes = null;\n if ( $result2['status'] >= 200 &&\n $result2['status'] <= 299 ){\n $exerciseFileTypes = ExerciseFileType::decodeExerciseFileType( $result2['content'] );\n if (!is_array($exerciseFileTypes)) $exerciseFileTypes = array($exerciseFileTypes);\n\n $filePath = null;\n if ($submission->getFile()!=null){\n $file = $submission->getFile()->getBody( true );\n\n if ($file !== null){\n $fileHash = sha1($file);\n\n $filePath = '/tmp/'.$fileHash;\n if ($submission->getFile()->getDisplayName() != null){\n LProcessor::generatepath($filePath);\n file_put_contents($filePath . '/' . $submission->getFile()->getDisplayName(), $file);\n $filePath .= '/' . $submission->getFile()->getDisplayName();\n } else {\n LProcessor::generatepath($filePath);\n file_put_contents($filePath . '/tmp', $file);\n $filePath .= '/tmp';\n }\n }\n }\n\n // check file type\n if ($filePath!=null){\n $found = false;\n $types = array();\n $mimeType = MimeReader::get_mime($filePath);\n $foundExtension = strtolower(isset(pathinfo($filePath)['extension']) ? pathinfo($filePath)['extension'] : '-');\n\n foreach ($exerciseFileTypes as $type){\n $types[] = $type->getText();\n $type = explode(' ',str_replace('*','',$type->getText()));\n//echo MimeReader::get_mime($filePath);\n if (strpos($mimeType,$type[0])!==false && (!isset($type[1]) || (('.'.$foundExtension) == strtolower($type[1])))) {\n $found = true;\n break;\n }\n }\n\n if (!$found && count($exerciseFileTypes)>0){\n $submission->addMessage(\"falscher Dateityp \\nGefunden: \".$mimeType.\" .\".$foundExtension.\"\\nErlaubt: \".implode(',',$types));\n $res[] = $submission;\n $this->app->response->setStatus( 409 );\n unlink($filePath);\n continue;\n }\n unlink($filePath);\n }\n\n } else {\n if ($result2['status'] != 404){\n $submission->addMessage(\"Interner Fehler\");\n $res[] = $submission;\n $this->app->response->setStatus( 409 );\n continue;\n }\n }\n\n // process submission\n if ($processors !== null){\n if (!is_array($processors)) $processors = array($processors);\n\n foreach($processors as $pro){\n $component = $pro->getTarget();\n\n if ($process->getExercise()===null)\n $process->setExercise($pro->getExercise());\n\n $process->setParameter($pro->getParameter());\n $process->setAttachment($pro->getAttachment());\n $process->setTarget($pro->getTarget());\n $process->setWorkFiles($pro->getWorkFiles());\n $process->setProcessId($pro->getProcessId());\n \n//echo Process::encodeProcess($process).\"_______\";// return;\n\n $result = Request::post($component->getAddress().'/process', array(), Process::encodeProcess($process));\n//echo $result['content'].'_______';\n if ( $result['status'] >= 200 &&\n $result['status'] <= 299 ){\n if (isset($result['content']) && trim($result['content']) != \"\"){\n //$process = Process::decodeProcess( $result['content'] );\n \n $content = Process::decodeProcess($result['content']); \n //$submission->setStatus($content->getStatus());\n $submission = $content->getSubmission();\n if ($submission===null){$submission = $process->getRawSubmission();}\n if ($submission!==null){$submission->addMessages($content->getMessages());}\n $process = $content;\n } \n\n } else {\n $fail = true;\n $submission->addMessage(\"Beim Verarbeiten der Einsendung ist ein Fehler aufgetreten\");\n\n if (isset($result['content'])){\n $content = Process::decodeProcess($result['content']);\n $submission->setStatus($content->getStatus());\n $submission->addMessages($content->getMessages());\n }\n break;\n }\n }\n }\n\n if ($fail){\n if (isset($submission))\n $submission->setFile(null);\n\n $res[] = $submission;\n $this->app->response->setStatus( 409 );\n continue;\n }\n\n // upload submission\n $uploadSubmission = $process->getSubmission();\n if ($uploadSubmission===null){\n $uploadSubmission = $process->getRawSubmission();\n if ($uploadSubmission->getFile()!=null){\n $file = $uploadSubmission->getFile();\n if ($file->getDisplayName()==null)\n $file->setDisplayName($submission->getExerciseName());\n }\n }\n\n if ($uploadSubmission!==null){\n///echo Submission::encodeSubmission($uploadSubmission);return;\n $result = Request::routeRequest(\n 'POST',\n '/submission',\n array(),\n Submission::encodeSubmission($uploadSubmission),\n $this->_submission,\n 'submission'\n );\n//var_dump($result);return;\n // checks the correctness of the query\n if ( $result['status'] >= 200 &&\n $result['status'] <= 299 ){\n $queryResult = Submission::decodeSubmission( $result['content'] );\n $uploadSubmission->setId($queryResult->getId());\n $uploadSubmission->setFile($queryResult->getFile());\n if ($process->getMarking()!==null){\n $process->getMarking()->setSubmission($queryResult);\n }\n\n } else {\n $uploadSubmission->addMessage(\"Beim Speichern der Einsendung ist ein Fehler aufgetreten.\");\n//var_dump($uploadSubmission); return;\n if (isset($result['content'])){\n $content = Submission::decodeSubmission($result['content']);\n $uploadSubmission->setStatus($content->getStatus());\n $uploadSubmission->addMessages($content->getMessages());\n }\n\n $uploadSubmission->setStatus(409);\n $res[] = $uploadSubmission;\n $this->app->response->setStatus( 409 );\n continue;\n }\n }\n\n // postprocess submission\n if ($processors !== null){\n if (!is_array($processors)) $processors = array($processors);\n \n foreach($processors as $pro){\n $component = $pro->getTarget();\n \n if ($process->getExercise()===null)\n $process->setExercise($pro->getExercise());\n \n /*$process->setParameter($pro->getParameter());\n $process->setAttachment($pro->getAttachment());\n $process->setTarget($pro->getTarget());\n $process->setWorkFiles($pro->getWorkFiles());*/\n \n//echo Process::encodeProcess($process).\"_______\";// return;\n\n $result = Request::post($component->getAddress().'/postprocess', array(), Process::encodeProcess($process));\n//echo $result['content'].'_______';\n if ( $result['status'] >= 200 && \n $result['status'] <= 299 ){\n /*\n * evaluating for response of postprocess is possible here\n */\n } elseif ($result['status'] == 404) {\n // skip if no postprocess command is found\n continue;\n } /*else {\n $submission->addMessage(\"Beim Nachbearbeiten der Einsendung ist ein Fehler aufgetreten\");\n\n if (isset($result['content'])){\n $content = Process::decodeProcess($result['content']); \n $submission->setStatus($content->getStatus()); \n $submission->addMessages($content->getMessages());\n }\n break;\n }*/\n }\n }\n \n // upload marking\n if ($process->getMarking()!==null){\n//echo Marking::encodeMarking($process->getMarking());\n $result = Request::routeRequest(\n 'POST',\n '/marking',\n array(),\n Marking::encodeMarking($process->getMarking()),\n $this->_marking,\n 'marking'\n );\n\n // checks the correctness of the query\n if ( $result['status'] >= 200 &&\n $result['status'] <= 299 ){\n $queryResult = Marking::decodeMarking( $result['content'] );\n } else {\n $uploadSubmission->addMessage(\"Beim Speichern der Korrektur ist ein Fehler aufgetreten\");\n if (isset($result['content'])){\n $content = Marking::decodeMarking($result['content']);\n $uploadSubmission->addMessages($content->getMessages());\n }\n $res[] = $uploadSubmission;\n $this->app->response->setStatus( 409 );\n continue;\n }\n }\n\n $rr = $process->getSubmission();\n if ($rr===null)$rr = $process->getRawSubmission();\n $res[] = $rr;\n\n }\n\n if ( !$arr && count( $res ) == 1 ){\n $this->app->response->setBody( Submission::encodeSubmission( $res[0] ) );\n } else\n $this->app->response->setBody( Submission::encodeSubmission( $res ) );\n }",
"public function test_NoteCreate()\n {\n $response = $this->withHeaders([\n 'Content-Type' => 'Application/json',\n 'Authorization'=>'Bearer \n eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC8xMjcuMC4wLjE6ODAwMFwvYXBpXC9sb2dpbiIsImlhdCI6MTYyMjg5MjA0MywiZXhwIjoxNjIyODk1NjQ0LCJuYmYiOjE2MjI4OTIwNDQsImp0aSI6IjdUZGY3OVMxOHQxZDJGYTIiLCJzdWIiOjIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.UZoDqQk8Oxysi4fWVo0trMSyduX3GZDB_9k_9iO1OcY'\n ])->json('POST', '/api/createNote', [\n 'title'=>'notes testing',\n 'body'=>'writing test cases',\n ]);\n $response->assertStatus(201);\n }",
"public function post_post()\n\t{\n\t\ttry {\n\t\t\t$results = Articles::regist( self::$_JSON );\n\t\t\t//\\Log::warning(print_r($results, true));\n\n\t\t\treturn $this->response($results, 200);\n\t\t} catch (\\MarcoPandaException $e) {\n\t\t\t$this->error($e);\n\t\t}\n\t}",
"public function addExercise(string $exercise): void\n {\n $this->exercises[] = $exercise;\n }",
"public function testPostEntry()\n {\n $payload = [\n \"token\" => $this->testAccquireToken(),\n \"to\" => \"hassaan\",\n \"description\" => \"Test9\",\n \"amount\" => 3000,\n \"made_on\" => \"31-10-2020\"\n ];\n $response = $this->json(\"POST\", 'api/accounts/Test9/d/entry/test', $payload);\n $response->dump();\n $response->assertStatus(200);\n }"
]
| [
"0.63299334",
"0.6112051",
"0.6099841",
"0.6013925",
"0.6005388",
"0.59317046",
"0.587408",
"0.58553654",
"0.58253646",
"0.58186996",
"0.5809823",
"0.58030295",
"0.58014905",
"0.5791786",
"0.5768287",
"0.57597846",
"0.5756914",
"0.5749887",
"0.5727546",
"0.57026136",
"0.5680133",
"0.56779176",
"0.5672049",
"0.5656823",
"0.56565267",
"0.5655473",
"0.5653809",
"0.5650576",
"0.56478745",
"0.5640621"
]
| 0.69854397 | 0 |
Ajax callback to change views displays when view is selected. | public function viewsDisplaysAjaxCallback(array &$form, FormStateInterface $form_state) {
$tab_index = $form_state->getTriggeringElement()['#array_parents'][2];
$element_id = '#view-display-dropdown-' . $tab_index;
$ajax_response = new AjaxResponse();
$ajax_response->addCommand(new ReplaceCommand($element_id, $form['configuration_data_wrapper']['configuration_data'][$tab_index]['content']['view_content']['options']['display']));
return $ajax_response;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testAjaxView() {\n $this->drupalGet('test_ajax_view');\n\n $drupal_settings = $this->getDrupalSettings();\n $this->assertTrue(isset($drupal_settings['views']['ajax_path']), 'The Ajax callback path is set in drupalSettings.');\n $this->assertCount(1, $drupal_settings['views']['ajaxViews']);\n $view_entry = array_keys($drupal_settings['views']['ajaxViews'])[0];\n $this->assertEquals('test_ajax_view', $drupal_settings['views']['ajaxViews'][$view_entry]['view_name'], 'The view\\'s ajaxViews array entry has the correct \\'view_name\\' key.');\n $this->assertEquals('page_1', $drupal_settings['views']['ajaxViews'][$view_entry]['view_display_id'], 'The view\\'s ajaxViews array entry has the correct \\'view_display_id\\' key.');\n }",
"function onView () {\r\n\r\n switch (parent::getAction()) {\r\n \tcase \"edit\":\r\n \t\tbreak;\r\n \tcase \"search\":\r\n \t\tbreak;\r\n default:\r\n $this->printSearchBoxView();\r\n }\r\n }",
"function ajax_owners_list()\n\t{\n\t\t$this->load->view('sample_view');\n\t}",
"protected function loadView()\n {\n }",
"protected function loadView()\n {\n }",
"private function render_view_button(MJKGenToolsPage $page): void {\r\n $this->render_ajax_button($page, 'View', 'view');\r\n }",
"public function RenderContentAjax(): void {\n $this->showContent(TRUE);\n }",
"public function views() {\n\t\t\t$views = $this->get_views();\n\n\t\t\t/** This filter is documented in wp-admin/inclues/class-wp-list-table.php */\n\t\t\t$views = apply_filters( \"views_{$this->screen->id}\", $views );\n\n\t\t\t$this->screen->render_screen_reader_content( 'heading_views' );\n\t\t\t?>\n\t\t\t<div class=\"wp-filter\">\n\t\t\t\t<ul class=\"filter-links\">\n\t\t\t\t\t<?php\n\t\t\t\t\tif ( ! empty( $views ) ) {\n\t\t\t\t\t\tforeach ( $views as $class => $view ) {\n\t\t\t\t\t\t\t$views[ $class ] = \"\\t<li class='$class'>$view\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo implode( \" </li>\\n\", $views ) . \"</li>\\n\";\n\t\t\t\t\t}\n\t\t\t\t\t?>\n\t\t\t\t</ul>\n\t\t\t\t<?php\n\t\t\t\tif ( 'learndash' === $this->current_tab ) {\n\t\t\t\t\t$this->show_update_button();\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}",
"public function updateView()\n {\n \n }",
"protected function viewAction()\n {\n }",
"function showView()\n\t{\n\t\ttrigger_error(\"showView() is not implemented\");\n\t}",
"private function renderView(){\n $switchView = strtolower($_POST['switch-tab']);\n\n if($switchView !== 'logout' && $_SESSION['login'])\n $switchView = 'search';\n elseif($switchView === 'register' && $_SESSION['registered']){\n $switchView = 'login';\n unset($_SESSION['registered']);\n }\n elseif(isset($switchView) && !empty($switchView)){\n $switchView = $switchView;\n unset($_POST['switch-tab']);\n }\n else\n $switchView = 'login';\n return $this->switchView($switchView);\n }",
"public function switchView()\n {\n if ( !$this->ownerLoggedIn() )\n {\n $this->redirect(\"index.php\");\n\n }\n \n require_once('views/SwitchView.class.php'); \n \n $site = new SiteContainer($this->db);\n \n $sv = new SwitchView();\n\n $site->printHeader();\n $site->printNav(\"owner\");\n $sv->printHtml($this->businesses);\n $site->printFooter(); \n \n \n }",
"function ajax () {\n\n echo $this->load->view('ajax/register_ajax_view', '', TRUE);\n exit();\n\n }",
"public function updateView(): void\n {\n if (!$this->special) {\n $this->_builder->submitUpdate();\n }\n $this->_data = $this->_entity->fetch($_GET['id'])[0];\n\n require VF . \"{$this->route}/update.php\";\n }",
"function action_view()\n {\n $this->addStatusFields();\n return parent::action_view();\n }",
"function onView () {\n\n switch (parent::getAction()) {\n case \"edit\":\n if (Context::hasRole(\"user.friendRequest.edit\")) {\n $this->printEditView();\n }\n break;\n default:\n if (Context::hasRole(\"user.friendRequest.view\")) {\n $this->printMainView();\n }\n break;\n }\n }",
"public function display()\n \t{\n \t\t$this->assign(\"__view\", $this->_view);\n \t\tparent::display();\n \t}",
"public function view(){\n\t\t\t$this->__switchboard();\n\t\t}",
"public function selectAction()\n {\n $this->loadLayout();\n $this->renderLayout();\n }",
"public function ajaxRequest()\n {\n $data['data'] = $this->db->get(\"balance_type\")->result();\n $this->load->view('ajax/itemlist', $data);\n }",
"function show($view, $viewVars=null) {\r\n\t\t// TODO: db interaction should go into model\r\n\t\tglobal $wpdb;\r\n\r\n\t\tif (is_array($viewVars)) {\r\n\t\t\t$this->viewVars =& $viewVars;\r\n\t\t}\r\n/*\r\n\t\tif ('admin-edit' == $view) {\r\n\t\t\t$viewVars['action'] = empty($viewVars['eventId']) ? 'add' : 'edit';\r\n\t\t\t$this->viewVars['action'] = $viewVars['action'];\r\n\t\t}\r\n*/\t\t\r\n\t\t// TODO: make viewVars globally available?\r\n\r\n\t\t// TODO: make shure it is a valid view\r\n\t\t// TODO: look in theme folder!\r\n\t\t$template = 'views/uwr1results-'.$view.'.php';\r\n\t\t$rv = @require_once $template;\r\n\t}",
"function view($view){\r\r\n $this->view = $view;\r\r\n }",
"public function actionView($id) {\n\t\treturn $this->renderAjax('view', [\n\t\t\t 'model' => $this->findModel($id),\n\t\t]);\n\t}",
"public function actionView($id) {\n if (isset($_REQUEST['isAjaxRequest']) && $_REQUEST['isAjaxRequest'] == 1) {\n Yii::app()->clientscript->scriptMap['jquery.js'] = false;\n Yii::app()->clientscript->scriptMap['jquery-ui.min.js'] = false;\n echo $this->renderPartial('view', array('model' => $this->loadModel($id)), true, true);\n Yii::app()->end();\n exit();\n } else {\n $this->render('view', array(\n 'model' => $this->loadModel($id),\n ));\n }\n }",
"public function actionView($id)\n {\n \n return $this->renderAjax('view', [\n 'model' => $this->findModel($id),\n ]);\n \n }",
"public function render()\n {\n //rafraichir le chat\n if($_GET['function'] == 'refresh')\n {\n $this->model->refreshTchat();\n }\n \n // ajouter les commentaires\n else if($_GET['function'] == 'add') \n {\n $this->model->saveTchat();\n }\n\n //rafraichir le score\n else if($_GET['function'] == 'score')\n {\n $this->model->recupReponse();\n }\n\n require ROOT.\"/App/View/AjaxView.php\";\n }",
"abstract protected function getView();",
"public function setView($view);",
"abstract protected function renderView();"
]
| [
"0.64292043",
"0.60365415",
"0.6028165",
"0.59237885",
"0.59237885",
"0.591205",
"0.588995",
"0.5821559",
"0.58020616",
"0.57247525",
"0.57101965",
"0.57096255",
"0.5687768",
"0.5681625",
"0.56799465",
"0.5676215",
"0.56622714",
"0.562385",
"0.5622264",
"0.5621494",
"0.560381",
"0.5601836",
"0.55971783",
"0.5586876",
"0.55863976",
"0.5557557",
"0.55528355",
"0.55478585",
"0.55462253",
"0.5544573"
]
| 0.6767435 | 0 |
Get displays for a given view. | public function getViewDisplays($view_name) {
$displays = [];
if (empty($view_name)) {
return $displays;
}
$view = \Drupal::entityTypeManager()->getStorage('view')->load($view_name);
foreach ($view->get('display') as $id => $display) {
$enabled = !empty($display['display_options']['enabled']) || !array_key_exists('enabled', $display['display_options']);
if ($enabled) {
$displays[$id] = $id .': '. $display['display_title'];
}
}
return $displays;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract function retrieveViewDisplays(Row $row);",
"protected function getAllViewDisplayIds() {\n $types = Views::pluginList();\n $options = [];\n foreach ($types as $key => $type) {\n if ($type['type'] === 'display') {\n $options[str_replace('display:', '', $key)] = $type['title']->render();\n }\n }\n return $options;\n }",
"public function getWebsitesView()\n {\n $res = $this->searchView();\n if ($res) {\n array_push($this->site_ids, array('access' => 'view', 'ids' => array()));\n if ($res['count'] > 0) {\n foreach ($res as $r) {\n if (is_array($r)) {\n array_push($this->site_ids[0]['ids'], $this->getSiteId($r[strtolower($this->to_get_view)][0]));\n }\n }\n }\n }\n }",
"function get_views( ) {\r\n\t\t/*\r\n\t\t * Find current view\r\n\t\t */\r\n\t\tif ( $this->detached ) {\r\n\t\t\t$current_view = 'detached';\r\n\t\t} elseif ( $this->attached ) {\r\n\t\t\t$current_view = 'attached';\r\n\t\t} elseif ( $this->is_trash ) {\r\n\t\t\t$current_view = 'trash';\r\n\t\t} elseif ( empty( $_REQUEST['post_mime_type'] ) ) {\r\n\t\t\tif ( isset( $_REQUEST['meta_query'] ) ) {\r\n\t\t\t\t$query = json_decode( stripslashes( $_REQUEST['meta_query'] ), true );\r\n\t\t\t\t$current_view = $query['slug'];\r\n\t\t\t} else {\r\n\t\t\t\t$current_view = 'all';\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$current_view = $_REQUEST['post_mime_type'];\r\n\t\t}\r\n\r\n\t\t$mla_types = MLAMime::mla_query_view_items( array( 'orderby' => 'menu_order' ), 0, 0 );\r\n\t\tif ( ! is_array( $mla_types ) ) {\r\n\t\t\t$mla_types = array ();\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Filter the list, generate the views\r\n\t\t */\r\n\t\t$view_links = array();\r\n\t\tforeach ( $mla_types as $value ) {\r\n\t\t\tif ( $value->table_view ) {\r\n\t\t\t\tif ( $current_view == $value->specification ) {\r\n\t\t\t\t\t$current_view = $value->slug;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif ( $link = self::_get_view( $value->slug, $current_view ) ) {\r\n\t\t\t\t\t$view_links[ $value->slug ] = $link;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $view_links;\r\n\t}",
"public function get_views()\n\t{\n\t\treturn $this->driver_query('view_list');\n\t}",
"public function getViews();",
"protected function getViewDisplayOptions(string $view_id) {\n $display_options = [];\n $view = $this->entityTypeManager->getStorage('view')->load($view_id);\n\n if ($view) {\n foreach ($view->get('display') as $display) {\n $display_options[$display['id']] = $display['display_title'] . ' (' . $display['display_plugin'] . ')';\n }\n }\n\n return $display_options;\n }",
"public function get_title_displays() {\n\n $instance = Envira_Gallery_Common::get_instance();\n return $instance->get_title_displays();\n\n }",
"public function get_displays( $ordered = true, $is_editor_page = false ) {\n\t\tif ( empty( $this->post ) ) {\n\t\t\t$displays = [];\n\t\t} else {\n\t\t\t$displays = $this->get_meta_value( static::DISPLAYS_META_KEY );\n\n\t\t\tif ( empty( $displays ) ) {\n\t\t\t\t$displays = [];\n\t\t\t} elseif ( $ordered ) {\n\t\t\t\t$default_display_index = array_search( 'default', array_column( $displays, 'key' ), true );\n\n\t\t\t\t$displays[ $default_display_index ]['order'] = $is_editor_page ? - 1 : PHP_INT_MAX;\n\n\t\t\t\tuasort( $displays, static function ( $a, $b ) {\n\t\t\t\t\treturn (int) $a['order'] - (int) $b['order'];\n\t\t\t\t} );\n\n\t\t\t\t/* re-index after sorting */\n\t\t\t\t$displays = array_values( $displays );\n\t\t\t}\n\t\t}\n\n\t\treturn $displays;\n\t}",
"public function getDisplayers(): array;",
"public function get($view, $vars)\n {\n ob_start();\n $this->show($view, $vars);\n return ob_get_clean();\n }",
"public function getViews()\n {\n\treturn $this->query('select [name] from [views]');\n }",
"function show($view, $viewVars=null) {\r\n\t\t// TODO: db interaction should go into model\r\n\t\tglobal $wpdb;\r\n\r\n\t\tif (is_array($viewVars)) {\r\n\t\t\t$this->viewVars =& $viewVars;\r\n\t\t}\r\n/*\r\n\t\tif ('admin-edit' == $view) {\r\n\t\t\t$viewVars['action'] = empty($viewVars['eventId']) ? 'add' : 'edit';\r\n\t\t\t$this->viewVars['action'] = $viewVars['action'];\r\n\t\t}\r\n*/\t\t\r\n\t\t// TODO: make viewVars globally available?\r\n\r\n\t\t// TODO: make shure it is a valid view\r\n\t\t// TODO: look in theme folder!\r\n\t\t$template = 'views/uwr1results-'.$view.'.php';\r\n\t\t$rv = @require_once $template;\r\n\t}",
"public function views() {\n\t\t$views = $this->get_views();\n\n\t\t/** This filter is documented in wp-admin/inclues/class-wp-list-table.php */\n\t\t$views = apply_filters( \"views_{$this->screen->id}\", $views );\n\n\t\t$this->screen->render_screen_reader_content( 'heading_views' );\n?>\n<div class=\"wp-filter\">\n\t<ul class=\"filter-links\">\n\t\t<?php\n\t\tif ( ! empty( $views ) ) {\n\t\t\tforeach ( $views as $class => $view ) {\n\t\t\t\t$views[ $class ] = \"\\t<li class='$class'>$view\";\n\t\t\t}\n\t\t\techo implode( \" </li>\\n\", $views ) . \"</li>\\n\";\n\t\t}\n\t\t?>\n\t</ul>\n\n\t<?php install_search_form(); ?>\n</div>\n<?php\n\t}",
"public function get_sponsors($view = 'default') {\n $this->load->model('sponsors_model');\n $data = array();\n if ($view === 'default') {\n $data['sponsors'] = $this->sponsors_model->fields(array('name', 'image'))->get_all();\n } else if ($view === 'flashscreen') {\n $data['sponsors'] = $this->sponsors_model->fields(array('name', 'image'))->get_all(array('flashscreen' => 1));\n }\n if ($data['sponsors']) {\n shuffle($data['sponsors']);\n return $this->send_response($data);\n }\n return $this->send_error('ERROR');\n }",
"public function find($view);",
"public function getViews()\n {\n global $adminer;\n\n $main_actions = [\n 'add-view' => \\adminer\\lang('Create view'),\n ];\n\n $headers = [\n \\adminer\\lang('View'),\n \\adminer\\lang('Engine'),\n // \\adminer\\lang('Data Length'),\n // \\adminer\\lang('Index Length'),\n // \\adminer\\lang('Data Free'),\n // \\adminer\\lang('Auto Increment'),\n // \\adminer\\lang('Rows'),\n \\adminer\\lang('Comment'),\n ];\n\n // From db.inc.php\n // $table_status = \\adminer\\table_status('', true); // Tables details\n $table_status = \\adminer\\table_status(); // Tables details\n\n $details = [];\n foreach($table_status as $table => $status)\n {\n if(\\adminer\\is_view($status))\n {\n $details[] = [\n 'name' => $adminer->tableName($status),\n 'engine' => \\array_key_exists('Engine', $status) ? $status['Engine'] : '',\n 'comment' => \\array_key_exists('Comment', $status) ? $status['Comment'] : '',\n ];\n }\n }\n\n return \\compact('main_actions', 'headers', 'details');\n }",
"public function index(Request $request)\n {\n return $request->user()->shows()->with(['hosts', 'invitees'])->get();\n }",
"public function getViews()\n {\n if (! isset($this->views)) {\n $this->views = (($nodeList = $this->getDomXPath($this->getDomDocument())->query($this->getViewsQuery())) && $nodeList->length)\n ? $nodeList->item(0)->value\n : null;\n }\n return $this->views;\n }",
"public function userViews()\n {\n $system = \\Config::get('tenant_system');\n //$system = \\Auth::user()->system;\n //all of the possible views\n// $system_id = session('system');\n// $system = System::find($system_id);\n $views = $system->views();\n\n //Views for the role - limited results\n $query = \\DB::table('role_view');\n $query->where('role_id', '=', $this->id);\n $results = $query->get();\n\n //we need to manually add the name back in for the view\n foreach ($results as $result)\n {\n foreach ($views as $view)\n {\n if ($result->view_id == $view->id)\n {\n $result->name = $view->name;\n $result->icon = $view->icon;\n $result->route = $view->route;\n $result->place = $view->place;\n\n }\n }\n }\n foreach ($results as $result)\n {\n if ($result->access != 'none')\n {\n $return[] = $result;\n }\n }\n\n return $return;\n\n\n }",
"function availableViews() {\n\tglobal $fmdb, $__FM_CONFIG;\n\t\n\t$array[0][] = __('All Views');\n\t$array[0][] = '0';\n\t\n\t$j = 0;\n\t/** Views */\n\t$result = basicGetList('fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'views', 'view_name', 'view_');\n\tif ($fmdb->num_rows) {\n\t\t$results = $fmdb->last_result;\n\t\tfor ($i=0; $i<$fmdb->num_rows; $i++) {\n\t\t\t$array[$j+1][] = $results[$i]->view_name;\n\t\t\t$array[$j+1][] = $results[$i]->view_id;\n\t\t\t$j++;\n\t\t}\n\t}\n\t\n\treturn $array;\n}",
"function get_features($term_id, $view_name, $view_display = 'openlayers_1') {\n if ($view = views_get_view($view_name)) {\n $features = $view->execute_display($view_display, array($term_id));\n\n // Get dynamic title from view\n $term = taxonomy_get_term($term_id);\n $this->title = $term->name;\n\n $view->destroy();\n }\n return isset($features) ? $features : array();\n }",
"public function views()\n {\n $visuals = $this->get('views');\n\n return view('visuals.index', compact('visuals'));\n }",
"public function getDisplay();",
"public function show( $view, $params = array() )\n\t{\n\t\techo $this->get( $view, $params );\n\t}",
"public function systemViews()\n {\n\n //$system = \\Auth::user()->system;\n// $system_id = session('system');\n// $system = System::find($system_id);\n $system = \\Config::get('tenant_system');\n\n //all of the possible views\n $views = $system->views();\n\n $query = \\DB::table('role_view');\n $query->where('role_id', '=', $this->id);\n $results = $query->get();\n\n //we need to return view id, access = none, write, or read\n //we need to manually add the name back in for the view\n foreach ($results as $result)\n {\n foreach ($views as $view)\n {\n if ($result->view_id == $view->id)\n {\n $result->name = $view->name;\n }\n }\n }\n\n\n return $results;\n\n\n }",
"protected function get_views()\n {\n }",
"protected function get_views()\n {\n }",
"protected function get_views()\n {\n }",
"protected function get_views()\n {\n }"
]
| [
"0.62964016",
"0.6114281",
"0.61055595",
"0.6022141",
"0.60165644",
"0.5956571",
"0.5688651",
"0.5654336",
"0.56130373",
"0.55523014",
"0.5535479",
"0.5520189",
"0.5511722",
"0.54953635",
"0.54735464",
"0.5460641",
"0.5438878",
"0.5382909",
"0.53625494",
"0.536244",
"0.5315799",
"0.53130054",
"0.530879",
"0.5299429",
"0.52807707",
"0.5258272",
"0.52557176",
"0.52557176",
"0.52557176",
"0.52557176"
]
| 0.73983955 | 0 |
Create a new sale location entry | public function create(SalesLocationsCreateOrUpdateEvent $event)
{
$saleLocation = new SalesLocationsModel();
$saleLocation
->setDispatcher($event->getDispatcher())
->setCompany($event->getCompany())
->setFirstname($event->getFirstname())
->setLastname($event->getLastname())
->setAddress1($event->getAddress1())
->setAddress2($event->getAddress2())
->setAddress3($event->getAddress3())
->setZipcode($event->getZipcode())
->setCity($event->getCity())
->setCountryId($event->getCountry())
->setPhone($event->getPhone())
->setCellphone($event->getCellphone())
->setVisible($event->getVisible())
->save()
;
$event->setSaleLocation($saleLocation);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create(StoreLocationRequest $request)\r\n {\r\n $opening_hours = $this->formatOpeningHours($request);\r\n $disabled_dates = $this->formatDisabledDates($request);\r\n\r\n $location = $this->location->create([\r\n 'name' => $request->get('name'),\r\n 'disabled_weekdays' => $request->get('disabled_weekdays'),\r\n 'disabled_dates' => $disabled_dates,\r\n 'opening_hours' => $opening_hours,\r\n 'order' => (int)$request->get('order'),\r\n 'max_weight' => (int)$request->get('max_weight'),\r\n 'interval' => (int)$request->get('interval'),\r\n 'json' => array()\r\n ]);\r\n\r\n $location->refresh();\r\n\r\n if (is_array($request->get('services'))) {\r\n $location->services()->attach($request->get('services')); \r\n }\r\n\r\n return $location;\r\n }",
"public function store(RequestsProductLocation $request)\n {\n $location = $request->all();\n $pro_no = $this->productLocation->createLocation($location);\n return redirect('export/locations/search?pro_no=' . $pro_no)->with('message', 'Created location');\n }",
"public function addNewLocation($request)\n {\n $this->deliveryLocation->name = $request->name;\n $this->deliveryLocation->description = $request->description;\n $this->deliveryLocation->price = $request->price;\n if ($this->deliveryLocation->save()) {\n return \"saved\";\n }\n return 'can\\'t be saved';\n }",
"public function createAction()\n {\n $entity = new Location();\n $request = $this->getRequest();\n $form = $this->createForm(new LocationType(), $entity);\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getEntityManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('admin_location_show', array('id' => $entity->getId())));\n \n }\n\n return $this->render('ACInst3LocationBundle:Location:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }",
"function create($name,$location){\r\n lako::get('ljson')->save($location.\"/{$name}\",array(\r\n 'table' => $name,\r\n 'name' => $name,\r\n 'pkey' => 'id',\r\n 'fields'=> array(\r\n 'id' => array(\r\n 'datatype' => ''\r\n )\r\n ),\r\n 'relations' => array(\r\n 'data' => array(\r\n 'type' => '1-M',\r\n 'path' => ['id','field_id'],\r\n 'object' => 'wp_bp_xprofile_data'\r\n )\r\n )\r\n )\r\n );\r\n \r\n }",
"public function create() {\n return GeolocationsModel::create($this->creationDate,$this->userAgent,$this->sellerId,$this->saleId ? $this->saleId: null,$this->latitude,$this->longitude);\n }",
"public function create($location): void\n {\n $sql = \"INSERT INTO {$this->table} (description) \";\n $sql .= \"VALUES (:description);\";\n\n DBConnection::getInstance()\n ->prepare($sql)\n ->execute([\n \"description\" => $location->getDescription()\n ]);\n\n $location->setId($this->getInsertedId());\n }",
"public function create_location($location_name)\n {\n $location=array('location_id'=>NULL,\n 'name'=>$location_name);\n\n if( !$this->db->insert('Location',$location))\n {\n return FALSE;\n }\n\n return $this->db->insert_id();\n }",
"function addLocation($data) {\r\n\r\n\r\n\t\t$this->query('INSERT INTO locations (`id`, `created`, `modified`, `name`) \r\n\t\t\t\t\t\t\t VALUES (NULL, CURRENT_TIMESTAMP(), CURRENT_TIMESTAMP(), \"'. $data['name'] .'\");');\r\n\r\n\t}",
"public function actionCreate()\n {\n $model = new Location();\n if(isset($_GET['x'])){\n echo $_GET['x'].','.$_GET['y'];\n $model->x=$_GET['x'];\n $model->y=$_GET['y'];\n \n $model->address= $this->getaddress($model->x, $model->y);\n \n $model->time=$_GET['time'];\n $model->date=Yii::$app->formatter->asDatetime($_GET['date'], \"php:Y-m-d\");\n $model->session=$_GET['session'];\n $model->idorder=$_GET['idorder'];\n $model->save();\n \n }\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function store(Request $request)\n {\n $location = new location();\n $location->name_location = $request->name_location;\n $location->lat = $request->lat;\n $location->lng=$request->lng;\n $location->save();\n return redirect('location');\n }",
"public function store(Request $request)\n {\n //\n $this->validate($request, [\n 'name' => 'required|unique:organizations,name',\n 'organization' => 'required|numeric',\n 'description' => 'required',\n ]);\n\n $location = Location::create([\n 'name' => $request->input('name'),\n 'organization_id' => $request->input('organization'),\n 'description' => $request->input('description'),\n ]);\n\n return redirect()->route('locations.index')->with('success', \"The Location <strong>$location->name</strong> has successfully been created.\");\n \n }",
"public function store(Request $request)\n {\n\n InventoryLocation::create(array_merge($request->all(), ['user_id' => $this->user_id]));\n\n $inventory_location = new InventoryLocation();\n\n\n Session::flash('flash_message', 'Wine_Location added!');\n\n return redirect()->route('admin.wine.inventory_locations.index');\n }",
"public function store(Request $request)\n {\n //\n $request->validate([\n 'location' => 'required|unique:tbllocation',\n 'address' => 'required',\n ]);\n Location::create($request->all());\n return redirect()->route('loc.index')->with('success','Location added successfully.');\n }",
"public function createOrUpdate(StoreLocationRequest $request)\r\n {\r\n if ($request->has('id') && $request->has('update')) {\r\n return $this->update($request);\r\n }\r\n\r\n return $this->create($request);\r\n }",
"public function addlocation($client_id, $salescenter_id)\n {\n HelperCheckClientUser($client_id);\n $client = $this->client ;\n $salescenter = $this->salescenter;\n return view('client.salescenter.locations.createlocation',compact('client_id','salescenter_id','client','salescenter'));\n }",
"public function create()\n {\n return view('exports.locations.create');\n }",
"public function store(Request $request)\n {\n $request->validate([\n 'name' => 'required|string|max:100',\n 'province' => 'required|string|max:100',\n 'city' => 'required|string|max:100',\n 'address' => 'required|string',\n ]);\n $locations = Locations::create([\n 'name' => $request['name'],\n 'province' => $request['province'],\n 'city' => $request['city'],\n 'address' => $request['address'],\n ]);\n\n return redirect('admin/locations');\n }",
"public function store(LocationsRequest $locationRequest, County $county)\n {\n// $locationRequest['slug'] = Str::slug($locationRequest->name, '-');\n $county->locations()->create($locationRequest->all());\n return redirect()->route('backend.counties.locations.index', $county);\n }",
"public function store(Request $request)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'code' => 'required|unique:locations,code',\n ]);\n\n $geometry = explode(',', rtrim(substr($request->input('geometry'),1),')'));\n // dd(floatval($geometry[0]));\n $location = new Location();\n $location->name = $request->input('name');\n $location->code = $request->input('code');\n $location->place_id = $request->input('place_id');\n $location->lat = floatval($geometry[1]);\n $location->lng = floatval($geometry[0]);\n if($request->input('parent') == NULL){\n $location->parent = 0;\n }else\n {\n $location->parent = $request->input('parent');\n }\n $location->save();\n\n\n return redirect()->route('locations.index')\n ->with('success','Location created successfully');\n }",
"public function update(SalesLocationsCreateOrUpdateEvent $event)\n {\n if (null !== $saleLocation = SalesLocationsQuery::create()->findPk($event->getSaleLocationId())) {\n\n $saleLocation\n ->setDispatcher($event->getDispatcher())\n\n ->setCompany($event->getCompany())\n ->setFirstname($event->getFirstname())\n ->setLastname($event->getLastname())\n ->setLat($event->getLat())\n ->setLng($event->getLng())\n ->setAddress1($event->getAddress1())\n ->setAddress2($event->getAddress2())\n ->setAddress3($event->getAddress3())\n ->setZipcode($event->getZipcode())\n ->setCity($event->getCity())\n ->setCountryId($event->getCountry())\n ->setPhone($event->getPhone())\n ->setCellphone($event->getCellphone())\n ->setVisible($event->getVisible())\n\n ->save();\n\n $event->setSaleLocation($saleLocation);\n }\n }",
"public function store()\n\t{\n\t\t/*$districtName = Input::get('district_name');\n\t\t$locationName = Input::get('location_name');*/\n\n\t\t$rules = array('district_name' => 'required',\n\t\t\t\t\t 'location_name' => 'required');\n\t\t$validator = Validator::make(Input::all(),$rules);\n\t\tif($validator->fails()){\n\t\t\treturn Redirect::to('admin/location')->withErrors($validator)->withInput(Input::all());\n\t\t}else{\n\t\t\t$this->location->add(Input::all(),$rules);\n\t\t\tSession::flash('message','Location Created Successfuly');\n\t\t\treturn Redirect::to('admin/location/');\n\t\t}\n\t}",
"public function store(CreateRequest $request)\n {\n $warehouse = warehouse::create([\n 'name_en' => $request->name,\n 'name_ar' => $request->name_ar,\n 'location_en' => $request->location,\n 'location_ar' => $request->location_ar,\n 'shipping_price' => $request->shipping_price,\n ]);\n $this->storeRelatedLocations($request, $warehouse);\n return back()->with(['status' => trans('Added Successfully')]);\n }",
"public function store(Request $request)\n {\n $rules = [\n 'type' => 'required|string',\n 'sub_type' => 'required|string',\n // 'loc_id' => 'required|regex:/Loc([0-9])+$/|unique:locations',\n ];\n\n $messages = [\n 'loc_id.required' => 'The location ID field is required.',\n 'loc_id.regex' => 'Format must be \"Loc\" followed by numbers.',\n 'loc_id.unique' => 'The location ID has already been taken.',\n ]; \n\n $this->validate($request, $rules, $messages);\n\n // create new location\n $location = Location::create($request->all());\n\n $location->loc_id = 'Loc'. str_pad($location->id, 3, '0', STR_PAD_LEFT);\n\n $location->save();\n\n if(!is_null($location))\n {\n $res['success'] = \"New Location added!\";\n return $res;\n }\n }",
"public function run()\n {\n $location = Location::create([\n 'name' => '1 - V1 Visita 1',\n 'description' => ''\n ]);\n }",
"public function store(Request $request)\n {\n $location = $this->sLocation->store($request->all());\n if ($location) {\n return $this->respondData('Location created', $location);\n }\n return $this->respondWithErrors(500, 'Error creating the location');\n }",
"public function createLocation($locations, $flat, $flong, $tlat, $tlong){\n\t\t$user = $this->getUser();\n\t\tif(!isset($user[\"id\"])\n\t\t\t||$user[\"status\"]!=DBConfig::$userStatus[\"admin\"])\n\t\t\treturn false;\n\t\t$this->log(\"@\".$user[\"id\"].\" (\".$user[\"username\"].\") creates location '$locations' at $flat | $flong - $tlat | $tlong\");\n\t\t$query = Queries::createlocation($locations, $flat, $flong, $tlat, $tlong);\n\t\treturn $this->query($query);\n\t}",
"function addLocation($location_details){\n\t if ($this->db->insert('pofloc',$location_details))\n\t\t\t{ \n\t\t\treturn TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\treturn FALSE;\n\t\t\t}\n }",
"public function store(Request $request, Location $location)\n {\n $owner_id = auth()->user()->id;\n $company_id = CarCompany::where('owner_id', '=', $owner_id)->first()->id;\n\n $validatedData = $request->validate([\n 'location' => 'required|string',\n ]);\n\n $values = [\n 'location' => $request->input('location'),\n 'company_id' => $company_id\n ];\n $location->insert($values);\n\n return redirect()->back()->with('alert', 'Added successfully');\n }",
"public function createOrUpdateLocation(Request $request)\n {\n $id=$request->id;\n /* Start Validation rule */\n $request->validate([\n 'name' => 'required',\n 'code' => 'required|unique:salescenterslocations,code,'.$id ,\n // 'channels' => 'required',\n // 'street' => 'required',\n // 'city' => 'required',\n // 'state' => 'required',\n // 'country' => 'required',\n // 'zipcode' => 'required|numeric|digits:5',\n 'zipcode' => 'nullable|numeric|digits:5',\n // 'contact_name' => 'required',\n 'contact_number' => 'nullable|numeric|digits:10',\n ]);\n /* End Validation rule */\n\n try{\n $input = $request->except('_token','zipcode','channels');\n $input['zip'] =$request->zipcode;\n $input['created_by'] = Auth::user()->id;\n $input['client_id'] = $request->client_id;\n $input['salescenter_id'] = $request->salescenter_id;\n $location = Salescenterslocations::updateOrCreate(['id'=>$request->id],$input);\n $location->channels()->delete();\n foreach ($request->channels as $key => $channel) {\n $location->channels()->create(['channel'=>$channel]);\n }\n if (empty($id)) {\n return response()->json([ 'status' => 'success', 'message'=>'Sales center location successfully created.']);\n } else {\n return response()->json([ 'status' => 'success', 'message'=>'Sales center location successfully updated.']);\n }\n } catch(\\Exception $e) {\n return response()->json([ 'status' => 'error', 'message'=> $e->getMessage()]);\n }\n }"
]
| [
"0.67699426",
"0.66872907",
"0.6583848",
"0.65425193",
"0.63385093",
"0.6321422",
"0.62639344",
"0.6218879",
"0.6202417",
"0.61987025",
"0.6194191",
"0.61271554",
"0.61206174",
"0.6093045",
"0.6083791",
"0.60799193",
"0.60600364",
"0.60597146",
"0.60452306",
"0.6043754",
"0.60431105",
"0.60244036",
"0.6017753",
"0.6009663",
"0.60072505",
"0.6001503",
"0.5989425",
"0.59813637",
"0.5975672",
"0.59729415"
]
| 0.7167187 | 0 |
Highlights a given phrase in a text. You can specify any expression in highlighter that may include the \1 expression to include the $phrase found. | public function highlight($text, $phrase, $format = '<span class="highlight">\1</span>', $regex = '|%s|iu') {
if (empty($phrase)) {
return $text;
}
if (is_array($phrase)) {
$replace = [];
$with = [];
foreach ($phrase as $key => $segment) {
$segment = '(' . preg_quote($segment, '|') . ')';
$segment = "(?![^<]+>)$segment(?![^<]+>)";
$with[] = (is_array($format)) ? $format[$key] : $format;
$replace[] = sprintf($regex, $segment);
}
return preg_replace($replace, $with, $text);
}
$phrase = '(' . preg_quote($phrase, '|') . ')';
$phrase = "(?![^<]+>)$phrase(?![^<]+>)";
return preg_replace(sprintf($regex, $phrase), $format, $text);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function highlight_phrase($str, $phrase, $tag_open = '<mark>', $tag_close = '</mark>')\r\n\t{\r\n\t\treturn ($str !== '' && $phrase !== '')\r\n\t\t\t? preg_replace('/('.preg_quote($phrase, '/').')/i'.(UTF8_ENABLED ? 'u' : ''), $tag_open.'\\\\1'.$tag_close, $str)\r\n\t\t\t: $str;\r\n\t}",
"public static function highlightWord($str, $phrase, $tagOpen = '<span style=\"font-weight:bold;background-color:#ffff00\">', $tagClose = '</span>') {\n\t\treturn preg_replace ( '/(' . preg_quote ( $phrase ) . ')/i', $tagOpen . \"\\\\1\" . $tagClose, $str );\n\t}",
"function highlight($text, $expression, $highlight) {\n if (!$highlight || !$expression)\n {\n return $text;\n }\n \n if (is_array($expression) && (count($expression) == 0) )\n {\n return $text;\n }\n \n // add a tag in front (is needed for preg_match_all to work correct)\n $text = '<!--h-->' . $text;\n \n // split the HTML up so we have HTML tags\n // $matches[0][i] = HTML + text\n // $matches[1][i] = HTML\n // $matches[2][i] = text\n\t$matches = array();\n preg_match_all('/(<[^>]+>)([^<>]*)/', $text, $matches);\n \n // throw it all together again while applying the highlight to the text pieces\n $result = '';\n $count_matches = count($matches[2]);\n for ($i = 0; $i < $count_matches; $i++) {\n if ($i != 0)\n {\n $result .= $matches[1][$i];\n }\n \n if (is_array($expression) )\n {\n foreach ($expression as $regex)\n {\n if ($regex)\n {\n $matches[2][$i] = @preg_replace(\"#\".$regex.\"#i\", $highlight, $matches[2][$i]);\n }\n }\n \n $result .= $matches[2][$i];\n }\n else\n {\n $result .= @preg_replace(\"#\".$expression.\"#i\", $highlight, $matches[2][$i]);\n }\n }\n \n return $result;\n}",
"function content_search_highlight( $text, $highlight )\n\t{\n\t\t//-----------------------------------------\n\t\t// INIT\n\t\t//-----------------------------------------\n\t\t\n\t\t$highlight = $this->parse_clean_value( urldecode( $highlight ) );\n\t\t$loosematch = strstr( $highlight, '*' ) ? 1 : 0;\n\t\t$keywords = str_replace( '*', '', str_replace( \"+\", \" \", str_replace( \"++\", \"+\", str_replace( '-', '', trim($highlight) ) ) ) );\n\t\t$keywords\t= str_replace( '\\\\', '\', $keywords );\n\t\t$word_array = array();\n\t\t$endmatch = \"(.)?\";\n\t\t$beginmatch = \"(.)?\";\n\t\t\n\t\t//-----------------------------------------\n\t\t// Go!\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $keywords )\n\t\t{\n\t\t\tif ( preg_match(\"/,(and|or),/i\", $keywords) )\n\t\t\t{\n\t\t\t\twhile ( preg_match(\"/,(and|or),/i\", $keywords, $match) )\n\t\t\t\t{\n\t\t\t\t\t$word_array = explode( \",\".$match[1].\",\", $keywords );\n\t\t\t\t\t$keywords = str_replace( $match[0], '' ,$keywords );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if ( strstr( $keywords, ' ' ) )\n\t\t\t{\n\t\t\t\t$word_array = explode( ' ', str_replace( ' ', ' ', $keywords ) );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$word_array[] = $keywords;\n\t\t\t}\n\t\t\t\n\t\t\tif ( ! $loosematch )\n\t\t\t{\n\t\t\t\t$beginmatch = \"(^|\\s|\\>|;)\";\n\t\t\t\t$endmatch = \"(\\s|,|\\.|!|<br|&|$)\";\n\t\t\t}\n\t\n\t\t\tif ( is_array($word_array) )\n\t\t\t{\n\t\t\t\tforeach ( $word_array as $keywords )\n\t\t\t\t{\n\t\t\t\t\tpreg_match_all( \"/{$beginmatch}(\".preg_quote($keywords, '/').\"){$endmatch}/is\", $text, $matches );\n\t\t\t\t\t\n\t\t\t\t\tfor ( $i = 0; $i < count($matches[0]); $i++ )\n\t\t\t\t\t{\n\t\t\t\t\t\t$text = str_replace( $matches[0][$i], $matches[1][$i].\"<span class='searchlite'>\".$matches[2][$i].\"</span>\".$matches[3][$i], $text );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $text;\n\t}",
"private function highlight($excerpt, $term) \n {\n $text = preg_filter('/' . preg_quote($term, '/') . '/i', '<red>$0</>', $excerpt);\n \n if (!empty($text)) {\n $excerpt = $text;\n }\n\n return $excerpt;\n }",
"public function highlightMatches(string $query, string $text): string\n\t{\n\t\t$queryWords = str_word_count($query, 1, implode('', $this->specialChars));\n\t\t$snippetWords = str_word_count(str_replace('-', ' ', $text), 1, implode('', $this->specialChars));\n\t\t$replaces = [];\n\t\tforeach ($queryWords as $word) {\n\t\t\tforeach ($snippetWords as $snippetWord) {\n\t\t\t\t// case-insensitive matching. accent-insensitive matching\n\t\t\t\tif (strtolower(str_replace($this->specialChars, $this->specialReplaces, $word)) ===\n\t\t\t\t\tstrtolower(str_replace($this->specialChars, $this->specialReplaces, $snippetWord))) {\n\t\t\t\t\t$replaces['/\\b' . preg_quote($snippetWord, '/') . '\\b/'] = str_replace('%word%', $snippetWord, $this->highlightTemplate);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn preg_replace(array_keys($replaces), array_values($replaces), $text);\n\t}",
"function highlight_this($text, $words)\n\t{\n\t\t$words = trim($words);\n\t\t$the_count = 0;\n\t\t$wordsArray = explode(' ', $words);\n\t\t\tforeach($wordsArray as $word) {\n\t\t\t if(strlen(trim($word)) != 0)\n\t\t\t\n\t\t\t //exclude these words from being replaced\n\t\t\t $exclude_list = array(\"word1\", \"word2\", \"word3\");\n\t\t\t// Check if it's excluded\n\t\t\tif($word!=\"\")\n\t\t\t{\n\t\t\tif ( in_array( strtolower($word), $exclude_list ) ) {\n\t \n\t\t\t} else {\n\t\t\t\t//$text = str_replace($word, \"<span class=\\\"highlight\\\">\".$word.\"</span>\", $text, $count);\n\t\t//\t\t$text = str_replace($word, \"<span class=\\\"highlight\\\">\".$word.\"</span>\", $text);\n\t\t\t\t$text = preg_replace ( \"/\".$word.\"/i\", \"<span class=\\\"highlight\\\">\".$word.\"</span>\", $text );\n\t\t\t\t//$the_count = $count + $the_count;\n\t\t\t\t}\n\t\t\t}\n\t\t\t \n\t\t}\n\t\t//added to show how many keywords were found\n\t\t//echo \"<br><div class=\\\"emphasis\\\">A search for <strong>\" . $words. \"</strong> found <strong>\" . $the_count . \"</strong> matches within the \" . $the_place. \".</div><br>\";\n\t \n\t\treturn $text;\n\t}",
"function search_excerpt_highlight() {\n $excerpt = get_the_excerpt();\n $keys = implode('|', explode(' ', get_search_query()));\n $excerpt = preg_replace('/(' . $keys . ')/iu', '<strong class=\"search-highlight\">\\0</strong>', $excerpt);\n\n echo '<p>' . $excerpt . '</p>';\n}",
"public function highlight($text, array $options = []);",
"public static function str_highlight ($text, $needle, $forceWordBoundaryIfNo = false)\r\n\t{\r\n\t\t# Default highlighting\r\n\t\t$highlight = '<strong>\\1</strong>';\r\n\t\t\r\n\t\t# Pattern\r\n\t\t$pattern = '#(%s)#';\r\n\t\t\r\n\t\t# Apply case insensitivity\r\n\t\t$pattern .= 'i';\r\n\t\t\r\n\t\t# Escape characters\r\n\t\t$needle = preg_quote ($needle);\r\n\t\t\r\n\t\t# Escape needle with whole word check\r\n\t\tif (!$forceWordBoundaryIfNo || ($forceWordBoundaryIfNo && !substr_count ($needle, $forceWordBoundaryIfNo))) {\r\n\t\t\t$needle = '\\b' . $needle . '\\b';\r\n\t\t}\r\n\t\t\r\n\t\t# Perform replacement\r\n\t\t$regex = sprintf ($pattern, $needle);\r\n\t\t$text = preg_replace ($regex, $highlight, $text);\r\n\t\t\r\n\t\t# Return the text\r\n\t\treturn $text;\r\n\t}",
"function _highlightText($text = '') \n {\n if ($text == '')\n return '';\n $str = $text;\n\n $str = str_replace(\"\\2\", $this->hlbeg, $str);\n $str = str_replace(\"\\3\", $this->hlend, $str);\n return $str;\n }",
"static function highlight( $text, $words ) {\n\t\t$highlighted = preg_filter( '/' . preg_quote( $words ) . '/i', '<strong class=\"highlight\">$0</strong>', $text );\n\n\t\tif ( ! empty( $highlighted ) ) {\n\t\t\t$text = $highlighted;\n\t\t}\n\n\t\treturn $text;\n\t}",
"public static function highlightStr($haystack, $needles) {\n\t if (strlen($haystack) < 1) {\n\t return $haystack;\n\t }\n\n\t foreach ($needles as $needle) {\n\t \t \n\t\t preg_match_all(\"/$needle+/i\", $haystack, $matches);\n\t\t \n\t\t if (is_array($matches[0]) && count($matches[0]) >= 1) {\n\t\t foreach ($matches[0] as $match) {\n\t\t $haystack = str_replace($match, '<span class=\"highlight\">'.$match.'</span>', $haystack);\n\t\t }\n\t\t }\n\n\t\t}\n\t \n\t return $haystack;\n\n\t}",
"public function highlightInfo ($term) {\n if (!(isset($this->begin_hi))) { $this->defineHighlight(count($term)); }\n if (isset($term[0])) {\n print \"<p align='center'>The following search terms have been highlighted: \";\n for ($i = 0; isset($term[$i]); $i++) {\n\t print \" \" . $this->begin_hi[$i] . htmlentities($term[$i]) . \"$this->end_hi \";\n }\n print \"</p>\";\n }\n }",
"function tep_find_and_highlight($source_string, $search_keywords){\n\t$changed = false;\n\t$lower_string = strtolower($source_string);\n\t$position_array = array();\n\tfor ($i = 0, $n = strlen($lower_string); $i < $n; $i++) {\n\t\t$position_array[$i] = 0;\n\t}\n\tfor ($i = 0, $n = sizeof($search_keywords); $i < $n; $i++) {\n\t\t$length_keywords = strlen($search_keywords[$i]);\n\t\tif ($length_keywords > 0) {\n\t\t\t$keyword = strtolower($search_keywords[$i]);\n\t\t\t$curr_position = 0;\n\t\t\tdo {\n\t\t\t\t$str_pos = strpos ($lower_string, $keyword, $curr_position);\n\t\t\t\tif ($str_pos !== false){\n\t\t\t\t\tfor ($j = $str_pos, $m = $str_pos + $length_keywords; $j < $m; $j++) {\n\t\t\t\t\t\t$position_array[$j] = 1;\n\t\t\t\t\t}\n\t\t\t\t\t$curr_position = $str_pos + $length_keywords;\n\t\t\t\t\t$changed = true;\n\t\t\t\t}\n\t\t\t} while ($str_pos !== false);\n\t\t}\n\t}\n\tif ($changed == true) {\n\t\t$open_tag = false;\n\t\t$result_string = '';\n\t\tfor ($i = 0, $n = sizeof($position_array); $i < $n; $i++) {\n\t\t\tif ($position_array[$i] == 1) {\n\t\t\t\tif ($open_tag == false) {\n\t\t\t\t\t$result_string .= '<span style=\"color:red;font-weight:bold;\">';\n\t\t\t\t\t$open_tag = true;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tif ($open_tag == true) {\n\t\t\t\t\t$result_string .= '</span>';\n\t\t\t\t\t$open_tag = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$result_string .= $source_string{$i};\n\t\t}\n\t\tif ($open_tag == true) { $result_string .= '</span>'; }\n\t\treturn $result_string;\n\t}else {\n\t\treturn $source_string;\n\t}\n}",
"public function highlight(string $subject): string\n {\n if ($this->search !== null) {\n $pattern = '/' . preg_quote($this->search, '/') . '/ui';\n $replacement = '<mark>$0</mark>';\n $subject = preg_replace($pattern, $replacement, $subject);\n }\n return $subject;\n }",
"private function defineHighlight ($num) {\n $this->begin_hi = array();\n // strings for highlighting search terms \n for ($i = 0; $i < $num; $i++) {\n $this->begin_hi[$i] = \"<span class='term\" . ($i + 1) . \"'>\";\n }\n }",
"public function highlight($string) {\n\t\t// cache comments\n\t\t$string = $this->cacheComments($string);\n\t\t\n\t\t// cache quotes\n\t\t$string = $this->cacheQuotes($string);\n\t\t\n\t\t// encode html\n\t\t$string = StringUtil::encodeHTML($string);\n\t\t\n\t\t// do highlight\n\t\t$string = $this->highlightOperators($string);\n\t\t$string = $this->highlightKeywords($string);\n\t\t$string = $this->highlightNumbers($string);\n\t\t\n\t\t// insert and highlight quotes\n\t\t$string = $this->highlightQuotes($string);\n\t\t\n\t\t// insert and highlight comments\n\t\t$string = $this->highlightComments($string);\n\t\t\n\t\treturn $string;\n\t}",
"function decode_highlight_search_results( $text ) {\n if ( is_search() ) {\n \t$sr = get_search_query();\n\t\t$keys = implode( '|', explode( ' ', get_search_query() ) );\n\t\tif ($keys != '') { // Check for empty search, and don't modify text if empty\n\t\t\t$text = preg_replace( '/(' . $keys .')/iu', '<mark class=\"search-highlight\">\\0</mark>', $text );\n\t\t}\n }\n return $text;\n}",
"public function highlight($value) {\n return $this->setProperty('highlight', $value);\n }",
"public function highlight($value) {\n return $this->setProperty('highlight', $value);\n }",
"public function highlightSearchQueryWords($highlightedString)\n {\n preg_match_all('~\\w+~', (string)$this->getSearchQuery(), $match);\n\n $matchWords = [];\n foreach ($match[0] as $matchWord) {\n if (strlen($matchWord) >= 2) {\n $matchWords[] = $matchWord;\n }\n }\n\n if ($match) {\n $pattern = '~\\\\b(' . implode('|', $matchWords) . ')~i';\n $result = preg_replace($pattern, '<strong>$0</strong>', $highlightedString);\n } else {\n $result = $highlightedString;\n }\n\n return $result;\n }",
"public function createSnippet(string $query, string $text, bool $highlight = true)\n\t{\n\t\t$query = htmlspecialchars($query);\n\t\t$text = strip_tags($text);\n\t\t$sentences = $this->breakIntoSentences($text);\n\t\t$matchedSentences = $this->getMatchedSentences($query, $sentences);\n\t\t$result = '';\n\t\t$wordCounter = 0;\n\t\t$lastKey = key($matchedSentences) - 1;\n\t\tforeach ($matchedSentences as $key => $sentence) {\n\t\t\t$wordCounter += str_word_count($sentence, 0, implode('', $this->specialChars));\n\t\t\tif ($wordCounter < $this->maxWords || $result === '') {\n\t\t\t\tif ((int) $key !== $lastKey + 1) {\n\t\t\t\t\t// if this sentence is not the next sentence, add ' ... '\n\t\t\t\t\t$result .= ' ...';\n\t\t\t\t}\n\t\t\t\t$result .= ' ' . $sentence;\n\t\t\t}\n\t\t\t$lastKey = (int) $key;\n\t\t}\n\n\t\t// Matched text is smaller than [minWords]. Try to add next sentences\n\t\twhile ($wordCounter < $this->minWords && isset($sentences[$lastKey + 1]) && str_word_count($sentences[$lastKey + 1], 0, implode('', $this->specialChars)) + $wordCounter < $this->maxWords) {\n\t\t\t$result .= ' ' . $sentences[$lastKey + 1];\n\t\t\t$wordCounter += str_word_count($sentences[$lastKey + 1], 0, implode('', $this->specialChars));\n\t\t\t$lastKey++;\n\t\t}\n\n\t\t// Matched text is possibly still to small. Try to add sentences before the first sentence\n\t\t$firstKey = key($matchedSentences);\n\t\twhile ($wordCounter < $this->minWords && isset($sentences[$firstKey - 1]) && str_word_count($sentences[$firstKey - 1], 0, implode('', $this->specialChars)) + $wordCounter < $this->maxWords) {\n\t\t\t// add this sentence before the current result\n\t\t\t$result = $sentences[$firstKey - 1] . ' ' . $result;\n\t\t\t$wordCounter += str_word_count($sentences[$firstKey - 1], 0, implode('', $this->specialChars));\n\t\t\t$firstKey--;\n\t\t}\n\n\t\tif ($highlight === true) {\n\t\t\treturn $this->highlightMatches($query, trim($result));\n\t\t}\n\n\t\treturn trim($result);\n\t}",
"private function highlight_node ($n, $term) {\n // build a regular expression of the form /(term1)|(term2)/i \n $regexp = \"/\"; \n for ($i = 0; $i < count($term); $i++) {\n if ($i != 0) { $regexp .= \"|\"; }\n $regterm[$i] = str_replace(\"*\", \"\\w*\", $term[$i]); \n $regexp .= \"($regterm[$i])\";\n }\n $regexp .= \"/i\";\t// end of regular expression\n\n $children = $n->childNodes;\n foreach ($children as $i => $c) {\n if ($c instanceof domElement) {\t\t\n\t $this->highlight_node($c, $term);\t// if a generic domElement, recurse \n } else if ($c instanceof domText) {\t// this is a text node; now separate out search terms\n\n if (preg_match($regexp, $c->nodeValue)) {\n // if the text node matches the search term(s), split it on the search term(s) and return search term(s) also\n $split = preg_split($regexp, $c->nodeValue, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);\n\n // loop through the array of split text and create text nodes or span elements, as appropriate\n foreach ($split as $s) {\n\t if (preg_match($regexp, $s)) {\t// if it matches, this is one of the terms to highlight\n\t for ($i = 0; $regterm[$i] != ''; $i++) {\n\t if (preg_match(\"/$regterm[$i]/i\", $s)) { \t// find which term it matches\n $newnode = $this->xsl_result->createElement(\"span\", htmlentities($s));\n\t $newnode->setAttribute(\"class\", \"term\" . ($i+1));\t// use term index for span class (begins at 1 instead of 0)\n\t }\n\t }\n } else {\t// text between search terms - regular text node\n\t $newnode = $this->xsl_result->createTextNode($s);\n\t }\n\t // add newly created element (text or span) to parent node, using old text node as reference point\n\t $n->insertBefore($newnode, $c);\n }\n // remove the old text node now that we have added all the new pieces\n $n->removeChild($c);\n\t }\n } // end of processing domText element\n }\t\n }",
"function smarty_outputfilter_highlight($source, &$smarty) {\n global $feature_referer_highlight;\n\n $highlight = $_REQUEST['highlight'];\n if(isset($feature_referer_highlight) && $feature_referer_highlight == 'y') {\n $refererhi = _refererhi();\n if(isset($refererhi) && !empty($refererhi)) {\n if(isset($highlight) && !empty($highlight)) {\n $highlight = $highlight.\" \".$refererhi;\n } else {\n $highlight = $refererhi;\n }\n }\n }\n if (!isset($highlight) || empty($highlight)) {\n return $source;\n }\n\n\t$beginTag = '<!--HIGHLIGHT BEGIN-->';\n\t$endTag = '<!--HIGHLIGHT END-->';\n\t\n\t$beginPosition = strpos($source, $beginTag);\n\t$endPosition = strpos($source, $endTag);\n\t//return \"beginPosition: $beginPosition<br/>endPosition: $endPosition<br/>\" . ((!empty($beginPosition) && !empty($endPosition)) ? \"ok\" : \"nao\");\n\t\n\tif (!empty($beginPosition) && !empty($endPosition)) {\n\t\t$begin = substr($source, 0, $beginPosition);\n\t\t$mid = substr($source, $beginPosition + strlen($beginTag), $endPosition - $beginPosition - strlen($beginTag));\n\t\t$end = substr($source, $endPosition + strlen($endTag));\n\t} else {\n\t // highlight não funciona mais sem as tags $beginTag e $endTag, pra evitar q ele seja chamado em vários níveis.\n\t return $source;\n\t}\n\t\n\t$source = ''; // save memory\n\t\n\tglobal $enlightPattern;\n\t$enlightPattern = _enlightColor($highlight); // set colors\n\t\n\t$mid = preg_replace_callback('/>([^<>]+)</', '_findMatch', $mid);\n\t\n\t$mid = preg_replace_callback(\"/tooltip\\('[^']+?'\\)/\",'_fixTooltip', $mid);\n\treturn $begin . $mid . $end;\n\n }",
"public function highlight($haystack) {\n $lwHaystack = self::normalize(mb_strtolower($haystack));\n $positions = array();\n\n // Look up all the needle positions\n foreach ($this->needles as $needle) {\n $offset = 0;\n while (($position = mb_strpos($lwHaystack, $needle, $offset)) !== FALSE) {\n $end = $position + mb_strlen($needle);\n $positions[] = array('start' => $position, 'end' => $end);\n $offset = $position + 1;\n }\n }\n\n // Now start highlighting areas\n $start = NULL;\n $end = NULL;\n $extraLength = 0;\n sort($positions);\n foreach ($positions as $position) {\n if ($start === NULL) {\n $start = $position['start'];\n $end = $position['end'];\n }\n else {\n if (($position['start'] <= $end) && ($position['end'] >= $end)) {\n // Overlapping areas, combine them\n $end = $position['end'];\n }\n else {\n if ($position['start'] > $end) {\n // New area found, highlight the previous area and continue with new one\n $haystack = mb_substr($haystack, 0, $start + $extraLength) . $this->openingTag . mb_substr($haystack, $start + $extraLength);\n $extraLength += mb_strlen($this->openingTag);\n\n $haystack = mb_substr($haystack, 0, $end + $extraLength) . $this->closingTag . mb_substr($haystack, $end + $extraLength);\n $extraLength += mb_strlen($this->closingTag);\n\n $start = $position['start'];\n $end = $position['end'];\n }\n }\n }\n }\n\n // Highlight the latest found area\n if (($start !== NULL) && ($end !== NULL)) {\n $haystack = mb_substr($haystack, 0, $start + $extraLength) . $this->openingTag . mb_substr($haystack, $start + $extraLength);\n $extraLength += mb_strlen($this->openingTag);\n $haystack = mb_substr($haystack, 0, $end + $extraLength) . $this->closingTag . mb_substr($haystack, $end + $extraLength);\n }\n\n return $haystack;\n }",
"public static function wrap(string $phrase): string {\n\t\t$args = func_get_args();\n\t\tarray_shift($args);\n\t\tif (count($args) === 1 && is_array($args[0])) {\n\t\t\t$args = $args[0];\n\t\t}\n\t\t$skip_s = [];\n\t\t$skip_r = [];\n\t\t$match = false;\n\t\t$global_match_index = 0;\n\t\twhile (preg_match('/\\[([0-9]+:)?([^\\[\\]]*)]/', $phrase, $match, PREG_OFFSET_CAPTURE)) {\n\t\t\t$match_len = strlen($match[0][0]);\n\t\t\t$match_off = $match[0][1];\n\t\t\t$match_string = $match[2][0];\n\t\t\tif ($match[1][1] < 0) {\n\t\t\t\t$index = $global_match_index;\n\t\t\t} else {\n\t\t\t\t$index = intval($match[1][0]);\n\t\t\t}\n\t\t\t$global_match_index++;\n\t\t\t$replace_value = $args[$index] ?? '[]';\n\t\t\t[$left, $right] = explode('[]', $replace_value, 2) + [null, '', ];\n\t\t\tif ($left === null) {\n\t\t\t\t$replace_value = '(*' . count($skip_s) . '*)';\n\t\t\t\t$skip_s[] = $replace_value;\n\t\t\t\t$skip_r[] = $match[0][0];\n\t\t\t} else {\n\t\t\t\t$replace_value = $left . $match_string . $right;\n\t\t\t}\n\t\t\t$phrase = substr($phrase, 0, $match_off) . $replace_value . substr($phrase, $match_off + $match_len);\n\t\t}\n\n\t\tif (count($skip_s) === 0) {\n\t\t\treturn $phrase;\n\t\t}\n\t\treturn str_replace($skip_s, $skip_r, $phrase);\n\t}",
"public function highlight($text, $role, $format)\n {\n if ($format == 'troff') {\n return \"\\n.PP\\n.nf\\n\"\n . str_replace(\"\\\\\", \"\\\\\\\\\", trim($text))\n . \"\\n.fi\";\n } else if ($format != 'xhtml') {\n return $text;\n }\n\n if ($role == 'php') {\n try {\n return strtr(highlight_string($text, 1), [\n ' ' => ' ',\n \"\\n\" => '',\n ]);\n } catch (\\ParseException $e) {\n v(\"Parse error while highlighting PHP code: %s\\nText: %s\", (string) $e, $text, E_USER_WARNING);\n\n return '<pre class=\"'. ($role ? $role . 'code' : 'programlisting') .'\">'\n . htmlspecialchars($text, ENT_QUOTES, 'UTF-8')\n . \"</pre>\\n\";\n }\n } else {\n return '<pre class=\"'. ($role ? $role . 'code' : 'programlisting') .'\">'\n . htmlspecialchars($text, ENT_QUOTES, 'UTF-8')\n . \"</pre>\\n\";\n }\n\n return $retval;\n }",
"function highlight_paragraph($string, $keyword) {\n\t//$string = '<p>foo<b>bar</b></p>';\n\t//$keyword = 'foo';\n\t\n\t\n\t$dom = new DomDocument();\n\t$dom->loadHtml($string);\n\t$xpath = new DomXpath($dom);\n\t$elements = $xpath->query('//*[contains(.,\"'.$keyword.'\")]');\n\tforeach ($elements as $element) {\n \t foreach ($element->childNodes as $child) {\n \t if (!$child instanceof DomText) continue;\n \t $fragment = $dom->createDocumentFragment();\n \t $text = $child->textContent;\n\t\t\t\t\techo 'text content: ' . $text . '<br/>';\n \t while (($pos = stripos($text, $keyword)) !== false) {\n \t \t\techo 'TEXT: ' . $text . '<br/>';\n \t \t\techo 'keyword found in: ' . $pos . '<br/>';\n \t $fragment->appendChild(new DomText(substr($text, 0, $pos)));\n \t echo 'Making a child from 0 to ' . $pos . '<br/>'; \n \t $word = substr($text, $pos, strlen($keyword));\n \t echo 'Highlighting word: ' . $word . ' <br/>';\n \t $highlight = $dom->createElement('span');\n \t $highlight->appendChild(new DomText($word));\n \t //$highlight->setAttribute('class', 'highlight');\n \t $highlight->setAttribute('class', 'ht');\n \t $fragment->appendChild($highlight);\n \t $text = substr($text, $pos + strlen($keyword));\n \t echo 'TEXT IS NOT JUST: ' . $text . '<br/>'; \n \t }\n \t if (!empty($text)) $fragment->appendChild(new DomText($text));\n \t echo 'replacing child with fragment...<br/>';\n \t $element->replaceChild($fragment, $child);\n \t}\n\t}\n\t//$string = $dom->saveXml($dom->getElementsByTagName('body')->item(0)->firstChild);\n\t$string = $dom->saveHTML();\n\treturn $string;\n}",
"protected function escapePhrase($value) {\n\t\t$pattern = '/(\"|\\\\\\)/';\n\t\t$replace = '\\\\\\$1';\n\n\t\treturn preg_replace($pattern, $replace, $value);\n\t}"
]
| [
"0.74331784",
"0.70747364",
"0.68049175",
"0.64409864",
"0.61963654",
"0.6110609",
"0.59963197",
"0.5981626",
"0.58896494",
"0.5883394",
"0.579358",
"0.5772949",
"0.5710183",
"0.54785687",
"0.54698575",
"0.53842974",
"0.5380845",
"0.53246385",
"0.52440315",
"0.52351594",
"0.52351594",
"0.5213563",
"0.5169956",
"0.5166375",
"0.5088243",
"0.50777125",
"0.5051238",
"0.5037374",
"0.50229424",
"0.5004587"
]
| 0.7722337 | 0 |
Extracts an excerpt from the text surrounding the phrase with a number of characters on each side determined by radius. | public function excerpt($text, $phrase, $radius = 100, $end = '…') {
if (empty($text) || empty($phrase)) {
return self::truncate($text, $radius * 2, ['end' => $end]);
}
$append = $prepend = $end;
$phraseLen = mb_strlen($phrase);
$textLen = mb_strlen($text);
$pos = mb_strpos(mb_strtolower($text), mb_strtolower($phrase));
if ($pos === false) {
return mb_substr($text, 0, $radius) . $end;
}
$startPos = $pos - $radius;
if ($startPos <= 0) {
$startPos = 0;
$prepend = '';
}
$endPos = $pos + $phraseLen + $radius;
if ($endPos >= $textLen) {
$endPos = $textLen;
$append = '';
}
$excerpt = mb_substr($text, $startPos, $endPos - $startPos);
$excerpt = $prepend . $excerpt . $append;
return $excerpt;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function wp_article_excerpt($text, $phrase, $radius = 100, $ellipsis = '...') {\r\n\tif (empty($text) || empty($phrase)) {\r\n\t\treturn wp_article_truncate($text, $radius * 2, array('ellipsis' => $ellipsis));\r\n\t}\r\n\r\n\t$append = $prepend = $ellipsis;\r\n\r\n\t$phraseLen = mb_strlen($phrase);\r\n\t$textLen = mb_strlen($text);\r\n\r\n\t$pos = mb_strpos(mb_strtolower($text), mb_strtolower($phrase));\r\n\tif ($pos === false) {\r\n\t\treturn mb_substr($text, 0, $radius) . $ellipsis;\r\n\t}\r\n\r\n\t$startPos = $pos - $radius;\r\n\tif ($startPos <= 0) {\r\n\t\t$startPos = 0;\r\n\t\t$prepend = '';\r\n\t}\r\n\r\n\t$endPos = $pos + $phraseLen + $radius;\r\n\tif ($endPos >= $textLen) {\r\n\t\t$endPos = $textLen;\r\n\t\t$append = '';\r\n\t}\r\n\r\n\t$excerpt = mb_substr($text, $startPos, $endPos - $startPos);\r\n\t$excerpt = $prepend . $excerpt . $append;\r\n\r\n\treturn $excerpt;\r\n}",
"private function genExcerpt($text, $term) {\n $excerpt = '';\n $textLength = strlen($text);\n $termLength = strlen($term);\n $termPosition = stripos($text, $term);\n\n if ( ($termPosition > 20) && ( ($textLength - $termPosition - $termLength) > 20) ) {\n $start = $termPosition - 20;\n $length = 40 + $termLength;\n $truncated = substr($text, $start, $length );\n $excerpt = '...' . $truncated . '...';\n }\n\n else if ( ($termPosition < 20) && ( ($textLength - $termPosition - $termLength) > 20) ) {\n $start = 0;\n // 20 added with $termLength so that the search term is not included in '20 after'\n $length = $termPosition + ($termLength + 20);\n $truncated = substr($text, $start, $length );\n $excerpt = $truncated . '...';\n }\n\n else if ( ($termPosition > 20) && ( ($textLength - $termPosition - $termLength) < 20 ) ) {\n $start = $termPosition - 20;\n $length = 40 + $termLength;\n $truncated = substr($text, $start, $length );\n $excerpt = '...' . $truncated;\n }\n\n else if ( $textLength < (40 + $termLength) )\n $excerpt = $text;\n\n return $this->highlight($excerpt, $term);\n }",
"function ridizain_ephemera_excerpt () {\r\n\t$theContent = trim(strip_tags(get_the_content()));\r\n\t\t$output = str_replace( '\"', '', $theContent);\r\n\t\t$output = str_replace( '\\r\\n', ' ', $output);\r\n\t\t$output = str_replace( '\\n', ' ', $output);\r\n\t\t\t$limit = '15';\r\n\t\t\t$content = explode(' ', $output, $limit);\r\n\t\t\tarray_pop($content);\r\n\t\t$content = implode(\" \",$content).\" \";\r\n\treturn strip_tags($content, ' ');\r\n}",
"function rls_text_excerpt($length) {\n return 25;\n}",
"function excerpt_ellipse($text) {\nreturn str_replace(' [...]', ' <a href=\"'.get_permalink().'\">Read more</a>', $text);\n}",
"function cc_post_excerpt() {\n\tglobal $post;\n\n\t$excerpt = htmlentities(strip_tags($post->post_content));\n\t$excerpt_a = array_slice (explode(\" \", $excerpt), 0, 55);\n\techo implode(\" \", $excerpt_a) . \"...\";\n}",
"public static function crop_text($length, $excerpt) {\n $excerpt = preg_replace(\" (\\[.*?\\])\", '', $excerpt);\n $excerpt = strip_shortcodes($excerpt);\n $excerpt = strip_tags($excerpt);\n $excerpt = substr($excerpt, 0, $length);\n $excerpt = substr($excerpt, 0, strripos($excerpt, \" \"));\n $excerpt = trim(preg_replace('/\\s+/', ' ', $excerpt));\n\n return $excerpt;\n }",
"function excerpt_ellipse( $text ) {\n return str_replace( array( '[...]', '[…]' ), '…', $text );\n}",
"function excerpt($string){\r\n\t$string= substr($string, 0, 10);\r\n\treturn $string . \"...\";\r\n}",
"function textpart($body, $search) {\n $length = 20;\n $text = substr($body, max(stripos($body,$search) - $length, 0), strripos($body,$search) - stripos($body,$search) + strlen($search) + 2 * $length);\n if (strripos($text, \" \") < strripos($text,$search)) {\n $text = $text . \" \";\n }\n if (stripos($text, \" \") != strripos($text, \" \")) {\n $text = substr($text, stripos($text, \" \"), strripos($text, \" \") - stripos($text, \" \"));\n }\n $temp = $text;\n $stop = substr($text, strripos($text, $search) + strlen($search));\n if (strlen($stop) > $length) {\n $stop = substr($text, strripos($text, $search) + strlen($search), $length);\n $stop = substr($stop, 0, strripos($stop, \" \"));\n }\n $text = \"... \";\n while (stripos($temp,$search)) {\n $temp = substr_replace($temp, \"<b>\", stripos($temp, $search), 0);\n $temp = substr_replace($temp, \"</b>\", stripos($temp, $search) + strlen($search), 0);\n $text = $text . substr($temp, 0, stripos($temp, \"</b>\") + 4);\n $temp = substr($temp, stripos($temp, \"</b>\") + 4);\n if(stripos($temp, $search) > (2 * $length)) {\n $text = $text . substr($temp, 0, $length);\n $text = substr($text, 0, strripos($text, \" \")) . \" ... \";\n $temp = substr($temp, stripos($temp, $search) - $length);\n $temp = substr($temp, stripos($temp, \" \"));\n }\n }\n $text = $text . $stop . \" ... \";\n echo $text; \n return;\n}",
"public function excerpt($length = 300);",
"function elpie_excerpt($text) \n{ \n return str_replace('[...]', '...', $text); \n}",
"function autosuggest_excerpt( $text ) {\n\t$text = strip_tags( $text );\n\t$blah = explode(' ', $text);\n\t$excerpt_length = 10;\n\tif (count($blah) > $excerpt_length) {\n\t\t$k = $excerpt_length;\n\t\t$use_dotdotdot = 1;\n\t} else {\n\t\t$k = count($blah);\n\t\t$use_dotdotdot = 0;\n\t}\n\t$excerpt = '';\n\tfor ($i=0; $i<$k; $i++) {\n\t\t$excerpt .= trim(ent2ncr($blah[$i])).' ';\n\t}\n\t$excerpt .= '[...]';\n\t$text = $excerpt;\n\treturn $text;\n}",
"function getExcerpt($text, $cut = 100) {\n\n\t\t$shortText = substr($text, 0, $cut); // Cut to 200 charachters\n\t\t$spacePos = strrpos($shortText,\t\" \"); // Finds the last space position\n\t\t$finalText = substr($text, 0, $spacePos);\n\t\t$finalText = trim($finalText, '');\n\t\t\n\t\treturn $finalText;\n\t}",
"public function filter_post_content_excerpt($text)\n\t{\n\t\tif(strlen($text) > 280) {\n\t\t\t// cut off everything after the word at position 280. Don't use \\W so we don't cut HTML tags\n\t\t\t$rest = preg_replace('/[ .\\-]+.*/', '', substr($text, 280));\n\t\t\treturn substr($text, 0, 280) . $rest;\n\t\t}\n\t\treturn $text;\n\t\t\n\t\t// Alternative method: Return match[0] from /(\\w+\\W+){50}/ for the first 50 words\n\t}",
"function trim_excerpt($text) { return rtrim($text,'[...]'); }",
"function gallo_excerpt( $length ) {\n\treturn 30;\n}",
"function improved_trim_excerpt($text) { // Fakes an excerpt if needed\n global $post;\n if ( '' == $text ) {\n $text = get_the_content('');\n $text = apply_filters('the_content', $text);\n \n\t$text = preg_replace('@<script[^>]*?>.*?</script>@si', '', $text);\n\t$text = preg_replace('@<style[^>]*?>.*?</style>@si', '', $text);\n\t$text = preg_replace('@<p class=\"wp-caption-text\"[^>]*?>.*?</p>@si', '', $text);\t\n $text = str_replace('\\]\\]\\>', ']]>', $text);\n $text = strip_tags($text, '<p><i><em><b><a><strong>');\n $excerpt_length = 140;\n $words = explode(' ', $text, $excerpt_length + 1);\n if (count($words)> $excerpt_length) {\n array_pop($words);\n array_push($words, '... <a href=\"'.get_permalink($post->ID).'\">'.'Read More »'.'</a>');\n $text = implode(' ', $words);\n }\n }\nreturn $text;\n}",
"function woo_excerpt($text, $chars = 120) {\n\t$text = $text.\" \";\n\t$text = substr($text,0,$chars);\n\t$text = substr($text,0,strrpos($text,' '));\n\t$text = $text.\"...\";\n\treturn $text;\n}",
"function excerpt_size($legth = 150) {\r\n global $post;\r\n return substr(strip_tags($post->post_content), 0, $legth).'...';\r\n}",
"function tptn_excerpt($content,$excerpt_length){\r\n\t$out = strip_tags($content);\r\n\t$blah = explode(' ',$out);\r\n\tif (!$excerpt_length) $excerpt_length = 10;\r\n\tif(count($blah) > $excerpt_length){\r\n\t\t$k = $excerpt_length;\r\n\t\t$use_dotdotdot = 1;\r\n\t}else{\r\n\t\t$k = count($blah);\r\n\t\t$use_dotdotdot = 0;\r\n\t}\r\n\t$excerpt = '';\r\n\tfor($i=0; $i<$k; $i++){\r\n\t\t$excerpt .= $blah[$i].' ';\r\n\t}\r\n\t$excerpt .= ($use_dotdotdot) ? '...' : '';\r\n\t$out = $excerpt;\r\n\treturn $out;\r\n}",
"public function excerpt($length)\n {\n return \\Str::limit(strip_tags($this->bodyHtml()), $length, '...');\n }",
"function get_my_excerpt(){\n\t$text = get_the_content();\n\t$text = strip_shortcodes($text);\n\t$text = apply_filters('the_content', $text);\n\t$text = strip_tags($text);\n\t$excerpt_length = 30; // set the number of words here\n\t$excerpt_more = '...';\n\t$text = wp_trim_words( $text, $excerpt_length, $excerpt_more );\n\treturn $text;\n}",
"public function getExcerpt($maxLength = 255);",
"public function excerpt()\n\t{\n\t\treturn ( ! empty($this->excerpt))? $this->excerpt : truncate_word($this->content, 200);\n\t}",
"function staff_bio_excerpt($text, $excerpt_length) {\n\t\t\tglobal $post;\n\t\t\tif (!$excerpt_length || !is_int($excerpt_length))$excerpt_length = 20;\n\t\t\tif ( '' != $text ) {\n\t\t\t\t$text = strip_shortcodes( $text );\n\t\t\t\t$text = apply_filters('the_content', $text);\n\t\t\t\t$text = str_replace(']]>', ']]>', $text);\n\t\t\t\t$excerpt_more = \" ...\";\n\t\t\t\t$text = wp_trim_words( $text, $excerpt_length, $excerpt_more );\n\t\t\t}\n\t\t\treturn apply_filters('the_excerpt', $text);\n\t\t}",
"public function excerpt()\n {\n if (!$this->desc()->empty()) {\n $excerpt = $this->desc();\n } else {\n $excerpt = excerpt($this->text(), $length = 40, $mode = 'words');\n };\n\n return $excerpt;\n }",
"function postExcerpt($content) {\n\t\t$clean = strip_tags($content);\n\t\tif (strlen($clean) > 120){\n\t\t\t$excerpt = substr($clean, 0, strpos($clean, ' ', 120));\n\t\t\tprint $excerpt . ' ...';\n\t\t}\n\t}",
"function ridizain_featured_excerpt () {\r\n\t$theContent = trim(strip_tags(get_the_content()));\r\n\t\t$output = str_replace( '\"', '', $theContent);\r\n\t\t$output = str_replace( '\\r\\n', ' ', $output);\r\n\t\t$output = str_replace( '\\n', ' ', $output);\r\n\t\t\t$limit = '15';\r\n\t\t\t$content = explode(' ', $output, $limit);\r\n\t\t\tarray_pop($content);\r\n\t\t$content = implode(\" \",$content).\" \";\r\n\treturn strip_tags($content, ' ');\r\n}",
"public function get_excerpt($number_of_characters = 140, $ellipsis = '...') {\n\t\treturn APPC_UTILITY::get_excerpt_from_text($this->get_content(), $number_of_characters, $ellipsis);\n\t}"
]
| [
"0.7602098",
"0.63253576",
"0.6097303",
"0.5969905",
"0.57759833",
"0.57385105",
"0.5718606",
"0.56723297",
"0.56347984",
"0.5613179",
"0.5607442",
"0.5603852",
"0.558375",
"0.558244",
"0.5572754",
"0.5492233",
"0.5487198",
"0.54841095",
"0.5483074",
"0.54802704",
"0.5476075",
"0.5461752",
"0.54340607",
"0.5415629",
"0.54118377",
"0.5391962",
"0.5381481",
"0.5363841",
"0.535314",
"0.5332336"
]
| 0.734976 | 1 |
Makes a POST request to the Disqus API. | public function api_post( $endpoint, $params ) {
$api_url = Disqus_Api_Service::DISQUS_API_BASE . $endpoint . '.json?'
. 'api_secret=' . $this->api_secret
. '&access_token=' . $this->access_token;
$dsq_response = wp_remote_post( $api_url, array(
'body' => $params,
'headers' => array(
'Referer' => '', // Unset referer so we can use secret key.
),
'method' => 'POST',
) );
return $this->get_response_body( $dsq_response );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function call($function, $arguments = array(), $post = FALSE) {\n // Construct the arguments.\n $args = '';\n if (!isset($arguments['api_key'])) {\n $arguments['api_key'] = $this->user_api_key;\n }\n foreach ($arguments as $argument => $value) {\n if (!empty($value)) {\n $args .= $argument .'='. urlencode($value) .'&';\n }\n }\n\n $urlcall = $this->api_url . $this->api_version . '/' . $function . '.json?';\n\n\t$argslen = strlen($args);\n\t$argslen = $argslen - 1;\n\t$args = substr($args, 0, $argslen); \n\n\nprint '<br />making the curl call: <br />' . $urlcall . $args . '<br />';\n\n// Call the Disqus API.\n $ch = curl_init();\n if ($post) {\n curl_setopt($ch, CURLOPT_URL, $urlcall);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $args);\n curl_setopt($ch, CURLOPT_POST, 1);\n }\n else {\n curl_setopt($ch, CURLOPT_URL, $this->api_url . $function .'/?'. $args);\n }\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_TIMEOUT, 10);\n $data = curl_exec($ch);\n $info = curl_getinfo($ch);\n\n curl_close($ch);\n \n // Check the results for errors (200 is a successful HTTP call).\n if ($info['http_code'] == 200) {\n $disqus = json_decode($data);\n\tvar_dump($disqus);\n\tif($disqus->code == 0){\n \t// There weren't any errors, so return the results.\n \treturn isset($disqus) ? $disqus : NULL;\n }\n else {\n \tthrow new DisqusException(isset($disqus->message) ? $disqus->message : NULL, 0, $info, $disqus);\n }\n }\n else {\n throw new DisqusException('There was an error querying the Disqus API.', $info['http_code'], $info);\n }\n }",
"public function send_post_request(){\n $url = \\Request::get('url');\n $post_array = \\Request::all();\n\n//\t\t$url = 'http://localhost/_websites/ahmed-badawy.com/site/json-test';\n//\t\t$post_array = array('type' => 'scss', 'source' => '.pre{color:red;background-color:green;}', 'compress'=>true);\n\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post_array);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $query = curl_exec($ch);\n curl_close($ch);\n\n return $query;\n }",
"public function post();",
"public function post();",
"public function post();",
"function postComment() {\n $username = $_POST['username'];\n $content = $_POST['content'];\n $commentDate = $_POST['commentDate'];\n $repliedCommentId = null;\n \n if (array_key_exists('repliedCommentId', $_POST)) {\n $repliedCommentId = $_POST['repliedCommentId'];\n }\n\n $response = insertComment($username, $content, $commentDate, $repliedCommentId);\n\n if ($response['status'] == 'SUCCESS') {\n echo json_encode($response['response']);\n } else {\n errorHandler($response['status'], $response['code']);\n }\n }",
"public function addPostFromDiscord(Request $request) {\n\n $course = Course::where('code', trim($request->course, \"[]\"))->first();\n $topic = Topics::where('course_id', $course->id)->where('name', 'Discord')->first();\n\n if($topic == null) {\n $topic = new Topics();\n $topic->name = \"Discord\";\n $topic->course_id =$course->id;\n $topic->save();\n }\n\n $post = new Post();\n $post->author_id = 6;\n $post->topic_id = $topic->id;\n $post->course_id = $course->id;\n $post->title = \"Discord post\";\n $post->content = $request->content;\n $post->downvotes = 0;\n $post->upvotes = 0;\n $post->type = 'Diskuze';\n $post->save();\n return true;\n }",
"public function requestDisqusAccessToken($code)\n\t{\n\t\t$url = 'https://disqus.com/api/oauth/2.0/access_token/';\n\t\t$fields = array(\n\t\t 'grant_type'=>\"audiencesync\",\n\t\t 'client_id'=>$this->app[\"config\"][\"disqus.audsync.publickey\"],\n\t\t 'client_secret'=>$this->app[\"config\"][\"disqus.audsync.secret\"],\n\t\t 'redirect_uri'=>$this->app->url('disqus_as_callback'),\n\t\t 'code'=>$code\n\t );\n\n\t\treturn $this->call($url, $fields, HTTPMethod::POST);\n\t}",
"public function post($url, $body = array(), $query = array(), $headers = array());",
"public function post_post()\n\t{\n\t\ttry {\n\t\t\t$results = Articles::regist( self::$_JSON );\n\t\t\t//\\Log::warning(print_r($results, true));\n\n\t\t\treturn $this->response($results, 200);\n\t\t} catch (\\MarcoPandaException $e) {\n\t\t\t$this->error($e);\n\t\t}\n\t}",
"function addDisqusBox($url, $id, $disqus)\n {\n echo <<<EOF\n <div id=\"disqus_thread\"></div>\n <script>\n /**\n * RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.\n * LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables\n */\n \n var disqus_config = function () {\n this.page.url = \"$url\";\n this.page.identifier = $id;\n };\n \n (function() { // DON'T EDIT BELOW THIS LINE\n var d = document, s = d.createElement('script');\n s.src = '//$disqus/embed.js';\n s.setAttribute('data-timestamp', +new Date());\n (d.head || d.body).appendChild(s);\n })();\n </script>\n <noscript>Please enable JavaScript to view the <a href=\"https://disqus.com/?ref_noscript\">comments powered by Disqus.</a></noscript>\nEOF;\n\n }",
"function post($url, $data = null, $options = array()) {\n\t\treturn $this->request($url, array_merge(array('method' => 'POST', 'body' => $data), $options));\n\t}",
"public function postComments()\n {\n $commentText = $this->input->post('text');\n $slug = $this->input->post('slug');\n $username = $this->session->userdata('username');\n $response = $this->ReviewModel->postComment($commentText, $username, $slug);\n }",
"function doPost($url, $post = array() , $format = 'plain')\n{\n return curlExecute($url, 'post', $post, $format);\n}",
"public function _post($url = null, array $parameters = []);",
"public function sendCommentOnDiscuss(Request $request)\n {\n\n \t/*$current = Carbon::now();\n \t$current = new Carbon();*/\n\n $discuss = new Discuss;\n $discuss->create([\n 'comment' => $request['comment'],\n 'id_campus' => $request['id_campus'],\n 'id_course' => $request['id_course'],\n 'nid' => $request['nid'],\n ]);\n\n return $request->all();\n }",
"function httpPOST($url, $data)\n{\n $curl = curl_init($url);\n curl_setopt($curl, CURLOPT_POST, true);\n curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n curl_close($curl);\n return $response;\n}",
"public function actionAdd() {\n $request = Yii::$app->request;\n $db = new Connection(Yii::$app->db);\n if (!is_null($request)) { //check wheter request exist or not\n $ip = $request->post('ip');\n $comment = $request->post('comment');\n $db->createCommand()->insert('discuss', [\n 'ip' => $ip,\n 'comment' => $comment,\n ])->execute();\n return json_encode([\"status\" => \"passed\"]);\n } else {\n return json_encode([\"status\" => \"failed\"]);\n }\n }",
"public function post($post);",
"public function post($url)\n {\n $this->requestType = Client::REQUEST_POST;\n $this->url = $url;\n return $this;\n }",
"function httpPOST($url, array $data, $headers = '') {\n $this->ensureOpened(__FUNCTION__);\n $query = http_build_query($data, '', '&');\n ($headers = trim($headers) === '') or $headers .= \"\\r\\n\";\n\n $headers = \"POST $url HTTP/1.0\\r\\n\".\n $headers.\n \"Content-Type: application/x-www-form-urlencoded\\r\\n\".\n \"Content-Length: \".strlen($query).\"\\r\\n\".\n \"$query\\r\\n\";\n\n $this->write($headers);\n return $this->readAllAndClose();\n }",
"public function post($url, $body){\n\t\t\n\t\t// do we even need this?\n\t\t// $headers = array('Content-Type: application/x-www-form-urlencoded')\n\t\t\n\t\treturn $this->doRequest('POST', $url, $body);\n }",
"public function post ($url, $data = null, $headers = null, $options = null);",
"private function sendSnippet( $snippit )\n\t{\n\t\t$post_fields = array(\n\t\t\t\t\"categoryId\"\t=>\t$snippit -> category,\n\t\t\t\t\"name\"\t\t\t\t=>\thtmlspecialchars( $snippit -> title ),\n\t\t\t\t\"body\"\t\t\t\t=>\thtmlspecialchars( $snippit -> code ),\n\t\t\t\t\"tag1\"\t\t\t\t=>\t$snippit -> tags[0],\n\t\t\t\t\"tag2\"\t\t\t\t=>\t$snippit -> tags[1],\n\t\t\t\t\"tag3\"\t\t\t\t=>\t$snippit -> tags[2],\n\t\t\t\t\"tag4\"\t\t\t\t=>\t$snippit -> tags[3],\n\t\t\t\t\"type\"\t\t\t\t=>\t($snippit -> type == 1 ? \"question\" : \"regular\"),\n\t\t\t);\n\t\t$post_fields[$this -> authToken[\"name\"]] = $this -> authToken['value'];\n\t\t\n\t\t// Setup the request\n\t\t$this -> httpHandler = new HTTPRequest( $this -> url, HTTP_METH_POST );\n\t\t// Enable cookies\n\t\t$this -> httpHandler -> enableCookies();\n\t\t// Set content-type\n\t\t$this -> httpHandler -> setContentType( \"application/x-www-form-urlencoded\" );\n\t\t\n\t\t$this -> httpHandler -> setCookies( $this -> cookies );\n\t\t$this -> httpHandler -> setHeaders( \n\t\t\t\tarray( \n\t\t\t\t\t\t\"X-Requested-With\" => \"XMLHttpRequest\",\n\t\t\t\t\t\t\"Accept\" => \"*/*\", \n\t\t\t\t\t\t\"Origin\" => $this -> url, \n\t\t\t\t\t\t\"Referer\" => $this -> url . \"index.php?m=timeline&scope=everyone\", \n\t\t\t\t\t\t\"User-Agent\" => $this -> userAgent\n\t\t\t\t) \n\t\t\t);\n\t\t\n\t\t// Setup the form data\n\t\t$form_data = array_merge( $this -> saveHidden, $post_fields );\n\t\t$this -> httpHandler -> addPostFields( $form_data );\n\t\t\n\t\t// Send the request\n\t\t$this -> httpHandler -> send();\n\t\t\n\t\t// Check if the addition was a success\n\t\tif( $this -> httpHandler -> getResponseBody() != \"success\" ) :\n\t\t\t$this -> errorCode\t= 5;\n\t\t\t$this -> errorMsg\t\t=\t\"Snippet save failed\";\n\t\t\treturn false;\n\t\tendif;\n\t\t\n\t\treturn true;\n\t}",
"protected function post($url, $params) {\n $client = new Emory_Http_Client($url,\n array('timeout' => 60)\t// increase timeout to 60 seconds (default is 10)\n );\n $client->setParameterPost($params);\n $client->setEncType(Zend_Http_Client::ENC_FORMDATA);\n $client->setMethod(Zend_Http_Client::POST);\n $response = $client->request();\n if ($response->isSuccessful())\n return $response->getRawBody();\t// don't do any decoding, etc\n else {\n // FIXME: is this exception-worthy?\n throw new SolrException($response->getMessage());\n }\n }",
"public function postCurlCall($url, $post_params){\n return $this->utilities->curlPost($url, $post_params);\n }",
"function request_post_api($url=\"\",$post=\"\") {\n\tif(empty($url))\n\t\treturn false;\n\t$ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL,$url);\n\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);\n\tif($post){\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post)); \t\t\n\t}\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t$response = curl_exec($ch);\n\tcurl_close($ch);\n\treturn $response;\n}",
"function post_query_slack($url,$opts) {\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_POST, true);\n curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($opts));\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n $data = curl_exec($curl);\n curl_close($curl);\n return $data;\n}",
"private function POST($url,$params=false){\n return $this->Request($url,$params,HTTP_POST);\n }",
"public function blogCommentPost() {\n\n $data = $this->request->all();\n $this->comment->create($data);\n return json_encode(array('status' => 200, 'message' => 'Saved successfuly'));\n }"
]
| [
"0.6638798",
"0.58746946",
"0.5649907",
"0.5649907",
"0.5649907",
"0.56086916",
"0.55620444",
"0.5546379",
"0.5460937",
"0.5417458",
"0.53984094",
"0.533535",
"0.5317043",
"0.53140664",
"0.52742374",
"0.5242851",
"0.52384794",
"0.52333045",
"0.5225859",
"0.5209664",
"0.52073365",
"0.5197025",
"0.5190774",
"0.5188733",
"0.51794523",
"0.51650494",
"0.51643604",
"0.51627094",
"0.5152321",
"0.5150024"
]
| 0.6656491 | 0 |
We clone the http headers when we clone the curren object | public function __clone()
{
$this->headers = clone $this->headers;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __clone () {\r\n\t\t$this->Headers = clone $this->Headers;\r\n\t\t$this->Cookies = clone $this->Cookies;\r\n\t}",
"public function clearHttpHeaders()\n {\n $this->headers = array();\n }",
"function nocache_headers()\n {\n }",
"abstract public function SetHeaders();",
"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 }",
"protected function cleanHeaders()\n {\n //Clean up header\n $this->headers = ['Accept' => 'application/json'];\n }",
"public function getHeaders()\n{\n return $this->headers;\n}",
"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 resetHeaders()\n {\n $this->_headers = array();\n return $this;\n }",
"public function setHeaders()\n {\n }",
"function getHeaders(){ return $this->_Headers; }",
"protected function clearHeaders()\n {\n $this->headers = array();\n }",
"public function __clone()\n {\n $this->headers = clone $this->headers;\n $this->encoder = clone $this->encoder;\n $this->cacheKey = bin2hex(random_bytes(16)); // set 32 hex values\n $children = [];\n foreach ($this->children as $pos => $child) {\n $children[$pos] = clone $child;\n }\n $this->setChildren($children);\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 }",
"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 setHttpHeaders() {\n $this->_httpHeaders[] = \"Content-Type: application/json\";\n parent::setHttpHeaders();\n }",
"public function resetHeaders() {\n $this->checkNotStopped();\n $this->headers = self::$defaultHeaders;\n }",
"public function clearHeaders(): void\n {\n self::$headers = [];\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 }",
"public function setHeaders() {\r\n\t\t$this->resource->setHeaders();\r\n\t}",
"public static function set_headers()\n {\n }",
"public function getHeaders(){\n return $this->headers;\n }",
"protected function setHeader(){\n $this->header = [\n 'Auth-id' => $this->username,\n 'Auth-token' => $this->generateToken(),\n 'Timestamp' => time()\n ];\n }",
"public function setHeaders() : void {\n $this->setCacheHeaders();\n }",
"public function clearHeaders()\n {\n $this->headers = [];\n }",
"public function addTempContentHttpHeaders() {}",
"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 }",
"abstract public function getHeaders();",
"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 setHeaders($header)\n\t{\n\t\treturn array_replace($this->headers,$header);\n\t}"
]
| [
"0.7636327",
"0.69444245",
"0.6913304",
"0.6830726",
"0.68207216",
"0.6762735",
"0.67334944",
"0.67150074",
"0.67047787",
"0.6626857",
"0.6607092",
"0.6598655",
"0.65778387",
"0.65693045",
"0.65629345",
"0.6498055",
"0.6411379",
"0.64014125",
"0.63961",
"0.6381961",
"0.6356937",
"0.6336444",
"0.6274178",
"0.62521935",
"0.6244697",
"0.62304693",
"0.6229271",
"0.62216485",
"0.6215058",
"0.6194159"
]
| 0.8182132 | 0 |
Upload ADIF to Clublog | public function upload() {
$this->load->model('clublog_model');
$users = $this->clublog_model->get_clublog_users();
foreach ($users as $user) {
$this->uploadUser($user->user_id, $user->user_clublog_name, $user->user_clublog_password);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function upload_file_log($file_data, $formId = null, $c = null){\n\t\t$branch = '';\n\t\tif(isset($_COOKIE[SESSION_CONST_PRE.'branch']))\n\t\t{\n\t\t\t$branch = $_COOKIE[SESSION_CONST_PRE.'branch'];\n\t\t}\n\t\t\n\t\t$form = array('form_log_id'=>$formId,'form_type'=>$c, 'branch' => $branch, 'uploaded_by' => $this->session->userdata(SESSION_CONST_PRE.'userId') );\n\t\t$arr_upload = array_merge($file_data, $form);\n\t\t$this->db->insert('upload_file_log', $arr_upload);\n\t}",
"public function upload()\n\t{\n\t}",
"function insertIntoAttachment($id,$module)\n\t{\n\t\tglobal $log, $adb;\n\t\t$log->debug(\"Entering into insertIntoAttachment($id,$module) method.\");\n\n\t\t$file_saved = false;\n\n\t\tforeach($_FILES as $fileindex => $files)\n\t\t{\n\t\t\tif($files['name'] != '' && $files['size'] > 0)\n\t\t\t{\n\t\t\t\t$file_saved = $this->uploadAndSaveFile($id,$module,$files);\n\t\t\t}\n\t\t}\n\n\t\t$log->debug(\"Exiting from insertIntoAttachment($id,$module) method.\");\n\t}",
"public function uploadApkAction() {\n\t $apkId = $this->getInput('apkId');\n\t $this->assign('apkId', $apkId);\n\t $this->getView()->display('common/uploadApk.phtml');\n\t exit;\n\t}",
"public function uploadApkPostAction() {\n\t $ret = Common::uploadApk('apk', 'gdtdelivery');\n\t $this->assign('code' , $ret['data']);\n\t $this->assign('msg' , $ret['msg']);\n\t $this->assign('data', $ret['data']);\n\t $apkId = $this->getInput('apkId');\n\t $this->assign('apkId', $apkId);\n\t $this->getView()->display('common/uploadApk.phtml');\n\t exit;\n\t}",
"public function upload();",
"function profile_upload($updata,$can_id,$caneid)\n\t{\n\t\t\n\t\t$this->db->trans_start();\n\t\t$this->db->where('can_id',$can_id);\n\t\t$this->db->set('can_encrypt_id',$caneid);\n\t\t$this->db->update('ch_candidate',$updata);\n\t\t$this->db->trans_complete();\n\t\tif($this->db->trans_status() === FALSE){return false;}else{return true;}\n\t}",
"public function saveLog($dataitem,$logType,$message){\n\n\t\t$db = DB::getInstance();\n\t\t\n global $config;\n\n $authsaml = AuthSaml::getInstance();\n if( $authsaml->isAuth()) {\n $authAttributes = $authsaml->sAuth();\n } else {\n $authAttributes[\"saml_uid_attribute\"] = \"\";\n }\n //$dbCheck = DB_Input_Checks::getInstance();\n\n\n // If authenticated also add authID to log\n // add os, browser and html5 version to log message\n if(isset($dataitem['fileuid'])) \n {\n $logfileuid\t= $dataitem['fileuid'];\n $logvoucheruid\t= $dataitem['filevoucheruid'];\n $logtype\t= $logType;\n $logfrom\t= $dataitem['filefrom'];\n $logto\t= $dataitem['fileto'];\n $logdate\t= date($config['db_dateformat'], time());//use timestamp with timezone $dbCheck->checkString(pg_escape_string($dataitem['logdate']));\n $logfilesize\t= $dataitem['filesize'];\n $logfilename\t= $dataitem['fileoriginalname'];\n $logmessage\t= $message;\n $logauthuseruid\t= $authAttributes[\"saml_uid_attribute\"];\n } else {\n $logfileuid\t= \"\";\n $logvoucheruid\t= \"\";\n $logtype\t= $logType;\n $logfrom\t= \"\";\n $logto\t= \"\";\n $logdate\t= date($config['db_dateformat'], time());//use timestamp with timezone $dbCheck->checkString(pg_escape_string($dataitem['logdate']));\n $logfilesize\t= \"\";\n $logfilename\t= \"\";\n $logmessage\t= $message;\n $logauthuseruid\t= $authAttributes[\"saml_uid_attribute\"];\n }\n\t\t\n\t\t$pdo = $this->db->connect();\n\t\t$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // Set Errorhandling to Exception\n\t\t$statement = $pdo->prepare(\"INSERT INTO \n logs \n (\n logfileuid,\n logvoucheruid, \n logtype , \n logfrom, \n logto, \n logdate, \n logfilesize, \n logfilename, \n logmessage,\n logauthuseruid\n ) \n VALUES \n (\n :logfileuid,\n :logvoucheruid, \n :logtype , \n :logfrom, \n :logto, \n :logdate, \n :logfilesize, \n :logfilename, \n :logmessage,\n :logauthuseruid\n )\");\n\t\t\t\n\t\t\t$statement->bindParam(':logfileuid',$logfileuid);\n\t\t\t$statement->bindParam(':logvoucheruid',$logvoucheruid); \n\t\t\t$statement->bindParam(':logtype', $logtype);\n\t\t\t$statement->bindParam(':logfrom', $logfrom);\n\t\t\t$statement->bindParam(':logto', $logto);\n\t\t\t$statement->bindParam(':logdate',$logdate); \n\t\t\t$statement->bindParam(':logfilesize', $logfilesize);\n\t\t\t$statement->bindParam(':logfilename', $logfilename);\n\t\t\t$statement->bindParam(':logmessage',$logmessage);\n\t\t\t$statement->bindParam(':logauthuseruid',$logauthuseruid);\n\t\t\n\t\ttry \n\t\t{ \t\n\t\t\t$statement->execute(); \n\t\t\t return true;\n\t\t}\n\t\tcatch(PDOException $e)\n\t\t{ \n\t\t\tdisplayError(lang(\"_ERROR_CONTACT_ADMIN\"),$e->getMessage()); \n\t\t\treturn false;\n\t\t}\n }",
"function addArtifactAttachedFile($sessionKey,$group_id,$group_artifact_id,$artifact_id,$encoded_data,$description,$filename,$filetype) {\n global $art_field_fact; \n if (session_continue($sessionKey)) {\n $pm = ProjectManager::instance();\n try {\n $grp = $pm->getGroupByIdForSoap($group_id, 'addArtifactAttachedFile');\n } catch (SoapFault $e) {\n return $e;\n }\n\n $at = new ArtifactTracker($grp,$group_artifact_id);\n if (!$at || !is_object($at)) {\n return new SoapFault(get_artifact_type_fault,'Could Not Get ArtifactTracker','addArtifactFile');\n } elseif ($at->isError()) {\n return new SoapFault(get_artifact_type_fault,$at->getErrorMessage(),'addArtifactFile');\n }\n \n $art_field_fact = new ArtifactFieldFactory($at);\n if (!$art_field_fact || !is_object($art_field_fact)) {\n return new SoapFault(get_artifact_field_factory_fault, 'Could Not Get ArtifactFieldFactory','addArtifactFile');\n } elseif ($art_field_fact->isError()) {\n return new SoapFault(get_artifact_field_factory_fault, $art_field_fact->getErrorMessage(),'addArtifactFile');\n }\n\n $a = new Artifact($at,$artifact_id);\n if (!$a || !is_object($a)) {\n return new SoapFault(get_artifact_fault,'Could Not Get Artifact','addArtifactFile');\n } elseif ($a->isError()) {\n return new SoapFault(get_artifact_fault,$a->getErrorMessage(),'addArtifactFile');\n }\n\n $af = new ArtifactFile($a);\n if (!$af || !is_object($af)) {\n return new SoapFault(get_artifact_file_fault,'Could Not Create File Object','addArtifactFile');\n } else if ($af->isError()) {\n return new SoapFault(get_artifact_file_fault,$af->getErrorMessage(),'addArtifactFile');\n }\n\n $bin_data = base64_decode($encoded_data);\n\n $filesize = strlen($bin_data);\n\n $id = $af->create($filename,$filetype,$filesize,$bin_data,$description, $changes);\n\n if (!$id) {\n return new SoapFault(get_artifact_file_fault,$af->getErrorMessage(),'addArtifactFile');\n } else {\n // Send the notification\n if ($changes) {\n $agnf =& new ArtifactGlobalNotificationFactory();\n $addresses = $agnf->getAllAddresses($at->getID(), true);\n $a->mailFollowupWithPermissions($addresses, $changes);\n }\n }\n\n return $id;\n } else {\n return new SoapFault(invalid_session_fault, 'Invalid Session', 'addArtifactFile');\n }\n}",
"function writeAccessInfo(){\r\n\t\t$sql=\"INSERT INTO \".$this->schema.\".accessi_log(ipaddr,username,data_enter,application) VALUES('$this->user_ip','$this->username',CURRENT_TIMESTAMP(1),'$app')\";\r\n\t\t$this->db->sql_query($sql);\r\n\t}",
"public function upload()\n {\n }",
"public function uploadMappingGroupBumCoa($params = array())\n {\n $data = array();\n $total_rec = $ins_rec = $lastBaCode = $update_rec = 0;\n \n \n if ($_FILES[file][size] > 0) {\n\n //get the csv file\n $file = $_FILES[file][tmp_name];\n $handle = fopen($file,\"r\");\n \n //loop through the csv file and insert into database\n do {\n if (($data[0])&&($total_rec > 1)) {\n //cek data\n $sql = \"\n SELECT COUNT(*) \n FROM TM_GROUP_BUM_COA\n WHERE GROUP_BUM_CODE = TRIM('\".addslashes($data[0]).\"')\n AND COA_CODE = TRIM('\".addslashes($data[1]).\"')\n \";\n $count = $this->_db->fetchOne($sql);\n if ($count == 0) {\n try {\n //insert data\n $sql = \"\n INSERT INTO TM_GROUP_BUM_COA (GROUP_BUM_CODE, COA_CODE, INSERT_USER, INSERT_TIME)\n VALUES (\n TRIM('\".addslashes($data[0]).\"'),\n TRIM('\".addslashes($data[1]).\"'),\n '{$this->_userName}',\n SYSDATE\n )\n \";\n $this->_db->query($sql);\n $this->_db->commit();\n $ins_rec++;\n \n //log DB\n $this->_global->insertLog('UPLOAD DATA SUCCESS', 'MAPPING GROUP BUM - COA', '', '');\n } catch (Exception $e) {\n //menampilkan data yang tidak ditambahkan\n $data_error[] = $total_rec;\n \n //log DB\n $this->_global->insertLog('UPLOAD DATA FAILED', 'MAPPING GROUP BUM - COA', '', $e->getCode());\n \n //error log file\n $this->_global->errorLogFile($e->getMessage());\n }\n }else{\n // cek apakah data non-aktif\n $sql = \"\n SELECT COUNT(*) \n FROM TM_GROUP_BUM_COA\n WHERE GROUP_BUM_CODE = TRIM('\".addslashes($data[0]).\"')\n AND COA_CODE = TRIM('\".addslashes($data[1]).\"')\n AND DELETE_USER IS NULL\n \";\n $count = $this->_db->fetchOne($sql);\n \n if ($count == 0) {\n // update data menjadi aktif jika sebelumnya telah dinon-aktifkan\n try {\n $sql = \"\n UPDATE TM_GROUP_BUM_COA\n SET UPDATE_USER = '{$this->_userName}',\n UPDATE_TIME = SYSDATE,\n DELETE_USER = NULL,\n DELETE_TIME = NULL\n WHERE GROUP_BUM_CODE = TRIM('\".addslashes($data[0]).\"')\n AND COA_CODE = TRIM('\".addslashes($data[1]).\"')\n \";\n $this->_db->query($sql);\n $this->_db->commit();\n $update_rec++;\n \n //log DB\n $this->_global->insertLog('UPLOAD DATA SUCCESS', 'MAPPING GROUP BUM - COA', '', '');\n } catch (Exception $e) {\n //menampilkan data yang tidak ditambahkan\n $data_error[] = $total_rec;\n \n //log DB\n $this->_global->insertLog('UPLOAD DATA FAILED', 'MAPPING GROUP BUM - COA', '', $e->getCode());\n \n //error log file\n $this->_global->errorLogFile($e->getMessage());\n }\n }else{\n //menampilkan data yang tidak ditambahkan\n $data_error[] = $total_rec;\n }\n }\n $lastBaCode = addslashes($data[0]);\n }\n $total_rec++;\n } while ($data = fgetcsv($handle,1000,\",\",\"'\"));\n //\n $return = array(\n 'status' => 'done',\n 'total' => $total_rec - 2,\n 'inserted' => $ins_rec,\n 'updated' => $update_rec,\n 'data_failed' => $data_error\n );\n }else{\n $return = array(\n 'status' => 'failed',\n 'total' => $total_rec - 2,\n 'inserted' => $ins_rec,\n 'updated' => $update_rec,\n 'data_failed' => $data_error\n );\n }\n \n return $return;\n }",
"public function uploadAdherentFile(FileAdherent $file,$finalPath,$categorie){\n $req = $this->db->prepare('INSERT INTO p5_adherent_files(adherent_name,\n adherent_firstname,adherent_city,adherent_file_name,adherent_file_url,upload_date,category_id) \n VALUES (?,?,?,?,?,NOW(),?)');\n $req->execute(array($file->getAdherent_name(),$file->getAdherent_firstname(),$file->getAdherent_city(),\n $file->getAdherent_file_name(),$finalPath,$categorie));\n\n }",
"function manageUploadRecord ($status, $filename){\n/*\ntry catch only kicks in if the db fails between the initial file check and the final log write\nthus is very unlikely\n*/\ntry{\n\t// setup variable scope\n\tglobal $dbQubev;\n\t// prepares statement for record database\n\t$resultStmt = $dbQubev->prepare(\"UPDATE files SET vis_status = ? WHERE filename = ?\");\n\t// binds and executes query\n\t$resultStmt->execute(array($status,$filename));\n} catch (PDOException $ex){\n\t// create text string for logging\n\t$uploadRecordFail = \"\\nNEW JOURNEY\\n\".date('d/m/Y H:i:s', time()).\" Upload DB Record Fail (databases out of sync) - File: \".$newFile;\n\t// write to log file\n\tfile_put_contents(DATALOAD_LOGFILE, $uploadRecordFail, FILE_APPEND | LOCK_EX);\n}\n}",
"function transfer()\n\t{\n\t\tglobal $phpbb_root_path;\n\n\t\t$this->file_perms\t= 0644;\n\t\t$this->dir_perms\t= 0777;\n\n\t\t// We use the store directory as temporary path to circumvent open basedir restrictions\n\t\t$this->tmp_path = $phpbb_root_path . 'store/';\n\t}",
"public function insertArtista(){\n\t\tif($this->autenticado(/* parametro? */)){\n\t\t\t$this->actualizarArtista($this->getCamposArtista(NULL), true, false, '');\n\t\t}else{\n\t\t\techo \"Directory access is forbidden.\";\n\t\t}\n\t}",
"abstract protected function doUpload();",
"public function uploadMappingActivityCoa($params = array())\n {\n $data = array();\n $total_rec = $ins_rec = $update_rec = 0;\n \n if ($_FILES[file][size] > 0) {\n\n //get the csv file\n $file = $_FILES[file][tmp_name];\n $handle = fopen($file,\"r\");\n \n //loop through the csv file and insert into database\n do {\n if (($data[0])&&($total_rec > 1)) {\n //cek data\n $sql = \"\n SELECT COUNT(*) \n FROM TM_ACTIVITY_COA\n WHERE ACTIVITY_GROUP = TRIM('\".addslashes($data[0]).\"')\n AND ACTIVITY_CODE = TRIM('\".addslashes($data[1]).\"')\n AND COST_ELEMENT = TRIM('\".addslashes($data[2]).\"')\n \";\n $count = $this->_db->fetchOne($sql);\n if ($count == 0) {\n try {\n $sql = \"\n INSERT INTO TM_ACTIVITY_COA\n (ACTIVITY_GROUP, ACTIVITY_CODE, COST_ELEMENT, COA_CODE, ACTIVITY_CODE_SAP, INSERT_USER, INSERT_TIME)\n VALUES (\n TRIM('\".addslashes($data[0]).\"'),\n TRIM('\".addslashes($data[1]).\"'),\n TRIM('\".addslashes($data[2]).\"'),\n TRIM('\".addslashes($data[3]).\"'),\n TRIM('\".addslashes($data[4]).\"'),\n '{$this->_userName}',\n SYSDATE\n )\n \";\n $this->_db->query($sql);\n $this->_db->commit();\n $ins_rec++;\n \n //log DB\n $this->_global->insertLog('UPLOAD DATA SUCCESS', 'MAPPING AKTIVITAS - COA', '', '');\n } catch (Exception $e) {\n //menampilkan data yang tidak ditambahkan\n $data_error[] = $total_rec;\n \n //log DB\n $this->_global->insertLog('UPLOAD DATA FAILED', 'MAPPING AKTIVITAS - COA', '', $e->getCode());\n \n //error log file\n $this->_global->errorLogFile($e->getMessage());\n }\n }else{\n // cek apakah data non-aktif\n $sql = \"\n SELECT COUNT(*) \n FROM TM_ACTIVITY_COA\n WHERE ACTIVITY_GROUP = TRIM('\".addslashes($data[0]).\"')\n AND ACTIVITY_CODE = TRIM('\".addslashes($data[1]).\"')\n AND COST_ELEMENT = TRIM('\".addslashes($data[2]).\"')\n AND DELETE_USER IS NULL\n \";\n $count = $this->_db->fetchOne($sql);\n \n if ($count == 0) {\n // update data menjadi aktif jika sebelumnya telah dinon-aktifkan\n try {\n $sql = \"\n UPDATE TM_ACTIVITY_COA\n SET COA_CODE = TRIM('\".addslashes($data[3]).\"'),\n ACTIVITY_CODE_SAP = TRIM('\".addslashes($data[4]).\"'),\n UPDATE_USER = '{$this->_userName}',\n UPDATE_TIME = SYSDATE,\n DELETE_USER = NULL,\n DELETE_TIME = NULL\n WHERE ACTIVITY_GROUP = TRIM('\".addslashes($data[0]).\"')\n AND ACTIVITY_CODE = TRIM('\".addslashes($data[1]).\"')\n AND COST_ELEMENT = TRIM('\".addslashes($data[2]).\"')\n \";\n $this->_db->query($sql);\n $this->_db->commit();\n $update_rec++;\n \n //log DB\n $this->_global->insertLog('UPLOAD DATA SUCCESS', 'MAPPING AKTIVITAS - COA', '', '');\n } catch (Exception $e) {\n //menampilkan data yang tidak ditambahkan\n $data_error[] = $total_rec;\n \n //log DB\n $this->_global->insertLog('UPLOAD DATA FAILED', 'MAPPING AKTIVITAS - COA', '', $e->getCode());\n \n //error log file\n $this->_global->errorLogFile($e->getMessage());\n }\n }else{\n //menampilkan data yang tidak ditambahkan\n $data_error[] = $total_rec;\n }\n }\n }\n $total_rec++;\n } while ($data = fgetcsv($handle,1000,\",\",\"'\"));\n //\n $return = array(\n 'status' => 'done',\n 'total' => $total_rec - 2,\n 'inserted' => $ins_rec,\n 'updated' => $update_rec,\n 'data_failed' => $data_error\n ); \n }else{\n $return = array(\n 'status' => 'failed',\n 'total' => $total_rec - 2,\n 'inserted' => $ins_rec,\n 'updated' => $update_rec,\n 'data_failed' => $data_error\n );\n }\n \n return $return;\n }",
"public function putLog(string $packet, string $url): void\n {\n $fp = fopen($_SERVER['DOCUMENT_ROOT'].'/log/packets_1.x.dump', 'a+');\n fwrite($fp, $url.\"?p=\".$packet.\"\\n\");\n fclose($fp);\n }",
"function sendPersBaToFTP($ba,$srvip,$login,$passw,$filename,$destfilname)\n\t{\n\t\t//if(!file_exists($this->output_dir) || !is_writeable($this->output_dir))\n\t\t//\ttrigger_error (\"please create a 'temp' directory first with write access\", E_USER_ERROR);\n\n\t\t$data = $ba->data;\n\n\n\n\t\tfile_put_contents(\"./badges/\".$filename, $data);\n\n\t\t$ftp_server = $srvip;\n\t\t$ftp_user = $login;\n\t\t$ftp_passwd = $passw;\n\n\t\t$result = false;\n\t\trequire_once \"ftp.api.php\";\n\t\tif ( $ftp = ftp_connect($ftp_server) ) {\n\t\t\tif (ftp_login($ftp,$ftp_user,$ftp_passwd)) {\n\t\t\t\t//ftp_chdir($ftp,\"RH\");\n\t\t\t\tftp_chdir($ftp,\"ContratsFid\");\n\t\t\t\t//ftp_exec($ftp,\"cd RH\");\n\t\t\t\t//ftp_exec($ftp,\"cd ContratsFid\");\n\t\t\t\t$result = ftp_put($ftp,$destfilname,\"./badges/\".$filename,FTP_BINARY);\n\t\t\t}\n\t\t} else {\n\t\t\t$result = false;\n\t\t}\n\t\tftp_close($ftp);\n\n\t\treturn $result;\n\t}",
"public function upload_foto_file()\n\t{\n\t\tif (!$this->is_allowed('m_ads_add', false)) {\n\t\t\techo json_encode([\n\t\t\t\t'success' => false,\n\t\t\t\t'message' => cclang('sorry_you_do_not_have_permission_to_access')\n\t\t\t\t]);\n\t\t\texit;\n\t\t}\n\n\t\t$uuid = $this->input->post('qquuid');\n\n\t\techo $this->upload_file([\n\t\t\t'uuid' \t\t \t=> $uuid,\n\t\t\t'table_name' \t=> 'm_ads',\n\t\t]);\n\t}",
"function uploadObject();",
"function vip_contrib_add_upload_cap() {\n\tadd_action( 'init', '_vip_contrib_add_upload_cap');\n\tadd_action( 'xmlrpc_call', '_vip_contrib_add_upload_cap' ); // User is logged in after 'init' for XMLRPC\n}",
"function uploadAudioFile($objectType, $objectID){\r\n\t\t$fileOldNameKey = $objectType . \"AudioFile\";\r\n\t\t$fileOldName = basename($_FILES[$fileOldNameKey]['name']);\r\n\t\t$fileExt = substr(strrchr($fileOldName, '.'), 1);\r\n\t\t$fileNewPath = \"audio/\" . $objectType . \"s/\";\r\n\t\t$fileNewName = getNextAudioFileName($objectID, $objectType);\r\n\t\t$targetAudioPath = $fileNewPath . $fileNewName . \".\" . $fileExt;\r\n\t\r\n\t\tif(move_uploaded_file($_FILES[$fileOldNameKey]['tmp_name'], $targetAudioPath)) {\r\n\t\t\techo \"The file \". $fileOldName . \" has been uploaded.\";\r\n\t\t\t//Now we must update the audioFile table to reflect our new file\r\n\t\t\tinsertIntoTable(\"audioFile\", array(\"linguisticObjectID\" => $objectID, \"linguisticObjectTypeID\" => getLinguisticObjectTypeID($objectType), \"audioFileName\" => \"'\".$fileNewName.\"'\", \"audioFileFormatID\" => getAudioFileFormatID($fileExt), \"audioFilePath\" => \"'\".$fileNewPath.\"'\"));\r\n\t\t} \r\n\t\telse{\r\n\t\t\techo \"There was a non-fatal error uploading the audio.\";\r\n\t\t}\r\n}",
"function FileUpload(){\n $client = $this->getClientInfo();\n $this->previousFileDelete($client);\n $backupFiles = $this->getSqlBackupFiles();\n// $this->pr($backupFiles);die;\n if(!empty($backupFiles)){\n foreach($backupFiles as $backup){\n $info = $this->fileUploadInoGoogleDrive($client,$backup);\n print_r($info);\n print \"\\n\";\n }\n }\n die;\n }",
"function save_data()\n{\n\t$aql = new aql();\n\t$setok = $aql->set('basedir','/etc/asterisk');\n\t$hlock=lock_file(\"/etc/asterisk/manager.conf\");\n\t$manager_conf = $aql->query(\"select * from manager.conf\");\n\tunlock_file($hlock);\n\t\n\t$send_str = '';\n\tif (isset($manager_conf['send'])) {\n\t\t$send_str = \"[send]\\n\";\n\t\tif(isset($manager_conf['send']['secret'])) {\n\t\t\t$_val = $manager_conf['send']['secret'];\n\t\t\t$send_str .= \"secret=$_val\\n\";\n\t\t} \n\t\tif(isset($manager_conf['send']['read'])) {\n\t\t\t$_val = $manager_conf['send']['read'];\n\t\t\t$send_str .= \"read=$_val\\n\";\n\t\t} \n\t\tif(isset($manager_conf['send']['write'])) {\n\t\t\t$_val = $manager_conf['send']['write'];\n\t\t\t$send_str .= \"write=$_val\\n\";\n\t\t} \n\t} else {\n\t\t$send_str = '';\n\t}\n\t\n\t$event_str = '';\n\tif (isset($manager_conf['event'])) {\n\t\t$event_str = \"[event]\\n\";\n\t\tif(isset($manager_conf['event']['secret'])) {\n\t\t\t$_val = $manager_conf['event']['secret'];\n\t\t\t$event_str .= \"secret=$_val\\n\";\n\t\t} \n\t\tif(isset($manager_conf['event']['read'])) {\n\t\t\t$_val = $manager_conf['event']['read'];\n\t\t\t$event_str .= \"read=$_val\\n\";\n\t\t} \n\t\tif(isset($manager_conf['event']['write'])) {\n\t\t\t$_val = $manager_conf['event']['write'];\n\t\t\t$event_str .= \"event=$_val\\n\";\n\t\t} \n\t} else {\n\t\t$event_str = '';\n\t}\n\t\n\t\n\tif(!isset($_POST['enable_ami'])) {\n\t\t$aql = new aql();\n\t\t$setok = $aql->set('basedir','/etc/asterisk');\n\t\tif (!$setok) {\n\t\t\techo $aql->get_error();\n\t\t\treturn false;\n\t\t}\n\n\t\t$manager_conf_path='/etc/asterisk/manager.conf';\n\t\t$hlock = lock_file($manager_conf_path);\n\n\t\tif(!$aql->open_config_file($manager_conf_path)){\n\t\t\techo $aql->get_error();\n\t\t\tunlock_file($hlock);\n\t\t\treturn false;\n\t\t}\n\n\t\t$exist_array = $aql->query(\"select * from manager.conf where section='general'\");\n\n\t\tif(!isset($exist_array['general'])) {\n\t\t\t$aql->assign_addsection('general','');\n\t\t}\n\n\t\tif(isset($exist_array['general']['enabled'])) {\n\t\t\t$aql->assign_editkey('general','enabled','no');\n\t\t} else {\n\t\t\t$aql->assign_append('general','enabled','no');\n\t\t} \n\n\t\tif (!$aql->save_config_file('manager.conf')) {\n\t\t\techo $aql->get_error();\n\t\t\tunlock_file($hlock);\n\t\t\treturn false;\n\t\t}\n\t\tunlock_file($hlock);\n\t\treturn true;\n\t}\n\n\t$write_str = \"[general]\\n\";\n\t$write_str .= \"bindaddr=0.0.0.0\\n\";\n\t$write_str .= \"enabled=yes\\n\";\n\t\n\tif(isset($_POST['port']) && $_POST['port'] != '') {\n\t\t$_port = trim($_POST['port']);\n\t\t$write_str .= \"port=$_port\\n\";\n\t}\n\n\tif(isset($_POST['name']) && $_POST['name'] != '') {\n\t\t$_name = trim($_POST['name']);\n\t\t$write_str .= \"[$_name]\\n\";\n\n\t\tif(isset($_POST['secret']) && $_POST['secret'] != '') {\n\t\t\t$_secret = trim($_POST['secret']);\n\t\t\t$write_str .= \"secret=$_secret\\n\";\n\t\t}\n\n\t\tif(isset($_POST['deny']) && $_POST['deny'] != '') {\n\t\t\t$tmp = trim($_POST['deny']);\n\t\t\t$tmps = explode('&',$tmp);\n\t\t\tif($tmps) {\n\t\t\t\tforeach($tmps as $each) {\n\t\t\t\t\t$_deny = trim($each);\n\t\t\t\t\t$write_str .= \"deny=$_deny\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif(isset($_POST['permit']) && $_POST['permit'] != '') {\n\t\t\t$tmp = trim($_POST['permit']);\n\t\t\t$tmps = explode('&',$tmp);\n\t\t\tif($tmps) {\n\t\t\t\tforeach($tmps as $each) {\n\t\t\t\t\t$_permit = trim($each);\n\t\t\t\t\t$write_str .= \"permit=$_permit\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$_read = '';\n\t\tif(isset($_POST['system_r'])) {\n\t\t\t$_read .= 'system,';\n\t\t}\n\t\tif(isset($_POST['call_r'])) {\n\t\t\t$_read .= 'call,';\n\t\t}\n\t\tif(isset($_POST['log_r'])) {\n\t\t\t$_read .= 'log,';\n\t\t}\n\t\tif(isset($_POST['verbose_r'])) {\n\t\t\t$_read .= 'verbose,';\n\t\t}\n\t\tif(isset($_POST['agent_r'])) {\n\t\t\t$_read .= 'agent,';\n\t\t}\n\t\tif(isset($_POST['user_r'])) {\n\t\t\t$_read .= 'user,';\n\t\t}\n\t\tif(isset($_POST['config_r'])) {\n\t\t\t$_read .= 'config,';\n\t\t}\n\t\tif(isset($_POST['dtmf_r'])) {\n\t\t\t$_read .= 'dtmf,';\n\t\t}\n\t\tif(isset($_POST['reporting_r'])) {\n\t\t\t$_read .= 'reporting,';\n\t\t}\n\t\tif(isset($_POST['cdr_r'])) {\n\t\t\t$_read .= 'cdr,';\n\t\t}\n\t\tif(isset($_POST['dialplan_r'])) {\n\t\t\t$_read .= 'dialplan,';\n\t\t}\n\t\t$_read = rtrim($_read,',');\n\t\t$write_str .= \"read=$_read\\n\";\n\n\t\t$_write = '';\n\t\tif(isset($_POST['system_w'])) {\n\t\t\t$_write .= 'system,';\n\t\t}\n\t\tif(isset($_POST['call_w'])) {\n\t\t\t$_write .= 'call,';\n\t\t}\n\t\tif(isset($_POST['log_w'])) {\n\t\t\t$_write .= 'log,';\n\t\t}\n\t\tif(isset($_POST['verbose_w'])) {\n\t\t\t$_write .= 'verbose,';\n\t\t}\n\t\tif(isset($_POST['command_w'])) {\n\t\t\t$_write .= 'command,';\n\t\t}\n\t\tif(isset($_POST['agent_w'])) {\n\t\t\t$_write .= 'agent,';\n\t\t}\n\t\tif(isset($_POST['user_w'])) {\n\t\t\t$_write .= 'user,';\n\t\t}\n\t\tif(isset($_POST['config_w'])) {\n\t\t\t$_write .= 'config,';\n\t\t}\n\t\tif(isset($_POST['reporting_w'])) {\n\t\t\t$_write .= 'reporting,';\n\t\t}\n\t\tif(isset($_POST['originate_w'])) {\n\t\t\t$_write .= 'originate,';\n\t\t}\n\t\t$_write = rtrim($_write,',');\n\t\t$write_str .= \"write=$_write\\n\";\n\t\t\n\t\tif ($_name == 'send') {\n\t\t\t$write_str .= $event_str;\n\t\t} else if ($_name == 'event') {\n\t\t\t$write_str .= $send_str;\n\t\t} else {\n\t\t\t$write_str .= $send_str;\n\t\t\t$write_str .= $event_str;\n\t\t}\n\t}\n\n\t$file_path=\"/etc/asterisk/manager.conf\";\n\t$hlock=lock_file($file_path);\n\t$fh = fopen($file_path,\"w\");\n\tfwrite($fh,$write_str);\n\tfclose($fh);\n\tunlock_file($hlock);\n\n\treturn true;\n}",
"function sendFile($username,$password,$mahoso,$content,$fileName,$fileSize,$mime,$id_part,$part_number){\r\n\tif(checkAuthentication($username, $password)){\r\n\t\t$send_date = date(\"Y-m-d h:m:s\");\r\n\t\t$sql = sprintf(\"\r\n\t\t\t\tinsert into adapter_files\r\n\t\t\t\t(`ID_PART`,`PART_NUMBER`,`MAHOSO`,`CONTENT`,`IS_GET`,`NAME`,`MIME`,`SIZE`,`SEND_DATE` )\r\n\t\t\t\tvalues(\r\n\t\t\t\t\t'%s','%s','%s','%s','%s','%s','%s','%s','%s'\r\n\t\t\t\t)\r\n\t\t\t\t\",$id_part,$part_number,$mahoso,$content,0,$fileName,$mime,$fileSize,$send_date);\t\t\r\n\t\t$result = query($sql);\r\n\t }else{\r\n\t\t return -1;\r\n\t }\r\n\treturn $result;\r\n}",
"function opensky_upload_form_submit (array $form, array &$form_state) {\n extract($form_state['values']);\n\n $object = islandora_object_load($pid);\n\n try {\n $datastream = $object->constructDatastream($dsid, 'M');\n $datastream->label = 'PDF Datastream';\n $datastream->mimetype = 'application/pdf';\n $file = file_load($file);\n $path = drupal_realpath($file->uri);\n $datastream->setContentFromFile($path);\n\n $object->ingestDatastream($datastream);\n\n opensky_add_usage_and_version_elements_to_mods($object, $usage, $version);\n }\n catch (Exception $e) {\n drupal_set_message(t('@message', array('@message' => check_plain($e->getMessage()))), 'error');\n }\n}",
"public function upload_file() {\n $csv = $this->create_csv();\n\n if(!empty($csv)) {\n\n // upload to sharefile\n $this->token = $this->get_token();\n\n if($this->token) {\n $uri = \"https://\".$this->get_hostname().\"/sf/v3/Items(\".self::RECEIVED_PATIENT_FORMS_FOLDER_ID.\")/Upload\";\n //echo \"GET \".$uri.\"\\n\";\n\n $headers = $this->get_authorization_header();\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $uri);\n curl_setopt($ch, CURLOPT_TIMEOUT, 300);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($ch, CURLOPT_VERBOSE, FALSE);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);\n curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\n\n $curl_response = curl_exec($ch);\n\n $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);\n $curl_error_number = curl_errno($ch);\n $curl_error = curl_error($ch);\n\n $upload_config = json_decode($curl_response);\n\n if ($http_code == 200) {\n $post[\"File1\"] = new CurlFile($this->local_path, 'application/csv', $this->filename);\n curl_setopt ($ch, CURLOPT_URL, $upload_config->ChunkUri);\n curl_setopt ($ch, CURLOPT_POST, true);\n curl_setopt ($ch, CURLOPT_POSTFIELDS, $post);\n curl_setopt ($ch, CURLOPT_VERBOSE, FALSE);\n curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt ($ch, CURLOPT_HEADER, true);\n\n $upload_response = curl_exec($ch);\n\n //echo \"<br /><br />\";\n //echo $upload_response.\"\\n\";\n\n curl_close($ch);\n\n header('Content-Type: application/json');\n echo json_encode(array(\"status\" => \"success\"));\n die();\n }\n\n }\n } else {\n echo json_encode(array(\"status\" => \"error\", \"error\" => \"CSV not created\"));\n die();\n }\n }",
"public function upload(RegistryInterface $doctrine)\n { }"
]
| [
"0.54448223",
"0.51093704",
"0.49343204",
"0.49199435",
"0.4919543",
"0.49038985",
"0.486561",
"0.48430768",
"0.48278263",
"0.48191503",
"0.47874105",
"0.47441608",
"0.47209477",
"0.4709584",
"0.46809527",
"0.46754858",
"0.46607867",
"0.4639305",
"0.46309805",
"0.4611218",
"0.46057168",
"0.46055293",
"0.46004227",
"0.45980504",
"0.4597216",
"0.45890757",
"0.45834628",
"0.4560352",
"0.45325306",
"0.45195"
]
| 0.57114 | 0 |
Returns a list of metapackage builders. | protected function builders() {
return [
DrupalCoreRecommendedBuilder::class,
DrupalDevDependenciesBuilder::class,
DrupalPinnedDevDependenciesBuilder::class,
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getBuilders(): array\n {\n return [\n new RenameTemplates($this),\n new UpdateComposerJson($this),\n new UpdateReadme($this),\n new UpdateLicense($this),\n new UpdateSourceFileHeaders($this),\n new UpdateNamespace($this),\n new RenameTestCase($this),\n new UpdateCodeOfConduct($this),\n new UpdateChangelog($this),\n new UpdateContributing($this),\n new UpdateFunding($this),\n new UpdateCommandPrefix($this),\n new InstallDependencies($this),\n new Cleanup($this),\n new SetupRepository($this),\n new RunTests($this),\n ];\n }",
"function getWidgets() {\n \t$returnArray = array();\n \tforeach($this->_widgetRegistry as $name => $item) {\n \t\t$returnArray[] = array('name' => $name, 'description' => $item['description']);\n \t}\n \treturn $returnArray;\n }",
"public function getAdditionalBuilders()\n {\n $additionalBuilders = [];\n foreach ($this->behaviors as $behavior) {\n $additionalBuilders = array_merge($additionalBuilders, $behavior->getAdditionalBuilders());\n }\n\n return $additionalBuilders;\n }",
"public function getQueryBuilders() {\n\t\treturn $this->queryBuilders;\n\t}",
"public function getBuilderFactory()\n {\n return $this->builderFactory;\n }",
"public function getWidgets(){\n $return = [];\n foreach ($this->widgets as $key => $value) {\n $namespance = str_replace([base_path(\"modules\"),base_path(\"contents/templates\"),'.php','/'], ['Modules','Themes','','\\\\'], $value);\n $namespance = str_replace('Themes\\default', 'Themes\\_default', $namespance);\n if(class_exists($namespance) && method_exists($namespance, \"register\")){\n $paths = str_replace(base_path().'/','',$value);\n $ado = [];\n $ado = with(new $namespance)->register();\n $ado[\"paths\"] = $paths;\n $return[$namespance] = $ado;\n }\n }\n return $return;\n }",
"public function getBuiltItems() {\n return $this->objects;\n }",
"public function buildCommands() : Collection\n {\n return collect((array) $this->get('build_commands', []));\n }",
"protected function packageCommands()\n {\n return [\n NovaMakeCommand::class,\n ReadmeMakeCommand::class,\n TravisMakeCommand::class,\n LicenseMakeCommand::class,\n PhpunitMakeCommand::class,\n StyleciMakeCommand::class,\n CodecovMakeCommand::class,\n ComposerMakeCommand::class,\n BaseTestMakeCommand::class,\n GitignoreMakeCommand::class,\n ContributionMakeCommand::class,\n ];\n }",
"public function getAll()\n {\n return $this->database->getAll('Extension', 'slicerpackages');\n }",
"public function build() {\n return array();\n }",
"public function get_generators() {\n return $this->get_items_by_type(static::$POWER);\n }",
"function pkg_build_repo_list() {\n\t$repos = pkg_list_repos();\n\t$list = array();\n\n\tforeach ($repos as $repo) {\n\t\t$list[$repo['name']] = $repo['descr'];\n\t}\n\n\treturn($list);\n}",
"function all_awm_meta_libraries()\n {\n $metaBoxes = $options = array();\n $metas = new AWM_Meta();\n $metaBoxes['metas'] = $metas->meta_boxes();\n $metaBoxes['term'] = $metas->term_meta_boxes();\n $metaBoxes['options'] = $metas->options_boxes();\n $metaBoxes['user'] = $metas->user_boxes();\n if (!empty($metaBoxes)) {\n foreach ($metaBoxes as $key => $data) {\n $afterfix = __('Post type metabox', 'extend-wp');\n switch ($key) {\n case 'user':\n $afterfix = __('User metabox', 'extend-wp');\n break;\n case 'term':\n $afterfix = __('Taxonomy metabox', 'extend-wp');\n break;\n case 'options':\n $afterfix = __('Option metabox', 'extend-wp');\n break;\n }\n foreach ($data as $meta_key => $meta_data) {\n $name = $meta_data['title'] . ' - ' . $afterfix;;\n $options[$meta_key] = array('label' => $name);\n }\n }\n }\n return $options;\n }",
"public function getBrands()\n {\n return $this->brands;\n }",
"public static function get_all_widgets() {\r\n\t\t$ret = array(\r\n\t\t\tself::WIDGET_ACCORDION,\r\n\t\t\tself::WIDGET_DATEPICKER,\r\n\t\t\tself::WIDGET_DIALOG,\r\n\t\t\tself::WIDGET_PROGRESSBAR,\r\n\t\t\tself::WIDGET_SLIDER,\r\n\t\t\tself::WIDGET_TABS,\r\n\t\t\tself::WIDGET_AUTOCOMPLETE\r\n\t\t);\r\n\t\tif (self::is_version_1_8_or_higher()) {\r\n\t\t\t$ret[] = self::WIDGET_BUTTON; \r\n\t\t}\r\n\t\treturn $ret;\r\n\t}",
"protected function getAvailableWidgetList() {\n\t\t$widgets = (array)$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['geckoboard']['widgets'];\n\n\t\t$availableWidgets = array();\n\t\tforeach ($widgets as $widget) {\n\t\t\t//todo: check if there are extension dependencies for the widget\n\t\t\t$availableWidgets[$widget] = $this->language->sL(\n\t\t\t\t'LLL:EXT:geckoboard/Resources/Private/Language/locallang_be.xml:label.' . $widget\n\t\t\t);\n\n\t\t\tif ($availableWidgets[$widget] == '') {\n\t\t\t\t$availableWidgets[$widget] = $widget;\n\t\t\t}\n\t\t}\n\n\t\treturn $availableWidgets;\n\t}",
"public function getBilder()\n {\n if (null == $this->bilder_collection) {\n $this->bilder_collection = new BilderSamling($this->getId());\n }\n\n return $this->bilder_collection;\n }",
"public function provides()\n {\n return ['OlCmsGallery', GalleryCmsBuilder::class];\n }",
"public static function getSchemaBuilder(): array\n\t{\n\t\treturn [\n\t\t\t\"select\" => [\n\t\t\t\t\"id\", \"event_id\", \"handler_id\", \"priority\"\n\t\t\t]\n\t\t];\n\t}",
"public function provides()\n {\n return [\n HtmlBuilder::class,\n FormBuilder::class,\n AccessHandler::class,\n FieldBuilder::class,\n Alert::class,\n AlertMiddleware::class,\n Menu::class,\n 'html',\n 'form',\n 'field',\n 'alert',\n 'menu'\n ];\n }",
"protected function getCommands()\n {\n\t$commands[] = new DeployCommand();\n\t$commands[] = new RollbackCommand();\n\t$commands[] = new UpdateCommand();\n\t$commands[] = new DiffCommand();\n\t$commands[] = new CleanupCommand();\n\t$commands[] = new CheckCommand();\n\t$commands[] = new JsonCommand();\n\t$commands[] = new SetupCommand();\n\t$commands[] = new InstallCommand();\n\n\treturn $commands;\n }",
"public abstract function getSchemaHelperListToGenerate();",
"public function getDafaultsWidgets()\r\n {\r\n\r\n $widgets = array();\r\n\r\n return $widgets;\r\n }",
"public function getNodeBuilderFactory()\n {\n return $this->nodeBuilderFactory;\n }",
"public static function get_all() {\n global $CFG;\n // Get directory listing (excluding simpletest, CVS, etc)\n $list = core_component::get_plugin_list('forumngtype');\n\n $results = array();\n foreach ($list as $name => $location) {\n $results[] = self::get_new(str_replace('forumngtype_', '', $name));\n }\n return $results;\n }",
"public function list()\n\t{\n\t\treturn $this->widgets()->orderBy('order')->get();\n\t}",
"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 }",
"static function get_all_available_modules()\n {\n $result = array();\n\n $categories = self::get_all_available_categories();\n\n foreach ($categories as $nome_categoria)\n {\n $names = self::get_all_available_by_category($nome_categoria);\n\n if (is_array($names))\n foreach ($names as $nome_modulo)\n {\n $def = self::get_available_module_definition($nome_categoria,$nome_modulo);\n \n $mod = array();\n $mod[\"show\"] = $def->get_show();\n $mod[\"nome_categoria\"] = $nome_categoria;\n $mod[\"nome_modulo\"] = $nome_modulo;\n $version = $def->get_current_version();\n $mod[\"properties\"] = $version;\n $result[] = $mod;\n \n }\n else echo \"Errore per la categoria : \".$nome_categoria;\n\n }\n\n return $result;\n }",
"protected function getBuilderAppends($builder)\n {\n return [];\n }"
]
| [
"0.7342777",
"0.6367912",
"0.6258459",
"0.6235427",
"0.59164274",
"0.5881666",
"0.567643",
"0.55630773",
"0.54474694",
"0.5403255",
"0.53939813",
"0.5371173",
"0.5348861",
"0.5344161",
"0.53269035",
"0.5319923",
"0.52891004",
"0.5282986",
"0.52802706",
"0.5278117",
"0.5275179",
"0.5273944",
"0.52702457",
"0.52699804",
"0.52633834",
"0.5234413",
"0.5234014",
"0.5227134",
"0.5224416",
"0.5221679"
]
| 0.7386035 | 0 |
Returns the domain of the given $id page. | public function getDomainOfPage($id)
{
$id2 = null;
$page2Domain = $this->getKrynCore()->getDistributedCache('core/node/toDomains');
if (!is_array($page2Domain)) {
$page2Domain = $this->updatePage2DomainCache();
}
$id = ',' . $id . ',';
foreach ($page2Domain as $domain_id => &$pages) {
$pages = ',' . $pages . ',';
if (strpos($pages, $id) !== false) {
$id2 = $domain_id;
}
}
return $id2;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDomain($id)\n {\n return $this->_execute('/domain/' . $id . '/', self::METHOD_GET);\n }",
"public static function page_url_get($id) {\n\n\t\t\t\t// $k = 0;\n\t\t\t\t// $pageUrl = '/';\n\t\t\t\t//\n\t\t\t\t// do {\n\t\t\t\t//\n\t\t\t\t// \t$sql = 'SELECT\n\t\t\t\t// \t\t\t\tparent_id,\n\t\t\t\t// \t\t\t\tref\n\t\t\t\t// \t\t\tFROM\n\t\t\t\t// \t\t\t\t' . DB_T_PREFIX . 'page\n\t\t\t\t// \t\t\tWHERE\n\t\t\t\t// \t\t\t\tid = ? AND\n\t\t\t\t// \t\t\t\tdeleted = \"0000-00-00 00:00:00\"';\n\t\t\t\t//\n\t\t\t\t// \t$parameters = [];\n\t\t\t\t// \t$parameters[] = intval($pageId);\n\t\t\t\t//\n\t\t\t\t// \tif ($row = $db->fetch_row($sql, $parameters)) {\n\t\t\t\t// \t\t$pageId = $row['parent_id'];\n\t\t\t\t// \t\t$pageUrl = '/' . $row['ref'] . $pageUrl;\n\t\t\t\t// \t} else {\n\t\t\t\t// \t\treturn NULL;\n\t\t\t\t// \t}\n\t\t\t\t//\n\t\t\t\t// } while ($pageId > 0 && $k++ < 10);\n\t\t\t\t//\n\t\t\t\t// if ($pageUrl == '/home/') {\n\t\t\t\t// \treturn '/';\n\t\t\t\t// } else {\n\t\t\t\t// \treturn $pageUrl;\n\t\t\t\t// }\n\n\t\t\t}",
"function GetPageAliasFromID( $id )\n\t{\n\t\tglobal $gCms;\n\t\t$db = &$gCms->GetDb();\n\n\t\tif (!is_numeric($id) && strpos($id,'.') == TRUE && strpos($id,',') == TRUE)\n\t\t{\n\t\t\treturn $id;\n\t\t}\n\n\t\t$params = array($id);\n\t\t$query = \"SELECT content_alias FROM \".cms_db_prefix().\"content WHERE content_id = ?\";\n\t\t$row = $db->GetRow($query, $params);\n\n\t\tif ( !$row )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\treturn $row['content_alias'];\n\t}",
"public static function find($id) {\r\n\t\treturn Doctrine::getTable ( 'DomainsTlds' )->find ( $id );\r\n\t}",
"public static function getDomainById($domain_id)\n {\n // Must use \\pm_Domain to avoid loops\n $domains = \\pm_Domain::getAllDomains();\n\n foreach ($domains as $domain) {\n if ($domain->getId() == $domain_id) {\n return $domain;\n }\n }\n\n return null;\n }",
"public function get_domain_name( $app_id ) {\n\t\treturn get_post_meta( $app_id, 'wpapp_domain', true );\n\t}",
"public function _getById($id)\n {\n $resultDb = $this->database->table('page')->get($id);\n return $this->getPage($resultDb);\n }",
"public function getDomain()\n {\n if (!$this->_domain) {\n try {\n $this->_domain = \\Ca\\Db\\DomainMap::create()->find($this->getDomainId());\n } catch (\\Exception $e) {}\n }\n return $this->_domain;\n }",
"public function getPage($id);",
"public function get_assigned_dns_domain($p_obj_id = null, $p_id = null)\n {\n if (empty($p_obj_id) && empty($p_id))\n {\n return false;\n } // if\n $l_condition = '';\n\n $l_sql = 'SELECT dnstable.isys_net_dns_domain__id, dnstable.isys_net_dns_domain__title\n\t\t\tFROM isys_cats_net_list_2_isys_net_dns_domain AS main\n\t\t\tINNER JOIN isys_net_dns_domain dnstable ON main.isys_net_dns_domain__id = dnstable.isys_net_dns_domain__id';\n\n if ($p_obj_id > 0)\n {\n $l_condition = ' WHERE main.isys_cats_net_list__id = (SELECT isys_cats_net_list__id FROM isys_cats_net_list WHERE isys_cats_net_list__isys_obj__id = ' . $this->convert_sql_id(\n $p_obj_id\n ) . ')';\n } // if\n\n if ($p_id > 0)\n {\n $l_condition = ' WHERE main.isys_cats_net_list__id = ' . $this->convert_sql_id($p_id);\n } // if\n\n return $this->retrieve($l_sql . $l_condition . ';');\n }",
"function getPageURL($id) {\n $this->db->select(\"pageURL\");\n $this->db->where(\"pageID\", $id);\n $query = $this->db->get('page_attributes');\n if ($query->num_rows() > 0) {\n foreach ($query->result() as $rows) {\n $pageURL = $rows->pageURL;\n return $pageURL;\n }\n }\n }",
"function getParentDomainID($domain_id, $level = 'clone') {\n\tglobal $__FM_CONFIG;\n\t\n\t/** Clone */\n\t$parent_id = getNameFromID($domain_id, 'fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'domains', 'domain_', 'domain_id', 'domain_clone_domain_id');\n\t$domain_id = ($parent_id) ? $parent_id : $domain_id;\n\tif ($level == 'clone') {\n\t\treturn $domain_id;\n\t}\n\t\n\t/** Template */\n\tif ($level == 'template') {\n\t\t$parent_id = getNameFromID($domain_id, 'fm_' . $__FM_CONFIG['fmDNS']['prefix'] . 'domains', 'domain_', 'domain_id', 'domain_template_id');\n\n\t\treturn ($parent_id) ? $parent_id : $domain_id;\n\t}\n}",
"function getDomainNameByLocId($locId)\n\t{\n\t\tglobal $db;\n\t\t$domainName \t= \"\";\n\t\t$sqlGetDomain\t= \"SELECT * FROM seo_websites WHERE find_in_set('\".$locId.\"',locations) <> 0\";\n\t\t$resDomain\t= mysql_query($sqlGetDomain,$db);\n\t\tif(mysql_num_rows($resDomain)>=1)\n\t\t{\n\t\t\t$domainRow \t= mysql_fetch_array($resDomain);\n\t\t\t$domainName \t= $domainRow['domain'];\n\t\t}\n\t\treturn $domainName;\n\t}",
"private function pageUrl($page_id) {\n\t\t$url = \"pages/\";\n\t\tif (is_string($page_id) && $page_id !== 'home') {\n\t\t\t$url .= '=';\n\t\t}\n\t\t$url .= $page_id;\n\t\treturn $url;\n\t}",
"public static function getDomainNameByID($domain_id)\n {\n $domain = \\Phlesk::getDomainById($domain_id);\n return $domain->getName();\n }",
"private function getDomainFromConfig($config) {\n\t\tif ( empty($config->domain) ) {\n\t\t\tthrow new Exception\\Plugin\\PluginBadConfigurationException(\"A valid domain must be specified in the plugin configuration.\");\n\t\t}\n\n\t\t// Validate the domain\n\t\treturn $this->validateAndUpdateDomain($config->domain);\n\t}",
"function domain_user($id){\n\t\tglobal $bdd;\n\n\t\t$req = $bdd->prepare(\"SELECT `nom_domain` FROM `relais_mail` WHERE `utilisateur_id_utilisateur` = :id\");\n\t\t$req->execute(array('id'=>$id));\n\n\t\t$result = $req->fetchAll();\n\n\t\t$req->closeCursor();\n\t\treturn $result;\n\t}",
"function fetchPageDetails($id) {\n\t$db = DB::getInstance();\n\t$query = $db->query(\"SELECT id, page, private FROM pages WHERE id = ?\",array($id));\n\t$row = $query->first();\n\treturn $row;\n}",
"function pagename($id)\n{\n\t$pagename=mysql_fetch_array(mysql_query(\"select page_name from manage_pagename where pn_id='$id'\"));\n\treturn $pagename['page_name'];\n\t}",
"public function getDomain()\n {\n if(!($domainId = $this->getData('domainId'))) {\n return null;\n }\n \n return Core_Model_DiFactory::getDomainManager()->getDomain($domainId);\n }",
"protected function getDomain($url){\n // return static::DOMAIN;\n return parse_url($url, PHP_URL_HOST);\n }",
"public function getPage($id){\n\t\ttry {\n\t\t\t$sql = \"SELECT * FROM page WHERE id = :id LIMIT 1\";\n\t\t\t$stmt = $this->_db->prepare($sql);\n\t\t\t$stmt->execute(array( 'id' => $id));\n\t\t\tif($stmt->errorCode() != 0){\n\t\t\t\t$error = $stmt->errorInfo();\n\t\t\t\tthrow new SQLException($error[2], $error[0], $sql, \"Impossible d'obtenir une Page specifiee\");\n\t\t\t}\n\t\t\t$data = $stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\tif($data == null){\n\t\t\t\tthrow new NullObjectException();\n\t\t\t}\n\t\t\t$page = new Page($data);\n\t\t\treturn $page;\n\t\t}catch(PDOException $e){\n\t\t\tthrow new DatabaseException($e->getCode(), $e->getMessage(), \"Impossible d'obtenir une Page specifiee\");\n\t\t}\n\t}",
"public function get_page_by_id($id)\n {\n $this->db->where('id',$id);\n // $this->db->join('subjects','subjects.id = pages.subject_id');\n $query = $this->db->get('pages');\n return $query->row();\n }",
"public function get(string $id, string $domain = 'messages'): string;",
"public function get(string $id, string $domain = 'messages'): string;",
"private function getNavigationUrl(int $id): string\n {\n $url = (array) Model::getContainer()->get('database')->getRecord(\n 'SELECT id, url FROM backend_navigation WHERE id = ?',\n [$id]\n );\n\n if (empty($url)) {\n return '';\n }\n\n if (!empty($url['url'])) {\n return $url['url'];\n }\n\n // get the first child as fallback\n $childId = (int) Model::getContainer()->get('database')->getVar(\n 'SELECT id FROM backend_navigation WHERE parent_id = ? ORDER BY sequence ASC LIMIT 1',\n [$id]\n );\n\n return $this->getNavigationUrl($childId);\n }",
"function getDomain()\n {\n }",
"public static function loadFromDomainHookID($db, $domain, $id) {\n\t\t$result = static::find($db, ['domain_id' => $domain, 'id' => $id]);\n\t\tif ($result) {\n\t\t\treturn $result[0];\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}",
"public function get_domain()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $this->_load_config();\n\n $domain = (empty($this->config['domain'])) ? '' : $this->config['domain'];\n\n if (empty($domain))\n $domain = $this->convert_domain();\n\n return $domain;\n }",
"function getDomainName($domain = 0)\n{\n\tif($domain == 0)\n\t\t$domain = ARC_DOMAIN;\n\n\t$name = getDBData('domain_name', $domain, 'domain_id', 'domain');\n\n\tif($name == '')\n\t\treturn '-None-';\n\telse\n\t\treturn $name;\n}"
]
| [
"0.7330781",
"0.63465875",
"0.6221067",
"0.61054367",
"0.60852045",
"0.60632056",
"0.6008932",
"0.59432274",
"0.59182954",
"0.5834149",
"0.5773145",
"0.5756665",
"0.5752635",
"0.5682991",
"0.56569815",
"0.56490856",
"0.5632301",
"0.5628314",
"0.56141984",
"0.5611769",
"0.55442315",
"0.554283",
"0.5523643",
"0.55000967",
"0.55000967",
"0.5465546",
"0.5458377",
"0.5454943",
"0.5444206",
"0.54075706"
]
| 0.83298194 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.