query
stringlengths
9
43.3k
document
stringlengths
17
1.17M
metadata
dict
negatives
sequencelengths
0
30
negative_scores
sequencelengths
0
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
Returns whether $code appears in the OrigCurrency element of the XML.
public function isOriginalCurrency($code) { return $this->getOriginalCurrency() === strtoupper($code); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isInISO($code) {\n $xml = simplexml_load_file('http://www.currency-iso.org/dam/downloads/lists/list_one.xml');\n $result = $xml -> xpath(\"//CcyNtry[Ccy='{$code}']\");\n if($result != null) {\n return true;\n } else {\n return false;\n }\n }", "public function has($code) {\n\t\treturn array_key_exists(strtoupper($code), $this->currencies);\n\t}", "private function findElByCode($code) {\n\t $result = false;\n\n\t foreach ($this->currencies as $el) {\n\t\t if ((string) $el->code === strtoupper($code)) {\n\t\t\t $result = $el;\n\t\t }\n\t }\n\n return $result;\n }", "function tep_currency_exists($code) {\n $code = tep_db_prepare_input($code);\n\n $currency_code = tep_db_query(\"select currencies_id from \" . TABLE_CURRENCIES . \" where code = '\" . tep_db_input($code) . \"'\");\n if (tep_db_num_rows($currency_code)) {\n return $code;\n } else {\n return false;\n }\n }", "public static function isValidCode($code): bool\n {\n if (array_key_exists($code, self::getInfoForCurrencies())) {\n return true;\n }\n\n if (array_key_exists($code, self::getInfoForCurrenciesWithoutCurrencyCode())) {\n return true;\n }\n\n if (array_key_exists($code, self::getInfoForCurrenciesWithUnofficialCode())) {\n return true;\n }\n\n if (array_key_exists($code, self::getInfoForCurrenciesWithHistoricalCode())) {\n return true;\n }\n\n if (array_key_exists($code, self::getInfoForCurrenciesIncomplete())) {\n return true;\n }\n\n return false;\n }", "public function checkCountryCode($code)\n {\n $allCountries = Mage::getModel('adminhtml/system_config_source_country')->toOptionArray(true);\n $code = $this->prepareCode($code);\n\n $isValid = false;\n foreach ($allCountries as $country) {\n if ($country['value'] == $code) {\n $isValid = true;\n break;\n }\n }\n\n return $isValid;\n }", "public function checkCountryCode($code)\n {\n $allCountries = Mage::getModel('adminhtml/system_config_source_country')->toOptionArray(true);\n $code = $this->prepareCode($code);\n\n $isValid = false;\n foreach ($allCountries as $country) {\n if ($country['value'] == $code) {\n $isValid = true;\n break;\n }\n }\n\n return $isValid;\n }", "static function codeExists($code)\n {\n global $objDatabase;\n\n $query = \"\n SELECT 1\n FROM `\".DBPREFIX.\"module_shop\".MODULE_INDEX.\"_discount_coupon`\n WHERE `code`='\".addslashes($code).\"'\";\n $objResult = $objDatabase->Execute($query);\n // Failure or none found\n if (!$objResult) {\n // Failure! Assume that the code exists.\n return true;\n }\n if ($objResult->EOF) {\n return false;\n }\n return true;\n }", "function has_discount( $code ) {\n\t\t\tif (in_array($code, $this->applied_coupons)) return true;\n\t\t\treturn false;\n\t\t}", "static function get_country($code) {\n $countries = self::get_countries();\n foreach($countries as $c) {\n if($c->code == $code || $c->code2l == $code) {\n return $c;\n }\n }\n return FALSE;\n }", "public function getNamespaceFromSource($code)\n {\n if (preg_match('/namespace\\s*([^;]+);/', $code, $m)==1) {\n return trim($m[1]);\n }\n\n return false;\n }", "public function isSetCurrencyCode()\n {\n return !is_null($this->_fields['CurrencyCode']['FieldValue']);\n }", "public function isSetCurrencyCode()\n {\n return !is_null($this->_fields['CurrencyCode']['FieldValue']);\n }", "public function getCurrencyIdByCode($code) {\n $this->sError = FALSE;\n\n if ($this->_currencyCode2Id === FALSE) {\n $this->_loadCurrencyCodes();\n }\n\n if (!isset($this->_currencyCode2Id[$code])) {\n $this->sError = 'Incorect currency code: ' . $code;\n return FALSE;\n }\n\n return $this->_currencyCode2Id[$code];\n }", "public static function isCertificateCode($code)\n\t{\n\t\treturn preg_match('#^[A-Z0-9]{3}\\-[A-Z0-9]{3}\\-[A-Z0-9]{3}\\-[A-Z0-9]{3}$#', $code) && gzte11(ISC_LARGEPRINT);\n\t}", "public static function isValid( $code )\n {\n return in_array(\n strtoupper( $code ),\n [\n self::AFRICA,\n self::ASIA,\n self::EUROPE,\n self::NORTH_AMERICA,\n self::OCEANIA,\n self::SOUTH_AMERICA,\n self::ANTARCTICA,\n ]\n );\n }", "public function codeExists($code) {\n $res = $this->createQuery(\"c\")\n ->select(\"c.*\")\n ->where(\"c.code_num = ?\", array($code))\n ->limit(1)\n ->execute(array(), Doctrine_Core::HYDRATE_SCALAR);\n\n return (bool) $res;\n }", "protected function getCountryByCode(string $code)\n {\n global $db;\n require_once DOL_DOCUMENT_ROOT.'/core/class/ccountry.class.php';\n $pays = new \\Ccountry($db);\n if ($pays->fetch(0, $code) > 0) {\n return $pays->id;\n }\n\n return false;\n }", "public function hasCodeType(){\n return $this->_has(3);\n }", "function CheckIfCurrencyExists($currency_code) {\n $query = \"SELECT * FROM conversion_rates WHERE currency='$currency_code';\";\n $result = mysqli_num_rows($GLOBALS['conn']->query($query));\n\n return ($result != 0) ? true : false;\n }", "public function couponExists($code)\n\t{\n\t\t$sql = \"SELECT cnId FROM `#__storefront_coupons` WHERE `cnCode` = \" . $this->_db->quote($code);\n\n\t\t$this->_db->setQuery($sql);\n\t\t$cnId = $this->_db->loadResult();\n\n\t\treturn $cnId;\n\t}", "private function code_exists($code) {\n\t\t$code = $this->db->escape_str($code);\n\t\t$query = $this->db->query(\"SELECT COUNT(id) as num_rows FROM exp_shortee_urls WHERE BINARY code = '$code'\");\n\n\t\t$row = $query->row_array();\n\n\t\treturn ($row['num_rows'] > 0) ? true : false;\n\t}", "public function isCode(int $code): bool\n {\n return $this->code === $code;\n }", "public function hasCodeType(){\n return $this->_has(4);\n }", "public function hasCodeType(){\n return $this->_has(4);\n }", "public function hasCreditProduct(){\n foreach($this->cart->getQuote()->getAllItems() as $item){\n if($item->getProductType() == \\Vnecoms\\Credit\\Model\\Product\\Type\\Credit::TYPE_CODE)\n return true;\n }\n \n return false;\n }", "public function isCredit()\r\n\t{\r\n\t\treturn $this->root->getAttribute('credit') == 'oui';\r\n\t}", "public function code_check($code)\n {\n if( $this->MItems->get_by_code($code))\n {\n $this->form_validation->set_message('code_check', 'Item code can\\'t be duplicate. Please choose different item code.');\n return false;\n }\n else\n {\n return true;\n }\n }", "function codeUsed($a_cp_id, $a_code)\n\t{\n\t\tglobal $ilDB;\n\n\t\t$set = $ilDB->query(\"SELECT id\".\n\t\t\t\" FROM adn_ep_assignment\".\n\t\t\t\" WHERE cp_professional_id = \".$ilDB->quote($a_cp_id, \"integer\").\n\t\t\t\" AND access_code = \".$ilDB->quote($a_code, \"text\")\n\t\t\t);\n\t\tif ($rec = $ilDB->fetchAssoc($set))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private function get_coupon( $code ) {\n\t\t$this->code = apply_filters( 'woocommerce_coupon_code', $code );\n\n\t\t// Coupon data lets developers create coupons through code\n\t\tif ( $coupon = apply_filters( 'woocommerce_get_shop_coupon_data', false, $this->code ) ) {\n\t\t\t$this->populate( $coupon );\n\t\t\treturn true;\n\t\t}\n\n\t\t// Otherwise get ID from the code\n\t\t$this->id = $this->get_coupon_id_from_code( $this->code );\n\n\t\tif ( $this->code === apply_filters( 'woocommerce_coupon_code', get_the_title( $this->id ) ) ) {\n\t\t\t$this->populate();\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}" ]
[ "0.7249582", "0.6548625", "0.63530695", "0.616148", "0.613512", "0.581938", "0.581938", "0.5816914", "0.5813855", "0.580396", "0.5651243", "0.56309867", "0.56309867", "0.55289704", "0.55249566", "0.55030996", "0.5494372", "0.5493275", "0.5476785", "0.54743254", "0.5421173", "0.53593016", "0.53410965", "0.53358907", "0.53358907", "0.5327403", "0.5276778", "0.52452785", "0.5212519", "0.51665616" ]
0.7188052
1
Get the console command options.
protected function getOptions() { return [ ['command', null, InputOption::VALUE_OPTIONAL, 'The terminal command that should be assigned', 'command:name'], ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getOptions() {\n return [\n ['env', null, InputOption::VALUE_OPTIONAL, 'The environment the command should run under.', null],\n ];\n }", "protected function getOptions()\n\t{\n\t\treturn [\n\t\t\t['testMode', null, InputOption::VALUE_OPTIONAL, 'Runs the command in Test Mode.', false],\n\t\t];\n\t}", "protected function getOptions()\n {\n $options = [];\n\n // Here we will gather all of the command line options that have been specified with\n // the double hyphens in front of their name. We will make these available to the\n // Blade task file so they can be used in echo statements and other structures.\n foreach ($_SERVER['argv'] as $argument) {\n if (! Str::startsWith($argument, '--') || in_array($argument, $this->ignoreOptions)) {\n continue;\n }\n\n $option = explode('=', substr($argument, 2), 2);\n\n if (count($option) == 1) {\n $option[1] = true;\n }\n\n $optionKey = $option[0];\n\n $options[Str::camel($optionKey)] = $option[1];\n $options[Str::snake($optionKey)] = $option[1];\n }\n\n return $options;\n }", "protected function getOptions()\n {\n return [\n ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'],\n ['force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production.'],\n ['path', null, InputOption::VALUE_OPTIONAL, 'The path of migrations files to be executed.'],\n ['pretend', null, InputOption::VALUE_NONE, 'Dump the SQL queries that would be run.'],\n\n ];\n }", "protected function getOptions()\n {\n return [\n ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'],\n ];\n }", "protected function getOptions()\n {\n return [\n ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use'],\n ];\n }", "protected function getOptions()\n {\n return [\n ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'],\n ['native-import', null, InputOption::VALUE_NONE, 'Use the native importer'],\n ];\n }", "protected function getOptions()\n {\n return array(\n array('database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'),\n array('pretend', null, InputOption::VALUE_NONE, 'Dump the SQL queries that would be run.'),\n array('seed', null, InputOption::VALUE_NONE, 'Indicates if the seed task should be re-run.'),\n array('force', null, InputOption::VALUE_NONE, 'Force the operation to run while in production.'),\n );\n }", "protected function getOptions()\n {\n return [\n ['port', null, InputOption::VALUE_OPTIONAL, 'The server port to use.', \\config('minions-server.port', 8085)],\n ];\n }", "protected function getOptions()\n {\n return [\n ['facade', '', InputOption::VALUE_NONE, 'Generate facade for current repository'],\n\n ['model', 'm', InputOption::VALUE_REQUIRED, 'Generate a resource repository for the given model'],\n ];\n }", "protected function getOptions()\n\t{\n\t\treturn [\n\t\t\t['attach', '-a', InputOption::VALUE_OPTIONAL, 'The pipes to attach to the workflow.', null],\n\t\t\t['unguard', '-u', InputOption::VALUE_NONE, 'Do not make this workflow validate data.', null],\n\t\t];\n\t}", "protected function getOptions()\n\t{\n\t\treturn [\n\t\t];\n\t}", "public final function getOptions()\n {\n return $this->_getOptions();\n }", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions();", "public function getOptions() {}" ]
[ "0.7800682", "0.751765", "0.7345173", "0.73404354", "0.7306238", "0.72790045", "0.7268271", "0.7237944", "0.71917665", "0.715652", "0.7155546", "0.7137", "0.71122515", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.710945", "0.70998144" ]
0.77591324
1
Get popup background url
public function getBgImage(){ return $this->scopeConfigInterface->getValue(self::XML_PATH_POPUP_BG_IMAGE,ScopeInterface::SCOPE_WEBSITE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_url_background_pion(){ return $this->_url_background_pion;}", "public function get_url_background_card(){ return $this->_url_background_card;}", "function get_background_image()\n {\n }", "public function getPopup() {}", "function getBackground() {return $this->readBackground();}", "public function getPopupContent();", "function getPopup($id, $attr, $url)\n{\n\t\tif ($attr == '1') $attr = '800x600';\n\t\t@list($size,$attr) = explode(' ', $attr);\n\t\tswitch ($attr) {\n\t\tcase 'full': $poppar='toolbar=1,location=1,menubar=1,scrollbars=1,resizable=1';\n\t\tbreak;\n\t\tcase 'min': $poppar = 'resizable=1';\n\t\tbreak;\n\t\tcase 'none': $poppar = '';\n\t\tbreak;\n\t\tcase 'max': default: $poppar = 'scrollbars=1,resizable=1';\n\t\tbreak;\n\t\t}\n\n\t\tif ($size) {\n\t\t\tlist($w, $h, $l, $t) = sscanf($size, \"%dx%d+%d+%d\");\n\t\t\tif (!$l) $l = \"'+((window.screen.width-$w)/2)+'\";\n\t\t\tif (!$t) $t = \"'+((window.screen.height-$h)/2)+'\";\n\t\t\t$poppar .= ($poppar?',':'') . \"left=$l,top=$t,width=$w,height=$h\";\n\t\t}\n\n\t\treturn \"javascript:void(win_$id=window.open('$url','win_$id','$poppar'));win_$id.focus()\";\n}", "function get_custom_bg_for_user_profile() \r\n\t{\r\n\t\tglobal $xoouserultra;\r\n\t\t\r\n\t\t$site_url = site_url().\"/\";\r\n\t\t\r\n\t\t$html = '';\r\n\t\t$img = get_option('uultra_default_profile_bg');\r\n\t\t\r\n\t\t$path_f = $xoouserultra->get_option('media_uploading_folder');\t\t\t\t\t\t\r\n\t\t$target_path = $site_url.$path_f.'/custom_profile_bg/'.$img;\r\n\t\t\t\t\r\n\t\tif ($img!=\"\") \r\n\t\t{\t\t\t\r\n\t\t\t\r\n\t\t\t$html .= $target_path;\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn $html;\r\n\t\r\n\t}", "private function getURLLightbox() {\n\t\treturn (!$this->isSandbox ? $this->urlLightBox : $this->urlLighboxSandbox);\n\t}", "function readBackground() {return $this->_background;}", "public function getPreviewUrlFront()\n {\n return $this->previewUrlFront;\n }", "public function getPopupHtml() { return $this->popHtml; }", "function getBackgroundPosition() {return $this->readBackgroundPosition();}", "function get_background() {\r\n return $this->db->get($this->table);\r\n\t}", "public function get_preview_url()\n {\n }", "function get_custom_bg_for_user_profile_admin() \r\n\t{\r\n\t\tglobal $xoouserultra;\r\n\t\t\r\n\t\t$site_url = site_url().\"/\";\r\n\t\t\r\n\t\t$html = '';\r\n\t\t$img = get_option('uultra_default_profile_bg');\r\n\t\t\r\n\t\t$path_f = $xoouserultra->get_option('media_uploading_folder');\t\t\t\t\t\t\r\n\t\t$target_path = $site_url.$path_f.'/custom_profile_bg/'.$img;\r\n\t\t\t\t\r\n\t\tif ($img!=\"\") \r\n\t\t{\t\t\t\r\n\t\t\t\r\n\t\t\t$html .= '<img src=\"'.$target_path.'\" style=\"max-width:98% !important;\">';\t\r\n\t\t\t$html .= '<input type=\"button\" name=\"submit\" class=\"button button-secondary \" id=\"uultradmin-remove-custom-user-bg-image\" value=\"'.__('Remove','xoousers').'\" />';\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn $html;\r\n\t\r\n\t}", "function background_img($link){\n\t\t\t\techo \"<style> body{background: url(\". $link. \");\n\t\t\t\t\t\t\t\t\tbackground-repeat: no-repeat;\n\t\t\t\t\t\t\t\t\tbackground-size: cover;\n\t\t\t\t\t\t\t\t\t} </style>\";\n\t\t\t}", "function get_background($page_id){\n\n\t$custom_meta = get_post_custom($page_id);\n\t\n\tif(isset($custom_meta['lumen_page_background']) && isset($custom_meta['lumen_page_background'][0]) && $page_id != \"default\"){\n\t\t$background = unserialize($custom_meta['lumen_page_background'][0]);\t\n\t\tif($background['background-color'] == \"\" && $background['background-image'] == \"\") {\n\t\t\t$background = ot_get_option('lumen_site_default_background');\n\t\t}\n\t}\telse {\n\t\t$background = ot_get_option('lumen_site_default_background');\n\t}\n\t\n\t$background_image = \"\";\n\tif(isset($background['background-image'])){\n\t\t$background_image = $background['background-image'];\n\t\tif(strlen($background_image) > 0) {\n\t\t\t$background_image = 'url('.$background_image.')';\n\t\t}\n\t}\n\t\n\t$output = \"\";\n\t$background_repeat = false;\n\t\n\tif(isset($background['background-color'])){ $output .= $background['background-color'].\" \"; }\n\t$output .= $background_image.\" \";\n\tif(isset($background['background-repeat'])){ \n\t\t$output .= $background['background-repeat'].\" \"; \n\t\tif($background['background-repeat'] == \"repeat\"){\n\t\t\t$background_repeat = true;\t\t\n\t\t} \n\t}\n\tif(isset($background['background-attachment'])){ $output .= $background['background-attachment'].\" \"; }\n\tif(isset($background['background-position'])){ $output .= $background['background-position'].\" \"; }\n\t\n\tif(strlen(trim($output)) > 0 && $background_repeat) { \n\t\treturn 'background: '.$output.'; background-size: inherit!important;'; \n\t}else{\n\t\treturn 'background: '.$output; \n\t}\n\t\n\treturn \"\";\n}", "function cjpopups_wp_avatar_url($user_id_or_email, $size = 150){\n\t$user_id = cjpopups_user_info($user_id_or_email, 'ID');\n\t$get_avatar = get_avatar( $user_id, $size );\n preg_match(\"/src='(.*?)'/i\", $get_avatar, $matches);\n return ( $matches[1] );\n}", "function featuredBG($size = 'full', $pos_x = 'center', $pos_y = 'center', $repeat = 'no-repeat'){\n $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), $size );\n $url = $thumb['0'];\n echo 'style=\"background: url('. $url .')'. $pos_x .' '. $pos_y .' ' . $repeat .'\"';\n}", "function _custom_background_cb()\n {\n }", "public function getPictureUrl()\n {\n return $this->getImageurl();\n }", "function background_image()\n {\n }", "public function getBackgroundMode() {\n return $backgroundMode;\n }", "public function getAbsoluteSrc();", "public function getFrontPageUrl();", "function getPicUrl()\n\t\t{\n\t\t\treturn $this->picurl;\n\t\t}", "function wprt_background_css( $bg ) {\n\t// Define vars\n\t$css = '';\n\t$bg_style = $bg .'_style';\n\n\tif ( $bg_img = wprt_get_mod( $bg, null ) ) {\n\t\t$css .= 'background-image: url('. esc_url( $bg_img ). ');';\n\t}\n\n\tif ( $bg_style = wprt_get_mod( $bg_style ) ) {\n\t\tif ( 'fixed' == $bg_style ) {\n\t\t\t$css .= ' background-position: center center; background-repeat: no-repeat; background-attachment: fixed; background-size: cover;';\n\t\t} elseif ( 'fixed-top' == $bg_style ) {\n\t\t\t$css .= ' background-position: center top; background-repeat: no-repeat; background-attachment: fixed; background-size: cover;';\n\t\t} elseif ( 'fixed-bottom' == $bg_style ) {\n\t\t\t$css .= ' background-position: center bottom; background-repeat: no-repeat; background-attachment: fixed; background-size: cover;';\n\t\t} elseif ( 'cover' == $bg_style ) {\n\t\t\t$css .= ' background-repeat: no-repeat; background-position: center center; background-size: cover;';\n\t\t} elseif ( 'center-top' == $bg_style ) {\n\t\t\t$css .= ' background-repeat: no-repeat; background-position: center top;';\n\t\t} elseif ( 'repeat' == $bg_style ) {\n\t\t\t$css .= ' background-repeat: repeat;';\n\t\t} elseif ( 'repeat-x' == $bg_style ) {\n\t\t\t$css .= ' background-repeat: repeat-x;';\n\t\t} elseif ( 'repeat-y' == $bg_style ) {\n\t\t\t$css .= ' background-repeat: repeat-y;';\n\t\t}\n\t}\n\n\treturn esc_attr( $css );\n}", "function hyde_custom_background_cb() {\n\t$background = set_url_scheme( get_background_image() );\n\n\t// $color is the saved custom color.\n\t// A default has to be specified in style.css. It will not be printed here.\n\t$color = get_background_color();\n\n\tif ( $color === get_theme_support( 'custom-background', 'default-color' ) ) {\n\t\t$color = false;\n\t}\n\n\tif ( ! $background && ! $color )\n\t\treturn;\n\n\t$style = $color ? \"background-color: #$color;\" : '';\n\n\tif ( $background ) {\n\t\t$image = \" background-image: url('$background');\";\n\n\t\t$repeat = get_theme_mod( 'background_repeat', get_theme_support( 'custom-background', 'default-repeat' ) );\n\t\tif ( ! in_array( $repeat, array( 'no-repeat', 'repeat-x', 'repeat-y', 'repeat' ) ) )\n\t\t\t$repeat = 'repeat';\n\t\t$repeat = \" background-repeat: $repeat;\";\n\n\t\t$position = get_theme_mod( 'background_position_x', get_theme_support( 'custom-background', 'default-position-x' ) );\n\t\tif ( ! in_array( $position, array( 'center', 'right', 'left' ) ) )\n\t\t\t$position = 'left';\n\t\t$position = \" background-position: top $position;\";\n\n\t\t$attachment = get_theme_mod( 'background_attachment', get_theme_support( 'custom-background', 'default-attachment' ) );\n\t\tif ( ! in_array( $attachment, array( 'fixed', 'scroll' ) ) )\n\t\t\t$attachment = 'scroll';\n\t\t$attachment = \" background-attachment: $attachment;\";\n\n\t\t$style .= $image . $repeat . $position . $attachment;\n\t}\n?>\n<style type=\"text/css\" id=\"custom-background-css\">\n.sidebar { <?php echo trim( $style ); ?> }\n</style>\n<?php\n}", "function cjpopups_get_image_url($image){\n\tif(strpos($image, 'img') > 0){\n\t\t$xpath = new DOMXPath(@DOMDocument::loadHTML($image));\n\t\t$src = $xpath->evaluate(\"string(//img/@src)\");\n\t\treturn $src;\n\t}else{\n\t\treturn $image;\n\t}\n}" ]
[ "0.7662499", "0.65181", "0.63692915", "0.62914294", "0.60900795", "0.5884704", "0.58233964", "0.57780117", "0.5726911", "0.5686214", "0.5676823", "0.5669619", "0.56365454", "0.55923164", "0.5589073", "0.55470103", "0.55421066", "0.54672974", "0.5455209", "0.5407353", "0.53895384", "0.5376368", "0.5364553", "0.53601545", "0.53571844", "0.5354042", "0.5348791", "0.534041", "0.5323523", "0.5314655" ]
0.72030306
1
Get popup static block id
public function getStaticBlockId(){ return $this->scopeConfigInterface->getValue(self::XML_PATH_POPUP_STATIC_BLOCK,ScopeInterface::SCOPE_WEBSITE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_ID()\n {\n return $this->blockId;\n }", "public function getBlockId($name='')\n\t{\n\t\tif (!$name)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t$this->_db->setQuery( \"SELECT id FROM $this->_tbl WHERE block=\" . $this->_db->quote($name) . \" LIMIT 1\" );\n\t\treturn $this->_db->loadResult();\n\t}", "function fetchId($name)\n {\n //return $this->_parent->_name.'-'.\"popup-$name[1]\";\n return $this->_parent->getName().'-'.\"popup-$name[1]\";\n }", "protected function actionGetPrimaryKey()\n {\n return $this->_static_block->getPrimaryKey();\n }", "public function getIblockId()\n {\n return $this->iblockId;\n }", "protected function blockPluginId() {\n return '';\n }", "function getHtmlId(){\n\t\t//this to have unique ID attribute of the main containing div in case there is more \n\t\t//than 1 of the same action box. Cache key is composed of $_htmlUniqueId prefix and \n\t\t//ID of the action box.\n\t\t$actionBoxId = $this->getId();\n\t\t\n\t\t$htmlUniqueId = wp_cache_get( $this->_html_UniqueId . $actionBoxId );\n\t\tif( false === $htmlUniqueId ){\n\t\t\t//this is the first\n\t\t\t$htmlUniqueId = 1;\n\t\t\twp_cache_set( $this->_html_UniqueId . $actionBoxId, $htmlUniqueId );\n\t\t} else {\n\t\t\t//another box is already displayed\n\t\t\t$htmlUniqueId++;\n\t\t\twp_cache_replace( $this->_html_UniqueId . $actionBoxId, $htmlUniqueId );\n\t\t}\n\t\t\n\t\treturn $actionBoxId.$htmlUniqueId;\n\t}", "public function getPopup() { \n if($this->blocks) {\n return $this->desc . \"<BR />&nbsp;<BR />\" . \n \"<b>Blocks\" . \n ($this->charges > 0 ? \" \" . $this->charges . \" more\" : \"\") .\n ($this->blockActionTypes != \"all\" ? $this->blockActionTypes : \"\") . \" actions\" . \n ($this->blockChance < 1 ? \" with a chance of \" . floor($this->blockChance * 100) . \"%\" : \"\") . \n ($this->turns > 0 ? \" within the next \" . $this->turns . \" rounds\" : \"\") .\n \".\";\n }\n return $this->desc;\n }", "public static function getMaximumId()\n\t{\n\t\treturn (int) BackendModel::getDB()->getVar('SELECT MAX(i.id) FROM content_blocks AS i LIMIT 1');\n\t}", "public function edite_static_block(){\r\n\t\tif($this->has_admin_panel()) return $this->module_edite_static_block();\r\n return $this->module_no_permission();\r\n\t}", "public function getPopup() {}", "static function id()\n\t{\n\t\treturn self::data('id');\n\t}", "public function get_site_id()\n {\n }", "public function get_site_id()\n {\n }", "function get_block_template($id, $template_type = 'wp_template')\n {\n }", "public function getAjaxID() {}", "function get_block_id ($gid1, $gid2) {\n $values_gid1 = array(\n 'subject_id' => $gid1,\n 'type_id' => array (\n 'cv_id' => array (\n 'name' => 'sequence',\n ),\n 'name' => 'member_of',\n 'is_obsolete' => 0\n ),\n );\n\n $blk_region_gid1 = chado_select_record(\n 'feature_relationship', \n array('object_id'),\n $values_gid1\n );\n\n $values_gid2 = array(\n 'subject_id' => $gid2,\n 'type_id' => array ( \n 'cv_id' => array (\n 'name' => 'sequence',\n ),\n 'name' => 'member_of',\n 'is_obsolete' => 0\n ),\n );\n\n $blk_region_gid2 = chado_select_record(\n 'feature_relationship', \n array('object_id'), \n $values_gid2\n );\n\n // locate the block id shard by gid1 and gid2 \n $blk_html = '';\n foreach ($blk_region_gid1 as $blk1) {\n foreach ($blk_region_gid2 as $blk2) { \n // search block id shared by gid 1 and gid2\n $bid = db_query('SELECT blockid FROM {synblock} WHERE (b2=:blk1 AND b1=:blk2) OR (b1=:blk1 AND b2=:blk2)', \n\t\t\t array(\n ':blk1' => $blk1->object_id,\n ':blk2' => $blk2->object_id,\n\t\t\t )\n\t\t )->fetchField();\n $blk_html.= l($bid, \"synview/block/\" . $bid, array('attributes' => array('target' => \"_blank\")));\n }\n }\n\n if (empty($blk_html)) {\n $blk_html = 'NA';\n }\n\n\n return $blk_html; \n}", "public static function getSiteId(){\n return 1;\n\n }", "public function getFormId() {\n return 'sayhello_block_form';\n }", "public static function getTemplateBlock()\n {\n return self::$templateBlock;\n }", "function vcex_get_block_editor_script_src( $block = '' ) {\n\treturn TTC_PLUGIN_DIR_URL . 'inc/vcex/blocks/' . $block . '/vcex-' . $block . '-block.js';\n}", "public function getAutoBlockTitle()\n\t{\n\t\tglobal $lng;\n\n\t\treturn $lng->txt(\"survey_auto_block_title\");\n\t}", "function get_id() {\n\t\treturn $this->get_data( 'id' );\n\t}", "public function getSiteId();", "public function getPublicBlock() {\n return '';\n }", "function getSiteId() {\n\t\treturn $this->getData('siteId');\n\t}", "public function getOriginalBlock()\n {\n $data = $this->_coreRegistry->registry('magictoolbox');\n return is_null($data) ? null : $data['blocks']['product.info.media.image'];\n }", "function get_block_file_template($id, $template_type = 'wp_template')\n {\n }", "public function getGuestTemplateId()\n {\n return $this->getTemplateId();\n }", "function get_the_block_template_html()\n {\n }" ]
[ "0.6915995", "0.6216904", "0.6204871", "0.60660446", "0.6021487", "0.60035217", "0.5912662", "0.58703965", "0.5808187", "0.5794352", "0.57913446", "0.57251763", "0.5600986", "0.5600986", "0.5586825", "0.5564948", "0.5546049", "0.55442536", "0.554154", "0.5524439", "0.5505612", "0.550064", "0.5496692", "0.54647845", "0.5453472", "0.54461634", "0.54446536", "0.5436763", "0.5402306", "0.54000247" ]
0.8631903
0
Get popup cookie time
public function getCookieTime(){ return $this->scopeConfigInterface->getValue(self::XML_PATH_POPUP_COOKIE_TIME,ScopeInterface::SCOPE_WEBSITE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLastTime(){\n\t \t if (!empty($_COOKIE['lastVisit'])) {\n\t\techo \"你上次登陆的时间是:\".$_COOKIE['lastVisit'];\n\t}else{\n\t\techo \"你是第一次登陆\";\n\t}\n\t\tsetCookie(\"lastVisit\",date(\"Y-m-d : H:i:s\"),time()+24*3600*30);\n }", "private static function cookieLifetime()\n {\n return time() + (self::ACCESS_TOKEN_EXPIRES_DAYS * 24 * 60 * 60);\n }", "public function get_cookie_life() {\n\n\t\t\t$life = get_option( 'wc_sc_coupon_cookie_life', 180 );\n\n\t\t\treturn apply_filters( 'wc_sc_coupon_cookie_life', time() + ( 60 * 60 * 24 * $life ) );\n\n\t\t}", "public function getSessionTime(){\n return $this->_session->get('time');\n }", "function _tsuiseki_tracking_get_expiration_time() {\n return (time() + TSUISEKI_TRACKER_COOKIE_TIMEOUT);\n}", "public function getCookiesTimeOut() \n {\n $cookiesTimeout = Mage::getStoreConfig(self::XML_PATH_COOKIES_TIMEOUT);\n return $cookiesTimeout;\n }", "private function get_cookie_expiration_time()\n {\n $session = $this->getSession();\n if( !is_array($session) ) \n { \n return false;\n }\n else\n {\n return $session['expires'];\n }\n }", "public static function getCookiePersistentSecs () {\n \n $days = conf::getMainIni('cookie_time'); \n if ($days == -1) {\n // ten years\n $cookie_time = 3600 * 24 * 365 * 10;\n }\n \n else if ($days >= 1) {\n $cookie_time = 3600 * 24 * $days;\n }\n \n else {\n $cookie_time = 0;\n }\n \n return $cookie_time;\n }", "private function getSessionTimestamp()\n {\n if ($this->_phpsession && isset($_SESSION[$this->_sessionName]->SessionID))\n $timestamp = $_SESSION[$this->_sessionName]->SessionID;\n\n\n if ($this->_cookie && isset($_COOKIE[$this->_sessionName . \"_Timestamp\"]))\n $timestamp = $_COOKIE[$this->_sessionName . \"_Timestamp\"];\n\n return $timestamp;\n }", "public function lastLogoutTime();", "public function isRefreshTimeBasedCookie() {}", "public function isRefreshTimeBasedCookie() {}", "function logged_in_since() {\n if (isset($_COOKIE[\"login_time\"])) {\n ?>\n\n <em>(logged in since <?= $_COOKIE[\"login_time\"] ?>)</em>\n\n <?php\n }\n }", "public function currentCookieInfo() {\n if ($this->isLoggedIn()) {\n $auth_cookie = Cookie::get(\"auth_cookie\"); //get hash from browser\n return $this->cookieInfo($auth_cookie);\n }\n }", "public function getShowTime()\n\t{\n\t\treturn $this->showtime;\n\t}", "public function getExpireTime()\n {\n return $this->get(self::_EXPIRE_TIME);\n }", "public function getExpireTime()\n {\n return $this->get(self::_EXPIRE_TIME);\n }", "public function getExpireTime()\n {\n return $this->get(self::_EXPIRE_TIME);\n }", "public function getExpireTime()\n {\n return $this->get(self::_EXPIRE_TIME);\n }", "static public function getSessionTime(){\n if (!isset($_SESSION['start_time'])){\n return 0;\n } else {\n return time() - $_SESSION['start_time'];\n }\n }", "function cjpopups_time_ago($ptime){\n $etime = time() - $ptime;\n if ($etime < 1){\n return __('Just now', 'cjpopups');\n }\n $a = array(\n \t12 * 30 * 24 * 60 * 60 => 'year',\n\t\t30 * 24 * 60 * 60 => 'month',\n\t\t24 * 60 * 60 => 'day',\n\t\t60 * 60 => 'hour',\n\t\t60 => 'minute',\n\t\t1 => 'second',\n );\n $singular = array(\n \t'year' => __('year', 'cjpopups'),\n\t\t'month' => __('month', 'cjpopups'),\n\t\t'day' => __('day', 'cjpopups'),\n\t\t'hour' => __('hour', 'cjpopups'),\n\t\t'minute' => __('minute', 'cjpopups'),\n\t\t'second' => __('second', 'cjpopups'),\n );\n $plurals = array(\n \t'year' => __('years', 'cjpopups'),\n\t\t'month' => __('months', 'cjpopups'),\n\t\t'day' => __('days', 'cjpopups'),\n\t\t'hour' => __('hours', 'cjpopups'),\n\t\t'minute' => __('minutes', 'cjpopups'),\n\t\t'second' => __('seconds', 'cjpopups'),\n );\n foreach ($a as $secs => $str){\n $d = $etime / $secs;\n if ($d >= 1){\n $r = round($d);\n return $r . ' ' . ($r > 1 ? $plurals[$str] : $singular[$str]) .' '. __('ago', 'cjpopups');\n }\n }\n}", "public function getExpirationTime() {\n return $this->sessionData[\"expire\"];\n }", "public function getExpirationTime() {\n return $this->shareData[\"expire\"];\n }", "public function store()\n {\n return response('200')->cookie(\n 'cookie-popup',\n 'checked',\n time() + (365 * 24 * 60 * 60)\n );\n }", "public function lastLoginTime();", "public static function getCookiePersistentDays () {\n \n $days = conf::getMainIni('cookie_time'); \n if ($days == -1) {\n $cookie_time = 365 * 10;\n }\n \n else if ($days >= 1) {\n $cookie_time = $days;\n }\n \n else {\n $cookie_time = 0;\n }\n \n return $cookie_time;\n }", "function gmt_time() {\r\n\t\t$now = time ();\r\n\t\t$tz = $this->gmt_timezone ();\r\n\t\t$seconds = 3600 * $tz;\r\n\t\treturn $now - $seconds;\r\n\t}", "public function getshowTime()\n {\n return $this->showtime;\n }", "public static function get_expire_time_otp()\n {\n return apply_filters('wordpress_acl_otp_time_expire', (MINUTE_IN_SECONDS * 5));\n }", "public function getExpireTime()\n {\n return $this->expire_time;\n }" ]
[ "0.6724043", "0.6605812", "0.6433711", "0.64166373", "0.6311801", "0.6257696", "0.6249962", "0.622519", "0.6133038", "0.6073651", "0.6008927", "0.6008927", "0.60028315", "0.5937981", "0.5823877", "0.58137786", "0.58137786", "0.58137786", "0.58137786", "0.5795732", "0.5792176", "0.5748114", "0.57443696", "0.5732915", "0.5731286", "0.57308114", "0.5711119", "0.5681686", "0.56664735", "0.5642632" ]
0.8568498
0
Publishes the Configuration File.
protected function publishConfigurationFile() { // Determine the Local Configuration Path $source = $this->getLocalConfigurationPath(); // Determine the Application Configuration Path $destination = $this->getApplicationConfigPath(); // Publish the Configuration File $this->publishes([$source => $destination], 'config'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function publishConfig()\n {\n $this->publishes([\n $this->basePath('config/flare/config.php') => config_path('flare/config.php'),\n ]);\n }", "private function publishConfig()\n\t{\n\t\t$config = __DIR__ . '/config/workflow.php';\n\n\t\t$this->publishes([$config => config_path('workflow.php')]);\n\n\t\t$this->mergeConfigFrom($config, 'workflow');\n\t}", "protected function publishConfig()\n {\n $this->publishes([\n __DIR__ . '/../config/acl.php' => config_path('acl.php'),\n ], 'config');\n }", "protected function publishConfig()\n {\n $this->publishes([\n $this->packagePath('config/config.php') => config_path($this->package . '.php')\n ], 'config');\n }", "private function publishesConfig(): void\n {\n $this->publishes([\n __DIR__.'/../config/invite-codes.php' => config_path('invite-codes.php'),\n ], 'invite-codes-config');\n }", "protected function publishConfig()\n {\n $path = __DIR__.'/../config/disqus.php';\n $this->mergeConfigFrom($path, 'disqus');\n $this->publishes([\n $path => config_path('disqus.php'),\n ], 'disqus');\n }", "public function publish()\n {\n $this->move('config/auth.php', config_path(), 'auth.php');\n $this->move('config/services.php', config_path(), 'services.php');\n\n $this->notify('Publishing: Config Files');\n }", "protected function offerPublishing()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__ . '/../config/documentation.php' => config_path('documentation.php'),\n ], 'documentation-config');\n }\n }", "private function setPublishFiles()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__.'/../config/config.php' => config_path('setting.php'),\n ], 'setting');\n }\n }", "protected function publishFiles()\n {\n $this->publishes([\n __DIR__.'/Config/installer.php' => config_path('installer.php'),\n ], 'nickelcms');\n\n // $this->publishes([\n // __DIR__.'/assets' => resource_path('nicklecms/admin'),\n // ], 'nickelcms_assets');\n\n }", "private function publishConfig()\n {\n if ($this->app->environment('testing')) {\n return;\n }\n\n $this->publishes(\n [__DIR__ . '/..' . Settings::LARAVEL_PUBLISHABLE_CONFIG => LaravelConfig::configPublishPath()],\n 'config'\n );\n }", "protected function configHandle()\n {\n $packageConfigPath = __DIR__.'/config/config.php';\n $appConfigPath = config_path('task-management.php');\n\n $this->mergeConfigFrom($packageConfigPath, 'task-management');\n\n $this->publishes([\n $packageConfigPath => $appConfigPath,\n ], 'config');\n }", "protected function registerPublishableFiles()\n {\n $this->publishes([\n __DIR__.\"/../config/{$this->name}.php\" => config_path(\"{$this->name}.php\"),\n ], 'config');\n }", "private function registerPublishing(): void\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__ . '/../config/ethereum.php' => config_path('ethereum.php'),\n ], 'ethereum-config');\n }\n }", "protected function setPackageConfigurationFile()\n {\n $config = __DIR__ . '/Config/recaptcha.php';\n $path = config_path('recaptcha.php');\n \n $this->publishes([$config => $path], 'config'); \n $this->mergeConfigFrom( $config, 'recaptcha');\n }", "protected function registerPublishing() : void\n {\n $this->publishes([\n __DIR__ . '/../config/dejavu.php' => config_path('dejavu.php')\n ], 'dejavu-config');\n }", "private function registerConfiguration()\n {\n $configPath = __DIR__ . '/../config/themify.php';\n $this->mergeConfigFrom($configPath, 'themify');\n $this->publishes([$configPath => config_path('themify.php')]);\n }", "private function setupConfig()\n {\n $this->publishes([\n __DIR__ . '/config' => config_path(),\n ], 'config');\n\n $this->mergeConfigFrom(__DIR__ . '/../config/package-blueprint.php', 'package-blueprint');\n }", "protected function configurePublishing()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__.'/../stubs/fortify.php' => config_path('fortify.php'),\n ], 'fortify-config');\n\n $this->publishes([\n __DIR__.'/../stubs/CreateNewUser.php' => app_path('Actions/Fortify/CreateNewUser.php'),\n __DIR__.'/../stubs/FortifyServiceProvider.php' => app_path('Providers/FortifyServiceProvider.php'),\n __DIR__.'/../stubs/PasswordValidationRules.php' => app_path('Actions/Fortify/PasswordValidationRules.php'),\n __DIR__.'/../stubs/ResetUserPassword.php' => app_path('Actions/Fortify/ResetUserPassword.php'),\n __DIR__.'/../stubs/UpdateUserProfileInformation.php' => app_path('Actions/Fortify/UpdateUserProfileInformation.php'),\n __DIR__.'/../stubs/UpdateUserPassword.php' => app_path('Actions/Fortify/UpdateUserPassword.php'),\n ], 'fortify-support');\n\n $this->publishes([\n __DIR__.'/../database/migrations' => database_path('migrations'),\n ], 'fortify-migrations');\n }\n }", "private function bootConfig(): void\n {\n $baseDir = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR;\n $configDir = $baseDir . 'config' . DIRECTORY_SEPARATOR;\n\n $this->publishes([\n $configDir . 'laravel-database-emails.php' => config_path('laravel-database-emails.php'),\n ], 'laravel-database-emails-config');\n }", "protected function registerPublishing()\n {\n $this->publishes([\n __DIR__.'/../config/ziggeo.php' => config_path('ziggeo.php'),\n ], 'ziggeo-config');\n }", "protected function publishConfig($configPath)\n {\n $this->publishes([$configPath => config_path('ads.php')], 'config');\n }", "protected function defineAssetPublishing()\n {\n $this->publishes([\n __DIR__.'/../config/firefly.php' => config_path('firefly.php'),\n ], 'firefly-config');\n\n $this->publishes([\n __DIR__.'/../database/migrations/' => database_path('migrations'),\n ], 'firefly-migrations');\n\n $this->publishes([\n __DIR__.'/../public/' => public_path('vendor/firefly'),\n ], 'firefly-assets');\n }", "protected function publishConfig($configPath)\n {\n $this->publishes([$configPath => $this->getConfigPath()], 'config');\n }", "protected function publishFiles()\r\n {\r\n $this->publishes([\r\n __DIR__.'/../Config/installer.php' => base_path('config/installer.php'),\r\n ], 'laravelinstaller');\r\n\r\n $this->publishes([\r\n __DIR__.'/../assets' => public_path('installer'),\r\n ], 'laravelinstaller');\r\n\r\n $this->publishes([\r\n __DIR__.'/../Views' => base_path('resources/views/vendor/installer'),\r\n ], 'laravelinstaller');\r\n\r\n $this->publishes([\r\n __DIR__.'/../Lang' => base_path('resources/lang'),\r\n ], 'laravelinstaller');\r\n }", "protected function publishConfig( $configPath ) {\n\t\t$this->publishes([$configPath => config_path('cachetags.php')], 'config');\n\t}", "protected function offerPublishing()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__ . '/../config/dashkit.php' => config_path('dashkit.php'),\n ], 'dashkit-config');\n\n $this->publishes([\n __DIR__ . '/../resources/views/dashkit.blade.php' => resource_path('views/' . config('dashkit.view') . '.blade.php'),\n ], 'dashkit-view');\n }\n }", "public function publishFiles()\n {\n\n $dir = __DIR__;\n\n // config\n $this->publishes([\n $dir . '/../config/permissions.php' => config_path('permissions.php'),\n ], 'config-role');\n\n /**\n * Database\n */\n $migration_path = database_path('migrations/');\n $seeds_path = database_path('seeds/');\n\n // migrations\n $this->publishes([\n $dir . '/../database/migrations/create_roles_table.php.stub' => $migration_path . date('Y_m_d_His', time()) . '_create_roles_table.php',\n $dir . '/../database/migrations/create_role_user_table.php.stub' => $migration_path . date('Y_m_d_His', time()) . '_create_role_user_table.php',\n ], 'migrations-role');\n\n // seeds\n $this->publishes([\n $dir . '/../database/seeds/RoleTableSeeder.php.stub' => $seeds_path . 'RoleTableSeeder.php',\n ], 'seeder-role');\n }", "protected function registerConfigurations()\n {\n $this->mergeConfigFrom(\n $this->packagePath('config/config.php'), 'password'\n );\n $this->publishes([\n $this->packagePath('config/config.php') => config_path('password.php'),\n ], 'config');\n }", "protected function registerPublishing(): void\n {\n $this->publishes([\n __DIR__.'/config/permissions_makr.php' => config_path('permissions_makr.php'),\n ]);\n\n $this->publishes([\n __DIR__ . '/database/migrations/' => database_path('migrations')\n ], 'migrations');\n }" ]
[ "0.82678056", "0.8150707", "0.8066025", "0.80007505", "0.77923054", "0.7743851", "0.75718474", "0.74415666", "0.73615843", "0.72795933", "0.72750515", "0.72675", "0.71052104", "0.7055335", "0.69835", "0.6956444", "0.68562484", "0.681237", "0.6802941", "0.6791647", "0.6775968", "0.67493147", "0.66528916", "0.66301566", "0.66097236", "0.66081184", "0.65979964", "0.6597559", "0.65746665", "0.6517184" ]
0.8816268
0
test that finding data of an object with its primary keys
public function byPrimaryKeys() { $mockResult = $this->getMock('stubDatabaseResult'); $this->mockConnection->expects($this->any())->method('query')->will($this->returnValue($mockResult)); $mockResult->expects($this->exactly(2)) ->method('fetch') ->will($this->onConsecutiveCalls(false, array('id' => 'mock', 'bar' => 'Here is bar.', 'default' => 'And this is default.'))); $this->assertNull($this->dbFinder->findByPrimaryKeys($this->mockConnection, new stubReflectionClass('MockSinglePrimaryKeyEntity'), array('id' => 'mock'))); $singlePrimaryKey = $this->dbFinder->findByPrimaryKeys($this->mockConnection, new stubReflectionClass('MockSinglePrimaryKeyEntity'), array('id' => 'mock')); $this->assertEquals('mock', $singlePrimaryKey->getId()); $this->assertEquals('Here is bar.', $singlePrimaryKey->withAnnotation()); $this->assertEquals('And this is default.', $singlePrimaryKey->withDefaultValue()); $this->assertEquals('foo', $this->mockQueryBuilder->getSelect()->getBaseTableName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testFindByIdIsSuccess()\n {\n $tblGateMock = $this->getMockBuilder(TableGateway::class)\n ->setConstructorArgs(array($this->getDbal()))\n ->setMethodsExcept(['findById', 'setTable'])\n ->getMock();\n $tblGateMock->setTable('Person');\n\n //exercise SUT\n $row = $tblGateMock->findById($this->person['id']);\n\n //assert return value\n $this->assertTrue(is_array($row), 'result not array');\n $this->assertNotEmpty($row, 'result set is empty');\n\n foreach(array_keys($this->person) as $key) {\n $this->assertArrayHasKey($key, $row[0]);\n $this->assertEquals($this->person[$key], $row[0][$key]);\n }\n }", "public function returnDetailFindByPK($id);", "public function testFindForId() {\n\t\t$id = 1;\n\n\t\t$result = $this->ItemsTable->findForId($id);\n\t\t$this->assertInternalType(\n\t\t\t'array',\n\t\t\t$result,\n\t\t\t'The result should always be an array.'\n\t\t);\n\t\t$this->assertEquals(\n\t\t\t$id,\n\t\t\t$result['id'],\n\t\t\t'The id key/value of the result for id should be equal to the id.'\n\t\t);\n\t\t$this->assertEquals(\n\t\t\t'Candy',\n\t\t\t$result['firstName'],\n\t\t\t'The id key/value of the result for firstName should be equal to `Candy`.'\n\t\t);\n\t\t$this->assertEquals(\n\t\t\t'Crush',\n\t\t\t$result['lastName'],\n\t\t\t'The id key/value of the result for lastName should be equal to `Crush`.'\n\t\t);\n\t\t$this->assertEquals(\n\t\t\t'Stripper',\n\t\t\t$result['occupation'],\n\t\t\t'The id key/value of the result for occupation should be equal to `Stripper`.'\n\t\t);\n\t\t$this->assertEquals(\n\t\t\t'1924 Sucka Drive',\n\t\t\t$result['address'],\n\t\t\t'The id key/value of the result for address should be equal to `1924 Sucka Drive`.'\n\t\t);\n\t\t\n\t}", "function testGetPrimaryKey1()\n {\n print \"\\n\" . \">testGetPrimaryKey1\";\n $db =& $this->db;\n $primary_key = $db->getPrimaryKey();\n if (PEAR::isError($primary_key)) {\n $success = false;\n print $primary_key->getMessage();\n $this->assertTrue($success);\n return;\n } else {\n $success = is_array($primary_key);\n if (!$success) {\n print \"PrimaryKey is not an array in testGetPrimaryKey1\";\n $this->assertTrue($success);\n return;\n } else {\n $this->assertEquals($primary_key, $this->primary_key);\n }\n }\n }", "function testFindById() {\r\n $this->User = new User();\r\n \r\n $this->User->contain();\r\n $result = $this->User->findById(1, 'email');\r\n \r\n $expected = array('User' => array( 'email' => 'mail@example.com' ) );\r\n \r\n $this->assertEqual($result, $expected);\r\n }", "public function returnFindByPK($id);", "public function test_findId() {\n $data = $this->SampleSet->find('all', ['conditions' => ['id' => 1]]);\n $this->assertNotNull($data);\n $this->assertEquals(1, $data[0]['SampleSet']['id']);\n $this->assertEquals(1, count($data));\n }", "public function testPrimaryKeyField()\n {\n $field = $this->table->getField($this->table->getPrimaryKeys()[0]);\n $this->assertInstanceOf('Metrol\\DBTable\\Field\\PostgreSQL\\Integer',\n $field);\n $this->assertEquals('primaryKeyID', $field->getName());\n }", "public function testDbFindById()\n {\n $test1 = is_null($this->app->db()->findById('games', 999));\n\n # One result\n $test2 = $this->app->db()->findById('games', 1)['id'] == 1;\n\n return $test1 && $test2;\n }", "public function testQuarantineFindById()\n {\n\n }", "public function returnMoreFindByPK($id);", "public abstract function find($primary_key, $model);", "public function byPrimaryKeysNonEntity()\n {\n $this->dbFinder->findByPrimaryKeys($this->mockConnection, new stubReflectionClass('MockNoEntityAnnotationEntity'), array());\n }", "#[@test]\n public function primaryKeySet() {\n $this->assertEquals('true', \n $this->xpath->query('string(/document/table/index[1]/@primary)'));\n }", "public function findPk($pk)\r\n {\r\n $pkColumns = $this->getObject()->getTable()->getIdentifierColumnNames();\r\n if(($count = count($pkColumns)) > 1)\r\n {\r\n // composite primary key\r\n if(!is_array($pk))\r\n {\r\n throw new Exception(sprintf('Class %s has a composite primary key and expects %s parameters to retrieve a record by pk', $this->class, join(', ', $pkColumns)));\r\n } \r\n else if (is_array($count[0]))\r\n {\r\n // array of arrays\r\n // sorry the finder can't do that on objects with composte primary keys\r\n throw new Exception('Impossible to find a list of Pks on an objects with composite primary keys');\r\n }\r\n for ($i=0; $i < $count; $i++)\r\n { \r\n $this->addCondition('and', $pkColumns[$i], '=', $pk[$i]);\r\n }\r\n return $this->findOne();\r\n }\r\n else\r\n {\r\n // simple primary kay\r\n if(is_array($pk))\r\n {\r\n $this->addCondition('and', $pkColumns[0], ' IN ', $pk);\r\n return $this->find();\r\n }\r\n else\r\n {\r\n $this->addCondition('and', $pkColumns[0], '=', $pk);\r\n return $this->findOne();\r\n }\r\n }\r\n }", "public function find($data);", "public static function find($id, $key = 'id');", "public function testFind() {\n\t\t\tforeach($this->user_ids as $id) {\n\t\t\t\t$_user = User::_find($id);\n\t\t\t\t$this->assertTrue((isset($_user) && !empty($_user)));\n\t\t\t}\n\t\t\t//test finding by ids with cache\n\t\t\tforeach($this->user_ids as $id) {\n\t\t\t\t$_user = User::find($id);\n\t\t\t\t$this->assertTrue((isset($_user) && !empty($_user)));\n\t\t\t}\n\t\t}", "function isPrimaryKey(): bool;", "public function test_getByRecordId_exists_executesCorrectly()\r\n\t{\r\n\t\t$recordId = \"aDummyRecordId\";\r\n\t\t\r\n\t\t$this->prepareSetRecordId($recordId);\r\n\t\t$this->prepareFind(true);\r\n\t\r\n\t\t$actual = $this->service->getByRecordId($recordId);\r\n\t\t$this->assertEquals($this->dbObjectMock, $actual);\r\n\t}", "public function testFind()\n {\n $data = array('id' => 1, 'username' => 'root', 'password' => 'password');\n $mockPDO = $this->getMock('\\\\PDOMock', array('fetchOne'));\n $mockPDO\n ->expects($this->once())\n ->method('fetchOne')\n ->will($this->returnCallback(function($arg1, $arg2) use ($data) {\n $sql = 'SELECT\n *\nFROM\n `users`\nWHERE\n id = :id\nORDER BY\n id ASC';\n\n if($arg1 == $sql && $arg2 == array('id' => 1)) {\n return $data;\n } else {\n return array();\n }\n }))\n ;\n $storage = new AuraExtendedPdo($mockPDO, new QueryFactory('mysql'));\n $result = $storage->find(array('id' => 1), 'users');\n\n $this->assertEquals($data['id'], $result['id']);\n $this->assertEquals($data['username'], $result['username']);\n $this->assertEquals($data['password'], $result['password']);\n }", "public function testQuarantineFindOne()\n {\n\n }", "public function find($primaryValue);", "public function testProfilePrototypeFindByIdQuarantines()\n {\n\n }", "public function testGetWithKey()\n {\n $result = $this->getQueryBuilderConnection()\n ->select()\n ->from('querybuilder_tests')\n ->where('id', '<', 2)\n ->getWithKey('field');\n\n $expected = [\n 'aaaa' => (object)[\n 'id' => '0',\n 'languageId' => '1',\n 'field' => 'aaaa',\n ],\n 'bbbb' => (object)[\n 'id' => '1',\n 'languageId' => '1',\n 'field' => 'bbbb',\n ],\n ];\n\n $this->assertEquals($expected, $result);\n\n $this->expectException(FieldNotFoundException::class);\n\n $this->getQueryBuilderConnection()\n ->select()\n ->from('querybuilder_tests')\n ->where('id', '<', 2)\n ->getWithKey('asdf');\n }", "function find($id);", "public function testGetById()\n {\n // Create and save a record to the DB\n $user = $this->userRepository->make([\n 'first_name' => 'test-first-name',\n 'last_name' => 'test-last-name',\n 'email' => 'test@example.com',\n 'password' => '123123',\n ]);\n\n $user->save();\n\n // Get the user from DB with the getById method\n $userFromDb = $this->userRepository->getById($user->id);\n // Make sure the user the proper name and email\n $this->assertEquals('test-first-name', $userFromDb->first_name);\n $this->assertEquals('test@example.com', $userFromDb->email);\n }", "public function testQueryFetchObject() {\n $records = [];\n $result = $this->connection->query('SELECT [name] FROM {test} WHERE [age] = :age', [':age' => 25], ['fetch' => \\PDO::FETCH_OBJ]);\n foreach ($result as $record) {\n $records[] = $record;\n $this->assertIsObject($record);\n $this->assertSame('John', $record->name);\n }\n\n $this->assertCount(1, $records, 'There is only one record.');\n }", "public function findByPrimaryKey(stubBaseReflectionClass $entityClass, array $primaryKeys);", "abstract function getPrimaryKey();" ]
[ "0.6809215", "0.67438644", "0.66932243", "0.66594833", "0.663723", "0.64941967", "0.6440742", "0.638353", "0.63748986", "0.6342824", "0.63073933", "0.62981206", "0.62323785", "0.621608", "0.6201697", "0.61924386", "0.61577064", "0.6116611", "0.6113921", "0.6097877", "0.60666513", "0.6065574", "0.6064512", "0.6051885", "0.5997187", "0.59918404", "0.59852904", "0.5974463", "0.59712005", "0.5970465" ]
0.68219626
0
test that finding data of an object with a criterion works as expected
public function byCriterion() { $mockCriterion = $this->getMock('stubCriterion'); $mockCriterion->expects($this->any())->method('toSQL')->will($this->returnValue('example')); $mockResult = $this->getMock('stubDatabaseResult'); $this->mockConnection->expects($this->any())->method('query')->will($this->returnValue($mockResult)); $mockResult->expects($this->exactly(2)) ->method('fetchAll') ->will($this->onConsecutiveCalls(false, array(array('bar' => 'Here is bar.', 'default' => 'And this is default.')))); $finderResult = $this->dbFinder->findByCriterion($this->mockConnection, $mockCriterion, new stubReflectionClass('MockSinglePrimaryKeyEntity')); $this->assertEquals(0, $finderResult->count()); $finderResult = $this->dbFinder->findByCriterion($this->mockConnection, $mockCriterion, new stubReflectionClass('MockSinglePrimaryKeyEntity')); $this->assertEquals(1, $finderResult->count()); $data = $finderResult->current(); $this->assertEquals('Here is bar.', $data->withAnnotation()); $this->assertEquals('And this is default.', $data->withDefaultValue()); $select = $this->mockQueryBuilder->getSelect(); $this->assertEquals('foo', $select->getBaseTableName()); $this->assertEquals('bar ASC', $select->getOrderedBy()); $this->assertTrue($select->hasCriterion()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testFind()\n {\n $this->assertEquals(1, $this->object->find(function ($item) {\n return $item === 2;\n })->count());\n $this->assertEquals(2, $this->object->find(function ($item) {\n return $item % 2;\n })->count());\n }", "public function testFindFirst()\n {\n $this->assertEquals(2, $this->object->findFirst(function ($item) {\n return $item === 2;\n }));\n $this->assertEquals(1, $this->object->findFirst(function ($item) {\n return $item % 2;\n }));\n }", "public function matching(Criteria $criteria);", "public function testFindWhere() {\n\t\t$array = array(\n\t\t\tarray('a' => 1, 'b' => 'testing'),\n\t\t\tarray('a' => 2, 'b' => 'testing'),\n\t\t\tarray('a' => 3, 'b' => 'one'),\n\t\t\tarray('a' => 2, 'b' => 'two'),\n\t\t\tarray('a' => 4, 'b' => 'three'),\n\t\t);\n\t\t$result = _::findWhere($array, array('b' => 'testing'), true);\n\t\t$this->assertInternalType('array', $result);\n\t\t$this->assertCount(2, $result);\n\t\t$this->assertEquals(1, $result['a']);\n\t\t$this->assertEquals('testing', $result['b']);\n\t}", "public function testSearchForProductByAttribute()\n {\n // full results flag returns the full data set for the product\n }", "public function matching(Criteria $criteria)\n {\n }", "public function find($data);", "public function testObjectResult()\n {\n $result = $this->searchResult->objectResult();\n\n $this->assertObjectHasAttribute('results', $result);\n $this->assertObjectHasAttribute('status', $result);\n }", "public function testQuery(\\Jazzee\\Entity\\Answer $answer, \\stdClass $obj);", "public function find($obj){\n\t}", "public abstract function findOperationBy(array $criteria);", "public function getCriteria();", "public function testQuarantineFind()\n {\n\n }", "public function testSearch() {\n\t\t$operacionBusqueda = new Operacion;\n\t\t$operacionBusqueda->nombre = 'Radicado';\n\t\t$operacions = $operacionBusqueda->search();\n\t\t\n\t\t// valida si el resultado es mayor o igual a uno\n\t\t$this->assertGreaterThanOrEqual( count( $operacions ), 1 );\n\t}", "public function testPredicate()\n {\n $this->persistToursLambert93(false);\n $pointO = $this->persistPointO();\n $this->persistPointA();\n $this->persistPointB();\n\n $query = $this->getEntityManager()->createQuery(\n // phpcs:disable Generic.Files.LineLength.MaxExceeded\n 'SELECT p FROM LongitudeOne\\Spatial\\Tests\\Fixtures\\PointEntity p WHERE ST_EQUALS(p.point, ST_Point(:x, :y)) = true'\n // phpcs:enable\n );\n $query->setParameter('x', 0, 'integer');\n $query->setParameter('y', 0, 'integer');\n\n $result = $query->getResult();\n\n static::assertCount(1, $result);\n static::assertEquals($pointO, $result[0]);\n }", "public abstract function findHolderBy(array $criteria);", "static public function findFirst($subject, $predicate, $object, $attrs=0) {\r\n $found=array_shift(SimpleRdf::find($subject, $predicate, $object, $attrs, 1));\r\n return $found;\r\n }", "public function testFindBy() {\n\t\t\tforeach($this->users as $user) {\n\t\t\t\t$_user = User::find_by(array('conditions' => \"name = '\" . $user . \"'\"));\n\t\t\t\t$lamda = call_user_func(strtolower($user));\n\t\t\t\t//lots of redudent checking here to make sure the lamda function is also returning the right data\n\t\t\t\t$this->assertEquals($lamda->name, $_user->name);\n\t\t\t\t$this->assertEquals($user, $lamda->name);\n\t\t\t\t$this->assertEquals($user, $_user->name);\n\t\t\t\t$this->assertEquals($lamda, $_user);\n\t\t\t}\n\t\t}", "abstract protected function findOneBy(array $criteria);", "public function test_findAggregation() {\n $data = $this->SampleSet->find('all', ['conditions' => ['set_code LIKE' => 'tn%']]);\n // One confidential and one old version have being filtered\n $this->assertEquals(1, count($data));\n $this->SampleSet->username = 'sub2';\n $data = $this->SampleSet->find('all', ['conditions' => ['set_code LIKE' => 'tn%']]);\n // The confidential one has nolonger being filtered\n $this->assertEquals(2, count($data));\n }", "public abstract function find();", "public function hasCriteria();", "public function testDoCount() {\n\n $c = new Criteria();\n\n try\n {\n $this->assertEquals(2, $this->object->doCount($c));\n }catch (Exception $e)\n {\n throw $e;\n }\n\n }", "public function byCriterion()\n {\n $mockCriterion = $this->getMock('stubCriterion');\n $mockCriterion->expects($this->any())->method('toSQL')->will($this->returnValue('example'));\n $mockResult = $this->getMock('stubDatabaseResult');\n $this->mockConnection->expects($this->any())->method('query')->will($this->returnValue($mockResult));\n $mockResult->expects($this->exactly(2))->method('count')->will($this->onConsecutiveCalls(0, 1));\n $data = $this->dbEraser->deleteByCriterion($this->mockConnection, $mockCriterion, new stubReflectionClass('MockNoTableAnnotationEntity'));\n $this->assertEquals(0, $data);\n $data = $this->dbEraser->deleteByCriterion($this->mockConnection, $mockCriterion, new stubReflectionClass('MockNoTableAnnotationEntity'));\n $this->assertEquals(1, $data);\n $this->assertEquals('MockNoTableAnnotationEntitys', $this->mockQueryBuilder->getDeleteTable());\n $this->assertEquals('example', $this->mockQueryBuilder->getDeleteCriterion()->toSQL());\n }", "function testGetCriteria()\n {\n $criteria1 = $this->RubricsCriteria->getCriteria(1);\n // Compare result to fixture data\n $this->assertTrue(!empty($criteria1));\n $this->assertNotNull($criteria1);\n $this->assertEqual($criteria1[0]['RubricsCriteria']['criteria'],\n 'Participated in Team Meetings');\n $this->assertEqual($criteria1[1]['RubricsCriteria']['criteria'],\n 'Was Helpful and Co-operative');\n $this->assertEqual($criteria1[2]['RubricsCriteria']['criteria'],\n 'Submitted Work on Time');\n\n }", "public function testProfilePrototypeFindByIdLikes()\n {\n\n }", "public function match( $data );", "public function testWhere() {\n\t\t$array = array(\n\t\t\tarray('a' => 1, 'b' => 'testing'),\n\t\t\tarray('a' => 2, 'b' => 'testing'),\n\t\t\tarray('a' => 3, 'b' => 'one'),\n\t\t\tarray('a' => 2, 'b' => 'two'),\n\t\t\tarray('a' => 4, 'b' => 'three'),\n\t\t);\n\t\t$result = _::where($array);\n\t\t$this->assertInternalType('array', $result);\n\t\t$this->assertCount(0, $result);\n\n\t\t// test matching a single field in an array\n\t\t$result = _::where($array, array('b' => 'testing'));\n\t\t$this->assertInternalType('array', $result);\n\t\t$this->assertCount(2, $result);\n\t\t$this->assertEquals(1, $result[0]['a']);\n\t\t$this->assertEquals('testing', $result[0]['b']);\n\t\t$this->assertEquals(2, $result[1]['a']);\n\t\t$this->assertEquals('testing', $result[1]['b']);\n\n\t\t// test finding the first element by a single field in an array\n\t\t$result = _::where($array, array('b' => 'testing'), true);\n\t\t$this->assertInternalType('array', $result);\n\t\t$this->assertCount(2, $result);\n\t\t$this->assertEquals(1, $result['a']);\n\t\t$this->assertEquals('testing', $result['b']);\n\n\t\t// test matching objects in an array\n\t\tforeach ($array as $i => $item) {\n\t\t\t$array[$i] = (object)$item;\n\t\t}\n\t\t$result = _::where($array, array('a' => 2));\n\t\t$this->assertInternalType('array', $result);\n\t\t$this->assertCount(2, $result);\n\t\t$this->assertEquals(2, $result[1]->a);\n\t\t$this->assertEquals('testing', $result[1]->b);\n\t\t$this->assertEquals(2, $result[3]->a);\n\t\t$this->assertEquals('two', $result[3]->b);\n\t}", "abstract public function findBy($criteria);", "public function testFind() {\n\t\t$array = array(1, 2, 3);\n\t\t$result = _::find($array, function($value) {\n\t\t\treturn (4 == $value);\n\t\t});\n\t\t$this->assertEquals(null, $result);\n\n\t\t// test finding an element\n\t\t$result = _::find($array, function($value) {\n\t\t\treturn (2 == $value);\n\t\t});\n\t\t$this->assertEquals(2, $result);\n\n\t\t// test finding the first element\n\t\t$result = _::find($array, function($value) {\n\t\t\treturn ($value % 2);\n\t\t});\n\t\t$this->assertEquals(1, $result);\n\t}" ]
[ "0.6125974", "0.57594967", "0.5737834", "0.5663683", "0.5638742", "0.5592787", "0.5589237", "0.55706584", "0.5555321", "0.55334795", "0.55194634", "0.5481652", "0.5456586", "0.5441099", "0.5437106", "0.5410632", "0.5400165", "0.539853", "0.5375005", "0.53451425", "0.5343051", "0.53414845", "0.52842605", "0.5275962", "0.52753294", "0.52688646", "0.52677244", "0.52652586", "0.52596354", "0.5240909" ]
0.62691027
0
Get the calendar from this event.
public function getCalendar() { return $this->calendar; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCalendar()\r\n {\r\n if (!$this->_calendar && $this->getCalendarId()) {\r\n $this->_calendar = Mage::getModel('google/calendar')->load($this->getCalendarId());\r\n }\r\n\r\n return $this->_calendar;\r\n }", "public function getCalendar()\n {\n return IntlCalendar::fromDateTime($this);\n }", "protected function get_calendar()\n\t{\n\t\treturn $this->calendars['gregorian'];\n\t}", "public function getCalendar()\n {\n $result = new stdClass;\n $all_calendars = $GLOBALS['calendar_manager']->get(Kronolith::ALL_CALENDARS);\n if (!isset($all_calendars[$this->vars->cal]) && !$GLOBALS['conf']['share']['hidden']) {\n $GLOBALS['notification']->push(_(\"You are not allowed to view this calendar.\"), 'horde.error');\n return $result;\n } elseif (!isset($all_calendars[$this->vars->cal])) {\n // Subscribing to a \"hidden\" share, check perms.\n $kronolith_shares = $GLOBALS['injector']->getInstance('Kronolith_Shares');\n $share = $kronolith_shares->getShare($this->vars->cal);\n if (!$share->hasPermission($GLOBALS['registry']->getAuth(), Horde_Perms::READ)) {\n $GLOBALS['notification']->push(_(\"You are not allowed to view this calendar.\"), 'horde.error');\n return $result;\n }\n $calendar = new Kronolith_Calendar_Internal(array('share' => $share));\n } else {\n $calendar = $all_calendars[$this->vars->cal];\n }\n\n $result->calendar = $calendar->toHash();\n return $result;\n }", "public function calendar(): Calendar\n {\n return new Calendar($this);\n }", "public static function Get(){\n static $inst = NULL;\n if( $inst == NULL )\n $inst = new Calendar();\n return( $inst );\n }", "public function getCalendarId()\n {\n return $this->get('CalendarId');\n }", "public function get_calender_data()\n\t{\n\treturn $this->cal['VCALENDAR'];\n\t}", "public function getServiceCalendar()\n {\n $scopes = array('https://www.googleapis.com/auth/calendar');\n $credential = new Google_Auth_AssertionCredentials($this->auth_email, $scopes, $this->p12_key);\n\n $client = new Google_Client();\n $client->setAssertionCredentials($credential);\n if ($client->getAuth()->isAccessTokenExpired()) {\n $client->getAuth()->refreshTokenWithAssertion($credential);\n }\n\n return new Google_Service_Calendar($client);\n }", "public function get_calendar_id() {\n return $this->get_option( 'calendar-id', '' );\n }", "protected function _getRecurEvent()\n {\n return new Calendar_Model_Event(array(\n 'summary' => 'Breakfast',\n 'dtstart' => '2010-05-20 06:00:00',\n 'dtend' => '2010-05-20 06:15:00',\n 'description' => 'Breakfast',\n 'rrule' => 'FREQ=DAILY;INTERVAL=1', \n 'container_id' => $this->_testCalendar->getId(),\n Tinebase_Model_Grants::GRANT_EDIT => true,\n ));\n }", "protected function _getRecurEvent()\n {\n return new Calendar_Model_Event(array(\n 'summary' => 'Breakfast',\n 'dtstart' => '2010-05-20 06:00:00',\n 'dtend' => '2010-05-20 06:15:00',\n 'description' => 'Breakfast',\n 'rrule' => 'FREQ=DAILY;INTERVAL=1', \n 'container_id' => $this->_testCalendar->getId(),\n Tinebase_Model_Grants::GRANT_EDIT => true,\n ));\n }", "public function getCalendarSync()\n {\n return $this->calendarSync;\n }", "public function getCalendarFor($name);", "public function getCalendarId()\r\n {\r\n if (!$this->getData('calendar_id') && $this->_calendar instanceof Mymodules_Google_Model_Calendar) {\r\n return $this->getCalendar()->getId();\r\n }\r\n\r\n return $this->getData('calendar_id');\r\n }", "public static function getCalendarApplication();", "public function getCalendarManager() {\n \tthrow new osid_OperationFailedException('getCalendarManager() is not yet implemented.');\n \t\n \tif (!isset($this->calendarManager)) {\n \t\t$this->calendarManager = $this->impl_getRuntimeManager()->getManager(osid_OSID::CALENDAR(), 'banner_calendar_CalendarManager', '3.0.0');\n \t}\n \t\n \treturn $this->calendarManager;\n }", "private function getCalendarBagFromStore()\n {\n $bag = $this->calendarBag;\n\n return $bag;\n }", "public function getCalle()\n {\n return $this->calle;\n }", "private function getOrCreateCalendarBag()\n {\n $bag = $this->getCalendarBagFromStore();\n if (null === $bag) {\n $newBag = new CalendarBag();\n $nodename = strtolower($newBag->getSemanticNodeType());\n $newBag->setNodename($nodename);\n $this->setCalendarNodes($newBag);\n $bag = $this->getCalendarBagFromStore();\n }\n\n return $bag;\n }", "public function getDiaCalendario(){\n return $this->diaCalendario;\n }", "protected function getCalendarRoot() {\n $request = $this->getRequest();\n $session = $request->getSession();\n if (!$session->has('calendar_id')) {\n $session->set('calendar_id', '1');\n }\n $id_cal = $session->get('calendar_id');\n return $id_cal;\n }", "public static function getInstance() {\n if (!isset(self::$instance)) {\n self::$instance = new CalendarDayManager();\n }\n return self::$instance;\n }", "public function getCalendarPage();", "public function getCalendarUid ()\n {\n return $this->calendar_uid;\n }", "public function getCalendarDescription()\n {\n return $this->get('CalendarDescription');\n }", "public function setCalendarId($id)\n {\n if ($id) {\n $this->calendarId = $id;\n }\n\n return $this;\n }", "public function calendars()\n {\n return $this->hasMany('App\\Models\\Calendar');\n }", "public function getEvent()\n {\n $result = new stdClass;\n\n if (!($kronolith_driver = $this->_getDriver($this->vars->cal)) ||\n !isset($this->vars->id)) {\n return $result;\n }\n\n try {\n $event = $kronolith_driver->getEvent($this->vars->id, $this->vars->date);\n $event->setTimezone(true);\n $result->event = $event->toJson(null, true, $GLOBALS['prefs']->getValue('twentyFour') ? 'H:i' : 'h:i A');\n // If recurring, we need to format the dates of this instance, since\n // Kronolith_Driver#getEvent will return the start/end dates of the\n // original event in the series.\n if ($event->recurs() && $this->vars->rsd) {\n $rs = new Horde_Date($this->vars->rsd);\n $result->event->rsd = $rs->strftime('%x');\n $re = new Horde_Date($this->vars->red);\n $result->event->red = $re->strftime('%x');\n }\n } catch (Horde_Exception_NotFound $e) {\n $GLOBALS['notification']->push(_(\"The requested event was not found.\"), 'horde.error');\n } catch (Exception $e) {\n $GLOBALS['notification']->push($e, 'horde.error');\n }\n\n return $result;\n }", "public function setCalendar(Mymodules_Google_Model_Calendar $calendar)\r\n {\r\n $this->_calendar = $calendar;\r\n\r\n return $this;\r\n }" ]
[ "0.7920089", "0.7573589", "0.73638797", "0.72971344", "0.7145896", "0.7012212", "0.6862772", "0.6771605", "0.6688989", "0.64592737", "0.64512366", "0.64512366", "0.6415997", "0.64020973", "0.6395439", "0.63549966", "0.6231698", "0.6060423", "0.59474295", "0.5864934", "0.58567375", "0.58348215", "0.583184", "0.5818935", "0.58146787", "0.57426673", "0.5706372", "0.5691334", "0.56823736", "0.56365085" ]
0.80141985
0
Get the organiser from this event.
public function getOrganiser() { return $this->organiser; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOrganisation()\n {\n return $this->organisation;\n }", "public function organizer()\n {\n return $this->belongsTo(User::class, 'organizer_id');\n }", "public function getOrganisation()\n\t{\n\t\treturn $this->_organisation;\n\t}", "public function getOrganization()\n {\n return $this->organization;\n }", "public function getOrganization()\n {\n return $this->organization;\n }", "public function getOrganization()\n {\n return $this->organization;\n }", "public function getOrganismeAssedic() {\n return $this->organismeAssedic;\n }", "function organiser($key = null)\n {\n if(!current_route_is('organiser.*'))\n return null;\n\n $organiser = request()->route('organiser');\n\n if ($key)\n return $organiser->$key;\n\n return $organiser;\n }", "public function isOrganizer() {\n\t\treturn $this->organizer;\n\t}", "public function getOrganization()\n {\n if (array_key_exists(\"organization\", $this->_propDict)) {\n return $this->_propDict[\"organization\"];\n } else {\n return null;\n }\n }", "public function getEventPublisher()\n {\n return $this->eventPublisher;\n }", "public function getOrganisateurSpectacle() {\n return $this->organisateurSpectacle;\n }", "public function organization()\n {\n return Organization::i();\n }", "public function getOrganizationUser()\n {\n return $this->organizationUser;\n }", "public function getOrganism() {\n\t\treturn (string)$this->gpml[\"Organism\"];\n\t}", "public function getPublisher() {\n return $this->publisher;\n }", "public function getEnterer()\n {\n return $this->enterer;\n }", "function getOrganisers(&$organisers, $event)\n{\n\tif( $event->has( \"event:agent\" ) )\n\t{\n\t\tforeach( $event->all( \"event:agent\" ) as $agent )\n\t\t{\n\t\t\tif(!$agent->isType(\"http://www.w3.org/ns/org#Organization\"))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$organisers[sid((string)$agent)] = $agent->label();\n\t\t\twhile($agent->has(\"-http://www.w3.org/ns/org#hasSubOrganization\"))\n\t\t\t{\n\t\t\t\t$agent = $agent->get(\"-http://www.w3.org/ns/org#hasSubOrganization\");\n\t\t\t\t$organisers[sid((string)$agent)] = $agent->label();\n\t\t\t}\n\t\t}\n\t}\n}", "public function getCodeOrganisme(): ?string {\n return $this->codeOrganisme;\n }", "public function getOrgName()\n {\n return $this->orgName;\n }", "public function get_organizer_by_id( $organizer_id ) {\r\n\t\t$existing_organizer = get_posts( array(\r\n\t\t\t'posts_per_page' => 1,\r\n\t\t\t'post_type' => $this->oraganizer_posttype,\r\n\t\t\t'meta_key' => 'ime_event_organizer_id',\r\n\t\t\t'meta_value' => $organizer_id,\r\n\t\t\t'suppress_filters' => false,\r\n\t\t) );\r\n\r\n\t\tif ( is_array( $existing_organizer ) && ! empty( $existing_organizer ) ) {\r\n\t\t\treturn $existing_organizer[0]->ID;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public function getOrgId()\n {\n return $this->org_id;\n }", "public function getCurrentOrganization()\n {\n return $this->userLoader->getOrganization($this->getCurrentOrganizationId());\n }", "public function getOwner()\n {\n if(!($domainId = $this->getData('domainId'))) {\n return null;\n }\n \n return Core_Model_DiFactory::getClientManager()->getClientByDomain($domainId);\n }", "public function getPublisher()\n {\n if (array_key_exists(\"publisher\", $this->_propDict)) {\n return $this->_propDict[\"publisher\"];\n } else {\n return null;\n }\n }", "public function getEmployer()\n {\n return $this->employer;\n }", "public function getOwner()\n {\n return isset($this->owner) ? $this->owner : null;\n }", "public function getOrganizationId()\n {\n return $this->organization_id;\n }", "public function getOrganizationId()\n {\n return $this->organizationId;\n }", "function getOwner() \n {\n return $this->instance->getOwner();\n }" ]
[ "0.6697686", "0.6507971", "0.64969254", "0.648617", "0.648617", "0.648617", "0.6372064", "0.61768335", "0.6144404", "0.6089184", "0.60589164", "0.60294944", "0.5977343", "0.59507185", "0.5903315", "0.5806831", "0.5783075", "0.5752315", "0.57308006", "0.57056224", "0.56900215", "0.5660749", "0.5641454", "0.5633055", "0.5617995", "0.5585752", "0.5574358", "0.5565014", "0.5558102", "0.55451304" ]
0.79483306
0
Get the contact info from this event.
public function getContactInfo() { return $this->contactInfo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getContact()\n\t{\n\t\treturn $this->Info['Contact'];\n\t}", "public function getContact()\n {\n return $this->contact;\n }", "public function getContact()\n {\n return $this->contact;\n }", "public function getContact()\n {\n return $this->contact;\n }", "public function getContactInfo()\n {\n return array_filter([\n 'email' => $this->getEmail(),\n 'phoneNumber' => $this->getPhoneNumber(),\n ]);\n }", "public function getContact()\n {\n return $this->contact;\n }", "public function getContactInfo()\n {\n $phoneNumbers = [];\n if (isset($this->properties['contact_mobile_phone'])) {\n $phoneNumbers[] = $this->properties['contact_mobile_phone']->value;\n }\n if (isset($this->properties['contact_home_phone'])) {\n $phoneNumbers[] = $this->properties['contact_home_phone']->value;\n }\n $emailAddresses = [];\n if (isset($this->properties['email'])) {\n $emailAddresses[] = $this->properties['email']->value;\n }\n if (isset($this->properties['contact_alt_email'])) {\n $emailAddresses[] = $this->properties['contact_alt_email']->value;\n }\n return new Model\\ContactInfo(\n $phoneNumbers,\n $emailAddresses\n );\n }", "public function getContact()\n {\n return isset($this->contact) ? $this->contact : null;\n }", "public function getContact()\n {\n $userId = Yii::$app->user->id;\n\n if ($userId == $this->author_id) {\n return $this->recipient;\n } elseif ($userId == $this->recipient_id) {\n return $this->author;\n }\n\n }", "public function getContact(): string\n {\n return $this->_contact;\n }", "public function getContactDetailAttribute()\n {\n return $this->contact()->first();\n }", "public function getInfosContact() {\n $listeInfos = $this->getInfos(\"contact\");\n return $listeInfos;\n }", "public function getContact(): ?array\n\t{\n\t\treturn $this->contact;\n\t}", "public function get_contact(){\n $this->relative = array_shift(Relative::find_all(\" WHERE dead_no = '{$this->id}' LIMIT 1\"));\n if ($this->relative) {\n return $this->relative->contact();\n } else {\n return \"Not Specified\";\n }\n }", "public function getReadableContact()\n {\n return Extra::getBeautifulPhone($this->contact);\n }", "function getInfo()\n\t{\n\t\treturn array_merge($this->getDeveloperInfo(), $this->getContact()->getInfo());\n\t}", "public function getContact(){\n return $this->getParameter('contact');\n }", "public function getEventAddress() \n {\n return $this->_fields['EventAddress']['FieldValue'];\n }", "public function returnContact(){\n return $this->contact->getContact(); //Chama a função getContact do objeto contact\n }", "public function getIdContact()\n {\n return $this->id_contact;\n }", "public function getContactID()\n {\n return $this->get('ContactID');\n }", "public function getContactID()\n {\n return $this->get('ContactID');\n }", "public function getContactID()\n {\n return $this->get('ContactID');\n }", "public function getContactName()\n {\n return $this->contactName;\n }", "public function getContact() {\n try {\n return new Yourdelivery_Model_Contact($this->getContactId());\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n return null;\n }\n }", "public function getContactID()\n {\n return $this->ContactID;\n }", "protected function _getContactOwner()\n {\n return $this->params['name'];\n }", "public function getMainContact()\n {\n return $this->mainContact;\n }", "public function getContacts()\n {\n if (array_key_exists(\"contacts\", $this->_propDict)) {\n return $this->_propDict[\"contacts\"];\n } else {\n return null;\n }\n }", "public function getTelContact() {\n return $this->telContact;\n }" ]
[ "0.77773935", "0.729121", "0.729121", "0.729121", "0.72665775", "0.7256344", "0.7149975", "0.71452886", "0.6844479", "0.6794244", "0.658297", "0.65391105", "0.6429791", "0.64087987", "0.6387042", "0.630271", "0.62434536", "0.62045443", "0.6178928", "0.6142353", "0.61272514", "0.61272514", "0.61270726", "0.6115195", "0.61095613", "0.60818934", "0.60487974", "0.6027327", "0.6014215", "0.60121226" ]
0.7819706
0
Get the maximum amount of participants.
public function getMaxParticipants() { return $this->maxParticipants; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMaxParticipants()\n {\n return $this->max_participants;\n }", "public function limitPerParticipant()\n {\n if ($this->acceptsGuestEntries()) {\n return;\n }\n\n $limit = $this->settings['limit-per-participant'] ?? 1;\n\n return $limit !== -1 ? $limit : null;\n }", "public function getMaximumAttempts();", "public function getMaxPlayers(): int;", "public function getMaxPlayers() : int {\r\n\r\n return (int) $this->getMain()->getDatabase()->get(\"max_players\", [\"table\" => \"Games\", \"name\" => $this->getName()])->fetchArray()[0];\r\n\r\n }", "public function getMaxChatters()\n {\n return $this->maxChatters;\n }", "public function getNbParticipants()\n {\n return $this->nbParticipants;\n }", "public function getMaximumAttendees()\n {\n $query = 'select count(attendeeID) from attendees';\n if ($this->connectedModel->runQuery($query)) //query\n {\n if ($row = $this->connectedModel->getResultsRow())\n return $row[0]; //count()\n }\n else\n {\n return -1;\n }\n }", "public function getMaxcount()\n {\n return $this->maxCount;\n }", "public function getMaxLimit()\n {\n return $this->max_limit;\n }", "public function getCountMax(): int\n {\n return $this->countMax;\n }", "public function getMaximumAttendeesCount()\n {\n if (array_key_exists(\"maximumAttendeesCount\", $this->_propDict)) {\n return $this->_propDict[\"maximumAttendeesCount\"];\n } else {\n return null;\n }\n }", "public function getLimit() : int\n {\n return $this->limit;\n }", "public function maxAttempts()\n {\n return property_exists($this, 'maxAttempts') ? $this->maxAttempts : 5;\n }", "protected function getMaxItemsCount()\n {\n return $this->getParam(self::PARAM_MAX_ITEMS_TO_DISPLAY) ?: $this->getMaxCountInBlock();\n }", "public function limit(): int\n {\n return $this->limit;\n }", "public function getMaximumItemCount()\n {\n return $this->maximumItemCount;\n }", "public function getMaxPerUserId()\n {\n return $this->maxPerUserId;\n }", "public function get_maximum_tries() {\n $max = 1;\n foreach ($this->get_response_class_ids() as $responseclassid) {\n $max = max($max, $this->get_response_class($responseclassid)->get_maximum_tries());\n }\n return $max;\n }", "public function getMaxResults()\n {\n return $this->max_results;\n }", "public function getMaxNumber()\n {\n return $this->maxNumber;\n }", "public function GetMaxCount ();", "public function getMaxMessage()\n {\n return $this->getOption('max_message', 'Please add not more than %max% '\n .'number of objects.');\n }", "public function getLimit();", "public function getLimit();", "public function getLimit();", "public function getLimit();", "public function getLimit();", "public function getMaxItems()\n {\n return isset($this->max_items) ? $this->max_items : 0;\n }", "public function getMaxItemsCount() {\n\t\t\treturn $this->maxItemsCount;\n\t\t}" ]
[ "0.83796704", "0.73337865", "0.7174557", "0.71393937", "0.7088084", "0.6965768", "0.6949374", "0.6934905", "0.6926936", "0.6925162", "0.68878186", "0.6872525", "0.67364603", "0.67028195", "0.66730255", "0.665985", "0.66541666", "0.6636262", "0.66084987", "0.6601371", "0.66003674", "0.65445954", "0.6509324", "0.648952", "0.648952", "0.648952", "0.648952", "0.648952", "0.6482105", "0.6469523" ]
0.8278022
1
Get the booking period.
public function getBookingPeriod() { return $this->bookingPeriod; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPeriod() {}", "public function getPeriod();", "public function getPeriod()\n {\n return $this->period;\n }", "public function getPeriod()\n {\n return $this->period;\n }", "public function getPeriod()\n {\n return $this->period;\n }", "public function getPeriod()\n {\n return $this->period;\n }", "public function getPeriod()\n\t{\n\t\treturn $this->period;\n\t}", "public function period()\n {\n return $this->hasOne(Period::class, 'id', 'id');\n }", "public function getBookingPeriodPricing(Period $period)\n {\n $bookingPeriod = $this->getBookingPeriod($period);\n\n return $bookingPeriod->purchasedAt;\n }", "public function getActivatedPeriod()\n {\n if ($this->isDeactivatedPermanently() === false)\n throw new LogicException('The record is not deactivated permanently, and therefore has no finite, active period.');\n \n $invoker = $this->getInvoker();\n $until = $invoker->{$this->_options['until']['name']} === null?\n 'today' : $invoker->{$this->_options['until']['name']};\n \n return new DatePeriod(\n new DateTime($until),\n new DateInterval('P1D'),\n new DateTime($invoker->{$this->_options['from']['name']})\n );\n }", "public function getTabsBooking()\n {\n\n // Get the booking object\n $bookingCheck = \\tabs\\api\\client\\ApiClient::getApi()->get(\n \"/booking/{$this->getBookingId()}/tabsbooking\"\n );\n if ($bookingCheck\n && $bookingCheck->status == 200\n && $bookingCheck->response != ''\n ) {\n return \\tabs\\api\\booking\\TabsBooking::createFromNode(\n $bookingCheck->response\n );\n } else {\n throw new \\tabs\\api\\client\\ApiException(\n $bookingCheck,\n \"Booking not found\"\n );\n }\n }", "public function getCalendarPeriod()\n {\n return $this->readOneof(8);\n }", "public function getReminderPeriod()\n {\n return $this->reminderPeriod;\n }", "public function getInvoicePeriod()\n {\n return $this->invoicePeriod;\n }", "public function getPeriodo()\n {\n return $this->periodo;\n }", "public function getPeriod() : int\n {\n return $this->period;\n }", "public function getDeactivatedPeriod()\n {\n if ($this->isDeactivatedTemporarily() === false)\n throw new LogicException('The record is not deactivated temporarily, and therefore has no finite, deactivated period.');\n \n $invoker = $this->getInvoker();\n \n return new DatePeriod(\n new DateTime($invoker->{$this->_options['from']['name']}),\n new DateInterval('P1D'),\n new DateTime($invoker->{$this->_options['until']['name']})\n );\n }", "public function getEffectivePeriod()\n {\n return $this->effectivePeriod;\n }", "public function getPeriodto()\n {\n return $this->periodto;\n }", "public function getPeriodfrom()\n {\n return $this->periodfrom;\n }", "public function getEntity(): Booking\n {\n return (new Booking())\n ->setBeginsAt(new \\DateTime('2050/11/20'))\n ->setEndsAt(new \\DateTime('2050/11/25'))\n ->setTotalOccupiers(3);\n }", "public function get_recurring_period(){\n\t\treturn $this->payment['recurring_period'];\n\t}", "public function getPeriod(){\n\t\tif($this->_year>1970&&$this->_year<2038){\n\t\t\treturn date('Ym', $this->_timestamp);\n\t\t} else {\n\t\t\t$dateParts = self::_getDateParts($this->_timestamp, false);\n\t\t\treturn $dateParts['year'].$dateParts['mon'];\n\t\t}\n\t}", "public function getPeriodSinceActive()\n {\n return $this->calculatePeriodDifference($this->last_active);\n }", "public function getPeriodDatesProperty()\n {\n $now = Carbon::now()->timezone(\"America/Bogota\");\n $min = $now->copy();\n $max = $now->copy();\n\n switch ($this->period) {\n case 'today':\n break;\n case 'yesterday':\n $min->subDay();\n $max->subDay();\n break;\n case 'thisWeek':\n $min->startOfWeek();\n $max->endOfWeek();\n break;\n case 'lastWeek':\n $min->subWeek()->startOfWeek();\n $max->subWeek()->endOfWeek();\n break;\n case 'thisFortnight':\n if ($min->day > 15) {\n $min->day(16);\n $max->endOfMonth();\n } else {\n $min->startOfMonth();\n $max->startOfMonth()->addDays(14);\n }\n break;\n case 'lastFortnight':\n if ($min->day > 15) {\n $min->startOfMonth();\n $max->startOfMonth()->addDays(14);\n } else {\n $min->subMonth()->day(16);\n $max->subMonth()->endOfMonth();\n }\n break;\n case 'thisMonth':\n $min->startOfMonth();\n $max->endOfMonth();\n break;\n case 'lastMonth':\n $min->subMonth()->startOfMonth();\n $max->subMonth()->endOfMonth();\n break;\n\n default:\n # code...\n break;\n }\n\n $min->startOfDay();\n $max->endOfDay();\n $format = 'd-m-y H:i:s';\n\n return [\n 'min' => $min,\n 'minView' => $min->format($format),\n 'max' => $max,\n 'maxView' => $max->format($format),\n ];\n }", "protected function getPeriodHash()\n {\n if($this->periodTo === null && $this->periodFrom === null) {\n return false;\n }\n\n $period = array(\n 'from' => static::PERIOD_DATE_ZERO,\n 'to' => ''\n );\n\n if($this->periodFrom) {\n $period['from'] = $this->periodFrom->format(static::PERIOD_DATE_FORMAT);\n }\n\n // If no 'to' date is set, assume the current date.\n if($this->periodTo) {\n $period['to'] = $this->periodTo->format(static::PERIOD_DATE_FORMAT);\n } else {\n $period['to'] = date(static::PERIOD_DATE_FORMAT);\n }\n\n return $period;\n }", "public function getForecastPeriod()\n {\n return $this->forecast_period;\n }", "public function period()\n {\n return $this->belongsTo('App\\Period');\n }", "public function definePeriod($period)\n {\n return $period;\n }", "public function getForecastPeriod()\n {\n return $this->forecastPeriod;\n }" ]
[ "0.7230923", "0.71676385", "0.6909265", "0.6909265", "0.6909265", "0.6909265", "0.67613584", "0.65692484", "0.6470812", "0.64168024", "0.63482606", "0.6346187", "0.6337608", "0.6302562", "0.6266849", "0.62030804", "0.6163268", "0.6121682", "0.61178577", "0.6074483", "0.605462", "0.60427153", "0.5926231", "0.58546764", "0.58341354", "0.58319277", "0.5800109", "0.57643634", "0.571134", "0.5699192" ]
0.85103947
0
Set the calendar data for the event.
public function setCalendar(CultureFeed_Cdb_Data_Calendar $calendar) { $this->calendar = $calendar; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setData($data)\n {\n $this->date=$data;\n }", "function setEvent($year,$month,$day,$id=false,$url=false){\n$eventTime=$this->mkActiveTime(0,0,1,$month,$day,$year);\n\tif (!$id) $id=$this->cssEvent;\n$this->calEvents[$eventTime]=$id;\n$this->calEventsUrl[$eventTime]=$url;\n}", "public function setDates($calendarDate) {\r\n $year=substr($calendarDate,0,4);\r\n $month=substr($calendarDate,5,2);\r\n $day=substr($calendarDate,8,2);\r\n $this->calendarDate=$calendarDate;\r\n $this->day=$year . $month . $day;\r\n $this->month=$year . $month; \r\n $this->year=$year;\r\n $this->week=$year . weekNumber($calendarDate);\r\n }", "protected function setMessage(\\Google_Service_Calendar_Event $message)\n\t{\n\t\t$this->id = $message->getId();\n\t\t$this->summary = $message->getSummary();\n\t\t$this->description = $message->getDescription();\n\t}", "function setEventContent($year,$month,$day,$content,$url=false,$id=false){\n$eventTime=$this->mkActiveTime(0,0,1,$month,$day,$year);\n$eventContent[$eventTime]=$content;\n$this->calEventContent[]=$eventContent;\n\tif (!$id) $id=$this->cssEventContent;\n$this->calEventContentId[]=$id;\n\tif ($url) $this->calEventContentUrl[]=$url;\n\telse $this->calEventContentUrl[]=$this->calInit++;\n}", "public function setCalendarID($value)\n {\n return $this->set('CalendarID', $value);\n }", "public function setCalendarID($value)\n {\n return $this->set('CalendarID', $value);\n }", "public function setCalendarID($value)\n {\n return $this->set('CalendarID', $value);\n }", "public function setCalendarID($value)\n {\n return $this->set('CalendarID', $value);\n }", "public function setCalendarID($value)\n {\n return $this->set('CalendarID', $value);\n }", "public function setCalendarID($value)\n {\n return $this->set('CalendarID', $value);\n }", "public function setCalendarID($value)\n {\n return $this->set('CalendarID', $value);\n }", "public function setCalendarID($value)\n {\n return $this->set('CalendarID', $value);\n }", "public function setCalendarID($value)\n {\n return $this->set('CalendarID', $value);\n }", "private function getData()\n {\n $data = array();\n\n $data = array_merge($data,\n $this->services->CalendarData->currentUserData(),\n $this->services->Common->subPageName( $this->timber->translator->trans('Calendar') . \" | \" ),\n $this->services->Common->runtimeScripts( 'calendar' ),\n $this->services->Common->injectScripts(array(\n 'projectsEvents' => $this->services->CalendarData->projectsEvents(),\n 'tasksEvents' => $this->services->CalendarData->tasksEvents(),\n 'projectsEventsColor' => '#ecf0f1',\n 'projectsEventsTextColor' => '#2c3e50',\n 'tasksEventsColor' => '#bdc3c7',\n 'tasksEventsTextColor' => '#2980b9',\n 'calEvent_id' => $this->timber->translator->trans('ID'),\n 'calEvent_iden' => $this->timber->translator->trans('Identifier'),\n 'calEvent_type' => $this->timber->translator->trans('Type'),\n 'calEvent_mi_id' => $this->timber->translator->trans('Milestone ID'),\n 'calEvent_mi_title' => $this->timber->translator->trans('Milestone Title'),\n 'calEvent_pr_id' => $this->timber->translator->trans('Project ID'),\n 'calEvent_owner_id' => $this->timber->translator->trans('Owner ID'),\n 'calEvent_assign_to' => $this->timber->translator->trans('Assignee ID'),\n 'calEvent_assign_to_name' => $this->timber->translator->trans('Assignee Name'),\n 'calEvent_assign_to_email' => $this->timber->translator->trans('Assignee Email'),\n 'calEvent_title' => $this->timber->translator->trans('Title'),\n 'calEvent_description' => $this->timber->translator->trans('Description'),\n 'calEvent_status' => $this->timber->translator->trans('Status'),\n 'calEvent_progress' => $this->timber->translator->trans('Progress'),\n 'calEvent_priority' => $this->timber->translator->trans('Priority'),\n 'calEvent_start_at' => $this->timber->translator->trans('Start at'),\n 'calEvent_end_at' => $this->timber->translator->trans('End at'),\n 'calEvent_created_at' => $this->timber->translator->trans('Created at'),\n 'calEvent_updated_at' => $this->timber->translator->trans('Updated at'),\n 'calEvent_currency' => $this->timber->translator->trans('Currency'),\n 'calEvent_reference' => $this->timber->translator->trans('Reference'),\n 'calEvent_ref_id' => $this->timber->translator->trans('Reference ID'),\n 'calEvent_version' => $this->timber->translator->trans('Version'),\n 'calEvent_budget' => $this->timber->translator->trans('Budget'),\n 'calEvent_tax_value' => $this->timber->translator->trans('Tax Value'),\n 'calEvent_tax_type' => $this->timber->translator->trans('Tax Type'),\n 'calEvent_discount_value' => $this->timber->translator->trans('Discount Value'),\n 'calEvent_discount_type' => $this->timber->translator->trans('Discount Type'),\n 'calEvent_attach' => $this->timber->translator->trans('Attachments'),\n 'calEvent_owners' => $this->timber->translator->trans('Owners'),\n 'calEvent_staff' => $this->timber->translator->trans('Staff'),\n 'calEvent_clients' => $this->timber->translator->trans('Clients'),\n 'calEvent_staff_ids' => $this->timber->translator->trans('Staff IDs'),\n 'calEvent_clients_ids' => $this->timber->translator->trans('Clients IDs'),\n ))\n );\n\n return $data;\n }", "public function get_calender_data()\n\t{\n\treturn $this->cal['VCALENDAR'];\n\t}", "public function setDocumentData($data)\n {\n $this->id = $data['_id'];\n\n if (isset($data['channel_code'])) {\n $this->data['fields']['channel_code'] = (string) $data['channel_code'];\n }\n if (isset($data['time'])) {\n $date = new \\DateTime(); $date->setTimestamp($data['time']->sec); $this->data['fields']['time'] = $date;\n }\n\n\n \n }", "public static function initialize_calendar(){\n \n $event_array[] = array();\n $schedules = \\App\\Event::get();\n if(!empty($schedules)){\n foreach($schedules as $schedule){\n $event_array[] = array(\n 'id' => uniqid(),\n 'title' => $schedule->description,\n 'start' => date('Y-m-d', strtotime($schedule->event_date)),\n 'end' => date('Y-m-d', strtotime($schedule->event_date)),\n 'color' => \"lightblue\",\n \"textEscape\"=> 'false' ,\n 'textColor' => 'black',\n );\n }\n return $get_schedule = json_encode($event_array);\n }\n }", "protected function saveCalendarEvent(Request $request, CalendarEvent $calendar_event): void\n {\n $calendar_event->title = $request->input(\"title\");\n $calendar_event->start = Carbon::parse($request->input(\"start\"));\n $calendar_event->end = Carbon::parse($request->input(\"start\"))->addMinutes(30);\n $calendar_event->user_id = Auth::guard('admin')->check() ? $request->input(\"user_id\") : Auth::user()->getAuthIdentifier();\n $calendar_event->admin_id = $request->input('selectAdmin');\n\n $calendar_event->save();\n }", "public function setDataCalculo($dtDataCalculo) {\n $this->dtDataCalculo = $dtDataCalculo;\n }", "public function initEvent()\n {\n $this->owner->{$this->createdAtField} = date($this->format);\n $this->owner->{$this->updatedAtField} = date($this->format);\n }", "public function update() {\n $hasduedate = isset($this->mumie->duedate) && $this->mumie->duedate > 0;\n if (!$this->event && $hasduedate) {\n $this->create_calendar_event(\n self::EVENT_TYPE,\n $this->mumie->duedate\n );\n } else if ($this->event && $hasduedate) {\n $update = new \\stdClass();\n $update->name = $this->title;\n $update->timestart = $this->mumie->duedate;\n $this->event->update($update, false);\n } else if ($this->event && !$hasduedate) {\n $this->event->delete();\n }\n }", "public function eventsSetData($data) {\r\n\t\t$this->data = $data;\r\n\t\treturn( true );\r\n\t}", "public function setData(array $data)\n\t{\n\t\t$this->date_data = $data;\n\t\treturn $this;\n\t}", "public function setData( ) {\r\n\t\t\tself::callEvent('response.setData', $this, func_get_args());\r\n\t\t}", "public function set($id, CalendarEventInterface $event)\n {\n $this->events[$id] = $event;\n return $this->events;\n }", "protected function set_up()\n {\n $eventFeedText = file_get_contents(\n 'Zend/Gdata/Calendar/_files/EventFeedCompositeSample1.xml',\n true\n );\n $this->eventFeed = new Zend_Gdata_Calendar_EventFeed($eventFeedText);\n }", "public function add_event($data)\n {\n $datafields = array\n ('start' => array('req' => true)\n ,'end' => array('req' => true)\n ,'gid' => array('req' => true)\n ,'title' => array('req' => false, 'def' => '')\n ,'description' => array('req' => false, 'def' => '')\n ,'location' => array('req' => false, 'def' => '')\n ,'type' => array('req' => false, 'def' => 0)\n ,'status' => array('req' => false, 'def' => 0)\n ,'opaque' => array('req' => false, 'def' => 1)\n ,'uuid' => array('req' => false, 'def' => basics::uuid())\n );\n foreach ($datafields as $k => $v) {\n if (!isset($data[$k])) {\n if ($v['req'] === true) {\n return false;\n }\n $data[$k] = $v['def'];\n } else {\n $data[$k] = $this->esc($data[$k]);\n }\n }\n if (empty($data['gid'])) {\n $data['gid'] = 0;\n }\n\n // Am I the owner?\n if (!empty($data['gid']) && $this->getGroupOwner($data['gid']) != $this->uid) {\n // If not, I should have write permissions through a share\n if (!empty($GLOBALS['DB']->features['groups'])) {\n $perms = $GLOBALS['DB']->getUserSharedFolderPermissions($this->uid, 'calendar', $data['gid']);\n }\n if (empty($perms) || empty($perms['write'])) {\n // No, I haven't\n return false;\n }\n }\n\n $query = 'INSERT '.$this->Tbl['cal_event']\n .' (`uid`,`gid`,`starts`,`ends`,`title`,`description`,`location`,`type`,`status`,`opaque`,`uuid`,`lastmod`) VALUES ('\n .$this->uid.', \"'.$data['gid'].'\" ,\"'.$data['start'].'\",\"'.$data['end'].'\",\"'.$data['title'].'\",\"'.$data['description'].'\"'\n .',\"'.$data['location'].'\",'.doubleval($data['type']).','.doubleval($data['status']).',\"'.doubleval($data['opaque']).'\", \"'.$data['uuid'].'\",NOW())';\n if (!$this->query($query)) {\n return false;\n }\n $newId = $this->insertid();\n // Make sure, the end of an event is NOT before its beginning\n $this->query('UPDATE '.$this->Tbl['cal_event'].' SET `ends`=`starts` WHERE `ends`<`starts` AND id='.$newId);\n\n if (isset($data['attendees']) && !empty($data['attendees'])) {\n $query = 'INSERT INTO '.$this->Tbl['cal_attendee'].' (`eid`,`ref`,`name`,`email`,`role`,`type`,`status`,`mailhash`) VALUES ';\n $k = 0;\n foreach ($data['attendees'] as $v) {\n if ($k) {\n $query .= ',';\n }\n $query .= '('.doubleval($newId).',\"evt\",\"'.$this->esc($v['name']).'\",\"'.$this->esc($v['email']).'\"'\n .',\"'.$this->esc($v['role']).'\",\"'.$this->esc($v['type']).'\",'.doubleval($v['status'])\n .',\"'.$this->esc(basics::uuid()).'\")';\n $k++;\n }\n $this->query($query);\n }\n\n if (isset($data['reminders']) && !empty($data['reminders'])) {\n $query = 'INSERT INTO '.$this->Tbl['cal_reminder'].' (`eid`,`ref`,`uid`,`mode`,`time`,`text`,`smsto`,`mailto`) VALUES ';\n $k = 0;\n foreach ($data['reminders'] as $v) {\n if ($k) {\n $query .= ',';\n }\n if ($v['mode'] == '-') {\n continue;\n }\n $query .= '('.doubleval($newId).',\"evt\",'.$this->uid.',\"'.$this->esc($v['mode']).'\",'.doubleval($v['time'])\n .',\"'.$this->esc($v['text']).'\"'\n .',\"'.(!empty($v['smsto']) ? $this->esc($v['smsto']) : '').'\"'\n .',\"'.(!empty($v['mailto']) ? $this->esc($v['mailto']) : '').'\")';\n $k++;\n }\n if ($k > 0) {\n $this->query($query);\n }\n }\n if (isset($data['repetitions']) && !empty($data['repetitions'])) {\n $query = 'INSERT INTO '.$this->Tbl['cal_repetition'].' (`eid`,`ref`,`type`,`repeat`,`extra`,`until`) VALUES ';\n $k = 0;\n foreach ($data['repetitions'] as $v) {\n if ($k) {\n $query .= ',';\n }\n $query .= '('.doubleval($newId).',\"evt\",\"'.$this->esc($v['type']).'\",'.doubleval($v['repeat'])\n .','.(isset($v['extra']) && !is_null($v['extra']) ? '\"'.$this->esc($v['extra']).'\"' : '\"\"')\n .','.(isset($v['until']) && !is_null($v['until']) ? '\"'.$this->esc($v['until']).'\"' : 'NULL').')';\n $k++;\n }\n if ($k > 0) {\n $this->query($query);\n }\n } else {\n $query = 'INSERT INTO '.$this->Tbl['cal_repetition'].' (`eid`,`ref`,`type`,`repeat`,`extra`,`until`) VALUES '\n .'('.doubleval($newId).',\"evt\",\"-\",0,\"\",NULL)';\n $this->query($query);\n }\n return $newId;\n }", "private function setData($data){\n\t\n\t\t$this->setIdusuario($data['idusuario']);\n\t\t$this->setDeslogin($data['deslogin']);\n\t\t$this->setDessenha($data['dessenha']);\n\t\t$this->setDtcadastro(new DateTime($data['dtcadastro']));\t\t\n\t}", "public function setData($data)\n {\n $this->_data = $data;\n }" ]
[ "0.6326102", "0.62080693", "0.59551716", "0.5905344", "0.58078855", "0.5721358", "0.5721358", "0.57208437", "0.57203865", "0.57196915", "0.5718755", "0.5718755", "0.5718755", "0.5718755", "0.56782216", "0.5675194", "0.5636373", "0.5578467", "0.55449253", "0.55270684", "0.5507202", "0.5485339", "0.5480922", "0.5461625", "0.5436925", "0.542966", "0.539585", "0.53921574", "0.5391958", "0.53855145" ]
0.70743966
0
Set the organiser from this event.
public function setOrganiser(CultureFeed_Cdb_Data_Organiser $organiser) { $this->organiser = $organiser; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOrganiser() {\n return $this->organiser;\n }", "protected function setOrganization() {}", "public function set_organizer_key($organizer_key) {\n\t\t$_SESSION['citrix_organizer_key'] = $organizer_key;\n\t\t$this->organizer_key = $organizer_key;\n\t}", "public function organizer()\n {\n return $this->belongsTo(User::class, 'organizer_id');\n }", "public function setOrganisation($organisation)\n\t{\n\t\t$this->_organisation = $organisation;\n\t}", "public function deleteOrganiser() {\n $this->organiser = NULL;\n }", "public function isOrganizer() {\n\t\treturn $this->organizer;\n\t}", "function getOrganisers(&$organisers, $event)\n{\n\tif( $event->has( \"event:agent\" ) )\n\t{\n\t\tforeach( $event->all( \"event:agent\" ) as $agent )\n\t\t{\n\t\t\tif(!$agent->isType(\"http://www.w3.org/ns/org#Organization\"))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$organisers[sid((string)$agent)] = $agent->label();\n\t\t\twhile($agent->has(\"-http://www.w3.org/ns/org#hasSubOrganization\"))\n\t\t\t{\n\t\t\t\t$agent = $agent->get(\"-http://www.w3.org/ns/org#hasSubOrganization\");\n\t\t\t\t$organisers[sid((string)$agent)] = $agent->label();\n\t\t\t}\n\t\t}\n\t}\n}", "function setOrg( $org )\n {\n $org = trim( $org );\n $this->properties['ORG'] = $org;\n }", "public function organizers()\n {\n return $this->belongsToMany('DavideCasiraghi\\LaravelEventsCalendar\\Models\\Organizer', 'event_has_organizers', 'event_id', 'organizer_id');\n }", "public function getOrganismeAssedic() {\n return $this->organismeAssedic;\n }", "protected function setUp()\n {\n $this->object = new Organizer;\n }", "public function setAutor($autor)\n {\n $this->autor = $autor;\n }", "public function setEventManager(EventManagerInterface $eventManager)\n {\n $eventManager->setIdentifiers(array(__CLASS__, get_class($this)));\n\n $this->eventManager = $eventManager;\n }", "public function setEventManager(EventManagerInterface $eventManager)\n {\n $eventManager->setIdentifiers(array(__CLASS__, get_class($this)));\n\n $this->eventManager = $eventManager;\n }", "public function setEventManager(EventManagerInterface $eventManager)\n {\n $eventManager->setIdentifiers(array(__CLASS__, get_class($this)));\n\n $this->eventManager = $eventManager;\n }", "public function edit(Organizator $organizator)\n {\n //\n }", "public function setInspector($inspector) {\n $this->_inspector = $inspector;\n }", "function organiser($key = null)\n {\n if(!current_route_is('organiser.*'))\n return null;\n\n $organiser = request()->route('organiser');\n\n if ($key)\n return $organiser->$key;\n\n return $organiser;\n }", "public function setCodeOrganisme(?string $codeOrganisme): RetraitesEmp {\n $this->codeOrganisme = $codeOrganisme;\n return $this;\n }", "public function testSetAnnulationClient() {\n\n $obj = new Collaborateurs();\n\n $obj->setAnnulationClient(true);\n $this->assertEquals(true, $obj->getAnnulationClient());\n }", "private function set_community( $community ) {\n\t\t$this->community = $community;\n\t}", "public function setAuthor(UserInterface $author);", "public function setAuthor(UserInterface $author);", "public function setAuthor(UserInterface $author)\n {\n $this->author = $author;\n }", "public function setEventManager(EventManagerInterface $eventManager)\n {\n if ($this->eventManager === $eventManager || $eventManager === null) {\n return;\n }\n\n if ($this->eventManager !== null) {\n $this->detach($this->eventManager);\n }\n\n $this->eventManager = $eventManager;\n $this->eventManager->addIdentifiers([\n 'EntityService',\n 'PolderKnowledge\\EntityService\\Service\\EntityService',\n $this->getEntityServiceName(),\n trim($this->getEntityServiceName(), '\\\\'),\n ]);\n\n $this->attach($this->eventManager);\n }", "public function setEventManager(EventManagerInterface $eventManager)\n {\n $this->eventManager = $eventManager;\n }", "public function getOrganisation()\n {\n return $this->organisation;\n }", "public function setPresenter($presenter)\n\t{\n\t\t$this->presenter = $presenter;\n\t}", "function Organization( $org )\r\n\t\t{\r\n\t\tif( trim( $org != \"\" ) )\r\n\t\t\t$this->organization= $org;\r\n\t\t}" ]
[ "0.6622959", "0.61169004", "0.59210384", "0.5665311", "0.5624373", "0.56112605", "0.5436014", "0.5255994", "0.51777697", "0.5140903", "0.5056154", "0.50486976", "0.50321203", "0.5020482", "0.5020482", "0.5020482", "0.5015321", "0.49897176", "0.4970243", "0.49462056", "0.49192056", "0.48956954", "0.4891", "0.4891", "0.488938", "0.48780406", "0.48684648", "0.48647848", "0.48354313", "0.48285642" ]
0.72573936
0
Delete the organiser from this event.
public function deleteOrganiser() { $this->organiser = NULL; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function destroy(Organizator $organizator)\n {\n //\n }", "public function remove_organiser($memberid){\n $sql = \"DELETE FROM tournamentOrganisers WHERE tournamentID=$this->id AND organiserID=$memberid\";\n $result = self::$database->query($sql);\n }", "public function delete()\n {\n if ($this->sportevent) {\n return $this->sportevent->delete();\n }\n }", "public function delete(): void\n {\n $this->record(new AgendaWasDeleted($this->identity));\n }", "public function destroy($event_id,$presenter)\n {\n $event = Event::find($event_id);\n if($event->organiser->id != auth()->user()->id){\n return redirect()->route(\"events.index\");\n }\n if($event->presenters()->where(\"user_id\",$presenter)->count() == 1){\n $event->presenters()->detach($presenter);\n }\n return redirect()->route(\"presenters.create\",['event_id'=>$event_id]);\n\n }", "public function delete($organization);", "public function destroy($id)\n {\n $organisation = Organisation::find($id);\n $organisation->delete();\n }", "public function destroy($distributor_id)\n {\n if(auth()->user()->hasPermissionTo('distributor-delete')){\n $distributor = $this->model->show($distributor_id); \n $details = Distributors::where([\n \"distributor_id\" => $distributor_id, \n ])->first();\n // $email = $details->email;\n // $user = User::where([\n // \"email\" => $email, \n // ])->first();\n // $user_id = $user->user_id;\n \n $details= $distributor->name; \n $log = new ActivityLog([\n \"operations\" => \"Deleted \". \" \". $details. \" \". \" From The Distributors List\",\n \"user_id\" => Auth::user()->user_id,\n ]);\n if (($distributor->delete($distributor_id)) AND ($distributor->trashed())) {\n $user->removeRole(\"Distributor\");\n return redirect()->back()->with([\n 'success' => \"You Have Deleted \". \" \". $details. \" \". \"From The Distributor Details Successfully\",\n ]);\n }\n } else{\n return redirect()->back()->with([\n 'error' => \"You Dont have Access To Delete A Distributor\",\n ]);\n }\n }", "public function delete()\n {\n DB::transaction(function () {\n $this->devedores()->delete();\n parent::delete();\n });\n }", "public function destroy(Designation $designation)\n {\n //\n }", "public function delete()\n {\n $workflow = $this->site->getWorkflows()->create(\n 'remove_site_organization_membership',\n ['params' => ['organization_id' => $this->id,],]\n );\n return $workflow;\n }", "public function deleteEvent($event)\n {\n $this->entityManager->remove($event);\n $this->entityManager->flush();\n }", "public function delete() {\r\n\r\n\t\t// Does the Genre object have an ID?\r\n\t\tif ( is_null( $this->id ) ) trigger_error ( \"Genre::delete(): Attempt to delete an Genre object that does not have its ID property set.\", E_USER_ERROR );\r\n\r\n\t\t// Delete the Article\r\n\t\t$conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD );\r\n\t\t$st = $conn->prepare ( \"DELETE FROM :table WHERE id = :id LIMIT 1\" );\r\n\t\t$st->bindValue( \":table\", DB_TBL_GENRE, PDO::PARAM_STR );\r\n\t\t$st->bindValue( \":id\", $this->id, PDO::PARAM_INT );\r\n\t\t$st->execute();\r\n\t\t$conn = null;\r\n\t}", "public function destroy(Attendace $attendace)\n {\n //\n }", "public function delete()\n {\n $this->_validateModifiable();\n\n $this->_getDataSource()->delete($this);\n }", "public function destroy($id)\n {\n $Organizer = User::where('role','Organizer')->findOrFail($id);\n\n $Organizer->delete();\n\n if ($Organizer) {\n return ['Success'=>'Organizer Deleted Successfuly.'];\n }else{\n return ['Erorr'=>'Try Agin Later.'];\n }\n }", "public function delete() {\r\n\t\t$this->getMapper()->delete($this);\r\n\t}", "public function destroy(DesignInstitute $designInstitute)\n {\n //\n }", "public function destroy(Employer $employer)\n {\n //\n }", "public function delete(){\n $this->probe_requests()->detach();\n\n // Delete the event itself\n $result = parent::delete();\n\n return $result;\n }", "public function destroy(Agenda $agenda)\n {\n //\n }", "public function destroy(Corporate $corporate)\n {\n dd('delete corporate');\n }", "public function destroy(Event $event)\n {\n $event->delete();\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($group_id,$corporation_id)\n {\n $seatgroup=Seatgroup::find($group_id);\n $name=$seatgroup->corporation()->find($corporation_id)->get();\n $seatgroup->corporation()->detach($corporation_id);\n\n return redirect()->back()->with('success', $name->pluck('name'). ' removed');\n\n }", "public function destroy(Org $org)\n {\n //\n }", "function delete() {\n $this->that->delete($this->id, $this->name);\n $this->put_id();\n }", "public function destroy(Volunteer $volunteer)\n {\n //\n }", "public function delete()\n {\n $this->repository->delete($this->id);\n }" ]
[ "0.69003993", "0.631365", "0.59371656", "0.5741597", "0.57172453", "0.5633651", "0.55949855", "0.5469599", "0.54365337", "0.5415219", "0.5362119", "0.53501904", "0.53059244", "0.53002864", "0.52841663", "0.5278787", "0.5266372", "0.5265326", "0.5262433", "0.5243839", "0.52348393", "0.5230527", "0.52273977", "0.522355", "0.52199006", "0.52091575", "0.51912534", "0.5184566", "0.518366", "0.51755154" ]
0.79746175
0
Set the maximum amount of participants.
public function setMaxParticipants($maxParticipants) { $this->maxParticipants = $maxParticipants; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setMaxParticipants($max_participants)\n {\n $this->max_participants = $max_participants;\n }", "public function setMaxParticipants(int $maxParticipants): self\n {\n $this->options['maxParticipants'] = $maxParticipants;\n return $this;\n }", "public function set_group_default_max_recipients()\n\t{\n\t\t$sql = 'UPDATE ' . GROUPS_TABLE . ' SET group_max_recipients = 5\n\t\t\tWHERE ' . $this->db->sql_in_set('group_name', array('GUESTS', 'REGISTERED', 'REGISTERED_COPPA', 'BOTS'));\n\t\t$this->sql_query($sql);\n\t}", "public function setMax( int $max ): void {\n\t\t\t$this->maximum = $max;\n\t\t}", "public function setMaximum($value) {\r\n $this->internalSetMaximum($value);\r\n }", "public function SetMaxCount ($maxCount);", "public function setMaximumValue(int $maximumValue): void;", "public function getMaxParticipants() {\n return $this->maxParticipants;\n }", "public function setMaxLength(int $max):void {\r\n\t\t$this->maxLength = $max;\r\n\t}", "public function setLimit ($value)\r\n\t{\r\n\t\t$this->limit = $value;\r\n\t}", "public function getMaxParticipants()\n {\n return $this->max_participants;\n }", "public function setMaxChatters($var)\n {\n GPBUtil::checkInt32($var);\n $this->maxChatters = $var;\n\n return $this;\n }", "public function test_admin_set_max_num_players()\n {\n $this->assertTrue($this->postScriptumServer->adminSetMaxNumPlayers(78));\n }", "public function setMaximumAttendeesCount($val)\n {\n $this->_propDict[\"maximumAttendeesCount\"] = intval($val);\n return $this;\n }", "public function setMaxAttendees($value)\n {\n return $this->set('MaxAttendees', $value);\n }", "public function test_admin_set_max_num_players()\n {\n $this->assertTrue($this->btwServer->adminSetMaxNumPlayers(78));\n }", "public function test_admin_set_max_num_players()\n {\n $this->assertTrue($this->btwServer->adminSetMaxNumPlayers(78));\n }", "public function setMaxValue($maxValue);", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }", "public function setLimit($value)\n {\n return $this->set('Limit', $value);\n }" ]
[ "0.78886503", "0.77239615", "0.6783981", "0.67523926", "0.6752334", "0.67200416", "0.66341704", "0.66165245", "0.6608612", "0.660743", "0.6554045", "0.65503496", "0.6531691", "0.6506651", "0.648476", "0.6442044", "0.6442044", "0.6341335", "0.6337405", "0.6337405", "0.6337405", "0.6337405", "0.6337405", "0.6337405", "0.6337405", "0.6337405", "0.6337405", "0.6337405", "0.6337405", "0.6337405" ]
0.8105075
0
Set the booking period.
public function setBookingPeriod(CultureFeed_Cdb_Data_Calendar_BookingPeriod $bookingPeriod) { $this->bookingPeriod = $bookingPeriod; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setPeriod($_period){\n\t\t$this->period=$_period;\n\t}", "private function _setBookingData()\n {\n // Request the booking data from the tabs api instance\n $booking = \\tabs\\api\\booking\\booking::createBookingFromId(\n $this->getBookingId()\n );\n\n // Loop through the accessors of the requested booking object\n if ($booking) {\n $reflection = new \\ReflectionObject($booking->getPricing());\n foreach ($reflection->getProperties(\\ReflectionProperty::IS_PROTECTED) as $property) {\n $setter = 'set' . ucfirst($property->name);\n $getter = 'get' . ucfirst($property->name);\n $this->$setter($booking->$getter());\n }\n }\n \n return $this;\n }", "public function getBookingPeriod() {\n return $this->bookingPeriod;\n }", "public function setPeriod($value)\n {\n return $this->set('Period', $value);\n }", "public function setPeriod($value)\n {\n return $this->set('Period', $value);\n }", "public function setPeriod($value)\n {\n return $this->set('Period', $value);\n }", "public function setAccelerationPeriod($period)\n {\n $payload = '';\n $payload .= pack('V', $period);\n\n $this->sendRequest(self::FUNCTION_SET_ACCELERATION_PERIOD, $payload);\n }", "public function setUntil(DateTime $oUntil)\n\t{\n\t\t$this->aParameters['until'] = $oUntil->format('Y-m-d');\n\t}", "public function setOpenPeriod(?int $openPeriod): void\n {\n $this->openPeriod = $openPeriod;\n }", "public function setAngularVelocityPeriod($period)\n {\n $payload = '';\n $payload .= pack('V', $period);\n\n $this->sendRequest(self::FUNCTION_SET_ANGULAR_VELOCITY_PERIOD, $payload);\n }", "public function setPeriod($period)\n {\n $this->period = $period;\n return $this;\n }", "public function set(int $offset, Period $interval): void\n {\n $this->periods[$this->getOffset($offset)] = $interval;\n }", "function lb_subscription_set_billing_period($account, $subscription, $billing_period) {\n // The $account that rules passes contains the original information, which may have\n // changed as a result of an action that has run.\n $entity = entity_load_single('user', $account->uid);\n $account_subscription_data = lb_subscription_retrieve_account_subscription_data($entity, $subscription);\n if ($account_subscription_data['delta'] === NULL) {\n lb_subscription_set_subscription($entity, $subscription);\n $entity = entity_load_single('user', $account->uid);\n $account_subscription_data = lb_subscription_retrieve_account_subscription_data($entity, $subscription);\n }\n if ($account_subscription_data['delta'] !== NULL) {\n if ($account_subscription_data['billing_period'] != $billing_period) {\n $entity->field_subscription[LANGUAGE_NONE][$account_subscription_data['delta']]['field_billing_period'] = array(\n LANGUAGE_NONE => array(\n 0 => array(\n 'value' => $billing_period,\n ),\n ),\n );\n entity_save('user', $entity);\n }\n }\n}", "public function setCertificateValidityPeriod(?int $value): void {\n $this->getBackingStore()->set('certificateValidityPeriod', $value);\n }", "protected function enableApplicationsPeriod()\n {\n $settings = app('settings');\n $settings->applications_start_at = Carbon::yesterday();\n $settings->applications_end_at = Carbon::tomorrow();\n $settings->min_team_members = 2;\n $settings->max_team_members = 4;\n $settings->save();\n }", "public function setCertificateValidityPeriodValue(?int $value): void {\n $this->getBackingStore()->set('certificateValidityPeriodValue', $value);\n }", "private function set_date()\r\n\t{\r\n\t\tif ($this->month > 12)\r\n\t\t{\r\n\t\t\t$this->month=1;\r\n\t\t\t$this->year++;\r\n\t\t}\r\n\r\n\t\tif ($this->month < 1)\r\n\t\t{\r\n\t\t\t$this->month=12;\r\n\t\t\t$this->year--;\r\n\t\t}\r\n\r\n\t\tif ($this->year > 2037) $this->year = 2037;\r\n\t\tif ($this->year < 1971) $this->year = 1971;\r\n\t}", "public function setPeriod(\\TNTExpressConnect\\Tracking\\XSD\\Period $period)\n {\n $this->period = $period;\n return $this;\n }", "public function setPeriod(int $period) : self\n {\n $this->period = $period;\n return $this;\n }", "public function definePeriod($period)\n {\n return $period;\n }", "function set( $start = 0, $end = NULL )\n {\n $this->setStart( $start );\n \n if ( NULL === $end )\n {\n $this->setEnd( $start );\n }\n else\n {\n switch ( $end )\n {\n \tcase 'year': \n // add one year to end\n \t\tbreak;\n \tcase 'month':\n \t\t// add one month\n \t\tbreak;\n \tcase 'week': \n // add one year to end\n \t\tbreak;\n \tcase 'day': \n // add one year to end\n \t\tbreak;\n \tcase 'calendarweek': \n // set start and end date to start and end of week for current date\n $this->start->date->setToStartOfWeek();\n $this->setEnd( $start );\n $this->end->date->setToEndOfWeek();\n \t\tbreak;\n \tdefault:\n $this->setEnd( $end );\n } // switch\n }\n \n //$this->updatePorperties();\n }", "protected function disableApplicationsPeriod()\n {\n $settings = app('settings');\n $settings->applications_start_at = Carbon::yesterday();\n $settings->applications_end_at = Carbon::yesterday();\n $settings->save();\n }", "public function setPeriod($period)\n\t{\n\t\t$this->period = $period;\n\n\t\treturn $this;\n\t}", "public function setDebouncePeriod($debounce)\n {\n $payload = '';\n $payload .= pack('V', $debounce);\n\n $this->sendRequest(self::FUNCTION_SET_DEBOUNCE_PERIOD, $payload);\n }", "public function setBookingId(?string $bookingId): void\n {\n $this->bookingId = $bookingId;\n }", "public function setBookings(?array $bookings): void\n {\n $this->bookings = $bookings;\n }", "private function setDate(){\n\t// Validate incoming parameters\n\t\t$this->di->logger->stamp(__CLASS__, __METHOD__, '');\n\tif (isset($_GET['month'])) {\n\t\tis_numeric($_GET['month']) or die('month has to be numeric');\n\t}\n\tif (isset($_GET['year'])) {\n\t\tis_numeric($_GET['year']) or die('year has to be numeric');\n\t}\n\n\t// Set new date\n\t$this->newMonth = isset($_GET['month']) ? ($_GET['month']) : $this->currentMonth;\n\t$this->newYear = isset($_GET['year']) ? ($_GET['year']) : $this->currentYear;\n\n\tif ($this->newMonth > 12) {\n\t\t$this->newYear = $this->newYear +1;\n\t\t$this->newMonth = 1;\n\t\t$_GET['month'] = 1;\n\n\t}\n\telse if ($this->newMonth < 1) {\n\t\t$this->newYear = $this->newYear -1;\n\t\t$this->newMonth = 12;\n\t\t$_GET['month'] = 12;\n\t}\n\t\n\t}", "public function setPaid()\n {\n $this->update([\n 'status' => self::STATUS_PAID,\n 'paid_date' => Carbon::now(),\n ]);\n }", "public function setOrientationPeriod($period)\n {\n $payload = '';\n $payload .= pack('V', $period);\n\n $this->sendRequest(self::FUNCTION_SET_ORIENTATION_PERIOD, $payload);\n }", "public function setSchedule ()\n {\n $this->loadComponent('DateTime');\n $this->loadModel('ScheduleTime');\n $data = $this->Auth->user();\n $id_fortune = $data['id'];\n $days = $this->DateTime->allDayInWeek();\n $months = $this->DateTime->allDayInMonth();\n $times = $this->ScheduleTime->getListTime();\n if ($this->Check->isId($id_fortune)) {\n $this->set([\n 'times' => $times,\n 'days' => $months,\n 'id' => $id_fortune\n ]);\n } else{\n $this->Flash->error(__('Id not found'));\n }\n }" ]
[ "0.7051499", "0.5833409", "0.5730289", "0.5631127", "0.5631127", "0.5631127", "0.56135935", "0.55542153", "0.5504153", "0.5479121", "0.5470114", "0.5467011", "0.54498273", "0.5427049", "0.54265", "0.5397962", "0.53862077", "0.5379819", "0.5339468", "0.53365767", "0.5327102", "0.5323707", "0.53229195", "0.53090286", "0.52906597", "0.5285673", "0.526753", "0.51790905", "0.50871253", "0.5078345" ]
0.65940213
1
Select Random Question for create random quizz
public function randomQuestion() { return $this->createQueryBuilder('qb') ->orderBy('RAND()') ->setMaxResults($this->maxResult) ->getQuery() ->getResult() ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function generateQuestion()\n\t{\n\t\t//get random question type\n\t\t$type = $this->questionTypes[array_rand($this->questionTypes)];\n\n\t\t//get random section\n\t\t$section = $this->getRandomSection();\n\n\t\t//get random function (within the above section)\n\t\t$function = $this->getRandomFunction($section);\n\n\t\t$question = [];\n\t\t$question['type'] = $type;\n\t\t$question['section'] = $section;\n\t\t$question['function'] = $function;\n\t\t$question['text'] = \"{$section} now, {$this->questionTextPerType[$type]}\";\n\t\t$question['choices'] = [];\n\t\t$question['answer_text'] = '';\n\t\t$question['answer_index'] = '';\t//in ['choices'] array\n\n\n\t\treturn $this->fillQuestion($question);\n\t}", "function get_question_random_simple() {\n global $default_terms_array;\n $session = new Session();\n $questions = get_questions($default_terms_array);\n\n for ($i = 0; $i < sizeof($questions); $i++) {\n\n $question = $questions[array_rand($questions) ];\n\n // if the question hasn't already been asked recently OR we're not remembering things in the session, return it\n if ((!$session->get('random_questions_asked') || ($session->get('random_questions_asked') && !in_array($question->get_ID(), $session->get('random_questions_asked'))))) {\n return $question;\n }\n }\n\n return $questions[array_rand($questions) ];\n}", "public function test_quizp_with_random_question_attempt_walkthrough() {\n global $SITE;\n\n $this->resetAfterTest(true);\n question_bank::get_qtype('random')->clear_caches_before_testing();\n\n $this->setAdminUser();\n\n // Make a quizp.\n $quizpgenerator = $this->getDataGenerator()->get_plugin_generator('mod_quizp');\n\n $quizp = $quizpgenerator->create_instance(array('course' => $SITE->id, 'questionsperpage' => 2, 'grade' => 100.0,\n 'sumgrades' => 4));\n\n $questiongenerator = $this->getDataGenerator()->get_plugin_generator('core_question');\n\n // Add two questions to question category.\n $cat = $questiongenerator->create_question_category();\n $saq = $questiongenerator->create_question('shortanswer', null, array('category' => $cat->id));\n $numq = $questiongenerator->create_question('numerical', null, array('category' => $cat->id));\n\n // Add random question to the quizp.\n quizp_add_random_questions($quizp, 0, $cat->id, 1, false);\n\n // Make another category.\n $cat2 = $questiongenerator->create_question_category();\n $match = $questiongenerator->create_question('match', null, array('category' => $cat->id));\n\n quizp_add_quizp_question($match->id, $quizp, 0);\n\n $multichoicemulti = $questiongenerator->create_question('multichoice', 'two_of_four', array('category' => $cat->id));\n\n quizp_add_quizp_question($multichoicemulti->id, $quizp, 0);\n\n $multichoicesingle = $questiongenerator->create_question('multichoice', 'one_of_four', array('category' => $cat->id));\n\n quizp_add_quizp_question($multichoicesingle->id, $quizp, 0);\n\n foreach (array($saq->id => 'frog', $numq->id => '3.14') as $randomqidtoselect => $randqanswer) {\n // Make a new user to do the quizp each loop.\n $user1 = $this->getDataGenerator()->create_user();\n $this->setUser($user1);\n\n $quizpobj = quizp::create($quizp->id, $user1->id);\n\n // Start the attempt.\n $quba = question_engine::make_questions_usage_by_activity('mod_quizp', $quizpobj->get_context());\n $quba->set_preferred_behaviour($quizpobj->get_quizp()->preferredbehaviour);\n\n $timenow = time();\n $attempt = quizp_create_attempt($quizpobj, 1, false, $timenow);\n\n quizp_start_new_attempt($quizpobj, $quba, $attempt, 1, $timenow, array(1 => $randomqidtoselect));\n $this->assertEquals('1,2,0,3,4,0', $attempt->layout);\n\n quizp_attempt_save_started($quizpobj, $quba, $attempt);\n\n // Process some responses from the student.\n $attemptobj = quizp_attempt::create($attempt->id);\n $this->assertFalse($attemptobj->has_response_to_at_least_one_graded_question());\n\n $tosubmit = array();\n $selectedquestionid = $quba->get_question_attempt(1)->get_question()->id;\n $tosubmit[1] = array('answer' => $randqanswer);\n $tosubmit[2] = array(\n 'frog' => 'amphibian',\n 'cat' => 'mammal',\n 'newt' => 'amphibian');\n $tosubmit[3] = array('One' => '1', 'Two' => '0', 'Three' => '1', 'Four' => '0'); // First and third choice.\n $tosubmit[4] = array('answer' => 'One'); // The first choice.\n\n $attemptobj->process_submitted_actions($timenow, false, $tosubmit);\n\n // Finish the attempt.\n $attemptobj = quizp_attempt::create($attempt->id);\n $this->assertTrue($attemptobj->has_response_to_at_least_one_graded_question());\n $attemptobj->process_finish($timenow, false);\n\n // Re-load quizp attempt data.\n $attemptobj = quizp_attempt::create($attempt->id);\n\n // Check that results are stored as expected.\n $this->assertEquals(1, $attemptobj->get_attempt_number());\n $this->assertEquals(4, $attemptobj->get_sum_marks());\n $this->assertEquals(true, $attemptobj->is_finished());\n $this->assertEquals($timenow, $attemptobj->get_submitted_date());\n $this->assertEquals($user1->id, $attemptobj->get_userid());\n $this->assertTrue($attemptobj->has_response_to_at_least_one_graded_question());\n\n // Check quizp grades.\n $grades = quizp_get_user_grades($quizp, $user1->id);\n $grade = array_shift($grades);\n $this->assertEquals(100.0, $grade->rawgrade);\n\n // Check grade book.\n $gradebookgrades = grade_get_grades($SITE->id, 'mod', 'quizp', $quizp->id, $user1->id);\n $gradebookitem = array_shift($gradebookgrades->items);\n $gradebookgrade = array_shift($gradebookitem->grades);\n $this->assertEquals(100, $gradebookgrade->grade);\n }\n }", "public static function generateQuestion()\n {\n $lhOperand = rand(0,10); //randomises left hand operand\n $rhOperand = rand(0,10); //randomises right hand operand\n $operator = rand(0,2); //randomises operator\n switch($operator)\n {\n case 0: self::$answer=($lhOperand+$rhOperand);\n $question = \"$lhOperand+$rhOperand\";\n break;\n case 1: self::$answer=($lhOperand-$rhOperand);\n $question = \"$lhOperand-$rhOperand\";\n break;\n case 2: self::$answer=($lhOperand*$rhOperand);\n $question = \"$lhOperand*$rhOperand\";\n break;\n }\n //var_dump($question);\n var_dump(self::$answer);\n return $question;\n }", "public function newMathQuestion(): void {\n\t\t$this->rndNumber1 = random_int(1, 10);\n\t\t$this->rndNumber2 = random_int(1, 10);\n\t\t$this->rndOperator = random_int(0, 2);\n\t\t$this->calcResult();\n\t}", "public function randomQuestion(): void\n {\n $expectedQuestion = QuestionUserHelper::createScheduledQuestionForUser($this->user)->question()->first();\n $randomQuestions = $this->user->randomUserQuestion();\n\n $this->assertTrue($randomQuestions->contains($expectedQuestion));\n }", "private function generateQuestion(){\n\t\t\t$questions = array(\n\t\t\t\t\tarray('name' => 'chevrolet', 'logo' => 'chevrolet.png'),\n\t\t\t\t\tarray('name' => 'playboy', 'logo' => 'playboy.png'),\n\t\t\t\t\tarray('name' => 'shell', 'logo' => 'shell.png'),\n\t\t\t\t\tarray('name' => 'java', 'logo' => 'java.png'),\n\t\t\t\t\tarray('name' => 'mysql', 'logo' => 'mysql.png'),\n\t\t\t\t\tarray('name' => 'postgresql', 'logo' => 'postgresql.png'),\n\t\t\t\t\tarray('name' => 'chrome', 'logo' => 'chrome.png'),\n\t\t\t\t\tarray('name' => 'firefox', 'logo' => 'firefox.png'),\n\t\t\t\t\tarray('name' => 'bluetooth', 'logo' => 'bluetooth.png'),\n\t\t\t\t\tarray('name' => 'twitter', 'logo' => 'twitter.png')\n\t\t\t\t);\n\t\t\t\t\n\t\t\t$index = rand(0, count($questions) - 1);\n\t\t\t\n\t\t\t$this->session->set('gl_answer', $questions[$index]['name']);\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t\t\t\t'type' => 'image',\n\t\t\t\t\t\t\t'originalContentUrl' => $this->image_url . $questions[$index]['logo'],\n\t\t\t\t\t\t\t'previewImageUrl' => $this->image_url . $questions[$index]['logo']\n\t\t\t\t\t\t);\n\t\t}", "public static function random_victory_quote(){\n $temp_text_options = array('Awesome work!', 'Nice work!', 'Fantastic work!', 'Great work!', 'Super work!', 'Amazing work!', 'Fabulous work!');\n $temp_text = $temp_text_options[array_rand($temp_text_options)];\n return $temp_text;\n }", "private function generateNextQuestion(){\n while(true) {\n $id = rand($this->minId, /*$this->maxId*/20);\n\n if (!in_array($id, $this->answeredQuestions)) {\n array_push($this->answeredQuestions,$id);\n return $id;\n }\n }\n }", "private function generate_question() {\n\n require_once(__DIR__ . '/csv_gd.class.php');\n $csv_filename = $this->configuration['base_data_dir'] . '/csv/' . $this->configuration['csv_input'];\n\n $data_quiz_src_obj = new csv_gd($csv_filename);\n $data_quiz_src_orig = $data_quiz_src_obj->csv_to_array();\n\n\n\n // filter unwanted question (tags, diff level, void )\n $data_quiz_src_filtered = $this->quiz_filter($data_quiz_src_orig, $this->configuration['tags'], $this->configuration['min_diffucult_level'], $this->configuration['max_diffucult_level']);\n\n\n // reverse question with_answer\n if ($this->configuration['reverse_question'] == TRUE) {\n $data_quiz_src_filtered = $this->quiz_switch_question_with_answer($data_quiz_src_filtered);\n }\n\n\n // generate question and answer\n $data_quiz_src = $this->quiz_generate($data_quiz_src_filtered);\n\n\n // randomize quiz \n if ($this->configuration['randomize_question'] == TRUE) {\n shuffle($data_quiz_src);\n }\n\n\n // restrict the maxium number of question\n if ($this->configuration['max_question_total'] > 0) {\n $this->configuration['max_question_total'] = min(count($data_quiz_src), $this->configuration['max_question_total']);\n } else {\n $this->configuration['max_question_total'] = count($data_quiz_src);\n }\n $this->question = array_slice($data_quiz_src, 0, $this->configuration['max_question_total']);\n\n $this->configuration['debug']=$this->debug;\n\n // return $this->quiz_questions;\n }", "public function getRandomQuiz(){\n // dd('here');\n $quiz = Quiz::inRandomOrder()->first();\n return $quiz;\n }", "function generateQuestion(){\n $rangeLow = 1;\n $rangeHigh = 100;\n $incorrectNumberHigh = 10;\n\n $leftAdder = random_int($rangeLow, $rangeHigh);\n $rightAdder = random_int($rangeLow, $rangeHigh);\n $correctAnswer = $leftAdder + $rightAdder;\n //generate init values for envaluation\n $incorrectAnswerFirst = random_int($correctAnswer-$incorrectNumberHigh, $correctAnswer+$incorrectNumberHigh);\n $incorrectAnswerSecond = random_int($correctAnswer-$incorrectNumberHigh , $correctAnswer+$incorrectNumberHigh);\n\n //if the condition not met, keep generated\n while(\n ($incorrectAnswerFirst == $correctAnswer) \n || \n ($incorrectAnswerFirst == $incorrectAnswerSecond)\n ||\n ($incorrectAnswerSecond == $correctAnswer)\n ){\n $incorrectAnswerFirst = random_int($correctAnswer-$incorrectNumberHigh, $correctAnswer+$incorrectNumberHigh);\n $incorrectAnswerSecond = random_int($correctAnswer-$incorrectNumberHigh , $correctAnswer+$incorrectNumberHigh);\n }\n $questions =\n [\n \"leftAdder\" => $leftAdder,\n \"rightAdder\" => $rightAdder,\n \"correctAnswer\" => $correctAnswer,\n \"firstIncorrectAnswer\" => $incorrectAnswerFirst,\n \"secondIncorrectAnswer\" => $incorrectAnswerSecond\n ];\n\n\n return $questions;\n}", "public function random(Request $request)\n {\n // return response($request->all());\n $topic = Topic::whereId($request->topic)->withCount('questions')->first();\n $q = $topic->questions()->inRandomOrder()->where('difficulty', $request->difficulty)->limit(10)->get();\n\n $quiz = Quiz::create([\n 'name' => 'Random '. $topic->name,\n 'time_limit' => null,\n 'desc' =>\n '<ul class=\"list-disc list-inside\">\n <li>\n You should complete this quiz in one session — However you can leaveand start from where you left.\n </li>\n <li>\n This is a random quiz generated with AI.\n </li>\n <li>\n You can find your progress and results in \"My Quizes\" section. \n </li>\n </ul>',\n 'user_id' => Auth::user()->id,\n 'quiz_type' => 'Random',\n 'difficulty' => $request->difficulty\n ]);\n $quiz->questions()->sync($q);\n $quiz->users()->attach(Auth::user()->id);\n return redirect('/quiz/'.$quiz->id);\n }", "public function randomQuestionWithSelfsameBag(): void\n {\n $unexpectedQuestion1 = QuestionUserHelper::createScheduledQuestionForUser($this->user)->question()->first();\n $unexpectedQuestion2 = QuestionUserHelper::createScheduledQuestionForUser($this->user)->question()->first();\n\n $questionsList = $this->user->randomUserQuestion('soft', [$unexpectedQuestion1->id, $unexpectedQuestion2->id]);\n\n $this->assertFalse($questionsList->contains($questionsList));\n $this->assertEmpty($questionsList);\n }", "function set_up_question($question_ID)\r\n{\r\n\tglobal $mydb, $question, $answers, $correct_answer, $is_question, $is_random_question;\r\n\t\r\n\t// set the is question global variable\r\n\t$is_question = true;\r\n\r\n\tif (($question_ID == \"random\") || !$question_ID)\r\n\t{\r\n\t\t$is_random_question = true;\r\n\t\t$question = get_question_random();\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$is_random_question = false;\r\n\t\t$question = get_question_from_ID($question_ID);\r\n\r\n\t}\r\n\t\r\n\t// get random answers\r\n\t$answers = $question->get_Answers();\r\n\t\r\n\t// get the correct answer and remember it\r\n\tforeach ($answers as $answer)\r\n\t{\r\n\t\tif ($answer->is_correct())\r\n\t\t{\r\n\t\t\t$correct_answer = $answer;\r\n\t\t}\r\n\t}\r\n}", "public function generateChoices(array $question)\n\t{\n\t\t[$inputMode, $inputExpectation, $notUseful, $from] = explode('_', $question['type']);\n\n\t\tif($this->config['cross_sections_for_possible_answers'])\n\t\t{\n\t\t\t//TODO\n\t\t}\n\n\t\telse\n\t\t{\n\t\t\t//leave space for the correct answer to be slotted in!\n\t\t\t//(not done in this method BTW)\n\t\t\t//UPDATE: actually, no, we'll just clobber one to put the correct answer in\n\t\t\t//$count = $this->config['choices_per_question'] - 1;\n\t\t\t$count = $this->config['choices_per_question'];\n\n\t\t\t$randomKeys = array_rand($this->functionData[$question['section']], $count);\n\n\t\t\t$choices = [];\n\n\t\t\tforeach($randomKeys as $key)\n\t\t\t{\n\t\t\t\t$choices[] = $this->functionData[$question['section']][$key][$inputExpectation];\n\t\t\t}\n\n\t\t\treturn $choices;\n\n\t\t}\n\t}", "public function showQuestion(){\n $query = \"SELECT * FROM posts ORDER BY rand() limit 12\";\n if ($result = $this->dbobj->dbcon->query($query)) {\n $row = $result->fetch_all(MYSQLI_ASSOC);\n \n }\n else{\n echo \"Error\" .$this->dbobj->dbcon->error;\n }\n return $row;\n }", "function getGeneratedQuestions() {\n $generatedQuestions = [];\n\n // for the generated questions, let's make the total 12\n for ($i = 0; $i < 12; $i++) {\n\n // create the queston attributes\n $leftAdder = mt_rand(0 , 100);\n\n $rightAdder;\n do {\n $rightAdder = mt_rand(0 , 100);\n } while ($rightAdder === $leftAdder);\n\n $correctAnswer = $leftAdder + $rightAdder;\n\n $firstIncorrectAnswer;\n do {\n $firstIncorrectAnswer = mt_rand($correctAnswer - 10, $correctAnswer + 10);\n } while ($firstIncorrectAnswer === $correctAnswer);\n\n $secondIncorrectAnswer;\n do {\n $secondIncorrectAnswer = mt_rand($correctAnswer - 10, $correctAnswer + 10);\n } while (\n $secondIncorrectAnswer === $correctAnswer || \n $secondIncorrectAnswer === $firstIncorrectAnswer\n );\n\n // cast to object to mimic json file\n $generatedQuestions[] = (object)[\n \"leftAdder\" => $leftAdder,\n \"rightAdder\" => $rightAdder,\n \"correctAnswer\" => $correctAnswer,\n \"firstIncorrectAnswer\" => $firstIncorrectAnswer,\n \"secondIncorrectAnswer\" => $secondIncorrectAnswer \n ];\n }\n\n return $generatedQuestions;\n}", "private function _askQuestion()\n {\n // Grab the question\n $question = str_replace(\"!question \", \"\", $this->_data->message);\n\n // Create the yql\n $yql = 'select * from answers.search where query=\"'. $question .'\" and type=\"resolved\"';\n \n $array = $this->grabData($yql);\n \n $stuff = $array['query']['results']['Question'];\n if (is_array($stuff)) {\n $answer = $stuff[array_rand($stuff)]['ChosenAnswer'];\n $link = $stuff[array_rand($stuff)]['Link'];\n }\n $this->_message($this->_data->nick.': You asked: '. $question);\n if (!$answer) {\n $this->_message($this->_data->nick.': Sorry, I cannot answer that one! Try asking a simpler question.'); \n }\n else {\n $this->_message($this->_data->nick.': Yahoo! answers says: '. $answer .' ('. $link .')');\n }\n }", "public static function random_defeat_quote(){\n $temp_text_options = array('Maybe try again?', 'Bad luck maybe?', 'Maybe try another stage?', 'Better luck next time?', 'At least you tried... right?');\n $temp_text = $temp_text_options[array_rand($temp_text_options)];\n return $temp_text;\n }", "function shuffleAnswers($answer1, $answer2, $answer3, $answer4)\n{\n\n\t$i = rand(0,3);\n\n\t//Puts the correct answer on a random position\n\tswitch($i)\n\t{\n\t\tcase 0:\n\t\t\t$antwort1 = $answer1;\n\t\t\t$antwort2 = $answer2;\n\t\t\t$antwort3 = $answer3;\n\t\t\t$antwort4 = $answer4;\n $position1 = 1;\n $position2 = 2;\n $position3 = 3;\n $position4 = 4;\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\t$antwort1 = $answer2;\n\t\t\t$antwort2 = $answer1;\n\t\t\t$antwort3 = $answer3;\n\t\t\t$antwort4 = $answer4;\n\t\t\t$position1 = 2;\n $position2 = 1;\n $position3 = 3;\n $position4 = 4;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\t$antwort1 = $answer2;\n\t\t\t$antwort2 = $answer3;\n\t\t\t$antwort3 = $answer1;\n\t\t\t$antwort4 = $answer4;\n $position1 = 2;\n $position2 = 3;\n $position3 = 1;\n $position4 = 4;\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\t$antwort1 = $answer2;\n\t\t\t$antwort2 = $answer3;\n\t\t\t$antwort3 = $answer4;\n\t\t\t$antwort4 = $answer1;\n $position1 = 2;\n $position2 = 3;\n $position3 = 4;\n $position4 = 1;\n\t\t\tbreak;\n\t}\n\n $res = [\"casename\"=>$questionData['casename'], \"antwort1\"=>$antwort1, \"antwort2\"=>$antwort2, \"antwort3\"=>$antwort3, \"antwort4\"=>$antwort4, \"positionAnswer1\"=>$position1, \"positionAnswer2\"=>$position2 , \"positionAnswer3\"=>$position3, \"positionAnswer4\"=>$position4];\n return $res;\n}", "private static function genNRand($q) {\n\t $i=$rac='';\n\t for ($i=0; $i<$q ;$i++) {\n\t $er=rand(0,2);\n\t switch ($er) {\n\t case 0: $rac.=rand(0,9); break;\n\t case 1: $rac.=chr(rand(65,90)); break;\n\t case 2: $rac.=chr(rand(98,122)); break;\n\t }\n\t }\n\t return ($rac);\n\t}", "public function generateWrongOptions($quiz_id,$question_id=-1){\n\n //for all questions-wrong options with limit\n// SELECT quiz_id, question_id, question, answer_id,answer FROM (SELECT quiz_question.quiz_id, quiz_question.question_id, question.question, answer_id,answer ,@rn := IF(@prev = quiz_question.question_id, @rn + 1, 1) as rn, @prev := quiz_question.question_id FROM quiz INNER JOIN quiz_question ON quiz.quiz_id = quiz_question.quiz_id AND quiz.deleted = 0 AND quiz.quiz_id = 1 INNER JOIN question ON quiz_question.question_id = question.question_id INNER JOIN (SELECT * FROM answer WHERE answer.answer_id NOT IN (SELECT answer_id FROM correct_question_answer) ORDER BY RAND()) as answers ON answers.question_id = quiz_question.question_id JOIN (SELECT @prev := NULL, @rn := 0) AS vars) as final WHERE rn <= 3\n\n\n\n //it means u have to generate wrong options for all questions with limit of NoOfWrongOptionsWithMostFrequency\n if($question_id==-1){\n $resultSet = $this->getNoOfWrongOptionsWithMostFrequency($quiz_id);\n $noOfWrongOptions = ($resultSet->fetchAll());\n//print_r($ans);\n $this->noOfWrongOption = $noOfWrongOptions[0]->no_of_wrong;\n// return Connection::connectToDB()->query(\"SELECT quiz_id, question_id, question, answer_id,answer FROM (SELECT quiz_question.quiz_id, quiz_question.question_id, question.question, answer_id,answer ,@rn := IF(@prev = quiz_question.question_id, @rn + 1, 1) as rn, @prev := quiz_question.question_id FROM quiz INNER JOIN quiz_question ON quiz.quiz_id = quiz_question.quiz_id AND quiz.deleted = 0 AND quiz.quiz_id = $quiz_id and question_id INNER JOIN question ON quiz_question.question_id = question.question_id INNER JOIN (SELECT * FROM answer WHERE answer.answer_id NOT IN (SELECT answer_id FROM correct_question_answer) ORDER BY RAND()) as answers ON answers.question_id = quiz_question.question_id JOIN (SELECT @prev := NULL, @rn := 0) AS vars) as final WHERE rn <= $this->noOfWrongOption\");\n\n return Connection::connectToDB()->query(\"SELECT quiz_id, question_id, question, answer_id,answer FROM (SELECT quiz_question.quiz_id, quiz_question.question_id, question.question, answer_id,answer ,@rn := IF(@prev = quiz_question.question_id, @rn + 1, 1) as rn, @prev := quiz_question.question_id FROM quiz INNER JOIN quiz_question ON quiz.quiz_id = quiz_question.quiz_id AND quiz.deleted = 0 AND quiz.quiz_id = $quiz_id and question_id not in (SELECT question_id FROM (SELECT a.question_id,a.no_of_options,b.no_of_correct,a.no_of_options-b.no_of_correct as no_of_wrong FROM (SELECT no_of_options,question_id FROM quiz_question WHERE quiz_id=$quiz_id GROUP by question_id) as a LEFT OUTER JOIN (SELECT COUNT(*) as no_of_correct,question_id FROM correct_question_answer GROUP by question_id) as b on a.question_id=b.question_id) as t WHERE no_of_wrong!=$this->noOfWrongOption) INNER JOIN question ON quiz_question.question_id = question.question_id INNER JOIN (SELECT * FROM answer WHERE answer.answer_id NOT IN (SELECT answer_id FROM correct_question_answer) ORDER BY RAND()) as answers ON answers.question_id = quiz_question.question_id JOIN (SELECT @prev := NULL, @rn := 0) AS vars) as final WHERE rn <=$this->noOfWrongOption\");\n }\n\n //else u have to generate wrong option for particular question\n $resultSet = $this->getNoOfWrongOptions($quiz_id,$question_id);\n $noOfWrongOptions = ($resultSet->fetchAll());\n//print_r($ans);\n $noOfWrongOption = $noOfWrongOptions[0]->noOfWrongOption;\n return Connection::connectToDB()->query(\"SELECT\n quiz_question.quiz_id,quiz_question.question_id,question,answer.answer_id,answer\nFROM\n answer\nJOIN quiz_question ON quiz_question.question_id = answer.question_id\nJOIN question ON quiz_question.question_id = question.question_id\nWHERE\n quiz_question.quiz_id =$quiz_id AND quiz_question.question_id=$question_id AND answer.answer_id NOT IN(\n SELECT\n answer_id\n FROM\n correct_question_answer\n JOIN quiz_question ON quiz_question.question_id = correct_question_answer.question_id\n WHERE\n quiz_id = $quiz_id\n GROUP BY\n quiz_question.question_id\n\n) ORDER BY RAND() LIMIT $noOfWrongOption\");\n }", "private function generateChallenge()\n {\n //store two random numbers in an array\n $numbers = array(mt_rand(1,4),mt_rand(1,4));\n //store the correct answer in a session\n $_SESSION['challenge'] = $numbers[0] + $numbers[1];\n //convert the numbers to their ASCII\n $converted = array_map('ord', $numbers);\n //generate a math question as HTML markup\n return \"\n <label>&#87;&#104;&#97;&#116;&#32;&#105;&#115;&#32;\n &#$converted[0];&#32;&#43;&#32;&#$converted[1];&#63;\n <input type=\\\"text\\\" name=\\\"s_q\\\" />\n </label>\";\n }", "function getNRandomQuestions($n)\n {\n $user = get_current_user();\n $myCnf = parse_ini_file(\"/home/$user/.my.cnf\");\n\n $host = $myCnf['host'];\n $user = $myCnf['user'];\n $password = $myCnf['password'];\n $database = $myCnf['database'];\n $connection = new mysqli($host, $user, $password, $database);\n\n $statement = $connection->prepare(\"SELECT * FROM questions ORDER BY RAND() LIMIT ?\");\n $statement->bind_param(\"i\", $n);\n $statement->execute();\n $statement->bind_result($id, $question, $answer0, $answer1, $answer2, $solution);\n while ($statement->fetch()){\n $result[] = array(\"question\" => $question,\n array(\n \"answer0\" => $answer0,\n \"answer1\" => $answer1,\n \"answer2\" => $answer2),\n \"solution\" => $solution,\n );\n }\n return $result;\n}", "public function easy()\n {\n $questions = Question::all(); // Returns all question\n $counts = count($questions);\n $id = rand(1,$counts);\n $question = $questions[$id]; // To select second question\n return view('easy', compact('question'));\n }", "public function run()\n {\n $maxrate = 5;\n \n Question::create([\n 'name' => 'Clarity',\n 'label_left' => 'Low clear', \n 'label_right' => 'Very clear',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]);\n \n Question::create([\n 'name' => 'Effervenscence',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate,\n 'correct_answer' => rand(1,$maxrate),\n ]);\n \n Question::create([\n 'name' => 'Fluidity',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]);\n \n Question::create([\n 'name' => 'Balsamic',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]);\n \n Question::create([\n 'name' => 'Fruity',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]);\n \n Question::create([\n 'name' => 'Floral',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]);\n \n Question::create([\n 'name' => 'Woody',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]);\n \n Question::create([\n 'name' => 'Spiced',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]);\n \n Question::create([\n 'name' => 'Sugar content',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]);\n \n Question::create([\n 'name' => 'Alcohol content',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]);\n \n Question::create([\n 'name' => 'Texture',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]);\n \n Question::create([\n 'name' => 'Acidity',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]);\n \n \n Question::create([\n 'name' => 'Structure',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]);\n \n \n Question::create([\n 'name' => 'Persistance',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]);\n \n Question::create([\n 'name' => 'Development',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]);\n \n Question::create([\n 'name' => 'Yellowness',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Frankness',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Harmony',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Intensity',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Quality',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Intensity of color',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Creemy odour',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Buttery',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Salty',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Acid',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Grainy',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Hardness',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Softness',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Springiness',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Padding',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Lining',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Wear',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Melody',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Harmony',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Rhythm',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n \n Question::create([\n 'name' => 'Stamp',\n 'label_left' => 'Low', \n 'label_right' => 'High',\n 'max_rate' => $maxrate, \n 'correct_answer' => rand(1,$maxrate),\n ]); \n }", "function game_question_selectrandom( $game, $table, $select, $id_fields='id', $use_repetitions=true)\n{\n global $DB, $USER; \n\n $count = $DB->get_field_sql( \"SELECT COUNT(*) FROM $table WHERE $select\");\n $min_num = 0;\n $min_id = 0;\n for($i=1; $i <= CONST_GAME_TRIES_REPETITION; $i++){\n $sel = mt_rand(0, $count-1);\n\t \n $sql = \"SELECT $id_fields,$id_fields FROM \".$table.\" WHERE $select\";\n \tif( ($recs = $DB->get_records_sql( $sql, null, $sel, 1)) == false){\n return false;\n }\n\n $id = 0;\n foreach( $recs as $rec){\n $id = $rec->id;\n }\n if( $min_id == 0){\n $min_id = $id;\n }\n \n if( $use_repetitions == false){\n return $id;\n }\n \n if( $count == 1){\n break;\n }\n \n $questionid = $glossaryentryid = 0;\n if( $game->sourcemodule == 'glossary')\n $glossaryentryid = $id;\n else\n $questionid = $id;\n \n $a = array( 'gameid' => $game->id, 'userid' => $USER->id, 'questionid' => $questionid, 'glossaryentryid' => $glossaryentryid);\n if( ($rec = $DB->get_record( 'game_repetitions', $a, 'id,repetitions r')) != false){\n if( ($rec->r < $min_num) or ($min_num == 0)){\n $min_num = $rec->r;\n $min_id = $id;\n }\n }else\n {\n $min_id = $questionid;\n break;\n }\n \n }\n\n if( $game->sourcemodule == 'glossary')\n game_update_repetitions( $game->id, $USER->id, 0, $min_id);\n else\n game_update_repetitions( $game->id, $USER->id, $min_id, 0);\n \n return $min_id;\n}", "public function showRandom()\n {\n $question = Question::inRandomOrder()->first();\n if ($question) {\n return $this->show($question->id);\n } else {\n return redirect(route('questions.index'));\n }\n }", "public function randomQuestionWithUserInStormMode(): void\n {\n QuestionUserHelper::removeAllQuestionsForUser($this->user);\n QuestionHelper::newQuestion();\n\n $questionsList = User::randomQuestions('storm', [], Question_user::DEFAULT_BAG_LIMIT ,$this->user);\n\n $this->assertFalse($this->user->questions()->get()->contains($questionsList));\n }" ]
[ "0.71189064", "0.6902919", "0.68481266", "0.6843635", "0.6796101", "0.67782533", "0.6649818", "0.66162694", "0.656714", "0.6566387", "0.65618706", "0.6390598", "0.63462085", "0.62936205", "0.62838244", "0.6251915", "0.62392616", "0.6157968", "0.6123096", "0.6100483", "0.6096736", "0.60851777", "0.60680896", "0.6034646", "0.601713", "0.60169744", "0.6012343", "0.6006373", "0.5984228", "0.59790105" ]
0.71238166
0
Lazily append the next iterator to the chain
private function lazyAppend() { if (!parent::valid() and $this->iterators->valid()) { $this->append($this->iterators->current()); $this->iterators->next(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function next()\n {\n do {\n $this->iterated->attach($this->current());\n parent::next();\n } while ($this->valid() && (!$this->passes($this->current()) || $this->iterated->contains($this->current())));\n }", "public function addNext($next) {}", "public function next(): void {\n next($this->items);\n }", "public function next()\n {\n next($this->iterator_data);\n }", "private function next()\n {\n $clone = clone $this;\n $clone->offset++;\n return $clone;\n }", "public function next()\n {\n next($this->_items);\n }", "#[\\ReturnTypeWillChange]\n public function next()\n {\n $this->index++;\n return next($this->items);\n }", "public function next()\n {\n next($this->entities);\n }", "public function next ()\n {\n if ( isset($this->iterator) && $this->offset == $this->internalOffset ) {\n $this->internalOffset++;\n $this->iterator->next();\n $this->storeNext();\n }\n\n $this->offset++;\n }", "public function next()\n {\n $data = $this->dataStore->query($this->getQuery());\n foreach ($data as $datum) {\n $this->current = $datum;\n yield;\n }\n }", "public function next()\n\t\t{\n\t\t\tnext($this->source);\n\t\t}", "public function next()\n {\n echo __METHOD__,PHP_EOL;\n next($this->a);\n }", "public function next() {\n next($this->data);\n }", "public function next() {\n next($this->data);\n }", "public function next() {\n next($this->elements);\n $this->pointer++;\n }", "public function next()\r\n {\r\n next($this->children);\r\n }", "public function next()\n {\n next($this->data);\n }", "public function next()\n {\n next($this->data);\n }", "public function next()\n {\n next($this->data);\n }", "public function next() {\n\t\tnext($this->_data);\n\t}", "public function next()\n {\n if ($this->skipNextIteration) {\n $this->skipNextIteration = false;\n return;\n }\n\n next($this->data);\n }", "public function next()\n {\n if ($this->skipNextIteration) {\n $this->skipNextIteration = false;\n return;\n }\n\n next($this->data);\n }", "public function next(){\n return next($this->items);\n }", "public function next(){\n return next($this->items);\n }", "#[\\ReturnTypeWillChange]\n public function next()\n {\n return next($this->_items);\n }", "public function next() {\n return next($this->_path);\n }", "public function next()\n {\n next($this->_object);\n }", "public function next(): void\n {\n next($this->data);\n }", "public function next()\n {\n next($this->array);\n }", "public function next(): void\n {\n if ($this->_skipNextIteration) {\n $this->_skipNextIteration = false;\n return;\n }\n next($this->_data);\n $this->_index++;\n }" ]
[ "0.6881747", "0.6595135", "0.6353351", "0.63301194", "0.6285945", "0.6239726", "0.6239441", "0.62301123", "0.61991644", "0.6193487", "0.6192673", "0.61845446", "0.6175125", "0.6175125", "0.6174535", "0.6172818", "0.61664975", "0.61664975", "0.61664975", "0.6149026", "0.61323357", "0.61323357", "0.6111734", "0.6111734", "0.60898155", "0.6044128", "0.6037182", "0.5992083", "0.59819293", "0.5976674" ]
0.66689026
1
INSERT INTO TWO TABLES
function insertTwoTables($table1, $data1, $table2, $data2) { $this->db->trans_start(); $this->db->insert($table1, $data1); $this->db->insert($table2, $data2); $this->db->trans_complete(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fromOneToTheOther($db1, $table1, $db2, $table2){\n\n\t$firstRecs = dbMassData(\"SELECT * FROM \".$db1.\".\".$table1.\" WHERE Package = 'Local' OR Package IS NULL\");\n\t$secRecs = dbMassData(\"SELECT * FROM \".$db2.\".\".$table2.\" WHERE Package = 'Local' OR Package IS NULL\");\n\t\n\t\n\n\t//print_r($firstRecs);\n\tfor($i=0; $i<count($firstRecs); $i++){\n\t\t$insertString = \"\";\n\t\t$insertString1 = \"\";\n\t\t$insertString2 = \"\";\n\t\t$allKeys = array();\n\t\t$allVals = array();\n\n\t\tforeach ($firstRecs[$i] as $key => $value){\n\n\n\t\t\tif(in_array($key, $allKeys) == false){\n\t\t\t\tarray_push($allKeys, $key);\n\t\t\t}\n\t\t\tarray_push($allVals, $value);\n\n\t\t\t\n\t\t}\n\n\t\t//construct insert string\n\t\tfor($j=0; $j <count($allKeys); $j++){\n\n\t\t\tif($j == 0){\n\t\t\t\t$insertString1 = $insertString1 . \"`\".$allKeys[$j].\"`\";\n\t\t\t\t$insertString2 = $insertString2 . \"'\".str_replace(\"'\", \"\\'\", $allVals[$j]).\"'\";\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$insertString1 = $insertString1 . \", `\". $allKeys[$j].\"`\";\n\t\t\t\t$insertString2 = $insertString2 . \", '\". str_replace(\"'\", \"\\'\", $allVals[$j]).\"'\";\n\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t$insertString = \"INSERT INTO \".$db2.\".\".$table2.\" ($insertString1) VALUES ($insertString2)\";\n\t\n\t\t//echo($insertString);\n\n\t\tdbQuery($insertString);\n\t}\n\n\n\n\t\n\n\n}", "function clonTable1toTable2Inscritos($T_INSCRITOS,$PROVINCIA, $CLAVE, $TOMO, $FOLIO)\n{\n global $mysqli;\n $TINS = $T_INSCRITOS;\n $query = new Query($mysqli, \"INSERT INTO inscritostmp SELECT * FROM \".$TINS.\" WHERE provincia=? and clave=? and tomo=? and folio=?\");\n $parametros = array('ssss', &$PROVINCIA, &$CLAVE, &$TOMO, &$FOLIO);\n $data = $query->getresults($parametros);\n return true;\n}", "public function insert($table);", "public function insert($connection, $table, $rows);", "function clonTable1toTable2Resultados($T_RESULTADOS,$PROVINCIA, $CLAVE, $TOMO, $FOLIO)\n{\n global $mysqli;\n $TRES = $T_RESULTADOS;\n $query = new Query($mysqli, \"INSERT INTO resultadostmp SELECT * FROM \".$TRES.\" WHERE provincia=? and clave=? and tomo=? and folio=?\");\n $parametros = array('ssss', &$PROVINCIA, &$CLAVE, &$TOMO, &$FOLIO);\n $data = $query->getresults($parametros);\n return true;\n}", "public function insert($tables,$data){\n $this->db->insert($tables,$data);\n }", "public function insert($tables,$data){\n $this->db->insert($tables,$data);\n }", "public function insert($tables,$data){\n $this->db->insert($tables,$data);\n }", "public function insert($tableName, $data);", "public function insert($table, array $fields);", "public function insert($table, array $data);", "abstract public function insert_sql($tableName, $new_table = false);", "public function insert($tblUpdate);", "function insert($table, $columns);", "public function insert($table_name, $fields_values = array())\r\n {\r\n }", "public function insertDB(){\n // Query to input into customers table\n $this->qry_insert_customer = \"INSERT INTO customers (company, firstname, lastname, email, phone, description)\n VALUES ('$this->company','$this->firstname', '$this->lastname', '$this->email', '$this->phone', '$this->description')\";\n\n // Query to input into customers table\n $this->qry_insert_address = \"INSERT INTO addresses (address, city, country, postal_code)\n VALUES ('$this->street','$this->place','$this->country','$this->zipcode')\";\n\n //Execute both queries\n mysqli_query($this->db, $this->qry_insert_customer);\n mysqli_query($this->db, $this->qry_insert_address); \n }", "function insertTabelaAssociativa($tabela, $cd_a, $cd_b, $value_a, $value_b){\n\tif(sizeof($value_b) > 1){\n\t\n\t\tforeach($value_b as $valor){\n\t\t\t// Monta a string sql\n\t\t\t$sql = \"insert into $tabela set $cd_a = $value_a, $cd_b = $valor\";\n\t\t\tmysql_query($sql);\n\t\t}\n\t\t\n\t}\n\telseif(sizeof($value_b) == 1){\n\n\t\t// Monta a string sql\n\t\t$sql = \"insert into $tabela set $cd_a = $value_a, $cd_b = $value_b[0]\";\n\t\tmysql_query($sql);\t\n\t\n\t}\n}", "function insert($database,$tables,$values) {\n mad_mysql_connect();\n\n\t\t$pre = $GLOBALS[\"prefix\"];\n\t\t/* Get Database */\n\t\t$intodatabase = str_replace(\"[p]\", $pre, $database);\n\t\t\n\t\t/* Break Table into Chunks */\n\t\t$tablechunks = explode(\"|\", $tables);\n\t\t/* Count the Tables */\n\t\t$totaltables = count($tablechunks);\n\t\t\n\t\t/* Break Values into Chunks */\n\t\t$valuechunks = explode(\"|\", $values);\n\t\t/* Count the Values */\n\t\t$totalvalues = count($tablechunks);\n\t\t\n\t\t/* Check to see that the number of tables equals the number of values */\n\t\tif ($totaltables == $totalvalues) {\n\t\t\t$setcomma = $totaltables - 1;\n\t\t\t$i=0;\n\t\t\twhile ($i < $totaltables) {\n\t\t\t\t/* Set the Table Name */\n\t\t\t\t$table = $tablechunks[$i];\n\t\t\t\t/* Set the Value of the Table */\n\t\t\t\t$value = $valuechunks[$i];\n\t\t\t\t\n\t\t\t\t/* If this is the last entry, remove the comma */\n\t\t\t\tif ($i == $setcomma) {\n\t\t\t\t\t$comma = \"\";\n\t\t\t\t} else {\n\t\t\t\t\t$comma = \",\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$updatetables .= \"`{$table}`{$comma}\";\n\t\t\t\t$updatevalues .= \"'{$value}'{$comma}\";\n\t\t\t\t\n\t\t\t\t++$i;\n\t\t\t}\n\t\t\treturn mysql_query(\"insert into `{$intodatabase}` ({$updatetables}) values ({$updatevalues})\");\n\t\t}\n\t}", "abstract protected function platformInsertStatement($table, array $keys, array $values);", "function insertMulti($table, $fields, $values) {\n\t\t$table = $this->fullTableName($table);\n\t\tif (is_array($fields)) {\n\t\t\t$fields = implode(', ', array_map(array(&$this, 'name'), $fields));\n\t\t}\n\t\t$values = implode(', ', $values);\n\t\t$this->query(\"INSERT INTO {$table} ({$fields}) VALUES {$values}\");\n\t}", "public function insert_update($table, array $values);", "protected function createTables()\n {\n $sql = $this->create_table;\n $this->connection->query($sql);\n\n // create again in schema 2\n $sql = str_replace($this->table, \"{$this->schema2}.{$this->table}\", $sql);\n $this->connection->query($sql);\n }", "function insertRow($table, $names, $values) {\n return mysql_query(sprintf('INSERT INTO %s (`%s`) VALUES (\"%s\")', $table, $names, $values));\n }", "function insert($table, $insertNames, $values) {\n for($i = 0; $i < count($values); $i++) {\n $values[$i] = htmlspecialchars($values[$i]);\n }\n\n \n /**Kontrola stringu */\n if(!is_string($table)) {\n throw new Exception(\"Tabulka musí být string.\");\n }\n /**Kontorla poli */\n else if(!is_array($insertNames) || !is_array($values)) {\n throw new Exception(\"Hodnota musí být ve formátu pole.\");\n }\n /**Kontrola poctu nazvu atribtu s novymi hodnotami */\n else if(count($insertNames) !== count($values)){\n throw new Exception(\"Hodnoty se musí rovnat.\");\n }\n\n /**Pripojeni k databazi */\n $connect = NULL;\n try {\n $connect = require(\"connect.php\");\n }catch(Exception $e) {\n throw $e;\n }\n /**Formatovani a kontrola SQL utoku */\n $insertNames = implode(',', $insertNames);\n $value = '';\n for($i = 0; $i<count($values)-1; $i++) {\n $value .= '?,';\n }\n $value .= '?';\n /**Formatovani metody */\n $statement = $connect->prepare('INSERT INTO ' .$table .'('.$insertNames.') VALUES (' .$value.')');\n\n if(!$statement->execute($values)){\n throw new Exception(\"Chyba při INSERT dotazu\");\n }\n}", "function add($table,$values){\n $conn=connectDB();\n $query=\"INSERT INTO $table VALUES ($values)\";\n //print($query);\n $conn->query($query);\n }", "protected function _insert($table, $keys, $values) {\n\t\treturn $this->query('INSERT INTO '.$table.' ('.implode(', ', $keys).') VALUES ('.implode(', ', $values).')');\n\t}", "public function testInsertSaftRegressionTest2()\n {\n $res = $this->fixture->query('INSERT INTO <http://localhost/Saft/TestGraph/> {<http://foo/1> <http://foo/2> <http://foo/3> . }');\n\n $res1 = $this->fixture->query('SELECT * FROM <http://localhost/Saft/TestGraph/> WHERE {?s ?p ?o.}');\n $this->assertEquals(1, count($res1['result']['rows']));\n\n $res2 = $this->fixture->query('SELECT * WHERE {?s ?p ?o.}');\n $this->assertEquals(1, count($res2['result']['rows']));\n\n $res2 = $this->fixture->query('SELECT ?s ?p ?o WHERE {?s ?p ?o.}');\n $this->assertEquals(1, count($res2['result']['rows']));\n }", "function insert($conn,$table,$data)\n {\n }", "public function insert($insValues) {\n $insValues = (array) $insValues;\n $docsTable = new GenericPVSWTable(\"docstax\");\n if (isset($insValues['ordnbr'])) {\n // Handle adding the salestax for a salesorder\n // HAVE TO HAVE -- Ordtype and bocntr and custid\n $ordnbr = $insValues['ordnbr'];\n $ordtype = $insValues['ordtype'];\n $bocntr = $insValues['bocntr'];\n $custid = $insValues['custid'];\n if ($ordtype == \"\" || $bocntr === \"\" || $custid == \"\") {\n throw new Exception(\"Must include custid, ordnbr, ordtype, and bocntr\\n\".var_export($insValues));\n }\n $deleteDocSql = \"delete from docstax \n where doctype = '$ordtype' and \n refnbr = '$ordnbr' and\n bocntr = $bocntr and\n custvendid = '$custid'\n \";\n $deleteDtlSql = \"delete from dtlstax \n where doctype = '$ordtype' and \n refnbr = '$ordnbr' and\n bocntr = $bocntr and\n custvendid = '$custid'\";\n $ret = $docsTable->directQuery($deleteDocSql, array());\n $ret = $docsTable->directQuery($deleteDtlSql, array());\n \n $insDocSql = \"\n insert into docstax \n ( doctype, refnbr, custvendid, taxtype, taxid1, taxid2, bocntr)\n select\n s.ordtype as doctype,\n s.ordnbr as refnbr,\n s.custid as custvendid,\n 'O' as taxtype,\n c.tax1 as taxid1,\n c.tax2 as taxid2,\n s.bocntr as bocntr\n From salesord s, customer c\n where ordnbr='$ordnbr' and ordtype='$ordtype' and bocntr=$bocntr and s.custid=c.custid\n \";\n $insDtlSql = \"\n insert into dtlstax \n (doctype, refnbr, custvendid, taxtype, tax1, tax2, bocntr, lineid, taxcat)\n select\n s.ordtype as doctype,\n s.ordnbr as refnbr,\n s.custid as custvendid,\n 'O' as taxtype,\n c.tax1 as tax1,\n c.tax2 as tax2,\n s.bocntr as bocntr,\n d.lineid,\n c.tax1 = '' ?? '' :: 'ALL'\n From salesord s, sodet d, customer c\n where s.ordnbr='$ordnbr' and s.ordtype='$ordtype' and s.bocntr=$bocntr and\n s.ordnbr=d.ordnbr and\n s.ordtype=d.ordtype and\n s.bocntr=d.bocntr and\n s.custid=c.custid\n \";\n $ret = $docsTable->directQuery($insDocSql, array());\n $ret = $docsTable->directQuery($insDtlSql, array());\n \n return $this->findWhere(array(\"refnbr\"=>$ordnbr,\"bocntr\"=>$bocntr, \"doctype\"=>$ordtype));\n }\n else {\n throw new Exception(\"Not ready for this yet\");\n }\n }", "protected abstract function insertRow($tableName, $data);" ]
[ "0.62865627", "0.6264757", "0.6251418", "0.6082616", "0.6032613", "0.6028603", "0.6028603", "0.6028603", "0.6021217", "0.60015815", "0.59932166", "0.5974147", "0.59570485", "0.59310013", "0.5905858", "0.5857635", "0.58183163", "0.58095086", "0.5785111", "0.57785124", "0.5775509", "0.57555884", "0.5698174", "0.56710577", "0.56658417", "0.5662416", "0.5650112", "0.5648243", "0.5646405", "0.56436" ]
0.7591835
0
Test case for listPastWebinarFiles List Past Webinar Files.
public function testListPastWebinarFiles() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_test_file_uploads()\n {\n }", "public function testListPastWebinarPollResults()\n {\n }", "public function testGetFilesList()\n {\n $remoteFolder = \"TestData/In\";\n\n $localName = \"Book1.xlsx\";\n $remoteName = \"Book1.xlsx\";\n\n CellsApiTestBase::ready( $this->instance,$localName ,$remoteFolder . \"/\" . $remoteName , \"\");\n \n $request = new GetFilesListRequest();\n $request->setPath( $remoteFolder);\n $request->setStorageName( \"\");\n $this->instance->getFilesList($request);\n }", "public function testListPastWebinarQA()\n {\n }", "public function getFiles() {}", "public function test_listUnsupportedFileTypes() {\n\n }", "public function getFiles ();", "public function getFiles();", "public function getFiles();", "public function getFiles();", "public function files();", "public function files();", "public function files();", "public function getUploadedFiles() {}", "public function testListAttachments()\n {\n //Wordsets but no origin\n $templating = $this->createMock(\\Twig\\Environment::class);;\n $attacher = new ReportMailerAttacher(\n $this->mockEntityManager(),\n $templating\n );\n $testUser = new User();\n $origin = new Origin();\n $origin->setName(\"aqui\");\n $testUser->addOrigin($origin);\n $fileList = $attacher->listAttachments($testUser, \"2020-01-01\");\n $this->assertEquals([\"wv_2020-01-01_wordsetA_aqui.html\"], $fileList);\n // 2 origins\n $attacher = new ReportMailerAttacher(\n $this->mockEntityManager(),\n $templating\n );\n $testUser = new User();\n $origin = new Origin();\n $origin->setName(\"aqui\");\n $origin2 = new Origin();\n $origin2->setName(\"alla\");\n $testUser->addOrigin($origin);\n $testUser->addOrigin($origin2);\n $fileList = $attacher->listAttachments($testUser, \"2020-01-01\");\n $this->assertEquals(\n [\n \"wv_2020-01-01_wordsetA_aqui.html\",\n \"wv_2020-01-01_wordsetA_alla.html\"\n ],\n $fileList\n );\n }", "public function get_files()\n {\n }", "public function testMediaFilesGet()\n {\n $client = static::createClient();\n\n $path = '/media/files';\n\n $crawler = $client->request('GET', $path);\n }", "public function getUploadedFiles()\n {\n }", "public function files($index){\n $this->httpRequest->files($index);\n }", "private function getTestFileList() {\n\t\treturn [\n\t\t\tself::makeFileInfo('a.txt', 4, 2.3 * \\pow(10, 9)),\n\t\t\tself::makeFileInfo('q.txt', 5, 150),\n\t\t\tself::makeFileInfo('subdir2', 87, 128, true),\n\t\t\tself::makeFileInfo('b.txt', 2.2 * \\pow(10, 9), 800),\n\t\t\tself::makeFileInfo('o.txt', 12, 100),\n\t\t\tself::makeFileInfo('subdir', 88, 125, true),\n\t\t];\n\t}", "public function list_of_fileuploads() {\n $request = $_GET;\n $result = $this->fileupload_model->load_list_of_fileuploads($request, array());\n $result = getUtfData($result);\n echo json_encode($result);\n exit;\n }", "public function files() {\n\t\t$files = $this->ApiFile->fileList($this->path);\n\t\t$this->set('files', $files);\n\t}", "public function testShouldGetFileInfo() {\n\t\t$this->assertEquals(\n\t\t\t$this->_testFilesId[0],\n\t\t\t$this->_Files->run(['ids' => $this->_testFilesId])[0]['id']\n\t\t);\n\t}", "function get_all_video_files($vdetails,$count_only=false,$with_path=false)\r\n{\r\n $details = get_video_file($vdetails,true,$with_path,true,$count_only);\r\n if($count_only)\r\n return count($details);\r\n return $details;\r\n}", "public function testGetFiles()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "function ajaxlistfiles(){\n\n\t\t//Glob all files in uploaddir\n\t\t$files = array();\n\t\tforeach(glob($this->uploaddir.'*') as $file){\n\n\t\t\t//Strip path\n\t\t\t$filename = str_replace($this->uploaddir,'',$file);\n\n\t\t\t$files[$filename]['filename']=$filename;\n\t\t\t$files[$filename]['filesize']=filesize($file) / 1024 / 1024; //Mb\n\t\t\t$files[$filename]['modified']=filemtime($file); //Mb\n\n\t\t\t//Check torrent\n\t\t\tif( file_exists( $this->torrentdir.$filename.'.torrent' )){\n\n\t\t\t\t//Add torrent file\n\t\t\t\t$files[$filename]['torrent']=$filename.'.torrent';\n\n\t\t\t\t//Check database table phptracker_peers for torrent peers:\n\t\t\t\tif($torrent = $this->Torrent->findByName($filename)){\n\t\t\t\t\tif($peers = $this->Peer->findAllByInfoHash($torrent['Torrent']['info_hash'])){\n\t\t\t\t\t\t$files[$filename]['peers']=$peers;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->set('files',$files);\n\n\t\t$this->layout = 'ajax';\n\t}", "public function generate_filelist_preview() : void {\n CrawlQueue::truncate();\n DeployQueue::truncate();\n\n $initial_file_list_count =\n FilesHelper::buildInitialFileList(\n true,\n SiteInfo::getPath( 'uploads' ),\n $this->settings\n );\n\n if ( $initial_file_list_count < 1 ) {\n $err = 'Initial file list unable to be generated';\n http_response_code( 500 );\n echo $err;\n WsLog::l( $err );\n throw new WP2StaticException( $err );\n }\n\n $via_ui = filter_input( INPUT_POST, 'ajax_action' );\n\n if ( is_string( $via_ui ) ) {\n echo $initial_file_list_count;\n }\n }", "abstract function list_files($path = '.');", "public function testPastWebinars()\n {\n }", "public function getOtherFiles(): array;" ]
[ "0.58834845", "0.5769307", "0.5767245", "0.57574075", "0.572067", "0.56012434", "0.5557108", "0.5524374", "0.5524374", "0.5524374", "0.54968965", "0.54968965", "0.54968965", "0.54705936", "0.5462373", "0.5406382", "0.5346848", "0.5325001", "0.531251", "0.5304454", "0.5276892", "0.52477914", "0.52467114", "0.5202889", "0.51756936", "0.51748455", "0.51662654", "0.5151146", "0.5139908", "0.5114939" ]
0.82050633
0
Test case for listPastWebinarPollResults List Past Webinar Poll Results.
public function testListPastWebinarPollResults() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testListPastWebinarQA()\n {\n }", "public function testPastEvents()\n {\n // otherwise test will fail.\n // Other approach is to use fake data or mock it.\n \n $response = $this->json('GET', '/events/expired');\n \n $response\n ->assertStatus(200)\n ->assertJson([\n ['name' => 'Fashion Show']\n ]);\n }", "public function testListPastWebinarFiles()\n {\n }", "public function testWebinarPanelists()\n {\n }", "public function test119DisplayBookingListAfterClickOnEachLinkOfPagination()\n {\n $ssoData = $this->getSSOData();\n\n // current bookings\n $this->createBookings(20, date('Y-m-d'), 15);\n\n //$this->mockApi($data, 'empty_ok');\n\n $responseBefore = $this->ajax($this->getUrlByParams(['page' => 1, 'per_page' => 10]))->json();\n $responseAfter = $this->ajax($this->getUrlByParams(['page' => 2, 'per_page' => 10]))->json();\n\n $listBefore = $responseBefore['current_list'];\n $listAfter = $responseAfter['current_list'];\n\n $this->assertFalse($listBefore == $listAfter);\n }", "public function getPastEvents(){\n\t\t// get the events\n\t\t$events = $this->getEvents();\n\n\t\t$pastEvents = [];\n\t\t$eventNumber = sizeof($events);\n\n\t\t// extracts the events which has not happened yet, which date is not passed\n\t\tfor ($i = 0; $i < $eventNumber; $i++){\n\t\t\t$event = array_shift($events);\n\t\t\tif($event['is_approved'] == 1 && $event['date'] < date('Y-m-d')){\n\t\t\t\tarray_push($pastEvents, $event);\n\t\t\t}\n\t\t}\n\n\t\treturn $pastEvents;\n\t}", "public function testPastEmbargo()\n {\n $page = $this->objFromFixture(SiteTree::class, 'pastEmbargo');\n\n $page = $this->finishWorkflow($page);\n\n $this->assertNotEquals(0, $page->PublishJobID);\n $this->assertEquals(0, $page->UnPublishJobID);\n\n $publish = strtotime($page->PublishJob()->StartAfter ?? '');\n $this->assertFalse($publish);\n }", "public function loop_through_past_posts($callback){\n return call_user_func_array($this->loop_through_posts(array(\"meta_key\" => \"_event_upcoming_label\", \"meta_value\" => \"Past\")), [$callback]);\n }", "public function testWebinarPollGet()\n {\n }", "public function testPastWebinars()\n {\n }", "public function testPastExpiry()\n {\n $page = $this->objFromFixture(SiteTree::class, 'pastExpiry');\n\n $page = $this->finishWorkflow($page);\n\n $this->assertEquals(0, $page->PublishJobID);\n $this->assertNotEquals(0, $page->UnPublishJobID);\n\n $unpublish = strtotime($page->UnPublishJob()->StartAfter ?? '');\n\n $this->assertFalse($unpublish);\n }", "public function test118DisplayPaginationLinksWhenTotalRecordsHigherThan10()\n {\n $ssoData = $this->getSSOData();\n\n // current bookings\n $this->createBookings(11, date('Y-m-d'), 11);\n\n //$this->mockApi($data, 'empty_ok');\n\n $params = [\n 'page' => 1,\n 'per_page' => 10,\n ];\n $response = $this->ajax($this->getUrlByParams($params))->json();\n\n $this->assertTrue(is_array($response));\n $this->assertArrayHasKey('current_list', $response);\n\n $list = $response['current_list'];\n $totalRowsInList = substr_count($list, '<ul class=\"pagination\"');\n\n $this->assertEquals(1, $totalRowsInList);\n }", "public function testWebinarPolls()\n {\n }", "public function pastTrips()\n\t{\n\t\t\n\t\t$now = \\Carbon\\Carbon::now()->format('Y-m-d');\n\t\t\n\t\t// Ensure only the logged in user's bookings are being pulled\n\t\t$listings = Booking::where('traveller_id', '=', Auth::user()->id)\n\t\t\t->where('end_date', '<', $now)\n\t\t\t->whereNotNull('transaction_id')\n\t\t\t->whereNull('canceled_at')\n\t\t\t->leftJoin('listings', 'listings.id', '=', 'bookings.listing_id')\n\t\t\t->leftJoin('listing_addresses', 'listing_addresses.id', '=', 'listings.id')\n\t\t\t->leftJoin(DB::raw(\"(select url, listing_id \n\t\t\t\t\t\t\tfrom `listings_images` \n\t\t\t\t\t\t\twhere `primary` = 1) as `list_images`\"), 'list_images.listing_id', '=', 'listings.id')\n\t\t\t->leftJoin(DB::raw(\"(select booking_id as review from `reviews`) as `listing_review`\"), 'listing_review.review', '=', 'bookings.id')\n\t\t\t->get();\n\t\t\n\t\t\n\t\treturn view('dashboard.traveller.past')\n\t\t\t->with('listings', $listings);\n\t}", "public function pastschedule() {\n //\n $currentDate = \\Helpers\\DateHelper::getLocalUserDate(date('Y-m-d H:i:s'));\n \n $scheduleDays = \\Helpers\\DateHelper::getScheduleDays($currentDate);\n $scheduleDays = array_reverse($scheduleDays);\n \n return view('user/pastschedule', ['scheduleDays' => $scheduleDays, 'number_of_day' => 1])\n ->with('target_areas', json_decode($this->target_areas, true))\n ->with('movements', json_decode($this->movements, true));\n }", "public function pastEvents()\n {\n $banner = array(\n 'title' => 'Past Events',\n 'subtitle' => 'A recap of our past events.',\n );\n\n $today = Carbon::today()->toDateString();\n $events = Event::whereDate('event_date', '<', $today);\n\n // Filter by url param\n if ($month = request('month')) {\n $events->whereMonth('event_date', Carbon::parse($month)->month);\n }\n\n if ($year = request('year')) {\n $events->whereYear('event_date', $year);\n }\n\n $events = $events->orderBy('event_date', 'desc')\n ->paginate(5);\n\n\n // Temporary\n $archives = Event::selectRaw('year(event_date) year, monthname(event_date) month, count(*) published')\n ->whereDate('event_date', '<', $today)\n ->groupBy('year', 'month')\n ->orderByRaw('min(event_date) desc')\n ->get()\n ->toArray();\n\n return view('events.past_events', compact('banner','events', 'archives'));\n }", "public function testPastEmbargoExpiry()\n {\n $page = $this->objFromFixture(SiteTree::class, 'pastEmbargoExpiry');\n\n $page = $this->finishWorkflow($page);\n\n $this->assertEquals(0, $page->PublishJobID);\n $this->assertNotEquals(0, $page->UnPublishJobID);\n\n $unpublish = strtotime($page->UnPublishJob()->StartAfter ?? '');\n\n $this->assertFalse($unpublish);\n }", "public function past()\n {\n $events = Event::orderBy('start_datetime')->past()->paginate();\n\n return view('auth.residents.events.past', compact('events'));\n }", "public function test117NoDisplayPaginationLinksWhenTotalRecordsLessThan10()\n {\n $ssoData = $this->getSSOData();\n\n // current bookings\n $this->createBookings(9, date('Y-m-d'), 9);\n\n //$this->mockApi($data, 'empty_ok');\n\n $params = [\n 'page' => 1,\n 'per_page' => 10,\n ];\n $response = $this->ajax($this->getUrlByParams($params))->json();\n\n $this->assertTrue(is_array($response));\n $this->assertArrayHasKey('current_list', $response);\n\n $list = $response['current_list'];\n $totalRowsInList = substr_count($list, '<div class=\"contract_item\"');\n\n $this->assertLessThan(10, $totalRowsInList);\n }", "public function testWebinarPanelistCreate()\n {\n }", "public function testWebinarAbsentees()\n {\n }", "public function testPastEmbargoAfterExpiry()\n {\n $page = $this->objFromFixture(SiteTree::class, 'pastEmbargoAfterExpiry');\n\n $page = $this->finishWorkflow($page);\n\n $this->assertEquals(0, $page->PublishJobID);\n $this->assertEquals(0, $page->UnPublishJobID);\n }", "public function testPastEmbargoFutureExpiry()\n {\n $page = $this->objFromFixture(SiteTree::class, 'pastEmbargoFutureExpiry');\n\n $page = $this->finishWorkflow($page);\n\n $this->assertNotEquals(0, $page->PublishJobID);\n $this->assertNotEquals(0, $page->UnPublishJobID);\n\n $publish = strtotime($page->PublishJob()->StartAfter ?? '');\n $unpublish = strtotime($page->UnPublishJob()->StartAfter ?? '');\n\n $this->assertFalse($publish);\n $this->assertNotFalse($unpublish);\n }", "function testStopPast() {\n $startDate = Carbon::now()->subDays(3)->toDateString();\n $stopDate = Carbon::now()->subDays(1)->toDateString();\n \n //Test precondition\n $this->tester->seeInDatabase('History', ['counterId'=>2, 'startDate'=>$startDate, 'endDate'=>null]);\n\n Counter::findOne(2)->stop($stopDate);\n\n //Test the results after reset\n $this->tester->seeInDatabase('History', ['counterId'=>2, 'startDate'=>$startDate, 'endDate'=>$stopDate]);\n $this->tester->dontSeeInDatabase('History', ['counterId'=>2, 'endDate'=>null]);\n }", "public function testListingWithFilters()\n {\n $filters[] = ['limit' => 30, 'page' => 30];\n $filters[] = ['listing_type' => 'public'];\n foreach ($filters as $k => $v) {\n $client = static::createClient();\n $client->request('GET', '/v2/story', $v, [], $this->headers);\n $this->assertStatusCode(200, $client);\n\n $response = json_decode($client->getResponse()->getContent(), true);\n $this->assertTrue(is_array($response));\n }\n }", "public function testWebinarPollUpdate()\n {\n }", "public function testTwentySevenResults()\n {\n $response = $this->json('get', '/example', ['count' => 27]);\n $json = $response->json();\n $this->assertCount(27, $json['data']);\n $response->assertStatus(200);\n }", "public function testUpcomingEvents()\n {\n // otherwise test will fail.\n // Other approach is to use fake data or mock it.\n \n $response = $this->json('GET', '/events');\n \n $response\n ->assertStatus(200)\n ->assertJson([\n ['name' => 'IT Expo']\n ]);\n }", "function pi_list_browseresults($showResultCount = 1, $divParams = '', $spacer = false, $total_bodycount = 0) {\n\t\t\t// Initializing variables:\n\t\t$pointer = intval($this->piVars['pointer']);\n\t\t$count = $this->internal['res_count'];\n\t\t$results_at_a_time = t3lib_div::intInRange($this->internal['results_at_a_time'],1,1000);\n\t\t$maxPages = t3lib_div::intInRange($this->internal['maxPages'],1,100);\n\n\t\t$pR1 = $pointer * $results_at_a_time + 1;\n\t\t$pR2 = $pointer * $results_at_a_time + $results_at_a_time;\n\n\t\t$max = t3lib_div::intInRange(ceil($count/$results_at_a_time), 1, $maxPages);\n\n\n\t\t$links=array();\n\n\t\t\t// Make browse-table/links:\n\t\tif ($this->pi_alwaysPrev>=0) {\n\t\t\tif ($pointer > 0) {\n\t\t\t\t$links[] = $this->pi_linkTP_keepPIvars($this->pi_getLL('pi_list_browseresults_prev','< Previous',TRUE),array('pointer'=>($pointer-1 ? $pointer-1 : '')), 1);\n\t\t\t} elseif ($this->pi_alwaysPrev) {\n\t\t\t\t$links[] = $this->pi_getLL('pi_list_browseresults_prev','< Previous',TRUE);\n\t\t\t}\n\t\t}\n\n\t\tif ($max > 1) {\n\t\t\tif ($pointer >= $maxPages - 2) {\n\t\t\t\t$a = (integer) ($pointer - ($maxPages/2));\n\t\t\t} else {\n\t\t\t\t$a = 0;\n\t\t\t}\n\t\t\tif ($a < 0) {\n\t\t\t\t$a = 0;\n\t\t\t}\n\t\t\t// in order to have a correct value for $max we must include the value of the actual $pointer in the calculation\n\t\t\tfor($i=0; $i<$max; $i++) {\n\t\t\t\t$temp_links = array();\n\t\t\t\t// check that the starting point (equivalent of $pR1) doesn't exceed the total $count\n\t\t\t\tif($a * $results_at_a_time + 1 > $count){\n\t\t\t\t\t$i = $max; //quitt!!!\n\t\t\t\t}else{\n\t\t\t\t\t$temp_links[] = '';\n\t\t\t\t\t//beginning:\n\t\t\t\t\tif($pointer == $a){\n\t\t\t\t\t\t$temp_links[] .= '<span '.$this->pi_classParam('browsebox-SCell').'><strong>';\n\t\t\t\t\t}\n\t\t\t\t\t$temp_links[] .= $this->pi_linkTP_keepPIvars(trim($this->pi_getLL('pi_list_browseresults_page', 'Page', TRUE).' '.($a + 1)), array('pointer' => ( $a ? $a : '' )), 1);\n\t\t\t\t\t//ending:\n\t\t\t\t\tif($pointer == $a){\n\t\t\t\t\t\t$temp_links[] .= '</strong></span>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$a++;\n\t\t\t\t$links[] = implode('', $temp_links);\n\t\t\t}// end foreach\n\t\t}// end if max\n\n\t\t// neither $pointer nor the number-link ($a) must exceed the result of the calculation below!\n\t\tif ($pointer < ceil($count/$results_at_a_time)-1) {\n\t\t\t$links[] = $this->pi_linkTP_keepPIvars($this->pi_getLL('pi_list_browseresults_next','Next >',TRUE), array('pointer' => $pointer+1),1);\n\t\t}\n\t$sBox = '';\n\n\t\t$sBox .= '<!-- List browsing box: -->\n\t\t\t\t\t<div'.$this->pi_classParam('browsebox').'>';\n\t\tif($showResultCount){\n\t\t\t$sBox .= '<p>'; //paragraph for 'elements 1 to 20'\n\t\t\tif($this->internal['res_count']){\n\t\t\t\t$from_number = $this->internal['res_count'] > 0 ? $pR1 : 0;\n\t\t\t\t$to_number = min(array($this->internal['res_count'], $pR2));\n\n\n\t\t\t\t// don't know why I need this, found out by trial and error\n\t\t\t\tif($total_bodycount > 0 && !$this->piVars['char']){\n\t\t\t\t\t$to_number -= $total_bodycount;\n\t\t\t\t}\n\n\t\t\t\t$sBox .= sprintf(\n str_replace(\n\t\t\t\t\t\t\t\t\t\t\t'###SPAN_BEGIN###',\n\t\t\t\t\t\t\t\t\t\t\t'<span'.$this->pi_classParam('browsebox-strong').'>',\n\t\t\t\t\t\t\t\t\t\t\t$this->pi_getLL('pi_list_browseresults_displays', 'Displaying results ###SPAN_BEGIN###%s to %s</span> out of ###SPAN_BEGIN###%s</span>')\n\t\t\t\t\t\t\t\t\t\t),\n $from_number,\n\t\t\t\t\t\t\t\t\t\t//to (must substract local_bodycount here!!!)\n $to_number,\n //of a total of\n $this->internal['res_count']\n );\n\n\n\n\t\t\t}else{\n\t\t\t\t$sBox .= $this->pi_getLL('pi_list_browseresults_noResults','Sorry, no items were found.');\n\t\t\t}\n\t\t\t$sBox .= '</p>';\n\t\t}\n\t\t$sBox .= '<'.trim('p '.$divParams).'>'.implode($spacer, $links).'</p>';\n\t\t$sBox .= '</div>';\n\t\treturn $sBox;\n\t}", "protected function _getLists() {\n\t\t/** @var Thrive_Dash_Api_WebinarJamStudio $api */\n\t\t$api = $this->getApi();\n\t\ttry {\n\t\t\t$lists = array();\n\t\t\t$webinars = $api->getUpcomingWebinars();\n\t\t\tforeach ( $webinars as $key => $item ) {\n\t\t\t\t$lists [] = array(\n\t\t\t\t\t'id' => $item['webinar_id'],\n\t\t\t\t\t'name' => $item['name']\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn $lists;\n\t\t} catch ( Thrive_Dash_Api_WebinarJamStudio_Exception $e ) {\n\t\t\t$this->_error = $e->getMessage();\n\n\t\t\treturn false;\n\t\t}\n\n\t}" ]
[ "0.6463519", "0.5745448", "0.54532343", "0.5325194", "0.52149856", "0.5209032", "0.51816463", "0.51735336", "0.51557595", "0.5139043", "0.51316184", "0.5059295", "0.5046634", "0.5028113", "0.501984", "0.4969596", "0.491994", "0.491994", "0.49058336", "0.48983213", "0.4859388", "0.48249108", "0.4816857", "0.47789714", "0.4742196", "0.4714494", "0.46652633", "0.46232188", "0.45920423", "0.4574662" ]
0.79743946
0
Test case for listPastWebinarQA List Q&A of Past Webinar.
public function testListPastWebinarQA() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testListPastWebinarPollResults()\n {\n }", "public function testPastWebinars()\n {\n }", "public function testWebinarPanelists()\n {\n }", "public function testListPastWebinarFiles()\n {\n }", "public function testWebinarPolls()\n {\n }", "public function testWebinarAbsentees()\n {\n }", "public function testWebinarRegistrantsQuestionsGet()\n {\n }", "public function test_all_questions_and_answers_route_when_questioner_has_sitewide_role() {\n global $DB;\n\n // create a user\n $user = $this->getDataGenerator()->create_user();\n $roleid = $DB->get_field('role', 'id', array('shortname' => 'manager'));\n $this->getDataGenerator()->role_assign($roleid, $user->id);\n\n // create a course\n $course = $this->getDataGenerator()->create_course();\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n $now = time();\n\n $this->loadDataSet($this->createArrayDataSet(array(\n 'videoquanda_questions' => array(\n array('id', 'instanceid', 'userid', 'timecreated', 'timemodified' ,'seconds', 'text'),\n array(1, $videoquanda->id, $user->id, $now, $now + 1, 2, 'dummy text')\n )\n )));\n\n $this->setUser($user);\n $client = new Client($this->_app);\n $client->request('GET', '/api/v1/' . $videoquanda->id . '/questions');\n $json = $client->getResponse()->getContent();\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $array = (array) json_decode($json);\n $this->assertCount(1, $array);\n }", "public function testListQrcodes()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs($this->user)\n ->visit('/admin')\n ->clickLink('Qrcodes')\n ->assertPathIs('/admin/qrcodes')\n ->assertSee('List Qrcodes');\n });\n }", "public function testWebinarPanelistCreate()\n {\n }", "public function testPastEmbargo()\n {\n $page = $this->objFromFixture(SiteTree::class, 'pastEmbargo');\n\n $page = $this->finishWorkflow($page);\n\n $this->assertNotEquals(0, $page->PublishJobID);\n $this->assertEquals(0, $page->UnPublishJobID);\n\n $publish = strtotime($page->PublishJob()->StartAfter ?? '');\n $this->assertFalse($publish);\n }", "public function test_admin_squad_list_b()\n {\n $this->request('GET', ['pages/Assignments', 'squad_list']);\n $this->assertResponseCode(404);\n }", "public function test_admin_tribe_list_b()\n {\n $this->request('GET', ['pages/Assignments', 'tribe_list']);\n $this->assertResponseCode(404);\n }", "public function testGetSurveyQuestionChoices0()\n {\n }", "public function testGetSurveyQuestionChoices0()\n {\n }", "public function testWebinar()\n {\n }", "public function test_post_question() {\n global $DB;\n\n // Create user\n $user = $this->getDataGenerator()->create_user();\n\n // create a course\n $course = $this->getDataGenerator()->create_course();\n\n // enrol the user on the course\n $this->getDataGenerator()->enrol_user($user->id, $course->id, $DB->get_field('role', 'id', array(\n 'shortname' => 'student',\n )));\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n // enrol the user on the course\n $this->getDataGenerator()->enrol_user($user->id, $course->id, $DB->get_field('role', 'id', array(\n 'shortname' => 'student',\n )));\n\n $question = array(\n 'seconds' => '2',\n 'text' => 'dummy text'\n );\n\n $this->setUser($user);\n\n $client = new Client($this->_app);\n $client->request('POST', '/api/v1/' . $videoquanda->id . '/questions', array(), array(), array(), json_encode($question));\n\n $this->assertEquals(201, $client->getResponse()->getStatusCode());\n $this->assertEquals(1, $DB->count_records('videoquanda_questions', array('instanceid' => $videoquanda->id)));\n }", "public function testGetSurveyQuestions0()\n {\n }", "public function testGetSurveyQuestions0()\n {\n }", "public function test_admin_training_list_b()\n {\n $this->request('GET', ['pages/MemberSkills', 'training_programs']);\n $this->assertResponseCode(404);\n }", "public function testQna(): void\n {\n $stream = $this->getFeed('/wellformed/atom10/qna.xml');\n $parser = $this->simplepie->parseXml($stream);\n $feed = $parser->getFeed();\n $entry = $feed->getEntries()[0];\n\n static::assertEquals('Q&A session', (string) $entry->getTitle());\n static::assertEquals(Serialization::HTML, $entry->getTitle()->getSerialization());\n }", "public function test_admin_squad_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Assignments', 'squad_list']);\n $this->assertResponseCode(404);\n }", "public function episodePremiumWatchableInDistantFuture(AcceptanceTester $I)\n {\n $I->wantTo('Verify that \"Never\" is displayed in the portal when Premium watchable date is in the distant future. - C225102');\n $I->amOnPage(ContentPage::$URL_ingest);\n\n ContentUtils::clickTableRowOfTitle($I, \"CXCMS_Ingest_ContentWindows_\" . BuildNo::$build . \" Episode Paid Distant Future\");\n ContentUtils::clickTableRowOfTitle($I, \"CXCMS_Ingest_ContentWindows_\" . BuildNo::$build . \" Episode Paid Distant Future Season\");\n ContentUtils::clickTableRowOfTitle($I, \"CXCMS_Ingest_ContentWindows_\" . BuildNo::$build . \" Episode Paid Distant Future Title\");\n\n $I->waitForText('Ingest Testing', 30, ContentPage::$channelRow);\n $I->seeInField(ContentPage::$windowing_premiumStartOfWindow_input, 'Never');\n }", "public function moviePremiumWatchableInDistantFuture(AcceptanceTester $I)\n {\n $I->wantTo('Verify that \"Never\" is displayed in the portal when Premium watchable date is in the distant future. - C225107');\n $I->amOnPage(ContentPage::$URL_ingest);\n\n ContentUtils::clickTableRowOfTitle($I, \"CXCMS_Ingest_ContentWindows_\" . BuildNo::$build . \" Movie Paid Distant Future\");\n\n $I->waitForText('Ingest Testing', 30, ContentPage::$channelRow);\n $I->seeInField(ContentPage::$windowing_premiumStartOfWindow_input, 'Never');\n }", "public function testWebinarStatus()\n {\n }", "public function testPastEvents()\n {\n // otherwise test will fail.\n // Other approach is to use fake data or mock it.\n \n $response = $this->json('GET', '/events/expired');\n \n $response\n ->assertStatus(200)\n ->assertJson([\n ['name' => 'Fashion Show']\n ]);\n }", "public function _testMultipleInventories()\n {\n\n }", "public function testPastEmbargoAfterExpiry()\n {\n $page = $this->objFromFixture(SiteTree::class, 'pastEmbargoAfterExpiry');\n\n $page = $this->finishWorkflow($page);\n\n $this->assertEquals(0, $page->PublishJobID);\n $this->assertEquals(0, $page->UnPublishJobID);\n }", "public function testWebinarRegistrantQuestionUpdate()\n {\n }", "public function test_admin_tribe_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Assignments', 'tribe_list']);\n $this->assertResponseCode(404);\n }" ]
[ "0.6955456", "0.59452575", "0.58298326", "0.5821201", "0.5732911", "0.56243193", "0.54987425", "0.54416364", "0.5420459", "0.5414977", "0.54115117", "0.53685975", "0.5187622", "0.5177601", "0.5177601", "0.5174332", "0.51445574", "0.5130628", "0.5130628", "0.51046103", "0.5099534", "0.5075157", "0.5072695", "0.50662506", "0.5065194", "0.50571734", "0.503583", "0.5025018", "0.50246006", "0.50206214" ]
0.7940479
0
Test case for webinarAbsentees Get Webinar Absentees.
public function testWebinarAbsentees() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testListPastWebinarPollResults()\n {\n }", "public function testListPastWebinarQA()\n {\n }", "public function testListEnrollmentRequests()\n {\n }", "public function testGetEventsIdSchedulesOut()\n {\n $eventId = '1';\n\n $result = $this->visit('events/' . $eventId . '/schedules')\n ->see('create your suaray account')\n ->see('welcome to suaray')\n ->seePageIs('/account/register');\n }", "public function testGetEventsEventSchedulesIdOut()\n {\n $eventId = '1';\n $id = '1';\n\n $result = $this->visit('events/' . $eventId . '/schedules/' . $id)\n ->see('create your suaray account')\n ->see('welcome to suaray')\n ->seePageIs('/account/register');\n }", "public function testListUserEnrollments()\n {\n }", "public function testWebinar()\n {\n }", "public function testWebinarPollGet()\n {\n }", "public function testIndexEvents()\n {\n \t$caldendarEvents = CalendarEvent::factory()->count(5)->create();\n \t$user = User::find($caldendarEvents[0]->user_id );\n\n\t\t/*\n\t\t * Confirm the visibility of all of a user's calendar events.\n\t\t */\n \t$response = $this->actingAs( $user )\n \t->get( route( 'event-planner.events.index' ) );\n \tforeach( $caldendarEvents as $calendarEvent ){\n \t\t$response->assertSee( $calendarEvent->location )\n \t\t->assertSee( $calendarEvent->type )\n \t\t->assertSee( $calendarEvent->showStartDate() );\n \t}\n\n }", "public function testWebinarPolls()\n {\n }", "public function testVolunteerHourIndexForContactFailure_Inactive()\n {\n $this->session([\n 'username' => $this->inactiveUser->username, \n 'access_level' => $this->inactiveUser->access_level\n ]);\n \n // Set test user as current authenticated user\n $this->be($this->inactiveUser);\n \n $volunteerID = 2;\n // Call route under test\n $response = $this->call('GET', 'volunteerhours/volunteer/'.$volunteerID);\n \n // Assert redirected to access denied page\n $this->assertRedirectedToRoute('unauthorized');\n }", "public function testWebinarStatus()\n {\n }", "public function testPastEvents()\n {\n // otherwise test will fail.\n // Other approach is to use fake data or mock it.\n \n $response = $this->json('GET', '/events/expired');\n \n $response\n ->assertStatus(200)\n ->assertJson([\n ['name' => 'Fashion Show']\n ]);\n }", "public function testWebinarRegistrantGet()\n {\n }", "public function index_should_not_return_any_collection()\r\n {\r\n $this->get('/holidays/gr/2018')->seeStatusCode(200);\r\n $this\r\n ->get('/holidays/gr/2018')\r\n ->seeJson( [\r\n 'status'=> 204,\r\n 'message'=>'succeeded with no content.',\r\n 'holidays' => []\r\n ] );\r\n $this->get('/holidays/?country=gr&year=2018')->seeStatusCode(200);\r\n $this\r\n ->get('/holidays/?country=gr&year=2018')\r\n ->seeJson( [\r\n 'status'=> 204,\r\n 'message'=>'succeeded with no content.',\r\n 'holidays' => []\r\n ] );\r\n }", "public function index()\n {\n //\n $absents = AbsentApplication::whereIn('user_id',\n User::whereIn('id',\n ProjectUser::whereIn('project_id',\n Project::where('managed',\n Auth::user()->id)->get()->pluck('id'))\n ->get()->pluck('user_id'))\n ->get()->pluck('id'))\n ->where('state', AbsentApplication::getAbsentWaitting())->get();\n\n\n return response()->json([\n 'absents' => $absents,\n ], 200);\n }", "public function getNegativeRespondedGuests()\n {\n $query = 'select attendees.displayName as attendeeName, users.name as userName from users right join attendees on attendees.userID = users.userID where attendees.isAttending = 0 AND users.isRSVP = 1;';\n if ($this->connectedModel->runQuery($query)) //query\n {\n while ($row = $this->connectedModel->getResultsAssoc())\n {\n $array[] = array('attendeeName' => $row['attendeeName'], 'userName' => $row['userName']);\n }\n return $array;\n }\n else\n {\n return -1;\n } \n }", "public function testGetAccountDashboardEventOut()\n {\n $eventId = '2';\n\n // Grab Page\n $result = $this->visit('account/dashboard/event/' . $eventId)\n ->see('create your suaray account')\n ->see('welcome to suaray')\n ->seePageIs('/account/register');\n }", "public function testAutoreportDaily()\n {\n echo \"\\n ---- Page : autoreport/daily ---- \\n\";\n $response = $this->visit('autoreport/daily');\n $this->assertResponseStatus($response->response->getStatusCode());\n echo \"Response is \". $response->response->getStatusCode();\n echo \"\\n\";\n }", "private function ofertas() {\n\t\t$data = date ( 'Y/m/d' );\n\t\t$params = array (\n\t\t\t\t'OffersUser' => array (\n\t\t\t\t\t\t'conditions' => array (\n\t\t\t\t\t\t\t\t'user_id' => $this->Session->read ( 'userData.User.id' ),\n\t\t\t\t\t\t\t\t'Offer.status' => 'ACTIVE',\n\t\t\t\t\t\t\t\t'Offer.begins_at <= ' => $data,\n\t\t\t\t\t\t\t\t'Offer.ends_at >= ' => $data \n\t\t\t\t\t\t) \n\t\t\t\t),\n\t\t\t\t'Offer' \n\t\t);\n\t\t$contador = $this->Utility->urlRequestToGetData ( 'offers', 'count', $params );\n\t\t\n\t\tif ($this->Session->check ( 'ofertasIds' )) {\n\t\t\t$this->Session->write ( 'HomeOfertas', 'desejos' );\n\t\t} else if (! $contador > 0 && ! $this->Session->check ( 'Ofertas-Assinaturas' )) {\n\t\t\t$this->Session->write ( 'HomeOfertas', 'publico' );\n\t\t} else {\n\t\t\t$this->Session->write ( 'HomeOfertas', 'personalizado' );\n\t\t}\n\t}", "public function testWebinarRegistrantsQuestionsGet()\n {\n }", "public function testWebinarRegistrants()\n {\n }", "public function testAttendeeSetStatusRecurExceptionAllFollowing()\n {\n $from = new Tinebase_DateTime('2012-02-01 00:00:00');\r\n $until = new Tinebase_DateTime('2012-02-29 23:59:59');\r\n \r\n $event = new Calendar_Model_Event(array(\r\n 'summary' => 'Some Daily Event',\r\n 'dtstart' => '2012-02-03 09:00:00',\r\n 'dtend' => '2012-02-03 10:00:00',\r\n 'rrule' => 'FREQ=DAILY;INTERVAL=1',\r\n 'container_id' => $this->_testCalendar->getId(),\r\n 'attendee' => $this->_getAttendee(),\r\n ));\r\n \r\n $persistentEvent = $this->_controller->create($event);\n \n $exceptions = new Tinebase_Record_RecordSet('Calendar_Model_Event');\r\n $recurSet = Calendar_Model_Rrule::computeRecurrenceSet($persistentEvent, $exceptions, $from, $until);\r\n \n // accept for sclever thisandfuture\n $start = $recurSet[10];\n $sclever = Calendar_Model_Attender::getAttendee($start->attendee, $event->attendee[1]);\r\n $sclever->status = Calendar_Model_Attender::STATUS_ACCEPTED;\r\n $this->_controller->attenderStatusCreateRecurException($start, $sclever, $sclever->status_authkey, TRUE);\r\n \n $events = $this->_controller->search(new Calendar_Model_EventFilter(array(\r\n array('field' => 'container_id', 'operator' => 'equals', 'value' => $this->_testCalendar->getId())\r\n )))->sort('dtstart', 'ASC');\n \n // assert two baseEvents\n $this->assertTrue($events[0]->rrule_until instanceof Tinebase_DateTime, 'rrule_until of first baseEvent is not set');\n $this->assertTrue($events[0]->rrule_until < new Tinebase_DateTime('2012-02-14 09:00:00'), 'rrule_until of first baseEvent is not adopted properly');\n $this->assertEquals(Calendar_Model_Attender::STATUS_NEEDSACTION, Calendar_Model_Attender::getAttendee($events[0]->attendee, $event->attendee[1])->status, 'first baseEvent status must not be touched');\n \n $this->assertEquals($events[1]->dtstart, new Tinebase_DateTime('2012-02-14 09:00:00'), 'start of second baseEvent is wrong');\n $this->assertTrue(empty($events[1]->recurid), 'second baseEvent is not a baseEvent');\n $this->assertEquals($events[1]->rrule, $event->rrule, 'rrule of second baseEvent must be set');\n $this->assertFalse($events[1]->rrule_until instanceof Tinebase_DateTime, 'rrule_until of second baseEvent must not be set');\n $this->assertEquals(Calendar_Model_Attender::STATUS_ACCEPTED, Calendar_Model_Attender::getAttendee($events[1]->attendee, $event->attendee[1])->status, 'second baseEvent status is not touched');\n }", "public function testGetEnrollmentRequest()\n {\n }", "public function testRequestEnrollment()\n {\n }", "public function AnomalyPageTest()\n {\n // Test user login\n $user = $this->testAccounts[\"anthro-analyst\"];\n $this->browse(function ($browser) use ($user) {\n $browser->visit(new loginPage)\n ->loginUser($user['email'], $user['password'])\n ->pause(3000)\n ->assertSee('Welcome');\n\n $browser->visit(new specimenPage)\n ->pause(5000)\n ->maximize()\n ->pause(2000)\n\n ->click('@leftSideBar-menu')\n ->pause(2000)\n ->click('@project-report-button')\n ->driver->switchTo()->window(collect($browser->driver->getWindowHandles())->last());\n $browser\n ->pause(3000)\n\n ->click('@anomaly_as')\n ->pause(10000)\n ->assertSee('Accession Number')\n ->assertSee('Bone')\n ->assertSee('Provenance 1')\n ->assertSee('Provenance 2')\n ->assertSee('Side')\n ->assertSee('Anomaly')\n\n ->pause(3000)\n\n\n ->logoutUser();\n });\n }", "public function testGetWaiversDefault()\n {\n $numWaivers = 5;\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::waivers($numWaivers));\n\n $waivers = $sw->getWaiverSummaries();\n\n $this->assertCount($numWaivers, $waivers);\n foreach($waivers as $waiver) {\n $this->assertInstanceOf(SmartwaiverWaiverSummary::class, $waiver);\n }\n\n $this->checkGetRequests($container, ['/v4/waivers?limit=20']);\n }", "public function testGetWaiversDefault()\n {\n $numWaivers = 5;\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, APISuccessResponses::waivers($numWaivers));\n\n $waivers = $sw->getWaiverSummaries();\n\n $this->assertCount($numWaivers, $waivers);\n foreach($waivers as $waiver) {\n $this->assertInstanceOf(SmartwaiverWaiverSummary::class, $waiver);\n }\n\n $this->checkGetRequests($container, ['/v4/waivers?limit=20']);\n }", "public function testReportsReferralsPayoutHistoryGet()\n {\n }", "public function testWebinarDelete()\n {\n }" ]
[ "0.6012117", "0.5984477", "0.5918694", "0.5873598", "0.58436704", "0.58301497", "0.58196026", "0.5788358", "0.5774703", "0.57724416", "0.5754003", "0.57515645", "0.570997", "0.5703932", "0.5624342", "0.5612756", "0.560048", "0.5572901", "0.5554806", "0.55531824", "0.5505148", "0.54856896", "0.5482735", "0.5421839", "0.5401551", "0.5383251", "0.53681713", "0.53681713", "0.5366429", "0.5337543" ]
0.7858616
0
Test case for webinarCreate Create a Webinar.
public function testWebinarCreate() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarRegistrantCreate()\n {\n }", "public function testWebinarPollCreate()\n {\n }", "public function testWebinar()\n {\n }", "public function testWebinarRegistrants()\n {\n }", "public function testWebinarPanelistCreate()\n {\n }", "public function testWebinarPolls()\n {\n }", "public function testWebinarUpdate()\n {\n }", "public function testWebinarStatus()\n {\n }", "public function testWebinarRegistrantGet()\n {\n }", "public function testWebinarRegistrantStatus()\n {\n }", "public function actionCreate()\n {\n $model = new WebinarCreateRequest();\n\n if ($model->load(Yii::$app->request->post()) ) {\n $model->status = Status::STATUS_NEW;\n $model->created_at = gmdate('Y-m-d H:i:s');\n $model->updated_at = gmdate('Y-m-d H:i:s');\n $model->created_by = $model->author_name;\n $model->updated_by = $model->author_name;\n $user = $model->author_name;\n $model->save();\n\n if($this->sendActivationLink($model->id, $model->email, $user)) {\n return $this->render('create', [\n 'model' => $model, \n 'status' => 'success', 'id' => $model->id]);\n }\n \n //return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function testWebinarAbsentees()\n {\n }", "public function testWebinarDelete()\n {\n }", "public function testCreateSurvey()\n {\n $data = [\n 'year' => 2020,\n 'type' => Survey::TRAINER,\n 'title' => 'My Awesome Survey',\n 'prologue' => 'Take the survey',\n 'epilogue' => 'Did you take it?'\n ];\n\n $response = $this->json('POST', 'survey', [\n 'survey' => $data\n ]);\n\n $response->assertStatus(200);\n $this->assertDatabaseHas('survey', $data);\n }", "function createWebinar($payloadArray)\n {\n $path = $this->getPathRelativeToOrganizer(sprintf('webinars'));\n\n $webinarObject = new WebinarEntity($payloadArray);\n\n return $this->sendRequest('POST', $path, $parameters = null, $payload = $webinarObject->toArray());\n }", "public function testEventCreate()\n {\n $response = $this->get('events/create');\n\n $response->assertStatus(200);\n }", "protected function setUp()\n {\n parent::setUp();\n $this->webinar = create(Webinar::class);\n }", "public function testIntegrationCreate()\n {\n $this->visit('user/create')\n ->see('Create New Account');\n $this->assertResponseOk();\n $this->assertViewHas('model');\n }", "public function testDeveloperCreate()\n {\n $response = $this->get('/developer/create');\n $response->assertStatus(200);\n }", "public function testStoreShouldCreateNewRiddle(){\n\t\t$riddle = [\n\t\t\t'solution' => 'solution',\n\t\t\t'riddle' => 'riddle',\n\t\t\t'name' => 'name',\n\t\t];\n\n\n\t\t$response = $this->call('POST', '/riddles', $riddle);\n\n\t\t$this->assertEquals(302, $response->status());\n\t\t$this->assertRedirectedTo(url('/riddles/1?successMessage=Record+Added+Successfully'));\n\n\t\t$this->assertEquals(1, count(Riddle::all()));\n\n\t\t$storedRiddle = Riddle::findById(1);\n\t\t$this->assertNotNull($storedRiddle);\n\n\t\t$this->assertEquals('solution', $storedRiddle->solution);\n\t\t$this->assertEquals('riddle', $storedRiddle->riddle);\n\t\t$this->assertEquals('name', $storedRiddle->name);\n\n\t\t$this->assertEquals(0, $storedRiddle->approved);\n\t\t$this->assertEquals(0, $storedRiddle->public);\n\t\t$this->assertEquals($this->user->id, $storedRiddle->owner_id);\n\t}", "public function user_can_visit_create_event_page()\n {\n $response = $this->get('/events/create');\n $response->assertStatus(200);\n $response->assertSeeText('Name');\n }", "public function testMeetingCreatePost()\n {\n $user = factory(App\\User::class)->create();\n }", "public function testListPastWebinarQA()\n {\n }", "public function testCreate()\n {\n $this->visit('/admin/school/create')\n ->submitForm($this->saveButtonText, $this->school)\n ->seePageIs('/admin/school')\n ;\n\n $this->seeInDatabase('schools', $this->school);\n }", "public function testPageCreate()\n {\n $faker = Faker::create();\n $response = $this\n ->actingAs(User::whereNotNull(\"verified\")->inRandomOrder()->first(), 'api')\n ->withHeaders([\n \"User-Agent\" => $faker->userAgent(),\n ])\n ->json('POST', \"/api/pages/\", [\n \"data\" => [\n \"name\" => $faker->sentence(4, true),\n ],\n \"relationships\" => [\n \"body\" => [\n \"data\" => [\n \"content\" => $faker->paragraphs(4, true),\n ],\n ],\n ],\n ]);\n $response\n ->assertStatus(201);\n }", "public function create()\n {\n // $crud = new Events();\n // $crud->photo ='anniv.png';\n // $crud->title = 'Sogod Founding Anniversary Concert';\n // $crud->descriptions = 'secret';\n // $crud->venue = 'Sogod Covered Court';\n // $crud->date = date('04/02/2018');\n // $crud->time = time('h:i:s');\n\n // $crud->save(); \n }", "public function testInstrumentCreate()\n {\n $this->browse(function (Browser $browser) {\n $user = User::find(1);\n $browser->loginAs($user)\n ->visit(new instrumentManagementPage())\n ->assertSee('Instruments')\n ->press('@actions-button')\n ->press('@actions-create-menu')\n ->assertSee('New Instrument')\n ->type('@code',uniqid('TestInstrument_'))\n ->type('@category', 'Dusk Testing')\n ->type('@module','Summer Capstone')\n ->type('@reference','Test - safe to delete')\n ->press('Save')\n //->press('@save-button') //TODO: use this once DUSK tag is fixed\n ->assertsee('View Instrument - TestInstrument_');\n });\n }", "public function testWebinarPollGet()\n {\n }", "public function testCreate()\n {\n $model = $this->makeFactory();\n \n $this->json('POST', static::ROUTE, $model->toArray(), [\n 'Authorization' => 'Token ' . self::getToken()\n ])\n ->seeStatusCode(JsonResponse::HTTP_CREATED) \n ->seeJson($model->toArray());\n }", "public function testWebinarRegistrantsQuestionsGet()\n {\n }" ]
[ "0.7855212", "0.7379238", "0.69512796", "0.6878894", "0.6584363", "0.6553019", "0.64912003", "0.6440262", "0.6421352", "0.64194024", "0.6349812", "0.63445705", "0.62597454", "0.62102824", "0.61887443", "0.6174561", "0.61369574", "0.6054688", "0.601544", "0.5883184", "0.5879682", "0.5864063", "0.58290356", "0.5801273", "0.57977116", "0.5793272", "0.57854867", "0.57656217", "0.5750161", "0.57478935" ]
0.8172204
0
Test case for webinarDelete Delete a Webinar.
public function testWebinarDelete() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarPollDelete()\n {\n }", "public function testWebinarPanelistDelete()\n {\n }", "public function testWebinarPanelistsDelete()\n {\n }", "public function deleteSportsVenue($venue);", "public function testDeleteSurvey()\n {\n $survey = Survey::factory()->create();\n $surveyId = $survey->id;\n\n $response = $this->json('DELETE', \"survey/{$surveyId}\");\n\n $response->assertStatus(204);\n $this->assertDatabaseMissing('survey', ['id' => $surveyId]);\n }", "public function test_delete() {\n global $DB;\n\n self::setAdminUser();\n $this->resetAfterTest(true);\n\n // Save new outage.\n $now = time();\n $outage = new outage([\n 'autostart' => false,\n 'warntime' => $now - 60,\n 'starttime' => 60,\n 'stoptime' => 120,\n 'title' => 'Title',\n 'description' => 'Description',\n ]);\n $outage->id = outagedb::save($outage);\n self::$outage = $outage;\n\n outagedb::delete(self::$outage->id);\n\n // Should not exist.\n $event = $DB->get_record_select(\n 'event',\n \"(eventtype = 'auth_outage' AND instance = :idoutage) OR (id = :idevent)\",\n ['idoutage' => self::$outage->id, 'idevent' => self::$event->id],\n 'id',\n IGNORE_MISSING\n );\n self::assertFalse($event);\n }", "public function testDelete()\n {\n $this->clientAuthenticated->request('DELETE', '/invoice/delete/' . self::$objectId);\n $response = $this->clientAuthenticated->getResponse();\n $this->assertJsonResponse($response, 200);\n\n //Deletes physically the entity created by test\n $this->deleteEntity('Invoice', 'invoiceId', self::$objectId);\n }", "public function testDelete()\n {\n $model = $this->makeFactory();\n $model->save();\n\n $this->json('DELETE', static::ROUTE . '/' . $model->id, [], [\n 'Authorization' => 'Token ' . self::getToken()\n ])\n ->seeStatusCode(JsonResponse::HTTP_NO_CONTENT);\n }", "public function test_deleteSubscriber() {\n\n }", "public function testDeleteSurvey0()\n {\n }", "public function testDeleteSurvey0()\n {\n }", "public function testDelete()\n\t{\n\t\t// Add test bookings\n\t\t$bookings = [];\n\t\tforeach ($this->clients as $client) {\n\t\t\t$booking = factory(\\App\\Booking::class)->create([\n\t\t\t\t'fitter_id' => $this->admin->fitter->id,\n\t\t\t\t'client_id' => $client->id,\n\t\t\t\t'horse_id' => factory(\\App\\Horse::class)->create(['client_id' => $client->id])->id,\n\t\t\t\t'rider_id' => factory(\\App\\Rider::class)->create(['client_id' => $client->id])->id,\n\t\t\t\t'user_id' => factory(\\App\\User::class)->create([\n\t\t\t\t\t'fitter_id' => $this->admin->fitter->id,\n\t\t\t\t\t'type' => 'fitter-user',\n\t\t\t\t])->id,\n\t\t\t]);\n\n\t\t\t$bookings[] = $booking->toArray();\n\t\t}\n\n\t\t$booking = \\App\\Booking::find($bookings[0]['id']);\n\n\t\t$this->actingAs($this->admin, 'api')\n\t\t\t ->delete('/api/v1/admin/bookings/' . $booking->id)\n\t\t\t ->assertStatus(200)\n\t\t\t ->assertJsonStructure([\n\t\t\t\t 'success',\n\t\t\t ]);\n\n\t\t$this->assertDatabaseMissing('bookings', ['id' => $booking->id]);\n\t}", "public function testDelete()\n\t{\n\t\t$this->resetReservationTable();\n\t\t$this->resetDateTimes();\n\t\t\n\t\t$reservation = new Reservation();\n\t\t$reservation->setAttributes(array(\n\t\t\t\t'roomid' => 1,\n\t\t\t\t'datefrom' => $this->_dateOverlapFrom,\n\t\t\t\t'numberofnights'=> $this->_numberofnights,\n\t\t\t\t));\n\t\t$reservation->save(false);\n\t\t$this->assertTrue($reservation->delete());\n\t}", "public function testLeaseDelete()\n {\n $user = factory(User::class)->create();\n $lease = factory(Lease::class)->create();\n\n $this->actingAs($user)\n ->seeIsAuthenticatedAs($user)\n ->get(route('lease.delete', ['id' => $lease->id]))\n ->assertStatus(200);\n }", "public function testDelete()\n\t{\n\t\t$client = static::createClient(array(), array(\n\t\t 'PHP_AUTH_USER' => 'jr',\n\t\t 'PHP_AUTH_PW' => 'jr',\n\t\t));\n\t\t$client->followRedirects();\n\n\t\t// On clique sur le lien entreprise de test\n\t\t$crawler = $client->request('GET', '/clients');\n\t\t$link = $crawler->filter('.bloc__title a:contains(\"Entreprise de test\")')->first()->link();\n\t\t$crawler = $client->click($link);\n\t\t//On vérifie qu'on est bien sur la bonne page\n\t\t$this->assertGreaterThan(0, $crawler->filter('h1:contains(\"Entreprise de test\")')->count());\n\n\t\t// On clique sur le bouton modifier\n\t\t$link = $crawler->filter('.btn--delete')->first()->link();\n\t\t$crawler = $client->click($link);\n\t\t//On vérifie qu'on est bien sur la bonne page\n\t\t$this->assertEquals(1, $crawler->filter('.breadcrumb:contains(\"Supprimer\")')->count()); \n\n\t\t// On modifie le métier\n\t\t$form = $crawler->selectButton('Supprimer')->form();\n\t\t$crawler = $client->submit($form);\t\n\n\t\t//On vérifie que ça a marché\n\t\t$this->assertEquals(1, $crawler->filter('html:contains(\"Le client a bien été supprimé.\")')->count());\n\n\t}", "public function testDeleteEnrollmentRequest()\n {\n }", "public function delete($episode);", "function deleteWebinar($webinarKey, $sendCancellationEmails = true)\n {\n ($sendCancellationEmails) ? $parameters = ['sendCancellationEmails' => true] : $parameters = null;\n\n $path = $this->getPathRelativeToOrganizer(sprintf('webinars/%s', $webinarKey));\n\n return $this->sendRequest('DELETE', $path, $parameters, $payload = null);\n }", "public function testRemove()\n {\n $paymentMethodId = '36538b73-0ff9-4bf6-bc94-20f499b4f85d';\n $customerId = '20e68ad7-ff54-4cb6-8556-f87f58bcf995';\n\n $this->resource->remove($paymentMethodId,$customerId);\n\n $this->assertAttributeEquals(BASE_URL, 'base_url', $this->connector, 'Failed. Base url not correct');\n $this->assertAttributeEquals('DELETE', 'method', $this->connector, 'Failed. Method is not correct');\n $this->assertAttributeEquals('paymentmethods/' . $paymentMethodId . '?customerId=' .$customerId, 'url', $this->connector, 'Failed. Url is not correct');\n }", "public function delete($Enterprise) { ; }", "public function testDeletePromotionCampaignApplicationUsingDELETE()\n {\n }", "public function testDeleteVendorComplianceSurvey()\n {\n }", "public function testDelete()\n {\n\n // Create exhibits and items.\n $neatline1 = $this->_createNeatline('Test Exhibit 1', '', 'test-exhibit-1');\n $neatline2 = $this->_createNeatline('Test Exhibit 2', '', 'test-exhibit-2');\n $item1 = $this->_createItem();\n $item2 = $this->_createItem();\n\n // Create records.\n $record1 = new NeatlineDataRecord($item1, $neatline1);\n $record2 = new NeatlineDataRecord($item2, $neatline1);\n $record3 = new NeatlineDataRecord($item1, $neatline2);\n $record4 = new NeatlineDataRecord($item2, $neatline2);\n $record1->save();\n $record2->save();\n $record3->save();\n $record4->save();\n\n // 2 exhibits, 4 data records.\n $_exhibitsTable = $this->db->getTable('NeatlineExhibit');\n $_recordsTable = $this->db->getTable('NeatlineDataRecord');\n $this->assertEquals($_exhibitsTable->count(), 2);\n $this->assertEquals($_recordsTable->count(), 4);\n\n // Call delete.\n $neatline1->delete();\n\n // 1 exhibits, 2 data records.\n $this->assertEquals($_exhibitsTable->count(), 1);\n $this->assertEquals($_recordsTable->count(), 2);\n\n }", "public function testDelete()\n {\n }", "public function testDeleteCampaignFromPromotionUsingDELETE()\n {\n }", "public function testDelete()\n {\n $this->clientAuthenticated->request('DELETE', '/transaction/delete/' . self::$objectId);\n $response = $this->clientAuthenticated->getResponse();\n $this->assertJsonResponse($response, 200);\n\n //Deletes physically the entity created by test\n $this->deleteEntity('Transaction', 'transactionId', self::$objectId);\n }", "public function testDeleteNotTrashedAndOwnCreated()\r\n {\r\n //create teacher user\r\n $teacher = $this->CreateTeacher();\r\n $lisUser = $this->CreateTeacherUser($teacher);\r\n\r\n //now we have created studentuser set to current controller\r\n $this->controller->setLisUser($lisUser);\r\n $this->controller->setLisPerson($teacher);\r\n\r\n $subjectRound = $this->CreateSubjectRound();\r\n $student = $this->CreateStudent();\r\n $anotherTeacher = $this->CreateTeacher();\r\n //$studentGrade = $this->CreateStudentGrade();\r\n\r\n $independentWork = $this->CreateIndependentWork([\r\n 'name' => uniqid() . 'Name',\r\n 'duedate' => new \\DateTime,\r\n 'description' => uniqid() . ' Description for independentwork',\r\n 'durationAK' => (int) uniqid(),\r\n 'subjectRound' => $subjectRound->getId(),\r\n 'teacher' => $anotherTeacher->getId(),\r\n 'student' => $student->getId(),\r\n 'createdBy' => $lisUser->getId()\r\n ]);\r\n\r\n\r\n $this->em->persist($independentWork);\r\n $this->em->flush($independentWork);\r\n\r\n $id = $independentWork->getId();\r\n\r\n //prepare request\r\n $this->routeMatch->setParam('id', $id);\r\n\r\n $this->request->setMethod('delete');\r\n $result = $this->controller->dispatch($this->request);\r\n $response = $this->controller->getResponse();\r\n\r\n $this->PrintOut($result, false);\r\n\r\n //assertions\r\n $this->assertEquals(200, $response->getStatusCode());\r\n $this->assertEquals(false, $result->success);\r\n $this->assertEquals('NOT_TRASHED', $result->message);\r\n }", "public function testDelete()\n\t{\n\t\t$saddle = $this->saddles[0];\n\n\t\t$this->actingAs($this->admin, 'api')\n\t\t\t ->delete('/api/v1/admin/saddles/' . $saddle->id)\n\t\t\t ->assertStatus(200);\n\n\t\t$this->assertDatabaseMissing('saddles', ['id' => $saddle->id]);\n\t}", "public function deleted(Instructor $instructor)\n {\n //\n }", "public function testDeleteChallenge()\n {\n }" ]
[ "0.7386751", "0.7297796", "0.71680236", "0.66529924", "0.6622835", "0.6563354", "0.65136284", "0.6496925", "0.6489714", "0.64357275", "0.64357275", "0.637083", "0.63620377", "0.6346963", "0.6310489", "0.6308891", "0.6300885", "0.6295698", "0.6273204", "0.62324136", "0.6232029", "0.6224839", "0.62239164", "0.6212295", "0.6201468", "0.61771375", "0.61664516", "0.6161545", "0.6133159", "0.6113491" ]
0.8196134
0
Test case for webinarPanelistCreate Add Panelists.
public function testWebinarPanelistCreate() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarPanelists()\n {\n }", "public function testWebinarPanelistsDelete()\n {\n }", "public function testWebinarPanelistDelete()\n {\n }", "public function set_panelist() {\n\t\tif (!isset($this->args[0]) || empty($this->args[0])) {\n\t\t\t$this->out('Provide MV user_id argument.');\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (!$this->get_settings()) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$url = $this->settings['hostname.mbd'].'/panelists/'.$this->args[0].'?X-ApiKey='.$this->settings['mbd.api_key'];\n\t\t$this->out('Reaching out to '.$url);\n\t\t$http = new HttpSocket(array(\n\t\t\t'timeout' => 60,\n\t\t\t'ssl_verify_host' => false // PHP does not seem to check SANs for CNs\n\t\t));\n\t\t$request = array(\n\t\t\t'dwid' => '00000000-0000-0001-0379-ef1412100980',\n\t\t\t'panelistId' => $this->args[0],\n\t\t\t'partnerId' => $this->settings['mbd.partner_id'],\n\t\t\t'donotcontact' => true\n\t\t);\n\t\ttry {\n\t\t\t$results = $http->post($url, json_encode($request), $this->options);\n\t\t} \n\t\tcatch (Exception $e) {\n\t\t\t$this->out('Panelists Api endpoint failed.');\n\t\t}\n\t\t\n\t\tprint_r($results);\n\t}", "public function testAddPage() {\r\n $callback = function() {\r\n $this->timer->destroy();\r\n $this->application->stop();\r\n };\r\n\r\n $this->timer = new Timer($callback, $this->application->getWindow(), Timer::TEST_TIMEOUT);\r\n $this->timer->start();\r\n\r\n $this->tab = new Tab(Point::createInstance(10, 10), Dimension::createInstance(200, 100));\r\n $this->application->getWindow()->getRootPane()->add($this->tab);\r\n $this->tab->addTabPage('tab1');\r\n $this->tab->addTabPage('tab2');\r\n\r\n $tabPage1 = $this->tab->getTabPage('tab1');\r\n $tabPage2 = $this->tab->getTabPage('tab2');\r\n\r\n $tabPage1->add(new EditBox('box 1.1', Point::createInstance(5, 15), Dimension::createInstance(50, 20)));\r\n $tabPage1->add(new EditBox('box 1.2', Point::createInstance(65, 15), Dimension::createInstance(50, 20)));\r\n\r\n $tabPage2->add(new EditBox('box 2.1', Point::createInstance(5, 15), Dimension::createInstance(50, 20)));\r\n $tabPage2->add(new EditBox('box 2.2', Point::createInstance(5, 45), Dimension::createInstance(50, 20)));\r\n\r\n $this->application->start();\r\n }", "function admin_add()\n\t{\n\t $this->set('pagetitle',\"Add Page\");\t\n\t $this->loadModel('User');\n\t $userlists = array();\n\t $userlists = array_merge($userlists,array('0'=>'Admin'));\n\t $allClientLists = $this->User->find('list',array('conditions'=>array('User.user_type_id'=>1),'fields'=>array('id','fname')));\n $userlists = array_merge($userlists,$allClientLists);\n\t $this->set('userlists',$userlists);\n\t \n\t if(!empty($this->data))\n\t {\n\t\tif($this->Page->save($this->data))\n\t\t{\n\t\t $this->Session->setFlash('The Page has been created','message/green');\n\t\t $this->redirect(array('action' => 'index'));\n\t\t}\n\t\telse\n\t\t{\n\t\t $this->Session->setFlash('The Page could not be saved. Please, try again.','message/yellow');\n\t\t}\n\t }\n\t}", "public function addAction() {\n\n //ONLY LOGGED IN USER CAN CREATE\n if (!$this->_helper->requireUser()->isValid())\n $this->respondWithError('unauthorized');\n\n\n //GET PAGE ID AND CHECK PAGE ID VALIDATION\n $listing_id = $this->_getParam('listing_id');\n if (empty($listing_id)) {\n $this->respondWithError('no_record');\n }\n\n //GET VIEWER INFORMATION\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n //GET USER DIARIES\n $wishlistTable = Engine_Api::_()->getDbtable('wishlists', 'sitereview');\n $wishlistDatas = $wishlistTable->userWishlists($viewer);\n $wishlistDataCount = Count($wishlistDatas);\n $sitereview = Engine_Api::_()->getItem('sitereview_listing', $this->_getParam('listing_id'));\n if (empty($sitereview)) {\n $this->respondWithError('no_record');\n }\n\n //FORM GENERATION\n if ($this->getRequest()->isGet()) {\n $response= Engine_Api::_()->getApi('Siteapi_Core', 'sitereview')->getAddToWishlistForm();\n \n $this->respondWithSuccess($response, true);\n } else if ($this->getRequest()->isPost()) {\n $values = $this->_getAllParams();\n if (!Engine_Api::_()->getApi('settings', 'core')->getSetting('sitereview.favourite', 0)) {\n //CHECK FOR NEW ADDED DIARY TITLE OR \n if (!empty($values['body']) && empty($values['title'])) {\n $this->respondWithError('parameter_missing');\n }\n //CHECK FOR TITLE IF NO DIARY\n if (empty($wishlistDatas) && empty($values['title']))\n $this->respondWithError('Title feild required');\n\n //GET DIARY PAGE TABLE\n $wishlistEventTable = Engine_Api::_()->getDbtable('wishlistmaps', 'sitereview');\n\n $wishlistOldIds = array();\n\n //GET NOTIFY API\n $notifyApi = Engine_Api::_()->getDbtable('notifications', 'activity');\n\n\n //WORK ON PREVIOUSLY CREATED DIARY\n if (!empty($wishlistDatas)) {\n foreach ($wishlistDatas as $wishlistData) {\n $key_name = 'wishlist_' . $wishlistData->wishlist_id;\n if (isset($values[$key_name]) && !empty($values[$key_name])) {\n $wishlistEventTable->insert(array(\n 'wishlist_id' => $wishlistData->wishlist_id,\n 'listing_id' => $listing_id,\n ));\n\n //DIARY COVER PHOTO\n $wishlistTable->update(\n array(\n 'listing_id' => $listing_id,\n ), array(\n 'wishlist_id = ?' => $wishlistData->wishlist_id,\n 'listing_id = ?' => 0\n )\n );\n\n $activityApi = Engine_Api::_()->getDbtable('actions', 'activity');\n $action = $activityApi->addActivity($viewer, $wishlistData, \"sitereview_wishlist_add_listing_listtype_\" . $sitereview->listingtype_id, '', array('listing' => array($sitereview->getType(), $sitereview->getIdentity())));\n\n if ($action)\n $activityApi->attachActivity($action, $sitereview);\n }\n $in_key_name = 'inWishlist_' . $wishlistData->wishlist_id;\n if (isset($values[$in_key_name]) && empty($values[$in_key_name])) {\n $wishlistOldIds[$wishlistData->wishlist_id] = $wishlistData;\n $wishlistEventTable->delete(array('wishlist_id = ?' => $wishlistData->wishlist_id, 'listing_id = ?' => $listing_id));\n\n //DELETE ACTIVITY FEED\n $actionTable = Engine_Api::_()->getDbtable('actions', 'activity');\n $actionTableName = $actionTable->info('name');\n\n $action_id = $actionTable->select()\n ->setIntegrityCheck(false)\n ->from($actionTableName, 'action_id')\n ->joinInner('engine4_activity_attachments', \"engine4_activity_attachments.action_id = $actionTableName.action_id\", array())\n ->where('engine4_activity_attachments.id = ?', $listing_id)\n ->where($actionTableName . '.type = ?', \"sitereview_wishlist_add_listing\")\n ->where($actionTableName . '.subject_type = ?', 'user')\n ->where($actionTableName . '.object_type = ?', 'sitereview_wishlist')\n ->where($actionTableName . '.object_id = ?', $wishlistData->wishlist_id)\n ->query()\n ->fetchColumn();\n\n if (!empty($action_id)) {\n $activity = Engine_Api::_()->getItem('activity_action', $action_id);\n if (!empty($activity)) {\n $activity->delete();\n }\n }\n }\n }\n }\n\n if (!empty($values['title'])) {\n\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n\n try {\n //CREATE DIARY\n $wishlist = $wishlistTable->createRow();\n $wishlist->setFromArray($values);\n $wishlist->owner_id = $viewer_id;\n $wishlist->listing_id = $listing_id; //DIARY COVER PHOTO\n $wishlist->save();\n\n //PRIVACY WORK\n $auth = Engine_Api::_()->authorization()->context;\n $roles = array('owner', 'owner_member', 'owner_member_member', 'owner_network', 'registered', 'everyone');\n\n if (empty($values['auth_view'])) {\n $values['auth_view'] = 'owner';\n }\n\n $viewMax = array_search($values['auth_view'], $roles);\n foreach ($roles as $i => $role) {\n $auth->setAllowed($wishlist, $role, 'view', ($i <= $viewMax));\n }\n\n $db->commit();\n $wishlistEventTable->insert(array(\n 'wishlist_id' => $wishlist->wishlist_id,\n 'listing_id' => $listing_id,\n 'date' => new Zend_Db_Expr('NOW()')\n ));\n\n $activityApi = Engine_Api::_()->getDbtable('actions', 'activity');\n $action = $activityApi->addActivity($viewer, $sitereview, \"sitereview_wishlist_add_listing\", null, array('child_id' => $wishlist->wishlist_id));\n\n if ($action) {\n $activityApi->attachActivity($action, $sitereview);\n }\n } catch (Exception $e) {\n $db->rollback();\n throw $e;\n }\n }\n $this->successResponseNoContent('no_content', true);\n } else {\n try {\n $wishlistTable = Engine_Api::_()->getDbtable('wishlists', 'sitereview');\n $wishlist_id = $wishlistTable->recentWishlistId($viewer_id, $listing_id);\n $action = $this->_getParam('perform', 'add');\n Engine_Api::_()->getDbtable('wishlistmaps', 'sitereview')->performWishlistMapAction($wishlist_id, $listing_id, $action);\n $this->successResponseNoContent('no_content', true);\n } catch (Exception $ex) {\n $this->respondWithError('internal_server_error', $ex->getMessage());\n }\n }\n }\n }", "function thumbwhere_contentcollectionitem_add_page() {\n $controller = entity_ui_controller('thumbwhere_contentcollectionitem');\n return $controller->addPage();\n}", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// \"edit\"\n\t\t$item = &$this->ListOptions->Add(\"edit\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"detail_avaluo\"\n\t\t$item = &$this->ListOptions->Add(\"detail_avaluo\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->Visible = $Security->AllowList(CurrentProjectID() . 'avaluo') && !$this->ShowMultipleDetails;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\tif (!isset($GLOBALS[\"avaluo_grid\"])) $GLOBALS[\"avaluo_grid\"] = new cavaluo_grid;\n\n\t\t// Multiple details\n\t\tif ($this->ShowMultipleDetails) {\n\t\t\t$item = &$this->ListOptions->Add(\"details\");\n\t\t\t$item->CssClass = \"text-nowrap\";\n\t\t\t$item->Visible = $this->ShowMultipleDetails;\n\t\t\t$item->OnLeft = TRUE;\n\t\t\t$item->ShowInButtonGroup = FALSE;\n\t\t}\n\n\t\t// Set up detail pages\n\t\t$pages = new cSubPages();\n\t\t$pages->Add(\"avaluo\");\n\t\t$this->DetailPages = $pages;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\">\";\n\t\t$item->MoveTo(0);\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = FALSE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "function thumbwhere_contentcollection_add_page() {\n $controller = entity_ui_controller('thumbwhere_contentcollection');\n return $controller->addPage();\n}", "function SetupListOptions() {\n\t\tglobal $Security, $tbl_slide;\n\n\t\t// \"view\"\n\t\t$this->ListOptions->Add(\"view\");\n\t\t$item =& $this->ListOptions->Items[\"view\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsLoggedIn();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"edit\"\n\t\t$this->ListOptions->Add(\"edit\");\n\t\t$item =& $this->ListOptions->Items[\"edit\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsLoggedIn();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"copy\"\n\t\t$this->ListOptions->Add(\"copy\");\n\t\t$item =& $this->ListOptions->Items[\"copy\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsLoggedIn();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"delete\"\n\t\t$this->ListOptions->Add(\"delete\");\n\t\t$item =& $this->ListOptions->Items[\"delete\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsLoggedIn();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\tif ($tbl_slide->Export <> \"\" ||\n\t\t\t$tbl_slide->CurrentAction == \"gridadd\" ||\n\t\t\t$tbl_slide->CurrentAction == \"gridedit\")\n\t\t\t$this->ListOptions->HideAllOptions();\n\t}", "public function add() {\n $this->_setModalLayout();\n //List Label\n $list_lb = $this->Label->find('all', array(\n 'conditions' => array('type' => 'TeamModel')\n ));\n $list_lb = $this->Label->removeArrayWrapper('Label', $list_lb, 'id');\n $list_lb = $this->Label->makeNestedLabels($this->Label->getLabelHierarchy($list_lb));\n\n // List Plan\n $listPlan = $this->Plan->find('list', array(\n 'fields' => array('id', 'type')\n ));\n\n $this->set(array(\n 'list_lb' => $list_lb,\n 'listPlan' => $listPlan\n ));\n\n if ($this->request->is('post') || $this->request->is('put')) {\n\n // Add project\n if (isset($this->request->data['Team'])) {\n $rq_data = $this->request->data['Team'];\n // Upload image\n if (is_uploaded_file($rq_data['splash']['tmp_name'])) {\n if (($rq_data['splash']['type'] == 'image/jpg') || ($rq_data['splash']['type'] == 'image/jpeg') || ($rq_data['splash']['type'] == 'image/png') || ($rq_data['splash']['type'] == 'image/gif')) {\n $imginfo = pathinfo($rq_data['splash']['name']);\n $filename = $imginfo['filename'] . '_' . md5(time()) . '.' . $imginfo['extension'];\n move_uploaded_file(\n $rq_data['splash']['tmp_name'], WWW_ROOT . 'upload' . DS . 'splash' . DS . $filename\n );\n // store the filename in the array to be saved to the db\n $rq_data['splash'] = $filename;\n } else {\n $this->Session->setFlash(__('有効なイメージを提供してください。'), 'alert-box', array('class' => 'alert-danger'));\n $this->redirect(array('action' => 'index'));\n }\n } else {\n $rq_data['splash'] = '';\n }\n $rq_data['management_id'] = $this->Auth->user('id');\n $dup = $this->Team->find('all', array('conditions' => array(\n 'name' => $rq_data['name']\n )));\n if (empty($dup)) {\n $rq_data['cdate'] = date('Y-m-d H:i:s');\n if ($this->Team->save($rq_data,false)) {\n $new_team_id = $this->Team->getLastInsertId();\n // Add Label \n if (isset($this->request->data['Label'])) {\n $rq_label = $this->request->data['Label'];\n $rq_label['type'] = 'TeamModel';\n $rq_label['label'] = $rq_label['add_new_text'];\n $rq_label['team_id'] = Configure::read('teamId');\n $rq_label['cdate'] = date('Y-m-d H:i:s');\n if (isset($rq_label['add_new_text'])) {\n $existing = $this->Label->find('all', array('conditions' => array(\n 'label' => $rq_label['add_new_text'],\n 'team_id' => $rq_label['team_id'],\n 'type' => $rq_label['type'],\n )));\n } else {\n $existing = '';\n }\n if ($rq_label['new_label'] != null) {\n if (isset($rq_label['add_new_text']) && $rq_label['add_new_text'] != null) {\n $rq_label['parent_id'] = $rq_label['new_label'];\n if (empty($existing)) {\n if ($this->Label->save($rq_label)) {\n // Get new ID record\n $new_id = $this->Label->getLastInsertId();\n } else {\n $this->Session->setFlash(__('Can not create new label'), 'alert-box', array('class' => 'alert-danger'));\n $this->redirect(array('action' => 'index'));\n }\n } else {\n $this->Session->setFlash(__('このラベルは既に存在します。'), 'alert-box', array('class' => 'alert-danger'));\n return $this->redirect($this->referer());\n }\n } else {\n $lb_id = $rq_label['new_label'];\n }\n } else {\n if (isset($rq_label['add_new_text']) && $rq_label['add_new_text'] != null) {\n $rq_label['parent_id'] = 0;\n if (empty($existing)) {\n if ($this->Label->save($rq_label)) {\n // Get new ID record\n $new_id = $this->Label->getLastInsertId();\n } else {\n $this->Session->setFlash(__('Can not create new label'), 'alert-box', array('class' => 'alert-danger'));\n $this->redirect(array('action' => 'index'));\n }\n } else {\n $this->Session->setFlash(__('このラベルは既に存在します。'), 'alert-box', array('class' => 'alert-danger'));\n return $this->redirect($this->referer());\n }\n }\n }\n }\n /* Save record to label_datas table */\n $this->request->data['LabelDatas']['target_id'] = $new_team_id;\n $this->request->data['LabelDatas']['cdate'] = date('Y-m-d H:i:s');\n if ($rq_label['new_label'] != null) {\n if ($rq_label['add_new_text'] != null) {\n $this->request->data['LabelDatas']['label_id'] = $new_id;\n } else {\n $this->request->data['LabelDatas']['label_id'] = $lb_id;\n }\n $this->Label->LabelData->save($this->request->data['LabelDatas']);\n } else {\n if ($rq_label['add_new_text'] != null) {\n $this->request->data['LabelDatas']['label_id'] = $new_id;\n $this->Label->LabelData->save($this->request->data['LabelDatas']);\n }\n }\n /* End save */\n $this->Session->setFlash(__('プロジェクトのアップデートに成功しました。'), 'alert-box', array('class' => 'alert-success'));\n return $this->redirect(array('action' => 'index'));\n } else {\n $this->Session->setFlash(__('新規プロジェクトを登録することはできません。'), 'alert-box', array('class' => 'alert-danger'));\n return $this->redirect(array('action' => 'index'));\n }\n } else {\n $this->Session->setFlash(__('このプロジェクトは既に存在します。'), 'alert-box', array('class' => 'alert-danger'));\n return $this->redirect($this->referer());\n }\n }\n }\n $this->render('edit');\n }", "public function create()\n {\n $this->title .= ' create';\n $this->vars = array_add($this->vars, 'menuArray', $this->rep->makeArray());\n }", "public function create()\n {\n return view('AdminPanel.Collection.AddCollection');\n }", "public function testAddColPosListLayoutItems()\n {\n }", "protected function createTabs() {}", "function SetupListOptions() {\r\n\t\tglobal $Security, $Language;\r\n\r\n\t\t// \"view\"\r\n\t\t$item = &$this->ListOptions->Add(\"view\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->CanView();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// \"edit\"\r\n\t\t$item = &$this->ListOptions->Add(\"edit\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->CanEdit();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// \"copy\"\r\n\t\t$item = &$this->ListOptions->Add(\"copy\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->CanAdd();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// \"delete\"\r\n\t\t$item = &$this->ListOptions->Add(\"delete\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->CanDelete();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// Call ListOptions_Load event\r\n\t\t$this->ListOptions_Load();\r\n\t}", "public function addAction() {\n\t\tlist(, $groups) = Resource_Service_Pgroup::getAllPgroup();\n\t\t$this->assign('groups', $groups);\n\t\t$this->assign('ntype', $this->ntype);\n\t\t$this->assign('btype', $this->btype);\n\t}", "public function testListPastWebinarQA()\n {\n }", "public function action_addListMenu() {\n $list_id = $this->request->post('list_id');\n $res = Model::factory('ElectUserList')->add($this->user->id, $list_id);\n if($res) echo $res[1];\n else echo 'not';\n exit();\n }", "function eclecticapp_checklist_settings_create() {\n $page_title = 'Checklist Admin';\n $menu_title = 'Checklist Admin';\n $capability = 'manage_options';\n $menu_slug = 'checklist_settings';\n $function = 'eclecticapp_checklist_settings_display';\n $icon_url = '';\n $position = 20;\n\n add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $position );\n}", "function SetupListOptions() {\n\t\tglobal $Security, $t_tinbai_mainsite;\n\n\t\t// \"view\"\n\t\t$this->ListOptions->Add(\"view\");\n\t\t$item =& $this->ListOptions->Items[\"view\"];\n\t\t$item->CssStyle = \"white-space: nowrap;width:15px\";\n\t\t$item->Visible = $Security->CanView();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"edit\"\n\t\t$this->ListOptions->Add(\"edit\");\n\t\t$item =& $this->ListOptions->Items[\"edit\"];\n\t\t$item->CssStyle = \"white-space: nowrap;width:15px\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"checkbox\"\n\t\t$this->ListOptions->Add(\"checkbox\");\n\t\t$item =& $this->ListOptions->Items[\"checkbox\"];\n\t\t$item->CssStyle = \"white-space: nowrap;width:15px\";\n\t\t$item->Visible = ($Security->CanDelete() || $Security->CanEdit());\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" class=\\\"phpmaker\\\" onclick=\\\"t_tinbai_mainsite_list.SelectAllKey(this);\\\">\";\n\t\t$this->ListOptions->MoveItem(\"checkbox\", 0); // Move to first column\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\tif ($t_tinbai_mainsite->Export <> \"\" ||\n\t\t\t$t_tinbai_mainsite->CurrentAction == \"gridadd\" ||\n\t\t\t$t_tinbai_mainsite->CurrentAction == \"gridedit\")\n\t\t\t$this->ListOptions->HideAllOptions();\n\t}", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// \"view\"\n\t\t$item = &$this->ListOptions->Add(\"view\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanView();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"edit\"\n\t\t$item = &$this->ListOptions->Add(\"edit\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"copy\"\n\t\t$item = &$this->ListOptions->Add(\"copy\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanAdd();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"delete\"\n\t\t$item = &$this->ListOptions->Add(\"delete\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanDelete();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"userpermission\"\n\t\t$item = &$this->ListOptions->Add(\"userpermission\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsAdmin();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t}", "private function testsSection() {\n global $DB, $CFG, $PAGE;\n //var_dump($PAGE->context->id); \n //echo '<pre>'.print_r($PAGE, true).'</pre>'; \n $this->_form->addElement('header', 'tests', 'Tests'); \n \n $this->_form->addElement('html', '<div id=\"ca-tests\">');\n \n // Get existing tests\n $tests = $DB->get_records('codeactivity_tests', array('activity_id' => $this->current->id)); \n //echo '<pre>'.print_r($this, true).'</pre>'; \n if (!empty($tests)) {\n foreach ($tests as $test) {\n //echo '<pre>'.print_r($test, true).'</pre>'; \n $this->_form->addElement('html', codeactivity::testHTML($test->id));\n } \n } \n \n \n $this->_form->addElement('html', '</div>'); // #ca-tests\n \n $this->_form->addElement('html', '<div id=\"ca-add-test\" style=\"display:none;\">');\n //get_string('codeactivityname', 'codeactivity'), array('size'=>'64'));\n $this->_form->addElement('text',\n 'testname',\n get_string('test_name', 'codeactivity'),\n array('size' => '64')\n );\n $this->_form->setType('testname', PARAM_RAW);\n $this->_form->addElement(\n 'select', \n 'testtype', \n get_string('test_type', 'codeactivity'), \n array(\n 'unittest' => get_string('unittest', 'codeactivity'), \n 'output' => get_string('outputmatch', 'codeactivity')\n )\n ); \n \n $this->_form->addElement('html', '<div id=\"ca-unittestcode\" style=\"display:none;\">'); \n $this->_form->addElement(\n 'textarea',\n 'unittestcode',\n get_string('unittest_code', 'codeactivity')\n ); \n $this->_form->addElement('html', '</div>'); \n \n $this->_form->addElement('html', '<div id=\"ca-outputmatching\" style=\"display:none;\">');\n $this->_form->addElement(\n 'select',\n 'runfile',\n get_string('runfile', 'codeactivity'),\n array()); \n \n $this->_form->addElement(\n 'textarea',\n 'expectedoutput',\n get_string('expected_output', 'codeactivity')); \n\n $this->_form->addElement(\n 'selectyesno',\n 'convertnulls',\n get_string('convert_nulls', 'codeactivity')); \n $this->_form->addElement(\n 'selectyesno',\n 'ignorewhitespace',\n get_string('ignore_whitespace', 'codeactivity')); \n $this->_form->addElement('html', '</div>'); \n \n $this->_form->addElement('html', '</div>'); // #ca-add-test\n \n $buttonarray=array();\n \n $buttonarray[] = $this->_form->createElement('button', 'add_test', 'Add Test');\n $buttonarray[] = $this->_form->createElement('button', 'add_save', 'Save');\n $buttonarray[] = $this->_form->createElement('button', 'add_cancel', 'Cancel');\n \n $this->_form->addGroup($buttonarray, 'add_buttons', '', array(''), false);\n \n $this->_form->addElement('hidden', 'ca_temp_code', uniqid()); \n $this->_form->setType('ca_temp_code', PARAM_RAW); \n //echo '<pre>'.print_r($PAGE->context, true).'</pre>'; \n $this->_form->addElement('hidden', 'ca_context', $PAGE->context->instanceid);\n $this->_form->setType('ca_context', PARAM_RAW); \n \n }", "protected function addElements() \n {\n // Add \"email\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'title',\n 'options' => [\n 'label' => 'Title',\n ],\n ]);\n \n // Add \"parent_id\" field\n $this->add([ \n 'type' => 'text',\n 'name' => 'parent_id', \n 'options' => [\n 'label' => 'Full Name',\n ],\n ]);\n \n if ($this->scenario == 'create') {\n \n\n }\n \n // Add \"status\" field\n $this->add([ \n 'type' => 'select',\n 'name' => 'status',\n 'options' => [\n 'label' => 'Status',\n 'value_options' => [\n 1 => 'Active',\n 2 => 'Retired', \n ]\n ],\n ]);\n \n // Add the Submit button\n $this->add([\n 'type' => 'submit',\n 'name' => 'submit',\n 'attributes' => [ \n 'value' => 'Create'\n ],\n ]);\n }", "public function panierAdd() : void\n {\n if(!$this->userSession->isAuthenticatedUser()){\n redirect(\"index.php?action=user&action2=loginForm\");\n }\n \n $this->panierModel->addPanier((int) $_GET['id']);\n require_once 'www/templates/panier/PanierView.phtml';\n }", "function SetupListOptions() {\r\n\t\tglobal $Security, $Language;\r\n\r\n\t\t// \"view\"\r\n\t\t$item = &$this->ListOptions->Add(\"view\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->IsLoggedIn();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// Call ListOptions_Load event\r\n\t\t$this->ListOptions_Load();\r\n\t}", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// \"view\"\n\t\t$item = &$this->ListOptions->Add(\"view\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanView();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"edit\"\n\t\t$item = &$this->ListOptions->Add(\"edit\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"copy\"\n\t\t$item = &$this->ListOptions->Add(\"copy\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanAdd();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"delete\"\n\t\t$item = &$this->ListOptions->Add(\"delete\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanDelete();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\">\";\n\t\t$item->MoveTo(0);\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = FALSE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = TRUE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "public function testCreateListSuccessfully(): void\n {\n $this->post('/mailchimp/lists', static::$listData);\n\n $content = \\json_decode($this->response->getContent(), true);\n\n $this->assertResponseOk();\n $this->seeJson(static::$listData);\n self::assertArrayHasKey('mail_chimp_id', $content);\n self::assertNotNull($content['mail_chimp_id']);\n\n $this->createdListIds[] = $content['mail_chimp_id']; // Store MailChimp list id for cleaning purposes\n }", "public function addAction() {\r\n\r\n $param = $this->_getParam('param');\r\n $request_url = $this->_getParam('request_url');\r\n $return_url = $this->_getParam('return_url');\r\n $front = Zend_Controller_Front::getInstance();\r\n $base_url = $front->getBaseUrl();\r\n\r\n // CHECK USER VALIDATION\r\n if (!$this->_helper->requireUser()->isValid()) {\r\n $host = (!empty($_ENV[\"HTTPS\"]) && 'on' == strtolower($_ENV[\"HTTPS\"])) ? \"https://\" : \"http://\";\r\n if ($base_url == '') {\r\n $URL_Home = $host . $_SERVER['HTTP_HOST'] . '/login';\r\n } else {\r\n $URL_Home = $host . $_SERVER['HTTP_HOST'] . '/' . $request_url . '/login';\r\n }\r\n if (empty($param)) {\r\n return $this->_helper->redirector->gotoUrl($URL_Home, array('prependBase' => false));\r\n } else {\r\n return $this->_helper->redirector->gotoUrl($URL_Home . '?return_url=' . urlencode($return_url), array('prependBase' => false));\r\n }\r\n }\r\n\r\n //SET LAYOUT\r\n $this->_helper->layout->setLayout('default-simple');\r\n\r\n //ONLY LOGGED IN USER CAN CREATE\r\n if (!$this->_helper->requireUser()->isValid())\r\n return;\r\n\r\n //CREATION PRIVACY\r\n if (!$this->_helper->requireAuth()->setAuthParams('sitestoreproduct_wishlist', null, \"create\")->isValid())\r\n return;\r\n\r\n //GET PAGE ID AND CHECK PAGE ID VALIDATION\r\n $product_id = $this->_getParam('product_id');\r\n if (empty($product_id)) {\r\n return $this->_forward('notfound', 'error', 'core');\r\n }\r\n\r\n //GET VIEWER INFORMATION\r\n $viewer = Engine_Api::_()->user()->getViewer();\r\n $this->view->viewer_id = $viewer_id = $viewer->getIdentity();\r\n\r\n //GET USER WISHLISTS\r\n $wishlistTable = Engine_Api::_()->getDbtable('wishlists', 'sitestoreproduct');\r\n $wishlistDatas = $wishlistTable->getUserWishlists($viewer_id);\r\n $this->view->wishlistDatasCount = $wishlistDataCount = Count($wishlistDatas);\r\n\r\n //LISING WILL ADD IF YOU CAN VIEW THIS\r\n $this->view->sitestoreproduct = $sitestoreproduct = Engine_Api::_()->getItem('sitestoreproduct_product', $this->_getParam('product_id'));\r\n\r\n $this->view->can_add = 1;\r\n if (!$this->_helper->requireAuth()->setAuthParams($sitestoreproduct, null, \"view\")->isValid()) {\r\n $this->view->can_add = 0;\r\n }\r\n\r\n //AUTHORIZATION CHECK\r\n if (!empty($sitestoreproduct->draft) || empty($sitestoreproduct->search) || empty($sitestoreproduct->approved)) {\r\n $this->view->can_add = 0;\r\n }\r\n\r\n //FORM GENERATION\r\n $this->view->form = $form = new Sitestoreproduct_Form_Wishlist_Add();\r\n\r\n $this->view->success = 0;\r\n\r\n //FORM VALIDATION\r\n if (!$this->getRequest()->isPost() || !$form->isValid($this->getRequest()->getPost())) {\r\n return;\r\n }\r\n\r\n //GET FORM VALUES\r\n $values = $form->getValues();\r\n\r\n //CHECK FOR NEW ADDED WISHLIST TITLE\r\n if (!empty($values['body']) && empty($values['title'])) {\r\n\r\n $error = $this->view->translate('Please enter the wishlist title otherwise remove the wishlist note.');\r\n $this->view->status = false;\r\n $error = Zend_Registry::get('Zend_Translate')->_($error);\r\n $form->getDecorator('errors')->setOption('escape', false);\r\n $form->addError($error);\r\n return;\r\n }\r\n\r\n //GET WISHLIST PAGE TABLE\r\n $wishlistProductTable = Engine_Api::_()->getDbtable('wishlistmaps', 'sitestoreproduct');\r\n\r\n $wishlistOldIds = array();\r\n\r\n //GET FOLLOW TABLE\r\n $followTable = Engine_Api::_()->getDbTable('follows', 'seaocore');\r\n\r\n //GET NOTIFY API\r\n $notifyApi = Engine_Api::_()->getDbtable('notifications', 'activity');\r\n\r\n //WORK ON PREVIOUSLY CREATED WISHLIST\r\n foreach ($wishlistDatas as $wishlistData) {\r\n $key_name = 'wishlist_' . $wishlistData->wishlist_id;\r\n if (isset($values[$key_name]) && !empty($values[$key_name])) {\r\n\r\n $wishlistProductTable->insert(array(\r\n 'wishlist_id' => $wishlistData->wishlist_id,\r\n 'product_id' => $product_id,\r\n ));\r\n\r\n //WISHLIST COVER PHOTO\r\n $wishlistTable->update(\r\n array(\r\n 'product_id' => $product_id,\r\n ), array(\r\n 'wishlist_id = ?' => $wishlistData->wishlist_id,\r\n 'product_id = ?' => 0\r\n )\r\n );\r\n\r\n //GET FOLLOWERS\r\n $followers = $followTable->getFollowers('sitestoreproduct_wishlist', $wishlistData->wishlist_id, $viewer_id);\r\n foreach ($followers as $follower) {\r\n $followerObject = Engine_Api::_()->getItem('user', $follower->poster_id);\r\n $wishlist = Engine_Api::_()->getItem('sitestoreproduct_wishlist', $wishlistData->wishlist_id);\r\n $http = _ENGINE_SSL ? 'https://' : 'http://';\r\n $wishlist_link = '<a href=\"' . $http . $_SERVER['HTTP_HOST'] . '/' . $wishlist->getHref() . '\">' . $wishlist->getTitle() . '</a>';\r\n $notifyApi->addNotification($followerObject, $viewer, $sitestoreproduct, 'sitestoreproduct_wishlist_followers', array(\"wishlist\" => $wishlist_link));\r\n }\r\n\r\n $activityApi = Engine_Api::_()->getDbtable('actions', 'activity');\r\n $action = $activityApi->addActivity($viewer, $wishlistData, \"sitestoreproduct_wishlist_add_product\", '', array('product' => array($sitestoreproduct->getType(), $sitestoreproduct->getIdentity()),\r\n ));\r\n if ($action)\r\n $activityApi->attachActivity($action, $sitestoreproduct);\r\n }\r\n\r\n $in_key_name = 'inWishlist_' . $wishlistData->wishlist_id;\r\n if (isset($values[$in_key_name]) && empty($values[$in_key_name])) {\r\n $wishlistOldIds[$wishlistData->wishlist_id] = $wishlistData;\r\n $wishlistProductTable->delete(array('wishlist_id = ?' => $wishlistData->wishlist_id, 'product_id= ?' => $product_id));\r\n\r\n //DELETE ACTIVITY FEED\r\n $actionTable = Engine_Api::_()->getDbtable('actions', 'activity');\r\n $actionTableName = $actionTable->info('name');\r\n\r\n $action_id = $actionTable->select()\r\n ->setIntegrityCheck(false)\r\n ->from($actionTableName, 'action_id')\r\n ->joinInner('engine4_activity_attachments', \"engine4_activity_attachments.action_id = $actionTableName.action_id\", array())\r\n ->where('engine4_activity_attachments.id = ?', $product_id)\r\n ->where($actionTableName . '.type = ?', \"sitestoreproduct_wishlist_add_listing\")\r\n ->where($actionTableName . '.subject_type = ?', 'user')\r\n ->where($actionTableName . '.object_type = ?', 'sitestoreproduct_wishlist')\r\n ->where($actionTableName . '.object_id = ?', $wishlistData->wishlist_id)\r\n ->query()\r\n ->fetchColumn();\r\n\r\n if (!empty($action_id)) {\r\n $activity = Engine_Api::_()->getItem('activity_action', $action_id);\r\n if (!empty($activity)) {\r\n $activity->delete();\r\n }\r\n }\r\n }\r\n }\r\n\r\n\r\n if (!empty($values['title'])) {\r\n\r\n $db = Engine_Db_Table::getDefaultAdapter();\r\n $db->beginTransaction();\r\n\r\n try {\r\n\r\n //CREATE WISHLIST\r\n $wishlist = $wishlistTable->createRow();\r\n $wishlist->setFromArray($values);\r\n $wishlist->owner_id = $viewer_id;\r\n $wishlist->product_id = $product_id; //WISHLIST COVER PHOTO\r\n $wishlist->save();\r\n\r\n //PRIVACY WORK\r\n $auth = Engine_Api::_()->authorization()->context;\r\n $roles = array('owner', 'owner_member', 'owner_member_member', 'owner_network', 'registered', 'everyone');\r\n\r\n if (empty($values['auth_view'])) {\r\n $values['auth_view'] = array('everyone');\r\n }\r\n\r\n $viewMax = array_search($values['auth_view'], $roles);\r\n foreach ($roles as $i => $role) {\r\n $auth->setAllowed($wishlist, $role, 'view', ($i <= $viewMax));\r\n }\r\n\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollback();\r\n throw $e;\r\n }\r\n\r\n $wishlistProductTable->insert(array(\r\n 'wishlist_id' => $wishlist->wishlist_id,\r\n 'product_id' => $product_id,\r\n 'date' => new Zend_Db_Expr('NOW()')\r\n ));\r\n\r\n $activityApi = Engine_Api::_()->getDbtable('actions', 'activity');\r\n $action = $activityApi->addActivity($viewer, $wishlist, \"sitestoreproduct_wishlist_add_product\", '', array('product' => array($sitestoreproduct->getType(), $sitestoreproduct->getIdentity()),\r\n ));\r\n if ($action)\r\n $activityApi->attachActivity($action, $sitestoreproduct);\r\n }\r\n\r\n $this->view->wishlistOldDatas = $wishlistOldIds;\r\n $this->view->wishlistNewDatas = $wishlistProductTable->pageWishlists($product_id, $viewer_id);\r\n $this->view->success = 1;\r\n \r\n if (!Engine_API::_()->seaocore()->checkSitemobileMode('fullsite-mode')) {\r\n //$this->view->notSuccessMessage=true;\r\n return $this->_forward('success', 'utility', 'core', array(\r\n 'smoothboxClose' => true,\r\n 'parentRefresh' => true,\r\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Add successfully.'))\r\n ));\r\n }\r\n }" ]
[ "0.7211089", "0.65043837", "0.6392804", "0.5913536", "0.5587062", "0.5463761", "0.5356804", "0.5312291", "0.5305108", "0.5288998", "0.5263735", "0.5252212", "0.52127165", "0.5202787", "0.52021176", "0.52019876", "0.5184639", "0.51807183", "0.5171748", "0.5163554", "0.51232785", "0.51141214", "0.5099525", "0.5099047", "0.50935376", "0.50778276", "0.5074943", "0.50656843", "0.50598454", "0.5044847" ]
0.81021476
0
Test case for webinarPanelistDelete Remove a Panelist.
public function testWebinarPanelistDelete() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarPanelistsDelete()\n {\n }", "public function testWebinarPanelistCreate()\n {\n }", "public function testRemoveListSuccessfully(): void\n {\n $this->createMailchimpList($list);\n\n $this->delete(\\sprintf('/mailchimp/lists/%s', $list['list_id']));\n\n $this->assertResponseOk();\n self::assertEmpty(\\json_decode($this->response->content(), true));\n }", "function action_remove() {\n\t\t\t$data = UTIL::get_post('data');\n\t\t\t$id = (int)$data['rem_id'];\n\t\t\t$table = $data['rem_table'];\n\t\t\t\n\t\t\t$choosen = $this->SESS->get('objbrowser', 'choosen');\n\t\t\tunset($choosen[$table][$id]);\n\t\t\tif (count($choosen[$table]) == 0) unset($choosen[$table]);\n\t\t\t\n\t\t\t$this->SESS->set('objbrowser', 'choosen', $choosen);\n\t\t}", "protected function removeFromList($data)\n {\n $repo = \\XLite\\Core\\Database::getRepo('\\XLite\\Model\\ViewList');\n $repo->deleteInBatch($repo->findBy($data), false);\n }", "public function RemoveArtworkList(): void{\n\n if(!Session::isLogin())\n exit;\n\n if(!ArtworkVerifier::removeList($_POST))\n exit;\n\n if(isset(UserList::where('user_list.user_id', Session::getUser()['id'])->where('user_list.artwork_id', $_POST['artwork_id'])->getOne()->id))\n UserList::where('user_id', Session::getUser()['id'])\n ->where('artwork_id', $_POST['artwork_id'])\n ->delete();\n }", "public function deleteAction() {\n\n //CHECK USER VALIDATION\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n //GET VIEWER INFO\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n\n $listingtype_id = $this->_listingType->listingtype_id;\n $this->view->listingType = $this->_listingType;\n\n //GET TAB ID\n $this->view->tab_selected_id = $tab_selected_id = $this->_getParam('content_id');\n $this->view->format_form = $this->_getParam('format', null);\n\n //GET VIDEO OBJECT\n $this->view->sitereview_video = $sitereview_video = Engine_Api::_()->getItem('sitereview_video', $this->getRequest()->getParam('video_id'));\n\n //GET VIDEO TITLE\n $this->view->title = $sitereview_video->title;\n\n //GET LISTING ID\n $listing_id = $sitereview_video->listing_id;\n\n //GET NAVIGATION \n $this->view->navigation = Engine_Api::_()->getApi('menus', 'core')->getNavigation('sitereview_main');\n\n //GET SITEREVIEW SUBJECT\n $this->view->sitereview = $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n $can_edit = $sitereview->authorization()->isAllowed($viewer, 'edit_listtype_' . $sitereview->listingtype_id);\n\n if (!$sitereview_video) {\n $this->view->status = false;\n $this->view->error = Zend_Registry::get('Zend_Translate')->_(\"Video doesn't exists or not authorized to delete\");\n return;\n }\n\n //VIDEO OWNER AND LISTING OWNER CAN DELETE VIDEO\n if ($viewer_id != $sitereview_video->owner_id && $can_edit != 1) {\n return $this->_forwardCustom('requireauth', 'error', 'core');\n }\n\n if (!$this->getRequest()->isPost()) {\n $this->view->status = false;\n $this->view->error = Zend_Registry::get('Zend_Translate')->_('Invalid request method');\n return;\n }\n\n $db = $sitereview_video->getTable()->getAdapter();\n $db->beginTransaction();\n\n try {\n\n Engine_Api::_()->getDbtable('videoratings', 'sitereview')->delete(array('videorating_id =?' => $this->getRequest()->getParam('video_id')));\n\n $sitereview_video->delete();\n\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n\n\n\n\n $this->view->status = true;\n if ($this->view->format_form == 'smoothbox') {\n $this->_forwardCustom('success', 'utility', 'core', array(\n 'smoothboxClose' => true,\n 'parentRefresh' => '500',\n 'parentRefreshTime' => '500',\n 'format' => 'smoothbox',\n 'messages' => Zend_Registry::get('Zend_Translate')->_('You have successfully deleted this video.')\n ));\n } else {\n if (Engine_API::_()->seaocore()->checkSitemobileMode('fullsite-mode')) {\n if ($can_edit) {\n return $this->_gotoRouteCustom(array('action' => 'edit', 'listing_id' => $sitereview->listing_id), \"sitereview_videospecific_listtype_$listingtype_id\", true);\n } else {\n return $this->_gotoRouteCustom(array('listing_id' => $sitereview->listing_id, 'slug' => $sitereview->getSlug(), 'tab' => $tab_selected_id), \"sitereview_entry_view_listtype_$listingtype_id\", true);\n }\n } else {\n return $this->_gotoRouteCustom(array('listing_id' => $sitereview->listing_id, 'slug' => $sitereview->getSlug(), 'tab' => $tab_selected_id), \"sitereview_entry_view_listtype_$listingtype_id\", true);\n }\n }\n }", "public function removeAction() {\n $result = array('status' => 'failed');\n if ($this->getRequest()->isPost() && $this->getRequest()->getPost('remove') == 'true') {\n $dirName = Mage::getBaseDir('code').'/local/Balticode/Postoffice';\n if (is_dir($dirName) && file_exists($dirName.'/etc/config.xml')) {\n $directory = new Varien_Io_File();\n $deleteResult = $directory->rmdir($dirName, true);\n if ($deleteResult) {\n $result['status'] = 'success';\n }\n }\n \n }\n $this->getResponse()->setRawHeader('Content-type: application/json');\n $this->getResponse()->setBody(json_encode($result));\n return;\n }", "public function testWebinarPanelists()\n {\n }", "public function removeAction()\n {\n $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tx_frpformanswers_domain_model_formentry');\n\n $queryBuilder->delete('tx_frpformanswers_domain_model_formentry')\n ->where($queryBuilder->expr()->eq('pid', $queryBuilder->createNamedParameter($this->pid, \\PDO::PARAM_INT)))\n ->andWhere($queryBuilder->expr()->eq('deleted', $queryBuilder->createNamedParameter(1, \\PDO::PARAM_INT)))\n ->execute();\n\n $this->addFlashMessage(\n LocalizationUtility::translate('LLL:EXT:frp_form_answers/Resources/Private/Language/de.locallang_be.xlf:flashmessage.removeEntries.body', null, [$this->pid]),\n LocalizationUtility::translate('LLL:EXT:frp_form_answers/Resources/Private/Language/de.locallang_be.xlf:flashmessage.removeEntries.title'),\n \\TYPO3\\CMS\\Core\\Messaging\\FlashMessage::OK,\n true);\n\n $this->redirect('list');\n }", "public function actionDelete()\n {\n extract(Yii::$app->request->post());\n $this->findModel($list, $item)->delete();\n }", "private function actionListDelete() {\n $put_vars = $this->actionListPutConvert();\n $this->loadModel($put_vars['id'])->delete();\n }", "public function removeAction() {\r\n //DELETE SLIDE DURING THE UPLOAD\r\n $is_ajax = (int) $this->_getParam('is_ajax');\r\n if (!empty($is_ajax)) {\r\n\r\n //GET IMAGE ID AND IT'S OBJECT\r\n $image_id = (int) $this->_getParam('image_id');\r\n $image = Engine_Api::_()->getItem('advancedslideshow_image', $image_id);\r\n\r\n $db = $image->getTable()->getAdapter();\r\n $db->beginTransaction();\r\n\r\n try {\r\n $image->delete();\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollBack();\r\n throw $e;\r\n }\r\n //@unlink(APPLICATION_PATH . \"/public/advancedslideshow/1000000/1000/5/\" . $image_id . 't.' . $image->extension);\r\n }\r\n\r\n //GET SLIDESHOW ID AND IT'S OBJECT\r\n $advancedslideshow_id = (int) $this->_getParam('advancedslideshow_id');\r\n $this->view->advancedslideshow = $advancedslideshow = Engine_Api::_()->getItem('advancedslideshow', $advancedslideshow_id);\r\n\r\n if ($this->getRequest()->isPost() && $this->getRequest()->getPost('confirm') == true) {\r\n\r\n //GET IMAGE ID AND IT'S OBJECT\r\n $image_id = (int) $this->_getParam('image_id');\r\n $image = Engine_Api::_()->getItem('advancedslideshow_image', $image_id);\r\n\r\n if (empty($image)) {\r\n return;\r\n }\r\n\r\n $db = $image->getTable()->getAdapter();\r\n $db->beginTransaction();\r\n\r\n try {\r\n $image->delete();\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollBack();\r\n throw $e;\r\n }\r\n\r\n //@unlink(APPLICATION_PATH . \"/public/advancedslideshow/1000000/1000/5/\" . $image_id . 't.' . $image->extension);\r\n\r\n //GET TOTAL SLIDES COUNT\r\n $total_images = Engine_Api::_()->getDbTable('images', 'advancedslideshow')->getTotalSlides($advancedslideshow_id);\r\n\r\n $start_index = $advancedslideshow->start_index;\r\n\r\n if ($start_index > $total_images - 1) {\r\n if ($total_images != 0) {\r\n $advancedslideshow->start_index = $total_images - 1;\r\n $advancedslideshow->save();\r\n } else {\r\n $advancedslideshow->start_index = 0;\r\n $advancedslideshow->save();\r\n }\r\n }\r\n\r\n $parentRedirect = 'admin/advancedslideshow/slides/manage/advancedslideshow_id/' . $advancedslideshow_id;\r\n $this->_forward('success', 'utility', 'core', array(\r\n 'smoothboxClose' => true,\r\n 'parentRefresh' => 10,\r\n 'parentRedirect' => $parentRedirect,\r\n 'messages' => Zend_Registry::get('Zend_Translate')->_('You have successfully deleted the slide.')\r\n ));\r\n }\r\n }", "public function testRemove()\n {\n $context = $this->createPageContext();\n $storage = $this->createStorage();\n $tokenStorage = $this->createTokenStorage();\n\n $layout1 = $storage->create();\n $layout2 = $storage->create();\n $layout3 = $storage->create();\n\n $context->addLayoutList([$layout1->getId(), $layout2->getId(), $layout3->getId()]);\n $token = $context->createEditToken([$layout1->getId(), $layout3->getId()], ['user_id' => 17]);\n $tokenString = $token->getToken();\n $tokenStorage->saveToken($token);\n\n // Save our editable instances\n $tokenStorage->update($tokenString, $layout1);\n $tokenStorage->update($tokenString, $layout3);\n\n // And now remove one layout\n $tokenStorage->remove($tokenString, $layout2->getId());\n $this->assertTrue($token->contains($layout1->getId()));\n $this->assertFalse($token->contains($layout2->getId()));\n $this->assertTrue($token->contains($layout3->getId()));\n\n try {\n $tokenStorage->load($tokenString, $layout2->getId());\n $this->fail();\n } catch (InvalidTokenError $e) {\n $this->assertTrue(true);\n }\n\n // And the other two still work\n $tokenStorage->load($tokenString, $layout1->getId());\n $tokenStorage->load($tokenString, $layout3->getId());\n }", "function delete_list($listid)\n\t{\n\t\t$this->http_set_content_type('text/html');\n\t\t$this->load_url(\"lists/$listid\", 'delete', array(), 204);\n\t\tif(intval($this->http_response_code) === 204):\n\t\t\treturn true;\n\t\tendif;\n\t\treturn false;\n\t}", "public function onRemove();", "public function destroy($list_id)\n {\n $list = Listt::find($list_id);\n $list->delete();\n return redirect(route('adminpanel.index'));\n }", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "public function removePhotoAction() {\n\n //CHECK USER VALIDATION\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n //GET LISTING ID\n $listing_id = $this->_getParam('listing_id');\n\n //GET LISTING ITEM\n $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n $viewer = Engine_Api::_()->user()->getViewer();\n\n //GET LISTING TYPE ID\n $listingtype_id = $sitereview->listingtype_id;\n\n //CAN EDIT OR NOT\n if (!$this->_helper->requireAuth()->setAuthParams($sitereview, $viewer, \"edit_listtype_$listingtype_id\")->isValid()) {\n return;\n }\n\n //GET FILE ID\n $file_id = Engine_Api::_()->getDbtable('photos', 'sitereview')->getPhotoId($listing_id, $sitereview->photo_id);\n\n //DELETE PHOTO\n if (!empty($file_id)) {\n $photo = Engine_Api::_()->getItem('sitereview_photo', $file_id);\n $photo->delete();\n }\n\n //SET PHOTO ID TO ZERO\n $sitereview->photo_id = 0;\n $sitereview->save();\n\n return $this->_helper->redirector->gotoRoute(array('action' => 'change-photo', 'listing_id' => $listing_id), \"sitereview_dashboard_listtype_$listingtype_id\", true);\n }", "public function testRemove()\n {\n $success = $this->collection->remove(3);\n\n $this->assertTrue($success);\n $this->assertCount(2, $this->collection);\n $this->assertFalse($this->collection->contains(3));\n }", "public function testRemoveMenuAction()\n {\n parent::login();\n $this->clickAt(\"link=CMS\", \"\");\n $this->click(\"link=Menus\");\n $this->waitForPageToLoad(\"30000\");\n $this->dragAndDropToObject(\"css=ul#sortable1.connectedSortable.ui-sortable li#id-1\", \"css=ul#sortable2\");\n $this->clickAt(\"link=CMS\", \"\");\n $this->click(\"link=Menus\");\n $this->waitForPageToLoad(\"30000\");\n $this->assertFalse($this->isElementPresent(\"css=ul#sortable1.connectedSortable.ui-sortable li#id-1.ui-state-default.ui-sortable-handle\"));\n $this->isElementPresent(\"css=ul#sortable2.connectedSortable.ui-sortable li#id-1.ui-state-default.ui-sortable-handle\");\n $this->assertElementContainsText(\"css=ul#sortable2.connectedSortable.ui-sortable li#id-1.ui-state-default.ui-sortable-handle\", \"Test Menu Selenium 1\");\n parent::logout();\n }", "public function deleteList($data)\n {\n var_export($data);\n //return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "function remove()\n\t{\n\t\tJSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));\n\n\t\t$user = JFactory::getUser();\n\t\tif (!$user->authorise('core.delete', 'com_gmapfp'))\n\t\t{\n\t\t\t$this->setMessage(JText::_('JLIB_APPLICATION_ERROR_DELETE_NOT_PERMITTED'), 'error');\n\t\t} else {\n\t\t\t$model = $this->getModel('gmapfp');\n\t\t\tif(!$model->delete()) {\n\t\t\t\t$msg = JText::_( 'Error: One or more GMapFPs could not be Deleted' );\n\t\t\t} else {\n\t\t\t\t$msg = JText::_( 'GMapFP(s) Deleted' );\n\t\t\t}\n\t\t}\n\n\t\t$this->setRedirect( 'index.php?option=com_gmapfp&controller=gmapfp&task=view', $msg );\n\t}", "public function testWebinarPollDelete()\n {\n }", "public function deleteAction() {\n\n //GET POST SUBJECT\n $post = Engine_Api::_()->core()->getSubject('sitereview_post');\n\n //GET LISTING SUBJECT\n $sitereview = $post->getParent('sitereview_listing');\n\n //GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n\n if (!$sitereview->isOwner($viewer) && !$post->isOwner($viewer)) {\n return $this->_helper->requireAuth->forward();\n }\n\n //AUTHORIZATION CHECK\n if (!$this->_helper->requireAuth()->setAuthParams($sitereview, null, \"view_listtype_$sitereview->listingtype_id\")->isValid())\n return;\n\n //MAKE FORM\n $this->view->form = $form = new Sitereview_Form_Post_Delete();\n\n //CHECK METHOD\n if (!$this->getRequest()->isPost()) {\n return;\n }\n\n //FORM VALIDATION\n if (!$form->isValid($this->getRequest()->getPost())) {\n return;\n }\n\n //PROCESS\n $table = Engine_Api::_()->getDbTable('posts', 'sitereview');\n $db = $table->getAdapter();\n $db->beginTransaction();\n $topic_id = $post->topic_id;\n try {\n $post->delete();\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n //GET TOPIC\n $topic = Engine_Api::_()->getItem('sitereview_topic', $topic_id);\n\n $href = ( null == $topic ? $sitereview->getHref() : $topic->getHref() );\n return $this->_forwardCustom('success', 'utility', 'core', array(\n 'closeSmoothbox' => true,\n 'parentRedirect' => $href,\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('Post deleted.')),\n ));\n }", "function remove()\n\t{\n\t\tJRequest::checkToken() or jexit( 'Invalid Token' );\n\n\t\t$cid = JRequest::getVar( 'cid', array(), 'post', 'array' );\n\t\tJArrayHelper::toInteger($cid);\n\n\t\tif (count( $cid ) < 1) {\n\t\t\tJError::raiseError(500, JText::_( 'Select an item to delete' ) );\n\t\t}\n\n\t\t$model = $this->getModel('weblink');\n\t\tif(!$model->delete($cid)) {\n\t\t\techo \"<script> alert('\".$model->getError(true).\"'); window.history.go(-1); </script>\\n\";\n\t\t}\n\n\t\t$this->setRedirect( 'index.php?option=com_weblinks' );\n\t}", "public function action_remove(){\n\t\t$monumentId = $this->request->param('id');\n\t\t$user = Auth::instance()->get_user();\n\t\t\n\t\t// Remove the monument from the user list\n\t\t$favoriteList = new Model_List_Favorite();\n\t\t$favoriteList->remove($monumentId, $user->UserID);\n\t\t\n\t\t// Redirect the user back to the monument page\n\t\t$this->request->redirect('monument/view/' . $monumentId);\n\t}" ]
[ "0.795948", "0.58884895", "0.5749253", "0.5748073", "0.573655", "0.5675471", "0.5661825", "0.5626825", "0.55920637", "0.5565379", "0.5538664", "0.5531006", "0.5487608", "0.5451873", "0.5446417", "0.54163927", "0.5416242", "0.54077244", "0.54077244", "0.54077244", "0.54077244", "0.5376392", "0.53748155", "0.53446203", "0.5317039", "0.53021455", "0.52959454", "0.5286647", "0.5285564", "0.52709144" ]
0.7986915
0
Test case for webinarPanelists List Panelists.
public function testWebinarPanelists() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarPanelistCreate()\n {\n }", "public function testWebinarPanelistsDelete()\n {\n }", "public function testWebinarPanelistDelete()\n {\n }", "public function testListPastWebinarQA()\n {\n }", "public function testListPastWebinarPollResults()\n {\n }", "public function set_panelist() {\n\t\tif (!isset($this->args[0]) || empty($this->args[0])) {\n\t\t\t$this->out('Provide MV user_id argument.');\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (!$this->get_settings()) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$url = $this->settings['hostname.mbd'].'/panelists/'.$this->args[0].'?X-ApiKey='.$this->settings['mbd.api_key'];\n\t\t$this->out('Reaching out to '.$url);\n\t\t$http = new HttpSocket(array(\n\t\t\t'timeout' => 60,\n\t\t\t'ssl_verify_host' => false // PHP does not seem to check SANs for CNs\n\t\t));\n\t\t$request = array(\n\t\t\t'dwid' => '00000000-0000-0001-0379-ef1412100980',\n\t\t\t'panelistId' => $this->args[0],\n\t\t\t'partnerId' => $this->settings['mbd.partner_id'],\n\t\t\t'donotcontact' => true\n\t\t);\n\t\ttry {\n\t\t\t$results = $http->post($url, json_encode($request), $this->options);\n\t\t} \n\t\tcatch (Exception $e) {\n\t\t\t$this->out('Panelists Api endpoint failed.');\n\t\t}\n\t\t\n\t\tprint_r($results);\n\t}", "public function testListSiteContainers()\n {\n }", "function SetupListOptions() {\n\t\tglobal $Security, $tbl_slide;\n\n\t\t// \"view\"\n\t\t$this->ListOptions->Add(\"view\");\n\t\t$item =& $this->ListOptions->Items[\"view\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsLoggedIn();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"edit\"\n\t\t$this->ListOptions->Add(\"edit\");\n\t\t$item =& $this->ListOptions->Items[\"edit\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsLoggedIn();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"copy\"\n\t\t$this->ListOptions->Add(\"copy\");\n\t\t$item =& $this->ListOptions->Items[\"copy\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsLoggedIn();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"delete\"\n\t\t$this->ListOptions->Add(\"delete\");\n\t\t$item =& $this->ListOptions->Items[\"delete\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsLoggedIn();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\tif ($tbl_slide->Export <> \"\" ||\n\t\t\t$tbl_slide->CurrentAction == \"gridadd\" ||\n\t\t\t$tbl_slide->CurrentAction == \"gridedit\")\n\t\t\t$this->ListOptions->HideAllOptions();\n\t}", "public function testShowListSuccessfully(): void\n {\n $list = $this->createList(static::$listData);\n\n $this->get(\\sprintf('/mailchimp/lists/%s', $list->getId()));\n $content = \\json_decode($this->response->content(), true);\n\n $this->assertResponseOk();\n\n self::assertArrayHasKey('list_id', $content);\n self::assertEquals($list->getId(), $content['list_id']);\n\n foreach (static::$listData as $key => $value) {\n self::assertArrayHasKey($key, $content);\n self::assertEquals($value, $content[$key]);\n }\n }", "public function testListPastWebinarFiles()\n {\n }", "function SetupListOptions() {\r\n\t\tglobal $Security, $Language;\r\n\r\n\t\t// \"view\"\r\n\t\t$item = &$this->ListOptions->Add(\"view\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->IsLoggedIn();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// Call ListOptions_Load event\r\n\t\t$this->ListOptions_Load();\r\n\t}", "public function testListSites()\n {\n }", "function SetupListOptions() {\r\n\t\tglobal $Security, $Language;\r\n\r\n\t\t// \"view\"\r\n\t\t$item = &$this->ListOptions->Add(\"view\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->CanView();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// \"edit\"\r\n\t\t$item = &$this->ListOptions->Add(\"edit\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->CanEdit();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// \"copy\"\r\n\t\t$item = &$this->ListOptions->Add(\"copy\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->CanAdd();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// \"delete\"\r\n\t\t$item = &$this->ListOptions->Add(\"delete\");\r\n\t\t$item->CssStyle = \"white-spaceJAMES: nowrapJAMES;\";\r\n\t\t$item->Visible = $Security->CanDelete();\r\n\t\t$item->OnLeft = FALSE;\r\n\r\n\t\t// Call ListOptions_Load event\r\n\t\t$this->ListOptions_Load();\r\n\t}", "public function testWebinarPolls()\n {\n }", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// \"edit\"\n\t\t$item = &$this->ListOptions->Add(\"edit\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"detail_avaluo\"\n\t\t$item = &$this->ListOptions->Add(\"detail_avaluo\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->Visible = $Security->AllowList(CurrentProjectID() . 'avaluo') && !$this->ShowMultipleDetails;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\tif (!isset($GLOBALS[\"avaluo_grid\"])) $GLOBALS[\"avaluo_grid\"] = new cavaluo_grid;\n\n\t\t// Multiple details\n\t\tif ($this->ShowMultipleDetails) {\n\t\t\t$item = &$this->ListOptions->Add(\"details\");\n\t\t\t$item->CssClass = \"text-nowrap\";\n\t\t\t$item->Visible = $this->ShowMultipleDetails;\n\t\t\t$item->OnLeft = TRUE;\n\t\t\t$item->ShowInButtonGroup = FALSE;\n\t\t}\n\n\t\t// Set up detail pages\n\t\t$pages = new cSubPages();\n\t\t$pages->Add(\"avaluo\");\n\t\t$this->DetailPages = $pages;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\">\";\n\t\t$item->MoveTo(0);\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = FALSE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// \"view\"\n\t\t$item = &$this->ListOptions->Add(\"view\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanView();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"edit\"\n\t\t$item = &$this->ListOptions->Add(\"edit\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"copy\"\n\t\t$item = &$this->ListOptions->Add(\"copy\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanAdd();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"delete\"\n\t\t$item = &$this->ListOptions->Add(\"delete\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanDelete();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"userpermission\"\n\t\t$item = &$this->ListOptions->Add(\"userpermission\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsAdmin();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t}", "function SetupListOptions() {\n\t\tglobal $Security, $t_tinbai_mainsite;\n\n\t\t// \"view\"\n\t\t$this->ListOptions->Add(\"view\");\n\t\t$item =& $this->ListOptions->Items[\"view\"];\n\t\t$item->CssStyle = \"white-space: nowrap;width:15px\";\n\t\t$item->Visible = $Security->CanView();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"edit\"\n\t\t$this->ListOptions->Add(\"edit\");\n\t\t$item =& $this->ListOptions->Items[\"edit\"];\n\t\t$item->CssStyle = \"white-space: nowrap;width:15px\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"checkbox\"\n\t\t$this->ListOptions->Add(\"checkbox\");\n\t\t$item =& $this->ListOptions->Items[\"checkbox\"];\n\t\t$item->CssStyle = \"white-space: nowrap;width:15px\";\n\t\t$item->Visible = ($Security->CanDelete() || $Security->CanEdit());\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" class=\\\"phpmaker\\\" onclick=\\\"t_tinbai_mainsite_list.SelectAllKey(this);\\\">\";\n\t\t$this->ListOptions->MoveItem(\"checkbox\", 0); // Move to first column\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\tif ($t_tinbai_mainsite->Export <> \"\" ||\n\t\t\t$t_tinbai_mainsite->CurrentAction == \"gridadd\" ||\n\t\t\t$t_tinbai_mainsite->CurrentAction == \"gridedit\")\n\t\t\t$this->ListOptions->HideAllOptions();\n\t}", "public function get_panelist() {\n\t\tif (!isset($this->args[0]) || empty($this->args[0])) {\n\t\t\t$this->out('Provide MV user_id argument.');\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (!$this->get_settings()) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$url = $this->settings['hostname.mbd'].'/panelists/'.$this->args[0].'?X-ApiKey='.$this->settings['mbd.api_key'];\n\t\t$this->out('Reaching out to '.$url);\n\t\t$http = new HttpSocket(array(\n\t\t\t'timeout' => 60,\n\t\t\t'ssl_verify_host' => false // PHP does not seem to check SANs for CNs\n\t\t));\n\t\ttry {\n\t\t\t$results = $http->get($url, \n\t\t\t\tarray(\n\t\t\t\t\t'myDataOnly' => 'true'\n\t\t\t\t), \n\t\t\t\t$this->options\n\t\t\t);\n\t\t} catch (Exception $e) {\n\t\t\t$this->out('Get Api endpoint failed.');\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//$results = json_decode($results['body'], true);\n\t\tCakeLog::write('mbd.get', print_r($results, true));\n\t\tprint_r($results);\n\t}", "public function testAddColPosListLayoutItems()\n {\n }", "public function test_listIndexAction ( )\n {\n $params = array(\n 'event_id' => 1,\n 'action' => 'list',\n 'controller'=> 'scales',\n 'module' => 'default'\n );\n\n $urlParams = $this->urlizeOptions($params);\n $url = $this->url($urlParams);\n $this->dispatch($url);\n\n // assertions\n $this->assertModule($urlParams['module']);\n $this->assertController($urlParams['controller']);\n $this->assertAction($urlParams['action']);\n\n }", "public function provideListAndListItemTests() {\n $result = [\n [[\n 'descr' => \"[list] and [*] should produce an unordered list.\",\n 'bbcode' => \"[list][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ul class=\\\"bbcode_list\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ul>\\n\",\n ]],\n [[\n 'descr' => \"[list] and [*] should produce an unordered list even without [/list].\",\n 'bbcode' => \"[list][*]One Box[*]Two Boxes[*]Three Boxes\",\n 'html' => \"\\n<ul class=\\\"bbcode_list\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ul>\\n\",\n ]],\n [[\n 'descr' => \"[list=circle] should produce an unordered list.\",\n 'bbcode' => \"[list=circle][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ul class=\\\"bbcode_list\\\" style=\\\"list-style-type:circle\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ul>\\n\",\n ]],\n [[\n 'descr' => \"[list=disc] should produce an unordered list.\",\n 'bbcode' => \"[list=disc][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ul class=\\\"bbcode_list\\\" style=\\\"list-style-type:disc\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ul>\\n\",\n ]],\n [[\n 'descr' => \"[list=square] should produce an unordered list.\",\n 'bbcode' => \"[list=square][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ul class=\\\"bbcode_list\\\" style=\\\"list-style-type:square\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ul>\\n\",\n ]],\n [[\n 'descr' => \"[list=1] should produce an ordered list.\",\n 'bbcode' => \"[list=1][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ol class=\\\"bbcode_list\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ol>\\n\",\n ]],\n [[\n 'descr' => \"[list=A] should produce an ordered list.\",\n 'bbcode' => \"[list=A][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ol class=\\\"bbcode_list\\\" style=\\\"list-style-type:upper-alpha\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ol>\\n\",\n ]],\n [[\n 'descr' => \"[list=a] should produce an ordered list.\",\n 'bbcode' => \"[list=a][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ol class=\\\"bbcode_list\\\" style=\\\"list-style-type:lower-alpha\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ol>\\n\",\n ]],\n [[\n 'descr' => \"[list=I] should produce an ordered list.\",\n 'bbcode' => \"[list=I][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ol class=\\\"bbcode_list\\\" style=\\\"list-style-type:upper-roman\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ol>\\n\",\n ]],\n [[\n 'descr' => \"[list=i] should produce an ordered list.\",\n 'bbcode' => \"[list=i][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ol class=\\\"bbcode_list\\\" style=\\\"list-style-type:lower-roman\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ol>\\n\",\n ]],\n [[\n 'descr' => \"[list=greek] should produce an ordered list.\",\n 'bbcode' => \"[list=greek][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ol class=\\\"bbcode_list\\\" style=\\\"list-style-type:lower-greek\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ol>\\n\",\n ]],\n [[\n 'descr' => \"[list=georgian] should produce an ordered list.\",\n 'bbcode' => \"[list=georgian][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ol class=\\\"bbcode_list\\\" style=\\\"list-style-type:georgian\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ol>\\n\",\n ]],\n [[\n 'descr' => \"[list=armenian] should produce an ordered list.\",\n 'bbcode' => \"[list=armenian][*]One Box[*]Two Boxes[*]Three Boxes[/list]\",\n 'html' => \"\\n<ol class=\\\"bbcode_list\\\" style=\\\"list-style-type:armenian\\\">\\n<li>One Box</li>\\n<li>Two Boxes</li>\\n<li>Three Boxes</li>\\n</ol>\\n\",\n ]],\n ];\n return $result;\n }", "public function indexAction() {\n\n //ONLY LOGGED IN USER CAN VIEW THIS PAGE\n if (!$this->_helper->requireUser->isValid())\n return;\n\n $this->view->listingtype_id = $listingtype_id = $this->_listingType->listingtype_id;\n $this->view->listing_singular_uc = ucfirst($this->_listingType->title_singular);\n\n //VIDEO CREATION SHOULD BE ALLOWED\n if (!$this->_helper->requireAuth()->setAuthParams('video', null, \"create\")->isValid())\n return;\n\n //GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n\n //GET LISTING\n $this->view->listing_id = $listing_id = $this->_getParam('listing_id');\n $this->view->sitereview = $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n\n //GET CONTENT ID\n $this->view->content_id = $content_id = $this->_getParam('tab');\n\n //WHO CAN EDIT THE LISTING\n $this->view->canEdit = $canEdit = Engine_Api::_()->authorization()->isAllowed($sitereview, $viewer, \"edit_listtype_$listingtype_id\");\n\n //ACTIVE TAB\n $this->view->TabActive = \"video\";\n\n //VIDEO UPLOAD IS ALLOWED OR NOT\n $this->view->allowed_upload_video = Engine_Api::_()->sitereview()->allowVideo($sitereview, $viewer);\n if (empty($this->view->allowed_upload_video)) {\n return $this->_forwardCustom('requireauth', 'error', 'core');\n }\n\n if (Engine_Api::_()->sitereview()->hasPackageEnable()) {\n //AUTHORIZATION CHECK\n $allowed_upload_photo = Engine_Api::_()->authorization()->isAllowed($sitereview, $viewer, \"auth_photo_listtype_$listingtype_id\");\n if (Engine_Api::_()->sitereviewpaidlisting()->allowPackageContent($sitereview->package_id, \"photo\")) {\n $this->view->allowed_upload_photo = $allowed_upload_photo;\n }\n else\n $this->view->allowed_upload_photo = 0;\n }\n else\n $this->view->allowed_upload_photo = Engine_Api::_()->authorization()->isAllowed($sitereview, $viewer, \"photo_listtype_$listingtype_id\");\n\n $video = null;\n $values['user_id'] = $viewer_id;\n\n //COUNT TOTAL VIDEO\n $this->view->videoCount = Engine_Api::_()->sitereview()->getTotalVideo($viewer_id);\n\n $this->view->video = $video = Engine_Api::_()->getItemTable('sitereview_clasfvideo', 'sitereview')->getListingVideos($listing_id, 0);\n\n $this->view->message = $message = null;\n $session = new Zend_Session_Namespace();\n if (isset($session->video_message)) {\n $message = $session->video_message;\n unset($session->video_message);\n }\n\n //UPLOAD VIDEO\n if (isset($_GET['ul']) || isset($_FILES['Filedata'])) {\n return $this->_forwardCustom('upload-video', null, null, array('format' => 'json'));\n }\n\n //GET VIDEO PAGINATOR\n $values['user_id'] = $viewer_id;\n $paginator = Engine_Api::_()->getApi('core', 'video')->getVideosPaginator($values);\n $this->view->current_count = $paginator->getTotalItemCount();\n\n //GET TOTAL ALLOWED VIDEO\n $this->view->quota = Engine_Api::_()->authorization()->getPermission($viewer->level_id, 'video', 'max');\n\n //MAKE FORM\n $this->view->form = $form = new Sitereview_Form_Video_Video();\n\n if ($this->_getParam('type', false)) {\n $form->getElement('type')->setValue($this->_getParam('type'));\n }\n\n $this->view->display = 0;\n\n //CHECK POST\n if (!$this->getRequest()->isPost()) {\n return;\n }\n\n $this->view->display = 1;\n\n if (!$form->isValid($this->getRequest()->getPost())) {\n $values = $form->getValues('url');\n return;\n }\n\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\n\n //PROCESS\n $values = $form->getValues();\n $values['owner_id'] = $viewer->getIdentity();\n $insert_action = false;\n $db = Engine_Api::_()->getDbtable('videos', 'video')->getAdapter();\n $db->beginTransaction();\n try {\n\n //CREATE VIDEO\n $table = Engine_Api::_()->getDbtable('videos', 'video');\n if ($values['type'] == 3) {\n $video = Engine_Api::_()->getItem('video', $this->_getParam('id'));\n } else {\n $video = $table->createRow();\n }\n\n $video->setFromArray($values);\n $video->save();\n\n $params = $sitereview->main_video;\n\n //CREATE THUMBNAIL\n $thumbnail = $this->handleThumbnail($video->type, $video->code);\n $ext = ltrim(strrchr($thumbnail, '.'), '.');\n $thumbnail_parsed = @parse_url($thumbnail);\n\n if (@GetImageSize($thumbnail)) {\n $valid_thumb = true;\n } else {\n $valid_thumb = false;\n }\n\n if ($valid_thumb && $thumbnail && $ext && $thumbnail_parsed && in_array($ext, array('jpg', 'jpeg', 'gif', 'png'))) {\n\n $tmp_file = APPLICATION_PATH . '/temporary/link_' . md5($thumbnail) . '.' . $ext;\n $thumb_file = APPLICATION_PATH . '/temporary/link_thumb_' . md5($thumbnail) . '.' . $ext;\n $src_fh = fopen($thumbnail, 'r');\n $tmp_fh = fopen($tmp_file, 'w');\n stream_copy_to_stream($src_fh, $tmp_fh, 1024 * 1024 * 2);\n $image = Engine_Image::factory();\n $image->open($tmp_file)\n ->resize(120, 240)\n ->write($thumb_file)\n ->destroy();\n try {\n $thumbFileRow = Engine_Api::_()->storage()->create($thumb_file, array(\n 'parent_type' => $video->getType(),\n 'parent_id' => $video->getIdentity()\n ));\n\n //REMOVE TEMP FILES\n @unlink($thumb_file);\n @unlink($tmp_file);\n } catch (Exception $e) {\n \n }\n $information = $this->handleInformation($video->type, $video->code);\n\n $video->duration = $information['duration'];\n if (!$video->description)\n $video->description = $information['description'];\n $video->photo_id = $thumbFileRow->file_id;\n $video->status = 1;\n $video->save();\n\n //INSERT NEW ACTION ITEM\n $insert_action = true;\n }\n\n if ($values['ignore'] == true) {\n\n $video->status = 1;\n $video->save();\n\n //INSERT NEW ACTION ITEM\n $insert_action = true;\n $owner = $video->getOwner();\n\n //INSERT NEW ACTION ITEM\n $action = Engine_Api::_()->getDbtable('actions', 'activity')->addActivity($owner, $video, 'video_new');\n if ($action != null) {\n Engine_Api::_()->getDbtable('actions', 'activity')->attachActivity($action, $video);\n }\n }\n\n //CREATE AUTH STUFF HERE\n $auth = Engine_Api::_()->authorization()->context;\n $roles = array('owner', 'owner_member', 'owner_member_member', 'owner_network', 'everyone');\n if (isset($values['auth_view']))\n $auth_view = $values['auth_view'];\n else\n $auth_view = \"everyone\";\n $viewMax = array_search($auth_view, $roles);\n\n foreach ($roles as $i => $role) {\n $auth->setAllowed($video, $role, 'view', ($i <= $viewMax));\n }\n\n if (isset($values['auth_comment']))\n $auth_comment = $values['auth_comment'];\n else\n $auth_comment = \"everyone\";\n $commentMax = array_search($auth_comment, $roles);\n foreach ($roles as $i => $role) {\n $auth->setAllowed($video, $role, 'comment', ($i <= $commentMax));\n }\n\n //ADD TAGS\n $tags = preg_split('/[,]+/', $values['tags']);\n $video->tags()->addTagMaps($viewer, $tags);\n $db->commit();\n $db->beginTransaction();\n try {\n if ($insert_action) {\n $owner = $video->getOwner();\n $action = Engine_Api::_()->getDbtable('actions', 'activity')->addActivity($owner, $video, 'video_new');\n if ($action != null) {\n Engine_Api::_()->getDbtable('actions', 'activity')->attachActivity($action, $video);\n }\n }\n\n //REBUILD PRIVACY\n $actionTable = Engine_Api::_()->getDbtable('actions', 'activity');\n foreach ($actionTable->getActionsByObject($video) as $action) {\n $actionTable->resetActivityBindings($action);\n }\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n $video_id = $video->getIdentity();\n $table = Engine_Api::_()->getItemTable('sitereview_clasfvideo', 'sitereview');\n $select = $table->select();\n $rName = $table->info('name');\n $select->where($rName . '.listing_id = ?', $listing_id);\n $row = $table->fetchAll($select);\n if ($video_id != NULL) {\n try {\n\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n\n $row = $table->createRow();\n $row->listing_id = $listing_id;\n $row->created = date('Y-m-d H:i:s');\n $row->video_id = $video_id;\n $row->save();\n\n $activityApi = Engine_Api::_()->getDbtable('actions', 'activity');\n $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n $subject = $sitereview;\n $subjectOwner = $subject->getOwner('user');\n\n if (time() >= strtotime($sitereview->creation_date)) {\n $action = Engine_Api::_()->getDbtable('actions', 'activity')->addActivity($viewer, $subject, 'video_sitereview_listtype_' . $listingtype_id, '', array(\n 'owner' => $subjectOwner->getGuid(),\n 'title' => $subject->getTitle()\n ));\n\n if ($action != null) {\n Engine_Api::_()->getDbtable('actions', 'activity')->attachActivity($action, $video);\n }\n }\n $db->commit();\n unset($_POST);\n if ($canEdit) {\n return $this->_gotoRouteCustom(array('action' => 'edit', 'listing_id' => $listing_id), \"sitereview_videospecific_listtype_$listingtype_id\", true);\n } else {\n $content_id = $this->_getParam('content_id');\n return $this->_gotoRouteCustom(array('listing_id' => $listing_id, 'slug' => $sitereview->getSlug(), 'tab' => $content_id), \"sitereview_entry_view_listtype_$listingtype_id\", true);\n }\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n }\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n }\n }", "public function testListPagination()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs(User::find(1))\n ->visit('admin/users')\n ->assertSee('Users Gestion')\n ->clickLink('3')\n ->assertSee('GreatRedactor');\n });\n }", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// \"detail_v_bid_histories_admin\"\n\t\t$item = &$this->ListOptions->Add(\"detail_v_bid_histories_admin\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->Visible = $Security->AllowList(CurrentProjectID() . 'v_bid_histories_admin') && !$this->ShowMultipleDetails;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\tif (!isset($GLOBALS[\"v_bid_histories_admin_grid\"])) $GLOBALS[\"v_bid_histories_admin_grid\"] = new cv_bid_histories_admin_grid;\n\n\t\t// Multiple details\n\t\tif ($this->ShowMultipleDetails) {\n\t\t\t$item = &$this->ListOptions->Add(\"details\");\n\t\t\t$item->CssClass = \"text-nowrap\";\n\t\t\t$item->Visible = $this->ShowMultipleDetails;\n\t\t\t$item->OnLeft = TRUE;\n\t\t\t$item->ShowInButtonGroup = FALSE;\n\t\t}\n\n\t\t// Set up detail pages\n\t\t$pages = new cSubPages();\n\t\t$pages->Add(\"v_bid_histories_admin\");\n\t\t$this->DetailPages = $pages;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\">\";\n\t\t$item->MoveTo(0);\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// \"sequence\"\n\t\t$item = &$this->ListOptions->Add(\"sequence\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->Visible = TRUE;\n\t\t$item->OnLeft = TRUE; // Always on left\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = FALSE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = TRUE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// \"view\"\n\t\t$item = &$this->ListOptions->Add(\"view\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanView();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"edit\"\n\t\t$item = &$this->ListOptions->Add(\"edit\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"copy\"\n\t\t$item = &$this->ListOptions->Add(\"copy\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanAdd();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"delete\"\n\t\t$item = &$this->ListOptions->Add(\"delete\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanDelete();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\">\";\n\t\t$item->MoveTo(0);\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = FALSE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = TRUE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "public function indexAction() {\n if (!Engine_Api::_()->core()->hasSubject('sitereview_listing')) {\n return $this->setNoRender();\n }\n\n //GET SUBJECT\n $this->view->sitereview = $sitereview = Engine_Api::_()->core()->getSubject('sitereview_listing');\n Engine_Api::_()->sitereview()->setListingTypeInRegistry($sitereview->listingtype_id);\n $sitereviewPhotoCarousel = Zend_Registry::isRegistered('sitereviewPhotoCarousel') ? Zend_Registry::get('sitereviewPhotoCarousel') : null;\n $this->view->listingType = $listingType = Zend_Registry::get('listingtypeArray' . $sitereview->listingtype_id);\n $this->view->listingtype_id = $sitereview->listingtype_id;\n $this->view->album = $album = $sitereview->getSingletonAlbum();\n $this->view->photo_paginator = $photo_paginator = $album->getCollectiblesPaginator();\n $this->view->total_images = $photo_paginator->getTotalItemCount();\n $minMum = $this->_getParam('minMum', 0);\n \n if (empty($this->view->total_images) || $this->view->total_images < $minMum || empty($sitereviewPhotoCarousel)) {\n return $this->setNoRender();\n }\n \n $this->view->itemCount = $itemCount = $this->_getParam('itemCount', 3);\n $this->view->includeInWidget = $this->_getParam('includeInWidget', null);\n $photo_paginator->setItemCountPerPage(100);\n \n if ($this->view->includeInWidget) {\n $this->getElement()->removeDecorator('Title');\n $this->getElement()->removeDecorator('Container');\n }\n }", "public function testFetchLists() {\n\t\t$jsonpad = parent::_getJsonpadInstance();\n\t\t\n\t\t// Create a couple of lists\n\t\t$listCount = 3;\n\t\tfor ($i = 0; $i < $listCount; $i++) {\n\t\t\t$listData = parent::_createTestListData(false, false);\n\t\t\t$jsonpad->createList($listData[\"name\"]);\n\t\t}\n\t\t\n\t\t// Fetch the lists\n\t\t$total = 0;\n\t\t$lists = $jsonpad->fetchLists(1, null, null, null, $total);\n\t\t$this->assertInternalType(\"array\", $lists);\n\t\t$this->assertGreaterThanOrEqual(1, $total);\n\t\t$this->assertInstanceOf(\"\\Jsonpad\\Resource\\ItemList\", $lists[0]);\n\t\t\n\t\t// Delete the lists\n\t\tforeach ($lists as $list) {\n\t\t\t$list->delete();\n\t\t}\n\t}", "function SetupListOptions() {\n\t\tglobal $Security, $scholarship_package;\n\n\t\t// \"edit\"\n\t\t$this->ListOptions->Add(\"edit\");\n\t\t$item =& $this->ListOptions->Items[\"edit\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"detail_scholarship_payment\"\n\t\t$this->ListOptions->Add(\"detail_scholarship_payment\");\n\t\t$item =& $this->ListOptions->Items[\"detail_scholarship_payment\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->AllowList('scholarship_payment');\n\t\t$item->OnLeft = FALSE;\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\tif ($scholarship_package->Export <> \"\" ||\n\t\t\t$scholarship_package->CurrentAction == \"gridadd\" ||\n\t\t\t$scholarship_package->CurrentAction == \"gridedit\")\n\t\t\t$this->ListOptions->HideAllOptions();\n\t}", "public function testIsOnTasksListPage()\n {\n $this->addTestFixtures();\n $this->logInAsUser();\n $this->client->request('GET', '/tasks');\n\n $response = $this->client->getResponse();\n $responseContent = $response->getContent();\n\n $statusCode = $response->getStatusCode();\n $this->assertEquals(200, $statusCode);\n $this->assertContains($this->task->getTitle(), $responseContent);\n $this->assertContains($this->task->getContent(), $responseContent);\n }", "public function testLayoutListCategories()\n {\n $user = $this->makeAdminToLogin();\n $this->browse(function (Browser $browser) use ($user) {\n $browser->loginAs($user)\n ->visit('/admin/categories')\n ->assertSee('List Categories')\n ->assertSeeLink('Admin')\n ->assertSee('ID')\n ->assertSee('Name')\n ->assertSee('Number of Books');\n });\n }" ]
[ "0.8041716", "0.69889045", "0.68276155", "0.6213921", "0.61039495", "0.60195667", "0.5794682", "0.5651228", "0.563803", "0.5618443", "0.55301744", "0.5524846", "0.5513889", "0.54806244", "0.5478555", "0.5473747", "0.53977513", "0.5363002", "0.5349754", "0.5313243", "0.5302042", "0.5297186", "0.52841765", "0.5275732", "0.5253515", "0.5231574", "0.5199862", "0.5198448", "0.5161464", "0.5153291" ]
0.8328777
0
Test case for webinarPanelistsDelete Remove Panelists.
public function testWebinarPanelistsDelete() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarPanelistDelete()\n {\n }", "public function testWebinarPanelists()\n {\n }", "public function testWebinarPanelistCreate()\n {\n }", "function action_remove() {\n\t\t\t$data = UTIL::get_post('data');\n\t\t\t$id = (int)$data['rem_id'];\n\t\t\t$table = $data['rem_table'];\n\t\t\t\n\t\t\t$choosen = $this->SESS->get('objbrowser', 'choosen');\n\t\t\tunset($choosen[$table][$id]);\n\t\t\tif (count($choosen[$table]) == 0) unset($choosen[$table]);\n\t\t\t\n\t\t\t$this->SESS->set('objbrowser', 'choosen', $choosen);\n\t\t}", "public function testRemoveListSuccessfully(): void\n {\n $this->createMailchimpList($list);\n\n $this->delete(\\sprintf('/mailchimp/lists/%s', $list['list_id']));\n\n $this->assertResponseOk();\n self::assertEmpty(\\json_decode($this->response->content(), true));\n }", "public function removeAction() {\n $result = array('status' => 'failed');\n if ($this->getRequest()->isPost() && $this->getRequest()->getPost('remove') == 'true') {\n $dirName = Mage::getBaseDir('code').'/local/Balticode/Postoffice';\n if (is_dir($dirName) && file_exists($dirName.'/etc/config.xml')) {\n $directory = new Varien_Io_File();\n $deleteResult = $directory->rmdir($dirName, true);\n if ($deleteResult) {\n $result['status'] = 'success';\n }\n }\n \n }\n $this->getResponse()->setRawHeader('Content-type: application/json');\n $this->getResponse()->setBody(json_encode($result));\n return;\n }", "public function testRemove()\n {\n $context = $this->createPageContext();\n $storage = $this->createStorage();\n $tokenStorage = $this->createTokenStorage();\n\n $layout1 = $storage->create();\n $layout2 = $storage->create();\n $layout3 = $storage->create();\n\n $context->addLayoutList([$layout1->getId(), $layout2->getId(), $layout3->getId()]);\n $token = $context->createEditToken([$layout1->getId(), $layout3->getId()], ['user_id' => 17]);\n $tokenString = $token->getToken();\n $tokenStorage->saveToken($token);\n\n // Save our editable instances\n $tokenStorage->update($tokenString, $layout1);\n $tokenStorage->update($tokenString, $layout3);\n\n // And now remove one layout\n $tokenStorage->remove($tokenString, $layout2->getId());\n $this->assertTrue($token->contains($layout1->getId()));\n $this->assertFalse($token->contains($layout2->getId()));\n $this->assertTrue($token->contains($layout3->getId()));\n\n try {\n $tokenStorage->load($tokenString, $layout2->getId());\n $this->fail();\n } catch (InvalidTokenError $e) {\n $this->assertTrue(true);\n }\n\n // And the other two still work\n $tokenStorage->load($tokenString, $layout1->getId());\n $tokenStorage->load($tokenString, $layout3->getId());\n }", "public function deleteAction() {\n\n //CHECK USER VALIDATION\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n //GET VIEWER INFO\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n\n $listingtype_id = $this->_listingType->listingtype_id;\n $this->view->listingType = $this->_listingType;\n\n //GET TAB ID\n $this->view->tab_selected_id = $tab_selected_id = $this->_getParam('content_id');\n $this->view->format_form = $this->_getParam('format', null);\n\n //GET VIDEO OBJECT\n $this->view->sitereview_video = $sitereview_video = Engine_Api::_()->getItem('sitereview_video', $this->getRequest()->getParam('video_id'));\n\n //GET VIDEO TITLE\n $this->view->title = $sitereview_video->title;\n\n //GET LISTING ID\n $listing_id = $sitereview_video->listing_id;\n\n //GET NAVIGATION \n $this->view->navigation = Engine_Api::_()->getApi('menus', 'core')->getNavigation('sitereview_main');\n\n //GET SITEREVIEW SUBJECT\n $this->view->sitereview = $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n $can_edit = $sitereview->authorization()->isAllowed($viewer, 'edit_listtype_' . $sitereview->listingtype_id);\n\n if (!$sitereview_video) {\n $this->view->status = false;\n $this->view->error = Zend_Registry::get('Zend_Translate')->_(\"Video doesn't exists or not authorized to delete\");\n return;\n }\n\n //VIDEO OWNER AND LISTING OWNER CAN DELETE VIDEO\n if ($viewer_id != $sitereview_video->owner_id && $can_edit != 1) {\n return $this->_forwardCustom('requireauth', 'error', 'core');\n }\n\n if (!$this->getRequest()->isPost()) {\n $this->view->status = false;\n $this->view->error = Zend_Registry::get('Zend_Translate')->_('Invalid request method');\n return;\n }\n\n $db = $sitereview_video->getTable()->getAdapter();\n $db->beginTransaction();\n\n try {\n\n Engine_Api::_()->getDbtable('videoratings', 'sitereview')->delete(array('videorating_id =?' => $this->getRequest()->getParam('video_id')));\n\n $sitereview_video->delete();\n\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n\n\n\n\n $this->view->status = true;\n if ($this->view->format_form == 'smoothbox') {\n $this->_forwardCustom('success', 'utility', 'core', array(\n 'smoothboxClose' => true,\n 'parentRefresh' => '500',\n 'parentRefreshTime' => '500',\n 'format' => 'smoothbox',\n 'messages' => Zend_Registry::get('Zend_Translate')->_('You have successfully deleted this video.')\n ));\n } else {\n if (Engine_API::_()->seaocore()->checkSitemobileMode('fullsite-mode')) {\n if ($can_edit) {\n return $this->_gotoRouteCustom(array('action' => 'edit', 'listing_id' => $sitereview->listing_id), \"sitereview_videospecific_listtype_$listingtype_id\", true);\n } else {\n return $this->_gotoRouteCustom(array('listing_id' => $sitereview->listing_id, 'slug' => $sitereview->getSlug(), 'tab' => $tab_selected_id), \"sitereview_entry_view_listtype_$listingtype_id\", true);\n }\n } else {\n return $this->_gotoRouteCustom(array('listing_id' => $sitereview->listing_id, 'slug' => $sitereview->getSlug(), 'tab' => $tab_selected_id), \"sitereview_entry_view_listtype_$listingtype_id\", true);\n }\n }\n }", "public function RemoveArtworkList(): void{\n\n if(!Session::isLogin())\n exit;\n\n if(!ArtworkVerifier::removeList($_POST))\n exit;\n\n if(isset(UserList::where('user_list.user_id', Session::getUser()['id'])->where('user_list.artwork_id', $_POST['artwork_id'])->getOne()->id))\n UserList::where('user_id', Session::getUser()['id'])\n ->where('artwork_id', $_POST['artwork_id'])\n ->delete();\n }", "public function testCollectionTicketsDelete()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testRemoveMenuAction()\n {\n parent::login();\n $this->clickAt(\"link=CMS\", \"\");\n $this->click(\"link=Menus\");\n $this->waitForPageToLoad(\"30000\");\n $this->dragAndDropToObject(\"css=ul#sortable1.connectedSortable.ui-sortable li#id-1\", \"css=ul#sortable2\");\n $this->clickAt(\"link=CMS\", \"\");\n $this->click(\"link=Menus\");\n $this->waitForPageToLoad(\"30000\");\n $this->assertFalse($this->isElementPresent(\"css=ul#sortable1.connectedSortable.ui-sortable li#id-1.ui-state-default.ui-sortable-handle\"));\n $this->isElementPresent(\"css=ul#sortable2.connectedSortable.ui-sortable li#id-1.ui-state-default.ui-sortable-handle\");\n $this->assertElementContainsText(\"css=ul#sortable2.connectedSortable.ui-sortable li#id-1.ui-state-default.ui-sortable-handle\", \"Test Menu Selenium 1\");\n parent::logout();\n }", "public function deleteList($data)\n {\n var_export($data);\n //return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteListAction(){\n $ebookers_obj = new Ep_Ebookers_Managelist();\n //to call a function to delete themes//\n $ebookers_obj->deleteList($this->_request->getParams());\n //unset($_REQUEST);\n exit;\n }", "private function actionListDelete() {\n $put_vars = $this->actionListPutConvert();\n $this->loadModel($put_vars['id'])->delete();\n }", "protected function removeFromList($data)\n {\n $repo = \\XLite\\Core\\Database::getRepo('\\XLite\\Model\\ViewList');\n $repo->deleteInBatch($repo->findBy($data), false);\n }", "public function testWebinarPollDelete()\n {\n }", "public function testRemove()\n {\n $success = $this->collection->remove(3);\n\n $this->assertTrue($success);\n $this->assertCount(2, $this->collection);\n $this->assertFalse($this->collection->contains(3));\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }", "public function deleteList($data)\n {\n return new ApiProblem(405, 'The DELETE method has not been defined for collections');\n }" ]
[ "0.80611134", "0.6175651", "0.6084192", "0.5854993", "0.5779039", "0.56939197", "0.5672255", "0.5665499", "0.5657381", "0.56455123", "0.5625484", "0.5580941", "0.5545405", "0.55362356", "0.55231667", "0.5510384", "0.54702806", "0.5467625", "0.5467625", "0.5467625", "0.5467625", "0.5467625", "0.5467625", "0.5467625", "0.5467625", "0.5467625", "0.5467625", "0.5467625", "0.5467625", "0.5467625" ]
0.83671415
0
Test case for webinarPollCreate Create a Webinar's Poll.
public function testWebinarPollCreate() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarPollGet()\n {\n }", "public function testWebinarPollUpdate()\n {\n }", "public function createpollAction(Request $request)\n {\n $poll = new PollImpl();\n $form = $this->createForm(new NewPoll(), $poll);\n\n $form->handleRequest($request);\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($poll);\n $em->flush();\n $id = $poll->getId();\n return $this->redirect($this->generateUrl('poll_add_question', array(\"poll_id\" => $id)));\n }\n return $this->render('PollPollBundle:Poll:create_poll.html.twig', array('form' => $form->createView()));\n }", "public function store(CreatePollRequest $request)\n {\n $this->poll->create($request->all());\n\n return redirect()->route('admin.iquiz.poll.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('iquiz::polls.title.polls')]));\n }", "public function testWebinarPolls()\n {\n }", "public function create()\n {\n return view('polls.pollCreate'); \n }", "public function testWebinarCreate()\n {\n }", "private function create()\n {\n $events = [\n Webhook::EVENT_CONVERSATION_CREATED,\n Webhook::EVENT_CONVERSATION_UPDATED,\n Webhook::EVENT_MESSAGE_CREATED,\n Webhook::EVENT_MESSAGE_UPDATED,\n ];\n\n $chosenEvents = $this->choice(\n 'What kind of event you want to create',\n $events,\n $defaultIndex = null,\n $maxAttempts = null,\n $allowMultipleSelections = true\n );\n\n $webhookUrl = $this->ask('Please enter the webhook URL'); \n\n $webhook = new Webhook();\n $webhook->events = $chosenEvents;\n $webhook->channelId = $this->whatsAppChannelId;\n $webhook->url = $webhookUrl;\n\n try {\n $response = $this->messageBirdClient->conversationWebhooks->create($webhook);\n } catch (\\Exception $e) {\n $this->error($e->getMessage());\n }\n }", "protected function createPollRecord(array $data)\n {\n return Poll::create($data);\n }", "public function testWebinarPollDelete()\n {\n }", "public function actionCreate()\n {\n $model = new Poll();\n\n\n if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n $model->startdate = strtotime($model->startdate);\n $model->enddate = strtotime($model->enddate);\n $model->created_by = Yii::$app->user->identity->getEmployeeNo();\n\n //Yii::$app->recruitment->printrr($model); exit;\n $model->save();\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function testWebinarRegistrantCreate()\n {\n }", "function create_poll () {\n\t\treturn is_object($this->POLL_OBJ) ? $this->POLL_OBJ->_create(array(\"common\" => 1)) : \"\";\n\t}", "public function create()\n {\n return view('poll.create');\n }", "public function createPoll($client_project_id = null) {\r\n // Poll for this project already exists\r\n $poll = $this->find('first', array(\r\n 'conditions' => array(\r\n 'Poll.client_project_id' => $client_project_id\r\n )\r\n ));\r\n // Get project details\r\n $this->ClientProject->Behaviors->load('Containable');\r\n $project = $this->ClientProject->find('first', array(\r\n 'conditions' => array(\r\n 'ClientProject.id' => $client_project_id\r\n ),\r\n 'contain' => array(\r\n 'User',\r\n 'Client',\r\n 'ClientProjectBudget' =>array(\r\n 'ClientProjectBudgetPosition',\r\n ),\r\n 'ClientProjectShedule'\r\n )\r\n ));\r\n\r\n // Project does not exists\r\n // Poll already exists\r\n if (empty($project) || !empty($poll)) {\r\n return false;\r\n }\r\n\r\n // Create poll array\r\n $data['Poll'] = array(\r\n 'client_project_id' => $project['ClientProject']['id']\r\n );\r\n \r\n $data['PollQuestion'] = $this->buildQuestions($project['ClientProjectShedule'], $project['Client']['user_id']);\r\n// $data['PollQuestion'] = $this->buildQuestions($project['ClientProjectBudget']['ClientProjectBudgetPosition'], $project['Client']['user_id']);\r\n\r\n // Save poll along with associated data\r\n $result = $this->saveAssociated($data, array(\r\n 'validate' => false,\r\n 'deep' => true,\r\n ));\r\n\r\n return $result;\r\n }", "public function testListPastWebinarPollResults()\n {\n }", "public function polls_post($pollId=NULL){\n //Temporary workaround as I can't access PUT data for some reason\n if ($pollId){\n $this->polls_put($pollId);\n return;\n }\n\n $this->load->model(\"poll\");\n $this->load->model(\"answer\");\n\n try {\n $data = json_decode(trim(file_get_contents('php://input')), true);\n //Validate the poll\n $errors = $this->validate($data);\n if (count($errors) > 0){\n $this->response(array(\"errors\"=>$errors), 404);\n return;\n }\n\n //Question and title don't need html escaping, angular is magic\n $pollId = $this->poll->create($data[\"title\"], $data[\"question\"]);\n $answers = $data[\"answers\"];\n $answers_count = count($answers);\n\n //Insert all the answers\n for ($i = 0; $i < $answers_count; ++$i) {\n $answers[$i][\"optionNo\"] = $i + 1;\n $answers[$i][\"questionId\"] = $pollId;\n\n //Answer doesn't need html escaping, angular is magic\n $this->answer->create($pollId, $i, $answers[$i][\"answer\"]);\n }\n\n header(\"Location: /services/polls/$pollId\");\n $this->response(NULL, 201);\n }catch (Exception $e){\n $this->response(array(\"errorMessage\"=>\"Unable to create poll!\"), 404);\n }\n }", "public function testWebinarPanelistCreate()\n {\n }", "public function newpoll_submit(){\n SiteController::loggedInCheck();\n\n\t\tif (isset($_POST['Cancel'])) {\n\t\t\theader('Location: '.BASE_URL);\n\t\t\texit();\n\t\t}\n\n\t\t//get forumId from the group\n\t\t$groupId = $_POST['groupId'];\n\t\t$group_entry = Group::loadById($groupId);\n\t\t$forumId = $group_entry->get('forumId');\n\n\t\t$title = $_POST['title'];\n\t\t$author = $_SESSION['username'];\n\t\t$timestamp = date(\"Y-m-d\", time());\n\t\t$options = $_POST['options']; //array\n\n\t\t//get author's id\n\t\t$user_row = User::loadByUsername($author);\n\t\t$userid = $user_row->get('id');\n\n\t\t//create poll\n\t\t$poll = new Poll();\n\t\t$poll->set('userId', $userid);\n\t\t$poll->set('title', $title);\n\t\t$poll->set('forumId', $forumId);\n\t\t$poll->set('timestamp', $timestamp);\n\t\t$poll->save();\n\n\t\t//add options\n\t\tforeach ($options as $option){\n\t\t\t$poll_option = new PollOption();\n\t\t\t$poll_option->set('pollId', $poll->get('id'));\n\t\t\t$poll_option->set('poll_option', $option);\n\t\t\t$poll_option->save();\n\t\t}\n\t\theader('Location: '.BASE_URL);\t\t\t\t\t\t\t\t\t\t\t\t//TODO update\n\t}", "public function newpoll(){\n SiteController::loggedInCheck();\n\n\t\tinclude_once SYSTEM_PATH.'/view/newpoll.tpl'; //TODO make sure the tpl is correct\n\t}", "public function testCreateSurvey()\n {\n $data = [\n 'year' => 2020,\n 'type' => Survey::TRAINER,\n 'title' => 'My Awesome Survey',\n 'prologue' => 'Take the survey',\n 'epilogue' => 'Did you take it?'\n ];\n\n $response = $this->json('POST', 'survey', [\n 'survey' => $data\n ]);\n\n $response->assertStatus(200);\n $this->assertDatabaseHas('survey', $data);\n }", "public function add_poll()\n {\n\n $method = $_SERVER['REQUEST_METHOD'];\n\n\n if ($method != 'POST') {\n\n json_output(400, array('status' => 400, 'message' => 'Bad request.'));\n } else {\n\n $check_auth_client = $this->auth_model->check_auth_client();\n\n\n if ($check_auth_client == true) {\n\n $response = $this->auth_model->auth();\n\n if ($response['status'] == 200) {\n\n $this->load->model('Table_poll_model');\n\n $returned_string = $this->Table_poll_model->add_poll();\n\n $response = array();\n $response['success'] = '1';\n $response['message'] = 'Uploaded';\n $response['return'] = $returned_string;\n\n echo json_encode($response);\n\n }\n }\n }\n\n\n }", "public function actionCreate() {\n $model = new Surveys();\n\n if ($model->load(Yii::$app->request->post())) {\n if ($model->validate() == TRUE) {\n // print_r($model);\n $model->save();\n Yii::$app->session->setFlash('success', \"Poll Created Succsesfully\");\n\n return $this->redirect('create');\n } else {\n $sessions = Yii::$app->session->set(\"Error\", \"Error when creating Survey\");\n }\n //print_r($model);\n //return $this->redirect(['view', 'id' => $model->survey_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n {\n $poll=new Polls();\n return view('admin.polls.edit')->withPoll($poll);\n }", "public function store(CreatePollTypeAPIRequest $request)\n {\n $input = $request->all();\n\n $pollType = $this->pollTypeRepository->create($input);\n\n return $this->sendResponse(new PollTypeResource($pollType), 'Poll Type saved successfully');\n }", "public function testEventCreate()\n {\n $response = $this->get('events/create');\n\n $response->assertStatus(200);\n }", "public function store(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => ['required'],\n 'description' => ['required'],\n 'deadline1' => ['required'],\n 'deadline2' => ['required'],\n 'choices1' => ['required']\n ]);\n\n if ($validator->fails()) {\n return redirect()->back()->withInput()->with('status', 'Create Failed!');\n }\n\n \n $crud = Poll::create([\n 'title' => $request->title,\n 'description' => $request->description,\n 'deadline' => $request->deadline1.' '.$request->deadline2,\n 'created_by' => Auth::user()->id\n ]);\n \n if ($crud) {\n $poll_id = Poll::findOrFail($id);\n for ($a=1; $a <= 5; $a++) { \n if ($request->input('choices'.$a)) {\n $crud2 = Choice::create([\n 'choices' => $request->input('choices'.$a),\n 'poll_id' => $poll_id->id\n ]);\n } else {}\n }\n return redirect()->route('poll')->with('status', 'Poll Created!');\n if ($crud2) {\n return redirect()->route('poll')->with('status', 'Poll Created!');\n } else {\n return redirect()->back()->withInput()->with('status', 'Create Failed!');\n }\n } else {\n return redirect()->back()->withInput()->with('status', 'Create Failed!');\n }\n }", "function createWebinar($payloadArray)\n {\n $path = $this->getPathRelativeToOrganizer(sprintf('webinars'));\n\n $webinarObject = new WebinarEntity($payloadArray);\n\n return $this->sendRequest('POST', $path, $parameters = null, $payload = $webinarObject->toArray());\n }", "public function run()\n {\n $poll = new Poll();\n $poll->title = \"This is a simple poll from admin panel\";\n $poll->slug = \"this-is-a-simple-poll-from-admin-panel\";\n $poll->status = 1;\n $poll->start_date = \"2020-06-14\";\n $poll->end_date = \"2020-06-15\";\n $poll->total_yes = 5;\n $poll->total_no = 2;\n $poll->total_no_comment = 1;\n $poll->save();\n\n $poll = new Poll();\n $poll->title = \"This is another poll from admin panel\";\n $poll->slug = \"this-is-another-poll-from-admin-panel\";\n $poll->status = 0;\n $poll->start_date = \"2020-06-15\";\n $poll->end_date = \"2020-06-16\";\n $poll->total_yes = 7;\n $poll->total_no = 11;\n $poll->total_no_comment = 3;\n $poll->save();\n }", "public function create()\n {\n $polls = Poll::all();\n $menuSections = Section::where('level', 1)\n ->where('topnav_back', 1)\n ->where('active', 1)->get();\n\n $menuLeftSections = Section::where('level', 1)\n ->where('active', 1)->get();\n\n $countries = Country::orderBy('name', 'ASC')->get();\n $provinces = Province::orderBy('name', 'ASC')->get();\n $helps = Help::all();\n\n $not_responded = Contact::where('contacted', 0)->get()->count();\n\n return view('backend.polls.create', compact('polls', 'not_responded', 'helps', 'countries', 'provinces', 'menuSections', 'menuLeftSections'));\n }" ]
[ "0.645826", "0.64233947", "0.6303108", "0.62919855", "0.6287759", "0.6279859", "0.61923283", "0.59656316", "0.59515786", "0.59352744", "0.5929518", "0.59017617", "0.589709", "0.5864389", "0.5771486", "0.5754985", "0.5707631", "0.5687261", "0.5679037", "0.56305504", "0.5621797", "0.558162", "0.5526383", "0.5512857", "0.551223", "0.5436324", "0.54227895", "0.5414021", "0.5413022", "0.5360863" ]
0.7899342
0
Test case for webinarPollDelete Delete a Webinar Poll.
public function testWebinarPollDelete() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deletepoll(){\n \tSiteController::loggedInCheck();\n\n\t\t$pollid = $_POST['pollid'];\n\t\t$poll = Poll::loadById($pollid);\n\t\t$pollAuthorId = $poll->get('userId');\n\t\t$pollAuthor = User::loadById($pollAuthorId);\n\n\t\t//user is the author of the poll, allow delete\n\t\tif($pollAuthor->get('username') == $_SESSION['username']){\n\t\t\t$poll->delete();\n\t\t} else {\n\t\t\t$_SESSION['info'] = \"You can only delete polls you have created.\";\n\t\t}\n\n\t\t//refresh page\n\t\theader('Location: '.BASE_URL);\t\t\t\t\t\t\t\t\t\t\t//TODO update\n\t}", "public function deletepollAction($poll_id) {\n $em = $this->getDoctrine()->getManager();\n $poll = $em->getRepository('PollPollBundle:PollImpl')->find($poll_id);\n $em->remove($poll);\n $em->flush();\n\n return $this->redirect($this->generateUrl('poll_show_all'));\n }", "public function delete(User $user, Poll $poll)\n {\n //\n }", "public function testWebinarDelete()\n {\n }", "public function polls_delete($pollId){\n $this->load->model(\"poll\");\n\n try {\n $this->poll->deleteRecursive($pollId);\n }catch (Exception $e){\n $this->response(array(\"errorMessage\"=>\"No such poll :'(\"), 404);\n }\n }", "public function testWebinarPanelistDelete()\n {\n }", "public function testWebinarPanelistsDelete()\n {\n }", "public function testDeleteSurvey()\n {\n $survey = Survey::factory()->create();\n $surveyId = $survey->id;\n\n $response = $this->json('DELETE', \"survey/{$surveyId}\");\n\n $response->assertStatus(204);\n $this->assertDatabaseMissing('survey', ['id' => $surveyId]);\n }", "public function votes_delete($pollId) {\n $this->load->model(\"poll\");\n $this->load->model(\"answer\");\n $this->load->model(\"vote\");\n\n try {\n //Check to see if the poll exists (this throws an exception if it doesn't)\n $poll = $this->poll->getPoll($pollId);\n //Clear the votes on the poll\n $this->vote->clearVotes($pollId);\n }catch (Exception $e){\n $this->response(array(\"errorMessage\"=>\"The poll does not exist!\"), 404);\n }\n }", "public function test_shopper_can_be_deleted()\n {\n $shopper = Shopper::withoutEvents(function () {\n return Shopper::factory()->create();\n });\n\n $shopper2 = Shopper::withoutEvents(function () {\n return Shopper::factory()->create();\n });\n\n $this->actingAs($shopper);\n\n $response = $this->delete(route('shoppers.destroy', $shopper2));\n\n $response->assertStatus(302);\n $response->assertRedirect(route('shoppers.index'));\n }", "public function testDelete()\n\t{\n\t\t// Add test bookings\n\t\t$bookings = [];\n\t\tforeach ($this->clients as $client) {\n\t\t\t$booking = factory(\\App\\Booking::class)->create([\n\t\t\t\t'fitter_id' => $this->admin->fitter->id,\n\t\t\t\t'client_id' => $client->id,\n\t\t\t\t'horse_id' => factory(\\App\\Horse::class)->create(['client_id' => $client->id])->id,\n\t\t\t\t'rider_id' => factory(\\App\\Rider::class)->create(['client_id' => $client->id])->id,\n\t\t\t\t'user_id' => factory(\\App\\User::class)->create([\n\t\t\t\t\t'fitter_id' => $this->admin->fitter->id,\n\t\t\t\t\t'type' => 'fitter-user',\n\t\t\t\t])->id,\n\t\t\t]);\n\n\t\t\t$bookings[] = $booking->toArray();\n\t\t}\n\n\t\t$booking = \\App\\Booking::find($bookings[0]['id']);\n\n\t\t$this->actingAs($this->admin, 'api')\n\t\t\t ->delete('/api/v1/admin/bookings/' . $booking->id)\n\t\t\t ->assertStatus(200)\n\t\t\t ->assertJsonStructure([\n\t\t\t\t 'success',\n\t\t\t ]);\n\n\t\t$this->assertDatabaseMissing('bookings', ['id' => $booking->id]);\n\t}", "public function testWebinarPollCreate()\n {\n }", "public function destroy(Poll $poll)\n {\n $this->poll->destroy($poll);\n\n return redirect()->route('admin.iquiz.poll.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('iquiz::polls.title.polls')]));\n }", "public function destroy(Poll $poll) {\n // törlés itt nem megengedett\n }", "public function testDeleteLecturerAndAdministrationWorker()\n {\n $user = factory(User::class)->state('lecturer_administration_worker')->create();\n $response = $this->withHeaders([\n ])->deleteJson(\"/api/user/{$user->id}\", []);\n\n $response\n ->assertStatus(200)\n ->assertJson([\n \"deleted\"=> true\n ]);\n\n $this->assertDeleted('users', ['id' => $user->id]);\n $this->assertDeleted('addresses', ['id' => $user->address_id]);\n $this->assertDeleted('addresses', ['id' => $user->correspondal_address_id]);\n }", "public function testDelete()\n\t{\n\t\t$saddle = $this->saddles[0];\n\n\t\t$this->actingAs($this->admin, 'api')\n\t\t\t ->delete('/api/v1/admin/saddles/' . $saddle->id)\n\t\t\t ->assertStatus(200);\n\n\t\t$this->assertDatabaseMissing('saddles', ['id' => $saddle->id]);\n\t}", "public function delete($episode);", "public function executeDelete(sfWebRequest $request)\n {\n\t\tif(clsCommon::chkDataExist(\"WebsitePracticeArea\", $request->getParameter('id'), $this->getUser()->getAttribute('personalWebsiteId')))\n\t\t{\n\t\t\t$this->forward404Unless($website_practice_area = Doctrine::getTable('WebsitePracticeArea')->find(array($request->getParameter('id'))), sprintf('Object website_practice_area does not exist (%s).', $request->getParameter('id')));\n\n\t\t\t$oWebsitePracticeArea = new WebsitePracticeArea();\n\t\t\t$oWebsitePracticeArea->changeStatus($request->getParameter('id'),sfConfig::get(\"app_Status_Deleted\"));\n\t\t\t$this->getUser()->setFlash('succMsg', \"Deletion successful.\");\n\n\t\t\t$this->redirect('WebsitePracticeArea/index');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->getUser()->setFlash(\"errMsg\",sfConfig::get('app_Permission_Message'));\n\t\t\t$this->redirect('default/index');\n\t\t}\n }", "public function testDeleteSurvey0()\n {\n }", "public function testDeleteSurvey0()\n {\n }", "public function testDelete()\n {\n $model = $this->makeFactory();\n $model->save();\n\n $this->json('DELETE', static::ROUTE . '/' . $model->id, [], [\n 'Authorization' => 'Token ' . self::getToken()\n ])\n ->seeStatusCode(JsonResponse::HTTP_NO_CONTENT);\n }", "public function testDelete()\n\t{\n\t\t$client = static::createClient(array(), array(\n\t\t 'PHP_AUTH_USER' => 'jr',\n\t\t 'PHP_AUTH_PW' => 'jr',\n\t\t));\n\t\t$client->followRedirects();\n\n\t\t// On clique sur le lien entreprise de test\n\t\t$crawler = $client->request('GET', '/clients');\n\t\t$link = $crawler->filter('.bloc__title a:contains(\"Entreprise de test\")')->first()->link();\n\t\t$crawler = $client->click($link);\n\t\t//On vérifie qu'on est bien sur la bonne page\n\t\t$this->assertGreaterThan(0, $crawler->filter('h1:contains(\"Entreprise de test\")')->count());\n\n\t\t// On clique sur le bouton modifier\n\t\t$link = $crawler->filter('.btn--delete')->first()->link();\n\t\t$crawler = $client->click($link);\n\t\t//On vérifie qu'on est bien sur la bonne page\n\t\t$this->assertEquals(1, $crawler->filter('.breadcrumb:contains(\"Supprimer\")')->count()); \n\n\t\t// On modifie le métier\n\t\t$form = $crawler->selectButton('Supprimer')->form();\n\t\t$crawler = $client->submit($form);\t\n\n\t\t//On vérifie que ça a marché\n\t\t$this->assertEquals(1, $crawler->filter('html:contains(\"Le client a bien été supprimé.\")')->count());\n\n\t}", "public function testLeaseDelete()\n {\n $user = factory(User::class)->create();\n $lease = factory(Lease::class)->create();\n\n $this->actingAs($user)\n ->seeIsAuthenticatedAs($user)\n ->get(route('lease.delete', ['id' => $lease->id]))\n ->assertStatus(200);\n }", "public function actionDelete($id)\n\t{\n\t\t$question = $this->findQuestion($id);\n\t\t$this->checkAccess($question->user);\n\t\t$question->delete();\n\t\treturn $this->redirect(['/poll/list']);\n\t}", "public function test_delete() {\n global $DB;\n\n self::setAdminUser();\n $this->resetAfterTest(true);\n\n // Save new outage.\n $now = time();\n $outage = new outage([\n 'autostart' => false,\n 'warntime' => $now - 60,\n 'starttime' => 60,\n 'stoptime' => 120,\n 'title' => 'Title',\n 'description' => 'Description',\n ]);\n $outage->id = outagedb::save($outage);\n self::$outage = $outage;\n\n outagedb::delete(self::$outage->id);\n\n // Should not exist.\n $event = $DB->get_record_select(\n 'event',\n \"(eventtype = 'auth_outage' AND instance = :idoutage) OR (id = :idevent)\",\n ['idoutage' => self::$outage->id, 'idevent' => self::$event->id],\n 'id',\n IGNORE_MISSING\n );\n self::assertFalse($event);\n }", "private function delete()\n {\n $webhookId = $this->ask('Please enter Webhook ID');\n\n try {\n $response = $this->messageBirdClient->conversationWebhooks->delete($webhookId);\n\n if ($response) {\n $this->info(\"WebhookId {$webhookId} is deleted successfully\");\n }\n\n } catch (\\Exception $e) {\n $this->error($e->getMessage());\n }\n }", "public function testDelete(): void\n {\n $this->createInstance();\n $this->createAndLogin();\n\n\n $res = $this->fConnector->getDiscussionManagement()->postTopic('Hello title', 'My content', [$this->configTest['testTagId']],null)->wait();\n $res2 = $this->fConnector->getDiscussionManagement()->deleteTopic($res->id)->wait();\n $this->assertTrue($res2, 'Test delete of a topic');\n $res3 = $this->fConnector->getDiscussionManagement()->getDiscussions($this->configTest['testTagName'])->wait();\n $found = false;\n foreach($res3 as $discussion){\n if($discussion->id === $res->id){\n $found = true;\n break;\n }\n }\n $this->assertFalse($found, 'Test delete of a topic, search for deleted topic');\n\n }", "public function test_get_delete_link() {\n\n\t\t$webhook = LLMS_REST_API()->webhooks()->create( array(\n\t\t\t'delivery_url' => 'https://mock.tld',\n\t\t\t'topic' => 'course.created',\n\t\t) );\n\n\t\t$link = $webhook->get_delete_link();\n\n\t\t$this->assertEquals( 0, strpos( admin_url( 'admin.php?page=llms-settings&tab=rest-api&section=webhooks&revoke-webhook=' . $webhook->get( 'id' ) ), $webhook->get_delete_link() ) );\n\t\tparse_str( wp_parse_url( $link, PHP_URL_QUERY ), $parts );\n\t\t$this->assertTrue( array_key_exists( 'delete-webhook-nonce', $parts ) );\n\n\t}", "public function delete(Vote $vote);", "public function delete($Enterprise) { ; }" ]
[ "0.71641266", "0.66191196", "0.6587096", "0.6559964", "0.64290196", "0.6392854", "0.63748217", "0.6316476", "0.61818117", "0.60412574", "0.59323484", "0.5928612", "0.58898", "0.5859758", "0.5821917", "0.5783073", "0.5772443", "0.57544917", "0.5753902", "0.5753902", "0.57384986", "0.56644094", "0.5661651", "0.5657965", "0.5656854", "0.5655541", "0.56391746", "0.56378573", "0.56320286", "0.5598308" ]
0.8047244
0
Test case for webinarPollGet Get a Webinar Poll.
public function testWebinarPollGet() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testListPastWebinarPollResults()\n {\n }", "public function testWebinarPollUpdate()\n {\n }", "public function polls_get($pollId = NULL){\n $this->load->model(\"poll\");\n\n if (isset($pollId)) {\n try {\n $poll = $this->poll->getPoll($pollId);\n $this->response($poll, 200);\n }catch (Exception $e){\n $this->response(array(\"errorMessage\"=>\"Poll does not exist!\"), 404);\n }\n } else{\n $polls = $this->poll->getPolls();\n $this->response($polls, 200);\n }\n }", "public function testWebinarPollCreate()\n {\n }", "public function getPoll()\n\t{\n\t\t\t\t// var_dump($poll);\n\n\t\treturn $this->poll;\n\t}", "public function testWebinarPolls()\n {\n }", "public function get_poll($poll_token, Request $request)\n {\n $question = $this->poll_service->get_current_poll_question($poll_token);\n\n if(!$question) {\n //poll is not currently running (no open question)\n return $this->render('user/waitingPoll.html.twig', [\n 'listenerUrl' => $_ENV['SYMFONY_WEBSITE_ROOT_URL'] . '/home/runPoll/' . $poll_token\n ]);\n }\n $answers = $this->poll_service->get_current_poll_answers($question->getId());\n if(!$answers) {\n //question without any answer: means the poll is not correctly defined\n return new Response('Error, question without any answer');\n }\n\n return $this->render('user/poll.html.twig', [\n 'question' => $question,\n 'answers' => $answers,\n 'isSubmitted' => $request->query->get('isSubmitted'),\n 'answerID' => $request->query->get('answerID'),\n 'formUrl' => $_SERVER['SYMFONY_WEBSITE_ROOT_URL'] . '/incrementPollStatistic/' . $poll_token,\n 'listenerUrl' => $_ENV['SYMFONY_WEBSITE_ROOT_URL'] . '/getPoll/' . $poll_token]);\n }", "function citrixonline_get_webinar($webinarKey) \n {\n\t\tif(!$this->organizer_key or !$this->access_token)\n\t\t\treturn 0;\n\t\t\t\n\t\t$return_array = array();\n\n\t\t$reponse = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/\".$webinarKey.\"?oauth_token=\".$this->access_token), true);\n\t\t\n\t\tif(isset($reponse['int_err_code']) and $reponse['int_err_code'] != '')\n\t\t{\n\t\t\t$this->set_access_token('');\n\t\t\t$this->set_organizer_key('');\t\t\t\t\n\t\t\tthrow new Exception($reponse['int_err_code']);\n\t\t}\n\t\t\n\t\treturn $reponse;\n\t}", "protected function reportWebinarPollsRequest($webinar_id)\n {\n // verify the required parameter 'webinar_id' is set\n if ($webinar_id === null || (is_array($webinar_id) && count($webinar_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $webinar_id when calling reportWebinarPolls'\n );\n }\n\n $resourcePath = '/report/webinars/{webinarId}/polls';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($webinar_id !== null) {\n $resourcePath = str_replace(\n '{' . 'webinarId' . '}',\n ObjectSerializer::toPathValue($webinar_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'application/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'application/xml'],\n ['application/json', 'multipart/form-data']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function testGetAllPolls()\n {\n Passport::actingAs(\n factory(\"App\\User\")->create(),\n ['*']\n );\n $polls= factory(\"App\\Poll\",5)->create();\n $response = $this->get('/polls');\n $response->assertStatus(200);\n $response->assertJson($polls->toArray());\n }", "function create_poll () {\n\t\treturn is_object($this->POLL_OBJ) ? $this->POLL_OBJ->_create(array(\"common\" => 1)) : \"\";\n\t}", "function getWebinar($webinarKey)\n {\n $path = $this->getPathRelativeToOrganizer(sprintf('webinars/%s', $webinarKey));\n\n return $this->sendRequest('GET', $path, $parameters = null, $payload = null);\n }", "public function getPollName()\n {\n return $this->_poll_name;\n }", "public function shouldGetPrimaryPollutant(): void\n {\n $expectedValue = $this->faker->randomElement(['pm25', 'pm10', 'co', 'no2', 'o3', 'so2']);\n\n $this->waqi->shouldReceive('getPrimaryPollutant')\n ->once()\n ->withNoArgs()\n ->andReturn($expectedValue);\n\n $result = $this->waqi->getPrimaryPollutant();\n\n $this->assertValue($result, $expectedValue, 'string');\n }", "public function testWebinarRegistrantGet()\n {\n }", "public function testWebinarPollDelete()\n {\n }", "public function testWebinar()\n {\n }", "public function testWebinarStatus()\n {\n }", "public function testGetInstitutionsUsingGET()\n {\n }", "public function loadVote($poll)\n {\n $module = Yii::app()->getModule('poll');\n $userId = (int) Yii::app()->user->id;\n $isGuest = Yii::app()->user->isGuest;\n $cookie = isset(Yii::app()->request->cookies['Poll_'. $poll->id])\n ? Yii::app()->request->cookies['Poll_'. $poll->id] \n : NULL;\n\n foreach ($poll->votes as $vote) {\n if ($vote->user_id == $userId) {\n if (($isGuest && $module->guestCookies && ($cookie === NULL || $vote->id != $cookie->value)) ||\n ($isGuest && $module->ipRestrict && $vote->ip_address != $_SERVER['REMOTE_ADDR'])) {\n continue;\n }\n else\n return $vote;\n }\n }\n\n return new PollVote;\n }", "public function testWebinarRegistrantsQuestionsGet()\n {\n }", "public function poll()\n {\n }", "public function poll()\n {\n return $this->belongsTo('App\\Poll');\n }", "public function getPoller ()\r\n\t\t{\r\n\t\t\t\treturn $this -> pollerInstance;\r\n\t\t}", "public function votes_get($pollId){\n $this->load->model(\"poll\");\n $this->load->model(\"answer\");\n $this->load->model(\"vote\");\n\n try {\n //Check to see if the poll exists (this throws an exception if it doesn't)\n $poll = $this->poll->getPoll($pollId);\n $answers = $this->answer->getAnswers($pollId);\n $votes = $this->vote->getVotes($pollId);\n\n $answerVotes = array();\n foreach ($answers as $answer) {\n //Set the number of votes for this answer to 0\n $answerVotes[$answer->optionNo - 1] = 0;\n foreach ($votes as $vote){\n //Foreach vote that counts towards this answer\n //add one to the number of vote it has\n if ($vote->answerId == $answer->id){\n $answerVotes[$answer->optionNo - 1] += 1;\n }\n }\n }\n\n $this->response($answerVotes, 200);\n }catch (Exception $e){\n $this->response(array(\"errorMessage\"=>\"Poll does not exist!\"), 404);\n }\n }", "public function newpoll(){\n SiteController::loggedInCheck();\n\n\t\tinclude_once SYSTEM_PATH.'/view/newpoll.tpl'; //TODO make sure the tpl is correct\n\t}", "public function testGetSuppliersUsingGET()\n {\n }", "private function get()\n {\n $webhookId = $this->ask('Please enter Webhook ID');\n\n try {\n $response = $this->messageBirdClient->conversationWebhooks->read($webhookId);\n\n $data = [];\n if ($response) {\n array_push($data, $this->getFetchedData($response));\n\n $headers = ['webhook_id', 'href', 'channel_id', 'events', 'url', 'created_at'];\n $this->table($headers, $data);\n }\n } catch (\\Exception $e) {\n $this->error($e->getMessage());\n }\n }", "public function testListPastWebinarQA()\n {\n }", "function smarty_function_PUBLICA_showPoll($params, &$smarty) {\n\tglobal $conexao;\n\t\n\t// Verifica a validade do parametro\n\tif(!isset($params['var']) || !is_numeric($params['var'])) {\n $params['var'] = $conexao->getOne('SELECT MAX(bn_id) FROM tb_enquete WHERE bb_ativo = 1;');\n }\n \n\t// Busca as configuracoes do destaque\n\t$arrE\t= fnEnqueteInfo($params['var'],$smarty);\n\t\n\tif($arrE !== false && is_numeric($arrE['bn_template_conteudo']) && $arrE['bn_template_conteudo'] > 0) {\n\t\t// Busca o nome do arquivo TPL relacionado\n\t\t$query\t= \"\tSELECT bt_arquivo FROM tb_template WHERE bn_id = '\".$arrE['bn_template_conteudo'].\"';\";\n\t\t$strT\t= $conexao->getOne($query);\n\t\tunset($query);\n\t\t\n\t\t// Busca o array das secoes relacionadas ao destaque\n\t\t$arr\t= fnEnqueteResposta($arrE['bn_id']);\n\t\tif($arr !== false && !DB::isError($strT)) {\n\t\t\t// Seta as variaveis do SMARTY\n\t\t\t$smarty->assign('arrPollQuestion',$arrE);\n\t\t\t$smarty->assign('arrPollAnswer',$arr);\n\t\t\t$smarty->display($strT);\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\t} else {\n\t\treturn;\n\t}\n}" ]
[ "0.6517212", "0.63763607", "0.63285667", "0.61603045", "0.61146563", "0.5927292", "0.58602315", "0.56228215", "0.54828477", "0.54216975", "0.53326815", "0.5261555", "0.5261327", "0.5234743", "0.5209806", "0.51862484", "0.5137796", "0.51247567", "0.5106876", "0.50816756", "0.50615215", "0.50030595", "0.49947917", "0.49928623", "0.49740723", "0.4938543", "0.4929184", "0.49227527", "0.48954555", "0.48837635" ]
0.761019
0
Test case for webinarPollUpdate Update a Webinar Poll.
public function testWebinarPollUpdate() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update_poll()\n {\n //var_dump::display($_POST);\n @session::init();\n $v_website_id = session::get('session_website_id');\n $v_poll_id = get_post_var('hdn_item_id','');\n $v_poll_name = get_post_var('txt_poll_name');\n $v_poll_status = get_post_var('poll_status');\n \n $v_delete_answer_list = get_post_var('hdn_id_delete_answer_list','');\n \n $arr_answer = isset($_POST['txt_poll_answer'])?$_POST['txt_poll_answer']: array(); \n $v_answer_old_list = get_post_var('hdn_item_id_list_old','');\n $arr_answer_old_list = ($v_answer_old_list!='')?explode(',', $v_answer_old_list):array();\n \n $v_answer_new_list = get_post_var('hdn_item_id_list_new','');\n $arr_answer_new_list = ($v_answer_new_list!='')?explode(',', $v_answer_new_list):array();\n \n $v_begin_date = jwDate::ddmmyyyy_to_yyyymmdd(get_post_var('txt_begin_date','')).\" \". get_post_var('txt_begin_time','');\n \n $v_end_date = jwDate::ddmmyyyy_to_yyyymmdd(get_post_var('txt_end_date','')).\" \". get_post_var('txt_end_time','');\n \n //update poll\n if($v_poll_id!='')\n {\n $stmt=\"select distinct FK_WEBSITE from t_ps_poll Where PK_POLL =?\";\n $v_website_id_of_poll = $this->db->getOne($stmt,array($v_poll_id));\n if($v_website_id_of_poll == $v_website_id)\n {\n if($this->gp_check_user_permission('SUA_CUOC_THAM_DO_Y_KIEN')>0)\n {\n //update poll\n $stmt=\"update t_ps_poll set C_STATUS=?,C_NAME=?,C_BEGIN_DATE=?,C_END_DATE=?\n where PK_POLL=?\";\n $arr_stmt = array($v_poll_status,$v_poll_name,$v_begin_date,$v_end_date,$v_poll_id);\n $this->db->Execute($stmt,$arr_stmt);\n //update poll answer\n for($i=0;$i<count($arr_answer_old_list);$i++)\n {\n $v_answer_id = $arr_answer_old_list[$i];\n $v_answer_name = replace_bad_char($arr_answer[$i]);\n $stmt=\"Update t_ps_poll_detail set C_ANSWER = '$v_answer_name' where PK_POLL_DETAIL=$v_answer_id\";\n $this->db->Execute($stmt);\n }\n //xoá dữ liệu answer\n if($v_delete_answer_list !='')\n {\n $stmt = \"Delete From t_ps_poll_detail Where PK_POLL_DETAIL in ($v_delete_answer_list)\";\n $this->db->Execute($stmt);\n }\n //thêm answer\n if($v_answer_new_list!='')\n {\n foreach($arr_answer_new_list as $answer)\n {\n $v_answer_name = $answer;\n $stmt=\"insert into t_ps_poll_detail(FK_POLL,C_ANSWER,C_VOTE)\n values (?,?,?)\";\n $this->db->Execute($stmt,array($v_poll_id,$v_answer_name,0));\n }\n }\n $this->exec_done($this->goback_url);\n }\n else\n {\n echo \"<script>alert('Bạn không có quyền thực hiện thao tác này !!!');</script>\";\n $this->exec_done($this->goback_url);\n }\n }\n }\n //insert poll\n else \n {\n if($this->gp_check_user_permission('THEM_MOI_CUOC_THAM_DO_Y_KIEN')>0)\n {\n //var_dump($_POST);\n \n $stmt= \"insert into t_ps_poll(FK_WEBSITE,C_STATUS,C_NAME,C_BEGIN_DATE,C_END_DATE)\n values(?,?,?,?,?)\";\n $arr_stmt = array($v_website_id,$v_poll_status,$v_poll_name,\n $v_begin_date,$v_end_date);\n $this->db->Execute($stmt,$arr_stmt);\n \n $stmt=\"Select PK_POLL From t_ps_poll ORDER BY PK_POLL desc limit 1\";\n $v_new_id = $this->db->getOne($stmt);\n if($v_answer_new_list!='')\n {\n foreach($arr_answer_new_list as $answer)\n {\n $v_answer_name = $answer;\n $stmt=\"insert into t_ps_poll_detail(FK_POLL,C_ANSWER,C_VOTE)\n values (?,?,?)\";\n $this->db->Execute($stmt,array($v_new_id,$v_answer_name,0));\n }\n }\n $this->exec_done($this->goback_url);\n }\n else \n {\n echo \"<script>alert('Bạn không có quyền thực hiện thao tác này !!!');</script>\";\n $this->exec_done($this->goback_url, $arr_filter);\n }\n }\n \n //Hoàn thành và lưu điều kiện lọc\n //$arr_filter = get_filter_condition(array('sel_goto_page', 'sel_rows_per_page'));\n $this->exec_done($this->goback_url);\n }", "public function testWebinarUpdate()\n {\n }", "public function update(User $user, Poll $poll)\n {\n //\n }", "public function testWebinarPollGet()\n {\n }", "public function update(Request $request, Poll $poll) {\n $parentType = $poll->parent_type;\n $parent = Poll::getParent($parentType,$poll->parent);\n $statuses = $request->input('statuses');\n \n // csak admin modosíthat proposal és debate státuszban\n\t\tif (!$this->accessCheck('edit',$parentType, $parent->id, $poll)) {\n return redirect()->to(\\URL::to('/poll/list/'.$parentType,'/'.$parent->id.'/'.$statuses))\n ->with('error',__('poll.accessDenied'));\n }\n \n // tartalmi ellenörzés\n $this->model->valid($request);\n \n // poll rekord kiirása\n $id = $poll->id;\n $errorInfo = Poll::saveOrStore($id, $request);\n \n // result kialakítása\n if ($errorInfo == '') {\n $result = redirect()->to('/polls/'.$poll->id)\n ->with('success',__('poll.successSave'));\n } else {\n $result = redirect()->to('/polls/'.$poll->id)\n ->with('error',$errorInfo);\n }\n return $result;\n }", "public function testWebinarPollCreate()\n {\n }", "public function testWebinarRegistrantQuestionUpdate()\n {\n }", "public function testUpdateSurvey()\n {\n $survey = Survey::factory()->create();\n\n $response = $this->json('PATCH', \"survey/{$survey->id}\", [\n 'survey' => ['epilogue' => 'epilogue your behind']\n ]);\n\n $response->assertStatus(200);\n $this->assertDatabaseHas('survey', ['id' => $survey->id, 'epilogue' => 'epilogue your behind']);\n }", "public function testSellerUpdatedSuccess()\n {\n $this->demoUserLoginIn();\n $spu = Spu::create([\n 'users_id' => '1',\n 'name' => 'test',\n 'description' => 'test',\n ]);\n $response = $this->call('PATCH', '/seller/4/update', [\n 'name' => 'testUpdate',\n 'description' => 'testUpdate',\n ]);\n $this->assertEquals(302, $response->status());\n }", "public function update(Poll $poll, UpdatePollRequest $request)\n {\n $this->poll->update($poll, $request->all());\n\n return redirect()->route('admin.iquiz.poll.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('iquiz::polls.title.polls')]));\n }", "public function test_update() {\n global $DB;\n\n self::setAdminUser();\n $this->resetAfterTest(true);\n\n // Save new outage.\n $now = time();\n $outage = new outage([\n 'autostart' => false,\n 'warntime' => $now - 60,\n 'starttime' => 60,\n 'stoptime' => 120,\n 'title' => 'Title',\n 'description' => 'Description',\n ]);\n $outage->id = outagedb::save($outage);\n self::$outage = $outage;\n\n self::$outage->starttime += 10;\n outagedb::save(self::$outage);\n\n // Should still exist.\n $event = $DB->get_record_select(\n 'event',\n \"(eventtype = 'auth_outage' AND instance = :idoutage)\",\n ['idoutage' => self::$outage->id],\n 'id',\n IGNORE_MISSING\n );\n self::assertTrue(is_object($event));\n self::assertSame(self::$event->id, $event->id);\n self::$event = $event;\n }", "public function testUpdate()\n {\n\n // $payment = $this->payment\n // ->setEvent($this->eventId)\n // ->acceptCash()\n // ->acceptCheck()\n // ->acceptGoogle()\n // ->acceptInvoice()\n // ->acceptPaypal()\n // ->setCashInstructions($instructions)\n // ->setCheckInstructions($instructions)\n // ->setInvoiceInstructions($instructions)\n // ->setGoogleMerchantId($this->googleMerchantId)\n // ->setGoogleMerchantKey($this->googleMerchantKey)\n // ->setPaypalEmail($this->paypalEmail)\n // ->update();\n\n // $this->assertArrayHasKey('process', $payment);\n // $this->assertArrayHasKey('status', $payment['process']);\n // $this->assertTrue($payment['process']['status'] == 'OK');\n }", "public function testCollectionTicketsUpdate()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "function update() {\n\t\t$vars = $this->params['url'];\n\t\t$this->Event->id = $vars['id'];\n\t\t$this->Event->saveField('start', $vars['start']);\n\t\t$this->Event->saveField('end', $vars['end']);\n\t\t$this->Event->saveField('all_day', $vars['allday']);\n\t}", "public function update(Request $request, $id)\n { \n $div = Poll::findOrFail($id);\n\n $validator = Validator::make($request->all(), [\n 'title' => ['required'],\n 'description' => ['required'],\n 'deadline1' => ['required'],\n 'deadline2' => ['required'],\n 'choices1' => ['required']\n ]);\n\n if ($validator->fails()) {\n return redirect()->route('poll')->withInput()->with('status', 'Update Failed!');\n }\n\n $crud = $div->update([\n 'title' => $request->title,\n 'description' => $request->description,\n 'deadline' => $request->deadline1.' '.$request->deadline2\n ]);\n\n if ($crud) {\n $choice = Choice::where('poll_id', '=', $id)->get();\n $count = Choice::where('poll_id', '=', $id)->count();\n $a = 1;\n foreach ($choice as $c) {\n $b = $c->id;\n $z = $a++;\n $cccc = Choice::findOrFail($b);\n $crud2 = $cccc->update([\n 'choices' => $request->input('choices'.$z),\n 'poll_id' => $id\n ]);\n }\n $ccccccc = $count + 1;\n if ($request->input('choices'.$ccccccc)) {\n $crud3 = Choice::create([\n 'choices' => $request->input('choices'.$ccccccc),\n 'poll_id' => $id\n ]);\n } else{}\n return redirect()->route('poll')->with('status', 'Poll Updated!');\n } else {\n return redirect()->back()->with('status', 'Update Failed!');\n }\n }", "public function testD_update() {\n\n $fname = self::$generator->firstName();\n $lname = self::$generator->lastName;\n\n $resp = $this->wrapper->update( self::$randomEmail, [\n 'FNAME' => $fname,\n 'LNAME' => $lname\n ]);\n\n $this->assertObjectHasAttribute('id', $resp);\n $this->assertObjectHasAttribute('merge_fields', $resp);\n\n $updated = $resp->merge_fields;\n\n $this->assertEquals($lname, $updated->LNAME);\n\n }", "private function polls_put($pollId){\n $this->load->model(\"poll\");\n $this->load->model(\"answer\");\n\n try {\n $data = json_decode(trim(file_get_contents('php://input')), true);\n //Validate the poll\n $errors = $this->validate($data);\n if (count($errors) > 0){\n $this->response(array(\"errors\"=>$errors), 404);\n return;\n }\n\n //Angular magically escapes stuff\n $this->poll->update($pollId, $data[\"title\"], $data[\"question\"]);\n\n $answers = $data[\"answers\"];\n $answers_count = count($answers);\n\n //Remove all existing answers\n $this->answer->deleteAll($pollId);\n\n for ($i = 0; $i < $answers_count; ++$i) {\n $answer = $answers[$i];\n\n $answer[\"optionNo\"] = $i + 1;\n $answer[\"questionId\"] = $pollId;\n\n //Angular magically doesn't worry about html being escaped\n $this->answer->create($pollId, $answer[\"optionNo\"], $answer[\"answer\"], $answer[\"id\"]);\n }\n }\n catch (Exception $e){\n $this->response(array(\"errorMessage\"=>\"Unable to update poll\"), 404);\n }\n }", "public function update($meeting)\n {\n\n }", "public function editpoll_submit(){\n SiteController::loggedInCheck();\n\n\t\tif (isset($_POST['Cancel'])) {\n\t\t\theader('Location: '.BASE_URL);\n\t\t\texit();\n\t\t}\n\n\t\t$pollid = $_POST['pollid'];\n\t\t$poll = Poll::loadById($pollid);\n\n\t\t$title = $_POST['title'];\n\t\t$options = $_POST['options'];\n\t\t$timestamp = date(\"Y-m-d\", time());\n\n\t\t$poll->set('title', $title);\n\t\t$poll->set('timestamp', $timestamp);\n\t\t$poll->save();\n\n //remove old options\n $old_options = Poll::getPollOptions();\n foreach($old_options as $opt){\n $opt->delete();\n }\n\n //update options\n foreach ($options as $option){\n $poll_option = new PollOption();\n $poll_option->set('pollId', $pollid);\n $poll_option->set('poll_option', $option);\n $poll_option->save();\n }\n\n\t\theader('Location: '.BASE_URL);\n\t}", "public function testUpdate()\n {\n // Test with correct field name\n $this->visit('/cube/1')\n ->type('3', 'x')\n ->type('3', 'y')\n ->type('3', 'z')\n ->type('1', 'value')\n ->press('submit-update')\n ->see('updated successfully');\n\n /*\n * Tests with incorrect fields\n */\n // Field required\n $this->visit('/cube/1')\n ->press('submit-update')\n ->see('is required');\n\n // Field must be integer\n $this->visit('/cube/1')\n ->type('1a', 'x')\n ->press('submit-update')\n ->see('integer');\n\n // Field value very great\n $this->visit('/cube/1')\n ->type('1000000000', 'y')\n ->press('submit-update')\n ->see('greater');\n }", "public function update(Request $request, $id)\n {\n $poll = Polls::findOrFail($id);\n $poll->title=$request->input('title');\n $poll->description=$request->input('description');\n $poll->videosrc=$request->input('videosrc');\n $poll->videoposter=$request->input('videoposter');\n $poll->starttime=$request->input('starttime');\n $poll->endtime=$request->input('endtime');\n $poll->rewardflag=$request->input('rewardflag');\n $poll->save();\n return redirect(\"/admin/polls/$id/edit\")\n ->withSuccess(\"'$poll->title' 更新成功.\");\n }", "public function testUpdateSurvey0()\n {\n }", "public function testUpdateSurvey0()\n {\n }", "public function testHandleUpdateSuccess()\n {\n // Populate data\n $dealerAccountID = $this->_populate();\n \n // Set params\n $params = $this->customDealerAccountData;\n \n // Add ID\n $ID = $this->_pickRandomItem($dealerAccountID);\n $params['ID'] = $ID;\n \n // Request\n $this->withSession($this->adminSession)\n ->call('POST', '/dealer-account/edit', $params, [], [], ['HTTP_REFERER' => '/dealer-account/edit']);\n \n // Validate response\n $this->assertRedirectedTo('/dealer-account/edit');\n $this->assertSessionHas('dealer-account-updated', '');\n \n // Validate data\n $dealerAccount = $this->dealer_account->getOne($ID);\n $this->assertEquals($dealerAccount->name, $this->customDealerAccountData['name']);\n $this->assertEquals($dealerAccount->branch_ID, $this->customDealerAccountData['branch_ID']);\n }", "public function testHandleUpdateSuccess()\n {\n // Populate data\n $branchIDs = $this->_populate();\n \n // Set params\n $params = $this->customBranchData;\n \n // Add ID\n $ID = $this->_pickRandomItem($branchIDs);\n $params['ID'] = $ID;\n \n // Request\n $this->withSession($this->adminSession)\n ->call('POST', '/branch/edit', $params, [], [], ['HTTP_REFERER' => '/branch/edit']);\n \n // Validate response\n $this->assertRedirectedTo('/branch/edit');\n $this->assertSessionHas('branch-updated', '');\n \n // Validate data\n $branch = $this->branch->getOne($ID);\n $this->assertEquals($branch->name, $this->customBranchData['name']);\n $this->assertEquals($branch->promotor_ID, $this->customBranchData['promotor_ID']);\n }", "public function test_admin_can_update_a_worker()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs($admin = $this->createAdmin())\n ->visitRoute($this->route, $this->lastWorker()->id)\n ->type('worker_name', $this->makeWorker()->worker_name)\n ->type('worker_nif', $this->makeWorker()->worker_nif)\n ->type('worker_start', str_replace('/', '', $this->makeWorker()->worker_start))\n ->type('worker_ropo', $this->makeWorker()->worker_ropo)\n ->type('worker_ropo_date', str_replace('/', '', $this->makeWorker()->worker_ropo_date))\n ->select('worker_ropo_level', $this->makeWorker()->worker_ropo_level)\n ->type('worker_observations', $this->makeWorker()->worker_observations)\n ->press(trans('buttons.edit'))\n ->assertSee(__('The items has been updated successfuly'));\n });\n\n $this->assertDatabaseHas('workers', [\n 'worker_name' => $this->makeWorker()->worker_name,\n 'worker_nif' => $this->makeWorker()->worker_nif,\n 'worker_ropo' => $this->makeWorker()->worker_ropo,\n 'worker_ropo_level' => $this->makeWorker()->worker_ropo_level,\n 'worker_observations' => $this->makeWorker()->worker_observations,\n ]);\n }", "public function testUpdateVendorComplianceSurvey()\n {\n }", "public function testListPastWebinarPollResults()\n {\n }", "public function testUpdate()\n\t{\n\t\t$params = $this->setUpParams();\n\t\t$params['title'] = 'some tag';\n\t\t$params['slug'] = 'some-tag';\n\t\t$response = $this->call('PUT', '/'.self::$endpoint.'/'.$this->obj->id, $params);\n\t\t$this->assertEquals(200, $response->getStatusCode());\n\t\t$result = $response->getOriginalContent()->toArray();\n\n\t\t// tes apakah hasil return adalah yang sesuai\n\t\tforeach ($params as $key => $val) {\n\t\t\t$this->assertArrayHasKey($key, $result);\n\t\t\tif (isset($result[$key])&&($key!='created_at')&&($key!='updated_at'))\n\t\t\t\t$this->assertEquals($val, $result[$key]);\n\t\t}\n\n\t\t// tes tak ada yang dicari\n\t\t$response = $this->call('GET', '/'.self::$endpoint.'/696969', $params);\n\t\t$this->assertEquals(500, $response->getStatusCode());\n\t}", "public function testWebinarPollDelete()\n {\n }" ]
[ "0.67058426", "0.6567143", "0.6510409", "0.5973442", "0.59719884", "0.5864462", "0.5863904", "0.58290815", "0.57604766", "0.5751709", "0.57137495", "0.5650021", "0.5637855", "0.56267464", "0.5623237", "0.56209123", "0.56080276", "0.5605678", "0.55975664", "0.5576203", "0.5551467", "0.5509922", "0.5509922", "0.5488691", "0.5475772", "0.5468532", "0.54536563", "0.54182446", "0.5393446", "0.5366652" ]
0.79205805
0
Test case for webinarPolls List a Webinar's Polls.
public function testWebinarPolls() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testListPastWebinarPollResults()\n {\n }", "public function testGetAllPolls()\n {\n Passport::actingAs(\n factory(\"App\\User\")->create(),\n ['*']\n );\n $polls= factory(\"App\\Poll\",5)->create();\n $response = $this->get('/polls');\n $response->assertStatus(200);\n $response->assertJson($polls->toArray());\n }", "public function testWebinarPollGet()\n {\n }", "public function testWebinarPanelists()\n {\n }", "public function testListPastWebinarQA()\n {\n }", "public function polls() {\n\t\tSiteController::loggedInCheck();\n\n\t\t//Get polls associated with the current group\n\t\t$groupId = $_POST['groupId'];\n\t\t$group = Group::loadById($groupId);\n\t\t$polls = $group->getAllPolls();\n\n\t\tinclude_once SYSTEM_PATH.'/view/polls.tpl'; //TODO: make sure this is the correct tpl\n\t}", "public function getActivePolls() {\n $this->active = json_decode(file_get_contents(CONTENT.'polls'), TRUE);\n return $this->getPolls($this->active);\n }", "public function testWebinarPollCreate()\n {\n }", "public function testWebinarPanelistCreate()\n {\n }", "public function testWebinarPollUpdate()\n {\n }", "protected function reportWebinarPollsRequest($webinar_id)\n {\n // verify the required parameter 'webinar_id' is set\n if ($webinar_id === null || (is_array($webinar_id) && count($webinar_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $webinar_id when calling reportWebinarPolls'\n );\n }\n\n $resourcePath = '/report/webinars/{webinarId}/polls';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($webinar_id !== null) {\n $resourcePath = str_replace(\n '{' . 'webinarId' . '}',\n ObjectSerializer::toPathValue($webinar_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'application/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'application/xml'],\n ['application/json', 'multipart/form-data']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires OAuth (access token)\n if ($this->config->getAccessToken() !== null) {\n $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function showpollsAction()\n {\n $polls = $this->getDoctrine()->getRepository('PollPollBundle:PollImpl')->findAll();\n return $this->render('PollPollBundle:Poll:show_polls.html.twig', array(\"polls\" => array_reverse($polls)));\n }", "public function getsAListOfPlans()\n {\n // Arrange\n // Act\n $plans = Ezypay::getPlans();\n\n // Assert\n //$this->assertEquals(3, sizeof($plans->data)); // Causing issues as there are aditional plans\n $this->assertNotNull($plans);\n\n $this->plans = $plans;\n }", "public function getAllPolls()\n {\n $pollz = $this->em\n ->getRepository('NkgPollBundle:Poll')\n ->findAll();\n\n return $pollz;\n }", "public function testListPastWebinarFiles()\n {\n }", "public function list(Request $request): \\Illuminate\\Http\\Resources\\Json\\AnonymousResourceCollection\n {\n $this->authorize('list', Poll::class);\n\n $this->validate($request, [\n 'page' => 'numeric',\n 'perPage' => 'numeric',\n 'with' => 'array',\n 'sort' => 'array',\n ]);\n\n $page = (int)$request->get('page', 1);\n $perPage = (int)$request->get('perPage', 10);\n\n $query = Poll::whereOwnerId($request->user()->id);\n\n if ($request->has('with')) {\n if (in_array('emailsList', $request->get('with', []))) {\n $query->with('emailsList');\n }\n }\n\n if ($request->has('sort')) {\n foreach ($request->get('sort') as $key => $direction) {\n $query->orderBy(Str::snake($key), $direction);\n }\n }\n\n $list = $query->paginate($perPage, ['*'], 'page', $page);\n\n return PollResource::collection($list->items())\n ->additional(['pagination' => [\n 'page' => $page,\n 'perPage' => $list->perPage(),\n 'lastPage' => $list->lastPage(),\n 'total' => $list->total(),\n ]]);\n }", "public function index()\n {\n //$polls = $this->poll->all();\n\n return view('iquiz::admin.polls.index', compact(''));\n }", "public function testWebinar()\n {\n }", "public function testWebinarStatus()\n {\n }", "public function testListingWithFilters()\n {\n $filters[] = ['limit' => 30, 'page' => 30];\n $filters[] = ['listing_type' => 'public'];\n foreach ($filters as $k => $v) {\n $client = static::createClient();\n $client->request('GET', '/v2/story', $v, [], $this->headers);\n $this->assertStatusCode(200, $client);\n\n $response = json_decode($client->getResponse()->getContent(), true);\n $this->assertTrue(is_array($response));\n }\n }", "public function test_list()\n {\n $response = $this->get('/proposal/all');\n\n $response->assertSee('data-js-proposal-cards');\n\n $response->assertSee('card-header');\n\n $response->assertStatus(200);\n }", "function list_polls($id = NULL) {\n global $course_id, $course_code, $urlServer, $langPollNone, $langQuestionnaire, $langChoice;\n\n $ret_string = '';\n $result = Database::get()->queryArray(\"SELECT * FROM poll WHERE course_id = ?d AND active = 1\", $course_id);\n $pollinfo = array();\n foreach ($result as $row) {\n $pollinfo[] = array(\n 'id' => $row->pid,\n 'title' => $row->name,\n 'active' => $row->active);\n }\n if (count($pollinfo) == 0) {\n $ret_string .= \"<div class='col-12 mt-3'><div class='alert alert-warning'>$langPollNone</div></div>\";\n } else {\n $exist_poll = array();\n\n if (!is_null($id)) { //find existing resources (edit case)\n $post_res = Database::get()->queryArray(\"SELECT * FROM wall_post_resources WHERE post_id = ?d AND type = ?s\", $id, 'poll');\n foreach ($post_res as $exist_res) {\n $exist_poll[] = $exist_res->res_id;\n }\n }\n\n $ret_string .= \"<div class='table-responsive'><table class='table-default'>\" .\n \"<tr class='list-header'>\" .\n \"<th class='text-start'>&nbsp;$langQuestionnaire</th>\" .\n \"<th style='width:20px;' class='text-center'>$langChoice</th>\" .\n \"</tr>\";\n foreach ($pollinfo as $entry) {\n $checked = '';\n if (in_array($entry['id'], $exist_poll)) {\n $checked = 'checked';\n }\n\n $ret_string .= \"<tr>\";\n $ret_string .= \"<td>&nbsp;\".icon('fa-question').\"&nbsp;&nbsp;<a href='{$urlServer}modules/questionnaire/pollresults.php?course=$course_code&amp;pid=$entry[id]'>\" . q($entry['title']) . \"</a></td>\";\n $ret_string .= \"<td class='text-center'><input type='checkbox' $checked name='poll[]' value='$entry[id]'></td>\";\n $ret_string .= \"</tr>\";\n }\n $ret_string .= \"</table></div>\";\n }\n return $ret_string;\n}", "public function displayAllMyPolls(){\r\n $allMyPolls = $this->model->myPolls($_SESSION['id']);\r\n\r\n // Display user's poll \r\n require ROOT.\"/App/View/AllMyPollsView.php\";\r\n \r\n }", "public function testWebinarAbsentees()\n {\n }", "public function testWebinarRegistrantsQuestionsGet()\n {\n }", "public function testSubscriptionsList()\n {\n }", "public function index()\n {\n return view('polls.pollsList', [\n 'polls' => Poll::select('*')\n ->orderBy('created_at', 'desc')->get()\n ]); \n }", "public function index()\n {\n $tests = $this->getAllTests();\n return view('poll.index', ['tests' => $tests]);\n }", "public function test_list_all_offices_paginated() {\n Office::factory(3)->create();\n\n $response = $this->get('/api/offices');\n\n $response->assertOk();\n\n // Assert the returned json data has 3 items - the ones we created above\n $response->assertJsonCount(3, 'data');\n\n // Assert atleast the ID of the first item is not null\n $this->assertNotNull($response->json('data')[0]['id']);\n\n // Assert there is meta for the paginated results. You can include links as well\n $this->assertNotNull($response->json('meta'));\n\n //dd($response->json());\n\n }", "public function getListing()\n {\n $user = Auth::user();\n $plans = Plan::all();\n $websites = Website::where('user_id', '=', $user->id)\n ->orderBy('created_at', 'desc')\n ->paginate(15);\n\n foreach ($websites as $website) {\n if (is_null($website->token)) {\n $clients = DB::table('oauth_clients')\n ->where('name', '=', $website->id)\n ->get();\n\n if (isset($clients[0])) {\n $website->oauth_id = $clients[0]->id;\n $website->secret_key = $clients[0]->secret;\n }\n }\n }\n\n $_plans_list = Plan::all();\n $plans_list = [];\n\n foreach ($_plans_list as $plan_list) {\n $plans_list[$plan_list->id] = $plan_list->plan;\n }\n\n return view('website.listing')\n ->with([\n 'user' => $user,\n 'websites' => $websites,\n 'plans' => $plans,\n '_plans_list' => $_plans_list,\n 'plans_list' => $plans_list\n ]);\n }" ]
[ "0.7220611", "0.67623955", "0.64286876", "0.6334028", "0.61761254", "0.5999231", "0.58641374", "0.58622104", "0.5815001", "0.5744109", "0.562562", "0.5541564", "0.5434194", "0.54106075", "0.5409291", "0.5376", "0.53354937", "0.53315526", "0.53140426", "0.53073347", "0.52871454", "0.52156824", "0.5198359", "0.51890326", "0.51649815", "0.5155491", "0.5105315", "0.50998294", "0.50601804", "0.50566334" ]
0.7082206
1
Test case for webinarRegistrantCreate Add a Webinar Registrant.
public function testWebinarRegistrantCreate() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarRegistrants()\n {\n }", "function citrixonline_create_registrant_of_webinar($webinar_id=false, $data = array(), $all_fields_chk = false) \n {\n\t\tif($webinar_id and isset($data['first_name']) and isset($data['last_name']) and isset($data['email']))\n\t\t{\n\t\t\t$params = array();\n\t\t\t\n\t\t\t$fields = array(\n\t\t\t\t'firstName'=>$data['first_name'],\n\t\t\t\t'lastName'=>$data['last_name'],\n\t\t\t\t'email'=>$data['email'],\n );\n\t\t\t\n\t\t\t$params[CURLOPT_HTTPHEADER] = array('Accept: application/json', 'Content-Type: application/json', 'Authorization: OAuth oauth_token='.$this->access_token);\n\t\t\t$params[CURLOPT_POSTFIELDS] = json_encode($fields);\n\t\t\t\n\t\t\t$reponse = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/{$webinar_id}/registrants\", $params), true);\n\t\t\t\n\t\t\tif(isset($reponse['registrantKey']))\n\t\t\t\treturn $reponse;\n\t\t}\n\t\t\n\t\treturn false;\t\t\t\n\t}", "public function testWebinarRegistrantStatus()\n {\n }", "public function testWebinarRegistrantGet()\n {\n }", "public function onRegistrantCreated(MeetingRegistrantCreated $event) {\n\n $meetingId = (string)$event->getObject()['id'];\n\n $meeting = Meeting::whereZoomId($meetingId)->first();\n\n if(!empty($meeting)){\n\n $this->logEvent($event);\n try{\n $zoomRegistrant = new Registrant();\n $zoomRegistrant->create($event->getObject()['registrant']);\n\n $registrantModel = null;\n\n switch ($meeting->getSetting(ZoomMeeting::SETTINGS_KEY_REGISTRATION_TYPE)){\n case ZoomMeeting::SETTINGS_REGISTRATION_TYPE_ONCE_ALL_OCCURRENCES:\n case ZoomMeeting::SETTINGS_REGISTRATION_TYPE_ONCE_MANY_OCCURRENCES:\n $occurrences = isset($event->getObject()['occurrences']) ? $event->getObject()['occurrences'] : $meeting->occurrences;\n foreach($occurrences as $occurrence){\n $occurrenceId = is_array($occurrence) ? $occurrence['occurrence_id'] : $occurrence->occurrence_id;\n $this->saveRegistrant($zoomRegistrant, $meetingId, $occurrenceId);\n }\n break;\n case ZoomMeeting::SETTINGS_REGISTRATION_TYPE_ONCE_ONE_OCCURRENCES:\n $this->saveRegistrant($zoomRegistrant, $meetingId, $event->getObject()['occurrences'][0]['occurrence_id']);\n break;\n }\n\n $registrantModel = $this->getRegistrantFromEvent($event);\n\n event(new SendRegistrantConfirm($registrantModel));\n\n event(new SendNewRegistrant($registrantModel));\n\n $this->logFinishEvent();\n }catch (\\Exception $exception){\n $this->logFailedEvent($exception);\n }\n }else{\n $this->logNotFoundEvent();\n }\n\n }", "public function testWebinarCreate()\n {\n }", "public function testShouldGenerateARegistrationSuccessfully() {\n \n $entity = new Registration;\n $entity->source_id = $this->getSource()->id;\n $entity->registrant_id = $this->getRegistrant()->id;\n $entity->type = 'PLAYER' ;\n $entity->league = 'league';\n $entity->org_name = 'Oranization...';\n $entity->org_state = 'NY';\n $entity->season = '2017';\n $entity->external_id = 'myexternalid';\n $entity->right_to_market = true;\n $entity->team_gender = 'Male';\n $entity->team_name = 'A-Team';\n $entity->school_district = 'school district';\n $entity->school_state = 'school sate';\n $entity->first_name = 'Firt name';\n $entity->middle_name = 'Middle name';\n $entity->last_name = 'Last Name';\n $entity->email = 'mail@mail.com';\n $entity->gender = 'Male';\n $entity->city = 'California';\n $entity->zip_code = '234141234123';\n $entity->birth_date = '11/27/1984';\n $entity->phone_number = '1234567890';\n $entity->game_type = 'SOME';\n $entity->level = 'LEVEL';\n $entity->state = 'CALIFORNIA';\n $entity->address_first_line = 'An Address 1234';\n $entity->county = 'A county';\n\n $entity->save();\n $this->assertTrue(!is_null($entity->id));\n }", "protected function createRegistrant() {\n $registrant = $this->registrantFactory->createRegistrant([\n 'event' => $this->registration->getEvent(),\n ]);\n $registrant->setRegistration($this->registration);\n\n return $registrant;\n }", "public function test_new_user_can_register()\n {\n $this->RegisterRolesAndPermissions();\n// $this->withExceptionHandling();\n $response = $this->postJson(route('auth.register'), [\n 'name' => \"ehsan dastras\",\n 'email' => \"test1@gmail.com\",\n 'password' => \"12345678\",\n ]);\n\n $response->assertStatus(Response::HTTP_CREATED);\n }", "public function newparticipant(Request $request)\n {\n $this->validate($request, [\n 'val1' => 'required',\n 'val2' => 'required' \n\n ]);\n\n $reg = new EventRegistrations;\n $reg->name = \\Auth::user()->name;\n $reg->user_id = \\Auth::user()->id;\n $reg->event_id = $request->val4;\n $reg->email = $request->val2;\n $reg->allergies = $request->val3;\n $reg->save();\n\n \n return redirect()->action('EventsController@loggedindex');\n }", "public function sellerCanRegister()\n {\n $input = [\n 'username' => 'iniusername' . Str::random(3),\n 'fullname' => 'ini nama ' . Str::random(4),\n 'email' => 'ini_email' . Str::random(4) . '@gmail.com',\n 'password' => 'P@sswr0d!',\n 'sex' => 0\n ];\n $response = $this->post('/api/seller/register', $input);\n $response->assertStatus(200);\n }", "public function testNewUserRegistration()\n\t{\n\t $this->visit('/register')\n\t ->type('Taylor', 'name')\n\t ->type('luker@gmail.com', 'email')\n\t ->type('mytest', 'password')\n\t ->type('mytest', 'password_confirmation')\n\t ->press('Register');\n\t}", "public function accountant_create()\n\t{\n\t\t$data['name'] = html_escape($this->input->post('name'));\n\t\t$data['email'] = html_escape($this->input->post('email'));\n\t\t$data['password'] = sha1($this->input->post('password'));\n\t\t$data['phone'] = html_escape($this->input->post('phone'));\n\t\t$data['gender'] = html_escape($this->input->post('gender'));\n\t\t$data['blood_group'] = html_escape($this->input->post('blood_group'));\n\t\t$data['address'] = html_escape($this->input->post('address'));\n\t\t$data['school_id'] = $this->school_id;\n\t\t$data['role'] = 'accountant';\n\t\t$data['watch_history'] = '[]';\n\n\t\t$duplication_status = $this->check_duplication('on_create', $data['email']);\n\t\tif($duplication_status){\n\t\t\t$this->db->insert('users', $data);\n\n\t\t\t$response = array(\n\t\t\t\t'status' => true,\n\t\t\t\t'notification' => get_phrase('accountant_added_successfully')\n\t\t\t);\n\t\t}else{\n\t\t\t$response = array(\n\t\t\t\t'status' => false,\n\t\t\t\t'notification' => get_phrase('sorry_this_email_has_been_taken')\n\t\t\t);\n\t\t}\n\n\t\treturn json_encode($response);\n\t}", "public function test_is_new_user_can_register()\n {\n $data = factory('App\\User')->make();\n\n $this->post(route('register'), $data->toArray())\n ->assertRedirect(\"/\");\n }", "public function testRegister()\n {\n $crawler = $this->client->request('GET', '/cliente/');\n $crawler = $this->client->followRedirect();\n\n $this->assertTrue($this->client->getContainer()->get('security.context')->isGranted('IS_AUTHENTICATED_ANONYMOUSLY'));\n $this->assertEquals(200, $this->client->getResponse()->getStatusCode());\n $this->assertGreaterThan(0, $crawler->filter('html:contains(\"Acesse sua conta\")')->count());\n \n // validate form\n $form = $crawler->selectButton('Cadastrar')->form(array(\n 'marcoshoya_marquejogobundle_customer[username]' => '',\n ));\n \n $crawler = $this->client->submit($form);\n $this->assertGreaterThan(0, $crawler->filter('span:contains(\"Campo obrigatório\")')->count());\n \n $form = $crawler->selectButton('Cadastrar')->form(array(\n 'marcoshoya_marquejogobundle_customer[username]' => 'registertest@marquejogo.com',\n ));\n \n $this->client->submit($form);\n $crawler = $this->client->followRedirect();\n\n // Check data in the show view\n $this->assertGreaterThan(0, $crawler->filter('html:contains(\"Novo cadastro\")')->count());\n }", "public function testRegisterStudent()\n {\n $this->browse(function (Browser $browser){\n $browser->visit('/register')\n ->click('.slider__container')\n ->type('firstname', env('DUSK_NEW_FIRSTNAME'))\n ->type('lastname', env('DUSK_NEW_LASTNAME'))\n ->type('email', env('DUSK_NEW_USER_STUDENT'))\n ->type('verificateEmail', env('DUSK_NEW_USER_STUDENT'))\n ->type('password', env('DUSK_NEW_PASSWORD'))\n ->press('.button')\n ->assertPathIs('/');\n });\n }", "public function testSignUp()\n {\n $rand = rand();\n $this->visit('/register')\n ->type('ruchi', 'name')\n ->type('ruchi' .$rand.'@in.com', 'email')\n ->type('qwerty', 'password')\n ->type('qwerty', 'password_confirmation')\n ->press('Register')\n ->seePageIs('/');\n }", "public function test_passed_registration()\n {\n\n $user = $this->user();\n\n $response = $this->post('api/v1/register', $user);\n $response->assertStatus(200);\n $response->assertJsonMissing([\n \"status\"=>'Failed'\n ]);\n\n }", "public function register(Request $request)\n {\n\n //Validates data\n $this->validator($request->all())->validate();\n\n //Create instructor\n $instructor = $this->create($request->all());\n \n //Authenticates instructor\n $this->guard()->login($instructor);\n\n //Redirects instructors\n return redirect($this->redirectPath);\n }", "private function register()\n {\n $this->browser->visit('/admin')->pause(1000)\n ->assertPathIs('/admin/register')\n ->type('first_name', $this->faker->firstName)\n ->type('last_name', $this->faker->lastName)\n ->type('email', $this->email)\n ->type('password', $this->password)\n ->type('password_confirmation', $this->password)\n ->press('Register')\n ->assertPathIs('/admin');\n }", "public function create(RegistrationPostCreatedEvent $event): void\n {\n }", "public function testRegistrationUITest()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/add_user')\n ->assertSee('Username')\n ->assertSee('First Name')\n ->assertSee('Last Name')\n ->assertSee('Password')\n ->assertSee('Confirm Password')\n ->assertSee('Role')\n ->assertSee('Save');\n });\n }", "public function user_can_register_account_with_valid_details()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/register')\n ->assertSee('Register')\n ->type('name','keith')\n ->type('email','keith@test.com')\n ->type('password','secret')\n ->type('password_confirmation','secret')\n ->press('Register')\n ->assertpathIs('/home')\n ->assertDontSeeIn('nav', 'Login')\n ->assertDontSeeIn('nav', 'register')\n ;\n });\n }", "public function testShouldFailIFARegistrationIsCreatedWithoutRegistrant() {\n $this->expectException(\\PDOException::class);\n\n $entity = new Registration;\n $entity->source_id = $this->getSource()->id;\n $entity->type = 'PLAYER' ;\n $entity->league = 'league';\n $entity->org_name = 'Oranization...';\n $entity->org_state = 'NY';\n $entity->season = '2017';\n $entity->external_id = 'myexternalid';\n $entity->right_to_market = true;\n $entity->team_gender = 'Male';\n $entity->team_name = 'A-Team';\n $entity->school_district = 'school district';\n $entity->school_state = 'school sate';\n $entity->first_name = 'Firt name';\n $entity->middle_name = 'Middle name';\n $entity->last_name = 'Last Name';\n $entity->email = 'mail@mail.com';\n $entity->gender = 'Male';\n $entity->city = 'California';\n $entity->zip_code = '234141234123';\n $entity->birth_date = '11/27/1984';\n $entity->phone_number = '1234567890';\n $entity->game_type = 'SOME';\n $entity->level = 'LEVEL';\n $entity->state = 'CALIFORNIA';\n $entity->address_first_line = 'An Address 1234';\n $entity->county = 'A county';\n\n $entity->save();\n }", "public function testVolunteerHourCreateForContactSuccess_Administrator()\n {\n // Set test user as current authenticated user\n $this->be($this->administrator);\n \n $this->session([\n 'username' => $this->administrator->username, \n 'access_level' => $this->administrator->access_level\n ]);\n \n $volunteerID = 2;\n // Call route under test\n $response = $this->call('GET', 'volunteerhours/add/volunteer/'.$volunteerID);\n \n $this->assertContains('Volunteer Hours for', $response->getContent());\n }", "public function user_can_register_with_valid_details() :void\n {\n $this->browse(function (Browser $browser) {\n\n \t$user1= factory(User::class)->make();\n\n//\t\t\tdie($user1);\n $browser->visit('/')\n // ->click('#accountDropdown')\n ->clickLink('Account')\n\n ->waitFor('#nav-register')\n ->click('#nav-register')\n ->assertSee('Register');\n\n\t $this->submitForm($browser,\n\t\t [\n\t\t\t ['field_name'=>'first_name', 'field_value' =>$user1->first_name, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'last_name', 'field_value' =>$user1->last_name, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'username', 'field_value' =>$user1->username, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'email', 'field_value' =>$user1->email, 'field_type'=> 'text'],\n\t\t\t ['field_name'=>'password', 'field_value' =>$user1->password, 'field_type'=> 'password'],\n\t\t\t ['field_name'=>'password_confirmation', 'field_value' =>$user1->password, 'field_type'=> 'password']\n\t ]\n\t );\n $browser->assertpathIs('/restaurants')\n ->assertSeeIn('#accountName',$user1->username)\n ->assertDontSeeIn('nav', 'Login')\n ->assertDontSeeIn('nav', 'Sign Up')\n ->logout();\n });\n }", "public function testRegister()\n {\n $this->visit('/register')\n ->type('Test User', 'name')\n ->type('081233548738', 'phone')\n ->type('Tester', 'occupation')\n ->type('test@test.com', 'email')\n ->type(bcrypt('testing123'), 'password')\n ->press('Register')\n ->seeInDatabase('users', ['email' => 'bps.phi@gmail.com']);\n }", "public function testRegistrationIsSuccessfulWithValidInputs()\n {\n $this->output->writeln('Running testRegistrationIsSuccessfulWithValidInputs...');\n\n $this->browse(function ($browser) {\n $browser->visit('/register')\n ->type('name', 'John Smith')\n ->type('email', 'user@test.com')\n ->type('password', 'secret')\n ->type('password_confirmation', 'secret')\n ->press('Register')\n ->assertPathIs('/home');\n });\n }", "public function testApiRegistrationSimple()\n {\n $eventsFaker = Event::fake();\n $emailVerificationSend = Notification::fake();\n $uniqueData = $this->getTestRegisterData();\n $response = $this->withHeaders([ 'Authorization' => $this->getBearerClientToken() ])\n ->json('POST', $this->getRegisterRoute(), $uniqueData);\n\n $response->assertStatus(200)->assertJsonMissingValidationErrors();\n\n $responseArray = $response->decodeResponseJson()->json();\n $this->assertArrayNotHasKey('token_type', $responseArray);\n $this->assertArrayNotHasKey('expires_in', $responseArray);\n $this->assertArrayNotHasKey('access_token', $responseArray);\n $this->assertArrayNotHasKey('refresh_token', $responseArray);\n\n $user = CoreUser::byEmail($uniqueData[ 'email' ])->firstOrFail();\n $this->withoutExceptionHandling();\n\n if ( config('kit-auth.should_dispatch_registered_event') ) {\n $eventsFaker->assertDispatched(Registered::class,\n function (Registered $event) use ($emailVerificationSend) {\n app(ProcessEmailVerification::class)->handle($event);\n\n $emailVerificationSend->assertSentTo($event->user, VerifyEmail::class,\n function (VerifyEmail $notice) {\n $this->assertEquals($notice->requestSide, CoreUserContract::FRONTEND_REQUEST_SIDE);\n return $notice->tokens[ 'web' ] && $notice->tokens[ 'mobile' ];\n });\n\n return true;\n });\n } else {\n $eventsFaker->assertNotDispatched(Registered::class);\n }\n }", "public function testMemberRegistrationForm()\n {\n $response = $this\n ->get('/register-member')\n ->assertStatus(200);\n }" ]
[ "0.68164665", "0.68048227", "0.65093935", "0.64443994", "0.6280504", "0.6259114", "0.6228451", "0.6091112", "0.59748995", "0.5923236", "0.58715576", "0.58711356", "0.586229", "0.58319163", "0.58306944", "0.5823281", "0.58220184", "0.5764362", "0.57226545", "0.57079804", "0.5649337", "0.56471825", "0.56303316", "0.5623243", "0.5598284", "0.5591086", "0.556163", "0.5561521", "0.55391264", "0.55347073" ]
0.7710731
0
Test case for webinarRegistrantGet Get a Webinar Registrant.
public function testWebinarRegistrantGet() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_registrants_of_webinars($webinar_id=false) \n {\n\t\tif($webinar_id)\n\t\t{\n\t\t\tif(!$this->organizer_key or !$this->access_token)\n\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t$return_array = array();\n\t\t\t\n\t\t\t$return_array = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/{$webinar_id}/registrants?oauth_token=\".$this->access_token), true);\n\n\t\t\tif(isset($reponse['int_err_code']) and $reponse['int_err_code'] != '')\n\t\t\t{\n\t\t\t\t$this->set_access_token('');\n\t\t\t\t$this->set_organizer_key('');\t\t\t\t\n\t\t\t\tthrow new Exception($reponse['int_err_code']);\n\t\t\t}\n\t\t}\n\t\t\t\n return $return_array;\n\t}", "public function getRegistrant()\n {\n return $this->registrant;\n }", "public function getRegistrant();", "public function getRegistrant() {\n\t\treturn self::$_registrant;\n\t}", "function citrixonline_create_registrant_of_webinar($webinar_id=false, $data = array(), $all_fields_chk = false) \n {\n\t\tif($webinar_id and isset($data['first_name']) and isset($data['last_name']) and isset($data['email']))\n\t\t{\n\t\t\t$params = array();\n\t\t\t\n\t\t\t$fields = array(\n\t\t\t\t'firstName'=>$data['first_name'],\n\t\t\t\t'lastName'=>$data['last_name'],\n\t\t\t\t'email'=>$data['email'],\n );\n\t\t\t\n\t\t\t$params[CURLOPT_HTTPHEADER] = array('Accept: application/json', 'Content-Type: application/json', 'Authorization: OAuth oauth_token='.$this->access_token);\n\t\t\t$params[CURLOPT_POSTFIELDS] = json_encode($fields);\n\t\t\t\n\t\t\t$reponse = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/{$webinar_id}/registrants\", $params), true);\n\t\t\t\n\t\t\tif(isset($reponse['registrantKey']))\n\t\t\t\treturn $reponse;\n\t\t}\n\t\t\n\t\treturn false;\t\t\t\n\t}", "public function testWebinarRegistrants()\n {\n }", "public function testWebinarRegistrantStatus()\n {\n }", "public function testWebinarRegistrantCreate()\n {\n }", "public function registration_get(){\n }", "public function testWebinarRegistrantsQuestionsGet()\n {\n }", "public function getRegistrants()\n {\n if (array_key_exists(\"registrants\", $this->_propDict)) {\n return $this->_propDict[\"registrants\"];\n } else {\n return null;\n }\n }", "public function setRegistrant($registrant = null)\n {\n $this->registrant = $registrant;\n\n return $this;\n }", "public function getAllowedRegistrant()\n {\n if (array_key_exists(\"allowedRegistrant\", $this->_propDict)) {\n if (is_a($this->_propDict[\"allowedRegistrant\"], \"\\Beta\\Microsoft\\Graph\\Model\\MeetingAudience\") || is_null($this->_propDict[\"allowedRegistrant\"])) {\n return $this->_propDict[\"allowedRegistrant\"];\n } else {\n $this->_propDict[\"allowedRegistrant\"] = new MeetingAudience($this->_propDict[\"allowedRegistrant\"]);\n return $this->_propDict[\"allowedRegistrant\"];\n }\n }\n return null;\n }", "function _getRegistration($id){\n\t\tglobal $wpdb;\n\t\t$result=$wpdb->get_row(\"SELECT * FROM {$wpdb->prefix}events_attendee WHERE registration_id='$id'\",ARRAY_A);\n\t\tif(empty($result)){\n\t\t\tthrow new EspressoAPI_ObjectDoesNotExist($id);\n\t\t}\n\t\treturn array(\"registration\"=>$result);\n\t}", "public function getRegistration()\n {\n return $this->_registration;\n }", "public function getRegistratienummer()\n {\n return $this->registratienummer;\n }", "function citrixonline_get_webinar($webinarKey) \n {\n\t\tif(!$this->organizer_key or !$this->access_token)\n\t\t\treturn 0;\n\t\t\t\n\t\t$return_array = array();\n\n\t\t$reponse = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/\".$webinarKey.\"?oauth_token=\".$this->access_token), true);\n\t\t\n\t\tif(isset($reponse['int_err_code']) and $reponse['int_err_code'] != '')\n\t\t{\n\t\t\t$this->set_access_token('');\n\t\t\t$this->set_organizer_key('');\t\t\t\t\n\t\t\tthrow new Exception($reponse['int_err_code']);\n\t\t}\n\t\t\n\t\treturn $reponse;\n\t}", "public function setRegistrant($value) {\n\t\tself::$_registrant = $value;\n\t}", "public function testGetInstitutionUsingGET()\n {\n }", "public function registrationAction()\n {\n $eventId = $this->params('eventId');\n $registrations = $this->regTable->findRegByEventId($eventId);\n //*** DATABASE TABLE MODULE RELATIONSHIPS LAB: provide secondary data usersModelTableGateway which performs lookups for attendees for each registration\n $data = [];\n if ($registrations) {\n foreach ($registrations as $item) {\n $secondaryDataTable = '???';\n $data[] = [\n $item->registration_time,\n $item->first_name,\n $item->last_name,\n $secondaryDataTable];\n }\n }\n return new JsonModel(['data' => $data]);\n }", "public function onRegistrantCreated(MeetingRegistrantCreated $event) {\n\n $meetingId = (string)$event->getObject()['id'];\n\n $meeting = Meeting::whereZoomId($meetingId)->first();\n\n if(!empty($meeting)){\n\n $this->logEvent($event);\n try{\n $zoomRegistrant = new Registrant();\n $zoomRegistrant->create($event->getObject()['registrant']);\n\n $registrantModel = null;\n\n switch ($meeting->getSetting(ZoomMeeting::SETTINGS_KEY_REGISTRATION_TYPE)){\n case ZoomMeeting::SETTINGS_REGISTRATION_TYPE_ONCE_ALL_OCCURRENCES:\n case ZoomMeeting::SETTINGS_REGISTRATION_TYPE_ONCE_MANY_OCCURRENCES:\n $occurrences = isset($event->getObject()['occurrences']) ? $event->getObject()['occurrences'] : $meeting->occurrences;\n foreach($occurrences as $occurrence){\n $occurrenceId = is_array($occurrence) ? $occurrence['occurrence_id'] : $occurrence->occurrence_id;\n $this->saveRegistrant($zoomRegistrant, $meetingId, $occurrenceId);\n }\n break;\n case ZoomMeeting::SETTINGS_REGISTRATION_TYPE_ONCE_ONE_OCCURRENCES:\n $this->saveRegistrant($zoomRegistrant, $meetingId, $event->getObject()['occurrences'][0]['occurrence_id']);\n break;\n }\n\n $registrantModel = $this->getRegistrantFromEvent($event);\n\n event(new SendRegistrantConfirm($registrantModel));\n\n event(new SendNewRegistrant($registrantModel));\n\n $this->logFinishEvent();\n }catch (\\Exception $exception){\n $this->logFailedEvent($exception);\n }\n }else{\n $this->logNotFoundEvent();\n }\n\n }", "protected function createRegistrant() {\n $registrant = $this->registrantFactory->createRegistrant([\n 'event' => $this->registration->getEvent(),\n ]);\n $registrant->setRegistration($this->registration);\n\n return $registrant;\n }", "public function getRegisterAgent()\n {\n return $this->register_agent;\n }", "public function testShouldGenerateARegistrationSuccessfully() {\n \n $entity = new Registration;\n $entity->source_id = $this->getSource()->id;\n $entity->registrant_id = $this->getRegistrant()->id;\n $entity->type = 'PLAYER' ;\n $entity->league = 'league';\n $entity->org_name = 'Oranization...';\n $entity->org_state = 'NY';\n $entity->season = '2017';\n $entity->external_id = 'myexternalid';\n $entity->right_to_market = true;\n $entity->team_gender = 'Male';\n $entity->team_name = 'A-Team';\n $entity->school_district = 'school district';\n $entity->school_state = 'school sate';\n $entity->first_name = 'Firt name';\n $entity->middle_name = 'Middle name';\n $entity->last_name = 'Last Name';\n $entity->email = 'mail@mail.com';\n $entity->gender = 'Male';\n $entity->city = 'California';\n $entity->zip_code = '234141234123';\n $entity->birth_date = '11/27/1984';\n $entity->phone_number = '1234567890';\n $entity->game_type = 'SOME';\n $entity->level = 'LEVEL';\n $entity->state = 'CALIFORNIA';\n $entity->address_first_line = 'An Address 1234';\n $entity->county = 'A county';\n\n $entity->save();\n $this->assertTrue(!is_null($entity->id));\n }", "public function test_passed_registration()\n {\n\n $user = $this->user();\n\n $response = $this->post('api/v1/register', $user);\n $response->assertStatus(200);\n $response->assertJsonMissing([\n \"status\"=>'Failed'\n ]);\n\n }", "public function getRegistrantWrapperId() {\n $uuid = $this->registrant->uuid->first()->getValue();\n return $uuid['value'];\n }", "public function testGetInstitutionsUsingGET()\n {\n }", "function getRegistrationID()\n { \n return $this->getValueByFieldName('registration_id');\n }", "public function testApiRegistrationSimple()\n {\n $eventsFaker = Event::fake();\n $emailVerificationSend = Notification::fake();\n $uniqueData = $this->getTestRegisterData();\n $response = $this->withHeaders([ 'Authorization' => $this->getBearerClientToken() ])\n ->json('POST', $this->getRegisterRoute(), $uniqueData);\n\n $response->assertStatus(200)->assertJsonMissingValidationErrors();\n\n $responseArray = $response->decodeResponseJson()->json();\n $this->assertArrayNotHasKey('token_type', $responseArray);\n $this->assertArrayNotHasKey('expires_in', $responseArray);\n $this->assertArrayNotHasKey('access_token', $responseArray);\n $this->assertArrayNotHasKey('refresh_token', $responseArray);\n\n $user = CoreUser::byEmail($uniqueData[ 'email' ])->firstOrFail();\n $this->withoutExceptionHandling();\n\n if ( config('kit-auth.should_dispatch_registered_event') ) {\n $eventsFaker->assertDispatched(Registered::class,\n function (Registered $event) use ($emailVerificationSend) {\n app(ProcessEmailVerification::class)->handle($event);\n\n $emailVerificationSend->assertSentTo($event->user, VerifyEmail::class,\n function (VerifyEmail $notice) {\n $this->assertEquals($notice->requestSide, CoreUserContract::FRONTEND_REQUEST_SIDE);\n return $notice->tokens[ 'web' ] && $notice->tokens[ 'mobile' ];\n });\n\n return true;\n });\n } else {\n $eventsFaker->assertNotDispatched(Registered::class);\n }\n }", "public function verifyUserRegistration($request)\n {\n return $this->startAnonymous()->uri(\"/api/user/verify-registration\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->post()\n ->go();\n }" ]
[ "0.68977153", "0.6843426", "0.6761253", "0.6463811", "0.64311665", "0.6392972", "0.63280797", "0.62443304", "0.60247093", "0.5908627", "0.57308906", "0.55995554", "0.5596293", "0.558569", "0.5451014", "0.54231215", "0.53971064", "0.53788775", "0.53557867", "0.5348735", "0.53368413", "0.5330909", "0.53276604", "0.5318221", "0.52824605", "0.51856107", "0.5129945", "0.5092938", "0.5041742", "0.5028168" ]
0.7519076
0
Test case for webinarRegistrantQuestionUpdate Update Registration Questions.
public function testWebinarRegistrantQuestionUpdate() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testUpdateSurveyQuestion0()\n {\n }", "public function testUpdateSurveyQuestion0()\n {\n }", "public function testWebinarRegistrantsQuestionsGet()\n {\n }", "public function testUpdateVendorComplianceSurvey()\n {\n }", "public function testUpdateSurveyQuestionChoice0()\n {\n }", "public function testUpdateSurveyQuestionChoice0()\n {\n }", "public function testWebinarUpdate()\n {\n }", "public function test_changing_question() {\n global $DB;\n\n // create a user\n $user = $this->getDataGenerator()->create_user();\n\n // create a course\n $course = $this->getDataGenerator()->create_course();\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n $time = mktime(9, 0, 0, 11, 7, 2013);\n\n $this->loadDataSet($this->createArrayDataSet(array(\n 'videoquanda_questions' => array(\n array('id', 'instanceid', 'userid', 'timecreated', 'timemodified' ,'seconds', 'text'),\n array(1, $videoquanda->id, $user->id, $time, $time, 2, 'dummy text')\n )\n )));\n\n $question = array(\n 'text' => 'I have updated my question.',\n 'timemodified' => time()\n );\n\n // enrol the user on the course\n $this->getDataGenerator()->enrol_user($user->id, $course->id, $DB->get_field('role', 'id', array(\n 'shortname' => 'student',\n )));\n\n // login the user\n $this->setUser($user);\n\n $client = new Client($this->_app);\n $client->request('PUT', '/api/v1/' . $videoquanda->id . '/questions/1', array(), array(), array(), json_encode($question));\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $this->assertGreaterThan($time, $DB->get_field('videoquanda_questions', 'timemodified', array('id' => 1)));\n }", "private function sync_asked_questions_for_validation($questions): void {\n\t\t/** @var User $user */\n\t\t$user = auth()->guard('api')->user();\n\n\t\t$user->registration_questions()->sync($questions->pluck('id')->toArray());\n\t}", "public function testUpdateSurvey()\n {\n $survey = Survey::factory()->create();\n\n $response = $this->json('PATCH', \"survey/{$survey->id}\", [\n 'survey' => ['epilogue' => 'epilogue your behind']\n ]);\n\n $response->assertStatus(200);\n $this->assertDatabaseHas('survey', ['id' => $survey->id, 'epilogue' => 'epilogue your behind']);\n }", "public function testSuccessfulInstructorUpdate() {\n try {\n $updatedInstructor = UserManagementController::updateInstructorProfile(self::USERNAME,self::PASSWORD ,self::EMAIL\n ,self::FIRSTNAME,self::LASTNAME,$this->project->getProjectJnName()\n ,self::IS_OWNER,$this->institution->getAbbreviation(),self::IDENTIFICATION);\n\n $this->assertNotNull($updatedInstructor, \"The updated instructor is null\");\n $this->assertEquals($this->userTypeEnum->INSTRUCTOR, $updatedInstructor->getType(), \"The updated user is not\n an instance of INSTRUCTOR\");\n\n $InstructorInstitution = PersistentUserXInstitutionPeer::retrieveByPk($updatedInstructor->getUserId(),\n $this->institution->getInstitutionId());\n $this->assertNotNull($InstructorInstitution, \"The user x institution relation was not created for the instructor.\");\n $this->assertEquals(self::IDENTIFICATION, $InstructorInstitution->getIdentification(), \"The Instructor school\n identification is incorrect\");\n $this->assertEquals($updatedInstructor->getUserId(), $InstructorInstitution->getUserId(), \"The user id is\n incorrect on user x institution for the instructor\");\n $this->assertEquals($this->institution->getInstitutionId(), $InstructorInstitution->getInstitutionId(),\n \"The institution id is incorrect on user x institution for the instructor\");\n\n $instXProjec = PersistentUserXProjectPeer::retrieveByPK($updatedInstructor->getJnUsername(),\n $this->project->getProjectJnName());\n $this->assertNotNull($instXProjec, \"The relationship between instructor and project was not created\");\n $this->assertEquals($this->project->getProjectJnName(), $instXProjec->getProjectJnName(), \"The project name\n is incorrect on user x project\");\n $this->assertEquals($updatedInstructor->getJnUsername(), $instXProjec->getJnUsername(), \"The java.net\n username is incorrect on user x project for instructor\");\n $this->assertTrue($instXProjec->getIsOwner() == 1, \"The instructor is the owner of project.\");\n\n } catch (InfinityMetricsException $ime){\n $this->fail(\"The successful update of profile failed: \" . $ime);\n }\n\n }", "public function testUpdateSurvey0()\n {\n }", "public function testUpdateSurvey0()\n {\n }", "public function submit_registration_2(RegistrationQuizSubmissionRequest $request) {\n\t\t$questionIds = $request->questionIds;\n\t\t$answerIds = $request->answerIds;\n\n\t\t/** @var User $user */\n\t\t$user = auth()->guard('api')->user();\n\n\t\t$user->age = $request->input('age');\n\t\t$user->gender = $request->input('gender');\n\t\t$user->save();\n\n\t\t$savedQuestions = $user->registration_questions()->orderBy('id')->get();\n\n\t\t$this->validateGeneratedQuestions($savedQuestions, $questionIds, $answerIds);\n\n\t\t$randomAlphaNumericString = randomAlphaNumericString(10);\n\t\t$user->registration_participation()->create([\n\t\t\t'token' => $randomAlphaNumericString,\n\t\t\t'selected' => 0,\n\t\t]);\n\n\t\t$this->deleteGeneratedQuestions($user);\n\n\t\treturn response()->json([\n\t\t\t'status' => true,\n\t\t\t'code' => 200,\n\t\t\t'message' => 'Success.',\n\t\t\t'registration_count' => $user->registration_participation()->count(),\n\t\t\t'registration_token' => $randomAlphaNumericString,\n\t\t]);\n\n\t}", "public function testUpdateVendorComplianceSurveyCustomFields()\n {\n }", "public function testPostUpdate()\n {\n $this->getEmailWithLocal('uk');\n /** check email with ticket pdf file */\n $this->findEmailWithText('ticket-php-day-2017.pdf');\n /** check email with string */\n $this->findEmailWithText('Шановний учасник, в вкладенні Ваш вхідний квиток. Покажіть його з екрану телефону або роздрукуйте на папері.');\n }", "public function testWebinarPollUpdate()\n {\n }", "public function updateclaimquestion(){\n try{\n\t if(isset($this->getData['operators'])){\n\t $opertaors = commonfunction::implod_array($this->getData['operators']);\n\t $update = $this->UpdateInToTable(CLAIM_QUESTIONS, array(array('operators'=>$opertaors, 'question'=>$this->getData['claimquename'], 'status'=>$this->getData['claim_status'])), \"question_id='\".$this->getData['question_id'].\"'\");\n\t }\n\t else{\n\t $update = $this->UpdateInToTable(CLAIM_QUESTIONS, array(array('question'=>$this->getData['claimquename'], 'status'=>$this->getData['claim_status'])), \"question_id='\".$this->getData['question_id'].\"'\");\n\t }\n\t}\n\tcatch (Exception $e) {\n $this->_logger->info('Class-'.__CLASS__.',Function-'.__FUNCTION__.',Line-'.__LINE__.',Error-'.$e->getMessage());\n } \n\t return $update;\n }", "public function testWebinarRegistrantStatus()\n {\n }", "public function updated(InterviewQuestion $interviewQuestion): void\n {\n //\n }", "public function testWebinarRegistrants()\n {\n }", "public function update_question() {\r\n $questions = stripcslashes($this->input->get('questions'));\r\n \r\n // Decode the JSON array\r\n $questions = json_decode($questions,TRUE);\r\n \r\n foreach ($questions as $question) {\r\n $data['status'] = $this->question_model->update_correct_answer($question['question_id'],$question['correct_answer']);\r\n //mysqli_next_result( $this->db->conn_id );//Free BDD\r\n }\r\n \r\n $data['status'] = $this->message->warning('U');\r\n echo json_encode($data);\r\n }", "public function testWebinarRegistrantCreate()\n {\n }", "public function update(Request $request, Question_Test $question_Test)\n {\n //\n }", "public function changeQuestionAndAnswers () {\n global $ilUser, $tpl, $ilTabs, $ilCtrl;\n $ilTabs->activateTab(\"editQuiz\");\n\n // update database\n // create wizard object\n include_once('class.ilObjMobileQuizWizard.php');\n $wiz = new ilObjMobileQuizWizard();\n $wiz->changeQuestionAndAnswers($this->object);\n\n $_GET['question_id'] = $_POST['question_id'];\n $this->initQuestionAndAnswersEditForm();\n\n // load changed data and display them\n }", "public function test_changing_question_from_other_user() {\n global $DB;\n\n // create a user\n $user = $this->getDataGenerator()->create_user();\n\n // create a course\n $course = $this->getDataGenerator()->create_course();\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n $time = mktime(9, 0, 0, 11, 7, 2013);\n\n $this->loadDataSet($this->createArrayDataSet(array(\n 'videoquanda_questions' => array(\n array('id', 'instanceid', 'userid', 'timecreated', 'timemodified' ,'seconds', 'text'),\n array(1, $videoquanda->id, 99, $time, $time, 2, 'dummy text')\n )\n )));\n\n $question = array(\n 'text' => 'I have updated my question.',\n 'timemodified' => time()\n );\n\n // enrol the user on the course\n $this->getDataGenerator()->enrol_user($user->id, $course->id, $DB->get_field('role', 'id', array(\n 'shortname' => 'student',\n )));\n\n // login the user\n $this->setUser($user);\n\n $client = new Client($this->_app);\n $client->request('PUT', '/api/v1/' . $videoquanda->id . '/questions/1', array(), array(), array(), json_encode($question));\n\n $this->assertEquals(405, $client->getResponse()->getStatusCode());\n $this->assertEquals($time, $DB->get_field('videoquanda_questions', 'timemodified', array('id' => 1)));\n }", "public function onQuestionRegister(QuestionEvent $event)\n {\n $questionMail = new QuestionMail($this->serviceContainer);\n\n $em = $this->serviceContainer->get('doctrine.orm.default_entity_manager');\n\n $question = $event->getQuestion();\n\n $date = time();\n\n $question->setDate($date);\n\n $em->persist($question);\n $em->flush();\n\n $questionMail->newQuestion();\n\n $questionMail->registerQuestion($question->getEmail());\n\n $this->session->getFlashBag()->add('success', 'Question sender success');\n }", "public function submit_registration(Request $request) {\n\t\t$data = $request->input('data');\n\t\t$questions = $data['qA'];\n\t\t$duration = $data['duration'];\n\n\t\t/** @var User $user */\n\t\t$user = auth()->guard('api')->user();\n\t\t$savedQuestions = $user->registration_questions()->orderBy('id')->get();\n\n\t\tif($savedQuestions->count() == 0) {\n\t\t\treturn response()->json([\n\t\t\t\t'status' => false,\n\t\t\t\t'code' => 200,\n\t\t\t\t'message' => 'No questions generated from the server.',\n\t\t\t]);\n\t\t}\n\n\t\t// check if the question asked and sent from user's phone are in the same order\n\t\t// and answer also matches the actual answer\n\t\tforeach($questions as $key => $question) {\n\t\t\tif($question['questionId'] != $savedQuestions[ $key ]->id) {\n\t\t\t\treturn response()->json(['status' => false, 'code' => 200, 'message' => 'Failure on question matching.']);\n\t\t\t}\n\n\t\t\t$option = Option::find($question['answerId']);\n\t\t\tif($option->is_answer() && $option->question_id == $question['questionId']) {\n\t\t\t} else {\n\t\t\t\treturn response()->json(['status' => false, 'code' => 200, 'message' => 'Failure on option matching.']);\n\t\t\t}\n\t\t}\n\n\t\t$user->registration_participation()->create([\n\t\t\t'token' => str_random(100),\n\t\t\t'selected' => 1,\n\t\t]);\n\n\t\t$this->deleteGeneratedQuestions($user);\n\n\t\treturn response()->json(['status' => true, 'code' => 200, 'message' => 'Success.']);\n\t}", "public function updateUserQuestion()\n\t{\n\t\tif (Input::has('add_good_answer'))\n\t\t{\n\t\t\t// increase number of good answers\n\t\t\t$apiResponse = $this->apiDispatcher->callApiRoute('api_add_good_answer', [\n\t\t\t\t'auth_token' => $this->apiAuthToken,\n\t\t\t\t'id' => Input::get('user_question_id'),\n\t\t\t]);\n\t\t}\n\n\t\tif (Input::has('add_bad_answer'))\n\t\t{\n\t\t\t// increase number of bad answers\n\t\t\t$apiResponse = $this->apiDispatcher->callApiRoute('api_add_bad_answer', [\n\t\t\t\t'auth_token' => $this->apiAuthToken,\n\t\t\t\t'id' => Input::get('user_question_id'),\n\t\t\t]);\n\t\t}\n\n\t\tif (Input::has('update'))\n\t\t{\n\t\t\t// update question and/or answer\n\t\t\t$apiResponse = $this->apiDispatcher->callApiRoute('api_update_user_question', [\n\t\t\t\t'auth_token' => $this->apiAuthToken,\n\t\t\t\t'id' => Input::get('user_question_id'),\n\t\t\t\t'question' => Input::get('question'),\n\t\t\t\t'answer' => Input::get('answer')\n\t\t\t]);\n\n\t\t\t/*\n\t\t\t * Store in session for next request only\n\t\t\t * This will force learning page to display concrete user question instead of random one,\n\t\t\t * and the answer div to be displayed so user can see updated fields\n\t\t\t */\n\t\t\tSession::flash('user_question_id', Input::get('user_question_id'));\n\t\t\tSession::flash('display_answer', true);\n\t\t}\n\n\t\t/*\n\t\t * Success API response\n\t\t */\n\t\tif (isset($apiResponse) && $apiResponse->getSuccess())\n\t\t{\n\t\t\t// redirect to learning page display user question\n\t\t\treturn Redirect::route('learning_page_display_user_question');\n\t\t}\n\n\t\t// unexpected API resppnse\n\t\tthrow new Exception('Unexpected API response');\n\t}", "public function testVenueSubmitSurvey()\n {\n $this->buildVenueSurvey();\n\n $venueG = $this->venueGroup;\n $venueQ = $this->venueQuestion;\n\n $response = $this->json('POST', 'survey/submit', [\n 'slot_id' => $this->slot->id,\n 'type' => Survey::TRAINING,\n 'survey' => [\n [\n 'survey_group_id' => $venueG->id,\n 'answers' => [\n [\n 'survey_question_id' => $venueQ->id,\n 'response' => 'a response'\n ]\n ]\n ],\n ]\n ]);\n\n $response->assertStatus(200);\n\n $this->assertDatabaseHas('survey_answer', [\n 'person_id' => $this->user->id,\n 'slot_id' => $this->slot->id,\n 'survey_question_id' => $venueQ->id,\n 'response' => 'a response'\n ]);\n }" ]
[ "0.6326959", "0.6326959", "0.6215054", "0.6106913", "0.5868318", "0.5868318", "0.5843494", "0.58333194", "0.5764647", "0.5714424", "0.5704338", "0.570071", "0.570071", "0.56935734", "0.5648956", "0.5614041", "0.5593699", "0.5581167", "0.558031", "0.5559604", "0.5554796", "0.5537029", "0.551252", "0.5498532", "0.54832333", "0.5475688", "0.5472237", "0.5456587", "0.5448332", "0.5439653" ]
0.81059843
0
Test case for webinarRegistrantStatus Update Webinar Registrant Status.
public function testWebinarRegistrantStatus() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update_organiser_status(){\r\n\t\t$this->organiser_model->update_organiser_status($_POST['status'],$_POST['organiser_id']);\r\n\t\t$this->send_status_email($_POST['status'],$_POST['organiser_id']);\r\n\t\techo \"1\";exit;\r\n\t}", "public function testWebinarUpdate()\n {\n }", "public function testWebinarStatus()\n {\n }", "public function testWebinarRegistrantQuestionUpdate()\n {\n }", "public function testWebinarRegistrants()\n {\n }", "public function testWebinarRegistrantGet()\n {\n }", "public function status(Request $request)\n {\n $urow = Registration::where(['id' => $request['Row_id']]);\n if ($urow!= null) {\n $urow->update(['status' => $request['status']]);\n return redirect()->action('FollowupController@index')->with('success', 'Successfully Updated!');\n } else {\n return redirect()->action('FollowupController@index')->with('failed', 'Successfully Updated!');\n }\n }", "public function update_status();", "public function testWebinarRegistrantCreate()\n {\n }", "function update_status()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t\n\t\tif(!empty($data['t']) && !empty($data['list'])) $response = $this->_tender->update_status($data['t'], explode('--',$data['list']));\n\t\t\n\t\t# all good\n\t\tif(!empty($response) && $response['boolean']){\n\t\t\t$data['msg'] = 'The Invitation for Bids/Quotations status has been updated.';\n\t\t\t$data['area'] = 'refresh_list_msg';\n\t\t} \n\t\t# there was an error\n\t\telse {\n\t\t\t$data['msg'] = (!empty($data['t']) && !empty($data['list']))? 'ERROR: There was an error updating the Invitation for Bids/Quotations status.': 'ERROR: This action can not be resolved';\n\t\t\t$data['area'] = 'basic_msg';\n\t\t}\n\t\t\n\t\t$this->load->view('addons/basic_addons', $data);\n\t}", "public function updateSubmissionStatus() {\n\n $updateStatus = Usersubmissionstatus::where('user_id', Auth::user()->id)\n ->where('quarter_id', Quarter::getRunningQuarter()->id)\n ->update(['status_id' => config('constant.status.L1_APPROVAL_PENDING')]);\n // Let's notify user and L1 about user submission status.\n return $this->sendMail(config('constant.email_status.INFORM_APPRAISEE'));\n }", "public function status() : void\n {\n $jwt = Auth::isValidToken($_COOKIE['SSID']);\n \n if (!$jwt) {\n View::jsonResponse(['status' => 401, 'message' => 'Access denied for you!']);\n }\n\n $data = [ 'status' => $_POST['status'], 'id' => $_POST['statusid']];\n $data = Validator::cleanData($data);\n (new Task())->update($data)->execute();\n header('location: user-profile');\n\n }", "public function testcall(){\n self::updateUserStatus(2,2);\n }", "public function test_should_deliver_status() {\n\n\t\t$webhook = LLMS_REST_API()->webhooks()->create( array(\n\t\t\t'delivery_url' => 'https://mock.tld',\n\t\t\t'topic' => 'student.created',\n\t\t) );\n\n\t\t// Inactive.\n\t\t$this->assertFalse( LLMS_Unit_Test_Util::call_method( $webhook, 'should_deliver', array( array( $this->factory->student->create() ) ) ) );\n\n\t\t// Active.\n\t\t$webhook->set( 'status', 'active' )->save();\n\t\t$this->assertTrue( LLMS_Unit_Test_Util::call_method( $webhook, 'should_deliver', array( array( $this->factory->student->create() ) ) ) );\n\n\t}", "public function testComAdobeGraniteResourcestatusImplStatusResourceProviderImpl()\n {\n $client = static::createClient();\n\n $path = '/system/console/configMgr/com.adobe.granite.resourcestatus.impl.StatusResourceProviderImpl';\n\n $crawler = $client->request('POST', $path);\n }", "public function ajaxMemberStatus() {\n\t\t$this->autoRender = false;\n\t\t$this->viewBuilder()->setLayout(false);\n\t\tif ($this->request->is('ajax')) {\n\t\t\t$id = $this->request->getData()['id'];\n\t\t\t$status = $this->request->getData()['status'];\n\t\t\t$data = $this->Users->get($id);\n\n\t\t\t$user = $this->Users->patchEntity($data, ['status' => $status]);\n\n\t\t\tif ($this->Users->save($user)) {\n\t\t\t\t$message = ($status == 1) ? 'Member is Active now.' : 'Member is InActive now.';\n\t\t\t\techo json_encode(array('status' => 'success', 'message' => $message));\n\t\t\t\texit;\n\t\t\t}\n\t\t\t$message = ($status == 1) ? 'Error while updating member status to Active.' : 'Error while updating member status to InActive.';\n\t\t\techo json_encode(array('status' => 'error', 'message' => $message));\n\t\t\texit;\n\t\t}\n\t}", "public function test_admin_status()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/DscMember', 'status']);\n $this->assertResponseCode(404);\n }", "public function testSuccessfulInstructorUpdate() {\n try {\n $updatedInstructor = UserManagementController::updateInstructorProfile(self::USERNAME,self::PASSWORD ,self::EMAIL\n ,self::FIRSTNAME,self::LASTNAME,$this->project->getProjectJnName()\n ,self::IS_OWNER,$this->institution->getAbbreviation(),self::IDENTIFICATION);\n\n $this->assertNotNull($updatedInstructor, \"The updated instructor is null\");\n $this->assertEquals($this->userTypeEnum->INSTRUCTOR, $updatedInstructor->getType(), \"The updated user is not\n an instance of INSTRUCTOR\");\n\n $InstructorInstitution = PersistentUserXInstitutionPeer::retrieveByPk($updatedInstructor->getUserId(),\n $this->institution->getInstitutionId());\n $this->assertNotNull($InstructorInstitution, \"The user x institution relation was not created for the instructor.\");\n $this->assertEquals(self::IDENTIFICATION, $InstructorInstitution->getIdentification(), \"The Instructor school\n identification is incorrect\");\n $this->assertEquals($updatedInstructor->getUserId(), $InstructorInstitution->getUserId(), \"The user id is\n incorrect on user x institution for the instructor\");\n $this->assertEquals($this->institution->getInstitutionId(), $InstructorInstitution->getInstitutionId(),\n \"The institution id is incorrect on user x institution for the instructor\");\n\n $instXProjec = PersistentUserXProjectPeer::retrieveByPK($updatedInstructor->getJnUsername(),\n $this->project->getProjectJnName());\n $this->assertNotNull($instXProjec, \"The relationship between instructor and project was not created\");\n $this->assertEquals($this->project->getProjectJnName(), $instXProjec->getProjectJnName(), \"The project name\n is incorrect on user x project\");\n $this->assertEquals($updatedInstructor->getJnUsername(), $instXProjec->getJnUsername(), \"The java.net\n username is incorrect on user x project for instructor\");\n $this->assertTrue($instXProjec->getIsOwner() == 1, \"The instructor is the owner of project.\");\n\n } catch (InfinityMetricsException $ime){\n $this->fail(\"The successful update of profile failed: \" . $ime);\n }\n\n }", "public function changestatus_post()\r\n {\r\n $userid=$this->uri->segment(3);\r\n\r\n $user=$this->user_m->get($userid);\r\n if($user->status==\"1\"){\r\n $data=array(\r\n \"status\"=> \"0\"\r\n );\r\n }\r\n else{\r\n $data=array(\r\n \"status\"=> \"1\"\r\n ); \r\n }\r\n if ($succes_status = $this->user_m->update_data($userid,$data)){\r\n if($user->status==\"1\"){\r\n $this->response(\r\n array(\r\n 'Status_code' => \"201\",\r\n 'Message' => \"User Deactivated\"\r\n )\r\n );\r\n }\r\n else{\r\n $this->response(\r\n array(\r\n 'Status_code' => \"201\",\r\n 'Message' => \"User Activated\"\r\n )\r\n ); \r\n }\r\n }\r\n else\r\n {\r\n $this->response(\r\n array(\r\n 'Status_code' => \"401\",\r\n 'Message' => \"ops something went wrong\"\r\n )\r\n ); \r\n }\r\n }", "public function changeStatus($u_status,$delivery_id){\n $sql=\"UPDATE `deliveries` SET `delivery_status`='$u_status' WHERE delivery_id='$delivery_id'\";\n $result=$this->conn->query($sql);\n if($result==true){\n header(\"location:delivery.php?success=1&message=You successfully updated the status.\");\n }else{\n header(\"location:delivery.php?success=0&message=Error occured in delivery table. Try it agin.\");\n }\n }", "public function updateAllergyStatus(AllergyStatusRequest $request)\r\n {\r\n $allergy = $this->allergy->changeStatus($request);\r\n $message = trans('message.allergy_started_successfully');\r\n\r\n if(!$allergy->status) {\r\n $message = trans('message.allergy_discontinued_successfully');\r\n }\r\n\r\n return $this->respond([\r\n 'status' => 'success',\r\n 'message'=> $message\r\n ]);\r\n }", "protected function getRecordRegistrationStatus() {}", "function updateStatus(){\n $serv_ID=$this->uri->segment(3);\n $status=$this->input->post('status');\n if ($this->deliveryAndPickupModel->updateCustService($serv_ID, $status)) {\n echo \"<script>alert('Successfully Updated');window.location.href='\".site_url('deliveryAndPickupController/acceptServRequest/'.$serv_ID.'').\"';</script>\";\n }\n else\n {\n echo \"<script>alert('Something when wrong');window.location.href='\".site_url('deliveryAndPickupController/acceptServRequest/'.$serv_ID.'').\"';</script>\";\n }\n }", "public function update(Request $request, PregnancyStatus $pregnancyStatus)\n {\n //\n }", "public function testWebinarPollUpdate()\n {\n }", "function change_status_to() {\n $stat_param = array(\n 'status' => $this->uri->segment(3)\n );\n $id = $this->uri->segment(4);\n $updt_status = $this->guest_post_model->change_status_to('newsletter', $stat_param, $id);\n if ($updt_status) {\n $this->session->set_userdata('success_msg', 'Status Updated susseccfully.');\n } else {\n $this->session->set_userdata('error_msg', 'Cannot update status.');\n }\n redirect('news_letter_cont');\n }", "public function updateUserStatus($email) {\n $registry = new Registry();\n // Database\n $db = new DB(DB_DRIVER, DB_HOSTNAME, DB_USERNAME, DB_PASSWORD, DB_DATABASE);\n $registry->set('db', $db);\n $db->query(\"UPDATE \" . DB_PREFIX . \"customer SET status = 1, approved = 1 WHERE LOWER(email) = '\" . $db->escape(utf8_strtolower($email)) . \"'\");\n }", "function setStatus( $status )\n {\n\t if (is_int($status)) {\n\t\t \n\t\t switch ( $status ) {\n\t\t\t \n\t\t\t case RowManager_RegistrationManager::STATUS_REGISTERED:\n\t\t\t \t$this->setValueByFieldName( 'registration_status', $status );\n\t\t\t \tbreak;\t\t\t \t\n\t\t\t case RowManager_RegistrationManager::STATUS_INCOMPLETE:\n\t\t\t \t$this->setValueByFieldName( 'registration_status', $status );\n\t\t\t \tbreak;\t\t\t \t\n\t\t\t case RowManager_RegistrationManager::STATUS_CANCELLED:\n\t\t\t \t$this->setValueByFieldName( 'registration_status', $status );\n\t\t\t \tbreak;\n\t\t\t case RowManager_RegistrationManager::STATUS_UNASSIGNED:\n\t\t\t \t$this->setValueByFieldName( 'registration_status', $status );\n\t\t\t \tbreak;\n\t\t }\n\n\t\t}\n\t}", "public function locationChangeStatus(Request $request) {\n $data = [\n 'status' => $request->status,\n ];\n\n $userCount = User::where('location_id',$request->locationid)->count();\n $userLocationCount = UserLocation::where('location_id',$request->locationid)->count();\n $salesAgentCount = Salesagentdetail::where('location_id',$request->locationid)->count();\n\n if(($userCount > 0 || $userLocationCount > 0 || $salesAgentCount > 0) && $request->status =='inactive') {\n return response()->json([ 'status' => 'error', 'message'=> 'Unable to deactivat of location, due to this location assigned to users.' ]);\n } else {\n\n $updateStatus = Salescenterslocations::where('id', $request->locationid)->update($data);\n\n if ($updateStatus) {\n if ($request->status =='active') {\n $message='Sales center location successfully activated.';\n } else {\n $message='Sales center location successfully deactivated';\n }\n return response()->json([ 'status' => 'success', 'message' => $message]);\n } else {\n return response()->json([ 'status' => 'error', 'message'=> 'Unable to update location' ]);\n }\n }\n }", "public function update(Request $request,PropertyStatus $propertyStatus)\n {\n $attribute = $request->validate([\n 'property_status'=>'required'\n ]);\n\n $attribute['updated_by'] = auth()->user()->name;;\n \n $propertyStatus->update($attribute); \n\n Session::flash('success',\"Registro actualizado satisfactoriamente\");\n\n return redirect()->route('property_status.index');\n }" ]
[ "0.61954045", "0.596753", "0.5939235", "0.59271204", "0.58863634", "0.58448845", "0.5814457", "0.5804797", "0.573674", "0.55866015", "0.5571828", "0.554309", "0.5540145", "0.55377865", "0.5517234", "0.5506369", "0.54942244", "0.5482305", "0.5469329", "0.5466056", "0.54422605", "0.5428633", "0.5422021", "0.5408735", "0.53940105", "0.5381583", "0.53748757", "0.5356886", "0.5356594", "0.53369457" ]
0.7310263
0
Test case for webinarRegistrants List Webinar Registrants.
public function testWebinarRegistrants() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_registrants_of_webinars($webinar_id=false) \n {\n\t\tif($webinar_id)\n\t\t{\n\t\t\tif(!$this->organizer_key or !$this->access_token)\n\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t$return_array = array();\n\t\t\t\n\t\t\t$return_array = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/{$webinar_id}/registrants?oauth_token=\".$this->access_token), true);\n\n\t\t\tif(isset($reponse['int_err_code']) and $reponse['int_err_code'] != '')\n\t\t\t{\n\t\t\t\t$this->set_access_token('');\n\t\t\t\t$this->set_organizer_key('');\t\t\t\t\n\t\t\t\tthrow new Exception($reponse['int_err_code']);\n\t\t\t}\n\t\t}\n\t\t\t\n return $return_array;\n\t}", "public function testWebinarRegistrantGet()\n {\n }", "public function testWebinarRegistrantStatus()\n {\n }", "public function testWebinarRegistrantCreate()\n {\n }", "public function testListTenant()\n {\n $this->json('GET', 'reseller/'.$this->reseller->id.'/tenants')\n ->assertStatus(200);\n }", "public function test_admin_tribe_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Assignments', 'tribe_list']);\n $this->assertResponseCode(404);\n }", "function citrixonline_create_registrant_of_webinar($webinar_id=false, $data = array(), $all_fields_chk = false) \n {\n\t\tif($webinar_id and isset($data['first_name']) and isset($data['last_name']) and isset($data['email']))\n\t\t{\n\t\t\t$params = array();\n\t\t\t\n\t\t\t$fields = array(\n\t\t\t\t'firstName'=>$data['first_name'],\n\t\t\t\t'lastName'=>$data['last_name'],\n\t\t\t\t'email'=>$data['email'],\n );\n\t\t\t\n\t\t\t$params[CURLOPT_HTTPHEADER] = array('Accept: application/json', 'Content-Type: application/json', 'Authorization: OAuth oauth_token='.$this->access_token);\n\t\t\t$params[CURLOPT_POSTFIELDS] = json_encode($fields);\n\t\t\t\n\t\t\t$reponse = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/{$webinar_id}/registrants\", $params), true);\n\t\t\t\n\t\t\tif(isset($reponse['registrantKey']))\n\t\t\t\treturn $reponse;\n\t\t}\n\t\t\n\t\treturn false;\t\t\t\n\t}", "public function testWebinarRegistrantsQuestionsGet()\n {\n }", "public function getRegistrants()\n {\n if (array_key_exists(\"registrants\", $this->_propDict)) {\n return $this->_propDict[\"registrants\"];\n } else {\n return null;\n }\n }", "public function testListSiteMembershipsForPerson()\n {\n }", "public function testListSiteMembershipRequestsForPerson()\n {\n }", "public function testListSiteMemberships()\n {\n }", "function getRegistrationList()\r\n {\r\n global $objDatabase;\r\n \r\n $blnFirst = true;\r\n $arrWhere = array();\r\n if ($this->getRegistrations) { $arrWhere[] = 1; }\r\n if ($this->getDeregistrations) { $arrWhere[] = 0; }\r\n if ($this->getWaitlist) { $arrWhere[] = 2; }\r\n $strWhere = ' AND (';\r\n foreach ($arrWhere as $value) {\r\n $strWhere .= $blnFirst ? '`type` = '.$value : ' OR `type` = '.$value;\r\n $blnFirst = false;\r\n }\r\n $strWhere .= ')';\r\n \r\n $query = '\r\n SELECT `id`\r\n FROM `'.DBPREFIX.'module_'.$this->moduleTablePrefix.'_registration`\r\n WHERE `event_id` = '.$this->eventId.'\r\n '.$strWhere.'\r\n ORDER BY `id` DESC'\r\n ;\r\n $objResult = $objDatabase->Execute($query);\r\n \r\n if ($objResult !== false) {\r\n while (!$objResult->EOF) {\r\n $objRegistration = new \\Cx\\Modules\\Calendar\\Controller\\CalendarRegistration($this->formId, intval($objResult->fields['id']));\r\n $this->registrationList[$objResult->fields['id']] = $objRegistration;\r\n $objResult->MoveNext();\r\n }\r\n }\r\n }", "public function listRegisteredDestinations($request);", "public function testListPastWebinarQA()\n {\n }", "public function testWebinarPanelistCreate()\n {\n }", "public function testWebinarAbsentees()\n {\n }", "public function actionRegistrationList() {\n $userCounter = new СountRegisteredUsers();\n $userCounter->getAllUserForDays();\n $userCounter->getNonActiveUsersForDays();\n\n $dayDate = new DateTime();\n\n // TODO registration\n\n $registrationsByDay = [];\n for($i = 0; $i<30; $i++) {\n $day = date_format($dayDate, 'Y-m-d');\n $registrationsByDay[$day]['period'] = $day;\n $registrationsByDay[$day]['totalRegistrations'] = isset($userCounter->totalRegistrations[$day]) ? $userCounter->totalRegistrations[$day] : 0;\n $registrationsByDay[$day]['totalPersonals'] = isset($userCounter->totalPersonals[$day]) ? $userCounter->totalPersonals[$day] : 0;\n $registrationsByDay[$day]['totalCorporate'] = isset($userCounter->totalCorporate[$day]) ? $userCounter->totalCorporate[$day] : 0;\n $registrationsByDay[$day]['totalNonActivePersonals'] = isset($userCounter->totalNonActivePersonals[$day]) ? $userCounter->totalNonActivePersonals[$day] : 0;\n $registrationsByDay[$day]['totalNonActiveCorporate'] = isset($userCounter->totalNonActiveCorporate[$day]) ? $userCounter->totalNonActiveCorporate[$day] : 0;\n\n $dateInterval = new DateInterval('P1D');\n $dateInterval->invert = 1;\n $dayDate->add($dateInterval);\n }\n\n // getting registration by month\n $userCounter = new СountRegisteredUsers();\n $userCounter->getAllUserForMonths();\n $userCounter->getNonActiveUsersForMonths();\n\n $dayDate = new DateTime();\n\n $registrationsByMonth = [];\n for($i = 0; $i<12; $i++) {\n $day = date_format($dayDate, 'F');\n $registrationsMonth[$day]['period'] = $day;\n $registrationsMonth[$day]['totalRegistrations'] = isset($userCounter->totalRegistrations[$day]) ? $userCounter->totalRegistrations[$day] : 0;\n $registrationsMonth[$day]['totalPersonals'] = isset($userCounter->totalPersonals[$day]) ? $userCounter->totalPersonals[$day] : 0;\n $registrationsMonth[$day]['totalCorporate'] = isset($userCounter->totalCorporate[$day]) ? $userCounter->totalCorporate[$day] : 0;\n $registrationsMonth[$day]['totalNonActivePersonals'] = isset($userCounter->totalNonActivePersonals[$day]) ? $userCounter->totalNonActivePersonals[$day] : 0;\n $registrationsMonth[$day]['totalNonActiveCorporate'] = isset($userCounter->totalNonActiveCorporate[$day]) ? $userCounter->totalNonActiveCorporate[$day] : 0;\n\n $dateInterval = new DateInterval('P1M');\n $dateInterval->invert = 1;\n $dayDate->add($dateInterval);\n }\n\n // getting registration by year\n $userCounter = new СountRegisteredUsers();\n $userCounter->getAllUserForYears();\n $userCounter->getNonActiveUserForYears();\n\n $dayDate = new DateTime();\n\n $registrationsByYear = [];\n $day = date_format($dayDate, 'Y');\n $registrationsByYear[$day]['period'] = $day;\n $registrationsByYear[$day]['totalRegistrations'] = isset($userCounter->totalRegistrations[$day]) ? $userCounter->totalRegistrations[$day] : 0;\n $registrationsByYear[$day]['totalPersonals'] = isset($userCounter->totalPersonals[$day]) ? $userCounter->totalPersonals[$day] : 0;\n $registrationsByYear[$day]['totalCorporate'] = isset($userCounter->totalCorporate[$day]) ? $userCounter->totalCorporate[$day] : 0;\n $registrationsByYear[$day]['totalNonActivePersonals'] = isset($userCounter->totalNonActivePersonals[$day]) ? $userCounter->totalNonActivePersonals[$day] : 0;\n $registrationsByYear[$day]['totalNonActiveCorporate'] = isset($userCounter->totalNonActiveCorporate[$day]) ? $userCounter->totalNonActiveCorporate[$day] : 0;\n\n $registrationsByYearOld = [];\n $day--;\n $registrationsByYearOld[$day]['period'] = $day;\n $registrationsByYearOld[$day]['totalRegistrations'] = isset($userCounter->totalRegistrations[$day]) ? $userCounter->totalRegistrations[$day] : 0;\n $registrationsByYearOld[$day]['totalPersonals'] = isset($userCounter->totalPersonals[$day]) ? $userCounter->totalPersonals[$day] : 0;\n $registrationsByYearOld[$day]['totalCorporate'] = isset($userCounter->totalCorporate[$day]) ? $userCounter->totalCorporate[$day] : 0;\n $registrationsByYearOld[$day]['totalNonActivePersonals'] = isset($userCounter->totalNonActivePersonals[$day]) ? $userCounter->totalNonActivePersonals[$day] : 0;\n $registrationsByYearOld[$day]['totalNonActiveCorporate'] = isset($userCounter->totalNonActiveCorporate[$day]) ? $userCounter->totalNonActiveCorporate[$day] : 0;\n $this->layout = '//admin_area/layouts/admin_main';\n $this->render('/admin_area/pages/registrationCounterList',\n [\n 'registrationsByDay' => $registrationsByDay,\n 'registrationsByMonth' => $registrationsMonth,\n 'registrationsByYear' => $registrationsByYear,\n 'registrationsByYearOld' => $registrationsByYearOld,\n ]\n );\n }", "public function getRegistrant();", "public function testWebinarPolls()\n {\n }", "public function testWebinarPanelists()\n {\n }", "public function registrationAction()\n {\n $eventId = $this->params('eventId');\n $registrations = $this->regTable->findRegByEventId($eventId);\n //*** DATABASE TABLE MODULE RELATIONSHIPS LAB: provide secondary data usersModelTableGateway which performs lookups for attendees for each registration\n $data = [];\n if ($registrations) {\n foreach ($registrations as $item) {\n $secondaryDataTable = '???';\n $data[] = [\n $item->registration_time,\n $item->first_name,\n $item->last_name,\n $secondaryDataTable];\n }\n }\n return new JsonModel(['data' => $data]);\n }", "public function testListEnrollmentRequests()\n {\n }", "public function testWebinarStatus()\n {\n }", "public function testSubscriptionsList()\n {\n }", "public function testWebinarCreate()\n {\n }", "public function instructorList()\n\t{\n\t\techo json_encode($this->instructor->get_instructor());\n\t}", "public function testWebinar()\n {\n }", "public function testRegistrationUITest()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/add_user')\n ->assertSee('Username')\n ->assertSee('First Name')\n ->assertSee('Last Name')\n ->assertSee('Password')\n ->assertSee('Confirm Password')\n ->assertSee('Role')\n ->assertSee('Save');\n });\n }", "public function test_admin_tribe_list_b()\n {\n $this->request('GET', ['pages/Assignments', 'tribe_list']);\n $this->assertResponseCode(404);\n }" ]
[ "0.712533", "0.6706353", "0.65471625", "0.63244635", "0.60663444", "0.59959614", "0.5994309", "0.5917624", "0.5810444", "0.57461953", "0.5665831", "0.5652421", "0.56106544", "0.5591197", "0.5565672", "0.5482361", "0.54760706", "0.5439773", "0.54333013", "0.543098", "0.54060936", "0.5389081", "0.5343885", "0.52739346", "0.527223", "0.5270274", "0.524847", "0.5225634", "0.51836187", "0.5166671" ]
0.72998947
0
Test case for webinarRegistrantsQuestionsGet List Registration Questions.
public function testWebinarRegistrantsQuestionsGet() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function registration_questions() {\n\t\t// return $this->get_registration_token_list();\n\t\t$category = Category::with('questions')->where('name', 'registration')->first();\n\n\t\tif($this->categoryHasLessThanFiveQuestions($category)) {\n\t\t\treturn response()->json(['status' => false, 'code' => 200, 'message' => 'No questions for registration'], 200);\n\t\t}\n\n\t\t$questions = $category->questions->shuffle()->take(5)->sortBy('id')->values();\n\n\t\t$return_data = $this->format_according_to_multi_language($questions);\n\t\t$advertisement = Advertisement::active()->type('top')->category(3)->first();\n\t\t$return_data['advertisement'] = [\n\t\t\t'image' => $advertisement->image ?? '',\n\t\t\t'url' => $advertisement->url ?? '',\n\t\t];\n\n\t\t$this->sync_asked_questions_for_validation($questions);\n\n\t\treturn response()->json(['status' => true, 'code' => 200, 'data' => $return_data], 200);\n\t}", "public function testWebinarRegistrants()\n {\n }", "public function testWebinarRegistrantGet()\n {\n }", "public function getQuestions()\n {\n $title = \"Questions\";\n $subtitle = \"Here you will find all the questions!\";\n $view = $this->di->get(\"view\");\n $pageRender = $this->di->get(\"pageRender\");\n\n // Get all the questions\n $questions = $this->di->get(\"questionModel\")->getQuestions();\n\n // Get number of answers\n $answers = [];\n foreach ($questions as $question) {\n $ans = $this->di->get(\"answerModel\")->getAnswersWhere(\"questionId\", $question->id);\n $answers[$question->id] = count($ans);\n }\n\n $data = [\n \"questions\" => $questions,\n \"subtitle\" => $subtitle,\n \"noOfAnswers\" => $answers,\n ];\n\n $view->add(\"pages/questions\", $data);\n $pageRender->renderPage([\"title\" => $title]);\n }", "function get_registrants_of_webinars($webinar_id=false) \n {\n\t\tif($webinar_id)\n\t\t{\n\t\t\tif(!$this->organizer_key or !$this->access_token)\n\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t$return_array = array();\n\t\t\t\n\t\t\t$return_array = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/webinars/{$webinar_id}/registrants?oauth_token=\".$this->access_token), true);\n\n\t\t\tif(isset($reponse['int_err_code']) and $reponse['int_err_code'] != '')\n\t\t\t{\n\t\t\t\t$this->set_access_token('');\n\t\t\t\t$this->set_organizer_key('');\t\t\t\t\n\t\t\t\tthrow new Exception($reponse['int_err_code']);\n\t\t\t}\n\t\t}\n\t\t\t\n return $return_array;\n\t}", "public function testWebinarRegistrantQuestionUpdate()\n {\n }", "public function test_admin_tribe_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Assignments', 'tribe_list']);\n $this->assertResponseCode(404);\n }", "public function test_all_questions_and_answers_route_when_questioner_has_sitewide_role() {\n global $DB;\n\n // create a user\n $user = $this->getDataGenerator()->create_user();\n $roleid = $DB->get_field('role', 'id', array('shortname' => 'manager'));\n $this->getDataGenerator()->role_assign($roleid, $user->id);\n\n // create a course\n $course = $this->getDataGenerator()->create_course();\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n $now = time();\n\n $this->loadDataSet($this->createArrayDataSet(array(\n 'videoquanda_questions' => array(\n array('id', 'instanceid', 'userid', 'timecreated', 'timemodified' ,'seconds', 'text'),\n array(1, $videoquanda->id, $user->id, $now, $now + 1, 2, 'dummy text')\n )\n )));\n\n $this->setUser($user);\n $client = new Client($this->_app);\n $client->request('GET', '/api/v1/' . $videoquanda->id . '/questions');\n $json = $client->getResponse()->getContent();\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $array = (array) json_decode($json);\n $this->assertCount(1, $array);\n }", "public function submit_registration(Request $request) {\n\t\t$data = $request->input('data');\n\t\t$questions = $data['qA'];\n\t\t$duration = $data['duration'];\n\n\t\t/** @var User $user */\n\t\t$user = auth()->guard('api')->user();\n\t\t$savedQuestions = $user->registration_questions()->orderBy('id')->get();\n\n\t\tif($savedQuestions->count() == 0) {\n\t\t\treturn response()->json([\n\t\t\t\t'status' => false,\n\t\t\t\t'code' => 200,\n\t\t\t\t'message' => 'No questions generated from the server.',\n\t\t\t]);\n\t\t}\n\n\t\t// check if the question asked and sent from user's phone are in the same order\n\t\t// and answer also matches the actual answer\n\t\tforeach($questions as $key => $question) {\n\t\t\tif($question['questionId'] != $savedQuestions[ $key ]->id) {\n\t\t\t\treturn response()->json(['status' => false, 'code' => 200, 'message' => 'Failure on question matching.']);\n\t\t\t}\n\n\t\t\t$option = Option::find($question['answerId']);\n\t\t\tif($option->is_answer() && $option->question_id == $question['questionId']) {\n\t\t\t} else {\n\t\t\t\treturn response()->json(['status' => false, 'code' => 200, 'message' => 'Failure on option matching.']);\n\t\t\t}\n\t\t}\n\n\t\t$user->registration_participation()->create([\n\t\t\t'token' => str_random(100),\n\t\t\t'selected' => 1,\n\t\t]);\n\n\t\t$this->deleteGeneratedQuestions($user);\n\n\t\treturn response()->json(['status' => true, 'code' => 200, 'message' => 'Success.']);\n\t}", "public function test_admin_squad_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Assignments', 'squad_list']);\n $this->assertResponseCode(404);\n }", "public function testListPastWebinarQA()\n {\n }", "public function questions()\n {\n\n $client = new \\GuzzleHttp\\Client();\n\n $request = $client->get('http://localhost/quizci/questions');\n $response = $request->getBody()->getContents();\n\n $res_json_decode = json_decode($response);\n $data_collection = collect($res_json_decode->questions);\n //dd($data_collect);\n\n return View('admin.pages.questions', compact('data_collection'));\n }", "function getRegistrationList()\r\n {\r\n global $objDatabase;\r\n \r\n $blnFirst = true;\r\n $arrWhere = array();\r\n if ($this->getRegistrations) { $arrWhere[] = 1; }\r\n if ($this->getDeregistrations) { $arrWhere[] = 0; }\r\n if ($this->getWaitlist) { $arrWhere[] = 2; }\r\n $strWhere = ' AND (';\r\n foreach ($arrWhere as $value) {\r\n $strWhere .= $blnFirst ? '`type` = '.$value : ' OR `type` = '.$value;\r\n $blnFirst = false;\r\n }\r\n $strWhere .= ')';\r\n \r\n $query = '\r\n SELECT `id`\r\n FROM `'.DBPREFIX.'module_'.$this->moduleTablePrefix.'_registration`\r\n WHERE `event_id` = '.$this->eventId.'\r\n '.$strWhere.'\r\n ORDER BY `id` DESC'\r\n ;\r\n $objResult = $objDatabase->Execute($query);\r\n \r\n if ($objResult !== false) {\r\n while (!$objResult->EOF) {\r\n $objRegistration = new \\Cx\\Modules\\Calendar\\Controller\\CalendarRegistration($this->formId, intval($objResult->fields['id']));\r\n $this->registrationList[$objResult->fields['id']] = $objRegistration;\r\n $objResult->MoveNext();\r\n }\r\n }\r\n }", "public function test_all_questions_and_answers_route_when_questioner_is_admin() {\n // create a user\n $user = $this->getDataGenerator()->create_user();\n\n // create a course\n $course = $this->getDataGenerator()->create_course();\n\n // enrolment\n $this->getDataGenerator()->enrol_user($user->id, $course->id);\n\n // create a course module\n $videoquanda = $this->getDataGenerator()->create_module('videoquanda', array(\n 'course' => $course->id\n ));\n\n $now = time();\n\n $this->loadDataSet($this->createArrayDataSet(array(\n 'videoquanda_questions' => array(\n array('id', 'instanceid', 'userid', 'timecreated', 'timemodified' ,'seconds', 'text'),\n array(1, $videoquanda->id, 2, $now, $now + 1, 2, 'dummy text'),\n array(2, $videoquanda->id, $user->id, $now, $now + 1, 2, 'dummy text')\n )\n )));\n\n $this->setAdminUser();\n $client = new Client($this->_app);\n $client->request('GET', '/api/v1/' . $videoquanda->id . '/questions');\n $json = $client->getResponse()->getContent();\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $array = (array) json_decode($json);\n $this->assertCount(2, $array);\n }", "public function indexAction()\n {\n $user = $this->get('security.context')->getToken()->getUser();\n\n// $em = $this->getDoctrine()->getEntityManager();\n// $entity = $em->getRepository('CfpCfpBundle:Registration')->findOneById(1);\n\n// foreach ($entity->getSubmissions() as $submission) {\n// print_r($submission->getRemarks());\n// print \"<hr>\";\n// }\n// exit;\n//\n $entities = $user->getRegistrations();\n\n return $this->render('CfpCfpBundle:Registration:index.html.twig', array(\n 'entities' => $entities\n ));\n }", "public function testWebinarRegistrantCreate()\n {\n }", "public function get_questions() {\n return $this->questions;\n }", "public function testRegistrationUITest()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/add_user')\n ->assertSee('Username')\n ->assertSee('First Name')\n ->assertSee('Last Name')\n ->assertSee('Password')\n ->assertSee('Confirm Password')\n ->assertSee('Role')\n ->assertSee('Save');\n });\n }", "public function getQuestions()\n {\n $title = \"Questions\";\n $view = $this->di->get(\"view\");\n $pageRender = $this->di->get(\"pageRender\");\n $post = new Post($this->di->get(\"db\"));\n $user = new User($this->di->get(\"db\"));\n $tag = $this->di->get(\"tag\");\n\n $questions = $post->getQuestions();\n foreach ($questions as $question) {\n $question->tags = $tag->getPostTags($question->id);\n $question->user = $user->findAllWhere(\"id = ?\", [$question->userId])[0];//$user->find(\"id\", $question->userId);\n }\n\n $pag = $this->getPagination($questions);\n $view->add(\"comment/question-list\", [\n \"questions\" => array_slice($questions, $pag[\"offset\"], $pag[\"length\"], true),\n \"pag\" => $pag,\n ]);\n return $pageRender->renderPage([\"title\" => $title]);\n }", "function _getRegistrations($queryParameters){\n\t\t//echo \"get attendees in api 32\";\n // @TODO handle $_GET parameters, specifically allowing for ORs, and LIKE\n\t\tif(!empty($queryParameters))\n\t\t\t$whereSql=\"WHERE \".implode(\" AND \",$this->constructSQLWhereSubclauses($queryParameters));\n\t\telse\n\t\t\t$whereSql='';\n global $wpdb;\n $sql=\"\n SELECT\n *\n FROM\n {$wpdb->prefix}events_detail\n\t\t\t$whereSql\";\n $results=$wpdb->get_results($sql,ARRAY_A);\n return array(\"registrations\"=>$results);\n }", "public function testWebinarRegistrantStatus()\n {\n }", "public function actionRegistrationList() {\n $userCounter = new СountRegisteredUsers();\n $userCounter->getAllUserForDays();\n $userCounter->getNonActiveUsersForDays();\n\n $dayDate = new DateTime();\n\n // TODO registration\n\n $registrationsByDay = [];\n for($i = 0; $i<30; $i++) {\n $day = date_format($dayDate, 'Y-m-d');\n $registrationsByDay[$day]['period'] = $day;\n $registrationsByDay[$day]['totalRegistrations'] = isset($userCounter->totalRegistrations[$day]) ? $userCounter->totalRegistrations[$day] : 0;\n $registrationsByDay[$day]['totalPersonals'] = isset($userCounter->totalPersonals[$day]) ? $userCounter->totalPersonals[$day] : 0;\n $registrationsByDay[$day]['totalCorporate'] = isset($userCounter->totalCorporate[$day]) ? $userCounter->totalCorporate[$day] : 0;\n $registrationsByDay[$day]['totalNonActivePersonals'] = isset($userCounter->totalNonActivePersonals[$day]) ? $userCounter->totalNonActivePersonals[$day] : 0;\n $registrationsByDay[$day]['totalNonActiveCorporate'] = isset($userCounter->totalNonActiveCorporate[$day]) ? $userCounter->totalNonActiveCorporate[$day] : 0;\n\n $dateInterval = new DateInterval('P1D');\n $dateInterval->invert = 1;\n $dayDate->add($dateInterval);\n }\n\n // getting registration by month\n $userCounter = new СountRegisteredUsers();\n $userCounter->getAllUserForMonths();\n $userCounter->getNonActiveUsersForMonths();\n\n $dayDate = new DateTime();\n\n $registrationsByMonth = [];\n for($i = 0; $i<12; $i++) {\n $day = date_format($dayDate, 'F');\n $registrationsMonth[$day]['period'] = $day;\n $registrationsMonth[$day]['totalRegistrations'] = isset($userCounter->totalRegistrations[$day]) ? $userCounter->totalRegistrations[$day] : 0;\n $registrationsMonth[$day]['totalPersonals'] = isset($userCounter->totalPersonals[$day]) ? $userCounter->totalPersonals[$day] : 0;\n $registrationsMonth[$day]['totalCorporate'] = isset($userCounter->totalCorporate[$day]) ? $userCounter->totalCorporate[$day] : 0;\n $registrationsMonth[$day]['totalNonActivePersonals'] = isset($userCounter->totalNonActivePersonals[$day]) ? $userCounter->totalNonActivePersonals[$day] : 0;\n $registrationsMonth[$day]['totalNonActiveCorporate'] = isset($userCounter->totalNonActiveCorporate[$day]) ? $userCounter->totalNonActiveCorporate[$day] : 0;\n\n $dateInterval = new DateInterval('P1M');\n $dateInterval->invert = 1;\n $dayDate->add($dateInterval);\n }\n\n // getting registration by year\n $userCounter = new СountRegisteredUsers();\n $userCounter->getAllUserForYears();\n $userCounter->getNonActiveUserForYears();\n\n $dayDate = new DateTime();\n\n $registrationsByYear = [];\n $day = date_format($dayDate, 'Y');\n $registrationsByYear[$day]['period'] = $day;\n $registrationsByYear[$day]['totalRegistrations'] = isset($userCounter->totalRegistrations[$day]) ? $userCounter->totalRegistrations[$day] : 0;\n $registrationsByYear[$day]['totalPersonals'] = isset($userCounter->totalPersonals[$day]) ? $userCounter->totalPersonals[$day] : 0;\n $registrationsByYear[$day]['totalCorporate'] = isset($userCounter->totalCorporate[$day]) ? $userCounter->totalCorporate[$day] : 0;\n $registrationsByYear[$day]['totalNonActivePersonals'] = isset($userCounter->totalNonActivePersonals[$day]) ? $userCounter->totalNonActivePersonals[$day] : 0;\n $registrationsByYear[$day]['totalNonActiveCorporate'] = isset($userCounter->totalNonActiveCorporate[$day]) ? $userCounter->totalNonActiveCorporate[$day] : 0;\n\n $registrationsByYearOld = [];\n $day--;\n $registrationsByYearOld[$day]['period'] = $day;\n $registrationsByYearOld[$day]['totalRegistrations'] = isset($userCounter->totalRegistrations[$day]) ? $userCounter->totalRegistrations[$day] : 0;\n $registrationsByYearOld[$day]['totalPersonals'] = isset($userCounter->totalPersonals[$day]) ? $userCounter->totalPersonals[$day] : 0;\n $registrationsByYearOld[$day]['totalCorporate'] = isset($userCounter->totalCorporate[$day]) ? $userCounter->totalCorporate[$day] : 0;\n $registrationsByYearOld[$day]['totalNonActivePersonals'] = isset($userCounter->totalNonActivePersonals[$day]) ? $userCounter->totalNonActivePersonals[$day] : 0;\n $registrationsByYearOld[$day]['totalNonActiveCorporate'] = isset($userCounter->totalNonActiveCorporate[$day]) ? $userCounter->totalNonActiveCorporate[$day] : 0;\n $this->layout = '//admin_area/layouts/admin_main';\n $this->render('/admin_area/pages/registrationCounterList',\n [\n 'registrationsByDay' => $registrationsByDay,\n 'registrationsByMonth' => $registrationsMonth,\n 'registrationsByYear' => $registrationsByYear,\n 'registrationsByYearOld' => $registrationsByYearOld,\n ]\n );\n }", "public function testGetSurveyQuestionChoices0()\n {\n }", "public function testGetSurveyQuestionChoices0()\n {\n }", "public function getRegistrants()\n {\n if (array_key_exists(\"registrants\", $this->_propDict)) {\n return $this->_propDict[\"registrants\"];\n } else {\n return null;\n }\n }", "public function submit_registration_2(RegistrationQuizSubmissionRequest $request) {\n\t\t$questionIds = $request->questionIds;\n\t\t$answerIds = $request->answerIds;\n\n\t\t/** @var User $user */\n\t\t$user = auth()->guard('api')->user();\n\n\t\t$user->age = $request->input('age');\n\t\t$user->gender = $request->input('gender');\n\t\t$user->save();\n\n\t\t$savedQuestions = $user->registration_questions()->orderBy('id')->get();\n\n\t\t$this->validateGeneratedQuestions($savedQuestions, $questionIds, $answerIds);\n\n\t\t$randomAlphaNumericString = randomAlphaNumericString(10);\n\t\t$user->registration_participation()->create([\n\t\t\t'token' => $randomAlphaNumericString,\n\t\t\t'selected' => 0,\n\t\t]);\n\n\t\t$this->deleteGeneratedQuestions($user);\n\n\t\treturn response()->json([\n\t\t\t'status' => true,\n\t\t\t'code' => 200,\n\t\t\t'message' => 'Success.',\n\t\t\t'registration_count' => $user->registration_participation()->count(),\n\t\t\t'registration_token' => $randomAlphaNumericString,\n\t\t]);\n\n\t}", "public function testQuestionSharev1questions()\n {\n\n }", "public function testCanDisplayTheAssessorRegistrationForm()\n {\n $response = $this->get('/assessors/register');\n\n $response->assertStatus(200);\n\n $response->assertViewIs('auth.register');\n }", "public function providertestRequest()\r\n {\r\n return array(array(\"list\",\"course\"),array(\"list\",\"teacher\"));\r\n }", "public function getQuestions()\n {\n return $this->questions;\n }" ]
[ "0.7154707", "0.60555196", "0.60346353", "0.5704522", "0.5638833", "0.5632243", "0.5621794", "0.5526942", "0.5455713", "0.54485816", "0.5391416", "0.53890324", "0.53485394", "0.53445524", "0.53413343", "0.53380704", "0.5323038", "0.5306515", "0.5293291", "0.5253302", "0.5230904", "0.5226102", "0.51825625", "0.51825625", "0.5177561", "0.5176155", "0.5156462", "0.51405275", "0.51341796", "0.51337445" ]
0.7223803
0
Test case for webinarStatus Update Webinar Status.
public function testWebinarStatus() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarUpdate()\n {\n }", "public function testWebinarPollUpdate()\n {\n }", "public function testWebinarRegistrantStatus()\n {\n }", "public function update_status();", "function update_status()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t\n\t\tif(!empty($data['t']) && !empty($data['list'])) $response = $this->_tender->update_status($data['t'], explode('--',$data['list']));\n\t\t\n\t\t# all good\n\t\tif(!empty($response) && $response['boolean']){\n\t\t\t$data['msg'] = 'The Invitation for Bids/Quotations status has been updated.';\n\t\t\t$data['area'] = 'refresh_list_msg';\n\t\t} \n\t\t# there was an error\n\t\telse {\n\t\t\t$data['msg'] = (!empty($data['t']) && !empty($data['list']))? 'ERROR: There was an error updating the Invitation for Bids/Quotations status.': 'ERROR: This action can not be resolved';\n\t\t\t$data['area'] = 'basic_msg';\n\t\t}\n\t\t\n\t\t$this->load->view('addons/basic_addons', $data);\n\t}", "public function testWebinarRegistrantQuestionUpdate()\n {\n }", "public function executeChangePracticeAreaStatus(sfWebRequest $request)\n {\n\t\tif(clsCommon::chkDataExist(\"WebsitePracticeArea\", $request->getParameter('id'), $this->getUser()->getAttribute('personalWebsiteId')))\n\t\t{\n\t\t\t$snId \t\t= \t$request->getParameter('id');\n\t\t\t$ssStatus \t= \t$request->getParameter('status');\n\t\t\t$oWebsitePracticeArea = new WebsitePracticeArea();\n\t\t\t$oWebsitePracticeArea->changeStatus($snId, $ssStatus);\n\n\t\t\tif($ssStatus == sfConfig::get(\"app_Status_Active\"))\n\t\t\t$successMessage = \"active\";\n\t\t\telse\n\t\t\t$successMessage = \"inactive\";\n\n\t\t\t$this->getUser()->setFlash(\"succMsg\",'Status successfully changed to '.$successMessage.'.');\n\n\t\t\t$this->redirect('WebsitePracticeArea/index');\n }\n else\n\t\t{\n\t\t\t$this->getUser()->setFlash(\"errMsg\",sfConfig::get('app_Permission_Message'));\n\t\t\t$this->redirect('default/index');\n\t\t}\n }", "function update_organiser_status(){\r\n\t\t$this->organiser_model->update_organiser_status($_POST['status'],$_POST['organiser_id']);\r\n\t\t$this->send_status_email($_POST['status'],$_POST['organiser_id']);\r\n\t\techo \"1\";exit;\r\n\t}", "public function testcall(){\n self::updateUserStatus(2,2);\n }", "function updateStatus(){\n\t\t$this->setPost();\n\n\t\t$postData = $_POST;\n\n\t\tif($postData->status_id == 1){\n\t\t\t$updateData = array('status_id' => 2);\n\t\t}else{\n\t\t\t$updateData = array('status_id' => 1);\n\t\t}\n\n\t\t$where = array('id' => $postData->id);\n\n\t\t$result = $this->base_model->updateCommon($this->primaryTable, $updateData, $where);\n\n\t\t$response = array('status' => TRUE, 'message' => 'Document status updated successfully.');\n\n\t\techo json_encode($response);\n\t}", "public function updateStatus($params)\r\n {\r\n }", "public function updateUrgencyStatuses() {\n\n\n $deadlineOverdue = date('Y-m-d H:i:s', strtotime('-' . Configure::read('TICKET.OVERDUE_DAYS') . ' days'));\n $overdueTickets = $this->getPendingTicketsByAge($deadlineOverdue);\n\n foreach ($overdueTickets as $i => $overdueTicket) {\n\n $this->id = $overdueTicket['Ticket']['ticket_id'];\n $overdueTicket['Ticket']['status'] = 'Overdue';\n $this->save($overdueTicket, array('validate' => false, 'modified' => false, 'callbacks' => false));\n }\n\n\n $deadlineUrgend = date('Y-m-d H:i:s', strtotime('-' . Configure::read('TICKET.URGEND_DAYS') . ' days'));\n $urgendTickets = $this->getPendingTicketsByAge($deadlineUrgend, array('New', 'Requested'));\n\n foreach ($urgendTickets as $i => $urgendTicket) {\n\n $this->id = $urgendTicket['Ticket']['ticket_id'];\n $urgendTicket['Ticket']['status'] = 'Urgend';\n $this->save($urgendTicket, array('validate' => false, 'modified' => false, 'callbacks' => false));\n }\n\n }", "public function updateCommunityMemberStatus() {\n $community_id = $this->request->params ['named'] ['community_id'];\n $community_owner = $this->Community->find('first', array(\n 'conditions' => array('Community.id' => $community_id),\n 'fields' => array('Community.created_by')\n ));\n $community_owner = $community_owner['Community']['created_by'];\n $user_id = $this->request->params ['named'] ['user_id'];\n $status = $this->request->params ['named'] ['status'];\n $current_user = $this->Auth->user('id');\n $conditions = array(\n 'CommunityMember.user_id' => $user_id,\n 'CommunityMember.community_id' => $community_id\n );\n $current_user_type = $this->CommunityMember->getCommunityMemberUserType($community_id, $current_user);\n if ($this->CommunityMember->hasAny($conditions) && $current_user_type >= CommunityMember::USER_TYPE_ADMIN) {\n $communityMemberRecordId = $this->CommunityMember->find('first', array(\n 'conditions' => $conditions,\n 'fields' => array('CommunityMember.id')\n ));\n $communityMemberRecordId = $communityMemberRecordId['CommunityMember']['id'];\n $requested_user = $this->User->getUserDetails($user_id);\n $requested_user['user_name'] = Common::getUsername($requested_user['user_name'], $requested_user['first_name'], $requested_user['last_name']);\n switch ($status) {\n case 'add':\n //setting staus to Approved.\n\t\t\t\t\t$set_status = 1;\n\t\t\t\t\t$updateCommunityMember = array(\n\t\t\t\t\t\t'CommunityMember' => array(\n\t\t\t\t\t\t\t'id' => $communityMemberRecordId,\n\t\t\t\t\t\t\t'status' => $set_status,\n\t\t\t\t\t\t\t'joined_on' => Date::getCurrentDateTime()\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t\t$this->CommunityMember->save($updateCommunityMember);\n\n\t\t\t\t\t//Community follow data\n\t\t\t\t\t$followCommunityData = array(\n\t\t\t\t\t\t'type' => FollowingPage::COMMUNITY_TYPE,\n\t\t\t\t\t\t'page_id' => $community_id,\n\t\t\t\t\t\t'user_id' => $user_id,\n\t\t\t\t\t\t'notification' => FollowingPage::NOTIFICATION_ON\n\t\t\t\t\t);\t\t\t\t\t\n\t\t\t\t\t$this->FollowingPage->followPage($followCommunityData);\n\n\t\t\t\t\t$updated_member_count = $this->Community->changeMemberCount($community_id, 1);\n\t\t\t\t\t$result_message = $requested_user['user_name'] . \" has been added as a member to the community.\";\n\t\t\t\t\t$result = array(\n\t\t\t\t\t\t'success' => 'success',\n\t\t\t\t\t\t'member_count' => $updated_member_count,\n\t\t\t\t\t\t'message' => $result_message\n\t\t\t\t\t);\n break;\n case 'ignore':\n //Reject the request. Delete the entry from table.\n\t\t\t\t\tif ($this->CommunityMember->delete($communityMemberRecordId)) {\n\t\t\t\t\t\t//Community unfollow data\n\t\t\t\t\t\t$followCommunityData = array(\n\t\t\t\t\t\t\t'type' => FollowingPage::COMMUNITY_TYPE,\n\t\t\t\t\t\t\t'page_id' => $community_id,\n\t\t\t\t\t\t\t'user_id' => $user_id\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->FollowingPage->unFollowPage($followCommunityData);\n\n\t\t\t\t\t\t$result_message = $requested_user['user_name'] . \" is denied from joining the community.\";\n\t\t\t\t\t\t$result = array(\n\t\t\t\t\t\t\t'success' => 'success',\n\t\t\t\t\t\t\t'message' => $result_message\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n case 'update_admin':\n //update member type to admin or remove the existing secondary admin\n if ($community_owner == $current_user && $user_id != $community_owner) {\n $memberTypeNow = $this->CommunityMember->getCommunityMemberUserType($community_id, $user_id);\n if ($memberTypeNow == CommunityMember::USER_TYPE_MEMBER) {\n $setMemberType = CommunityMember::USER_TYPE_ADMIN;\n $result_message = \"You have set \" . $requested_user['user_name'] . \" as a secondary admin for this community.\";\n } else {\n $setMemberType = CommunityMember::USER_TYPE_MEMBER;\n $result_message = $requested_user['user_name'] . \" is removed from the secondary admin list of this community.\";\n }\n $updateCommunityMember = array(\n 'CommunityMember' => array(\n 'id' => $communityMemberRecordId,\n 'user_type' => $setMemberType\n )\n );\n $this->CommunityMember->save($updateCommunityMember);\n $this->sendMailToNewSecondaryAdmin($community_id, $user_id, $setMemberType); //send mail to new added secondary admin.\n $result = array(\n 'success' => 'success',\n 'message' => $result_message\n );\n } else {\n $result = array(\n 'success' => 'danger',\n 'message' => 'Cannot change member type'\n );\n }\n break;\n default :\n $result = array(\n 'success' => 'danger',\n 'message' => 'invalid status'\n );\n break;\n exit;\n }\n } else {\n $result = array(\n 'success' => 'danger',\n 'message' => 'The user is not a member of the Community.'\n );\n }\n print_r(json_encode($result));\n exit;\n }", "function updateStatus(){\n $serv_ID=$this->uri->segment(3);\n $status=$this->input->post('status');\n if ($this->deliveryAndPickupModel->updateCustService($serv_ID, $status)) {\n echo \"<script>alert('Successfully Updated');window.location.href='\".site_url('deliveryAndPickupController/acceptServRequest/'.$serv_ID.'').\"';</script>\";\n }\n else\n {\n echo \"<script>alert('Something when wrong');window.location.href='\".site_url('deliveryAndPickupController/acceptServRequest/'.$serv_ID.'').\"';</script>\";\n }\n }", "function practice_status()\n {\n $query = \"UPDATE\n\t\t\t\t\t\" . $this->table_name . \"\n\t\t\t\tSET\n\t\t\t\t\tStatus = :status\n\t\t\t\tWHERE\n\t\t\t\t\tid = :id AND Viewer_ID = :vid\";\n\n $stmt = $this->conn->prepare($query);\n\t\t\n\t\t$stmt->bindParam(':status', $this->status);\n $stmt->bindParam(':id', $this->id);\n\t\t$stmt->bindParam(':vid', $this->Viewer_ID);\n\n // execute the query\n if ($stmt->execute()) {\n return true;\n } else {\n return false;\n }\n }", "public function changeStatus($u_status,$delivery_id){\n $sql=\"UPDATE `deliveries` SET `delivery_status`='$u_status' WHERE delivery_id='$delivery_id'\";\n $result=$this->conn->query($sql);\n if($result==true){\n header(\"location:delivery.php?success=1&message=You successfully updated the status.\");\n }else{\n header(\"location:delivery.php?success=0&message=Error occured in delivery table. Try it agin.\");\n }\n }", "public function testStatusConfirm()\n {\n\n }", "public function test_should_deliver_status() {\n\n\t\t$webhook = LLMS_REST_API()->webhooks()->create( array(\n\t\t\t'delivery_url' => 'https://mock.tld',\n\t\t\t'topic' => 'student.created',\n\t\t) );\n\n\t\t// Inactive.\n\t\t$this->assertFalse( LLMS_Unit_Test_Util::call_method( $webhook, 'should_deliver', array( array( $this->factory->student->create() ) ) ) );\n\n\t\t// Active.\n\t\t$webhook->set( 'status', 'active' )->save();\n\t\t$this->assertTrue( LLMS_Unit_Test_Util::call_method( $webhook, 'should_deliver', array( array( $this->factory->student->create() ) ) ) );\n\n\t}", "public function UserListChangeStatus(): void{\n \n if(!ArtworkVerifier::setStatusList($_POST) || !Session::isLogin()){\n exit;\n }\n \n if(isset(UserList::where('user_list.user_id', Session::getUser()['id'])->where('user_list.artwork_id', $_POST['artwork_id'])->getOne()->id)){\n UserList::values([ 'user_list.status' => $_POST['status'] ])\n ->where('user_id' ,Session::getUser()['id'])\n ->where('artwork_id', $_POST['artwork_id'])\n ->update();\n exit;\n }\n }", "public function travel_conditions_status() {\n\t\t$id = $this->uri->segment(4);\n\t\t$status = $this->uri->segment(5);\n\t\tCheckAdminLoginSession();\t\t\n\t\t$data['status'] = $status;\t\t\t\t \t \t\t \n\t\t$this->admin_model->setUpdateData($this->travel,$data,$id);\n\t\t$this->session->set_flashdata('message','Your status has been update successfully');\n\t\tredirect('admin/travel-conditions/lists','refresh');\t\t\n\t}", "public function status() {\n\t\t$id = $this->uri->segment(4);\n\t\t$status = $this->uri->segment(5);\n\t\tCheckAdminLoginSession();\t\t\n\t\t$data['status'] = $status;\t\t\t\t \t \t\t \n\t\t$this->admin_model->setUpdateData($this->policy_duration,$data,$id);\n\t\t$this->session->set_flashdata('message','Your status has been update successfully');\n\t\tredirect('admin/policy-duration/lists','refresh');\t\t\n\t}", "public function testWebinar()\n {\n }", "public function change_stories_status(){\r\r\n\t\tif ($this->checkLogin('A') == ''){\r\r\n\t\t\tredirect('admin');\r\r\n\t\t}else {\r\r\n\t\t\t$mode = $this->uri->segment(4,0);\r\r\n\t\t\t$user_id = $this->uri->segment(5,0);\r\r\n\t\t\t$status = ($mode == '0')?'UnPublish':'Publish';\r\r\n\t\t\t$newdata = array('status' => $status);\r\r\n\t\t\t$condition = array('id' => $user_id);\r\r\n\t\t\t$this->stories_model->update_details(STORIES,$newdata,$condition);\r\r\n\t\t\t$this->setErrorMessage('success','Stories Status Changed Successfully');\r\r\n\t\t\tredirect('admin/stories/display_stories_list');\r\r\n\t\t}\r\r\n\t}", "function updateStatus()\n\t{\n\t\t$this->setPost();\n\n\t\t$postData = $_POST;\n\n\t\tif ($postData->status_id == 1) {\n\t\t\t$updateData = array('status_id' => 2);\n\t\t} else {\n\t\t\t$updateData = array('status_id' => 1);\n\t\t}\n\n\t\t$where = array('id' => $postData->id);\n\n\t\t$result = $this->base_model->updateCommon($this->primaryTable, $updateData, $where);\n\n\t\t$response = array('status' => true, 'message' => 'Branch status updated successfully.');\n\n\t\techo json_encode($response);\n\t}", "function update_status()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\tif(!empty($data['t']) && !empty($data['list'])) $result = $this->_bid->update_status($data['t'], explode('--',$data['list']));\n\t\t\n\t\t$data['msg'] = !empty($result['boolean']) && $result['boolean']? 'The bid status has been changed.': 'ERROR: The bid status could not be changed.';\n\t\t\n\t\t$data['area'] = 'refresh_list_msg';\n\t\t$this->load->view('addons/basic_addons', $data);\n\t}", "public function updateStatus()\n {\n $data = request()->validate([\n 'estimate' => 'required|exists:estimates,estimate_id',\n 'status_id' => 'required|integer|exists:statuses,id',\n ]);\n\n $estimate = Estimate::where('estimate_id', $data['estimate'])->firstOrFail();\n $estimate->update(['status_id' => $data['status_id']]);\n\n return redirect()->route('admin.estimates.index')->with([\n 'alertType' => 'success',\n 'alertMessage' => 'Le statut a bien été mis à jour',\n ]);\n }", "public function testWebinarPolls()\n {\n }", "public function updateStatus() {\n $ref = ORM::forTable('referrals')\n ->findOne($this->data['id']);\n if ($this->data['status'] == 'Assigned' && $this->data['route_id']) {\n $route = ORM::forTable('estimate_routes')\n ->findOne($this->data['route_id']);\n $assignedReferralsCount = ORM::forTable('referrals')\n ->select('id')\n ->where('route_id', $route->id)\n ->count();\n $ref->route_id = $this->data['route_id'];\n $ref->status = 'Assigned';\n $ref->route_order = $assignedReferralsCount;\n\n } elseif ($this->data['status'] == 'Pending') {\n $ref->status = 'Pending';\n $ref->route_order = 0;\n $ref->route_id = NULL;\n } else {\n $ref->status = $this->data['status'];\n }\n if ($ref->save()) {\n $this->renderJson([\n 'success' => true,\n 'message' => 'Job request status updated successfully'\n ]);\n } else {\n $this->renderJson([\n 'success' => false,\n 'message' => 'An error has occurred while saving job request'\n ]);\n }\n }", "public function testUpdate()\n {\n\n // $payment = $this->payment\n // ->setEvent($this->eventId)\n // ->acceptCash()\n // ->acceptCheck()\n // ->acceptGoogle()\n // ->acceptInvoice()\n // ->acceptPaypal()\n // ->setCashInstructions($instructions)\n // ->setCheckInstructions($instructions)\n // ->setInvoiceInstructions($instructions)\n // ->setGoogleMerchantId($this->googleMerchantId)\n // ->setGoogleMerchantKey($this->googleMerchantKey)\n // ->setPaypalEmail($this->paypalEmail)\n // ->update();\n\n // $this->assertArrayHasKey('process', $payment);\n // $this->assertArrayHasKey('status', $payment['process']);\n // $this->assertTrue($payment['process']['status'] == 'OK');\n }", "public function updateStatuses()\n {\n $affected = DB::update('UPDATE los_orders SET status_code=1 WHERE status_code=0 AND order_date IN (SELECT provide_date FROM los_lunchdates WHERE orders_placed IS NOT NULL)');\n $affected = DB::update('UPDATE los_orders SET status_code=0 WHERE status_code=1 AND order_date IN (SELECT provide_date FROM los_lunchdates WHERE orders_placed IS NULL)');\n }" ]
[ "0.7402796", "0.7066509", "0.6592195", "0.65656424", "0.614286", "0.6069463", "0.6058696", "0.59344006", "0.5911069", "0.5883186", "0.5882107", "0.58265615", "0.5811445", "0.5768166", "0.5738013", "0.5712161", "0.569947", "0.568407", "0.56723994", "0.56482786", "0.5633261", "0.56320846", "0.56204545", "0.5619602", "0.56175125", "0.56159323", "0.56117266", "0.5594314", "0.55940014", "0.5589019" ]
0.7082255
1
Test case for webinarUpdate Update a Webinar.
public function testWebinarUpdate() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarPollUpdate()\n {\n }", "public function testWebinarRegistrantQuestionUpdate()\n {\n }", "public function update($meeting)\n {\n\n }", "public function test_update() {\n global $DB;\n\n self::setAdminUser();\n $this->resetAfterTest(true);\n\n // Save new outage.\n $now = time();\n $outage = new outage([\n 'autostart' => false,\n 'warntime' => $now - 60,\n 'starttime' => 60,\n 'stoptime' => 120,\n 'title' => 'Title',\n 'description' => 'Description',\n ]);\n $outage->id = outagedb::save($outage);\n self::$outage = $outage;\n\n self::$outage->starttime += 10;\n outagedb::save(self::$outage);\n\n // Should still exist.\n $event = $DB->get_record_select(\n 'event',\n \"(eventtype = 'auth_outage' AND instance = :idoutage)\",\n ['idoutage' => self::$outage->id],\n 'id',\n IGNORE_MISSING\n );\n self::assertTrue(is_object($event));\n self::assertSame(self::$event->id, $event->id);\n self::$event = $event;\n }", "public function testDeveloperUpdate()\n {\n $developer = factory(Developer::class)->create();\n $response = $this->get('/developer/update?id=' . $developer->id);\n $response->assertStatus(200);\n }", "public function testUpdateSurvey()\n {\n $survey = Survey::factory()->create();\n\n $response = $this->json('PATCH', \"survey/{$survey->id}\", [\n 'survey' => ['epilogue' => 'epilogue your behind']\n ]);\n\n $response->assertStatus(200);\n $this->assertDatabaseHas('survey', ['id' => $survey->id, 'epilogue' => 'epilogue your behind']);\n }", "public function testUpdate()\n {\n\n // $payment = $this->payment\n // ->setEvent($this->eventId)\n // ->acceptCash()\n // ->acceptCheck()\n // ->acceptGoogle()\n // ->acceptInvoice()\n // ->acceptPaypal()\n // ->setCashInstructions($instructions)\n // ->setCheckInstructions($instructions)\n // ->setInvoiceInstructions($instructions)\n // ->setGoogleMerchantId($this->googleMerchantId)\n // ->setGoogleMerchantKey($this->googleMerchantKey)\n // ->setPaypalEmail($this->paypalEmail)\n // ->update();\n\n // $this->assertArrayHasKey('process', $payment);\n // $this->assertArrayHasKey('status', $payment['process']);\n // $this->assertTrue($payment['process']['status'] == 'OK');\n }", "public function testD_update() {\n\n $fname = self::$generator->firstName();\n $lname = self::$generator->lastName;\n\n $resp = $this->wrapper->update( self::$randomEmail, [\n 'FNAME' => $fname,\n 'LNAME' => $lname\n ]);\n\n $this->assertObjectHasAttribute('id', $resp);\n $this->assertObjectHasAttribute('merge_fields', $resp);\n\n $updated = $resp->merge_fields;\n\n $this->assertEquals($lname, $updated->LNAME);\n\n }", "public function testSuccessfulInstructorUpdate() {\n try {\n $updatedInstructor = UserManagementController::updateInstructorProfile(self::USERNAME,self::PASSWORD ,self::EMAIL\n ,self::FIRSTNAME,self::LASTNAME,$this->project->getProjectJnName()\n ,self::IS_OWNER,$this->institution->getAbbreviation(),self::IDENTIFICATION);\n\n $this->assertNotNull($updatedInstructor, \"The updated instructor is null\");\n $this->assertEquals($this->userTypeEnum->INSTRUCTOR, $updatedInstructor->getType(), \"The updated user is not\n an instance of INSTRUCTOR\");\n\n $InstructorInstitution = PersistentUserXInstitutionPeer::retrieveByPk($updatedInstructor->getUserId(),\n $this->institution->getInstitutionId());\n $this->assertNotNull($InstructorInstitution, \"The user x institution relation was not created for the instructor.\");\n $this->assertEquals(self::IDENTIFICATION, $InstructorInstitution->getIdentification(), \"The Instructor school\n identification is incorrect\");\n $this->assertEquals($updatedInstructor->getUserId(), $InstructorInstitution->getUserId(), \"The user id is\n incorrect on user x institution for the instructor\");\n $this->assertEquals($this->institution->getInstitutionId(), $InstructorInstitution->getInstitutionId(),\n \"The institution id is incorrect on user x institution for the instructor\");\n\n $instXProjec = PersistentUserXProjectPeer::retrieveByPK($updatedInstructor->getJnUsername(),\n $this->project->getProjectJnName());\n $this->assertNotNull($instXProjec, \"The relationship between instructor and project was not created\");\n $this->assertEquals($this->project->getProjectJnName(), $instXProjec->getProjectJnName(), \"The project name\n is incorrect on user x project\");\n $this->assertEquals($updatedInstructor->getJnUsername(), $instXProjec->getJnUsername(), \"The java.net\n username is incorrect on user x project for instructor\");\n $this->assertTrue($instXProjec->getIsOwner() == 1, \"The instructor is the owner of project.\");\n\n } catch (InfinityMetricsException $ime){\n $this->fail(\"The successful update of profile failed: \" . $ime);\n }\n\n }", "public function updated(Instructor $instructor)\n {\n //\n }", "public function testUpdate()\n {\n // Test with correct field name\n $this->visit('/cube/1')\n ->type('3', 'x')\n ->type('3', 'y')\n ->type('3', 'z')\n ->type('1', 'value')\n ->press('submit-update')\n ->see('updated successfully');\n\n /*\n * Tests with incorrect fields\n */\n // Field required\n $this->visit('/cube/1')\n ->press('submit-update')\n ->see('is required');\n\n // Field must be integer\n $this->visit('/cube/1')\n ->type('1a', 'x')\n ->press('submit-update')\n ->see('integer');\n\n // Field value very great\n $this->visit('/cube/1')\n ->type('1000000000', 'y')\n ->press('submit-update')\n ->see('greater');\n }", "public function test_update_item() {}", "public function test_update_item() {}", "function update() {\n\t\t$vars = $this->params['url'];\n\t\t$this->Event->id = $vars['id'];\n\t\t$this->Event->saveField('start', $vars['start']);\n\t\t$this->Event->saveField('end', $vars['end']);\n\t\t$this->Event->saveField('all_day', $vars['allday']);\n\t}", "public function update(Request $request, InterviewStatistic $interviewStatistic)\n {\n //\n }", "public function testUpdateVendorComplianceSurvey()\n {\n }", "public function testIntegrationUpdate()\n {\n $userFaker = factory(Model::class)->create();\n $this->visit('user/' . $userFaker->slug . '/edit')\n ->type('Foo bar', 'name')\n ->type('Foobar', 'username')\n ->type('foo@bar.com', 'email')\n ->type('foobar123', 'password')\n ->type('foobar123', 'password_confirmation')\n ->press('Save')\n ->seePageIs('user');\n $this->assertResponseOk();\n $this->seeInDatabase('users', [\n 'username' => 'Foobar',\n 'email' => 'foo@bar.com'\n ]);\n $this->assertViewHas('models');\n }", "public function testUpdate()\n\t{\n\t\t$params = $this->setUpParams();\n\t\t$params['title'] = 'some tag';\n\t\t$params['slug'] = 'some-tag';\n\t\t$response = $this->call('PUT', '/'.self::$endpoint.'/'.$this->obj->id, $params);\n\t\t$this->assertEquals(200, $response->getStatusCode());\n\t\t$result = $response->getOriginalContent()->toArray();\n\n\t\t// tes apakah hasil return adalah yang sesuai\n\t\tforeach ($params as $key => $val) {\n\t\t\t$this->assertArrayHasKey($key, $result);\n\t\t\tif (isset($result[$key])&&($key!='created_at')&&($key!='updated_at'))\n\t\t\t\t$this->assertEquals($val, $result[$key]);\n\t\t}\n\n\t\t// tes tak ada yang dicari\n\t\t$response = $this->call('GET', '/'.self::$endpoint.'/696969', $params);\n\t\t$this->assertEquals(500, $response->getStatusCode());\n\t}", "function updateWebinar($webinarKey, $payloadArray, $sendNotification = true)\n {\n ($sendNotification) ? $parameters = ['notifyParticipants' => true] : $parameters = ['notifyParticipants' => false];\n\n $path = $this->getPathRelativeToOrganizer(sprintf('webinars/%s', $webinarKey));\n\n $webinarObject = new WebinarEntity($payloadArray);\n\n return $this->sendRequest('PUT', $path, $parameters, $payload = $webinarObject->toArray());\n }", "public function testUnitUpdate()\n {\n $input = [\n 'username' => 'foo.bar',\n 'email' => 'foo@bar.com',\n 'password' => 'asdfg',\n 'password_confirmation' => 'asdfg',\n 'name' => 'foo bar'\n ];\n $request = Mockery::mock('Suitcoda\\Http\\Requests\\UserEditRequest[all]');\n $request->shouldReceive('all')->once()->andReturn($input);\n\n $model = Mockery::mock('Suitcoda\\Model\\User[save]');\n $model->shouldReceive('findOrFailByUrlKey')->once()->andReturn($model);\n $model->shouldReceive('save')->once();\n\n $user = new UserController($model);\n\n $this->assertInstanceOf('Illuminate\\Http\\RedirectResponse', $user->update($request, 1));\n }", "public function testUpdateAction()\n {\n $res = $this->controller->updateAction(\"1\");\n $this->assertContains(\"Update\", $res->getBody());\n }", "public function updated(Investor $investor)\n {\n //\n }", "public function testUpdate()\n {\n $data = array(\n 'foo' => 'baz'\n );\n\n $transaction = $this->client->transaction()->Update(654, $data);\n\n $this->assertEquals($data, get_object_vars($transaction->put), 'Passed variables are not correct');\n $this->assertEquals('PUT', $transaction->request_method, 'The PHP Verb Is Incorrect');\n $this->assertEquals('/transactions/654', $transaction->path, 'The path is incorrect');\n\n }", "public function test_it_updates_a_user()\n {\n $user = User::create(['email' => 'me@andrewhook.uk', 'given_name' => 'Andrew', 'family_name' => 'Hook']);\n\n $update = ['email' => 'andy@andrewhook.uk', 'given_name' => 'A', 'family_name' => 'H'];\n\n $this->json('PUT', sprintf('/users/%d', $user->id), $update)\n ->seeJson($update);\n }", "public function testExampleUpdateRequestShouldSucceed()\n {\n $example = Example::factory()->create();\n $response = $this->put(route('example.update', $example->id), [\n 'param1' => 100,\n 'param2' => 'Hello World',\n ]);\n $response->assertStatus(200);\n }", "public function testHandleUpdateSuccess()\n {\n // Populate data\n $dealerAccountID = $this->_populate();\n \n // Set params\n $params = $this->customDealerAccountData;\n \n // Add ID\n $ID = $this->_pickRandomItem($dealerAccountID);\n $params['ID'] = $ID;\n \n // Request\n $this->withSession($this->adminSession)\n ->call('POST', '/dealer-account/edit', $params, [], [], ['HTTP_REFERER' => '/dealer-account/edit']);\n \n // Validate response\n $this->assertRedirectedTo('/dealer-account/edit');\n $this->assertSessionHas('dealer-account-updated', '');\n \n // Validate data\n $dealerAccount = $this->dealer_account->getOne($ID);\n $this->assertEquals($dealerAccount->name, $this->customDealerAccountData['name']);\n $this->assertEquals($dealerAccount->branch_ID, $this->customDealerAccountData['branch_ID']);\n }", "public function update(Request $request, Meeting $meeting)\n {\n //\n }", "public function update(Request $request, Appointments $appointments)\n {\n //\n }", "public function testUpdate(): void { }", "public function update(Request $request, EventStarter $eventStarter)\n {\n\t\t\n\t\t$eventStarter->schedule_plan = $request->get('schedule_plan');\n\t\t$eventStarter->status = $request->get('status');\n\t\t$eventStarter->save();\n\n\n\t return redirect(route('detail-event', ['eventStarter' => $eventStarter->id]));\n }" ]
[ "0.73612994", "0.6821884", "0.6562233", "0.6452065", "0.64265007", "0.6362201", "0.6313415", "0.6226509", "0.6219833", "0.60943675", "0.6045985", "0.6031974", "0.6031974", "0.6027522", "0.5991147", "0.5972692", "0.59578246", "0.59480345", "0.59453034", "0.59413856", "0.5924573", "0.59210736", "0.5906127", "0.58821946", "0.58794975", "0.58515316", "0.58504605", "0.5848199", "0.58480036", "0.584564" ]
0.8108941
0
Test case for webinars List Webinars.
public function testWebinars() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWebinarPanelists()\n {\n }", "public function testListPastWebinarQA()\n {\n }", "public function list_wilayah()\n\t{\n\t\tif($this->is_login){\n\t\t\t$products = $this->M_region->getAll();\n\t\t\t// Set Response\n\t\t\t$this->response_code = 200;\n\t\t\t$this->response['status'] = TRUE;\n\t\t\t$this->response['data'] = $products;\n\t\t}\n\n\t\t// Run the Application\n\t\t$this->run(SECURED);\n\t}", "public function testListSites()\n {\n }", "public function testIndex()\n {\n $client = static::createClient();\n $crawler = $client->request('GET', '/');\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $this->assertCount(1, $crawler->filter('h1'));\n $this->assertEquals(1, $crawler->filter('html:contains(\"Trick List\")')->count());\n }", "function getAllWebinars($parameters = null)\n {\n $path = $this->getPathRelativeToOrganizer('webinars');\n\n return $this->sendRequest('GET', $path, $parameters, $payload = null);\n }", "function citrixonline_get_list_of_webinars($type = 0) \n {\n\t\tif(!$this->organizer_key or !$this->access_token)\n\t\t\treturn 0;\n\t\t\t\n\t\t$return_array = array();\n\t\t\n\t\t$reponse = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/upcomingWebinars?oauth_token=\".$this->access_token), true);\n\t\t\n\t\tif(isset($reponse['int_err_code']) and $reponse['int_err_code'] != '')\n\t\t{\n\t\t\t$this->set_access_token('');\n\t\t\t$this->set_organizer_key('');\t\t\t\t\n\t\t\tthrow new Exception($reponse['int_err_code']);\n\t\t}\n\t\t\n\t\t$return_array['upcoming']['webinars'] = $reponse;\n $return_array['upcoming']['status'] = true;\n\t\t\n\t\tif($type>0)\n\t\t{\n\t\t\t$reponse = json_decode($this->make_request(\"https://api.citrixonline.com/G2W/rest/organizers/\".$this->organizer_key.\"/historicalWebinars?oauth_token=\".$this->access_token), true);\n\t\t\t\t\t\t\n\t\t\tif(isset($reponse['int_err_code']) and $reponse['int_err_code'] != '')\n\t\t\t{\n\t\t\t\t$this->set_access_token('');\n\t\t\t\t$this->set_organizer_key('');\t\t\t\t\n\t\t\t\tthrow new Exception($reponse['int_err_code']);\n\t\t\t}\n\t\t\t\n\t\t\t$return_array['historical']['webinars'] = $reponse;\n\t\t\t$return_array['historical']['status'] = true;\n\t\t}\n\t\t\t\n return $return_array;\n\t}", "public function testListPastWebinarPollResults()\n {\n }", "public function testList()\n {\n $this->visit('/admin/school')\n ->see(SchoolCrudController::SINGLE_NAME);\n }", "public function guest_can_get_all_websites() {\n $response = $this->get('api/websites');\n $response->assertStatus(200);\n }", "public function testWebinarPanelistCreate()\n {\n }", "public function testListSiteContainers()\n {\n }", "public function testIndex()\n {\n // full list\n $response = $this->get(url('api/genre?api_token=' . $this->api_token));\n $response->assertStatus(200);\n $response->assertSeeText('Thriller');\n $response->assertSeeText('Fantasy');\n $response->assertSeeText('Sci-Fi');\n }", "public function test_list_how_do_you_hears()\n {\n $data = factory(HowDoYouHear::class)->create();\n $response = $this->get($this->url, $this->headers());\n $response->assertStatus(200);\n $response->assertJsonStructure(array_keys($data->toarray()), $data->toarray());\n $this->assertDatabaseHas($this->table, $data->toarray());\n }", "public function listing();", "function getUpcomingWebinars()\n {\n $path = $this->getPathRelativeToOrganizer('upcomingWebinars');\n\n return $this->sendRequest('GET', $path, $parameters = null, $payload = null);\n }", "public function testIndex()\n {\n $this->getBrowser()->\n getAndCheck('partenaire', 'index', '/partenaire/index', 404)\n ;\n }", "public function test_show_list_of_products()\n {\n $response = $this->getJson('/api/products');\n $response->assertStatus(200);\n }", "public function listar() {\n \t$lista_webs = Web::all();\n \treturn view('webs')\n \t\t->with('lista_webs',$lista_webs);\n }", "protected function _getLists() {\n\t\t/** @var Thrive_Dash_Api_WebinarJamStudio $api */\n\t\t$api = $this->getApi();\n\t\ttry {\n\t\t\t$lists = array();\n\t\t\t$webinars = $api->getUpcomingWebinars();\n\t\t\tforeach ( $webinars as $key => $item ) {\n\t\t\t\t$lists [] = array(\n\t\t\t\t\t'id' => $item['webinar_id'],\n\t\t\t\t\t'name' => $item['name']\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn $lists;\n\t\t} catch ( Thrive_Dash_Api_WebinarJamStudio_Exception $e ) {\n\t\t\t$this->_error = $e->getMessage();\n\n\t\t\treturn false;\n\t\t}\n\n\t}", "public function testGetAll()\n {\n $ret =\\App\\Providers\\ListsServiceProvider::getLists();\n \n $this->assertNotEmpty($ret);\n }", "function testListBuckets() {\n $this->get('/');\n $this->assertEqual(api_response::getInstance()->getCode(), 200);\n $this->assertText('/buckets/bucket[@id=\"test\"]/@id', 'test');\n }", "public function test_list()\n {\n $response = $this->get('/api/employees');\n\n $response->assertStatus(200);\n }", "public function testIndexTahun()\n\t{\n\t\t$response = $this->action('GET', 'TahunController@index');\n\t}", "public function testListPastWebinarFiles()\n {\n }", "private static function removeAllTestingWebinars(): void\n {\n foreach (self::$driverHandler->getWebinars() as $webinar) {\n if (str_starts_with($webinar->slug, 'test-')) {\n self::$driverHandler->removeWebinar($webinar->id);\n }\n }\n }", "public function testWebinarPolls()\n {\n }", "public function test_listIndexAction ( )\n {\n $params = array(\n 'event_id' => 1,\n 'action' => 'list',\n 'controller'=> 'scales',\n 'module' => 'default'\n );\n\n $urlParams = $this->urlizeOptions($params);\n $url = $this->url($urlParams);\n $this->dispatch($url);\n\n // assertions\n $this->assertModule($urlParams['module']);\n $this->assertController($urlParams['controller']);\n $this->assertAction($urlParams['action']);\n\n }", "public function testListPagination()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs(User::find(1))\n ->visit('admin/users')\n ->assertSee('Users Gestion')\n ->clickLink('3')\n ->assertSee('GreatRedactor');\n });\n }", "public function getMagentoWebsites();" ]
[ "0.635775", "0.6300158", "0.6266826", "0.61853427", "0.6053846", "0.5991229", "0.59525377", "0.59223324", "0.5878913", "0.5813563", "0.5790048", "0.57246953", "0.5714969", "0.5712513", "0.56930894", "0.5674928", "0.5632804", "0.5627633", "0.5627321", "0.56119186", "0.559497", "0.55930626", "0.55845904", "0.55688286", "0.5553756", "0.55341005", "0.5530284", "0.5523856", "0.55195713", "0.5516311" ]
0.7002258
0
Test for Directory::factory() The directory doesn't exist. Throws Kaili\DirectoryException because the provided directory doesn't exist.
public function test_factory_not_exist() { Directory::factory(ROOT.DS.'test_dir'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function should_throw_if_trying_to_build_on_non_existing_directory(): void\n {\n $this->expectException(\\InvalidArgumentException::class);\n new DirectorySnapshot(__DIR__ . '/not-existing');\n }", "private function ensureDirectory() {\n\t\tif (!is_dir($this -> directory)) {\n\t\t\tif (!mkdir($this -> directory)) {\n\t\t\t\tthrow new LatexException('Could not create directory ' . $this -> directory);\n\t\t\t}\n\t\t}\n\t}", "function createDirectoryIfNonExistent() {\n if (! file_exists($this->path)) {\n mkdir($this->path);\n }\n }", "private function createDir()\n {\n if ($this->dirCreated) {\n return;\n }\n\n $dir = $this->getDirFromStream($this->url);\n if (null !== $dir && !is_dir($dir)) {\n $this->errorMessage = null;\n set_error_handler(array($this, 'customErrorHandler'));\n $status = mkdir($dir, 0777, true);\n restore_error_handler();\n if (false === $status) {\n throw new \\UnexpectedValueException(sprintf('There is no existing directory at \"%s\" and its not buildable: '.$this->errorMessage, $dir));\n }\n }\n $this->dirCreated = true;\n }", "private function check_directory()\n\t{\n\t\tif (!is_dir(Kohana::config($this->type.'.cache_folder')))\n\t\t\tmkdir(Kohana::config($this->type.'.cache_folder'));\n\t}", "public function testInvalidArgumentExceptionIsThrownIfDirectoryIsNotReadableWhenCreatingProcedureLoader()\n {\n $this->setExpectedException('\\InvalidArgumentException');\n\n $procedureFactory = $this->getProcedureFactory();\n\n $procedureLoaderFactory = $this->getProcedureLoaderFactory($procedureFactory);\n $procedureLoaderFactory->createProcedureLoader('invalid/directory');\n }", "public function test_create_exists()\n {\n Directory::create(ROOT.DS.'application');\n }", "public function testOnNewDirectoryWithIllegalArgumentException() {\n\n $obj = new FileSystemStorageProvider($this->logger, $this->directory);\n\n try {\n\n $obj->onNewDirectory($this->doc1);\n } catch (Exception $ex) {\n\n $this->assertInstanceOf(IllegalArgumentException::class, $ex);\n $this->assertEquals(\"The document must be a directory\", $ex->getMessage());\n }\n }", "public function testCreateSubDirsWithExistingDirectory()\n {\n mkdir($this->dir.'56');\n $this->assertNotEmpty($this->hd->getHash());\n }", "protected function createDirectory() {}", "protected function isDirectory() {}", "public function testExists() {\n $testDirName = self::TEST_DIR . '/testExists';\n\n $handle = (new Directory($testDirName));\n\n mkdir($testDirName);\n $this->assertTrue($handle->exists());\n\n rmdir($testDirName);\n $this->assertFalse($handle->exists());\n }", "public function testLoadThrowsDataDirectoryNotFoundForNonExistingDir(): void\n {\n $dirname = 'nonexistent';\n $path = $this->getFullPath($dirname);\n $this->expectException(DataDirectoryNotFoundException::class);\n $this->expectExceptionExactMessage(\"Root folder $path was not found.\");\n\n $directoryDataLoader = $this->prepareDirectoryDataLoader();\n\n $directoryDataLoader->load($path, '/^.*\\..*$/');\n }", "public function testMakeDirectory()\n {\n $this->assertTrue(Storage::mkdir(self::$temp.DS.'created'));\n $this->assertTrue(is_dir(self::$temp.DS.'created'));\n }", "public function test_move_directory_exists()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT, false);\n }", "public function testEnsureExists() {\n $testDirName = self::TEST_DIR . '/testEnsureExists';\n\n (new Directory($testDirName))->ensureExists();\n\n $this->assertDirectoryExists($testDirName);\n }", "public function createDirectoriesIfTheyDontExist()\n\t{\n\t\t$directories = array(\n\t\t\t$this->getIntegrationDirectory(),\n\t\t\t$this->getProductsProcessingDirectory(),\n\t\t\t$this->getProductsProcessedDirectory(),\n\t\t\t$this->getStockProcessingDirectory(),\n\t\t\t$this->getStockProcessedDirectory()\n\t\t);\n\t\tforeach ($directories as $directory){\n\t\t\tif(!file_exists($directory)){\n\t\t\t\tmkdir($directory);\n\t\t\t}\n\t\t}\n\t}", "function mdl_create_directory_if_not_exists(string $dirname)\n{\n // Create the path directory if not exists\n if (!is_dir($dirname)) {\n mkdir($dirname, 0777, true);\n }\n}", "public function test_move_not_exists_dir()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT.DS.'not_exist');\n }", "public function testEmptyDirectory()\n {\n $directory = vfsStream::url('foo');\n $method = $this->makeMethodPublic('empty_directory');\n $method->invokeArgs($this->testModel, [$directory]);\n \n $this->assertFalse($this->mockFileUploadDir->hasChild('bar'));\n $this->assertFileExists(vfsStream::url('foo'));\n }", "protected static function checkForDirectoryToBeExisting($directory) {\n\t\tif (!file_exists($directory)) {\n\t\t\tthrow new Exception($directory . ' is not existing! 1287234117');\n\t\t}\n\t}", "public function testCreateDataCollectionFailsBecauseOfEmptyDirectory(): void\n {\n $path = __DIR__ . '/../../../fixtures/empty-directory';\n\n $this->expectException(RuntimeException::class);\n $this->expectExceptionMessage(sprintf('Directory \"%s/browsers\" was empty.', $path));\n\n $this->object->createDataCollection($path);\n }", "public function testDeleteDirectoryReturnFalseWhenNotADirectory()\n {\n mkdir(self::$temp.DS.'bar');\n file_put_contents(self::$temp.DS.'bar'.DS.'file.txt', 'Hello World');\n\n $this->assertFalse(Storage::rmdir(self::$temp.DS.'bar'.DS.'file.txt'));\n }", "public function testLoadThrowsDataDirectoryNotFoundForNonReadableDirectory(): void\n {\n $dirname = 'forbidden';\n $this->addDirectoryToVFS($dirname, 0);\n $path = $this->getFullPath($dirname);\n $this->expectException(DataDirectoryNotFoundException::class);\n $this->expectExceptionExactMessage(\"Root folder $path was not found.\");\n\n $directoryDataLoader = $this->prepareDirectoryDataLoader();\n\n $directoryDataLoader->load($path, '/^.*\\..*$/');\n }", "public function createDirectory($directory = null)\n {\n if (!empty($directory) && !file_exists($directory)) {\n if (!mkdir($directory, 0755, true)) {\n throw new \\Exception('Unable to create directory: ' . $directory);\n }\n }\n return $directory;\n }", "function check_directory($directory)\n{\n if (!Storage::exists($directory)) {\n Storage::makeDirectory($directory);\n }\n\n return $directory;\n}", "private function checkDirectory($directory, Output $output = null)\n {\n if (!is_dir($directory)) {\n if ($output != null) {\n $output->writeNewLine();\n $output->writeLine(\"Invalid folder ($directory) is given.\");\n $output->writeNewLine();\n }\n\n throw new \\Exception(\"Invalid folder ($directory) is given.\");\n }\n }", "public function testCacheFileDoesNotExistsAndDirectoryIsNotWritable()\n {\n $cacheFile = __DIR__ . '/non-writable-directory/router.cache';\n\n $this->expectException(RuntimeException::class);\n $this->expectExceptionMessage(sprintf(\n 'Route collector cache file directory `%s` is not writable',\n dirname($cacheFile)\n ));\n\n $responseFactoryProphecy = $this->prophesize(ResponseFactoryInterface::class);\n $callableResolverProphecy = $this->prophesize(CallableResolverInterface::class);\n\n $routeCollector = new RouteCollector($responseFactoryProphecy->reveal(), $callableResolverProphecy->reveal());\n $routeCollector->setCacheFile($cacheFile);\n }", "public function checkDir($directory)\n {\n if (!is_dir($directory)) {\n //Directory does not exist, so lets create it.\n mkdir($directory, 0755, true);\n }\n\n }", "public function testTypeIdentifiesDirectory()\n {\n mkdir(self::$temp.DS.'foo-dir');\n\n $this->assertSame('dir', Storage::type(self::$temp.DS.'foo-dir'));\n }" ]
[ "0.7088399", "0.6924278", "0.6888639", "0.68042946", "0.6631374", "0.6572095", "0.6568139", "0.6549179", "0.64917636", "0.6464703", "0.64470893", "0.64444333", "0.6375025", "0.63464355", "0.63353115", "0.63278794", "0.6325423", "0.6319147", "0.6303984", "0.6292826", "0.6269976", "0.62117875", "0.6208824", "0.6204837", "0.62011856", "0.6166056", "0.6144788", "0.61340123", "0.61208504", "0.6118696" ]
0.82290375
0
Test for Directory::create() The Directory already exist. Throws Exception because provided path is an already existent Directory
public function test_create_exists() { Directory::create(ROOT.DS.'application'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createDirectoryIfNonExistent() {\n if (! file_exists($this->path)) {\n mkdir($this->path);\n }\n }", "public function testExists() {\n $testDirName = self::TEST_DIR . '/testExists';\n\n $handle = (new Directory($testDirName));\n\n mkdir($testDirName);\n $this->assertTrue($handle->exists());\n\n rmdir($testDirName);\n $this->assertFalse($handle->exists());\n }", "protected function createDirectory() {}", "public function createDirectory()\n {\n $bReturn = $this->exists();\n if( !$bReturn && $this->_sPath->isValid() )\n {\n $bReturn = mkdir( (string)$this->_sPath, 0770, TRUE);\n if( $bReturn )\n {\n $this->_sPath->setValue( $this->getRealPath() );\n }\n }\n return $bReturn;\n }", "private static function createDirectory($path)\n {\n $success = true;\n\n if (! is_dir($path))\n $success = mkdir($path, 0700, true);\n\n if ($success === false)\n throw new RuntimeException(\"Could not create $path\");\n }", "private function checkFolderPathExist()\n {\n $folderPath = $this->getFolderPath();\n if (!file_exists($folderPath)) {\n mkdir($folderPath, 0777, true);\n }\n }", "public function testEnsureExists() {\n $testDirName = self::TEST_DIR . '/testEnsureExists';\n\n (new Directory($testDirName))->ensureExists();\n\n $this->assertDirectoryExists($testDirName);\n }", "private function checkPath($path)\r\n {\r\n if (!file_exists($path)) {\r\n mkdir($path, 0777, true);\r\n }\r\n }", "function check_dir_exists($dir,$create=false) {\n\n global $CFG; \n\n $status = true;\n if(!is_dir($dir)) {\n if (!$create) {\n $status = false;\n } else {\n umask(0000);\n $status = mkdir ($dir,$CFG->directorypermissions);\n }\n }\n return $status;\n }", "public function testCreateSubDirsWithExistingDirectory()\n {\n mkdir($this->dir.'56');\n $this->assertNotEmpty($this->hd->getHash());\n }", "public function createDirectoriesIfTheyDontExist()\n {\n $directories = array(\n $this->getNewSitemapPath(),\n $this->getExistingSitemapPath()\n );\n foreach ($directories as $directory){\n if(!file_exists($directory)){\n mkdir($directory);\n }\n }\n }", "private function ensureDirectoryExists($path)\n {\n if (!file_exists($path)) {\n mkdir($path, 0775, true);\n }\n }", "private function check_directory($path) {\n\t\tif (!@opendir($path)) {\n\t\t\tmkdir($path, 0755);\n\t\t} //if(!@opendir($path))\n\t\treturn;\n\t}", "private function createDir($path)\n {\n if (!is_dir($path)) {\n if (!mkdir($path, self::CHMOD, true)) {\n throw new Exception('unable to create path '.$path);\n }\n }\n }", "private function createPathIfNeeded($path)\n {\n if ( ! is_dir($path)) {\n if (false === @mkdir($path, 0777, true) && !is_dir($path)) {\n return false;\n }\n }\n\n return true;\n }", "public function test_factory_not_exist()\n {\n Directory::factory(ROOT.DS.'test_dir');\n }", "public function testMakeDirectory()\n {\n $this->assertTrue(Storage::mkdir(self::$temp.DS.'created'));\n $this->assertTrue(is_dir(self::$temp.DS.'created'));\n }", "private function createDir()\n {\n if ($this->dirCreated) {\n return;\n }\n\n $dir = $this->getDirFromStream($this->url);\n if (null !== $dir && !is_dir($dir)) {\n $this->errorMessage = null;\n set_error_handler(array($this, 'customErrorHandler'));\n $status = mkdir($dir, 0777, true);\n restore_error_handler();\n if (false === $status) {\n throw new \\UnexpectedValueException(sprintf('There is no existing directory at \"%s\" and its not buildable: '.$this->errorMessage, $dir));\n }\n }\n $this->dirCreated = true;\n }", "private function createDir($path)\n {\n if (!is_dir($path)) {\n $success = mkdir($path, 0775, true);\n if (!$success) {\n throw new \\Exception(\"Cannot create folder {$path}. Check file system permissions.\");\n }\n }\n }", "public function test_move_directory_exists()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT, false);\n }", "function mdl_create_directory_if_not_exists(string $dirname)\n{\n // Create the path directory if not exists\n if (!is_dir($dirname)) {\n mkdir($dirname, 0777, true);\n }\n}", "public function createDirectoriesIfTheyDontExist()\n\t{\n\t\t$directories = array(\n\t\t\t$this->getIntegrationDirectory(),\n\t\t\t$this->getProductsProcessingDirectory(),\n\t\t\t$this->getProductsProcessedDirectory(),\n\t\t\t$this->getStockProcessingDirectory(),\n\t\t\t$this->getStockProcessedDirectory()\n\t\t);\n\t\tforeach ($directories as $directory){\n\t\t\tif(!file_exists($directory)){\n\t\t\t\tmkdir($directory);\n\t\t\t}\n\t\t}\n\t}", "public function createFolderIfNotExisted($path)\n {\n if (!file_exists($path)) {\n mkdir($path);\n }\n }", "public function createDirectory()\n\t{\n\t\tif(is_dir($this->storagePath) and is_writable($this->storagePath)===false)\n\t\t{\n\t\t\tchmod($this->storagePath,$this->permissions);\n\t\t}\n\t\t\n\t\tif(is_dir($this->storagePath) and is_writable($this->storagePath))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tif(!is_dir($this->storagePath) and $this->createDir===true and mkdir($this->storagePath,$this->permissions,true))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tthrow new \\RuntimeException(\"Cannot to create the storage path:\".$this->storagePath);\n\t}", "public function mkdirIfNotExist($path=array())\n\t{\n\t\tforeach($path as $key=>$value)\n\t\t{\n\t\t\tif(file_exists($value) && is_dir($value)){\n\t\t\t}else{\n\t\t\t\tmkdir($value,0777);\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn true;\n\t}", "function check_create($name) {\n global $lsarray;\n if (!in_array($name, $lsarray)) { mkdir($name); return true; }\n else { echo \"Folder already exists: $name\".PHP_EOL; return false; }\n}", "private function mustCreateFolder(){\n }", "public function createDirectory($name, $path)\n {\n if (Directory::exists($this->disk, $path) && Directory::notExists($name, $this->disk, $path)) {\n Directory::createDirectory($name, $this->disk, $path );\n return Directory::metaDataOf(Path::normalize($path) . $name , $this->disk);\n }\n\n throw new DirectoryAlreadyExistsException();\n }", "public function createPath( $path ) {\n\t\tif ( !file_exists($path) || !is_dir($path) ) {\n\t\t\tif ( !mkdir( $path, 0777, true ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn $path;\n\t}", "public function testMkdir() {\n $testDirName = self::TEST_DIR . '/testMkdir';\n\n (new Directory($testDirName))->mkdir();\n\n $this->assertDirectoryExists($testDirName);\n }" ]
[ "0.803957", "0.738031", "0.7285328", "0.7276571", "0.7262561", "0.7183224", "0.71716", "0.705012", "0.70488226", "0.70256615", "0.69991064", "0.69938815", "0.6983108", "0.6961843", "0.69514316", "0.6939701", "0.6902881", "0.68776363", "0.6841167", "0.68147177", "0.68039656", "0.6802962", "0.67876834", "0.6785655", "0.67531645", "0.6743948", "0.6728339", "0.672519", "0.67141783", "0.66998243" ]
0.74785715
1
Test for Directory::rename() Create a new directory named test_dir and renames it as test_new_dir. At the end of the test, remove the created directory.
public function test_rename() { $object = Directory::create(ROOT.DS.'test_dir'); $object->rename('test_new_dir'); $this->assertEquals($object->get_base_name(), 'test_new_dir'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_rename_same_name()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->rename('test_dir');\n $this->assertEquals($object->get_base_name(), 'test_dir');\n }", "public function testMoveDirectoryMovesEntireDirectoryAndOverwrites()\n {\n mkdir(self::$temp.DS.'tmp4', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp4'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp4'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'nested'.DS.'baz.txt', '');\n\n mkdir(self::$temp.DS.'tmp5', 0777, true);\n file_put_contents(self::$temp.DS.'tmp5'.DS.'foo2.txt', '');\n file_put_contents(self::$temp.DS.'tmp5'.DS.'bar2.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp4', self::$temp.DS.'tmp5', true);\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'foo2.txt'));\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'bar2.txt'));\n $this->assertFalse(is_dir(self::$temp.DS.'tmp4'));\n }", "public function testMoveDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp2', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp2'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp2'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp2', self::$temp.DS.'tmp3');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_dir(self::$temp.DS.'tmp2'));\n }", "public function test_move_directory_exists()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT, false);\n }", "public function test_remove()\n {\n $path = ROOT.DS.'test_dir';\n $object = Directory::create($path);\n $object->remove($path);\n $this->assertFalse(is_dir($path));\n }", "public function testRename()\n {\n $oldFilename = static::$baseFile . '/fs/tmp.txt';\n $newFilename = static::$baseFile . '/fs/test/tmp.txt';\n\n file_put_contents($oldFilename, 'It works!');\n\n $this->assertTrue(rename($oldFilename, $newFilename));\n\n $this->assertFalse(file_exists($oldFilename));\n $this->assertTrue(file_exists($newFilename));\n }", "public function renameDirectory(DirectoryInterface $directory, string $newName): DirectoryInterface;", "public function testConstructSingleDirectory()\n {\n $filter = new FileRename($this->newDir);\n\n $this->assertEquals(\n [0 => [\n 'source' => '*',\n 'target' => $this->newDir,\n 'overwrite' => false,\n 'randomize' => false,\n ]],\n $filter->getFile()\n );\n $this->assertEquals($this->newDirFile, $filter($this->oldFile));\n $this->assertEquals('falsefile', $filter('falsefile'));\n }", "public function test_move()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(SYSTEM);\n $this->assertTrue(is_dir(SYSTEM.DS.'test_dir'));\n $this->assertFalse(is_dir(ROOT.DS.'test_dir'));\n $this->assertEquals($object->get_path(), SYSTEM.DS.'test_dir');\n }", "public function test_move_not_exists_dir()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT.DS.'not_exist');\n }", "function narrative_move_files($current_narrative_dir, $new_narrative_dir)\n{\n $file_scan = scandir($current_narrative_dir);\n foreach ($file_scan as $filecheck)\n {\n if ($filecheck != '.' && $filecheck != '..' && !is_dir($current_narrative_dir . $filecheck))\n {\n rename($current_narrative_dir . $filecheck, $new_narrative_dir . $filecheck);\n }\n }\n}", "public function testRenameFailure($newFilename)\n {\n $oldFilename = static::$baseFile . '/fs/tmp.txt';\n\n file_put_contents($oldFilename, 'It works!');\n $this->assertFalse(rename($oldFilename, $newFilename));\n }", "public function renameDir($curpath, $newname)\n {\n $filterSlug = new FrontZend_Filter_Slug();\n $newpath = strstr($newname, '/') || strstr($newname, DIRECTORY_SEPARATOR)\n ? $newname\n : substr($curpath, 0, strrpos($curpath, DIRECTORY_SEPARATOR)+1)\n . $filterSlug->filter($newname);\n\n $newfullpath = Media_Model_File::getFullPath($newpath);\n if (is_dir($newfullpath)) {\n throw new FrontZend_Exception('Já existe uma pasta com este nome');\n }\n\n $curfullpath = Media_Model_File::getFullPath($curpath);\n\n if (is_dir($curfullpath)) {\n if (rename($curfullpath, $newfullpath)) {\n try {\n $this->_renamePath($curpath, $newpath);\n return true;\n } catch(Exception $e) {\n rename($newfullpath, $curfullpath);\n throw $e;\n }\n\n };\n }\n return false;\n }", "private function renameDirectories(): void\n {\n //update directory names and update file created paths accordingly\n foreach ($this->dirsToRename as $dirPath) {\n $updateDirPath = $this->pathHelper->renamePathBasenameSingularOrPlural(\n $dirPath,\n $this->singularNamespacedName,\n $this->pluralNamespacedName\n );\n foreach ($this->filesCreated as $k => $filePath) {\n $this->filesCreated[$k] = str_replace($dirPath, $updateDirPath, $filePath);\n }\n }\n }", "public function testMkdir() {\n $testDirName = self::TEST_DIR . '/testMkdir';\n\n (new Directory($testDirName))->mkdir();\n\n $this->assertDirectoryExists($testDirName);\n }", "protected function createRealTestdir() {}", "public function renameDirNames($base_old_dir, $old_name, $base_new_dir, $new_name) {\n $paths = $this->_arrayDataFolders();\n\n foreach ($paths as $dir) {\n $basePath = WikiGlobalConfig::getConf($dir);\n $oldPath = \"$basePath/$base_old_dir/$old_name\";\n if (file_exists($oldPath)) {\n $newPath = \"$basePath/$base_new_dir/$new_name\";\n if ($base_old_dir !== $base_new_dir && !is_dir($newPath))\n mkdir($newPath, 0775, true);\n if (! rename($oldPath, $newPath))\n throw new Exception(\"renameProjectOrDirectory: Error mentre canviava el nom del projecte/carpeta a $dir.\");\n }\n }\n }", "public function rename($new_dirname, $overwrite)\n\t{\n\t\t$this->tossIfException();\n\t\t\n\t\tif (!$this->getParent()->isWritable()) {\n\t\t\tthrow new fEnvironmentException(\n\t\t\t\t'The directory, %s, can not be renamed because the directory containing it is not writable',\n\t\t\t\t$this->directory\n\t\t\t);\n\t\t}\n\t\t\n\t\t$info = fFilesystem::getPathInfo($new_dirname);\n\t\t\n\t\tif (!file_exists($info['dirname'])) {\n\t\t\tthrow new fProgrammerException(\n\t\t\t\t'The new directory name specified, %s, is inside of a directory that does not exist',\n\t\t\t\t$new_dirname\n\t\t\t);\n\t\t}\n\t\t\n\t\t// Make the dirname absolute\n\t\t$new_dirname = fDirectory::makeCanonical(realpath($new_dirname));\n\t\t\n\t\tif (file_exists($new_dirname)) {\n\t\t\tif (!is_writable($new_dirname)) {\n\t\t\t\tthrow new fEnvironmentException(\n\t\t\t\t\t'The new directory name specified, %s, already exists, but is not writable',\n\t\t\t\t\t$new_dirname\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (!$overwrite) {\n\t\t\t\t$new_dirname = fFilesystem::makeUniqueName($new_dirname);\n\t\t\t}\n\t\t} else {\n\t\t\t$parent_dir = new fDirectory($info['dirname']);\n\t\t\tif (!$parent_dir->isWritable()) {\n\t\t\t\tthrow new fEnvironmentException(\n\t\t\t\t\t'The new directory name specified, %s, is inside of a directory that is not writable',\n\t\t\t\t\t$new_dirname\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t\n\t\trename($this->directory, $new_dirname);\n\t\t\n\t\t// Allow filesystem transactions\n\t\tif (fFilesystem::isInsideTransaction()) {\n\t\t\tfFilesystem::rename($this->directory, $new_dirname);\n\t\t}\n\t\t\n\t\tfFilesystem::updateFilenameMapForDirectory($this->directory, $new_dirname);\n\t}", "protected function cleanupTestDirectory() {\n\t\tforeach ($this->filesToRemove as $file) {\n\t\t\tif (file_exists($this->testBasePath . $file)) {\n\t\t\t\tunlink($this->testBasePath . $file);\n\t\t\t}\n\t\t}\n\n\t\tforeach ($this->directoriesToRemove as $directory) {\n\t\t\tif (file_exists($this->testBasePath . $directory)) {\n\t\t\t\trmdir($this->testBasePath . $directory);\n\t\t\t}\n\t\t}\n\t}", "protected function tearDown()\n {\n $test_dirs = array(\n ROOT.DS.'test_dir',\n ROOT.DS.'test_new_dir',\n SYSTEM.DS.'test_dir',\n );\n foreach($test_dirs as $f){\n is_dir($f) and rmdir($f);\n }\n }", "public function testDeleteDirectory()\n {\n mkdir(self::$temp.DS.'foo');\n file_put_contents(self::$temp.DS.'foo'.DS.'file.txt', 'Hello World');\n\n Storage::rmdir(self::$temp.DS.'foo');\n\n $this->assertTrue(! is_dir(self::$temp.DS.'foo'));\n $this->assertTrue(! is_file(self::$temp.DS.'foo'.DS.'file.txt'));\n }", "public function testDeleteDirectory()\n {\n $this->createTestDirectories(\n array(\n '/artifacts/foo/12345',\n '/artifacts/foo/67890',\n )\n );\n\n $this->createTestFile( '/artifacts/foo/12345/bar.txt' );\n $this->createTestFile( '/artifacts/foo/67890/bar.txt' );\n $this->createTestFile( '/artifacts/foo/bar.txt' );\n $this->createTestFile( '/artifacts/bar.txt' );\n\n phpucFileUtil::deleteDirectory( PHPUC_TEST_DIR . '/artifacts' );\n\n $this->assertFileNotExists( PHPUC_TEST_DIR . '/artifacts' );\n }", "function rename_folder()\n\t{\n\t\t$new_name = trailingslashit($this->paths['fontdir']).$this->font_name;\n\t\t\n\t\t//delete folder and contents if they already exist\n\t\t$this->delete_folder($new_name);\n\t\n\t\trename($this->paths['tempdir'], $new_name);\n\t}", "public function testMoveRecursive() {\n $sourceDirName = self::TEST_DIR . '/testMoveRecursiveSource/hierachy1';\n $targetDirName = self::TEST_DIR . '/testMoveRecursiveTarget/hierachy1';\n\n mkdir(self::TEST_DIR . '/testMoveRecursiveSource/hierachy1', 0777, true);\n\n $directoryHandle = new Directory(self::TEST_DIR . '/testMoveRecursiveSource');\n\n $directoryHandle->move(new Directory(self::TEST_DIR . '/testMoveRecursiveTarget'));\n\n $this->assertDirectoryExists($targetDirName);\n $this->assertDirectoryNotExists(self::TEST_DIR . '/testMoveRecursiveSource');\n }", "public function testCopyDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::cpdir(self::$temp.DS.'tmp', self::$temp.DS.'tmp2');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt'));\n }", "public function moveDirectory(string $oldDirName, string $newDirName): MoveDirectory\n {\n return $this->addAction(new MoveDirectory($oldDirName, $newDirName));\n }", "public function moveDirectory($oldDirName, $newDirName)\n\t{\n\t\treturn $this->addAction(new MoveDirectory($oldDirName, $newDirName));\n\t}", "public function testDirnameReturnsDirectory()\n {\n file_put_contents(self::$temp.DS.'foo.txt', 'foo');\n\n $this->assertSame(self::$temp, Storage::dirname(self::$temp.DS.'foo.txt'));\n }", "public function testCleanDirectory()\n {\n mkdir(self::$temp.DS.'baz');\n file_put_contents(self::$temp.DS.'baz'.DS.'file.txt', 'Hello World');\n\n Storage::cleandir(self::$temp.DS.'baz');\n\n $this->assertTrue(is_dir(self::$temp.DS.'baz'));\n $this->assertTrue(! is_file(self::$temp.DS.'baz'.DS.'file.txt'));\n }", "function rename($old, $new = null) {\n \n if (!$new) {\n $new = $old;\n \t$old = $this->_file;\n }\n \n if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN' && (strtolower($old) == strtolower($new))) {\n \n $rand = sprintf('%s%s%s%s%s',\n dirname($old),\n DIRECTORY_SEPARATOR,\n microtime(),\n rand(1, 999),\n basename($old)\n );\n \n if (!@rename($old, $rand)) {\n Fire_Error::throwError(sprintf('Failed to temporary rename \"%s\".',\n $old\n ), __FILE__, __LINE__\n );\n }\n $old = $rand;\n }\n \n if (!@rename($old, $new)) {\n Fire_Error::throwError(sprintf('Failed to rename \"%s\" to \"%s\".',\n $old,\n $new\n ), __FILE__, __LINE__\n );\n } \n }" ]
[ "0.7675573", "0.6942143", "0.6803566", "0.66557056", "0.6410179", "0.63514674", "0.63316065", "0.6303983", "0.62753636", "0.6271949", "0.6264431", "0.6144328", "0.6107304", "0.6092823", "0.60601956", "0.6049897", "0.6024232", "0.60035455", "0.59846485", "0.59535265", "0.59388083", "0.59384656", "0.5845024", "0.58058167", "0.58050144", "0.57979053", "0.5794211", "0.5774315", "0.57674843", "0.5746615" ]
0.8054311
0
Test for Directory::rename() Create a new Directory named test_dir and renames it with the same name. At the end of the test, remove the created directory.
public function test_rename_same_name() { $object = Directory::create(ROOT.DS.'test_dir'); $object->rename('test_dir'); $this->assertEquals($object->get_base_name(), 'test_dir'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_rename()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->rename('test_new_dir');\n $this->assertEquals($object->get_base_name(), 'test_new_dir');\n }", "public function testMoveDirectoryMovesEntireDirectoryAndOverwrites()\n {\n mkdir(self::$temp.DS.'tmp4', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp4'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp4'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'nested'.DS.'baz.txt', '');\n\n mkdir(self::$temp.DS.'tmp5', 0777, true);\n file_put_contents(self::$temp.DS.'tmp5'.DS.'foo2.txt', '');\n file_put_contents(self::$temp.DS.'tmp5'.DS.'bar2.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp4', self::$temp.DS.'tmp5', true);\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'foo2.txt'));\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'bar2.txt'));\n $this->assertFalse(is_dir(self::$temp.DS.'tmp4'));\n }", "public function testMoveDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp2', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp2'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp2'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp2', self::$temp.DS.'tmp3');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_dir(self::$temp.DS.'tmp2'));\n }", "public function test_move_directory_exists()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT, false);\n }", "public function test_remove()\n {\n $path = ROOT.DS.'test_dir';\n $object = Directory::create($path);\n $object->remove($path);\n $this->assertFalse(is_dir($path));\n }", "public function testRename()\n {\n $oldFilename = static::$baseFile . '/fs/tmp.txt';\n $newFilename = static::$baseFile . '/fs/test/tmp.txt';\n\n file_put_contents($oldFilename, 'It works!');\n\n $this->assertTrue(rename($oldFilename, $newFilename));\n\n $this->assertFalse(file_exists($oldFilename));\n $this->assertTrue(file_exists($newFilename));\n }", "public function renameDirectory(DirectoryInterface $directory, string $newName): DirectoryInterface;", "public function test_move()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(SYSTEM);\n $this->assertTrue(is_dir(SYSTEM.DS.'test_dir'));\n $this->assertFalse(is_dir(ROOT.DS.'test_dir'));\n $this->assertEquals($object->get_path(), SYSTEM.DS.'test_dir');\n }", "public function testConstructSingleDirectory()\n {\n $filter = new FileRename($this->newDir);\n\n $this->assertEquals(\n [0 => [\n 'source' => '*',\n 'target' => $this->newDir,\n 'overwrite' => false,\n 'randomize' => false,\n ]],\n $filter->getFile()\n );\n $this->assertEquals($this->newDirFile, $filter($this->oldFile));\n $this->assertEquals('falsefile', $filter('falsefile'));\n }", "public function test_move_not_exists_dir()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT.DS.'not_exist');\n }", "private function renameDirectories(): void\n {\n //update directory names and update file created paths accordingly\n foreach ($this->dirsToRename as $dirPath) {\n $updateDirPath = $this->pathHelper->renamePathBasenameSingularOrPlural(\n $dirPath,\n $this->singularNamespacedName,\n $this->pluralNamespacedName\n );\n foreach ($this->filesCreated as $k => $filePath) {\n $this->filesCreated[$k] = str_replace($dirPath, $updateDirPath, $filePath);\n }\n }\n }", "public function testDeleteDirectory()\n {\n mkdir(self::$temp.DS.'foo');\n file_put_contents(self::$temp.DS.'foo'.DS.'file.txt', 'Hello World');\n\n Storage::rmdir(self::$temp.DS.'foo');\n\n $this->assertTrue(! is_dir(self::$temp.DS.'foo'));\n $this->assertTrue(! is_file(self::$temp.DS.'foo'.DS.'file.txt'));\n }", "public function testMkdir() {\n $testDirName = self::TEST_DIR . '/testMkdir';\n\n (new Directory($testDirName))->mkdir();\n\n $this->assertDirectoryExists($testDirName);\n }", "public function testDeleteDirectory()\n {\n $this->createTestDirectories(\n array(\n '/artifacts/foo/12345',\n '/artifacts/foo/67890',\n )\n );\n\n $this->createTestFile( '/artifacts/foo/12345/bar.txt' );\n $this->createTestFile( '/artifacts/foo/67890/bar.txt' );\n $this->createTestFile( '/artifacts/foo/bar.txt' );\n $this->createTestFile( '/artifacts/bar.txt' );\n\n phpucFileUtil::deleteDirectory( PHPUC_TEST_DIR . '/artifacts' );\n\n $this->assertFileNotExists( PHPUC_TEST_DIR . '/artifacts' );\n }", "protected function cleanupTestDirectory() {\n\t\tforeach ($this->filesToRemove as $file) {\n\t\t\tif (file_exists($this->testBasePath . $file)) {\n\t\t\t\tunlink($this->testBasePath . $file);\n\t\t\t}\n\t\t}\n\n\t\tforeach ($this->directoriesToRemove as $directory) {\n\t\t\tif (file_exists($this->testBasePath . $directory)) {\n\t\t\t\trmdir($this->testBasePath . $directory);\n\t\t\t}\n\t\t}\n\t}", "public function testRenameFailure($newFilename)\n {\n $oldFilename = static::$baseFile . '/fs/tmp.txt';\n\n file_put_contents($oldFilename, 'It works!');\n $this->assertFalse(rename($oldFilename, $newFilename));\n }", "protected function tearDown()\n {\n $test_dirs = array(\n ROOT.DS.'test_dir',\n ROOT.DS.'test_new_dir',\n SYSTEM.DS.'test_dir',\n );\n foreach($test_dirs as $f){\n is_dir($f) and rmdir($f);\n }\n }", "function narrative_move_files($current_narrative_dir, $new_narrative_dir)\n{\n $file_scan = scandir($current_narrative_dir);\n foreach ($file_scan as $filecheck)\n {\n if ($filecheck != '.' && $filecheck != '..' && !is_dir($current_narrative_dir . $filecheck))\n {\n rename($current_narrative_dir . $filecheck, $new_narrative_dir . $filecheck);\n }\n }\n}", "public function testCleanDirectory()\n {\n mkdir(self::$temp.DS.'baz');\n file_put_contents(self::$temp.DS.'baz'.DS.'file.txt', 'Hello World');\n\n Storage::cleandir(self::$temp.DS.'baz');\n\n $this->assertTrue(is_dir(self::$temp.DS.'baz'));\n $this->assertTrue(! is_file(self::$temp.DS.'baz'.DS.'file.txt'));\n }", "protected function createRealTestdir() {}", "public function testMoveRecursive() {\n $sourceDirName = self::TEST_DIR . '/testMoveRecursiveSource/hierachy1';\n $targetDirName = self::TEST_DIR . '/testMoveRecursiveTarget/hierachy1';\n\n mkdir(self::TEST_DIR . '/testMoveRecursiveSource/hierachy1', 0777, true);\n\n $directoryHandle = new Directory(self::TEST_DIR . '/testMoveRecursiveSource');\n\n $directoryHandle->move(new Directory(self::TEST_DIR . '/testMoveRecursiveTarget'));\n\n $this->assertDirectoryExists($targetDirName);\n $this->assertDirectoryNotExists(self::TEST_DIR . '/testMoveRecursiveSource');\n }", "function rename_folder()\n\t{\n\t\t$new_name = trailingslashit($this->paths['fontdir']).$this->font_name;\n\t\t\n\t\t//delete folder and contents if they already exist\n\t\t$this->delete_folder($new_name);\n\t\n\t\trename($this->paths['tempdir'], $new_name);\n\t}", "public function testDirnameReturnsDirectory()\n {\n file_put_contents(self::$temp.DS.'foo.txt', 'foo');\n\n $this->assertSame(self::$temp, Storage::dirname(self::$temp.DS.'foo.txt'));\n }", "public function test_mkdir_and_rmdir() {\n /**\n * Test creating a single directory\n */\n $dir = 'dir1';\n $uri = 'test://'.$dir;\n $path = $this->test_dir.'/'.$dir;\n\n mkdir($uri);\n $this->assertFileExists($path);\n rmdir($uri);\n $this->assertFileNotExists($path);\n\n /**\n * Test creating multiple directories recursively as needed\n */\n $dir = 'dir2/dir3/dir4';\n $uri = 'test://' . $dir;\n $path = $this->test_dir.'/'.$dir;\n\n mkdir($uri, 0777, true);\n\n $error_tripped = false;\n $this->assertFileExists($path);\n try {\n $return = rmdir('test://dir2');\n }\n catch (PHPUnit_Framework_Error $e) {\n $error_tripped = true;\n }\n\n $this->assertTrue($error_tripped, \"rmdir() on a non-empty directory should trigger an error.\");\n $this->assertTrue(wp_rmdir_recursive('test://dir2'));\n $this->assertFileNotExists($this->test_dir.'/dir2');\n }", "public function testCopyDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::cpdir(self::$temp.DS.'tmp', self::$temp.DS.'tmp2');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt'));\n }", "public function renameDir($curpath, $newname)\n {\n $filterSlug = new FrontZend_Filter_Slug();\n $newpath = strstr($newname, '/') || strstr($newname, DIRECTORY_SEPARATOR)\n ? $newname\n : substr($curpath, 0, strrpos($curpath, DIRECTORY_SEPARATOR)+1)\n . $filterSlug->filter($newname);\n\n $newfullpath = Media_Model_File::getFullPath($newpath);\n if (is_dir($newfullpath)) {\n throw new FrontZend_Exception('Já existe uma pasta com este nome');\n }\n\n $curfullpath = Media_Model_File::getFullPath($curpath);\n\n if (is_dir($curfullpath)) {\n if (rename($curfullpath, $newfullpath)) {\n try {\n $this->_renamePath($curpath, $newpath);\n return true;\n } catch(Exception $e) {\n rename($newfullpath, $curfullpath);\n throw $e;\n }\n\n };\n }\n return false;\n }", "public function testMakeDirectory()\n {\n $this->assertTrue(Storage::mkdir(self::$temp.DS.'created'));\n $this->assertTrue(is_dir(self::$temp.DS.'created'));\n }", "protected static function moveTemporaryDirs()\n {\n if (static::isCapsular()) {\n // Rename directories\n $original = static::getCacheDirs(false);\n foreach (static::getCacheDirs(true) as $i => $tmpDir) {\n \\Includes\\Utils\\FileManager::unlinkRecursive($tmpDir);\n $originalDir = $original[$i];\n rename($originalDir, $tmpDir);\n }\n\n // Rename files\n $original = static::getDecoratorDataFiles(false);\n foreach (static::getDecoratorDataFiles(true) as $i => $tmpPath) {\n $destPath = $original[$i];\n if (file_exists($tmpPath)) {\n rename($tmpPath, $destPath);\n }\n }\n }\n }", "public function testDeleteDirectoryReturnFalseWhenNotADirectory()\n {\n mkdir(self::$temp.DS.'bar');\n file_put_contents(self::$temp.DS.'bar'.DS.'file.txt', 'Hello World');\n\n $this->assertFalse(Storage::rmdir(self::$temp.DS.'bar'.DS.'file.txt'));\n }", "public function testDirectoryManagement()\n {\n $limit = 5;\n $filesystem = $this->createFilesystemMock(0, $limit, $limit);\n $instance = $this->createTestInstance($filesystem);\n $this->assertEmpty($instance->getTemporaryDirectories());\n $directories = array();\n for ($i = 0; $i < 5; $i++) {\n $directories[] = $instance->createTemporaryDirectory();\n }\n $this->assertCount($limit, $instance->getTemporaryDirectories());\n $this->assertContains(\n $directories[0],\n $instance->getTemporaryDirectories()\n );\n $instance->removeTemporaryDirectory($directories[0]);\n $this->assertCount($limit - 1, $instance->getTemporaryDirectories());\n $this->assertNotContains(\n $directories[0],\n $instance->getTemporaryDirectories()\n );\n $instance->removeTemporaryDirectories();\n $this->assertCount(0, $instance->getTemporaryDirectories());\n }" ]
[ "0.8073711", "0.69530237", "0.6793304", "0.67131215", "0.66003954", "0.63539195", "0.6330553", "0.62984866", "0.6267685", "0.6255804", "0.6138651", "0.61358964", "0.61334026", "0.609102", "0.6087658", "0.597927", "0.59581673", "0.5946811", "0.59413356", "0.59262115", "0.59253424", "0.5842497", "0.5831824", "0.58051944", "0.57979715", "0.5795752", "0.57305807", "0.5704202", "0.570261", "0.56702673" ]
0.78430563
1
Test for Directory::move() Create the Directory test_dir in [ROOT] and moves it to [SYSTEM] At the end of the test, remove the moved directory.
public function test_move() { $object = Directory::create(ROOT.DS.'test_dir'); $object->move(SYSTEM); $this->assertTrue(is_dir(SYSTEM.DS.'test_dir')); $this->assertFalse(is_dir(ROOT.DS.'test_dir')); $this->assertEquals($object->get_path(), SYSTEM.DS.'test_dir'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_move_directory_exists()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT, false);\n }", "public function testMoveDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp2', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp2'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp2'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp2', self::$temp.DS.'tmp3');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_dir(self::$temp.DS.'tmp2'));\n }", "public function test_move_not_exists_dir()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT.DS.'not_exist');\n }", "public function testMoveDirectoryMovesEntireDirectoryAndOverwrites()\n {\n mkdir(self::$temp.DS.'tmp4', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp4'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp4'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'nested'.DS.'baz.txt', '');\n\n mkdir(self::$temp.DS.'tmp5', 0777, true);\n file_put_contents(self::$temp.DS.'tmp5'.DS.'foo2.txt', '');\n file_put_contents(self::$temp.DS.'tmp5'.DS.'bar2.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp4', self::$temp.DS.'tmp5', true);\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'foo2.txt'));\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'bar2.txt'));\n $this->assertFalse(is_dir(self::$temp.DS.'tmp4'));\n }", "public function testMoveRecursive() {\n $sourceDirName = self::TEST_DIR . '/testMoveRecursiveSource/hierachy1';\n $targetDirName = self::TEST_DIR . '/testMoveRecursiveTarget/hierachy1';\n\n mkdir(self::TEST_DIR . '/testMoveRecursiveSource/hierachy1', 0777, true);\n\n $directoryHandle = new Directory(self::TEST_DIR . '/testMoveRecursiveSource');\n\n $directoryHandle->move(new Directory(self::TEST_DIR . '/testMoveRecursiveTarget'));\n\n $this->assertDirectoryExists($targetDirName);\n $this->assertDirectoryNotExists(self::TEST_DIR . '/testMoveRecursiveSource');\n }", "public function testMoveEmpty() {\n $sourceDirName = self::TEST_DIR . '/testMoveEmptySource';\n $targetDirName = self::TEST_DIR . '/testMoveEmptyTarget';\n\n mkdir($sourceDirName);\n\n $directoryHandle = new Directory($sourceDirName);\n\n $directoryHandle->move(new Directory($targetDirName));\n\n $this->assertDirectoryExists($targetDirName);\n $this->assertDirectoryNotExists($sourceDirName);\n }", "public function testCopyDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::cpdir(self::$temp.DS.'tmp', self::$temp.DS.'tmp2');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt'));\n }", "public function test_remove()\n {\n $path = ROOT.DS.'test_dir';\n $object = Directory::create($path);\n $object->remove($path);\n $this->assertFalse(is_dir($path));\n }", "public function testMoveFolder()\n {\n $remoteFolder = \"TestData/In\";\n\n $localName = \"Book1.xlsx\";\n $remoteName = \"Book1.xlsx\";\n\n CellsApiTestBase::ready( $this->instance,$localName ,$remoteFolder . \"/\" . $remoteName , \"\");\n \n $request = new MoveFolderRequest();\n $request->setSrcPath( \"OutResult/Create\");\n $request->setDestPath( \"OutResult/Move\");\n $request->setSrcStorageName( \"\");\n $request->setDestStorageName( \"\");\n $this->instance->moveFolder($request);\n }", "public function test_rename()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->rename('test_new_dir');\n $this->assertEquals($object->get_base_name(), 'test_new_dir');\n }", "function moveDIR($dir,$dest=\"\",$debug,$nMode=0755) {\n //$debug = 1;\n $result=true;\n\n //if($debug) { echo \"<h2>Moving directory</h2><p> From:<br> $dir <br>To: $dest</p>\";}\n\n $path = dirname(__FILE__);\n $files = scandir($dir);\n\n foreach($files as $file) {\n if (substr( $file ,0,1) != \".\") {\n $pathFile = $dir.'/'.$file;\n if (is_dir($pathFile)) {\n //if($debug) { echo \"<p><b>Directory:</b> $pathFile</p>\"; }\n\n $newDir = $dest.\"/\".$file;\n\n if (!moveDIR($pathFile,$newDir,$debug)) {\n $result = false;\n }\n\n } else {\n //echo ($debug) ? \"<p>$pathFile is a file</p>\" : \"\";\n\n // $currentFile = realpath($file); // current location\n $currentFile = $pathFile;\n\n $newFile = $dest.\"/\".$file;\n\n if (!file_exists($dest)) {\n makeDIR($dest,0,$nMode);\n }\n // if file already exists remove it\n if (file_exists($newFile)) {\n //if($debug) { echo \"<p>File $newFile already exists - Deleting</p>\"; }\n unlink($newFile);\n } else {\n //if($debug) { echo \"<p>File $newFile doesn't exist yet</p>\"; }\n }\n\n // Move via rename\n // rename(oldname, newname)\n if (rename($currentFile , $newFile)) {\n (CHMOD == 1) ? chmod($newFile, 0755) : '';\n //if($debug) { echo \"<p>Moved $currentFile to $newFile</p>\"; }\n } else {\n //if($debug) { echo \"<p>Failed to move $currentFile to $newFile</p>\"; }\n $result = false;\n } // END rename \n\n } // END if dir or file\n } // end if no dot\n } // END foreach\n return $result;\n }", "public function testCleanDirectory()\n {\n mkdir(self::$temp.DS.'baz');\n file_put_contents(self::$temp.DS.'baz'.DS.'file.txt', 'Hello World');\n\n Storage::cleandir(self::$temp.DS.'baz');\n\n $this->assertTrue(is_dir(self::$temp.DS.'baz'));\n $this->assertTrue(! is_file(self::$temp.DS.'baz'.DS.'file.txt'));\n }", "public function test_rename_same_name()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->rename('test_dir');\n $this->assertEquals($object->get_base_name(), 'test_dir');\n }", "public function testDeleteDirectory()\n {\n mkdir(self::$temp.DS.'foo');\n file_put_contents(self::$temp.DS.'foo'.DS.'file.txt', 'Hello World');\n\n Storage::rmdir(self::$temp.DS.'foo');\n\n $this->assertTrue(! is_dir(self::$temp.DS.'foo'));\n $this->assertTrue(! is_file(self::$temp.DS.'foo'.DS.'file.txt'));\n }", "public function testMoveMovesStorages()\n {\n file_put_contents(self::$temp.DS.'foo.txt', 'foo');\n\n Storage::move(self::$temp.DS.'foo.txt', self::$temp.DS.'bar.txt');\n\n $this->assertTrue(is_file(self::$temp.DS.'bar.txt'));\n $this->assertFalse(is_file(self::$temp.DS.'foo.txt'));\n }", "protected function cleanupTestDirectory() {\n\t\tforeach ($this->filesToRemove as $file) {\n\t\t\tif (file_exists($this->testBasePath . $file)) {\n\t\t\t\tunlink($this->testBasePath . $file);\n\t\t\t}\n\t\t}\n\n\t\tforeach ($this->directoriesToRemove as $directory) {\n\t\t\tif (file_exists($this->testBasePath . $directory)) {\n\t\t\t\trmdir($this->testBasePath . $directory);\n\t\t\t}\n\t\t}\n\t}", "function moveFolder($user_dir){\r\n\t\t\t\t// open the user's directory\r\n\t\t\t\t\t$path = './cloud/'.$_SESSION['SESS_USER_ID'].'/'; // '.' for current\r\n\r\n\t\t\t\t\t\r\n\t\t\t}", "public function moveDirectory( $source, $destination )\n {\n $path = explode( DS, $source );\n\n $destination = $destination . DS . $path[ count( $path ) - 1 ];\n\n $result = $this->copyDirectory( $source, $destination, TRUE );\n\n if ( TRUE === $result )\n {\n $result = $this->deleteDirectory( $source );\n }\n\n return $result;\n }", "public function testMoveFileFromTmp(): void\n {\n $expectedFilePath = $this->imageUploader->getBasePath() . DIRECTORY_SEPARATOR . 'magento_small_image_1.jpg';\n\n $this->assertFalse($this->mediaDirectory->isExist($expectedFilePath));\n\n $this->imageUploader->moveFileFromTmp('magento_small_image.jpg');\n\n $this->assertTrue($this->mediaDirectory->isExist($expectedFilePath));\n }", "protected static function moveTemporaryDirs()\n {\n if (static::isCapsular()) {\n // Rename directories\n $original = static::getCacheDirs(false);\n foreach (static::getCacheDirs(true) as $i => $tmpDir) {\n \\Includes\\Utils\\FileManager::unlinkRecursive($tmpDir);\n $originalDir = $original[$i];\n rename($originalDir, $tmpDir);\n }\n\n // Rename files\n $original = static::getDecoratorDataFiles(false);\n foreach (static::getDecoratorDataFiles(true) as $i => $tmpPath) {\n $destPath = $original[$i];\n if (file_exists($tmpPath)) {\n rename($tmpPath, $destPath);\n }\n }\n }\n }", "protected function createRealTestdir() {}", "public function testMakeDirectory()\n {\n $this->assertTrue(Storage::mkdir(self::$temp.DS.'created'));\n $this->assertTrue(is_dir(self::$temp.DS.'created'));\n }", "public function testDirectoryManagement()\n {\n $limit = 5;\n $filesystem = $this->createFilesystemMock(0, $limit, $limit);\n $instance = $this->createTestInstance($filesystem);\n $this->assertEmpty($instance->getTemporaryDirectories());\n $directories = array();\n for ($i = 0; $i < 5; $i++) {\n $directories[] = $instance->createTemporaryDirectory();\n }\n $this->assertCount($limit, $instance->getTemporaryDirectories());\n $this->assertContains(\n $directories[0],\n $instance->getTemporaryDirectories()\n );\n $instance->removeTemporaryDirectory($directories[0]);\n $this->assertCount($limit - 1, $instance->getTemporaryDirectories());\n $this->assertNotContains(\n $directories[0],\n $instance->getTemporaryDirectories()\n );\n $instance->removeTemporaryDirectories();\n $this->assertCount(0, $instance->getTemporaryDirectories());\n }", "protected function _move($source, $targetDir, $name) {\r\n\t\treturn false;\r\n\t}", "static public function movePhysically($old_path, $new_path)\n {\n\n if(!is_dir($old_path))\n {\n return true;\n }\n \n if (!is_dir($new_path) || !is_writable($new_path))\n {\n $old = umask(0);\n mkdir($new_path, 0770);\n umask($old); \n }\n \n $files = sfFinder::type('file')->maxdepth(0)->in($old_path);\n $success = true;\n\n foreach ($files as $file)\n {\n $success = rename($file, $new_path . '/' . basename($file)) && $success;\n }\n if ($success)\n {\n $folders = sfFinder::type('dir')->maxdepth(0)->in($old_path);\n foreach($folders as $folder)\n {\n $new_name = substr($folder, strlen($old_path));\n $success = self::movePhysically($folder, $new_path . '/' . $new_name) && $success;\n }\n }\n \n $success = rmdir($old_path) && $success;\n\n return $success;\n }", "public function testOnMovedDocument() {\n\n $obj = new FileSystemStorageProvider($this->logger, getcwd());\n\n $this->dir3->setParentBackedUp($this->dir3->getParent());\n $this->dir2->removeChildren($this->dir3);\n $this->dir1->addChildren($this->dir3);\n\n $obj->onMovedDocument($this->dir3);\n $this->assertFileExists($this->directory . \"/1/3\");\n }", "public function testCopyDirOverExistingUpcountsDestinationDirname()\n {\n $this->storage->createDir('/', 'dest');\n $this->storage->createDir('/dest', 'tmp');\n $this->storage->createFile('/dest/tmp/', 'a.txt');\n $this->storage->createDir('/', 'tmp');\n $this->storage->createFile('/tmp/', 'b.txt');\n\n $this->storage->copyDir('/tmp', '/dest');\n\n $this->assertDirectoryExists(TEST_REPOSITORY.'/dest/tmp/');\n $this->assertTrue($this->storage->fileExists('/dest/tmp/a.txt'));\n\n $this->assertDirectoryExists(TEST_REPOSITORY.'/dest/tmp (1)');\n $this->assertTrue($this->storage->fileExists('/dest/tmp (1)/b.txt'));\n }", "public function testDeleteDirectoryReturnFalseWhenNotADirectory()\n {\n mkdir(self::$temp.DS.'bar');\n file_put_contents(self::$temp.DS.'bar'.DS.'file.txt', 'Hello World');\n\n $this->assertFalse(Storage::rmdir(self::$temp.DS.'bar'.DS.'file.txt'));\n }", "public function testMoveSuccess_zipSubfolder()\n {\n $file = array(\"name\"=>\"zipSubfolder.zip\", \"size\"=>500, \"tmp_name\"=>__DIR__.'/zipSubfolder.zip');\n\n $service = $this->setMockPluginUploaderServiceMoveUploadedFile();\n\n $result = $service->upload($file);\n\n // check we got the correct result\n $this->assertEquals(false, $result);\n }", "public function testMoveSuccess_ZipNoSubfolder()\n {\n $file = array(\"name\"=>\"zipNoSubfolder.zip\", \"size\"=>500, \"tmp_name\"=>__DIR__.'/zipNoSubfolder.zip');\n\n $service = $this->setMockPluginUploaderServiceMoveUploadedFile();\n\n $result = $service->upload($file);\n\n // check we got the correct result\n $this->assertEquals(false, $result);\n }" ]
[ "0.80949366", "0.7867393", "0.76190865", "0.7546802", "0.73030376", "0.7230169", "0.7162468", "0.6590736", "0.6350258", "0.6209349", "0.6183593", "0.6081983", "0.60330856", "0.5999443", "0.59931886", "0.5987112", "0.5961271", "0.59227955", "0.59041375", "0.5877521", "0.58459896", "0.58384687", "0.58262146", "0.5798939", "0.57848257", "0.5776328", "0.5723072", "0.5710129", "0.5704671", "0.5688802" ]
0.84177864
0
Test for Directory::move() Attempts to move [ROOT]/test.txt to [ROOT] with overwriting disabled Throws \Kaili\DirectoryException because Directory alredy exists
public function test_move_directory_exists() { $object = Directory::create(ROOT.DS.'test_dir'); $object->move(ROOT, false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_move_not_exists_dir()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT.DS.'not_exist');\n }", "public function test_move()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(SYSTEM);\n $this->assertTrue(is_dir(SYSTEM.DS.'test_dir'));\n $this->assertFalse(is_dir(ROOT.DS.'test_dir'));\n $this->assertEquals($object->get_path(), SYSTEM.DS.'test_dir');\n }", "public function testMoveDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp2', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp2'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp2'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp2', self::$temp.DS.'tmp3');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_dir(self::$temp.DS.'tmp2'));\n }", "public function testMoveDirectoryMovesEntireDirectoryAndOverwrites()\n {\n mkdir(self::$temp.DS.'tmp4', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp4'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp4'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'nested'.DS.'baz.txt', '');\n\n mkdir(self::$temp.DS.'tmp5', 0777, true);\n file_put_contents(self::$temp.DS.'tmp5'.DS.'foo2.txt', '');\n file_put_contents(self::$temp.DS.'tmp5'.DS.'bar2.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp4', self::$temp.DS.'tmp5', true);\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'foo2.txt'));\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'bar2.txt'));\n $this->assertFalse(is_dir(self::$temp.DS.'tmp4'));\n }", "public function testMoveRecursive() {\n $sourceDirName = self::TEST_DIR . '/testMoveRecursiveSource/hierachy1';\n $targetDirName = self::TEST_DIR . '/testMoveRecursiveTarget/hierachy1';\n\n mkdir(self::TEST_DIR . '/testMoveRecursiveSource/hierachy1', 0777, true);\n\n $directoryHandle = new Directory(self::TEST_DIR . '/testMoveRecursiveSource');\n\n $directoryHandle->move(new Directory(self::TEST_DIR . '/testMoveRecursiveTarget'));\n\n $this->assertDirectoryExists($targetDirName);\n $this->assertDirectoryNotExists(self::TEST_DIR . '/testMoveRecursiveSource');\n }", "public function testMoveEmpty() {\n $sourceDirName = self::TEST_DIR . '/testMoveEmptySource';\n $targetDirName = self::TEST_DIR . '/testMoveEmptyTarget';\n\n mkdir($sourceDirName);\n\n $directoryHandle = new Directory($sourceDirName);\n\n $directoryHandle->move(new Directory($targetDirName));\n\n $this->assertDirectoryExists($targetDirName);\n $this->assertDirectoryNotExists($sourceDirName);\n }", "public function testCopyDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::cpdir(self::$temp.DS.'tmp', self::$temp.DS.'tmp2');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt'));\n }", "public function test_rename()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->rename('test_new_dir');\n $this->assertEquals($object->get_base_name(), 'test_new_dir');\n }", "function moveDIR($dir,$dest=\"\",$debug,$nMode=0755) {\n //$debug = 1;\n $result=true;\n\n //if($debug) { echo \"<h2>Moving directory</h2><p> From:<br> $dir <br>To: $dest</p>\";}\n\n $path = dirname(__FILE__);\n $files = scandir($dir);\n\n foreach($files as $file) {\n if (substr( $file ,0,1) != \".\") {\n $pathFile = $dir.'/'.$file;\n if (is_dir($pathFile)) {\n //if($debug) { echo \"<p><b>Directory:</b> $pathFile</p>\"; }\n\n $newDir = $dest.\"/\".$file;\n\n if (!moveDIR($pathFile,$newDir,$debug)) {\n $result = false;\n }\n\n } else {\n //echo ($debug) ? \"<p>$pathFile is a file</p>\" : \"\";\n\n // $currentFile = realpath($file); // current location\n $currentFile = $pathFile;\n\n $newFile = $dest.\"/\".$file;\n\n if (!file_exists($dest)) {\n makeDIR($dest,0,$nMode);\n }\n // if file already exists remove it\n if (file_exists($newFile)) {\n //if($debug) { echo \"<p>File $newFile already exists - Deleting</p>\"; }\n unlink($newFile);\n } else {\n //if($debug) { echo \"<p>File $newFile doesn't exist yet</p>\"; }\n }\n\n // Move via rename\n // rename(oldname, newname)\n if (rename($currentFile , $newFile)) {\n (CHMOD == 1) ? chmod($newFile, 0755) : '';\n //if($debug) { echo \"<p>Moved $currentFile to $newFile</p>\"; }\n } else {\n //if($debug) { echo \"<p>Failed to move $currentFile to $newFile</p>\"; }\n $result = false;\n } // END rename \n\n } // END if dir or file\n } // end if no dot\n } // END foreach\n return $result;\n }", "public function testMoveFolder()\n {\n $remoteFolder = \"TestData/In\";\n\n $localName = \"Book1.xlsx\";\n $remoteName = \"Book1.xlsx\";\n\n CellsApiTestBase::ready( $this->instance,$localName ,$remoteFolder . \"/\" . $remoteName , \"\");\n \n $request = new MoveFolderRequest();\n $request->setSrcPath( \"OutResult/Create\");\n $request->setDestPath( \"OutResult/Move\");\n $request->setSrcStorageName( \"\");\n $request->setDestStorageName( \"\");\n $this->instance->moveFolder($request);\n }", "public function test_rename_same_name()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->rename('test_dir');\n $this->assertEquals($object->get_base_name(), 'test_dir');\n }", "public function testMoveNotExist()\n {\n $this->rlpMapper->save($this->content1, '/news/news-1', 'default', 'de');\n $this->sessionManager->getSession()->save();\n\n $this->setExpectedException('Sulu\\Component\\Content\\Exception\\ResourceLocatorNotFoundException');\n $this->rlpMapper->move('/news', '/neuigkeiten', 'default', 'de');\n }", "public function testOnMovedDocument() {\n\n $obj = new FileSystemStorageProvider($this->logger, getcwd());\n\n $this->dir3->setParentBackedUp($this->dir3->getParent());\n $this->dir2->removeChildren($this->dir3);\n $this->dir1->addChildren($this->dir3);\n\n $obj->onMovedDocument($this->dir3);\n $this->assertFileExists($this->directory . \"/1/3\");\n }", "public function move (MetaFolder $destination): MetaFolder\n {\n if ($destination->l >= $this->l && $destination->r <= $this->r) {\n throw new MetaFolderException('Metafolder cannot be moved into itself or a contained subfolder.');\n }\n if (!$this->level) {\n throw new MetaFolderException('Root metafolder cannot be moved.');\n }\n\n $newRelPath = $destination->getRelativePath() . array_slice (explode('/', trim($this->getRelativePath(), '/')), -1)[0] . '/';\n\n try {\n $existingFolder = self::getInstance($newRelPath);\n }\n catch (MetaFolderException $e) {\n }\n if (isset($existingFolder)) {\n throw new MetaFolderException('Cannot move folder. Folder with same path already exists.');\n }\n\n // metafile updates\n\n $db = Application::getInstance()->getVxPDO();\n\n // handle nesting, kudos to https://rogerkeays.com/how-to-move-a-node-in-nested-sets-with-sql\n\n $subtreeWidth = $this->r - $this->l + 1;\n $newPos = $destination->l + 1;\n $subtreeDist = $newPos - $this->l;\n $tmpPos = $this->l;\n $levelDiff = $destination->level - $this->level + 1;\n\n // observe backward movement\n\n if($subtreeDist < 0) {\n $subtreeDist -= $subtreeWidth;\n $tmpPos += $subtreeWidth;\n }\n\n $db->beginTransaction();\n\n // create space for subtree at new position\n\n $db->execute('UPDATE folders SET l = l + ? WHERE l >= ?', [$subtreeWidth, $newPos]);\n $db->execute('UPDATE folders SET r = r + ? WHERE r >= ?', [$subtreeWidth, $newPos]);\n\n // move subtree into new space\n\n $db->execute('UPDATE folders SET l = l + ?, r = r + ?, level = level + (?) WHERE l >= ? AND r < ?', [$subtreeDist, $subtreeDist, $levelDiff, $tmpPos, $tmpPos + $subtreeWidth]);\n\n // remove space previously occupied by subtree\n\n $db->execute('UPDATE folders SET l = l - ? WHERE l > ?', [$subtreeWidth, $this->r]);\n $db->execute('UPDATE folders SET r = r - ? WHERE r > ?', [$subtreeWidth, $this->r]);\n\n // update path\n\n $db->execute('UPDATE folders SET path = REGEXP_REPLACE(path, ?, ?) WHERE path LIKE ?', ['^' . $this->getRelativePath(), $newRelPath, $this->getRelativePath() . '%']);\n $db->commit();\n\n self::refreshNestings();\n\n // move filesystem folder\n\n $this->filesystemFolder->move($destination->getFilesystemFolder());\n\n // unset cached instances\n\n unset(self::$instancesById[$this->id], self::$instancesByPath[$this->filesystemFolder->getPath()]);\n return self::getInstance(null, $this->id);\n }", "function narrative_move_files($current_narrative_dir, $new_narrative_dir)\n{\n $file_scan = scandir($current_narrative_dir);\n foreach ($file_scan as $filecheck)\n {\n if ($filecheck != '.' && $filecheck != '..' && !is_dir($current_narrative_dir . $filecheck))\n {\n rename($current_narrative_dir . $filecheck, $new_narrative_dir . $filecheck);\n }\n }\n}", "public function testMoveMovesStorages()\n {\n file_put_contents(self::$temp.DS.'foo.txt', 'foo');\n\n Storage::move(self::$temp.DS.'foo.txt', self::$temp.DS.'bar.txt');\n\n $this->assertTrue(is_file(self::$temp.DS.'bar.txt'));\n $this->assertFalse(is_file(self::$temp.DS.'foo.txt'));\n }", "protected function _move($source, $targetDir, $name) {\r\n\t\treturn false;\r\n\t}", "public function test_remove()\n {\n $path = ROOT.DS.'test_dir';\n $object = Directory::create($path);\n $object->remove($path);\n $this->assertFalse(is_dir($path));\n }", "public function testMoveSuccess_ZipNoSubfolder()\n {\n $file = array(\"name\"=>\"zipNoSubfolder.zip\", \"size\"=>500, \"tmp_name\"=>__DIR__.'/zipNoSubfolder.zip');\n\n $service = $this->setMockPluginUploaderServiceMoveUploadedFile();\n\n $result = $service->upload($file);\n\n // check we got the correct result\n $this->assertEquals(false, $result);\n }", "public function testCopyDirOverExistingUpcountsDestinationDirname()\n {\n $this->storage->createDir('/', 'dest');\n $this->storage->createDir('/dest', 'tmp');\n $this->storage->createFile('/dest/tmp/', 'a.txt');\n $this->storage->createDir('/', 'tmp');\n $this->storage->createFile('/tmp/', 'b.txt');\n\n $this->storage->copyDir('/tmp', '/dest');\n\n $this->assertDirectoryExists(TEST_REPOSITORY.'/dest/tmp/');\n $this->assertTrue($this->storage->fileExists('/dest/tmp/a.txt'));\n\n $this->assertDirectoryExists(TEST_REPOSITORY.'/dest/tmp (1)');\n $this->assertTrue($this->storage->fileExists('/dest/tmp (1)/b.txt'));\n }", "public function testMoveFileFromTmp(): void\n {\n $expectedFilePath = $this->imageUploader->getBasePath() . DIRECTORY_SEPARATOR . 'magento_small_image_1.jpg';\n\n $this->assertFalse($this->mediaDirectory->isExist($expectedFilePath));\n\n $this->imageUploader->moveFileFromTmp('magento_small_image.jpg');\n\n $this->assertTrue($this->mediaDirectory->isExist($expectedFilePath));\n }", "public function move($destination)\r\n {\r\n if (!is_dir($destination)) {\r\n $this->createDirectory($destination);\r\n }\r\n\r\n if (!rename($this->filename, $destination . '/' . $this->getFilename())) {\r\n throw new \\DomainException(\r\n 'File (`' . $this->filename . '`) could not be moved to the destination directory (`' . $destination . '`).'\r\n );\r\n }\r\n\r\n $this->filename = $destination . $this->getFilename();\r\n }", "public function testMoveFail_PluginExists()\n {\n $file = array(\"name\"=>\"zipNoSubfolder.zip\", \"size\"=>500, \"tmp_name\"=>__DIR__.'/zipNoSubfolder.zip');\n\n $service = $this->setMockPluginUploaderServiceMoveUploadedFile();\n\n $result = $service->upload($file);\n // check we got the correct result first time around\n $this->assertEquals(false, $result);\n\n $result = $service->upload($file);\n // check we got the correct result second time around\n $this->assertEquals('A plugin with the same name (TestPlugin) is already uploaded.', $result);\n }", "static public function movePhysically($old_path, $new_path)\n {\n\n if(!is_dir($old_path))\n {\n return true;\n }\n \n if (!is_dir($new_path) || !is_writable($new_path))\n {\n $old = umask(0);\n mkdir($new_path, 0770);\n umask($old); \n }\n \n $files = sfFinder::type('file')->maxdepth(0)->in($old_path);\n $success = true;\n\n foreach ($files as $file)\n {\n $success = rename($file, $new_path . '/' . basename($file)) && $success;\n }\n if ($success)\n {\n $folders = sfFinder::type('dir')->maxdepth(0)->in($old_path);\n foreach($folders as $folder)\n {\n $new_name = substr($folder, strlen($old_path));\n $success = self::movePhysically($folder, $new_path . '/' . $new_name) && $success;\n }\n }\n \n $success = rmdir($old_path) && $success;\n\n return $success;\n }", "public function move(string $from, string $to) : bool\n {\n $absoluteFrom = $this->absolutePath($from);\n $absoluteTo = $this->absolutePath($to);\n\n if ($absoluteFrom == $absoluteTo)\n return true;\n\n $parts = explode('/', $absoluteTo);\n $folderTo = implode('/', array_splice($parts, 0, count($parts) - 1));\n\n $old = umask(0);\n $this->fileSystem()->makeDirectory($folderTo, 0777, true, true);\n umask($old);\n\n return $this->fileSystem()->move($absoluteFrom, $absoluteTo);\n }", "public function testMoveSuccess_zipSubfolder()\n {\n $file = array(\"name\"=>\"zipSubfolder.zip\", \"size\"=>500, \"tmp_name\"=>__DIR__.'/zipSubfolder.zip');\n\n $service = $this->setMockPluginUploaderServiceMoveUploadedFile();\n\n $result = $service->upload($file);\n\n // check we got the correct result\n $this->assertEquals(false, $result);\n }", "function move($source, $destination);", "function moveFiles($src, $dest)\n{\n if (!is_dir($src)) {\n return false;\n }\n\n // If the destination directory does not exist create it\n if (!is_dir($dest)) {\n if (!mkdir($dest)) {\n // If the destination directory could not be created stop processing\n return false;\n }\n }\n\n // Open the source directory to read in files\n $i = new DirectoryIterator($src);\n foreach ($i as $f) {\n if ($f->isFile()) {\n rename($f->getRealPath(), \"$dest/\" . $f->getFilename());\n } else {\n if (!$f->isDot() && $f->isDir()) {\n rmDirRecursive($f->getRealPath(), \"$dest/$f\");\n unlink($f->getRealPath());\n }\n }\n }\n unlink($src);\n}", "public function testMove(): void\n {\n $this->document1->setResourceSegment('/products/news/content1-news');\n $this->phpcrMapper->save($this->document1);\n $this->sessionManager->getSession()->save();\n\n // move\n $this->document1->setResourceSegment('/products/asdf/content2-news');\n $this->phpcrMapper->save($this->document1);\n $this->sessionManager->getSession()->save();\n\n $oldNode = $this->defaultSession->getNode('/cmf/sulu_io/routes/de/products/news/content1-news');\n $newNode = $this->defaultSession->getNode('/cmf/sulu_io/routes/de/products/asdf/content2-news');\n\n $oldNodeMixins = $oldNode->getMixinNodeTypes();\n $newNodeMixins = $newNode->getMixinNodeTypes();\n\n $this->assertEquals('sulu:path', $newNodeMixins[0]->getName());\n $this->assertEquals('sulu:path', $oldNodeMixins[0]->getName());\n\n $this->assertTrue($oldNode->getPropertyValue('sulu:history'));\n $this->assertEquals($newNode, $oldNode->getPropertyValue('sulu:content'));\n $this->assertEquals(\n $this->documentInspector->getNode($this->document1),\n $newNode->getPropertyValue('sulu:content')\n );\n\n // get content from new path\n $result = $this->phpcrMapper->loadByResourceLocator('/products/asdf/content2-news', 'sulu_io', 'de');\n $this->assertEquals($this->document1->getUuid(), $result);\n\n // get content from history should throw an exception\n $this->expectException(ResourceLocatorMovedException::class);\n $this->phpcrMapper->loadByResourceLocator('/products/news/content1-news', 'sulu_io', 'de');\n }", "public function testMove()\n {\n $this->rlpMapper->save($this->content1, '/products/news/content1-news', 'default', 'de');\n $this->sessionManager->getSession()->save();\n\n // move\n $this->rlpMapper->move('/products/news/content1-news', '/products/asdf/content2-news', 'default', 'de');\n $this->sessionManager->getSession()->save();\n\n $oldNode = $this->session->getNode('/cmf/default/routes/de/products/news/content1-news');\n $newNode = $this->session->getNode('/cmf/default/routes/de/products/asdf/content2-news');\n\n $oldNodeMixins = $oldNode->getMixinNodeTypes();\n $newNodeMixins = $newNode->getMixinNodeTypes();\n\n $this->assertEquals('sulu:path', $newNodeMixins[0]->getName());\n $this->assertEquals('sulu:path', $oldNodeMixins[0]->getName());\n\n $this->assertTrue($oldNode->getPropertyValue('sulu:history'));\n $this->assertEquals($newNode, $oldNode->getPropertyValue('sulu:content'));\n $this->assertEquals($this->content1, $newNode->getPropertyValue('sulu:content'));\n\n // get content from new path\n $result = $this->rlpMapper->loadByResourceLocator('/products/asdf/content2-news', 'default', 'de');\n $this->assertEquals($this->content1->getIdentifier(), $result);\n\n // get content from history should throw an exception\n $this->setExpectedException('Sulu\\Component\\Content\\Exception\\ResourceLocatorMovedException');\n $result = $this->rlpMapper->loadByResourceLocator('/products/news/content1-news', 'default', 'de');\n }" ]
[ "0.8364826", "0.8341061", "0.8054002", "0.80286586", "0.78115845", "0.7408394", "0.7035016", "0.6758503", "0.66618764", "0.6528062", "0.6508351", "0.6483764", "0.6476313", "0.64304525", "0.6402691", "0.640205", "0.62653875", "0.62580246", "0.6214017", "0.6189024", "0.615714", "0.6121776", "0.611669", "0.60829675", "0.6081632", "0.6075489", "0.60714054", "0.6010069", "0.5984624", "0.5955704" ]
0.84916425
0
Test for Directory::move() Attempts to move [ROOT]/index.php to [ROOT]/not_exist Throws \InvalidArgumentException because provided path doesn't exist
public function test_move_not_exists_dir() { $object = Directory::create(ROOT.DS.'test_dir'); $object->move(ROOT.DS.'not_exist'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_move_directory_exists()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT, false);\n }", "public function test_move()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(SYSTEM);\n $this->assertTrue(is_dir(SYSTEM.DS.'test_dir'));\n $this->assertFalse(is_dir(ROOT.DS.'test_dir'));\n $this->assertEquals($object->get_path(), SYSTEM.DS.'test_dir');\n }", "public function testMoveDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp2', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp2'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp2'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp2', self::$temp.DS.'tmp3');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_dir(self::$temp.DS.'tmp2'));\n }", "public function testMoveEmpty() {\n $sourceDirName = self::TEST_DIR . '/testMoveEmptySource';\n $targetDirName = self::TEST_DIR . '/testMoveEmptyTarget';\n\n mkdir($sourceDirName);\n\n $directoryHandle = new Directory($sourceDirName);\n\n $directoryHandle->move(new Directory($targetDirName));\n\n $this->assertDirectoryExists($targetDirName);\n $this->assertDirectoryNotExists($sourceDirName);\n }", "public function testMoveDirectoryMovesEntireDirectoryAndOverwrites()\n {\n mkdir(self::$temp.DS.'tmp4', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp4'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp4'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'nested'.DS.'baz.txt', '');\n\n mkdir(self::$temp.DS.'tmp5', 0777, true);\n file_put_contents(self::$temp.DS.'tmp5'.DS.'foo2.txt', '');\n file_put_contents(self::$temp.DS.'tmp5'.DS.'bar2.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp4', self::$temp.DS.'tmp5', true);\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'foo2.txt'));\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'bar2.txt'));\n $this->assertFalse(is_dir(self::$temp.DS.'tmp4'));\n }", "public function testMoveRecursive() {\n $sourceDirName = self::TEST_DIR . '/testMoveRecursiveSource/hierachy1';\n $targetDirName = self::TEST_DIR . '/testMoveRecursiveTarget/hierachy1';\n\n mkdir(self::TEST_DIR . '/testMoveRecursiveSource/hierachy1', 0777, true);\n\n $directoryHandle = new Directory(self::TEST_DIR . '/testMoveRecursiveSource');\n\n $directoryHandle->move(new Directory(self::TEST_DIR . '/testMoveRecursiveTarget'));\n\n $this->assertDirectoryExists($targetDirName);\n $this->assertDirectoryNotExists(self::TEST_DIR . '/testMoveRecursiveSource');\n }", "public function testMoveNotExist()\n {\n $this->rlpMapper->save($this->content1, '/news/news-1', 'default', 'de');\n $this->sessionManager->getSession()->save();\n\n $this->setExpectedException('Sulu\\Component\\Content\\Exception\\ResourceLocatorNotFoundException');\n $this->rlpMapper->move('/news', '/neuigkeiten', 'default', 'de');\n }", "public function testMoveFail_PluginExists()\n {\n $file = array(\"name\"=>\"zipNoSubfolder.zip\", \"size\"=>500, \"tmp_name\"=>__DIR__.'/zipNoSubfolder.zip');\n\n $service = $this->setMockPluginUploaderServiceMoveUploadedFile();\n\n $result = $service->upload($file);\n // check we got the correct result first time around\n $this->assertEquals(false, $result);\n\n $result = $service->upload($file);\n // check we got the correct result second time around\n $this->assertEquals('A plugin with the same name (TestPlugin) is already uploaded.', $result);\n }", "public function testMoveMovesStorages()\n {\n file_put_contents(self::$temp.DS.'foo.txt', 'foo');\n\n Storage::move(self::$temp.DS.'foo.txt', self::$temp.DS.'bar.txt');\n\n $this->assertTrue(is_file(self::$temp.DS.'bar.txt'));\n $this->assertFalse(is_file(self::$temp.DS.'foo.txt'));\n }", "function move($source, $destination);", "public function testMoveSuccess_ZipNoSubfolder()\n {\n $file = array(\"name\"=>\"zipNoSubfolder.zip\", \"size\"=>500, \"tmp_name\"=>__DIR__.'/zipNoSubfolder.zip');\n\n $service = $this->setMockPluginUploaderServiceMoveUploadedFile();\n\n $result = $service->upload($file);\n\n // check we got the correct result\n $this->assertEquals(false, $result);\n }", "public function testMoveFolder()\n {\n $remoteFolder = \"TestData/In\";\n\n $localName = \"Book1.xlsx\";\n $remoteName = \"Book1.xlsx\";\n\n CellsApiTestBase::ready( $this->instance,$localName ,$remoteFolder . \"/\" . $remoteName , \"\");\n \n $request = new MoveFolderRequest();\n $request->setSrcPath( \"OutResult/Create\");\n $request->setDestPath( \"OutResult/Move\");\n $request->setSrcStorageName( \"\");\n $request->setDestStorageName( \"\");\n $this->instance->moveFolder($request);\n }", "public function move($path) {\n\n if (!$this->exists())\n throw new Exception\\FileException(\"File not found\", 1);\n\n if (!rename($this->path, $path))\n throw new Exception\\FileException(\"Unknown error\", 0);\n\n return true;\n }", "public function testCopyDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::cpdir(self::$temp.DS.'tmp', self::$temp.DS.'tmp2');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp2'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt'));\n }", "function narrative_move_files($current_narrative_dir, $new_narrative_dir)\n{\n $file_scan = scandir($current_narrative_dir);\n foreach ($file_scan as $filecheck)\n {\n if ($filecheck != '.' && $filecheck != '..' && !is_dir($current_narrative_dir . $filecheck))\n {\n rename($current_narrative_dir . $filecheck, $new_narrative_dir . $filecheck);\n }\n }\n}", "public function move($file, $path)\n {\n if (! \\File::exists($file)) return $this->notify('The file or directory doesn\\'t exist.', 400); \n try {\n \\File::move($file, $path . '/' . fileName($file));\n }\n catch (Exception $e) {\n return $this->notify($e->getMessage(), 500);\n }\n }", "public static function move($path, $toPath, $replace = TRUE) {\n \n }", "public function move($destination)\r\n {\r\n if (!is_dir($destination)) {\r\n $this->createDirectory($destination);\r\n }\r\n\r\n if (!rename($this->filename, $destination . '/' . $this->getFilename())) {\r\n throw new \\DomainException(\r\n 'File (`' . $this->filename . '`) could not be moved to the destination directory (`' . $destination . '`).'\r\n );\r\n }\r\n\r\n $this->filename = $destination . $this->getFilename();\r\n }", "public function move (MetaFolder $destination): MetaFolder\n {\n if ($destination->l >= $this->l && $destination->r <= $this->r) {\n throw new MetaFolderException('Metafolder cannot be moved into itself or a contained subfolder.');\n }\n if (!$this->level) {\n throw new MetaFolderException('Root metafolder cannot be moved.');\n }\n\n $newRelPath = $destination->getRelativePath() . array_slice (explode('/', trim($this->getRelativePath(), '/')), -1)[0] . '/';\n\n try {\n $existingFolder = self::getInstance($newRelPath);\n }\n catch (MetaFolderException $e) {\n }\n if (isset($existingFolder)) {\n throw new MetaFolderException('Cannot move folder. Folder with same path already exists.');\n }\n\n // metafile updates\n\n $db = Application::getInstance()->getVxPDO();\n\n // handle nesting, kudos to https://rogerkeays.com/how-to-move-a-node-in-nested-sets-with-sql\n\n $subtreeWidth = $this->r - $this->l + 1;\n $newPos = $destination->l + 1;\n $subtreeDist = $newPos - $this->l;\n $tmpPos = $this->l;\n $levelDiff = $destination->level - $this->level + 1;\n\n // observe backward movement\n\n if($subtreeDist < 0) {\n $subtreeDist -= $subtreeWidth;\n $tmpPos += $subtreeWidth;\n }\n\n $db->beginTransaction();\n\n // create space for subtree at new position\n\n $db->execute('UPDATE folders SET l = l + ? WHERE l >= ?', [$subtreeWidth, $newPos]);\n $db->execute('UPDATE folders SET r = r + ? WHERE r >= ?', [$subtreeWidth, $newPos]);\n\n // move subtree into new space\n\n $db->execute('UPDATE folders SET l = l + ?, r = r + ?, level = level + (?) WHERE l >= ? AND r < ?', [$subtreeDist, $subtreeDist, $levelDiff, $tmpPos, $tmpPos + $subtreeWidth]);\n\n // remove space previously occupied by subtree\n\n $db->execute('UPDATE folders SET l = l - ? WHERE l > ?', [$subtreeWidth, $this->r]);\n $db->execute('UPDATE folders SET r = r - ? WHERE r > ?', [$subtreeWidth, $this->r]);\n\n // update path\n\n $db->execute('UPDATE folders SET path = REGEXP_REPLACE(path, ?, ?) WHERE path LIKE ?', ['^' . $this->getRelativePath(), $newRelPath, $this->getRelativePath() . '%']);\n $db->commit();\n\n self::refreshNestings();\n\n // move filesystem folder\n\n $this->filesystemFolder->move($destination->getFilesystemFolder());\n\n // unset cached instances\n\n unset(self::$instancesById[$this->id], self::$instancesByPath[$this->filesystemFolder->getPath()]);\n return self::getInstance(null, $this->id);\n }", "public function testOnMovedDocument() {\n\n $obj = new FileSystemStorageProvider($this->logger, getcwd());\n\n $this->dir3->setParentBackedUp($this->dir3->getParent());\n $this->dir2->removeChildren($this->dir3);\n $this->dir1->addChildren($this->dir3);\n\n $obj->onMovedDocument($this->dir3);\n $this->assertFileExists($this->directory . \"/1/3\");\n }", "public static function move($_path, $_target)\r\n {\r\n return rename($_path, $_target);\r\n }", "public function move(string $from, string $to) : bool\n {\n $absoluteFrom = $this->absolutePath($from);\n $absoluteTo = $this->absolutePath($to);\n\n if ($absoluteFrom == $absoluteTo)\n return true;\n\n $parts = explode('/', $absoluteTo);\n $folderTo = implode('/', array_splice($parts, 0, count($parts) - 1));\n\n $old = umask(0);\n $this->fileSystem()->makeDirectory($folderTo, 0777, true, true);\n umask($old);\n\n return $this->fileSystem()->move($absoluteFrom, $absoluteTo);\n }", "public function move($path){\n\t\t$oldPath = $this->path;\n\t\t$path_array = explode(self::DS, $this->path);\n\t\t$fileName = $path_array[sizeof($path_array) - 1];\n\t\t$newPath = $path . self::DS . $fileName;\n\t\t$this->path = $newPath;\n\t\t$this->createFile($newPath);\n\t\tunlink($oldPath);\n\t}", "public function test_rename()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->rename('test_new_dir');\n $this->assertEquals($object->get_base_name(), 'test_new_dir');\n }", "public function move($source, $dest);", "public function move($sourcePath, $destinationPath, $checkIfIsUploaded = false, $overwrite = true);", "public function move(string $source, string $destination)\n {\n $this->filesystem->move(\n $this->relativeToRoot($source),\n $this->relativeToRoot($destination)\n );\n }", "public function checkMove($source, $destination) {\n\t\t$sourceNode = $this->tree->getNodeForPath($source);\n\t\tif (!$sourceNode instanceof Node) {\n\t\t\treturn;\n\t\t}\n\t\tlist($sourceDir, ) = \\Sabre\\HTTP\\URLUtil::splitPath($source);\n\t\tlist($destinationDir, ) = \\Sabre\\HTTP\\URLUtil::splitPath($destination);\n\n\t\tif ($sourceDir !== $destinationDir) {\n\t\t\t$sourceNodeFileInfo = $sourceNode->getFileInfo();\n\t\t\tif ($sourceNodeFileInfo === null) {\n\t\t\t\tthrow new NotFound($source . ' does not exist');\n\t\t\t}\n\n\t\t\tif (!$sourceNodeFileInfo->isDeletable()) {\n\t\t\t\tthrow new Forbidden($source . \" cannot be deleted\");\n\t\t\t}\n\t\t}\n\t}", "function __moveUploadedFile($source, $destination) {\r\n\t\tif (!Configure::read('Documents.isTesting')) {\r\n\t\t\treturn move_uploaded_file($source, $destination);\r\n\t\t} else {\r\n\t\t\treturn rename($source, $destination);\r\n\t\t}\r\n\r\n\t}", "static public function movePhysically($old_path, $new_path)\n {\n\n if(!is_dir($old_path))\n {\n return true;\n }\n \n if (!is_dir($new_path) || !is_writable($new_path))\n {\n $old = umask(0);\n mkdir($new_path, 0770);\n umask($old); \n }\n \n $files = sfFinder::type('file')->maxdepth(0)->in($old_path);\n $success = true;\n\n foreach ($files as $file)\n {\n $success = rename($file, $new_path . '/' . basename($file)) && $success;\n }\n if ($success)\n {\n $folders = sfFinder::type('dir')->maxdepth(0)->in($old_path);\n foreach($folders as $folder)\n {\n $new_name = substr($folder, strlen($old_path));\n $success = self::movePhysically($folder, $new_path . '/' . $new_name) && $success;\n }\n }\n \n $success = rmdir($old_path) && $success;\n\n return $success;\n }" ]
[ "0.77261436", "0.7507489", "0.7113042", "0.6941977", "0.6908604", "0.67369854", "0.6474342", "0.6204443", "0.6170524", "0.6140496", "0.6086301", "0.6080597", "0.6074179", "0.60411793", "0.5988749", "0.5920087", "0.59006655", "0.58893067", "0.58556426", "0.58260906", "0.5819664", "0.578769", "0.57804203", "0.57619363", "0.574939", "0.57319474", "0.5708597", "0.56621516", "0.565725", "0.56099707" ]
0.798785
0
Test for Directory::remove() Create and remove [ROOT]/test_dir
public function test_remove() { $path = ROOT.DS.'test_dir'; $object = Directory::create($path); $object->remove($path); $this->assertFalse(is_dir($path)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRemoveDirectory()\n {\n $directory = vfsStream::url('foo');\n $method = $this->makeMethodPublic('empty_directory');\n $method->invokeArgs($this->testModel, [$directory, true]);\n\n $this->assertFileNotExists(vfsStream::url('foo'));\n }", "public function testDeleteDirectory()\n {\n mkdir(self::$temp.DS.'foo');\n file_put_contents(self::$temp.DS.'foo'.DS.'file.txt', 'Hello World');\n\n Storage::rmdir(self::$temp.DS.'foo');\n\n $this->assertTrue(! is_dir(self::$temp.DS.'foo'));\n $this->assertTrue(! is_file(self::$temp.DS.'foo'.DS.'file.txt'));\n }", "protected function cleanupTestDirectory() {\n\t\tforeach ($this->filesToRemove as $file) {\n\t\t\tif (file_exists($this->testBasePath . $file)) {\n\t\t\t\tunlink($this->testBasePath . $file);\n\t\t\t}\n\t\t}\n\n\t\tforeach ($this->directoriesToRemove as $directory) {\n\t\t\tif (file_exists($this->testBasePath . $directory)) {\n\t\t\t\trmdir($this->testBasePath . $directory);\n\t\t\t}\n\t\t}\n\t}", "public function testCleanDirectory()\n {\n mkdir(self::$temp.DS.'baz');\n file_put_contents(self::$temp.DS.'baz'.DS.'file.txt', 'Hello World');\n\n Storage::cleandir(self::$temp.DS.'baz');\n\n $this->assertTrue(is_dir(self::$temp.DS.'baz'));\n $this->assertTrue(! is_file(self::$temp.DS.'baz'.DS.'file.txt'));\n }", "public function test_mkdir_and_rmdir() {\n /**\n * Test creating a single directory\n */\n $dir = 'dir1';\n $uri = 'test://'.$dir;\n $path = $this->test_dir.'/'.$dir;\n\n mkdir($uri);\n $this->assertFileExists($path);\n rmdir($uri);\n $this->assertFileNotExists($path);\n\n /**\n * Test creating multiple directories recursively as needed\n */\n $dir = 'dir2/dir3/dir4';\n $uri = 'test://' . $dir;\n $path = $this->test_dir.'/'.$dir;\n\n mkdir($uri, 0777, true);\n\n $error_tripped = false;\n $this->assertFileExists($path);\n try {\n $return = rmdir('test://dir2');\n }\n catch (PHPUnit_Framework_Error $e) {\n $error_tripped = true;\n }\n\n $this->assertTrue($error_tripped, \"rmdir() on a non-empty directory should trigger an error.\");\n $this->assertTrue(wp_rmdir_recursive('test://dir2'));\n $this->assertFileNotExists($this->test_dir.'/dir2');\n }", "public function testDeleteDirectoryReturnFalseWhenNotADirectory()\n {\n mkdir(self::$temp.DS.'bar');\n file_put_contents(self::$temp.DS.'bar'.DS.'file.txt', 'Hello World');\n\n $this->assertFalse(Storage::rmdir(self::$temp.DS.'bar'.DS.'file.txt'));\n }", "public function testDeleteDirectory()\n {\n $this->createTestDirectories(\n array(\n '/artifacts/foo/12345',\n '/artifacts/foo/67890',\n )\n );\n\n $this->createTestFile( '/artifacts/foo/12345/bar.txt' );\n $this->createTestFile( '/artifacts/foo/67890/bar.txt' );\n $this->createTestFile( '/artifacts/foo/bar.txt' );\n $this->createTestFile( '/artifacts/bar.txt' );\n\n phpucFileUtil::deleteDirectory( PHPUC_TEST_DIR . '/artifacts' );\n\n $this->assertFileNotExists( PHPUC_TEST_DIR . '/artifacts' );\n }", "public function test_move_directory_exists()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT, false);\n }", "protected function tearDown()\n {\n $test_dirs = array(\n ROOT.DS.'test_dir',\n ROOT.DS.'test_new_dir',\n SYSTEM.DS.'test_dir',\n );\n foreach($test_dirs as $f){\n is_dir($f) and rmdir($f);\n }\n }", "protected function removeTestFilePath()\n {\n $path = $this->getTestFilePath();\n FileHelper::removeDirectory($path);\n }", "public function testExists() {\n $testDirName = self::TEST_DIR . '/testExists';\n\n $handle = (new Directory($testDirName));\n\n mkdir($testDirName);\n $this->assertTrue($handle->exists());\n\n rmdir($testDirName);\n $this->assertFalse($handle->exists());\n }", "public function testDeleteDirectoryWithLinksAndSymlinks()\n {\n if ( !function_exists( 'link' ) || !function_exists( 'symlink' ) )\n {\n $this->markTestSkipped( 'Missing \"link\" or \"symlink\" function.' );\n return;\n }\n\n $this->createTestDirectories( array( '/logs/foo/12345' ) );\n $this->createTestFile( '/logs/foo/12345/bar.txt' );\n\n $file = PHPUC_TEST_DIR . '/logs/foo/12345/bar.txt';\n\n link( $file, PHPUC_TEST_DIR . '/logs/bar.txt' );\n symlink( $file, PHPUC_TEST_DIR . '/logs/foo/bar.txt' );\n\n phpucFileUtil::deleteDirectory( PHPUC_TEST_DIR . '/logs' );\n\n $this->assertFileNotExists( PHPUC_TEST_DIR . '/logs' );\n }", "public function testDirectoryManagement()\n {\n $limit = 5;\n $filesystem = $this->createFilesystemMock(0, $limit, $limit);\n $instance = $this->createTestInstance($filesystem);\n $this->assertEmpty($instance->getTemporaryDirectories());\n $directories = array();\n for ($i = 0; $i < 5; $i++) {\n $directories[] = $instance->createTemporaryDirectory();\n }\n $this->assertCount($limit, $instance->getTemporaryDirectories());\n $this->assertContains(\n $directories[0],\n $instance->getTemporaryDirectories()\n );\n $instance->removeTemporaryDirectory($directories[0]);\n $this->assertCount($limit - 1, $instance->getTemporaryDirectories());\n $this->assertNotContains(\n $directories[0],\n $instance->getTemporaryDirectories()\n );\n $instance->removeTemporaryDirectories();\n $this->assertCount(0, $instance->getTemporaryDirectories());\n }", "public function remove_dir() {\n\n $path = $this->get_upload_pres_path();\n\n //append_debug_msg($path);\n\n if(!$path || !file_exists($path)){ return; }\n delete_dir($path);\n }", "function remove_dir($path) {\n\t\tif (file_exists($path) && is_dir($path))\n\t\t\trmdir($path);\n\t}", "public function test_move_not_exists_dir()\n {\n $object = Directory::create(ROOT.DS.'test_dir');\n $object->move(ROOT.DS.'not_exist');\n }", "protected function tearDown()\n {\n if (file_exists(\"{$this->dir}/file1.mock\")) unlink(\"{$this->dir}/file1.mock\");\n if (file_exists(\"{$this->dir}/file2.mock\")) unlink(\"{$this->dir}/file2.mock\");\n if (file_exists(\"{$this->dir}/dir1/file3.mock\")) unlink(\"{$this->dir}/dir1/file3.mock\");\n if (file_exists(\"{$this->dir}/dir1/file4.mock\")) unlink(\"{$this->dir}/dir1/file4.mock\");\n if (file_exists(\"{$this->dir}/dir1\")) rmdir(\"{$this->dir}/dir1\");\n\n if (file_exists(sys_get_temp_dir().'/def/xyz.mock')) unlink(sys_get_temp_dir().'/def/xyz.mock'); \n if (file_exists(sys_get_temp_dir().'/def')) rmdir(sys_get_temp_dir().'/def'); \n\n if (file_exists($this->dir.\"/abc.mock\")) unlink($this->dir.\"/abc.mock\");\n if (file_exists($this->dir.\"/def.mock\")) unlink($this->dir.\"/def.mock\");\n\n if (file_exists(sys_get_temp_dir().'/abc/def/xy/abc.mock')) unlink(sys_get_temp_dir().'/abc/def/xy/abc.mock'); \n if (file_exists(sys_get_temp_dir().'/abc/def/xy/dd.mock')) unlink(sys_get_temp_dir().'/abc/def/xy/dd.mock'); \n if (file_exists(sys_get_temp_dir().'/abc/def/xy')) rmdir(sys_get_temp_dir().'/abc/def/xy'); \n if (file_exists(sys_get_temp_dir().'/abc/def')) rmdir(sys_get_temp_dir().'/abc/def'); \n if (file_exists(sys_get_temp_dir().'/abc')) rmdir(sys_get_temp_dir().'/abc'); \n \n if (file_exists(\"{$this->dir}/dir2\")) rmdir(\"{$this->dir}/dir2\");\n if (file_exists($this->dir)) rmdir($this->dir);\n \n Config_Mock_Unserialize:$created = array();\n unset(Q\\Transform::$drivers['from-mock']);\n }", "function cleanUpTmpFiles($target){\n if (is_dir($target)) {\n $files = glob($target . '*', GLOB_MARK); //GLOB_MARK adds a slash to directories returned\n\n foreach ($files as $file) {\n cleanUpTmpFiles($file);\n }\n\n // Checks if dir is empty\n if (!(new FilesystemIterator($target))->valid()) {\n rmdir($target);\n }\n } elseif (is_file($target)) {\n unlink($target);\n }\n}", "public function testMoveDirectoryMovesEntireDirectoryAndOverwrites()\n {\n mkdir(self::$temp.DS.'tmp4', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp4'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp4'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp4'.DS.'nested'.DS.'baz.txt', '');\n\n mkdir(self::$temp.DS.'tmp5', 0777, true);\n file_put_contents(self::$temp.DS.'tmp5'.DS.'foo2.txt', '');\n file_put_contents(self::$temp.DS.'tmp5'.DS.'bar2.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp4', self::$temp.DS.'tmp5', true);\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp5'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp5'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'foo2.txt'));\n $this->assertFalse(is_file(self::$temp.DS.'tmp5'.DS.'bar2.txt'));\n $this->assertFalse(is_dir(self::$temp.DS.'tmp4'));\n }", "public function testDirectoryFunctions()\n {\n $dir = 'pear-service-amazon-s3://' . $this->bucketName . '/dir';\n $this->assertFalse(file_exists($dir));\n $this->assertTrue(mkdir($dir));\n $this->assertTrue(is_dir($dir));\n $this->assertTrue(is_readable($dir));\n $this->assertTrue(is_writable($dir));\n $this->assertFalse(is_file($dir));\n $this->assertTrue(rmdir($dir));\n clearstatcache();\n $this->assertFalse(file_exists($dir));\n }", "public function testRemoveDummyTestFileAfterDoneTest()\n {\n unlink(TESTING_STORE);\n\n // boolean result must be === false\n $this->assertFalse(file_exists(TESTING_STORE));\n }", "public function tearDown(): void\n {\n if (is_dir($this->tmpPath)) {\n if (file_exists($this->oldFile)) {\n unlink($this->oldFile);\n }\n if (file_exists($this->origFile)) {\n unlink($this->origFile);\n }\n if (file_exists($this->newFile)) {\n unlink($this->newFile);\n }\n if (is_dir($this->newDir)) {\n if (file_exists($this->newDirFile)) {\n unlink($this->newDirFile);\n }\n rmdir($this->newDir);\n }\n rmdir($this->tmpPath);\n }\n }", "public function tearDown() {\n\t\tif(is_dir('/tmp/clara')) {\n\t\t\t$this->rrmdir('/tmp/clara');\n\t\t}\n\t}", "public function testOnDeletedDirectory() {\n\n $obj = new FileSystemStorageProvider($this->logger, $this->directory);\n\n $this->dir3->setParent($this->dir1); // This directory was moved.\n\n $obj->onDeletedDirectory($this->dir3);\n $this->assertFileNotExists($this->directory . \"/1/3\");\n\n $obj->onDeletedDirectory($this->dir2);\n $this->assertFileNotExists($this->directory . \"/1/2\");\n\n $obj->onDeletedDirectory($this->dir1);\n $this->assertFileNotExists($this->directory . \"/1\");\n }", "public function testCreateSubDirsWithExistingDirectory()\n {\n mkdir($this->dir.'56');\n $this->assertNotEmpty($this->hd->getHash());\n }", "public function testMoveDirectoryMovesEntireDirectory()\n {\n mkdir(self::$temp.DS.'tmp2', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'foo.txt', '');\n file_put_contents(self::$temp.DS.'tmp2'.DS.'bar.txt', '');\n\n mkdir(self::$temp.DS.'tmp2'.DS.'nested', 0777, true);\n file_put_contents(self::$temp.DS.'tmp2'.DS.'nested'.DS.'baz.txt', '');\n\n Storage::mvdir(self::$temp.DS.'tmp2', self::$temp.DS.'tmp3');\n\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'foo.txt'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'bar.txt'));\n $this->assertTrue(is_dir(self::$temp.DS.'tmp3'.DS.'nested'));\n $this->assertTrue(is_file(self::$temp.DS.'tmp3'.DS.'nested'.DS.'baz.txt'));\n\n $this->assertFalse(is_dir(self::$temp.DS.'tmp2'));\n }", "abstract function delete_dir($filepath);", "function remove_client_dir(){\n\t\t$cmd=\"rm -rf $this->client_dir\";\n\t\t`$cmd`;\n\t}", "protected function tearDown()\n {\n \\RPI\\Foundation\\Helpers\\FileUtils::delTree(__DIR__.\"/LESSPHPTest/ROOT\");\n }", "public static function removeTempDir()\n {\n $tmpDir = self::getTempDir();\n\n array_map('unlink', glob(\"$tmpDir/*.*\"));\n array_map('unlink', glob(\"$tmpDir/*/*.*\"));\n array_map('unlink', glob(\"$tmpDir/*/*/*.*\"));\n array_map('unlink', glob(\"$tmpDir/*/*/*/*.*\"));\n array_map('unlink', glob(\"$tmpDir/*/*/*/*/*.*\"));\n array_map('rmdir', glob(\"$tmpDir/*/*/*/*\", GLOB_ONLYDIR));\n array_map('rmdir', glob(\"$tmpDir/*/*/*\", GLOB_ONLYDIR));\n array_map('rmdir', glob(\"$tmpDir/*/*\", GLOB_ONLYDIR));\n array_map('rmdir', glob(\"$tmpDir/*\", GLOB_ONLYDIR));\n is_dir($tmpDir) and rmdir($tmpDir);\n }" ]
[ "0.7788672", "0.76651603", "0.7491406", "0.73429984", "0.73013794", "0.71828717", "0.715201", "0.6991792", "0.69013095", "0.6786815", "0.6779039", "0.6778822", "0.66575205", "0.66531", "0.65665174", "0.65494186", "0.6527012", "0.6483709", "0.6471884", "0.6419089", "0.6408338", "0.64025337", "0.6372909", "0.6368823", "0.63438916", "0.6334712", "0.63229966", "0.6289897", "0.6289009", "0.62825686" ]
0.8669114
0
Test for Directory::scan() Scan the content of ROOT directory
public function test_scan() { $content = array('.','..','application','.git','.gitignore','.htaccess','index.php','nbproject','README','system'); $object = Directory::factory(ROOT); $res = $object->scan(Directory::SORT_ASC); $output = array(); foreach($res as $f) $output[] = $f->get_base_name(); $this->assertEquals($content, $output); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_scan_directories()\n {\n $content = array('.','..','application','.git','nbproject','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_DIRS);\n \n $this->assertEquals(count($content), count($res));\n foreach($res as $path=>$dir){\n $this->assertTrue(in_array($dir->get_base_name(), $content));\n $this->assertInstanceOf('\\Kaili\\Directory', $dir);\n }\n }", "public function test_scan_files()\n {\n $content = array('.gitignore','.htaccess','index.php','README');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_FILES);\n \n $this->assertEquals(count($content), count($res));\n foreach($res as $path=>$dir){\n $this->assertTrue(in_array($dir->get_base_name(), $content));\n $this->assertInstanceOf('\\Kaili\\File', $dir);\n }\n }", "private function scanFolder()\n {\n return scandir($this->currentPath);\n }", "function rScanDir($scanMe) {\r\n\t\tglobal $path, $tmpPath, $cur_folder, $tags2;\r\n\t\tforeach($scanMe as $folder)\r\n\t\t{\r\n\t\t\tif(is_dir($path.$tmpPath.$folder) && $folder !=\".\" && $folder !=\"..\")\r\n\t\t\t{\r\n\t\t\t\t$cur_folder[] = $tmpPath.$folder;\r\n\t\t\t\techo \"getTagString input:\".$tmpPath.$folder.\"<br/>\";\r\n\t\t\t\t$tags2[] = getTagString($tmpPath.$folder);\r\n\t\t\t\t$tmpPath .= $folder.\"/\";\r\n\t\t\t\trScanDir(scandir($path.$tmpPath));\r\n\t\t\t}\r\n\t\t}\r\n\t\t$tmpPath = substr($tmpPath, 0, strrpos($tmpPath, \"/\"));\r\n\t\t$tmpPath = substr($tmpPath, 0, strrpos($tmpPath, \"/\")+1);\r\n\t}", "private function __scanDir($dir) {\n\n if ($dir == '/') {\n $dir = $this->startDirectory;\n $this->__currentDirectory = $dir;\n }\n\n $strippedDir = str_replace('/', '', $dir);\n\n $dir = ltrim($dir, \"/\");\n\n // Prevent listing blacklisted directories\n if (in_array($strippedDir, $this->ignoredDirectories)) {\n return false;\n }\n\n if (! file_exists($dir) || !is_dir($dir)) {\n return false;\n }\n\n return scandir($dir);\n }", "protected function scanDir()\n {\n $this->moduleList = [];\n foreach ($this->getVendorList() as $vendorName) {\n $this->moduleList[$vendorName] = [];\n }\n\n $this->readModules();\n }", "function DNUI_scan_dir($dirBase) {\r\n return array_diff(scandir($dirBase), array('..', '.'));\r\n}", "private function scan_directory($dir, $scan = \"\", &$nb_files = 0, &$nb_errors = 0){\n\t\t//Si c est la ou on etait , alors on reprend\n\t\tif ($dir == $scan or $scan == \"\"){\n\t\t\t$scan = \"\";\n\t\t\tDB::delete(\"delete from movies where directory = ?\",array($dir));\n\t\t\t$files = scandir($dir);\n\t\t\tforeach ($files as $file){\n\t\t\t\tif ($file != \"..\" and $file != \".\"){\n\t\t\t\t\tif (is_dir($dir.\"/\".$file)){\n\t\t\t\t\t\t$this->scan_directory($dir.\"/\".$file, $scan, $nb_files, $nb_errors);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tforeach (config(\"app.MOVIES_FILES\") as $ext){\n\t\t\t\t\t\t\tif (stripos($file,\".\".$ext) !== false){\n\t\t\t\t\t\t\t\t//Analyse du fichier\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$movie = new Movie();\n\t\t\t\t\t\t\t\t//On rajoute le fichier en base\t\t\t\t\t\n\t\t\t\t\t\t\t\t$movie->directory = $dir;\n\t\t\t\t\t\t\t\t$movie->filename = $file;\n\t\t\t\t\t\t\t\t$movie->status = -1;\n\t\t\t\t\t\t\t\t$movie->save();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t$movie->name = $this->remove($file);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$movie->status = 1;\n\t\t\t\t\t\t\t\t\t$movie->save();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$nb_files++;\n\t\t\t\t\t\t\t\t}catch(\\Exception $e){\n\t\t\t\t\t\t\t\t\t//Next...\n\t\t\t\t\t\t\t\t\t$nb_errors++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$json = [];\n\t\t\t$json[\"updated\"] = date(\"Y-m-d H:i:s\");\n\t\t\t$json[\"nb_files\"] = $nb_files;\n\t\t\t$json[\"nb_errors\"] = $nb_errors;\n\t\t\t$json[\"scan\"] = $scan;\n\t\t\tfile_put_contents(storage_path().\"/scan_movies.txt\",json_encode($json));\n\t\t}else{\n\t\t\t//Sinon, on reparcourt a partir de l'endroit, ou on etait\n\t\t\t$files = scandir($dir);\n\t\t\tforeach ($files as $file){\n\t\t\t\tif ($file != \"..\" and $file != \".\"){\n\t\t\t\t\tif (is_dir($dir.\"/\".$file)){\n\t\t\t\t\t\t$this->scan_directory($dir.\"/\".$file, $scan, $nb_files, $nb_errors);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private function directoryScan($dir) {\n\t\t\n\t\t// check for the validity of input / working directory\n\t\t\n\t\tif (!is_dir($dir)) {\n\t\t\tdie(\"'$dir' is not a directory.\".LE);\n\t\t}\n\t\t\n\t\t// listing directory contents\n\t\t\n\t\t$result = [];\n\t\t\n\t\t$root = scandir($dir);\n\t\tforeach($root as $value)\n\t\t{\n\t\t\t// removing dots & output directory\n\t\t\t\n\t\t\tif($value === '.' || $value === '..') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// listing only files\n\t\t\t\n\t\t\tif(is_file(\"$dir\".DS.\"$value\")) {\n\t\t\t\t$result[$value]=\"$dir\".DS.\"$value\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// recursive call to self(this method) so we can get files listing recursively\n\t\t\t\n\t\t\tforeach($this->directoryScan(\"$dir\".DS.\"$value\") as $value1)\n\t\t\t{\n\t\t\t\t$result[basename($value1)]=$value1;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "function scanDir() {\r\n $returnArray = array();\r\n \r\n if ($handle = opendir($this->uploadDirectory)) {\r\n \r\n while (false !== ($file = readdir($handle))) {\r\n if (is_file($this->uploadDirectory.\"/\".$file)) {\r\n $returnArray[] = $file;\r\n }\r\n }\r\n \r\n closedir($handle);\r\n }\r\n else {\r\n die(\"<b>ERROR: </b> No se puede leer el directorio <b>\". $this->uploadDirectory.'</b>');\r\n }\r\n return $returnArray; \r\n }", "function scanDir($cfg) //$view, $tdir , $subdir='', $match)\n {\n $ff = HTML_FlexyFramework::get();\n \n $subdir = $cfg['subdir'];\n $scandir = $cfg['tdir']. (empty($subdir) ? '' : '/') . $subdir;\n \n if (in_array($subdir, $cfg['skipdir'])) {\n return array();\n }\n // skip dom_templates\n \n if (!file_exists($scandir)) {\n return array();\n }\n $dh = opendir($scandir);\n if(!$dh){\n return array(); // something went wrong!?\n }\n $ret = array();\n \n while (($fn = readdir($dh)) !== false) {\n // do we care that it will try and parse the template directory??? - not really..\n // as we are only looking for php files..\n if(empty($fn) || $fn[0] == '.'){\n continue;\n }\n \n $fullpath = $scandir.(empty($scandir) ? '' : \"/\").$fn;\n // echo \"filename: $fullpath \\n\";\n \n if (is_link($fullpath)) {\n continue;\n }\n \n if(is_dir($fullpath)){\n // then recursively call self...\n $cfg['subdir'] = $subdir . (empty($subdir) ? '' : '/') . $fn;\n $children = $this->scanDir($cfg);\n if (count($children)) {\n $ret = array_merge($ret, $children);\n \n }\n continue;\n \n }\n \n if (!preg_match($cfg['match'], $fn) || !is_file($fullpath)) {\n continue;\n }\n \n \n \n $ret[] = $subdir . (empty($subdir) ? '' : '/'). $fn; /// this used to be strtolower?? why???\n\n \n \n }\n// print_r($ret);\n \n return $ret;\n \n \n \n \n }", "function scan($dir){\n\n\t$files = array();\n\n\t// Is there actually such a folder/file?\n\n\tif(file_exists($dir)){\n\t\n\t\tforeach(scandir($dir) as $f) {\n\t\t\n\t\t\tif(!$f || $f[0] == '.') {\n\t\t\t\tcontinue; // Ignore hidden files\n\t\t\t}\n\n\t\t\tif(is_dir($dir . '/' . $f)) {\n\n\t\t\t\t// The path is a folder\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"folder\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"items\" => scan($dir . '/' . $f) // Recursively get the contents of the folder\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\n\t\t\t\t// It is a file\n\t\t\t\t$path_info = pathinfo($f);\n\t\t\t\t//if ($path_info && $path_info.extension )\n\t\t\t\t$ext = $path_info['extension'];\n\t\t\t\tif($ext =='html'||$ext =='jpg' || $ext ==='png' || $ext == 'pdf'){\n\t\t\t\t\t$text = ($ext =='html') ?'doc':'image';\n\t\t\t\t\t$files[] = array(\n\t\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\t\"type\" => \"file\",\n\t\t\t\t\t\t\"text\" => $text,\n\t\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\t\"size\" => filesize($dir . '/' . $f) // Gets the size of this file\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t}\n\n\treturn $files;\n}", "public function test_search()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search('/(index.php|.htaccess)/');\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n $this->assertArrayHasKey(ROOT.DS.'.htaccess', $res);\n }", "function scan($dir){\n\n\t$files = array();\n\n\t// Is there actually such a folder/file?\n\n\tif(file_exists($dir)){\n\t\n\t\tforeach(scandir($dir) as $f) { // scandir() accepts the full path of the folder to be scanned\n\t\t\n\t\t\tif(!$f || $f[0] == '.') {\n\n\t\t\t\t// It is a hidden file\n\t\t\t\t\n\t\t\t\tcontinue; \n\t\t\t}\n\n\t\t\tif(is_dir($dir . '/' . $f)) {\n\n\t\t\t\t// The path is a folder\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"folder\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"items\" => scan($dir . '/' . $f) // Recursively get the contents of the folder\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\n\t\t\t\t// It is a file\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"file\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"size\" => filesize($dir . '/' . $f) // Gets the size of this file\n\t\t\t\t);\n\t\t\t}\n\n\t\t}\n\t\n\t}\n\n\treturn $files;\n}", "function scan(SplFileInfo $fileInfo, $repository)\n{\n $baseName = $fileInfo->getBasename();\n if ($baseName === '.' || $baseName === '..') {\n return;\n }\n\n $file = new File($fileInfo);\n $repository->save($file);\n if ($fileInfo->isDir()) {\n foreach (new RecursiveDirectoryIterator($fileInfo) as $child) {\n scan($child, $repository);\n }\n }\n}", "function scanFiles($dir){\n $path = __DIR__ . DIRECTORY_SEPARATOR . $dir; /** Nurodomas kelias iki jsons folderio */\n $files = scandir($path); /** Nuskenuoja folderi pagal kelia($path) ir grazina esanciu failu masyva */\n\n return $files;\n}", "function scan_directory_recursively($directory, $filter=FALSE)\n{\n\tif(substr($directory,-1) == '/')\n\t{\n\t\t$directory = substr($directory,0,-1);\n\t}\n\tif(!file_exists($directory) || !is_dir($directory))\n\t{\n\t\treturn FALSE;\n\t}elseif(is_readable($directory))\n\t{\n\t\t$directory_list = opendir($directory);\n\t\twhile($file = readdir($directory_list))\n\t\t{\n\t\t\tif($file != '.' && $file != '..' && $file != '.DS_Store' && $file != '.svn')\n\t\t\t{\n\t\t\t\t$path = $directory.'/'.$file;\n\t\t\t\tif(is_readable($path))\n\t\t\t\t{\n\t\t\t\t\t$subdirectories = explode('/',$path);\n\t\t\t\t\tif(is_dir($path))\n\t\t\t\t\t{\n\t\t\t\t\t\t$directory_tree[] = array(\n\t\t\t\t\t\t\t'path' => $path,\n\t\t\t\t\t\t\t'name' => end($subdirectories),\n\t\t\t\t\t\t\t'modified'\t=> filemtime($path),\n\t\t\t\t\t\t\t'kind' => 'directory',\n\t\t\t\t\t\t\t'content' => scan_directory_recursively($path, $filter));\n\t\t\t\t\t}elseif(is_file($path))\n\t\t\t\t\t{\n\t\t\t\t\t\t$extension = end(explode('.',end($subdirectories)));\n\t\t\t\t\t\tif($filter === FALSE || $filter == $extension)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Get metadata and image dimensions\n\t\t\t\t\t\t\t$size = getimagesize($path, $info);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Get containing directory of file\n\t\t\t\t\t\t\t$directory_array = explode('/', $path);\n\t\t\t\t\t\t\t$parent_folder = min($directory_array);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Reset title, caption, tags\n\t\t\t\t\t\t\t$title = $caption = $taglist = $tags = '';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$directory_tree[] = array(\n\t\t\t\t\t\t\t'path'\t\t=> dirname($path),\n\t\t\t\t\t\t\t'group'\t\t=> $parent_folder,\n\t\t\t\t\t\t\t'file'\t\t=> end($subdirectories),\n\t\t\t\t\t\t\t'extension' => $extension,\n\t\t\t\t\t\t\t'size'\t\t=> filesize($path),\n\t\t\t\t\t\t\t'width'\t\t=> $size[0],\n\t\t\t\t\t\t\t'height'\t=> $size[1],\n\t\t\t\t\t\t\t'modified'\t=> filemtime($path),\n\t\t\t\t\t\t\t'title'\t\t=> $title,\n\t\t\t\t\t\t\t'caption'\t=> $caption,\n\t\t\t\t\t\t\t'tags'\t\t=> $tags,\n\t\t\t\t\t\t\t'kind'\t\t=> 'file');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tclosedir($directory_list); \n\t\treturn $directory_tree;\n\t}else{\n\t\treturn FALSE;\t\n\t}\n}", "public function scan($filename){ }", "function scan_dir($dir, $type=array(),$only=FALSE, $allFiles=FALSE, $recursive=TRUE, $onlyDir=\"\", &$files){\n\t$handle = @opendir($dir);\n\tif(!$handle)\n\t\treturn false;\n\twhile ($file = @readdir ($handle))\n\t{\n\t\tif (eregi(\"^\\.{1,2}$\",$file) || $file == 'index.html')\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\t\tif(!$recursive && $dir != $dir.$file.\"/\")\n\t\t{\n\t\t\tif(is_dir($dir.$file))\n\t\t\t\tcontinue;\n\t\t}\n\t\tif(is_dir($dir.$file))\n\t\t{\n\t\t\tscan_dir($dir.$file.\"/\", $type, $only, $allFiles, $recursive, $file, $files);\n\t\t}\n\t\telse\n\t\t{\n if($only)\n\t\t\t\t$onlyDir = $dir;\n\n\t\t\t$files = buildArray($dir,$file,$onlyDir,$type,$allFiles,$files);\n\t\t}\n\t}\n\t@closedir($handle);\n\treturn $files;\n}", "function searchDir($root,$path,&$data)\n\t{\n\t\t$full_path = $root.$path;\n\t\tif(is_dir($full_path))\n\t\t{\n\t\t\t$dp=dir($full_path);\n\t\t\twhile($file=$dp->read())\n\t\t\t{\n\t\t\t\tif($file!='.'&& $file!='..')\n\t\t\t\t{\n\t\t\t\t\tsearchDir($root,$path.'/'.$file,$data);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$dp->close();\n\t\t}\n\t\tif(is_file($full_path))\n\t\t{\n\t\t\t$data[]=$path;\n\t\t}\n\t}", "function scan_directory($dir, $ext = '*', $recurse = true) {\n $files = array ();\n if ($handle = opendir($dir)) {\n while (false !== ($file = readdir($handle))) {\n if ($file == '.' || $file == '..' ||\n $file == 'CVS' || preg_match('|^\\.|', $file)) {\n continue;\n }\n if (is_link($dir . '/' . $file)) {\n continue;\n }\n if (is_dir ($dir . '/' . $file)) {\n if ($recurse == true)\n $files = array_merge($files, scan_directory ($dir . '/' . $file, $ext));\n } else {\n if($ext == get_file_extension($file) || $ext == '*') {\n $files[] = $dir . '/' . $file;\n }\n }\n }\n closedir($handle);\n }\n return $files;\n}", "function dirscan_files($rootFolder){\n $fileNames=[]; // will get filled\n foreach (scandir($rootFolder) as $name){\n if ($name=='.' || $name=='..') continue;\n if (!is_dir($rootFolder.\"/\".$name)) $fileNames[]=$name;\n }\n sort($fileNames);\n return $fileNames;\n}", "public function dir_readdir() {}", "function scanfiles( $path = '' ) {\n\t\t\t\n\t\t\tglobal $bwpsoptions;\n\t\t\t\n\t\t\t$tz = get_option( 'gmt_offset' ) * 60 * 60;\n\n $data = array();\n\n\t\t\tif ( $dirHandle = @opendir( ABSPATH . $path ) ) { //get the directory\n\t\t\t\n\t\t\t\twhile ( ( $item = readdir( $dirHandle ) ) !== false ) { // loop through dirs\n\t\t\t\t\t\n\t\t\t\t\tif ( $item != '.' && $item != '..' ) { //don't scan parent/etc\n\n\t\t\t\t\t\t$relname = $path . $item;\n \n\t\t\t\t\t\t$absname = ABSPATH . $relname;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( $this->checkFile( $relname ) == true ) { //make sure the user wants this file scanned\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( filetype( $absname ) == 'dir' ) { //if directory scan it\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$data = array_merge( $data, $this->scanfiles( $relname . '/' ) );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} else { //is file so add to array\n\n\t\t\t\t\t\t\t\t$data[$relname] = array();\n\t\t\t\t\t\t\t\t$data[$relname]['mod_date'] = @filemtime( $absname ) + $tz;\n\t\t\t\t\t\t\t\t$data[$relname]['hash'] = @md5_file( $absname );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} \n\t\t\t\t\n\t\t\t\t@closedir( $dirHandle ); //close the directory we're working with\n \n\t\t\t} \n\t\t\t\n\t\t\treturn $data; // return the files we found in this dir\n\t\t\t\n\t\t}", "public function test_search_by_name()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search_by_name('index.php');\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n }", "public function backgroundScan() {\n\t\t$lastPath = null;\n\t\twhile (($path = $this->cache->getIncomplete()) !== false && $path !== $lastPath) {\n\t\t\t$this->scan($path, self::SCAN_RECURSIVE, self::REUSE_ETAG);\n\t\t\t$this->cache->correctFolderSize($path);\n\t\t\t$lastPath = $path;\n\t\t}\n\t}", "protected static function _scanForPlugins(){\n\t\t$directory = __DIR__ . Config::$pluginsDirectory;\n\t\t$handle = opendir( $directory );\n\n\t\t// check to make sure we could open the directory handle\n\t\tif( !$handle )\n\t\t\treturn;\n\n\t\t// now begin looping through all of the contents of the plugin directory\n\t\twhile( ( $dir = readdir( $handle ) ) !== false ){\n\t\t\tif( $dir === '.' || $dir === '..' )\n\t\t\t\tcontinue;\n\n\t\t\t// now we need to verify that the current \"file\" is a directory before continuing\n\t\t\tif( !is_dir( $directory . $dir ) )\n\t\t\t\tcontinue;\n\n\t\t\t// expect a class file to exist in the format \"class-<DirectoryName>.php\"\n\t\t\t$classFile = $directory . $dir . '/' . $dir . '.php';\n\t\t\tif( !file_exists( $classFile ) )\n\t\t\t\tcontinue;\n\n\t\t\t// now actually include the code\n\t\t\trequire_once( $classFile );\n\n\t\t\t// now expect the class name to match whatever the $dir name was\n\t\t\tif( !class_exists( $dir ) )\n\t\t\t\tcontinue;\n\n\t\t\t// now we can instantiate the class name and store it now\n\t\t\tself::$_plugins[] = new $dir();\n\t\t}\n\t}", "static function AJAX_Scan() {\n\t\t$list = RecursiveScanDir(__DIR__);\n\t\tusort($list, \"strnatcasecmp\");\n\t\t\n\t\t// No files?\n\t\tif (!$list || !count($list)) die(\"No .php files located in this<br />folder and/or subfolders\");\n\t\t\n\t\t// For each file we'll present something nice\n\t\t$out = \"\";\n\t\tforeach($list as $file) {\n\t\t\t\n\t\t\t// If Mode is set to 1, we need to parse the file and check the completion\n\t\t\t$analysis = \"\";\n\t\t\tif ($_POST['Mode']) {\n\t\t\t\t$analysis = DocBlock::AnalyzeFile($file);\n\t\t\t}\n\t\t\t\n\t\t\t$out .= \"\n\t\t\t\t$analysis<a href='#' data-filename='\".rawurlencode($file).\"' class='filelink'>$file</a><br />\n\t\t\t\";\n\t\t}\n\t\t\n\t\t// Ouptut\n\t\techo $out;\n\t\t\n\t\t// Exit \"Gracefully\"\n\t\texit(0);\n\t}", "function l10n_drupal_files_scan($source = NULL, $automated = FALSE) {\n\n // We look for projects in the working directory.\n $workdir = variable_get('l10n_server_connector_l10n_drupal_files_directory', '');\n\n if (!is_dir($workdir)) {\n drupal_set_message(t('The configured directory (%workdir) cannot be found. <a href=\"@configure\">Check your configuration</a>.', array('%workdir' => $workdir, '@configure' => url('admin/l10n_server/connectors/config/l10n_drupal/files'))));\n }\n else {\n // define a list of allowed extensions, we will use it later on file_scan_directory\n // and further regular expression buildung processing. Thanks to EugenMayer\n $allowed_file_extensions = array('.tar.gz', '.tgz');\n // build the regular expression\n foreach($allowed_file_extensions as $key => $extension) {\n // escape the file extensions for later regular expression usage\n $allowed_file_extensions[$key] = preg_quote($extension);\n }\n $file_extension_pattern = '(' . implode('|', $allowed_file_extensions) . ')$';\n\n // Packages are always .tar.gz files.\n $files = file_scan_directory($workdir, $file_extension_pattern);\n if (count($files)) {\n foreach ($files as $path => $file) {\n\n if (!l10n_drupal_is_supported_version($path)) {\n // Skip files for unsupported versions.\n continue;\n }\n\n // Get rid of $workdir prefix on file names, eg.\n // drupal-6.x-6.19.tar.gz\n // Drupal/drupal-4.6.7.tar.gz or\n // files/Ubercart/ubercart-5.x-1.0-alpha8.tar.gz.\n $path = $package = trim(preg_replace('!(^' . preg_quote($workdir, '!') . ')(.+)\\.tar\\.gz!', '\\2', $path), '/');\n\n // split the filename into parts to $filename_splitted\n // [0] = the full string\n // [1] = the subdirectory and filename with extension\n // [1] = the subdirectory and filename without extension\n // [2] = the extension .tar.gz or .tgz\n $file_splitted = array(); // ensure to be a array....\n // the regular expression pattern (i put it in a var because i can better handle it with dpm for debugging, move if you want...)\n $file_split_pattern = '!^'. preg_quote($workdir, '!') .'((.+)'. $file_extension_pattern .')!';\n preg_match( $file_split_pattern, $path, $file_splitted );\n // put the result in vars for better handling\n list($file_fullpath, $file_subpath_ext, $file_subpath, $file_extension) = $file_splitted;\n\n // redefine the path to subpath without slash at beginning\n $path = trim($file_subpath, '/');\n // same on package\n $package = trim($file_subpath, '/');\n $project_title = '';\n if (strpos($path, '/')) {\n // We have a slash, so this package is in a subfolder.\n // Eg. Drupal/drupal-4.6.7 or Ubercart/ubercart-5.x-1.0-alpha8.\n // Grab the directory name as project title.\n list($project_title, $package) = explode('/', $path);\n }\n if (strpos($package, '-')) {\n // Only remaining are the project uri and release,\n // eg. drupal-4.6.7 or ubercart-5.x-1.0-alpha8.\n list($project_uri, $release_version) = explode('-', $package, 2);\n\n l10n_drupal_save_data($project_uri, ($project_title ? $project_title : $project_uri), $release_version, trim($file_subpath_ext, '/'), filemtime($file->filename));\n }\n else {\n // File name not formatted properly.\n $result['error'] = t('File name should have project codename and version number included separated with hyphen, such as drupal-5.2.tar.gz.');\n }\n }\n }\n }\n\n $user_feedback = FALSE;\n $results = db_query_range(\"SELECT * FROM {l10n_server_release} WHERE pid IN (SELECT pid FROM {l10n_server_project} WHERE connector_module = 'l10n_drupal_files' AND status = 1) ORDER BY last_parsed ASC\", 0, variable_get('l10n_server_connector_l10n_drupal_files_limit', 1));\n while ($release = db_fetch_object($results)) {\n\n // Only parse file if something changed since we last parsed it.\n $file_name = $workdir . '/' . $release->download_link;\n\n if (file_exists($file_name)) {\n if (filemtime($file_name) > $release->last_parsed) {\n $result = l10n_drupal_parse_package($file_name, $release);\n\n // User feedback, if not automated. Log messages are already done.\n if (isset($result['error']) && !$automated) {\n $user_feedback = TRUE;\n drupal_set_message($result['error'], 'error');\n }\n elseif (isset($result['message']) && !$automated) {\n $user_feedback = TRUE;\n drupal_set_message($result['message']);\n }\n }\n else {\n if (!$automated) {\n $user_feedback = TRUE;\n drupal_set_message(t('@release was already parsed, no need to scan again.', array('@release' => $release->download_link)));\n }\n }\n }\n // Hackish update of last parsed time so other tarballs will get into the queue too.\n // @todo: work on something better for this.\n db_query(\"UPDATE {l10n_server_release} SET last_parsed = %d WHERE rid = %d\", time(), $release->rid);\n }\n if (!$automated && !$user_feedback) {\n drupal_set_message(t('No (new) local Drupal files found to scan in %workdir.', array('%workdir' => $workdir)));\n }\n\n // Ensure that a Drupal page will be displayed with the messages.\n return '';\n}", "function scan_files( ){\n\n // List of all the audio files found in the directory and sub-directories\n $audioFileArray = array();\n\n // List of filenames already handled during the scan. To detect dupe filenames.\n $alreadyhandledFileArray = array();\n\n // Make list of all files in db to remove non existent files\n $DBaudioFileArray = array();\n foreach ( $this->get_list_of_files()->fetchAll() as $row ) {\n $DBaudioFileArray[] = $row['filename'];\n }\n\n // Prepare variables for file urls\n //$base_dir = dirname(dirname(realpath($this->filedirectorypath))); // Absolute path to your installation, ex: /var/www/mywebsite\n $doc_root = preg_replace(\"!{$_SERVER['SCRIPT_NAME']}$!\", '', $_SERVER['SCRIPT_FILENAME']); # ex: /var/www\n $protocol = empty($_SERVER['HTTPS']) ? 'http' : 'https';\n $port = $_SERVER['SERVER_PORT'];\n $disp_port = ($protocol == 'http' && $port == 80 || $protocol == 'https' && $port == 443) ? '' : \":$port\";\n $domain = $_SERVER['SERVER_NAME'];\n // variables for file urls\n\n // Create recursive dir iterator which skips dot folders\n $dir = new RecursiveDirectoryIterator( $this->filedirectorypath , FilesystemIterator::SKIP_DOTS);\n\n // Flatten the recursive iterator, consider only files, no directories\n $it = new RecursiveIteratorIterator($dir);\n\n // Find all the mp3 files\n foreach ($it as $fileinfo) {\n if ($fileinfo->isFile() && !strcmp($fileinfo->getExtension(), \"mp3\")) {\n $audioFileArray[] = $fileinfo;\n\n //Warning: files with same md5key in different folders will not be inserted into the db.\n //print md5_file($fileinfo) . \"<br />\\n\";\n }\n }\n\n foreach ($audioFileArray as $key => $fileinfo) {\n\n $filename = $fileinfo->getFilename();\n\n //For each file found on disk remove entry from list from DB\n // if any left at the end, they are files that no longer are present on the drive.\n //print \"unsetting: \" . $filename . \"<br>\";\n unset($DBaudioFileArray[array_search($filename,$DBaudioFileArray,true)]);\n\n // check file not in db\n if( !$this->is_file_in_db( $filename ) ) {\n\n //decode filename date if named according to our naming scheme\n $date = $this->decode_filename($filename);\n\n // Build file url based on server path\n $filepath = realpath($fileinfo->getRealPath());\n $base_url = preg_replace(\"!^{$doc_root}!\", '', $filepath); # ex: '' or '/mywebsite'\n $full_url = \"$protocol://{$domain}{$disp_port}{$base_url}\"; # Ex: 'http://example.com', 'https://example.com/mywebsite', etc.\n\n //print $filename . \" - \" . $full_url . \"<br />\\n\";\n\n //insert audiofile in db for first time\n $this->insert_new_file_into_db( $filename, $full_url, $fileinfo->getRealPath(), $fileinfo->getSize(), $date );\n\n $alreadyhandledFileArray[$key] = $filename;\n\n } else {\n // if file in alreadyhandled array, then duplicate named files have been found\n // how to check for duplicate file names?\n // if we're here then the name has already ben added to the db (but maybe during a previous run)\n //we still need to look for the file in the alreadyhandledFileArray\n if( in_array($filename, $alreadyhandledFileArray) ){\n // flag file\n $this->flag_file($filename, \"Il y a 2 ou plusieurs fichiers audio avec le même nom dans le dossier audio du serveur ftp. Veuillez changer les noms ou supprimer les doublons.\");\n }\n }\n\n\n }\n\n // If there are files from the database that weren't found in the audio folder,\n // flag them and add a comment stating that the file can no longer be found.\n if( count($DBaudioFileArray) ){\n //print_r($DBaudioFileArray);\n foreach($DBaudioFileArray as $key => $fn){\n $this->flag_file($fn, \"Le fichier en question n'est plus présent dans le dossier audio du serveur ftp. Il faut le supprimer de la base de données.\");\n $this->set_file_not_new($fn);\n }\n }\n\n return true;\n }" ]
[ "0.7979879", "0.77180135", "0.7239821", "0.71102506", "0.68057096", "0.676981", "0.65207386", "0.64884", "0.6479395", "0.639054", "0.6378024", "0.6366621", "0.63291353", "0.62446964", "0.61983824", "0.61747074", "0.6162355", "0.6128189", "0.6079859", "0.6079535", "0.6075999", "0.6058093", "0.60260195", "0.60008717", "0.59994924", "0.5991255", "0.59684193", "0.59668815", "0.5936124", "0.5917058" ]
0.77456445
1
Test for Directory::scan() Scan only the directories inside ROOT directory
public function test_scan_directories() { $content = array('.','..','application','.git','nbproject','system'); $object = Directory::factory(ROOT); $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_DIRS); $this->assertEquals(count($content), count($res)); foreach($res as $path=>$dir){ $this->assertTrue(in_array($dir->get_base_name(), $content)); $this->assertInstanceOf('\Kaili\Directory', $dir); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function scanFolder()\n {\n return scandir($this->currentPath);\n }", "function rScanDir($scanMe) {\r\n\t\tglobal $path, $tmpPath, $cur_folder, $tags2;\r\n\t\tforeach($scanMe as $folder)\r\n\t\t{\r\n\t\t\tif(is_dir($path.$tmpPath.$folder) && $folder !=\".\" && $folder !=\"..\")\r\n\t\t\t{\r\n\t\t\t\t$cur_folder[] = $tmpPath.$folder;\r\n\t\t\t\techo \"getTagString input:\".$tmpPath.$folder.\"<br/>\";\r\n\t\t\t\t$tags2[] = getTagString($tmpPath.$folder);\r\n\t\t\t\t$tmpPath .= $folder.\"/\";\r\n\t\t\t\trScanDir(scandir($path.$tmpPath));\r\n\t\t\t}\r\n\t\t}\r\n\t\t$tmpPath = substr($tmpPath, 0, strrpos($tmpPath, \"/\"));\r\n\t\t$tmpPath = substr($tmpPath, 0, strrpos($tmpPath, \"/\")+1);\r\n\t}", "function DNUI_scan_dir($dirBase) {\r\n return array_diff(scandir($dirBase), array('..', '.'));\r\n}", "public function test_scan()\n {\n $content = array('.','..','application','.git','.gitignore','.htaccess','index.php','nbproject','README','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC);\n \n $output = array();\n foreach($res as $f) $output[] = $f->get_base_name();\n $this->assertEquals($content, $output);\n }", "public function test_scan_files()\n {\n $content = array('.gitignore','.htaccess','index.php','README');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_FILES);\n \n $this->assertEquals(count($content), count($res));\n foreach($res as $path=>$dir){\n $this->assertTrue(in_array($dir->get_base_name(), $content));\n $this->assertInstanceOf('\\Kaili\\File', $dir);\n }\n }", "private function __scanDir($dir) {\n\n if ($dir == '/') {\n $dir = $this->startDirectory;\n $this->__currentDirectory = $dir;\n }\n\n $strippedDir = str_replace('/', '', $dir);\n\n $dir = ltrim($dir, \"/\");\n\n // Prevent listing blacklisted directories\n if (in_array($strippedDir, $this->ignoredDirectories)) {\n return false;\n }\n\n if (! file_exists($dir) || !is_dir($dir)) {\n return false;\n }\n\n return scandir($dir);\n }", "protected function scanDir()\n {\n $this->moduleList = [];\n foreach ($this->getVendorList() as $vendorName) {\n $this->moduleList[$vendorName] = [];\n }\n\n $this->readModules();\n }", "private function directoryScan($dir) {\n\t\t\n\t\t// check for the validity of input / working directory\n\t\t\n\t\tif (!is_dir($dir)) {\n\t\t\tdie(\"'$dir' is not a directory.\".LE);\n\t\t}\n\t\t\n\t\t// listing directory contents\n\t\t\n\t\t$result = [];\n\t\t\n\t\t$root = scandir($dir);\n\t\tforeach($root as $value)\n\t\t{\n\t\t\t// removing dots & output directory\n\t\t\t\n\t\t\tif($value === '.' || $value === '..') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// listing only files\n\t\t\t\n\t\t\tif(is_file(\"$dir\".DS.\"$value\")) {\n\t\t\t\t$result[$value]=\"$dir\".DS.\"$value\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// recursive call to self(this method) so we can get files listing recursively\n\t\t\t\n\t\t\tforeach($this->directoryScan(\"$dir\".DS.\"$value\") as $value1)\n\t\t\t{\n\t\t\t\t$result[basename($value1)]=$value1;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "function scanDir() {\r\n $returnArray = array();\r\n \r\n if ($handle = opendir($this->uploadDirectory)) {\r\n \r\n while (false !== ($file = readdir($handle))) {\r\n if (is_file($this->uploadDirectory.\"/\".$file)) {\r\n $returnArray[] = $file;\r\n }\r\n }\r\n \r\n closedir($handle);\r\n }\r\n else {\r\n die(\"<b>ERROR: </b> No se puede leer el directorio <b>\". $this->uploadDirectory.'</b>');\r\n }\r\n return $returnArray; \r\n }", "function scanDir($cfg) //$view, $tdir , $subdir='', $match)\n {\n $ff = HTML_FlexyFramework::get();\n \n $subdir = $cfg['subdir'];\n $scandir = $cfg['tdir']. (empty($subdir) ? '' : '/') . $subdir;\n \n if (in_array($subdir, $cfg['skipdir'])) {\n return array();\n }\n // skip dom_templates\n \n if (!file_exists($scandir)) {\n return array();\n }\n $dh = opendir($scandir);\n if(!$dh){\n return array(); // something went wrong!?\n }\n $ret = array();\n \n while (($fn = readdir($dh)) !== false) {\n // do we care that it will try and parse the template directory??? - not really..\n // as we are only looking for php files..\n if(empty($fn) || $fn[0] == '.'){\n continue;\n }\n \n $fullpath = $scandir.(empty($scandir) ? '' : \"/\").$fn;\n // echo \"filename: $fullpath \\n\";\n \n if (is_link($fullpath)) {\n continue;\n }\n \n if(is_dir($fullpath)){\n // then recursively call self...\n $cfg['subdir'] = $subdir . (empty($subdir) ? '' : '/') . $fn;\n $children = $this->scanDir($cfg);\n if (count($children)) {\n $ret = array_merge($ret, $children);\n \n }\n continue;\n \n }\n \n if (!preg_match($cfg['match'], $fn) || !is_file($fullpath)) {\n continue;\n }\n \n \n \n $ret[] = $subdir . (empty($subdir) ? '' : '/'). $fn; /// this used to be strtolower?? why???\n\n \n \n }\n// print_r($ret);\n \n return $ret;\n \n \n \n \n }", "function dirscan_files($rootFolder){\n $fileNames=[]; // will get filled\n foreach (scandir($rootFolder) as $name){\n if ($name=='.' || $name=='..') continue;\n if (!is_dir($rootFolder.\"/\".$name)) $fileNames[]=$name;\n }\n sort($fileNames);\n return $fileNames;\n}", "function scan_dir($dir){\n\tif( !is_dir( $dir ) )\n\t\treturn false;\n\n\t$files=scandir($dir);\n\n\t$dirs=array();\n\tforeach($files as $file){\n\t\tif($file=='.'||$file=='..'||substr($file,0,1)=='.')\n\t\t\tcontinue;\n\t\tif(is_dir($dir.'/'.$file))\n\t\t\tarray_push($dirs,$file);\n\t}\n\n\treturn $dirs;\n}", "function RecursiveScanDir($dir, $prefix = '') {\n\t$dir = rtrim($dir, '\\\\/');\n\t$result = array();\n\tforeach (scandir($dir) as $f) {\n if (\n preg_match('`/tmp/`', \"$dir/$f\")\n || preg_match('`/fpdf.php$`', \"$dir/$f\")\n || preg_match('`/libs/pi_barcode.php$`', \"$dir/$f\")\n || preg_match('`/libs/phpmailer/`', \"$dir/$f\")\n || preg_match('`/libs/securimage/`', \"$dir/$f\")\n || preg_match('`/libs/Smarty/`', \"$dir/$f\")\n )\n continue;\n\t\tif ($f !== '.' and $f !== '..') {\n\t\t\tif (is_dir(\"$dir/$f\")) {\n\t\t\t\t$result = array_merge($result, RecursiveScanDir(\"$dir/$f\", \"$prefix$f/\"));\n\t\t\t} else {\n\t\t\t\tif ( strtolower(substr(pathinfo($f,PATHINFO_EXTENSION),0,3)) == \"php\" && pathinfo(__FILE__,PATHINFO_BASENAME ) != pathinfo($f,PATHINFO_BASENAME ) )\n\t\t\t\t\t$result[] = $prefix.$f;\n\t\t\t}\n\t\t}\n\t}\n\treturn $result;\n}", "private function scan_directory($dir, $scan = \"\", &$nb_files = 0, &$nb_errors = 0){\n\t\t//Si c est la ou on etait , alors on reprend\n\t\tif ($dir == $scan or $scan == \"\"){\n\t\t\t$scan = \"\";\n\t\t\tDB::delete(\"delete from movies where directory = ?\",array($dir));\n\t\t\t$files = scandir($dir);\n\t\t\tforeach ($files as $file){\n\t\t\t\tif ($file != \"..\" and $file != \".\"){\n\t\t\t\t\tif (is_dir($dir.\"/\".$file)){\n\t\t\t\t\t\t$this->scan_directory($dir.\"/\".$file, $scan, $nb_files, $nb_errors);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tforeach (config(\"app.MOVIES_FILES\") as $ext){\n\t\t\t\t\t\t\tif (stripos($file,\".\".$ext) !== false){\n\t\t\t\t\t\t\t\t//Analyse du fichier\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$movie = new Movie();\n\t\t\t\t\t\t\t\t//On rajoute le fichier en base\t\t\t\t\t\n\t\t\t\t\t\t\t\t$movie->directory = $dir;\n\t\t\t\t\t\t\t\t$movie->filename = $file;\n\t\t\t\t\t\t\t\t$movie->status = -1;\n\t\t\t\t\t\t\t\t$movie->save();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t$movie->name = $this->remove($file);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$movie->status = 1;\n\t\t\t\t\t\t\t\t\t$movie->save();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$nb_files++;\n\t\t\t\t\t\t\t\t}catch(\\Exception $e){\n\t\t\t\t\t\t\t\t\t//Next...\n\t\t\t\t\t\t\t\t\t$nb_errors++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$json = [];\n\t\t\t$json[\"updated\"] = date(\"Y-m-d H:i:s\");\n\t\t\t$json[\"nb_files\"] = $nb_files;\n\t\t\t$json[\"nb_errors\"] = $nb_errors;\n\t\t\t$json[\"scan\"] = $scan;\n\t\t\tfile_put_contents(storage_path().\"/scan_movies.txt\",json_encode($json));\n\t\t}else{\n\t\t\t//Sinon, on reparcourt a partir de l'endroit, ou on etait\n\t\t\t$files = scandir($dir);\n\t\t\tforeach ($files as $file){\n\t\t\t\tif ($file != \"..\" and $file != \".\"){\n\t\t\t\t\tif (is_dir($dir.\"/\".$file)){\n\t\t\t\t\t\t$this->scan_directory($dir.\"/\".$file, $scan, $nb_files, $nb_errors);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function bob_scandir($root_path, $bad_path, $recursive) {\n $output = array();\n if (file_exists($root_path)){\n $paths = scandir($root_path);\n if ($paths === False)\n return False;\n foreach ($paths as $path) {\n $potential_path = \"${root_path}/${path}\";\n\n // Ignore any files in the bad (admin) path or files that begin with a period.\n if ($potential_path == $bad_path or $path[0] == '.')\n continue;\n\n $output[] = $potential_path;\n $bad_folder = ''; // not sure what this is for\n if ($recursive and is_dir($potential_path)) // Recursively descend and print out files.\n $output = array_merge($output, bob_scandir($potential_path, $bad_folder, $recursive));\n }\n }\n return $output;\n}", "function scan_directory($dir, $ext = '*', $recurse = true) {\n $files = array ();\n if ($handle = opendir($dir)) {\n while (false !== ($file = readdir($handle))) {\n if ($file == '.' || $file == '..' ||\n $file == 'CVS' || preg_match('|^\\.|', $file)) {\n continue;\n }\n if (is_link($dir . '/' . $file)) {\n continue;\n }\n if (is_dir ($dir . '/' . $file)) {\n if ($recurse == true)\n $files = array_merge($files, scan_directory ($dir . '/' . $file, $ext));\n } else {\n if($ext == get_file_extension($file) || $ext == '*') {\n $files[] = $dir . '/' . $file;\n }\n }\n }\n closedir($handle);\n }\n return $files;\n}", "function searchDir($root,$path,&$data)\n\t{\n\t\t$full_path = $root.$path;\n\t\tif(is_dir($full_path))\n\t\t{\n\t\t\t$dp=dir($full_path);\n\t\t\twhile($file=$dp->read())\n\t\t\t{\n\t\t\t\tif($file!='.'&& $file!='..')\n\t\t\t\t{\n\t\t\t\t\tsearchDir($root,$path.'/'.$file,$data);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$dp->close();\n\t\t}\n\t\tif(is_file($full_path))\n\t\t{\n\t\t\t$data[]=$path;\n\t\t}\n\t}", "public function test_search()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search('/(index.php|.htaccess)/');\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n $this->assertArrayHasKey(ROOT.DS.'.htaccess', $res);\n }", "function scan_dir($dir, $type=array(),$only=FALSE, $allFiles=FALSE, $recursive=TRUE, $onlyDir=\"\", &$files){\n\t$handle = @opendir($dir);\n\tif(!$handle)\n\t\treturn false;\n\twhile ($file = @readdir ($handle))\n\t{\n\t\tif (eregi(\"^\\.{1,2}$\",$file) || $file == 'index.html')\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\t\tif(!$recursive && $dir != $dir.$file.\"/\")\n\t\t{\n\t\t\tif(is_dir($dir.$file))\n\t\t\t\tcontinue;\n\t\t}\n\t\tif(is_dir($dir.$file))\n\t\t{\n\t\t\tscan_dir($dir.$file.\"/\", $type, $only, $allFiles, $recursive, $file, $files);\n\t\t}\n\t\telse\n\t\t{\n if($only)\n\t\t\t\t$onlyDir = $dir;\n\n\t\t\t$files = buildArray($dir,$file,$onlyDir,$type,$allFiles,$files);\n\t\t}\n\t}\n\t@closedir($handle);\n\treturn $files;\n}", "function dirscan_folders($rootFolder){\n $folderNames=[]; // will get filled\n foreach (scandir($rootFolder) as $name){\n if ($name=='.' || $name=='..') continue;\n if (is_dir($rootFolder.\"/\".$name)) \n $folderNames[]=$name;\n }\n sort($folderNames);\n return $folderNames;\n}", "public function scanSourceFolders() {\n $this->addons = [];\n foreach ($this->sources as $sourceDir) {\n $this->scanSource($sourceDir);\n }\n }", "function scanFiles($dir){\n $path = __DIR__ . DIRECTORY_SEPARATOR . $dir; /** Nurodomas kelias iki jsons folderio */\n $files = scandir($path); /** Nuskenuoja folderi pagal kelia($path) ir grazina esanciu failu masyva */\n\n return $files;\n}", "public function scanDirsRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, Dir>\n */\n return $this->scanRawRecursive(false, true, $filter, true);\n }", "function scan_directory_recursively($directory, $filter=FALSE)\n{\n\tif(substr($directory,-1) == '/')\n\t{\n\t\t$directory = substr($directory,0,-1);\n\t}\n\tif(!file_exists($directory) || !is_dir($directory))\n\t{\n\t\treturn FALSE;\n\t}elseif(is_readable($directory))\n\t{\n\t\t$directory_list = opendir($directory);\n\t\twhile($file = readdir($directory_list))\n\t\t{\n\t\t\tif($file != '.' && $file != '..' && $file != '.DS_Store' && $file != '.svn')\n\t\t\t{\n\t\t\t\t$path = $directory.'/'.$file;\n\t\t\t\tif(is_readable($path))\n\t\t\t\t{\n\t\t\t\t\t$subdirectories = explode('/',$path);\n\t\t\t\t\tif(is_dir($path))\n\t\t\t\t\t{\n\t\t\t\t\t\t$directory_tree[] = array(\n\t\t\t\t\t\t\t'path' => $path,\n\t\t\t\t\t\t\t'name' => end($subdirectories),\n\t\t\t\t\t\t\t'modified'\t=> filemtime($path),\n\t\t\t\t\t\t\t'kind' => 'directory',\n\t\t\t\t\t\t\t'content' => scan_directory_recursively($path, $filter));\n\t\t\t\t\t}elseif(is_file($path))\n\t\t\t\t\t{\n\t\t\t\t\t\t$extension = end(explode('.',end($subdirectories)));\n\t\t\t\t\t\tif($filter === FALSE || $filter == $extension)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Get metadata and image dimensions\n\t\t\t\t\t\t\t$size = getimagesize($path, $info);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Get containing directory of file\n\t\t\t\t\t\t\t$directory_array = explode('/', $path);\n\t\t\t\t\t\t\t$parent_folder = min($directory_array);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Reset title, caption, tags\n\t\t\t\t\t\t\t$title = $caption = $taglist = $tags = '';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$directory_tree[] = array(\n\t\t\t\t\t\t\t'path'\t\t=> dirname($path),\n\t\t\t\t\t\t\t'group'\t\t=> $parent_folder,\n\t\t\t\t\t\t\t'file'\t\t=> end($subdirectories),\n\t\t\t\t\t\t\t'extension' => $extension,\n\t\t\t\t\t\t\t'size'\t\t=> filesize($path),\n\t\t\t\t\t\t\t'width'\t\t=> $size[0],\n\t\t\t\t\t\t\t'height'\t=> $size[1],\n\t\t\t\t\t\t\t'modified'\t=> filemtime($path),\n\t\t\t\t\t\t\t'title'\t\t=> $title,\n\t\t\t\t\t\t\t'caption'\t=> $caption,\n\t\t\t\t\t\t\t'tags'\t\t=> $tags,\n\t\t\t\t\t\t\t'kind'\t\t=> 'file');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tclosedir($directory_list); \n\t\treturn $directory_tree;\n\t}else{\n\t\treturn FALSE;\t\n\t}\n}", "function scan(SplFileInfo $fileInfo, $repository)\n{\n $baseName = $fileInfo->getBasename();\n if ($baseName === '.' || $baseName === '..') {\n return;\n }\n\n $file = new File($fileInfo);\n $repository->save($file);\n if ($fileInfo->isDir()) {\n foreach (new RecursiveDirectoryIterator($fileInfo) as $child) {\n scan($child, $repository);\n }\n }\n}", "function scan($dir){\n\n\t$files = array();\n\n\t// Is there actually such a folder/file?\n\n\tif(file_exists($dir)){\n\t\n\t\tforeach(scandir($dir) as $f) { // scandir() accepts the full path of the folder to be scanned\n\t\t\n\t\t\tif(!$f || $f[0] == '.') {\n\n\t\t\t\t// It is a hidden file\n\t\t\t\t\n\t\t\t\tcontinue; \n\t\t\t}\n\n\t\t\tif(is_dir($dir . '/' . $f)) {\n\n\t\t\t\t// The path is a folder\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"folder\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"items\" => scan($dir . '/' . $f) // Recursively get the contents of the folder\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\n\t\t\t\t// It is a file\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"file\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"size\" => filesize($dir . '/' . $f) // Gets the size of this file\n\t\t\t\t);\n\t\t\t}\n\n\t\t}\n\t\n\t}\n\n\treturn $files;\n}", "public function scanDirs(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, Dir>\n */\n return $this->scanRaw(false, true, $filter, true);\n }", "protected function scanDirectory($dir, $include_tests) {\n $files = array();\n\n // In order to scan top-level directories, absolute directory paths have to\n // be used (which also improves performance, since any configured PHP\n // include_paths will not be consulted). Retain the relative originating\n // directory being scanned, so relative paths can be reconstructed below\n // (all paths are expected to be relative to $this->root).\n $dir_prefix = ($dir == '' ? '' : \"$dir/\");\n $absolute_dir = ($dir == '' ? $this->root : $this->root . \"/$dir\");\n\n if (!is_dir($absolute_dir)) {\n return $files;\n }\n // Use Unix paths regardless of platform, skip dot directories, follow\n // symlinks (to allow extensions to be linked from elsewhere), and return\n // the RecursiveDirectoryIterator instance to have access to getSubPath(),\n // since SplFileInfo does not support relative paths.\n $flags = \\FilesystemIterator::UNIX_PATHS;\n $flags |= \\FilesystemIterator::SKIP_DOTS;\n $flags |= \\FilesystemIterator::FOLLOW_SYMLINKS;\n $flags |= \\FilesystemIterator::CURRENT_AS_SELF;\n $directory_iterator = new \\RecursiveDirectoryIterator($absolute_dir, $flags);\n\n // Filter the recursive scan to discover extensions only.\n // Important: Without a RecursiveFilterIterator, RecursiveDirectoryIterator\n // would recurse into the entire filesystem directory tree without any kind\n // of limitations.\n $filter = new RecursiveExtensionFilterIterator($directory_iterator);\n $filter->acceptTests($include_tests);\n\n // The actual recursive filesystem scan is only invoked by instantiating the\n // RecursiveIteratorIterator.\n $iterator = new \\RecursiveIteratorIterator($filter,\n \\RecursiveIteratorIterator::LEAVES_ONLY,\n // Suppress filesystem errors in case a directory cannot be accessed.\n \\RecursiveIteratorIterator::CATCH_GET_CHILD\n );\n\n foreach ($iterator as $key => $fileinfo) {\n $name = $fileinfo->getBasename('.info.yml');\n\n if ($this->fileCache && $cached_extension = $this->fileCache->get($fileinfo->getPathName())) {\n $files[$cached_extension->getType()][$key] = $cached_extension;\n continue;\n }\n\n // Determine extension type from info file.\n $type = FALSE;\n $file = $fileinfo->openFile('r');\n while (!$type && !$file->eof()) {\n preg_match('@^type:\\s*(\\'|\")?(\\w+)\\1?\\s*$@', $file->fgets(), $matches);\n if (isset($matches[2])) {\n $type = $matches[2];\n }\n }\n if (empty($type)) {\n continue;\n }\n $name = $fileinfo->getBasename('.info.yml');\n $pathname = $dir_prefix . $fileinfo->getSubPathname();\n\n $filename = $name . '.' . $type;\n\n if (!file_exists(dirname($pathname) . '/' . $filename)) {\n $filename = NULL;\n }\n\n $extension = new Extension($this->root, $type, $pathname, $filename);\n\n // Track the originating directory for sorting purposes.\n $extension->subpath = $fileinfo->getSubPath();\n $extension->origin = $dir;\n\n $files[$type][$key] = $extension;\n\n if ($this->fileCache) {\n $this->fileCache->set($fileinfo->getPathName(), $extension);\n }\n }\n return $files;\n }", "public function scanDirPathsRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, string>\n */\n return $this->scanRawRecursive(false, true, $filter, false);\n }", "function dynamik_skins_folder_scan( $skin_check = false )\n{\n\tif( dynamik_dir_check( dynamik_get_skins_folder_path() ) )\n\t{\n\t\t$skin_folder_names = scandir( dynamik_get_skins_folder_path() );\n\t\tif( false != $skin_check )\n\t\t{\n\t\t\tif( in_array( $skin_check, $skin_folder_names ) )\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t}\n\telse\n\t{\n\t\treturn;\n\t}\t\n}" ]
[ "0.7312299", "0.7297761", "0.7171603", "0.71259856", "0.7107098", "0.70851773", "0.6768123", "0.65986484", "0.6514543", "0.63404167", "0.63298833", "0.63052875", "0.6296188", "0.62949747", "0.6283482", "0.6276984", "0.6272302", "0.6215177", "0.6211419", "0.61895525", "0.6150548", "0.6124031", "0.61190265", "0.6081099", "0.6054076", "0.6038476", "0.60114694", "0.5985352", "0.5979156", "0.59587705" ]
0.7933779
0
Test for Directory::scan() Scan only the files inside ROOT directory
public function test_scan_files() { $content = array('.gitignore','.htaccess','index.php','README'); $object = Directory::factory(ROOT); $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_FILES); $this->assertEquals(count($content), count($res)); foreach($res as $path=>$dir){ $this->assertTrue(in_array($dir->get_base_name(), $content)); $this->assertInstanceOf('\Kaili\File', $dir); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_scan_directories()\n {\n $content = array('.','..','application','.git','nbproject','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_DIRS);\n \n $this->assertEquals(count($content), count($res));\n foreach($res as $path=>$dir){\n $this->assertTrue(in_array($dir->get_base_name(), $content));\n $this->assertInstanceOf('\\Kaili\\Directory', $dir);\n }\n }", "private function scanFolder()\n {\n return scandir($this->currentPath);\n }", "public function test_scan()\n {\n $content = array('.','..','application','.git','.gitignore','.htaccess','index.php','nbproject','README','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC);\n \n $output = array();\n foreach($res as $f) $output[] = $f->get_base_name();\n $this->assertEquals($content, $output);\n }", "function rScanDir($scanMe) {\r\n\t\tglobal $path, $tmpPath, $cur_folder, $tags2;\r\n\t\tforeach($scanMe as $folder)\r\n\t\t{\r\n\t\t\tif(is_dir($path.$tmpPath.$folder) && $folder !=\".\" && $folder !=\"..\")\r\n\t\t\t{\r\n\t\t\t\t$cur_folder[] = $tmpPath.$folder;\r\n\t\t\t\techo \"getTagString input:\".$tmpPath.$folder.\"<br/>\";\r\n\t\t\t\t$tags2[] = getTagString($tmpPath.$folder);\r\n\t\t\t\t$tmpPath .= $folder.\"/\";\r\n\t\t\t\trScanDir(scandir($path.$tmpPath));\r\n\t\t\t}\r\n\t\t}\r\n\t\t$tmpPath = substr($tmpPath, 0, strrpos($tmpPath, \"/\"));\r\n\t\t$tmpPath = substr($tmpPath, 0, strrpos($tmpPath, \"/\")+1);\r\n\t}", "function DNUI_scan_dir($dirBase) {\r\n return array_diff(scandir($dirBase), array('..', '.'));\r\n}", "private function __scanDir($dir) {\n\n if ($dir == '/') {\n $dir = $this->startDirectory;\n $this->__currentDirectory = $dir;\n }\n\n $strippedDir = str_replace('/', '', $dir);\n\n $dir = ltrim($dir, \"/\");\n\n // Prevent listing blacklisted directories\n if (in_array($strippedDir, $this->ignoredDirectories)) {\n return false;\n }\n\n if (! file_exists($dir) || !is_dir($dir)) {\n return false;\n }\n\n return scandir($dir);\n }", "function scanDir() {\r\n $returnArray = array();\r\n \r\n if ($handle = opendir($this->uploadDirectory)) {\r\n \r\n while (false !== ($file = readdir($handle))) {\r\n if (is_file($this->uploadDirectory.\"/\".$file)) {\r\n $returnArray[] = $file;\r\n }\r\n }\r\n \r\n closedir($handle);\r\n }\r\n else {\r\n die(\"<b>ERROR: </b> No se puede leer el directorio <b>\". $this->uploadDirectory.'</b>');\r\n }\r\n return $returnArray; \r\n }", "protected function scanDir()\n {\n $this->moduleList = [];\n foreach ($this->getVendorList() as $vendorName) {\n $this->moduleList[$vendorName] = [];\n }\n\n $this->readModules();\n }", "function dirscan_files($rootFolder){\n $fileNames=[]; // will get filled\n foreach (scandir($rootFolder) as $name){\n if ($name=='.' || $name=='..') continue;\n if (!is_dir($rootFolder.\"/\".$name)) $fileNames[]=$name;\n }\n sort($fileNames);\n return $fileNames;\n}", "private function scan_directory($dir, $scan = \"\", &$nb_files = 0, &$nb_errors = 0){\n\t\t//Si c est la ou on etait , alors on reprend\n\t\tif ($dir == $scan or $scan == \"\"){\n\t\t\t$scan = \"\";\n\t\t\tDB::delete(\"delete from movies where directory = ?\",array($dir));\n\t\t\t$files = scandir($dir);\n\t\t\tforeach ($files as $file){\n\t\t\t\tif ($file != \"..\" and $file != \".\"){\n\t\t\t\t\tif (is_dir($dir.\"/\".$file)){\n\t\t\t\t\t\t$this->scan_directory($dir.\"/\".$file, $scan, $nb_files, $nb_errors);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tforeach (config(\"app.MOVIES_FILES\") as $ext){\n\t\t\t\t\t\t\tif (stripos($file,\".\".$ext) !== false){\n\t\t\t\t\t\t\t\t//Analyse du fichier\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$movie = new Movie();\n\t\t\t\t\t\t\t\t//On rajoute le fichier en base\t\t\t\t\t\n\t\t\t\t\t\t\t\t$movie->directory = $dir;\n\t\t\t\t\t\t\t\t$movie->filename = $file;\n\t\t\t\t\t\t\t\t$movie->status = -1;\n\t\t\t\t\t\t\t\t$movie->save();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t$movie->name = $this->remove($file);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$movie->status = 1;\n\t\t\t\t\t\t\t\t\t$movie->save();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$nb_files++;\n\t\t\t\t\t\t\t\t}catch(\\Exception $e){\n\t\t\t\t\t\t\t\t\t//Next...\n\t\t\t\t\t\t\t\t\t$nb_errors++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$json = [];\n\t\t\t$json[\"updated\"] = date(\"Y-m-d H:i:s\");\n\t\t\t$json[\"nb_files\"] = $nb_files;\n\t\t\t$json[\"nb_errors\"] = $nb_errors;\n\t\t\t$json[\"scan\"] = $scan;\n\t\t\tfile_put_contents(storage_path().\"/scan_movies.txt\",json_encode($json));\n\t\t}else{\n\t\t\t//Sinon, on reparcourt a partir de l'endroit, ou on etait\n\t\t\t$files = scandir($dir);\n\t\t\tforeach ($files as $file){\n\t\t\t\tif ($file != \"..\" and $file != \".\"){\n\t\t\t\t\tif (is_dir($dir.\"/\".$file)){\n\t\t\t\t\t\t$this->scan_directory($dir.\"/\".$file, $scan, $nb_files, $nb_errors);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function scanFiles($dir){\n $path = __DIR__ . DIRECTORY_SEPARATOR . $dir; /** Nurodomas kelias iki jsons folderio */\n $files = scandir($path); /** Nuskenuoja folderi pagal kelia($path) ir grazina esanciu failu masyva */\n\n return $files;\n}", "function scan_directory($dir, $ext = '*', $recurse = true) {\n $files = array ();\n if ($handle = opendir($dir)) {\n while (false !== ($file = readdir($handle))) {\n if ($file == '.' || $file == '..' ||\n $file == 'CVS' || preg_match('|^\\.|', $file)) {\n continue;\n }\n if (is_link($dir . '/' . $file)) {\n continue;\n }\n if (is_dir ($dir . '/' . $file)) {\n if ($recurse == true)\n $files = array_merge($files, scan_directory ($dir . '/' . $file, $ext));\n } else {\n if($ext == get_file_extension($file) || $ext == '*') {\n $files[] = $dir . '/' . $file;\n }\n }\n }\n closedir($handle);\n }\n return $files;\n}", "function scan(SplFileInfo $fileInfo, $repository)\n{\n $baseName = $fileInfo->getBasename();\n if ($baseName === '.' || $baseName === '..') {\n return;\n }\n\n $file = new File($fileInfo);\n $repository->save($file);\n if ($fileInfo->isDir()) {\n foreach (new RecursiveDirectoryIterator($fileInfo) as $child) {\n scan($child, $repository);\n }\n }\n}", "private function directoryScan($dir) {\n\t\t\n\t\t// check for the validity of input / working directory\n\t\t\n\t\tif (!is_dir($dir)) {\n\t\t\tdie(\"'$dir' is not a directory.\".LE);\n\t\t}\n\t\t\n\t\t// listing directory contents\n\t\t\n\t\t$result = [];\n\t\t\n\t\t$root = scandir($dir);\n\t\tforeach($root as $value)\n\t\t{\n\t\t\t// removing dots & output directory\n\t\t\t\n\t\t\tif($value === '.' || $value === '..') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// listing only files\n\t\t\t\n\t\t\tif(is_file(\"$dir\".DS.\"$value\")) {\n\t\t\t\t$result[$value]=\"$dir\".DS.\"$value\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// recursive call to self(this method) so we can get files listing recursively\n\t\t\t\n\t\t\tforeach($this->directoryScan(\"$dir\".DS.\"$value\") as $value1)\n\t\t\t{\n\t\t\t\t$result[basename($value1)]=$value1;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "function scan_dir($dir, $type=array(),$only=FALSE, $allFiles=FALSE, $recursive=TRUE, $onlyDir=\"\", &$files){\n\t$handle = @opendir($dir);\n\tif(!$handle)\n\t\treturn false;\n\twhile ($file = @readdir ($handle))\n\t{\n\t\tif (eregi(\"^\\.{1,2}$\",$file) || $file == 'index.html')\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\t\tif(!$recursive && $dir != $dir.$file.\"/\")\n\t\t{\n\t\t\tif(is_dir($dir.$file))\n\t\t\t\tcontinue;\n\t\t}\n\t\tif(is_dir($dir.$file))\n\t\t{\n\t\t\tscan_dir($dir.$file.\"/\", $type, $only, $allFiles, $recursive, $file, $files);\n\t\t}\n\t\telse\n\t\t{\n if($only)\n\t\t\t\t$onlyDir = $dir;\n\n\t\t\t$files = buildArray($dir,$file,$onlyDir,$type,$allFiles,$files);\n\t\t}\n\t}\n\t@closedir($handle);\n\treturn $files;\n}", "function scan($dir){\n\n\t$files = array();\n\n\t// Is there actually such a folder/file?\n\n\tif(file_exists($dir)){\n\t\n\t\tforeach(scandir($dir) as $f) {\n\t\t\n\t\t\tif(!$f || $f[0] == '.') {\n\t\t\t\tcontinue; // Ignore hidden files\n\t\t\t}\n\n\t\t\tif(is_dir($dir . '/' . $f)) {\n\n\t\t\t\t// The path is a folder\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"folder\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"items\" => scan($dir . '/' . $f) // Recursively get the contents of the folder\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\n\t\t\t\t// It is a file\n\t\t\t\t$path_info = pathinfo($f);\n\t\t\t\t//if ($path_info && $path_info.extension )\n\t\t\t\t$ext = $path_info['extension'];\n\t\t\t\tif($ext =='html'||$ext =='jpg' || $ext ==='png' || $ext == 'pdf'){\n\t\t\t\t\t$text = ($ext =='html') ?'doc':'image';\n\t\t\t\t\t$files[] = array(\n\t\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\t\"type\" => \"file\",\n\t\t\t\t\t\t\"text\" => $text,\n\t\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\t\"size\" => filesize($dir . '/' . $f) // Gets the size of this file\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\n\t}\n\n\treturn $files;\n}", "function scanfiles( $path = '' ) {\n\t\t\t\n\t\t\tglobal $bwpsoptions;\n\t\t\t\n\t\t\t$tz = get_option( 'gmt_offset' ) * 60 * 60;\n\n $data = array();\n\n\t\t\tif ( $dirHandle = @opendir( ABSPATH . $path ) ) { //get the directory\n\t\t\t\n\t\t\t\twhile ( ( $item = readdir( $dirHandle ) ) !== false ) { // loop through dirs\n\t\t\t\t\t\n\t\t\t\t\tif ( $item != '.' && $item != '..' ) { //don't scan parent/etc\n\n\t\t\t\t\t\t$relname = $path . $item;\n \n\t\t\t\t\t\t$absname = ABSPATH . $relname;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( $this->checkFile( $relname ) == true ) { //make sure the user wants this file scanned\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ( filetype( $absname ) == 'dir' ) { //if directory scan it\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$data = array_merge( $data, $this->scanfiles( $relname . '/' ) );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} else { //is file so add to array\n\n\t\t\t\t\t\t\t\t$data[$relname] = array();\n\t\t\t\t\t\t\t\t$data[$relname]['mod_date'] = @filemtime( $absname ) + $tz;\n\t\t\t\t\t\t\t\t$data[$relname]['hash'] = @md5_file( $absname );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} \n\t\t\t\t\n\t\t\t\t@closedir( $dirHandle ); //close the directory we're working with\n \n\t\t\t} \n\t\t\t\n\t\t\treturn $data; // return the files we found in this dir\n\t\t\t\n\t\t}", "function open_and_scan($SCAN_DIRECTORY,$prev_files){\n\tglobal $files,$exempt_files,$prev_files,$exempt_directory;\n\t$changed_files = '';\n\t$file_details = stat($SCAN_DIRECTORY);\n\t$dt = array();\n\tforeach($file_details as $key=>$info){\n\t\t$dt[$key] = $info;\n\t}\n\t$data = array(\n\t\t'file'=>$SCAN_DIRECTORY,\n\t\t'info'=>$dt\n\t);\n\tarray_push($files,$data);\n\t$changed_files .= get_prev_stats($SCAN_DIRECTORY,$prev_files);\n\t\t\t\t\t\n\t$handle = opendir($SCAN_DIRECTORY);\n\twhile($f = readdir($handle)){\n\t\tif($f != '.' && $f != '..'){\n\t\t\tif(!is_dir($SCAN_DIRECTORY.$f)){\n\t\t\t\t$file_array = explode('.',$f);\n\t\t\t\t$count = count($file_array);\n\t\t\t\t$extension = $file_array[$count-1];\n\t\t\t\tif($count > 1 && !in_array($extension,$exempt_files)){\n\t\t\t\t\t$file_details = stat($SCAN_DIRECTORY.$f);\n\t\t\t\t\t$dt = array();\n\t\t\t\t\tforeach($file_details as $key=>$info){\n\t\t\t\t\t\t$dt[$key] = $info;\n\t\t\t\t\t}\n\t\t\t\t\t$data = array(\n\t\t\t\t\t\t'file'=>$SCAN_DIRECTORY.$f,\n\t\t\t\t\t\t'info'=>$dt\n\t\t\t\t\t);\n\t\t\t\t\tarray_push($files,$data);\n\t\t\t\t\t$changed_files .= get_prev_stats($SCAN_DIRECTORY.$f,$prev_files);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif(!in_array($f,$exempt_directory)){\n\t\t\t\t\topen_and_scan($SCAN_DIRECTORY.$f.'/',$prev_files);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn array(\n\t\t'changed'=>$changed_files,\n\t\t'files'=>$files\n\t);\n}", "function scan($dir){\n\n\t$files = array();\n\n\t// Is there actually such a folder/file?\n\n\tif(file_exists($dir)){\n\t\n\t\tforeach(scandir($dir) as $f) { // scandir() accepts the full path of the folder to be scanned\n\t\t\n\t\t\tif(!$f || $f[0] == '.') {\n\n\t\t\t\t// It is a hidden file\n\t\t\t\t\n\t\t\t\tcontinue; \n\t\t\t}\n\n\t\t\tif(is_dir($dir . '/' . $f)) {\n\n\t\t\t\t// The path is a folder\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"folder\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"items\" => scan($dir . '/' . $f) // Recursively get the contents of the folder\n\t\t\t\t);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\n\t\t\t\t// It is a file\n\n\t\t\t\t$files[] = array(\n\t\t\t\t\t\"name\" => $f,\n\t\t\t\t\t\"type\" => \"file\",\n\t\t\t\t\t\"path\" => $dir . '/' . $f,\n\t\t\t\t\t\"size\" => filesize($dir . '/' . $f) // Gets the size of this file\n\t\t\t\t);\n\t\t\t}\n\n\t\t}\n\t\n\t}\n\n\treturn $files;\n}", "function scan_files( ){\n\n // List of all the audio files found in the directory and sub-directories\n $audioFileArray = array();\n\n // List of filenames already handled during the scan. To detect dupe filenames.\n $alreadyhandledFileArray = array();\n\n // Make list of all files in db to remove non existent files\n $DBaudioFileArray = array();\n foreach ( $this->get_list_of_files()->fetchAll() as $row ) {\n $DBaudioFileArray[] = $row['filename'];\n }\n\n // Prepare variables for file urls\n //$base_dir = dirname(dirname(realpath($this->filedirectorypath))); // Absolute path to your installation, ex: /var/www/mywebsite\n $doc_root = preg_replace(\"!{$_SERVER['SCRIPT_NAME']}$!\", '', $_SERVER['SCRIPT_FILENAME']); # ex: /var/www\n $protocol = empty($_SERVER['HTTPS']) ? 'http' : 'https';\n $port = $_SERVER['SERVER_PORT'];\n $disp_port = ($protocol == 'http' && $port == 80 || $protocol == 'https' && $port == 443) ? '' : \":$port\";\n $domain = $_SERVER['SERVER_NAME'];\n // variables for file urls\n\n // Create recursive dir iterator which skips dot folders\n $dir = new RecursiveDirectoryIterator( $this->filedirectorypath , FilesystemIterator::SKIP_DOTS);\n\n // Flatten the recursive iterator, consider only files, no directories\n $it = new RecursiveIteratorIterator($dir);\n\n // Find all the mp3 files\n foreach ($it as $fileinfo) {\n if ($fileinfo->isFile() && !strcmp($fileinfo->getExtension(), \"mp3\")) {\n $audioFileArray[] = $fileinfo;\n\n //Warning: files with same md5key in different folders will not be inserted into the db.\n //print md5_file($fileinfo) . \"<br />\\n\";\n }\n }\n\n foreach ($audioFileArray as $key => $fileinfo) {\n\n $filename = $fileinfo->getFilename();\n\n //For each file found on disk remove entry from list from DB\n // if any left at the end, they are files that no longer are present on the drive.\n //print \"unsetting: \" . $filename . \"<br>\";\n unset($DBaudioFileArray[array_search($filename,$DBaudioFileArray,true)]);\n\n // check file not in db\n if( !$this->is_file_in_db( $filename ) ) {\n\n //decode filename date if named according to our naming scheme\n $date = $this->decode_filename($filename);\n\n // Build file url based on server path\n $filepath = realpath($fileinfo->getRealPath());\n $base_url = preg_replace(\"!^{$doc_root}!\", '', $filepath); # ex: '' or '/mywebsite'\n $full_url = \"$protocol://{$domain}{$disp_port}{$base_url}\"; # Ex: 'http://example.com', 'https://example.com/mywebsite', etc.\n\n //print $filename . \" - \" . $full_url . \"<br />\\n\";\n\n //insert audiofile in db for first time\n $this->insert_new_file_into_db( $filename, $full_url, $fileinfo->getRealPath(), $fileinfo->getSize(), $date );\n\n $alreadyhandledFileArray[$key] = $filename;\n\n } else {\n // if file in alreadyhandled array, then duplicate named files have been found\n // how to check for duplicate file names?\n // if we're here then the name has already ben added to the db (but maybe during a previous run)\n //we still need to look for the file in the alreadyhandledFileArray\n if( in_array($filename, $alreadyhandledFileArray) ){\n // flag file\n $this->flag_file($filename, \"Il y a 2 ou plusieurs fichiers audio avec le même nom dans le dossier audio du serveur ftp. Veuillez changer les noms ou supprimer les doublons.\");\n }\n }\n\n\n }\n\n // If there are files from the database that weren't found in the audio folder,\n // flag them and add a comment stating that the file can no longer be found.\n if( count($DBaudioFileArray) ){\n //print_r($DBaudioFileArray);\n foreach($DBaudioFileArray as $key => $fn){\n $this->flag_file($fn, \"Le fichier en question n'est plus présent dans le dossier audio du serveur ftp. Il faut le supprimer de la base de données.\");\n $this->set_file_not_new($fn);\n }\n }\n\n return true;\n }", "public function scan($filename){ }", "function scanDir($cfg) //$view, $tdir , $subdir='', $match)\n {\n $ff = HTML_FlexyFramework::get();\n \n $subdir = $cfg['subdir'];\n $scandir = $cfg['tdir']. (empty($subdir) ? '' : '/') . $subdir;\n \n if (in_array($subdir, $cfg['skipdir'])) {\n return array();\n }\n // skip dom_templates\n \n if (!file_exists($scandir)) {\n return array();\n }\n $dh = opendir($scandir);\n if(!$dh){\n return array(); // something went wrong!?\n }\n $ret = array();\n \n while (($fn = readdir($dh)) !== false) {\n // do we care that it will try and parse the template directory??? - not really..\n // as we are only looking for php files..\n if(empty($fn) || $fn[0] == '.'){\n continue;\n }\n \n $fullpath = $scandir.(empty($scandir) ? '' : \"/\").$fn;\n // echo \"filename: $fullpath \\n\";\n \n if (is_link($fullpath)) {\n continue;\n }\n \n if(is_dir($fullpath)){\n // then recursively call self...\n $cfg['subdir'] = $subdir . (empty($subdir) ? '' : '/') . $fn;\n $children = $this->scanDir($cfg);\n if (count($children)) {\n $ret = array_merge($ret, $children);\n \n }\n continue;\n \n }\n \n if (!preg_match($cfg['match'], $fn) || !is_file($fullpath)) {\n continue;\n }\n \n \n \n $ret[] = $subdir . (empty($subdir) ? '' : '/'). $fn; /// this used to be strtolower?? why???\n\n \n \n }\n// print_r($ret);\n \n return $ret;\n \n \n \n \n }", "function RecursiveScanDir($dir, $prefix = '') {\n\t$dir = rtrim($dir, '\\\\/');\n\t$result = array();\n\tforeach (scandir($dir) as $f) {\n if (\n preg_match('`/tmp/`', \"$dir/$f\")\n || preg_match('`/fpdf.php$`', \"$dir/$f\")\n || preg_match('`/libs/pi_barcode.php$`', \"$dir/$f\")\n || preg_match('`/libs/phpmailer/`', \"$dir/$f\")\n || preg_match('`/libs/securimage/`', \"$dir/$f\")\n || preg_match('`/libs/Smarty/`', \"$dir/$f\")\n )\n continue;\n\t\tif ($f !== '.' and $f !== '..') {\n\t\t\tif (is_dir(\"$dir/$f\")) {\n\t\t\t\t$result = array_merge($result, RecursiveScanDir(\"$dir/$f\", \"$prefix$f/\"));\n\t\t\t} else {\n\t\t\t\tif ( strtolower(substr(pathinfo($f,PATHINFO_EXTENSION),0,3)) == \"php\" && pathinfo(__FILE__,PATHINFO_BASENAME ) != pathinfo($f,PATHINFO_BASENAME ) )\n\t\t\t\t\t$result[] = $prefix.$f;\n\t\t\t}\n\t\t}\n\t}\n\treturn $result;\n}", "static private function scan_dir( $dir ) {\n\t\t$ignored = array( '.', '..', '.svn', '.htaccess', 'test-log.log' );\n\n\t\t$files = array();\n\t\tforeach ( scandir( $dir ) as $file ) {\n\t\t\tif ( in_array( $file, $ignored ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$files[ $file ] = filemtime( $dir . '/' . $file );\n\t\t}\n\t\tarsort( $files );\n\t\t$files = array_keys( $files );\n\n\t\treturn ( $files ) ? $files : false;\n\t}", "public function scan($regex_filter=NULL)\n\t{\n\t\t$this->tossIfException();\n\t\t\n\t\t$files = array_diff(scandir($this->directory), array('.', '..'));\n\t\t$objects = array();\n\t\t\n\t\tforeach ($files as $file) {\n\t\t\t$file = $this->directory . $file;\n\t\t\t\n\t\t\tif ($regex_filter) {\n\t\t\t\t$test_path = (is_dir($file)) ? $file . '/' : $file;\n\t\t\t\tif (!preg_match($regex_filter, $test_path)) {\n\t\t\t\t\tcontinue;\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$objects[] = fFilesystem::createObject($file);\n\t\t}\n\t\t\n\t\treturn $objects;\n\t}", "function l10n_drupal_files_scan($source = NULL, $automated = FALSE) {\n\n // We look for projects in the working directory.\n $workdir = variable_get('l10n_server_connector_l10n_drupal_files_directory', '');\n\n if (!is_dir($workdir)) {\n drupal_set_message(t('The configured directory (%workdir) cannot be found. <a href=\"@configure\">Check your configuration</a>.', array('%workdir' => $workdir, '@configure' => url('admin/l10n_server/connectors/config/l10n_drupal/files'))));\n }\n else {\n // define a list of allowed extensions, we will use it later on file_scan_directory\n // and further regular expression buildung processing. Thanks to EugenMayer\n $allowed_file_extensions = array('.tar.gz', '.tgz');\n // build the regular expression\n foreach($allowed_file_extensions as $key => $extension) {\n // escape the file extensions for later regular expression usage\n $allowed_file_extensions[$key] = preg_quote($extension);\n }\n $file_extension_pattern = '(' . implode('|', $allowed_file_extensions) . ')$';\n\n // Packages are always .tar.gz files.\n $files = file_scan_directory($workdir, $file_extension_pattern);\n if (count($files)) {\n foreach ($files as $path => $file) {\n\n if (!l10n_drupal_is_supported_version($path)) {\n // Skip files for unsupported versions.\n continue;\n }\n\n // Get rid of $workdir prefix on file names, eg.\n // drupal-6.x-6.19.tar.gz\n // Drupal/drupal-4.6.7.tar.gz or\n // files/Ubercart/ubercart-5.x-1.0-alpha8.tar.gz.\n $path = $package = trim(preg_replace('!(^' . preg_quote($workdir, '!') . ')(.+)\\.tar\\.gz!', '\\2', $path), '/');\n\n // split the filename into parts to $filename_splitted\n // [0] = the full string\n // [1] = the subdirectory and filename with extension\n // [1] = the subdirectory and filename without extension\n // [2] = the extension .tar.gz or .tgz\n $file_splitted = array(); // ensure to be a array....\n // the regular expression pattern (i put it in a var because i can better handle it with dpm for debugging, move if you want...)\n $file_split_pattern = '!^'. preg_quote($workdir, '!') .'((.+)'. $file_extension_pattern .')!';\n preg_match( $file_split_pattern, $path, $file_splitted );\n // put the result in vars for better handling\n list($file_fullpath, $file_subpath_ext, $file_subpath, $file_extension) = $file_splitted;\n\n // redefine the path to subpath without slash at beginning\n $path = trim($file_subpath, '/');\n // same on package\n $package = trim($file_subpath, '/');\n $project_title = '';\n if (strpos($path, '/')) {\n // We have a slash, so this package is in a subfolder.\n // Eg. Drupal/drupal-4.6.7 or Ubercart/ubercart-5.x-1.0-alpha8.\n // Grab the directory name as project title.\n list($project_title, $package) = explode('/', $path);\n }\n if (strpos($package, '-')) {\n // Only remaining are the project uri and release,\n // eg. drupal-4.6.7 or ubercart-5.x-1.0-alpha8.\n list($project_uri, $release_version) = explode('-', $package, 2);\n\n l10n_drupal_save_data($project_uri, ($project_title ? $project_title : $project_uri), $release_version, trim($file_subpath_ext, '/'), filemtime($file->filename));\n }\n else {\n // File name not formatted properly.\n $result['error'] = t('File name should have project codename and version number included separated with hyphen, such as drupal-5.2.tar.gz.');\n }\n }\n }\n }\n\n $user_feedback = FALSE;\n $results = db_query_range(\"SELECT * FROM {l10n_server_release} WHERE pid IN (SELECT pid FROM {l10n_server_project} WHERE connector_module = 'l10n_drupal_files' AND status = 1) ORDER BY last_parsed ASC\", 0, variable_get('l10n_server_connector_l10n_drupal_files_limit', 1));\n while ($release = db_fetch_object($results)) {\n\n // Only parse file if something changed since we last parsed it.\n $file_name = $workdir . '/' . $release->download_link;\n\n if (file_exists($file_name)) {\n if (filemtime($file_name) > $release->last_parsed) {\n $result = l10n_drupal_parse_package($file_name, $release);\n\n // User feedback, if not automated. Log messages are already done.\n if (isset($result['error']) && !$automated) {\n $user_feedback = TRUE;\n drupal_set_message($result['error'], 'error');\n }\n elseif (isset($result['message']) && !$automated) {\n $user_feedback = TRUE;\n drupal_set_message($result['message']);\n }\n }\n else {\n if (!$automated) {\n $user_feedback = TRUE;\n drupal_set_message(t('@release was already parsed, no need to scan again.', array('@release' => $release->download_link)));\n }\n }\n }\n // Hackish update of last parsed time so other tarballs will get into the queue too.\n // @todo: work on something better for this.\n db_query(\"UPDATE {l10n_server_release} SET last_parsed = %d WHERE rid = %d\", time(), $release->rid);\n }\n if (!$automated && !$user_feedback) {\n drupal_set_message(t('No (new) local Drupal files found to scan in %workdir.', array('%workdir' => $workdir)));\n }\n\n // Ensure that a Drupal page will be displayed with the messages.\n return '';\n}", "function scan_directory_recursively($directory, $filter=FALSE)\n{\n\tif(substr($directory,-1) == '/')\n\t{\n\t\t$directory = substr($directory,0,-1);\n\t}\n\tif(!file_exists($directory) || !is_dir($directory))\n\t{\n\t\treturn FALSE;\n\t}elseif(is_readable($directory))\n\t{\n\t\t$directory_list = opendir($directory);\n\t\twhile($file = readdir($directory_list))\n\t\t{\n\t\t\tif($file != '.' && $file != '..' && $file != '.DS_Store' && $file != '.svn')\n\t\t\t{\n\t\t\t\t$path = $directory.'/'.$file;\n\t\t\t\tif(is_readable($path))\n\t\t\t\t{\n\t\t\t\t\t$subdirectories = explode('/',$path);\n\t\t\t\t\tif(is_dir($path))\n\t\t\t\t\t{\n\t\t\t\t\t\t$directory_tree[] = array(\n\t\t\t\t\t\t\t'path' => $path,\n\t\t\t\t\t\t\t'name' => end($subdirectories),\n\t\t\t\t\t\t\t'modified'\t=> filemtime($path),\n\t\t\t\t\t\t\t'kind' => 'directory',\n\t\t\t\t\t\t\t'content' => scan_directory_recursively($path, $filter));\n\t\t\t\t\t}elseif(is_file($path))\n\t\t\t\t\t{\n\t\t\t\t\t\t$extension = end(explode('.',end($subdirectories)));\n\t\t\t\t\t\tif($filter === FALSE || $filter == $extension)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Get metadata and image dimensions\n\t\t\t\t\t\t\t$size = getimagesize($path, $info);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Get containing directory of file\n\t\t\t\t\t\t\t$directory_array = explode('/', $path);\n\t\t\t\t\t\t\t$parent_folder = min($directory_array);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Reset title, caption, tags\n\t\t\t\t\t\t\t$title = $caption = $taglist = $tags = '';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$directory_tree[] = array(\n\t\t\t\t\t\t\t'path'\t\t=> dirname($path),\n\t\t\t\t\t\t\t'group'\t\t=> $parent_folder,\n\t\t\t\t\t\t\t'file'\t\t=> end($subdirectories),\n\t\t\t\t\t\t\t'extension' => $extension,\n\t\t\t\t\t\t\t'size'\t\t=> filesize($path),\n\t\t\t\t\t\t\t'width'\t\t=> $size[0],\n\t\t\t\t\t\t\t'height'\t=> $size[1],\n\t\t\t\t\t\t\t'modified'\t=> filemtime($path),\n\t\t\t\t\t\t\t'title'\t\t=> $title,\n\t\t\t\t\t\t\t'caption'\t=> $caption,\n\t\t\t\t\t\t\t'tags'\t\t=> $tags,\n\t\t\t\t\t\t\t'kind'\t\t=> 'file');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tclosedir($directory_list); \n\t\treturn $directory_tree;\n\t}else{\n\t\treturn FALSE;\t\n\t}\n}", "protected function scanDirectory($dir, $include_tests) {\n $files = array();\n\n // In order to scan top-level directories, absolute directory paths have to\n // be used (which also improves performance, since any configured PHP\n // include_paths will not be consulted). Retain the relative originating\n // directory being scanned, so relative paths can be reconstructed below\n // (all paths are expected to be relative to $this->root).\n $dir_prefix = ($dir == '' ? '' : \"$dir/\");\n $absolute_dir = ($dir == '' ? $this->root : $this->root . \"/$dir\");\n\n if (!is_dir($absolute_dir)) {\n return $files;\n }\n // Use Unix paths regardless of platform, skip dot directories, follow\n // symlinks (to allow extensions to be linked from elsewhere), and return\n // the RecursiveDirectoryIterator instance to have access to getSubPath(),\n // since SplFileInfo does not support relative paths.\n $flags = \\FilesystemIterator::UNIX_PATHS;\n $flags |= \\FilesystemIterator::SKIP_DOTS;\n $flags |= \\FilesystemIterator::FOLLOW_SYMLINKS;\n $flags |= \\FilesystemIterator::CURRENT_AS_SELF;\n $directory_iterator = new \\RecursiveDirectoryIterator($absolute_dir, $flags);\n\n // Filter the recursive scan to discover extensions only.\n // Important: Without a RecursiveFilterIterator, RecursiveDirectoryIterator\n // would recurse into the entire filesystem directory tree without any kind\n // of limitations.\n $filter = new RecursiveExtensionFilterIterator($directory_iterator);\n $filter->acceptTests($include_tests);\n\n // The actual recursive filesystem scan is only invoked by instantiating the\n // RecursiveIteratorIterator.\n $iterator = new \\RecursiveIteratorIterator($filter,\n \\RecursiveIteratorIterator::LEAVES_ONLY,\n // Suppress filesystem errors in case a directory cannot be accessed.\n \\RecursiveIteratorIterator::CATCH_GET_CHILD\n );\n\n foreach ($iterator as $key => $fileinfo) {\n $name = $fileinfo->getBasename('.info.yml');\n\n if ($this->fileCache && $cached_extension = $this->fileCache->get($fileinfo->getPathName())) {\n $files[$cached_extension->getType()][$key] = $cached_extension;\n continue;\n }\n\n // Determine extension type from info file.\n $type = FALSE;\n $file = $fileinfo->openFile('r');\n while (!$type && !$file->eof()) {\n preg_match('@^type:\\s*(\\'|\")?(\\w+)\\1?\\s*$@', $file->fgets(), $matches);\n if (isset($matches[2])) {\n $type = $matches[2];\n }\n }\n if (empty($type)) {\n continue;\n }\n $name = $fileinfo->getBasename('.info.yml');\n $pathname = $dir_prefix . $fileinfo->getSubPathname();\n\n $filename = $name . '.' . $type;\n\n if (!file_exists(dirname($pathname) . '/' . $filename)) {\n $filename = NULL;\n }\n\n $extension = new Extension($this->root, $type, $pathname, $filename);\n\n // Track the originating directory for sorting purposes.\n $extension->subpath = $fileinfo->getSubPath();\n $extension->origin = $dir;\n\n $files[$type][$key] = $extension;\n\n if ($this->fileCache) {\n $this->fileCache->set($fileinfo->getPathName(), $extension);\n }\n }\n return $files;\n }", "public function findFiles();", "private static function __fordeepscan($dir, $file)\n {\n $path = \"\";\n $scan = glob($dir.'/*');\n $q = preg_quote($file, '\\\\');\n\n if (is_array($scan))\n {\n foreach ($scan as $d => $f)\n {\n if ($f != '.' && $f != '..')\n {\n $f = preg_replace(\"/[\\/]{1,}/\", '/', $f);\n\n if (!is_dir($f))\n {\n $base = basename($f);\n\n if (($base == $file) && strrpos($f, $file) !== false)\n {\n $path = $f;\n }\n\n $base = null;\n }\n\n if ($path == \"\")\n {\n $path = self::__fordeepscan($f, $file);\n if ($path !== \"\"){\n if (strrpos($path, $file) !== false){\n break;\n }\n }\n }\n\n $f = null;\n }\n }\n\n $scan = null;\n }\n\n return $path;\n }" ]
[ "0.7491994", "0.7418604", "0.7250043", "0.71842724", "0.7012226", "0.688901", "0.6712443", "0.66900235", "0.6572419", "0.65611196", "0.6556684", "0.6530685", "0.65249497", "0.64954686", "0.6491414", "0.64674044", "0.64471996", "0.6423127", "0.64098424", "0.6407863", "0.63425076", "0.63254446", "0.63068134", "0.62684846", "0.62645704", "0.6242374", "0.62012523", "0.61859655", "0.6183164", "0.6182636" ]
0.7820266
0
Test for Directory::search() Search file 'index.php' inside the ROOT directory
public function test_search() { $object = Directory::factory(ROOT); $res = $object->search('/(index.php|.htaccess)/'); $this->assertArrayHasKey(ROOT.DS.'index.php', $res); $this->assertArrayHasKey(ROOT.DS.'.htaccess', $res); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_search_by_name()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search_by_name('index.php');\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n }", "public function test_search_by_extension()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search_by_extension(array('php'));\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n }", "public function test_scan_files()\n {\n $content = array('.gitignore','.htaccess','index.php','README');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_FILES);\n \n $this->assertEquals(count($content), count($res));\n foreach($res as $path=>$dir){\n $this->assertTrue(in_array($dir->get_base_name(), $content));\n $this->assertInstanceOf('\\Kaili\\File', $dir);\n }\n }", "public function hasIndexDirectoryPath();", "public function test_scan()\n {\n $content = array('.','..','application','.git','.gitignore','.htaccess','index.php','nbproject','README','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC);\n \n $output = array();\n foreach($res as $f) $output[] = $f->get_base_name();\n $this->assertEquals($content, $output);\n }", "function searchFiles($search, $path, $video){\n $searchFiles = scandir($path);\n foreach($searchFiles as $sFile){\n if(($sFile!=\".\")&&($sFile!=\"..\")){\n if(is_dir($path.$sFile)){\n $search = glob($path.$sFile.'/'.$video);\n if(!empty($search)){\n return $search;\n }\n }\n }\n }\n return array('did', 'not', 'work');\n}", "protected function getSearchPaths() {}", "function searchFile($directory, $file)\n{\n // Blacklisted directory names - not doing so will provoke an endless loop\n $blacklist = array ( '.idea', '.git', '.', '..');\n\n // Getting a handle on the directory\n $dir_handle = opendir($directory);\n\n // Looping on all the directorie's entry to find the right file\n while(false !== ($entry = readdir($dir_handle)))\n {\n //if($entry != '.' && $entry != '..' && $entry != '.idea' && $entry != '.git')\n if(!in_array($entry, $blacklist))\n {\n // if it's a directory - call back the same function recursively\n if(is_dir($directory. DIRECTORY_SEPARATOR .$entry))\n {\n searchFile($directory . DIRECTORY_SEPARATOR . $entry, $file);\n }\n // If it's a file, test against class name to know if it is the right file\n else if(str_replace(\".php\", \"\", $entry) == get_class_name($file))\n {\n $path = $directory . DIRECTORY_SEPARATOR . $entry;\n add_to_cache($file, $path);\n\n return;\n }\n }\n }\n\n closedir($dir_handle);\n\n\n}", "function searchForFile($dir, $searchfile)\r\n{\r\n\tglobal $total_loops;\r\n\t// Make sure we do not exceed 80% memory usage. If so, return false to prevent hitting memory limit.\r\n\t// if (memory_get_usage()/1048576 > (int)ini_get('memory_limit')*0.8) return false;\r\n\t// Set max number of loops we'll do\r\n\t$max_loops = 20000;\r\n\t// Trim $dir and make sure it ends with directory separator\r\n\t$dir = rtrim(trim($dir), DS) . DS;\r\n\t// Loop through all files and subdirectories\r\n\tforeach (getDirFiles($dir) as $thisFileOrDir) \r\n\t{\r\n\t\t// Increment loop\r\n\t\t$total_loops++;\r\n\t\t// Stop if we've done over $max_loops loops and reset $total_loops for other processes\r\n\t\tif ($total_loops > $max_loops) {\r\n\t\t\t$total_loops = 0;\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// Set full path of file/dir we're looking at\r\n\t\t$fullPath = $dir.$thisFileOrDir;\r\n\t\t// If it's a file, check if it's the one we're looking for\r\n\t\tif (isFile($fullPath)) {\r\n\t\t\t// Found the file! Return the current directory.\r\n\t\t\tif ($thisFileOrDir == $searchfile) return $dir;\r\n\t\t}\r\n\t\t// If it's a directory, then recursively check all files in that subdirectory\r\n\t\telseif (is_dir($fullPath)) {\r\n\t\t\t// Get return value for this directory\r\n\t\t\t$returnedDir = searchForFile($fullPath, $searchfile);\r\n\t\t\t// If returned a filename and it matches teh search file, return the returned directory\r\n\t\t\tif ($returnedDir !== false) return $returnedDir;\r\n\t\t}\r\n\t}\r\n\t// If didn't find it, return false\r\n\treturn false;\r\n}", "public function test_scan_directories()\n {\n $content = array('.','..','application','.git','nbproject','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_DIRS);\n \n $this->assertEquals(count($content), count($res));\n foreach($res as $path=>$dir){\n $this->assertTrue(in_array($dir->get_base_name(), $content));\n $this->assertInstanceOf('\\Kaili\\Directory', $dir);\n }\n }", "public function testFind()\n {\n $stack = Solar::factory('Solar_Path_Stack');\n \n // now reset the include_path\n $old_path = set_include_path($this->_support_path);\n \n // use the testing directory to look for files\n $path = array(\n \"a\",\n \"b\",\n \"c\",\n );\n \n $stack->add($path[0]);\n $stack->add($path[1]);\n $stack->add($path[2]);\n \n // should find it at a\n $actual = $stack->find('target1');\n $expect = Solar_Dir::fix($path[0]) . 'target1';\n $this->assertSame($expect, $actual);\n \n // should find it at b\n $actual = $stack->find('target2');\n $expect = Solar_Dir::fix($path[1]) . 'target2';\n $this->assertSame($expect, $actual);\n \n // should find it at c\n $actual = $stack->find('target3');\n $expect = Solar_Dir::fix($path[2]) . 'target3';\n $this->assertSame($expect, $actual);\n \n // should not find it at all\n $actual = $stack->find('no_such_file');\n $this->assertFalse($actual);\n \n // put the include_path back\n set_include_path($old_path);\n }", "abstract public function search($files, array $includedFiles);", "public function testFindFiles()\n {\n\n }", "public function findFiles();", "public function getSearchDir() {\r\n\t\treturn $this->searchDir;\r\n\t}", "function search() {}", "function _ft_search_find_files($dir, $q){\r\n\t$output = array();\r\n\tif (ft_check_dir($dir) && $dirlink = @opendir($dir)) {\r\n\t\twhile(($file = readdir($dirlink)) !== false){\r\n\t\t\tif($file != \".\" && $file != \"..\" && ((ft_check_file($file) && ft_check_filetype($file)) || (is_dir($dir.\"/\".$file) && ft_check_dir($file)))){\r\n\t\t\t\t$path = $dir.'/'.$file;\r\n\t\t\t\t// Check if filename/directory name is a match.\r\n\t\t\t\tif(stristr($file, $q)) {\r\n\t\t\t\t\t$new['name'] = $file;\r\n\t\t\t\t\t$new['shortname'] = ft_get_nice_filename($file, 20);\r\n\t\t\t\t\t$new['dir'] = substr($dir, strlen(ft_get_root()));\r\n\t\t\t\t\tif (is_dir($path)) {\r\n if (ft_check_dir($path)) {\r\n \t\t\t\t\t\t$new['type'] = \"dir\";\t\t\t\t\t \r\n \t\t\t\t\t$output[] = $new;\r\n }\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t $new['type'] = \"file\";\r\n \t\t\t\t\t$output[] = $new;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Check subdirs for matches.\r\n\t\t\t\tif(is_dir($path)) {\r\n\t\t\t\t\t$dirres = _ft_search_find_files($path, $q);\r\n\t\t\t\t\tif (is_array($dirres) && count($dirres) > 0) {\r\n\t\t\t\t\t\t$output = array_merge($dirres, $output);\r\n\t\t\t\t\t\tunset($dirres);\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tsort($output);\r\n\t\tclosedir($dirlink);\r\n\t\treturn $output;\r\n\t} else {\r\n\t\treturn FALSE;\r\n\t}\r\n}", "function hasIndex($path, $filename)\n {\n $abs = $path.'\\\\'.$filename;\n\n if(file_exists($abs))\n {\n $info = pathinfo($abs);\n\n if (is_dir($abs)) {\n $dir = new DirectoryIterator($abs);\n foreach ($dir as $file) {\n if (!$file->isDot()) {\n $info = pathinfo($file);\n if ( strtolower($info['filename']) == 'index' && !$file->isDir()) { return true; } \n }\n }\n }\n else { if (strtolower($info['filename']) == 'index') { return true; } }\n }\n return false;\n }", "public function hasDefaultIndexDirectoryPath();", "public function testSearchMods()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function find($file);", "function searchDir($base_dir=\"./\",$p=\"\",$f=\"\",$allowed_depth=-1){\n\t$contents=array();\n\n\t# trim all input arguments for whitespace\n\t$base_dir=trim($base_dir);\n\t$p=trim($p);\n\t$f=trim($f);\n\n # if base dir is not given, use the this\n\tif($base_dir==\"\")$base_dir=\"./\";\n\n\t# if last character of basedir lacks a \"/\" then add one\n\tif(substr($base_dir,-1)!=\"/\")$base_dir.=\"/\";\n\n\t# remove the \"../\" and \"./\" directories, and trim all \"./\"\n\t$p=str_replace(array(\"../\",\"./\"),\"\",trim($p,\"./\"));\n\n\t# add the requested path to the base directory string\n\t$p=$base_dir.$p;\n\n\t#if p is not a directory, meaning it is a file, get the path to it\n\tif(!is_dir($p))$p=dirname($p);\n\n\t#if the last character of p is not a \"/\" then add one\n\tif(substr($p,-1)!=\"/\")$p.=\"/\";\n\n\t# if caps are set on allowed depth (allowed depth>-1) count the dirs\n\tif($allowed_depth>-1){\n\t\t$allowed_depth=count(explode(\"/\",$base_dir))+ $allowed_depth-1;\n\t\t$p=implode(\"/\",array_slice(explode(\"/\",$p),0,$allowed_depth));\n\t\tif(substr($p,-1)!=\"/\")$p.=\"/\";\n\t}\n\n\t# if f is empty, create an empty array, if not explode and store elements\n\t$filter=($f==\"\")?array():explode(\",\",strtolower($f));\n\n\t# store the files in the files array, and shut up while scanning\n\t$files=@scandir($p);\n\n\t# if there are no files after scan, return an empty array and the path\n\tif(!$files)return array(\"contents\"=>array(),\"currentPath\"=>$p);\n\n\t# iterate through all files found\n\tfor ($i=0;$i<count($files);$i++){\n\n\t\t# gather name and path of each file\n\t\t$fName=$files[$i];\n\t\t$fPath=$p.$fName;\n\n\t\t# check if the file is a directory and tag it as directory\n\t\t# each file is tagged as a folder by default\n\t\t$isDir=is_dir($fPath);\n\t\t$add=false;\n\t\t$fType=\"folder\";\n\n\t\t# if the file is a file\n\t\tif(!$isDir){\n\n\t\t\t# extract extension from filename\n\t\t\t$ft=strtolower(substr($files[$i],strrpos($files[$i],\".\")+1));\n\t\t\t$fType=$ft;\n\n\t\t\t# if there is anything in the filter that matches, add it\n\t\t\tif($f!=\"\"){\n\t\t\t\tif(in_array($ft,$filter))$add=true;\n\t\t\t}else{\n\t\t\t\t$add=true;\n\t\t\t}\n\t\t# if the file is a folder\n\t\t}else{\n\t\t\tif($fName==\".\")continue;\n\t\t\t$add=true;\n\n\t\t\t# filter it, and discard if bad\n\t\t\tif($f!=\"\"){\n\t\t\t\tif(!in_array($fType,$filter))$add=false;\n\t\t\t}\n\n\t\t\t# if the file is the \"..\" folder\n\t\t\tif($fName==\"..\"){\n\t\t\t\t# if we are in the base dir, no not add upper directory option\n\t\t\t\tif($p==$base_dir){\n\t\t\t\t\t$add=false;\n\t\t\t\t}else $add=true;\n\n\t\t\t\t# explode the path by path steps\n\t\t\t\t$tempar=explode(\"/\",$fPath);\n\t\t\t\t# remove last two elements, so the file references parent dir\n\t\t\t\tarray_splice($tempar,-2);\n\t\t\t\t# implode the array, to recreate the path string\n\t\t\t\t$fPath=implode(\"/\",$tempar);\n\t\t\t\t# if for some reason, this reference is shorter than basedir, deny it!\n\t\t\t\tif(strlen($fPath)<= strlen($base_dir))$fPath=\"\";\n\t\t\t}\n\t\t}\n\n\t\t# if the created fPath is non-zero, append to basedir\n\t\tif($fPath!=\"\")$fPath=substr($fPath,strlen($base_dir));\n\t\t# if approved to add, add path, name and type to contents[] array\n\t\tif($add)$contents[]=array(\"fPath\"=>$fPath,\"fName\"=>$fName,\"fType\"=>$fType);\n\t}\n\n\t# if p is shorter than base_dir, deny it! Else, cut away base_dir and use it\n\t$p=(strlen($p)<= strlen($base_dir))?$p=\"\":substr($p,strlen($base_dir));\n\t# return the final contents and its respective path\n\treturn array(\"contents\"=>$contents,\"currentPath\"=>$p);\n}", "function searchDir($root,$path,&$data)\n\t{\n\t\t$full_path = $root.$path;\n\t\tif(is_dir($full_path))\n\t\t{\n\t\t\t$dp=dir($full_path);\n\t\t\twhile($file=$dp->read())\n\t\t\t{\n\t\t\t\tif($file!='.'&& $file!='..')\n\t\t\t\t{\n\t\t\t\t\tsearchDir($root,$path.'/'.$file,$data);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$dp->close();\n\t\t}\n\t\tif(is_file($full_path))\n\t\t{\n\t\t\t$data[]=$path;\n\t\t}\n\t}", "function searchFolder( $current_folder, $folder_to_find, &$matches )\n{\n if ( !( $handle = opendir( $current_folder ) ) ) die( \"Cannot open $current_folder.\" );\n\n while ( $entry = readdir( $handle ) ) {\n if ( is_dir( \"$current_folder/$entry\" ) ) {\n if ( $entry != \".\" && $entry != \"..\" ) {\n\n // This entry is a valid folder\n // If it matches our folder name, add it to the list of matches\n if ( $entry == $folder_to_find ) $matches[] = \"$current_folder/$entry\";\n\n // Search this folder\n searchFolder( \"$current_folder/$entry\", $folder_to_find, $matches );\n }\n }\n }\n closedir( $handle );\n}", "private static function search()\r\n\t{\r\n\t\t$dir = 'plugins';\r\n\t\t// search for plugin modules in the plugins directory\t\t \r\n\t\t$modules = model_Utils_ModuleHelper::searchDirectoryForModules($dir);\r\n\t\tforeach ($modules as $module)\r\n\t\t{\r\n\t\t\t// save found module paths to the db so we can auto-load them in the future\r\n\t\t\tmodel_Utils_ModuleHelper::saveModule($module);\r\n\t\t\t// add matching paths to Kohana's module paths\t\t\r\n\t\t\tmodel_Utils_ModuleHelper::addModulePath($module);\r\n\t\t}\r\n\t\treturn Model_Admin_EventsAdmin::searchForListeners($dir,'Interface_iPCPPlugin');\t\r\n\t}", "public function requires_search() {\n\t\treturn false;\n\t}", "public function getIndexDirectoryPath();", "function search()\n\t{}", "function search()\n\t{}", "static public function searchFirst($dirList)\n {\n if (!is_array($dirList))\n {\n $dirList = array($dirList);\n }\n\n // this is what we'll be adding to the search path when we're done\n $searchPathList = array();\n\n // iterate through the list of folders\n foreach ($dirList as $dir)\n {\n // get the absolute path\n $dir = realpath($dir);\n\n // remove the folder if it is already in the search list\n static::dontSearchIn($dir);\n\n // add it to the end of the new list\n $searchPathList[] = $dir;\n }\n\n // add the new list to the front of the path\n set_include_path(implode(PATH_SEPARATOR, $searchPathList) . PATH_SEPARATOR . get_include_path());\n }" ]
[ "0.7856435", "0.7526942", "0.6122159", "0.61114746", "0.60262454", "0.59891254", "0.58569324", "0.5847987", "0.582122", "0.58177185", "0.58087236", "0.5745908", "0.57202494", "0.5702491", "0.5669456", "0.5634786", "0.56143713", "0.5592482", "0.55711865", "0.5551054", "0.5540601", "0.54777735", "0.54679066", "0.5465722", "0.54523486", "0.54522336", "0.545068", "0.5450039", "0.5450039", "0.5443696" ]
0.8318728
0
Test for Directory::search_by_name() Search file 'index.php' inside the ROOT directory
public function test_search_by_name() { $object = Directory::factory(ROOT); $res = $object->search_by_name('index.php'); $this->assertArrayHasKey(ROOT.DS.'index.php', $res); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_search()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search('/(index.php|.htaccess)/');\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n $this->assertArrayHasKey(ROOT.DS.'.htaccess', $res);\n }", "public function test_search_by_extension()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search_by_extension(array('php'));\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n }", "public function hasIndexDirectoryPath();", "function hasIndex($path, $filename)\n {\n $abs = $path.'\\\\'.$filename;\n\n if(file_exists($abs))\n {\n $info = pathinfo($abs);\n\n if (is_dir($abs)) {\n $dir = new DirectoryIterator($abs);\n foreach ($dir as $file) {\n if (!$file->isDot()) {\n $info = pathinfo($file);\n if ( strtolower($info['filename']) == 'index' && !$file->isDir()) { return true; } \n }\n }\n }\n else { if (strtolower($info['filename']) == 'index') { return true; } }\n }\n return false;\n }", "public function test_scan_files()\n {\n $content = array('.gitignore','.htaccess','index.php','README');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_FILES);\n \n $this->assertEquals(count($content), count($res));\n foreach($res as $path=>$dir){\n $this->assertTrue(in_array($dir->get_base_name(), $content));\n $this->assertInstanceOf('\\Kaili\\File', $dir);\n }\n }", "public function test_scan()\n {\n $content = array('.','..','application','.git','.gitignore','.htaccess','index.php','nbproject','README','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC);\n \n $output = array();\n foreach($res as $f) $output[] = $f->get_base_name();\n $this->assertEquals($content, $output);\n }", "function searchFile($directory, $file)\n{\n // Blacklisted directory names - not doing so will provoke an endless loop\n $blacklist = array ( '.idea', '.git', '.', '..');\n\n // Getting a handle on the directory\n $dir_handle = opendir($directory);\n\n // Looping on all the directorie's entry to find the right file\n while(false !== ($entry = readdir($dir_handle)))\n {\n //if($entry != '.' && $entry != '..' && $entry != '.idea' && $entry != '.git')\n if(!in_array($entry, $blacklist))\n {\n // if it's a directory - call back the same function recursively\n if(is_dir($directory. DIRECTORY_SEPARATOR .$entry))\n {\n searchFile($directory . DIRECTORY_SEPARATOR . $entry, $file);\n }\n // If it's a file, test against class name to know if it is the right file\n else if(str_replace(\".php\", \"\", $entry) == get_class_name($file))\n {\n $path = $directory . DIRECTORY_SEPARATOR . $entry;\n add_to_cache($file, $path);\n\n return;\n }\n }\n }\n\n closedir($dir_handle);\n\n\n}", "function searchFiles($search, $path, $video){\n $searchFiles = scandir($path);\n foreach($searchFiles as $sFile){\n if(($sFile!=\".\")&&($sFile!=\"..\")){\n if(is_dir($path.$sFile)){\n $search = glob($path.$sFile.'/'.$video);\n if(!empty($search)){\n return $search;\n }\n }\n }\n }\n return array('did', 'not', 'work');\n}", "function searchForFile($dir, $searchfile)\r\n{\r\n\tglobal $total_loops;\r\n\t// Make sure we do not exceed 80% memory usage. If so, return false to prevent hitting memory limit.\r\n\t// if (memory_get_usage()/1048576 > (int)ini_get('memory_limit')*0.8) return false;\r\n\t// Set max number of loops we'll do\r\n\t$max_loops = 20000;\r\n\t// Trim $dir and make sure it ends with directory separator\r\n\t$dir = rtrim(trim($dir), DS) . DS;\r\n\t// Loop through all files and subdirectories\r\n\tforeach (getDirFiles($dir) as $thisFileOrDir) \r\n\t{\r\n\t\t// Increment loop\r\n\t\t$total_loops++;\r\n\t\t// Stop if we've done over $max_loops loops and reset $total_loops for other processes\r\n\t\tif ($total_loops > $max_loops) {\r\n\t\t\t$total_loops = 0;\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// Set full path of file/dir we're looking at\r\n\t\t$fullPath = $dir.$thisFileOrDir;\r\n\t\t// If it's a file, check if it's the one we're looking for\r\n\t\tif (isFile($fullPath)) {\r\n\t\t\t// Found the file! Return the current directory.\r\n\t\t\tif ($thisFileOrDir == $searchfile) return $dir;\r\n\t\t}\r\n\t\t// If it's a directory, then recursively check all files in that subdirectory\r\n\t\telseif (is_dir($fullPath)) {\r\n\t\t\t// Get return value for this directory\r\n\t\t\t$returnedDir = searchForFile($fullPath, $searchfile);\r\n\t\t\t// If returned a filename and it matches teh search file, return the returned directory\r\n\t\t\tif ($returnedDir !== false) return $returnedDir;\r\n\t\t}\r\n\t}\r\n\t// If didn't find it, return false\r\n\treturn false;\r\n}", "public function testFind()\n {\n $stack = Solar::factory('Solar_Path_Stack');\n \n // now reset the include_path\n $old_path = set_include_path($this->_support_path);\n \n // use the testing directory to look for files\n $path = array(\n \"a\",\n \"b\",\n \"c\",\n );\n \n $stack->add($path[0]);\n $stack->add($path[1]);\n $stack->add($path[2]);\n \n // should find it at a\n $actual = $stack->find('target1');\n $expect = Solar_Dir::fix($path[0]) . 'target1';\n $this->assertSame($expect, $actual);\n \n // should find it at b\n $actual = $stack->find('target2');\n $expect = Solar_Dir::fix($path[1]) . 'target2';\n $this->assertSame($expect, $actual);\n \n // should find it at c\n $actual = $stack->find('target3');\n $expect = Solar_Dir::fix($path[2]) . 'target3';\n $this->assertSame($expect, $actual);\n \n // should not find it at all\n $actual = $stack->find('no_such_file');\n $this->assertFalse($actual);\n \n // put the include_path back\n set_include_path($old_path);\n }", "public function hasDefaultIndexDirectoryPath();", "function _ft_search_find_files($dir, $q){\r\n\t$output = array();\r\n\tif (ft_check_dir($dir) && $dirlink = @opendir($dir)) {\r\n\t\twhile(($file = readdir($dirlink)) !== false){\r\n\t\t\tif($file != \".\" && $file != \"..\" && ((ft_check_file($file) && ft_check_filetype($file)) || (is_dir($dir.\"/\".$file) && ft_check_dir($file)))){\r\n\t\t\t\t$path = $dir.'/'.$file;\r\n\t\t\t\t// Check if filename/directory name is a match.\r\n\t\t\t\tif(stristr($file, $q)) {\r\n\t\t\t\t\t$new['name'] = $file;\r\n\t\t\t\t\t$new['shortname'] = ft_get_nice_filename($file, 20);\r\n\t\t\t\t\t$new['dir'] = substr($dir, strlen(ft_get_root()));\r\n\t\t\t\t\tif (is_dir($path)) {\r\n if (ft_check_dir($path)) {\r\n \t\t\t\t\t\t$new['type'] = \"dir\";\t\t\t\t\t \r\n \t\t\t\t\t$output[] = $new;\r\n }\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t $new['type'] = \"file\";\r\n \t\t\t\t\t$output[] = $new;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Check subdirs for matches.\r\n\t\t\t\tif(is_dir($path)) {\r\n\t\t\t\t\t$dirres = _ft_search_find_files($path, $q);\r\n\t\t\t\t\tif (is_array($dirres) && count($dirres) > 0) {\r\n\t\t\t\t\t\t$output = array_merge($dirres, $output);\r\n\t\t\t\t\t\tunset($dirres);\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tsort($output);\r\n\t\tclosedir($dirlink);\r\n\t\treturn $output;\r\n\t} else {\r\n\t\treturn FALSE;\r\n\t}\r\n}", "public function test_scan_directories()\n {\n $content = array('.','..','application','.git','nbproject','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_DIRS);\n \n $this->assertEquals(count($content), count($res));\n foreach($res as $path=>$dir){\n $this->assertTrue(in_array($dir->get_base_name(), $content));\n $this->assertInstanceOf('\\Kaili\\Directory', $dir);\n }\n }", "public function getIndexDirectoryPath();", "public function testFindFiles()\n {\n\n }", "public function findFiles();", "abstract public function search($files, array $includedFiles);", "public function find($file);", "function searchFolder( $current_folder, $folder_to_find, &$matches )\n{\n if ( !( $handle = opendir( $current_folder ) ) ) die( \"Cannot open $current_folder.\" );\n\n while ( $entry = readdir( $handle ) ) {\n if ( is_dir( \"$current_folder/$entry\" ) ) {\n if ( $entry != \".\" && $entry != \"..\" ) {\n\n // This entry is a valid folder\n // If it matches our folder name, add it to the list of matches\n if ( $entry == $folder_to_find ) $matches[] = \"$current_folder/$entry\";\n\n // Search this folder\n searchFolder( \"$current_folder/$entry\", $folder_to_find, $matches );\n }\n }\n }\n closedir( $handle );\n}", "function search() {}", "function includedByAdminScript() {\n global $path_to_root_dir;\n if((eregi('index\\.php', $_SERVER['SCRIPT_NAME']) and $path_to_root_dir == \"..\")\n or(eregi('edit\\.php', $_SERVER['SCRIPT_NAME']))) \n return true;\n else {\n return false;\n }\n}", "function find_file($file) {\n if($results = glob($file)) {\n if($file = array_shift($results)) {\n return $file;\n } else {\n return false;\n }\n } else {\n return false;\n }\n}", "function searchDir($base_dir=\"./\",$p=\"\",$f=\"\",$allowed_depth=-1){\n\t$contents=array();\n\n\t# trim all input arguments for whitespace\n\t$base_dir=trim($base_dir);\n\t$p=trim($p);\n\t$f=trim($f);\n\n # if base dir is not given, use the this\n\tif($base_dir==\"\")$base_dir=\"./\";\n\n\t# if last character of basedir lacks a \"/\" then add one\n\tif(substr($base_dir,-1)!=\"/\")$base_dir.=\"/\";\n\n\t# remove the \"../\" and \"./\" directories, and trim all \"./\"\n\t$p=str_replace(array(\"../\",\"./\"),\"\",trim($p,\"./\"));\n\n\t# add the requested path to the base directory string\n\t$p=$base_dir.$p;\n\n\t#if p is not a directory, meaning it is a file, get the path to it\n\tif(!is_dir($p))$p=dirname($p);\n\n\t#if the last character of p is not a \"/\" then add one\n\tif(substr($p,-1)!=\"/\")$p.=\"/\";\n\n\t# if caps are set on allowed depth (allowed depth>-1) count the dirs\n\tif($allowed_depth>-1){\n\t\t$allowed_depth=count(explode(\"/\",$base_dir))+ $allowed_depth-1;\n\t\t$p=implode(\"/\",array_slice(explode(\"/\",$p),0,$allowed_depth));\n\t\tif(substr($p,-1)!=\"/\")$p.=\"/\";\n\t}\n\n\t# if f is empty, create an empty array, if not explode and store elements\n\t$filter=($f==\"\")?array():explode(\",\",strtolower($f));\n\n\t# store the files in the files array, and shut up while scanning\n\t$files=@scandir($p);\n\n\t# if there are no files after scan, return an empty array and the path\n\tif(!$files)return array(\"contents\"=>array(),\"currentPath\"=>$p);\n\n\t# iterate through all files found\n\tfor ($i=0;$i<count($files);$i++){\n\n\t\t# gather name and path of each file\n\t\t$fName=$files[$i];\n\t\t$fPath=$p.$fName;\n\n\t\t# check if the file is a directory and tag it as directory\n\t\t# each file is tagged as a folder by default\n\t\t$isDir=is_dir($fPath);\n\t\t$add=false;\n\t\t$fType=\"folder\";\n\n\t\t# if the file is a file\n\t\tif(!$isDir){\n\n\t\t\t# extract extension from filename\n\t\t\t$ft=strtolower(substr($files[$i],strrpos($files[$i],\".\")+1));\n\t\t\t$fType=$ft;\n\n\t\t\t# if there is anything in the filter that matches, add it\n\t\t\tif($f!=\"\"){\n\t\t\t\tif(in_array($ft,$filter))$add=true;\n\t\t\t}else{\n\t\t\t\t$add=true;\n\t\t\t}\n\t\t# if the file is a folder\n\t\t}else{\n\t\t\tif($fName==\".\")continue;\n\t\t\t$add=true;\n\n\t\t\t# filter it, and discard if bad\n\t\t\tif($f!=\"\"){\n\t\t\t\tif(!in_array($fType,$filter))$add=false;\n\t\t\t}\n\n\t\t\t# if the file is the \"..\" folder\n\t\t\tif($fName==\"..\"){\n\t\t\t\t# if we are in the base dir, no not add upper directory option\n\t\t\t\tif($p==$base_dir){\n\t\t\t\t\t$add=false;\n\t\t\t\t}else $add=true;\n\n\t\t\t\t# explode the path by path steps\n\t\t\t\t$tempar=explode(\"/\",$fPath);\n\t\t\t\t# remove last two elements, so the file references parent dir\n\t\t\t\tarray_splice($tempar,-2);\n\t\t\t\t# implode the array, to recreate the path string\n\t\t\t\t$fPath=implode(\"/\",$tempar);\n\t\t\t\t# if for some reason, this reference is shorter than basedir, deny it!\n\t\t\t\tif(strlen($fPath)<= strlen($base_dir))$fPath=\"\";\n\t\t\t}\n\t\t}\n\n\t\t# if the created fPath is non-zero, append to basedir\n\t\tif($fPath!=\"\")$fPath=substr($fPath,strlen($base_dir));\n\t\t# if approved to add, add path, name and type to contents[] array\n\t\tif($add)$contents[]=array(\"fPath\"=>$fPath,\"fName\"=>$fName,\"fType\"=>$fType);\n\t}\n\n\t# if p is shorter than base_dir, deny it! Else, cut away base_dir and use it\n\t$p=(strlen($p)<= strlen($base_dir))?$p=\"\":substr($p,strlen($base_dir));\n\t# return the final contents and its respective path\n\treturn array(\"contents\"=>$contents,\"currentPath\"=>$p);\n}", "private function searchFile( $fileName )\r\n\t{\r\n\t\t$index = -1;\r\n\t\tfor($fileIndex = 0; $fileIndex < $this->filesCollection->size(); $fileIndex++)\r\n\t\t{\r\n\t\t\tif( strcasecmp( $fileName, $this->filesCollection->get( $fileIndex )->getName( ) ) == 0 )\r\n\t\t\t{\r\n\t\t\t\t$index = $fileIndex;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $index;\r\n\t}", "static public function searchFirst($dirList)\n {\n if (!is_array($dirList))\n {\n $dirList = array($dirList);\n }\n\n // this is what we'll be adding to the search path when we're done\n $searchPathList = array();\n\n // iterate through the list of folders\n foreach ($dirList as $dir)\n {\n // get the absolute path\n $dir = realpath($dir);\n\n // remove the folder if it is already in the search list\n static::dontSearchIn($dir);\n\n // add it to the end of the new list\n $searchPathList[] = $dir;\n }\n\n // add the new list to the front of the path\n set_include_path(implode(PATH_SEPARATOR, $searchPathList) . PATH_SEPARATOR . get_include_path());\n }", "function searchDir($root,$path,&$data)\n\t{\n\t\t$full_path = $root.$path;\n\t\tif(is_dir($full_path))\n\t\t{\n\t\t\t$dp=dir($full_path);\n\t\t\twhile($file=$dp->read())\n\t\t\t{\n\t\t\t\tif($file!='.'&& $file!='..')\n\t\t\t\t{\n\t\t\t\t\tsearchDir($root,$path.'/'.$file,$data);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$dp->close();\n\t\t}\n\t\tif(is_file($full_path))\n\t\t{\n\t\t\t$data[]=$path;\n\t\t}\n\t}", "protected function getSearchPaths() {}", "public static function find($file) {\n foreach(self::$directories as $path) {\n if(file_exists($path . $file . '.php')) {\n return $path . $file . '.php';\n }\n }\n\n return false;\n }", "public function test_admin_search_keyword()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/SearchResult', 'index']);\n $this->assertResponseCode(404);\n }", "function startedIndexPhp() {return true; }" ]
[ "0.7803914", "0.74054193", "0.6096329", "0.59778947", "0.59626746", "0.5898367", "0.58588976", "0.5772092", "0.57219416", "0.56567097", "0.56024987", "0.55696607", "0.5523678", "0.55153424", "0.54849744", "0.5467967", "0.5423201", "0.5414956", "0.53814286", "0.5311357", "0.5280912", "0.5272394", "0.5249707", "0.52242994", "0.51921105", "0.5186701", "0.5185987", "0.5172958", "0.51714766", "0.5167635" ]
0.8326893
0
Test for Directory::search_by_extension() Search files with 'php' extension inside the ROOT directory
public function test_search_by_extension() { $object = Directory::factory(ROOT); $res = $object->search_by_extension(array('php')); $this->assertArrayHasKey(ROOT.DS.'index.php', $res); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _findExtensionFiles() {\r\n\t\r\n\t\t\tif (empty($this->_extensionsPath)) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\r\n\t\t\t//make sure we only get the package files in that directory\r\n\t\t\t$zipFiles = JFolder::files($this->_extensionsPath, '\\.zip$', false, false);\r\n\t\t\t$gzFiles = JFolder::files($this->_extensionsPath, '\\.gz$', false, false);\r\n\t\t\t$bz2Fies = JFolder::files($this->_extensionsPath, '\\.bz2$', false, false);\r\n\t\t\t$files = array_merge($zipFiles, $gzFiles, $bz2Fies);\r\n\t\r\n\t\t\tif (count($files) > 0) {\r\n\t\t\t\t$this->_packageFiles = $files;\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}", "public function test_search()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search('/(index.php|.htaccess)/');\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n $this->assertArrayHasKey(ROOT.DS.'.htaccess', $res);\n }", "function _ft_search_find_files($dir, $q){\r\n\t$output = array();\r\n\tif (ft_check_dir($dir) && $dirlink = @opendir($dir)) {\r\n\t\twhile(($file = readdir($dirlink)) !== false){\r\n\t\t\tif($file != \".\" && $file != \"..\" && ((ft_check_file($file) && ft_check_filetype($file)) || (is_dir($dir.\"/\".$file) && ft_check_dir($file)))){\r\n\t\t\t\t$path = $dir.'/'.$file;\r\n\t\t\t\t// Check if filename/directory name is a match.\r\n\t\t\t\tif(stristr($file, $q)) {\r\n\t\t\t\t\t$new['name'] = $file;\r\n\t\t\t\t\t$new['shortname'] = ft_get_nice_filename($file, 20);\r\n\t\t\t\t\t$new['dir'] = substr($dir, strlen(ft_get_root()));\r\n\t\t\t\t\tif (is_dir($path)) {\r\n if (ft_check_dir($path)) {\r\n \t\t\t\t\t\t$new['type'] = \"dir\";\t\t\t\t\t \r\n \t\t\t\t\t$output[] = $new;\r\n }\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t $new['type'] = \"file\";\r\n \t\t\t\t\t$output[] = $new;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Check subdirs for matches.\r\n\t\t\t\tif(is_dir($path)) {\r\n\t\t\t\t\t$dirres = _ft_search_find_files($path, $q);\r\n\t\t\t\t\tif (is_array($dirres) && count($dirres) > 0) {\r\n\t\t\t\t\t\t$output = array_merge($dirres, $output);\r\n\t\t\t\t\t\tunset($dirres);\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tsort($output);\r\n\t\tclosedir($dirlink);\r\n\t\treturn $output;\r\n\t} else {\r\n\t\treturn FALSE;\r\n\t}\r\n}", "public function getFilesInDirDoesNotFindDotfiles() {}", "public function get_test_php_extensions()\n {\n }", "public function checkExtensions()\n {\n $extensions = array(\n 'fileinfo',\n 'pdo',\n 'mbstring',\n 'tokenizer',\n 'openssl',\n 'json',\n 'curl',\n 'xml'\n );\n\n $results = array();\n\n foreach ($extensions as $extension) {\n $results[$extension] = extension_loaded($extension);\n }\n\n return $results;\n }", "function list_php_files($path){\n\t\t\t// to remove any (.) and (..) from the directory list\n\t\t\t$files = array_diff(scandir($path), array('.', '..'));\n\t\t\treturn $files;\n\t\t}", "function searchFile($directory, $file)\n{\n // Blacklisted directory names - not doing so will provoke an endless loop\n $blacklist = array ( '.idea', '.git', '.', '..');\n\n // Getting a handle on the directory\n $dir_handle = opendir($directory);\n\n // Looping on all the directorie's entry to find the right file\n while(false !== ($entry = readdir($dir_handle)))\n {\n //if($entry != '.' && $entry != '..' && $entry != '.idea' && $entry != '.git')\n if(!in_array($entry, $blacklist))\n {\n // if it's a directory - call back the same function recursively\n if(is_dir($directory. DIRECTORY_SEPARATOR .$entry))\n {\n searchFile($directory . DIRECTORY_SEPARATOR . $entry, $file);\n }\n // If it's a file, test against class name to know if it is the right file\n else if(str_replace(\".php\", \"\", $entry) == get_class_name($file))\n {\n $path = $directory . DIRECTORY_SEPARATOR . $entry;\n add_to_cache($file, $path);\n\n return;\n }\n }\n }\n\n closedir($dir_handle);\n\n\n}", "public function findFiles();", "public function test_search_by_name()\n {\n $object = Directory::factory(ROOT);\n $res = $object->search_by_name('index.php');\n \n $this->assertArrayHasKey(ROOT.DS.'index.php', $res);\n }", "function searchFiles($search, $path, $video){\n $searchFiles = scandir($path);\n foreach($searchFiles as $sFile){\n if(($sFile!=\".\")&&($sFile!=\"..\")){\n if(is_dir($path.$sFile)){\n $search = glob($path.$sFile.'/'.$video);\n if(!empty($search)){\n return $search;\n }\n }\n }\n }\n return array('did', 'not', 'work');\n}", "protected function _findFiles($extensions = '') {\n\t\t$this->_files = [];\n\t\tforeach ($this->_paths as $path) {\n\t\t\tif (!is_dir($path)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$Iterator = new RegexIterator(\n\t\t\t\tnew RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)),\n\t\t\t\t'/^.+\\.(' . $extensions . ')$/i',\n\t\t\t\tRegexIterator::MATCH\n\t\t\t);\n\t\t\tforeach ($Iterator as $file) {\n\t\t\t\t$excludes = ['Config'];\n\t\t\t\t//Iterator processes plugins even if not asked to\n\t\t\t\tif (empty($this->params['plugin'])) {\n\t\t\t\t\t$excludes = array_merge($excludes, ['Plugin', 'plugins']);\n\t\t\t\t}\n\t\t\t\tif (empty($this->params['vendor'])) {\n\t\t\t\t\t$excludes = array_merge($excludes, ['Vendor', 'vendors']);\n\t\t\t\t}\n\t\t\t\tif (!empty($excludes)) {\n\t\t\t\t\t$isIllegalPluginPath = false;\n\t\t\t\t\tforeach ($excludes as $exclude) {\n\t\t\t\t\t\tif (strpos($file, $path . $exclude . DS) === 0) {\n\t\t\t\t\t\t\t$isIllegalPluginPath = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ($isIllegalPluginPath) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($file->isFile()) {\n\t\t\t\t\t$this->_files[] = $file->getPathname();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function scan_directory($dir, $ext = '*', $recurse = true) {\n $files = array ();\n if ($handle = opendir($dir)) {\n while (false !== ($file = readdir($handle))) {\n if ($file == '.' || $file == '..' ||\n $file == 'CVS' || preg_match('|^\\.|', $file)) {\n continue;\n }\n if (is_link($dir . '/' . $file)) {\n continue;\n }\n if (is_dir ($dir . '/' . $file)) {\n if ($recurse == true)\n $files = array_merge($files, scan_directory ($dir . '/' . $file, $ext));\n } else {\n if($ext == get_file_extension($file) || $ext == '*') {\n $files[] = $dir . '/' . $file;\n }\n }\n }\n closedir($handle);\n }\n return $files;\n}", "public function testPhpExtensionsAreValid()\n {\n $this->assert->php->extensions\n ->isLoaded('simplexml')\n ->isLoaded('fileinfo')\n ->isLoaded('xsl');\n // validate that fileinfo is loaded and configured properly\n $this->assert->php->extensions->fileinfo->isAlive();\n }", "function swpf_plugin_search($path) {\n\n\t$swpf_plugins = array();\n\n\t$dir = opendir ($path);\n\n\twhile ($file = readdir ($dir))\n\t{\n\t\tif (($file == \".\") or ($file == \"..\"))\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (filetype (\"$path/$file\") == \"dir\")\n\t\t{\n\t\t\t$swpf_file = \"$path/$file/swpf.php\";\n\n\t\t\tif (is_file($swpf_file)) {\n\t\t\t\trequire($swpf_file);\n\t\t\t\tif ($options) $swpf_plugins[] = $options;\n\t\t\t}\n\t\t}\n\n\t} //End of while\n\n\tclosedir($dir);\n\n\treturn $swpf_plugins;\n\n}", "public function findAllClassFiles($extension = NULL) {\n $classmap = [];\n $namespaces = $this->registerTestNamespaces();\n if (isset($extension)) {\n // Include tests in the \\Drupal\\Tests\\{$extension} namespace.\n $pattern = \"/Drupal\\\\\\(Tests\\\\\\)?$extension\\\\\\/\";\n $namespaces = array_intersect_key($namespaces, array_flip(preg_grep($pattern, array_keys($namespaces))));\n }\n foreach ($namespaces as $namespace => $paths) {\n foreach ($paths as $path) {\n if (!is_dir($path)) {\n continue;\n }\n $classmap += static::scanDirectory($namespace, $path);\n }\n }\n return $classmap;\n }", "function get_php_files(string $path)\n{\n $matches = [];\n $folders = [rtrim($path, DIRECTORY_SEPARATOR)];\n\n while( $folder = array_shift($folders) )\n {\n $matches = array_merge($matches, glob($folder . DIRECTORY_SEPARATOR . '*.php', GLOB_MARK));\n $childFolders = glob($folder . DIRECTORY_SEPARATOR . '*', GLOB_ONLYDIR);\n $folders = array_merge($folders, $childFolders);\n }\n return $matches;\n}", "protected function extensions() \n {\n return ['php'];\n }", "public function hasExtension($name);", "public function checkExtension($fileName){\n \t\t$extName = explode(\".\", $fileName);\n \t\t$extension = end($extName);\n \t\tif ($extension == \"java\"){\n \t\t\treturn true;\n \t\t}else{\n \t\t\treturn false;\n \t\t}\n \t}", "public function test_scan_files()\n {\n $content = array('.gitignore','.htaccess','index.php','README');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_FILES);\n \n $this->assertEquals(count($content), count($res));\n foreach($res as $path=>$dir){\n $this->assertTrue(in_array($dir->get_base_name(), $content));\n $this->assertInstanceOf('\\Kaili\\File', $dir);\n }\n }", "public function getExtensionsFromSingleInstance($file) {\n\t\tif($file{strlen($file)-1} != DIRECTORY_SEPARATOR ) $file .= DIRECTORY_SEPARATOR;\n\t\treturn glob($file.'typo3conf'.DIRECTORY_SEPARATOR.'ext'.DIRECTORY_SEPARATOR.'*', GLOB_ONLYDIR);\n\t}\n\n}", "public function fileDenyPatternMatchesPhpExtensionDataProvider() {}", "public function extension($filePath);", "protected function findExtension($ext)\n {\n $ext = strtolower(trim($ext, ' .'));\n if (isset($this->extensions[$ext])) {\n return '.' . $this->extensions[$ext];\n }\n\n return '.html';\n }", "public function phpExt(): array\n {\n return \\get_loaded_extensions();\n }", "public function phpExt(): array\n {\n return \\get_loaded_extensions();\n }", "public function testGetPhpFiles()\n {\n // Files arrays\n $files = [];\n $phpFiles = [];\n\n // For every specified folder\n foreach ($this->phpFolders as $folder) {\n\n // Get files from directory\n $files = array_merge($files, FileHelper::directoryFiles($folder));\n }\n\n // Select php only files\n foreach ($files as $file) {\n if (substr($file, -4) === '.php') {\n $phpFiles[] = $file;\n }\n }\n\n // Check that we have at least 10 php files across all collected\n $count = count($phpFiles);\n $this->assertTrue($count > 10, json_encode([\n 'count' => $count,\n 'expected' => 'total number of php files must exceed 10 files',\n ], JSON_UNESCAPED_SLASHES));\n\n // Return end point data\n return $phpFiles;\n }", "public function find_extension_file($slug)\n\t{\n\t\t// We'll search the root dir first\n\t\t$files = glob(path('extensions').$slug.DS.'extension'.EXT);\n\n\t\tif (empty($files))\n\t\t{\n\t\t\t// We couldn't find the extension file in the first path, so we'll try the 2nd\n\t\t\t$files = glob(path('extensions').'*'.DS.$slug.DS.'extension'.EXT);\n\t\t}\n\n\t\treturn ( ! empty($files)) ? $files[0] : false;\n\t}", "public function getFiles()\n {\n $dir = $this->getDir();\n\n return array_filter(array_map(function ($file) use ($dir) {\n if (is_file($dir.$file) && pathinfo($file, PATHINFO_EXTENSION) == 'php') {\n return $dir.$file;\n }\n }, scandir($dir)));\n }" ]
[ "0.6378908", "0.62099826", "0.61495525", "0.6130767", "0.6104926", "0.6008885", "0.59576637", "0.5952251", "0.593186", "0.59039265", "0.58814347", "0.58732206", "0.5866185", "0.5841527", "0.584152", "0.58406514", "0.57603306", "0.5739005", "0.57352954", "0.572393", "0.5692", "0.5666368", "0.56465465", "0.56244814", "0.561077", "0.5556108", "0.5556108", "0.55429935", "0.5534276", "0.55272704" ]
0.84767115
0
Set the attributes for the table cell containing the form button(s)
public function set_button_attrs($button_attrs) { if (is_array($button_attrs)) { $this->button_cell_attrs = $button_attrs; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function inputAttributes()\n {\n $this->input_attributes['name'] = $this->name;\n $this->input_attributes['type'] = 'submit';\n $this->input_attributes['value'] = $this->params['title'];\n }", "function formProperties() {\n\t\tglobal $l_we_class;\n\n\t\t// Create table\n\t\t$_content = new we_htmlTable(array(\"border\" => 0, \"cellpadding\" => 0, \"cellspacing\" => 0), 12, 5);\n\n\t\t// Row 1\n\t\t$_content->setCol(0, 0, null, $this->formInput2(155, \"width\", 10, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol(0, 2, null, $this->formInput2(155, \"height\", 10, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol(0, 4, null, $this->formInput2(155, \"border\", 10, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\n\t\t$_content->setCol(0, 1, null, getPixel(18, 1));\n\t\t$_content->setCol(0, 3, null, getPixel(18, 1));\n\n\t\t// Row 2\n\t\t$_content->setCol(1, 0, array(\"colspan\" => 5), getPixel(1, 5));\n\n\t\t// Row 3\n\t\t$_content->setCol(2, 0, null, $this->formInput2(155, \"align\", 10, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol(2, 2, null, $this->formInput2(155, \"hspace\", 10, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol(2, 4, null, $this->formInput2(155, \"vspace\", 10, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\n\t\t$_content->setCol(2, 1, null, getPixel(18, 1));\n\t\t$_content->setCol(2, 3, null, getPixel(18, 1));\n\n\t\t// Row 4\n\t\t$_content->setCol(3, 0, array(\"colspan\" => 5), getPixel(1, 5));\n\n\t\t// Row 5\n\t\t$_content->setCol(4, 0, array(\"colspan\" => 3), $this->formInput2(328, \"alt\", 23, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol(4, 3, null, getPixel(18, 1));\n\t\t$_content->setCol(4, 4, null, $this->formInput2(155, \"name\", 10, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\n\t\t// Row 6\n\t\t$_content->setCol(5, 0, array(\"colspan\" => 5), getPixel(1, 5));\n\n\t\t//\tRow 7\n\t\t$_content->setCol(6, 0, array(\"colspan\" => 3), $this->formInput2(328, \"title\", 23, \"attrib\", ($this->getElement(\"useMetaTitle\") == 1 ? \"readonly='readonly'\" : \"\") . '\" onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\n\t\t$_content->setCol(6, 3, null, getPixel(18, 1));\n\t\t\t$_titleField = \"we_\".$this->Name.\"_attrib[title]\";\n\t\t\t$_metaTitleField = \"we_\".$this->Name.\"_txt[Title]\";\n\t\t\t$useMetaTitle = \"we_\".$this->Name.\"_txt[useMetaTitle]\";\n\t\t//\tdisable field 'title' when checked or not.\n\t\t$_content->setCol(6, 4, array(\"valign\" => \"bottom\"), we_forms::checkboxWithHidden($this->getElement(\"useMetaTitle\"), $useMetaTitle, $l_we_class[\"use_meta_title\"], false, \"defaultfont\", \"if(this.checked){ document.forms[0]['$_titleField'].setAttribute('readonly', 'readonly', 'false'); document.forms[0]['$_titleField'].value = ''; }else{ document.forms[0]['$_titleField'].removeAttribute('readonly', 'false');}_EditorFrame.setEditorIsHot(true);\"));\n\n\t\t// longdesc should be available in images.\n\t\t// check if longdesc is set and get path\n\t\t$longdesc_id_name = \"we_\".$this->Name.\"_attrib[longdescid]\";\n\t\t$longdesc_text_name = 'tmp_longdesc';\n\t\t$longdesc_id = $this->getElement('longdescid');\n\t\tif($longdesc_id){\n $longdescPath = id_to_path($longdesc_id);\n\t\t} else {\n $longdescPath = '';\n\t\t}\n\n\t\t$we_button = new we_button();\n\n\t\t$yuiSuggest =& weSuggest::getInstance();\n\t\t$yuiSuggest->setAcId(\"LonDesc\");\n\t\t$yuiSuggest->setContentType(\"folder,text/webEdition,text/html\");\n\t\t$yuiSuggest->setInput($longdesc_text_name,$longdescPath);\n\t\t$yuiSuggest->setLabel($l_we_class[\"longdesc_text\"]);\n\t\t$yuiSuggest->setMaxResults(20);\n\t\t$yuiSuggest->setMayBeEmpty(1);\n\t\t$yuiSuggest->setResult($longdesc_id_name, $longdesc_id);\n\t\t$yuiSuggest->setSelector(\"Docselector\");\n\t\t$yuiSuggest->setWidth(328);\n\t\t$yuiSuggest->setSelectButton($we_button->create_button(\"select\", \"javascript:we_cmd('openDocselector',document.we_form.elements['$longdesc_id_name'].value,'\" . FILE_TABLE . \"','document.we_form.elements[\\\\'$longdesc_id_name\\\\'].value','document.we_form.elements[\\\\'$longdesc_text_name\\\\'].value','opener._EditorFrame.setEditorIsHot(true);opener.top.we_cmd(\\'reload_editpage\\');','\".session_id().\"','','text/webedition,text/plain,text/html',1)\"));\n\t\t$yuiSuggest->setTrashButton($we_button->create_button('image:btn_function_trash',\"javascript:document.we_form.elements['$longdesc_id_name'].value='-1';document.we_form.elements['$longdesc_text_name'].value='';_EditorFrame.setEditorIsHot(true); YAHOO.autocoml.setValidById('\".$yuiSuggest->getInputId().\"')\"));\n\t\t$_content->setCol(7, 0, array(\"colspan\" => 5), getPixel(1, 5));\n\t\t$_content->setCol(8, 0, array(\"valign\" => \"bottom\", 'colspan' => 5), $yuiSuggest->getYuiFiles() . $yuiSuggest->getHTML() . $yuiSuggest->getYuiCode());\n\n\t\t// Return HTML\n\t\treturn $_content->getHtmlCode();\n \t}", "protected function classes()\n {\n $this->label_attributes['class'] = ['columns'];\n $this->label_attributes['style']['float'] = 'left';\n $this->input_attributes['class'] = ['btn'];\n parent::classes();\n }", "protected function prepareButtons()\n\t{\n\t\tparent::prepareButtons();\n\t\t$this->xt->assign(\"save_button\", false);\n\t\t$this->xt->assign(\"view_page_button\", false );\n\t\t\n\t\t$this->xt->assign(\"updsel_button\", true);\n\t\t$this->xt->assign(\"updselbutton_attrs\", \"id=\\\"saveButton\".$this->id.\"\\\"\" );\n\t\t\n\t\t$label = str_replace( \"%n%\", $this->nSelected, \"Update %n% records\" );\n\t\t$this->xt->assign(\"update_selected\", $label );\n\t}", "public function setAttributes();", "function bindActionButtonObject()\r\n\t{\r\n JTable::addIncludePath( JPATH_ADMINISTRATOR . '/components/com_calendar/tables' );\r\n\t\t$table = JTable::getInstance( 'ActionButtons', 'CalendarTable' );\r\n\t\t\r\n\t if (!empty($this->actionbutton_id))\r\n\t {\r\n\t $table->load( $this->actionbutton_id );\r\n\t }\r\n\t \r\n\t\t$table->trimProperties();\r\n\t\t\r\n\t\t$properties = $this->getProperties();\r\n\t\t$table_properties = $table->getProperties();\r\n\r\n\t\tforeach ($table_properties as $prop=>$value)\r\n\t\t{\r\n\t\t $key_name = $prop;\r\n\t\t if (!array_key_exists($key_name, $properties))\r\n\t\t {\r\n\t\t $this->$key_name = $table->$prop;\r\n\t\t }\r\n\t\t}\r\n\t}", "private function addAtrributesToCRUD() {\r\n if (!empty($this->__attributes)) {\r\n $this->myCRUD()->setAtributes($this->__attributes);\r\n }\r\n }", "function setCellAttributes(array $values)\n\t{\n\t\t$this->attrs = $values;\n\t\treturn $this;\n\t}", "function setCellAttributes(array $values)\n\t{\n\t\t$this->attrs = $values;\n\t\treturn $this;\n\t}", "public function getFormAttribs() \n\t {\n return [\n 'EMP_ID'=>['type'=>Form::INPUT_TEXT, 'options'=>['placeholder'=>'Enter ...']],\n 'EMP_NM'=>['type'=>Form::INPUT_TEXT, 'options'=>['placeholder'=>'Enter ...']],\n 'EMP_IMG'=>['type'=>Form::INPUT_TEXT],\n // 'actions'=>['type'=>Form::INPUT_RAW, 'value'=>Html::submitButton('Submit', ['class'=>'btn btn-primary'])];\n ];\n }", "public function getAttributeButton($row, $href, $label, $title, $icon, $attributes)\n\t{\n\t\treturn '<a href=\"'.$this->addToUrl($href.'&amp;id='.$row['attr_id']).'\" title=\"'.specialchars($title).'\"'.$attributes.'>'.\\Image::getHtml($icon, $label).'</a> ';\n\t}", "function getCellAttributes()\n\t{\n\t\treturn $this->attrs;\n\t}", "function getCellAttributes()\n\t{\n\t\treturn $this->attrs;\n\t}", "public function set_button($button) { $this->button = $button; }", "public function get_attributes()\n {\n // Initialize the attributes array with the return value of\n // the parent method\n $attributes = parent::get_attributes();\n\n // Add the form-actions class\n $attributes['class'] = trim(\n 'row'.' '.(\n isset($attributes['class']) ? $attributes['class'] : ''\n )\n );\n\n // Return the completed set of attributes\n return $attributes;\n }", "function krnEmit_button_editSubmit($caption, $value) {\n // used twice in set security\n // submit for editing - so all are consistent - (design choices:Edit button - caption - caption button that looks like link)\n //?????????? if report should not be coded as button ??????????????????????\n //$cellClass = empty($cellClass) ? '' : ' class=\"'.$class.'\"';\n return '<button type=\"submit\" class=\"kcmKrn-button-editLink\" name=\"submit\" value=\"'.$value.'\">' . $caption . '</button>';\n}", "function initialize () {\n $this->set_openingtag ( \"<INPUT TYPE=\\\"submit\\\" value=\\\"\" );\n\t$this->set_closingtag ( \"\\\"[attributes]>\" );\n\t$this->set_type (\"button\");\n }", "public function setButtonAttributes(array $button_attributes = [])\n {\n if($attributes = $button_attributes) {\n foreach($attributes as $key_attribute => $val_attribute) {\n if($key_attribute == 'value') {\n $this->button_attributes['value'] = $val_attribute;\n } else {\n $this->button_attributes[] = $key_attribute.'=\"'.$val_attribute.'\"';\n }\n }\n }\n\n return $this;\n }", "public function addsButtons() {}", "protected function _addButtons()\r\n\t{\r\n\t\t$model = $this->getModel();\r\n\t\t$params\t= $model->getParams();\r\n\t\t$this->showEmail = $params->get('email', 0);\r\n\t\t$this->emailLink = '';\r\n\t\t$this->printLink = '';\r\n\t\t$this->pdfLink = '';\r\n\t\t$this->showPrint = $params->get('print', 0);\r\n\r\n\t\tif ($this->showPrint) {\r\n\t\t\t$text = JHTML::_('image.site', 'printButton.png', '/images/', NULL, NULL, JText::_('Print'));\r\n\t\t\t$this->printLink = '<a href=\"#\" onclick=\"window.print();return false;\">'.$text.'</a>';\r\n\t\t}\r\n\r\n\t\tif (JRequest::getVar('tmpl') != 'component') {\r\n\t\t\tif ($this->showEmail) {\r\n\t\t\t\t$this->emailLink = FabrikHelperHTML::emailIcon($model, $params);\r\n\t\t\t}\r\n\r\n\t\t\tif ($this->showPrint) {\r\n\t\t\t\t$this->printLink = FabrikHelperHTML::printIcon($model, $params, $model->_rowId);\r\n\t\t\t}\r\n\r\n\t\t\t$this->showPDF = $params->get('pdf', 0);\r\n\t\t\tif ($this->showPDF) {\r\n\t\t\t\t$this->pdfLink = FabrikHelperHTML::pdfIcon($model, $params, $model->_rowId);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->showPDF = false;\r\n\t\t}\r\n\t}", "public function actionUpdateFields() {\n\t\t$xlsAttributes = json_decode($_POST['xlsAttributes']);\n\t\tif(isset($_POST)) {\n\t\t\t$model_fields = new $_POST['table'];\n\t\t\techo \"<p class=\\\"note\\\">\".Yii::t('excel','Attach the columns to table fields').\"</p>\";\n\t\t\tforeach($model_fields->attributeNames() as $attribute)\n\t\t\t{\n\t\t\t\techo \"<div class=\\\"jFormComponent\\\">\";\n\t\t\t\techo CHtml::label($attribute, 'label_'.$attribute);\n\t\t\t\t$selected = null;\n\t\t\t\tfor ($col = 0; $col <= count($xlsAttributes)-1; ++$col) {\n\t\t\t\t\tif($xlsAttributes[$col] == $attribute)\n\t\t\t\t\t\t$selected = $col;\n\t\t\t\t}\n\t\t\t\techo CHtml::dropDownList('attr_'.$attribute, $selected, $xlsAttributes, array('empty'=>Yii::t('excel','--select field--')));\n\t\t\t\techo \"</div>\";\n\t\t\t}\n\t\t}\n\t}", "function formProperties(){\n\t\t// Create table\n\t\t$_content = new we_html_table(array('class' => 'default propertydualtable'), 5, 3);\n\t\t$row = 0;\n\t\t// Row 1\n\t\t$_content->setCol($row, 0, null, $this->formInputInfo2(155, 'width', 10, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"', \"origwidth\"));\n\t\t$_content->setCol($row, 1, null, $this->formInputInfo2(155, 'height', 10, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"', \"origheight\"));\n\t\t$_content->setCol($row++, 2, null, $this->formInput2(155, 'border', 10, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\n\n\t\t// Row 2\n\t\t$_content->setCol($row, 0, null, $this->formInput2(155, 'align', 10, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol($row, 1, null, $this->formInput2(155, 'hspace', 10, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol($row++, 2, null, $this->formInput2(155, 'vspace', 10, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\n\n\t\t// Row 3\n\t\t$_content->setCol($row, 0, array('colspan' => 3), $this->formInput2(328, 'alt', 23, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol($row++, 2, null, $this->formInput2(155, 'name', 10, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\n\n\t\t//\tRow 4\n\t\t$_content->setCol($row, 0, array('colspan' => 3), $this->formInput2(328, 'title', 23, 'attrib', ($this->getElement('useMetaTitle') == 1 ? \"readonly='readonly'\" : \"\") . '\" onchange=\"_EditorFrame.setEditorIsHot(true);\"', 'Title'));\n\n\t\t$_titleField = 'we_' . $this->Name . '_attrib[title]';\n\t\t$_metaTitleField = 'we_' . $this->Name . '_txt[Title]';\n\t\t$useMetaTitle = 'we_' . $this->Name . '_attrib[useMetaTitle]';\n\t\t//\tdisable field 'title' when checked or not. on checked true: document.forms[0]['$_titleField'].value='$this->getElement('Title')' and onchecked false: document.forms[0]['$_titleField'].value='' added to fix bug #5814\n\t\t$_content->setCol($row++, 2, array('style' => 'vertical-align:bottom'), we_html_forms::checkboxWithHidden($this->getElement('useMetaTitle'), $useMetaTitle, g_l('weClass', '[use_meta_title]'), false, 'defaultfont', \"if(this.checked){ document.forms[0]['\" . $_titleField . \"'].setAttribute('readonly', 'readonly', 'false'); document.forms[0]['\" . $_titleField . \"'].value = '\" . $this->getElement('Title') . \"'; }else{ document.forms[0]['\" . $_titleField . \"'].removeAttribute('readonly', 'false'); document.forms[0]['\" . $_titleField . \"'].value='';}_EditorFrame.setEditorIsHot(true);\"));\n\n\t\t// longdesc should be available in images.\n\t\t// check if longdesc is set and get path\n\t\t$longdesc_id_name = 'we_' . $this->Name . '_attrib[longdescid]';\n\t\t$longdesc_text_name = 'tmp_longdesc';\n\t\t$longdesc_id = $this->getElement('longdescid');\n\t\t$longdescPath = ($longdesc_id ? id_to_path($longdesc_id) : '');\n\n\t\t$yuiSuggest = & weSuggest::getInstance();\n\t\t$yuiSuggest->setAcId('LonDesc');\n\t\t$yuiSuggest->setContentType('folder,' . we_base_ContentTypes::WEDOCUMENT . ',' . we_base_ContentTypes::HTML);\n\t\t$yuiSuggest->setInput($longdesc_text_name, $longdescPath);\n\t\t$yuiSuggest->setLabel(g_l('weClass', '[longdesc_text]'));\n\t\t$yuiSuggest->setMaxResults(20);\n\t\t$yuiSuggest->setMayBeEmpty(1);\n\t\t$yuiSuggest->setResult($longdesc_id_name, $longdesc_id);\n\t\t$yuiSuggest->setSelector(weSuggest::DocSelector);\n\t\t$yuiSuggest->setWidth(328);\n\t\t$cmd1 = \"document.we_form.elements['\" . $longdesc_id_name . \"'].value\";\n\n\t\t$yuiSuggest->setSelectButton(we_html_button::create_button(we_html_button::SELECT, \"javascript:we_cmd('we_selector_image',\" . $cmd1 . \",'\" . FILE_TABLE . \"','\" . we_base_request::encCmd($cmd1) . \"','\" . we_base_request::encCmd(\"document.we_form.elements['\" . $longdesc_text_name . \"'].value\") . \"','\" . we_base_request::encCmd(\"opener._EditorFrame.setEditorIsHot(true);opener.top.we_cmd('reload_editpage');\") . \"','','','\" . we_base_ContentTypes::WEDOCUMENT . \",\" . we_base_ContentTypes::TEXT . \",\" . we_base_ContentTypes::HTML . \"',1)\"));\n\t\t$yuiSuggest->setTrashButton(we_html_button::create_button(we_html_button::TRASH, \"javascript:document.we_form.elements['\" . $longdesc_id_name . \"'].value='-1';document.we_form.elements['\" . $longdesc_text_name . \"'].value='';_EditorFrame.setEditorIsHot(true); YAHOO.autocoml.setValidById('\" . $yuiSuggest->getInputId() . \"')\"));\n\t\t$_content->setCol($row, 0, array('style' => 'vertical-align:bottom', 'colspan' => 5), $yuiSuggest->getHTML() . $yuiSuggest->getYuiJs());\n\n\t\t// Return HTML\n\t\treturn $_content->getHtml();\n\t}", "function initialize () {\n $this->set_openingtag ( \"<INPUT TYPE=\\\"button\\\" value=\\\"\" );\n\t$this->set_closingtag ( \"\\\"[attributes]>\" );\n\t$this->set_type (\"button\");\n }", "public function getActionButtonsAttribute()\n {\n return '<div class=\"btn-group action-btn\">\n '.$this->getEditButtonAttribute(\"edit-image\", \"admin.images.edit\").'\n '.$this->getDeleteButtonAttribute(\"delete-image\", \"admin.images.destroy\").'\n </div>';\n }", "public function getButtonAttributes()\n {\n unset($this->button_attributes['value']);\n\n return $this->button_attributes;\n }", "function button_attr(string $button_id, array $button): string\n{\n $attributes = [\n 'name' => 'action',\n 'value' => $button_id,\n ];\n $attributes += $button['extra']['attr'] ?? [];\n return html_attr($attributes);\n}", "public function getActionButtonsAttribute()\n {\n return '<div class=\"btn-group action-btn\">\n '.$this->getEditButtonAttribute(\"edit-blogmodel\", \"admin.blogmodels.edit\").'\n '.$this->getDeleteButtonAttribute(\"delete-blogmodel\", \"admin.blogmodels.destroy\").'\n </div>';\n }", "protected function generateButtons() {}", "public function setTrTdAttr ($attr, $row=null) {\n if (is_numeric ($row))\n $this->_setAttr ($attr, $this->trtdAttr[$row]);\n else\n $this->_setAttr ($attr, $this->trtdAttr[]);\n }", "public function onEditHeaderButtonCallback(array $row, string $href, string $label, string $title, string $icon, string $attributes): string\n {\n return $this->generateButton($row, $href, $label, $title, $icon, $attributes, $this->permissionChecker->hasUserPermission(PermissionChecker::PERMISSION_EDIT));\n }" ]
[ "0.5834517", "0.5720483", "0.57074565", "0.55786395", "0.5570131", "0.5531497", "0.5462197", "0.5442811", "0.5442811", "0.5427319", "0.53662515", "0.5363505", "0.5363505", "0.53543967", "0.5331065", "0.52888775", "0.527464", "0.5266644", "0.52394706", "0.52268016", "0.5225646", "0.5214467", "0.52063215", "0.51902235", "0.5173941", "0.5169089", "0.5138877", "0.51346755", "0.5103903", "0.5087047" ]
0.64959556
0
Set a row attribute
public function set_row_attr($row, $attr_name, $attr_val) { $row = (int)$row; $attr_name = (string)$attr_name; $attr_val = (string)$attr_val; if ($attr_name == '' || $attr_val == '') { return false; } if (isset($this->row_attrs[$row][$attr_name])) { $this->row_attrs[$row][$attr_name] .= ' ' . $attr_val; } else { $this->row_attrs[$row][$attr_name] = $attr_val; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setTrTdAttr ($attr, $row=null) {\n if (is_numeric ($row))\n $this->_setAttr ($attr, $this->trtdAttr[$row]);\n else\n $this->_setAttr ($attr, $this->trtdAttr[]);\n }", "public function setRow($row)\n {\n $this->row = $row;\n }", "public function setViaTableAttributesValue($value);", "protected function setRow($name, Common $element, $attribute = '')\n {\n $prop = empty($attribute) ? $element->$name : $element->$attribute;\n $this->setData($name, empty($prop) ? '' : $prop);\n }", "function setRowDatas(&$row) {\r\n\t\t\r\n }", "public function setAttribute($attribute, $value) {\n\t\tif (!$this->attributes) {\n\t\t\t$this->attributes = tx_newspaper::selectOneRow(\n\t\t\t\t\t'*', tx_newspaper::getTable($this), $this->condition\n\t\t\t);\n\t\t}\n\t\t\n\t\t$this->attributes[$attribute] = $value;\n\t}", "public function setRow(int $row): void\n {\n $this->row = $row;\n }", "abstract protected function updateSpecificProperties($row);", "public function setRow($row)\n\t{\n\t\t$this->cells[] = new Hypertable_ThriftGen_Cell(array('key' => new Hypertable_ThriftGen_Key( array('row'=> $row, 'flag' => 0))));\n\t\treturn $this;\n\t}", "function setRowDatas(&$row) {\r\n\t\t/* for optimization reason, do not save row. save just needed parameters */\r\n\r\n\t\t//$this->_specific_data\t= isset($row->specific) ? $row->specific : '';\r\n\t}", "public function set($rowData)\n {\n $this->rawRowData = $rowData;\n }", "function setCellAttribute($name, $value)\n\t{\n\t\t$this->attrs[$name] = $value;\n\t\treturn $this;\n\t}", "function setCellAttribute($name, $value)\n\t{\n\t\t$this->attrs[$name] = $value;\n\t\treturn $this;\n\t}", "public function __SET($attr, $value){ //Establece valor y atributo\n\n\t\t\t$this->$attr=$value;\n\t\t}", "public function setRow($row)\n {\n $this->row = $row;\n return $this;\n }", "function setAttribute ($attribute, $value) {\n return $this->dbH->setAttribute($attribute, $value);\n }", "function setRowDatas(&$row) {\r\n\t\t/* for optimization reason, do not save row. save just needed parameters */\r\n\t}", "public function setAttributes();", "function set_attr($attr=array()) {\n $this->other_attr = $attr;\n }", "public function set($column,$value);", "public function setRow($Row) \n \t{\n \t\treturn false;\n \t\t//parent::setRow($Row);\n \t}", "public function changeRowData(&$row){}", "function set($attr, $value)\r\n\t{\r\n\t\t$this->$attr = $value;\r\n\t}", "function setCellAttributes(array $values)\n\t{\n\t\t$this->attrs = $values;\n\t\treturn $this;\n\t}", "function setCellAttributes(array $values)\n\t{\n\t\t$this->attrs = $values;\n\t\treturn $this;\n\t}", "public function updateRow($row);", "public function setAttribute($attribute, $value)\n {\n }", "public function setAttribute($attribute, $value)\r\n\t{\r\n\t\t\r\n\t}", "public static function updateAttributes($bill, $row){\n $bill->setId($row['id']);\n $bill->setDate($row['date']);\n $bill->setUser($row['user']);\n $bill->setPayment($row['payment']);\n $bill->setPaid($row['paid']);\n }", "function setRowPrototype($row) {\n\t\t$this->row = $row;\n\t\treturn $this;\n\t}" ]
[ "0.7184818", "0.69530857", "0.6781479", "0.67430913", "0.65449625", "0.6439724", "0.64035505", "0.6400028", "0.6385595", "0.6361818", "0.6347521", "0.63459355", "0.63459355", "0.634324", "0.6320215", "0.6309764", "0.62964934", "0.6223196", "0.6202105", "0.6145299", "0.61203045", "0.60466707", "0.5993699", "0.5934689", "0.5934689", "0.59293437", "0.5921092", "0.5912191", "0.59064496", "0.588355" ]
0.71445227
1
End a fieldset in the form
public function end_fieldset() { $fs_attrs = array('marker' => 'end'); $fieldset = new GenElement('fieldset', '', $fs_attrs); array_push($this->form_elements, array($fieldset->render(1), 0, 'fieldset')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function end_fieldset()\n\t{\n\t\tif( $this->has_fieldset )\n\t\t\t$this->buffer.= '</fieldset>';\n\t\t$this->has_fieldset = false;\n\t}", "public static function fieldset_close() {\n\t\t\treturn '</fieldset>';\n\t\t}", "static function closeFieldset()\n {\n echo '</ul>';\n echo '</fieldset>'.PHP_EOL;\n }", "public function create_fieldset_end()\n\t{\n\t\treturn '</fieldset>'.\"\\n\";\n\t}", "public function endFieldset() {\n $this->_currentFieldset = NULL;\n }", "public static function renderCloseFieldset();", "public static function endForm(){\n\t\treturn '</form>';\n\t}", "public function RenderFormEnd() {\n\n return '</form>';\n }", "abstract public function closeFieldset();", "public function end()\n {\n $this->associatedEntity = null;\n\n return \"</form>\";\n }", "public function close()\n {\n $this->form = null;\n $this->fields = null;\n\n return '</form>';\n }", "public static function form_close() {\n\t\t\treturn '</form>';\n\t\t}", "static function closeForm()\n {\n echo '</form>'.PHP_EOL;\n }", "abstract public function closeEmptyFieldset();", "public static function end_form_tag()\n {\n return '</form>';\n }", "public static function close(){\n\t\t\treturn '</form>';\n\t\t}", "public function close()\n {\n return '</form>';\n }", "public function close()\n {\n return '</form>';\n }", "public function closeForm()\n {\n return \"</form>\";\n }", "public function close()\n\t{\n\t\treturn '</form>';\n\t}", "function formFooter(){\r\n\r\n\t\t$ret = '</form>';\r\n\r\n\t\treturn $ret;\r\n\t}", "public function divEnd(): FormHelper\n {\n $this->html .= \"</div>\";\n\n return $this;\n }", "function field_close() {\n\t\t\t\n\t\t\treturn $this->form['markup'] === 'xhtml' ? ' />' : '>';\n\t\t\t\n\t}", "public static function close()\n\t{\n\t\treturn '</form>';\n\t}", "public static function easyFormEnd($closeDiv = true)\n {\n echo '<input type=\"hidden\" name=\"task\" value=\"\" />'.NL;\n echo '<input type=\"hidden\" name=\"controller\" '\n .'value=\"'.JRequest::getCmd('controller').'\" />'.NL;\n echo '<input type=\"hidden\" name=\"view\" '\n .'value=\"'.JRequest::getCmd('view').'\" />'.NL;\n echo '<input type=\"hidden\" name=\"file_name\" id=\"file_name\" '\n .'value=\"'.JRequest::getVar('file_name').'\" />'.NL;\n echo '<input type=\"hidden\" name=\"file_path\" id=\"file_path\" '\n . 'value=\"'.JRequest::getVar('file_path').'\" />'.NL;\n echo '</form>'.NL;\n\t echo($closeDiv) ? '</div>'.NL : '';\n echo '<div style=\"clear: both\"></div>'.NL;\n }", "function closeForm()\r\n\t\t{\r\n\t\t\t# Open form and configure\r\n\t\t\techo \"</form>\";\r\n\t\t}", "public function closeTag()\n {\n return '</form> </div></div>';\n }", "function form_end($text = '') {\n $output = '';\n if(!empty($text)) {\n $output .= form_submit($text);\n }\n\n $output .= '</form>';\n\n return html__output($output);\n}", "function formEnd(){\n \n $form = '</form>';\n\n echo $form;\n}", "public function endForm()\r\n {\r\n echo '<div class=\"panel-footer\">\r\n <input type=\"submit\" class=\"btn btn-primary btn-sm\" value=\"Vote\" />\r\n </div>\r\n </form>';\r\n }" ]
[ "0.8683747", "0.7981708", "0.79485416", "0.7723414", "0.72680134", "0.7240373", "0.7168367", "0.7066881", "0.6913539", "0.6906262", "0.66773194", "0.66431904", "0.66132414", "0.65945315", "0.65435416", "0.651934", "0.6514329", "0.6514329", "0.65118724", "0.6454397", "0.6404884", "0.63327813", "0.62775", "0.62706536", "0.62546194", "0.6173254", "0.61599535", "0.60949916", "0.6075579", "0.6025077" ]
0.88671374
0
Set alternating row class "alt"
public function set_alt_rows() { $this->alt_rows = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fancy_altrows($rows) {\r\n\tif(is_array($rows)) {\r\n\t\t$i = 0;\r\n\t\tforeach($rows as $text) { $i++; ?>\r\n\t\t\t\t\t<li class=\"<?php tablealt($i); ?>\"><?php echo $text; ?></li>\r\n<?php\r\n\t\t}\r\n\t}\r\n}", "function boxGetAltRowStyle($i, $classonly = false) {\n\t\tif ($i % 2 == 0)\n\t\t\t$ret = 'bgcolor-white';\n\t\telse\n\t\t\t$ret = 'bgcolor-grey';\n\t\tif ($classonly)\n\t\t\treturn $ret;\n\t\telse\n\t\t\treturn 'class=\"'.$ret.'\"';\n\t}", "public function setRowAlt($rowAlt)\n {\n $this->rowAlt = $this->checkRowAltRange($rowAlt);\n $this->childNodes = [];\n $this->append($this->makeTableRows());\n }", "function alternate_color($count)\n\t{\n\t\tif(($count%2) == 1)\n\t\t\techo 'class=\"row1\"';\n\t\telse\n\t\t\techo 'class=\"row2\"';\n\t}", "function tablealt($i) {\r\n\techo ($i%2 == 0) ? \" alt\" : \"\";\r\n}", "function rowcolor()\n {\n static $rowclass;\n\n if (empty($rowclass)) {\n $rowclass = 1;\n }\n\n if ($rowclass == 2) {\n $rowclass = 1;\n return \"row2\";\n } else {\n $rowclass = 2;\n return \"row1\";\n }\n }", "public function setElementRowClass(string $class)\n {\n $this->rowClass = $class;\n return $this;\n }", "function single_row( $item ) {\r\n\t\tstatic $row_class = '';\r\n\r\n\t\t// WP 4.2+ uses \"striped\" CSS styles to implement \"alternate\"\r\n\t\tif ( version_compare( get_bloginfo( 'version' ), '4.2', '<' ) ) {\r\n\t\t\t$row_class = ( $row_class == '' ? ' class=\"alternate\"' : '' );\r\n\t\t}\r\n\r\n\t\techo '<tr id=\"attachment-' . $item->ID . '\"' . $row_class . '>';\r\n\t\techo parent::single_row_columns( $item );\r\n\t\techo '</tr>';\r\n\t}", "public function setRowClasses($arrClasses){\n\t\t$this->arrClasses = $arrClasses;\n\t}", "public function setAlt($alt)\n {\n $this->alt = $alt;\n $this->setAttributes(\"Alt\");\n }", "public static function row_classes($classes, $row, $builder_id) {\n return !empty($row['styling'])?self::get_classes($row['styling'], $classes, 'row'):$classes;\n }", "function addRow($klass = '', $attr_ar = array())\n {\n $this->cur_section['rows'][] = array(\n 'klass' => $klass,\n 'atts' => $attr_ar,\n 'cells' => array()\n );\n\n }", "public function laratablesRowClass()\n\t\t{\n\t\t\t// $coa = Coa::find($this->id);\n\t\t\t//\tStorage::download('coapath/' . $this->coa_name);\n\n\t\t\treturn $this->active ? 'text-success' : '';\n\t\t}", "public function setAlternates(array $alternates = []): void\n {\n $this->writeAlternates($alternates, false);\n }", "private function checkRowAltRange($rowAlt)\n {\n return ($rowAlt > 0) ? $rowAlt : $this->rowAlt;\n }", "function SetClassesForDisplay( $class_4_odd, $class_4_even )\r\n\t\t{\r\n\t\t\t$this->class_display_odd = $class_4_odd;\r\n\t\t\t$this->class_display_even = $class_4_even;\r\n\t\t}", "public function get_row_class($series) {\n if ($series->finished) {\n return 'dimmed_text';\n }\n }", "function kdw_row_img($i){ \r\n \r\n if ($i == 'intro'){\r\n $options = get_field('kdw_page_intro_img_options'); \r\n $imgID = get_field('kdw_page_intro_img'); \r\n } else {\r\n $options = get_sub_field('options');\r\n $imgID = get_sub_field('img');\r\n }\r\n \r\n if ($options == 'large' ){\r\n $wrapper_class = 'row-inline-image-large';\r\n $size = 'wrapper-large';\r\n $img_size = 'large';\r\n \r\n } else if ( $options == 'medium'){\r\n $wrapper_class = 'row-inline-image-content';\r\n $size = 'wrapper-content';\r\n $img_size = 'medium';\r\n } else {\r\n // default = small\r\n $wrapper_class = 'row-inline-image-small';\r\n $size = 'wrapper-small';\r\n $img_size = 'medium';\r\n }\r\n \r\n if( $imgID && $options == 'bg1' || $options == 'bg2'){\r\n \r\n $bg_img = wp_get_attachment_image_src( $imgID , 'large' );\r\n \r\n // css styles for .row'$i'\r\n \r\n echo '<div class=\"row-bg-image row-bg-image-'.$options.' wrapper-outer row-margin row'.$i.' clearfix\" style=\"background-image: url('.$bg_img[0].');\">';\r\n echo '<div></div>';\r\n echo '</div>';\r\n \r\n } else if ($imgID){\r\n echo '<div class=\"row-inline-image wrapper-outer '.$wrapper_class.' row'.$i.' clearfix row-padding\">';\r\n echo '<div class=\"'.$wrapper_class.'\">';\r\n echo wp_get_attachment_image($imgID, $img_size);\r\n echo '</div>';\r\n echo '</div>';\r\n }\r\n}", "public function setRowsClasses($class1, $class2){\n\t\t$this->_class1 = $class1;\n\t\t$this->_class2 = $class2;\n\t}", "public function setRowsetClass($rowsetClass)\n {\n $this->_rowsetClass = (string)$rowsetClass;\n\n return $this;\n }", "function multiTableRow($row_attrs, $cell_data, $istitle = false) {\n\t\t$ap = html_ap();\n\t\t(isset($row_attrs['class'])) ? $row_attrs['class'] .= ' ff' : $row_attrs['class'] = 'ff';\n\t\tif ( $istitle ) {\n\t\t\t$row_attrs['class'] .= ' align-center';\n\t\t}\n\t\t$return = html_ao('tr', $row_attrs);\n\t\tfor ( $c = 0; $c < count($cell_data); $c++ ) {\n\t\t\t$locAp = html_ap();\n\t\t\t$cellAttrs = array();\n\t\t\tforeach (array_slice($cell_data[$c],1) as $k => $v) {\n\t\t\t\t$cellAttrs[$k] = $v;\n\t\t\t}\n\t\t\t(isset($cellAttrs['class'])) ? $cellAttrs['class'] .= ' ff' : $cellAttrs['class'] = 'ff';\n\t\t\t$return .= html_ao('td', $cellAttrs);\n\t\t\tif ( $istitle ) {\n\t\t\t\t$return .= html_ao('strong');\n\t\t\t}\n\t\t\t$return .= $cell_data[$c][0];\n\t\t\tif ( $istitle ) {\n\t\t\t\t$return .= html_ac(html_ap() -1);\n\t\t\t}\n\t\t\t$return .= html_ac($locAp);\n\t\t}\n\t\t$return .= html_ac($ap);\n\t\treturn $return;\n\t}", "function setRowClasses($field, $map)\n\t{\n\t\t$this->table->rowclasses['field'] = $field;\n\t\t$this->table->rowclasses['classes'] = $map;\n\t}", "function changeRowColor($pos)\n{\n\t\n\tif($pos % 2 == 1)\n\t{\n\t\techo \"#FFFFFF\";\n\t}\n\telse\n\t{\n\t\techo \"#D6E6F3\";\n\t}\n\n}", "public function setRowspan($num)\n {\n parent::setAttr(\"rowspan\", $num);\n }", "function RenderRow() {\r\r\tglobal $conn, $Security, $ratings;\r\r\r\r\t// Call Row Rendering event\r\r\t$ratings->Row_Rendering();\r\r\r\r\t// Common render codes for all row types\r\r\t// id\r\r\r\r\t$ratings->id->CellCssStyle = \"\";\r\r\t$ratings->id->CellCssClass = \"\";\r\r\r\r\t// rating\r\r\t$ratings->rating->CellCssStyle = \"\";\r\r\t$ratings->rating->CellCssClass = \"\";\r\r\r\r\t// domain\r\r\t$ratings->domain->CellCssStyle = \"\";\r\r\t$ratings->domain->CellCssClass = \"\";\r\r\tif ($ratings->RowType == EW_ROWTYPE_VIEW) { // View row\r\r\t} elseif ($ratings->RowType == EW_ROWTYPE_ADD) { // Add row\r\r\r\r\t\t// id\r\r\t\t$ratings->id->EditCustomAttributes = \"\";\r\r\t\t$ratings->id->EditValue = ew_HtmlEncode($ratings->id->CurrentValue);\r\r\r\r\t\t// rating\r\r\t\t$ratings->rating->EditCustomAttributes = \"\";\r\r\t\t$ratings->rating->EditValue = ew_HtmlEncode($ratings->rating->CurrentValue);\r\r\r\r\t\t// domain\r\r\t\t$ratings->domain->EditCustomAttributes = \"\";\r\r\t\t$ratings->domain->EditValue = ew_HtmlEncode($ratings->domain->CurrentValue);\r\r\t} elseif ($ratings->RowType == EW_ROWTYPE_EDIT) { // Edit row\r\r\t} elseif ($ratings->RowType == EW_ROWTYPE_SEARCH) { // Search row\r\r\t}\r\r\r\r\t// Call Row Rendered event\r\r\t$ratings->Row_Rendered();\r\r}", "public function getRowClass()\n {\n return ( $this->_end_date != $this->_begin_date && $this->_is_cotis) ?\n 'cotis-normal' :\n 'cotis-give';\n }", "public function addAlternates(array $alternates = []): void\n {\n $this->writeAlternates($alternates, true);\n }", "public function setAltText($alt)\n {\n $this->_alt = $alt;\n }", "function Row_Rendering() {\n\n\t\t// Enter your code here\t\n\t}", "function Row_Rendering() {\n\n\t\t// Enter your code here\t\n\t}" ]
[ "0.65590525", "0.64634025", "0.6176579", "0.60998696", "0.5913443", "0.591332", "0.5154975", "0.51529646", "0.514892", "0.51306105", "0.50625557", "0.49814966", "0.4877604", "0.48713368", "0.48532298", "0.48380193", "0.47815675", "0.47287244", "0.4720446", "0.46988484", "0.46727753", "0.4663638", "0.46462485", "0.4635826", "0.46277225", "0.46150765", "0.46089387", "0.4603318", "0.45942858", "0.45942858" ]
0.75887257
0
Turn off xsl transformation
public function no_xsl() { $this->xsl_template = ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function transformToXmlReturnsTransformedXml(): void\n {\n $this->baseXsltProcessor->returns(['transformToXml' => '<foo>']);\n assertThat($this->xslProcessor->toXML(), equals('<foo>'));\n }", "public function doXHTML_cleaning() {}", "protected function transform()\n {\n // Check if the XSL file exists\n if (!file_exists($this->config['xsl'])) {\n $this->logger->debugTranslate(\n 'htmlconversion.converter.xslFileNotFoundLog'\n );\n return false;\n }\n\n $xsl = new DOMDocument;\n if (!$xsl->load($this->config['xsl'])) {\n $this->logger->debugTranslate(\n 'htmlconversion.converter.xslLoadErrorLog',\n $this->libxmlErrors()\n );\n return false;\n }\n\n $xslt = new XSLTProcessor;\n $xslt->importStylesheet($xsl);\n\n // Transform the document\n if (!($this->htmlDom = $xslt->transformToDoc($this->nlmxmlDom))) {\n $this->logger->debugTranslate(\n 'htmlconversion.converter.transformErrorLog',\n $this->libxmlErrors()\n );\n\n return false;\n };\n\n $this->logger->debugTranslate(\n 'htmlconversion.converter.transformsSuccessLog',\n $this->htmlDom->saveHTML()\n );\n\n return true;\n }", "public function transform() {\n $input = DATABASE_XML;\t// default initial input\n for ($i = 0; $i < count($this->xslt); $i++) {\n $this->xslTransform($this->xslt[$i][\"xsl\"], $this->xslt[$i][\"param\"], $input);\n $input = TRANSFORMED_XML;\t// use result of last xsl transform for all subsequent inputs\n // if debugging is turned on, display transform information & output result\n // (particularly important for debugging more than one transform in a row)\n if ($this->debug) {\n\tprint \"XSLT transform with stylesheet \" . $this->xslt[$i][\"xsl\"];\n\tif (count($this->xslt[$i][\"param\"])) {\n\t print \"<br>\\nParameters: \\n\";\n\t foreach ($this->xslt[$i][\"param\"] as $key => $val) print \"$key => $val \\n\";\n\t}\n\tprint \"<br>\\n\";\n\tprint \"Result of transformation:<br>\\n\";\n\tprint $this->displayXML(TRANSFORMED_XML);\n }\n }\n // unbind used xslts\n unset($this->xslt);\n $this->xslt = array();\n }", "public function withoutTransformer();", "public function transformToXmlReturnsTransformedXml()\n {\n $this->mockXSLTProcessor->expects($this->exactly(2))\n ->method('transformToXml')\n ->with($this->equalTo($this->document))\n ->will($this->onConsecutiveCalls('<foo>', ''));\n $this->assertEquals('<foo>', $this->xslProcessor->toXML());\n $this->assertEquals('', $this->xslProcessor->toXML());\n }", "private function parseToXhtml()\n\t{\n\t\t$this->_generic->_time_checkpoint = microtime(true);\n\t\t\n\t\t// Xml\n\t\t$xmlDoc = new DOMDocument();\n\t\ttry \n\t\t{\n\t\t\t$xmlDoc->loadXML($this->_xml); \n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tSLS_Tracing::addTrace(new Exception(\"Error during XML Parsing\"), true, \"<h2>\".$e->getMessage().\"</h2><div style=\\\"margin: 0 30px;padding: 10px;\\\"><pre name=\\\"code\\\" class=\\\"brush:xml\\\">\".htmlentities($this->_xml, ENT_QUOTES).\"</pre></div>\");\n\t\t}\n\t\t\n\t\t// Xsl\n\t\t$xslDoc = new DOMDocument();\t\t\n\t\ttry \n\t\t{\n\t\t\t$xslDoc->loadXML($this->constructGenericXsl()); \n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tSLS_Tracing::addTrace(new Exception($e->getMessage()));\n\t\t}\n\t\t\n\t\t// Parsing\n\t\t$proc = new XSLTProcessor();\n\t\t$proc->registerPHPFunctions();\n\t\ttry \n\t\t{ \n\t\t\t$proc->importStyleSheet($xslDoc); \n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tSLS_Tracing::addTrace(new Exception($e->getMessage()));\t\t\t\n\t\t}\n\t\t\n\t\t// If errors in dev\n\t\tif (!SLS_Generic::getInstance()->isProd() && SLS_Tracing::$_exceptionThrown)\n\t\t\tSLS_Tracing::displayTraces();\n\t\telse\n\t\t{\n\t\t\t// Show xml in source in dev\n\t\t\t/*if ($this->_generic->getSiteConfig(\"isProd\") == 0)\t\t\t\t\t\t\t\n\t\t\t\techo \"<!--[if lt IE 5]><!--<![CDATA[<pre style='display:none;'>\\n\".$this->_xml.\" \\n</pre>]]>--><![endif]-->\\n\";*/\n\t\t\t\n\t\t\t// Parse XML/XSL\n\t\t\t$html = $proc->transformToXML($xmlDoc);\t\t\t\n\t\t\t$this->_generic->logTime($this->_generic->monitor($this->_generic->_time_checkpoint),\"Parsing XML/XSL\",\"\",\"XML/XSL Parsing\");\n\t\t\t$this->_generic->_time_checkpoint = microtime(true);\n\t\t\t\n\t\t\t// Parse HTML with SLS_Dtd\n\t\t\t$html = $this->parseHtml($html);\n\t\t\t\n\t\t\t// Sls cached enabled and Action cache enabled ?\n\t\t\t$cacheOptions = $this->_cache->getAction();\n\t\t\t$actionCache = false;\n\t\t\tif ($this->_generic->isCache() && \n\t\t\t\t$this->_generic->getSide() == \"user\" && \n\t\t\t\t$this->_generic->getGenericControllerName() != \"Default\" &&\n\t\t\t\tis_array($cacheOptions) && \n\t\t\t\tcount($cacheOptions) == 4)\n\t\t\t{\n\t\t\t\t$actionCache\t\t\t= true; \n\t\t\t\t$actionCacheVisibility \t= $cacheOptions[0];\n\t\t\t\t$actionCacheScope \t\t= $cacheOptions[1];\n\t\t\t\t$actionCacheResponsive\t= $cacheOptions[2];\n\t\t\t\t$actionCacheExpiration \t= $cacheOptions[3];\n\t\t\t\t\n\t\t\t\t// Save Full HTML cached\n\t\t\t\tif ($actionCacheScope == \"full\")\t\t\t\t\n\t\t\t\t\t$this->_cache->saveCacheFull($html,$actionCacheVisibility,$actionCacheResponsive);\t\t\t\t\n\t\t\t}\n\n\t\t\t// Show flash button to copy Xml if developer on user side and not on Bo\n\t\t\tif (SLS_BoRights::isLogged() && SLS_BoRights::getAdminType() == \"developer\" && $this->_generic->getSide() == \"user\" && $this->_generic->getGenericControllerName() != $this->_generic->getBo())\n\t\t\t\t$html = preg_replace('/\\<\\/head\\>/i', \"\\n\".\n\t\t\t\t\t\t\t\t\t\t\t\t\t t(1).'<!-- Sls developer Toolbar -->'.\"\\n\".\n\t\t\t\t\t\t\t\t\t\t\t\t\t t(1).'<script type=\"text/javascript\" src=\"'.$this->_generic->getProtocol().'://'.$this->_generic->getSiteConfig(\"domainName\").\"/\".$this->_generic->getPathConfig(\"coreJsDyn\").'ZeroClipboard/ZeroClipboard.js\"></script>'.\"\\n\".\n\t\t\t\t\t\t\t\t\t\t\t\t\t t(1).'<script type=\"text/javascript\">'.\"\\n\".\n\t\t\t\t\t\t\t\t\t\t\t\t\t t(2).'window.slsBuild.xml = \"'.htmlentities(str_replace(array('\"',\"\\n\"),array('\\\"',''),$this->_xml),ENT_COMPAT,\"UTF-8\").'\";'.\"\\n\".\n\t\t\t\t\t\t\t\t\t\t\t\t\t t(1).'</script>'.\"\\n\".\n\t\t\t\t\t\t\t\t\t\t\t\t\t t(1).'<!-- /Sls developer Toolbar -->'.\"\\n\\n\".\n\t\t\t\t\t\t\t\t\t\t\t\t\t t(1).'</head>', $html);\n\n\t\t\techo $html;\n\t\t\t\n\t\t\t$this->_generic->logTime($this->_generic->monitor($this->_generic->_time_checkpoint),\"Parsing HTML\",\"\",\"HTML Parsing\");\n\t\t}\t\t\n\t}", "function _runXslTransformWithParam($info) {\n\n $xsl = new DOMDocument();\n $xsl->load($info['xsl']);\n $input = new DOMDocument();\n $input->loadXML($info['input']);\n\n $processor = new XSLTProcessor();\n $processor->importStylesheet($xsl);\n if (isset($info['param_name']) && isset($info['param_value'])) {\n $processor->setParameter('', $info['param_name'], $info['param_value']);\n }\n\n if (isset($info['php_functions'])) {\n $processor->registerPHPFunctions($info['php_functions']);\n }\n\n // XXX: Suppressing warnings regarding unregistered prefixes.\n return $processor->transformToXML($input);\n}", "protected function transform ( $xml, $path_to_xsl, $output_type = null, array $params = array(), array $import_array = array(), $to_string = true )\r\n\t{\r\n\t\tif ( $path_to_xsl == \"\") throw new \\Exception(\"no stylesheet supplied\");\r\n\t\t\r\n\t\t// make sure we have a domdocument\r\n\t\t\r\n\t\tif ( is_string($xml) )\r\n\t\t{\r\n\t\t\t$xml = Parser::convertToDOMDocument($xml);\r\n\t\t}\r\n\t\t\r\n\t\t// create xslt processor\r\n\t\t\r\n\t\t$processor = new \\XsltProcessor();\r\n\t\t$processor->registerPhpFunctions();\r\n\r\n\t\t// add parameters\r\n\t\t\r\n\t\tforeach ($params as $key => $value)\r\n\t\t{\r\n\t\t\t$processor->setParameter(null, $key, $value);\r\n\t\t}\r\n\t\t\t\r\n\t\t// add stylesheet\r\n\t\t\r\n\t\t$xsl = $this->generateBaseXsl($path_to_xsl, $import_array, $output_type);\r\n\t\t\r\n\t\t$processor->importStylesheet($xsl);\r\n\t\t\r\n\t\t// transform\r\n\t\t\r\n\t\tif ( $to_string == true )\r\n\t\t{\r\n\t\t\treturn $processor->transformToXml($xml);\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\treturn $processor->transformToDoc($xml);\r\n\t\t}\r\n\t}", "function tidy_xml( $xml ) {\n \t\n\t $dom = new DOMDocument();\n\t $dom->preserveWhiteSpace = false;\n\t $dom->formatOutput = true;\n\t $dom->loadXML( $xml->asXML() );\n\t return $dom->saveXML();\n \t\n\t}", "function transformWithProcessor(XSLTProcessor $proc, DOMDocument $doc)\n{\n $doc = $proc->transformToDoc($doc);\n\n // With current logic, only menu tags can be left unprocessed the first pass\n // Check if there are any left before doing a second pass\n if ($doc->getElementsByTagName('menu')->length === 0) {\n return $doc;\n }\n\n return $proc->transformToDoc($doc);\n}", "public function xslTransformResult ($xsl_file, $xsl_params = NULL) {\n // call default xslTransform with option to specify xml input\n $this->xslTransform($xsl_file, $xsl_params, TRANSFORMED_XML);\n }", "protected function parseXslText(DOMElement $ir, DOMElement $node)\n\t{\n\t\t$this->appendLiteralOutput($ir, $node->textContent);\n\t\tif ($node->getAttribute('disable-output-escaping') === 'yes')\n\t\t{\n\t\t\t$ir->lastChild->setAttribute('disable-output-escaping', 'yes');\n\t\t}\n\t}", "public function xslTransform ($xsl_file, $xsl_params = NULL, $input = DATABASE_XML) {\n /* load xsl & xml as DOM documents */\n $xsl = new DomDocument();\n $rval = $xsl->load($xsl_file);\n if (!($rval)) {\n print \"Error! unable to load xsl file $xsl_file.<br>\";\n } \n\n /* create processor & import stylesheet */\n $proc = new XsltProcessor();\n $xsl = $proc->importStylesheet($xsl);\n if ($xsl_params) {\n foreach ($xsl_params as $name => $val) {\n $proc->setParameter(null, $name, $val);\n }\n }\n /* transform the xml document and store the result */\n\n // transform xml retrieved from the database (default)\n if ($input == DATABASE_XML && $this->xmldb->xml) \t // make sure data exists\n $this->xsl_result = $proc->transformToDoc($this->xmldb->xml);\n // transform xml resulting from prior xsl transform (make sure input data exists)\n else if ($input == TRANSFORMED_XML && $this->xsl_result)\n $this->xsl_result = $proc->transformToDoc($this->xsl_result);\n }", "function testClientXSL() {\n $this->get('/');\n $this->assertPattern('#<\\?xml-stylesheet#', $this->responseDom->saveXML());\n $this->get('/test');\n $this->assertPattern('#<\\?xml-stylesheet#', $this->responseDom->saveXML());\n \n $this->get('/?NOXSL');\n $this->assertNoPattern('#<\\?xml-stylesheet#', $this->responseDom->saveXML());\n $this->get('/test?NOXSL');\n $this->assertNoPattern('#<\\?xml-stylesheet#', $this->responseDom->saveXML());\n }", "protected function transform($xml, $path_to_xsl, array $params = array())\r\n\t{\r\n\t\t$registry = Registry::getInstance();\r\n\r\n\t\t$import_array = array();\r\n\t\t\r\n\t\t// the xsl lives here\r\n\r\n\t\t$distro_xsl_dir = $this->_script_path . \"/\";\r\n\t\t$local_xsl_dir = realpath(getcwd()) . \"/views/\";\r\n\t\t\r\n\t\t// language file\r\n\t\t\r\n\t\t$request = new Request();\r\n\t\t$language = $request->getParam(\"lang\");\r\n\t\t\r\n\t\tif ( $language == \"\" )\r\n\t\t{\r\n\t\t\t$language = $registry->defaultLanguage();\r\n\t\t}\r\n\t\t\r\n\t\t// english file is included by default (as a fallback)\r\n\t\t\r\n\t\tarray_push($import_array, \"labels/eng.xsl\");\r\n\t\t\r\n\t\t// if language is set to something other than english\r\n\t\t// then include that file to override the english labels\r\n\t\t\r\n\t\tif ( $language != \"eng\" && $language != '') \r\n\t\t{\r\n\t\t\tarray_push($import_array, \"labels/$language.xsl\");\r\n\t\t}\t\t\r\n\t\t\r\n\t\t// make sure we've got a reference to the local includes too\r\n\t\t\r\n\t\tarray_push($import_array, \"includes.xsl\");\r\n\t\t\r\n\t\t// transform\r\n\t\t\r\n\t\t$xsl = new Xsl($distro_xsl_dir, $local_xsl_dir);\r\n\t\t\r\n\t\treturn $xsl->transformToXml($xml, $path_to_xsl, $this->format, $params, $import_array);\r\n\t}", "public function xss_clean_on()\n\t{\n\t\t$this->_xss_on = TRUE;\n\t}", "protected function useXMLInternalErrors()\n {\n \\libxml_clear_errors();\n $this->initialUseInternalErrorsValue = \\libxml_use_internal_errors(true);\n }", "function set_xsl($xsl)\n\t{\n\t\t$this->xsl_proyecto = $xsl;\n\t}", "public static function xhtml($xhtml)\n {\n self::$useXhtml = $xhtml === true ? ' /' : '';\n }", "function transformDOM(DOMDocument $doc)\n{\n return transformWithProcessor(createInkyProcessor(), $doc);\n}", "public function setXSLDocument($xsl) {\n libxml_get_last_error() && libxml_clear_errors();\n $this->stylesheet= $xsl;\n strlen($this->_base) && $this->stylesheet->documentURI= $this->_base;\n \n $this->_checkErrors($xsl);\n }", "protected function renderAsXML() {}", "static function processXSLT($xml, $xsl, $params = null)\n {\n // Create the domXSL\n $domXsl = new DOMDocument;\n if (!@$domXsl->load($xsl))\n {\n wcmProject::getInstance()->logger->logError('Invalid XSL: ' . $xsl);\n throw new Exception('Invalid XSL');\n }\n\n // Create the domXML\n $domXml = new DOMDocument();\n if (!@$domXml->loadXML($xml))\n {\n wcmProject::getInstance()->logger->logError('Invalid XML: ' . $xml);\n throw new Exception('Invalid XML');\n }\n\n // Process the XSL with optional parameters\n $proc = new XSLTProcessor;\n $proc->registerPHPFunctions();\n $proc->importStyleSheet($domXsl);\n if (is_array($params))\n {\n foreach($params as $param => $value)\n {\n $proc->setParameter(\"\", $param, $value);\n }\n }\n\n return ($proc->transformToXML($domXml));\n }", "protected function handle_route_sitemap_xsl() {\n\n\t\t$yoast_sitemap = $this->get_yoast_sitemap_instance();\n\t\t$yoast_sitemap->xsl_output( 'main' );\n\n\t\tdie;\n\n\t}", "function outputEntitiesOff()\n\t{\n\t\t$this->bOutputEntities = false;\n\t}", "protected function transform(DOMDocument $document)\n {\n if (!$this->toDir->exists()) {\n throw new BuildException(\"Directory '\" . $this->toDir . \"' does not exist\");\n }\n\n $xslfile = $this->getStyleSheet();\n\n $xsl = new DOMDocument();\n $xsl->load($xslfile->getAbsolutePath());\n\n $proc = new XSLTProcessor();\n if (defined('XSL_SECPREF_WRITE_FILE')) {\n if (version_compare(PHP_VERSION, '5.4', \"<\")) {\n ini_set(\"xsl.security_prefs\", XSL_SECPREF_WRITE_FILE | XSL_SECPREF_CREATE_DIRECTORY);\n } else {\n $proc->setSecurityPrefs(XSL_SECPREF_WRITE_FILE | XSL_SECPREF_CREATE_DIRECTORY);\n }\n }\n\n $proc->importStylesheet($xsl);\n $proc->setParameter('', 'output.sorttable', (string) $this->useSortTable);\n\n if ($this->format == \"noframes\") {\n $writer = new FileWriter(new PhingFile($this->toDir, \"phpunit-noframes.html\"));\n $writer->write($proc->transformToXml($document));\n $writer->close();\n } else {\n ExtendedFileStream::registerStream();\n\n $toDir = (string) $this->toDir;\n\n // urlencode() the path if we're on Windows\n if (FileSystem::getFileSystem()->getSeparator() == '\\\\') {\n $toDir = urlencode($toDir);\n }\n\n // no output for the framed report\n // it's all done by extension...\n $proc->setParameter('', 'output.dir', $toDir);\n $proc->transformToXml($document);\n\n ExtendedFileStream::unregisterStream();\n }\n }", "public function initalise()\n\t{\n\t\tSettings::singleton()->overwrite_setting('cache_xslt_transformation', false);\n\t\treturn true;\n\t}", "public function setXSL($xsl){\r\n\t\t$this->xsl_file = $xsl;\r\n\t}", "private function runSaxon(){\r\n\t\t$this->execWrapper(\t$this->saxon_command.\r\n\t\t\t\t\t\t\t\" -o:\".$this->workingdir.$this->target.\r\n\t\t\t\t\t\t\t\" -xsl:\".$this->xsl_path.$this->xsl_file.\r\n\t\t\t\t\t\t\t\" -s:\".$this->workingdir.$this->source);\r\n\t}" ]
[ "0.58941406", "0.56895256", "0.5678719", "0.5654335", "0.55474824", "0.5529772", "0.552298", "0.5462376", "0.54589814", "0.5355058", "0.5347424", "0.53075933", "0.5186075", "0.511506", "0.5105281", "0.50885534", "0.50488853", "0.5037611", "0.5032306", "0.5014301", "0.49986935", "0.49383342", "0.4936689", "0.489528", "0.4886625", "0.48816037", "0.48599315", "0.4842243", "0.48146942", "0.47613004" ]
0.7720259
0
Creates a new Uptime check configuration. (uptimeCheckConfigs.create)
public function create($parent, UptimeCheckConfig $postBody, $optParams = []) { $params = ['parent' => $parent, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('create', [$params], UptimeCheckConfig::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function CreateUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\CreateUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/CreateUptimeCheckConfig',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig', 'decode'],\n $metadata, $options);\n }", "public function setUptimeCheckConfig($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig::class);\n $this->uptime_check_config = $var;\n\n return $this;\n }", "public function get($name, $optParams = [])\n {\n $params = ['name' => $name];\n $params = array_merge($params, $optParams);\n return $this->call('get', [$params], UptimeCheckConfig::class);\n }", "public function ListUptimeCheckConfigs(\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckConfigsRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/ListUptimeCheckConfigs',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckConfigsResponse', 'decode'],\n $metadata, $options);\n }", "public function getUptimeCheckConfig()\n {\n return $this->uptime_check_config;\n }", "public function patch($name, UptimeCheckConfig $postBody, $optParams = [])\n {\n $params = ['name' => $name, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('patch', [$params], UptimeCheckConfig::class);\n }", "public function listProjectsUptimeCheckConfigs($parent, $optParams = [])\n {\n $params = ['parent' => $parent];\n $params = array_merge($params, $optParams);\n return $this->call('list', [$params], ListUptimeCheckConfigsResponse::class);\n }", "public function UpdateUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\UpdateUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/UpdateUptimeCheckConfig',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig', 'decode'],\n $metadata, $options);\n }", "public function createConfig()\n\t{\n\t}", "public function GetUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\GetUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/GetUptimeCheckConfig',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig', 'decode'],\n $metadata, $options);\n }", "public function DeleteUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\DeleteUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/DeleteUptimeCheckConfig',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "public function checkConfig();", "public function ListUptimeCheckIps(\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckIpsRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/ListUptimeCheckIps',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckIpsResponse', 'decode'],\n $metadata, $options);\n }", "private function createConfigsTable()\n {\n $fields = array(\n 'id' => array('type' => 'int', 'constraint' => '10', 'unsigned' => true, 'auto_increment' => true),\n 'site_id' => array('type' => 'int', 'constraint' => '10', 'unsigned' => true),\n 'client_id' => array('type' => 'varchar', 'constraint' => '250'),\n 'client_secret' => array('type' => 'varchar', 'constraint' => '250'),\n 'api_endpoint' => array('type' => 'varchar', 'constraint' => '1000', 'null' => true),\n 'log_searches' => array('type' => 'tinyint', 'constraint' => '10', 'unsigned' => true),\n );\n\n ee()->dbforge->add_field($fields);\n ee()->dbforge->add_key('id', true);\n\n ee()->dbforge->create_table('rets_rabbit_v2_configs');\n }", "public function createFromConfig()\n { \n // Begin transation\n $this->pdo->beginTransaction();\n\n // Create tables\n foreach ($this->schema['create'] as $name => $schema) {\n $table = $this->tables[$name];\n $this->pdo->exec($this->getDropTable($table));\n $sql = $this->getCreateTable($table, $schema);\n $this->pdo->exec($sql);\n }\n\n // Commit changes\n $this->pdo->commit();\n }", "public function createConfig(array $nodes);", "function recurringdowntime_check_cfg()\n{\n if (!file_exists(RECURRINGDOWNTIME_CFG)) {\n $fh = @fopen(RECURRINGDOWNTIME_CFG, \"w+\");\n fclose($fh);\n }\n}", "public function create_table_config(){\n $sql = \" CREATE TABLE IF NOT EXISTS {$this->table_config} (\n `id` varchar(100),\n `day` varchar(50) DEFAULT NULL,\n `range` varchar(50) DEFAULT NULL,\n `qty` smallint DEFAULT 0,\n `type` varchar(50) DEFAULT NULL,\n `order` smallint DEFAULT 0,\n PRIMARY KEY (`id`)\n )\";\n\n require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n dbDelta($sql);\n }", "private function createConfiguration()\n {\n $this->createVrpayecommercePluginConfig();\n $this->Form();\n }", "public static function checkConfig() {\n\t\tlog::add('surveillanceStation', 'debug', ' ┌──── Verification des configurations du plugin');\n\t\t// Checking snapLocation\n\t\tif (config::byKey('snapLocation', 'surveillanceStation') == 'synology') {\n\t\t\tconfig::save('snapRetention', '', 'surveillanceStation');\n\t\t\tlog::add('surveillanceStation', 'debug', ' │ checkConfig::snapRetention Nettoyage des valeurs');\n\t\t}\n\t\t// Checking Integer fields\n\t\tforeach (array('port', 'snapRetention') as $field) {\n\t\t\tif ( ! empty(config::byKey($field, 'surveillanceStation'))) {\n\t\t\t\tswitch($field) {\n\t\t\t\t\tcase 'port':\n\t\t\t\t\t\t$min_range = 1;\n\t\t\t\t\t\t$max_range = 65535;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$min_range = 0;\n\t\t\t\t\t\t$max_range = 9999;\n\t\t\t\t}\n\t\t\t\tif(!filter_var(config::byKey($field, 'surveillanceStation'), FILTER_VALIDATE_INT, array('options' => array('min_range' => $min_range, 'max_range' => $max_range)))){\n\t\t\t\t\tlog::add('surveillanceStation', 'debug', ' │ ERROR : checkConfig::'.$field.' est invalide. La configuration doit être un nombre (entier) compris entre '.$min_range.' et '.$max_range);\n\t\t\t\t\tlog::add('surveillanceStation', 'debug', ' └────────────');\n\t\t\t\t\tthrow new Exception(__($field.' est invalide. La configuration doit être un nombre (entier) compris entre '.$min_range.' et '.$max_range, __FILE__));\n\t\t\t\t} else {\n\t\t\t\t\tlog::add('surveillanceStation', 'debug', ' │ checkConfig::'.$field.' OK with value ' . config::byKey($field, 'surveillanceStation'));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tlog::add('surveillanceStation', 'debug', ' └────────────');\n }", "public static function create(array $config = [])\n {\n }", "protected function setUpFromConfig()\n\t{\n\t\t$timeLimit = 4 * 60 * 60;\n\n\t\t$parameters = $this->container->getParameters();\n\t\tif (is_array($parameters) and array_key_exists(\"taskManager\", $parameters)) {\n\t\t\t/// ***** TIMELIMIT ****** //\n\t\t\tif (isset($parameters[\"taskManager\"][\"timeLimit\"])) {\n\t\t\t\t$timeLimit = $parameters[\"taskManager\"][\"timeLimit\"];\n\t\t\t}\n\t\t\t/// ***** MAX HISTORY DAYS ****** //\n\t\t\tif (isset($parameters[\"taskManager\"][\"history\"][\"maxDays\"])) {\n\t\t\t\t$this->maxHistoryDays = (int)$parameters[\"taskManager\"][\"history\"][\"maxDays\"];\n\t\t\t}\n\t\t\t/// ***** MAX HISTORY RECORDS ****** //\n\t\t\tif (isset($parameters[\"taskManager\"][\"history\"][\"maxRecords\"])) {\n\t\t\t\t$this->maxHistoryRecords = (int)$parameters[\"taskManager\"][\"history\"][\"maxRecords\"];\n\t\t\t}\n\t\t}\n\n\t\tset_time_limit($timeLimit);\n\t}", "public static function addConfig($data) {\n\t\tif (!is_array($data)) return false;\n\t\t$data['create_time'] = Common::getTime();\n $data['update_time'] = Common::getTime();\n\t\t$data = self::_cookData($data);\n\t\treturn self::_getDao()->insert($data);\n\t}", "public static function configCheckTime($interval) {\n return time()+$interval;\n }", "public function createUser(array $config = []);", "abstract public static function createConfig(): Config;", "protected function validateCreating()\r\n {\r\n $rules = config('taki.validator.create', []);\r\n\r\n if (config('taki.username.required') && !array_get($rules, config('taki.field.username'))) {\r\n $rules[config('taki.field.username')] = config('taki.username.validator', 'required');\r\n }\r\n\r\n return $rules;\r\n }", "public static function createFromConfig(array $config);", "public function create()\n {\n return view('system_configs.create');\n }", "public function testCreate()\n {\n VCR::insertCassette('pickups/create.yml');\n\n $shipment = Shipment::create(Fixture::oneCallBuyShipment());\n\n $pickupData = Fixture::basicPickup();\n $pickupData['shipment'] = $shipment;\n\n $pickup = Pickup::create($pickupData);\n\n $this->assertInstanceOf('\\EasyPost\\Pickup', $pickup);\n $this->assertStringMatchesFormat('pickup_%s', $pickup->id);\n $this->assertNotNull($pickup->pickup_rates);\n }" ]
[ "0.7086295", "0.66852397", "0.5832289", "0.58181393", "0.5645919", "0.5617374", "0.55739444", "0.53473675", "0.51100296", "0.5091077", "0.49437207", "0.47102794", "0.46942794", "0.45402044", "0.44555312", "0.44000417", "0.43998283", "0.4356518", "0.43465766", "0.43297982", "0.42961174", "0.42895743", "0.42807662", "0.42666212", "0.42645094", "0.42463478", "0.4237371", "0.4225576", "0.42216444", "0.42121655" ]
0.80216384
0
Gets a single Uptime check configuration. (uptimeCheckConfigs.get)
public function get($name, $optParams = []) { $params = ['name' => $name]; $params = array_merge($params, $optParams); return $this->call('get', [$params], UptimeCheckConfig::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUptimeCheckConfig()\n {\n return $this->uptime_check_config;\n }", "public function GetUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\GetUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/GetUptimeCheckConfig',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig', 'decode'],\n $metadata, $options);\n }", "public function setUptimeCheckConfig($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig::class);\n $this->uptime_check_config = $var;\n\n return $this;\n }", "public function get($key){\r\n\t\tif(key_exists($key, $this->config)){\r\n\t\t\treturn $this->config[$key];\r\n\t\t}\r\n\t\tdie('Index is out of range');\r\n\t}", "public function get()\r\n {\r\n $this->ensureLoaded();\r\n return $this->config;\r\n }", "public function config_get(){\n\t\treturn $this->fb->exec('dhcp.config_get');\n\t}", "public function get($key)\r\n {\r\n return $this->config[$key];\r\n }", "public function ListUptimeCheckConfigs(\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckConfigsRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/ListUptimeCheckConfigs',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckConfigsResponse', 'decode'],\n $metadata, $options);\n }", "protected function get(string $key)\n {\n if (!array_key_exists($key, $this->config)) throw new InvalidConfigException(\"Your configuration doesn't have a value for the key `$key`\");\n return $this->config[$key];\n }", "public static function get( $key ) {\n\t\tif ( ! static::$config ) {\n\t\t\tstatic::_set_config_data();\n\t\t}\n\n\t\tif ( array_key_exists( $key, static::$config ) ) {\n\t\t\treturn static::$config[ $key ];\n\t\t}\n\t}", "function getConfig($key = '')\n {\n return isset($this->config[$key]) ? $this->config[$key] : null;\n }", "public function __get($name): mixed {\n if (isset($this->data[$name]))\n return $this->data[$name];\n\n trigger_error(\n __(\"Requested configuration setting not found.\"),\n E_USER_NOTICE\n );\n\n return null;\n }", "public static function get($key)\n\t{\n\t\tif (is_array(self::$_CONF) AND array_key_exists($key, self::$_CONF))\n\t\t\treturn self::$_CONF[$key];\n\t\telseif($value = Db::getInstance()->getValue('SELECT `value` FROM `'.DB_PREFIX.'configuration` WHERE `name` = \\''.pSQL($key).'\\'')){\n\t\t\tself::$_CONF[$key] = $value;\n\t\t\treturn $value;\n\t\t}\n\t\treturn false;\n\t}", "public function get_config()\n\t{\n\t\treturn $this->cfg;\n\t}", "public function patch($name, UptimeCheckConfig $postBody, $optParams = [])\n {\n $params = ['name' => $name, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('patch', [$params], UptimeCheckConfig::class);\n }", "public function get($key)\n {\n if (array_key_exists($key, $this->config)) {\n $value = $this->config[ $key ];\n } elseif ($this->offsetExists($key)) {\n $value = $this->defaults[ $key ];\n } else {\n throw new Exception(\"Config entry «{$key}» doesn't exists. \");\n }\n\n return $value;\n }", "public function getCfg()\n {\n return $this->get(self::_CFG);\n }", "public static function get($key)\n {\n return Arr::get(static::$config, $key);\n }", "public static function getCfg($key) {\r\n\t\treturn self::$cfg->get($key);\r\n\t}", "function getConfigValue($name) {\n return UserConfigOptions::getValue($name, $this);\n }", "public final function getConfig($key = false)\n {\n return $key ? $this->config->get($key) : $this->config;\n }", "public function listProjectsUptimeCheckConfigs($parent, $optParams = [])\n {\n $params = ['parent' => $parent];\n $params = array_merge($params, $optParams);\n return $this->call('list', [$params], ListUptimeCheckConfigsResponse::class);\n }", "protected function get($name) {\n return $this->configuration->get($name);\n }", "function recurringdowntime_get_cfg()\n{\n recurringdowntime_check_cfg();\n $cfg = file_get_contents(RECURRINGDOWNTIME_CFG);\n return recurringdowntime_cfg_to_array($cfg);\n}", "public function getConfig($key)\n {\n return Config::get($key);\n }", "public static function get($key)\r\n {\r\n require_once ROOT . \"/app/config/{$key}.php\";\r\n return isset(self::$settings[$key]) ? self::$settings[$key] : null;\r\n }", "public function get($key)\n\t{\n\t\t$default = array_key_exists($key, $this->defaultConfig) ? $this->defaultConfig[$key] : null;\n\n\t\treturn $this->componentConfig->get($key, $default);\n\t}", "public function get ( $name ) {\n\t\tif( !$this->has ( $name ) ) {\n\t\t\tthrow new \\InvalidArgumentException(sprintf('The name \"%s\" is invalid.', $name));\n\t\t}\n\t\treturn $this->config[$name];\n\t}", "private function getConfig($key)\n {\n return $this->config->get($key);\n }", "public static function config($key) {\n\t\t\tif (isset(self::$config[$key])) {\n\t\t\t\treturn self::$config[$key];\n\t\t\t} else {\n\t\t\t\t// Should we throw an exception or return null?\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}" ]
[ "0.78731394", "0.6626676", "0.5898211", "0.5777897", "0.5675747", "0.56366116", "0.55743366", "0.5553726", "0.5539036", "0.5508878", "0.54915833", "0.54881966", "0.5483576", "0.5481618", "0.54761094", "0.5475268", "0.545728", "0.5454844", "0.5446216", "0.54440486", "0.5430929", "0.5429014", "0.54239666", "0.54177505", "0.54138714", "0.5400217", "0.53720516", "0.53720003", "0.5368049", "0.53411704" ]
0.79686177
0
Lists the existing valid Uptime check configurations for the project (leaving out any invalid configurations). (uptimeCheckConfigs.listProjectsUptimeCheckConfigs)
public function listProjectsUptimeCheckConfigs($parent, $optParams = []) { $params = ['parent' => $parent]; $params = array_merge($params, $optParams); return $this->call('list', [$params], ListUptimeCheckConfigsResponse::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ListUptimeCheckConfigs(\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckConfigsRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/ListUptimeCheckConfigs',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckConfigsResponse', 'decode'],\n $metadata, $options);\n }", "public function ListUptimeCheckIps(\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckIpsRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/ListUptimeCheckIps',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckIpsResponse', 'decode'],\n $metadata, $options);\n }", "public function getUptimeCheckConfig()\n {\n return $this->uptime_check_config;\n }", "public function get($name, $optParams = [])\n {\n $params = ['name' => $name];\n $params = array_merge($params, $optParams);\n return $this->call('get', [$params], UptimeCheckConfig::class);\n }", "function getProjectList() {\n global $logger;\n\n $projects = Project::getProjects();\n if($projects != NULL) {\n $extproj_id = Config::getInstance()->getValue(Config::id_externalTasksProject);\n $smartyProjects = array();\n foreach($projects as $id => $name) {\n // exclude ExternalTasksProject\n if ($extproj_id == $id) {\n echo \"<script type=\\\"text/javascript\\\">console.log(\\\" getProjectList - project $id: ExternalTasksProject is excluded\\\");</script>\";\n continue;\n }\n\n // exclude SideTasksProjects\n try {\n $p = ProjectCache::getInstance()->getProject($id);\n if ($p->isSideTasksProject()) {\n echo \"<script type=\\\"text/javascript\\\">console.log(\\\" getProjectList - project $id: sideTaskProjects are excluded\\\");</script>\";\n continue;\n }\n } catch (Exception $e) {\n // could not determinate, so the project should be included in the list\n echo \"<script type=\\\"text/javascript\\\">console.log(\\\" getProjectList - project $id: Unknown type, project included anyway\\\");</script>\";\n // nothing to do.\n }\n $smartyProjects[$id] = $name;\n }\n return $smartyProjects;\n } else {\n return NULL;\n }\n}", "public function getCheckups()\n {\n $scheduledCheckups = User::find(auth()->id())->checkups->reverse();\n\n return api_resource('mobile\\CheckupSchedule')->make($scheduledCheckups);\n }", "public function setUptimeCheckConfig($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig::class);\n $this->uptime_check_config = $var;\n\n return $this;\n }", "function GetProjectStatuses()\n\t{\n\t\t$result = $this->sendRequest(\"GetProjectStatuses\", array());\t\n\t\treturn $this->getResultFromResponse($result);\n\t}", "public function getProjectsList($hint, $uacc_uid=''){\r\n\t\t$list = array();\r\n\r\n\t\tif($uacc_uid != '')\r\n\t\t\t$query = $this->db->select(\"project_id,project_name\")->like(\"project_name\", $hint)->where(array(\"created_by\"=>$uacc_uid,\"deleted\"=>0, \"archived\"=>0))->order_by(\"project_name\", \"asc\")->get(\"sc_projects\");\r\n\t\telse\r\n\t\t\t$query = $this->db->select(\"project_id,project_name\")->like(\"project_name\", $hint)->where(array(\"deleted\"=>0, \"archived\"=>0))->order_by(\"project_name\", \"asc\")->get(\"sc_projects\");\r\n\r\n\t if ($query->num_rows() > 0){\r\n\t\t\tforeach($query->result() as $row){\r\n\r\n\t\t\t\t$list[] = array(\"name\"=>$row->project_name, \"label\"=>$row->project_name, \"id\"=>$row->project_id);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $list;\r\n\t}", "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n if (!is_null($this->container['localNetworkPort']) && (mb_strlen($this->container['localNetworkPort']) > 36)) {\r\n $invalidProperties[] = \"invalid value for 'localNetworkPort', the character length must be smaller than or equal to 36.\";\r\n }\r\n if (!is_null($this->container['localNetworkPort']) && (mb_strlen($this->container['localNetworkPort']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'localNetworkPort', the character length must be bigger than or equal to 0.\";\r\n }\r\n $allowedValues = $this->getNotifyStatusAllowableValues();\r\n if (!is_null($this->container['notifyStatus']) && !in_array($this->container['notifyStatus'], $allowedValues, true)) {\r\n $invalidProperties[] = sprintf(\r\n \"invalid value for 'notifyStatus', must be one of '%s'\",\r\n implode(\"', '\", $allowedValues)\r\n );\r\n }\r\n\r\n if (!is_null($this->container['notifyStatus']) && (mb_strlen($this->container['notifyStatus']) > 36)) {\r\n $invalidProperties[] = \"invalid value for 'notifyStatus', the character length must be smaller than or equal to 36.\";\r\n }\r\n if (!is_null($this->container['notifyStatus']) && (mb_strlen($this->container['notifyStatus']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'notifyStatus', the character length must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['createTime']) && (mb_strlen($this->container['createTime']) > 64)) {\r\n $invalidProperties[] = \"invalid value for 'createTime', the character length must be smaller than or equal to 64.\";\r\n }\r\n if (!is_null($this->container['createTime']) && (mb_strlen($this->container['createTime']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'createTime', the character length must be bigger than or equal to 0.\";\r\n }\r\n $allowedValues = $this->getCreateSourceAllowableValues();\r\n if (!is_null($this->container['createSource']) && !in_array($this->container['createSource'], $allowedValues, true)) {\r\n $invalidProperties[] = sprintf(\r\n \"invalid value for 'createSource', must be one of '%s'\",\r\n implode(\"', '\", $allowedValues)\r\n );\r\n }\r\n\r\n if (!is_null($this->container['createSource']) && (mb_strlen($this->container['createSource']) > 36)) {\r\n $invalidProperties[] = \"invalid value for 'createSource', the character length must be smaller than or equal to 36.\";\r\n }\r\n if (!is_null($this->container['createSource']) && (mb_strlen($this->container['createSource']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'createSource', the character length must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['ecsId']) && (mb_strlen($this->container['ecsId']) > 36)) {\r\n $invalidProperties[] = \"invalid value for 'ecsId', the character length must be smaller than or equal to 36.\";\r\n }\r\n if (!is_null($this->container['ecsId']) && (mb_strlen($this->container['ecsId']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'ecsId', the character length must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['lockStatus']) && (mb_strlen($this->container['lockStatus']) > 36)) {\r\n $invalidProperties[] = \"invalid value for 'lockStatus', the character length must be smaller than or equal to 36.\";\r\n }\r\n if (!is_null($this->container['lockStatus']) && (mb_strlen($this->container['lockStatus']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'lockStatus', the character length must be bigger than or equal to 0.\";\r\n }\r\n $allowedValues = $this->getFreezedStatusAllowableValues();\r\n if (!is_null($this->container['freezedStatus']) && !in_array($this->container['freezedStatus'], $allowedValues, true)) {\r\n $invalidProperties[] = sprintf(\r\n \"invalid value for 'freezedStatus', must be one of '%s'\",\r\n implode(\"', '\", $allowedValues)\r\n );\r\n }\r\n\r\n if (!is_null($this->container['freezedStatus']) && (mb_strlen($this->container['freezedStatus']) > 36)) {\r\n $invalidProperties[] = \"invalid value for 'freezedStatus', the character length must be smaller than or equal to 36.\";\r\n }\r\n if (!is_null($this->container['freezedStatus']) && (mb_strlen($this->container['freezedStatus']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'freezedStatus', the character length must be bigger than or equal to 0.\";\r\n }\r\n return $invalidProperties;\r\n }", "public function getProjectTasksForSelectProjects($projectIdList) {\n if (count($projectIdList) < 1) return [];\n $fieldNames = [];\n $sql = \"SELECT \n p.category as category, \n p.name as ProjectName,\n pt.name as TaskName, \n u.username, \n pt.`start_date`,\n pt.`due_date`,\n pt.status \n FROM projects AS p \n LEFT JOIN project_has_tasks as pt on pt.project_id = p.id \n LEFT JOIN users as u on pt.user_id=u.id\n WHERE p.id IN (\" . implode(\",\", $projectIdList) . \")\n ORDER BY p.category, p.name;\";\n /** @var CI_DB_mysql_result $result */\n $result = $this->_primaryDatabase->query($sql, []);\n $resultArray = $result->result();\n if ($result->num_rows() > 0) {\n foreach ((array) $resultArray[0] as $fieldName => $fieldValue) $fieldNames[] = $fieldName;\n $resultArray = array_merge([(object) $fieldNames], $resultArray);\n }\n return $resultArray;\n }", "public function getCheckInTaskListList(){\n return $this->_get(2);\n }", "public function listProjects(ProjectListRequest $request)\n {\n $sorting = $request->getSortKey();\n $friendly = $request->getSortKeyFriendly();\n $order = $request->getSortOrderFriendly();\n \n return $request->renderViewOrEmpty('projects', compact(['sorting', 'friendly', 'order']));\n }", "public static function projectList() {\n\t\tif(!Authenticate::isAuthorized()) {\n \t\t throw new NotifyException(\"You are not authorized for this method\", 1);\n \t}\n else {\n\t\t\t$api_end_point = \"project\";\n\t\t\t$request_data=[];\n\t\t\treturn Request::sendRequest($api_end_point, $request_data);\n\t\t}\n\t}", "public function getTaskList($params = [])\n {\n $this->sendRequest(\n [\n 'methodName' => 'project.list',\n 'pool_id' => $params['pool_id'] ?? 0,\n 'limit' => $params['limit'] ?? 10,\n 'status' => $params['status'] ?? 'ACTIVE',\n 'sort' => $params['sort'] ?? '-id',\n ]\n );\n\n return $this->result;\n }", "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n if ($this->container['clusterVersion'] === null) {\r\n $invalidProperties[] = \"'clusterVersion' can't be null\";\r\n }\r\n if ($this->container['clusterName'] === null) {\r\n $invalidProperties[] = \"'clusterName' can't be null\";\r\n }\r\n if ((mb_strlen($this->container['clusterName']) > 64)) {\r\n $invalidProperties[] = \"invalid value for 'clusterName', the character length must be smaller than or equal to 64.\";\r\n }\r\n if ((mb_strlen($this->container['clusterName']) < 1)) {\r\n $invalidProperties[] = \"invalid value for 'clusterName', the character length must be bigger than or equal to 1.\";\r\n }\r\n if ($this->container['clusterType'] === null) {\r\n $invalidProperties[] = \"'clusterType' can't be null\";\r\n }\r\n if ($this->container['region'] === null) {\r\n $invalidProperties[] = \"'region' can't be null\";\r\n }\r\n if ($this->container['vpcName'] === null) {\r\n $invalidProperties[] = \"'vpcName' can't be null\";\r\n }\r\n if ($this->container['subnetName'] === null) {\r\n $invalidProperties[] = \"'subnetName' can't be null\";\r\n }\r\n if ($this->container['components'] === null) {\r\n $invalidProperties[] = \"'components' can't be null\";\r\n }\r\n if ($this->container['availabilityZone'] === null) {\r\n $invalidProperties[] = \"'availabilityZone' can't be null\";\r\n }\r\n if ($this->container['safeMode'] === null) {\r\n $invalidProperties[] = \"'safeMode' can't be null\";\r\n }\r\n if ($this->container['managerAdminPassword'] === null) {\r\n $invalidProperties[] = \"'managerAdminPassword' can't be null\";\r\n }\r\n if ($this->container['loginMode'] === null) {\r\n $invalidProperties[] = \"'loginMode' can't be null\";\r\n }\r\n $allowedValues = $this->getLogCollectionAllowableValues();\r\n if (!is_null($this->container['logCollection']) && !in_array($this->container['logCollection'], $allowedValues, true)) {\r\n $invalidProperties[] = sprintf(\r\n \"invalid value for 'logCollection', must be one of '%s'\",\r\n implode(\"', '\", $allowedValues)\r\n );\r\n }\r\n\r\n if ($this->container['nodeGroups'] === null) {\r\n $invalidProperties[] = \"'nodeGroups' can't be null\";\r\n }\r\n return $invalidProperties;\r\n }", "public function callProjectList(array $params = array())\n {\n return $this->call('projekt/list', $params);\n }", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['app_name'] === null) {\n $invalidProperties[] = \"'app_name' can't be null\";\n }\n if ($this->container['app_display_name'] === null) {\n $invalidProperties[] = \"'app_display_name' can't be null\";\n }\n if ($this->container['release_id'] === null) {\n $invalidProperties[] = \"'release_id' can't be null\";\n }\n if ($this->container['platform'] === null) {\n $invalidProperties[] = \"'platform' can't be null\";\n }\n if ($this->container['uploaded_at'] === null) {\n $invalidProperties[] = \"'uploaded_at' can't be null\";\n }\n if ($this->container['version'] === null) {\n $invalidProperties[] = \"'version' can't be null\";\n }\n if ($this->container['short_version'] === null) {\n $invalidProperties[] = \"'short_version' can't be null\";\n }\n if ($this->container['size'] === null) {\n $invalidProperties[] = \"'size' can't be null\";\n }\n if ($this->container['bundle_identifier'] === null) {\n $invalidProperties[] = \"'bundle_identifier' can't be null\";\n }\n if ($this->container['install_link'] === null) {\n $invalidProperties[] = \"'install_link' can't be null\";\n }\n return $invalidProperties;\n }", "public function getListSchemaChecking() {\n\t\treturn $this->_getConfigValueArray('schemaCheckingList');\n\t}", "private function get_raw_messages() {\n\t\t$jetpack_setup_url = $this->generate_admin_url(\n\t\t\tarray(\n\t\t\t\t'page' => 'jetpack',\n\t\t\t\t'#/setup' => '',\n\t\t\t)\n\t\t);\n\n\t\t$messages = array(\n\t\t\tarray(\n\t\t\t\t'id' => 'jpsetup-upload',\n\t\t\t\t'message_path' => '/wp:upload:admin_notices/',\n\t\t\t\t'message' => __( 'Do you want lightning-fast images?', 'jetpack' ),\n\t\t\t\t'description' => __( 'Set up Jetpack, enable Site Accelerator, and start serving your images lightning fast, for free.', 'jetpack' ),\n\t\t\t\t'button_link' => $jetpack_setup_url,\n\t\t\t\t'button_caption' => __( 'Set up Jetpack', 'jetpack' ),\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id' => 'jpsetup-widgets',\n\t\t\t\t'message_path' => '/wp:widgets:admin_notices/',\n\t\t\t\t'message' => __( 'Looking for even more widgets?', 'jetpack' ),\n\t\t\t\t'description' => __( 'Set up Jetpack for great additional widgets that display business contact info and maps, blog stats, and top posts.', 'jetpack' ),\n\t\t\t\t'button_link' => $jetpack_setup_url,\n\t\t\t\t'button_caption' => __( 'Set up Jetpack', 'jetpack' ),\n\t\t\t),\n\t\t);\n\n\t\tif ( wp_count_posts()->publish >= 5 ) {\n\t\t\t$messages[] = array(\n\t\t\t\t'id' => 'jpsetup-posts',\n\t\t\t\t'message_path' => '/wp:edit-post:admin_notices/',\n\t\t\t\t'message' => __( 'Do you know which of these posts gets the most traffic?', 'jetpack' ),\n\t\t\t\t'description' => __( 'Set up Jetpack to get in-depth stats about your content and visitors.', 'jetpack' ),\n\t\t\t\t'button_link' => $jetpack_setup_url,\n\t\t\t\t'button_caption' => __( 'Set up Jetpack', 'jetpack' ),\n\t\t\t);\n\t\t}\n\n\t\treturn $messages;\n\t}", "public function listInvalidProperties()\n {\n $invalidProperties = [];\n\n if ($this->container['pkiSystemconfigurationID'] === null) {\n $invalidProperties[] = \"'pkiSystemconfigurationID' can't be null\";\n }\n if (($this->container['pkiSystemconfigurationID'] > 1)) {\n $invalidProperties[] = \"invalid value for 'pkiSystemconfigurationID', must be smaller than or equal to 1.\";\n }\n\n if (($this->container['pkiSystemconfigurationID'] < 1)) {\n $invalidProperties[] = \"invalid value for 'pkiSystemconfigurationID', must be bigger than or equal to 1.\";\n }\n\n if ($this->container['fkiSystemconfigurationtypeID'] === null) {\n $invalidProperties[] = \"'fkiSystemconfigurationtypeID' can't be null\";\n }\n if (($this->container['fkiSystemconfigurationtypeID'] < 1)) {\n $invalidProperties[] = \"invalid value for 'fkiSystemconfigurationtypeID', must be bigger than or equal to 1.\";\n }\n\n if ($this->container['sSystemconfigurationtypeDescriptionX'] === null) {\n $invalidProperties[] = \"'sSystemconfigurationtypeDescriptionX' can't be null\";\n }\n if ($this->container['eSystemconfigurationNewexternaluseraction'] === null) {\n $invalidProperties[] = \"'eSystemconfigurationNewexternaluseraction' can't be null\";\n }\n if ($this->container['eSystemconfigurationLanguage1'] === null) {\n $invalidProperties[] = \"'eSystemconfigurationLanguage1' can't be null\";\n }\n if ($this->container['eSystemconfigurationLanguage2'] === null) {\n $invalidProperties[] = \"'eSystemconfigurationLanguage2' can't be null\";\n }\n if ($this->container['eSystemconfigurationEzsign'] === null) {\n $invalidProperties[] = \"'eSystemconfigurationEzsign' can't be null\";\n }\n if ($this->container['bSystemconfigurationEzsignpersonnal'] === null) {\n $invalidProperties[] = \"'bSystemconfigurationEzsignpersonnal' can't be null\";\n }\n if ($this->container['bSystemconfigurationSspr'] === null) {\n $invalidProperties[] = \"'bSystemconfigurationSspr' can't be null\";\n }\n// if (!is_null($this->container['dtSystemconfigurationReadonlyexpirationstart']) && !preg_match(\"/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/\", $this->container['dtSystemconfigurationReadonlyexpirationstart'])) {\n if (!is_null($this->container['dtSystemconfigurationReadonlyexpirationstart']) && !preg_match(\"/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/\", $this->container['dtSystemconfigurationReadonlyexpirationstart'])) {\n $invalidProperties[] = \"invalid value for 'dtSystemconfigurationReadonlyexpirationstart', must be conform to the pattern /^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/.\";\n }\n\n// if (!is_null($this->container['dtSystemconfigurationReadonlyexpirationend']) && !preg_match(\"/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/\", $this->container['dtSystemconfigurationReadonlyexpirationend'])) {\n if (!is_null($this->container['dtSystemconfigurationReadonlyexpirationend']) && !preg_match(\"/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/\", $this->container['dtSystemconfigurationReadonlyexpirationend'])) {\n $invalidProperties[] = \"invalid value for 'dtSystemconfigurationReadonlyexpirationend', must be conform to the pattern /^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/.\";\n }\n\n return $invalidProperties;\n }", "public function listInvalidProperties()\r\n {\r\n $invalidProperties = [];\r\n if (!is_null($this->container['taskId']) && !preg_match(\"/^[A-Za-z0-9]{32}$/\", $this->container['taskId'])) {\r\n $invalidProperties[] = \"invalid value for 'taskId', must be conform to the pattern /^[A-Za-z0-9]{32}$/.\";\r\n }\r\n if (!is_null($this->container['appId']) && !preg_match(\"/^[A-Za-z0-9]{32}$/\", $this->container['appId'])) {\r\n $invalidProperties[] = \"invalid value for 'appId', must be conform to the pattern /^[A-Za-z0-9]{32}$/.\";\r\n }\r\n if (!is_null($this->container['appName']) && !preg_match(\"/^deploy_[A-Za-z0-9]{6}$/\", $this->container['appName'])) {\r\n $invalidProperties[] = \"invalid value for 'appName', must be conform to the pattern /^deploy_[A-Za-z0-9]{6}$/.\";\r\n }\r\n if (!is_null($this->container['compId']) && !preg_match(\"/^[A-Za-z0-9]{32}$/\", $this->container['compId'])) {\r\n $invalidProperties[] = \"invalid value for 'compId', must be conform to the pattern /^[A-Za-z0-9]{32}$/.\";\r\n }\r\n if (!is_null($this->container['compName']) && (mb_strlen($this->container['compName']) > 128)) {\r\n $invalidProperties[] = \"invalid value for 'compName', the character length must be smaller than or equal to 128.\";\r\n }\r\n if (!is_null($this->container['compName']) && (mb_strlen($this->container['compName']) < 0)) {\r\n $invalidProperties[] = \"invalid value for 'compName', the character length must be bigger than or equal to 0.\";\r\n }\r\n if (!is_null($this->container['domainId']) && !preg_match(\"/^[A-Za-z0-9]{32}$/\", $this->container['domainId'])) {\r\n $invalidProperties[] = \"invalid value for 'domainId', must be conform to the pattern /^[A-Za-z0-9]{32}$/.\";\r\n }\r\n if (!is_null($this->container['region']) && (mb_strlen($this->container['region']) > 256)) {\r\n $invalidProperties[] = \"invalid value for 'region', the character length must be smaller than or equal to 256.\";\r\n }\r\n if (!is_null($this->container['region']) && (mb_strlen($this->container['region']) < 1)) {\r\n $invalidProperties[] = \"invalid value for 'region', the character length must be bigger than or equal to 1.\";\r\n }\r\n if (!is_null($this->container['state']) && (mb_strlen($this->container['state']) > 32)) {\r\n $invalidProperties[] = \"invalid value for 'state', the character length must be smaller than or equal to 32.\";\r\n }\r\n if (!is_null($this->container['state']) && (mb_strlen($this->container['state']) < 1)) {\r\n $invalidProperties[] = \"invalid value for 'state', the character length must be bigger than or equal to 1.\";\r\n }\r\n if (!is_null($this->container['state']) && !preg_match(\"/^[0-1]{1}$/\", $this->container['state'])) {\r\n $invalidProperties[] = \"invalid value for 'state', must be conform to the pattern /^[0-1]{1}$/.\";\r\n }\r\n return $invalidProperties;\r\n }", "function getProjectList()\n\t{\n\t\t//Update Project List\n\t\t$this->Project_List = null;\n\t\t$assigned_projects_rows = returnRowsDeveloperAssignments($this->getUsername(), 'Project');\n\t\tforeach($assigned_projects_rows as $assigned_project)\n\t\t\t$this->Project_List[] = new Projects( $assigned_project['ClientProjectTask'] );\n\t\treturn $this->Project_List;\n\t}", "public function getProjects()\n\t{\n\t\t$query = $this->db->getQuery(true);\n\t\t$query->select('id, name, alias')\n\t\t\t->from('#__monitor_projects');\n\n\t\t$this->countItems($query);\n\n\t\tif ($this->list !== null && isset($this->list['fullordering']) && in_array($this->list['fullordering'], $this->orderOptions))\n\t\t{\n\t\t\t$query->order($this->list['fullordering']);\n\t\t}\n\n\t\t$this->db->setQuery($query);\n\n\t\treturn $this->db->loadObjectList();\n\t}", "public function getProjects(){\n $projects = Project::all()->sortBy('dead');\n return $projects;\n }", "function getProjects(){\n\t\t \n\t\t $db = $this->startDB();\n\t\t $result = false;\n\t\t \n\t\t $sql = \"SELECT count(actTab.uuid) AS recCount, project_list.project_id, project_list.project_name\n\t\t FROM \".$this->penelopeTabID.\" AS actTab\n\t\t JOIN space ON actTab.uuid = space.uuid\n\t\t JOIN project_list ON space.project_id = project_list.project_id\n\t\t GROUP BY space.project_id \n\t\t \";\n\t\t \n\t\t $result = $db->fetchAll($sql);\n\t\t if($result){\n\t\t\t\t$projects = array();\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t $name = $row[\"project_name\"];\n\t\t\t\t\t $count = $row[\"recCount\"] + 0;\n\t\t\t\t\t $uuid = $row[\"project_id\"];\n\t\t\t\t\t $uri = self::projectBaseURI.$uuid;\n\t\t\t\t\t $projects[$uri] = array(\"name\" => $name, \"count\" => $count);\n\t\t\t\t}//end loop\n\t\t\t\t\n\t\t\t\t$projects = $this->orderURIs($projects);\n\t\t\t\t$this->projects = $projects;\n\t\t }//end case with results\n\t \n\t }", "function VM_projects() { return bList::getListInstance(myOrg_ID,'bList_vm_projects'); }", "public function worklogsReporting()\n {\n \t//\n \t// by developer\n //\n // by hours\n\n $worklogs_segmented_by_proj = [];\n $company_projects = $this->getAllProjects();\n\n foreach ($company_projects as $ndx => $company_project)\n {\n $worklogs_by_user = Werklog::with('user')\n ->selectRaw('user_id, COUNT(user_id) as user_occurrences, SUM(minutes) as user_project_total_time')\n ->where('project_id', $company_project->id)\n ->groupBy('user_id')\n ->orderBy('user_project_total_time', 'DESC')\n ->take(static::$_numrows)\n ->get();\n\n $worklogs_segmented_by_proj[$company_project->id] = $worklogs_by_user;\n }\n\n\t\tDebugbar::info($worklogs_segmented_by_proj);\n\n\t\treturn $worklogs_segmented_by_proj;\n }", "public function configuredChecks() {\n if ($this->checks === null) {\n $this->checks = [];\n foreach( $this->config as $driver => $checkConfig ) {\n // check if multiple or just one\n if (is_array($checkConfig)) {\n foreach( $checkConfig as $key => $config ) {\n $instance = $this->createInstance( $driver, $config );\n $instance->setInstanceName(is_string($key)?$key:$config);\n $this->checks[] = $instance;\n }\n } else {\n $instance = $this->createInstance( $driver, $checkConfig );\n $this->checks[] = $instance;\n }\n }\n }\n return $this->checks;\n }", "public function findHostDowntimesForAdminUser(): array;" ]
[ "0.6722513", "0.5504905", "0.53350157", "0.52022237", "0.5178261", "0.49790195", "0.49472752", "0.47796518", "0.4686594", "0.4643526", "0.46052107", "0.4591228", "0.45873624", "0.4557695", "0.4524556", "0.45164093", "0.44967884", "0.4488663", "0.44674298", "0.44586378", "0.4431005", "0.4423921", "0.44209892", "0.4416442", "0.43963835", "0.43871763", "0.43789434", "0.43751073", "0.43725982", "0.43678504" ]
0.7945477
0
Updates an Uptime check configuration. You can either replace the entire configuration with a new one or replace only certain fields in the current configuration by specifying the fields to be updated via updateMask. Returns the updated configuration. (uptimeCheckConfigs.patch)
public function patch($name, UptimeCheckConfig $postBody, $optParams = []) { $params = ['name' => $name, 'postBody' => $postBody]; $params = array_merge($params, $optParams); return $this->call('patch', [$params], UptimeCheckConfig::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function UpdateUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\UpdateUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/UpdateUptimeCheckConfig',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig', 'decode'],\n $metadata, $options);\n }", "public function setUptimeCheckConfig($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig::class);\n $this->uptime_check_config = $var;\n\n return $this;\n }", "public function get($name, $optParams = [])\n {\n $params = ['name' => $name];\n $params = array_merge($params, $optParams);\n return $this->call('get', [$params], UptimeCheckConfig::class);\n }", "public function create($parent, UptimeCheckConfig $postBody, $optParams = [])\n {\n $params = ['parent' => $parent, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('create', [$params], UptimeCheckConfig::class);\n }", "public function listProjectsUptimeCheckConfigs($parent, $optParams = [])\n {\n $params = ['parent' => $parent];\n $params = array_merge($params, $optParams);\n return $this->call('list', [$params], ListUptimeCheckConfigsResponse::class);\n }", "public function getUptimeCheckConfig()\n {\n return $this->uptime_check_config;\n }", "public function ListUptimeCheckConfigs(\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckConfigsRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/ListUptimeCheckConfigs',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckConfigsResponse', 'decode'],\n $metadata, $options);\n }", "public function testUpdate(): void {\n $configObject = $this->configUpdateManager->getConfig();\n\n $this->configUpdateManager->update();\n foreach ($configObject->getTargetConfigFilepaths() as $filepath) {\n self::assertFileExists($filepath);\n }\n\n $targetConfigFilepath = $configObject->getTargetConfigFilepath(Config::TARGET_CONFIG_FILENAME);\n /**\n * @var array{\n * draft: array{\n * last_applied_update: int,\n * },\n * } $config\n */\n $config = $configObject->readAndParseConfigFromTheFile($targetConfigFilepath);\n self::assertSame(App::LAST_AVAILABLE_UPDATE_WEIGHT, $config['draft']['last_applied_update']);\n }", "public function updateFromConfig()\n {\n // Begin transation\n $this->pdo->beginTransaction();\n\n // Update tables\n foreach ($this->schema['update'] as $schema) {\n $sql = false;\n\n // validate table to update\n if (isset($this->tables[$schema['table']])) {\n $table = $this->tables[$schema['table']];\n $columns = $table->getColumns(false);\n if (isset($schema['drop'])) {\n $sql = $this->getDropColumn($table, $schema['drop']);\n } elseif (isset($schema['add'])) {\n $sql = $this->getAddColumn(\n $table, $schema['add'], $schema['type']\n );\n } elseif (isset($schema['modify'])) {\n $sql = $this->getModifyColumn(\n $table, $columns[$schema['modify']], $schema['type']\n );\n }\n }\n\n // Finally run query if exists\n if (!empty($sql)) {\n $this->pdo->exec($sql);\n }\n }\n\n // Commit changes\n $this->pdo->commit();\n }", "public function update_beamtime_config($config) {\n $this->connect();\n $old_config = $this->beamtime_config();\n foreach( $config as $param => $value ) {\n\n $param_trimmed = strtolower(trim($param));\n $param_escaped = $this->escape_string($param_trimmed);\n\n $value_escaped = '';\n\n switch($param_trimmed) {\n\n case 'min_gap_width_sec':\n if(!$value)\n throw new DataPortalException (\n __METHOD__,\n \"configuration parameter {$param_trimmed} must have a non-empty value\");\n $value_escaped = intval($value);\n break;\n\n case 'last_run_begin_time':\n if(!$value)\n throw new DataPortalException (\n __METHOD__,\n \"configuration parameter {$param_trimmed} must have a non-empty value\");\n $value_escaped = $value->to64();\n break;\n\n default:\n $value_escaped = is_null($value) ? \"NULL\" : \"'\".$this->escape_string(\"{$value}\").\"'\";\n break;\n }\n $this->query(\n array_key_exists($param_trimmed, $old_config) ?\n \"UPDATE beamtime_config SET value={$value_escaped} WHERE param='{$param_escaped}'\" :\n \"INSERT INTO beamtime_config VALUES('{$param_escaped}',{$value_escaped})\"\n );\n }\n }", "public function GetUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\GetUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/GetUptimeCheckConfig',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig', 'decode'],\n $metadata, $options);\n }", "public function update_beamtime_config($config) {\n $old_config = $this->beamtime_config();\n foreach( $config as $param => $value ) {\n\n $param_trimmed = strtolower(trim($param));\n $param_escaped = $this->escape_string($param_trimmed);\n\n $value_escaped = '';\n\n switch($param_trimmed) {\n\n case 'min_gap_width_sec':\n if(!$value)\n throw new DataPortalException (\n __METHOD__,\n \"configuration parameter {$param_trimmed} must have a non-empty value\");\n $value_escaped = intval($value);\n break;\n\n case 'last_run_begin_time':\n if(!$value)\n throw new DataPortalException (\n __METHOD__,\n \"configuration parameter {$param_trimmed} must have a non-empty value\");\n $value_escaped = $value->to64();\n break;\n\n default:\n $value_escaped = is_null($value) ? \"NULL\" : \"'\".$this->escape_string(\"{$value}\").\"'\";\n break;\n }\n $this->query(\n array_key_exists($param_trimmed, $old_config) ?\n \"UPDATE beamtime_config SET value={$value_escaped} WHERE param='{$param_escaped}'\" :\n \"INSERT INTO beamtime_config VALUES('{$param_escaped}',{$value_escaped})\"\n );\n }\n }", "public function DeleteUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\DeleteUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/DeleteUptimeCheckConfig',\n $argument,\n ['\\Google\\Protobuf\\GPBEmpty', 'decode'],\n $metadata, $options);\n }", "function crpTalk_admin_updateconfig()\n{\n\t// Security check\n\tif (!SecurityUtil :: checkPermission('crpTalk::', '::', ACCESS_ADMIN))\n\t{\n\t\treturn LogUtil :: registerPermissionError();\n\t}\n\n\t$talk= new crpTalk();\n\treturn $talk->updateConfig();\n}", "public function UpdateUserConfiguration($request)\n {\n return $this->makeRequest(__FUNCTION__, $request);\n }", "public function CreateUptimeCheckConfig(\\Google\\Cloud\\Monitoring\\V3\\CreateUptimeCheckConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/CreateUptimeCheckConfig',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\UptimeCheckConfig', 'decode'],\n $metadata, $options);\n }", "public function patchSystemConfiguration($request)\n {\n return $this->start()->uri(\"/api/system-configuration\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->patch()\n ->go();\n }", "public function updateSystemConfiguration($request)\n {\n return $this->start()->uri(\"/api/system-configuration\")\n ->bodyHandler(new JSONBodyHandler($request))\n ->put()\n ->go();\n }", "public function updateUser(array $config = []);", "public function testUpdate() {\n $legacy_tour_config = $this->container->get('config.factory')->get('tour.tour.views-ui');\n $tips = $legacy_tour_config->get('tips');\n\n // Confirm the existing tour tip configurations match expectations.\n $this->assertFalse(isset($tips['views-ui-view-admin']['selector']));\n $this->assertEquals('views-display-extra-actions', $tips['views-ui-view-admin']['attributes']['data-id']);\n $this->assertEquals('views-ui-display-tab-bucket.format', $tips['views-ui-format']['attributes']['data-class']);\n $this->assertSame('left', $tips['views-ui-view-admin']['location']);\n $this->assertArrayNotHasKey('position', $tips['views-ui-view-admin']);\n\n $this->runUpdates();\n\n $updated_legacy_tour_config = $this->container->get('config.factory')->get('tour.tour.views-ui');\n $updated_tips = $updated_legacy_tour_config->get('tips');\n\n // Confirm that views-ui-view-admin uses `selector` instead of `data-id`.\n $this->assertSame('#views-display-extra-actions', $updated_tips['views-ui-view-admin']['selector']);\n\n // Confirm that views-ui-format uses `selector` instead of `data-class`.\n $this->assertSame('.views-ui-display-tab-bucket.format', $updated_tips['views-ui-format']['selector']);\n\n // Assert that the deprecated attributes key has been removed now that it is\n // empty.\n $this->assertArrayNotHasKey('attributes', $updated_tips['views-ui-view-admin']);\n\n $this->assertSame('left-start', $updated_tips['views-ui-view-admin']['position']);\n $this->assertArrayNotHasKey('location', $updated_tips['views-ui-view-admin']);\n }", "public function UpdateConfig($config = []) {\n\n $config = array_intersect_key($config, $this->\n config);\n\n $this->\n config = array_replace_recursive($this->\n config, $config);\n\n if (!is_int($this->\n config['expire'])) {\n\n $this->\n config['expire'] = intval($this->\n config['expire']);\n }\n\n $this->\n Upgrade();\n\n \\FluitoPHP\\Events\\Events::GetInstance()->\n Run('FluitoPHP.Authentication.GC', $this->\n database->\n Conn($this->\n GetConn())->\n Helper()->\n Select($this->\n GetPrefix() . 'usersalt', '*', array(\n array(\n 'column' => \"&DateAdd(last_access, {$this->\n config['expire']}, S)\",\n 'operator' => '<',\n 'rightcolumn' => '&CurrDTTM'\n )\n ))->\n GetResults(), $this->\n config);\n\n $this->\n database->\n Conn($this->\n GetConn())->\n Helper()->\n Delete($this->\n GetPrefix() . 'usersalt', array(\n array(\n 'column' => \"&DateAdd(last_access, {$this->\n config['expire']}, S)\",\n 'operator' => '<',\n 'rightcolumn' => '&CurrDTTM'\n )\n ))->\n Query();\n }", "public function updateSetupConfig($request)\n {\n $runtime = new RuntimeOptions([]);\n $headers = [];\n\n return $this->updateSetupConfigEx($request, $headers, $runtime);\n }", "public function ListUptimeCheckIps(\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckIpsRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.monitoring.v3.UptimeCheckService/ListUptimeCheckIps',\n $argument,\n ['\\Google\\Cloud\\Monitoring\\V3\\ListUptimeCheckIpsResponse', 'decode'],\n $metadata, $options);\n }", "public function update($data = array (), $condition = array())\n {\n return DB::table('hawthorne_configuration')->where($condition)->update($data);\n }", "public function updateSettings(Request $request)\n {\n\n $configFilePath = dirname(__DIR__) . '/../../../build/configs/pirrot_default.conf';\n if (file_exists('/etc/pirrot.conf')) {\n $configFilePath = '/etc/pirrot.conf';\n }\n\n // Get setting values from the configuration file.\n $config = new ConfManagerService($configFilePath);\n $currentSettings = $config->read();\n $updateSettings = $request->json();\n $newSettings = [];\n foreach ($updateSettings as $setting) {\n $newSettings[$setting['name']] = $setting['value'];\n }\n\n // Set all \"boolean\" type config items to \"false\" if the checkbox is not checked.\n $falseBooleanValues = array_diff_key($currentSettings, $newSettings);\n foreach ($falseBooleanValues as $key => $value) {\n // Ignore settings that are on the \"blacklist\"/ignored list (to prevent them being overwritten with \"false\")\n if (!in_array($key, $this->ignoredSettings)) {\n $newSettings[$key] = \"false\"; // Yes, really set this to a string and NOT a boolean type (as we're witting it to a text file)\n }\n }\n $updatedConfig = $config->update($newSettings);\n\n // Get the current request URL so we can manipulate it for the auto-refresh after the service has been restarted.\n $url = parse_url(request()->root());\n $response =\n [\n 'check_url' => $url['scheme'] . \"://\" . $url['host'] . ':' . $newSettings['web_interface_port'] . '/up',\n 'after_url' => $url['scheme'] . \"://\" . $url['host'] . ':' . $newSettings['web_interface_port'] . '/settings',\n ];\n\n // We will only write the new configuration file and attempt to restart the Pirrot daemon ONLY if it's actually running on a RPi.\n if (env('APP_ENV') !== 'production') {\n $response =\n [\n 'check_url' => request()->root() . '/up',\n 'after_url' => request()->root() . '/settings',\n ];\n return response($response, 200);\n }\n\n // Backup the old configuration file and then write the new file...\n system(\"cp \" . $configFilePath . \" /opt/pirrot/storage/backups/pirrot-\" . date(\"dmYHis\") . \".conf\");\n file_put_contents('/etc/pirrot.conf', $updatedConfig);\n\n // Trigger a daemon restart (after two seconds to give us enough time to respond to the HTTP request)\n system('sudo /opt/pirrot/web/resources/scripts/restart-pirrot.sh > /dev/null &');\n\n return response($response, 200);\n }", "public function patch($name, Configuration $postBody, $optParams = [])\n {\n $params = ['name' => $name, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('patch', [$params], Configuration::class);\n }", "public function batchUpdateConfigs()\n {\n foreach ($this->fields_form as $k => $f) {\n foreach ($f['form']['input'] as $i => $input) {\n $input['name'] = str_replace(array('[]'), array(''), $input['name']);\n\n if (isset($input['ignore']) && $input['ignore'] == true) {\n continue;\n }\n\n if (isset($input['lang']) && $input['lang'] == true) {\n $data = array();\n foreach (Language::getLanguages(false) as $lang) {\n $val = Tools::getValue($input['name'].'_'.$lang['id_lang'], $input['default']);\n $data[$lang['id_lang']] = $val;\n }\n\n if (isset($input['callback']) && method_exists($this, $input['callback'])) {\n $data[$lang['id_lang']] = $this->{$input['callback']}($data[$lang['id_lang']]);\n }\n\n Configuration::updateValue(trim($input['name']), $data, true);\n } else {\n $val = Tools::getValue($input['name'], $input['default']);\n if (isset($input['callback']) && method_exists($this, $input['callback'])) {\n $val = $this->{$input['callback']}($val);\n }\n Configuration::updateValue($input['name'], $val, true);\n }\n }\n }\n\n $this->batchUpdateCustomConfigs();\n\n return true;\n }", "public function UpdateMuteConfig(\\Google\\Cloud\\SecurityCenter\\V1\\UpdateMuteConfigRequest $argument,\n $metadata = [], $options = []) {\n return $this->_simpleRequest('/google.cloud.securitycenter.v1.SecurityCenter/UpdateMuteConfig',\n $argument,\n ['\\Google\\Cloud\\SecurityCenter\\V1\\MuteConfig', 'decode'],\n $metadata, $options);\n }", "public static function updateConfigBy($data, $params) {\n\t\tif (!is_array($data)) return false;\n if (!is_array($params)) return false; \n $data['update_time'] = Common::getTime();\n\t\t$data = self::_cookData($data);\n\t\treturn self::_getDao()->updateBy($data, $params);\n\t}", "abstract protected function _updateConfiguration();" ]
[ "0.6711495", "0.66990566", "0.5914926", "0.582598", "0.5785443", "0.56012374", "0.5382435", "0.49926636", "0.49801952", "0.48861706", "0.48679906", "0.48537675", "0.48073092", "0.47214732", "0.47213593", "0.46373323", "0.46329278", "0.46152425", "0.45887405", "0.45285544", "0.45094183", "0.4492244", "0.4484791", "0.44004205", "0.4363516", "0.4291372", "0.42812952", "0.42679954", "0.42587674", "0.42550412" ]
0.77980983
0
test getting WP profile no relation
public function testGetProfileWPNoRel() { $url = "http://127.0.0.1/app_test.php/profile/view/natasha-romanov"; $username = 'profileBucky@gmail.com'; $password = 'password'; $response = \Httpful\Request::get($url)->basicAuth($username, $password)->send(); $this->assertEquals('success', $response->body->status); $this->assertEquals('Natasha Romanov', $response->body->data->user->name); $this->assertNotEquals(0, $response->body->data->user->isWellnessPro); $this->assertEquals(0, $response->body->data->relationships->isSupporter); $this->assertEquals(0, $response->body->data->relationships->isSupportee); $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testWPGetProfileOtherUserNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = 'profileNatasha@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testDestiny2GetProfile()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testProfileExistsGetProfilesidExists()\n {\n\n }", "public function testProfileExistsHeadProfilesid()\n {\n\n }", "function have_profile(){\n\treturn ( get_profile('enabled') === true && get_profile() !== -1 );\n}", "public function testProfileCheckIfUserExists()\n {\n\n }", "public function _assertProfileExists($profile_uid)\n {\n }", "public function testWPGetProfileOtherUserPatientRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = 'profileVision@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(1, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testGetProfileOtherUserNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/steve-rogers\";\r\n\r\n $username = 'profileBucky@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Steve Rogers', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->relationships->isFriend);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testGetInvalidProfileByProfileName() : void {\n\t\t// get a profile name that doesn't exist\n\t\t$profile = Profile::getProfileByProfileName($this->getPDO(), \"Invalid Profile Name\");\n\t\t$this->assertCount(0, $profile);\n\t}", "public function testProfileFindOne()\n {\n\n }", "public function testGetOwnProfile()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = 'profileBucky@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->relationships->isFriend);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n\r\n }", "public function test_can_view_profile_of_any_user()\n {\n // When i access his profile\n // Then i can see his name\n $user = create(User::class);\n\n $response = $this->get(\"/profiles/{$user->name}\");\n\n $response->assertStatus(200);\n $response->assertSeeText($user->name);\n }", "public function checkForProfile()\n\t\t{\n\t\t\treturn (!Auth::user()->profiles) ? false : true;\n\t\t}", "public function testGETProfile()\n\t{\n\t\t$request = new ERestTestRequestHelper();\n\n\t\t$request['config'] = [\n\t\t\t'url'\t\t\t=> 'http://api/profile/2',\n\t\t\t'type'\t\t=> 'GET',\n\t\t\t'data'\t\t=> null,\n\t\t\t'headers' => [\n\t\t\t\t'X_REST_USERNAME' => 'admin@restuser',\n\t\t\t\t'X_REST_PASSWORD' => 'admin@Access',\n\t\t\t],\n\t\t];\n\n\t\t$request_response = $request->send();\n\t\t$expected_response = '{\"success\":true,\"message\":\"Record Found\",\"data\":{\"totalCount\":1,\"profile\":{\"id\":\"2\",\"user_id\":\"2\",\"photo\":\"0\",\"website\":\"mysite2.com\",\"owner\":{\"id\":\"2\",\"username\":\"username2\",\"password\":\"password2\",\"email\":\"email@email2.com\"}}}}';\n\t\t$this->assertJsonStringEqualsJsonString($request_response, $expected_response);\n\t}", "public function testGetInvalidProfileByProfileEmail() : void {\n\t\t// get an email that doesn't exist\n\t\t$profile = Profile::getProfileByProfileEmail($this->getPDO(), \"eye@dont.exist\");\n\t\t$this->assertNull($profile);\n\t}", "public function testProfileInvalid()\n {\n $email = new Notification();\n $email->profile('derp');\n }", "abstract protected function getUserProfile();", "public function testGetInvalidProfileByProfileId () : void {\n\t\t// grab a profile id that doesn't exist?\n\t\t$invalidProfileId = generateUuidV4();\n\n\t\t$profile = Profile::getProfileByProfileId($this->getPDO() , \"$invalidProfileId\");\n\t\t$this->assertNull($profile);\n\t}", "public function check_for_profile(){\n\t\t\n\t\t//get username for logged in user\n\t\t$user_name = $_SESSION['username'];\n\t\t// get user id for the logged in user\n\t\t$user_id = Database::user_id_query($user_name);\n\t\t//call static fucntion to check if user profile already exists\n\t\t$result = UserProfileHelper::check_profile($user_id);\n\t\t//var_dump($result);\n\t\treturn $result;\n\t}", "function at_follow_is_pro_user() {\n $isPro = false;\n $options = get_option('addthis_settings');\n $profile = $options['profile'];\n if ($profile) {\n $request = wp_remote_get( \"http://q.addthis.com/feeds/1.0/config.json?pubid=\" . $profile );\n $server_output = wp_remote_retrieve_body( $request );\n $array = json_decode($server_output);\n // check for pro user\n if (array_key_exists('_default',$array)) {\n $isPro = true;\n } else {\n $isPro = false;\n }\n }\n return $isPro;\n}", "public function testProfilePrototypeGetPosts()\n {\n\n }", "public function testProfileCheckIfDisplayNameIsTaken()\n {\n\n }", "function a_user_has_a_profile()\n {\n $user = create('App\\User');\n\n $this->get(\"/profiles/{$user->name}\")\n ->assertSee($user->name);\n }", "private function checkProfile($profile)\n {\n if ($profile === null) {\n $profile = $this->getProfile();\n return $profile;\n } elseif ($this->getProfile()->getUsername() === $profile || $this->getDoorman()->isKitchenStaff() === true) {\n $profileRepository = $this->getDoctrine()->getRepository('MealzUserBundle:Profile');\n $profile = $profileRepository->find($profile);\n return $profile;\n }\n\n return null;\n }", "public function testProfileFind()\n {\n\n }", "public function testGetProfileWPPatientRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/vision-jones\";\r\n\r\n $username = 'profileBucky@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Vision Jones', $response->body->data->user->name);\r\n $this->assertNotEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(1, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testProfileView()\n {\n $this->loginReader();\n\n $response = $this->get('api/user/profile/1');\n\n $response->assertStatus(200);\n }", "public function testGetProfileUserNotExist()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/thor\";\r\n\r\n $username = 'profileBucky@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n //AppBundle:User object not found. (404 Not Found)\r\n $this->assertTrue($response->code === 404);\r\n\r\n }", "function get_profile($field, $user = \\false)\n {\n }" ]
[ "0.7313183", "0.67644936", "0.6726738", "0.6717151", "0.6700389", "0.6694808", "0.65982246", "0.6515449", "0.6451861", "0.64039105", "0.63828796", "0.6347496", "0.633259", "0.62712973", "0.6269025", "0.6254397", "0.62381446", "0.62373203", "0.62109494", "0.6209512", "0.6182171", "0.61310464", "0.6123738", "0.61198866", "0.6104943", "0.60860723", "0.60764086", "0.6075769", "0.6061719", "0.60556525" ]
0.7236867
1
tests WP getting other user profile
public function testWPGetProfileOtherUserNoRel() { $url = "http://127.0.0.1/app_test.php/profile/view/bucky-barnes"; $username = 'profileNatasha@gmail.com'; $password = 'password'; $response = \Httpful\Request::get($url)->basicAuth($username, $password)->send(); $this->assertEquals('success', $response->body->status); $this->assertEquals('Bucky Barnes', $response->body->data->user->name); $this->assertEquals(0, $response->body->data->user->isWellnessPro); $this->assertEquals(0, $response->body->data->relationships->isSupporter); $this->assertEquals(0, $response->body->data->relationships->isSupportee); $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testDestiny2GetProfile()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "abstract protected function getUserProfile();", "public function testWPGetProfileOtherUserPatientRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = 'profileVision@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(1, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testGetOwnProfile()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = 'profileBucky@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->relationships->isFriend);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n\r\n }", "public function getUserProfile();", "public function testGetProfileOtherUserNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/steve-rogers\";\r\n\r\n $username = 'profileBucky@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Steve Rogers', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->relationships->isFriend);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testGetProfileOtherUserSupporter()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/tony-stark\";\r\n\r\n $username = 'profileBucky@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Tony Stark', $response->body->data->user->name);\r\n\r\n $this->assertEquals(1, $response->body->data->relationships->isSupportee);\r\n\r\n }", "public function testGetProfileWPNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/natasha-romanov\";\r\n\r\n $username = 'profileBucky@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Natasha Romanov', $response->body->data->user->name);\r\n $this->assertNotEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testGETProfile()\n\t{\n\t\t$request = new ERestTestRequestHelper();\n\n\t\t$request['config'] = [\n\t\t\t'url'\t\t\t=> 'http://api/profile/2',\n\t\t\t'type'\t\t=> 'GET',\n\t\t\t'data'\t\t=> null,\n\t\t\t'headers' => [\n\t\t\t\t'X_REST_USERNAME' => 'admin@restuser',\n\t\t\t\t'X_REST_PASSWORD' => 'admin@Access',\n\t\t\t],\n\t\t];\n\n\t\t$request_response = $request->send();\n\t\t$expected_response = '{\"success\":true,\"message\":\"Record Found\",\"data\":{\"totalCount\":1,\"profile\":{\"id\":\"2\",\"user_id\":\"2\",\"photo\":\"0\",\"website\":\"mysite2.com\",\"owner\":{\"id\":\"2\",\"username\":\"username2\",\"password\":\"password2\",\"email\":\"email@email2.com\"}}}}';\n\t\t$this->assertJsonStringEqualsJsonString($request_response, $expected_response);\n\t}", "public function test_can_view_profile_of_any_user()\n {\n // When i access his profile\n // Then i can see his name\n $user = create(User::class);\n\n $response = $this->get(\"/profiles/{$user->name}\");\n\n $response->assertStatus(200);\n $response->assertSeeText($user->name);\n }", "public function testProfileCheckIfUserExists()\n {\n\n }", "public function testGetProfileOtherUserFriends()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bruce-banner\";\r\n\r\n $username = 'profileBucky@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bruce Banner', $response->body->data->user->name);\r\n $this->assertEquals(1, $response->body->data->relationships->isFriend);\r\n\r\n }", "public function testProfileView()\n {\n $this->loginReader();\n\n $response = $this->get('api/user/profile/1');\n\n $response->assertStatus(200);\n }", "public function testCheckProfile()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('http://localhost:8000/user/12/profile')\n ->assertSee('My Profile');\n });\n }", "public function testUserProfile() {\n\t\tif (!$this->_hasTrigger('userProfile')) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$expected = $this->_manualCall('userProfile', $this->ViewtEvent);\n\n\t\t$result = $this->Event->trigger($this->ViewObject, $this->plugin . '.userProfile');\n\t\t$this->assertEquals($expected, $result);\n\t}", "public function check_for_profile(){\n\t\t\n\t\t//get username for logged in user\n\t\t$user_name = $_SESSION['username'];\n\t\t// get user id for the logged in user\n\t\t$user_id = Database::user_id_query($user_name);\n\t\t//call static fucntion to check if user profile already exists\n\t\t$result = UserProfileHelper::check_profile($user_id);\n\t\t//var_dump($result);\n\t\treturn $result;\n\t}", "public function testGuestNotAccessProfilePage()\n\t{\n\t\t$this->open('/user/edit/' . $this->users['sample1']['intUserID']);\n\t\t$this->assertTextNotPresent('Edit');\n\n\t\t$this->open('/user/edit/' . $this->users['sample2']['intUserID']);\n\t\t$this->assertTextNotPresent('Edit');\n\t}", "public function testGetAccountProfileIn($auth)\n {\n // Grab Page\n $result = $this->actingAs($auth)\n ->visit('account/profile')\n ->see('Account Privacy')\n ->see('SPONSORED')\n ->see('ADS')\n ->see('CALENDAR')\n ->see('Edit Profile Image')\n ->seePageIs('account/profile');\n }", "function getProfile(){\n $profile = $this->loadUser();\n return $profile;\n }", "public function testProfileUnilogin()\n {\n\n }", "function get_profile($field, $user = \\false)\n {\n }", "public function public_profile_get() {\n $this->response(App\\Auth::profile(), REST_Controller::HTTP_OK);\n }", "function at_follow_is_pro_user() {\n $isPro = false;\n $options = get_option('addthis_settings');\n $profile = $options['profile'];\n if ($profile) {\n $request = wp_remote_get( \"http://q.addthis.com/feeds/1.0/config.json?pubid=\" . $profile );\n $server_output = wp_remote_retrieve_body( $request );\n $array = json_decode($server_output);\n // check for pro user\n if (array_key_exists('_default',$array)) {\n $isPro = true;\n } else {\n $isPro = false;\n }\n }\n return $isPro;\n}", "public function testProfilePersonalInfo()\n {\n // Create a user with the username 'johndoe'\n $user = factory(User::class)->create(['username'=>'johndoe']);\n // Add a profile record to the user\n $profile = factory(Profile::class)->make(['country_id'=>4]);\n // Save the user\n $user->profile()->save($profile);\n // Goto the profile browse page\n $this->visit(route('profile.view', ['name'=>'johndoe']))\n ->see('seeInElement', '.country', DB::table('countries')->where('id', 4)->first()->full_name);\n }", "public function testGetProfileWPPatientRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/vision-jones\";\r\n\r\n $username = 'profileBucky@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Vision Jones', $response->body->data->user->name);\r\n $this->assertNotEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(1, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function InitOtherUser()\n {\n $login = trim( strip_tags( _v('login', '') ) );\n //if link has login\n if ($login)\n {\n if ($this->IsAuth() && $login==$this->mUserInfo['Name'])\n {\n //show current user profile\n $this->mOtherUserId = 0;\n return false; \n }\n else\n {\n $this->mOtherUserInfo = UserQuery::create()\n ->Select(array('Id', 'Email', 'Status', 'Pass', 'LastReload', 'FirstName', 'LastName', 'Name', 'Blocked', 'BlockReason', 'Country',\n 'Avatar', 'Location', 'HideLoc', 'About', 'BandName', 'Likes', 'Dob', 'Gender', 'YearsActive', 'Genres', 'Members', 'Website', 'Bio', 'RecordLabel', 'RecordLabelLink', 'UserPhone', 'State', 'HashTag', 'FbOn', 'TwOn', 'InOn'))\n ->where('LOWER(Name) = \"' . ToLower( $login ) . '\"')\n\t\t\t\t\t->filterByEmailConfirmed(1)\n\t\t\t\t\t->filterByBlocked(0)\n ->filterByStatus(1, '>=')->findOne();\n\n if (!empty($this->mOtherUserInfo)) \n {\n $this->mOtherUserId = $this->mOtherUserInfo['Id'];\n\n\t\t\t\t\t$genres_list = User::GetGenresList();\n\t\t\t\t\t\n\t\t\t\t\t$genresListArr = explode(',',$this->mOtherUserInfo['Genres']);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tforeach($genresListArr as $key=> $val)\n\t\t\t\t\t{\n\t\t\t\t\t\t$userGenres .= $genres_list[$val].'/';\n\t\t\t\t\t}\n\t\t\t\t\t$this->mOtherUserInfo['GenresList'] = trim($userGenres, '/');\t\n\n\t\t\t\t//Fellow count\n\t\t\t\t$this->mOtherUserInfo['FollowersCount'] = UserFollow::GetFollowersUserListCount($this->mOtherUserInfo['Id'], USER_FAN);\n\t\t\t\t\n\t\t\t\t$memTrack = unserialize($this->mOtherUserInfo['Members']);\t\t\t\n\t\t\t\t$this->mOtherUserInfo['Members'] = $memTrack[0];\n\t\t\t\t$this->mOtherUserInfo['Tracks'] = $memTrack[1];\n\n\t\t\t\t\t\t\t\t\t\t\n } else {\n\t\t\t\t\t$this->mOtherUserId = -1;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n return true;\n }\n }\n }", "function wpcom_vip_get_user_profile( $email_or_id ) {\n\n\tif ( is_numeric( $email_or_id ) ) {\n\t\t$user = get_user_by( 'id', $email_or_id );\n\t\tif ( ! $user )\n\t\t\treturn false;\n\n\t\t$email = $user->user_email;\n\t} elseif ( is_email( $email_or_id ) ) {\n\t\t$email = $email_or_id;\n\t} else {\n\t\t$user_login = sanitize_user( $email_or_id, true );\n\t\t$user = get_user_by( 'login', $user_login );\n\t\tif ( ! $user )\n\t\t\treturn;\n\n\t\t$email = $user->user_email;\n\t}\n\n\t$hashed_email = md5( strtolower( trim( $email ) ) );\n\t$profile_url = esc_url_raw( sprintf( '%s.gravatar.com/%s.php', ( is_ssl() ? 'https://secure' : 'http://www' ), $hashed_email ), array( 'http', 'https' ) );\n\n\t$profile = wpcom_vip_file_get_contents( $profile_url, 1, 900 );\n\tif ( $profile ) {\n\t\t$profile = unserialize( $profile );\n\n\t\tif ( is_array( $profile ) && ! empty( $profile['entry'] ) && is_array( $profile['entry'] ) ) {\n\t\t\t$profile = $profile['entry'][0];\n\t\t} else {\n\t\t\t$profile = false;\n\t\t}\n\t}\n\treturn $profile;\n}", "function a_user_has_a_profile()\n {\n $user = create('App\\User');\n\n $this->get(\"/profiles/{$user->name}\")\n ->assertSee($user->name);\n }", "function getUserProfile()\n\t{\n\t\t// refresh tokens if needed \n\t\t$this->refreshToken();\n\n\t\ttry{\n\t\t\t$authTest = $this->api->api( \"auth.test\" );\n\t\t\t$response = $this->api->get( \"users.info\", array( \"user\" => $authTest->user_id ) );\n\t\t}\n\t\tcatch( SlackException $e ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an error: $e\", 6 );\n\t\t}\n\n\t\t// check the last HTTP status code returned\n\t\tif ( $this->api->http_code != 200 ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} returned an error. \" . $this->errorMessageByStatus( $this->api->http_code ), 6 );\n\t\t}\n\n\t\tif ( ! is_object( $response ) || ! isset( $response->user->id ) ){\n\t\t\tthrow new Exception( \"User profile request failed! {$this->providerId} api returned an invalid response.\", 6 );\n\t\t}\n\t\t# store the user profile. \n\t\t$this->user->profile->identifier\t\t=\t@$response->user->id;\n\t\t$this->user->profile->profileURL\t\t=\t\"\";\n\t\t$this->user->profile->webSiteURL\t\t=\t\"\";\n\t\t$this->user->profile->photoURL\t\t\t=\t@$response->user->profile->image_original;\n\t\t$this->user->profile->displayName\t\t=\t@$response->user->profile->real_name;\n\t\t$this->user->profile->description\t\t=\t\"\";\n\t\t$this->user->profile->firstName\t\t\t=\t@$response->user->profile->first_name;\n\t\t$this->user->profile->lastName\t\t\t=\t@$response->user->profile->last_name;\n\t\t$this->user->profile->gender\t\t\t=\t\"\";\n\t\t$this->user->profile->language\t\t\t=\t\"\";\n\t\t$this->user->profile->age\t\t\t\t=\t\"\";\n\t\t$this->user->profile->birthDay\t\t\t=\t\"\";\n\t\t$this->user->profile->birthMonth\t\t=\t\"\";\n\t\t$this->user->profile->birthYear\t\t\t=\t\"\";\n\t\t$this->user->profile->email\t\t\t\t=\t@$response->user->profile->email;\n\t\t$this->user->profile->emailVerified\t =\t\"\";\n\t\t$this->user->profile->phone\t\t\t\t=\t\"\";\n\t\t$this->user->profile->address\t\t\t=\t\"\";\n\t\t$this->user->profile->country\t\t\t=\t\"\";\n\t\t$this->user->profile->region\t\t\t=\t\"\";\n\t\t$this->user->profile->city\t\t\t\t=\t\"\";\n\t\t$this->user->profile->zip\t\t\t\t=\t\"\";\n\n\t\treturn $this->user->profile;\n\t}", "public function testManagerNotAccessProfileUser()\n\t{\n\t\t$this->login($this->users['sample2']['varName'], $this->passwordManager);\n\t\t$this->open('/user/edit/' . $this->users['sample1']['intUserID']);\n\t\t$this->assertTextPresent('You don\\'t have access to this section.');\n\t}" ]
[ "0.7305726", "0.71837515", "0.7180283", "0.6933108", "0.68574077", "0.68501556", "0.677595", "0.6709536", "0.6694701", "0.6604053", "0.65933204", "0.6558116", "0.6557394", "0.65279", "0.63662887", "0.6222691", "0.62009585", "0.61989343", "0.61876166", "0.6178911", "0.61762846", "0.61620325", "0.61465234", "0.6114763", "0.6111513", "0.6109977", "0.6102795", "0.60959315", "0.607483", "0.60731614" ]
0.77301717
0
test WP getting patient profile
public function testWPGetProfileOtherUserPatientRel() { $url = "http://127.0.0.1/app_test.php/profile/view/bucky-barnes"; $username = 'profileVision@gmail.com'; $password = 'password'; $response = \Httpful\Request::get($url)->basicAuth($username, $password)->send(); $this->assertEquals('success', $response->body->status); $this->assertEquals('Bucky Barnes', $response->body->data->user->name); $this->assertEquals(0, $response->body->data->user->isWellnessPro); $this->assertEquals(0, $response->body->data->relationships->isSupporter); $this->assertEquals(0, $response->body->data->relationships->isSupportee); $this->assertEquals(1, $response->body->data->relationships->isWellnessProRel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testProfilePersonalInfo()\n {\n // Create a user with the username 'johndoe'\n $user = factory(User::class)->create(['username'=>'johndoe']);\n // Add a profile record to the user\n $profile = factory(Profile::class)->make(['country_id'=>4]);\n // Save the user\n $user->profile()->save($profile);\n // Goto the profile browse page\n $this->visit(route('profile.view', ['name'=>'johndoe']))\n ->see('seeInElement', '.country', DB::table('countries')->where('id', 4)->first()->full_name);\n }", "public function testGetProfileWPPatientRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/vision-jones\";\r\n\r\n $username = 'profileBucky@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Vision Jones', $response->body->data->user->name);\r\n $this->assertNotEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(1, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testDestiny2GetProfile()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function testGetProfileWPNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/natasha-romanov\";\r\n\r\n $username = 'profileBucky@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Natasha Romanov', $response->body->data->user->name);\r\n $this->assertNotEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testProfileView()\n {\n $this->loginReader();\n\n $response = $this->get('api/user/profile/1');\n\n $response->assertStatus(200);\n }", "public function testWPGetProfileOtherUserNoRel()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = 'profileNatasha@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->user->isWellnessPro);\r\n\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n }", "public function testGetOwnProfile()\r\n {\r\n $url = \"http://127.0.0.1/app_test.php/profile/view/bucky-barnes\";\r\n\r\n $username = 'profileBucky@gmail.com';\r\n $password = 'password';\r\n\r\n $response = \\Httpful\\Request::get($url)->basicAuth($username, $password)->send();\r\n\r\n $this->assertEquals('success', $response->body->status);\r\n $this->assertEquals('Bucky Barnes', $response->body->data->user->name);\r\n $this->assertEquals(0, $response->body->data->relationships->isFriend);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupporter);\r\n $this->assertEquals(0, $response->body->data->relationships->isSupportee);\r\n $this->assertEquals(0, $response->body->data->relationships->isWellnessProRel);\r\n\r\n }", "public function testProfileFind()\n {\n\n }", "public function testCheckProfile()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('http://localhost:8000/user/12/profile')\n ->assertSee('My Profile');\n });\n }", "public function testProfileExistsHeadProfilesid()\n {\n\n }", "public function testProfileUnilogin()\n {\n\n }", "public function testProfileFindOne()\n {\n\n }", "abstract protected function getUserProfile();", "public function testProfileExistsGetProfilesidExists()\n {\n\n }", "public function testGETProfile()\n\t{\n\t\t$request = new ERestTestRequestHelper();\n\n\t\t$request['config'] = [\n\t\t\t'url'\t\t\t=> 'http://api/profile/2',\n\t\t\t'type'\t\t=> 'GET',\n\t\t\t'data'\t\t=> null,\n\t\t\t'headers' => [\n\t\t\t\t'X_REST_USERNAME' => 'admin@restuser',\n\t\t\t\t'X_REST_PASSWORD' => 'admin@Access',\n\t\t\t],\n\t\t];\n\n\t\t$request_response = $request->send();\n\t\t$expected_response = '{\"success\":true,\"message\":\"Record Found\",\"data\":{\"totalCount\":1,\"profile\":{\"id\":\"2\",\"user_id\":\"2\",\"photo\":\"0\",\"website\":\"mysite2.com\",\"owner\":{\"id\":\"2\",\"username\":\"username2\",\"password\":\"password2\",\"email\":\"email@email2.com\"}}}}';\n\t\t$this->assertJsonStringEqualsJsonString($request_response, $expected_response);\n\t}", "public function test_can_view_profile_of_any_user()\n {\n // When i access his profile\n // Then i can see his name\n $user = create(User::class);\n\n $response = $this->get(\"/profiles/{$user->name}\");\n\n $response->assertStatus(200);\n $response->assertSeeText($user->name);\n }", "public function testProfileCheckIfDisplayNameIsTaken()\n {\n\n }", "public function testProfilePrototypeGetPosts()\n {\n\n }", "public function public_profile_get() {\n $this->response(App\\Auth::profile(), REST_Controller::HTTP_OK);\n }", "public function testProfileCheckIfUserExists()\n {\n\n }", "public function testProfilePrototypeFindByIdAccessTokens()\n {\n\n }", "public function testProfilePrototypeFindByIdPosts()\n {\n\n }", "public function testProfilePrototypeGetQuarantines()\n {\n\n }", "function do_personal()\r\n\t{\r\n\r\n\t\t$this->lib->do_profile();\r\n\r\n\t}", "public function testWebinarRegistrantGet()\n {\n }", "public function testProfileFindById()\n {\n\n }", "public function testGetSiteMembershipRequestForPerson()\n {\n }", "function get_profile_usrid($usrid){\r\n\t\r\n}", "public function getUserProfile();", "protected static function profilePageProvider()\n {\n $config = \\Codeception\\Configuration::config();\n $civiRemoteApi = new \\CiviRemoteApi($config['modules']['config']['CiviRemoteApi']);\n\n $params = [\n 'entity' => 'UFGroup',\n 'action' => 'get',\n 'is_active' => 1,\n 'is_reserved' => 0,\n // 'id' => 12,\n // group_type (comma separated list of contact types)\n //\n 'options' => [\n // 'limit' => 1,\n ],\n ];\n $profiles = $civiRemoteApi->CiviRemote($params);\n $examples = [];\n\n if (!empty($profiles['values'])) {\n // Iterate over pages to pick up payment processors.\n foreach ($profiles['values'] as $profile) {\n $example = [\n 'profile_id' => $profile['id'],\n 'profile_title' => $profile['title'],\n 'profile_url' => \"civicrm/profile/create?gid={$profile['id']}\",\n ];\n\n // Other profile setup?\n $examples[] = $example;\n }\n\n }\n return $examples;\n }" ]
[ "0.66872036", "0.6682553", "0.66458416", "0.6529471", "0.6407498", "0.640187", "0.6374029", "0.636708", "0.63409925", "0.625468", "0.6236356", "0.62344956", "0.62273055", "0.622525", "0.62183315", "0.6185998", "0.61758316", "0.60946333", "0.6046463", "0.59812826", "0.59422874", "0.59221506", "0.59202784", "0.5871911", "0.5845557", "0.584265", "0.582566", "0.58224124", "0.5807709", "0.5790517" ]
0.7107858
0
sg_map_meta_cap function to add Meta Capability Handling.
public function sg_map_meta_cap( $caps, $cap, $user_id, $args ) { $capability_type = 'small_group'; if ( 'edit_' . $capability_type == $cap || 'delete_' . $capability_type == $cap || 'read_' . $capability_type == $cap ) { $post = get_post( $args[0] ); $post_type = get_post_type_object( $post->post_type ); /* Set an empty array for the caps. */ $caps = array( ); } /* If editing a help note, assign the required capability. */ if ( "edit_{$capability_type}" == $cap ) { if( $user_id == $post->post_author ) $caps[] = $post_type->cap->edit_posts; else $caps[] = $post_type->cap->edit_others_posts; } /* If deleting a help note, assign the required capability. */ elseif( "delete_{$capability_type}" == $cap ) { if( isset( $post->post_author ) && $user_id == $post->post_author && isset( $post_type->cap->delete_posts ) ) $caps[] = $post_type->cap->delete_posts; elseif ( isset( $post_type->cap->delete_others_posts ) ) $caps[] = $post_type->cap->delete_others_posts; } /* If reading a private help note, assign the required capability. */ elseif( "read_{$capability_type}" == $cap ) { if( 'private' != $post->post_status ) $caps[] = 'read'; elseif ( $user_id == $post->post_author ) $caps[] = 'read'; else $caps[] = $post_type->cap->read_private_posts; } /* Return the capabilities required by the user. */ return $caps; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setMapMetaCap($metaCap = true){\n\t\t$this->mapMetaCap = $metaCap;\n\t}", "function map_meta_cap($cap, $user_id, ...$args)\n {\n }", "function erp_map_meta_caps( $caps = array(), $cap = '', $user_id = 0, $args = array() ) {\n return apply_filters( 'erp_map_meta_caps', $caps, $cap, $user_id, $args );\n}", "function my_map_meta_cap( $caps, $cap, $user_id, $args ) {\n\tif ( 'edit_game' == $cap || 'delete_game' == $cap || 'read_game' == $cap ) {\n\t\t$post = get_post( $args[0] );\n\t\t$post_type = get_post_type_object( $post->post_type );\n\n\t\t/* Set an empty array for the caps. */\n\t\t$caps = array();\n\t}\n\t\n\t/* If editing, deleting, or reading a resource, get the post and post type object. */\n\tif ( 'edit_resouce' == $cap || 'delete_resource' == $cap || 'read_resouce' == $cap ) {\n\t\t$post = get_post( $args[0] );\n\t\t$post_type = get_post_type_object( $post->post_type );\n\n\t\t/* Set an empty array for the caps. */\n\t\t$caps = array();\n\t}\n\t\n\tif ( 'edit_person' == $cap || 'delete_person' == $cap || 'read_person' == $cap ) {\n\t\t$post = get_post( $args[0] );\n\t\t$post_type = get_post_type_object( $post->post_type );\n\n\t\t/* Set an empty array for the caps. */\n\t\t$caps = array();\n\t}\n\n\t/* If editing a game, assign the required capability. */\n\tif ( 'edit_game' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->edit_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->edit_others_posts;\n\t}\n\t\n\n\t\n\t/* If editing a resource, assign the required capability. */\n\tif ( 'edit_resource' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->edit_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->edit_others_posts;\n\t}\n\t\n\n\t\n\tif ( 'edit_person' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->edit_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->edit_others_posts;\n\t}\n\n\t/* If deleting a game, assign the required capability. */\n\telseif ( 'delete_game' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->delete_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->delete_others_posts;\n\t}\n\t\n\t/* If deleting a resource, assign the required capability. */\n\telseif ( 'delete_resouce' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->delete_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->delete_others_posts;\n\t}\n\t\n\telseif ( 'delete_person' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->delete_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->delete_others_posts;\n\t}\n\n\t/* If reading a private game, assign the required capability. */\n\telseif ( 'read_game' == $cap ) {\n\n\t\tif ( 'private' != $post->post_status )\n\t\t\t$caps[] = 'read';\n\t\telseif ( $user_id == $post->post_author )\n\t\t\t$caps[] = 'read';\n\t\telse\n\t\t\t$caps[] = $post_type->cap->read_private_posts;\n\t}\n\t\n\t/* If reading a private resource, assign the required capability. */\n\telseif ( 'read_resouce' == $cap ) {\n\n\t\tif ( 'private' != $post->post_status )\n\t\t\t$caps[] = 'read';\n\t\telseif ( $user_id == $post->post_author )\n\t\t\t$caps[] = 'read';\n\t\telse\n\t\t\t$caps[] = $post_type->cap->read_private_posts;\n\t}\n\t\n\telseif ( 'read_person' == $cap ) {\n\n\t\tif ( 'private' != $post->post_status )\n\t\t\t$caps[] = 'read';\n\t\telseif ( $user_id == $post->post_author )\n\t\t\t$caps[] = 'read';\n\t\telse\n\t\t\t$caps[] = $post_type->cap->read_private_posts;\n\t}\n\n\t/* Return the capabilities required by the user. */\n\treturn $caps;\n}", "public function mapMetaCaps($caps, $cap, $user_id, $args) {\n global $post;\n\n $objectId = (isset($args[0]) ? $args[0] : null);\n\n // First of all delete all artificial capabilities from the $caps\n foreach($caps as $i => $capability) {\n if (strpos($capability, 'aam|') === 0) {\n // Remove this capability from the mapped array and let WP Core\n // handle the correct mapping\n $capability = null; \n }\n\n if (in_array($capability, AAM_Backend_Feature_Main_Capability::$groups['aam'], true)) {\n if (!AAM_Core_API::capabilityExists($capability)) {\n $capability = AAM_Core_Config::get(\n 'page.capability', 'administrator'\n );\n }\n }\n\n if ($capability === null) {\n unset($caps[$i]);\n } else {\n $caps[$i] = $capability;\n }\n }\n\n switch($cap) {\n case 'edit_user':\n case 'delete_user':\n // Some plugins or themes simply do not provide the the user ID for\n // these capabilities. I did not find in WP core any place were they\n // violate this rule\n if (!empty($objectId)) {\n $caps = $this->authorizeUserUpdate($caps, $objectId);\n }\n break;\n \n case 'install_plugins':\n case 'delete_plugins':\n case 'edit_plugins':\n case 'update_plugins':\n $action = explode('_', $cap);\n $caps = $this->checkPluginsAction($action[0], $caps, $cap);\n break;\n \n case 'activate_plugin':\n case 'deactivate_plugin':\n $action = explode('_', $cap);\n $caps = $this->checkPluginAction($objectId, $action[0], $caps, $cap);\n break;\n\n // This part needs to stay to cover scenarios where WP_Post_Type->cap->...\n // is not used but rather the hardcoded capability \n case 'edit_post':\n $caps = $this->authorizePostEdit($caps, $objectId);\n break;\n \n case 'delete_post':\n $caps = $this->authorizePostDelete($caps, $objectId);\n break;\n \n case 'read_post':\n $caps = $this->authorizePostRead($caps, $objectId);\n break;\n \n \n case 'publish_post':\n case 'publish_posts':\n case 'publish_pages':\n // There is a bug in WP core that instead of checking if user has\n // ability to publish_post, it checks for edit_post. That is why\n // user has to be on the edit\n if (is_a($post, 'WP_Post')) {\n $caps = $this->authorizePublishPost($caps, $post->ID);\n }\n break;\n \n default:\n if (strpos($cap, 'aam|') === 0) {\n if (!$this->skipMetaCheck) {\n $this->skipMetaCheck = true;\n $caps = $this->checkPostTypePermission($caps, $cap, $objectId);\n $this->skipMetaCheck = false;\n }\n } else {\n $caps = apply_filters('aam-map-meta-caps-filter', $caps, $cap, $args);\n }\n break;\n }\n \n return $caps;\n }", "function map_meta_cap( $caps, $cap, $user_id, $args ){\n\n switch( $cap ){\n case 'edit_user':\n case 'remove_user':\n case 'promote_user':\n if( isset($args[0]) && $args[0] == $user_id )\n break;\n elseif( !isset($args[0]) )\n $caps[] = 'do_not_allow';\n $other = new WP_User( absint($args[0]) );\n if( $other->has_cap( 'administrator' ) ){\n if(!current_user_can('administrator')){\n $caps[] = 'do_not_allow';\n }\n }\n break;\n case 'delete_user':\n case 'delete_users':\n if( !isset($args[0]) )\n break;\n $other = new WP_User( absint($args[0]) );\n if( $other->has_cap( 'administrator' ) ){\n if(!current_user_can('administrator')){\n $caps[] = 'do_not_allow';\n }\n }\n break;\n default:\n break;\n }\n return $caps;\n }", "function servicio_meta_cap( $caps, $cap, $user_id, $args ) {\n\tif ( 'edit_servicio' == $cap || 'delete_servicio' == $cap || 'read_servicio' == $cap ) {\n\t\t$post = get_post( $args[0] );\n\t\t$post_type = get_post_type_object( $post->post_type );\n\n\t\t/* Set an empty array for the caps. */\n\t\t$caps = array();\n\t}\n\n\t/* If editing a servicio, assign the required capability. */\n\tif ( 'edit_servicio' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->edit_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->edit_others_posts;\n\t}\n\n\t/* If deleting a servicio, assign the required capability. */\n\telseif ( 'delete_servicio' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->delete_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->delete_others_posts;\n\t}\n\n\t/* If reading a private servicio, assign the required capability. */\n\telseif ( 'read_servicio' == $cap ) {\n\n\t\tif ( 'private' != $post->post_status )\n\t\t\t$caps[] = 'read';\n\t\telseif ( $user_id == $post->post_author )\n\t\t\t$caps[] = 'read';\n\t\telse\n\t\t\t$caps[] = $post_type->cap->read_private_posts;\n\t}\n\n\t/* Return the capabilities required by the user. */\n\treturn $caps;\n}", "function _post_type_meta_capabilities($capabilities = \\null)\n {\n }", "public function map_meta_cap($caps, $cap, $user_id, $args)\n {\n switch ($cap) {\n case 'edit_user':\n case 'remove_user':\n case 'promote_user':\n if (isset($args[0]) && $args[0] == $user_id) {\n break;\n } elseif (!isset($args[0])) {\n $caps[] = 'do_not_allow';\n }\n\n $other = new WP_User(absint($args[0]));\n if ($other->has_cap('administrator')) {\n if (!current_user_can('administrator')) {\n $caps[] = 'do_not_allow';\n }\n }\n break;\n case 'delete_user':\n case 'delete_users':\n if (!isset($args[0])) {\n break;\n }\n\n $other = new WP_User(absint($args[0]));\n if ($other->has_cap('administrator')) {\n if (!current_user_can('administrator')) {\n $caps[] = 'do_not_allow';\n }\n }\n break;\n default:\n break;\n }\n return $caps;\n }", "function wck_add_meta(){\n\t\tparent::wck_add_meta();\n\t}", "function convocatoria_meta_cap( $caps, $cap, $user_id, $args ) {\n\tif ( 'edit_convocatoria' == $cap || 'delete_convocatoria' == $cap || 'read_convocatoria' == $cap ) {\n\t\t$post = get_post( $args[0] );\n\t\t$post_type = get_post_type_object( $post->post_type );\n\n\t\t/* Set an empty array for the caps. */\n\t\t$caps = array();\n\t}\n\n\t/* If editing a convocatoria, assign the required capability. */\n\tif ( 'edit_convocatoria' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->edit_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->edit_others_posts;\n\t}\n\n\t/* If deleting a convocatoria, assign the required capability. */\n\telseif ( 'delete_convocatoria' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->delete_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->delete_others_posts;\n\t}\n\n\t/* If reading a private convocatoria, assign the required capability. */\n\telseif ( 'read_convocatoria' == $cap ) {\n\n\t\tif ( 'private' != $post->post_status )\n\t\t\t$caps[] = 'read';\n\t\telseif ( $user_id == $post->post_author )\n\t\t\t$caps[] = 'read';\n\t\telse\n\t\t\t$caps[] = $post_type->cap->read_private_posts;\n\t}\n\n\t/* Return the capabilities required by the user. */\n\treturn $caps;\n}", "function banner_meta_cap( $caps, $cap, $user_id, $args ) {\n\tif ( 'edit_banner' == $cap || 'delete_banner' == $cap || 'read_banner' == $cap ) {\n\t\t$post = get_post( $args[0] );\n\t\t$post_type = get_post_type_object( $post->post_type );\n\n\t\t/* Set an empty array for the caps. */\n\t\t$caps = array();\n\t}\n\n\t/* If editing a banner, assign the required capability. */\n\tif ( 'edit_banner' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->edit_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->edit_others_posts;\n\t}\n\n\t/* If deleting a banner, assign the required capability. */\n\telseif ( 'delete_banner' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->delete_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->delete_others_posts;\n\t}\n\n\t/* If reading a private banner, assign the required capability. */\n\telseif ( 'read_banner' == $cap ) {\n\n\t\tif ( 'private' != $post->post_status )\n\t\t\t$caps[] = 'read';\n\t\telseif ( $user_id == $post->post_author )\n\t\t\t$caps[] = 'read';\n\t\telse\n\t\t\t$caps[] = $post_type->cap->read_private_posts;\n\t}\n\n\t/* Return the capabilities required by the user. */\n\treturn $caps;\n}", "function producto_meta_cap( $caps, $cap, $user_id, $args ) {\n\tif ( 'edit_producto' == $cap || 'delete_producto' == $cap || 'read_producto' == $cap ) {\n\t\t$post = get_post( $args[0] );\n\t\t$post_type = get_post_type_object( $post->post_type );\n\n\t\t/* Set an empty array for the caps. */\n\t\t$caps = array();\n\t}\n\n\t/* If editing a producto, assign the required capability. */\n\tif ( 'edit_producto' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->edit_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->edit_others_posts;\n\t}\n\n\t/* If deleting a producto, assign the required capability. */\n\telseif ( 'delete_producto' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->delete_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->delete_others_posts;\n\t}\n\n\t/* If reading a private producto, assign the required capability. */\n\telseif ( 'read_producto' == $cap ) {\n\n\t\tif ( 'private' != $post->post_status )\n\t\t\t$caps[] = 'read';\n\t\telseif ( $user_id == $post->post_author )\n\t\t\t$caps[] = 'read';\n\t\telse\n\t\t\t$caps[] = $post_type->cap->read_private_posts;\n\t}\n\n\t/* Return the capabilities required by the user. */\n\treturn $caps;\n}", "public function add_meta( &$object, $meta );", "function directorio_meta_cap( $caps, $cap, $user_id, $args ) {\n\tif ( 'edit_directorio' == $cap || 'delete_directorio' == $cap || 'read_directorio' == $cap ) {\n\t\t$post = get_post( $args[0] );\n\t\t$post_type = get_post_type_object( $post->post_type );\n\n\t\t/* Set an empty array for the caps. */\n\t\t$caps = array();\n\t}\n\n\t/* If editing a directorio, assign the required capability. */\n\tif ( 'edit_directorio' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->edit_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->edit_others_posts;\n\t}\n\n\t/* If deleting a directorio, assign the required capability. */\n\telseif ( 'delete_directorio' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->delete_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->delete_others_posts;\n\t}\n\n\t/* If reading a private directorio, assign the required capability. */\n\telseif ( 'read_directorio' == $cap ) {\n\n\t\tif ( 'private' != $post->post_status )\n\t\t\t$caps[] = 'read';\n\t\telseif ( $user_id == $post->post_author )\n\t\t\t$caps[] = 'read';\n\t\telse\n\t\t\t$caps[] = $post_type->cap->read_private_posts;\n\t}\n\n\t/* Return the capabilities required by the user. */\n\treturn $caps;\n}", "private static function map_capability($role, $role_info, $existing_cap, $new_cap) {\n if (isset($role_info['capabilities'][$new_cap])) {\n // Already has new cap…\n if (!self::has_capability($role_info, $existing_cap)) {\n // But shouldn't have it!\n $role->remove_cap($new_cap);\n }\n }\n else {\n // Doesn't have new cap…\n if (self::has_capability($role_info, $existing_cap)) {\n // But should have it!\n $role->add_cap($new_cap);\n }\n }\n }", "public function addMeta(Meta $meta) {\n $this->meta[$meta->getName()] = $meta;\n }", "public function add_meta( &$object, $meta ) {\n\t\t}", "protected function set_meta( $meta ) {\n\t\t$this->meta = wp_parse_args( $meta, $this->meta );\n\t}", "function documento_meta_cap( $caps, $cap, $user_id, $args ) {\n\tif ( 'edit_documento' == $cap || 'delete_documento' == $cap || 'read_documento' == $cap ) {\n\t\t$post = get_post( $args[0] );\n\t\t$post_type = get_post_type_object( $post->post_type );\n\n\t\t/* Set an empty array for the caps. */\n\t\t$caps = array();\n\t}\n\n\t/* If editing a documento, assign the required capability. */\n\tif ( 'edit_documento' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->edit_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->edit_others_posts;\n\t}\n\n\t/* If deleting a documento, assign the required capability. */\n\telseif ( 'delete_documento' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->delete_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->delete_others_posts;\n\t}\n\n\t/* If reading a private documento, assign the required capability. */\n\telseif ( 'read_documento' == $cap ) {\n\n\t\tif ( 'private' != $post->post_status )\n\t\t\t$caps[] = 'read';\n\t\telseif ( $user_id == $post->post_author )\n\t\t\t$caps[] = 'read';\n\t\telse\n\t\t\t$caps[] = $post_type->cap->read_private_posts;\n\t}\n\n\t/* Return the capabilities required by the user. */\n\treturn $caps;\n}", "protected function save_meta() {}", "public function add_meta( &$object, $meta ) {\n\t\t// TODO: Implement add_meta() method.\n\t}", "protected function add_VcMap($params, $name='', $shortcode='', $show_settings=true){\n\t\t// \t$name = str_replace($namespace. '\\\\','', get_class($this) );\n if(!$name) $name = 'Magiccart ' . ucfirst($this->_class);\n \tif(!$shortcode) $shortcode = 'magiccart_' . strtolower($this->_class);\n // $html_template = plugin_dir_path(__DIR__) . 'Magiccart/Composer/view/frontend/templates/vc_template.php';\n \t$this->_vcSetting = array(\n \t\t\t'name' => $name,\n \t\t\t'base' => $shortcode,\n \t\t\t'category' => __( 'Magiccart', 'alothemes' ),\n 'is_container' => false,\n \t\t\t'params'\t => $params,\n 'icon' => get_template_directory_uri() . \"/images/logo.png\",\n 'show_settings_on_create' => $show_settings,\n // 'html_template' => locate_template('templates/vc_row-header.php') ,\n\n \t);\n \n vc_map($this->_vcSetting);\n }", "function add_metadata($meta_type, $object_id, $meta_key, $meta_value, $unique = \\false)\n {\n }", "public static function set_meta($meta,$movabl_type,$movabl_guid) {\n global $mvs_db;\n\n $sanitized_meta = self::sanitize_data('meta',$meta);\n $sanitized_guid = $mvs_db->real_escape_string($movabl_guid);\n $sanitized_type = $mvs_db->real_escape_string($movabl_type);\n\n foreach ($sanitized_meta as $k => $v)\n Movabls_Data::data_query(\"REPLACE INTO `mvs_meta` (`movabls_GUID`,`movabls_type`,`key`,`value`) VALUES ('$sanitized_guid','$sanitized_type','$k','$v')\");\n\n \n return true;\n\n }", "public function setCAPMedico($cap) {\n $this->_CAP = $cap;\n }", "protected function addMeta() {\n foreach ($this->meta_info as $key => $meta) {\n $this->header.=\"<meta name='\" . $key . \"' content='\" . $meta . \"' /> \\n\";\n }\n }", "function mars_video_meta() {}", "function addMeta() {\n\t\n\tif( class_exists('acf') ) {\n\n\t$meta_description = get_field('meta_description', 'option');\n\t$meta_keywords = get_field('meta_keywords', 'option');\n\t$meta_author = get_field('meta_author', 'option');\n\t$meta_og_image = get_field('meta_og_img', 'option');\n\t$meta_img_full = $meta_og_image['url'];\n\n\t}\n\n\tif ( $meta_description ) {\n\t\techo '<meta name=\"description\" content=\"'.$meta_description.'\">'; \n\t}\n\n\tif ( $meta_keywords ) {\n\t\techo '<meta name=\"keywords\" content=\"'.$meta_keywords.'\">'; \n\t}\n\n\tif ( $meta_author ) {\n\t\techo '<meta name=\"author\" content=\"'.$meta_author.'\">'; \n\t}\n\n\tif ( $meta_og_image ) {\n\t\techo '<meta name=\"twitter:card\" content=\"summary\" />';\n\t\techo '<meta property=\"og:image\" content=\"'.$meta_img_full.'\" />';\n\t}\n\n}", "public function add_meta() {\n\t\techo \"\\n<meta data-plugin='a04_vertical_button' name='description' content='a sample meta description for this website'/>\\n\\n\";\n\t}" ]
[ "0.7113233", "0.68950325", "0.68331647", "0.6664682", "0.6118787", "0.6091864", "0.5811714", "0.58066976", "0.5763529", "0.56482375", "0.56384635", "0.55844116", "0.5581189", "0.55544406", "0.55460584", "0.5411758", "0.5384209", "0.5345685", "0.51998556", "0.5140477", "0.5113", "0.50718355", "0.5050998", "0.50498456", "0.50450104", "0.50308925", "0.5025702", "0.5025236", "0.50238335", "0.5016762" ]
0.7116632
0
Creates a demand object from settings
public function createFromSettings(array $settings) { /** @var ReservationDemand $demand */ $demand = $this->objectManager->get(static::DEMAND_CLASS); if ($demand instanceof PeriodAwareDemandInterface) { $this->setPeriodConstraints($demand, $settings); } $this->applySettings($demand, $settings); return $demand; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createDemandFromSettings ($settings) {\n\t\t/** @var PlaceDemand $demand */\n\t\t$demand = $this->objectManager->get('DWenzel\\\\Ajaxmap\\\\Domain\\\\Model\\\\Dto\\\\PlaceDemand');\n\t\tif (isset($settings['orderBy']) && isset($settings['orderDirection'])) {\n\t\t\t$demand->setOrder($settings['orderBy'] . '|' . $settings['orderDirection']);\n\t\t}\n\t\t(isset($settings['map']))? $demand->setMap($settings['map']) : NULL;\n\t\t(isset($settings['locationTypes'])) ? $demand->setLocationTypes($settings['locationTypes']) : NULL;\n\t\t(isset($settings['placeGroups'])) ? $demand->setPlaceGroups($settings['placeGroups']) : NULL;\n\t\tif(isset($settings['constraintsConjunction']) AND $settings['constraintsConjunction'] !== '') {\n\t\t\t$demand->setConstraintsConjunction($settings['constraintsConjunction']);\n\t\t}\n\t\tif(isset($settings['placeGroupConjunction']) AND $settings['placeGroupConjunction'] !== '') {\n\t\t\t$demand->setPlaceGroupConjunction($settings['placeGroupConjunction']);\n\t\t}\n\t\t(isset($settings['limit'])) ? $demand->setLimit($settings['limit']) : NULL;\n\t\treturn $demand;\n\t}", "public function createDemandFromSettings($settings) {\n\t\t$demand = $this->objectManager->get('Webfox\\\\Placements\\\\Domain\\\\Model\\\\Dto\\\\OrganizationDemand');\n\t\t$settableProperties = \\TYPO3\\CMS\\Extbase\\Reflection\\ObjectAccess::getSettablePropertyNames($demand);\n\t\tforeach($settableProperties as $property) {\n\t\t\tif (isset($settings[$property])) {\n\t\t\t\t\\TYPO3\\CMS\\Extbase\\Reflection\\ObjectAccess::setProperty(\n\t\t\t\t\t$demand,\n\t\t\t\t\t$property,\n\t\t\t\t\t$settings[$property]);\n\t\t\t}\n\t\t}\n\t\tif(isset($settings['clientsOrganizationsOnly'])) {\n\t\t\t// we set clientOrganizationsOnly directly since Reflection ObjectAccess seem to miss boolean values (TRUE is cast to 1?)\n\t\t\t$demand->setClientsOrganizationsOnly($settings['clientsOrganizationsOnly']);\n\t\t\tif($this->accessControlService->hasLoggedInClient()) {\n\t\t\t\t$clientId = $this->accessControlService->getFrontendUser()\n\t\t\t\t\t\t\t\t\t\t->getClient()->getUid();\n\t\t\t\t$demand->setClients((string)$clientId);\n\t\t\t} else {\n\t\t\t\t$demand->setClients('');\n\t\t\t}\n\t\t}\n\t\t// @todo implement OrderDemand to get rid of this string juggling\n\t\tif((isset($settings['orderBy'])) AND (isset($settings['orderDirection']))) {\n\t\t\t$demand->setOrder($settings['orderBy'] . '|' . $settings['orderDirection']);\n\t\t}\n\t\treturn $demand;\n\t}", "public function createFromSettings(array $settings);", "function create_object_settings() {\n if (!isset($this->settings)) {\n require_once($this->addon->dir . 'include/class.widget.settings.php');\n $this->settings = new SLPWidget_Legacy_Settings( array( 'addon' => $this->addon ) );\n }\n }", "public function __construct($settings='') \n\t{\t\n\t\t$this->settings = $this->_settings(); \n\t}", "public function __construct()\n {\n $this->settings = new Settings();\n }", "public function __construct()\n {\n $this->settings = new Settings();\n }", "public function __construct()\n {\n $this->settings = new Settings();\n }", "public static function Create() {\n\t\t$s = new WP_United_Settings();\n\t\tif(!$s->load_from_wp()) {\n\t\t\treturn($s->load_from_phpbb());\n\t\t}\n\t\treturn $s;\n\t}", "public function instantiate($task);", "public function __construct()\n {\n $this->setting = new Setting();\n }", "public function __construct()\n {\n $this->branche = new Settings();\n }", "static public function factory($config) {}", "public function __construct( array $settings ) {\n\t\t$this->settings = $settings;\n\t}", "public function __construct(array $settings = array())\n {\n }", "public function run()\n { \n factory(Deputy::class, 25)->create();\n }", "public function run()\n {\n PraticalInfos::factory(1)->create();\n }", "public function initialize() {\r\n\t\tparent::initialize();\r\n\t\t$this->settings = $this->pluginSettingsDemandService->getSettings();\r\n\t}", "function __construct($settings = array()){\n\t\t$config = Configure::read('Bitly');\n\t\tif (empty($config)) {\n\t\t\t$config = array();\n\t\t}\n\n\t\t$this->_set($config);\n\t\t$this->_set($settings);\n\t}", "public function __construct(array $settings) {\n $this->settings = $settings;\n }", "public function run()\n {\n prodecyt::factory(50)->create();\n }", "private function prepare(){\r\n \r\n $autoload = &$this->settings->autoload; \r\n \r\n if(isset($autoload)){\r\n \r\n foreach($autoload AS $key => $class){\r\n \r\n $settings = &$this->settings->{$key};\r\n \r\n if(isset($settings)){\r\n\r\n $this->{$key} = new $class($settings);\r\n }\r\n }\r\n }\r\n }", "public function __construct( $settings ) {\n\t\t$this->settings = (array) $settings;\n\t}", "public function createSetting(): Setting\n {\n return Setting::create('cache://double-backup');\n }", "static public function factory($config)\n\t{\n\t\t$config = self::_parseConfig($config);\n\t\t$config = array_merge(array(\n 'stream' => null,\n 'mode' => null,\n 'timestamp' => 'Y-m-d',\n\t\t), $config);\n\n\t\tif(is_string($config['stream'])) {\n\t\t\t$config['stream'] = str_replace('%timestamp%', date($config['timestamp']), $config['stream']);\n\t\t}\n\t\t$streamOrUrl = isset($config['url']) ? $config['url'] : $config['stream'];\n\n\t\treturn new self(\n\t\t$streamOrUrl,\n\t\t$config['mode']\n\t\t);\n\t}", "public static function factory()\n {\n $class = get_called_class();\n $object = new $class();\n foreach (static::getDefaults() as $field => $value) {\n $object->{$field} = $value;\n }\n return $object;\n }", "private function __construct() {\r\n\t\t// proc will grab a different column of settings values.\r\n\t\t$testing = (int) $this->config()->testing;\r\n\t\t\r\n\t\t$sql = \"CALL settings_get($testing)\";\r\n $rs = $this->query($sql);\r\n \r\n if ($this->hasError()) {\r\n error_log($this->getError());\r\n $this->error = \"Unable to load settings\";\r\n }\r\n \r\n if ($rs->hasRecords()) {\r\n\t\t\twhile ($row = $rs->fetchArray()) {\r\n\t\t\t\t$this->{$row['label']} = $row['value'];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Handle secure cookies\r\n\t\t\tif (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']) {\r\n\t\t\t\t$this->cookiesecure = 1;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function __construct() {\n $this->settings = craft()->plugins->getPlugin('Mobi2Go')->getSettings();\n }", "protected function _make_preview_settings ($obj)\n {\n return new SHIP_RELEASE_PREVIEW_SETTINGS ($this);\n }", "public final function make(): void\n {\n if (!$this->config) {\n parent::__construct([\n 'description' => $this->description ?: $this->description(),\n 'values' => $this->values ?: $this->values()\n ]);\n $this->setInstance($this);\n }\n }" ]
[ "0.7201751", "0.7110685", "0.6074803", "0.5508471", "0.53642505", "0.535256", "0.535256", "0.535256", "0.5309225", "0.5165147", "0.5156386", "0.5149077", "0.5134196", "0.5104301", "0.5065539", "0.50389946", "0.50341195", "0.502032", "0.49730998", "0.49667892", "0.4958916", "0.4929555", "0.49272177", "0.49185604", "0.49090183", "0.48914078", "0.48839906", "0.48698458", "0.48537064", "0.48432952" ]
0.714715
1
TODO: Implement deleteStatement() method.
public function deleteStatement() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract function getDeleteStatement();", "public function walkDeleteStatement(AST\\DeleteStatement $deleteStatement): void;", "public function testDeleteStmt()\n {\n $delete = $this->getConnection()\n ->delete()\n ('dummy_posts')\n ('blog_id = :id');\n return $this->assertEquals($delete, \"DELETE FROM dummy_posts WHERE blog_id = :id\");\n }", "public function delete()\n {\n $this->execute(\n $this->syntax->deleteSyntax(get_object_vars($this))\n );\n }", "abstract protected function platformDeleteStatement($table);", "public function delete()\r\n {\r\n $this->sql = 'DELETE FROM ' . $this->table .' '.$this->alias. ' '. $this->sql;\r\n $query = R::exec($this->sql, $this->params);\r\n $this->sql = null;\r\n $this->params = [];\r\n return $query;\r\n }", "public function delete() {\n\n\t\t// Database\n\t\t$db = $this->db;\n\n\t\t// SQL code for deletion\n\t\t$sql = $this->sql_for_delete();\n\n\t\t// Deletion execution\n\t\treturn $db::execute($sql);\n\t}", "public function __doDelete()\n {\n $strSQL = $this->getDeleteSql();\n $result = $this->query($strSQL);\n }", "public function delete() {\n\t\t$dbh = App::getDatabase()->connect();\n\n\t\t$query = \"DELETE FROM \".$this->getTableName();\n\n\t\t$fl = true;\n\t\tforeach($this as $column => $val) {\n\t\t\tif(in_array($column, $this->getPrimaries())) {\n\t\t\t\t$query .= \"\\n\".(($fl) ? \"WHERE\" : \"AND\").\" \".$column.\" = '\".$val.\"'\";\n\t\t\t\t$fl = false;\n\t\t\t}\n\t\t}\n\n\t\t$res = $dbh->exec($query);\n\t\t$dbh = null;\n\t\treturn $res;\n\t}", "public function delete($records = '')/*# : DeleteStatementInterface */;", "function is_delete_statement()\n {\n return $this->object->_delete_clause ? TRUE : FALSE;\n }", "public function sql_for_delete() {\n\t\t// Check if model is writable\n\t\t$this->assertModelIsWritable();\n\n\t\t// Destination model\n\t\t$model = $this->model;\n\n\t\t// Cascade deletion calculation for model $model\n\t\tforeach ($model::metaGetRelationships() as $relationshipName => $relationship) {\n\t\t\t// Nexii tuples and children tuple deletion\n\t\t\tif (\n\t\t\t\t($relationship[\"type\"] == \"OneToMany\" or $relationship[\"type\"] == \"ManyToMany\") and\n\t\t\t\tisset($relationship[\"on_master_deletion\"]) and\n\t\t\t\t$relationship[\"on_master_deletion\"] == \"delete\"\n\t\t\t) {\n\t\t\t\t$this->addRelatedModel($relationshipName);\n\t\t\t}\n\t\t}\n\n\t\t// SQL code generation\n\t\t$sqlT = \\lulo\\twig\\TwigTemplate::factoryHtmlResource(\\lulo\\query\\Query::PATH . \"/delete/query.twig.sql\");\n\t\t$sql = $sqlT->render([\"query\" => $this]);\n\n\t\t// Return DELETE statement SQL code\n\t\treturn $sql;\n\t}", "public function testDeleteFinancialStatementUsingDelete()\n {\n }", "public function delete()\n\t{\n\t\t$sql = $this->grammar->delete($this);\n\n\t\treturn $this->connection->query($sql, $this->bindings, $this->options);\n\t}", "public function delete(){\n if (isset($this->content[$this->idField])) {\n\n $sql = \"DELETE FROM {$this->table} WHERE {$this->idField} = {$this->content[$this->idField]};\";\n $delet = new \\AR\\BD\\Delete();\n $delet->ExeDelete($this->table, \"WHERE {$this->idField} = {$this->content[$this->idField]}\", \"\");\n \n }\n }", "function getDeleteStatement($model,&$args);", "function delete($table, $clause) {\t\t\r\n\t\treturn $this->query(\"delete from $table where $clause\");\r\n\t}", "function delete()\n\t{\n\t\tSQL::query(\"delete from {$this->_table} where id = {$this->_data['id']}\");\n\t}", "public function delete()\n {\n $class = strtolower(get_called_class());\n $table = self::$_table_name != null ? self::$_table_name : $class . 's';\n\n $pdo = PDOS::getInstance();\n\n $whereClause = '';\n foreach (static::$_primary_keys as $pk)\n $whereClause .= $pk . ' = :' . $pk . ' AND ';\n $whereClause = substr($whereClause, 0, -4);\n $sql = 'DELETE FROM ' . $table . ' WHERE ' . $whereClause;\n $query = $pdo->prepare($sql);\n $attributes = $this->getAttributes(new \\ReflectionClass($this));\n foreach ($attributes as $k => $v)\n {\n if (in_array($k, static::$_primary_keys))\n $query->bindValue(':' . $k, $v);\n }\n $query->execute();\n }", "protected function RetDelete() {\n\n if (!isset($this->\n tables[0])) {\n\n throw new \\Exception(\"Error: Table not properly provided in QueryHelper.\");\n }\n\n $return = \"DELETE FROM `{$this->\n tables[0]}`\";\n\n if (count($this->\n where)) {\n\n $return .= $this->\n WhereClause($this->\n where);\n }\n\n return $return . \";\";\n }", "public function testDelete()\n {\n // test data\n $this->fixture->query('INSERT INTO <http://example.com/> {\n <http://s> <http://p1> \"baz\" .\n <http://s> <http://xmlns.com/foaf/0.1/name> \"label1\" .\n }');\n\n $res = $this->fixture->query('SELECT * WHERE {?s ?p ?o.}');\n $this->assertEquals(2, \\count($res['result']['rows']));\n\n // remove graph\n $this->fixture->delete(false, 'http://example.com/');\n\n $res = $this->fixture->query('SELECT * WHERE {?s ?p ?o.}');\n $this->assertEquals(0, \\count($res['result']['rows']));\n }", "abstract public function delete();", "abstract public function delete();", "abstract public function delete();", "abstract public function delete();", "public function testWriteDeleteQuery()\n\t{\n\t\t$queryWriter = R::getWriter();\n\t\tasrt( ( $queryWriter instanceof SQLiteT ), TRUE );\n\t\tR::nuke();\n\t\t$bean = R::dispense( 'bean' );\n\t\t$bean->name = 'a';\n\t\t$id = R::store( $bean );\n\t\tasrt( R::count( 'bean' ), 1 );\n\t\t$queryWriter->deleteRecord( 'bean', array(), $addSql = ' id = :id ', $bindings = array( ':id' => $id ) );\n\t\tasrt( R::count( 'bean' ), 0 );\n\t}", "function delete () {\n\t\t$stm = DB::$pdo->prepare(\"delete from `generated_object` where `id`=:id\");\n\t\t$stm->bindParam(':id', $this->id);\n\t\t$stm->execute();\n\t}", "public function delete() {}", "public function delete() {}", "public function delete() {}" ]
[ "0.8400239", "0.70125234", "0.6945524", "0.6887968", "0.6805836", "0.67936546", "0.6769431", "0.67364323", "0.66977626", "0.66763014", "0.6607683", "0.6605072", "0.65323144", "0.65315753", "0.64970666", "0.6473081", "0.64414334", "0.6420754", "0.64002836", "0.63570464", "0.63160414", "0.6283418", "0.6283418", "0.6283418", "0.6283418", "0.62548846", "0.6253139", "0.62503386", "0.62503386", "0.6250314" ]
0.8804365
0
Parse transaction redirect success URL
public function validateSuccessURL() { return $this->validateResultURL(self::SUCCESS_STATUS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSuccessUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "protected function getSuccessLocation() {\n\t\treturn $_SERVER['HTTP_REFERER'];\n\t}", "public function getRedirectUrl()\r\n\t{\r\n\t\treturn $this->payment->links[1]->getHref();\r\n\t}", "public function getRedirectUrl(): string;", "private function parseURLRequest() {\n\t\t# Redirects the user upon success and redirects to following error-messages upon errors:\n\t\t# 201 - Missing url-entry for the given ID\n\n\t\t$this->parseCustomURL();\t# Let's see if there's an custom-url we gotten our hands on\n\n\t\t$urlID = $this->baseToInt($_GET['u']);\n\t\t$this->verifyID($urlID);\n\n\t\t# assuming everything's good, moving on.\n\t\t\n\t\t$query = $this->db->prepare(\"SELECT `url` FROM urls WHERE `id` = :id\");\n\t\t$query->bindParam(\":id\", $urlID);\n\t\t$query->execute();\n\t\t\n\t\t$data = $query->fetch();\n\t\t\n\t\tif(!isset($data['url'])) {\n\t\t\t$this->debugLog(\"The database did not return any URL for ID {$_GET['u']}\");\n\t\t\theader(\"Location:{$this->siteURL}error/201\");\n\t\t\tdie;\n\t\t}\n\t\telse {\n\t\t\t$this->debugLog(\"Redirecting to {$data['url']}\");\n\t\t\t$this->logUrlClick($urlID);\n\t\t\theader(\"HTTP/1.1 301 Moved Permanently\");\n\t\t\theader(\"Location: {$data['url']}\"); # Should we use URL-encode here?\n\t\t\tdie;\n\t\t}\n\t}", "public function getRedirectUrl()\n {\n }", "public function GetRedirect ();", "public function getRedirectUrl()\n {\n return $this->request->getTestMode()\n ? 'https://sslpayment.cathaybkdev.com.tw/EPOSService/Payment/OrderInitial.aspx'\n : 'https://sslpayment.uwccb.com.tw/EPOSService/Payment/OrderInitial.aspx';\n }", "private function getDefaultSuccessPageUrl()\n {\n\t\tif(\\Cart2Quote\\License\\Model\\License::getInstance()->isValid()) {\n\t\t\treturn $this->urlBuilder->getUrl('quotation/quote/success/');\n\t\t}\n\t}", "public function RedirectURL(){\n //echo Director::baseURL();exit(); \n return urlencode(Director::baseURL().$this->request->getURL(true));\n }", "function _url_final_redirect( $url ) {\n\t\treturn IMFORZA_Utils::url_final_redirect( $url );\n\t}", "protected function getRedirectUrl()\n {\n $sBaseUrl = Registry::getConfig()->getCurrentShopUrl().'index.php?cl=order&fnc=handleMollieReturn';\n\n return $sBaseUrl.$this->mollieGetAdditionalParameters();\n }", "public function getRedirectUri();", "public function getRedirectUri();", "abstract protected function getRedirectUrl(): Url;", "public function getRedirectUri(): string;", "public static function get_redirect_on_success($values, $args) {\n\n if (!empty($values['next-zone']) && !empty($values['next-transect']))\n return $args['redirect_on_success'] . '?' . data_entry_helper::array_to_query_string(array(\n 'table' => 'sample',\n 'id'=>$values['sample:parent_id'],\n 'zone'=>$values['next-zone'],\n 'transect'=>$values['next-transect']\n ));\n else\n return $args['front_page_path'];\n }", "protected function processRedirect() {}", "protected function defaultSuccessUrl()\n {\n return $this->user->getReturnUrl();\n }", "function getRedirectUrl()\r\n\t{\r\n\t\treturn $this->redirect_url;\r\n\t}", "public function getRedirectUrl()\r\n {\r\n return \"{$this->data['redirect_url']}?session={$this->data['session']}\";\r\n }", "abstract protected function get_redirect_page();", "function get_final_url($url){\n\t\t$redirects = get_all_redirects($url);\n\t\tif (count($redirects)>0){\n\t\t\treturn array_pop($redirects);\n\t\t} else {\n\t\t\treturn $url;\n\t\t}\n\t}", "public function getOrderPlaceRedirectUrl()\n {\n return Mage::getUrl('postfinancecheckout/transaction/redirect', array(\n '_secure' => true\n ));\n }", "function RedirectLoanprofileurl() {\n\t$RequestUrl = $_SERVER['REQUEST_URI'];\n\t$parsedurl = parse_url($RequestUrl);\n\tif(isset($parsedurl['query'])) {\n\t\tparse_str($parsedurl['query'], $qryStr); \n\t\tif(isset($qryStr['p']) && $qryStr['p']==14 && isset($qryStr['u']) && isset($qryStr['l'])) {\n\t\t\t$loanprurl = getLoanprofileUrl($qryStr['u'], $qryStr['l']);\n\t\t\tunset($qryStr['p']);\n\t\t\tunset($qryStr['u']);\n\t\t\tunset($qryStr['l']);\n\t\t\t$qrystrToAppnd = http_build_query($qryStr);\n\t\t\tif(!empty($qrystrToAppnd)) {\n\t\t\t\t$urlMovedto = SITE_URL.$loanprurl.\"?\".$qrystrToAppnd;\n\t\t\t}else {\n\t\t\t\t$urlMovedto = SITE_URL.$loanprurl;\n\t\t\t}\n\t\t\theader(\"HTTP/1.1 301 Moved Permanently\");\n\t\t\theader(\"Location: \".$urlMovedto);\n\t\t\texit;\n\t\t}\n\t}\n}" ]
[ "0.71170336", "0.629864", "0.629864", "0.629864", "0.629864", "0.629864", "0.62781817", "0.62279457", "0.6156074", "0.61440563", "0.6119394", "0.6098481", "0.6061107", "0.60521966", "0.6027535", "0.5992193", "0.5902258", "0.5846273", "0.5846273", "0.5832094", "0.58214056", "0.58078057", "0.5790543", "0.57784694", "0.5722629", "0.57217914", "0.5717368", "0.57041806", "0.57040423", "0.5685133" ]
0.66811
1
Parse transaction redirect failed URL
public function validateFailedURL() { return $this->validateResultURL(self::FAILED_STATUS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function parseURLRequest() {\n\t\t# Redirects the user upon success and redirects to following error-messages upon errors:\n\t\t# 201 - Missing url-entry for the given ID\n\n\t\t$this->parseCustomURL();\t# Let's see if there's an custom-url we gotten our hands on\n\n\t\t$urlID = $this->baseToInt($_GET['u']);\n\t\t$this->verifyID($urlID);\n\n\t\t# assuming everything's good, moving on.\n\t\t\n\t\t$query = $this->db->prepare(\"SELECT `url` FROM urls WHERE `id` = :id\");\n\t\t$query->bindParam(\":id\", $urlID);\n\t\t$query->execute();\n\t\t\n\t\t$data = $query->fetch();\n\t\t\n\t\tif(!isset($data['url'])) {\n\t\t\t$this->debugLog(\"The database did not return any URL for ID {$_GET['u']}\");\n\t\t\theader(\"Location:{$this->siteURL}error/201\");\n\t\t\tdie;\n\t\t}\n\t\telse {\n\t\t\t$this->debugLog(\"Redirecting to {$data['url']}\");\n\t\t\t$this->logUrlClick($urlID);\n\t\t\theader(\"HTTP/1.1 301 Moved Permanently\");\n\t\t\theader(\"Location: {$data['url']}\"); # Should we use URL-encode here?\n\t\t\tdie;\n\t\t}\n\t}", "public function getFailureUrl();", "function get_final_url($url){\n\t\t$redirects = get_all_redirects($url);\n\t\tif (count($redirects)>0){\n\t\t\treturn array_pop($redirects);\n\t\t} else {\n\t\t\treturn $url;\n\t\t}\n\t}", "function get_final_url($url){\n\t$redirects = get_all_redirects($url);\n\tif (count($redirects)>0){\n\t\treturn array_pop($redirects);\n\t} else {\n\t\treturn $url;\n\t}\n}", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "function get_url_redirected($url)\n{\n $url_list = array();\n $url_list[] = $url;\n\n $ch = curl_init();\n if (false === $ch) {\n curl_close($ch);\n throw new Exception(\"Bad request url in get_url: $url\", 1);\n }\n\n for ($redirects = 0; follow_redirects($ch, $url_list); ++$redirects) {}\n $url = end($url_list);\n\n curl_close($ch);\n\n return $url;\n}", "public function getRedirectUrl()\n {\n }", "abstract protected function getRedirectUrl(): Url;", "static function get_final_url($url)\n\t\t{\n\t\t\t$redirects = CUtils::get_all_redirects($url);\n\t\t\tif (count($redirects)>0)\n\t\t\t{\n\t\t\t\treturn array_pop($redirects);\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\treturn $url;\n\t\t\t}\n\t\t}", "public function getRedirectUrl()\r\n\t{\r\n\t\treturn $this->payment->links[1]->getHref();\r\n\t}", "public function getSuccessUrl();", "public function getRedirectUrl(): string;", "function my_give_change_failed_transaction_uri( $uri ) {\n\n\t$form_id = isset( $_POST['give-form-id'] ) ? $_POST['give-form-id'] : '';\n\n\tif ( $form_id == 650 ) {\n\t\t//Return a custom permalink or URL.\n\t\treturn get_permalink( 123 );\n\t} else {\n\t\t//Always return default $uri.\n\t\treturn $uri;\n\t}\n\n}", "protected function processRedirect() {}", "function _url_final_redirect( $url ) {\n\t\treturn IMFORZA_Utils::url_final_redirect( $url );\n\t}", "public function error301($redirectURI)\n {\n }", "public function validateRedirectUrlClearsInvalidUrlInSubdirectoryDataProvider() {}", "public function validateSuccessURL() {\r\n return $this->validateResultURL(self::SUCCESS_STATUS);\r\n }", "public function validateRedirectUrlKeepsCleanUrlDataProvider() {}", "public function getRedirectUrl()\n {\n\n if ($brandCode = $this->getBrandCode()) {\n return 'https://test.adyen.com/hpp/skipDetails.shtml';\n } else {\n return 'https://test.adyen.com/hpp/pay.shtml';\n }\n }", "protected function getRedirectUrl()\n {\n $sBaseUrl = Registry::getConfig()->getCurrentShopUrl().'index.php?cl=order&fnc=handleMollieReturn';\n\n return $sBaseUrl.$this->mollieGetAdditionalParameters();\n }", "public function getRedirectUrl()\n {\n return $this->request->getTestMode()\n ? 'https://sslpayment.cathaybkdev.com.tw/EPOSService/Payment/OrderInitial.aspx'\n : 'https://sslpayment.uwccb.com.tw/EPOSService/Payment/OrderInitial.aspx';\n }", "protected function checkRedirect() {}", "protected function getRedirectUrl()\n {\n return null;\n }", "public function badRedirectProvider() {\n $badUrls = $this->badUrlProvider();\n $badRedirects = array();\n foreach($badUrls as $name => $badUrl) {\n $urlParts = parse_url(array_shift($badUrl));\n unset($urlParts['scheme']);\n\n // The redir.xpoc.pro tool is provided by sp1d3R in the HackerOne Bug Bounty program\n // If it goes away, we'll need some other way to easily generate a redirect to an internal URL\n $badRedirects[$name] = array(\"http://redir.xpoc.pro/\".implode($urlParts), array_shift($badUrl));\n }\n return $badRedirects;\n }", "public function GetRedirect ();" ]
[ "0.64620984", "0.6188506", "0.6073079", "0.60307777", "0.5978192", "0.5978192", "0.5978192", "0.5978192", "0.5978192", "0.59565467", "0.5854566", "0.5853595", "0.58483976", "0.58380926", "0.5820106", "0.58071005", "0.5725522", "0.56887007", "0.56564033", "0.563576", "0.55991673", "0.558122", "0.5573659", "0.557292", "0.55594635", "0.5549341", "0.55404615", "0.5536296", "0.5533961", "0.5525435" ]
0.62009406
1
Parse transaction redirect canceled URL
public function validateCanceledURL() { return $this->validateResultURL(self::CANCELED_STATUS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRedirectUrl(): string;", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "public function getRedirectUrl();", "protected function getRedirectUrl()\n {\n return null;\n }", "public function cancelUrl(): string\n {\n return Request::url() . '?' . http_build_query([\n 'return' => 'cancel',\n 'oc-mall_payment_id' => $this->getPaymentId(),\n ]);\n }", "public function getOrderPlaceRedirectUrl()\n {\n return Mage::getUrl('postfinancecheckout/transaction/redirect', array(\n '_secure' => true\n ));\n }", "public function getRedirectUrl()\n {\n }", "private function parseURLRequest() {\n\t\t# Redirects the user upon success and redirects to following error-messages upon errors:\n\t\t# 201 - Missing url-entry for the given ID\n\n\t\t$this->parseCustomURL();\t# Let's see if there's an custom-url we gotten our hands on\n\n\t\t$urlID = $this->baseToInt($_GET['u']);\n\t\t$this->verifyID($urlID);\n\n\t\t# assuming everything's good, moving on.\n\t\t\n\t\t$query = $this->db->prepare(\"SELECT `url` FROM urls WHERE `id` = :id\");\n\t\t$query->bindParam(\":id\", $urlID);\n\t\t$query->execute();\n\t\t\n\t\t$data = $query->fetch();\n\t\t\n\t\tif(!isset($data['url'])) {\n\t\t\t$this->debugLog(\"The database did not return any URL for ID {$_GET['u']}\");\n\t\t\theader(\"Location:{$this->siteURL}error/201\");\n\t\t\tdie;\n\t\t}\n\t\telse {\n\t\t\t$this->debugLog(\"Redirecting to {$data['url']}\");\n\t\t\t$this->logUrlClick($urlID);\n\t\t\theader(\"HTTP/1.1 301 Moved Permanently\");\n\t\t\theader(\"Location: {$data['url']}\"); # Should we use URL-encode here?\n\t\t\tdie;\n\t\t}\n\t}", "public function getRedirectUrl()\r\n\t{\r\n\t\treturn $this->payment->links[1]->getHref();\r\n\t}", "public function GetRedirect ();", "public function getRedirectUri(): string;", "protected function processRedirect() {}", "public function getOrderPlaceRedirectUrl()\n {\n return Mage::getUrl('pagseguro/payment/request');\n }", "public function getCancelUrl() {\n return $this->getReturnUrl();\n }", "public function validateRedirectUrlClearsUrlDataProvider() {}", "abstract protected function getRedirectUrl(): Url;", "public function getOrderPlaceRedirectUrl()\n\t{\n return Mage::getUrl('hostedpayments/processing/pay');\n\t}", "public function getRedirectUri();", "public function getRedirectUri();", "public function getRedirectUrl()\n {\n return $this->request->getTestMode()\n ? 'https://sslpayment.cathaybkdev.com.tw/EPOSService/Payment/OrderInitial.aspx'\n : 'https://sslpayment.uwccb.com.tw/EPOSService/Payment/OrderInitial.aspx';\n }", "public function validateRedirectUrlKeepsCleanUrlDataProvider() {}", "public function getCheckoutRedirectUrl()\n {\n return Mage::getUrl('radial_paypal_express/checkout/start');\n }", "public function getRedirectUrl() : string\n {\n return '';\n }", "protected function getRedirectUrl()\n {\n $sBaseUrl = Registry::getConfig()->getCurrentShopUrl().'index.php?cl=order&fnc=handleMollieReturn';\n\n return $sBaseUrl.$this->mollieGetAdditionalParameters();\n }", "public function getSuccessUrl();", "public function get_cancel_url() {\n\t\t$cancel_url = add_query_arg(\n\t\t\tarray(\n\t\t\t\t'subscription' => $this->get_id(),\n\t\t\t\t'key' => $this->get_key(),\n\t\t\t\t'action' => 'cancel',\n\t\t\t), home_url()\n\t\t);\n\n\t\treturn $cancel_url;\n\t}", "function _url_final_redirect( $url ) {\n\t\treturn IMFORZA_Utils::url_final_redirect( $url );\n\t}" ]
[ "0.58109176", "0.57798684", "0.57798684", "0.57798684", "0.57798684", "0.57798684", "0.5774087", "0.5745655", "0.5706383", "0.5702832", "0.57019633", "0.5668898", "0.5656144", "0.5628209", "0.56242675", "0.55989325", "0.5575704", "0.5551249", "0.5544042", "0.55298066", "0.5517218", "0.5517218", "0.55085176", "0.54918915", "0.5473211", "0.54599017", "0.5459258", "0.5454514", "0.5429531", "0.5426696" ]
0.6333161
0
bridges Get form bridge instance for ADT
public function getFormBridgeForInstance(ilADT $a_adt) { $class = $this->initTypeClass($a_adt->getType(), "FormBridge"); return new $class($a_adt); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _getBridge() {}", "private function get_bridge()\n\t{\n\t\treturn $this->m_bridge;\n\t}", "function getBridgeModel() {\n return $this->bridgeModel;\n }", "public function getDBBridgeForInstance(ilADT $a_adt)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_adt->getType(), \"DBBridge\");\t\t\r\n\t\treturn new $class($a_adt);\t\r\n\t}", "public function getActiveRecordBridgeForInstance(ilADT $a_adt)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_adt->getType(), \"ActiveRecordBridge\");\t\t\r\n\t\treturn new $class($a_adt);\r\n\t}", "public function getPresentationBridgeForInstance(ilADT $a_adt)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_adt->getType(), \"PresentationBridge\");\t\t\r\n\t\treturn new $class($a_adt);\t\r\n\t}", "abstract function getForm();", "abstract protected function getForm();", "function getBridgeGateway() {\n return $this->bridgeGateway;\n }", "abstract public function getForm() : void;", "abstract public function get_gateway_form_fields();", "function getBridgeName() {\n return $this->bridgeName;\n }", "public function getBp($bp=null)\n {\n if ($bp != null && is_array($this->entity) && count($this->entity)!=0) {\n $table_name = strtolower(get_class($this));\n $query = \"SELECT * FROM $table_name WHERE bp = ?\";\n $req = Manager::bdd()->prepare($query);\n $req->execute([$bp]);\n $data = \"\";\n if ($data = $req->fetchAll(PDO::FETCH_ASSOC)) {\n$d=$data[0];\n$this->setId_entity($d['id_entity']);\n$this->setLabel($d['label']);\n$this->setDomaine($d['domaine']);\n$this->setEmail($d['email']);\n$this->setPhone_number($d['phone_number']);\n$this->setBp($d['bp']);\n$this->setLocalisation($d['localisation']);\n$this->setVille($d['ville']);\n$this->setUniqueId($d['uniqueId']);\n$this->setCreated_at($d['created_at']);\n$this->setCreated_by($d['created_by']);\n$this->setUpdate_at($d['update_at']);\n$this->setUpdate_by($d['update_by']);\n$this->entity =$data; \n return $this;\n }\n \n } else {\n return $this->bp;\n }\n \n }", "public function getForm();", "function getBridgeDhcp() {\n return $this->bridgeDhcp;\n }", "public function getForm(): FormInterface;", "abstract public function get_instance();", "public function getFormInObject()\n {\n $sExKey = null;\n\n if ($this->_iIdEntity > 0 && $this->_sSynchronizeEntity !== null && count($_POST) < 1) {\n\n $sModelName = str_replace('Entity', 'Model', $this->_sSynchronizeEntity);\n $oModel = new $sModelName;\n\n $oEntity = new $this->_sSynchronizeEntity;\n $sPrimaryKey = LibEntity::getPrimaryKeyNameWithoutMapping($oEntity);\n $sMethodName = 'findOneBy'.$sPrimaryKey;\n $oCompleteEntity = call_user_func_array(array(&$oModel, $sMethodName), array($this->_iIdEntity));\n\n if (is_object($oCompleteEntity)) {\n\n foreach ($this->_aElement as $sKey => $sValue) {\n\n\t\t\t\t\tif ($sValue instanceof \\Venus\\lib\\Form\\Input && $sValue->getType() == 'submit') {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n if ($sValue instanceof \\Venus\\lib\\Form\\Radio) {\n\n $sExKey = $sKey;\n $sKey = substr($sKey, 0, -6);\n }\n\n if ($sValue instanceof Form) {\n\n ;\n } else {\n\n $sMethodNameInEntity = 'get_'.$sKey;\n\t\t\t\t\t\tif (method_exists($oCompleteEntity, $sMethodNameInEntity)) {\n\t\t\t\t\t\t\t$mValue = $oCompleteEntity->$sMethodNameInEntity();\n\t\t\t\t\t\t}\n\n if ($sValue instanceof \\Venus\\lib\\Form\\Radio && method_exists($this->_aElement[$sExKey], 'setValueChecked')) {\n\n $this->_aElement[$sExKey]->setValueChecked($mValue);\n } else if (isset($mValue) && method_exists($this->_aElement[$sKey], 'setValue')) {\n\n $this->_aElement[$sKey]->setValue($mValue);\n }\n }\n }\n }\n }\n\n $oForm = new \\StdClass();\n $oForm->start = '<form name=\"form'.$this->_iFormNumber.'\" method=\"post\" enctype=\"multipart/form-data\"><input type=\"hidden\" value=\"1\" name=\"validform'.$this->_iFormNumber.'\">';\n $oForm->form = array();\n\n foreach ($this->_aElement as $sKey => $sValue) {\n\n if ($sValue instanceof Container) {\n\n $oForm->form[$sKey] = $sValue;\n } else {\n\n $oForm->form[$sKey] = $sValue->fetch();\n }\n }\n\n $oForm->end = '</form>';\n\n return $oForm;\n }", "function getMbrid() {\n return $this->_mbrid;\n }", "public static function getForm();", "abstract public function bindForm();", "abstract public function bindForm();", "protected function getVictoireForm_Form_Type_VicLinkService()\n {\n return $this->services['victoire_form.form.type.vic_link'] = new \\Victoire\\Bundle\\FormBundle\\Form\\Type\\LinkType(array(), $this->get('victoire_view_reference.repository'), array(0 => 'fr', 1 => 'en'), $this->get('request_stack'), array(0 => 'modal'));\n }", "protected function form()\n {\n $Adv=new Adv();\n $form = new Form($Adv);\n $platform= $Adv->platform;\n $type= $Adv->type;\n $status= $Adv->status;\n $list_array=[\n array(\"field\"=>\"title\",\"title\"=>\"标题\",\"type\"=>\"text\"),\n array(\"field\"=>\"platform\",\"title\"=>\"平台\",\"type\"=>\"select\",\"array\"=>$platform),\n array(\"field\"=>\"type\",\"title\"=>\"类型\",\"type\"=>\"select\",\"array\"=>$type),\n array(\"field\"=>\"image\",\"title\"=>\"图片\",\"type\"=>\"image\"),\n array(\"field\"=>[\"start_time\",\"end_time\"],\"title\"=>\"活动时间\",\"type\"=>\"datetimeRange\"),\n array(\"field\"=>\"font1\",\"title\"=>\"字段1\",\"type\"=>\"text\"),\n array(\"field\"=>\"font2\",\"title\"=>\"字段2\",\"type\"=>\"text\"),\n array(\"field\"=>\"font3\",\"title\"=>\"字段3\",\"type\"=>\"text\"),\n array(\"field\"=>\"font4\",\"title\"=>\"字段4\",\"type\"=>\"text\"),\n array(\"field\"=>\"font5\",\"title\"=>\"字段5\",\"type\"=>\"text\"),\n array(\"field\"=>\"status\",\"title\"=>\"状态\",\"type\"=>\"switch\",\"array\"=>$status),\n array(\"field\"=>\"created_at\",\"title\"=>\"创建时间\",\"type\"=>\"value\")\n ];\n BaseControllers::set_form($form,$list_array);\n return $form;\n }", "public function getAcroForm() {}", "public function getAcroForm() {}", "function getBridgeNetmask() {\n return $this->bridgeNetmask;\n }", "abstract protected function instantiateForm(): FormInterface;", "public function makeBridge()\n {\n //Return the bridge\n return app('PersonalityInsightsBridge', ['credentialsName' => $this->getCredentialsName()])->appendHeaders($this->getHeaders());\n }", "public function getIndirectObject() {}" ]
[ "0.6226911", "0.6221184", "0.60709274", "0.5868567", "0.5578884", "0.5485785", "0.5461808", "0.5460027", "0.5388528", "0.53154093", "0.52404904", "0.5183814", "0.5161728", "0.5161465", "0.5150575", "0.5140566", "0.5127729", "0.509111", "0.50733495", "0.5071981", "0.50525117", "0.50525117", "0.5032811", "0.5029093", "0.4979572", "0.4979572", "0.49746278", "0.49717042", "0.49485838", "0.49383625" ]
0.7022916
0
Get DB bridge instance for ADT
public function getDBBridgeForInstance(ilADT $a_adt) { $class = $this->initTypeClass($a_adt->getType(), "DBBridge"); return new $class($a_adt); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getActiveRecordBridgeForInstance(ilADT $a_adt)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_adt->getType(), \"ActiveRecordBridge\");\t\t\r\n\t\treturn new $class($a_adt);\r\n\t}", "private function getDBA() {\n\t\tif ( $this->dba != null ) {\n\t\t\treturn $this->dba;\n\t\t}\n\t\tswitch ( $this->backend ) {\n\t\t\tcase 'mysql' :\n\t\t\t\t$this->dba = ORM::for_table($this->table);\n\t\t\tbreak;\n\t\t\tcase 'mongodb' :\n\t\t\tbreak;\n\t\t\tdefault :\n\t\t\t\tthrow new Exception(\"Invalid backend data store specified.\");\n\t\t\tbreak;\n\t\t}\n\t\treturn $this->dba;\n\t}", "public static function get($db_type='')\n {\n if ($db_type == \"master\")\n {\n static $mdb = null;\n if ( $mdb == null )\n $mdb = new DBConnection($db_type);\n return $mdb;\n }\n else\n {\n static $sdb = null;\n if ( $sdb == null )\n $sdb = new DBConnection($db_type);\n return $sdb;\n }\n\n }", "public function dbInstance();", "public static function getInstance()\n {\n return Doctrine_Core::getTable('AdvertNetwork');\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Alerte_bpi');\n }", "public function getDatabase(): DatabaseInterface;", "function establish_connection() {\n\t \t\tself::$db = Registry()->db = SqlFactory::factory(Config()->DSN);\n\t \t\tself::$has_update_blob = method_exists(self::$db, 'UpdateBlob');\n\t\t\treturn self::$db;\n\t\t}", "public function getInstance(): self\r\n {\r\n if (self::$DB_link === null) {\r\n self::$DB_link = new self();\r\n }\r\n return self::$DB_link;\r\n }", "public static function obtenerint(){\n if (self::$db === null){\n \tself::$db = new self();\n }\n return self::$db;\n }", "public static function conn()\n {\n return (static::inst())::$_db;\n }", "public static function get_dba($dba_id='default') {\n\t if (isset(self::$_dba_pool[$dba_id])) {\n return self::$_dba_pool[$dba_id];\n\t }\n\t \n $key = isset(Doggy_Config::$vars['app.dba.'.$dba_id])? 'app.dba.'.$dba_id: 'app.dba.default';\n $dsn = Doggy_Config::get($key);\n if (empty($dsn)) {\n throw new Doggy_Dba_Exception(\"factroy dba failed,unknown dba_id < $dba_id >\");\n }\n \n $driver = false !== ($i = strpos($dsn, ':')) ? substr($dsn, 0, $i) : $dsn;\n $class = Doggy_Util_Inflector::doggyClassify('Doggy_Dba_Adapter_'.$driver);\n if(!class_exists($class) ){\n throw new Doggy_Dba_Exception('factroy dba failed.<unknow database adpater:'.$driver);\n }\n return self::$_dba_pool[$dba_id] = new $class($dsn);\n\t}", "function &atkGetDb($conn='default', $reset=false, $mode=\"r\")\n{\n\tatkimport(\"atk.db.atkdb\");\n\t$db = &atkDb::getInstance($conn, $reset, $mode);\n\treturn $db;\n}", "public function getDb(int $key = 0) : ?DboInterface\n {\n return $this->getDbFactory()->getConnection($key);\n }", "public static function getDb()\n {\n return Yii::$app->get(\"ddb\");\n }", "public function getDb();", "public function getDbAdapter();", "protected function getDbal_ConnService()\n {\n return $this->services['dbal.conn'] = new \\phpbb\\db\\driver\\factory($this);\n }", "public function getDbalConnection();", "public function db () : Connection {\n return Manager::connection($this->connection());\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Assemblage');\n }", "function blightDB()\n{\n\tstatic $db;\n\tif (!isset($db))\n\t{\n\t\tif (false === ($db = gdo_db_instance('localhost', BLIGHT_USER, BLIGHT_PASS, BLIGHT_DB)))\n\t\t{\n\t\t\tdie('Cannot connect to db!');\n\t\t}\n\t\t$db->setVerbose(false);\n\t\t$db->setLogging(false);\n\t\t$db->setDieOnError(false);\n\t\t$db->setEMailOnError(false);\n\t}\n\treturn $db;\n}", "public static function getDBO() {\n\t\t/*\n\t\t * Check for the required DB configuration parameters\n\t\t */\n\t\tif(!defined('ETH_CONF_DB_HOST')) {\n\t\t\tthrow new Exception('ETH_CONF_DB_HOST configuration not set');\n\t\t}\n\t\tif(!defined('ETH_CONF_DB_USERNAME')) {\n\t\t\tthrow new Exception('ETH_CONF_DB_USERNAME configuration not set');\n\t\t}\n\t\tif(!defined('ETH_CONF_DB_PASSWORD')) {\n\t\t\tthrow new Exception('ETH_CONF_DB_PASSWORD configuration not set');\n\t\t}\n\t\tif(!defined('ETH_CONF_DB_DBNAME')) {\n\t\t\tthrow new Exception('ETH_CONF_DB_DBNAME configuration not set');\n\t\t}\n\n\t\t$db = new mysqli(ETH_CONF_DB_HOST, ETH_CONF_DB_USERNAME,\n\t\t\t\tETH_CONF_DB_PASSWORD, ETH_CONF_DB_DBNAME);\n\t\t\t\t\n\t\tif($db->connect_error){\n\t\t\tthrow new Exception(\n\t\t\t\t\tsprintf('DB Connect Error %d: %s',\n\t\t\t\t\t\t\t$db->connect_errno, $db->connect_error));\n\t\t}\n\n\t\tself::$db = $db;\n\t\treturn self::$db;\n\t}", "public function getDatabaseAdaper()\n {\n return $this->oDatabase;\n }", "public static function getInstance($type = 'base')\n\t{\n\t\tif (isset(self::$cache[$type])) {\n\t\t\treturn self::$cache[$type];\n\t\t}\n\t\t$db = new self(self::getConfig($type));\n\t\t$db->dbType = $type;\n\t\tself::$cache[$type] = $db;\n\t\treturn $db;\n\t}", "protected function getDb()\n\t{\n\t\treturn (new League)->getConnection();\n\t}", "public static function instance() {\n\t\t$classe = get_called_class();\n\t\t$table = str_replace(\"db_\", \"\", $classe);\n\t\t$instance = db::instance(db::table($table));\n\t\treturn $instance;\n\t}", "private function get_bridge()\n\t{\n\t\treturn $this->m_bridge;\n\t}", "public static function getInstance()\r\n {\r\n return Doctrine_Core::getTable('UtoconsultAdvertisement');\r\n }", "public function getConnection() {\n\t\t$db = Config::get('librarydirectory::database.default');\n return static::resolveConnection($db);\n }" ]
[ "0.7011467", "0.66538334", "0.6570967", "0.6403578", "0.63902646", "0.6369858", "0.6368706", "0.62863606", "0.625861", "0.62197703", "0.61985743", "0.619759", "0.61788714", "0.61603236", "0.61416847", "0.61349", "0.6133471", "0.61327225", "0.61229753", "0.6114849", "0.6108568", "0.60917103", "0.60905254", "0.60904616", "0.6080808", "0.6074531", "0.60634756", "0.6057663", "0.60540384", "0.6051446" ]
0.79595876
0
Get presentation bridge instance for ADT
public function getPresentationBridgeForInstance(ilADT $a_adt) { $class = $this->initTypeClass($a_adt->getType(), "PresentationBridge"); return new $class($a_adt); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getActiveRecordBridgeForInstance(ilADT $a_adt)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_adt->getType(), \"ActiveRecordBridge\");\t\t\r\n\t\treturn new $class($a_adt);\r\n\t}", "public function getDBBridgeForInstance(ilADT $a_adt)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_adt->getType(), \"DBBridge\");\t\t\r\n\t\treturn new $class($a_adt);\t\r\n\t}", "public function getPresentation();", "protected function _getBridge() {}", "private function get_bridge()\n\t{\n\t\treturn $this->m_bridge;\n\t}", "public function getFormBridgeForInstance(ilADT $a_adt)\r\n\t{\t\t\r\n\t\t$class = $this->initTypeClass($a_adt->getType(), \"FormBridge\");\t\t\r\n\t\treturn new $class($a_adt);\r\n\t}", "public function bridge()\n {\n return new Bridge($this->talker);\n }", "function getBridgeModel() {\n return $this->bridgeModel;\n }", "abstract public function get_instance();", "function getBridgeDhcp() {\n return $this->bridgeDhcp;\n }", "public function makeBridge()\n {\n //Return the bridge\n return app('PersonalityInsightsBridge', ['credentialsName' => $this->getCredentialsName()])->appendHeaders($this->getHeaders());\n }", "public function get_active_instance() {\n\n\n }", "public function getViewInterface(): ViewInterface\n \n {\n// on cherche l'équivalant de ça mais en mode bonne pratique\n \n \n// reflective class\n return (new \\ReflectionClass(PackageView:: class))\n ->newInstanceArgs([]);\n\n }", "public function blueprint()\n {\n return $this->belongsTo('App\\Models\\Blueprint');\n }", "public function activo()\n\t{\n\t\treturn $this->morphOne(\n\t\t\tActivo::class,\n\t\t\t'Activo'\n\t\t);\n\t}", "public function getDisplay();", "public function createDiagramInstance();", "public function obtainable()\n {\n return $this->morphTo();\n }", "public function getOrientClass();", "function &getRepresentative() {\n\t\treturn $this->_representative;\n\t}", "public function displayType(): object\n {\n return $this->displayType;\n }", "public function representer() {\n return $this->belongsTo('Rockit\\Models\\Representer');\n }", "public function present()\n {\n if (! isset($this->presenterInstance)) {\n $this->presenterInstance = (new ReflectionClass($this->presenter))\n ->newInstanceArgs([$this]);\n }\n\n return $this->presenterInstance;\n }", "public function get_active_instance() { \n\n\n\t}", "public function viewable(): MorphTo;", "public function get_display() {\n return $this->view->display_handler;\n }", "function getBridgeGateway() {\n return $this->bridgeGateway;\n }", "static public function getView() {\n\t\treturn self::$defaultInstance;\n\t}", "public function component()\n {\n return $this->morphTo();\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Assemblage');\n }" ]
[ "0.6440561", "0.6297715", "0.6102629", "0.6033755", "0.5811633", "0.57800436", "0.5729517", "0.56088495", "0.52797216", "0.5263347", "0.5245963", "0.51340455", "0.5122018", "0.51195294", "0.5107162", "0.51070225", "0.5100116", "0.50740755", "0.5073153", "0.5071852", "0.5071066", "0.5061156", "0.5055176", "0.5047071", "0.5019112", "0.50017077", "0.4986562", "0.49808192", "0.4969646", "0.4963779" ]
0.78331214
0
Get search bridge instance for ADT definition
public function getSearchBridgeForDefinitionInstance(ilADTDefinition $a_adt_def, $a_range = true, $a_multi = true) { if($a_range) { try { $class = $this->initTypeClass($a_adt_def->getType(), "SearchBridgeRange"); return new $class($a_adt_def); } catch(Exception $e) { } } // multi enum search (single) == enum search (multi) if(!$a_multi && $a_adt_def->getType() == "MultiEnum") { $class = $this->initTypeClass("Enum", "SearchBridgeMulti"); return new $class($a_adt_def); } if($a_multi) { try { $class = $this->initTypeClass($a_adt_def->getType(), "SearchBridgeMulti"); return new $class($a_adt_def); } catch(Exception $e) { } } $class = $this->initTypeClass($a_adt_def->getType(), "SearchBridgeSingle"); return new $class($a_adt_def); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getActiveRecordBridgeForInstance(ilADT $a_adt)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_adt->getType(), \"ActiveRecordBridge\");\t\t\r\n\t\treturn new $class($a_adt);\r\n\t}", "public function getDBBridgeForInstance(ilADT $a_adt)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_adt->getType(), \"DBBridge\");\t\t\r\n\t\treturn new $class($a_adt);\t\r\n\t}", "protected function getSearchInstance () {\n $search = Search::getInstance($this->data['attrs']['source_id']);\n\n if ($this->displayNotices($search->getErrors())) {\n return false;\n }\n $this->displayNotices($search->getWarnings(), true);\n\n return $search;\n }", "abstract public function get_instance();", "public function find(string $class): Instantiator;", "public function getInstanceByDefinition(ilADTDefinition $a_def)\r\n\t{\r\n\t\tif(!method_exists($a_def, \"getADTInstance\"))\r\n\t\t{\t\t\t\r\n\t\t\t$class = $this->initTypeClass($a_def->getType());\t\t\r\n\t\t\treturn new $class($a_def);\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn $a_def->getADTInstance();\r\n\t\t}\r\n\t}", "public function getPresentationBridgeForInstance(ilADT $a_adt)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_adt->getType(), \"PresentationBridge\");\t\t\r\n\t\treturn new $class($a_adt);\t\r\n\t}", "public function getDefinition();", "public function getDefinition();", "function getInstance(Constraint $constraint);", "public function getSearchType() {}", "public function getSearchType() {}", "public function getDefinition() {}", "public static function getInstance()\n {\n if (!self::$search_obj) {\n self::$search_obj = new Search();\n }\n\n return self::$search_obj;\n }", "public static function getSearch($db) {\n\t\t\treturn new SearchToObject($db, static::$_table, static::$_fields, get_called_class());\n\t\t}", "public static function getInstance()\n {\n return Doctrine_Core::getTable('AdvertNetwork');\n }", "public function getDefinitionInstanceByType($a_type)\r\n\t{\r\n\t\t$class = $this->initTypeClass($a_type, \"Definition\");\t\t\r\n\t\treturn new $class();\t\t\r\n\t}", "protected function getSearchable($builder): Searchable\n {\n return $builder->getModel();\n }", "function opdsSearchDescriptor()\n{\n global $app;\n\n $gen = mkOpdsGenerator($app);\n $cat = $gen->searchDescriptor(null, '/opds/searchlist/0/');\n mkOpdsResponse($app, $cat, OpdsGenerator::OPENSEARCH_MIME);\n}", "public function buildDiscovery();", "private function get_bridge()\n\t{\n\t\treturn $this->m_bridge;\n\t}", "public static function new_search_record()\n\t{\n\t\treturn new league_record_search();\n\t}", "public static function getInstance()\n {\n return Doctrine_Core::getTable('NetworkType');\n }", "public function getSearchObject()\n {\n if ($this->search === null)\n {\n $this->setSearchObject('XmlJs');\n }\n\n return $this->search;\n }", "public static function getInstance() {\n return Doctrine_Core::getTable('adHotel');\n }", "protected function search()\n\t{\n\t\treturn Phpfox::getLib('search');\t\n\t}", "public function getInstance(): object;", "public static function search()\n {\n return new DIndexSearch(get_called_class());\n }", "public static function getInstance()\n {\n return Doctrine_Core::getTable('Assemblage');\n }", "public static function getInstance()\r\n {\r\n return Doctrine_Core::getTable('UtoconsultAdvertisement');\r\n }" ]
[ "0.5672799", "0.55703974", "0.5428149", "0.52475214", "0.51427054", "0.5131958", "0.51317525", "0.5120147", "0.5120147", "0.5118711", "0.51143926", "0.51143926", "0.510476", "0.50948733", "0.5080495", "0.50742376", "0.5065063", "0.5056488", "0.50546724", "0.5035494", "0.5016008", "0.5012873", "0.50064987", "0.4969074", "0.49665785", "0.49610448", "0.49492908", "0.4942666", "0.49107963", "0.49046513" ]
0.66711986
0
Init active record by type
public static function initActiveRecordByType() { require_once "Services/ADT/classes/ActiveRecord/class.ilADTActiveRecordByType.php"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function __init(string $type = \"PDO\") {\n $this -> __createAdapter($type, static::$table);\n }", "public function __construct(){\n\n\t\t$this->types_model = new Types();\n\t}", "protected function initDatabaseRecord() {}", "private function init() {\r\n settype($this->id, \"int\");\r\n settype($this->name, \"string\");\r\n settype($this->max_players, \"int\");\r\n settype($this->is_over_yet, \"boolean\");\r\n settype($this->players, \"array\");\r\n }", "public function init(string $model_type): Repository;", "public function __construct($modelType, Storage $storage);", "private function init() {\n\t\tlist(, $this->db, $this->table) = explode('_', get_called_class(), 3);\n\t\t$this->db = defined('static::DB') ? static::DB : $this->db;\n\t\t$this->table = defined('static::TABLE') ? static::TABLE : $this->table;\n\t\t$this->pk = defined('static::PK') ? static::PK : 'id';\n\t}", "public function __construct($type = 'mysql')\n {\n $this->conn = \\DbConn::initConnection($type);\n }", "public function initialize()\n {\n $this->setSource('custom_fields_types');\n\n $this->hasMany(\n 'id',\n 'Canvas\\Models\\CustomFieldsTypesSettings',\n 'custom_fields_types_id',\n ['alias' => 'typesSetting']\n );\n }", "public function __construct($type)\n {\n }", "public function __construct($type_row = null)\n {\n if( !is_null($type_row)) {\n $this->id = $type_row instanceof Zend_Db_Table_Row ? $type_row->ID : $type_row['ID'];\n\t\t\t$this->name = $type_row instanceof Zend_Db_Table_Row ? $type_row->NAME : $type_row['NAME'];\n\t\t\t$this->is_show = $type_row instanceof Zend_Db_Table_Row ? $type_row->IS_SHOW : $type_row['IS_SHOW'];\n\t\t\t$this->is_difficult = $type_row instanceof Zend_Db_Table_Row ? $type_row->IS_DIFFICULT : $type_row['IS_DIFFICULT'];\n }\n \n }", "public function init()\r\n {\r\n $this->_helper->db->setDefaultModelName('Item');\r\n }", "function __construct($type='simple')\n {\n $this->type = $type;\n }", "function __construct($type) {\n\t$this->type = $type;\n\t}", "public function __construct()\n\t\t{\n\t\t\t$this->_db_table = new Application_Model_DbTable_TourType();\n\t\t}", "public function init()\n {\n\n // load the utility class name\n $utilityClassName = $this->getUtilityClassName();\n\n // initialize the prepared statements\n $this->eavEntityTypeStmt = $this->getConnection()->prepare($utilityClassName::EAV_ENTITY_TYPES);\n }", "public function init()\n {\n $this->_helper->db->setDefaultModelName('BatchUpload_MappingSet');\n }", "public function __construct($type) {\n $this->type = $type;\n }", "public function __construct($type)\n {\n $this->type=$type;\n }", "public function __construct($type)\n\t{\n\t\t$this->type = $type;\n\t\t$this->cache_time = Kohana::config($this->type.'.cache_time');\n\t}", "protected abstract function initializeEntityType(): string;", "public function __construct($type)\n {\n $this->type = $type;\n }", "public function __construct() {\n\n $this->tableName = \"re_event_type\";\n $this->setColumnsInfo(\"id\", \"int(11)\", 0);\n $this->setColumnsInfo(\"name\", \"varchar(250)\", \"\");\n $this->setColumnsInfo(\"id_space\", \"int(11)\", 0);\n $this->primaryKey = \"id\";\n }", "abstract protected function initializeMappedTypes();", "public static function initModel($modelType){\n $m=new $modelType();\n unset($m);\n }", "public function withType($type)\n {\n $this->_model['type'] = $type;\n return $this;\n }", "public function init()\r\n {\r\n $this->_helper->db->setDefaultModelName('DefaultMetadataValue');\r\n }", "public function __construct($obj = null)\n {\n if( !is_null($obj) && $obj instanceof Zend_Db_Table_Row ) {\n $this->id = $obj->ID;\n $this->name = $obj->NAME;\n }\n \n if(is_array($obj)){\n //echo $obj['TOUR_TYPE_ID'];die;\n $this->id = $obj['ID'];\n if(isset($obj['name'])) $this->name = $obj['NAME'];\n }\n }", "function backup_migrate_crud_type_load($type) {\n $out = NULL;\n $types = backup_migrate_crud_types();\n if (!empty($types[$type])) {\n $info = $types[$type];\n if ($info['include']) {\n backup_migrate_include($info['include']);\n }\n $out = new $info['class'];\n }\n return $out;\n}", "public function __construct ($init)\n {\n if(is_string($init)) //this is suppose to be a table name\n {\n $init = $this->add_table($init);\n $this->base_table = $this->base_models[$init]->_table;\n }\n }" ]
[ "0.71986485", "0.6576926", "0.6419527", "0.62899625", "0.62655044", "0.6261549", "0.62429035", "0.6198593", "0.6197844", "0.61652935", "0.6157843", "0.6111789", "0.6106766", "0.60818005", "0.6047299", "0.60472363", "0.6037188", "0.60242766", "0.6020157", "0.6000934", "0.59628344", "0.59450656", "0.59361017", "0.59320444", "0.5907737", "0.58808124", "0.5845206", "0.58125323", "0.57917625", "0.57735366" ]
0.75186765
0
Test that pagination parameters are passed to the endpoint.
public function testGetWithPagination() { $expected_count = 2; $results_1 = self::$api->getAll([], 0, $expected_count); usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP); $this->assertCount($expected_count, $results_1); $expected_page = 1; $results_2 = self::$api->getAll([], $expected_page, 1); usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP); $this->assertCount(1, $results_2); $this->assertEquals($results_1[$expected_page]['client_id'], $results_2[0]['client_id']); $this->assertEquals($results_1[$expected_page]['audience'], $results_2[0]['audience']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testPagination()\n {\n\n // Set public page length to 2.\n set_option('per_page_public', 2);\n\n $item1 = $this->_item(true, 'Item 1');\n $item2 = $this->_item(true, 'Item 2');\n $item3 = $this->_item(true, 'Item 3');\n $item4 = $this->_item(true, 'Item 4');\n $item5 = $this->_item(true, 'Item 5');\n $item6 = $this->_item(true, 'Item 6');\n\n // --------------------------------------------------------------------\n\n // Page 1.\n $this->dispatch('solr-search');\n\n // Should just list items 1-2.\n $this->assertXpath('//a[@href=\"'.record_url($item1).'\"]');\n $this->assertXpath('//a[@href=\"'.record_url($item2).'\"]');\n $this->assertNotXpath('//a[@href=\"'.record_url($item3).'\"]');\n $this->assertNotXpath('//a[@href=\"'.record_url($item4).'\"]');\n $this->assertNotXpath('//a[@href=\"'.record_url($item5).'\"]');\n $this->assertNotXpath('//a[@href=\"'.record_url($item6).'\"]');\n\n // Should link to page 2.\n $next = public_url('solr-search?page=2');\n $this->assertXpath('//a[@href=\"'.$next.'\"]');\n\n $this->resetResponse();\n $this->resetRequest();\n\n // --------------------------------------------------------------------\n\n // Page 2.\n $_GET['page'] = '2';\n $this->dispatch('solr-search');\n\n // Should just list items 3-4.\n $this->assertNotXpath('//a[@href=\"'.record_url($item1).'\"]');\n $this->assertNotXpath('//a[@href=\"'.record_url($item2).'\"]');\n $this->assertXpath('//a[@href=\"'.record_url($item3).'\"]');\n $this->assertXpath('//a[@href=\"'.record_url($item4).'\"]');\n $this->assertNotXpath('//a[@href=\"'.record_url($item5).'\"]');\n $this->assertNotXpath('//a[@href=\"'.record_url($item6).'\"]');\n\n // Should link to page 3.\n $next = public_url('solr-search?page=3');\n $this->assertXpath('//a[@href=\"'.$next.'\"]');\n\n $this->resetResponse();\n $this->resetRequest();\n\n // --------------------------------------------------------------------\n\n // Page 3.\n $_GET['page'] = '3';\n $this->dispatch('solr-search');\n\n // Should just list items 5-6.\n $this->assertNotXpath('//a[@href=\"'.record_url($item1).'\"]');\n $this->assertNotXpath('//a[@href=\"'.record_url($item2).'\"]');\n $this->assertNotXpath('//a[@href=\"'.record_url($item3).'\"]');\n $this->assertNotXpath('//a[@href=\"'.record_url($item4).'\"]');\n $this->assertXpath('//a[@href=\"'.record_url($item5).'\"]');\n $this->assertXpath('//a[@href=\"'.record_url($item6).'\"]');\n\n // Should link back to page 2.\n $prev = public_url('solr-search?page=2');\n $this->assertXpath('//a[@href=\"'.$prev.'\"]');\n\n // --------------------------------------------------------------------\n\n }", "public function testGETProductsCollectionPaginated()\n {\n $this->assertEquals(\n 4,\n $this->crawler->filter('span:contains(\"Title\")')->count()\n );\n //in the last page have 2 product\n $crawler = $this->client->request('GET', '/?page=8');\n $this->assertEquals(\n 2,\n $crawler->filter('span:contains(\"Title\")')->count()\n );\n }", "public function testGetPositionsWithPagination()\n {\n $client = new Client(['base_uri' => 'http://localhost:8000/api/']);\n $token = $this->getAuthenticationToken();\n $headers = [\n 'Authorization' => 'Bearer ' . $token,\n 'Accept' => 'application/json'\n ];\n $params = [\n 'page' => 2\n ];\n $response = $client->request('GET', 'positions', [\n 'headers' => $headers,\n 'query' => $params\n ]);\n\n $this->assertEquals(200, $response->getStatusCode());\n $this->assertEquals(['application/json; charset=utf-8'], $response->getHeader('Content-Type'));\n $data = json_decode($response->getBody(), true);\n $this->assertEquals(30, count($data));\n\n }", "public function testWithPaginationLimitListPosts()\n {\n $response = $this->jsonUser('GET', '/api/users/posts?limit=8&page=2');\n $response->assertJson([\n 'current_page' => 2,\n 'per_page' => 8,\n 'from' => 9,\n 'to' => 16,\n 'last_page' => 3,\n 'total' => 21,\n ]);\n }", "public function testThatGetAllUsersWithPerPageIsFormattedProperly()\n {\n $api = new MockManagementApi( [\n new Response( 200, self::$headers ),\n new Response( 200, self::$headers ),\n ] );\n\n $api->call()->users()->getAll( [], [], null, null, 10 );\n\n $query = $api->getHistoryQuery();\n $this->assertContains( 'per_page=10', $query );\n\n $api->call()->users()->getAll( [], [], null, null, -10 );\n\n $query = $api->getHistoryQuery();\n $this->assertContains( 'per_page=10', $query );\n }", "public function testGetPagesAndCreatePaginator()\n {\n $i = 0;\n $pageFrom = 1;\n $perPage = 20;\n $totalItems = 400;\n\n $link = $this->createMock(HalLink::class);\n $link\n ->expects($this->once())\n ->method('get')\n ->willReturn($this->getPaginatedResource($i, $pageFrom, $perPage, $totalItems));\n\n $instance = new DomainResourceMock($link);\n\n $count = 0;\n $criterias = ['page' => $pageFrom, 'limit' => $perPage];\n foreach ($instance->getPages($criterias) as $collection) {\n $count++;\n $this->assertInstanceOf(PaginatedResourceCollection::class, $collection);\n }\n\n // NumberItem / ItemPerPage = NumberOfPages,\n // NumberOfPages - (PageToStartAt - 1) = AwaitedNumberOfPages (-1 because page 0 does no exists)\n $this->assertEquals(($totalItems / $perPage) - ($pageFrom - 1), $count);\n }", "public function testThatGetAllUsersWithPageIsFormattedProperly()\n {\n $api = new MockManagementApi( [\n new Response( 200, self::$headers ),\n new Response( 200, self::$headers ),\n ] );\n\n $api->call()->users()->getAll( [], [], null, 10 );\n\n $query = $api->getHistoryQuery();\n $this->assertContains( 'page=10', $query );\n\n $api->call()->users()->getAll( [], [], null, -10 );\n\n $query = $api->getHistoryQuery();\n $this->assertContains( 'page=10', $query );\n }", "public function testPage()\n {\n $index = new Index();\n $query = new Query($index);\n $this->assertSame($query, $query->page(10));\n $elasticQuery = $query->compileQuery()->toArray();\n $this->assertSame(225, $elasticQuery['from']);\n $this->assertSame(25, $elasticQuery['size']);\n\n $this->assertSame($query, $query->page(20, 50));\n $elasticQuery = $query->compileQuery()->toArray();\n $this->assertSame(950, $elasticQuery['from']);\n $this->assertSame(50, $elasticQuery['size']);\n\n $query->limit(15);\n $this->assertSame($query, $query->page(20));\n $elasticQuery = $query->compileQuery()->toArray();\n $this->assertSame(285, $elasticQuery['from']);\n $this->assertSame(15, $elasticQuery['size']);\n }", "public function testCompanyApiPagination()\n {\n $params = [\n 'page' => 2,\n 'limit' => 10,\n ];\n $this->call('GET', '/companies', $params);\n\n $this->seeStatusCode(200);\n $this->seeJsonContains([\n \"from\" => 11,\n \"current_page\" => 2,\n \"per_page\" => 10,\n ]);\n }", "public function test_searchByPage() {\n\n }", "public function testListPagination()\n {\n $this->browse(function (Browser $browser) {\n $browser->loginAs(User::find(1))\n ->visit('admin/users')\n ->assertSee('Users Gestion')\n ->clickLink('3')\n ->assertSee('GreatRedactor');\n });\n }", "function getPagingParameters()\n {\n }", "abstract public function preparePagination();", "public function testSearchParams()\n {\n $guid = 'TestingGUID';\n $count = 105;\n $pageSize = 100;\n\n $apiResponse = APISuccessResponses::search($guid, $count, $pageSize);\n\n $container = [];\n $sw = $this->createMockedSmartwaiver($container, $apiResponse, 15);\n\n $sw->search();\n $sw->search('testing123');\n $sw->search('', '2017-01-01');\n $sw->search('', '', '2017-01-02');\n $sw->search('', '2017-01-01', '2017-01-02');\n $sw->search('', '', '', 'Kyle');\n $sw->search('', '', '', '', 'Smith');\n $sw->search('', '', '', 'Kyle', 'Smith');\n $sw->search('', '', '', '', '', true);\n $sw->search('', '', '', '', '', false);\n $sw->search('', '', '', '', '', null);\n $sw->search('', '', '', '', '', null, true);\n $sw->search('', '', '', '', '', null, false);\n $sw->search('', '', '', '', '', null, true, 'testing');\n $sw->search('testing123', '', '', '', '', true);\n\n $this->checkGetRequests($container, [\n '/v4/search',\n '/v4/search?templateId=testing123',\n '/v4/search?fromDts=2017-01-01',\n '/v4/search?toDts=2017-01-02',\n '/v4/search?fromDts=2017-01-01&toDts=2017-01-02',\n '/v4/search?firstName=Kyle',\n '/v4/search?lastName=Smith',\n '/v4/search?firstName=Kyle&lastName=Smith',\n '/v4/search?verified=true',\n '/v4/search?verified=false',\n '/v4/search',\n '/v4/search',\n '/v4/search?sort=asc',\n '/v4/search?tag=testing',\n '/v4/search?templateId=testing123&verified=true'\n ]);\n }", "public function test_can_get_all_todos_paginated()\n {\n $this->withoutExceptionHandling();\n\n $response = $this->get('/api/todos');\n $response->assertJson($response->decodeResponseJson());\n $response->assertStatus(200);\n }", "public function testClientsPaginationAsVisitor() {\n\n $this->visit('/clients/get')\n ->seePageIs('/login');\n\n }", "public function testSearchParams() {\n $this->get('/api/VideoTags/search.json?tag_name=frontside');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?rider_id=1');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?sport_id=1');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?tag_id=1');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?trick-slug=frontside-360');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?order=invalidorder');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?order=begin_time');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?order=created');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?order=modified');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?order=best');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?video_tag_id=1');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?tag_slug=myslug');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?trick_slug=1');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?video_tag_ids=1,2,3');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?status=pending,invalidstatus');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?sport_name=snowboard');\n $this->assertResponseOk();\n $this->get('/api/VideoTags/search.json?sport_name=snowboard&category_name=jib');\n $this->assertResponseOk();\n }", "function pagination(){}", "public function test119DisplayBookingListAfterClickOnEachLinkOfPagination()\n {\n $ssoData = $this->getSSOData();\n\n // current bookings\n $this->createBookings(20, date('Y-m-d'), 15);\n\n //$this->mockApi($data, 'empty_ok');\n\n $responseBefore = $this->ajax($this->getUrlByParams(['page' => 1, 'per_page' => 10]))->json();\n $responseAfter = $this->ajax($this->getUrlByParams(['page' => 2, 'per_page' => 10]))->json();\n\n $listBefore = $responseBefore['current_list'];\n $listAfter = $responseAfter['current_list'];\n\n $this->assertFalse($listBefore == $listAfter);\n }", "function results_are_paged()\n {\n }", "public function testItemsPerPage()\n {\n $feed = $this->eventFeed;\n\n // Assert that the feed's itemsPerPage is correct\n $this->assertTrue($feed->getItemsPerPage() instanceof Zend_Gdata_Extension_OpenSearchItemsPerPage);\n $this->verifyProperty2($feed, \"itemsPerPage\", \"text\", \"25\");\n }", "public function testIndexAssetPerPage()\n {\n // 1. Mock data\n $admin = $this->admin;\n // 2. Hit Api Endpoint\n $response = $this->actingAs($admin)->get(route('asset.index', ['perPage' => 50]));\n // 3. Verify and Assertion\n $response->assertStatus(Response::HTTP_OK);\n }", "public function testPaginationSimpleBeforeLastPage()\n {\n // init\n $oPagination = new \\Pagination();\n $oPagination->setUrl('http://www.st.ro');\n $oPagination->setPage(19);\n $oPagination->setPerPage(10);\n $oPagination->setItemsNo(200);\n \n //run the test\n $this->invokeMethod($oPagination, 'compute');\n \n // asserts\n $this->assertEquals(20, $oPagination->getMaxPage());\n $this->assertEquals(2, $oPagination->getPrevPages());\n $this->assertEquals(1, $oPagination->getNextPages());\n $this->assertTrue($oPagination->getFirstPage());\n $this->assertFalse($oPagination->getLastPage());\n }", "public function testFacebookPagesRequest()\n {\n $stream = $this->getStream('FacebookPages', '27469195051');\n $response = $stream->getResponse();\n\n $this->checkResponseIntegrity('FacebookPages', $response);\n\n $errors = $stream->getErrors();\n $this->assertTrue(empty($errors));\n }", "public function testPagination()\n {\n $this->browse(function (Browser $browser) {\n $page1_entry = $browser->text('table tr:nth-child(1) td:nth-child(1)');\n\n // move to page 2\n $browser->click('.pagination li:nth-child(3) a');\n\n // verify we are on page 2\n $browser->waitFor('.pagination li:nth-child(3) span');\n $browser->assertSeeIn('.pagination li:nth-child(3) span', '2');\n\n $page2_entry = $browser->text('table tr:nth-child(1) td:nth-child(1)');\n\n // verify content is different\n $this->assertNotEquals($page1_entry, $page2_entry);\n\n // move to page 3 using the next button instead of the page number link\n $browser->click('.pagination li:nth-child(8) a');\n\n // verify we are on page 3\n $browser->waitFor('.pagination li:nth-child(4) span');\n $browser->assertSeeIn('.pagination li:nth-child(4) span', '3');\n\n $page3_entry = $browser->text('table tr:nth-child(1) td:nth-child(1)');\n\n // verify content is different\n $this->assertNotEquals($page2_entry, $page3_entry);\n\n // move back one page using the back button\n $browser->click('.pagination li:nth-child(1) a');\n\n //verify the content is the same since our last visit to this page\n $page2back_entry = $browser->text('table tr:nth-child(1) td:nth-child(1)');\n $this->assertEquals($page2_entry, $page2back_entry);\n });\n }", "public function testPaginationWrongData()\n {\n // init\n $oPagination = new \\Pagination();\n $oPagination->setUrl('abc');\n $oPagination->setPage(20);\n $oPagination->setPerPage(10);\n $oPagination->setItemsNo(200);\n \n $this->assertFalse($this->invokeMethod($oPagination, 'compute'));\n \n // init\n $oPagination = new \\Pagination();\n $oPagination->setUrl('http://www.st.ro');\n $oPagination->setPage(-1);\n $oPagination->setPerPage(10);\n $oPagination->setItemsNo(200);\n \n $this->assertFalse($this->invokeMethod($oPagination, 'compute'));\n \n // init\n $oPagination = new \\Pagination();\n $oPagination->setUrl('http://www.st.ro');\n $oPagination->setPage(20);\n $oPagination->setPerPage(null);\n $oPagination->setItemsNo(200);\n \n $this->assertFalse($this->invokeMethod($oPagination, 'compute'));\n \n // init\n $oPagination = new \\Pagination();\n $oPagination->setUrl('http://www.st.ro');\n $oPagination->setPage(20);\n $oPagination->setPerPage(10);\n $oPagination->setItemsNo('abc');\n \n $this->assertFalse($this->invokeMethod($oPagination, 'compute'));\n }", "public function testGetGetParams()\n {\n $expected = array('document' => array('filesize' => 100),\n 'get_test1' => 'true', 'get_test2' => 'go mets');\n $this->assertEquals($expected, $this->_req->getGetParams());\n }", "public function testPaginationSimpleBeforeBeforeLastPage()\n {\n // init\n $oPagination = new \\Pagination();\n $oPagination->setUrl('http://www.st.ro');\n $oPagination->setPage(18);\n $oPagination->setPerPage(10);\n $oPagination->setItemsNo(200);\n \n //run the test\n $this->invokeMethod($oPagination, 'compute');\n \n // asserts\n $this->assertEquals(20, $oPagination->getMaxPage());\n $this->assertEquals(2, $oPagination->getPrevPages());\n $this->assertEquals(2, $oPagination->getNextPages());\n $this->assertTrue($oPagination->getFirstPage());\n $this->assertTrue($oPagination->getLastPage());\n }", "public function test118DisplayPaginationLinksWhenTotalRecordsHigherThan10()\n {\n $ssoData = $this->getSSOData();\n\n // current bookings\n $this->createBookings(11, date('Y-m-d'), 11);\n\n //$this->mockApi($data, 'empty_ok');\n\n $params = [\n 'page' => 1,\n 'per_page' => 10,\n ];\n $response = $this->ajax($this->getUrlByParams($params))->json();\n\n $this->assertTrue(is_array($response));\n $this->assertArrayHasKey('current_list', $response);\n\n $list = $response['current_list'];\n $totalRowsInList = substr_count($list, '<ul class=\"pagination\"');\n\n $this->assertEquals(1, $totalRowsInList);\n }", "public function testGetOrdersWithCorrectParams()\n {\n echo \"\\n ***** Valid test - param value (page=4 and limit=2) - should get 200 ***** \\n \";\n $params = '{\"origin\": [\"-33.865143\",\"151.209900\"], \"destination\": [\"-37.663712\",\"144.844788\"]}';\n $params = json_decode($params, true);\n $response = $this->json('POST', '/orders', $params);\n \n $params = '{\"origin\": [\"-33.865143\",\"151.209900\"], \"destination\": [\"-37.663712\",\"144.844788\"]}';\n $params = json_decode($params, true);\n $response = $this->json('POST', '/orders', $params);\n \n $params = 'page=1&limit=2';\n $response = $this->json('GET', '/orders?'.$params);\n $response_data = $response->getContent();\n $response->assertStatus(200);\n\n echo \"\\n ***** Valid test - Number or count of response should be less than 2 - should get 200 ***** \\n \";\n $this->assertLessThan(3, count($response_data));\n \n echo \"\\n ***** Valid test - Get Order - Response should contain id, distance and status keys only ***** \\n\";\n $response_data = json_decode($response_data);\n\n foreach ($response_data as $order) {\n $order = (array) $order;\n $this->assertArrayHasKey('id', $order);\n $this->assertArrayHasKey('distance', $order);\n $this->assertArrayHasKey('status', $order);\n }\n }" ]
[ "0.70548224", "0.67531145", "0.67249376", "0.6706914", "0.6686927", "0.66857654", "0.6682336", "0.6552432", "0.6549364", "0.6505953", "0.64882123", "0.64774555", "0.6447404", "0.6440942", "0.64331806", "0.641788", "0.64111185", "0.63885736", "0.6384449", "0.63785315", "0.635689", "0.6340595", "0.63320285", "0.63016486", "0.6298573", "0.6283766", "0.62783194", "0.6277655", "0.62769127", "0.62608457" ]
0.7644956
0
Test that the "include_totals" parameter works.
public function testGetAllIncludeTotals() { $expected_page = 0; $expected_count = 2; $results = self::$api->getAll(['include_totals' => true], $expected_page, $expected_count); usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP); $this->assertArrayHasKey('total', $results); $this->assertEquals($expected_page * $expected_count, $results['start']); $this->assertEquals($expected_count, $results['limit']); $this->assertNotEmpty($results['client_grants']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testTotal()\n {\n\n \t$data = [\n \t\t'base_price' => 10,\n \t\t'spacing_cost' => 10,\n \t\t'work_level_cost' => 50,\n \t\t'urgency_cost' => 20,\n \t\t'number_of_pages' => 5,\n \t\t'total_additional_services_cost' => 10\n \t\t// 'vat' => 100\n \t];\n\n $foo = self::getMethod('calculate');\n $cartService = new CartService();\n $response = $foo->invokeArgs($cartService, [$data]);\n\n $this->assertEquals(410, $response);\n }", "public function testTotalAndCoupon()\n {\n $input = [0, 2, 5, 8];\n $coupon = 0.20;\n\n // Execute total() with the array and the additional value of coupon and save to variable\n $output = $this->Receipt->total($input, $coupon);\n $this->assertEquals(\n 12, // Expected value\n $output, // Value returned by total()\n 'When summing the total should equal 12' // Message to return in case of error\n );\n }", "public function hasTotal() {\n return $this->_has(1);\n }", "public function hasTotal() {\n return $this->_has(1);\n }", "public function hasTotal() {\n return $this->_has(1);\n }", "public function hasTotal() {\n return $this->_has(1);\n }", "public function hasTotal() {\n return $this->_has(1);\n }", "public function allowsExactTotals()\n {\n return $this->allowExactTotals ?? false;\n }", "public function testTotalAmountCalculation(): void\n {\n $order = new Order('consumerIdTest123', '845126849', new \\DateTimeImmutable('midnight'), 'OrderNumber123', 7);\n $order->addOrderLine('productIdTest1', 2, 4.9);\n $order->addOrderLine('productIdTest2', 3, 10.5);\n\n static::assertEquals(41.3, $order->getAmount());\n }", "protected function _initTotals()\n {\n $this->_totals = array();\n $this->_totals['subtotal'] = new Varien_Object(array(\n 'code' => 'subtotal',\n 'value' => $this->getSource()->getSubtotal(),\n 'base_value' => $this->getSource()->getBaseSubtotal(),\n 'bluesnap_value' => $this->getSource()->getBluesnapSubtotal(),\n 'label' => $this->helper('sales')->__('Subtotal')\n ));\n\n /**\n * Add shipping\n */\n if (!$this->getSource()->getIsVirtual() && ((float)$this->getSource()->getShippingAmount() || $this->getSource()->getShippingDescription())) {\n $this->_totals['shipping'] = new Varien_Object(array(\n 'code' => 'shipping',\n 'value' => $this->getSource()->getShippingAmount(),\n 'base_value' => $this->getSource()->getBaseShippingAmount(),\n 'bluesnap_value' => $this->getSource()->getBluesnapShippingAmount(),\n 'label' => $this->helper('sales')->__('Shipping & Handling')\n ));\n }\n\n /**\n * Add discount\n */\n if (((float)$this->getSource()->getDiscountAmount()) != 0) {\n if ($this->getSource()->getDiscountDescription()) {\n $discountLabel = $this->helper('sales')->__('Discount (%s)', $this->getSource()->getDiscountDescription());\n } else {\n $discountLabel = $this->helper('sales')->__('Discount');\n }\n $this->_totals['discount'] = new Varien_Object(array(\n 'code' => 'discount',\n 'value' => $this->getSource()->getDiscountAmount(),\n 'base_value' => $this->getSource()->getBaseDiscountAmount(),\n 'bluesnap_value' => $this->getSource()->getBluesnapDiscountAmount(),\n 'label' => $discountLabel\n ));\n }\n\n $this->_totals['grand_total'] = new Varien_Object(array(\n 'code' => 'grand_total',\n 'strong' => true,\n 'value' => $this->getSource()->getGrandTotal(),\n 'base_value' => $this->getSource()->getBaseGrandTotal(),\n 'bluesnap_value' => $this->getSource()->getBluesnapGrandTotal(),\n 'label' => $this->helper('sales')->__('Grand Total'),\n 'area' => 'footer'\n ));\n\n\n //end parent totals\n\n $this->_totals['paid'] = new Varien_Object(array(\n 'code' => 'paid',\n 'strong' => true,\n 'value' => $this->getSource()->getTotalPaid(),\n 'base_value' => $this->getSource()->getBaseTotalPaid(),\n 'bluesnap_value' => $this->getSource()->getBluesnapTotalPaid(),\n 'label' => $this->helper('sales')->__('Total Paid'),\n 'area' => 'footer'\n ));\n $this->_totals['refunded'] = new Varien_Object(array(\n 'code' => 'refunded',\n 'strong' => true,\n 'value' => $this->getSource()->getTotalRefunded(),\n 'base_value' => $this->getSource()->getBaseTotalRefunded(),\n 'bluesnap_value' => $this->getSource()->getBluesnapTotalRefunded(),\n 'label' => $this->helper('sales')->__('Total Refunded'),\n 'area' => 'footer'\n ));\n $this->_totals['due'] = new Varien_Object(array(\n 'code' => 'due',\n 'strong' => true,\n 'value' => $this->getSource()->getTotalDue(),\n 'base_value' => $this->getSource()->getBaseTotalDue(),\n 'bluesnap_value' => $this->getSource()->getBluesnapTotalDue(),\n\n 'label' => $this->helper('sales')->__('Total Due'),\n 'area' => 'footer'\n ));\n return $this;\n }", "public function testTotalMonthlyPrice()\n {\n }", "public function testAroundCollectTotals()\n {\n $quoteItemId = 1;\n $quoteId = 1;\n $productId = 10;\n $sku = 'sku';\n $expectedSkus = [$sku];\n\n $this->quote->expects($this->atLeastOnce())->method('getData')->willReturn(true);\n $quote = $this->quote;\n $closure = function () use ($quote) {\n return $quote;\n };\n $quoteItem = $this->getMockBuilder(\\Magento\\Quote\\Model\\Quote\\Item::class)\n ->disableOriginalConstructor()\n ->setMethods(['getProductId', 'isDeleted', 'getItemId', 'getSku'])\n ->getMock();\n $quoteItem->expects($this->atLeastOnce())->method('getItemId')->willReturn($quoteItemId);\n $quoteItem->expects($this->atLeastOnce())->method('getProductId')->willReturn($productId);\n $quoteItem->expects($this->atLeastOnce())->method('getSku')->willReturn($sku);\n $quoteItem->expects($this->atLeastOnce())->method('isDeleted')->willReturn(true);\n $this->quote->expects($this->atLeastOnce())->method('getItemsCollection')->willReturn([$quoteItem]);\n $this->quote->expects($this->atLeastOnce())->method('getItemById')->with($quoteItemId)->willReturn($quoteItem);\n $this->quote->expects($this->atLeastOnce())->method('getId')->willReturn($quoteId);\n $this->itemRemove->expects($this->atLeastOnce())->method('setNotificationRemove')\n ->with(\n $quoteId,\n $productId,\n $expectedSkus\n );\n\n $this->quotePlugin->aroundCollectTotals($this->quote, $closure);\n }", "private function dataHasTotal()\n {\n return array_key_exists('total', $this->data);\n }", "public function includesExactTotalCountByDefault()\n {\n return $this->includeExactTotalCountByDefault ?? false;\n }", "public function subtotal();", "public function applyTotals ( ) {\n\t\t# Prepare\n\t\t$InvoiceItem = $this;\n\t\t\n\t\t# Apply Totals\n\t\tBal_Payment_Model_InvoiceItem::applyTotalsModel($InvoiceItem);\n\t\t\n\t\t# Return true\n\t\treturn true;\n\t}", "function client_have_transactions($id)\n{\n $total_transactions = 0;\n $total_transactions += total_rows('tblinvoices', array(\n 'clientid' => $id\n ));\n $total_transactions += total_rows('tblestimates', array(\n 'clientid' => $id\n ));\n $total_transactions += total_rows('tblexpenses', array(\n 'clientid' => $id,\n 'billable' => 1\n ));\n $total_transactions += total_rows('tblproposals', array(\n 'rel_id' => $id,\n 'rel_type' => 'client'\n ));\n\n if ($total_transactions > 0) {\n return true;\n }\n\n return false;\n}", "public static function canDisplaySummaryOfTotalsMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_SUMMARY_OF_TOTALS_REPORT);\n\t}", "abstract public function countTotal();", "public function testGetRowsHavingFilterNotSelected() {\n $params = [\n 'report_id' => 'contribution/contributions',\n 'contribution_total_amount_sum_op' => 'lte',\n 'contribution_total_amount_sum_value' => '1000',\n 'group_bys' => [\n 'contribution_financial_type_id' => '1',\n 'contribution_campaign_id' => '1',\n ],\n 'order_bys' => [['column' => 'contribution_source', 'order' => 'ASC']],\n ];\n $this->callAPISuccess('ReportTemplate', 'getrows', $params)['values'];\n }", "public function getGrandTotal();", "protected function _initTotals()\n {\n $source = $this->getSource();\n\n $this->_totals = [];\n $this->_totals['subtotal'] = new \\Magento\\Framework\\DataObject(\n ['code' => 'subtotal', 'value' => $source->getSubtotal(), 'label' => __('Subtotal')]\n );\n\n if ((double)$this->getOrder()->getPayment()->getAdditionalInformation('paypal_custom_fee') != 0) {\n $this->_totals['paypal_fee'] = new \\Magento\\Framework\\DataObject(\n [\n 'code' => 'paypal_fee',\n 'field' => 'paypal_fee',\n 'value' => $this->getOrder()->getPayment()->getAdditionalInformation('paypal_custom_fee'),\n 'label' => $this->getOrder()->getPayment()->getAdditionalInformation('base_paypal_custom_fee_description'),\n ]\n );\n }\n\n\n /**\n * Add discount\n */\n if ((double)$this->getSource()->getDiscountAmount() != 0) {\n if ($this->getSource()->getDiscountDescription()) {\n $discountLabel = __('Discount (%1)', $source->getDiscountDescription());\n } else {\n $discountLabel = __('Discount');\n }\n $this->_totals['discount'] = new \\Magento\\Framework\\DataObject(\n [\n 'code' => 'discount',\n 'field' => 'discount_amount',\n 'value' => $source->getDiscountAmount(),\n 'label' => $discountLabel,\n ]\n );\n }\n\n /**\n * Add shipping\n */\n if (!$source->getIsVirtual() && ((double)$source->getShippingAmount() || $source->getShippingDescription())) {\n $label = __('Shipping & Handling');\n if ($this->getSource()->getCouponCode() && !isset($this->_totals['discount'])) {\n $label = __('Shipping & Handling (%1)', $this->getSource()->getCouponCode());\n }\n\n $this->_totals['shipping'] = new \\Magento\\Framework\\DataObject(\n [\n 'code' => 'shipping',\n 'field' => 'shipping_amount',\n 'value' => $this->getSource()->getShippingAmount(),\n 'label' => $label,\n ]\n );\n }\n\n $this->_totals['grand_total'] = new \\Magento\\Framework\\DataObject(\n [\n 'code' => 'grand_total',\n 'field' => 'grand_total',\n 'strong' => true,\n 'value' => $source->getGrandTotal(),\n 'label' => __('Grand Total'),\n ]\n );\n\n /**\n * Base grandtotal\n */\n if ($this->getOrder()->isCurrencyDifferent()) {\n $this->_totals['base_grandtotal'] = new \\Magento\\Framework\\DataObject(\n [\n 'code' => 'base_grandtotal',\n 'value' => $this->getOrder()->formatBasePrice($source->getBaseGrandTotal()),\n 'label' => __('Grand Total to be Charged'),\n 'is_formated' => true,\n ]\n );\n }\n return $this;\n }", "private function _calculateTotalsIn()\n {\n $inStockStatus = self::$IN_STOCK_STATUS;\n $sql = new SqlStatement();\n $sql->select(array(\n 'af.group_id', \n 'af.product_id', \n 'af.type',\n 'value' => 'IF(type = \\'STOCK_STATUS\\' AND p.quantity > 0, ' . $inStockStatus . ', value)'))\n ->from(array('af' => self::FILTERS_TABLE))\n ->innerJoin(array('p' => 'product'), 'af.product_id = p.product_id')\n ->innerJoin(array('exclude' => self::RESULTS_TABLE), 'af.product_id = exclude.product_id');\n \n if ($this->conditions->price) {\n if ($this->conditions->price->min) {\n $sql->where(\"{$this->subquery->actualPrice} >= ?\", array($this->conditions->price->min));\n }\n if ($this->conditions->price->max) {\n $sql->where(\"{$this->subquery->actualPrice} <= ?\", array($this->conditions->price->max));\n }\n }\n \n if ($this->conditions->rating) {\n $sql->where('ROUND(total) IN ('. implode(',', $this->conditions->rating[0]) . ')');\n }\n \n if ( self::$HIDE_OUT_OF_STOCK ) {\n $sql->leftJoin(array('pov' => 'product_option_value'), 'af.product_id = pov.product_id AND af.value = pov.option_value_id AND af.type = \"OPTION\"')\n ->leftJoin(array('pov1' => 'product_option_value'), 'p.product_id = pov1.product_id')\n ->where('( (pov1.quantity IS NULL AND p.quantity > 0) OR '\n . '(pov1.quantity > 0 AND af.type != \"OPTION\") OR '\n . 'pov.quantity > 0 )')\n ->group(array('af.type', 'group_id', 'value', 'p.product_id'));\n }\n \n $sql2 = new SqlStatement();\n $sql2->select(array(\n 'id' => \"af.group_id\", \n 'val' => 'af.value', \n 'c' => 'COUNT(*)',\n 'type' => 'af.type',\n ))\n ->from(array('af' => $sql))\n ->group(array('af.type', 'af.group_id', 'af.value'));\n \n if (count($this->aggregate)) {\n foreach ($this->aggregate as $type => $group) {\n $sql2->where(\"((af.type = '$type' AND af.group_id NOT IN (\" . implode(',', array_keys($group)) . \")) OR af.type != '$type')\");\n }\n }\n \n $res = $this->db->query($sql2);\n \n return $res->rows;\n }", "public function testCreateFromOrderWithATotalOf10ShouldReturnAnInvoiceWithTotalOf10()\n {\n $order = new Order();\n $order->setTotal(10);\n $invoice = $this->invoiceFactory->createFromOrder($order);\n static::assertEquals(10, $invoice->getTotal());\n }", "function traff_agrupate_subtotals( &$agrupation, $traff_all, $offset, $groupby, $countby)\n{\n\tif( !is_array($countby) ||( count($countby) != 1 && count($countby) != 2))\n\t\treturn false;\n\n\t// Reseteo los contadores de $agrupation.\n\t$agrupation->count = count($countby)==2 ? array(0, 0) : array(0);\n\t$agrupation->subtotal = 0;\n\n\t$c_groupby = $traff_all[ $offset][ $groupby];\n\t\n\tfor( $n = $offset; $n >= 0; $n --)\n\t{\n\t\t$item = $traff_all[ $n];\n\t\n\t\tif( $c_groupby != $item[ $groupby])\n\t\t{\n\t\t\t// Cambio la agrupacion. Este elemento ya no lo consideramos.\n\t\t\tbreak;\n\t\t}\n\n\t\t// Sumamos los contadores.\n\t\t$agrupation->subtotal += ( float)$item['importe'];\n\t\t$agrupation->count[0] += ( float)$item[$countby[0]];\n\t\tif(count($countby) == 2)\n\t\t\t$agrupation->count[1] += ( float)$item[$countby[1]];\n\t}\n\n\treturn true;\n}", "protected function _initTotals()\n {\n $source = $this->getSource();\n\n $this->_totals = array();\n $this->_totals['subtotal'] = new Varien_Object(array(\n 'code' => 'subtotal',\n 'value' => $source->getSubtotal(),\n 'label' => $this->__('Subtotal')\n ));\n\n\n /**\n * Add shipping\n */\n if (!$source->getIsVirtual() && ((float) $source->getShippingAmount() || $source->getShippingDescription()))\n {\n $this->_totals['shipping'] = new Varien_Object(array(\n 'code' => 'shipping',\n 'field' => 'shipping_amount',\n 'value' => $this->getSource()->getShippingAmount(),\n 'label' => $this->__('Shipping & Handling')\n ));\n }\n\n /**\n * Add discount\n */\n if (((float)$this->getSource()->getDiscountAmount()) != 0) {\n if ($this->getSource()->getDiscountDescription()) {\n $discountLabel = $this->__('Discount (%s)', $source->getDiscountDescription());\n } else {\n $discountLabel = $this->__('Discount');\n }\n $this->_totals['discount'] = new Varien_Object(array(\n 'code' => 'discount',\n 'field' => 'discount_amount',\n 'value' => $source->getDiscountAmount(),\n 'label' => $discountLabel\n ));\n }\n\n $this->_totals['grand_total'] = new Varien_Object(array(\n 'code' => 'grand_total',\n 'field' => 'grand_total',\n 'strong'=> true,\n 'value' => $source->getGrandTotal(),\n 'label' => $this->__('Grand Total')\n ));\n\n /**\n * Base grandtotal\n */\n if ($this->getOrder()->isCurrencyDifferent()) {\n $this->_totals['base_grandtotal'] = new Varien_Object(array(\n 'code' => 'base_grandtotal',\n 'value' => $this->getOrder()->formatBasePrice($source->getBaseGrandTotal()),\n 'label' => $this->__('Grand Total to be Charged'),\n 'is_formated' => true,\n ));\n }\n return $this;\n }", "public function testCartTotalAmount()\n {\n $items = new MollieLineItemCollection([\n new MollieLineItem(\n '',\n '',\n 1,\n new LineItemPriceStruct(2.73, 2.73, 0.44, 19),\n '',\n '',\n '',\n ''\n ),\n new MollieLineItem(\n '',\n '',\n 2,\n new LineItemPriceStruct(1, 2, 0.47, 19),\n '',\n '',\n '',\n ''\n ),\n ]);\n\n $this->assertEquals(4.73, $items->getCartTotalAmount());\n }", "final public function addCanMakeATotal(): void\n {\n $this->assertEquals(2, add(1, 1));\n $this->assertEquals(0, add(1, -1));\n $this->assertEquals(-2, add(-1, -1));\n $this->assertEquals(3, add(1, 2));\n $this->assertEquals(-1, add(1, -2));\n $this->assertEquals(1234567940, add(50, 1234567890));\n // Test overflow\n $this->assertEquals(PHP_INT_MIN, add(1, PHP_INT_MAX));\n $this->assertEquals(PHP_INT_MAX, add(-1, PHP_INT_MIN));\n // This add function works on int not floats\n $this->assertEquals(2, add(1.1, 1.1));\n }", "public function testAggregate()\n {\n $client = static::createClient();\n $client->request('GET', '/include.php?part=meta');\n $this->assertContains('href=\"http://localhost/style_', $client->getResponse()->getContent());\n }", "public function testSumAccountBalancePerformsOperation()\n {\n \t//TODO Implement\n// \t$mock = $this->getMock('Financial_Library_Reports_BalanceSheet');\n// \t$mock->expects($this->once())\n// \t\t->method('getSection')\n// \t\t->with($this->equalTo('revenue'));\n\t\t$stubResult = array('fooAccount'=>10.54,'barAccount'=>10,'foobaraccount'=>80);\n\t\t$report = new Financial_Library_Reports_BalanceSheet();\n\t\t$result = $report->sumAccountBalance($stubResult);\n\t\t$this->assertEquals(100.54, $result,'The obtained sum should be the same',0.001);\n }" ]
[ "0.6468725", "0.61584353", "0.61541104", "0.61541104", "0.61541104", "0.61541104", "0.61541104", "0.6009728", "0.59305", "0.5900423", "0.5868993", "0.58609045", "0.5784935", "0.5773006", "0.57543004", "0.57496685", "0.57306576", "0.5725652", "0.5710329", "0.5680534", "0.56702113", "0.56289095", "0.5623014", "0.56225854", "0.5575959", "0.55566245", "0.55418396", "0.5486859", "0.54719216", "0.54541767" ]
0.7849056
0
Test that we can create, update, and delete a Client Grant.
public function testCreateUpdateDeleteGrant() { $client_id = self::$env['APP_CLIENT_ID']; $audience = self::$apiIdentifier; // Create a Client Grant with just one of the testing scopes. $create_result = self::$api->create($client_id, $audience, [self::$scopes[0]]); usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP); $this->assertArrayHasKey('id', $create_result); $this->assertEquals($client_id, $create_result['client_id']); $this->assertEquals($audience, $create_result['audience']); $this->assertEquals([self::$scopes[0]], $create_result['scope']); $grant_id = $create_result['id']; // Test patching the created Client Grant. $update_result = self::$api->update($grant_id, self::$scopes); usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP); $this->assertEquals(self::$scopes, $update_result['scope']); // Test deleting the created Client Grant. $delete_result = self::$api->delete($grant_id); usleep(AUTH0_PHP_TEST_INTEGRATION_SLEEP); $this->assertNull($delete_result); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function test_machine_user_can_perform_client_credentials_grant() {\n\n $user = factory(User::class)->create();\n\n $createdClientResponse = $this->log_in_and_create_client_for_user($user);\n\n // so you can logout for client credentials grant!\n auth()->logout();\n\n $response = $this->json('post', '/oauth/token', [\n 'grant_type' => 'client_credentials',\n 'client_id' => $createdClientResponse->json('id'),\n 'client_secret' => $createdClientResponse->json('secret'),\n 'scope' => '*',\n ])->assertJson([\n 'token_type' => 'Bearer',\n ])->assertJsonStructure([\n 'token_type',\n 'expires_in',\n 'access_token',\n ]);\n\n }", "public function testCreateClient() {\n\n $this->withoutMiddleware();\n\n // Generate one user and one client\n $user = factory(App\\User::class)->create();\n $client = factory(App\\Client::class)->make(['phone_number' => '0725433317']);\n\n $this->actingAs($user)\n ->post('/clients/create', ['name' => $client->name, 'phone' => $client->phone_number])\n ->seeJson(['success' => true]);\n\n }", "public function testDeleteClient() {\n\n // Generate user and client\n $user = factory(App\\User::class)->create();\n $client = $user->clients()->save(factory(App\\Client::class)->make());\n\n $this->actingAs($user)\n ->get('/clients/' . $client->id . '/delete')\n ->seeJson(['success' => true]);\n\n }", "public function testCreateGrantExceptions()\n {\n $throws_missing_client_id_exception = false;\n try {\n self::$api->create('', self::$apiIdentifier, []);\n } catch (CoreException $e) {\n $throws_missing_client_id_exception = $this->errorHasString($e, 'Empty or invalid \"client_id\" parameter');\n }\n\n $this->assertTrue($throws_missing_client_id_exception);\n\n $throws_missing_audience_exception = false;\n try {\n self::$api->create(self::$env['APP_CLIENT_ID'], '', []);\n } catch (CoreException $e) {\n $throws_missing_audience_exception = $this->errorHasString($e, 'Empty or invalid \"audience\" parameter');\n }\n\n $this->assertTrue($throws_missing_audience_exception);\n }", "public function test_SaveClientOK(){\n\t\t// Popula variável com os dados do cliente\n\t\t$cliente = $this->dataGenerator->getCliente();\n\t\t// Popula dados da requisição\n\t\t$this->populateData($cliente['Cliente']['login'], $cliente['Cliente']['raw_password']);\n\t\t// Envia requisição e armazena resposta\n\t\t$response = $this->sendRequest($this->fullURL, 'POST', $this->data);\n\t\t// Valida se os campos de resposta são válidos\n\t\t$this->assertNotNull($response);\n\t\t$this->assertNotEmpty($response);\n\t\t$this->assertNotNull($response['client_id']);\n\t\t$this->assertNotEmpty($response['client_id']);\n\t\t// Extrai os dados do cliente retornados\n\t\t$clientId = $response['client_id'];\n\t\t// Busca na base esse cliente, para compara se a senha foi gerada corretamente\n\t\t$dataBaseClient = $this->Cliente->findById($clientId);\n\t\t// Valida se encontrou o cliente com o id retornado\n\t\t$this->assertNotNull($dataBaseClient);\n\t\t$this->assertNotEmpty($dataBaseClient);\n\t\t// Valida os dados da base com o objeto do cliente \n\t\t$this->assertEquals($cliente['Cliente']['tipo'], $dataBaseClient['Cliente']['tipo']);\n\t\t$this->assertEquals($cliente['Cliente']['login'], $dataBaseClient['Cliente']['login']);\n\t\t$this->assertEquals($cliente['Cliente']['senha'], $dataBaseClient['Cliente']['senha']);\n\t\t$this->assertEquals($cliente['Cliente']['ativo'], $dataBaseClient['Cliente']['ativo']);\n\t}", "public function testCreate(): void\n {\n $factory = new ClientFactory(\n $cache = $this->createMock(CacheItemPoolInterface::class),\n $logger = new BufferingLogger()\n );\n\n $client = $factory->create(\n [\n 'client_id' => uniqid(),\n 'client_secret' => uniqid(),\n 'project' => uniqid(),\n 'scope' => ['manage_project']\n ],\n [\n 'locale' => 'de',\n 'languages' => ['de']\n ]\n );\n\n static::assertInstanceOf(Client::class, $client);\n }", "public function testQuarantineCreate()\n {\n\n }", "public function testAuthenticationsInweboIdPut()\n {\n }", "public function testAdd()\n\t{\n\t\t$client = static::createClient(array(), array(\n\t\t 'PHP_AUTH_USER' => 'jr',\n\t\t 'PHP_AUTH_PW' => 'jr',\n\t\t));\n\t\t$client->followRedirects();\n\n\t\t$crawler = $client->request('GET', '/client/add');\n\n\t\t$form = $crawler->selectButton('flyd_dashboardbundle_client_save')->form();\n\n\t\t// définit certaines valeurs\n\t\t$form['flyd_dashboardbundle_client[name]'] \t\t= 'Entreprise de test';\n\t\t$form['flyd_dashboardbundle_client[job]'] \t\t= 'Job de test';\n\n\t\t// soumet le formulaire\n\t\t$crawler = $client->submit($form);\n\n\n\t\t$this->assertEquals(1, $crawler->filter('html:contains(\"Client bien enregistré.\")')->count());\n\t}", "public function testReAuthoriseAccountUsingPATCH()\n {\n }", "public function testLogin(){\n $client00 = static::createClient();\n $client00->request('POST', '/booking/calendar');\n \n $this->assertEquals(\n 405, //METHOD NOT ALLOWED\n $client00->getResponse()->getStatusCode()\n );\t\t\n \n $client01 = $this->createAuthorizedClient();\n $client01->request('POST','/booking/calendar');\n $this->assertEquals(\n 405, //METHOD NOT ALLOWED\n $client01->getResponse()->getStatusCode()\n );\t\n //Requests con GET\n $client02 = $this->createAuthorizedClient();\n $client02->request('GET','/booking/calendar');\n $this->assertEquals(\n 200, //OK\n $client02->getResponse()->getStatusCode()\n ); \n //Usuario no autorizado\n $client03 = static::createClient();\n $client03->request('GET', '/booking/calendar');\n \n //redireccionado porque no tiene los permisos necesarios\n $this->assertTrue($client03->getResponse()->isRedirect()); \n }", "public function testBaseUserACL() :void\n {\n $generator = Factory::create();\n\n $data = [\n \"params\" => [\n \"name\" => $generator->name\n ],\n \"options\" => [\n \"simplifiedParams\" => true\n ]\n ];\n\n /** Login with right password **/\n $response = $this->json('POST', '/auth/authenticate', ['email' => env('BASE_USER_EMAIL'), 'password' => env('BASE_USER_PASSWORD')]);\n $tokenResult = $response->decodeResponseJson();\n $response->assertResponseStatus(200);\n\n /** Free port acl **/\n $response = $this->json('GET', '/auth/me', [], ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $result = $response->decodeResponseJson();\n $this->assertEquals($result['email'], env('BASE_USER_EMAIL'));\n\n /** Posting artist as a admin **/\n $response = $this->json('POST', '/contexts/admin/artists', $data, ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $result = $response->decodeResponseJson();\n $response->assertResponseStatus(201);\n /** This means the records is to be inserted and admin has access **/\n //$this->assertEquals($result['message'], 'Transaction commit failed because the transaction has been marked for rollback only.');\n }", "public function testGetAuthorizationRoleSubjectgrants()\n {\n }", "public function contract_belongs_to_client()\n {\n $this->assertEquals(self::$contract->client->id, self::$contract->client_id);\n }", "public function testClientIsCreatedWithConstructor(): void\r\n {\r\n $tx = $this->getTx();\r\n $client = $this->client;\r\n\r\n $transaction = new Transaction($tx, $client);\r\n $client = $transaction->getClient();\r\n\r\n $this->assertNotNull($client);\r\n $this->assertEquals(\\FOXRP\\Rippled\\Client::class, \\get_class($client));\r\n }", "public function testValidCredentialsInHeader()\n {\n $server = $this->getTestServer();\n $headers = array('HTTP_AUTHORIZATION' => 'Basic '.base64_encode('Test Client ID:TestSecret'), 'REQUEST_METHOD' => 'POST');\n $params = array('grant_type' => 'client_credentials');\n $request = new Request(array(), $params, array(), array(), array(), $headers);\n $token = $server->grantAccessToken($request, new Response());\n\n $this->assertNotNull($token);\n $this->assertArrayHasKey('access_token', $token);\n $this->assertNotNull($token['access_token']);\n\n // create using PHP Authorization Globals\n $headers = array('PHP_AUTH_USER' => 'Test Client ID', 'PHP_AUTH_PW' => 'TestSecret', 'REQUEST_METHOD' => 'POST');\n $params = array('grant_type' => 'client_credentials');\n $request = new Request(array(), $params, array(), array(), array(), $headers);\n $token = $server->grantAccessToken($request, new Response());\n\n $this->assertNotNull($token);\n $this->assertArrayHasKey('access_token', $token);\n $this->assertNotNull($token['access_token']);\n }", "public function testPutAuthorizationRoleUsersAdd()\n {\n }", "public function run()\n {\n // Default user\n\n $user = User::first();\n\n Client::insert([\n // Authorization Code grant client\n\n [\n 'id' => '229f9dfd-8a91-4dfa-90db-00ba966ed1ef',\n 'user_id' => $user->id,\n 'name' => 'dev-auth-code-grant-client',\n 'secret' => 'BZQVA2FBPNPhAc0BtqCjndQVSA1TQUJMzJADJrdt',\n 'redirect' => '',\n 'personal_access_client' => false,\n 'password_client' => false,\n 'revoked' => false,\n 'created_at' => now(),\n 'updated_at' => now(),\n ],\n\n // Password grant client\n\n [\n 'id' => '1bf0b03e-1c62-45e3-bf18-c5989cb43dde',\n 'user_id' => $user->id,\n 'name' => 'dev-password-grant-client',\n 'secret' => 'S8xqNQxus0L4cCJA8lQ4nKLayIQjfc4YOXz9MSWp',\n 'redirect' => '',\n 'personal_access_client' => false,\n 'password_client' => true,\n 'revoked' => false,\n 'created_at' => now(),\n 'updated_at' => now(),\n ],\n ]);\n\n // Personal access token client\n\n $client = new Client();\n // $client->id = '84031037-7d29-491a-99ac-340ff14e1001';\n $client->user_id = $user->id;\n $client->name = 'dev-personal-client';\n $client->secret = 'ViSqJ6if7ZgUK6ysaBZF61MKb8bYPRIdjOTzK7oT';\n $client->redirect = '';\n $client->personal_access_client = true;\n $client->password_client = false;\n $client->revoked = false;\n $client->save();\n\n $personal_client = new PersonalAccessClient();\n $personal_client->client()->associate($client);\n $client->save();\n }", "public function testEdit()\n\t{\n\t\t$client = static::createClient(array(), array(\n\t\t 'PHP_AUTH_USER' => 'jr',\n\t\t 'PHP_AUTH_PW' => 'jr',\n\t\t));\n\t\t$client->followRedirects();\n\n\t\t// On clique sur le lien entreprise de test\n\t\t$crawler = $client->request('GET', '/clients');\n\t\t$link = $crawler->filter('.bloc__title a:contains(\"Entreprise de test\")')->first()->link();\n\t\t$crawler = $client->click($link);\n\t\t//On vérifie qu'on est bien sur la bonne page\n\t\t$this->assertEquals(1, $crawler->filter('h1:contains(\"Entreprise de test\")')->count());\n\n\t\t// On clique sur le bouton modifier\n\t\t$link = $crawler->filter('.btn--edit')->first()->link();\n\t\t$crawler = $client->click($link);\n\t\t//On vérifie qu'on est bien sur la bonne page\n\t\t$this->assertEquals(1, $crawler->filter('.breadcrumb:contains(\"Modifier\")')->count()); \n\n\t\t// On modifie le métier\n\t\t$form = $crawler->selectButton('Enregistrer')->form();\n\t\t$form['flyd_dashboardbundle_client[job]'] \t= 'Job de test modifié ' . rand(1,4);\n\t\t$crawler = $client->submit($form);\t\n\n\n\t\t//On vérifie que ça a marché\n\t\t$this->assertEquals(1, $crawler->filter('html:contains(\"Client bien enregistré.\")')->count());\n\n\t}", "public function client_setter_and_getter()\n {\n // Arrange\n $service = new Service;\n $client = new Client;\n\n // Act\n $returned = $service->setClient($client)->getClient();\n\n // Assert\n $this->assertEquals($client, $returned);\n }", "public function testGetToken()\n {\n $client = new Client();\n\n $body['grant_type'] = \"client_credentials\";\n $user = 'testclient';\n $pass = 'testpass';\n $res = $client->post($this->baseUrl . '/token', [ \n 'form_params' => $body,\n 'auth' => [$user, $pass] \n ]);\n\n $code = $res->getStatusCode();\n $body = $res->getBody();\n\n $this->assertEquals(200, $code);\n }", "public function testDeleteNotExistentClient() {\n\n // Generate user\n $user = factory(App\\User::class)->create();\n\n $this->actingAs($user)\n ->get('/clients/' . rand(1,999) . '/delete')\n ->seeJson(['success' => false]);\n\n }", "public function setClientId(string $clientId): AuthorizationInterface;", "public function testSetClient()\n {\n $change = new Change($this->p4);\n $change->setDescription('test')->save();\n $oldClient = $change->getClient();\n\n $this->p4->getService('clients')->grab();\n $change->setClient($this->p4->getClient());\n $change->save();\n $this->p4->getService('clients')->release();\n\n $this->assertFalse(\n $oldClient == Change::fetch($change->getId(), $this->p4)->getClient(),\n 'expected client change to have saved.'\n );\n }", "public function testAclMiddleware():void\n {\n $generator = Factory::create();\n $em = $this->em();\n $conn = $em->getConnection();\n $conn->beginTransaction();\n try {\n /** Register user via the guest endpoint **/\n $response = $this->json(\n 'POST', '/contexts/guest/users',\n [\n \"params\" => [\n 'email' => $generator->safeEmail,\n 'firstName'=> $generator->firstName,\n 'middleInitial'=>'X',\n 'lastName'=> $generator->lastName,\n 'age' => $generator->randomNumber(2),\n 'gender' => 1,\n 'weight' => 210,\n 'height' => 180.34,\n 'phoneNumber' => \"+1 757-571-2711\",\n 'lifestyle' => 1,\n 'password' => $this->password,\n 'job' => $generator->jobTitle,\n 'address' => $generator->address,\n 'locale' => \"en\"\n ],\n \"options\" => [\n \"email\" => false,\n \"g-recaptcha-response-omit\" => env('GOOGLE_RECAPTCHA_SKIP_CODE') /** skipping recaptcha with a key **/\n ]\n ]\n );\n $userResult = $response->decodeResponseJson();\n $this->assertArrayHasKey('id', $userResult);\n\n /** Making sure user has email verification entry **/\n $emailVerificationRepository = new EmailVerificationRepository();\n $emailVerification = $emailVerificationRepository->findOneBy([\"user\" => $userResult[\"id\"]]);\n $this->assertEquals( $emailVerification->getUser()->getId(), $userResult['id']);\n $this->assertEquals( $emailVerification->getVerified(), false);\n\n /** Email verification endpoint **/\n $response = $this->json(\n 'PUT', \"/contexts/guest/email-verification/\" . $emailVerification->getId(),\n [\n \"params\" => [ \"verified\" => true ],\n \"options\" => [ \"simplifiedParams\" => true ]\n ]\n );\n $response->assertResponseStatus(200);\n\n /** Making sure user has user has role entry of 'user' **/\n $userRepository = new UserRepository();\n /** @var User $user */\n $user = $userRepository->find($userResult[\"id\"]);\n $this->assertEquals( $user->getId(), $userResult['id']);\n $this->assertEquals( $user->getRoles()[0]->getName(), 'user');\n\n /** Login with wrong password **/\n $response = $this->json('POST', '/auth/authenticate', ['email' => $user->getEmail(), 'password' => 'wrong_password']);\n $response->assertResponseStatus(401);\n\n /** Login with right password **/\n $response = $this->json('POST', '/auth/authenticate', ['email' => $user->getEmail(), 'password' => $this->password]);\n $tokenResult = $response->decodeResponseJson();\n $response->assertResponseStatus(200);\n\n /** Free port acl **/\n $response = $this->json('GET', '/auth/me', [], ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $result = $response->decodeResponseJson();\n $this->assertEquals($result['email'], $user->getEmail());\n\n $data = [\n \"params\" => [\n \"name\" => $generator->name\n ],\n \"options\" => [\n \"simplifiedParams\" => true\n ]\n ];\n\n /** Posting artist as a quest **/\n $response = $this->json('POST', '/contexts/guest/artists', $data, ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $response->assertResponseStatus(405);\n\n /** Posting artist as a user **/\n $response = $this->json('POST', '/contexts/user/artists', $data, ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $result = $response->decodeResponseJson();\n $response->assertResponseStatus(500);\n\n /** Posting artist as a admin **/\n $response = $this->json('POST', '/contexts/admin/artists', $data, ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $response->assertResponseStatus(403);\n\n /** Posting artist as a super-admin **/\n $response = $this->json('POST', '/contexts/super-admin/artists', $data, ['HTTP_AUTHORIZATION'=>'Bearer ' . $tokenResult['token']]);\n $response->assertResponseStatus(404);\n $conn->rollBack();\n } catch (Exception $e) {\n $conn->rollBack();\n throw $e;\n }\n }", "public function testPutAuthorizationRole()\n {\n }", "public function testAddEditDeleteOffer()\n {\n \t$characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t $charactersLength = strlen($characters);\n\t $name = '';\n\t for ($i = 0; $i < 8; $i++) {\n\t $name .= $characters[rand(0, $charactersLength - 1)];\n\t }\n\n \t$new_offer = array(\n \t\t\"name\" => $name,\n \t\t\"price\" => 123,\n \t\t\"nb_videos\" => 123,\n \t\t\"storage_allowed\" => 123\n \t);\n\n $client = static::createClient();\n $crawler = $client->request(\n \t'POST',\n \t'/offer/add',\n\t\t $new_offer,\n\t\t array(),\n\t\t array(\n\t\t 'HTTP_X-Auth-Token' => 'b9030ce5a6a63aa9afab0ca69dbc7349fce8c1e46c3795d956',\n\t\t 'CONTENT_TYPE' => 'application/json',\n\t\t )\n\t\t);\n\n\t\t$response = $client->getResponse()->getContent();\n\t\t$response = json_decode($response);\n\n // Response must be JSON\n $this->assertTrue(\n\t\t $client->getResponse()->headers->contains(\n\t\t 'Content-Type',\n\t\t 'application/json'\n\t\t ),\n\t\t 'the \"Content-Type\" header is \"application/json\"' // optional message shown on failure\n\t\t);\n\n // The HTTP status code must be 200\n\t\t$this->assertEquals(\n\t\t 201,\n\t\t $client->getResponse()->getStatusCode()\n\t\t);\n\n // Response must be JSON\n $this->assertTrue(\n\t\t isset( $response->{'offer_id'} ),\n\t\t 'the \"offer_id\" data is part of the response' // optional message shown on failure\n\t\t);\n\n\t\t// Get the ID of the newly created offer\n\t\t$offer_id = $response->{'offer_id'};\n\n\n\n\t\t// Test the edition of the offer\n\t\t// Set the new Data\n\t\t// Set a name for the offer\n \t$characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t $charactersLength = strlen($characters);\n\t $name = '';\n\t for ($i = 0; $i < 8; $i++) {\n\t $name .= $characters[rand(0, $charactersLength - 1)];\n\t }\n\n \t$new_data = array(\n \t\t\"name\" => $name,\n \t\t\"price\" => 456,\n \t\t\"nb_videos\" => 0,\n \t\t\"storage_allowed\" => 456\n \t);\n\n $crawler = $client->request(\n \t'PUT',\n \t'/offer/'.$offer_id.'/edit',\n\t\t $new_data,\n\t\t array(),\n\t\t array(\n\t\t 'HTTP_X-Auth-Token' => 'b9030ce5a6a63aa9afab0ca69dbc7349fce8c1e46c3795d956',\n\t\t 'CONTENT_TYPE' => 'application/json',\n\t\t )\n\t\t);\n\n // Response must be JSON\n $this->assertTrue(\n\t\t $client->getResponse()->headers->contains(\n\t\t 'Content-Type',\n\t\t 'application/json'\n\t\t ),\n\t\t 'the \"Content-Type\" header is \"application/json\"' // optional message shown on failure\n\t\t);\n\n // The HTTP status code must be 200\n\t\t$this->assertEquals(\n\t\t 200,\n\t\t $client->getResponse()->getStatusCode()\n\t\t);\n\n\n\n\t\t// Test the deletion of the offer\n $crawler = $client->request(\n \t'DELETE',\n \t'/offer/'.$offer_id.'/delete',\n\t\t array(),\n\t\t array(),\n\t\t array(\n\t\t 'HTTP_X-Auth-Token' => 'b9030ce5a6a63aa9afab0ca69dbc7349fce8c1e46c3795d956',\n\t\t 'CONTENT_TYPE' => 'application/json',\n\t\t )\n\t\t);\n\n\t\t$response = $client->getResponse()->getContent();\n\t\t$response = json_decode($response);\n\n // The HTTP status code must be 200\n\t\t$this->assertEquals(\n\t\t 204,\n\t\t $client->getResponse()->getStatusCode()\n\t\t);\n }", "function testClient()\n{\n\t//adds client to the database\n\tcreateClient('The Business', '1993-06-20', 'LeRoy', 'Jenkins', '1234567890', 'leeroy@gmail.com', 'The streets', 'Las Vegas', 'NV');\n\t\n\t//gets client's information\n\techo \"<h3>Client Info</h3>\";\n\ttest(\"SELECT ClientContact.*, StartDate FROM Client, ClientContact WHERE (Client.clientname=ClientContact.clientname)\");\n\t\n\t//adds client purchase to the database\n\tcreateClientPurchase('The Business','0000-00-00 10-30-00', '2015-02-14');\n\t\n\t//gets client's purchase information\n\techo \"<h3>Client Purchases</h3>\";\n\ttest(\"SELECT * FROM ClientPurchases\");\n\n\t//gets client's information with their purchase information\n\techo \"<h3>Client Info With Purchases</h3>\";\n\ttest(\"SELECT ClientContact.*, StartDate, PurchaseID, HoursPurchased, PurchaseDate FROM Client, ClientContact, ClientPurchases WHERE (Client.clientname=ClientContact.clientname) AND (Client.clientname=ClientPurchases.clientname)\");\n\t\n\t//deletes client's purchase\n\tdeleteClientPurchase('The Business');\n\ttest(\"SELECT * FROM ClientPurchases\");\n\n\t//deletes client\n\tdeleteClient('The Business');\n\ttest(\"SELECT * FROM Client c, ClientPurchases cp, ClientContact cc WHERE (c.ClientName=cp.ClientName)\");\t\n}", "public function testCreateUserGranted()\n {\n $client = $this->createAuthorizedClient('admin');\n $crawler = $client->request('GET', '/issue/view/' . $this->getReference('issue-test')->getCode());\n\n // Page has Comments form\n $this->assertEquals(1, $crawler->filter('html:contains(\"Comments\")')->count());\n\n $form = $crawler->selectButton('Add')->form([\n 'sbts_comment_form[body]' => 'Test comment',\n ]);\n\n $client->followRedirects(true);\n $crawler = $client->submit($form);\n\n // Added comment appear on the page\n $this->assertEquals(1, $crawler->filter('html:contains(\"Test comment\")')->count());\n }", "public function testDeleteClientWithInvalidId() {\n\n // Generate user\n $user = factory(App\\User::class)->create();\n\n $this->actingAs($user)\n ->get('/clients/' . str_shuffle('ab12') . '/delete')\n ->seeJson(['success' => false]);\n\n }" ]
[ "0.6682855", "0.664292", "0.66278887", "0.6474675", "0.63155806", "0.619589", "0.6142597", "0.6067689", "0.6056032", "0.6029367", "0.60248876", "0.5914911", "0.5910681", "0.5909496", "0.5839494", "0.5836691", "0.58031607", "0.5800475", "0.58004636", "0.579917", "0.57944465", "0.5791261", "0.57847905", "0.57840407", "0.5775942", "0.5775267", "0.57692486", "0.5767239", "0.5732625", "0.5727718" ]
0.7718429
0
/$query = $this>db>get('tb_collection'); return $query>result_array();
public function getAllCollection() { return $this->db->get('tb_collection')->result_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function collection() {\n \t$db = $this->db;\n\t\t$sql = $this->sql();\n\t\t$rows = $db::execute($sql);\n\t\t$model = $this->model;\n\t\treturn new \\Collection($model::arrayFactoryFromRows($rows));\n\t}", "public function getCollection($table)\n {\n $sql = 'SELECT * FROM '.$table;\n $result = $this->db->query($sql);\n if($result){\n $ret = array();\n while($data = $result->fetch_assoc()){\n $ret[] = $data;\n }\n $result->close();\n return $ret;\n }else{\n return false;\n }\n }", "public function get_collections()\n\t{\t\t\n\t\t$query = $this->db->get('collections');\n\t\treturn $query->result_array();\n\t}", "public function getCollection() ;", "public function getAll() : Collection;", "public function fetchAll(){\r\n$table=$this->getTable();\r\nreturn $this->fetch_array($this->query(\"SELECT * FROM {$table}\"));\r\n}", "function get_all()\n {\n return $this->db->get($this->table)->result();\n }", "function dbcollection($query, $start = 0, $count = 20) {\n $resrows = array();\n $ii = 0;\n\n $result = dbquery($query . \" limit %d, %d\", $start, $count);\n while ($result && $row = dbfetch($result, DB_NUM)) {\n if (count($row) == 1) {\n // don't keep arrays\n $row = array_shift($row);\n }\n $resrows[$start + $ii] = $row;\n $ii++;\n }\n\n return $resrows;\n}", "function getTWord() {\n //printVar($idStr);\n $mongo = new MongoDB\\Driver\\Manager();\n $query = new MongoDB\\Driver\\Query([], []);\n $cursor = $mongo->executeQuery('callaut.av_search', $query);\n $posts = [];\n foreach ($cursor as $document) {\n //printVar($document);\n //die();\n array_push($posts, json_decode(MongoDB\\BSON\\toJSON(MongoDB\\BSON\\fromPHP($document))));\n \n }\n return $posts;\n \n }", "function get_all(){\n $this->load();\n return $this->query;\n }", "function db_get($sql) {\n $results = db_query($sql);\n $records = array();\n while($rec=db_fetch($results)) {\n $records[]=$rec;\n }\n return $records;\n}", "static function finda($collection, $query = array(), $options = array()) {\r\n\t\t$result = self::find($collection, $query, $options);\r\n\t\t$array = array();\r\n\t\tforeach ($result as $val) {\r\n\t\t\t$array[] = $val;\r\n\t\t}\r\n\t\treturn $array;\r\n\t}", "function get_data()\n\t{\n\t\t$query = $this->db->get(\"Testing\");\n\n\t\treturn $query;\n\t}", "public function queryselect() {\r\n // we should load the database (autoload)\r\n $this->load->database();\r\n $query = $this->db->query('SELECT * FROM crud');\r\n return $query->result_array();\r\n //$result = $query->result_array();\r\n //return $result;\r\n }", "function db_driver_result($resource)\n{\n global $_db;\n\n $results = array();\n while ($data = pg_fetch_array($resource, null, PGSQL_ASSOC)) {\n $results[] = $data;\n }\n\n return $results;\n}", "public function get()\n {\n return self::fetchAll();\n }", "public function fetchArray();", "public function fetchArray();", "public function fetchAll();", "public function fetchAll();", "public function fetchAll();", "public function fetchAll();", "static function finda($collection, $query = array(), $options = array()) {\n $result = self::find($collection, $query, $options);\n $array = array();\n foreach ($result as $val) {\n $array[] = $val;\n }\n return $array;\n }", "public function getCollection();", "public function getCollection();", "public function getCollection();", "public function getCollection();", "function dbGetAll(){\r\n global $db_query;\r\n return $db_query->fetchAll(PDO::FETCH_ASSOC); \r\n}", "public function query() {\n\t\treturn Documents::instance()->query();\n\t}", "function get_ttcollection_w($id){\n\t\t$sQuery=\"SELECT ttcollection_w.CollectionIdW,clientes.cli_des,ttcollection_w.CollectionTotalPayment,\n ttcollection_w.UserCode,ttcollection_w.CustCode,ttcollection_w.CollectionDate,ttcollection_w.CollectionNote,\n ttcollection_w.fecha_a,usuario.nombre,usuario.apellido\n FROM ttcollection_w\n INNER JOIN clientes ON ttcollection_w.CustCode = clientes.co_cli\n INNER JOIN usuario ON ttcollection_w.UserCode = usuario.usuario\n WHERE ttcollection_w.CollectionStatus = $id\";\n\t\t$result=mysql_query($sQuery) or die(mysql_error());\n\t\t$i=0;\n\t\twhile($row=mysql_fetch_array($result)){\n\t\t\tforeach($row as $key=>$value){\n\t\t\t\t$res_array[$i][$key]=$value;\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\treturn($res_array);\t\n\t}" ]
[ "0.7017653", "0.6901569", "0.67929614", "0.67762166", "0.6691817", "0.6596962", "0.65945613", "0.656072", "0.65531754", "0.6491643", "0.64909357", "0.64734757", "0.6461831", "0.64484036", "0.64322704", "0.64143544", "0.6387219", "0.6387219", "0.6370071", "0.6370071", "0.6370071", "0.6370071", "0.63623214", "0.6361543", "0.6361543", "0.6361543", "0.6361543", "0.63438225", "0.6293875", "0.62910885" ]
0.7420564
0
Builds tabs of the Wizard.
function buildTabs() { $this->_formBuilt = true; // Here we get all page names in the controller $pages = array(); $myName = $current = $this->getAttribute('id'); while (null !== ($current = $this->controller->getPrevName($current))) { $pages[] = $current; } $pages = array_reverse($pages); $pages[] = $current = $myName; while (null !== ($current = $this->controller->getNextName($current))) { $pages[] = $current; } // Here we display buttons for all pages, the current one's is disabled foreach ($pages as $pageName) { $disabled = ($pageName == $myName ? array('disabled' => 'disabled') : array()); $tabs[] = $this->createElement('submit', $this->getButtonName($pageName), ucfirst($pageName), array('class' => 'flat') + $disabled); } $this->addGroup($tabs, 'tabs', null, '&nbsp;', false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createTabs() {}", "private function createTab()\n {\n try {\n if (LengowMain::compareVersion()) {\n $tabParent = new Tab();\n $tabParent->name[Configuration::get('PS_LANG_DEFAULT')] = 'Lengow';\n $tabParent->module = 'lengow';\n $tabParent->class_name = 'AdminLengow';\n $tabParent->id_parent = 0;\n $tabParent->add();\n } else {\n $tabParent = new Tab(Tab::getIdFromClassName('AdminCatalog'));\n $tab = new Tab();\n $tab->name[Configuration::get('PS_LANG_DEFAULT')] = 'Lengow';\n $tab->module = 'lengow';\n $tab->class_name = 'AdminLengowHome14';\n $tab->id_parent = $tabParent->id;\n $tab->add();\n $tabParent = $tab;\n }\n foreach ($this->tabs as $name => $values) {\n if (_PS_VERSION_ < '1.5' && $values['name'] === 'AdminLengowHome') {\n continue;\n }\n $tab = new Tab();\n if (_PS_VERSION_ < '1.5') {\n $tab->class_name = $values['name'] . '14';\n $tab->id_parent = $tabParent->id;\n } else {\n $tab->class_name = $values['name'];\n $tab->id_parent = $tabParent->id;\n $tab->active = $values['active'];\n }\n $tab->module = $this->lengowModule->name;\n $languages = Language::getLanguages(false);\n foreach ($languages as $language) {\n $tab->name[$language['id_lang']] = LengowMain::decodeLogMessage($name, $language['iso_code']);\n }\n $tab->add();\n LengowMain::log(\n LengowLog::CODE_INSTALL,\n LengowMain::setLogMessage('log.install.install_tab', array('class_name' => $tab->class_name))\n );\n }\n return true;\n } catch (Exception $e) {\n return false;\n }\n }", "private function _createTab()\r\n {\r\n $response = true;\r\n\r\n // First check for parent tab\r\n $parentTabID = Tab::getIdFromClassName('AdminFieldMenu');\r\n\r\n if ($parentTabID) {\r\n $parentTab = new Tab($parentTabID);\r\n } else {\r\n $parentTab = new Tab();\r\n $parentTab->active = 1;\r\n $parentTab->name = array();\r\n $parentTab->class_name = \"AdminFieldMenu\";\r\n foreach (Language::getLanguages() as $lang){\r\n $parentTab->name[$lang['id_lang']] = \"FIELDTHEMES\";\r\n }\r\n $parentTab->id_parent = 0;\r\n $parentTab->module = '';\r\n $response &= $parentTab->add();\r\n }\r\n// Check for parent tab2\r\n\t\t\t$parentTab_2ID = Tab::getIdFromClassName('AdminFieldMenuSecond');\r\n\t\t\tif ($parentTab_2ID) {\r\n\t\t\t\t$parentTab_2 = new Tab($parentTab_2ID);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$parentTab_2 = new Tab();\r\n\t\t\t\t$parentTab_2->active = 1;\r\n\t\t\t\t$parentTab_2->name = array();\r\n\t\t\t\t$parentTab_2->class_name = \"AdminFieldMenuSecond\";\r\n\t\t\t\tforeach (Language::getLanguages() as $lang) {\r\n\t\t\t\t\t$parentTab_2->name[$lang['id_lang']] = \"FieldThemes Configure\";\r\n\t\t\t\t}\r\n\t\t\t\t$parentTab_2->id_parent = $parentTab_2->id;\r\n\t\t\t\t$parentTab_2->module = '';\r\n\t\t\t\t$response &= $parentTab_2->add();\r\n\t\t\t}\r\n\t\t\t// Created tab\r\n $tab = new Tab();\r\n $tab->active = 1;\r\n $tab->class_name = \"AdminFieldBrandSlider\";\r\n $tab->name = array();\r\n foreach (Language::getLanguages() as $lang){\r\n $tab->name[$lang['id_lang']] = \"Configuge brands\";\r\n }\r\n $tab->id_parent = $parentTab_2->id;\r\n $tab->module = $this->name;\r\n $response &= $tab->add();\r\n\r\n return $response;\r\n }", "protected function init_tabs() {\r\n\t\t$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'firstrun' ), $_SERVER['REQUEST_URI'] );\r\n\r\n\t\tadd_action( 'qc_settings_head', 'qc_status_colors_css' );\r\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ) );\r\n\r\n\t\t$this->tabs->add( 'general', __( 'General', APP_TD ) );\r\n\r\n\t\t$this->tab_sections['general']['main'] = array(\r\n\t\t\t'title' => __( 'General Settings', APP_TD ),\r\n\t\t\t'fields' => array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => __( 'Permissions', APP_TD ),\r\n\t\t\t\t\t'type' => 'radio',\r\n\t\t\t\t\t'name' => 'assigned_perms',\r\n\t\t\t\t\t'values' => array(\r\n\t\t\t\t\t\t'protected' => __( 'Users can only view their own tickets and tickets they are assigned to.', APP_TD ),\r\n\t\t\t\t\t\t'read-only' => __( 'Users can view all tickets.', APP_TD ),\r\n\t\t\t\t\t\t'read-write' => __( 'Users can view and updated all tickets.', APP_TD ),\r\n\t\t\t\t\t),\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => __( 'Lock Site from Visitors', APP_TD ),\r\n\t\t\t\t\t'name' => 'lock_site',\r\n\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t'desc' => __( 'Yes', APP_TD ),\r\n\t\t\t\t\t'tip' => __( 'Visitors will be asked to login, and will not be able to browse site. Also content of the sidebars and menus will be hidden.', APP_TD ),\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t);\r\n\r\n\t\t$this->tab_sections['general']['states'] = array(\r\n\t\t\t'title' => __( 'States', APP_TD ),\r\n\t\t\t'fields' => array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => __( 'Default State', APP_TD ),\r\n\t\t\t\t\t'desc' => __( 'This state will be selected by default when creating a ticket.', APP_TD ),\r\n\t\t\t\t\t'type' => 'select',\r\n\t\t\t\t\t'sanitize' => 'absint',\r\n\t\t\t\t\t'name' => 'ticket_status_new',\r\n\t\t\t\t\t'values' => $this->ticket_states(),\r\n\t\t\t\t),\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => __( 'Resolved State', APP_TD ),\r\n\t\t\t\t\t'desc' => __( 'Tickets in this state are assumed to no longer need attention.', APP_TD ),\r\n\t\t\t\t\t'type' => 'select',\r\n\t\t\t\t\t'sanitize' => 'absint',\r\n\t\t\t\t\t'name' => 'ticket_status_closed',\r\n\t\t\t\t\t'values' => $this->ticket_states(),\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t);\r\n\t\t$this->tab_sections['general']['colors'] = array(\r\n\t\t\t'fields' => $this->status_colors_options(),\r\n\t\t\t'renderer' => array( $this, 'render_status_colors' ),\r\n\t\t);\r\n\r\n\t\t$this->tab_sections['general']['modules'] = array(\r\n\t\t\t'title' => __( 'Modules', APP_TD ),\r\n\t\t\t'fields' => array(\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'title' => __( 'Enable Modules', APP_TD ),\r\n\t\t\t\t\t'type' => 'checkbox',\r\n\t\t\t\t\t'name' => 'modules',\r\n\t\t\t\t\t'values' => array(\r\n\t\t\t\t\t\t'assignment' => __( 'Assignment', APP_TD ),\r\n\t\t\t\t\t\t'attachments' => __( 'Attachments', APP_TD ),\r\n\t\t\t\t\t\t'categories' => __( 'Categories', APP_TD ),\r\n\t\t\t\t\t\t'changesets' => __( 'Changesets', APP_TD ),\r\n\t\t\t\t\t\t'milestones' => __( 'Milestones', APP_TD ),\r\n\t\t\t\t\t\t'priorities' => __( 'Priorities', APP_TD ),\r\n\t\t\t\t\t\t'tags' => __( 'Tags', APP_TD ),\r\n\t\t\t\t\t),\r\n\t\t\t\t\t'tip' => __( 'Choose the modules that you want to use on your site.', APP_TD ),\r\n\t\t\t\t),\r\n\t\t\t),\r\n\t\t);\r\n\r\n\t}", "public function registerTabs()\n {\n\n Tab::put('promotion.promotion-code', function (TabItem $tab) {\n $tab->key('promotion.promotion-code.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::promotion.promotion-code._fields');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.product.cards._fields');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.image')\n ->label('avored::system.images')\n ->view('avored::catalog.product.cards.images');\n });\n\n Tab::put('catalog.product', function (TabItem $tab) {\n $tab->key('catalog.product.property')\n ->label('avored::system.property')\n ->view('avored::catalog.product.cards.property');\n });\n\n // Tab::put('catalog.product', function (TabItem $tab) {\n // $tab->key('catalog.product.attribute')\n // ->label('avored::system.tab.attribute')\n // ->view('avored::catalog.product.cards.attribute');\n // });\n\n /****** CATALOG CATEGORY TABS *******/\n Tab::put('catalog.category', function (TabItem $tab) {\n $tab->key('catalog.category.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.category._fields');\n });\n\n /****** CATALOG PROPERTY TABS *******/\n Tab::put('catalog.property', function (TabItem $tab) {\n $tab->key('catalog.property.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.property._fields');\n });\n\n /****** CATALOG ATTRIBUTE TABS *******/\n Tab::put('catalog.attribute', function (TabItem $tab) {\n $tab->key('catalog.attribute.info')\n ->label('avored::system.basic_info')\n ->view('avored::catalog.attribute._fields');\n });\n\n /******CMS PAGES TABS *******/\n Tab::put('cms.page', function (TabItem $tab) {\n $tab->key('cms.page.info')\n ->label('avored::system.basic_info')\n ->view('avored::cms.page._fields');\n });\n\n /******ORDER ORDER STATUS TABS *******/\n Tab::put('order.order-status', function (TabItem $tab) {\n $tab->key('order.order-status.info')\n ->label('avored::system.basic_info')\n ->view('avored::order.order-status._fields');\n });\n\n /****** CUSTOMER GROUPS TABS *******/\n Tab::put('user.customer-group', function (TabItem $tab) {\n $tab->key('user.customer-group.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer-group._fields');\n });\n\n Tab::put('user.customer', function (TabItem $tab) {\n $tab->key('user.customer.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer._fields');\n });\n\n Tab::put('user.customer', function (TabItem $tab) {\n $tab->key('user.customer.address')\n ->label('avored::system.addresses')\n ->view('avored::user.customer._addresses');\n });\n\n Tab::put('user.address', function (TabItem $tab) {\n $tab->key('user.customer.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::user.customer.show');\n });\n Tab::put('user.address', function (TabItem $tab) {\n $tab->key('user.customer.address')\n ->label('avored::system.addresses')\n ->view('avored::user.address._fields');\n });\n\n /******USER ADMIN USER TABS *******/\n Tab::put('user.staff', function (TabItem $tab) {\n $tab->key('user.staff.info')\n ->label('avored::system.basic_info')\n ->view('avored::user.staff._fields');\n });\n Tab::put('user.subscriber', function (TabItem $tab) {\n $tab->key('user.subscriber.info')\n ->label('avored::system.basic_info')\n ->view('avored::user.subscriber._fields');\n });\n\n /******SYSTEM CURRENCY TABS *******/\n Tab::put('system.currency', function (TabItem $tab) {\n $tab->key('system.currency.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.currency._fields');\n });\n\n /******SYSTEM STATE TABS *******/\n Tab::put('system.state', function (TabItem $tab) {\n $tab->key('system.state.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.state._fields');\n });\n\n /******SYSTEM ROLE TABS *******/\n Tab::put('system.role', function (TabItem $tab) {\n $tab->key('system.role.info')\n ->label('avored::system.basic_info')\n ->view('avored::system.role._fields');\n });\n\n /******SYSTEM ROLE TABS *******/\n Tab::put('system.language', function (TabItem $tab) {\n $tab->key('system.language.info')\n ->label('avored::system.tab.basic_info')\n ->view('avored::system.language._fields');\n });\n\n /******SYSTEM CONFIGURATION TABS *******/\n Tab::put('system.configuration', function (TabItem $tab) {\n $tab->key('system.configuration.basic')\n ->label('avored::system.basic_configuration')\n ->view('avored::system.configuration.cards.basic');\n });\n\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.user')\n // ->label('avored::system.tab.user_configuration')\n // ->view('avored::system.configuration.cards.user');\n // });\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.tax')\n // ->label('avored::system.tax_configuration')\n // ->view('avored::system.configuration.cards.tax');\n // });\n\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.shipping')\n // ->label('avored::system.tab.shipping_configuration')\n // ->view('avored::system.configuration.cards.shipping');\n // });\n // Tab::put('system.configuration', function (TabItem $tab) {\n // $tab->key('system.configuration.payment')\n // ->label('avored::system.tab.payment_configuration')\n // ->view('avored::system.configuration.cards.payment');\n // });\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: border properties');\r\n\r\n $borderpainted[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $borderpainted[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($borderpainted, 'borderpainted', 'Display the border:');\r\n\r\n $this->addElement('text', 'borderclass', 'CSS class:', array('size' => 32));\r\n\r\n $borderstyle['style'] =& $this->createElement('select',\r\n 'style', 'style',\r\n array('solid' => 'Solid',\r\n 'dashed' => 'Dashed',\r\n 'dotted' => 'Dotted',\r\n 'inset' => 'Inset',\r\n 'outset' => 'Outset'));\r\n $borderstyle['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 2));\r\n $borderstyle['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($borderstyle, 'borderstyle', null, ' ');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: run demo');\r\n\r\n $this->addElement('static', 'progressBar',\r\n 'Your progress meter looks like:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('reset','process'));\r\n }", "private function installModuleTabs()\n {\n foreach ($this->admin_tabs as $value) {\n @copy(_PS_MODULE_DIR_ . $this->name . '/logo.png', _PS_IMG_DIR_ . 't/' . $value['class'] . '.png');\n $parent_tab = new Tab();\n $parent_tab->name[$this->context->language->id] = $this->l($value['title']);\n $parent_tab->class_name = $value['class'];\n $parent_tab->id_parent = 0; // Home tab\n $parent_tab->module = $this->name;\n $parent_tab->add();\n \n if (isset($value['children'])) {\n foreach ($value['children'] as $k => $v) {\n $tab = new Tab();\n // Need a foreach for the language\n foreach (Language::getLanguages(true) as $lang)\n $tab->name[$lang['id_lang']] = $this->l($v);\n \n $tab->class_name = $k;\n $tab->id_parent = $parent_tab->id;\n $tab->module = $this->name;\n $tab->add();\n }\n \n foreach ($value['hidden'] as $k => $v) {\n $tab = new Tab();\n // Need a foreach for the language\n foreach (Language::getLanguages(true) as $lang)\n $tab->name[$lang['id_lang']] = $this->l($v);\n \n $tab->class_name = $k;\n $tab->id_parent = - 1;\n $tab->module = $this->name;\n $tab->add();\n }\n }\n }\n \n return true;\n }", "private function _createTab()\r\n {\r\n $response = true;\r\n\r\n // First check for parent tab\r\n $parentTabID = Tab::getIdFromClassName('AdminFieldMenu');\r\n\r\n if ($parentTabID) {\r\n $parentTab = new Tab($parentTabID);\r\n } else {\r\n $parentTab = new Tab();\r\n $parentTab->active = 1;\r\n $parentTab->name = array();\r\n $parentTab->class_name = \"AdminFieldMenu\";\r\n foreach (Language::getLanguages() as $lang){\r\n $parentTab->name[$lang['id_lang']] = \"Fieldthemes\";\r\n }\r\n $parentTab->id_parent = 0;\r\n $parentTab->module = '';\r\n $response &= $parentTab->add();\r\n }\r\n\t// Check for parent tab2\r\n\t\t\t$parentTab_2ID = Tab::getIdFromClassName('AdminFieldMenuSecond');\r\n\t\t\tif ($parentTab_2ID) {\r\n\t\t\t\t$parentTab_2 = new Tab($parentTab_2ID);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$parentTab_2 = new Tab();\r\n\t\t\t\t$parentTab_2->active = 1;\r\n\t\t\t\t$parentTab_2->name = array();\r\n\t\t\t\t$parentTab_2->class_name = \"AdminFieldMenuSecond\";\r\n\t\t\t\tforeach (Language::getLanguages() as $lang) {\r\n\t\t\t\t\t$parentTab_2->name[$lang['id_lang']] = \"FieldThemes Configure\";\r\n\t\t\t\t}\r\n\t\t\t\t$parentTab_2->id_parent = $parentTab->id;\r\n\t\t\t\t$parentTab_2->module = '';\r\n\t\t\t\t$response &= $parentTab_2->add();\r\n\t\t\t}\r\n\t\t\t// Created tab\r\n $tab = new Tab();\r\n $tab->active = 1;\r\n $tab->class_name = \"AdminFieldFeaturedProductSlider\";\r\n $tab->name = array();\r\n foreach (Language::getLanguages() as $lang){\r\n $tab->name[$lang['id_lang']] = \"Configure featured products\";\r\n }\r\n $tab->id_parent = $parentTab_2->id;\r\n $tab->module = $this->name;\r\n $response &= $tab->add();\r\n\r\n return $response;\r\n }", "public function register_tabs() {\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/base-form-tab.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/captcha.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/active-campaign.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/get-response.php' );\n\t\trequire_once jet_engine()->plugin_path( 'includes/modules/forms/tabs/mailchimp.php' );\n\n\t\t$tabs = apply_filters( 'jet-engine/dashboard/form-tabs', array(\n\t\t\tnew Captcha(),\n\t\t\tnew Active_Campaign(),\n\t\t\tnew Get_Response(),\n\t\t\tnew Mailchimp(),\n\t\t) );\n\n\t\tforeach ( $tabs as $tab ) {\n\t\t\tif ( $tab instanceof Base_Form_Tab ) {\n\t\t\t\t$this->register_tab( $tab );\n\t\t\t}\n\t\t}\n\t}", "private function _createTab()\r\n {\r\n $response = true;\r\n\r\n // First check for parent tab\r\n $parentTabID = Tab::getIdFromClassName('AdminFieldMenu');\r\n\r\n if ($parentTabID) {\r\n $parentTab = new Tab($parentTabID);\r\n } else {\r\n $parentTab = new Tab();\r\n $parentTab->active = 1;\r\n $parentTab->name = array();\r\n $parentTab->class_name = \"AdminFieldMenu\";\r\n foreach (Language::getLanguages() as $lang){\r\n $parentTab->name[$lang['id_lang']] = \"Fieldthemes\";\r\n }\r\n $parentTab->id_parent = 0;\r\n $parentTab->module = '';\r\n $response &= $parentTab->add();\r\n }\r\n// Check for parent tab2\r\n\t\t\t$parentTab_2ID = Tab::getIdFromClassName('AdminFieldMenuSecond');\r\n\t\t\tif ($parentTab_2ID) {\r\n\t\t\t\t$parentTab_2 = new Tab($parentTab_2ID);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$parentTab_2 = new Tab();\r\n\t\t\t\t$parentTab_2->active = 1;\r\n\t\t\t\t$parentTab_2->name = array();\r\n\t\t\t\t$parentTab_2->class_name = \"AdminFieldMenuSecond\";\r\n\t\t\t\tforeach (Language::getLanguages() as $lang) {\r\n\t\t\t\t\t$parentTab_2->name[$lang['id_lang']] = \"FieldThemes Configure\";\r\n\t\t\t\t}\r\n\t\t\t\t$parentTab_2->id_parent = $parentTab->id;\r\n\t\t\t\t$parentTab_2->module = '';\r\n\t\t\t\t$response &= $parentTab_2->add();\r\n\t\t\t}\r\n\t\t\t// Created tab\r\n $tab = new Tab();\r\n $tab->active = 1;\r\n $tab->class_name = \"AdminFieldSpecialProduct\";\r\n $tab->name = array();\r\n foreach (Language::getLanguages() as $lang){\r\n $tab->name[$lang['id_lang']] = \"Configure specials products\";\r\n }\r\n $tab->id_parent = $parentTab_2->id;\r\n $tab->module = $this->name;\r\n $response &= $tab->add();\r\n\r\n return $response;\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: save PHP/CSS code');\r\n\r\n $code[] =& $this->createElement('checkbox', 'P', null, 'PHP');\r\n $code[] =& $this->createElement('checkbox', 'C', null, 'CSS');\r\n $this->addGroup($code, 'phpcss', 'PHP and/or StyleSheet source code:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('next','apply'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: main properties');\r\n\r\n $shape[] =& $this->createElement('radio', null, null, 'Horizontal', '1');\r\n $shape[] =& $this->createElement('radio', null, null, 'Vertical', '2');\r\n $this->addGroup($shape, 'shape', 'Shape:');\r\n\r\n $way[] =& $this->createElement('radio', null, null, 'Natural', 'natural');\r\n $way[] =& $this->createElement('radio', null, null, 'Reverse', 'reverse');\r\n $this->addGroup($way, 'way', 'Direction:');\r\n\r\n $autosize[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $autosize[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($autosize, 'autosize', 'Best size:');\r\n\r\n $psize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $psize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $psize['left'] =& $this->createElement('text',\r\n 'left', 'left',\r\n array('size' => 4));\r\n $psize['top'] =& $this->createElement('text',\r\n 'top', 'top',\r\n array('size' => 4));\r\n $psize['position'] =& $this->createElement('text',\r\n 'position', 'position',\r\n array('disabled' => 'true'));\r\n $psize['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'bgcolor',\r\n array('size' => 7));\r\n $this->addGroup($psize, 'progresssize',\r\n 'Size, position and color:', ' ');\r\n\r\n $this->addElement('text', 'rAnimSpeed',\r\n array('Animation speed :',\r\n '(0-1000 ; 0:fast, 1000:slow)'));\r\n $this->addRule('rAnimSpeed',\r\n 'Should be between 0 and 1000',\r\n 'rangelength', array(0,1000), 'client');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('back','apply','process'));\r\n }", "function __construct()\n {\n\t $this->tabs = array( \n//\t array ( 'tab_id' => 'properties',\t\t'tab_op' => 'administration.customization_properties.edit', \t'tab_name' => 'Application properties'),\n\t array ( 'tab_id' => 'fields',\t\t\t'tab_op' => 'administration.customization_fields.edit', \t\t'tab_name' => 'Field properties'),\n\t array ( 'tab_id' => 'searches', \t\t'tab_op' => 'administration.customization_searches.edit',\t\t'tab_name' => 'Search filters'),\n\t array ( 'tab_id' => 'results', \t\t\t'tab_op' => 'administration.customization_results.edit',\t\t'tab_name' => 'Search results'),\n\t array ( 'tab_id' => 'bulk',\t\t\t\t'tab_op' => 'administration.customization_bulk.edit', \t\t\t'tab_name' => 'Bulk form'),\t \n\t array ( 'tab_id' => 'view', \t\t\t'tab_op' => 'administration.customization_view.edit',\t\t\t'tab_name' => 'View form'),\n\t array ( 'tab_id' => 'edit', \t\t\t'tab_op' => 'administration.customization_edit.edit',\t\t\t'tab_name' => 'Edit form'),\n\t array ( 'tab_id' => 'linked', \t\t\t'tab_op' => 'administration.customization_linked.edit',\t\t\t'tab_name' => 'Linked applications'),\n\t array ( 'tab_id' => 'linked_view', \t\t'tab_op' => 'administration.customization_linked_view.edit',\t'tab_name' => 'Linked view form'),\n\t array ( 'tab_id' => 'popup_searches', \t'tab_op' => 'administration.customization_popup_searches.edit',\t'tab_name' => 'Popup search filters'),\n\t array ( 'tab_id' => 'popup_results', \t'tab_op' => 'administration.customization_popup_results.edit',\t'tab_name' => 'Popup search results'),\n\t array ( 'tab_id' => 'popup_view', \t\t'tab_op' => 'administration.customization_popup_view.edit',\t\t'tab_name' => 'Popup view form'),\n\t array ( 'tab_id' => 'popup_edit', \t\t'tab_op' => 'administration.customization_popup_edit.edit',\t\t'tab_name' => 'Popup edit form')\n\t ); \n\n\t\tparent::__construct();\n }", "private function createTablesTab()\n {\n $tab = $this->createTab(\n 'tables_tab',\n '__responsive_tab_tables__',\n [\n 'attributes' => [\n 'autoScroll' => true,\n ],\n ]\n );\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 200]);\n $fieldSetTables = $this->createFieldSet(\n 'tables_fieldset',\n '__responsive_tab_tables_fieldset_tables__',\n ['attributes' => $attributes]\n );\n\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'panel-table-header-bg',\n '@panel-table-header-bg',\n $this->themeColorDefaults['panel-table-header-bg']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'panel-table-header-color',\n '@panel-table-header-color',\n $this->themeColorDefaults['panel-table-header-color']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'table-row-bg',\n '@table-row-bg',\n $this->themeColorDefaults['table-row-bg']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'table-row-color',\n '@table-row-color',\n $this->themeColorDefaults['table-row-color']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'table-row-highlight-bg',\n '@table-row-highlight-bg',\n $this->themeColorDefaults['table-row-highlight-bg']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'table-header-bg',\n '@table-header-bg',\n $this->themeColorDefaults['table-header-bg']\n )\n );\n $fieldSetTables->addElement(\n $this->createColorPickerField(\n 'table-header-color',\n '@table-header-color',\n $this->themeColorDefaults['table-header-color']\n )\n );\n\n $tab->addElement($fieldSetTables);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 200]);\n $fieldSetBadges = $this->createFieldSet(\n 'badges_fieldset',\n '__responsive_tab_tables_fieldset_badges__',\n ['attributes' => $attributes]\n );\n\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-discount-bg',\n '@badge-discount-bg',\n $this->themeColorDefaults['badge-discount-bg']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-discount-color',\n '@badge-discount-color',\n $this->themeColorDefaults['badge-discount-color']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-newcomer-bg',\n '@badge-newcomer-bg',\n $this->themeColorDefaults['badge-newcomer-bg']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-newcomer-color',\n '@badge-newcomer-color',\n $this->themeColorDefaults['badge-newcomer-color']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-recommendation-bg',\n '@badge-recommendation-bg',\n $this->themeColorDefaults['badge-recommendation-bg']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-recommendation-color',\n '@badge-recommendation-color',\n $this->themeColorDefaults['badge-recommendation-color']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-download-bg',\n '@badge-download-bg',\n $this->themeColorDefaults['badge-download-bg']\n )\n );\n $fieldSetBadges->addElement(\n $this->createColorPickerField(\n 'badge-download-color',\n '@badge-download-color',\n $this->themeColorDefaults['badge-download-color']\n )\n );\n\n $tab->addElement($fieldSetBadges);\n\n return $tab;\n }", "function setTabs(){\n global $ilTabs, $ilCtrl, $ilAccess, $ilLocator;\n\n // show current quiz round inlcuding link and QR code (deadline)\n if ($ilAccess->checkAccess(\"read\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"showCurrentRound\", $this->txt(\"tabmenu_showCurrentRound\"), $ilCtrl->getLinkTarget($this, \"showCurrentRound\"));\n }\n\n // tab for the \"edit quiz\" command\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"editQuiz\", $this->txt(\"tabmenu_edit_quiz\"), $ilCtrl->getLinkTarget($this, \"editQuiz\"));\n }\n\n // show round results\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"showResults\", $this->txt(\"tabmenu_show_result\"), $ilCtrl->getLinkTarget($this, \"showResults\"));\n }\n\n // a \"properties\" tab\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"properties\", $this->txt(\"tabmenu_properties\"), $ilCtrl->getLinkTarget($this, \"editProperties\"));\n $this->addPermissionTab();\n }\n\n // information Tab\n if ($ilAccess->checkAccess(\"write\", \"\", $this->object->getRefId())){\n $ilTabs->addTab(\"info\", $this->txt(\"tabmenu_info\"), $ilCtrl->getLinkTarget($this, \"info\"));\n }\n\n }", "private function get_tabs() {\n return array(\n 'general' => array(\n 'title' => __( 'General', 'jpid' ),\n 'group' => 'jpid_general_settings'\n ),\n 'delivery' => array(\n 'title' => __( 'Delivery', 'jpid' ),\n 'group' => 'jpid_delivery_settings'\n ),\n 'payment' => array(\n 'title' => __( 'Payment', 'jpid' ),\n 'group' => 'jpid_payment_settings'\n )\n );\n }", "abstract protected function tabs();", "function generateTabs($pScreenName, $pRestriction = ''){\n if(0 == count($this->getScreens())){\n return '';\n }\n\n $content = '';\n $tabs = array();\n $Screens =& $this->getScreens();\n\n if (\"List\" == $pScreenName){\n if(empty($this->addNewName)){\n $addNewName = $this->SingularRecordName;\n } else {\n $addNewName = $this->addNewName;\n }\n\t\t\t$content = '';\n if($this->AllowAddRecord){\n if('view' == $pRestriction){\n //$content = \"\\$tabs['New'] = array(\\\"\\\", gettext(\\\"No Add New|You cannot add a new {$addNewName} because you don't have permission\\\"), 'disabled');\";\n } else {\n //get first edit screen and insert a tab link to it as \"new\"\n foreach ($Screens as $Screen){\n if ('editscreen' == strtolower(get_class($Screen))){\n\t\t\t\t\t\t\t$content = \"\\$tabs['New'] = array(\\\"edit.php?mdl={$this->ModuleID}&amp;scr={$Screen->name}\\\", gettext(\\\"Add New|Add a new \\\").gettext(\\\"{$addNewName}\\\"));\";\t\n break; //exits loop\n }\n }\n }\n } else {\n // $content = \"\\$tabs['New'] = array(\\\"\\\", gettext(\\\"No Add New|To add a new {$addNewName} you must go to a parent module\\\"), 'disabled');\";\n }\n \n\n //get search screen and insert a tab link to it\n if(count($Screens)){\n foreach ($Screens as $Screen){\n if ('searchscreen' == strtolower(get_class($Screen))){\n $content .= \"\\$tabs['Search'] = array(\\\"search.php?mdl={$this->ModuleID}\\\", gettext(\\\"Search|Search in \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n //$content .= \"\\$tabs['Reports'] = array(\\\"reports.php?mdl={$this->ModuleID}\\\", gettext(\\\"Reports|Reports for \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\t\t\t\tif( true == $this->areChartsDefined() ){\n\t\t\t\t\t\t\t$content .= \"\\$tabs['Charts'] = array(\\\"charts.php?mdl={$this->ModuleID}\\\", gettext(\\\"Charts|Charts for \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\t\t\t\t}\n } \n }\n }\n if($this->dataCollectionForm){\n $content .= \"\\$tabs['DataCollection'] = array(\\\"dataCollectionForm.php?mdl={$this->ModuleID}\\\", gettext(\\\"Blank Form|Blank form for \\\").gettext(\\\"{$this->PluralRecordName}\\\"), 'download');\";\n }\n } elseif (\"ListCtxTabs\" == $pScreenName){\n\t\t\n//$tabs['List'] = Array(\"list.php?$qs\", gettext(\"List|View the list of /**plural_record_name**/\"));\n\t\t\t$content = \"\\$tabs['List'] = array(\\\"list.php?\\$qs\\\", gettext(\\\"List|View the list of \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\tif(empty($this->addNewName)){\n $addNewName = $this->SingularRecordName;\n } else {\n $addNewName = $this->addNewName;\n }\n\n if($this->AllowAddRecord){\n if('view' == $pRestriction){\n // $content .= \"\\$tabs['New'] = array(\\\"\\\", gettext(\\\"No Add New|You cannot add a new {$addNewName} because you don't have permission\\\"), 'disabled');\";\n } else {\n //get first edit screen and insert a tab link to it as \"new\"\n foreach ($Screens as $Screen){\n if ('editscreen' == strtolower(get_class($Screen))){\n\t\t\t\t\t\t\t$content .= \"\\$tabs['New'] = array(\\\"edit.php?mdl={$this->ModuleID}&amp;scr={$Screen->name}\\\", gettext(\\\"Add New|Add a new \\\").gettext(\\\"{$addNewName}\\\"));\";\t\n\n break; //exits loop\n }\n }\n }\n } else {\n //$content = \"\\$tabs['New'] = array(\\\"\\\", gettext(\\\"No Add New|To add a new {$addNewName} you must go to a parent module\\\"), 'disabled');\";\n }\n \n\n //get search screen and insert a tab link to it\n if(count($Screens)){\n foreach ($Screens as $Screen){\n if ('searchscreen' == strtolower(get_class($Screen))){\n $content .= \"\\$tabs['Search'] = array(\\\"search.php?mdl={$this->ModuleID}\\\", gettext(\\\"Search|Search in \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\t\t\t\t//$content .= \"\\$tabs['Reports'] = array(\\\"reports.php?mdl={$this->ModuleID}\\\", gettext(\\\"Reports|Reports for \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\t\t\t\tif( true == $this->areChartsDefined() ){\n\t\t\t\t\t\t\t$content .= \"\\$tabs['Charts'] = array(\\\"charts.php?mdl={$this->ModuleID}\\\", gettext(\\\"Charts|Charts for \\\").gettext(\\\"{$this->PluralRecordName}\\\"));\";\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n }\n }\n if($this->dataCollectionForm){\n $content .= \"\\$tabs['DataCollection'] = array(\\\"dataCollectionForm.php?mdl={$this->ModuleID}\\\", gettext(\\\"Blank Form|Blank form for \\\").gettext(\\\"{$this->PluralRecordName}\\\"), 'download');\";\n }\n\t\t}elseif( \"EditScreenPermissions\" == $pScreenName ){\n\t\t\t$content = '';\n\t\t\tforeach ($Screens as $Screen){\t\t\t\n\t\t\t\tif( 'editscreen' == strtolower(get_class($Screen)) AND isset($Screen->EditPermission) ){\n\t\t\t\t\t$content .= \"\\$EditScrPermission['{$Screen->name}'] = '{$Screen->EditPermission}';\\n\";\t\n\t\t\t\t}\n }\n\t\t\tif( $content != '' ){\n\t\t\t\tforeach ($Screens as $Screen){\t\t\t\n\t\t\t\t\tif( 'editscreen' == strtolower(get_class($Screen)) AND !isset($Screen->EditPermission) ){\n\t\t\t\t\t\t$content .= \"\\$EditScrPermission['{$Screen->name}'] = '{$this->ModuleID}';\\n\";\t\n\t\t\t\t\t}\n }\n\t\t\t}\n\t\t\n\t\t}elseif( \"ListRecordMenu\" == $pScreenName ){ \n\t\t \n\t\t\t$recordMenuCounter = 0;\n\t\t\t\t\n\t\t\tforeach ($Screens as $Screen){\n $linkTo = '';\n $tab = '';\n\t\t\t\t$recordMenu = '';\n\t\t\t\t$recordMenuEntries = '';\n\t\t\t\t\n switch( strtolower(get_class($Screen)) ){\n case \"viewscreen\":\n $handler = \"view.php\"; \n $phrase = \"View|View summary information about a record of type \\\").gettext(\\\"\". $this->SingularRecordName;\n break;\n case \"editscreen\":\n if(!empty($Screen->linkToModuleID)){\n $linkTo = $Screen->linkToModuleID;\n }\n $handler = \"edit.php\";\n\n if (empty($Screen->phrase)){\n $phrase = $Screen->name;\n } else {\n $phrase = $Screen->phrase;\n }\n break;\n case \"searchscreen\":\n $handler = \"search.php\";\n $phrase = \"Search|Search in \\\").' '.gettext(\\\"\". $this->PluralRecordName;\n break;\n case \"listscreen\":\n $handler = \"list.php\";\n $phrase = \"List|View the list of \\\").' '.gettext(\\\"\". $this->PluralRecordName;\n break;\n case \"recordreportscreen\":\n $handler = \"reports.php\";\n $phrase = $Screen->phrase;\n break;\n case \"listreportscreen\":\n $handler = \"reports.php\";\n $phrase = $Screen->phrase;\n break;\n case \"anoneditscreen\":\n continue;\n break;\n default:\n print_r($Screens);\n die(\"unknown screen type: '\".get_class($Screen).\"'\\n\");\n }\n\n\t\t\t\t$recordMenu = '$recordMenuEntries['.$Screen->name.']='.\"'{ text: \\\"'.strip_tags( ShortPhrase( gettext(\\\"{$phrase}\\\") ) ).'\\\" }';\\n\";\n\n $tabConditionModuleID = '';\n if(!empty($Screen->tabConditionModuleID)){\n $tabConditionModuleID = \", '{$Screen->tabConditionModuleID}'\";\n }\n\n\t\t\t\tif( ( \"view\" == $pRestriction && \"viewscreen\" == strtolower(get_class($Screen)) ) \n\t\t\t\t || (\"view\" != $pRestriction) ){\n\t\t\t\t\tif($linkTo == ''){\t\t\t\t\t\t\n\t\t\t\t\t\t$recordMenuURL = '$recordMenuURL['.$Screen->name.']= '.\"\\\"$handler?scr={$Screen->name}&mdl={$this->ModuleID}\\\";\\n\"; \n\t\t\t\t\t} else {\n\t\t\t\t\t\t$recordMenuURL = '$recordMenuURL['.$Screen->name.']= '.\"\\\"$handler?scr={$Screen->name}&mdl=$linkTo\\\";\\n\"; \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\t\t\n if( in_array(strtolower(get_class($Screen)), array('viewscreen', 'editscreen', 'recordreportscreen')) ){ \n\t\t\t\t\t$recordMenuList .= $recordMenu;\n\t\t\t\t\t$recordMenuURLList .= $recordMenuURL;\t\t\t\t\t\n }\n }\t\t\t\n\t\t\t\n\t\t\t$content = $recordMenuList.$recordMenuURLList;\n\t\n\t\t}else {\n print \"m. GenerateTabs: current screen $pScreenName\\n\";\n\n $currentScreen = $this->getScreen($pScreenName);\n\n foreach ($Screens as $Screen){\n $linkTo = '';\n $tab = '';\n switch(strtolower(get_class($Screen))){\n case \"viewscreen\":\n $handler = \"view.php\";\n /* if(in_array($this->SingularRecordName[0], array('a','e','i','o','h','y','A','E','I','O','H','Y'))){\n $a = 'an';\n } else {\n $a = 'a';\n } */\n $phrase = \"View|View summary information about a record of type \\\").gettext(\\\"\". $this->SingularRecordName;\n break;\n case \"editscreen\":\n if(!empty($Screen->linkToModuleID)){\n $linkTo = $Screen->linkToModuleID;\n }\n $handler = \"edit.php\";\n\n if (empty($Screen->phrase)){\n $phrase = $Screen->name;\n } else {\n $phrase = $Screen->phrase;\n }\n break;\n case \"searchscreen\":\n $handler = \"search.php\";\n $phrase = \"Search|Search in \\\").' '.gettext(\\\"\". $this->PluralRecordName;\n break;\n case \"listscreen\":\n $handler = \"list.php\";\n $phrase = \"List|View the list of \\\").' '.gettext(\\\"\". $this->PluralRecordName;\n break;\n case \"recordreportscreen\":\n $handler = \"reports.php\";\n $phrase = $Screen->phrase;\n break;\n case \"listreportscreen\":\n $handler = \"reports.php\";\n $phrase = $Screen->phrase;\n break;\n case \"anoneditscreen\":\n continue;\n break;\n default:\n print_r($Screens);\n die(\"unknown screen type: '\".get_class($Screen).\"'\\n\");\n }\n\n $tabConditionModuleID = '';\n if(!empty($Screen->tabConditionModuleID)){\n $tabConditionModuleID = \", '{$Screen->tabConditionModuleID}'\";\n }\n\n if ($pScreenName != $Screen->name){\n if ( ( \"view\" == $pRestriction \n\t\t\t\t\t && ( \"viewscreen\" == strtolower( get_class($Screen) ) \n\t\t\t\t\t || \"recordreportscreen\" == strtolower( get_class($Screen) ) ) ) \n\t\t\t\t\t || (\"view\" != $pRestriction) ){\n\n //insert link\n if($linkTo == ''){\n $tab = \" \\$tabs['{$Screen->name}'] = array( \\\"$handler?scr={$Screen->name}&amp;\\$tabsQS\\\", gettext(\\\"{$phrase}\\\") $tabConditionModuleID);\\n\";\n } else {\n $tab = \" \\$tabs['{$Screen->name}'] = array( \\\"$handler?mdl=$linkTo&amp;rid=\\$recordID\\\", gettext(\\\"{$phrase}\\\") $tabConditionModuleID);\\n\";\n }\n }\n } else {\n //Current screen: insert name only\n $tab = \" \\$tabs['{$Screen->name}'] = array( \\\"\\\", gettext(\\\"{$phrase}\\\") $tabConditionModuleID);\\n\";\n }\n\n if(in_array(strtolower(get_class($Screen)), array('viewscreen', 'editscreen', 'recordreportscreen'))){\n $content .= $tab;\n }\n }\n }\n\n return $content;\n }", "public function prepare( $tabs ) {\n\t\t$tabs[ $this->key_name ] = array(\n\t\t\t'title' => __( 'Polylang', 'custom-sidebars' ),\n\t\t\t'cat_name' => __( 'Language', 'custom-sidebars' ),\n\t\t);\n\t\treturn $tabs;\n\t}", "public function installTabs()\n {\n TabManager::addTab('AdminTraining', 'Training Menu', 'training', 'AdminTools');\n TabManager::addTab('AdminTrainingIndexClass', 'Controller exemple', 'training', 'AdminTraining');\n TabManager::addTab('AdminTrainingGridClass', 'Grid exemple', 'training', 'AdminTraining');\n\n return true;\n }", "private static function options_page_tabs() {\n $tabs = array(\n 'general' => __('Allgemein', 'fau-cris'),\n 'layout' => __('Darstellung', 'fau-cris'),\n 'sync' => __('Synchronisierung', 'fau-cris')\n );\n return $tabs;\n }", "public function installKbTabs()\n {\n $parentTab = new Tab();\n $parentTab->name = array();\n foreach (Language::getLanguages(true) as $lang) {\n $parentTab->name[$lang['id_lang']] = $this->l('Knowband Web Push Notification');\n }\n\n $parentTab->class_name = self::PARENT_TAB_CLASS;\n $parentTab->module = $this->name;\n $parentTab->active = 1;\n $parentTab->id_parent = Tab::getIdFromClassName(self::SELL_CLASS_NAME);\n $parentTab->icon = 'notifications';\n $parentTab->add();\n\n $id_parent_tab = (int) Tab::getIdFromClassName(self::PARENT_TAB_CLASS);\n $admin_menus = $this->adminSubMenus();\n\n foreach ($admin_menus as $menu) {\n $tab = new Tab();\n foreach (Language::getLanguages(true) as $lang) {\n $tab->name[$lang['id_lang']] = $this->l($menu['name']);\n }\n\n $tab->class_name = $menu['class_name'];\n $tab->module = $this->name;\n $tab->active = $menu['active'];\n $tab->id_parent = $id_parent_tab;\n $tab->add($this->id);\n }\n return true;\n }", "public function create_tabs_script(){\n\t\treturn $this->style.'\n<script>\n\tjQuery(function () {\n\t\tjQuery(\".nav-tab-wrapper a\").click(function (e) {\n\t\t\te.preventDefault();\n\t\t\tvar tab_class = jQuery(this).data(\"tab\"); \n\t\t\tvar target = jQuery(this).data(\"target\");\n\t\t\tvar title = jQuery(this).text();\n\n\t\t\tjQuery(\".tabs-title\").fadeOut(function(){\n\t \tjQuery(\".tabs-title\").text(title).fadeIn();\n\t })\n\n\t\t\tjQuery(this).parent().find(\".nav-tab\").removeClass(\"nav-tab-active\");\n\t\t\tjQuery(this).addClass(\"nav-tab-active\");\n\t\t\n\t\t\tjQuery(\".tab\").not(\".\"+tab_class).parentsUntil(\".cmb-repeat-group-wrap\").fadeOut(600);\n\t\t\tjQuery(\".\"+tab_class).parentsUntil(\".cmb-repeat-group-wrap\").fadeIn(1000);\n\n\t\t});\n\t\tjQuery(\".hide-clone\").parentsUntil(\".cmb-row\").fadeOut();\n\t\tjQuery(\".hide-remove\").parentsUntil(\".cmb-remove-field-row\").fadeOut();\n\t});\n</script>\n<style>\n\t.page, .component{\n\t\tbackground:#6bb1a3;\n\t\tborder-radius: 10px 10px 0px 0px;\n\t\tborder:solid 2px gray;\n\t\tcolor:white;\n\n\t}\n\t.page:hover, .component:hover{\n\t\tbackground:#4b9183;\n\t\tcolor:black;\n\n\t}\n\t.component{\n\t\tbackground:#8bd1c3;\n\t}\n</style>';\n\t}", "private function createFormsTab()\n {\n $tab = $this->createTab(\n 'forms_tab',\n '__responsive_tab_forms__',\n [\n 'attributes' => [\n 'autoScroll' => true,\n ],\n ]\n );\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 90]);\n $fieldSetLabels = $this->createFieldSet(\n 'labels_fieldset',\n '__responsive_tab_forms_fieldset_labels__',\n ['attributes' => $attributes]\n );\n\n $fieldSetLabels->addElement(\n $this->createTextField(\n 'label-font-size',\n '@label-font-size',\n $this->themeFontDefaults['label-font-size']\n )\n );\n $fieldSetLabels->addElement(\n $this->createColorPickerField(\n 'label-color',\n '@label-color',\n $this->themeColorDefaults['label-color']\n )\n );\n\n $tab->addElement($fieldSetLabels);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 160]);\n $fieldSetFormBase = $this->createFieldSet(\n 'form_base_fieldset',\n '__responsive_tab_forms_fieldset_global__',\n ['attributes' => $attributes]\n );\n\n $fieldSetFormBase->addElement(\n $this->createTextField(\n 'input-font-size',\n '@input-font-size',\n $this->themeFontDefaults['input-font-size']\n )\n );\n $fieldSetFormBase->addElement(\n $this->createColorPickerField(\n 'input-bg',\n '@input-bg',\n $this->themeColorDefaults['input-bg']\n )\n );\n $fieldSetFormBase->addElement(\n $this->createColorPickerField(\n 'input-color',\n '@input-color',\n $this->themeColorDefaults['input-color']\n )\n );\n $fieldSetFormBase->addElement(\n $this->createColorPickerField(\n 'input-placeholder-color',\n '@input-placeholder-color',\n $this->themeColorDefaults['input-placeholder-color']\n )\n );\n $fieldSetFormBase->addElement(\n $this->createColorPickerField(\n 'input-border',\n '@input-border',\n $this->themeColorDefaults['input-border']\n )\n );\n\n $tab->addElement($fieldSetFormBase);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 240]);\n $fieldSetFormStates = $this->createFieldSet(\n 'form_states_fieldset',\n '__responsive_tab_forms_fieldset_states__',\n ['attributes' => $attributes]\n );\n\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-focus-bg',\n '@input-focus-bg',\n $this->themeColorDefaults['input-focus-bg']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-focus-border',\n '@input-focus-border',\n $this->themeColorDefaults['input-focus-border']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-focus-color',\n '@input-focus-color',\n $this->themeColorDefaults['input-focus-color']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-error-bg',\n '@input-error-bg',\n $this->themeColorDefaults['input-error-bg']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-error-border',\n '@input-error-border',\n $this->themeColorDefaults['input-error-border']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-error-color',\n '@input-error-color',\n $this->themeColorDefaults['input-error-color']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-success-bg',\n '@input-success-bg',\n $this->themeColorDefaults['input-success-bg']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-success-border',\n '@input-success-border',\n $this->themeColorDefaults['input-success-border']\n )\n );\n $fieldSetFormStates->addElement(\n $this->createColorPickerField(\n 'input-success-color',\n '@input-success-color',\n $this->themeColorDefaults['input-success-color']\n )\n );\n\n $tab->addElement($fieldSetFormStates);\n\n return $tab;\n }", "public function set_tabs() {\n\t\t\t$tabs = [\n\t\t\t\t[\n\t\t\t\t\t'id' => 'business_info',\n\t\t\t\t\t'title' => __( 'Business info', 'yoast-local-seo' ),\n\t\t\t\t\t'icon' => 'admin-home',\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'id' => 'opening_hours',\n\t\t\t\t\t'title' => __( 'Opening hours', 'yoast-local-seo' ),\n\t\t\t\t\t'icon' => 'clock',\n\t\t\t\t],\n\t\t\t\t[\n\t\t\t\t\t'id' => 'maps_settings',\n\t\t\t\t\t'title' => __( 'Map settings', 'yoast-local-seo' ),\n\t\t\t\t\t'icon' => 'location-alt',\n\t\t\t\t],\n\t\t\t];\n\n\t\t\t$tabs = apply_filters( 'wpseo-local-location-meta-tabs', $tabs );\n\n\t\t\t$this->tabs = $tabs;\n\t\t}", "function getTabs(&$tabs_gui)\n\t{\n\t\tglobal $rbacsystem;\n\n\t\t// properties\n\t\tif ($rbacsystem->checkAccess(\"write\", $_GET[\"ref_id\"]))\n\t\t{\n\t\t\t$tabs_gui->addTarget(\"edit_properties\",\n\t\t\t\t\"repository.php?cmd=properties&ref_id=\".$_GET[\"ref_id\"],\n\t\t\t\t\"properties\");\n\t\t}\n\n\t\t// edit permission\n\t\tif ($rbacsystem->checkAccess(\"edit_permission\", $_GET[\"ref_id\"]))\n\t\t{\n\t\t\t$tabs_gui->addTarget(\"perm_settings\",\n\t\t\t\t\"repository.php?cmd=permissions&ref_id=\".$_GET[\"ref_id\"],\n\t\t\t\t\"permissions\");\n\t\t}\n\t}", "private function createGeneralTab()\n {\n $tab = $this->createTab(\n 'general_tab',\n '__responsive_tab_general__',\n [\n 'attributes' => [\n 'autoScroll' => true,\n ],\n ]\n );\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 130]);\n $fieldSetGrey = $this->createFieldSet(\n 'grey_tones',\n '__responsive_tab_general_fieldset_grey__',\n ['attributes' => $attributes]\n );\n\n $fieldSetGrey->addElement(\n $this->createColorPickerField(\n 'gray',\n '@gray',\n $this->themeColorDefaults['gray']\n )\n );\n $fieldSetGrey->addElement(\n $this->createColorPickerField(\n 'gray-light',\n '@gray-light',\n $this->themeColorDefaults['gray-light']\n )\n );\n $fieldSetGrey->addElement(\n $this->createColorPickerField(\n 'gray-dark',\n '@gray-dark',\n $this->themeColorDefaults['gray-dark']\n )\n );\n $fieldSetGrey->addElement(\n $this->createColorPickerField(\n 'border-color',\n '@border-color',\n $this->themeColorDefaults['border-color']\n )\n );\n\n $basicFieldSet = $this->createBasicFieldSet();\n $tab->addElement($basicFieldSet);\n $tab->addElement($fieldSetGrey);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 130]);\n $fieldSetHighlights = $this->createFieldSet(\n 'highlight_colors',\n '__responsive_tab_general_fieldset_highlight__',\n ['attributes' => $attributes]\n );\n\n $fieldSetHighlights->addElement(\n $this->createColorPickerField(\n 'highlight-success',\n '@highlight-success',\n $this->themeColorDefaults['highlight-success']\n )\n );\n $fieldSetHighlights->addElement(\n $this->createColorPickerField(\n 'highlight-error',\n '@highlight-error',\n $this->themeColorDefaults['highlight-error']\n )\n );\n $fieldSetHighlights->addElement(\n $this->createColorPickerField(\n 'highlight-notice',\n '@highlight-notice',\n $this->themeColorDefaults['highlight-notice']\n )\n );\n $fieldSetHighlights->addElement(\n $this->createColorPickerField(\n 'highlight-info',\n '@highlight-info',\n $this->themeColorDefaults['highlight-info']\n )\n );\n\n $tab->addElement($fieldSetHighlights);\n\n $attributes = array_merge($this->fieldSetDefaults, ['height' => 220]);\n $fieldSetScaffolding = $this->createFieldSet(\n 'scaffolding',\n '__responsive_tab_general_fieldset_scaffolding__',\n ['attributes' => $attributes]\n );\n\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'body-bg',\n '@body-bg',\n $this->themeColorDefaults['body-bg']\n )\n );\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'text-color',\n '@text-color',\n $this->themeColorDefaults['text-color']\n )\n );\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'text-color-dark',\n '@text-color-dark',\n $this->themeColorDefaults['text-color-dark']\n )\n );\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'link-color',\n '@link-color',\n $this->themeColorDefaults['link-color']\n )\n );\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'link-hover-color',\n '@link-hover-color',\n $this->themeColorDefaults['link-hover-color']\n )\n );\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'rating-star-color',\n '@rating-star-color',\n $this->themeColorDefaults['rating-star-color']\n )\n );\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'overlay-bg',\n '@overlay-bg',\n $this->themeColorDefaults['overlay-bg']\n )\n );\n\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'overlay-theme-dark-bg',\n '@overlay-theme-dark-bg',\n '@overlay-bg'\n )\n );\n\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'overlay-theme-light-bg',\n '@overlay-theme-light-bg',\n '#FFFFFF'\n )\n );\n\n $fieldSetScaffolding->addElement(\n $this->createColorPickerField(\n 'overlay-opacity',\n '@overlay-opacity',\n $this->themeColorDefaults['overlay-opacity']\n )\n );\n\n $tab->addElement($fieldSetScaffolding);\n\n return $tab;\n }", "function jquery_create_tabs( $tab_id, $tabs, $callback, $prefix = '' )\n {\n global $page_info;\n\n $page_info['head'][] = _jquery_tabs( $tab_id );\n\n echo ( $prefix . '<div id=\"' . htmlentities( $tab_id ) . '\">' . \"\\n\" );\n\n echo ( $prefix . \"\\t\" . '<ul>' . \"\\n\" );\n foreach ( $tabs as $tk => $tv )\n {\n echo ( $prefix . \"\\t\\t\" . '<li><a href=\"#' . htmlentities( $tk ) . '\">' . htmlentities( $tv ) . '</a></li>' . \"\\n\" );\n }\n echo ( $prefix . \"\\t\" . '</ul>' . \"\\n\" );\n\n foreach ( $tabs as $tk => $tv )\n {\n echo ( $prefix . \"\\t\" . '<div id=\"' . htmlentities( $tk ) . '\">' . \"\\n\" );\n\n call_user_func_array( $callback, array( $tk, ( $prefix . \"\\t\\t\" ) ) );\n\n echo ( $prefix . \"\\t\" . '</div>' . \"\\n\" );\n }\n\n echo ( $prefix . '</div>' . \"\\n\" );\n }", "protected function setup_tabs() {\n\n\t\t// If there's a remote info file give it priority and override any existing parameters.\n\t\tif ( $url = $this->browser_args['remote_info'] ) {\n\t\t\t$info = $this->get_remote_info( $url );\n\n\t\t\tif ( ! empty( $info ) ) {\n\t\t\t\t$this->browser_args = wp_parse_args( $info, $this->browser_args );\n\t\t\t}\n\n\t\t}\n\n\t\t// Display the 'popular' tab if enabled.\n\t\tif ( 'true' == $this->browser_args['show_popular'] ) {\n\n\t\t\t$this->browser_args['tabs']['popular'] = array(\n\t\t\t\t'name' => __( 'Popular', 'wp-shp-browser' ),\n\t\t\t\t'url' => ''\n\t\t\t);\n\n\t\t}\n\n\t\t// Set the default tab if not already set.\n\t\tif ( ! $this->browser_args['default_tab'] ) {\n\t\t\t$default_tab = array_keys( $this->browser_args['tabs'] );\n\t\t\t$default_tab = $default_tab[0];\n\n\t\t\t$this->browser_args['default_tab'] = $default_tab;\n\t\t}\n\n\t}" ]
[ "0.7487054", "0.6603563", "0.6448827", "0.63951415", "0.6376598", "0.6342076", "0.63246083", "0.6316735", "0.62946516", "0.6253495", "0.6227628", "0.62228113", "0.61793476", "0.6155166", "0.61530346", "0.6118265", "0.6103463", "0.6070469", "0.6066338", "0.6050339", "0.59843427", "0.59528047", "0.591701", "0.58926606", "0.5891947", "0.58819485", "0.58720267", "0.584689", "0.5835146", "0.58297396" ]
0.795176
0
Builds the form that define the main properties of your progress bar
function buildForm() { $this->buildTabs(); // tab caption $this->addElement('header', null, 'Progress2 Generator - Control Panel: main properties'); $shape[] =& $this->createElement('radio', null, null, 'Horizontal', '1'); $shape[] =& $this->createElement('radio', null, null, 'Vertical', '2'); $this->addGroup($shape, 'shape', 'Shape:'); $way[] =& $this->createElement('radio', null, null, 'Natural', 'natural'); $way[] =& $this->createElement('radio', null, null, 'Reverse', 'reverse'); $this->addGroup($way, 'way', 'Direction:'); $autosize[] =& $this->createElement('radio', null, null, 'Yes', true); $autosize[] =& $this->createElement('radio', null, null, 'No', false); $this->addGroup($autosize, 'autosize', 'Best size:'); $psize['width'] =& $this->createElement('text', 'width', 'width', array('size' => 4)); $psize['height'] =& $this->createElement('text', 'height', 'height', array('size' => 4)); $psize['left'] =& $this->createElement('text', 'left', 'left', array('size' => 4)); $psize['top'] =& $this->createElement('text', 'top', 'top', array('size' => 4)); $psize['position'] =& $this->createElement('text', 'position', 'position', array('disabled' => 'true')); $psize['bgcolor'] =& $this->createElement('text', 'bgcolor', 'bgcolor', array('size' => 7)); $this->addGroup($psize, 'progresssize', 'Size, position and color:', ' '); $this->addElement('text', 'rAnimSpeed', array('Animation speed :', '(0-1000 ; 0:fast, 1000:slow)')); $this->addRule('rAnimSpeed', 'Should be between 0 and 1000', 'rangelength', array(0,1000), 'client'); // Buttons of the wizard to do the job $this->buildButtons(array('back','apply','process')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: run demo');\r\n\r\n $this->addElement('static', 'progressBar',\r\n 'Your progress meter looks like:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('reset','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: string properties');\r\n\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($stringpainted, 'stringpainted', 'Render a custom string:');\r\n\r\n $this->addElement('text', 'stringid', 'Id:', array('size' => 32));\r\n $this->addElement('text', 'stringclass', 'CSS class:', array('size' => 32));\r\n $this->addElement('text', 'stringvalue', 'Content:', array('size' => 32));\r\n\r\n $stringsize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $stringsize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $stringsize['left'] =& $this->createElement('text',\r\n 'left', 'left',\r\n array('size' => 4));\r\n $stringsize['top'] =& $this->createElement('text',\r\n 'top', 'top',\r\n array('size' => 4));\r\n $stringsize['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'bgcolor',\r\n array('size' => 7));\r\n $this->addGroup($stringsize, 'stringsize', 'Size, position and color:', ' ');\r\n\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Top', 'top');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Bottom', 'bottom');\r\n $this->addGroup($stringvalign, 'stringvalign', 'Vertical alignment:');\r\n\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Center', 'center');\r\n $this->addGroup($stringalign, 'stringalign', 'Horizontal alignment:');\r\n\r\n $stringfont['family'] =& $this->createElement('text',\r\n 'family', 'family',\r\n array('size' => 40));\r\n $stringfont['size'] =& $this->createElement('text',\r\n 'size', 'size',\r\n array('size' => 2));\r\n $stringfont['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($stringfont, 'stringfont', 'Font:', ' ');\r\n\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'normal', 'normal');\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'Bold', 'bold');\r\n $this->addGroup($stringweight, 'stringweight', 'Font weight:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: border properties');\r\n\r\n $borderpainted[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $borderpainted[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($borderpainted, 'borderpainted', 'Display the border:');\r\n\r\n $this->addElement('text', 'borderclass', 'CSS class:', array('size' => 32));\r\n\r\n $borderstyle['style'] =& $this->createElement('select',\r\n 'style', 'style',\r\n array('solid' => 'Solid',\r\n 'dashed' => 'Dashed',\r\n 'dotted' => 'Dotted',\r\n 'inset' => 'Inset',\r\n 'outset' => 'Outset'));\r\n $borderstyle['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 2));\r\n $borderstyle['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($borderstyle, 'borderstyle', null, ' ');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: cell properties');\r\n\r\n $this->addElement('text', 'cellid', 'Id mask:', array('size' => 32));\r\n $this->addElement('text', 'cellclass', 'CSS class:', array('size' => 32));\r\n\r\n $cellvalue['min'] =& $this->createElement('text',\r\n 'min', 'minimum',\r\n array('size' => 4));\r\n $cellvalue['max'] =& $this->createElement('text',\r\n 'max', 'maximum',\r\n array('size' => 4));\r\n $cellvalue['inc'] =& $this->createElement('text',\r\n 'inc', 'increment',\r\n array('size' => 4));\r\n $this->addGroup($cellvalue, 'cellvalue', 'Value:', ' ');\r\n\r\n $cellsize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $cellsize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $cellsize['spacing'] =& $this->createElement('text',\r\n 'spacing', 'spacing',\r\n array('size' => 2));\r\n $cellsize['count'] =& $this->createElement('text',\r\n 'count', 'count',\r\n array('size' => 2));\r\n $this->addGroup($cellsize, 'cellsize', 'Size:', ' ');\r\n\r\n $cellcolor['active'] =& $this->createElement('text',\r\n 'active', 'active',\r\n array('size' => 7));\r\n $cellcolor['inactive'] =& $this->createElement('text',\r\n 'inactive', 'inactive',\r\n array('size' => 7));\r\n $cellcolor['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'background',\r\n array('size' => 7));\r\n $this->addGroup($cellcolor, 'cellcolor', 'Color:', ' ');\r\n\r\n $cellfont['family'] =& $this->createElement('text',\r\n 'family', 'family',\r\n array('size' => 32));\r\n $cellfont['size'] =& $this->createElement('text',\r\n 'size', 'size',\r\n array('size' => 2));\r\n $cellfont['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($cellfont, 'cellfont', 'Font:', ' ');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: save PHP/CSS code');\r\n\r\n $code[] =& $this->createElement('checkbox', 'P', null, 'PHP');\r\n $code[] =& $this->createElement('checkbox', 'C', null, 'CSS');\r\n $this->addGroup($code, 'phpcss', 'PHP and/or StyleSheet source code:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('next','apply'));\r\n }", "function buildSettingsForm() {}", "public function buildForm()\n {\n $this\n ->addMeasureList()\n ->addAscendingList()\n ->addTitles(['class' => 'indicator_title_title_narrative', 'narrative_true' => true])\n ->addDescriptions(['class' => 'indicator_description_title_narrative'])\n ->addCollection('reference', 'Activity\\Reference', 'reference', [], trans('elementForm.reference'))\n ->addAddMoreButton('add_reference', 'reference')\n ->addBaselines()\n ->addPeriods()\n ->addAddMoreButton('add_period', 'period')\n ->addRemoveThisButton('remove_indicator');\n }", "protected function build()\n {\n $stockalign = new GtkAlignment(0, 0, 0, 0);\n $stockalign->add(\n GtkImage::new_from_stock(\n Gtk::STOCK_DIALOG_ERROR, Gtk::ICON_SIZE_DIALOG\n )\n );\n $this->pack_start($stockalign, false, true);\n\n\n $this->expander = new GtkExpander('');\n\n $this->message = new GtkLabel();\n $this->expander->set_label_widget($this->message);\n $this->message->set_selectable(true);\n $this->message->set_line_wrap(true);\n\n $this->userinfo = new GtkLabel();\n $this->userinfo->set_selectable(true);\n $this->userinfo->set_line_wrap(true);\n //FIXME: add scrolled window\n $this->expander->add($this->userinfo);\n\n $this->pack_start($this->expander);\n }", "function build_basic_form()\r\n {\r\n $this->addElement('select', LanguagePack :: PROPERTY_BRANCH, Translation :: get('Branch'), LanguagePack :: get_branch_options());\r\n \r\n \t$this->addElement('file', 'file', Translation :: get('FileName'));\r\n $allowed_upload_types = array('zip');\r\n $this->addRule('file', Translation :: get('OnlyZIPAllowed'), 'filetype', $allowed_upload_types);\r\n $this->addRule('file', Translation :: get('ThisFieldIsRequired', null, Utilities :: COMMON_LIBRARIES), 'required');\r\n \r\n // Submit button\r\n //$this->addElement('submit', 'user_settings', 'OK');\r\n $buttons[] = $this->createElement('style_submit_button', 'submit', Translation :: get('Import', null, Utilities :: COMMON_LIBRARIES), array('class' => 'positive'));\r\n $buttons[] = $this->createElement('style_reset_button', 'reset', Translation :: get('Reset', null, Utilities :: COMMON_LIBRARIES), array('class' => 'normal empty'));\r\n \r\n $this->addGroup($buttons, 'buttons', null, '&nbsp;', false);\r\n }", "protected function buildForm()\n {\n $this->form = Yii::createObject(array_merge([\n 'scenario' => $this->scenario,\n 'parent_id' => $this->parent_id,\n 'parentTariff' => $this->parentTariff,\n 'tariff' => $this->tariff,\n ], $this->getFormOptions()));\n }", "function SLFramework_Progressbar($length=300, $height=20, $start=0, $insideText=\"\", $id=\"progressbar\") {\r\n\t\t\t$this->length = $length ; \r\n\t\t\t$this->insideText = $insideText ; \r\n\t\t\t$this->height = $height ; \r\n\t\t\t$this->start = $start ; \r\n\t\t\t$this->id = $id ; \r\n\t\t}", "public function buildForm()\n {\n }", "protected function Form_Create() {\n\t\t\t$this->txtValue1 = new QTextBox($this);\n\t\t\t\n\t\t\t$this->txtValue2 = new QTextBox($this);\n\t\t\t\n\t\t\t$this->lstOperation = new QListBox($this);\n\t\t\t$this->lstOperation->AddItem('+', 'add');\n\t\t\t$this->lstOperation->AddItem('-', 'subtract');\n\t\t\t$this->lstOperation->AddItem('*', 'multiply');\n\t\t\t$this->lstOperation->AddItem('/', 'divide');\n\t\t\t\n\t\t\t$this->btnCalculate = new QButton($this);\n\t\t\t$this->btnCalculate->Text = 'Calculate';\n\t\t\t$this->btnCalculate->AddAction(new QClickEvent(), new QServerAction('btnCalculate_Click'));\n\t\t\t\n\t\t\t$this->lblResult = new QLabel($this);\n\t\t\t$this->lblResult->HtmlEntities = false;\n\t\t}", "public function initConfigurationForm()\n\t{\n\t\tglobal $lng, $ilCtrl;\n\t\t\n\t\t$pl = $this->getPluginObject();\n\t\n\t\tinclude_once(\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$form = new ilPropertyFormGUI();\n\t\n\t\t// setting 1 (a checkbox)\n\t\t$cb = new ilCheckboxInputGUI($pl->txt(\"setting_1\"), \"setting_1\");\n\t\t$form->addItem($cb);\n\t\t\n\t\t// setting 2 (text)\n\t\t$ti = new ilTextInputGUI($pl->txt(\"setting_2\"), \"setting_2\");\n\t\t$ti->setRequired(true);\n\t\t$ti->setMaxLength(10);\n\t\t$ti->setSize(10);\n\t\t$form->addItem($ti);\n\t\n\t\t$form->addCommandButton(\"save\", $lng->txt(\"save\"));\n\t \n\t\t$form->setTitle($pl->txt(\"example_plugin_configuration\"));\n\t\t$form->setFormAction($ilCtrl->getFormAction($this));\n\t\t\n\t\treturn $form;\n\t}", "private function loadForm()\n {\n // init settings form\n $this->frm = new Form('settings');\n\n // add festival year\n $this->frm->addText('year', $this->get('fork.settings')->get($this->URL->getModule(), 'year'));\n\n // add fields for pagination\n $this->frm->addDropdown(\n 'overview_num_items',\n array_combine(range(1, 30), range(1, 30)),\n $this->get('fork.settings')->get($this->URL->getModule(), 'overview_num_items', 10)\n );\n $this->frm->addDropdown(\n 'recent_festival_list_num_items',\n array_combine(range(1, 30), range(1, 30)),\n $this->get('fork.settings')->get($this->URL->getModule(), 'recent_festival_list_num_items', 5)\n );\n\n // add functions fields\n $this->frm->addCheckbox('cover_image_enabled', $this->get('fork.settings')->get($this->URL->getModule(), 'cover_image_enabled', false));\n $this->frm->addCheckbox('cover_image_required', $this->get('fork.settings')->get($this->URL->getModule(), 'cover_image_required', false));\n $this->frm->addCheckbox('multi_images_enabled', $this->get('fork.settings')->get($this->URL->getModule(), 'multi_images_enabled', false));\n\n // add god user only fields\n if ($this->godUser) {\n $this->frm->addText('image_size_limit', (float) $this->get('fork.settings')->get($this->URL->getModule(), 'image_size_limit', 10));\n }\n }", "public function initClientOverviewForm()\n\t{\n\t\tglobal $lng, $ilCtrl;\n\n\t\t$settings = $this->setup->getClient()->getAllSettings();\n\n\t\tinclude_once(\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$this->form = new ilPropertyFormGUI();\n\n\t\t$this->form->setTitle($lng->txt(\"client_info\"));\n\n\t\t// installation name\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"inst_name\"), \"inst_name\");\n\t\t$ne->setValue(($this->setup->getClient()->getName())\n\t\t\t? $this->setup->getClient()->getName()\n\t\t\t: \"&lt;\".$this->lng->txt(\"no_client_name\").\"&gt;\");\n\t\t$ne->setInfo($this->setup->getClient()->getDescription());\n\t\t$this->form->addItem($ne);\n\n\t\t// client id\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"client_id\"), \"client_id\");\n\t\t$ne->setValue($this->setup->getClient()->getId());\n\t\t$this->form->addItem($ne);\n\n\t\t// nic id\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"ilias_nic_id\"), \"nic_id\");\n\t\t$ne->setValue(($this->setup->getClient()->db_installed)\n\t\t\t? $settings[\"inst_id\"]\n\t\t\t: $txt_no_database);\n\t\t$this->form->addItem($ne);\n\n\t\t// database version\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"db_version\"), \"db_vers\");\n\t\t$ne->setValue(($this->setup->getClient()->db_installed)\n\t\t\t? $settings[\"db_version\"]\n\t\t\t: $txt_no_database);\n\t\t$this->form->addItem($ne);\n\n\t\t// access status\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"access_status\"), \"status\");\n\t\t//$access_link = \"&nbsp;&nbsp;[<a href=\\\"setup.php?cmd=changeaccess&client_id=\".$this->setup->getClient()->getId().\"&back=view\\\">\".$this->lng->txt($access_button).\"</a>]\";\n\t\t$access_status = ($this->setup->getClient()->status[\"access\"][\"status\"]) ? \"online\" : \"disabled\";\n\t\t$ne->setValue($this->lng->txt($access_status).$access_link);\n\t\t$this->form->addItem($ne);\n\n\t\t// server information\n\t\t$sh = new ilFormSectionHeaderGUI();\n\t\t$sh->setTitle($this->lng->txt(\"server_info\"));\n\t\t$this->form->addItem($sh);\n\n\t\t// ilias version\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"ilias_version\"), \"il_vers\");\n\t\t$ne->setValue(ILIAS_VERSION);\n\t\t$this->form->addItem($ne);\n\n\t\t// host\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"host\"), \"host\");\n\t\t$ne->setValue($_SERVER[\"SERVER_NAME\"]);\n\t\t$this->form->addItem($ne);\n\n\t\t// ip address and port\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"ip_address\").\" & \".\n\t\t\t$lng->txt(\"port\"));\n\t\t$ne->setValue($_SERVER[\"SERVER_ADDR\"].\":\".$_SERVER[\"SERVER_PORT\"]);\n\t\t$this->form->addItem($ne);\n\n\t\t// server software\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"server_software\"), \"server_softw\");\n\t\t$ne->setValue($_SERVER[\"SERVER_SOFTWARE\"]);\n\t\t$this->form->addItem($ne);\n\n\t\t// http path\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"http_path\"), \"http_path\");\n\t\t$ne->setValue(ILIAS_HTTP_PATH);\n\t\t$this->form->addItem($ne);\n\n\t\t// absolute path\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"absolute_path\"), \"absolute_path\");\n\t\t$ne->setValue(ILIAS_ABSOLUTE_PATH);\n\t\t$this->form->addItem($ne);\n\n\t\t// third party tools\n\t\t$sh = new ilFormSectionHeaderGUI();\n\t\t$sh->setTitle($this->lng->txt(\"3rd_party_software\"));\n\t\t$this->form->addItem($sh);\n\n\t\t$tools = array(\"convert\", \"zip\", \"unzip\", \"ghostscript\", \"java\", \"htmldoc\", \"ffmpeg\");\n\n\t\tforeach ($tools as $tool)\n\t\t{\n\t\t\t// tool\n\t\t\t$ne = new ilNonEditableValueGUI($lng->txt($tool.\"_path\"), $tool.\"_path\");\n\t\t\t$p = $this->setup->ini->readVariable(\"tools\", $tool);\n\t\t\t$ne->setValue($p ? $p : $this->lng->txt(\"not_configured\"));\n\t\t\t$this->form->addItem($ne);\n\t\t}\n\n\t\t// latex\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"url_to_latex\"), \"latex_url\");\n\t\t$p = $this->setup->ini->readVariable(\"tools\", \"latex\"); // #13109\n\t\t$ne->setValue($p ? $p : $this->lng->txt(\"not_configured\"));\n\t\t$this->form->addItem($ne);\n\n\t\t// virus scanner\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"virus_scanner\"), \"vscan\");\n\t\t$ne->setValue($this->setup->ini->readVariable(\"tools\",\"vscantype\"));\n\t\t$this->form->addItem($ne);\n\n\t\t// scan command\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"scan_command\"), \"scan\");\n\t\t$p = $this->setup->ini->readVariable(\"tools\",\"scancommand\");\n\t\t$ne->setValue($p ? $p : $this->lng->txt(\"not_configured\"));\n\t\t$this->form->addItem($ne);\n\n\t\t// clean command\n\t\t$ne = new ilNonEditableValueGUI($lng->txt(\"clean_command\"), \"clean\");\n\t\t$p = $this->setup->ini->readVariable(\"tools\",\"cleancommand\");\n\t\t$ne->setValue($p ? $p : $this->lng->txt(\"not_configured\"));\n\t\t$this->form->addItem($ne);\n\n\t\t$this->form->setFormAction(\"setup.php?cmd=gateway\");\n\t}", "function __construct()\n {\n parent::__construct();\n \n // creates the form\n $this->form = new TQuickForm('form_historicotrabalho');\n $this->form->class = 'tform'; // change CSS class\n \n $this->form->style = 'display: table;width:100%'; // change style\n \n // Define Título da página\n $this->form->setFormTitle('Banco de Horas - Lançamento de Escalas');\n // Inicía ferramentas auxiliares\n $fer = new TFerramentas(); // Ferramentas diversas\n $sicad = new TSicadDados(); // Ferramentas de acesso ao SICAD\n //Realiza definições iniciais de acesso\n $profile = TSession::getValue('profile'); //Profile da Conta do usuário\n if ($this->opm_operador==false) //Carrega OPM do usuário\n {\n //Confere se já foi carregado a OPM, senão carrega...ou se o ambiente for de desenvolvimento usa a OPM = 140\n $this->opm_operador = ($fer->is_dev()==true) ? 140 : $profile['unidade']['id'];\n }\n if (!$this->nivel_sistema || $this->config_load == false) //Carrega OPMs que tem acesso\n {\n $this->nivel_sistema = $fer->getnivel (get_class($this));//Verifica qual nível de acesso do usuário\n $this->listas = $sicad->get_OpmsRegiao($this->opm_operador);//Carregas as OPMs que o usuário administra\n $this->config = $fer->getConfig($this->sistema); //Busca o Nível de acesso que o usuário tem para a Classe\n $this->config_load = true; //Informa que configuração foi carregada\n }\n \n // Cria os Itens do Formulário\n $rgmilitar = new TEntry('rgmilitar');\n \n //Monta ComboBox com OPMs que o Operador pode ver\n //echo $this->nivel_sistema.'---'.$this->opm_operador;\n if ($this->nivel_sistema>=80) //Adm e Gestor\n {\n $criteria = null;\n }\n else if ($this->nivel_sistema>=50 ) //Nível Operador (carrega OPM e subOPMs)\n {\n $criteria = new TCriteria;\n //Se não há lista de OPM, carrega só a OPM do usuário\n $lista = ($this->listas['valores']!='') ? $this->listas['valores'] : $profile['unidade']['id'];\n $query = \"(SELECT DISTINCT id FROM g_geral.opm WHERE id IN (\".$lista.\"))\";\n $criteria->add (new TFilter ('id','IN',$query));\n }\n else if ($this->nivel_sistema<50) //nível de visitante (só a própria OPM)\n {\n $criteria = new TCriteria;\n $query = \"(SELECT DISTINCT id FROM g_geral.opm WHERE id IN (\".$this->opm_operador.\"))\";\n $criteria->add (new TFilter ('id','IN',$query));\n }\n $opm = new TDBCombo('opm','sicad','OPM','id','nome','nome',$criteria);\n \n $ativo = new TCombo('ativo');\n $lista_opm = new TSelect('lista_opm');\n $lista_slc = new TSelect('lista_slc');\n //Critério para os Turnos de Serviço (Deve-se excluir os ocultos e o item id=13)\n $criteria = new TCriteria; \n $criteria->add(new TFilter('oculto', '=', 'f'));\n $criteria->add(new TFilter('id', '!=', 13));\n $turno = new TDBCombo('turno','sicad','turnos','id','nome','nome',$criteria);\n \n $datainicial = new TDate('dataInicial');\n $datafinal = new TDate('dataFinal');\n $horaIncialOrdinario = new TEntry('horaInicialOrdinario');\n $opm_id_info = new TDBCombo('opm_id_info','sicad','OPM','id','sigla','sigla');\n $opm_info_atual = new TCombo('OPM_info_Atual');\n $diasExtra = new TEntry('diasExtra');\n $mesExtra = new TCombo('mesExtra');\n $anoExtra = new TCombo('anoExtra');\n $horaInicioExtra = new TEntry('horaInicioExtra');\n $horasTrabalhadas = new TEntry('horasTrabalhadas');\n $tipoExtra = new TCombo('tipoExtra');\n $afasta_id = new TDBCombo('afasta_id','sicad','afastamentos','id','nome','nome');\n $dtinicioaf = new TDate('dtinicioaf');\n $dtfimaf = new TDate('dtfimaf');\n $bgaf = new TEntry('bgaf');\n $anobgaf = new TEntry('anobgaf');\n \n //Formatar Itens\n $rgmilitar->setSize(80);\n $opm->setSize(300);\n $lista_opm->setSize(280,256);\n $lista_slc->setSize(280,256);\n $turno->setSize(200);\n $datainicial->setSize(80);\n $datafinal->setSize(80);\n $horaIncialOrdinario->setSize(50);\n $opm_id_info->setSize(150);\n $opm_info_atual->setSize(80);\n $diasExtra->setSize(200);\n $mesExtra->setSize(80);\n $anoExtra->setSize(80);\n $horaInicioExtra->setSize(50);\n $horasTrabalhadas->setSize(50);\n $tipoExtra->setSize(120);\n $afasta_id->setSize(150);\n $dtinicioaf->setSize(80);\n $dtfimaf->setSize(80);\n $bgaf->setSize(80);\n $anobgaf->setSize(80);\n $ativo->setSize(80);\n //Style\n $lista_opm->style = \"font-size: 12px;\";\n $lista_slc->style = \"font-size: 12px;\";\n\n //Mascaras\n $datainicial->setMask('dd-mm-yyyy');\n $datafinal->setMask('dd-mm-yyyy');\n $dtinicioaf->setMask('dd-mm-yyyy');\n $dtfimaf->setMask('dd-mm-yyyy');\n $horaIncialOrdinario->setMask('99:99');\n $horaInicioExtra->setMask('99:99');\n $horasTrabalhadas->setMask('99');\n\n //Dados\n $opm_info_atual->addItems($fer->lista_sim_nao());//($item);\n $opm_info_atual->setValue('N');\n $ativo->addItems($fer->lista_sim_nao());//($item);\n $ativo->setValue('N');\n //\n $item = array (\"S\"=>\"Remunerada\",\"N\"=>\"Administrativa\");\n $tipoExtra->addItems($item);\n $tipoExtra->setValue('N');\n //\n $fer = new TFerramentas;\n $mesExtra->addItems($fer->lista_meses());\n $anoExtra->addItems($fer->lista_anos());\n //Tips\n $rgmilitar->setTip('Preencha com o RG do Militar pretendido...');\n $opm->setTip('Selecione a OPM para que possa preencher o campo de Lista da OPM com os componentes da Unidade.');\n $lista_opm->setTip('Lista dos Militares pertencente à Unidade Selecionada acima.<br>'.\n 'Vale lembrar que esta lista é atualizada diáriamente, assim os que estão aqui reflete as listas do SICAD.<br>' .\n 'Outro ponto a se considerar é a possibilidade de selecionar vários PMs, para isso basta usar<br>'.\n 'as teclas Control (ctrl) ou shift (seta pra cima);');\n $lista_slc->setTip('Militares Selecionados. Todos que estão nesta lista serão afetados, quer por uma escala ou por afastamentos...');\n $turno->setTip('Selecione uma Escala conforme a necessidade.');\n $datainicial->setTip('Selecione a data inicial da Escala Ordinária.');\n $datafinal->setTip('Selecione a data final da Escala Ordinária');\n $horaIncialOrdinario->setTip('Informe a hora de inicio do primeiro turno da Escala Ordinária.');\n $opm_id_info->setTip('Selecione qual foi a OPM informante da Escala.<br>É útil quando o militar está prestando serviços em uma OPM diferente da sua.');\n $opm_info_atual->setTip('A unidade Informante é a Unidade Atual? Se SIM, irei substituir a unidade que por ventura está na ficha do militar pela que foi informada...');\n $diasExtra->setTip('Defina os dias que o militar trabalhou podendo ser:<br> - Um dia apenas (Ex: 1);<br>- Alguns dias separados por vírgula(Ex: 2,5,8);<br>- Um intervalo de dias ligados por traço (Ex: 2-10);<br>- Um misto de combinações (Ex: 1,3-5,8,15-25). ');\n $mesExtra->setTip('Mês que ocorreu o serviço extra.');\n $anoExtra->setTip('Ano que ocorreu o serviço extra.');\n $horaInicioExtra->setTip('Hora que o serviço extra iniciou.');\n $horasTrabalhadas->setTip('Quantas horas foram trabalhadas neste serviço extra.');\n $tipoExtra->setTip('Defina se a escala foi Administrativa (sem remuneração AC-4) ou Remunerada (com pagamento de AC-4).');\n $afasta_id->setTip('Qual tipo de afastamento o militar fez jus.');\n $dtinicioaf->setTip('Data inicial do afastamento.');\n $dtfimaf->setTip('Data final do afastamento.');\n $bgaf->setTip('Numero do BG onde foi publicado o afastamento(Opcional).');\n $anobgaf->setTip('Ano de publicação do BG de Afastamento (Opcional).');\n $ativo->setTip('Se desejar que os militares inativos façam parte da seleção, marque como SIM para seleciona-los.'.\n '<br>Caso troque esta opção, não haverá a limpeza dos já selecionados.');\n //Ações\n //$change_action = new TAction(array($this, 'onSelectOpm_old'));//Ação de Popular lista de PMs\n //$opm->setChangeAction($change_action);\n //$ativo->setChangeAction($change_action);\n \n //Controle de Nível\n if ($this->nivel_sistema<$this->config[$this->cfg_chg_opm])\n {\n $opm_id_info->setEditable(FALSE);\n $opm_info_atual->setEditable(FALSE);\n }\n //Botões\n //Seleciona PMs\n $addPM = new TButton('addPM');\n $addPM->setImage('fa:arrow-down black');\n $addPM->class = 'btn btn-primary btn-sm';\n $Action = new TAction(array($this, 'onSelectMilitar'));\n $addPM->setAction($Action);\n $addPM->setLabel('Seleciona');\n \n //Botão Gera Escala Ordinária\n $runOrd = new TButton('runOrd');\n $runOrd->setImage('fa:floppy-o red');\n $runOrd->class = 'btn btn-primary btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_ord]) ? new TAction(array($this, 'onGeraOrdinaria')) : new TAction(array($this, 'NoAcess'));\n $runOrd->setAction($Action);\n $runOrd->setLabel('Gera Escala');\n \n //Botão Gera Escala Extra\n $runExt = new TButton('runExt');\n $runExt->setImage('fa:floppy-o red');\n $runExt->class = 'btn btn-primary btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_ext]) ? new TAction(array($this, 'onGeraExtra')) : new TAction(array($this, 'NoAcess'));\n $runExt->setAction($Action);\n $runExt->setLabel('Gera Escala');\n \n //Botão Gera Afastamento\n $runAfa = new TButton('runAfa');\n $runAfa->setImage('fa:floppy-o red');\n $runAfa->class = 'btn btn-primary btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_afa]) ? new TAction(array($this, 'onGeraAfastamento')) : new TAction(array($this, 'NoAcess'));\n $runAfa->setAction($Action);\n $runAfa->setLabel('Gera Afastamento');\n \n //Botão Limpa Afastamento\n $runCls = new TButton('runCls');\n $runCls->setImage('fa:trash black');\n $runCls->class = 'btn btn-danger btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_cls_afa]) ? new TAction(array($this, 'onLimpaAfastamento')) : new TAction(array($this, 'NoAcess'));\n $runCls->setAction($Action);\n $runCls->setLabel('Limpa Afastamento');\n \n //Botão Verifica Escala\n $runVer = new TButton('runVer');\n $runVer->setImage('fa:eye black');\n $runVer->class = 'btn btn-info btn-sm';\n $Action = new TAction(array($this, 'onListaEscala'));\n $runVer->setAction($Action);\n $runVer->setLabel('Ver Escala');\n \n //Botão limpa Escalas\n $runLmp = new TButton('runLmp');\n $runLmp->setImage('fa:trash black');\n $runLmp->class = 'btn btn-danger btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_cls_esc]) ? new TAction(array($this, 'onLimpaEscala')) : new TAction(array($this, 'NoAcess'));\n $runLmp->setAction($Action);\n $runLmp->setLabel('Limpa Escala');\n \n //Botão Carrega OPM na Lista da OPM\n $runOpm = new TButton('runOpm');\n $runOpm->setImage('fa:retweet');\n $runOpm->class = 'btn btn-success btn-sm';\n $Action = new TAction(array($this, 'onSelectOpm_old'));\n $runOpm->setAction($Action);\n $runOpm->setLabel('Carrega OPM');\n \n $table = new TTable();\n $table-> border = '0';\n $table-> cellpadding = '4';\n $table-> style = 'border-collapse:collapse; text-align: center;';\n\n //Monta selecionador\n $hbox1 = new THBox;\n $hbox1->addRowSet( new TLabel('RG:'),$rgmilitar,$addPM,new TLabel('Unidade:'),$opm,new TLabel('Seleciona Inativos?'),$ativo,$runOpm);\n $frame1 = new TFrame;\n $frame1->setLegend('Selecione os PMs ou a OPM');\n $frame1->add($hbox1);\n //Monta Labels das tabelas de distribuição\n $title4 = new TLabel('Listagem da OPM');\n $title4->setFontSize(12);\n $title4->setFontFace('Arial');\n $title4->setFontColor('black');\n $title4->setFontStyle('b');\n \n $title3 = new TLabel('Comandos');\n $title3->setFontSize(12);\n $title3->setFontFace('Arial');\n $title3->setFontColor('black');\n $title3->setFontStyle('b');\n \n $title2 = new TLabel('PMs Selecionados');\n $title2->setFontSize(12);\n $title2->setFontFace('Arial');\n $title2->setFontColor('black');\n $title2->setFontStyle('b');\n \n $title1 = new TLabel('Gestão da Escala');\n $title1->setFontSize(12);\n $title1->setFontFace('Arial');\n $title1->setFontColor('black');\n $title1->setFontStyle('b');\n \n //Botões de Serviço\n $add = new TButton('add_opm');\n $del = new TButton('del_opm');\n $cls = new TButton('clear');\n $ret = new TButton('return');\n \n //Tabelas Auxiliares de Cadastro\n $table_ord = new TTable;//Escalas Ordinárias\n $table_ext = new TTable;//Escalas Extras\n $table_afa = new TTable;//Afastamentos\n\n //Cria no Notebook \n $notebook = new TNotebook(200, 220);\n // Crias as Abas no notebook\n $notebook->appendPage('Ordinária' , $table_ord);\n $notebook->appendPage('Extra' , $table_ext);\n $notebook->appendPage('Afastamento', $table_afa);\n\n //Itens: Escala Ordinária\n $table_ord->addRowSet(array(new TLabel('Escala'),$turno));\n $table_ord->addRowSet(array(new TLabel('De'),$datainicial,new TLabel('A'),$datafinal));\n $table_ord->addRowSet(array(new TLabel('Hora Inicial'),$horaIncialOrdinario));\n $table_ord->addRowSet(array(new TLabel('OPM Informante'),$opm_id_info));\n $table_ord->addRowSet(array(new TLabel('Usar Informante com Atual'),$opm_info_atual));\n $table_ord->addRowSet(array($runLmp,$runOrd));\n //Itens: Escala Extra\n $table_ext->addRowSet(array(new TLabel('Dias'),$diasExtra));\n $table_ext->addRowSet(array(new TLabel('Mês'),$mesExtra,new TLabel('Ano'),$anoExtra));\n $table_ext->addRowSet(array(new TLabel('Hr Início'),$horaInicioExtra,new TLabel('Hrs. Trab.'),$horasTrabalhadas));\n $table_ext->addRowSet(array(new TLabel('Tipo Escala'),$tipoExtra));\n $table_ext->addRowSet($runExt);\n //Itens: Afastamento\n $table_afa->addRowSet(array(new TLabel('Afastamento'),$afasta_id));\n $table_afa->addRowSet(array(new TLabel('De'),$dtinicioaf,new TLabel('A'),$dtfimaf));\n $table_afa->addRowSet(array(new TLabel('BG'),$bgaf,new TLabel('/'),$anobgaf));\n $table_afa->addRowSet(array($runCls,$runAfa));\n\n //Ações\n $add->setAction(new TAction(array($this, 'onAddPMSelect')));\n $del->setAction(new TAction(array($this, 'onDelPMSelect')));\n $cls->setAction(new TAction(array($this, 'onClearSelect')));\n $ret->setAction(new TAction(array($this, 'onReturn')));\n //Labels\n $add->setLabel('Adiciona');\n $del->setLabel('Remove');\n $cls->setLabel('Limpa');\n $ret->setLabel('Volta ao Gerenciador');\n //Icones\n $add->setImage('fa:plus green');\n $del->setImage('fa:minus red');\n $cls->setImage('fa:file-o black');\n $ret->setImage('fa:backward black');\n //Classes\n $ret->class = 'btn btn-warning';\n //PopUps\n if ($this->popAtivo)\n {\n $addPM->popover = 'true';\n $addPM->popside = 'top';\n $addPM->poptitle = 'Seleciona Militar';\n $addPM->popcontent = 'Clique aqui ou tecle ENTER para selecionar o militar.';\n //\n $add->popover = 'true';\n $add->popside = 'top';\n $add->poptitle = 'Adiciona Seleção de Militares';\n $add->popcontent = 'Adiciona o(s) Militar(es) selecionado(s) da caixa Lista da OPM.';\n //\n $del->popover = 'true';\n $del->popside = 'top';\n $del->poptitle = 'Remove Seleção de Militares';\n $del->popcontent = 'Remove o(s) Militar(es) selecionado(s) da caixa Selecionados.';\n //\n $cls->popover = 'true';\n $cls->popside = 'top';\n $cls->poptitle = 'Limpa toda Seleção de Militares';\n $cls->popcontent = 'Remove TODOS os Militares selecionados da caixa Selecionados.';\n //\n $ret->popover = 'true';\n $ret->popside = 'top';\n $ret->poptitle = 'Retorno à Tela de Gerenciamento';\n $ret->popcontent = 'Retorna para a Tela de Gerenciamento do Banco de Horas.<br>A lista e Militares já selecionados permanecerá até o fechamento do sistema.';\n //\n $runOrd->popover = 'true';\n $runOrd->popside = 'top';\n $runOrd->poptitle = 'Gera Escala Ordinária.';\n $runOrd->popcontent = 'São campos necessários:<br>- Turno;<br>- Data inicial e final;<br>- Hora de Início da Escala.';//.\n //\n $runExt->popover = 'true';\n $runExt->popside = 'top';\n $runExt->poptitle = 'Gera Escala Extra';\n $runExt->popcontent = 'São Campos necessários:<br>- Dias (preencher com um ou mais);<br>- Mês e Ano;<br>- Hora Início;<br>'.\n '- Horas Trabalhadas;<br>- Tipo Escala.';\n //\n $runCls->popover = 'true';\n $runCls->popside = 'top';\n $runCls->poptitle = 'Limpa Afastamentos e Restrições (apenas)';\n $runCls->popcontent = 'Use os campos acima como filtro.';\n //\n $runAfa->popover = 'true';\n $runAfa->popside = 'top';\n $runAfa->poptitle = 'Gera Afastamentos e Restrições';\n $runAfa->popcontent = 'São Campos necessários:<br>- Afastamento;<br>- O intervalo de datas.';\n //\n $runVer->popover = 'true';\n $runVer->popside = 'top';\n $runVer->poptitle = 'Verifica a Escala';\n $runVer->popcontent = 'É necessário escolher um militar (um apenas) quer no Campo Lista da OPM quer no Campo Selecionados.';\n //\n $runLmp->popover = 'true';\n $runLmp->popside = 'top';\n $runLmp->poptitle = 'Limpa as Escalas e Afastamentos';\n $runLmp->popcontent = 'Limpa Escalas (ordinária e Extra) e Afastamentos dos militares Selecionados e no intervalo de datas';\n \n $runOpm->popover = 'true';\n $runOpm->popside = 'top';\n $runOpm->poptitle = 'Carrega os militares da Unidade';\n $runOpm->popcontent = 'Carrega os Militares da unidade escolhida filtrando os ativos e inativos conforme se escolhe Sim ou Não no campo Seleciona inativos:';\n }\n //Tabela com Comandos\n $frame_tempo = new TFrame();\n $hboxc = new THBox;\n $hboxc->addRowSet($add);\n $hboxc->addRowSet($del);\n $hboxc->addRowSet($cls);\n $hboxc->addRowSet($runVer);\n $hboxc->addRowSet($ret);\n\n $frame1->add($hboxc);\n $frame1->style = \"width: 100%; display: table-cell; vertical-align: top; text-align: center;\";\n\n //Frame com Lista da OPM\n $vbox2 = new TVBox;\n $frame4 = new TFrame(260,330);\n $frame4->setLegend('Lista de Militares da OPM');\n $frame4->add($lista_opm);\n $frame4->style = \"width: 280px; display: table-cell; vertical-align: top;\";\n $vbox2->add($frame4);\n //Frame de Seleção\n $vbox4 = new TVBox;\n $frame6 = new TFrame(260,330);\n $frame6->setLegend('Militares Selecionados');\n $frame6->add($lista_slc);\n $frame6->style = \"width: 280px; display: table-cell; vertical-align: top;\";\n $vbox4->add($frame6);\n //Frame de Geração\n $vbox5 = new TVBox;\n $frame3 = new TFrame(280,330);\n $frame3->setLegend('Funções de Geração');\n $frame3->add($notebook);\n $frame3->style = \"width: 280px; display: table-cell; vertical-align: top;\";\n $vbox5->add($frame3);\n \n $frame2 = new TFrame;\n $frame2->style = \"width: 100%; display: table-cell; vertical-align: top;\";\n $frame2->add($vbox2);\n $frame2->add($vbox4);\n $frame2->add($vbox5);\n\n $this->form->setFields(array($rgmilitar,$opm,$addPM,$lista_opm,$lista_slc,$opm_info_atual,$opm_id_info,$turno,\n $datafinal,$datainicial,$dtinicioaf,$dtfimaf,$horaIncialOrdinario,$horaInicioExtra,$horasTrabalhadas,\n $diasExtra,$mesExtra,$anoExtra,$bgaf,$anobgaf,$tipoExtra,$afasta_id,$ativo,\n $add,$del,$cls,$ret,$runOrd,$runExt,$runAfa,$runCls,$runVer,$runLmp,$runOpm)); \n // vertical box container\n $container = new TVBox;\n $container->style = 'width: 90%';\n $container->add(new TXMLBreadCrumb('menu.xml', 'bdhManagerForm'));\n $container->add($frame1);\n //$container->add($frame_tempo);\n $container->add($frame2);\n $this->form->add($container);\n\n //parent::add($container);\n parent::add($this->form);\n if ($opm->getValue())\n {\n self::onSelectOpm_old(array('opm'=>$opm->getValue(),'ativo'=>$ativo->getValue()));\n }\n $lista_slc = TSession::getValue(__CLASS__.'_lista_slc');\n self::onLoadPMSelect();\n self::popula_escalas();\n\n }", "protected function initializeForm()\n {\n $this->form = new Form();\n $this->form->add(Element::create(\"FieldSet\",\"Report Format\")->add\n (\n Element::create(\"SelectionList\", \"File Format\", \"report_format\")\n ->addOption(\"Hypertext Markup Language (HTML)\",\"html\")\n ->addOption(\"Portable Document Format (PDF)\",\"pdf\")\n ->addOption(\"Microsoft Excel (XLS)\",\"xls\")\n ->addOption(\"Microsoft Word (DOC)\",\"doc\")\n ->setRequired(true)\n ->setValue(\"pdf\"),\n Element::create(\"SelectionList\", \"Page Orientation\", \"page_orientation\")\n ->addOption(\"Landscape\", \"L\")\n ->addOption(\"Portrait\", \"P\")\n ->setValue(\"L\"),\n Element::create(\"SelectionList\", \"Paper Size\", \"paper_size\")\n ->addOption(\"A4\", \"A4\")\n ->addOption(\"A3\", \"A3\")\n ->setValue(\"A4\")\n )->setId(\"report_formats\")->addAttribute(\"style\",\"width:50%\")\n );\n $this->form->setSubmitValue(\"Generate\");\n $this->form->addAttribute(\"action\",Application::getLink($this->path.\"/generate\"));\n $this->form->addAttribute(\"target\",\"blank\");\n }", "protected function form()\n {\n $form = new Form(new Direction());\n\n $form->text('name', __(trans('hhx.name')));\n $form->text('intro', __(trans('hhx.intro')));\n $form->image('Img', __(trans('hhx.img')))->move('daily/direction')->uniqueName();\n $form->select('status', __(trans('hhx.status')))->options(config('hhx.status'));;\n $form->number('order_num', __(trans('hhx.order_num')));\n $form->hidden('all_num', __(trans('hhx.all_num')))->default(0.00);\n $form->decimal('stock', __(trans('hhx.stock')));\n\n return $form;\n }", "function show_form()\n\t\t{\n\t\t\t//set a global template for interactive activities\n\t\t\t$this->t->set_file('run_activity','run_activity.tpl');\n\t\t\t\n\t\t\t//set the css style files links\n\t\t\t$this->t->set_var(array(\n\t\t\t\t'run_activity_css_link'\t=> $this->get_css_link('run_activity', $this->print_mode),\n\t\t\t\t'run_activity_print_css_link'\t=> $this->get_css_link('run_activity', true),\n\t\t\t));\n\t\t\t\n\t\t\t\n\t\t\t// draw the activity's title zone\n\t\t\t$this->parse_title($this->activity_name);\n\n\t\t\t//draw the instance_name input or label\n\t\t\t// init wf_name to the requested one or the stored name\n\t\t\t// the requested one handle the looping in activity form\n\n\t\t\t$wf_name = get_var('wf_name','post',$this->instance->getName());\n\t\t\t$this->parse_instance_name($wf_name);\n\n\t\t\t//draw the instance_name input or label\n\t\t\t// init wf_set_owner to the requested one or the stored owner\n\t\t\t// the requested one handle the looping in activity form\n\t\t\t$wf_set_owner = get_var('wf_set_owner','post',$this->instance->getOwner());\n\t\t\t$this->parse_instance_owner($wf_set_owner);\n\t\t\t\n\t\t\t// draw the activity central user form\n\t\t\t$this->t->set_var(array('activity_template' => $this->wf_template->parse('output', 'template')));\n\t\t\t\n\t\t\t//draw the select priority box\n\t\t\t// init priority to the requested one or the stored priority\n\t\t\t// the requested one handle the looping in activity form\n\t\t\t$priority = get_var('wf_priority','post',$this->instance->getPriority());\n\t\t\t$this->parse_priority($priority);\n\t\t\t\n\t\t\t//draw the select next_user box\n\t\t\t// init next_user to the requested one or the stored one\n\t\t\t// the requested one handle the looping in activity form\n\t\t\t$next_user = get_var('wf_next_user','POST',$this->instance->getNextUser());\n\t\t\t$this->parse_next_user($next_user);\n\t\t\t\n\t\t\t//draw print_mode buttons\n\t\t\t$this->parse_print_mode_buttons();\n\t\t\t\n\t\t\t//draw the activity submit buttons\t\n\t\t\t$this->parse_submit();\n\t\t\t\n\t\t\t//draw the info zone\n\t\t\t$this->parse_info_zone();\n\t\t\t\n\t\t\t//draw the history zone if user wanted it\n\t\t\t$this->parse_history_zone();\n\t\t\t\n\t\t\t$this->translate_template('run_activity');\n\t\t\t$this->t->pparse('output', 'run_activity');\n\t\t\t$GLOBALS['egw']->common->egw_footer();\n\t\t}", "public function buildForm(array $form, FormStateInterface $form_state) {\n $form['time_duration'] = [\n '#type' => 'number',\n '#title' => $this->t('Time duration'),\n '#min' => 100,\n '#step' => 100,\n '#description' => $this->t(\n \"Time in seconds from the user's last login. Used as an event to \n update the relationships between the user and companies.\"\n ),\n '#default_value' => $this->config('pmmi_sso.company.settings')->get('time_duration'),\n '#required' => TRUE,\n ];\n $form['submit'] = [\n '#type' => 'submit',\n '#value' => $this->t('Save'),\n ];\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Activity());\n\n $form->text('name', __('Name'));\n $form->image('image', __('Image'));\n $form->text('intro', __('Intro'));\n $form->UEditor('details', __('Details'));\n $form->datetime('start_at', __('Start at'))->default(date('Y-m-d H:i:s'));\n $form->datetime('end_at', __('End at'))->default(date('Y-m-d H:i:s'));\n $form->text('location', __('Location'));\n $form->decimal('fee', __('Fee'))->default(0.00);\n $form->number('involves', __('Involves'));\n $form->number('involves_min', __('Involves min'));\n $form->number('involves_max', __('Involves max'));\n $form->switch('status', __('Status'));\n $form->text('organizers', __('Organizers'));\n $form->number('views', __('Views'));\n $form->switch('is_stick', __('Is stick'));\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Resources);\n\n $form->text('name', '名称')->rules('required',['required' => '请输入 配置项的名称']);\n\n $form->radio('type', '类型')->options(Resources::TYPE);\n\n $form->cropper('url','图片');\n\n $form->number('sort_num','排序');\n\n $form->textarea('memo','备注');\n\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`删除`按钮\n $tools->disableDelete();\n\n // 去掉`查看`按钮\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n\n return $form;\n }", "protected function buildForm()\n\t{\t\n\t\t$mid = $this->Form->newInput( 'hidden' );\n\t\t$mid->set( 'name', 'mid' );\n\t\t$mid->set( 'id', 'mid' );\n\t\t$mid->set( 'value', $this->data['id'] );\n\t\t\n\t\t$submit = $this->Form->newInput( 'submit' );\n\t\t$submit->set( 'name', 'submit' );\n\t\t$submit->set( 'id', 'submit' );\n\t\t$submit->set( 'value', 'Restore' );\n\t}", "function buildForm(){\n\t\t# menampilkan form\n\t}", "protected function form()\n {\n $form = new Form(new UserHealth());\n\n $form->number('height', __('Height'));\n $form->number('weight', __('Weight'));\n $form->text('blood_pressure', __('Blood pressure'));\n $form->text('sugar_level', __('Sugar level'));\n $form->text('blood_type', __('Blood type'));\n $form->decimal('muscle_mass', __('Muscle mass'))->default(0);\n $form->text('metabolism', __('Metabolism'));\n $form->textarea('genetic_history', __('Genetic history'));\n $form->textarea('illness_history', __('Illness history'));\n $form->textarea('allergies', __('Allergies'));\n $form->textarea('prescription', __('Prescription'));\n $form->textarea('operations', __('Operations'));\n $form->number('user_id', __('User id'));\n\n return $form;\n }", "private function build_form()\n {\n $ldm = LaikaDataManager :: get_instance();\n\n // The Laika Scales\n $scales = $ldm->retrieve_laika_scales(null, null, null, new ObjectTableOrder(LaikaScale :: PROPERTY_TITLE));\n $scale_options = array();\n while ($scale = $scales->next_result())\n {\n $scale_options[$scale->get_id()] = $scale->get_title();\n }\n\n // The Laika Percentile Codes\n $codes = $ldm->retrieve_percentile_codes();\n $code_options = array();\n foreach ($codes as $code)\n {\n $code_options[$code] = $code;\n }\n\n $this->addElement('category', Translation :: get('Dates'));\n $this->add_timewindow(self :: GRAPH_FILTER_START_DATE, self :: GRAPH_FILTER_END_DATE, Translation :: get('StartTimeWindow'), Translation :: get('EndTimeWindow'), false);\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Groups', null, 'group'));\n\n $group_options = $this->get_groups();\n\n if (count($group_options) > 0)\n {\n if (count($group_options) < 10)\n {\n $count = count($group_options);\n }\n else\n {\n $count = 10;\n }\n\n $this->addElement('select', self :: GRAPH_FILTER_GROUP, Translation :: get('Group', null, Utilities::GROUP), $this->get_groups(), array('multiple', 'size' => $count));\n $this->addRule(self :: GRAPH_FILTER_GROUP, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n }\n else\n {\n $this->addElement('static', 'group_text', Translation :: get('Group'), Translation :: get('NoGroupsAvailable'));\n $this->addElement('hidden', self :: GRAPH_FILTER_GROUP, null);\n }\n\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Results'));\n $this->addElement('select', self :: GRAPH_FILTER_SCALE, Translation :: get('Scale'), $scale_options, array('multiple', 'size' => '10'));\n $this->addRule(self :: GRAPH_FILTER_SCALE, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n $this->addElement('select', self :: GRAPH_FILTER_CODE, Translation :: get('Code'), $code_options, array('multiple', 'size' => '4'));\n $this->addRule(self :: GRAPH_FILTER_CODE, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Options'));\n\n $group = array();\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderGraphAndTable'), LaikaGraphRenderer :: RENDER_GRAPH_AND_TABLE);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderGraph'), LaikaGraphRenderer :: RENDER_GRAPH);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderTable'), LaikaGraphRenderer :: RENDER_TABLE);\n $this->addGroup($group, self :: GRAPH_FILTER_TYPE, Translation :: get('RenderType'), '<br/>', false);\n\n $allow_save = PlatformSetting :: get('allow_save', LaikaManager :: APPLICATION_NAME);\n if ($allow_save == true)\n {\n $this->addElement('checkbox', self :: GRAPH_FILTER_SAVE, Translation :: get('SaveToRepository'));\n }\n\n $maximum_attempts = PlatformSetting :: get('maximum_attempts', LaikaManager :: APPLICATION_NAME);\n if ($maximum_attempts > 1)\n {\n $group = array();\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('OnlyIncludeFirstAttempt'), LaikaGraphRenderer :: RENDER_ATTEMPT_FIRST);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('OnlyIncludeMostRecentAttempt'), LaikaGraphRenderer :: RENDER_ATTEMPT_LAST);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('IncludeAllAttempts'), LaikaGraphRenderer :: RENDER_ATTEMPT_ALL);\n $this->addGroup($group, self :: GRAPH_FILTER_ATTEMPT, Translation :: get('AttemptsToInclude'), '<br/>', false);\n }\n else\n {\n $this->addElement('hidden', self :: GRAPH_FILTER_ATTEMPT, LaikaGraphRenderer :: RENDER_ATTEMPT_ALL);\n }\n\n $this->addElement('category');\n\n $buttons = array();\n\n $buttons[] = $this->createElement('style_submit_button', 'submit', Translation :: get('Filter', null, Utilities::COMMON_LIBRARIES), array('class' => 'normal search'));\n $buttons[] = $this->createElement('style_reset_button', 'reset', Translation :: get('Reset', null, Utilities::COMMON_LIBRARIES), array('class' => 'normal empty'));\n\n $this->addGroup($buttons, 'buttons', null, '&nbsp;', false);\n }", "protected function createComponentProjectForm(): Form {\n $form = new Form; \n\n //Get all available project types for select field\n $types = $this->database->table('types');\n $types_arr = array();\n foreach($types as $type) {\n $types_arr[$type->id] = $type->title;\n }\n\n $form->addText('title', \"Project Title:\")\n ->setRequired()\n ->addRule($form::MAX_LENGTH, 'The Project title need to be less than %d character long', 60);\n\n $form->addSelect(\"type_id\", \"Project Type\", $types_arr)\n ->setRequired();\n\n $form->addText('start_date', \"Start Date\")\n ->setHtmlType('date')\n ->setRequired();\n\n $form->addText('end_date', \"End Date\")\n ->setHtmlType('date')\n ->setRequired();\n\n $form->addSubmit('send', \"Publish Project\");\n\n $form->onSuccess[] = [$this, 'projectFormSucceeded'];\n\n return $form;\n }", "function createForm(){\n\t\t$this->createFormBase();\n\t\t$this->addElement('reset','reset','Reset');\t\t\t\n\t\t$tab['seeker_0'] = '0';\n\t\t$this->setDefaults($tab);\n\t\t$this->addElement('submit','bouton_add_pi','Add a contact',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_contact'\"));\n\t\t$this->createVaFormResolution();\n\t\t$this->createFormGeoCoverage();\n\t\t$this->createFormGrid();\t\n\t\t//Required format\n\t\t$dformat = new data_format;\n\t\t$dformat_select = $dformat->chargeFormDestFormat($this,'required_data_format','Required data format','NetCDF');\n\t\t$this->addElement($dformat_select);\n\t\t$this->getElement('organism_0')->setLabel(\"Organism short name\");\n\t\t$this->getElement('project_0')->setLabel(\"Useful in the framework of\");\n\t\t$this->getElement('dats_abstract')->setLabel(\"Abstract \");\n\t\t$this->getElement('dats_purpose')->setLabel(\"Purpose\");\n\t\t$this->getElement('database')->setLabel(\"Data center\");\n\t\t$this->getElement('new_db_url')->setLabel(\"Data center url\");\n\t\t$this->getElement('dats_use_constraints')->setLabel(\"Access and use constraints\");\t\t\t\n\t\t$this->getElement('sensor_resol_tmp')->setLabel('Temporal (hh:mm:ss)');\t\t\t\n\t\t$this->getElement('place_alt_min_0')->setLabel(\"Altitude min\");\n\t\t$this->getElement('place_alt_max_0')->setLabel(\"Altitude max\");\n\t\t$this->getElement('data_format_0')->setLabel(\"Original data format\");\n\t\t$this->addElement('file','upload_doc','Attached document');\n\t\t$this->addElement('submit','upload','Upload');\n\t\t$this->addElement('submit','delete','Delete');\n\t\t\n\t\tfor ($i = 0; $i < $this->dataset->nbVars; $i++){\n\t\t\t$this->getElement('methode_acq_'.$i)->setLabel(\"Parameter processing related information\");\n\t\t}\n\t\t$this->addElement('submit','bouton_add_variable','Add a parameter',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_param'\"));\n\t\t\n\t\t$this->addElement('submit','bouton_add_projet','Add a project',array('onclick' => \"document.getElementById('frmvadataset').action += '#a_general'\"));\n\t\t$option = array();\n\t\t$option['default'] = \"\";\n\t\t$option['model'] = \"Model\";\n\t\t$option['instrument'] = \"Instrument\";\n\t\t$option['satellite'] = \"Satellite\";\n\t\t$this->addElement('select','source_type','source type :',$option,array('onchange' => \"DeactivateButtonAddSource()\",'onclick' => \"DeactivateButtonAddSource();\",'onmouseover' => 'DeactivateButtonAddSource();' ));\n\t\t$this->addElement('submit','bouton_add_source','Add a source',array('disabled' => 'true','onclick' => \"document.getElementById('frmvadataset').action += '#a_source'\",'onmouseout' => 'DeactivateButtonAddSource();'));\n\t\t\n\t\tif (isset ( $this->dataset->dats_sensors ) && ! empty ( $this->dataset->dats_sensors )) {\n\t\t\t$this->dats_sensors = array();\n\t\t\t$this->dats_sensors = $this->dataset->dats_sensors ;\n\t\t}\n\t\tif (isset ( $this->dataset->sites ) && ! empty ( $this->dataset->sites )) {\n\t\t\t$this->sites = array();\n\t\t\t$this->sites = $this->dataset->sites;\n\t\t}\n\t\t\n\t\tif ( isset ( $this->dataset->dats_id ) && $this->dataset->dats_id > 0) {\n\t\t\tif (isset ( $this->dataset->nbModFormSensor )){\n\t\t\t\tif($this->dataset->nbModForm <= $this->dataset->nbModFormSensor ){\n\t\t\t\t\t$this->dataset->nbModForm = $this->dataset->nbModFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset ( $this->dataset->nbSatFormSensor )){\n\t\t\t\t//$this->dataset->nbSatFormSensor = $this->dataset->nbSatFormSensor - 1;\n\t\t\t\tif($this->dataset->nbSatForm <= $this->dataset->nbSatFormSensor){\n\t\t\t\t\t$this->dataset->nbSatForm = $this->dataset->nbSatFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isset ( $this->dataset->nbInstruFormSensor )){\n\t\t\t\tif($this->dataset->nbInstruForm <= $this->dataset->nbInstruFormSensor){\n\t\t\t\t\t$this->dataset->nbInstruForm = $this->dataset->nbInstruFormSensor;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif($this->dataset->nbModForm > 0)\n\t\t\t$this->addMod();\n\t\tif($this->dataset->nbInstruForm > 0)\n\t\t\t$this->addInstru();\t\n\t\tif($this->dataset->nbSatForm > 0)\n\t\t\t$this->addSat();\n\t\t\n\t\t$this->dataset->dats_sensors = null ;\n\t\t$this->dataset->sites = null;\n\t}", "protected function getForm() {\n\t\tglobal $wgScript;\n\n\t\t$this->opts['title'] = $this->getPageTitle()->getPrefixedText();\n\t\tif ( !isset( $this->opts['target'] ) ) {\n\t\t\t$this->opts['target'] = '';\n\t\t} else {\n\t\t\t$this->opts['target'] = str_replace( '_', ' ', $this->opts['target'] );\n\t\t}\n\n\t\tif ( !isset( $this->opts['namespace'] ) ) {\n\t\t\t$this->opts['namespace'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['nsInvert'] ) ) {\n\t\t\t$this->opts['nsInvert'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['associated'] ) ) {\n\t\t\t$this->opts['associated'] = false;\n\t\t}\n\n\t\tif ( !isset( $this->opts['contribs'] ) ) {\n\t\t\t$this->opts['contribs'] = 'user';\n\t\t}\n\n\t\tif ( !isset( $this->opts['year'] ) ) {\n\t\t\t$this->opts['year'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['month'] ) ) {\n\t\t\t$this->opts['month'] = '';\n\t\t}\n\n\t\tif ( $this->opts['contribs'] == 'newbie' ) {\n\t\t\t$this->opts['target'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['tagfilter'] ) ) {\n\t\t\t$this->opts['tagfilter'] = '';\n\t\t}\n\n\t\tif ( !isset( $this->opts['topOnly'] ) ) {\n\t\t\t$this->opts['topOnly'] = false;\n\t\t}\n\n\t\tif ( !isset( $this->opts['newOnly'] ) ) {\n\t\t\t$this->opts['newOnly'] = false;\n\t\t}\n\n\t\t$form = Html::openElement(\n\t\t\t'form',\n\t\t\tarray(\n\t\t\t\t'method' => 'get',\n\t\t\t\t'action' => $wgScript,\n\t\t\t\t'class' => 'mw-contributions-form'\n\t\t\t)\n\t\t);\n\n\t\t# Add hidden params for tracking except for parameters in $skipParameters\n\t\t$skipParameters = array(\n\t\t\t'namespace',\n\t\t\t'nsInvert',\n\t\t\t'deletedOnly',\n\t\t\t'target',\n\t\t\t'contribs',\n\t\t\t'year',\n\t\t\t'month',\n\t\t\t'topOnly',\n\t\t\t'newOnly',\n\t\t\t'associated'\n\t\t);\n\n\t\tforeach ( $this->opts as $name => $value ) {\n\t\t\tif ( in_array( $name, $skipParameters ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$form .= \"\\t\" . Html::hidden( $name, $value ) . \"\\n\";\n\t\t}\n\n\t\t$tagFilter = ChangeTags::buildTagFilterSelector( $this->opts['tagfilter'] );\n\n\t\tif ( $tagFilter ) {\n\t\t\t$filterSelection = Html::rawElement(\n\t\t\t\t'td',\n\t\t\t\tarray( 'class' => 'mw-label' ),\n\t\t\t\tarray_shift( $tagFilter )\n\t\t\t);\n\t\t\t$filterSelection .= Html::rawElement(\n\t\t\t\t'td',\n\t\t\t\tarray( 'class' => 'mw-input' ),\n\t\t\t\timplode( '&#160', $tagFilter )\n\t\t\t);\n\t\t} else {\n\t\t\t$filterSelection = Html::rawElement( 'td', array( 'colspan' => 2 ), '' );\n\t\t}\n\n\t\t$labelNewbies = Xml::radioLabel(\n\t\t\t$this->msg( 'sp-contributions-newbies' )->text(),\n\t\t\t'contribs',\n\t\t\t'newbie',\n\t\t\t'newbie',\n\t\t\t$this->opts['contribs'] == 'newbie',\n\t\t\tarray( 'class' => 'mw-input' )\n\t\t);\n\t\t$labelUsername = Xml::radioLabel(\n\t\t\t$this->msg( 'sp-contributions-username' )->text(),\n\t\t\t'contribs',\n\t\t\t'user',\n\t\t\t'user',\n\t\t\t$this->opts['contribs'] == 'user',\n\t\t\tarray( 'class' => 'mw-input' )\n\t\t);\n\t\t$input = Html::input(\n\t\t\t'target',\n\t\t\t$this->opts['target'],\n\t\t\t'text',\n\t\t\tarray( 'size' => '40', 'required' => '', 'class' => 'mw-input' ) +\n\t\t\t\t( $this->opts['target'] ? array() : array( 'autofocus' )\n\t\t\t\t)\n\t\t);\n\t\t$targetSelection = Html::rawElement(\n\t\t\t'td',\n\t\t\tarray( 'colspan' => 2 ),\n\t\t\t$labelNewbies . '<br />' . $labelUsername . ' ' . $input . ' '\n\t\t);\n\n\t\t$namespaceSelection = Xml::tags(\n\t\t\t'td',\n\t\t\tarray( 'class' => 'mw-label' ),\n\t\t\tXml::label(\n\t\t\t\t$this->msg( 'namespace' )->text(),\n\t\t\t\t'namespace',\n\t\t\t\t''\n\t\t\t)\n\t\t);\n\t\t$namespaceSelection .= Html::rawElement(\n\t\t\t'td',\n\t\t\tnull,\n\t\t\tHtml::namespaceSelector(\n\t\t\t\tarray( 'selected' => $this->opts['namespace'], 'all' => '' ),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'namespace',\n\t\t\t\t\t'id' => 'namespace',\n\t\t\t\t\t'class' => 'namespaceselector',\n\t\t\t\t)\n\t\t\t) . '&#160;' .\n\t\t\t\tHtml::rawElement(\n\t\t\t\t\t'span',\n\t\t\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\t\t\tXml::checkLabel(\n\t\t\t\t\t\t$this->msg( 'invert' )->text(),\n\t\t\t\t\t\t'nsInvert',\n\t\t\t\t\t\t'nsInvert',\n\t\t\t\t\t\t$this->opts['nsInvert'],\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'title' => $this->msg( 'tooltip-invert' )->text(),\n\t\t\t\t\t\t\t'class' => 'mw-input'\n\t\t\t\t\t\t)\n\t\t\t\t\t) . '&#160;'\n\t\t\t\t) .\n\t\t\t\tHtml::rawElement( 'span', array( 'style' => 'white-space: nowrap' ),\n\t\t\t\t\tXml::checkLabel(\n\t\t\t\t\t\t$this->msg( 'namespace_association' )->text(),\n\t\t\t\t\t\t'associated',\n\t\t\t\t\t\t'associated',\n\t\t\t\t\t\t$this->opts['associated'],\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'title' => $this->msg( 'tooltip-namespace_association' )->text(),\n\t\t\t\t\t\t\t'class' => 'mw-input'\n\t\t\t\t\t\t)\n\t\t\t\t\t) . '&#160;'\n\t\t\t\t)\n\t\t);\n\n\t\tif ( $this->getUser()->isAllowed( 'deletedhistory' ) ) {\n\t\t\t$deletedOnlyCheck = Html::rawElement(\n\t\t\t\t'span',\n\t\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\t\tXml::checkLabel(\n\t\t\t\t\t$this->msg( 'history-show-deleted' )->text(),\n\t\t\t\t\t'deletedOnly',\n\t\t\t\t\t'mw-show-deleted-only',\n\t\t\t\t\t$this->opts['deletedOnly'],\n\t\t\t\t\tarray( 'class' => 'mw-input' )\n\t\t\t\t)\n\t\t\t);\n\t\t} else {\n\t\t\t$deletedOnlyCheck = '';\n\t\t}\n\n\t\t$checkLabelTopOnly = Html::rawElement(\n\t\t\t'span',\n\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\tXml::checkLabel(\n\t\t\t\t$this->msg( 'sp-contributions-toponly' )->text(),\n\t\t\t\t'topOnly',\n\t\t\t\t'mw-show-top-only',\n\t\t\t\t$this->opts['topOnly'],\n\t\t\t\tarray( 'class' => 'mw-input' )\n\t\t\t)\n\t\t);\n\t\t$checkLabelNewOnly = Html::rawElement(\n\t\t\t'span',\n\t\t\tarray( 'style' => 'white-space: nowrap' ),\n\t\t\tXml::checkLabel(\n\t\t\t\t$this->msg( 'sp-contributions-newonly' )->text(),\n\t\t\t\t'newOnly',\n\t\t\t\t'mw-show-new-only',\n\t\t\t\t$this->opts['newOnly'],\n\t\t\t\tarray( 'class' => 'mw-input' )\n\t\t\t)\n\t\t);\n\t\t$extraOptions = Html::rawElement(\n\t\t\t'td',\n\t\t\tarray( 'colspan' => 2 ),\n\t\t\t$deletedOnlyCheck . $checkLabelTopOnly . $checkLabelNewOnly\n\t\t);\n\n\t\t$dateSelectionAndSubmit = Xml::tags( 'td', array( 'colspan' => 2 ),\n\t\t\tXml::dateMenu(\n\t\t\t\t$this->opts['year'] === '' ? MWTimestamp::getInstance()->format( 'Y' ) : $this->opts['year'],\n\t\t\t\t$this->opts['month']\n\t\t\t) . ' ' .\n\t\t\t\tXml::submitButton(\n\t\t\t\t\t$this->msg( 'sp-contributions-submit' )->text(),\n\t\t\t\t\tarray( 'class' => 'mw-submit' )\n\t\t\t\t)\n\t\t);\n\n\t\t$form .= Xml::fieldset( $this->msg( 'sp-contributions-search' )->text() );\n\t\t$form .= Html::rawElement( 'table', array( 'class' => 'mw-contributions-table' ), \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $targetSelection ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $namespaceSelection ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $filterSelection ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $extraOptions ) . \"\\n\" .\n\t\t\tHtml::rawElement( 'tr', array(), $dateSelectionAndSubmit ) . \"\\n\"\n\t\t);\n\n\t\t$explain = $this->msg( 'sp-contributions-explain' );\n\t\tif ( !$explain->isBlank() ) {\n\t\t\t$form .= \"<p id='mw-sp-contributions-explain'>{$explain->parse()}</p>\";\n\t\t}\n\n\t\t$form .= Xml::closeElement( 'fieldset' ) . Xml::closeElement( 'form' );\n\n\t\treturn $form;\n\t}" ]
[ "0.77083474", "0.6770756", "0.6582365", "0.62868875", "0.6283344", "0.6056346", "0.60378045", "0.60249215", "0.595588", "0.5948091", "0.57597005", "0.5717113", "0.57070196", "0.5703448", "0.5602351", "0.5581841", "0.5547263", "0.5502277", "0.5478038", "0.5475706", "0.5434613", "0.54240876", "0.539587", "0.53778464", "0.5359825", "0.53590983", "0.5339037", "0.5321328", "0.5318948", "0.5309997" ]
0.76451546
1
Builds the form that define cell properties of your progress bar
function buildForm() { $this->buildTabs(); // tab caption $this->addElement('header', null, 'Progress2 Generator - Control Panel: cell properties'); $this->addElement('text', 'cellid', 'Id mask:', array('size' => 32)); $this->addElement('text', 'cellclass', 'CSS class:', array('size' => 32)); $cellvalue['min'] =& $this->createElement('text', 'min', 'minimum', array('size' => 4)); $cellvalue['max'] =& $this->createElement('text', 'max', 'maximum', array('size' => 4)); $cellvalue['inc'] =& $this->createElement('text', 'inc', 'increment', array('size' => 4)); $this->addGroup($cellvalue, 'cellvalue', 'Value:', ' '); $cellsize['width'] =& $this->createElement('text', 'width', 'width', array('size' => 4)); $cellsize['height'] =& $this->createElement('text', 'height', 'height', array('size' => 4)); $cellsize['spacing'] =& $this->createElement('text', 'spacing', 'spacing', array('size' => 2)); $cellsize['count'] =& $this->createElement('text', 'count', 'count', array('size' => 2)); $this->addGroup($cellsize, 'cellsize', 'Size:', ' '); $cellcolor['active'] =& $this->createElement('text', 'active', 'active', array('size' => 7)); $cellcolor['inactive'] =& $this->createElement('text', 'inactive', 'inactive', array('size' => 7)); $cellcolor['bgcolor'] =& $this->createElement('text', 'bgcolor', 'background', array('size' => 7)); $this->addGroup($cellcolor, 'cellcolor', 'Color:', ' '); $cellfont['family'] =& $this->createElement('text', 'family', 'family', array('size' => 32)); $cellfont['size'] =& $this->createElement('text', 'size', 'size', array('size' => 2)); $cellfont['color'] =& $this->createElement('text', 'color', 'color', array('size' => 7)); $this->addGroup($cellfont, 'cellfont', 'Font:', ' '); // Buttons of the wizard to do the job $this->buildButtons(array('apply','process')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: main properties');\r\n\r\n $shape[] =& $this->createElement('radio', null, null, 'Horizontal', '1');\r\n $shape[] =& $this->createElement('radio', null, null, 'Vertical', '2');\r\n $this->addGroup($shape, 'shape', 'Shape:');\r\n\r\n $way[] =& $this->createElement('radio', null, null, 'Natural', 'natural');\r\n $way[] =& $this->createElement('radio', null, null, 'Reverse', 'reverse');\r\n $this->addGroup($way, 'way', 'Direction:');\r\n\r\n $autosize[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $autosize[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($autosize, 'autosize', 'Best size:');\r\n\r\n $psize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $psize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $psize['left'] =& $this->createElement('text',\r\n 'left', 'left',\r\n array('size' => 4));\r\n $psize['top'] =& $this->createElement('text',\r\n 'top', 'top',\r\n array('size' => 4));\r\n $psize['position'] =& $this->createElement('text',\r\n 'position', 'position',\r\n array('disabled' => 'true'));\r\n $psize['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'bgcolor',\r\n array('size' => 7));\r\n $this->addGroup($psize, 'progresssize',\r\n 'Size, position and color:', ' ');\r\n\r\n $this->addElement('text', 'rAnimSpeed',\r\n array('Animation speed :',\r\n '(0-1000 ; 0:fast, 1000:slow)'));\r\n $this->addRule('rAnimSpeed',\r\n 'Should be between 0 and 1000',\r\n 'rangelength', array(0,1000), 'client');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('back','apply','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: run demo');\r\n\r\n $this->addElement('static', 'progressBar',\r\n 'Your progress meter looks like:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('reset','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: string properties');\r\n\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($stringpainted, 'stringpainted', 'Render a custom string:');\r\n\r\n $this->addElement('text', 'stringid', 'Id:', array('size' => 32));\r\n $this->addElement('text', 'stringclass', 'CSS class:', array('size' => 32));\r\n $this->addElement('text', 'stringvalue', 'Content:', array('size' => 32));\r\n\r\n $stringsize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $stringsize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $stringsize['left'] =& $this->createElement('text',\r\n 'left', 'left',\r\n array('size' => 4));\r\n $stringsize['top'] =& $this->createElement('text',\r\n 'top', 'top',\r\n array('size' => 4));\r\n $stringsize['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'bgcolor',\r\n array('size' => 7));\r\n $this->addGroup($stringsize, 'stringsize', 'Size, position and color:', ' ');\r\n\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Top', 'top');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Bottom', 'bottom');\r\n $this->addGroup($stringvalign, 'stringvalign', 'Vertical alignment:');\r\n\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Center', 'center');\r\n $this->addGroup($stringalign, 'stringalign', 'Horizontal alignment:');\r\n\r\n $stringfont['family'] =& $this->createElement('text',\r\n 'family', 'family',\r\n array('size' => 40));\r\n $stringfont['size'] =& $this->createElement('text',\r\n 'size', 'size',\r\n array('size' => 2));\r\n $stringfont['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($stringfont, 'stringfont', 'Font:', ' ');\r\n\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'normal', 'normal');\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'Bold', 'bold');\r\n $this->addGroup($stringweight, 'stringweight', 'Font weight:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: border properties');\r\n\r\n $borderpainted[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $borderpainted[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($borderpainted, 'borderpainted', 'Display the border:');\r\n\r\n $this->addElement('text', 'borderclass', 'CSS class:', array('size' => 32));\r\n\r\n $borderstyle['style'] =& $this->createElement('select',\r\n 'style', 'style',\r\n array('solid' => 'Solid',\r\n 'dashed' => 'Dashed',\r\n 'dotted' => 'Dotted',\r\n 'inset' => 'Inset',\r\n 'outset' => 'Outset'));\r\n $borderstyle['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 2));\r\n $borderstyle['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($borderstyle, 'borderstyle', null, ' ');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "public function build_table()\n {\n if (count($this->properties) > 0)\n {\n foreach ($this->properties as $property => $values)\n {\n $contents = array();\n $contents[] = $property;\n \n if (! is_array($values))\n {\n $values = array($values);\n }\n \n if (count($values) > 0)\n {\n foreach ($values as $value)\n {\n $contents[] = $value;\n }\n }\n \n $this->addRow($contents);\n }\n \n $this->setColAttributes(0, array('class' => 'header'));\n }\n else\n {\n $contents = array();\n $contents[] = Translation::get('NoResults', null, Utilities::COMMON_LIBRARIES);\n $row = $this->addRow($contents);\n $this->setCellAttributes($row, 0, 'style=\"font-style: italic;text-align:center;\" colspan=2');\n }\n }", "function formProperties() {\n\t\tglobal $l_we_class;\n\n\t\t// Create table\n\t\t$_content = new we_htmlTable(array(\"border\" => 0, \"cellpadding\" => 0, \"cellspacing\" => 0), 12, 5);\n\n\t\t// Row 1\n\t\t$_content->setCol(0, 0, null, $this->formInput2(155, \"width\", 10, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol(0, 2, null, $this->formInput2(155, \"height\", 10, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol(0, 4, null, $this->formInput2(155, \"border\", 10, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\n\t\t$_content->setCol(0, 1, null, getPixel(18, 1));\n\t\t$_content->setCol(0, 3, null, getPixel(18, 1));\n\n\t\t// Row 2\n\t\t$_content->setCol(1, 0, array(\"colspan\" => 5), getPixel(1, 5));\n\n\t\t// Row 3\n\t\t$_content->setCol(2, 0, null, $this->formInput2(155, \"align\", 10, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol(2, 2, null, $this->formInput2(155, \"hspace\", 10, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol(2, 4, null, $this->formInput2(155, \"vspace\", 10, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\n\t\t$_content->setCol(2, 1, null, getPixel(18, 1));\n\t\t$_content->setCol(2, 3, null, getPixel(18, 1));\n\n\t\t// Row 4\n\t\t$_content->setCol(3, 0, array(\"colspan\" => 5), getPixel(1, 5));\n\n\t\t// Row 5\n\t\t$_content->setCol(4, 0, array(\"colspan\" => 3), $this->formInput2(328, \"alt\", 23, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol(4, 3, null, getPixel(18, 1));\n\t\t$_content->setCol(4, 4, null, $this->formInput2(155, \"name\", 10, \"attrib\", 'onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\n\t\t// Row 6\n\t\t$_content->setCol(5, 0, array(\"colspan\" => 5), getPixel(1, 5));\n\n\t\t//\tRow 7\n\t\t$_content->setCol(6, 0, array(\"colspan\" => 3), $this->formInput2(328, \"title\", 23, \"attrib\", ($this->getElement(\"useMetaTitle\") == 1 ? \"readonly='readonly'\" : \"\") . '\" onChange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\n\t\t$_content->setCol(6, 3, null, getPixel(18, 1));\n\t\t\t$_titleField = \"we_\".$this->Name.\"_attrib[title]\";\n\t\t\t$_metaTitleField = \"we_\".$this->Name.\"_txt[Title]\";\n\t\t\t$useMetaTitle = \"we_\".$this->Name.\"_txt[useMetaTitle]\";\n\t\t//\tdisable field 'title' when checked or not.\n\t\t$_content->setCol(6, 4, array(\"valign\" => \"bottom\"), we_forms::checkboxWithHidden($this->getElement(\"useMetaTitle\"), $useMetaTitle, $l_we_class[\"use_meta_title\"], false, \"defaultfont\", \"if(this.checked){ document.forms[0]['$_titleField'].setAttribute('readonly', 'readonly', 'false'); document.forms[0]['$_titleField'].value = ''; }else{ document.forms[0]['$_titleField'].removeAttribute('readonly', 'false');}_EditorFrame.setEditorIsHot(true);\"));\n\n\t\t// longdesc should be available in images.\n\t\t// check if longdesc is set and get path\n\t\t$longdesc_id_name = \"we_\".$this->Name.\"_attrib[longdescid]\";\n\t\t$longdesc_text_name = 'tmp_longdesc';\n\t\t$longdesc_id = $this->getElement('longdescid');\n\t\tif($longdesc_id){\n $longdescPath = id_to_path($longdesc_id);\n\t\t} else {\n $longdescPath = '';\n\t\t}\n\n\t\t$we_button = new we_button();\n\n\t\t$yuiSuggest =& weSuggest::getInstance();\n\t\t$yuiSuggest->setAcId(\"LonDesc\");\n\t\t$yuiSuggest->setContentType(\"folder,text/webEdition,text/html\");\n\t\t$yuiSuggest->setInput($longdesc_text_name,$longdescPath);\n\t\t$yuiSuggest->setLabel($l_we_class[\"longdesc_text\"]);\n\t\t$yuiSuggest->setMaxResults(20);\n\t\t$yuiSuggest->setMayBeEmpty(1);\n\t\t$yuiSuggest->setResult($longdesc_id_name, $longdesc_id);\n\t\t$yuiSuggest->setSelector(\"Docselector\");\n\t\t$yuiSuggest->setWidth(328);\n\t\t$yuiSuggest->setSelectButton($we_button->create_button(\"select\", \"javascript:we_cmd('openDocselector',document.we_form.elements['$longdesc_id_name'].value,'\" . FILE_TABLE . \"','document.we_form.elements[\\\\'$longdesc_id_name\\\\'].value','document.we_form.elements[\\\\'$longdesc_text_name\\\\'].value','opener._EditorFrame.setEditorIsHot(true);opener.top.we_cmd(\\'reload_editpage\\');','\".session_id().\"','','text/webedition,text/plain,text/html',1)\"));\n\t\t$yuiSuggest->setTrashButton($we_button->create_button('image:btn_function_trash',\"javascript:document.we_form.elements['$longdesc_id_name'].value='-1';document.we_form.elements['$longdesc_text_name'].value='';_EditorFrame.setEditorIsHot(true); YAHOO.autocoml.setValidById('\".$yuiSuggest->getInputId().\"')\"));\n\t\t$_content->setCol(7, 0, array(\"colspan\" => 5), getPixel(1, 5));\n\t\t$_content->setCol(8, 0, array(\"valign\" => \"bottom\", 'colspan' => 5), $yuiSuggest->getYuiFiles() . $yuiSuggest->getHTML() . $yuiSuggest->getYuiCode());\n\n\t\t// Return HTML\n\t\treturn $_content->getHtmlCode();\n \t}", "public function buildForm()\n {\n $this\n ->addMeasureList()\n ->addAscendingList()\n ->addTitles(['class' => 'indicator_title_title_narrative', 'narrative_true' => true])\n ->addDescriptions(['class' => 'indicator_description_title_narrative'])\n ->addCollection('reference', 'Activity\\Reference', 'reference', [], trans('elementForm.reference'))\n ->addAddMoreButton('add_reference', 'reference')\n ->addBaselines()\n ->addPeriods()\n ->addAddMoreButton('add_period', 'period')\n ->addRemoveThisButton('remove_indicator');\n }", "protected function buildForm()\n {\n $this->form = Yii::createObject(array_merge([\n 'scenario' => $this->scenario,\n 'parent_id' => $this->parent_id,\n 'parentTariff' => $this->parentTariff,\n 'tariff' => $this->tariff,\n ], $this->getFormOptions()));\n }", "function formProperties(){\n\t\t// Create table\n\t\t$_content = new we_html_table(array('class' => 'default propertydualtable'), 5, 3);\n\t\t$row = 0;\n\t\t// Row 1\n\t\t$_content->setCol($row, 0, null, $this->formInputInfo2(155, 'width', 10, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"', \"origwidth\"));\n\t\t$_content->setCol($row, 1, null, $this->formInputInfo2(155, 'height', 10, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"', \"origheight\"));\n\t\t$_content->setCol($row++, 2, null, $this->formInput2(155, 'border', 10, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\n\n\t\t// Row 2\n\t\t$_content->setCol($row, 0, null, $this->formInput2(155, 'align', 10, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol($row, 1, null, $this->formInput2(155, 'hspace', 10, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol($row++, 2, null, $this->formInput2(155, 'vspace', 10, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\n\n\t\t// Row 3\n\t\t$_content->setCol($row, 0, array('colspan' => 3), $this->formInput2(328, 'alt', 23, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\t\t$_content->setCol($row++, 2, null, $this->formInput2(155, 'name', 10, 'attrib', 'onchange=\"_EditorFrame.setEditorIsHot(true);\"'));\n\n\n\t\t//\tRow 4\n\t\t$_content->setCol($row, 0, array('colspan' => 3), $this->formInput2(328, 'title', 23, 'attrib', ($this->getElement('useMetaTitle') == 1 ? \"readonly='readonly'\" : \"\") . '\" onchange=\"_EditorFrame.setEditorIsHot(true);\"', 'Title'));\n\n\t\t$_titleField = 'we_' . $this->Name . '_attrib[title]';\n\t\t$_metaTitleField = 'we_' . $this->Name . '_txt[Title]';\n\t\t$useMetaTitle = 'we_' . $this->Name . '_attrib[useMetaTitle]';\n\t\t//\tdisable field 'title' when checked or not. on checked true: document.forms[0]['$_titleField'].value='$this->getElement('Title')' and onchecked false: document.forms[0]['$_titleField'].value='' added to fix bug #5814\n\t\t$_content->setCol($row++, 2, array('style' => 'vertical-align:bottom'), we_html_forms::checkboxWithHidden($this->getElement('useMetaTitle'), $useMetaTitle, g_l('weClass', '[use_meta_title]'), false, 'defaultfont', \"if(this.checked){ document.forms[0]['\" . $_titleField . \"'].setAttribute('readonly', 'readonly', 'false'); document.forms[0]['\" . $_titleField . \"'].value = '\" . $this->getElement('Title') . \"'; }else{ document.forms[0]['\" . $_titleField . \"'].removeAttribute('readonly', 'false'); document.forms[0]['\" . $_titleField . \"'].value='';}_EditorFrame.setEditorIsHot(true);\"));\n\n\t\t// longdesc should be available in images.\n\t\t// check if longdesc is set and get path\n\t\t$longdesc_id_name = 'we_' . $this->Name . '_attrib[longdescid]';\n\t\t$longdesc_text_name = 'tmp_longdesc';\n\t\t$longdesc_id = $this->getElement('longdescid');\n\t\t$longdescPath = ($longdesc_id ? id_to_path($longdesc_id) : '');\n\n\t\t$yuiSuggest = & weSuggest::getInstance();\n\t\t$yuiSuggest->setAcId('LonDesc');\n\t\t$yuiSuggest->setContentType('folder,' . we_base_ContentTypes::WEDOCUMENT . ',' . we_base_ContentTypes::HTML);\n\t\t$yuiSuggest->setInput($longdesc_text_name, $longdescPath);\n\t\t$yuiSuggest->setLabel(g_l('weClass', '[longdesc_text]'));\n\t\t$yuiSuggest->setMaxResults(20);\n\t\t$yuiSuggest->setMayBeEmpty(1);\n\t\t$yuiSuggest->setResult($longdesc_id_name, $longdesc_id);\n\t\t$yuiSuggest->setSelector(weSuggest::DocSelector);\n\t\t$yuiSuggest->setWidth(328);\n\t\t$cmd1 = \"document.we_form.elements['\" . $longdesc_id_name . \"'].value\";\n\n\t\t$yuiSuggest->setSelectButton(we_html_button::create_button(we_html_button::SELECT, \"javascript:we_cmd('we_selector_image',\" . $cmd1 . \",'\" . FILE_TABLE . \"','\" . we_base_request::encCmd($cmd1) . \"','\" . we_base_request::encCmd(\"document.we_form.elements['\" . $longdesc_text_name . \"'].value\") . \"','\" . we_base_request::encCmd(\"opener._EditorFrame.setEditorIsHot(true);opener.top.we_cmd('reload_editpage');\") . \"','','','\" . we_base_ContentTypes::WEDOCUMENT . \",\" . we_base_ContentTypes::TEXT . \",\" . we_base_ContentTypes::HTML . \"',1)\"));\n\t\t$yuiSuggest->setTrashButton(we_html_button::create_button(we_html_button::TRASH, \"javascript:document.we_form.elements['\" . $longdesc_id_name . \"'].value='-1';document.we_form.elements['\" . $longdesc_text_name . \"'].value='';_EditorFrame.setEditorIsHot(true); YAHOO.autocoml.setValidById('\" . $yuiSuggest->getInputId() . \"')\"));\n\t\t$_content->setCol($row, 0, array('style' => 'vertical-align:bottom', 'colspan' => 5), $yuiSuggest->getHTML() . $yuiSuggest->getYuiJs());\n\n\t\t// Return HTML\n\t\treturn $_content->getHtml();\n\t}", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: save PHP/CSS code');\r\n\r\n $code[] =& $this->createElement('checkbox', 'P', null, 'PHP');\r\n $code[] =& $this->createElement('checkbox', 'C', null, 'CSS');\r\n $this->addGroup($code, 'phpcss', 'PHP and/or StyleSheet source code:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('next','apply'));\r\n }", "function value_form(&$form, &$form_state) {\n $form['value']['column'] = array(\n '#type' => 'textfield',\n '#title' => t('Property column'),\n '#default_value' => $this->value['column'],\n '#description' => t('Name of the database column to use in the comparison.'),\n );\n\n // We know which properties are available, so we can show a select box.\n if (isset($this->definition['available_properties'])) {\n $form['value']['column']['#type'] = 'select';\n $form['value']['column']['#options'] = array_combine($this->definition['available_properties'], $this->definition['available_properties']);\n }\n\n $form['value']['value'] = array(\n '#type' => 'textfield',\n '#title' => t('Value'),\n '#size' => 30,\n '#default_value' => $this->value['value'],\n '#process' => array('ctools_dependent_process'),\n '#dependency' => array('radio:options[operator]' => array_map('htmlentities', $this->operator_values(1))),\n );\n $form['value']['min'] = array(\n '#type' => 'textfield',\n '#title' => t('Min'),\n '#size' => 30,\n '#default_value' => $this->value['min'],\n '#process' => array('ctools_dependent_process'),\n '#dependency' => array('radio:options[operator]' => array_map('htmlentities', $this->operator_values(2))),\n );\n $form['value']['max'] = array(\n '#type' => 'textfield',\n '#title' => t('And max'),\n '#size' => 30,\n '#default_value' => $this->value['max'],\n '#process' => array('ctools_dependent_process'),\n '#dependency' => array('radio:options[operator]' => array_map('htmlentities', $this->operator_values(2))),\n );\n }", "protected function build()\n {\n $stockalign = new GtkAlignment(0, 0, 0, 0);\n $stockalign->add(\n GtkImage::new_from_stock(\n Gtk::STOCK_DIALOG_ERROR, Gtk::ICON_SIZE_DIALOG\n )\n );\n $this->pack_start($stockalign, false, true);\n\n\n $this->expander = new GtkExpander('');\n\n $this->message = new GtkLabel();\n $this->expander->set_label_widget($this->message);\n $this->message->set_selectable(true);\n $this->message->set_line_wrap(true);\n\n $this->userinfo = new GtkLabel();\n $this->userinfo->set_selectable(true);\n $this->userinfo->set_line_wrap(true);\n //FIXME: add scrolled window\n $this->expander->add($this->userinfo);\n\n $this->pack_start($this->expander);\n }", "public function buildForm() {\n\t\t$form = '';\n\n\t\tforeach ($this->_properties as $row) {\n\t\t\tif (!in_array($row['Field'],$this->_ignore)) {\n\t\t\t\t$elem = $this->buildElement($row);\n\t\t\t\t$row['Comment'] != '' ? $comment = $row['Comment'].\"<br />\": $comment = '';\n\t\t\t\t$this->_properties[$row['Field']]['HTMLElement']=$elem;\n\t\t\t\tif ($row['ElementType']=='hidden')\n\t\t\t\t\t$form .= $elem;\n\t\t\t\telse \n\t\t\t\t\t$form .= sprintf(\"<div class='formElem'>\\n%s<br />\\n%s\\n%s</div>\\n\",ucwords (str_replace (\"_\",\" \",$row['Field'])),$comment,$elem);\n\t\t\t}\n\t\t}\n\t\treturn $form;\n\t}", "function __construct()\n {\n parent::__construct();\n \n // creates the form\n $this->form = new TQuickForm('form_historicotrabalho');\n $this->form->class = 'tform'; // change CSS class\n \n $this->form->style = 'display: table;width:100%'; // change style\n \n // Define Título da página\n $this->form->setFormTitle('Banco de Horas - Lançamento de Escalas');\n // Inicía ferramentas auxiliares\n $fer = new TFerramentas(); // Ferramentas diversas\n $sicad = new TSicadDados(); // Ferramentas de acesso ao SICAD\n //Realiza definições iniciais de acesso\n $profile = TSession::getValue('profile'); //Profile da Conta do usuário\n if ($this->opm_operador==false) //Carrega OPM do usuário\n {\n //Confere se já foi carregado a OPM, senão carrega...ou se o ambiente for de desenvolvimento usa a OPM = 140\n $this->opm_operador = ($fer->is_dev()==true) ? 140 : $profile['unidade']['id'];\n }\n if (!$this->nivel_sistema || $this->config_load == false) //Carrega OPMs que tem acesso\n {\n $this->nivel_sistema = $fer->getnivel (get_class($this));//Verifica qual nível de acesso do usuário\n $this->listas = $sicad->get_OpmsRegiao($this->opm_operador);//Carregas as OPMs que o usuário administra\n $this->config = $fer->getConfig($this->sistema); //Busca o Nível de acesso que o usuário tem para a Classe\n $this->config_load = true; //Informa que configuração foi carregada\n }\n \n // Cria os Itens do Formulário\n $rgmilitar = new TEntry('rgmilitar');\n \n //Monta ComboBox com OPMs que o Operador pode ver\n //echo $this->nivel_sistema.'---'.$this->opm_operador;\n if ($this->nivel_sistema>=80) //Adm e Gestor\n {\n $criteria = null;\n }\n else if ($this->nivel_sistema>=50 ) //Nível Operador (carrega OPM e subOPMs)\n {\n $criteria = new TCriteria;\n //Se não há lista de OPM, carrega só a OPM do usuário\n $lista = ($this->listas['valores']!='') ? $this->listas['valores'] : $profile['unidade']['id'];\n $query = \"(SELECT DISTINCT id FROM g_geral.opm WHERE id IN (\".$lista.\"))\";\n $criteria->add (new TFilter ('id','IN',$query));\n }\n else if ($this->nivel_sistema<50) //nível de visitante (só a própria OPM)\n {\n $criteria = new TCriteria;\n $query = \"(SELECT DISTINCT id FROM g_geral.opm WHERE id IN (\".$this->opm_operador.\"))\";\n $criteria->add (new TFilter ('id','IN',$query));\n }\n $opm = new TDBCombo('opm','sicad','OPM','id','nome','nome',$criteria);\n \n $ativo = new TCombo('ativo');\n $lista_opm = new TSelect('lista_opm');\n $lista_slc = new TSelect('lista_slc');\n //Critério para os Turnos de Serviço (Deve-se excluir os ocultos e o item id=13)\n $criteria = new TCriteria; \n $criteria->add(new TFilter('oculto', '=', 'f'));\n $criteria->add(new TFilter('id', '!=', 13));\n $turno = new TDBCombo('turno','sicad','turnos','id','nome','nome',$criteria);\n \n $datainicial = new TDate('dataInicial');\n $datafinal = new TDate('dataFinal');\n $horaIncialOrdinario = new TEntry('horaInicialOrdinario');\n $opm_id_info = new TDBCombo('opm_id_info','sicad','OPM','id','sigla','sigla');\n $opm_info_atual = new TCombo('OPM_info_Atual');\n $diasExtra = new TEntry('diasExtra');\n $mesExtra = new TCombo('mesExtra');\n $anoExtra = new TCombo('anoExtra');\n $horaInicioExtra = new TEntry('horaInicioExtra');\n $horasTrabalhadas = new TEntry('horasTrabalhadas');\n $tipoExtra = new TCombo('tipoExtra');\n $afasta_id = new TDBCombo('afasta_id','sicad','afastamentos','id','nome','nome');\n $dtinicioaf = new TDate('dtinicioaf');\n $dtfimaf = new TDate('dtfimaf');\n $bgaf = new TEntry('bgaf');\n $anobgaf = new TEntry('anobgaf');\n \n //Formatar Itens\n $rgmilitar->setSize(80);\n $opm->setSize(300);\n $lista_opm->setSize(280,256);\n $lista_slc->setSize(280,256);\n $turno->setSize(200);\n $datainicial->setSize(80);\n $datafinal->setSize(80);\n $horaIncialOrdinario->setSize(50);\n $opm_id_info->setSize(150);\n $opm_info_atual->setSize(80);\n $diasExtra->setSize(200);\n $mesExtra->setSize(80);\n $anoExtra->setSize(80);\n $horaInicioExtra->setSize(50);\n $horasTrabalhadas->setSize(50);\n $tipoExtra->setSize(120);\n $afasta_id->setSize(150);\n $dtinicioaf->setSize(80);\n $dtfimaf->setSize(80);\n $bgaf->setSize(80);\n $anobgaf->setSize(80);\n $ativo->setSize(80);\n //Style\n $lista_opm->style = \"font-size: 12px;\";\n $lista_slc->style = \"font-size: 12px;\";\n\n //Mascaras\n $datainicial->setMask('dd-mm-yyyy');\n $datafinal->setMask('dd-mm-yyyy');\n $dtinicioaf->setMask('dd-mm-yyyy');\n $dtfimaf->setMask('dd-mm-yyyy');\n $horaIncialOrdinario->setMask('99:99');\n $horaInicioExtra->setMask('99:99');\n $horasTrabalhadas->setMask('99');\n\n //Dados\n $opm_info_atual->addItems($fer->lista_sim_nao());//($item);\n $opm_info_atual->setValue('N');\n $ativo->addItems($fer->lista_sim_nao());//($item);\n $ativo->setValue('N');\n //\n $item = array (\"S\"=>\"Remunerada\",\"N\"=>\"Administrativa\");\n $tipoExtra->addItems($item);\n $tipoExtra->setValue('N');\n //\n $fer = new TFerramentas;\n $mesExtra->addItems($fer->lista_meses());\n $anoExtra->addItems($fer->lista_anos());\n //Tips\n $rgmilitar->setTip('Preencha com o RG do Militar pretendido...');\n $opm->setTip('Selecione a OPM para que possa preencher o campo de Lista da OPM com os componentes da Unidade.');\n $lista_opm->setTip('Lista dos Militares pertencente à Unidade Selecionada acima.<br>'.\n 'Vale lembrar que esta lista é atualizada diáriamente, assim os que estão aqui reflete as listas do SICAD.<br>' .\n 'Outro ponto a se considerar é a possibilidade de selecionar vários PMs, para isso basta usar<br>'.\n 'as teclas Control (ctrl) ou shift (seta pra cima);');\n $lista_slc->setTip('Militares Selecionados. Todos que estão nesta lista serão afetados, quer por uma escala ou por afastamentos...');\n $turno->setTip('Selecione uma Escala conforme a necessidade.');\n $datainicial->setTip('Selecione a data inicial da Escala Ordinária.');\n $datafinal->setTip('Selecione a data final da Escala Ordinária');\n $horaIncialOrdinario->setTip('Informe a hora de inicio do primeiro turno da Escala Ordinária.');\n $opm_id_info->setTip('Selecione qual foi a OPM informante da Escala.<br>É útil quando o militar está prestando serviços em uma OPM diferente da sua.');\n $opm_info_atual->setTip('A unidade Informante é a Unidade Atual? Se SIM, irei substituir a unidade que por ventura está na ficha do militar pela que foi informada...');\n $diasExtra->setTip('Defina os dias que o militar trabalhou podendo ser:<br> - Um dia apenas (Ex: 1);<br>- Alguns dias separados por vírgula(Ex: 2,5,8);<br>- Um intervalo de dias ligados por traço (Ex: 2-10);<br>- Um misto de combinações (Ex: 1,3-5,8,15-25). ');\n $mesExtra->setTip('Mês que ocorreu o serviço extra.');\n $anoExtra->setTip('Ano que ocorreu o serviço extra.');\n $horaInicioExtra->setTip('Hora que o serviço extra iniciou.');\n $horasTrabalhadas->setTip('Quantas horas foram trabalhadas neste serviço extra.');\n $tipoExtra->setTip('Defina se a escala foi Administrativa (sem remuneração AC-4) ou Remunerada (com pagamento de AC-4).');\n $afasta_id->setTip('Qual tipo de afastamento o militar fez jus.');\n $dtinicioaf->setTip('Data inicial do afastamento.');\n $dtfimaf->setTip('Data final do afastamento.');\n $bgaf->setTip('Numero do BG onde foi publicado o afastamento(Opcional).');\n $anobgaf->setTip('Ano de publicação do BG de Afastamento (Opcional).');\n $ativo->setTip('Se desejar que os militares inativos façam parte da seleção, marque como SIM para seleciona-los.'.\n '<br>Caso troque esta opção, não haverá a limpeza dos já selecionados.');\n //Ações\n //$change_action = new TAction(array($this, 'onSelectOpm_old'));//Ação de Popular lista de PMs\n //$opm->setChangeAction($change_action);\n //$ativo->setChangeAction($change_action);\n \n //Controle de Nível\n if ($this->nivel_sistema<$this->config[$this->cfg_chg_opm])\n {\n $opm_id_info->setEditable(FALSE);\n $opm_info_atual->setEditable(FALSE);\n }\n //Botões\n //Seleciona PMs\n $addPM = new TButton('addPM');\n $addPM->setImage('fa:arrow-down black');\n $addPM->class = 'btn btn-primary btn-sm';\n $Action = new TAction(array($this, 'onSelectMilitar'));\n $addPM->setAction($Action);\n $addPM->setLabel('Seleciona');\n \n //Botão Gera Escala Ordinária\n $runOrd = new TButton('runOrd');\n $runOrd->setImage('fa:floppy-o red');\n $runOrd->class = 'btn btn-primary btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_ord]) ? new TAction(array($this, 'onGeraOrdinaria')) : new TAction(array($this, 'NoAcess'));\n $runOrd->setAction($Action);\n $runOrd->setLabel('Gera Escala');\n \n //Botão Gera Escala Extra\n $runExt = new TButton('runExt');\n $runExt->setImage('fa:floppy-o red');\n $runExt->class = 'btn btn-primary btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_ext]) ? new TAction(array($this, 'onGeraExtra')) : new TAction(array($this, 'NoAcess'));\n $runExt->setAction($Action);\n $runExt->setLabel('Gera Escala');\n \n //Botão Gera Afastamento\n $runAfa = new TButton('runAfa');\n $runAfa->setImage('fa:floppy-o red');\n $runAfa->class = 'btn btn-primary btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_afa]) ? new TAction(array($this, 'onGeraAfastamento')) : new TAction(array($this, 'NoAcess'));\n $runAfa->setAction($Action);\n $runAfa->setLabel('Gera Afastamento');\n \n //Botão Limpa Afastamento\n $runCls = new TButton('runCls');\n $runCls->setImage('fa:trash black');\n $runCls->class = 'btn btn-danger btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_cls_afa]) ? new TAction(array($this, 'onLimpaAfastamento')) : new TAction(array($this, 'NoAcess'));\n $runCls->setAction($Action);\n $runCls->setLabel('Limpa Afastamento');\n \n //Botão Verifica Escala\n $runVer = new TButton('runVer');\n $runVer->setImage('fa:eye black');\n $runVer->class = 'btn btn-info btn-sm';\n $Action = new TAction(array($this, 'onListaEscala'));\n $runVer->setAction($Action);\n $runVer->setLabel('Ver Escala');\n \n //Botão limpa Escalas\n $runLmp = new TButton('runLmp');\n $runLmp->setImage('fa:trash black');\n $runLmp->class = 'btn btn-danger btn-sm';\n $Action = ($this->nivel_sistema>=$this->config[$this->cfg_cls_esc]) ? new TAction(array($this, 'onLimpaEscala')) : new TAction(array($this, 'NoAcess'));\n $runLmp->setAction($Action);\n $runLmp->setLabel('Limpa Escala');\n \n //Botão Carrega OPM na Lista da OPM\n $runOpm = new TButton('runOpm');\n $runOpm->setImage('fa:retweet');\n $runOpm->class = 'btn btn-success btn-sm';\n $Action = new TAction(array($this, 'onSelectOpm_old'));\n $runOpm->setAction($Action);\n $runOpm->setLabel('Carrega OPM');\n \n $table = new TTable();\n $table-> border = '0';\n $table-> cellpadding = '4';\n $table-> style = 'border-collapse:collapse; text-align: center;';\n\n //Monta selecionador\n $hbox1 = new THBox;\n $hbox1->addRowSet( new TLabel('RG:'),$rgmilitar,$addPM,new TLabel('Unidade:'),$opm,new TLabel('Seleciona Inativos?'),$ativo,$runOpm);\n $frame1 = new TFrame;\n $frame1->setLegend('Selecione os PMs ou a OPM');\n $frame1->add($hbox1);\n //Monta Labels das tabelas de distribuição\n $title4 = new TLabel('Listagem da OPM');\n $title4->setFontSize(12);\n $title4->setFontFace('Arial');\n $title4->setFontColor('black');\n $title4->setFontStyle('b');\n \n $title3 = new TLabel('Comandos');\n $title3->setFontSize(12);\n $title3->setFontFace('Arial');\n $title3->setFontColor('black');\n $title3->setFontStyle('b');\n \n $title2 = new TLabel('PMs Selecionados');\n $title2->setFontSize(12);\n $title2->setFontFace('Arial');\n $title2->setFontColor('black');\n $title2->setFontStyle('b');\n \n $title1 = new TLabel('Gestão da Escala');\n $title1->setFontSize(12);\n $title1->setFontFace('Arial');\n $title1->setFontColor('black');\n $title1->setFontStyle('b');\n \n //Botões de Serviço\n $add = new TButton('add_opm');\n $del = new TButton('del_opm');\n $cls = new TButton('clear');\n $ret = new TButton('return');\n \n //Tabelas Auxiliares de Cadastro\n $table_ord = new TTable;//Escalas Ordinárias\n $table_ext = new TTable;//Escalas Extras\n $table_afa = new TTable;//Afastamentos\n\n //Cria no Notebook \n $notebook = new TNotebook(200, 220);\n // Crias as Abas no notebook\n $notebook->appendPage('Ordinária' , $table_ord);\n $notebook->appendPage('Extra' , $table_ext);\n $notebook->appendPage('Afastamento', $table_afa);\n\n //Itens: Escala Ordinária\n $table_ord->addRowSet(array(new TLabel('Escala'),$turno));\n $table_ord->addRowSet(array(new TLabel('De'),$datainicial,new TLabel('A'),$datafinal));\n $table_ord->addRowSet(array(new TLabel('Hora Inicial'),$horaIncialOrdinario));\n $table_ord->addRowSet(array(new TLabel('OPM Informante'),$opm_id_info));\n $table_ord->addRowSet(array(new TLabel('Usar Informante com Atual'),$opm_info_atual));\n $table_ord->addRowSet(array($runLmp,$runOrd));\n //Itens: Escala Extra\n $table_ext->addRowSet(array(new TLabel('Dias'),$diasExtra));\n $table_ext->addRowSet(array(new TLabel('Mês'),$mesExtra,new TLabel('Ano'),$anoExtra));\n $table_ext->addRowSet(array(new TLabel('Hr Início'),$horaInicioExtra,new TLabel('Hrs. Trab.'),$horasTrabalhadas));\n $table_ext->addRowSet(array(new TLabel('Tipo Escala'),$tipoExtra));\n $table_ext->addRowSet($runExt);\n //Itens: Afastamento\n $table_afa->addRowSet(array(new TLabel('Afastamento'),$afasta_id));\n $table_afa->addRowSet(array(new TLabel('De'),$dtinicioaf,new TLabel('A'),$dtfimaf));\n $table_afa->addRowSet(array(new TLabel('BG'),$bgaf,new TLabel('/'),$anobgaf));\n $table_afa->addRowSet(array($runCls,$runAfa));\n\n //Ações\n $add->setAction(new TAction(array($this, 'onAddPMSelect')));\n $del->setAction(new TAction(array($this, 'onDelPMSelect')));\n $cls->setAction(new TAction(array($this, 'onClearSelect')));\n $ret->setAction(new TAction(array($this, 'onReturn')));\n //Labels\n $add->setLabel('Adiciona');\n $del->setLabel('Remove');\n $cls->setLabel('Limpa');\n $ret->setLabel('Volta ao Gerenciador');\n //Icones\n $add->setImage('fa:plus green');\n $del->setImage('fa:minus red');\n $cls->setImage('fa:file-o black');\n $ret->setImage('fa:backward black');\n //Classes\n $ret->class = 'btn btn-warning';\n //PopUps\n if ($this->popAtivo)\n {\n $addPM->popover = 'true';\n $addPM->popside = 'top';\n $addPM->poptitle = 'Seleciona Militar';\n $addPM->popcontent = 'Clique aqui ou tecle ENTER para selecionar o militar.';\n //\n $add->popover = 'true';\n $add->popside = 'top';\n $add->poptitle = 'Adiciona Seleção de Militares';\n $add->popcontent = 'Adiciona o(s) Militar(es) selecionado(s) da caixa Lista da OPM.';\n //\n $del->popover = 'true';\n $del->popside = 'top';\n $del->poptitle = 'Remove Seleção de Militares';\n $del->popcontent = 'Remove o(s) Militar(es) selecionado(s) da caixa Selecionados.';\n //\n $cls->popover = 'true';\n $cls->popside = 'top';\n $cls->poptitle = 'Limpa toda Seleção de Militares';\n $cls->popcontent = 'Remove TODOS os Militares selecionados da caixa Selecionados.';\n //\n $ret->popover = 'true';\n $ret->popside = 'top';\n $ret->poptitle = 'Retorno à Tela de Gerenciamento';\n $ret->popcontent = 'Retorna para a Tela de Gerenciamento do Banco de Horas.<br>A lista e Militares já selecionados permanecerá até o fechamento do sistema.';\n //\n $runOrd->popover = 'true';\n $runOrd->popside = 'top';\n $runOrd->poptitle = 'Gera Escala Ordinária.';\n $runOrd->popcontent = 'São campos necessários:<br>- Turno;<br>- Data inicial e final;<br>- Hora de Início da Escala.';//.\n //\n $runExt->popover = 'true';\n $runExt->popside = 'top';\n $runExt->poptitle = 'Gera Escala Extra';\n $runExt->popcontent = 'São Campos necessários:<br>- Dias (preencher com um ou mais);<br>- Mês e Ano;<br>- Hora Início;<br>'.\n '- Horas Trabalhadas;<br>- Tipo Escala.';\n //\n $runCls->popover = 'true';\n $runCls->popside = 'top';\n $runCls->poptitle = 'Limpa Afastamentos e Restrições (apenas)';\n $runCls->popcontent = 'Use os campos acima como filtro.';\n //\n $runAfa->popover = 'true';\n $runAfa->popside = 'top';\n $runAfa->poptitle = 'Gera Afastamentos e Restrições';\n $runAfa->popcontent = 'São Campos necessários:<br>- Afastamento;<br>- O intervalo de datas.';\n //\n $runVer->popover = 'true';\n $runVer->popside = 'top';\n $runVer->poptitle = 'Verifica a Escala';\n $runVer->popcontent = 'É necessário escolher um militar (um apenas) quer no Campo Lista da OPM quer no Campo Selecionados.';\n //\n $runLmp->popover = 'true';\n $runLmp->popside = 'top';\n $runLmp->poptitle = 'Limpa as Escalas e Afastamentos';\n $runLmp->popcontent = 'Limpa Escalas (ordinária e Extra) e Afastamentos dos militares Selecionados e no intervalo de datas';\n \n $runOpm->popover = 'true';\n $runOpm->popside = 'top';\n $runOpm->poptitle = 'Carrega os militares da Unidade';\n $runOpm->popcontent = 'Carrega os Militares da unidade escolhida filtrando os ativos e inativos conforme se escolhe Sim ou Não no campo Seleciona inativos:';\n }\n //Tabela com Comandos\n $frame_tempo = new TFrame();\n $hboxc = new THBox;\n $hboxc->addRowSet($add);\n $hboxc->addRowSet($del);\n $hboxc->addRowSet($cls);\n $hboxc->addRowSet($runVer);\n $hboxc->addRowSet($ret);\n\n $frame1->add($hboxc);\n $frame1->style = \"width: 100%; display: table-cell; vertical-align: top; text-align: center;\";\n\n //Frame com Lista da OPM\n $vbox2 = new TVBox;\n $frame4 = new TFrame(260,330);\n $frame4->setLegend('Lista de Militares da OPM');\n $frame4->add($lista_opm);\n $frame4->style = \"width: 280px; display: table-cell; vertical-align: top;\";\n $vbox2->add($frame4);\n //Frame de Seleção\n $vbox4 = new TVBox;\n $frame6 = new TFrame(260,330);\n $frame6->setLegend('Militares Selecionados');\n $frame6->add($lista_slc);\n $frame6->style = \"width: 280px; display: table-cell; vertical-align: top;\";\n $vbox4->add($frame6);\n //Frame de Geração\n $vbox5 = new TVBox;\n $frame3 = new TFrame(280,330);\n $frame3->setLegend('Funções de Geração');\n $frame3->add($notebook);\n $frame3->style = \"width: 280px; display: table-cell; vertical-align: top;\";\n $vbox5->add($frame3);\n \n $frame2 = new TFrame;\n $frame2->style = \"width: 100%; display: table-cell; vertical-align: top;\";\n $frame2->add($vbox2);\n $frame2->add($vbox4);\n $frame2->add($vbox5);\n\n $this->form->setFields(array($rgmilitar,$opm,$addPM,$lista_opm,$lista_slc,$opm_info_atual,$opm_id_info,$turno,\n $datafinal,$datainicial,$dtinicioaf,$dtfimaf,$horaIncialOrdinario,$horaInicioExtra,$horasTrabalhadas,\n $diasExtra,$mesExtra,$anoExtra,$bgaf,$anobgaf,$tipoExtra,$afasta_id,$ativo,\n $add,$del,$cls,$ret,$runOrd,$runExt,$runAfa,$runCls,$runVer,$runLmp,$runOpm)); \n // vertical box container\n $container = new TVBox;\n $container->style = 'width: 90%';\n $container->add(new TXMLBreadCrumb('menu.xml', 'bdhManagerForm'));\n $container->add($frame1);\n //$container->add($frame_tempo);\n $container->add($frame2);\n $this->form->add($container);\n\n //parent::add($container);\n parent::add($this->form);\n if ($opm->getValue())\n {\n self::onSelectOpm_old(array('opm'=>$opm->getValue(),'ativo'=>$ativo->getValue()));\n }\n $lista_slc = TSession::getValue(__CLASS__.'_lista_slc');\n self::onLoadPMSelect();\n self::popula_escalas();\n\n }", "protected function definition_inner(&$mform) {\n\n $norepeats = $this->_customdata['norepeats']; // number of dimensions to display\n $descriptionopts = $this->_customdata['descriptionopts']; // wysiwyg fields options\n $current = $this->_customdata['current']; // current data to be set\n\n $mform->addElement('hidden', 'norepeats', $norepeats);\n $mform->setType('norepeats', PARAM_INT);\n // value not to be overridden by submitted value\n $mform->setConstants(array('norepeats' => $norepeats));\n\n $levelgrades = array();\n for ($i = 100; $i >= 0; $i--) {\n $levelgrades[$i] = $i;\n }\n\n for ($i = 0; $i < $norepeats; $i++) {\n $mform->addElement('header', 'dimension'.$i, get_string('dimensionnumber', 'workshopform_rubric', $i+1));\n $mform->addElement('hidden', 'dimensionid__idx_'.$i);\n $mform->setType('dimensionid__idx_'.$i, PARAM_INT);\n $mform->addElement('editor', 'description__idx_'.$i.'_editor',\n get_string('dimensiondescription', 'workshopform_rubric'), '', $descriptionopts);\n if (isset($current->{'numoflevels__idx_' . $i})) {\n $numoflevels = max($current->{'numoflevels__idx_' . $i} + self::ADDLEVELS, self::MINLEVELS);\n } else {\n $numoflevels = self::MINLEVELS;\n }\n $prevlevel = -1;\n for ($j = 0; $j < $numoflevels; $j++) {\n $mform->addElement('hidden', 'levelid__idx_' . $i . '__idy_' . $j);\n $mform->setType('levelid__idx_' . $i . '__idy_' . $j, PARAM_INT);\n $levelgrp = array();\n $levelgrp[] = $mform->createElement('select', 'grade__idx_'.$i.'__idy_'.$j,'', $levelgrades);\n $levelgrp[] = $mform->createElement('textarea', 'definition__idx_'.$i.'__idy_'.$j, '', array('cols' => 60, 'rows' => 3));\n $mform->addGroup($levelgrp, 'level__idx_'.$i.'__idy_'.$j, get_string('levelgroup', 'workshopform_rubric'), array(' '), false);\n $mform->setDefault('grade__idx_'.$i.'__idy_'.$j, $prevlevel + 1);\n if (isset($current->{'grade__idx_'.$i.'__idy_'.$j})) {\n $prevlevel = $current->{'grade__idx_'.$i.'__idy_'.$j};\n } else {\n $prevlevel++;\n }\n }\n }\n\n $mform->registerNoSubmitButton('adddims');\n $mform->addElement('submit', 'adddims', get_string('addmoredimensions', 'workshopform_rubric',\n workshop_rubric_strategy::ADDDIMS));\n $mform->closeHeaderBefore('adddims');\n\n $mform->addElement('header', 'configheader', get_string('configuration', 'workshopform_rubric'));\n $layoutgrp = array();\n $layoutgrp[] = $mform->createElement('radio', 'config_layout', '',\n get_string('layoutlist', 'workshopform_rubric'), 'list');\n $layoutgrp[] = $mform->createElement('radio', 'config_layout', '',\n get_string('layoutgrid', 'workshopform_rubric'), 'grid');\n $mform->addGroup($layoutgrp, 'layoutgrp', get_string('layout', 'workshopform_rubric'), array('<br />'), false);\n $mform->setDefault('config_layout', 'list');\n $this->set_data($current);\n }", "public function buildForm(array $form, FormStateInterface $form_state) {\n $form['time_duration'] = [\n '#type' => 'number',\n '#title' => $this->t('Time duration'),\n '#min' => 100,\n '#step' => 100,\n '#description' => $this->t(\n \"Time in seconds from the user's last login. Used as an event to \n update the relationships between the user and companies.\"\n ),\n '#default_value' => $this->config('pmmi_sso.company.settings')->get('time_duration'),\n '#required' => TRUE,\n ];\n $form['submit'] = [\n '#type' => 'submit',\n '#value' => $this->t('Save'),\n ];\n return $form;\n }", "public function buildFormLayout()\n {\n $this->addColumn(6, function(FormLayoutColumn $column) {\n $column->withSingleField('title');\n })->addColumn(6, function(FormLayoutColumn $column) {\n $column->withSingleField('cover');\n $column->withSingleField('description');\n $column->withSingleField('price');\n $column->withSingleField('tags');\n });\n }", "public function __construct()\n {\n parent::__construct();\n \n $this->form = new BootstrapFormBuilder;\n $this->form->setFormTitle('Bootstrap Form Builder');\n \n $label1 = new TLabel('Some label', '#7D78B6', 12, 'bi');\n $label1->style='text-align:left;border-bottom:1px solid #c0c0c0;width:100%';\n \n $this->form->appendPage('Page 1');\n $this->form->addContent( [$label1] );\n \n $field1a = new TEntry('row1a');\n $field2a = new TDate('row2a');\n $field2b = new TCombo('row2b');\n $field3a = new TEntry('row3a');\n $field3b = new TEntry('row3b');\n $field3c = new TEntry('row3c');\n $field3d = new TEntry('row3d');\n $field4a = new TText('row4a');\n \n // add a row with 2 slots\n $this->form->addFields( [ new TLabel('Row 1') ],\n [ $field1a ] );\n \n // add a row with 2 slots\n $this->form->addFields( [ new TLabel('Row 2') ],\n [ $field2a, $field2b ] );\n \n // add a row with 4 slots\n $this->form->addFields( [ new TLabel('Row 3') ],\n [ $field3a, $field3b ],\n [ new TLabel('Label') ],\n [ $field3c, $field3d ] );\n \n $field2b->addItems( ['1' => 'One', '2' => 'Two'] );\n \n $field1a->setSize('70%');\n $field2a->setSize('120');\n $field2b->setSize('75%');\n \n $field3a->setSize('50%');\n $field3b->setSize('50%');\n $field3c->setSize('50%');\n $field3d->setSize('50%');\n \n $this->form->appendPage('Page 2');\n \n $label2 = new TLabel('Another label', '#7D78B6', 12, 'bi');\n $label2->style='text-align:left;border-bottom:1px solid #c0c0c0;width:100%';\n \n $this->form->addContent( [$label2] );\n $this->form->addFields( [new TLabel('Row 4')], [$field4a ]);\n $field4a->setSize('100%', 100);\n \n $this->form->addAction('Send', new TAction(array($this, 'onSend')), 'fa:check-circle-o green');\n \n // wrap the page content using vertical box\n $vbox = new TVBox;\n $vbox->add(new TXMLBreadCrumb('menu.xml', __CLASS__));\n $vbox->add($this->form);\n\n parent::add($this->form);\n }", "function buildSettingsForm() {}", "function make_form_row(){\n\t\t$index = $this->col_index;\n\t\t# remove the * at the start of the first line\n\t\t$this->col_data = preg_replace(\"/^\\*/\",\"\",$this->col_data);\n\t\t# split the lines and remove the * from each. The value in each line goes into the array $values\n\t\t$values = preg_split(\"/\\n\\*?/\", $this->col_data);\n\t\t# pad the values array to make sure there are 3 entries\n\t\t$values = array_pad($values, 3, \"\");\n\t\t\n\t\t/*\n\t\tmake three input boxes. TableEdit takes row input from an input array named field a \n\t\tvalue for a particular field[$index] can be an array\n\t\t\tfield[$index][] is the field name\n\t\t\t40 is the length of the box\n\t\t\t$value is the value for the ith line\n\t\t \n\t\t */\n\t\t $form = ''; #initialize\n\t\t foreach($values as $i => $value){\n\t\t\t$form .= \"$i:\".XML::input(\"field[$index][]\",40,$value, array('maxlength'=>255)).\"<br>\\n\";\n\t\t}\n\t\treturn $form;\n\t\n\t}", "public function progressBar()\n {\n \n self::$view='adminlte::progress.bar';\n return $this;\n \n }", "private function build_form()\n {\n $ldm = LaikaDataManager :: get_instance();\n\n // The Laika Scales\n $scales = $ldm->retrieve_laika_scales(null, null, null, new ObjectTableOrder(LaikaScale :: PROPERTY_TITLE));\n $scale_options = array();\n while ($scale = $scales->next_result())\n {\n $scale_options[$scale->get_id()] = $scale->get_title();\n }\n\n // The Laika Percentile Codes\n $codes = $ldm->retrieve_percentile_codes();\n $code_options = array();\n foreach ($codes as $code)\n {\n $code_options[$code] = $code;\n }\n\n $this->addElement('category', Translation :: get('Dates'));\n $this->add_timewindow(self :: GRAPH_FILTER_START_DATE, self :: GRAPH_FILTER_END_DATE, Translation :: get('StartTimeWindow'), Translation :: get('EndTimeWindow'), false);\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Groups', null, 'group'));\n\n $group_options = $this->get_groups();\n\n if (count($group_options) > 0)\n {\n if (count($group_options) < 10)\n {\n $count = count($group_options);\n }\n else\n {\n $count = 10;\n }\n\n $this->addElement('select', self :: GRAPH_FILTER_GROUP, Translation :: get('Group', null, Utilities::GROUP), $this->get_groups(), array('multiple', 'size' => $count));\n $this->addRule(self :: GRAPH_FILTER_GROUP, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n }\n else\n {\n $this->addElement('static', 'group_text', Translation :: get('Group'), Translation :: get('NoGroupsAvailable'));\n $this->addElement('hidden', self :: GRAPH_FILTER_GROUP, null);\n }\n\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Results'));\n $this->addElement('select', self :: GRAPH_FILTER_SCALE, Translation :: get('Scale'), $scale_options, array('multiple', 'size' => '10'));\n $this->addRule(self :: GRAPH_FILTER_SCALE, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n $this->addElement('select', self :: GRAPH_FILTER_CODE, Translation :: get('Code'), $code_options, array('multiple', 'size' => '4'));\n $this->addRule(self :: GRAPH_FILTER_CODE, Translation :: get('ThisFieldIsRequired', null, Utilities::COMMON_LIBRARIES), 'required');\n $this->addElement('category');\n\n $this->addElement('category', Translation :: get('Options'));\n\n $group = array();\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderGraphAndTable'), LaikaGraphRenderer :: RENDER_GRAPH_AND_TABLE);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderGraph'), LaikaGraphRenderer :: RENDER_GRAPH);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_TYPE, null, Translation :: get('RenderTable'), LaikaGraphRenderer :: RENDER_TABLE);\n $this->addGroup($group, self :: GRAPH_FILTER_TYPE, Translation :: get('RenderType'), '<br/>', false);\n\n $allow_save = PlatformSetting :: get('allow_save', LaikaManager :: APPLICATION_NAME);\n if ($allow_save == true)\n {\n $this->addElement('checkbox', self :: GRAPH_FILTER_SAVE, Translation :: get('SaveToRepository'));\n }\n\n $maximum_attempts = PlatformSetting :: get('maximum_attempts', LaikaManager :: APPLICATION_NAME);\n if ($maximum_attempts > 1)\n {\n $group = array();\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('OnlyIncludeFirstAttempt'), LaikaGraphRenderer :: RENDER_ATTEMPT_FIRST);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('OnlyIncludeMostRecentAttempt'), LaikaGraphRenderer :: RENDER_ATTEMPT_LAST);\n $group[] = $this->createElement('radio', self :: GRAPH_FILTER_ATTEMPT, null, Translation :: get('IncludeAllAttempts'), LaikaGraphRenderer :: RENDER_ATTEMPT_ALL);\n $this->addGroup($group, self :: GRAPH_FILTER_ATTEMPT, Translation :: get('AttemptsToInclude'), '<br/>', false);\n }\n else\n {\n $this->addElement('hidden', self :: GRAPH_FILTER_ATTEMPT, LaikaGraphRenderer :: RENDER_ATTEMPT_ALL);\n }\n\n $this->addElement('category');\n\n $buttons = array();\n\n $buttons[] = $this->createElement('style_submit_button', 'submit', Translation :: get('Filter', null, Utilities::COMMON_LIBRARIES), array('class' => 'normal search'));\n $buttons[] = $this->createElement('style_reset_button', 'reset', Translation :: get('Reset', null, Utilities::COMMON_LIBRARIES), array('class' => 'normal empty'));\n\n $this->addGroup($buttons, 'buttons', null, '&nbsp;', false);\n }", "function SLFramework_Progressbar($length=300, $height=20, $start=0, $insideText=\"\", $id=\"progressbar\") {\r\n\t\t\t$this->length = $length ; \r\n\t\t\t$this->insideText = $insideText ; \r\n\t\t\t$this->height = $height ; \r\n\t\t\t$this->start = $start ; \r\n\t\t\t$this->id = $id ; \r\n\t\t}", "protected function form()\n {\n $form = new Form(new UserHealth());\n\n $form->number('height', __('Height'));\n $form->number('weight', __('Weight'));\n $form->text('blood_pressure', __('Blood pressure'));\n $form->text('sugar_level', __('Sugar level'));\n $form->text('blood_type', __('Blood type'));\n $form->decimal('muscle_mass', __('Muscle mass'))->default(0);\n $form->text('metabolism', __('Metabolism'));\n $form->textarea('genetic_history', __('Genetic history'));\n $form->textarea('illness_history', __('Illness history'));\n $form->textarea('allergies', __('Allergies'));\n $form->textarea('prescription', __('Prescription'));\n $form->textarea('operations', __('Operations'));\n $form->number('user_id', __('User id'));\n\n return $form;\n }", "protected function Form_Create() {\n\t\t\t$this->dtgFichasNotases = new FichasNotasDataGrid($this);\n\n\t\t\t// Style the DataGrid (if desired)\n\t\t\t$this->dtgFichasNotases->CssClass = 'datagrid';\n\t\t\t$this->dtgFichasNotases->AlternateRowStyle->CssClass = 'alternate';\n\n\t\t\t// Add Pagination (if desired)\n\t\t\t$this->dtgFichasNotases->Paginator = new QPaginator($this->dtgFichasNotases);\n\t\t\t$this->dtgFichasNotases->ItemsPerPage = 20;\n\n\t\t\t// Use the MetaDataGrid functionality to add Columns for this datagrid\n\n\t\t\t// Create an Edit Column\n\t\t\t$strEditPageUrl = __VIRTUAL_DIRECTORY__ . __FORM_DRAFTS__ . '/fichas_notas_edit.php';\n\t\t\t$this->dtgFichasNotases->MetaAddEditLinkColumn($strEditPageUrl, QApplication::Translate('Edit'), QApplication::Translate('Edit'));\n\n\t\t\t// Create the Other Columns (note that you can use strings for fichas_notas's properties, or you\n\t\t\t// can traverse down QQN::fichas_notas() to display fields that are down the hierarchy)\n\t\t\t$this->dtgFichasNotases->MetaAddColumn('IdFichaNota');\n\t\t\t$this->dtgFichasNotases->MetaAddColumn(QQN::FichasNotas()->IdFichasObject);\n\t\t\t$this->dtgFichasNotases->MetaAddColumn('IdNota');\n\t\t}", "public function buildForm()\n {\n }", "function build_basic_form()\r\n {\r\n $this->addElement('select', LanguagePack :: PROPERTY_BRANCH, Translation :: get('Branch'), LanguagePack :: get_branch_options());\r\n \r\n \t$this->addElement('file', 'file', Translation :: get('FileName'));\r\n $allowed_upload_types = array('zip');\r\n $this->addRule('file', Translation :: get('OnlyZIPAllowed'), 'filetype', $allowed_upload_types);\r\n $this->addRule('file', Translation :: get('ThisFieldIsRequired', null, Utilities :: COMMON_LIBRARIES), 'required');\r\n \r\n // Submit button\r\n //$this->addElement('submit', 'user_settings', 'OK');\r\n $buttons[] = $this->createElement('style_submit_button', 'submit', Translation :: get('Import', null, Utilities :: COMMON_LIBRARIES), array('class' => 'positive'));\r\n $buttons[] = $this->createElement('style_reset_button', 'reset', Translation :: get('Reset', null, Utilities :: COMMON_LIBRARIES), array('class' => 'normal empty'));\r\n \r\n $this->addGroup($buttons, 'buttons', null, '&nbsp;', false);\r\n }", "function _name_field_settings_pre_render($form) {\n\n $warning = t('<strong>Warning! Changing this setting after data has been created could result in the loss of data!</strong>');\n\n $form['field_properties'] = array(\n '#prefix' => '<table>',\n '#suffix' => '</table>',\n '#weight' => 1,\n 'thead' => array(\n '#prefix' => '<thead><tr><th>' . t('Field') . '</th>',\n '#suffix' => '</tr></thead>',\n '#weight' => 0,\n ),\n 'tbody' => array(\n '#prefix' => '<tbody>',\n '#suffix' => '</tbody>',\n '#weight' => 1,\n 'components' => array(\n '#prefix' => '<tr><td><strong>' . t('Components') . ' <sup>1</sup></strong></td>',\n '#suffix' => '</tr>',\n '#weight' => 1,\n ),\n 'minimum_components' => array(\n '#prefix' => '<tr><td><strong>' . t('Minimum components') . ' <sup>2</sup></strong></td>',\n '#suffix' => '</tr>',\n '#weight' => 2,\n ),\n 'max_length' => array(\n '#prefix' => '<tr><td><strong>' . t('Maximum length') . ' <sup>3</sup></strong></td>',\n '#suffix' => '</tr>',\n '#weight' => 3,\n ),\n 'labels' => array(\n '#prefix' => '<tr><td><strong>' . t('Labels') . ' <sup>4</sup></strong></td>',\n '#suffix' => '</tr>',\n '#weight' => 4,\n ),\n 'sort_options' => array(\n '#prefix' => '<tr><td><strong>' . t('Sort options') . ' <sup>5</sup></strong></td>',\n '#suffix' => '</tr>',\n '#weight' => 5,\n ),\n\n ),\n 'tfoot' => array(\n '#value' => '<tfoot><tr><td colspan=\"6\"><ol>'\n . '<li>'. t('Only selected components will be activated on this field. All non-selected components / component settings will be ignored.')\n . '<br/>'. $warning .'</li>'\n . '<li>'. t('The minimal set of components required before considered the name field to be incomplete.') . '</li>'\n . '<li>'. t('The maximum length of the field in characters. This must be between 1 and 255.')\n . '<br/>'. $warning .'</li>'\n . '<li>'. t('The labels are used to distinguish the fields. You can use the special label \"!tag\" to hide this.', array('!tag' => '<none>')) . '</li>'\n . '<li>'. t('This enables sorting on the options after the vocabulary terms are added and duplicate values are removed.') . '</li>'\n . '</ol></td></tr></tfoot>',\n '#weight' => 2,\n ),\n );\n\n $i = 0;\n foreach (_name_translations() as $key => $title) {\n // Adds the table header for the particullar field.\n $form['field_properties']['thead'][$key]['#value'] = '<th>' . $title . '</th>';\n $form['field_properties']['thead'][$key]['#weight'] = ++$i;\n\n // Strip the title & description.\n unset($form['components'][$key]['#description']);\n unset($form['components'][$key]['#title']);\n\n unset($form['minimum_components'][$key]['#description']);\n unset($form['minimum_components'][$key]['#title']);\n\n unset($form['max_length'][$key]['#description']);\n unset($form['max_length'][$key]['#title']);\n $form['max_length'][$key]['#size'] = 10;\n\n unset($form['labels'][$key]['#description']);\n unset($form['labels'][$key]['#title']);\n $form['labels'][$key]['#size'] = 10;\n\n if (isset($form['sort_options'][$key])) {\n unset($form['sort_options'][$key]['#description']);\n unset($form['sort_options'][$key]['#title']);\n }\n\n // Moves the elements into the table.\n $form['field_properties']['tbody']['components'][$key] = $form['components'][$key];\n $form['field_properties']['tbody']['components'][$key]['#prefix'] = '<td>';\n $form['field_properties']['tbody']['components'][$key]['#suffix'] = '</td>';\n $form['field_properties']['tbody']['components'][$key]['#weight'] = $i;\n\n $form['field_properties']['tbody']['minimum_components'][$key] = $form['minimum_components'][$key];\n $form['field_properties']['tbody']['minimum_components'][$key]['#prefix'] = '<td>';\n $form['field_properties']['tbody']['minimum_components'][$key]['#suffix'] = '</td>';\n $form['field_properties']['tbody']['minimum_components'][$key]['#weight'] = $i;\n\n $form['field_properties']['tbody']['max_length'][$key] = $form['max_length'][$key];\n $form['field_properties']['tbody']['max_length'][$key]['#prefix'] = '<td>';\n $form['field_properties']['tbody']['max_length'][$key]['#suffix'] = '</td>';\n $form['field_properties']['tbody']['max_length'][$key]['#weight'] = $i;\n\n $form['field_properties']['tbody']['labels'][$key] = $form['labels'][$key];\n $form['field_properties']['tbody']['labels'][$key]['#prefix'] = '<td>';\n $form['field_properties']['tbody']['labels'][$key]['#suffix'] = '</td>';\n $form['field_properties']['tbody']['labels'][$key]['#weight'] = $i;\n\n if (isset($form['sort_options'][$key])) {\n $form['field_properties']['tbody']['sort_options'][$key] = $form['sort_options'][$key];\n }\n else {\n $form['field_properties']['tbody']['sort_options'][$key] = array('#value' => '&nbsp;');\n }\n $form['field_properties']['tbody']['sort_options'][$key]['#prefix'] = '<td>';\n $form['field_properties']['tbody']['sort_options'][$key]['#suffix'] = '</td>';\n $form['field_properties']['tbody']['sort_options'][$key]['#weight'] = $i;\n\n // Clean up the leftovers.\n unset($form['components'][$key]);\n $form['components']['#access'] = FALSE;\n\n unset($form['minimum_components'][$key]);\n $form['minimum_components']['#access'] = FALSE;\n\n unset($form['max_length'][$key]);\n $form['max_length']['#access'] = FALSE;\n\n unset($form['labels'][$key]);\n $form['labels']['#access'] = FALSE;\n\n if (isset($form['sort_options'][$key])) {\n unset($form['sort_options'][$key]);\n $form['sort_options']['#access'] = FALSE;\n }\n }\n\n // Move the additional options under the table.\n $form['extra_fields'] = array(\n '#weight' => 2,\n );\n $form['title_options']['#weight'] = 0;\n $form['generational_options']['#weight'] = 1;\n $form['extra_fields']['title_options'] = $form['title_options'];\n $form['extra_fields']['generational_options'] = $form['generational_options'];\n unset($form['title_options']);\n unset($form['generational_options']);\n\n return $form;\n}", "public function initConfigurationForm()\n\t{\n\t\tglobal $lng, $ilCtrl;\n\t\t\n\t\t$pl = $this->getPluginObject();\n\t\n\t\tinclude_once(\"Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$form = new ilPropertyFormGUI();\n\t\n\t\t// setting 1 (a checkbox)\n\t\t$cb = new ilCheckboxInputGUI($pl->txt(\"setting_1\"), \"setting_1\");\n\t\t$form->addItem($cb);\n\t\t\n\t\t// setting 2 (text)\n\t\t$ti = new ilTextInputGUI($pl->txt(\"setting_2\"), \"setting_2\");\n\t\t$ti->setRequired(true);\n\t\t$ti->setMaxLength(10);\n\t\t$ti->setSize(10);\n\t\t$form->addItem($ti);\n\t\n\t\t$form->addCommandButton(\"save\", $lng->txt(\"save\"));\n\t \n\t\t$form->setTitle($pl->txt(\"example_plugin_configuration\"));\n\t\t$form->setFormAction($ilCtrl->getFormAction($this));\n\t\t\n\t\treturn $form;\n\t}", "function show_answers_progress($real_taskcount, $taskcount, $pid, $colspan = -1){\n\t\n\tif($colspan == -1){\n\t\t$colspan = \"\";\n\t}else{\n\t\t$colspan = \" colspan = '$colspan'\";\n\t}\n\t\n\t//taskcount formatting\n\t$delta_tc = $taskcount - $real_taskcount;\n\t$const = 60;\n\tif($delta_tc >= 0 || $taskcount == 0){\n\t\t$width = $const;\n\t}else{\n\t\t$width = $const * $taskcount / $real_taskcount;\n\t\t$sec_width = $const * abs($delta_tc) / $real_taskcount;\n\t}\n\t\n\techo \"<td$colspan>\n\t\t<meter id='bar$pid' min='0' max='100' low='25' high='75' optimum='100' value='\";\n\tif($taskcount == 0){\n\t\techo \"0\";\n\t}else{\n\t\techo $real_taskcount / $taskcount * 100;\n\t}\n\techo \"' style='width:\".$width.\"%;'></meter>\";\n\tif($delta_tc < 0 && $taskcount != 0){\n\t\techo \"<meter min='0' max='100' low='0' high='0' optimum='0' value='100' style='width:\".$sec_width.\"%;'></meter>\";\n\t}\n\techo \"<label for='bar$pid'> $real_taskcount/$taskcount</label>\";\n\techo \"</td>\";\n}" ]
[ "0.6875267", "0.6660737", "0.61252147", "0.59181416", "0.5750583", "0.5628293", "0.56004137", "0.54911566", "0.5465777", "0.54592305", "0.5447524", "0.5405576", "0.5394894", "0.5352851", "0.5344981", "0.5321192", "0.5305566", "0.52538455", "0.51949364", "0.51825327", "0.5163714", "0.5151167", "0.51504636", "0.5136932", "0.51298517", "0.5082424", "0.5072682", "0.50598717", "0.50482756", "0.5039891" ]
0.7368667
0
Builds the form that define border properties of your progress bar
function buildForm() { $this->buildTabs(); // tab caption $this->addElement('header', null, 'Progress2 Generator - Control Panel: border properties'); $borderpainted[] =& $this->createElement('radio', null, null, 'Yes', true); $borderpainted[] =& $this->createElement('radio', null, null, 'No', false); $this->addGroup($borderpainted, 'borderpainted', 'Display the border:'); $this->addElement('text', 'borderclass', 'CSS class:', array('size' => 32)); $borderstyle['style'] =& $this->createElement('select', 'style', 'style', array('solid' => 'Solid', 'dashed' => 'Dashed', 'dotted' => 'Dotted', 'inset' => 'Inset', 'outset' => 'Outset')); $borderstyle['width'] =& $this->createElement('text', 'width', 'width', array('size' => 2)); $borderstyle['color'] =& $this->createElement('text', 'color', 'color', array('size' => 7)); $this->addGroup($borderstyle, 'borderstyle', null, ' '); // Buttons of the wizard to do the job $this->buildButtons(array('apply','process')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: main properties');\r\n\r\n $shape[] =& $this->createElement('radio', null, null, 'Horizontal', '1');\r\n $shape[] =& $this->createElement('radio', null, null, 'Vertical', '2');\r\n $this->addGroup($shape, 'shape', 'Shape:');\r\n\r\n $way[] =& $this->createElement('radio', null, null, 'Natural', 'natural');\r\n $way[] =& $this->createElement('radio', null, null, 'Reverse', 'reverse');\r\n $this->addGroup($way, 'way', 'Direction:');\r\n\r\n $autosize[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $autosize[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($autosize, 'autosize', 'Best size:');\r\n\r\n $psize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $psize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $psize['left'] =& $this->createElement('text',\r\n 'left', 'left',\r\n array('size' => 4));\r\n $psize['top'] =& $this->createElement('text',\r\n 'top', 'top',\r\n array('size' => 4));\r\n $psize['position'] =& $this->createElement('text',\r\n 'position', 'position',\r\n array('disabled' => 'true'));\r\n $psize['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'bgcolor',\r\n array('size' => 7));\r\n $this->addGroup($psize, 'progresssize',\r\n 'Size, position and color:', ' ');\r\n\r\n $this->addElement('text', 'rAnimSpeed',\r\n array('Animation speed :',\r\n '(0-1000 ; 0:fast, 1000:slow)'));\r\n $this->addRule('rAnimSpeed',\r\n 'Should be between 0 and 1000',\r\n 'rangelength', array(0,1000), 'client');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('back','apply','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: run demo');\r\n\r\n $this->addElement('static', 'progressBar',\r\n 'Your progress meter looks like:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('reset','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: cell properties');\r\n\r\n $this->addElement('text', 'cellid', 'Id mask:', array('size' => 32));\r\n $this->addElement('text', 'cellclass', 'CSS class:', array('size' => 32));\r\n\r\n $cellvalue['min'] =& $this->createElement('text',\r\n 'min', 'minimum',\r\n array('size' => 4));\r\n $cellvalue['max'] =& $this->createElement('text',\r\n 'max', 'maximum',\r\n array('size' => 4));\r\n $cellvalue['inc'] =& $this->createElement('text',\r\n 'inc', 'increment',\r\n array('size' => 4));\r\n $this->addGroup($cellvalue, 'cellvalue', 'Value:', ' ');\r\n\r\n $cellsize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $cellsize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $cellsize['spacing'] =& $this->createElement('text',\r\n 'spacing', 'spacing',\r\n array('size' => 2));\r\n $cellsize['count'] =& $this->createElement('text',\r\n 'count', 'count',\r\n array('size' => 2));\r\n $this->addGroup($cellsize, 'cellsize', 'Size:', ' ');\r\n\r\n $cellcolor['active'] =& $this->createElement('text',\r\n 'active', 'active',\r\n array('size' => 7));\r\n $cellcolor['inactive'] =& $this->createElement('text',\r\n 'inactive', 'inactive',\r\n array('size' => 7));\r\n $cellcolor['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'background',\r\n array('size' => 7));\r\n $this->addGroup($cellcolor, 'cellcolor', 'Color:', ' ');\r\n\r\n $cellfont['family'] =& $this->createElement('text',\r\n 'family', 'family',\r\n array('size' => 32));\r\n $cellfont['size'] =& $this->createElement('text',\r\n 'size', 'size',\r\n array('size' => 2));\r\n $cellfont['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($cellfont, 'cellfont', 'Font:', ' ');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: string properties');\r\n\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($stringpainted, 'stringpainted', 'Render a custom string:');\r\n\r\n $this->addElement('text', 'stringid', 'Id:', array('size' => 32));\r\n $this->addElement('text', 'stringclass', 'CSS class:', array('size' => 32));\r\n $this->addElement('text', 'stringvalue', 'Content:', array('size' => 32));\r\n\r\n $stringsize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $stringsize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $stringsize['left'] =& $this->createElement('text',\r\n 'left', 'left',\r\n array('size' => 4));\r\n $stringsize['top'] =& $this->createElement('text',\r\n 'top', 'top',\r\n array('size' => 4));\r\n $stringsize['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'bgcolor',\r\n array('size' => 7));\r\n $this->addGroup($stringsize, 'stringsize', 'Size, position and color:', ' ');\r\n\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Top', 'top');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Bottom', 'bottom');\r\n $this->addGroup($stringvalign, 'stringvalign', 'Vertical alignment:');\r\n\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Center', 'center');\r\n $this->addGroup($stringalign, 'stringalign', 'Horizontal alignment:');\r\n\r\n $stringfont['family'] =& $this->createElement('text',\r\n 'family', 'family',\r\n array('size' => 40));\r\n $stringfont['size'] =& $this->createElement('text',\r\n 'size', 'size',\r\n array('size' => 2));\r\n $stringfont['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($stringfont, 'stringfont', 'Font:', ' ');\r\n\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'normal', 'normal');\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'Bold', 'bold');\r\n $this->addGroup($stringweight, 'stringweight', 'Font weight:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function border($args) {\r\n\t\t$description = $args['description'];\r\n\t\tunset($args['description']);\r\n\t\t\r\n\t\t// if plain is true at this point we must have come from a post meta box so do some switching of the args around\r\n\t\t$form_prefix = $this->metabox_id_fix($args);\r\n\t\t$form_value = $this->metabox_value_fix($args);\r\n\t\t\r\n\t\t\r\n\t\t$args['selections'] = array('0'=>'0','1'=>'1','2'=>'2','3'=>'3','4'=>'4','5'=>'5','6'=>'6','7'=>'7','8'=>'8','9'=>'9','10'=>'10','11'=>'11','12'=>'12','13'=>'13','14'=>'14','15'=>'15','16'=>'16','17'=>'17');\r\n\t\t$args['plain']=true; // switch to plain mode\r\n\t\t\r\n\t\tunset($args['description']); // kill off descriptions till the end\r\n\t\t$args['id'] = $form_prefix . \"[size]\";\r\n\t\t$args['value'] =$form_value[size];\r\n\t\t$args['width'] = '75';\r\n\t\t$args['tooltip'] = 'Choose the border size';\r\n\t\t$this->select($args);\r\n\t\t\r\n\t\t// add font units\r\n\t\t$args['id'] = $form_prefix . \"[unit]\";\r\n\t\t$args['value'] = $form_value['unit'];\r\n\t\t$args['width'] = '65';\r\n\t\t\t$args['tooltip'] = 'Choose the border size units';\r\n\t\t$this->fontunit($args);\r\n\t\t\r\n\t\t// add font size\r\n\t\t$args['id'] = $form_prefix . \"[type]\";\r\n\t\t$args['value'] = $form_value[type];\r\n\t\t$args['width'] = '165';\r\n\t\t$args['tooltip'] = 'Choose the border type';\r\n\t\t$this->bordertype($args);\r\n\t\t\r\n\t\t// add font units\r\n\t\t$args['id'] = $form_prefix . \"[color]\";\r\n\t\t$args['value'] = $form_value[color];\r\n\t\t$args['width'] = '75';\r\n\t\t$args['tooltip'] = 'Choose the border color';\r\n\t\t$this->color($args);\r\n\r\n\t\t$this->description($description);\r\n\t}", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: save PHP/CSS code');\r\n\r\n $code[] =& $this->createElement('checkbox', 'P', null, 'PHP');\r\n $code[] =& $this->createElement('checkbox', 'C', null, 'CSS');\r\n $this->addGroup($code, 'phpcss', 'PHP and/or StyleSheet source code:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('next','apply'));\r\n }", "public function getBorderStyle() {}", "public function getBorderStyle() {}", "function SLFramework_Progressbar($length=300, $height=20, $start=0, $insideText=\"\", $id=\"progressbar\") {\r\n\t\t\t$this->length = $length ; \r\n\t\t\t$this->insideText = $insideText ; \r\n\t\t\t$this->height = $height ; \r\n\t\t\t$this->start = $start ; \r\n\t\t\t$this->id = $id ; \r\n\t\t}", "public function getBorderStyle() {}", "public function getBorderStyle() {}", "public function getBorderStyle() {}", "public function getBorderStyle() {}", "public function getBorderStyle() {}", "protected function build()\n {\n $stockalign = new GtkAlignment(0, 0, 0, 0);\n $stockalign->add(\n GtkImage::new_from_stock(\n Gtk::STOCK_DIALOG_ERROR, Gtk::ICON_SIZE_DIALOG\n )\n );\n $this->pack_start($stockalign, false, true);\n\n\n $this->expander = new GtkExpander('');\n\n $this->message = new GtkLabel();\n $this->expander->set_label_widget($this->message);\n $this->message->set_selectable(true);\n $this->message->set_line_wrap(true);\n\n $this->userinfo = new GtkLabel();\n $this->userinfo->set_selectable(true);\n $this->userinfo->set_line_wrap(true);\n //FIXME: add scrolled window\n $this->expander->add($this->userinfo);\n\n $this->pack_start($this->expander);\n }", "public function buildForm()\n {\n $this\n ->addMeasureList()\n ->addAscendingList()\n ->addTitles(['class' => 'indicator_title_title_narrative', 'narrative_true' => true])\n ->addDescriptions(['class' => 'indicator_description_title_narrative'])\n ->addCollection('reference', 'Activity\\Reference', 'reference', [], trans('elementForm.reference'))\n ->addAddMoreButton('add_reference', 'reference')\n ->addBaselines()\n ->addPeriods()\n ->addAddMoreButton('add_period', 'period')\n ->addRemoveThisButton('remove_indicator');\n }", "protected function Form_Create() {\n\t\t\t$this->txtValue1 = new QTextBox($this);\n\t\t\t\n\t\t\t$this->txtValue2 = new QTextBox($this);\n\t\t\t\n\t\t\t$this->lstOperation = new QListBox($this);\n\t\t\t$this->lstOperation->AddItem('+', 'add');\n\t\t\t$this->lstOperation->AddItem('-', 'subtract');\n\t\t\t$this->lstOperation->AddItem('*', 'multiply');\n\t\t\t$this->lstOperation->AddItem('/', 'divide');\n\t\t\t\n\t\t\t$this->btnCalculate = new QButton($this);\n\t\t\t$this->btnCalculate->Text = 'Calculate';\n\t\t\t$this->btnCalculate->AddAction(new QClickEvent(), new QServerAction('btnCalculate_Click'));\n\t\t\t\n\t\t\t$this->lblResult = new QLabel($this);\n\t\t\t$this->lblResult->HtmlEntities = false;\n\t\t}", "function border() {\n\t\t\t// Matches field # of register_setting\n\t\t\t$options = get_option( 'subpages_as_tabs_options' );\n?>\n\t\t\t<input id=\"spat_border\" name=\"subpages_as_tabs_options[border]\" class=\"color_pick\" type=\"color\" size=\"7\" value=\"<?php _e( $options['border'] );?>\" />\n<?php\n\t\t}", "function build_basic_form()\r\n {\r\n $this->addElement('select', LanguagePack :: PROPERTY_BRANCH, Translation :: get('Branch'), LanguagePack :: get_branch_options());\r\n \r\n \t$this->addElement('file', 'file', Translation :: get('FileName'));\r\n $allowed_upload_types = array('zip');\r\n $this->addRule('file', Translation :: get('OnlyZIPAllowed'), 'filetype', $allowed_upload_types);\r\n $this->addRule('file', Translation :: get('ThisFieldIsRequired', null, Utilities :: COMMON_LIBRARIES), 'required');\r\n \r\n // Submit button\r\n //$this->addElement('submit', 'user_settings', 'OK');\r\n $buttons[] = $this->createElement('style_submit_button', 'submit', Translation :: get('Import', null, Utilities :: COMMON_LIBRARIES), array('class' => 'positive'));\r\n $buttons[] = $this->createElement('style_reset_button', 'reset', Translation :: get('Reset', null, Utilities :: COMMON_LIBRARIES), array('class' => 'normal empty'));\r\n \r\n $this->addGroup($buttons, 'buttons', null, '&nbsp;', false);\r\n }", "function buildTabs()\r\n {\r\n $this->_formBuilt = true;\r\n\r\n // Here we get all page names in the controller\r\n $pages = array();\r\n $myName = $current = $this->getAttribute('id');\r\n while (null !== ($current = $this->controller->getPrevName($current))) {\r\n $pages[] = $current;\r\n }\r\n $pages = array_reverse($pages);\r\n $pages[] = $current = $myName;\r\n while (null !== ($current = $this->controller->getNextName($current))) {\r\n $pages[] = $current;\r\n }\r\n // Here we display buttons for all pages, the current one's is disabled\r\n foreach ($pages as $pageName) {\r\n $disabled = ($pageName == $myName ? array('disabled' => 'disabled')\r\n : array());\r\n\r\n $tabs[] = $this->createElement('submit',\r\n $this->getButtonName($pageName),\r\n ucfirst($pageName),\r\n array('class' => 'flat') + $disabled);\r\n }\r\n $this->addGroup($tabs, 'tabs', null, '&nbsp;', false);\r\n }", "public function getFormStyle()\n {\n $prop = array();\n\n $prop['alignment'] = $this->value['text-align'];\n\n if (isset($this->value['background']['color']) && is_array($this->value['background']['color'])) {\n $prop['fillColor'] = $this->value['background']['color'];\n }\n\n if (isset($this->value['border']['t']['color'])) {\n $prop['strokeColor'] = $this->value['border']['t']['color'];\n }\n\n if (isset($this->value['border']['t']['width'])) {\n $prop['lineWidth'] = $this->value['border']['t']['width'];\n }\n\n if (isset($this->value['border']['t']['type'])) {\n $prop['borderStyle'] = $this->value['border']['t']['type'];\n }\n\n if (!empty($this->value['color'])) {\n $prop['textColor'] = $this->value['color'];\n }\n\n if (!empty($this->value['font-size'])) {\n $prop['textSize'] = $this->value['font-size'];\n }\n\n return $prop;\n }", "protected function buildForm()\n {\n $this->form = Yii::createObject(array_merge([\n 'scenario' => $this->scenario,\n 'parent_id' => $this->parent_id,\n 'parentTariff' => $this->parentTariff,\n 'tariff' => $this->tariff,\n ], $this->getFormOptions()));\n }", "public function __construct(\n private readonly int $borderWidth = 4,\n private string|array $backgroundColour = '#ffffff',\n private string|array $foregroundColour = '#000000',\n private string $format = 'png',\n ) {\n $this->backgroundColour = $this->handleColour($this->backgroundColour);\n $this->foregroundColour = $this->handleColour($this->foregroundColour);\n $this->format = strtolower($this->format);\n }", "public function buildForm()\n {\n }", "function render()\n {\n\t\t$value = $this->_value;\n\t\t$i = 0;\n\t\treturn \t\"<div>\".\n\t\t\t\t\t\"<label class=\\\"inline\\\">\"._AM_TMANAGER_BORDERBOX.\" :</label>&nbsp;&nbsp;&nbsp;\".\n\t\t\t\t\t\"<input type=\\\"radio\\\" name=\\\"\".$this->getName().\"_yn\\\" class='borders_r_same'style=\\\"vertical-align: baseline;margin:0\\\" value=\\\"1\\\" \".($value['same']?'checked=\\\"checked\\\"':'').\">&nbsp;\"._YES.\"&nbsp;&nbsp;\".\n\t\t\t\t\t\"<input type=\\\"radio\\\" name=\\\"\".$this->getName().\"_yn\\\" class='borders_r_same'style=\\\"vertical-align: baseline;margin:0\\\" value=\\\"0\\\" \".($value['same']?'':'checked=\\\"checked\\\"').\">&nbsp;\"._NO.\n\t\t\t\t\t\"<div id='\".$this->getName().\"_sameborders' style='display:\".($value['same']?'block':'none').\"'>\".\n\t\t\t\t\t\t$this->SingleBorder(_ALL, $value['size'][0], $value['type'][0], $value['color'][0], 'all').\n\t\t\t\t\t\"</div>\".\n\t\t\t\t\t\"<div id='\".$this->getName().\"_diffborders' style='display:\".($value['same']?'none':'block').\"'>\".\t\t\t\t\n\t\t\t\t\t\t$this->SingleBorder(_AM_TMANAGER_BOX_TOP, $value['size'][$i], $value['type'][$i], $value['color'][$i++], 'top').\n\t\t\t\t\t\t$this->SingleBorder(_AM_TMANAGER_BOX_LEFT, $value['size'][$i], $value['type'][$i], $value['color'][$i++], 'left').\n\t\t\t\t\t\t$this->SingleBorder(_AM_TMANAGER_BOX_RIGHT, $value['size'][$i], $value['type'][$i], $value['color'][$i++], 'right').\n\t\t\t\t\t\t$this->SingleBorder(_AM_TMANAGER_BOX_BOTTOM, $value['size'][$i], $value['type'][$i], $value['color'][$i++], 'bot').\n\t\t\t\t\t\"</div>\".\n\t\t\t\t\"</div>\";\n }", "public function print_form_styles() {\n\n\t\tif ( empty( $this->form_data['settings']['conversational_forms_color_scheme'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$color = \\sanitize_hex_color( $this->form_data['settings']['conversational_forms_color_scheme'] );\n\n\t\tif ( empty( $color ) ) {\n\t\t\t$color = '#448ccb';\n\t\t}\n\n\t\t$min = \\wpforms_get_min_suffix();\n\n\t\tswitch ( $color ) {\n\t\t\tcase '#448ccb':\n\t\t\t\t$theme = 'color-scheme-blue';\n\t\t\t\tbreak;\n\t\t\tcase '#1a3c5a':\n\t\t\t\t$theme = 'color-scheme-dark_blue';\n\t\t\t\tbreak;\n\t\t\tcase '#4aa891':\n\t\t\t\t$theme = 'color-scheme-teal';\n\t\t\t\tbreak;\n\t\t\tcase '#9178b3':\n\t\t\t\t$theme = 'color-scheme-purple';\n\t\t\t\tbreak;\n\t\t\tcase '#cccccc':\n\t\t\t\t$theme = 'color-scheme-light';\n\t\t\t\tbreak;\n\t\t\tcase '#363636':\n\t\t\t\t$theme = 'color-scheme-dark';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$theme = '';\n\t\t}\n\n\t\tif ( ! $theme ) {\n\t\t\trequire \\plugin_dir_path( WPFORMS_CONVERSATIONAL_FORMS_FILE ) . 'templates/dynamic-color-scheme-styles.php';\n\t\t\treturn;\n\t\t}\n\n\t\t\\wp_enqueue_style(\n\t\t\t\"wpforms-conversational-forms-{$theme}\",\n\t\t\t\\wpforms_conversational_forms()->url . \"assets/css/color-schemes/{$theme}{$min}.css\",\n\t\t\tarray( 'wpforms-conversational-forms' ),\n\t\t\t\\WPFORMS_CONVERSATIONAL_FORMS_VERSION\n\t\t);\n\t}", "function renderForm()\t{\n\n\t\t$fields[] = $this->renderField( $GLOBALS['LANG']->getLL('settings'), 'divider', '');\n\t\t$fields[] = $this->renderField( $GLOBALS['LANG']->getLL('spaceTitle'), 'text', 'title');\n\t\n\t\tif(count($this->error) > 0) {\n\t\t\t$form .= \"<span style='display:block;color:red;font-weight:bold;padding:10px;'>\" .\n\t\t\t\t\t\t\t implode(\"<br />\", $this->error) . \n\t\t\t\t\t \"</span>\";\t\n\t\t}\n\n\t\t$form .= \"<form action=\" . t3lib_div::getThisUrl() . \"><table border='0' cellpadding='7'>\";\n\t\t$form .= implode(\"\\n\", $fields);\n\t\t$form .= \"<tr><td colspan='2' align='right'>\" .\n\t\t\t\t \"<input type='hidden' name='formPosted' value='1'>\" . \n\t\t\t\t \"<input type='submit' value='\" . $GLOBALS['LANG']->getLL('createSpace') . \"'></td></tr></table></form>\";\n\n\t\treturn $form;\n\t}", "function buildSettingsForm() {}", "function initStylePropertiesForm()\n\t{\n\t\tglobal $ilCtrl, $lng, $ilTabs, $ilSetting;\n\t\t\n\t\tinclude_once(\"./Services/Style/classes/class.ilObjStyleSheet.php\");\n\t\t$lng->loadLanguageModule(\"style\");\n\n\t\tinclude_once(\"./Services/Form/classes/class.ilPropertyFormGUI.php\");\n\t\t$this->form = new ilPropertyFormGUI();\n\t\t\n\t\t$fixed_style = $ilSetting->get(\"fixed_content_style_id\");\n\t\t$style_id = $this->object->getStyleSheetId();\n\n\t\tif ($fixed_style > 0)\n\t\t{\n\t\t\t$st = new ilNonEditableValueGUI($lng->txt(\"style_current_style\"));\n\t\t\t$st->setValue(ilObject::_lookupTitle($fixed_style).\" (\".\n\t\t\t\t$this->lng->txt(\"global_fixed\").\")\");\n\t\t\t$this->form->addItem($st);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$st_styles = ilObjStyleSheet::_getStandardStyles(true, false,\n\t\t\t\t$_GET[\"ref_id\"]);\n\n\t\t\t$st_styles[0] = $this->lng->txt(\"default\");\n\t\t\tksort($st_styles);\n\n\t\t\tif ($style_id > 0)\n\t\t\t{\n\t\t\t\t// individual style\n\t\t\t\tif (!ilObjStyleSheet::_lookupStandard($style_id))\n\t\t\t\t{\n\t\t\t\t\t$st = new ilNonEditableValueGUI($lng->txt(\"style_current_style\"));\n\t\t\t\t\t$st->setValue(ilObject::_lookupTitle($style_id));\n\t\t\t\t\t$this->form->addItem($st);\n\n//$this->ctrl->getLinkTargetByClass(\"ilObjStyleSheetGUI\", \"edit\"));\n\n\t\t\t\t\t// delete command\n\t\t\t\t\t$this->form->addCommandButton(\"editStyle\",\n\t\t\t\t\t\t$lng->txt(\"style_edit_style\"));\n\t\t\t\t\t$this->form->addCommandButton(\"deleteStyle\",\n\t\t\t\t\t\t$lng->txt(\"style_delete_style\"));\n//$this->ctrl->getLinkTargetByClass(\"ilObjStyleSheetGUI\", \"delete\"));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($style_id <= 0 || ilObjStyleSheet::_lookupStandard($style_id))\n\t\t\t{\n\t\t\t\t$style_sel = ilUtil::formSelect ($style_id, \"style_id\",\n\t\t\t\t\t$st_styles, false, true);\n\t\t\t\t$style_sel = new ilSelectInputGUI($lng->txt(\"style_current_style\"), \"style_id\");\n\t\t\t\t$style_sel->setOptions($st_styles);\n\t\t\t\t$style_sel->setValue($style_id);\n\t\t\t\t$this->form->addItem($style_sel);\n//$this->ctrl->getLinkTargetByClass(\"ilObjStyleSheetGUI\", \"create\"));\n\t\t\t\t$this->form->addCommandButton(\"saveStyleSettings\",\n\t\t\t\t\t\t$lng->txt(\"save\"));\n\t\t\t\t$this->form->addCommandButton(\"createStyle\",\n\t\t\t\t\t$lng->txt(\"sty_create_ind_style\"));\n\t\t\t}\n\t\t}\n\t\t$this->form->setTitle($lng->txt(\"wiki_style\"));\n\t\t$this->form->setFormAction($ilCtrl->getFormAction($this));\n\t}", "protected function definition_inner(&$mform) {\n\n $norepeats = $this->_customdata['norepeats']; // number of dimensions to display\n $descriptionopts = $this->_customdata['descriptionopts']; // wysiwyg fields options\n $current = $this->_customdata['current']; // current data to be set\n\n $mform->addElement('hidden', 'norepeats', $norepeats);\n $mform->setType('norepeats', PARAM_INT);\n // value not to be overridden by submitted value\n $mform->setConstants(array('norepeats' => $norepeats));\n\n $levelgrades = array();\n for ($i = 100; $i >= 0; $i--) {\n $levelgrades[$i] = $i;\n }\n\n for ($i = 0; $i < $norepeats; $i++) {\n $mform->addElement('header', 'dimension'.$i, get_string('dimensionnumber', 'workshopform_rubric', $i+1));\n $mform->addElement('hidden', 'dimensionid__idx_'.$i);\n $mform->setType('dimensionid__idx_'.$i, PARAM_INT);\n $mform->addElement('editor', 'description__idx_'.$i.'_editor',\n get_string('dimensiondescription', 'workshopform_rubric'), '', $descriptionopts);\n if (isset($current->{'numoflevels__idx_' . $i})) {\n $numoflevels = max($current->{'numoflevels__idx_' . $i} + self::ADDLEVELS, self::MINLEVELS);\n } else {\n $numoflevels = self::MINLEVELS;\n }\n $prevlevel = -1;\n for ($j = 0; $j < $numoflevels; $j++) {\n $mform->addElement('hidden', 'levelid__idx_' . $i . '__idy_' . $j);\n $mform->setType('levelid__idx_' . $i . '__idy_' . $j, PARAM_INT);\n $levelgrp = array();\n $levelgrp[] = $mform->createElement('select', 'grade__idx_'.$i.'__idy_'.$j,'', $levelgrades);\n $levelgrp[] = $mform->createElement('textarea', 'definition__idx_'.$i.'__idy_'.$j, '', array('cols' => 60, 'rows' => 3));\n $mform->addGroup($levelgrp, 'level__idx_'.$i.'__idy_'.$j, get_string('levelgroup', 'workshopform_rubric'), array(' '), false);\n $mform->setDefault('grade__idx_'.$i.'__idy_'.$j, $prevlevel + 1);\n if (isset($current->{'grade__idx_'.$i.'__idy_'.$j})) {\n $prevlevel = $current->{'grade__idx_'.$i.'__idy_'.$j};\n } else {\n $prevlevel++;\n }\n }\n }\n\n $mform->registerNoSubmitButton('adddims');\n $mform->addElement('submit', 'adddims', get_string('addmoredimensions', 'workshopform_rubric',\n workshop_rubric_strategy::ADDDIMS));\n $mform->closeHeaderBefore('adddims');\n\n $mform->addElement('header', 'configheader', get_string('configuration', 'workshopform_rubric'));\n $layoutgrp = array();\n $layoutgrp[] = $mform->createElement('radio', 'config_layout', '',\n get_string('layoutlist', 'workshopform_rubric'), 'list');\n $layoutgrp[] = $mform->createElement('radio', 'config_layout', '',\n get_string('layoutgrid', 'workshopform_rubric'), 'grid');\n $mform->addGroup($layoutgrp, 'layoutgrp', get_string('layout', 'workshopform_rubric'), array('<br />'), false);\n $mform->setDefault('config_layout', 'list');\n $this->set_data($current);\n }" ]
[ "0.69055814", "0.68195033", "0.61908114", "0.61072564", "0.5682266", "0.56485695", "0.5436292", "0.5436292", "0.5434116", "0.5432274", "0.5432274", "0.5432274", "0.5432274", "0.5432274", "0.5430103", "0.53658926", "0.5246863", "0.5181012", "0.516103", "0.5084275", "0.50808173", "0.50668967", "0.50278145", "0.5017033", "0.49811444", "0.4950983", "0.49413857", "0.4937674", "0.49348432", "0.48909384" ]
0.75592405
0
Builds the form that show a preview of your progress bar design
function buildForm() { $this->buildTabs(); // tab caption $this->addElement('header', null, 'Progress2 Generator - Control Panel: run demo'); $this->addElement('static', 'progressBar', 'Your progress meter looks like:'); // Buttons of the wizard to do the job $this->buildButtons(array('reset','process')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: main properties');\r\n\r\n $shape[] =& $this->createElement('radio', null, null, 'Horizontal', '1');\r\n $shape[] =& $this->createElement('radio', null, null, 'Vertical', '2');\r\n $this->addGroup($shape, 'shape', 'Shape:');\r\n\r\n $way[] =& $this->createElement('radio', null, null, 'Natural', 'natural');\r\n $way[] =& $this->createElement('radio', null, null, 'Reverse', 'reverse');\r\n $this->addGroup($way, 'way', 'Direction:');\r\n\r\n $autosize[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $autosize[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($autosize, 'autosize', 'Best size:');\r\n\r\n $psize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $psize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $psize['left'] =& $this->createElement('text',\r\n 'left', 'left',\r\n array('size' => 4));\r\n $psize['top'] =& $this->createElement('text',\r\n 'top', 'top',\r\n array('size' => 4));\r\n $psize['position'] =& $this->createElement('text',\r\n 'position', 'position',\r\n array('disabled' => 'true'));\r\n $psize['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'bgcolor',\r\n array('size' => 7));\r\n $this->addGroup($psize, 'progresssize',\r\n 'Size, position and color:', ' ');\r\n\r\n $this->addElement('text', 'rAnimSpeed',\r\n array('Animation speed :',\r\n '(0-1000 ; 0:fast, 1000:slow)'));\r\n $this->addRule('rAnimSpeed',\r\n 'Should be between 0 and 1000',\r\n 'rangelength', array(0,1000), 'client');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('back','apply','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: border properties');\r\n\r\n $borderpainted[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $borderpainted[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($borderpainted, 'borderpainted', 'Display the border:');\r\n\r\n $this->addElement('text', 'borderclass', 'CSS class:', array('size' => 32));\r\n\r\n $borderstyle['style'] =& $this->createElement('select',\r\n 'style', 'style',\r\n array('solid' => 'Solid',\r\n 'dashed' => 'Dashed',\r\n 'dotted' => 'Dotted',\r\n 'inset' => 'Inset',\r\n 'outset' => 'Outset'));\r\n $borderstyle['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 2));\r\n $borderstyle['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($borderstyle, 'borderstyle', null, ' ');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: save PHP/CSS code');\r\n\r\n $code[] =& $this->createElement('checkbox', 'P', null, 'PHP');\r\n $code[] =& $this->createElement('checkbox', 'C', null, 'CSS');\r\n $this->addGroup($code, 'phpcss', 'PHP and/or StyleSheet source code:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('next','apply'));\r\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: string properties');\r\n\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($stringpainted, 'stringpainted', 'Render a custom string:');\r\n\r\n $this->addElement('text', 'stringid', 'Id:', array('size' => 32));\r\n $this->addElement('text', 'stringclass', 'CSS class:', array('size' => 32));\r\n $this->addElement('text', 'stringvalue', 'Content:', array('size' => 32));\r\n\r\n $stringsize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $stringsize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $stringsize['left'] =& $this->createElement('text',\r\n 'left', 'left',\r\n array('size' => 4));\r\n $stringsize['top'] =& $this->createElement('text',\r\n 'top', 'top',\r\n array('size' => 4));\r\n $stringsize['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'bgcolor',\r\n array('size' => 7));\r\n $this->addGroup($stringsize, 'stringsize', 'Size, position and color:', ' ');\r\n\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Top', 'top');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Bottom', 'bottom');\r\n $this->addGroup($stringvalign, 'stringvalign', 'Vertical alignment:');\r\n\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Center', 'center');\r\n $this->addGroup($stringalign, 'stringalign', 'Horizontal alignment:');\r\n\r\n $stringfont['family'] =& $this->createElement('text',\r\n 'family', 'family',\r\n array('size' => 40));\r\n $stringfont['size'] =& $this->createElement('text',\r\n 'size', 'size',\r\n array('size' => 2));\r\n $stringfont['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($stringfont, 'stringfont', 'Font:', ' ');\r\n\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'normal', 'normal');\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'Bold', 'bold');\r\n $this->addGroup($stringweight, 'stringweight', 'Font weight:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "public function buildForm()\n {\n $this\n ->addMeasureList()\n ->addAscendingList()\n ->addTitles(['class' => 'indicator_title_title_narrative', 'narrative_true' => true])\n ->addDescriptions(['class' => 'indicator_description_title_narrative'])\n ->addCollection('reference', 'Activity\\Reference', 'reference', [], trans('elementForm.reference'))\n ->addAddMoreButton('add_reference', 'reference')\n ->addBaselines()\n ->addPeriods()\n ->addAddMoreButton('add_period', 'period')\n ->addRemoveThisButton('remove_indicator');\n }", "function show_form()\n\t\t{\n\t\t\t//set a global template for interactive activities\n\t\t\t$this->t->set_file('run_activity','run_activity.tpl');\n\t\t\t\n\t\t\t//set the css style files links\n\t\t\t$this->t->set_var(array(\n\t\t\t\t'run_activity_css_link'\t=> $this->get_css_link('run_activity', $this->print_mode),\n\t\t\t\t'run_activity_print_css_link'\t=> $this->get_css_link('run_activity', true),\n\t\t\t));\n\t\t\t\n\t\t\t\n\t\t\t// draw the activity's title zone\n\t\t\t$this->parse_title($this->activity_name);\n\n\t\t\t//draw the instance_name input or label\n\t\t\t// init wf_name to the requested one or the stored name\n\t\t\t// the requested one handle the looping in activity form\n\n\t\t\t$wf_name = get_var('wf_name','post',$this->instance->getName());\n\t\t\t$this->parse_instance_name($wf_name);\n\n\t\t\t//draw the instance_name input or label\n\t\t\t// init wf_set_owner to the requested one or the stored owner\n\t\t\t// the requested one handle the looping in activity form\n\t\t\t$wf_set_owner = get_var('wf_set_owner','post',$this->instance->getOwner());\n\t\t\t$this->parse_instance_owner($wf_set_owner);\n\t\t\t\n\t\t\t// draw the activity central user form\n\t\t\t$this->t->set_var(array('activity_template' => $this->wf_template->parse('output', 'template')));\n\t\t\t\n\t\t\t//draw the select priority box\n\t\t\t// init priority to the requested one or the stored priority\n\t\t\t// the requested one handle the looping in activity form\n\t\t\t$priority = get_var('wf_priority','post',$this->instance->getPriority());\n\t\t\t$this->parse_priority($priority);\n\t\t\t\n\t\t\t//draw the select next_user box\n\t\t\t// init next_user to the requested one or the stored one\n\t\t\t// the requested one handle the looping in activity form\n\t\t\t$next_user = get_var('wf_next_user','POST',$this->instance->getNextUser());\n\t\t\t$this->parse_next_user($next_user);\n\t\t\t\n\t\t\t//draw print_mode buttons\n\t\t\t$this->parse_print_mode_buttons();\n\t\t\t\n\t\t\t//draw the activity submit buttons\t\n\t\t\t$this->parse_submit();\n\t\t\t\n\t\t\t//draw the info zone\n\t\t\t$this->parse_info_zone();\n\t\t\t\n\t\t\t//draw the history zone if user wanted it\n\t\t\t$this->parse_history_zone();\n\t\t\t\n\t\t\t$this->translate_template('run_activity');\n\t\t\t$this->t->pparse('output', 'run_activity');\n\t\t\t$GLOBALS['egw']->common->egw_footer();\n\t\t}", "public function ajax_example_progressbar_callback($form, &$form_state) {\n $variable_name = 'example_progressbar_' . $form_state['time'];\n $commands = array();\n\n variable_set($variable_name, 10);\n sleep(2);\n variable_set($variable_name, 40);\n sleep(2);\n variable_set($variable_name, 70);\n sleep(2);\n variable_set($variable_name, 90);\n sleep(2);\n variable_del($variable_name);\n\n $commands[] = HtmlCommand('#progress-status', $this->t('Executed.'));\n\n return array(\n '#type' => 'ajax',\n '#commands' => $commands,\n );\n}", "public function progressBar()\n {\n \n self::$view='adminlte::progress.bar';\n return $this;\n \n }", "public function createForm() {\n module_load_include('inc', 'islandora_form_builder', 'FormGenerator');\n $form_values = &$this->formState['values'];\n $file = isset($form_values['ingest-file-location']) ? $form_values['ingest-file-location'] : '';\n $form['#attributes']['enctype'] = 'multipart/form-data';\n $form['indicator']['ingest-file-location'] = array(\n '#type' => 'file',\n '#title' => t('Upload Document'),\n '#size' => 48,\n '#description' => t('Select file to be added the the object.'),\n );\n $form_generator = FormGenerator::CreateFromModel($this->contentModelPid, $this->contentModelDsid);\n $form[FORM_ROOT] = $form_generator->generate($this->formName); // TODO get from user .\n $form['submit'] = array(\n '#type' => 'submit',\n '#value' => t('Ingest'),\n '#prefix' => t('Please be patient. Once you click next there may be a number of files created. ' .\n 'Depending on your content model this could take a few minutes to process.<br />')\n );\n return $form;\n }", "public function display() {\r\n self::createUploaderScript();\r\n\r\n $this->echoOptionHeader();\r\n\r\n // Display the preview file name.\r\n $value = $this->getValue();\r\n if ( ! is_array( $value ) ) {\r\n $value = $this->getValue();\r\n }\r\n\r\n $previewFile = '';\r\n if ( ! empty( $value ) ) {\r\n $previewFile = \"<i class='dashicons dashicons-no-alt remove'></i><p>\". basename( get_attached_file( $value ) ) . \"</p>\";\r\n } else {\r\n $previewFile = $this->settings['label'];\r\n }\r\n echo \"<div class='tf-file-upload'>\" . $previewFile . '</div>';\r\n\r\n printf('<input name=\"%s\" placeholder=\"%s\" id=\"%s\" type=\"hidden\" value=\"%s\" />',\r\n $this->getID(),\r\n $this->settings['placeholder'],\r\n $this->getID(),\r\n esc_attr( $this->getValue() )\r\n );\r\n $this->echoOptionFooter();\r\n }", "function build_basic_form()\r\n {\r\n $this->addElement('select', LanguagePack :: PROPERTY_BRANCH, Translation :: get('Branch'), LanguagePack :: get_branch_options());\r\n \r\n \t$this->addElement('file', 'file', Translation :: get('FileName'));\r\n $allowed_upload_types = array('zip');\r\n $this->addRule('file', Translation :: get('OnlyZIPAllowed'), 'filetype', $allowed_upload_types);\r\n $this->addRule('file', Translation :: get('ThisFieldIsRequired', null, Utilities :: COMMON_LIBRARIES), 'required');\r\n \r\n // Submit button\r\n //$this->addElement('submit', 'user_settings', 'OK');\r\n $buttons[] = $this->createElement('style_submit_button', 'submit', Translation :: get('Import', null, Utilities :: COMMON_LIBRARIES), array('class' => 'positive'));\r\n $buttons[] = $this->createElement('style_reset_button', 'reset', Translation :: get('Reset', null, Utilities :: COMMON_LIBRARIES), array('class' => 'normal empty'));\r\n \r\n $this->addGroup($buttons, 'buttons', null, '&nbsp;', false);\r\n }", "public function form_footer_progress_block_html() {\n\n\t\t$progress_style = ! empty( $this->form_data['settings']['conversational_forms_progress_bar'] ) ? $this->form_data['settings']['conversational_forms_progress_bar'] : '';\n\n\t\t?>\n\t\t<div class=\"wpforms-conversational-form-footer-progress\">\n\t\t\t<div class=\"wpforms-conversational-form-footer-progress-status\">\n\t\t\t\t<?php\n\t\t\t\tif ( 'proportion' === $progress_style ) {\n\t\t\t\t\t$this->form_footer_progress_status_proportion_html();\n\t\t\t\t} else {\n\t\t\t\t\t$this->form_footer_progress_status_percentage_html();\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t</div>\n\t\t\t<div class=\"wpforms-conversational-form-footer-progress-bar\">\n\t\t\t\t<div class=\"wpforms-conversational-form-footer-progress-completed\"></div>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "protected function form()\n {\n $form = new Form(new Activity());\n\n $form->text('name', __('Name'));\n $form->image('image', __('Image'));\n $form->text('intro', __('Intro'));\n $form->UEditor('details', __('Details'));\n $form->datetime('start_at', __('Start at'))->default(date('Y-m-d H:i:s'));\n $form->datetime('end_at', __('End at'))->default(date('Y-m-d H:i:s'));\n $form->text('location', __('Location'));\n $form->decimal('fee', __('Fee'))->default(0.00);\n $form->number('involves', __('Involves'));\n $form->number('involves_min', __('Involves min'));\n $form->number('involves_max', __('Involves max'));\n $form->switch('status', __('Status'));\n $form->text('organizers', __('Organizers'));\n $form->number('views', __('Views'));\n $form->switch('is_stick', __('Is stick'));\n\n return $form;\n }", "public function buildForm()\n {\n }", "public function append_media_upload_form() {\n \n ?>\n <!-- Add from Media Library -->\n <a href=\"#\" class=\"envira-media-library button\" title=\"<?php _e( 'Click Here to Insert from Other Image Sources', 'envira-gallery' ); ?>\" style=\"vertical-align: baseline;\">\n <?php _e( 'Select Files from Other Sources', 'envira-gallery' ); ?>\n </a>\n\n <!-- Progress Bar -->\n <div class=\"envira-progress-bar\">\n <div class=\"envira-progress-bar-inner\"></div>\n <div class=\"envira-progress-bar-status\">\n <span class=\"uploading\">\n <?php _e( 'Uploading Image', 'envira-gallery' ); ?>\n <span class=\"current\">1</span>\n <?php _e( 'of', 'envira-gallery' ); ?>\n <span class=\"total\">3</span>\n </span>\n\n <span class=\"done\"><?php _e( 'All images uploaded.', 'envira-gallery' ); ?></span>\n </div>\n </div>\n <?php\n\n }", "protected function build()\n {\n $stockalign = new GtkAlignment(0, 0, 0, 0);\n $stockalign->add(\n GtkImage::new_from_stock(\n Gtk::STOCK_DIALOG_ERROR, Gtk::ICON_SIZE_DIALOG\n )\n );\n $this->pack_start($stockalign, false, true);\n\n\n $this->expander = new GtkExpander('');\n\n $this->message = new GtkLabel();\n $this->expander->set_label_widget($this->message);\n $this->message->set_selectable(true);\n $this->message->set_line_wrap(true);\n\n $this->userinfo = new GtkLabel();\n $this->userinfo->set_selectable(true);\n $this->userinfo->set_line_wrap(true);\n //FIXME: add scrolled window\n $this->expander->add($this->userinfo);\n\n $this->pack_start($this->expander);\n }", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: cell properties');\r\n\r\n $this->addElement('text', 'cellid', 'Id mask:', array('size' => 32));\r\n $this->addElement('text', 'cellclass', 'CSS class:', array('size' => 32));\r\n\r\n $cellvalue['min'] =& $this->createElement('text',\r\n 'min', 'minimum',\r\n array('size' => 4));\r\n $cellvalue['max'] =& $this->createElement('text',\r\n 'max', 'maximum',\r\n array('size' => 4));\r\n $cellvalue['inc'] =& $this->createElement('text',\r\n 'inc', 'increment',\r\n array('size' => 4));\r\n $this->addGroup($cellvalue, 'cellvalue', 'Value:', ' ');\r\n\r\n $cellsize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $cellsize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $cellsize['spacing'] =& $this->createElement('text',\r\n 'spacing', 'spacing',\r\n array('size' => 2));\r\n $cellsize['count'] =& $this->createElement('text',\r\n 'count', 'count',\r\n array('size' => 2));\r\n $this->addGroup($cellsize, 'cellsize', 'Size:', ' ');\r\n\r\n $cellcolor['active'] =& $this->createElement('text',\r\n 'active', 'active',\r\n array('size' => 7));\r\n $cellcolor['inactive'] =& $this->createElement('text',\r\n 'inactive', 'inactive',\r\n array('size' => 7));\r\n $cellcolor['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'background',\r\n array('size' => 7));\r\n $this->addGroup($cellcolor, 'cellcolor', 'Color:', ' ');\r\n\r\n $cellfont['family'] =& $this->createElement('text',\r\n 'family', 'family',\r\n array('size' => 32));\r\n $cellfont['size'] =& $this->createElement('text',\r\n 'size', 'size',\r\n array('size' => 2));\r\n $cellfont['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($cellfont, 'cellfont', 'Font:', ' ');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "protected function buildForm()\n {\n $this->form = Yii::createObject(array_merge([\n 'scenario' => $this->scenario,\n 'parent_id' => $this->parent_id,\n 'parentTariff' => $this->parentTariff,\n 'tariff' => $this->tariff,\n ], $this->getFormOptions()));\n }", "function showPreviewForm()\n {\n $ok = $this->preview();\n if (!$ok) {\n // @todo FIXME maybe provide a cancel button or link back?\n return;\n }\n\n $this->elementStart('div', 'entity_actions');\n $this->elementStart('ul');\n $this->elementStart('li', 'entity_subscribe');\n $this->elementStart('form', array('method' => 'post',\n 'id' => 'form_ostatus_sub',\n 'class' => 'form_remote_authorize',\n 'action' =>\n $this->selfLink()));\n $this->elementStart('fieldset');\n $this->hidden('token', common_session_token());\n $this->hidden('profile', $this->profile_uri);\n if ($this->oprofile->isGroup()) {\n // TRANS: Button text.\n $this->submit('submit', _m('Join'), 'submit', null,\n // TRANS: Tooltip for button \"Join\".\n _m('BUTTON','Join this group'));\n } else {\n // TRANS: Button text.\n $this->submit('submit', _m('BUTTON','Confirm'), 'submit', null,\n // TRANS: Tooltip for button \"Confirm\".\n _m('Subscribe to this user'));\n }\n $this->elementEnd('fieldset');\n $this->elementEnd('form');\n $this->elementEnd('li');\n $this->elementEnd('ul');\n $this->elementEnd('div');\n }", "protected function form()\n {\n $form = new Form(new PrizesLog);\n\n // 去掉`删除`按钮\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableDelete();\n $tools->disableView();\n });\n\n $form->text('group.title', '奖品组')->readonly();\n $form->text('prize.name', '奖品名称')->readonly();\n $form->text('material.title', '物料名称')->readonly();\n $form->text('material_code', '物料代码')->readonly();\n $form->text('user.username', '用户名')->readonly();\n $form->text('user.mobile', '用户手机号')->readonly();\n $form->select('source', '来源')->options([\n '' => '', 'exchange' => '兑换/领取', 'lottery' => '抽奖'\n ])->readonly();\n $form->ip('ip', 'IP地址')->readonly();\n $form->datetime('created_at', '中奖时间')->readonly();\n $form->embeds('leaving_capital', '留资信息', function ($form) {\n $form->text('name', '收件人');\n $form->mobile('mobile', '手机号');\n $form->text('address', '收件地址');\n });\n $form->radio('status', '状态')->options([\n '0' => '作废', '1' => '有效'\n ])->default('1');\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Carousel);\n\n $form->select('carousel_category_id', __('carousel::carousel.carousel_category_id'))\n ->options(CarouselCategory::all()->pluck('name', 'id'));\n $form->text('title', __('carousel::carousel.title'));\n $form->text('url', __('carousel::carousel.url'));\n $form->image('img_src', __('carousel::carousel.img_src'))\n ->removable()\n ->uniqueName()\n ->move('carousel');\n $form->text('alt', __('carousel::carousel.alt'));\n $form->textarea('remark', __('carousel::carousel.remark'));\n $form->select('status', __('carousel::carousel.status.label'))\n ->default(1)\n ->options(__('carousel::carousel.status.value'));\n $form->datetime('start_time', __('carousel::carousel.start_time'))\n ->default(date('Y-m-d H:i:s'));\n $form->datetime('end_time', __('carousel::carousel.end_time'))\n ->default(date('Y-m-d H:i:s'));\n\n return $form;\n }", "function SLFramework_Progressbar($length=300, $height=20, $start=0, $insideText=\"\", $id=\"progressbar\") {\r\n\t\t\t$this->length = $length ; \r\n\t\t\t$this->insideText = $insideText ; \r\n\t\t\t$this->height = $height ; \r\n\t\t\t$this->start = $start ; \r\n\t\t\t$this->id = $id ; \r\n\t\t}", "public function form()\n {\n $this->switch('auto_df_switch', __('message.tikuanconfig.auto_df_switch'));\n $this->timeRange('auto_df_stime', 'auto_df_etime', '开启时间');\n $this->text('auto_df_maxmoney', __('message.tikuanconfig.auto_df_maxmoney'))->setWidth(2);\n $this->text('auto_df_max_count', __('message.tikuanconfig.auto_df_max_count'))->setWidth(2);\n $this->text('auto_df_max_sum', __('message.tikuanconfig.auto_df_max_sum'))->setWidth(2);\n\n }", "protected function form() {\n\t\treturn Admin::form(WhtSpiderLogModel::class,function (Form $form) {\n\t\t\t$directors = [\n\t\t\t\t'成功' => 1,\n\t\t\t\t'失败' => 0,\n\t\t\t];\n\t\t\t$form->select('status','状态')->options($directors);\n\t\t\t$form->setAction('采集');\n\t\t});\n\t}", "function buildSettingsForm() {}", "function update_spinner_preview() {\n if (! isset($_POST)) wp_die();\n\n $type = isset($_POST['type']) ? $_POST['type'] : '';\n\n $wfc_preloader_options = $this->wfc_preloader_options();\n WFC_Preloader_Spinners::spinner($type, $wfc_preloader_options['spinner_size'], $wfc_preloader_options['spinner_color']);\n\n wp_die();\n }", "protected function form()\n {\n $form = new Form(new Banner);\n\n $form->text('title', 'Title');\n $form->image('image', 'Image')->rules('required')->move('images/banners');\n $form->switch('status', 'Published')->default(1);\n\n $form->footer(function ($footer) {\n // disable `View` checkbox\n $footer->disableViewCheck();\n\n // disable `Continue editing` checkbox\n $footer->disableEditingCheck();\n\n // disable `Continue Creating` checkbox\n $footer->disableCreatingCheck();\n\n });\n return $form;\n }", "public function renderUploadForm() {}", "function form( $instance ) {\n\t\t\n\t\tTrends()->view->load(\n\t\t\t'/view/backend',\n\t\t\tarray(\n\t\t\t\t'widget' => $this,\n\t\t\t\t'instance' => $instance\n\t\t\t),\n\t\t\tfalse,\n\t\t\tdirname( __FILE__ )\n\t\t);\n\t\t\n\t}", "function form( $instance ){\n\n\t\t\t// $instance Defaults\n\t\t\t$instance_defaults = $this->defaults;\n\n\t\t\t// If we have information in this widget, then ignore the defaults\n\t\t\tif( !empty( $instance ) ) $instance_defaults = array();\n\n\t\t\t// Parse $instance\n\t\t\t$instance = wp_parse_args( $instance, $instance_defaults );\n\n\t\t\textract( $instance, EXTR_SKIP );\n\n\t\t\t$design_bar_components = apply_filters( 'layers_' . $this->widget_id . '_widget_design_bar_components' , array(\n\t\t\t\t\t'layout',\n\t\t\t\t\t'fonts',\n\t\t\t\t\t'custom',\n\t\t\t\t\t'columns',\n\t\t\t\t\t'liststyle',\n\t\t\t\t\t'imageratios',\n\t\t\t\t\t'background',\n\t\t\t\t\t'advanced'\n\t\t\t\t) );\n\n\t\t\t$design_bar_custom_components = apply_filters( 'layers_' . $this->widget_id . '_widget_design_bar_custom_components' , array(\n\t\t\t\t\t'display' => array(\n\t\t\t\t\t\t'icon-css' => 'icon-display',\n\t\t\t\t\t\t'label' => __( 'Display', 'layerswp' ),\n\t\t\t\t\t\t'elements' => array(\n\t\t\t\t\t\t\t\t'text_style' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'text_style' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'text_style' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $text_style ) ) ? $text_style : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Title &amp; Excerpt Position' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t\t\t\t\t'regular' => __( 'Regular' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t\t\t'overlay' => __( 'Overlay' , 'layerswp' )\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_media' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_media' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_media' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_media ) ) ? $show_media : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Featured Images' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_titles' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_titles' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_titles' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_titles ) ) ? $show_titles : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Post Titles' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_excerpts' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_excerpts' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_excerpts' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_excerpts ) ) ? $show_excerpts : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Post Excerpts' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n 'excerpt_length' => array(\n 'type' => 'number',\n 'name' => $this->get_field_name( 'excerpt_length' ) ,\n 'id' => $this->get_field_id( 'excerpt_length' ) ,\n 'min' => 0,\n 'max' => 10000,\n 'value' => ( isset( $excerpt_length ) ) ? $excerpt_length : NULL,\n 'label' => __( 'Excerpts Length' , 'layerswp' )\n ),\n\t\t\t\t\t\t\t\t'show_dates' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_dates' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_dates' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_dates ) ) ? $show_dates : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Post Dates' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_author' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_author' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_author' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_author ) ) ? $show_author : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Post Author' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_tags' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_tags' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_tags' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_tags ) ) ? $show_tags : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Tags' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_categories' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_categories' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_categories' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_categories ) ) ? $show_categories : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Categories' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t'show_call_to_action' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_call_to_action' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_call_to_action' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_call_to_action ) ) ? $show_call_to_action : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show \"Read More\" Buttons' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n 'call_to_action' => array(\n 'type' => 'text',\n 'name' => $this->get_field_name( 'call_to_action' ) ,\n 'id' => $this->get_field_id( 'call_to_action' ) ,\n 'value' => ( isset( $call_to_action ) ) ? $call_to_action : NULL,\n 'label' => __( '\"Read More\" Text' , 'layerswp' )\n ),\n\t\t\t\t\t\t\t\t'show_pagination' => array(\n\t\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'show_pagination' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'show_pagination' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $show_pagination ) ) ? $show_pagination : NULL,\n\t\t\t\t\t\t\t\t\t'label' => __( 'Show Pagination' , 'layerswp' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t) );\n\n\t\t\t$this->design_bar(\n\t\t\t\t'side', // CSS Class Name\n\t\t\t\tarray(\n\t\t\t\t\t'name' => $this->get_field_name( 'design' ),\n\t\t\t\t\t'id' => $this->get_field_id( 'design' ),\n\t\t\t\t), // Widget Object\n\t\t\t\t$instance, // Widget Values\n\t\t\t\t$design_bar_components, // Standard Components\n\t\t\t\t$design_bar_custom_components // Add-on Components\n\t\t\t); ?>\n\t\t\t<div class=\"layers-container-large\">\n\n\t\t\t\t<?php $this->form_elements()->header( array(\n\t\t\t\t\t'title' => __( 'Post' , 'layerswp' ),\n\t\t\t\t\t'icon_class' =>'post'\n\t\t\t\t) ); ?>\n\n\t\t\t\t<section class=\"layers-accordion-section layers-content\">\n\n\t\t\t\t\t<div class=\"layers-row layers-push-bottom\">\n\t\t\t\t\t\t<p class=\"layers-form-item\">\n\t\t\t\t\t\t\t<?php echo $this->form_elements()->input(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'title' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'title' ) ,\n\t\t\t\t\t\t\t\t\t'placeholder' => __( 'Enter title here' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $title ) ) ? $title : NULL ,\n\t\t\t\t\t\t\t\t\t'class' => 'layers-text layers-large'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t); ?>\n\t\t\t\t\t\t</p>\n\n\t\t\t\t\t\t<p class=\"layers-form-item\">\n\t\t\t\t\t\t\t<?php echo $this->form_elements()->input(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'excerpt' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'excerpt' ) ,\n\t\t\t\t\t\t\t\t\t'placeholder' => __( 'Short Excerpt' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $excerpt ) ) ? $excerpt : NULL ,\n\t\t\t\t\t\t\t\t\t'class' => 'layers-textarea layers-large'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t); ?>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<?php // Grab the terms as an array and loop 'em to generate the $options for the input\n\t\t\t\t\t\t$terms = get_terms( $this->taxonomy );\n\t\t\t\t\t\tif( !is_wp_error( $terms ) ) { ?>\n\t\t\t\t\t\t\t<p class=\"layers-form-item\">\n\t\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id( 'category' ); ?>\"><?php echo __( 'Category to Display' , 'layerswp' ); ?></label>\n\t\t\t\t\t\t\t\t<?php $category_options[ 0 ] = __( 'All' , 'layerswp' );\n\t\t\t\t\t\t\t\tforeach ( $terms as $t ) $category_options[ $t->term_id ] = $t->name;\n\t\t\t\t\t\t\t\techo $this->form_elements()->input(\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'category' ) ,\n\t\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'category' ) ,\n\t\t\t\t\t\t\t\t\t\t'placeholder' => __( 'Select a Category' , 'layerswp' ),\n\t\t\t\t\t\t\t\t\t\t'value' => ( isset( $category ) ) ? $category : NULL ,\n\t\t\t\t\t\t\t\t\t\t'options' => $category_options\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t); ?>\n\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<?php } // if !is_wp_error ?>\n\t\t\t\t\t\t<p class=\"layers-form-item\">\n\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id( 'posts_per_page' ); ?>\"><?php echo __( 'Number of items to show' , 'layerswp' ); ?></label>\n\t\t\t\t\t\t\t<?php $select_options[ '-1' ] = __( 'Show All' , 'layerswp' );\n\t\t\t\t\t\t\t$select_options = $this->form_elements()->get_incremental_options( $select_options , 1 , 20 , 1);\n\t\t\t\t\t\t\techo $this->form_elements()->input(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'posts_per_page' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'posts_per_page' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $posts_per_page ) ) ? $posts_per_page : NULL ,\n\t\t\t\t\t\t\t\t\t'min' => '-1',\n\t\t\t\t\t\t\t\t\t'max' => '100'\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t); ?>\n\t\t\t\t\t\t</p>\n\n\t\t\t\t\t\t<p class=\"layers-form-item\">\n\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id( 'order' ); ?>\"><?php echo __( 'Sort by' , 'layerswp' ); ?></label>\n\t\t\t\t\t\t\t<?php echo $this->form_elements()->input(\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t\t\t'name' => $this->get_field_name( 'order' ) ,\n\t\t\t\t\t\t\t\t\t'id' => $this->get_field_id( 'order' ) ,\n\t\t\t\t\t\t\t\t\t'value' => ( isset( $order ) ) ? $order : NULL ,\n\t\t\t\t\t\t\t\t\t'options' => $this->form_elements()->get_sort_options()\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t); ?>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t</section>\n\n\t\t\t</div>\n\t\t<?php }" ]
[ "0.710235", "0.63623637", "0.62253284", "0.6152803", "0.60618824", "0.5923924", "0.57680374", "0.57551", "0.57166356", "0.56992376", "0.56499654", "0.5645377", "0.5642863", "0.56302464", "0.5626179", "0.5624876", "0.56189144", "0.56085944", "0.56044364", "0.55827785", "0.55659795", "0.55393565", "0.55389726", "0.552323", "0.55104625", "0.55044085", "0.5450927", "0.54422885", "0.5420915", "0.53986126" ]
0.76990116
0
Builds the form that allow to save your PHP/CSS code
function buildForm() { $this->buildTabs(); // tab caption $this->addElement('header', null, 'Progress2 Generator - Control Panel: save PHP/CSS code'); $code[] =& $this->createElement('checkbox', 'P', null, 'PHP'); $code[] =& $this->createElement('checkbox', 'C', null, 'CSS'); $this->addGroup($code, 'phpcss', 'PHP and/or StyleSheet source code:'); // Buttons of the wizard to do the job $this->buildButtons(array('next','apply')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function beaver_extender_fe_style_editor_build_form() {\n\t\n?>\n\t\t<form action=\"/\" id=\"beaver-extender-fe-style-editor-form\" name=\"beaver-extender-fe-style-editor-form\">\n\t\t\t\n\t\t\t<input type=\"hidden\" name=\"action\" value=\"beaver_extender_fe_style_editor_save\" />\n\t\t\t<input type=\"hidden\" name=\"security\" value=\"<?php echo wp_create_nonce( 'beaver-extender-fe-style-editor' ); ?>\" />\n\t\t\n\t\t\t<div class=\"beaver-extender-fe-style-editor-nav\">\n\t\t\t\t<input id=\"beaver-extender-fe-style-editor-save-button\" type=\"submit\" value=\"<?php _e( 'Save Changes', 'extender' ); ?>\" name=\"Submit\" alt=\"Save Changes\" />\n\t\t\t\t<img class=\"beaver-extender-ajax-save-spinner\" src=\"<?php echo site_url() . '/wp-admin/images/spinner-2x.gif'; ?>\" />\n\t\t\t\t<span class=\"beaver-extender-saved\"></span>\n\t\n\t\t\t\t<span id=\"beaver-extender-fe-style-editor-contract-icon\" class=\"beaver-extender-fe-style-editor-icons dashicons dashicons-editor-contract\"></span>\n\t\t\t\t<span id=\"beaver-extender-fe-style-editor-css-builder-toggle-icon\" class=\"beaver-extender-fe-style-editor-icons dashicons dashicons-admin-customizer\"></span>\n\t\t\t\t<span id=\"beaver-extender-fe-style-editor-search-icon\" class=\"beaver-extender-fe-style-editor-icons dashicons dashicons-search\"></span>\n\t\t\t</div><!-- END .beaver-extender-fe-style-editor-nav -->\n\t\t\t\n\t\t\t<div id=\"beaver-extender-fe-style-editor-container\">\n\t\t\t\t\n\t\t\t\t<textarea data-editor=\"css\" style=\"display:none;\" wrap=\"off\" id=\"beaver-extender-fe-style-editor-output\" class=\"code-builder-output\" name=\"extender[custom_css]\"><?php echo beaver_extender_get_custom_css( 'custom_css' ); ?></textarea>\t\t\t\t\t\n\t\t\t\n\t\t\t</div><!-- END #beaver-extender-fe-style-editor-container -->\n\t\t\n\t\t</form><!-- END #beaver-extender-fe-style-editor-form -->\n<?php\n\t\n}", "public function saveForm() {\n\n\t\tforeach ( $this->getOptionsList() as $element ) {\n\t\t\t$element->save();\n\t\t}\n\t\t$this->setLastAction( self::ACTION_SAVE );\n\n\t\t$custom_style = new Custom_CSS_Style();\n\t\t$custom_style->reinit();\n\t}", "function buildForm(){\n\t\t# menampilkan form\n\t}", "function creaped() {\n\t\t// Esto debe hacerse por dataform\n\t\t$styles = \"\\n<!-- Estilos -->\\n\";\n\t\t$styles .= style('rapyd.css');\n\t\t$styles .= style('ventanas.css');\n\t\t$styles .= style('themes/proteo/proteo.css');\n\t\t$styles .= style(\"themes/ui.jqgrid.css\");\n\t\t$styles .= style(\"themes/ui.multiselect.css\");\n\t\t$styles .= style('layout1.css');\n\t\t$styles .= '<link rel=\"stylesheet\" href=\"'.base_url().'system/application/rapyd/elements/proteo/css/rapyd_components.css\" type=\"text/css\" />'.\"\\n\";\n\n\n\t\t$styles .= '\n<style type=\"text/css\">\n\tp {font-size:1em; margin: 1ex 0;}\n\tp.buttons {text-align:center;line-height:2.5em;}\n\tbutton {line-height: normal;}\n\t.hidden {display: none;}\n\tul {z-index:100000;margin:1ex 0;padding:0;list-style:none;cursor:pointer;border:1px solid Black;width:15ex;position:\trelative;}\n\tul li {background-color: #EEE;padding: 0.15em 1em 0.3em 5px;}\n\tul ul {display:none;position:absolute;width:100%;left:-1px;bottom:0;margin:0;margin-bottom: 1.55em;}\n\t.ui-layout-north ul ul {bottom:auto;margin:0;margin-top:1.45em;}\n\tul ul li { padding: 3px 1em 3px 5px; }\n\tul ul li:hover { background-color: #FF9; }\n\tul li:hover ul { display:block; background-color: #EEE; }\n\n\t#feedback { font-size: 0.8em; }\n\t#tablas .ui-selecting { background: #FECA40; }\n\t#tablas .ui-selected { background: #F39814; color: white; }\n\t#tablas { list-style-type: none; margin: 0; padding: 0; width: 90%; }\n\t#tablas li { margin: 1px; padding: 0em; font-size: 0.8em; height: 14px; }\n\n\ttable.tc td.header {padding-right: 1px;padding-left: 1px;font-weight: bold;font-size: 8pt;color: navy;background-color: #f4edd5;text-align:center;}\n\ttable.tc td.title{padding-right: 1px;padding-left: 1px;font-weight: bold;font-size: 8pt;color:navy;text-align:center;background-color: #fdffdf;}\n\ttable.tc td.resalte{border-left:solid 1px #daac00;border-top:solid 1px #daac00;text-align:center;font-weight: bold;}\n\ttable.tc td{ border-left:solid 1px #DAAC00;border-TOP:solid 1px #DAAC00;}\n\ttable.tc {border-right: #daac00 1px solid;padding-right: 0px;border-top: medium none;padding-left: 0px;padding-bottom: 0px;border-left: medium none;border-bottom: #daac00 1px solid;font-family: verdana;font-size:8pt;cellspacing: 0px}\n\ttable.tc td.sin_borde{border-left:solid 1px #DAAC00;border-TOP:solid 1px #DAAC00;text-align:center;border-right:solid 5px #f6f6f6;border-bottom:solid 5px #f6f6f6;}\n\n\t.custom-combobox {position: relative;display: inline-block;}\n\t.custom-combobox-toggle {position: absolute;top: 0;bottom: 0;margin-left: -1px;padding: 0;}\n\t.custom-combobox-input {margin: 0;padding: 5px 10px;}\n\n</style>\n';\n\n\t\t$title = \"\n<div id='encabe'>\n<table width='98%'>\n\t<tr>\n\t\t<td>\".heading('Generar Orden de Produccion').\"</td>\n\t\t<td align='right' width='40'>\".image('cerrar.png','Cerrar Ventana',array('onclick'=>'window.close()','height'=>'20')).\"</td>\n\t</tr>\n</table>\n</div>\n\";\n\t\t$script = \"\\n<!-- JQUERY -->\\n\";\n\t\t$script .= script('jquery-min.js');\n\t\t$script .= script('jquery-migrate-min.js');\n\t\t$script .= script('jquery-ui.custom.min.js');\n\n\t\t$script .= script(\"jquery.layout.js\");\n\t\t$script .= script(\"i18n/grid.locale-sp.js\");\n\n\t\t$script .= script(\"ui.multiselect.js\");\n\t\t$script .= script(\"jquery.jqGrid.min.js\");\n\t\t$script .= script(\"jquery.tablednd.js\");\n\t\t$script .= script(\"jquery.contextmenu.js\");\n\n\t\t$script .= script('plugins/jquery.numeric.pack.js');\n\t\t$script .= script('plugins/jquery.floatnumber.js');\n\t\t$script .= script('plugins/jquery.maskedinput.min.js');\n\n\t\t$script .= '\n<script type=\"text/javascript\">\n\t$(function(){\n\t\t$(\".inputnum\").numeric(\".\");\n\t});\n\t$(function() {\n\t\t$( \"input:submit, a, button\", \".botones\",\".otros\" ).button();\n\t});\n';\n\n\t\t$script .= '\n\t// set EVERY state here so will undo ALL layout changes\n\t// used by the Reset State button: myLayout.loadState( stateResetSettings )\n\tvar stateResetSettings = {\n\t\tnorth__size:\t\t\"auto\"\n\t,\tnorth__initClosed:\tfalse\n\t,\tnorth__initHidden:\tfalse\n\t,\tsouth__size:\t\t\"auto\"\n\t,\tsouth__initClosed:\tfalse\n\t,\tsouth__initHidden:\tfalse\n\t,\twest__size:\t\t\t200\n\t,\twest__initClosed:\tfalse\n\t,\twest__initHidden:\tfalse\n\t,\teast__size:\t\t\t100\n\t,\teast__initClosed:\ttrue\n\t,\teast__initHidden:\ttrue\n\n\t};\n\n\tvar myLayout;\n\n\t$(document).ready(function () {\n\n\t\t// this layout could be created with NO OPTIONS - but showing some here just as a sample...\n\t\t// myLayout = $(\"body\").layout(); -- syntax with No Options\n\n\t\tmyLayout = $(\"body\").layout({\n\n\t\t//\treference only - these options are NOT required because \"true\" is the default\n\t\t\tclosable: true,\tresizable:\ttrue, slidable:\ttrue, livePaneResizing:\ttrue\n\t\t//\tsome resizing/toggling settings\n\t\t,\tnorth__slidable: false, north__togglerLength_closed: \"100%\", north__spacing_closed:\t20\n\t\t,\tsouth__resizable:false,\tsouth__spacing_open:0\n\t\t,\tsouth__spacing_closed:20\n\t\t//\tsome pane-size settings\n\t\t,\twest__minSize: 100, east__size: 100, east__minSize: 50, east__maxSize: .5, center__minWidth: 100\n\t\t//\tsome pane animation settings\n\t\t,\twest__animatePaneSizing: false,\twest__fxSpeed_size:\t\"fast\",\twest__fxSpeed_open: 1000\n\t\t,\twest__fxSettings_open:{ easing: \"easeOutBounce\" },\twest__fxName_close:\"none\"\n\t\t//\tenable showOverflow on west-pane so CSS popups will overlap north pane\n\t\t//,\twest__showOverflowOnHover:\ttrue\n\t\t,\tstateManagement__enabled:true, showDebugMessages: true\n\t\t});\n\n\t\t$(function() {\n\t\t\t$(\"button\").button().click(function(event) {event.preventDefault();});\n\t\t\t//$( \"#almacen\" ).combobox();\n\t\t});\n\n\n \t});\n\n\tfunction sumar(j){\n\t\tvar nn = \\'[name=\"codigo_\\'+j+\\'\"]\\';\n\t\tvar k = 0;\n\t\tvar t;\n\t\tvar totalc = 0;\n\t\tvar maximo = 0;\n\n\t\t// Valida el maximo\n\t\t$(\"#resultados\").html(\"Maximo \"+maximo);\n\n\t\t$(nn).each( function() {\n\t\t\tk = $(this).val();\n\t\t\tt = Number($(\"#cana_\"+k).val());\n\t\t\tmaximo = Number($(\"#falta_\"+k).val());\n\t\t\tif ( t > maximo ){\n\t\t\t\tt = maximo;\n\t\t\t\t$(\"#cana_\"+k).val(maximo);\n\t\t\t}\n\t\t\ttotalc += t;\n\t\t});\n\t\t$(\\'#totalc_\\'+j).val(totalc);\n\t}\n\n\tfunction guardar(){\n\t\talert(\"Guardar\");\n\t\t$.post( \"'.base_url().'inventario/prdo/guardaoe\", $(\"#guardar\").serialize(),\n\t\t\tfunction(data) {\n\t\t\t\talert(data);\n\t\t\t\tlocation.reload();\n\t\t\t\twindow.opener.actualiza();\n\t\t\t}\n\t\t);\n\t}\n</script>\n';\n\n// ENCABEZADO\n$tabla = '\n<div class=\"ui-layout-north\" onmouseover=\"myLayout.allowOverflow(\\'north\\')\" onmouseout=\"myLayout.resetOverflow(this)\">\n<table width=\"100%\" bgcolor=\"#2067B5\">\n\t<tr>\n\t\t<td align=\"left\" width=\"80px\"><img src=\"'.base_url().'assets/default/css/templete_01.jpg\" width=\"120\"></td><td align=\"center\"><h1 style=\"font-size: 20px; color: rgb(255, 255, 255);\" onclick=\"history.back()\">ORDEN DE PRODUCCION</h1></td><td align=\"left\" width=\"100px\" nowrap=\"nowrap\"><font style=\"color:#FFFFFF;font-size:12px\">Usuario: '.$this->secu->usuario().'<br/>'.$this->secu->getnombre().'</font></td><td align=\"right\" width=\"28px\"></td>\n\t</tr>\n</table>\n</div>\n';\n\n// IZQUIERDO\n$tabla .= '\n<div class=\"ui-layout-west\">\n<form id=\"guardar\" >\n<center>\n<lable>Almacen</lable> ';\n$tabla .= $this->datasis->llenaopciones(\"SELECT ubica, ubides FROM caub WHERE gasto='N' ORDER BY ubica\", false, $id='almacen' );\n\n$tabla .= '\n\t<br><br>\n\t<lable>Instruciones</lable>\n\t<textarea rows=\"4\" cols=\"25\" id=\"instrucciones\" name=\"instrucciones\"></textarea>\n\t<br><br>\n\t<button type=\"button\" onclick=\"guardar()\">Guardar Orden</button>\n\t<div id=\"resultados\"></div>\n</center>\n</div>';\n\n// INFERIOR\n$tabla .= '\n<div class=\"ui-layout-south\">\n';\n\n$tabla .= $this->datasis->traevalor('TITULO1');\n\n$tabla .= '\n</div>\n';\n\n// DERECHA\n$tabla .= '\n<div class=\"ui-layout-east\">\n</div>\n';\n\n// CENTRO\n$norden = $this->datasis->dameval('SELECT MAX(id) maxi FROM prdo');\nif ($norden == '') $norden = 0;\n\n$tabla .= '\n<div class=\"ui-layout-center\">';\n\n$mSQL = '\nSELECT a.id, b.numero, b.fecha, b.cod_cli, b.nombre, a.codigoa, a.desca, a.cana, COALESCE(sum(e.ordenado),0) producido, a.cana-COALESCE(sum(e.ordenado),0) falta, COALESCE(sum(e.ordenado),0) ordenado, d.ruta, d.descrip\nFROM itpfac a\nJOIN pfac b ON a.numa = b.numero\nLEFT JOIN sclitrut c ON b.cod_cli=c.cliente\nLEFT JOIN sclirut d ON c.ruta=d.ruta\nLEFT JOIN itprdo e ON a.id = e.idpfac\nWHERE b.producir=\"S\" AND ( b.ordprod=\"\" OR b.ordprod IS NULL )\nGROUP BY a.id\nHAVING falta>0\nORDER BY a.codigoa, d.ruta, a.numa\n';\n\n$query = $this->db->query($mSQL);\n$ruta = 'XX0XX';\n$codigo = 'XXZZWWXXWWXXZZZZ';\n$i = 0;\n$c = 0;\nif ($query->num_rows() > 0){\n\tforeach ($query->result() as $row){\n\t\tif ( $codigo != $row->codigoa ){\n\t\t\tif ( $i > 0 ) $tabla .= \"</tbody></table><br>\\n\";\n\t\t\t$tabla .= '<table class=\"tc\" width=\"100%\">';\n\t\t\t$tabla .= \"<tbody>\\n\";\n\n\t\t\tif ( $i > 0 ) $c++;\n\n\t\t\t$tabla .= \"<tr style='background:#2067B5;color:#FFFFFF;'>\\n\";\n\t\t\t$tabla .= \"\t<td colspan='7'>Cod: \".$row->codigoa.\" Desc: \".$row->desca.\"</td>\\n\";\n\t\t\t//$tabla .= \"\t<td>&nbsp;</td>\\n\";\n\t\t\t$tabla .= \"\t<td><input class='inputnum' name='totalc_$c' id='totalc_$c' size='4' type='text' readonly></td>\\n\";\n\t\t\t$tabla .= \"</tr>\\n\";\n\n\t\t\t$tabla .= \"<tr bgcolor='#BEDCFD'>\\n\";\n\t\t\t$tabla .= \"\t<td >Ruta</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Pedido</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Fecha</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Cliente</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Nombre</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Cantidad</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Producido</td>\\n\";\n\t\t\t$tabla .= \"\t<td >Ordenado</td>\\n\";\n\t\t\t$tabla .= \"</tr>\\n\";\n\n\t\t\t$codigo = $row->codigoa;\n\t\t}\n\n\t\t$tabla .= \"<tr>\\n\";\n\t\t$tabla .= \"\t<td><a href='#' title='\".$row->descrip.\"'>\".$row->ruta.\"&nbsp;</a></td>\\n\";\n\t\t$tabla .= \"\t<td>\".$row->numero.\"</td>\\n\";\n\t\t$tabla .= \"\t<td>\".$row->fecha.\"</td>\\n\";\n\t\t$tabla .= \"\t<td>\".$row->cod_cli.\"</td>\\n\";\n\t\t$tabla .= \"\t<td>\".$row->nombre.\"</td>\\n\";\n\t\t$tabla .= \"\t<td align='right'>\".$row->cana.\"</td>\\n\";\n\t\t$tabla .= \"\t<td align='right'>\".$row->producido.\"</td>\\n\";\n\n\t\t$tabla .= \"\t<td>\\n\";\n\t\t$tabla .= \"\t\t<input class='inputnum' name='cana_$i' id='cana_$i' size='4' onkeyUp='sumar($c)' value='0.00' >\\n\";\n\t\t$tabla .= \"\t\t<input name='codigo_$c' id='codigo_$c' type='hidden' value='$i' >\\n\";\n\t\t$tabla .= \"\t\t<input name='idpfac_$i' id='idpfac_$i' type='hidden' value='\".$row->id. \"' >\\n\";\n\t\t$tabla .= \"\t\t<input name='falta_$i' id='falta_$i' type='hidden' value='\".$row->falta.\"' >\\n\";\n\t\t$tabla .= \"\t</td>\\n\";\n\n\t\t$tabla .= \"</tr>\\n\";\n\t\t$i++;\n\t}\n\t$tabla .= \"</table>\\n\";\n}\n\n$tabla .= '\n<input id=\"totalitem\" name=\"totalitem\" type=\"hidden\" value=\"'.$i.'\">\n</form>\n</div>\n';\n\t\t$data['content'] = $tabla;\n\t\t$data['title'] = $title;\n\t\t$data['head'] = $styles;\n\t\t$data['head'] .= $script;\n\t\t$this->load->view('view_ventanas_lite',$data);\n\t}", "private function viewBuilder() {\n $html = '';\n $file = false;\n // Create fields\n foreach ($this->formDatas as $field) {\n $type = $field['type'];\n switch ($type) {\n case 'text' :\n case 'password' :\n case 'hidden' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <input type=\"' . $type . '\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?>\"/>';\n break;\n // Addon - 2013-07-31\n case 'date' :\n case 'datetime' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <input type=\"text\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?>\"/>';\n\n\n if ($type == 'datetime') {\n $plugin = $this->addPlugin('widget', false);\n $plugin = $this->addPlugin('date');\n }\n $plugin = $this->addPlugin($type);\n if (!isset($this->js['script'])) {\n $this->js['script'] = '';\n }\n if ($type == 'datetime') {\n $this->js['script'] .= '\n <script type=\"text/javascript\">$(document).ready(function() {$(\"#' . $field['name'] . '\").datetimepicker({ dateFormat: \"yy-mm-dd\", timeFormat : \"HH:mm\"});});</script>';\n } else {\n $this->js['script'] .= '\n <script type=\"text/javascript\">$(document).ready(function() {$(\"#' . $field['name'] . '\").datepicker({ dateFormat: \"yy-mm-dd\"});});</script>';\n }\n break;\n // End Addon\n case 'select' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <select name=\"' . $field['name'] . '\">';\n // Add options\n foreach ($field['options'] as $option) {\n $html .= '\n <option value=\"' . $option . '\" <?php echo set_select(\"' . $field['name'] . '\", \"' . $option . '\"); ?>>' . $option . '</option>';\n }\n $html .= '\n </select>';\n break;\n case 'checkbox' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n ';\n // Add options\n foreach ($field['checkbox'] as $option) {\n $html .= '\n <input type=\"checkbox\" value=\"' . $option . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $option . '\"); ?>\"><span>' . $option . '</span>';\n }\n break;\n case 'radio' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n ';\n // Add options\n foreach ($field['radio'] as $option) {\n $html .= '\n <input type=\"radio\" value=\"' . $option . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $option . '\"); ?>\"><span>' . $option . '</span>';\n }\n break;\n case 'reset' :\n case 'submit' :\n $html .= '\n <input type=\"' . $type . '\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" value=\"<?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?>\"/>';\n break;\n case 'textarea' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <textarea name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\"><?php echo set_value(\"' . $field['name'] . '\", \"' . $field['value'] . '\"); ?></textarea>';\n break;\n case 'file' :\n $html .= '\n <label for=\"' . $field['name'] . '\">' . $field['label'] . '</label>\n <input type=\"file\" name=\"' . $field['name'] . '\" id=\"' . $field['name'] . '\" />';\n $file = true;\n break;\n }\n }\n\n $view = '\n <html>\n <head>\n <link type=\"text/css\" rel=\"stylesheet\" href=\"<?php echo base_url() ?>assets/css/generator/' . $this->cssName . '.css\">\n '; // Addon - 2013-07-31\n foreach ($this->css as $css) {\n $view .= $css . '\n ';\n }\n foreach ($this->js as $js) {\n $view .= $js . '\n ';\n }\n // End Addon\n $view .= '\n </head>\n <body>\n <?php\n // Show errors\n if(isset($error)) {\n switch($error) {\n case \"validation\" :\n echo validation_errors();\n break;\n case \"save\" :\n echo \"<p class=\\'error\\'>Save error !</p>\";\n break;\n }\n }\n if(isset($errorfile)) {\n foreach($errorfile as $name => $value) {\n echo \"<p class=\\'error\\'>File \\\"\".$name.\"\\\" upload error : \".$value.\"</p>\";\n }\n }\n ?>\n <form action=\"<?php echo base_url() ?>' . $this->formName . '\" method=\"post\" ' . ($file == true ? 'enctype=\"multipart/form-data\"' : '') . '>\n ' . $html . '\n </form>\n </body>\n </html>';\n return array(str_replace('<', '&lt;', $view), $view);\n }", "function child_themer_style_editor_save() {\n\t\t\n\t\tcheck_ajax_referer( 'child-themer-style-editor', 'security' );\n\n\t\tif ( $_POST['code_state'] == 'Parse Error' ) {\n\t\t\t\n\t\t\techo 'Parse Error, Check Code.';\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\tchild_themer_write_file( $path = get_stylesheet_directory() . '/style.css', $code = $_POST['child-themer-style-editor']['styles'] );\n\t\t\t\n\t\t\techo 'Stylesheet Updated';\n\t\t\t\n\t\t}\n\t\t\n\t\texit();\n\t\t\n\t}", "function mmpm_theme_options_form(){\n\t\t$out = '';\n\t\t$submit_button = mmpm_ntab(7) . '<input type=\"submit\" class=\"button-primary pull-right\" value=\"' . __( 'Save All Changes', MMPM_TEXTDOMAIN_ADMIN ) . '\" />';\n\t\t$theme_meta = mmpm_ntab(7) . '<div>' . mmpm_ntab(8) . '<span class=\"theme_name\">' . __( MMPM_PLUGIN_NAME , MMPM_TEXTDOMAIN_ADMIN ) . '</span>' . ' <small>v' . MMPM_PLUGIN_VERSION . mmpm_ntab(7) . '</small></div>';\n\t\t$out .= mmpm_ntab(1) . '<div class=\"wrap bootstrap\">';\n\t\t$out .= mmpm_ntab(2) . '<div class=\"'. MMPM_PREFIX . '_theme_page\">';\n\t\t$out .= mmpm_ntab(3) . '<form id=\"'. MMPM_PREFIX . '_theme_options_form\" class=\"'. MMPM_PREFIX . '_theme_options_form\" method=\"post\" action=\"options.php\" enctype=\"multipart/form-data\">';\n\t\t$out .= mmpm_ntab(4) . '<div class=\"save_shanges row no_x_margin\">';\n\t\t$out .= mmpm_ntab(5) . '<div class=\"col-xs-12\">';\n\t\t$out .= mmpm_ntab(6) . '<div class=\"float_holder\">';\n\t\t$out .= $submit_button;\n\t\t$out .= $theme_meta;\n\t\t$out .= mmpm_ntab(6) . '</div>';\n\t\t$out .= mmpm_ntab(5) . '</div>';\n\t\t$out .= mmpm_ntab(4) . '</div>';\n//\t\t$out .= mmpm_ntab(4) . '<input type=\"hidden\" name=\"action\" value=\"update\" />';\n\t\t$out .= mmpm_ntab(4) . '<input type=\"hidden\" name=\"' . MMPM_OPTIONS_DB_NAME . '[last_modified]\" value=\"' . ( time() + 60 ) . '\" />';\n\t\tob_start();\n\t\tsettings_fields( 'mmpm_options_group' );\n\t\t$out .= mmpm_ntab(4) . ob_get_contents();\n\t\tob_end_clean();\n\t\t$out .= mmpm_theme_sections_generator();\n\t\t$out .= mmpm_ntab(4) . '<div class=\"save_shanges row no_x_margin\">';\n\t\t$out .= mmpm_ntab(5) . '<div class=\"col-xs-12\">';\n\t\t$out .= mmpm_ntab(6) . '<div class=\"float_holder\">';\n\t\t$out .= $submit_button;\n\t\t$out .= mmpm_ntab(6) . '</div>';\n\t\t$out .= mmpm_ntab(5) . '</div>';\n\t\t$out .= mmpm_ntab(4) . '</div>';\n\t\t$out .= mmpm_ntab(3) . '</form>';\n\t\t$out .= mmpm_ntab(2) . '</div><!-- class=\"'. MMPM_PREFIX . 'theme_page\" -->';\n\t\t$out .= mmpm_ntab(1) . '</div><!-- class=\"wrap\" -->';\n\n\t\techo $out; // general out\n\t}", "public function buildForm() {\n\t\techo \"<!DOCTYPE html>\n\t\t<html>\n\t\t<head>\n\t\t\t<title>$this->title</title>\n\t\t</head>\n\t\t<body>\n\t\t<form method=\\\"$this->method\\\">\";\n\t\tforeach ($this->_inputs as $key => $input) {\n\t\t\t// Check if email validation is required.\n\t\t\tif (isset($input['rule']) && in_array('email', $input['rule'])) {\n\t\t\t\t$input['inputType'] = 'email';\n\t\t\t}\n\n\t\t\techo \"<label>\".$input['label'].\"</label><input type=\\\"\".$input['inputType'].\"\\\" id=\\\"\".$input['name'].\"\\\" name=\\\"\".$input['name'].\"\\\" value=\\\"\".$input['defaultValue'].\"\\\"\";\n\n\t\t\t// Check if field was required.\n\t\t\tif (isset($input['rule']) && in_array('required', $input['rule'])) {\n\t\t\t\techo \" required\";\n\t\t\t}\n\n\t\t\techo \"><br></form>\";\n\t\t}\n\t}", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: border properties');\r\n\r\n $borderpainted[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $borderpainted[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($borderpainted, 'borderpainted', 'Display the border:');\r\n\r\n $this->addElement('text', 'borderclass', 'CSS class:', array('size' => 32));\r\n\r\n $borderstyle['style'] =& $this->createElement('select',\r\n 'style', 'style',\r\n array('solid' => 'Solid',\r\n 'dashed' => 'Dashed',\r\n 'dotted' => 'Dotted',\r\n 'inset' => 'Inset',\r\n 'outset' => 'Outset'));\r\n $borderstyle['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 2));\r\n $borderstyle['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($borderstyle, 'borderstyle', null, ' ');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function ctools_export_form($form, &$form_state, $code, $title = '') {\r\n $lines = substr_count($code, \"\\n\");\r\n $form['code'] = array(\r\n '#type' => 'textarea',\r\n '#title' => $title,\r\n '#default_value' => $code,\r\n '#rows' => $lines,\r\n );\r\n\r\n return $form;\r\n}", "public function getCSS()\n {\n ob_start();\n ?>\n div.webFormHelpBox {\n position: absolute;\n left: 320px;\n top: 330px;\n width: 200px;\n font-family: Arial, Verdana, sans-serif;\n font-size: 8pt;\n line-height: 8pt;\n font-weight: normal;\n background-color: #f7f7f7;\n border: 1px solid #cccccc;\n padding: 8px;\n visibility: hidden;\n }\n div.webFormErrorBox {\n position: absolute;\n left: 320px;\n top: 330px;\n width: 200px;\n font-family: Arial, Verdana, sans-serif;\n font-size: 8pt;\n line-height: 8pt;\n font-weight: normal;\n background-color: #fddbdb;\n border: 1px solid #9a1515;\n padding: 8px;\n visibility: hidden;\n color: #000000;\n }\n td.wfErrorText {\n font-family: Arial, Verdana, sans-serif;\n font-size: 12px;\n font-weight: normal;\n color: #000000;\n line-height: 14px;\n }\n div.webFormCaption {\n font-size: 8pt;\n color: #888888;\n line-height: 10pt;\n font-family: Arial, Verdana, sans-serif;\n text-align: left;\n width: 150px;\n padding: 2px;\n display: none;\n }\n span.webFormVerifyText {\n font-family: Arial, Verdana, sans-serif;\n font-size: 9pt;\n font-weight: normal;\n }\n input.webFormSaveButton {\n font-family: Arial, Verdana, sans-serif;\n font-size: 7pt;\n font-weight: bold;\n }\n div.webFormVerifyFieldContainer {\n padding: 1px;\n background-color: #f0f0f0;\n border: 1px solid #c0c0c0;\n }\n div.webFormVerifyFieldContainerBox {\n padding: 1px;\n background-color: #f0f0f0;\n border: 1px solid #c0c0c0;\n /*height: 63px;*/\n }\n a.webFormVerifyFieldLink {\n font-family: Arial, Verdana, sans-serif;\n font-size: 10pt;\n font-weight: normal;\n text-decoration: none;\n color: #000000;\n }\n input:hover {\n background-color: #f2f2f2;\n }\n textarea:hover {\n background-color: #f2f2f2;\n }\n\n /* Elements <input>-type items */\n <?php if ($this->_verifyForm) { ?>\n .webFormElementText {\n padding: 3px 0px 2px 18px;\n background-color: #ffffff;\n border: 1px solid #c0c0c0;\n }\n .webFormElementTextBox {\n padding: 0px 0px 0px 0px;\n background-color: #ffffff;\n border: 1px solid #c0c0c0;\n }\n .webFormElementSelect {\n\n }\n <?php } else { ?>\n .webFormElementText {\n padding: 3px 0px 2px 3px;\n background-color: #ffffff;\n border: 1px solid #c0c0c0;\n }\n .webFormElementTextBox {\n padding: 0px 0px 0px 0px;\n background-color: #ffffff;\n border: 1px solid #c0c0c0;\n }\n .webFormElementSelect {\n\n }\n <?php } ?>\n\n <?php\n $css = ob_get_contents();\n ob_end_clean();\n\n return $css;\n }", "function buildSettingsForm() {}", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: string properties');\r\n\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'Yes', true);\r\n $stringpainted[] =& $this->createElement('radio', null, null, 'No', false);\r\n $this->addGroup($stringpainted, 'stringpainted', 'Render a custom string:');\r\n\r\n $this->addElement('text', 'stringid', 'Id:', array('size' => 32));\r\n $this->addElement('text', 'stringclass', 'CSS class:', array('size' => 32));\r\n $this->addElement('text', 'stringvalue', 'Content:', array('size' => 32));\r\n\r\n $stringsize['width'] =& $this->createElement('text',\r\n 'width', 'width',\r\n array('size' => 4));\r\n $stringsize['height'] =& $this->createElement('text',\r\n 'height', 'height',\r\n array('size' => 4));\r\n $stringsize['left'] =& $this->createElement('text',\r\n 'left', 'left',\r\n array('size' => 4));\r\n $stringsize['top'] =& $this->createElement('text',\r\n 'top', 'top',\r\n array('size' => 4));\r\n $stringsize['bgcolor'] =& $this->createElement('text',\r\n 'bgcolor', 'bgcolor',\r\n array('size' => 7));\r\n $this->addGroup($stringsize, 'stringsize', 'Size, position and color:', ' ');\r\n\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Top', 'top');\r\n $stringvalign[] =& $this->createElement('radio', null, null,\r\n 'Bottom', 'bottom');\r\n $this->addGroup($stringvalign, 'stringvalign', 'Vertical alignment:');\r\n\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Left', 'left');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Right', 'right');\r\n $stringalign[] =& $this->createElement('radio', null, null,\r\n 'Center', 'center');\r\n $this->addGroup($stringalign, 'stringalign', 'Horizontal alignment:');\r\n\r\n $stringfont['family'] =& $this->createElement('text',\r\n 'family', 'family',\r\n array('size' => 40));\r\n $stringfont['size'] =& $this->createElement('text',\r\n 'size', 'size',\r\n array('size' => 2));\r\n $stringfont['color'] =& $this->createElement('text',\r\n 'color', 'color',\r\n array('size' => 7));\r\n $this->addGroup($stringfont, 'stringfont', 'Font:', ' ');\r\n\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'normal', 'normal');\r\n $stringweight[] =& $this->createElement('radio', null, null,\r\n 'Bold', 'bold');\r\n $this->addGroup($stringweight, 'stringweight', 'Font weight:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('apply','process'));\r\n }", "function do_form(){\n\t\tob_start();\n\t\t\n\t\t$op = ($this->id_base == $this->id)? __('Add', JCF_TEXTDOMAIN) : __('Edit', JCF_TEXTDOMAIN);\n\t\t?>\n\t\t<div class=\"jcf_edit_field\">\n\t\t\t<h3 class=\"header\"><?php echo $op . ' ' . $this->title; ?></h3>\n\t\t\t<div class=\"jcf_inner_content\">\n\t\t\t\t<form action=\"#\" method=\"post\" id=\"jcform_edit_field\">\n\t\t\t\t\t<fieldset>\n\t\t\t\t\t\t<input type=\"hidden\" name=\"field_id\" value=\"<?php echo $this->id; ?>\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"field_number\" value=\"<?php echo $this->number; ?>\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"field_id_base\" value=\"<?php echo $this->id_base; ?>\" />\n\t\t\t\t\t\t<input type=\"hidden\" name=\"fieldset_id\" value=\"<?php echo $this->fieldset_id; ?>\" />\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->form( $this->instance );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// need to add slug field too\n\t\t\t\t\t\t\t$slug = esc_attr($this->slug);\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id('slug'); ?>\"><?php _e('Slug:', JCF_TEXTDOMAIN); ?></label>\n\t\t\t\t\t\t\t<input class=\"widefat\" id=\"<?php echo $this->get_field_id('slug'); ?>\" name=\"<?php echo $this->get_field_name('slug'); ?>\" type=\"text\" value=\"<?php echo $slug; ?>\" />\n\t\t\t\t\t\t\t<br/><small><?php _e('Machine name, will be used for postmeta field name.', JCF_TEXTDOMAIN); ?></small>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t// enabled field\n\t\t\t\t\t\t\tif( $this->is_new ){\n\t\t\t\t\t\t\t\t$this->instance['enabled'] = 1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<p>\n\t\t\t\t\t\t\t<label for=\"<?php echo $this->get_field_id('enabled'); ?>\">\n\t\t\t\t\t\t\t\t<input class=\"checkbox\" type=\"checkbox\" \n\t\t\t\t\t\t\t\t\t\tid=\"<?php echo $this->get_field_id('enabled'); ?>\"\n\t\t\t\t\t\t\t\t\t\tname=\"<?php echo $this->get_field_name('enabled'); ?>\"\n\t\t\t\t\t\t\t\t\t\tvalue=\"1\" <?php checked(true, @$this->instance['enabled']); ?> />\n\t\t\t\t\t\t\t\t<?php _e('Enabled', JCF_TEXTDOMAIN); ?></label>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"field-control-actions\">\n\t\t\t\t\t\t\t<div class=\"alignleft\">\n\t\t\t\t\t\t\t\t<?php if( $op != __('Add', JCF_TEXTDOMAIN) ) : ?>\n\t\t\t\t\t\t\t\t<a href=\"#remove\" class=\"field-control-remove\"><?php _e('Delete', JCF_TEXTDOMAIN); ?></a> |\n\t\t\t\t\t\t\t\t<?php endif; ?>\n\t\t\t\t\t\t\t\t<a href=\"#close\" class=\"field-control-close\"><?php _e('Close', JCF_TEXTDOMAIN); ?></a>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"alignright\">\n\t\t\t\t\t\t\t\t<?php echo print_loader_img(); ?>\n\t\t\t\t\t\t\t\t<input type=\"submit\" value=\"<?php _e('Save', JCF_TEXTDOMAIN); ?>\" class=\"button-primary\" name=\"savefield\">\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<br class=\"clear\"/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</fieldset>\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\t\t\n\t\t$html = ob_get_clean();\n\t\treturn $html;\n\t}", "function build_basic_form()\r\n {\r\n $this->addElement('select', LanguagePack :: PROPERTY_BRANCH, Translation :: get('Branch'), LanguagePack :: get_branch_options());\r\n \r\n \t$this->addElement('file', 'file', Translation :: get('FileName'));\r\n $allowed_upload_types = array('zip');\r\n $this->addRule('file', Translation :: get('OnlyZIPAllowed'), 'filetype', $allowed_upload_types);\r\n $this->addRule('file', Translation :: get('ThisFieldIsRequired', null, Utilities :: COMMON_LIBRARIES), 'required');\r\n \r\n // Submit button\r\n //$this->addElement('submit', 'user_settings', 'OK');\r\n $buttons[] = $this->createElement('style_submit_button', 'submit', Translation :: get('Import', null, Utilities :: COMMON_LIBRARIES), array('class' => 'positive'));\r\n $buttons[] = $this->createElement('style_reset_button', 'reset', Translation :: get('Reset', null, Utilities :: COMMON_LIBRARIES), array('class' => 'normal empty'));\r\n \r\n $this->addGroup($buttons, 'buttons', null, '&nbsp;', false);\r\n }", "protected function createComponentEditForm() {\r\n\t\t$form = new Form;\r\n\t\t$form->getElementPrototype()->class(\"formWide\");\r\n\t\t$options = array(0 => \"Default\", 1 => \"Odkaz na obsah\", 3 => \"Odkaz na položku menu\");\r\n\t\t// easy way how to create url slug\r\n\t\t$form->addText(\"title\", \"Název:\")\r\n\t\t\t\t->setAttribute('onchange', '\r\n\t\t\t\t\t\t\tvar nodiac = { \"á\": \"a\", \"č\": \"c\", \"ď\": \"d\", \"é\": \"e\", \"ě\": \"e\", \"í\": \"i\", \"ň\": \"n\", \"ó\": \"o\", \"ř\": \"r\", \"š\": \"s\", \"ť\": \"t\", \"ú\": \"u\", \"ů\": \"u\", \"ý\": \"y\", \"ž\": \"z\" };\r\n\t\t\t\t\t\t\ts = $(\"#frmeditForm-title\").val().toLowerCase();\r\n\t\t\t\t\t\t\tvar s2 = \"\";\r\n\t\t\t\t\t\t\tfor (var i=0; i < s.length; i++) {\r\n\t\t\t\t\t\t\t\ts2 += (typeof nodiac[s.charAt(i)] != \"undefined\" ? nodiac[s.charAt(i)] : s.charAt(i));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tresult=s2.replace(/[^a-z0-9_]+/g, \"-\").replace(/^-|-$/g, \"\");\r\n\t\t\t\t\t\t\t$(\"#frmeditForm-url\").val(result);\r\n\t\t\t\t\t\t');\r\n\t\t$form->addText(\"url\", \"url:\")->setAttribute(\"readonly\", \"readonly\");\r\n\t\tif (!$this->onlyTree) {\r\n\t\t\t$form->addSelect(\"target_type\", \"Cíl:\", $options);\r\n\t\t\t$content = $this->prepareContentSelectBox();\r\n\t\t\t$menuContent = $this->prepareMenuContentSelectBox();\r\n\t\t\t$form->addSelect(\"target_id\", \"Odkazovaný obsah:\", $content)->setPrompt(\"Pouze při zvolení výše\");\r\n\t\t\t$form->addSelect(\"target_menu\", \"Odk. položka menu:\", $menuContent)->setPrompt(\"Pouze při zvolení výše\");\r\n\t\t}\r\n\t\t$form->addHidden(\"parent_id\", $this->parent_id);\r\n\t\t$form->addHidden(\"edit_id\", $this->edit_id);\r\n\t\t//filling form\r\n\t\tif ($this->edit_id or $this->edit_id === \"0\") {\r\n\t\t\t$defFromDb = $this->closureModel->getItemById($this->edit_id);\r\n\t\t\t$defaults = new \\Nette\\ArrayHash;\r\n\t\t\tforeach ($defFromDb as $key => $value) {\r\n\t\t\t\t$defaults->$key = $value;\r\n\t\t\t}\r\n\t\t\tif ($this->edit_id === \"0\") {\r\n\t\t\t\t$form[\"title\"]->setDisabled();\r\n\t\t\t}\r\n\t\t\tif (!$this->onlyTree) {\r\n\t\t\t\t$t = $defaults->target;\r\n\t\t\t\tif (!Validators::isNumericInt($t)) {\r\n\t\t\t\t\t$menuItem = $this->checkTargetMenuItemExists($t);\r\n\t\t\t\t\tif ($menuItem) {\r\n\t\t\t\t\t\t$defaults->target_type = 3;\r\n\t\t\t\t\t\t$defaults->target_menu = $menuItem;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$contentId = $this->checkTargetContentExists($t);\r\n\t\t\t\t\t\t$defaults->target_type = 1;\r\n\t\t\t\t\t\t$defaults->target_id = $contentId;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$form[\"target_menu\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t} elseif ($t <= 0) {\r\n\t\t\t\t\t$defaults->target_type = 0;\r\n\t\t\t\t\t$form[\"target_menu\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t\t$form[\"target_id\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$defaults->target = null;\r\n\t\t\t$form->setDefaults($defaults);\r\n\t\t}\r\n\r\n\t\t$form->addSubmit('save', 'Save')\r\n\t\t\t\t\t\t->setAttribute('onclick', '$(\"#frmeditForm-title\").trigger(\"change\")')\r\n\t\t\t\t->onClick[] = callback($this, 'editFormSubmitted');\r\n\t\t$form->setRenderer(new \\Kdyby\\BootstrapFormRenderer\\BootstrapRenderer());\r\n\t\treturn $form;\r\n\t}", "protected function buildForm()\n\t{\t\n\t\t$mid = $this->Form->newInput( 'hidden' );\n\t\t$mid->set( 'name', 'mid' );\n\t\t$mid->set( 'id', 'mid' );\n\t\t$mid->set( 'value', $this->data['id'] );\n\t\t\n\t\t$submit = $this->Form->newInput( 'submit' );\n\t\t$submit->set( 'name', 'submit' );\n\t\t$submit->set( 'id', 'submit' );\n\t\t$submit->set( 'value', 'Restore' );\n\t}", "public function cs_generate_form() {\n global $post;\n }", "public function buildForm()\n {\n }", "public function makeOutput()\n\t{\n\t\t$formId = $this->name;\n\t\t$enctype = 'application/x-www-form-urlencoded';\n\n\t\t$formHtml = new HtmlObject('form');\n\t\t$formHtml->property('method', $this->form->getMethod())->\n\t\t\t\t\tproperty('id', $formId)->\n\t\t\t\t\tproperty('action', $this->form->getAction());\n\n\t\t$jsStartup = array();\n\n\t\tforeach($this->inputs as $inputs) {\n\t\t\tforeach($inputs as $input) {\n\t\t\t\tif(($input->type == 'checkbox' || $input->type == 'radio') && isset($input->properties['value'])) {\n\t\t\t\t\t$inputId = $formId . '_' . $input->name . '_' . $input->properties['value'];\n\t\t\t\t} else {\n\t\t\t\t\t$inputId = $formId . '_' . $input->name;\n\t\t\t\t}\n\t\t\t\t$input->property('id', $inputId);\n\t\t\t}\n\t\t}\n\n\t\tforeach($this->inputs as $section => $inputs)\n\t\t{\n\t\t\t$sectionHtml = new HtmlObject('fieldset');\n\t\t\t$sectionHtml->property('id', $formId . \"_section_\" . $section);\n\n\t\t\tif(isset($this->sectionClasses[$section])) {\n\t\t\t\tforeach($this->sectionClasses[$section] as $class) {\n\t\t\t\t\t$sectionHtml->addClass($class);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->sectionClasses[$section] = array();\n\t\t\t}\n\n\t\t\tif(!in_array('mf-toggle-hide', $this->sectionClasses[$section]) && \n\t\t\t !in_array('mf-toggle-none', $this->sectionClasses[$section])) {\n\t\t\t\t$sectionHtml->addClass('mf-toggle-show');\n\t\t\t}\n\n\n\t\t\tif(isset($this->sectionLegends[$section]))\n\t\t\t\t$sectionHtml->insertNewHtmlObject('legend')->\n\t\t\t\t\twrapAround($this->sectionLegends[$section]);\n\n\t\t\t$sectionDiv = new HtmlObject('div');\n\t\t\t$sectionDiv->addClass('fieldset_contents')->\n\t\t\t\tproperty('id', $formId . \"_section_\" . $section . '_contents');\n\n\t\t\tif(isset($this->sectionIntro[$section]))\n\t\t\t\t$sectionDiv->insertNewHtmlObject('div')->\n\t\t\t\t\twrapAround($this->sectionIntro[$section])->\n\t\t\t\t\taddClass('fieldset_intro')->\n\t\t\t\t\tproperty('id', $formId . \"_section_\" . $section . '_intro');\n\n\t\t\t$sectionHtml->wrapAround($sectionDiv);\n\n\t\t\t$hasInputs = false;\n\n\t\t\t$controlsDiv = new HtmlObject('div');\n\t\t\t$controlsDiv->addClass('fieldset_controls')->\n\t\t\t\tproperty('id', $formId . \"_section_\" . $section . '_controls');\n\n\t\t\t$sectionDiv->wrapAround($controlsDiv);\n\n\t\t\tforeach($inputs as $input)\n\t\t\t{\n\t\t\t\t$inputId = $input->property('id');\n\n\t\t\t\tif($input->type === 'submit' && !$this->includeSubmit)\n\t\t\t\t\tcontinue;\n\n\t\t\t\tif($input->type === 'richtext') {\n\t\t\t\t\t$input->property($this->form->getMarkup(), 'true');\n\t\t\t\t\t$input->type = 'textarea';\n\t\t\t\t\t$input->addClass('fulltext');\n\t\t\t\t}\n\n\t\t\t\t$plugins = new Hook();\n\t\t\t\t$plugins->enforceInterface('FormToHtmlHook');\n\t\t\t\t$plugins->loadPlugins('Forms', 'HtmlConvert', 'Base');\n\t\t\t\t$plugins->loadPlugins('Forms', 'HtmlConvert', $input->type);\n\t\t\t\t$plugins->setInput($input);\n\n\t\t\t\t$jsStartup = array_merge_recursive($jsStartup,\n\t\t\t\t\t\t\t\tHook::mergeResults($plugins->getCustomJavaScript()));\n\n\t\t\t\tif(in_array(true, Hook::mergeResults($plugins->overrideHtml())))\n\t\t\t\t{\n\t\t\t\t\t$plugins->createOverriddingHtml($sectionHtml);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\n\t\t\t\tif($inputStartupJs = $this->getInputJavascript($input))\n\t\t\t\t\t$jsStartup = array_merge_recursive($jsStartup, $inputStartupJs);\n\n\t\t\t\t$inputHtml = $this->getInputHtmlByType($input);\n\t\t\t\t$plugins->setCustomHtml($inputHtml);\n\n\t\t\t\tif($inputOptions = $this->getInputMetaData($input) ) //count($inputOptions > 0))\n\t\t\t\t{\n\t\t\t\t\t$metaDataClass = json_encode($inputOptions);\n\t\t\t\t\t$inputHtml->addClass($metaDataClass);\n\t\t\t\t}\n\n\t\t\t\tif($input->type == 'file')\n\t\t\t\t\t$enctype = 'multipart/form-data';\n\n\t\t\t\tif($input->type == 'hidden') {\n\t\t\t\t\t$inputHtml->close(false);\n\t\t\t\t\t$formHtml->wrapAround($inputHtml);\n\t\t\t\t} else {\n\t\t\t\t\t$inputHtml->wrapAround($input->property('contents'));\n\n\t\t\t\t\t$labelHtml = new HtmlObject('label');\n\n\t\t\t\t\t$labelHtml->property('for', $inputId)->\n\t\t\t\t\t\tproperty('id', $inputId . '_label');\n\n\t\t\t\t\tif(isset($input->pretext))\n\t\t\t\t\t\t$controlsDiv->wrapAround($input->pretext);\n\n\t\t\t\t\tif(isset($input->label))\n\t\t\t\t\t{\n\t\t\t\t\t\t$labelHtml->wrapAround($input->label);\n\t\t\t\t\t\tif(isset($input->description))\n\t\t\t\t\t\t\t$labelHtml->property('title', $input->description);\n\t\t\t\t\t}\n\n\t\t\t\t\tif($input->type == 'radio' || $input->type == 'checkbox')\n\t\t\t\t\t\t$inputHtml->addClass('small_input');\n\n\t\t\t\t\tif(isset($input->labelAfter) && $input->labelAfter) {\n\t\t\t\t\t\t$labelHtml->addClass('label_after');\n\t\t\t\t\t\t$inputHtml->addClass('input_label_after');\n\n\t\t\t\t\t\t$controlsDiv->wrapAround($inputHtml)->\n\t\t\t\t\t\t\twrapAround($labelHtml);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$labelHtml->addClass('label_before');\n\t\t\t\t\t\t$inputHtml->addClass('input_label_before');\n\n\t\t\t\t\t\t$controlsDiv->wrapAround($labelHtml)->\n\t\t\t\t\t\t\twrapAround($inputHtml);\n\t\t\t\t\t}\n\n\t\t\t\t\tif(isset($this->errors[$input->name])) {\n\t\t\t\t\t\t$errorLabel = new HtmlObject('label');\n\t\t\t\t\t\t$errorLabel->addClass('error')->\n\t\t\t\t\t\t\tproperty('for', $inputId)->\n\t\t\t\t\t\t\tproperty('generated', true);\n\t\t\t\t\t\t$errorVal = '';\n\n\t\t\t\t\t\tforeach($this->errors[$input->name] as $error)\n\t\t\t\t\t\t\t$errorVal .= $error . ' ';\n\n\t\t\t\t\t\t$errorLabel->wrapAround(trim($errorVal));\n\t\t\t\t\t\t$controlsDiv->wrapAround($errorLabel);\n\t\t\t\t\t}\n\n\t\t\t\t\tif(isset($input->posttext))\n\t\t\t\t\t\t$controlsDiv->wrapAround($input->posttext);\n\n\t\t\t\t\tif(!isset($input->noBreak) || $input->noBreak === false)\n\t\t\t\t\t\t$controlsDiv->insertNewHtmlObject('br');\n\n\t\t\t\t\t$hasInputs = true;\n\t\t\t\t}\n\t\t\t}//foreach($this->inputs as $section => $inputs)\n\n\t\t\tif(isset($this->sectionOutro[$section]))\n\t\t\t\t$sectionDiv->insertNewHtmlObject('div')->\n\t\t\t\t\twrapAround($this->sectionOutro[$section])->\n\t\t\t\t\taddClass('fieldset_outro')->\n\t\t\t\t\tproperty('id', $formId . \"_section_\" . $section . '_outro');\n\n\t\t\tif($hasInputs)\n\t\t\t\t$formHtml->wrapAround($sectionHtml);\n\n\t\t\t$formHtml->property('enctype', $enctype);\n\t\t}\n\n\t\tif(!$this->submitButton && $this->includeSubmit)\n\t\t{\n\t\t\t$sectionHtml = new HtmlObject('div');\n\t\t\t$sectionHtml->property('id', $this->name . \"_section_\" . 'control');\n\t\t\t$inputHtml = new HtmlObject('input');\n\t\t\t$inputHtml->name = $input->name;\n\t\t\t$inputHtml->property('name', 'Submit')->property('type', 'Submit')->property('value', 'Submit');\n\n\t\t\t$labelHtml = new HtmlObject('label');\n\t\t\t$sectionHtml->wrapAround($labelHtml)->wrapAround($inputHtml)->wrapAround('<br>');\n\t\t\t$formHtml->wrapAround($sectionHtml);\n\t\t}\n\n\t\t$formHtml = (string) $formHtml;\n\n\t\t$output = $this->fullForm\n\t\t\t? (string) $formHtml\n\t\t\t: (string) $sectionHtml;\n\n\t\t$formJsOptions = array();\n\t\t$formJsOptions['validateOnLoad'] = $this->form->wasSubmitted();\n\t\t$jsStartup[] = '$(\"#' . $this->name . '\").MortarForm(' . json_encode($formJsOptions) . ');';\n\n\t\tif(class_exists('ActivePage', false))\n\t\t{\n\t\t\t$page = ActivePage::getInstance();\n\t\t\t$page->addStartupScript($jsStartup);\n\t\t}\n\t\treturn $output;\n\t}", "public function buildFormTemplate() {\n\t\t$formTemplatepath = \"src/Templates/\".$this->stateName.\"_\".$this->stateType.\".php\";\n\t\t$formTemplate = fopen($formTemplatepath, \"w\") or die (\"Unable to create html template for \\\"\".$this->stateName.\"_\".$this->stateType.\"\\\" state.\");\n\t\t$formHtml = \"<!DOCTYPE html>\n\t\t<html>\n\t\t<head>\n\t\t\t<title>\".$this->title.\"</title>\n\t\t</head>\n\t\t<body>\";\n\t\tif ($this->stateType == \"generation\") {\n\t\t\t$formHtml .= \"<form method=\\\"\".$this->method.\"\\\" action=\\\"../Scripts/generationHandleRequest.php\\\" >\";\n\t\t}\n\t\t\n\t\tforeach ($this->_inputs as $key => $input) {\n\t\t\t// Skip the Database elements.\n\t\t\tif ($input['inputType'] == \"DATABASE\") {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Check if email validation is required.\n\t\t\tif (isset($input['rule']) && in_array('email', $input['rule'])) {\n\t\t\t\t$input['inputType'] = 'email';\n\t\t\t}\n\n\t\t\t$formHtml .= \"<label>\".$input['label'].\"</label><input type=\\\"\".$input['inputType'].\"\\\" id=\\\"\".$input['name'].\"\\\" name=\\\"\".$input['name'].\"\\\" value=\\\"\".$input['defaultValue'].\"\\\"\";\n\n\t\t\t// Check if field was required.\n\t\t\tif (isset($input['rule']) && in_array('required', $input['rule'])) {\n\t\t\t\t$formHtml .= \" required\";\n\t\t\t}\n\t\t\t// Makes the html page more readable, i.e. appending with a new line.\n\t\t\t$formHtml .= \">\n\t\t\t<br>\";\n\t\t}\n\n\t\t$formHtml .= \"</form>\n\t\t</body>\n\t\t</html>\";\n\n\t\tfwrite($formTemplate, $formHtml);\n\t\tfclose($formTemplate);\n\t}", "public function buildForm() {\n\t\t$form = '';\n\n\t\tforeach ($this->_properties as $row) {\n\t\t\tif (!in_array($row['Field'],$this->_ignore)) {\n\t\t\t\t$elem = $this->buildElement($row);\n\t\t\t\t$row['Comment'] != '' ? $comment = $row['Comment'].\"<br />\": $comment = '';\n\t\t\t\t$this->_properties[$row['Field']]['HTMLElement']=$elem;\n\t\t\t\tif ($row['ElementType']=='hidden')\n\t\t\t\t\t$form .= $elem;\n\t\t\t\telse \n\t\t\t\t\t$form .= sprintf(\"<div class='formElem'>\\n%s<br />\\n%s\\n%s</div>\\n\",ucwords (str_replace (\"_\",\" \",$row['Field'])),$comment,$elem);\n\t\t\t}\n\t\t}\n\t\treturn $form;\n\t}", "function buildForm()\r\n {\r\n $this->buildTabs();\r\n // tab caption\r\n $this->addElement('header', null,\r\n 'Progress2 Generator - Control Panel: run demo');\r\n\r\n $this->addElement('static', 'progressBar',\r\n 'Your progress meter looks like:');\r\n\r\n // Buttons of the wizard to do the job\r\n $this->buildButtons(array('reset','process'));\r\n }", "protected function getForm()\n {\n $this->document->addStyle('view/javascript/codemirror/lib/codemirror.css');\n $this->document->addStyle('view/javascript/codemirror/theme/monokai.css');\n $this->document->addStyle('view/javascript/summernote/summernote.css');\n\n $this->document->addScript('view/javascript/codemirror/lib/codemirror.js');\n $this->document->addScript('view/javascript/codemirror/lib/xml.js');\n $this->document->addScript('view/javascript/codemirror/lib/formatting.js');\n $this->document->addScript('view/javascript/summernote/summernote.js');\n $this->document->addScript('view/javascript/summernote/summernote-image-attributes.js');\n $this->document->addScript('view/javascript/summernote/opencart.js');\n\n $data['text_form'] = !isset($this->request->get['country_id']) ? $this->language->get('text_add') : $this->language->get('text_edit');\n\n if (isset($this->error['warning'])) {\n $data['error_warning'] = $this->error['warning'];\n } else {\n $data['error_warning'] = '';\n }\n\n if (isset($this->error['domain'])) {\n $data['error_domain'] = $this->error['domain'];\n } else {\n $data['error_domain'] = array();\n }\n\n if (isset($this->error['currency'])) {\n $data['error_currency'] = $this->error['currency'];\n } else {\n $data['error_currency'] = '';\n }\n\n $url = '';\n\n if (isset($this->request->get['sort'])) {\n $url .= '&sort=' . $this->request->get['sort'];\n }\n\n if (isset($this->request->get['order'])) {\n $url .= '&order=' . $this->request->get['order'];\n }\n\n if (isset($this->request->get['page'])) {\n $url .= '&page=' . $this->request->get['page'];\n }\n\n $data['breadcrumbs'] = array();\n\n $data['breadcrumbs'][] = array(\n 'text' => $this->language->get('text_home'),\n 'href' => $this->url->link('common/dashboard', 'user_token=' . $this->session->data['user_token'])\n );\n\n $data['breadcrumbs'][] = array(\n 'text' => $this->language->get('heading_title'),\n 'href' => $this->url->link('domain/domain', 'user_token=' . $this->session->data['user_token'] . $url)\n );\n\n if (!isset($this->request->get['country_id'])) {\n $data['action'] = $this->url->link('domain/domain/add', 'user_token=' . $this->session->data['user_token'] . $url);\n } else {\n $data['action'] = $this->url->link('domain/domain/edit', 'user_token=' . $this->session->data['user_token'] . '&country_id=' . $this->request->get['country_id'] . $url);\n }\n\n $data['cancel'] = $this->url->link('domain/domain', 'user_token=' . $this->session->data['user_token'] . $url);\n\n if (isset($this->request->get['country_id']) && ($this->request->server['REQUEST_METHOD'] != 'POST')) {\n $data['domainLang'] = $this->model_domain_domain->getDomain($this->request->get['country_id']);\n if(isset($data['domainLang'][0] )){\n $domain_info = current($data['domainLang']);\n }else{\n $domain_info = $data['domainLang'];\n }\n\n }\n\n $data['user_token'] = $this->session->data['user_token'];\n\n\n if (isset($this->request->post['domain'])) {\n $data['domain'] = $this->request->post['domain'];\n } elseif (!empty($domain_info)) {\n $data['domain'] = $domain_info['domain'];\n } else {\n $data['domain'] = '';\n }\n\n if (isset($this->request->post['currency_id'])) {\n $data['currency_id'] = $this->request->post['currency_id'];\n } elseif (!empty($domain_info)) {\n $data['currency_id'] = $domain_info['currency_id'];\n } else {\n $data['currency_id'] = '';\n }\n\n if (isset($this->request->post['currency_title'])) {\n $data['currency_title'] = $this->request->post['currency_title'];\n } elseif (!empty($domain_info)) {\n $data['currency_title'] = $domain_info['currency_title'];\n } else {\n $data['currency_title'] = '';\n }\n\n $this->load->model('design/layout');\n\n $data['layouts'] = $this->model_design_layout->getLayouts();\n\n $data['header'] = $this->load->controller('common/header');\n $data['column_left'] = $this->load->controller('common/column_left');\n $data['footer'] = $this->load->controller('common/footer');\n\n $this->response->setOutput($this->load->view('domain/domain_form', $data));\n }", "private function controllerBuilder() {\n // Create rules\n $validationRules = '';\n $filecheck = '';\n $insert = false;\n $insertTab = '';\n // Foreach on form fields added on generator\n foreach ($this->formDatas as $field) {\n $rules = array();\n // Create rules for codeigniter framework\n if (isset($field['rules'])) {\n $rules = json_decode($field['rules'], true);\n }\n if (!empty($field['min_length'])) {\n $rules[] = 'min_length[' . $field['min_length'] . ']';\n }\n if (!empty($field['max_length'])) {\n $rules[] = 'max_length[' . $field['max_length'] . ']';\n }\n if (!empty($field['exact_length'])) {\n $rules[] = 'exact_length[' . $field['exact_length'] . ']';\n }\n if (!empty($field['greater_than'])) {\n $rules[] = 'greater_than[' . $field['greater_than'] . ']';\n }\n if (!empty($field['less_than'])) {\n $rules[] = 'less_than[' . $field['less_than'] . ']';\n }\n\n // Create php line\n if (isset($rules)) {\n $validationRules .= '$this->form_validation->set_rules(\\'' . strtolower($field['name']) . '\\', \\'' . $field['label'] . '\\', \\'' . implode('|', $rules) . '\\');\n ';\n }\n\n\n // File\n if ($field['type'] == 'file') {\n // If file_format selected or maxfilesize indicated\n if (isset($field['file_format']) || isset($field['maxfilesize'])) {\n if (!isset($field['file_format'])) {\n $fileformat = 'false';\n } else {\n $fileformat = str_replace(']', ')', str_replace('[', 'array(', sprintf($field['file_format'])));\n }\n\n // Create check line for checking file options\n $filecheck .= '$errorfile[\"' . $field['name'] . '\"] = $this->fileup->checkErrorUpload($_FILES[\"' . $field['name'] . '\"], ' . $fileformat . ', ' . $field['maxfilesize'] . ');\n ';\n }\n }\n\n // Check if database option is checked for create fields to insert\n if (isset($field['database_fields'])) {\n // Option to active database insert\n $insert = true;\n // Tab to insert\n $insertTab .= '$insertTab[\"' . $field['name'] . '\"] = $_POST[\"' . $field[\"name\"] . '\"];\n ';\n }\n }\n\n // Create com for files check\n if ($filecheck != '') {\n $filecheck = '// Files validation\n ' . $filecheck;\n }\n\n // Create code to insert in database\n if ($insert == true) {\n $database_insert = '\n // If valid\n if($valid == true) {\n ' . $insertTab . '\n // Save to bdd\n if (!$this->' . $this->formName . '_model->save($insertTab) == true) {\n // Save error\n $data[\"error\"] = \"save\";\n }\n }';\n } else {\n $database_insert = '';\n }\n\n // Build the controller\n $controller = '<?php\n class ' . ucfirst($this->formName) . ' extends CI_Controller {\n // Constructor\n function __construct()\n {\n parent::__construct();\n $this->load->library(array(\\'form_validation\\', \\'fileup\\'));\n $this->load->helper(array(\\'form\\'));\n $this->load->model(\\'' . $this->formName . '_model\\');\n }\n\n // Form ' . ucfirst($this->formName) . '\n public function index()\n {\n // Init\n $data = array();\n // If form sended\n if(!empty($_POST)) {\n // Delimitors\n $this->form_validation->set_error_delimiters(\\'<p class=\"error\">\\', \\'</p>\\');\n\n // Validation rules\n ' . $validationRules . '\n\n ' . $filecheck . '\n\n // To block database insertion if we have file errors\n $valid = true;\n\n // Check for file errors\n if(isset($errorfile)) {\n // Create file errors for view\n foreach($errorfile as $name => $errorf) {\n if($errorf != false) {\n $data[\"errorfile\"][$name] = $errorf;\n $valid = false;\n }\n }\n }\n\n if ($this->form_validation->run() == true) {\n // Insert in bdd\n ' . $database_insert . '\n\n // Redirect to success page\n redirect(\\'' . $this->formName . '/success\\');\n }\n else {\n // Validation error\n $data[\"error\"] = \"validation\";\n\n }\n }\n // Load view\n $this->load->view(\\'' . $this->formName . '\\', $data);\n }\n\n // Success\n public function success() {\n // Load view\n $this->load->view(\\'' . $this->formName . '_success\\');\n }\n\n }\n ?>';\n\n return array(str_replace('<', '&lt;', $controller), $controller);\n }", "public function auto_build_form($form_content, $data){\r\n\t\treturn \"<form method='post' enctype='multipart/form-data' action='#' \" . (isset($data['onsubmit']) ? \" onsubmit='\" . $data['onsubmit'] . \"' \" : \"onsubmit=\\\"return validateFields()\\\"\") .\r\n\t\t\t\" >\" .\r\n\t\t\t$form_content .\r\n\t\t\t\"</form>\";\r\n\t}", "public function build_css() {\n\t\t\t\n\t\t}", "function genFormStyle(){\n $res = '<form action=\"preferences.php\" method=\"post\">';\n $res .= '<p>Selctionner un style</p>';\n $res .= '<select name=\"style\" id=\"style\">';\n if(isset($_SESSION['style'])){\n switch($_SESSION['style']){\n case \"blue.css\":\n $res .= '<option value=\"blue.css\" selected>Blue</option>';\n $res .= '<option value=\"italic.css\">Italic</option>';\n $res .= '<option value=\"vertetjaune.css\">V et J</option>';\n break;\n case \"italic.css\":\n $res .= '<option value=\"blue.css\">Blue</option>';\n $res .= '<option value=\"italic.css\" selected>Italic</option>';\n $res .= '<option value=\"vertetjaune.css\">V et J</option>';\n break;\n case \"vertetjaune.css\":\n $res .= '<option value=\"blue.css\">Blue</option>';\n $res .= '<option value=\"italic.css\">Italic</option>';\n $res .= '<option value=\"vertetjaune.css\" selected>V et J</option>';\n break;\n }\n }\n else{\n $res .= '<option value=\"blue.css\">Blue</option>';\n $res .= '<option value=\"italic.css\">Italic</option>';\n $res .= '<option value=\"vertetjaune.css\">V et J</option>';\n }\n $res .= '</select>';\n $res .= '<button value=\"submit\">Go !</button>';\n $res .= '</form>';\n echo $res;\n }", "public function build_menu_page() {\n\n\t\t\t$tabindex = 0;\n\t\t\t$temp = array();\n\t\t\t$hidden = array();\n\t\t\t$this->data = get_option($this->slug.'_fields');\n\t\t\t\n\t\t\t$output = '';\n\t\t\t$output .= '<!-- wrap starts -->'.\"\\n\";\n\t\t\t$output .= \"\\t\".'<div class=\"wrap\">'.\"\\n\";\n\n\t\t\t$output .= '<h1>'.$this->options['title'].'</h1>'.\"\\n\";\n\n\t\t\t$output .= \"\\t\".'<form method=\"post\" action=\"'.$_SERVER['REQUEST_URI'].'\" enctype=\"multipart/form-data\">'.\"\\n\\n\";\n\n\t\t\tforeach ($this->data as $section => $fields) {\n\n\t\t\t\t$output .= \"\\t\".'<h2 class=\"title\" id=\"'.sanitize_title($section).'\">'.$section.'</h2>'.\"\\n\\n\";\n\n\t\t\t\t$output .= \"\\t\".'<table class=\"form-table theme-form-table\">'.\"\\n\";\n\t\t\t\t$output .= \"\\t\".'<tbody>'.\"\\n\";\n\n\t\t\t\tforeach ($fields as $id => $field) {\n\n\t\t\t\t\tif ($field['type'] != 'hidden') {\n\n\t\t\t\t\t\t$tabindex += 1;\n\t\t\t\t\t\t$temp += array($field['label'] => isset($field['value']) ? $field['value'] : '');\n\t\t\t\t\t\t$value = isset($_POST['updating']) ? Save::save_page($this->slug, $field) : Save::set_default_value($this->slug, $temp, $field);\n\n\t\t\t\t\t\t$description = (isset($field['description']) && !empty($field['description'])) ? '<span class=\"description\" id=\"'.Field::get_label_name($field['label']).'-info\">'.$field['description'].'</span>' : '';\n\t\t\t\t\t\t$toggle = (isset($field['description']) && !empty($field['description'])) ? '<a class=\"toggle\" data-toggle=\"form-description\" data-target=\"'.Field::get_label_name($field['label']).'-info\" title=\"'.__('Show info.', 'admin translation').'\">'.__('[+] Info', 'admin translation').'</a>' : '';\n\n\t\t\t\t\t\t$output .= \"\\t\".'<tr valign=\"top\">'.\"\\n\";\n\t\t\t\t\t\t$output .= \"\\t\".'<th class=\"scope-one\" scope=\"row\"><label'.Field::get_label_error($field['label']).' for=\"'.Field::get_label_name($field['label']).'\">'.$field['name'].' <cite></cite></label></th>'.\"\\n\";\n\t\t\t\t\t\t$output .= \"\\t\".'<td class=\"scope-two\">'.Field::get_field($this->slug, $field, $value).'<div class=\"field-info\">'.$description.'</div></td>'.\"\\n\";\n\t\t\t\t\t\t$output .= \"\\t\".'<td class=\"scope-three\">'.$toggle.'</td>'.\"\\n\";\n\t\t\t\t\t\t$output .= \"\\t\".'<td>&nbsp;</td>'.\"\\n\";\n\t\t\t\t\t\t$output .= \"\\t\".'</tr>'.\"\\n\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\n\t\t\t\t\t\tarray_push($hidden, $field);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t$output .= \"\\t\".'</tbody>'.\"\\n\";\n\t\t\t\t$output .= \"\\t\".'</table>'.\"\\n\\n\";\n\t\t\t\t$output .= \"\\t\".'<hr />'.\"\\n\\n\";\n\t\t\t}\n\n\t\t\t$output .= isset($_REQUEST['page']) ? \"\\t\".wp_nonce_field($_REQUEST['page']).\"\\n\" : '';\n\n\t\t\tforeach ($hidden as $id => $field) {\n\n\t\t\t\t$temp += array($field['label'] => isset($field['value']) ? $field['value'] : '');\n\t\t\t\t$value = isset($_POST['updating']) ? Save::save_page($this->slug, $field) : Save::set_default_value($this->slug, $temp, $field);\n\t\t\t\t\n\t\t\t\t$output .= Field::get_field($this->slug, $field, $value);\n\t\t\t}\n\t\t\t\n\t\t\t$output .= \"\\t\".'<input type=\"hidden\" id=\"updating\" name=\"updating\" value=\"1\" />'.\"\\n\";\n\t\t\t$output .= \"\\t\".'<p class=\"submit\"><input type=\"submit\" name=\"submit\" id=\"submit\" class=\"button button-primary\" value=\"'.__('Save Changes', 'admin translation').'\" /></p>'.\"\\n\";\n\t\t\t$output .= \"\\t\".'</form>'.\"\\n\";\n\n\t\t\t$output .= \"\\t\".'</div>'.\"\\n\";\n\t\t\t$output .= '<!-- wrap ends -->'.\"\\n\\n\";\n\n\t\t\t$output .= Field::get_form_feedback();\n\t\t\t\n\t\t\tValidation::reset_error();\n\n\t\t\techo $output;\n\t\t}", "private function _displayForm(){\n\t $moneda = Tools::getValue('moneda', $this->moneda);\n\t $iseuro = ($moneda == '978') ? ' selected=\"selected\" ' : '';\n\t $isdollar = ($moneda == '840') ? ' selected=\"selected\" ' : '';\n \t // Opciones para activar/desactivar SSL\n\t $ssl = Tools::getValue('ssl', $this->ssl);\n\t $ssl_si = ($ssl == 'si') ? ' checked=\"checked\" ' : '';\n\t $ssl_no = ($ssl == 'no') ? ' checked=\"checked\" ' : '';\n\t // Opciones para el comportamiento en error en el pago\n\t $error_pago = Tools::getValue('error_pago', $this->error_pago);\n\t $error_pago_si = ($error_pago == 'si') ? ' checked=\"checked\" ' : '';\n\t $error_pago_no = ($error_pago == 'no') ? ' checked=\"checked\" ' : '';\n\t // Opciones para activar los idiomas\n\t $idiomas_estado = Tools::getValue('idiomas_estado', $this->idiomas_estado);\n\t $idiomas_estado_si = ($idiomas_estado == 'si') ? ' checked=\"checked\" ' : '';\n\t $idiomas_estado_no = ($idiomas_estado == 'no') ? ' checked=\"checked\" ' : '';\n\t \n\t \n\t // Mostar formulario\n\t\t$this->_html .=\n\t\t'<form action=\"'.$_SERVER['REQUEST_URI'].'\" method=\"post\">\n\t\t\t<fieldset>\n\t\t\t<legend><img src=\"../img/admin/contact.gif\" />'.$this->l('Configuraci&oacute;n del TPV').'</legend>\n\t\t\t\t<table border=\"0\" width=\"680\" cellpadding=\"0\" cellspacing=\"0\" id=\"form\">\n\t\t\t\t\t<tr><td colspan=\"2\">'.$this->l('Por favor completa la informaci&oacute;n requerida que te proporcionar&aacute; tu banco Servired.').'.<br /><br /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('URL de llamada del entorno').'</td><td><input type=\"text\" name=\"urltpv\" value=\"'.Tools::getValue('urltpv', $this->urltpv).'\" style=\"width: 330px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Clave secreta de encriptaci&oacute;n').'</td><td><input type=\"password\" name=\"clave\" value=\"'.Tools::getValue('clave', $this->clave).'\" style=\"width: 200px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Nombre del comercio').'</td><td><input type=\"text\" name=\"nombre\" value=\"'.htmlentities(Tools::getValue('nombre', $this->nombre), ENT_COMPAT, 'UTF-8').'\" style=\"width: 200px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('N&uacute;mero de comercio (FUC)').'</td><td><input type=\"text\" name=\"codigo\" value=\"'.Tools::getValue('codigo', $this->codigo).'\" style=\"width: 200px;\" /></td></tr>\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('N&uacute;mero de terminal').'</td><td><input type=\"text\" name=\"terminal\" value=\"'.Tools::getValue('terminal', $this->terminal).'\" style=\"width: 80px;\" /></td></tr>\t\t\t\t\t\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Tipo de moneda').'</td><td>\n\t\t\t\t\t<select name=\"moneda\" style=\"width: 80px;\"><option value=\"\"></option><option value=\"978\"'.$iseuro.'>EURO</option><option value=\"840\"'.$isdollar.'>DOLLAR</option></select></td></tr>\n\t\t\t\t\t\n\t\t\t\t\t<tr><td width=\"215\" style=\"height: 35px;\">'.$this->l('Tipo de transacci&oacute;n').'</td><td><input type=\"text\" name=\"trans\" value=\"'.Tools::getValue('trans', $this->trans).'\" style=\"width: 80px;\" /></td></tr>\t\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t\t</td></tr>\n\t\t\t\t\t\n\t\t\t\t</table>\n\t\t\t</fieldset>\n\t\t\t<br>\n\t\t\t<fieldset>\n\t\t\t<legend><img src=\"../img/t/9.gif\" />'.$this->l('Personalizaci&oacute;n').'</legend>\n\t\t\t<table border=\"0\" width=\"680\" cellpadding=\"0\" cellspacing=\"0\" id=\"form\">\n\t\t<tr>\n\t\t\t<td colspan=\"2\">'.$this->l('Por favor completa los datos adicionales.').'.<br /><br /></td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td width=\"215\" style=\"height: 35px;\">'.$this->l('SSL en URL de validaci&oacute;n').'</td>\n\t\t\t<td>\n\t\t\t<input type=\"radio\" name=\"ssl\" id=\"ssl_1\" value=\"si\" '.$ssl_si.'/>\n\t\t\t<img src=\"../img/admin/enabled.gif\" alt=\"'.$this->l('Activado').'\" title=\"'.$this->l('Activado').'\" />\n\t\t\t<input type=\"radio\" name=\"ssl\" id=\"ssl_0\" value=\"no\" '.$ssl_no.'/>\n\t\t\t<img src=\"../img/admin/disabled.gif\" alt=\"'.$this->l('Desactivado').'\" title=\"'.$this->l('Desactivado').'\" />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td width=\"215\" style=\"height: 35px;\">'.$this->l('En caso de error, permitir elegir otro medio de pago').'</td>\n\t\t\t<td>\n\t\t\t<input type=\"radio\" name=\"error_pago\" id=\"error_pago_1\" value=\"si\" '.$error_pago_si.'/>\n\t\t\t<img src=\"../img/admin/enabled.gif\" alt=\"'.$this->l('Activado').'\" title=\"'.$this->l('Activado').'\" />\n\t\t\t<input type=\"radio\" name=\"error_pago\" id=\"error_pago_0\" value=\"no\" '.$error_pago_no.'/>\n\t\t\t<img src=\"../img/admin/disabled.gif\" alt=\"'.$this->l('Desactivado').'\" title=\"'.$this->l('Desactivado').'\" />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t<td width=\"215\" style=\"height: 35px;\">'.$this->l('Activar los idiomas en el TPV').'</td>\n\t\t\t<td>\n\t\t\t<input type=\"radio\" name=\"idiomas_estado\" id=\"idiomas_estado_si\" value=\"si\" '.$idiomas_estado_si.'/>\n\t\t\t<img src=\"../img/admin/enabled.gif\" alt=\"'.$this->l('Activado').'\" title=\"'.$this->l('Activado').'\" />\n\t\t\t<input type=\"radio\" name=\"idiomas_estado\" id=\"idiomas_estado_no\" value=\"no\" '.$idiomas_estado_no.'/>\n\t\t\t<img src=\"../img/admin/disabled.gif\" alt=\"'.$this->l('Desactivado').'\" title=\"'.$this->l('Desactivado').'\" />\n\t\t\t</td>\n\t\t</tr>\n\t\t</table>\n\t\t\t</fieldset>\t\n\t\t\t<br>\n\t\t<input class=\"button\" name=\"btnSubmit\" value=\"'.$this->l('Guardar configuraci&oacute;n').'\" type=\"submit\" />\n\t\t\t\t\t\n\t\t\t\n\t\t</form>';\n\t}" ]
[ "0.7886451", "0.68713915", "0.67178565", "0.6539944", "0.6483157", "0.6474773", "0.64229256", "0.6420625", "0.63697195", "0.63479596", "0.6323945", "0.63135266", "0.62959915", "0.6291068", "0.6272934", "0.6272123", "0.62512887", "0.6247538", "0.6239279", "0.6233017", "0.6231236", "0.6229104", "0.62192297", "0.6219041", "0.6171441", "0.6141108", "0.61409783", "0.6130023", "0.609278", "0.60664654" ]
0.7944517
0
/ Usage In the following example we generate a select field with three options. mdx:Render Outputs: mdx:Render o httidy Notice: the `options` method also accepts other formats besides an associative array. Take a look at the documentation of the [HtChoice]( class in order to learn more.
function testRender(){ #mdx:Render $select = new HtSelect("id_category"); $select->options([1=>'Category1',2=>'Category2',3=>'Category3']); #/mdx echo $select $this->expectOutputRegex("/select.*?id.*?name.*?option.*?1.*?Category1.*?3.*?Category3.*?select/s"); echo $select; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function hundope_select_field_render() { \n\t\n}", "public static function renderSelect();", "public function it_shows_select_input_with_options()\n {\n // configure\n $inputs = [\n [\n 'type' => 'select',\n 'name' => 'country',\n 'options' => ['IN' => 'India']\n ]\n ];\n\n $this->configureInputs($inputs);\n\n // assert\n $this->get('/settings')\n ->assertStatus(200)\n ->assertSee('select')\n ->assertSee('IN');\n }", "function form_select($field, $options) {\n $defaults = array(\n 'wrap' => true,\n 'label' => true,\n 'class' => array('input', 'select'),\n 'options' => array()\n );\n\n $options = array_merge($defaults, $options);\n\n $output = '<select name=\"' . $field . '\" id=\"' . form__field_id($field) . '\">';\n foreach($options['options'] as $value => $text) {\n $output .= '<option value=\"' . $value . '\"';\n if(!empty($_POST[$field]) && $_POST[$field] == $value) {\n $output .= ' selected=\"selected\"';\n }\n $output .= '>' . $text . '</option>';\n }\n $output .= '</select>';\n\n if($options['wrap']) {\n $options['field'] = $field;\n $output = form__wrap($output, $options);\n }\n\n $error = form_error_message($field);\n if(!empty($error)) {\n $output .= $error;\n }\n \n return html__output($output);\n}", "function optionsframework_options() {\n\n\t$options[] = array(\n\t\t'name' => 'Styles Font Menu Example',\n\t\t'type' => 'heading'\n\t);\n\n\t$options[] = array(\n\t\t'name' => 'Font',\n\t\t'desc' => '',\n\t\t'id' => 'example_font_1',\n\t\t'type' => 'styles_font_menu',\n\t\t// Set default to Arial.\n\t\t// Get alternative default values by inspecting the hidden menu's <select> in the browser.\n\t\t'std' => '{\"family\":\"Arial, Helvetica, sans-serif\",\"name\":\"Arial\",\"classname\":\"arial\"}',\n\t);\n\n\treturn $options;\n}", "function testOptionsFunction(){\n\t\t#mdx:OptionsFunction\n\t\t$choice = new SimpleChoice(\"category\");\n\t\t$choice->options(function(){\n\t\t\t// pretend this was fetched from the db\n\t\t\t$rows = [\n\t\t\t\t['id'=>1,'name'=>'Action'],\n\t\t\t\t['id'=>2,'name'=>'Drama'],\n\t\t\t\t['id'=>3,'name'=>'Sci-fi']\n\t\t\t];\n\n\t\t\treturn $rows;\n\n\t\t})->context(['category'=>3]); // selects category 3\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"<b>3 - Sci-fi\",\"$choice\");\n\n\t}", "function awm_select_options()\n {\n return array(\n 'options' => array(\n 'label' => __('Options', 'extend-wp'),\n 'case' => 'repeater',\n 'include' => array(\n 'option' => array(\n 'label' => __('Value', 'extend-wp'),\n 'case' => 'input',\n 'type' => 'text',\n ),\n 'label' => array(\n 'label' => __('Label', 'extend-wp'),\n 'case' => 'input',\n 'type' => 'text',\n ),\n ),\n ),\n );\n }", "function testRender(){\n\t\t#mdx:Render\n\t\t$select = new HtCklist(\"select_days\");\n\t\t$select->options([1=>'Mon',2=>'Tue',3=>'Wed',4=>'Thu',5=>'Fri',6=>'Sat']);\n\t\t#/mdx echo $select\n\t\t$this->expectOutputRegex(\"/input.*?select_days.*?1.*?select_days.*?6.*?Sat/s\");\n\t\techo $select;\n\t}", "function form_options($options) {\n }", "function form_element_select( $name, $options, $selected=null )\n{\n\t$out = sprintf( \"<select name=\\\"%s\\\">\\n\", $name );\n\tforeach( $options as $k=>$v )\n\t{\n\t\t$s = ($k==$selected) ? 'selected ' : '';\n\t\t$out .= sprintf( \" <option %svalue=\\\"%s\\\">%s</option>\\n\", $s, $k, $v );\n\t}\n\t$out .= \"</select>\\n\";\n\n\treturn $out;\n}", "function testOptionsTuples(){\n\t\t#mdx:OptionsTuples\n\t\t$choice = new SimpleChoice(\"category\");\n\t\t$choice->options([[1,'Action'],[2,'Drama'],[3,'Sci-fi']]);\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"1 - Action\",\"$choice\");\n\n\t}", "function testSelectedOption(){\n\t\t#mdx:SelectedOption\n\t\t$select = new HtSelect('id_category');\n\t\t$select->options([1=>'Category1',2=>'Category2',3=>'Category3']);\n\t\t$select->context(['id_category'=>2]);\n\t\t#/mdx echo $select\n\t\t$this->expectOutputRegex(\"/option.*?2.*selected/\");\n\t\techo $select;\n\t}", "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 drawDropDownCustom($options)\n\t{\n\t\t$controlName=$options['controlName'];\n\t\t$orgValue=$options['orgValue'];\n\t\t$items=$options['items']; \n\t\t$valueColumnName=$options['valueColumnName'];\n\t\t$titleColumnName=$options['titleColumnName'];\n\t\t$levelColumnName=$options['levelColumnName'];\n\t\t$hasChildColumnName=$options['hasChildColumnName'];\n\t\t$groupNameColumnName=$options['groupNameColumnName'];\n\t\t$groupIdColumnName=$options['groupIdColumnName'];\n\t\t$defaultValue=$options['defaultValue'];\n\t\t$defaultTitle=$options['defaultTitle'];\n\t\t$moreAttributes=$options['attributes'];\n\t\t$useKeyAsKeyAndValueAsValue=$options['useKeyAsKeyAndValueAsValue'];\n\t\t\n\t\tif (is_string($items))\n\t\t\t$items=cmfcMySql::getRowsCustom($items);\n\n\t\t\t\n\t\tif ($options['selectType']=='multiSelect') {\n\t\t\t$moreAttributes['multiple']='multiple';\n\t\t\t$controlName.='[]';\n\t\t}\n\t\t\n\t\t/*\n\t\techo '<pre style=\"direction:ltr\">';\n\t\tprint_r($items);\n\t\techo \"</pre>\";\n\t\t*/\n\t\t$moreAttributesStr=cmfcHtml::attributesToHtml($moreAttributes);\n\t\t\n\t\t$lastGroupName='';\n\t\t$firstRow=true;\n\n\t\t$html=sprintf('<select name=\"%s\" %s >'.\"\\n\", $controlName, $moreAttributesStr);\n\t\tif (!is_null($defaultValue)) {\n\t\t\tif ($options['disabledDefaultValue']==true) {\n\t\t\t\t$disabledHtml='disabled=\"disabled\"';\n\t\t\t} else {\n\t\t\t\t$disabledHtml='';\n\t\t\t}\n\t\t\t$html.=sprintf('<option value=\"%s\" %s>%s</option>'.\"\\n\",$defaultValue,$disabledHtml, $defaultTitle);\n\t\t}\n\t\t//$i = 0; //count the number of selected orgValues\n\t\t\n\t\tif (!is_array($orgValue))\n\t\t\t$orgValues[] = $orgValue;\n\t\telse\n\t\t\t$orgValues = $orgValue;\n\t\t\t\n\t\tif(is_array($items)) // added by babak\n\t\tforeach ($items as $key=>$item) {\n\t\t\tif (is_array($item)) {\n\t\t\t\t$title=$item[$titleColumnName];\n\t\t\t\t$value=$item[$valueColumnName];\n\t\t\t} elseif (is_integer($key) and !$useKeyAsKeyAndValueAsValue) {\n\t\t\t\t$title=$item;\n\t\t\t\t$value=$item;\n\t\t\t} else {\n\t\t\t\t$title=$item;\n\t\t\t\t$value=$key;\n\t\t\t}\n\n\t\t\tif (!empty($groupNameColumnName) && ($options['interface']['group'] or !isset($options['interface']['group']))) {\n\t\t\t\t$groupName=$item[$groupNameColumnName];\n\t\t\t\t$groupId=$item[$groupIdColumnName];\n\t\t\t\t\n\t\t\t\tif ($lastGroupName==$groupName) {$groupChanged=false;} else {$groupChanged=true;}\n\t\t\t\t//echo \"[$lastGroupName:$groupName]\";\n\t\t\t\tif ($groupChanged==true) {\n\t\t\t\t\tif (!$firstRow) { $html.=\"</optgroup>\\n\"; }\n\t\t\t\t\t$html.=sprintf('<optgroup label=\"%s\" title=\"%s\">'.\"\\n\",$groupName, $groupId);\n\t\t\t\t\t$lastGroupName=$groupName;\n\t\t\t\t}\n\t\t\t\t$groupChanged=false;\n\t\t\t}\n\t\t\t$selected='';\n\t\t\tif (in_array($value,$orgValues)) {\n\t\t\t\t$selected='selected=\"selected\"';\n\t\t\t\t//$i++;\n\t\t\t} else {\n\t\t\t\t$selected = '';\n\t\t\t}\n\t\t\t\n\t\t\t$itemAttributes=array();\n\t\t\t#--(Begin)-->indent items to show them as a tree (hierarchical items)\n\t\t\tif (!empty($levelColumnName)) {\n\t\t\t\tif (empty($firstLevelNumber))\n\t\t\t\t\t$firstLevelNumber=$item[$levelColumnName];\n\t\t\t\t\t\n\t\t\t\t$depth=$item[$levelColumnName]-$firstLevelNumber;\n\t\t\t\tif (!isset($options['interface']['itemIndent'])) $options['interface']['itemIndent']=20;\n\t\t\t\t$itemIndent=intval($options['interface']['itemIndent']);\n\t\t\t\tif (!$options['interface']['isIe'])\t {\n\t\t\t\t\t$itemIndent=intval($options['interface']['itemIndent']);\n\t\t\t\t\tif ($options['interface']['direction']=='rightToLeft')\n\t\t\t\t\t\t$itemAttributes['style'].=';padding-right:'.($itemIndent*$depth).'px;';\n\t\t\t\t\telse\n\t\t\t\t\t\t$itemAttributes['style'].=';padding-left:'.($itemIndent*$depth).'px;';\n\t\t\t\t} else {\n\t\t\t\t\t$itemIndent=round($itemIndent/2)*$depth;\n\t\t\t\t\t$title=str_repeat('&nbsp;',$itemIndent).$title;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (isset($options['isParentsSelectable'])) {\n\t\t\t\t\t$item['isParentsSelectable'] = $options['isParentsSelectable'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ($item[$hasChildColumnName]) {\n\t\t\t\t\t$itemAttributes['style'].=';font-weight:bold';\n\t\t\t\t\tif ($options['isParentsSelectable']!=true)\n\t\t\t\t\t\t$itemAttributes['disabled']=true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t#--(End)-->indent items to show them as a tree (hierarchical items)\n\t\t\t$itemAttributes=cmfcHtml::attributesToHtml($itemAttributes);\n\t\t\t\n\t\t\t$html.=sprintf('<option value=\"%s\" %s %s>%s</option>'.\"\\n\",\n\t\t\t\t\t\t\t$value, $selected, $itemAttributes,$title);\n\t\t\t$firstRow=false;\n\t\t}\n\t\tif (isset($groupName)) $html.=\"</optgroup>\\n\";\n\t\t$html.=\"</select>\\n\";\n\t\treturn $html;\n\t}", "public function render(){\n\t\t$this->clearAttribute(\"value\");\n\t\t$inner = \"\\n\";\n\t\tforeach($this->options as $value => $option){\n\t\t\tif(in_array($value, $this->selected)){\n\t\t\t\t$option->addAttribute(\"selected\", \"selected\");\n\t\t\t}\n\t\t\t$inner .= \"\\t\" . $option->render() . \"\\n\";\n\t\t}\n\t\t$this->setInnerText($inner);\n\t\treturn parent::render();\n\t}", "function testOptionsObjects(){\n\t\n\t\t#mdx:OptionsObjects\n\t\t$choice = new SimpleChoice(\"category\");\n\t\n\t\t$option1 = new StdClass();\n\t\t$option1->id = 1;\n\t\t$option1->name = 'Action';\n\t\n\t\t$option2 = new StdClass();\n\t\t$option2->id = 2;\n\t\t$option2->name = 'Drama';\n\n\t\t$choice->options([$option1, $option2])\n\t\t\t->context(['category'=>2]); // selects category 2\n\t\t\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"1 - Action\",\"$choice\");\n\t\t$this->assertContains(\"<b>2 - Drama\",\"$choice\");\n\n\t}", "function optionsframework_options() {\n\n\t$options = array();\n\n\t$options[] = array( \"name\" => \"Variables\",\n\t\t\"type\" => \"heading\" );\n\n\t$options[\"icon\"] = array(\n\t\t\"name\" => \"Fontawesome Icon\",\n\t\t\"id\" => \"icon\",\n\t\t\"std\" => \"fa-cogs\",\n\t\t\"type\" => \"text\");\n\n\t$options[\"claim\"] = array(\n\t\t\"name\" => \"Claim\",\n\t\t\"id\" => \"claim\",\n\t\t\"std\" => \"Sorry, we are down for scheduled maintenance. Come back soon!\",\n\t\t\"type\" => \"text\");\n\n\treturn $options;\n}", "public function form_field_select ( $args ) {\n\t\t$options = $this->get_settings();\n\t\t\n\t\tif ( isset( $args['data']['options'] ) && ( count( (array)$args['data']['options'] ) > 0 ) ) {\n\t\t\t$html = '';\n\t\t\t$html .= '<select id=\"' . esc_attr( $args['key'] ) . '\" name=\"' . esc_attr( $this->token ) . '[' . esc_attr( $args['key'] ) . ']\">' . \"\\n\";\n\t\t\t\tforeach ( $args['data']['options'] as $k => $v ) {\n\t\t\t\t\t$html .= '<option value=\"' . esc_attr( $k ) . '\"' . selected( esc_attr( $options[$args['key']] ), $k, false ) . '>' . $v . '</option>' . \"\\n\";\n\t\t\t\t}\n\t\t\t$html .= '</select>' . \"\\n\";\n\t\t\techo $html;\n\t\t\t\n\t\t\tif ( isset( $args['data']['description'] ) ) {\n\t\t\t\techo '<p><span class=\"description\">' . $args['data']['description'] . '</span></p>' . \"\\n\";\n\t\t\t}\n\t\t}\n\t}", "public function render() {\n $this->checkValue();\n $html = NULL;\n\n $html .= '<select id=\"'.$this->id.'\" name=\"'.$this->name.'\"';\n $html .= (bool)$this->multiple ? ' multiple' : NULL;\n $html .= (bool)$this->size ? ' size=\"'.$this->size.'\"' : NULL;\n $html .= \">\\n\";\n\n foreach($this->options as $option) {\n $html .= '<option value=\"'.$option['optionValue'].'\"';\n\n if($this->form->isSubmitted()) {\n $html .= ($_REQUEST[$this->name] == $option['optionValue']) ? ' selected' : NULL;\n } else {\n $html .= (isset($option['selected']) && (bool)$option['selected']) ? ' selected' : NULL;\n }\n\n $html .= '>'.$option['optionTitle'].\"</option>\\n\";\n }\n\n if($this->required\n && $this->form->isSubmitted()\n && !$this->checkValue()) {\n $this->error = TRUE;\n }\n\n $html .= '</select>';\n $this->html = $this->wrap($html);\n }", "function HTMLSelect ($params, $options) {\n if (!isset($params['name'])) {\n $params['name'] = $params['id'];\n }\n $str = '';\n foreach ($params as $k=>$v) {\n $str .= \" {$k}=\\\"{$v}\\\"\";\n }\n $prm = '';\n if (isset($options['params'])) {\n foreach ($options['params'] as $k=>$v) {\n $prm .= \" {$k}=\\\"{$v}\\\"\";\n }\n }\n $opn = '';\n foreach ($options['list'] as $k=>$v) {\n $selected = '';\n if (isset($options['default'])&&!is_null($options['default'])&&$options['default']!='') {\n if ($k == $options['default']) {\n $selected = \"selected=\\\"selected\\\"\";\n }\n }\n $opn.= \"<option value='{$k}' {$prm} {$selected}>{$v}</option>\";\n }\n return \"<select {$str} >{$opn}</select>\";\n }", "function testOptionsArray(){\n\t\t#mdx:OptionsArray\n\t\t$choice = new SimpleChoice(\"language\",\"Type in the desired language code:\");\n\t\t$choice->options(['en','es','pt','fr']);\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"- en\", \"$choice\");\n\t\t$this->assertNotContains(\"0 - en\", \"$choice\");\n\n\t}", "function testSelectedOption(){\n\t\t#mdx:SelectedOption\n\t\t$select = new HtCklist(\"select_days\");\n\t\t$select->options([1=>'Mon',2=>'Tue',3=>'Wed',4=>'Thu',5=>'Fri',6=>'Sat']);\n\t\t$select->context(['select_days'=>[2,5]]); // check Tue and Fri\n\t\t#/mdx echo $select\n\t\t$this->expectOutputRegex(\"/input.*?2.*checked.*?input.*?5.*?checked/s\");\n\t\techo $select;\n\t}", "function dropdown(array $attrib, array $options, $selected = null) {\n /* * * begin the select ** */\n\n $attrib_string = parseAttrib($attrib);\n\n $dropdown = \"<select {$attrib_string} >\" . \"\\n\";\n\n $selected = $selected;\n /* * * loop over the options ** */\n foreach ($options as $key => $option) {\n /* * * assign a selected value ** */\n $select = strtolower($selected) == strtolower($key) ? ' selected' : null;\n\n\n /* * * add each option to the dropdown ** */\n $dropdown .= '<option value=\"' . $key . '\"' . $select . '>' . $option . '</option>' . \"\\n\";\n }\n\n /* * * close the select ** */\n $dropdown .= '</select>' . \"\\n\";\n\n /* * * and return the completed dropdown ** */\n return $dropdown;\n}", "function select_option()\r\n{}", "function options_html($key, $field)\n\t{\n\t\t// vars\n\t\t$options = $field->options;\n\t\t$options['save_format'] = isset($options['save_format']) ? $options['save_format'] : 'url';\n\t\t\n\t\t?>\n\t\t<tr class=\"field_option field_option_file\">\n\t\t\t<td class=\"label\">\n\t\t\t\t<label><?php _e(\"Return Value\",'acf'); ?></label>\n\t\t\t</td>\n\t\t\t<td>\n\t\t\t\t<?php \n\t\t\t\t\t$temp_field = new stdClass();\t\n\t\t\t\t\t$temp_field->type = 'select';\n\t\t\t\t\t$temp_field->input_name = 'acf[fields]['.$key.'][options][save_format]';\n\t\t\t\t\t$temp_field->input_class = '';\n\t\t\t\t\t$temp_field->value = $options['save_format'];\n\t\t\t\t\t$temp_field->options = array('choices' => array(\n\t\t\t\t\t\t'url'\t=>\t'File URL',\n\t\t\t\t\t\t'id'\t=>\t'Attachment ID'\n\t\t\t\t\t));\n\t\t\t\t\t$this->parent->create_field($temp_field);\n\t\t\t\t?>\n\t\t\t</td>\n\t\t</tr>\n\n\t\t<?php\n\t}", "function testOptionsRows(){\n\t\t#mdx:OptionsRows\n\t\t$choice = new SimpleChoice(\"category\");\n\t\t$choice->options([\n\t\t\t['id'=>1,'name'=>'Action'],\n\t\t\t['id'=>2,'name'=>'Drama'],\n\t\t\t['id'=>3,'name'=>'Sci-fi']\n\t\t])->context(['category'=>2]); // selects category 2\n\t\t\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"1 - Action\",\"$choice\");\n\t\t$this->assertContains(\"<b>2 - Drama\",\"$choice\");\n\n\t}", "function select($args) {\r\n\t\t\t$args = $this->apply_name_fix($this->apply_default_args($args)) ;\r\n\t\t\tif ($args['multiple']) {\r\n\t\t\t\techo \"<select class='optselect chzn-select' multiple='true' style='\" .$this->width($args['width']) . \"' name='\" . $args['formname'] . \"\" . \"[]'>\";\r\n\t\t\t\tforeach ($args['selections'] as $key => $value) {\r\n\t\t\t\t\techo \"<option \" . (array_search($value , $args['value']) === false ? '' : 'selected' ). \" value='\" . $key . \"'>\" . $value . \"</option>\";\t\r\n\t\t\t\t}\t\r\n\t\t\t\techo \"</select>\";\r\n\t\t\t} else {\r\n\t\t\t\techo \"<select class='optselect chzn-select' style='\" .$this->width($args['width']) . \"' name='\" . $args['formname'] . \"'>\";\r\n\t\t\t\tforeach ($args['selections'] as $key => $value) {\r\n\t\t\t\t\techo \"<option \" . ($args['value'] == $key ? 'selected' : '' ). \" value='\" . $key . \"'>\" . $value . \"</option>\";\t\r\n\t\t\t\t}\t\r\n\t\t\t\techo \"</select>\";\r\n\t\t\t}\r\n\t\t\t$this->description($args['description']);\r\n\t\t}", "function osa_field_widget_options_select_form_alter(&$element, &$form_state, $context) {\r\n\r\n // This code, while it works to populate the selection boxes when built, fails on validation\r\n // So we have hard coded the values into the form for now.\r\n /* populate the drop down with the class types\r\n if ($element['#field_name'] == 'field_class_type') {\r\n $element['#options'] = array('_none' => '- Select a value -') + osa_options_class_types();\r\n }\r\n */\r\n \r\n // populate the drop down with the list of events\r\n // only include events of type 'Group Class (Master)'\r\n if ($element['#field_name'] == 'field_event_master') {\r\n civicrm_initialize();\r\n $results = civicrm_api('event', 'get', array('event_type_id' => OSA_EVENT_GROUP_CLASS_MASTER, 'is_active' => TRUE, 'rowCount' => PHP_INT_MAX, 'version' => 3));\r\n $options = array();\r\n foreach ($results['values'] as $class) {\r\n $options[$class['id']] = $class['event_title'];\r\n }\r\n asort($options);\r\n $element['#options'] = array('_none' => '- Select a value -') + $options;\r\n }\r\n}", "function _select ($name, $id, $attribs, $options, $value)\n\t{\n\t\t$xhtml = '<div class=\"select\"><select'\n\t\t. ' name=\"' . $this->view->escape($name) . '\"'\n\t\t. ' id=\"' . $this->view->escape($id) . '\"'\n\t\t. $this->_htmlAttribs($attribs)\n\t\t. \">\";\n\n\t\t// build the list of options\n\t\t$list = array();\n\t\t$translator = $this->getTranslator();\n\t\tforeach ((array) $options as $opt_value => $opt_label) {\n\t\t\tif (is_array($opt_label)) {\n if (null !== $translator) {\n $opt_value = $translator->translate($opt_value);\n }\n \n $list[] = '<optgroup'\n . ' label=\"' . $this->view->escape($opt_value) .'\">';\n foreach ($opt_label as $val => $lab) {\n $list[] = $this->_build($val, $lab, $value, false);\n }\n $list[] = '</optgroup>';\n } else {\n\t\t\t\t$list[] = $this->_build($opt_value, $opt_label, $value, false);\n }\n\t\t}\n\n\t\t// add the options to the xhtml and close the select\n\t\t$xhtml .= implode(\"\", $list) . \"</select> <a href=\\\"#\\\" class=\\\"remove\\\">-</a></div>\";\n\n\t\treturn $xhtml;\n\t}", "function print_select_field($id, $options = array()) {\n\t$id_esc = htmlentities($id);\n\t$classes_html = build_class_attribute($options['required'], $options['class']);\n\t\n\t$options_array = array();\n\tforeach ($options['options'] as $option_value => $option_label) {\n\t\t$options_array[] = convertOptiontoHTML($option_value, $option_label, $options['value'] == $option_value);\n\t}\n\t$options_html = join(\"\\n\", $options_array);\n\t\n\t$element_html = <<<EOD\n<select name=\"$id_esc\" id=\"$id_esc\" $classes_html>\n\t$options_html\n</select>\nEOD;\n\n\tprint_field($id, $element_html, $options);\n}" ]
[ "0.6602616", "0.65285176", "0.65074456", "0.64679456", "0.6366054", "0.62528723", "0.6250871", "0.6240499", "0.62020624", "0.6188851", "0.6174806", "0.61741877", "0.614924", "0.6126591", "0.61098266", "0.6106556", "0.6067673", "0.6064495", "0.60634756", "0.6050614", "0.60501325", "0.60438824", "0.60273415", "0.6015714", "0.60044575", "0.60027367", "0.5998087", "0.59877175", "0.5973422", "0.596134" ]
0.6652916
0
/ Selecting an option If you have read the documentation of the `HtField` and the `HtWidget` parent classes you already know that you are supposed to use the `context` method in order to set the value of a field/widget: mdx:SelectedOption Outputs: mdx:SelectedOption o httidy
function testSelectedOption(){ #mdx:SelectedOption $select = new HtSelect('id_category'); $select->options([1=>'Category1',2=>'Category2',3=>'Category3']); $select->context(['id_category'=>2]); #/mdx echo $select $this->expectOutputRegex("/option.*?2.*selected/"); echo $select; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function testSelectedOption(){\n\t\t#mdx:SelectedOption\n\t\t$select = new HtCklist(\"select_days\");\n\t\t$select->options([1=>'Mon',2=>'Tue',3=>'Wed',4=>'Thu',5=>'Fri',6=>'Sat']);\n\t\t$select->context(['select_days'=>[2,5]]); // check Tue and Fri\n\t\t#/mdx echo $select\n\t\t$this->expectOutputRegex(\"/input.*?2.*checked.*?input.*?5.*?checked/s\");\n\t\techo $select;\n\t}", "function select_option()\r\n{}", "protected function getSelectedValue() {}", "function hundope_select_field_render() { \n\t\n}", "function testSelected(){\n\t\t#mdx:Selected\n\t\t$choice = new SimpleChoice('season');\n\t\t$choice->options([\n\t\t\t1 => 'Spring',\n\t\t\t2 => 'Summer',\n\t\t\t3 => 'Fall',\n\t\t\t4 => 'Winter'\n\t\t]);\n\t\t$choice->context(['season'=>3]); // selects season 3 (Fall)\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"<b>3 - Fall\",\"$choice\");\n\t}", "public function select_option($id, $value)\n\t{\n\t\t$this->connection()->post(\"element/$id/selected\", array('value' => $value));\n\t}", "public function set_value($value) {\n\n // Is the select multiple?\n $multiple = $this->field->hasAttribute('multiple');\n $singleselect = ($this->field->hasClass('singleselect') || $this->field->hasClass('urlselect'));\n\n // Here we select the option(s).\n if ($multiple) {\n // Split and decode values. Comma separated list of values allowed. With valuable commas escaped with backslash.\n $options = preg_replace('/\\\\\\,/', ',', preg_split('/(?<!\\\\\\),/', trim($value)));\n // This is a multiple select, let's pass the multiple flag after first option.\n $afterfirstoption = false;\n foreach ($options as $option) {\n $this->field->selectOption(trim($option), $afterfirstoption);\n $afterfirstoption = true;\n }\n } else {\n // By default, assume the passed value is a non-multiple option.\n $this->field->selectOption(trim($value));\n }\n\n // Wait for all the possible AJAX requests that have been\n // already triggered by selectOption() to be finished.\n if ($this->running_javascript()) {\n // Trigger change event and click on first skip link, as some OS/browsers (Phantomjs, Mac-FF),\n // don't close select option field and trigger event.\n if (!$singleselect) {\n $dialoguexpath = \"//div[contains(concat(' ', normalize-space(@class), ' '), ' moodle-dialogue-focused ')]\";\n if (!$node = $this->session->getDriver()->find($dialoguexpath)) {\n $script = \"Syn.trigger('change', {}, {{ELEMENT}})\";\n try {\n $driver = $this->session->getDriver();\n if ($driver instanceof \\Moodle\\BehatExtension\\Driver\\MoodleSelenium2Driver) {\n $driver->triggerSynScript($this->field->getXpath(), $script);\n }\n $driver->click('//body//div[@class=\"skiplinks\"]');\n } catch (\\Exception $e) {\n return;\n }\n } else {\n try {\n $this->session->getDriver()->click($dialoguexpath);\n } catch (\\Exception $e) {\n return;\n }\n }\n }\n $this->session->wait(behat_base::get_timeout() * 1000, behat_base::PAGE_READY_JS);\n }\n }", "public function form_field_select ( $args ) {\n\t\t$options = $this->get_settings();\n\t\t\n\t\tif ( isset( $args['data']['options'] ) && ( count( (array)$args['data']['options'] ) > 0 ) ) {\n\t\t\t$html = '';\n\t\t\t$html .= '<select id=\"' . esc_attr( $args['key'] ) . '\" name=\"' . esc_attr( $this->token ) . '[' . esc_attr( $args['key'] ) . ']\">' . \"\\n\";\n\t\t\t\tforeach ( $args['data']['options'] as $k => $v ) {\n\t\t\t\t\t$html .= '<option value=\"' . esc_attr( $k ) . '\"' . selected( esc_attr( $options[$args['key']] ), $k, false ) . '>' . $v . '</option>' . \"\\n\";\n\t\t\t\t}\n\t\t\t$html .= '</select>' . \"\\n\";\n\t\t\techo $html;\n\t\t\t\n\t\t\tif ( isset( $args['data']['description'] ) ) {\n\t\t\t\techo '<p><span class=\"description\">' . $args['data']['description'] . '</span></p>' . \"\\n\";\n\t\t\t}\n\t\t}\n\t}", "function form_select($field, $options) {\n $defaults = array(\n 'wrap' => true,\n 'label' => true,\n 'class' => array('input', 'select'),\n 'options' => array()\n );\n\n $options = array_merge($defaults, $options);\n\n $output = '<select name=\"' . $field . '\" id=\"' . form__field_id($field) . '\">';\n foreach($options['options'] as $value => $text) {\n $output .= '<option value=\"' . $value . '\"';\n if(!empty($_POST[$field]) && $_POST[$field] == $value) {\n $output .= ' selected=\"selected\"';\n }\n $output .= '>' . $text . '</option>';\n }\n $output .= '</select>';\n\n if($options['wrap']) {\n $options['field'] = $field;\n $output = form__wrap($output, $options);\n }\n\n $error = form_error_message($field);\n if(!empty($error)) {\n $output .= $error;\n }\n \n return html__output($output);\n}", "public function select_values_for_form( EntryValueSelect $entry_value_select );", "function render_field_select($field)\n {\n }", "public function callback_select( $args ) {\n\n $name_id = $args['name_id'];\n if ($args['parent']) {\n $value = $this->get_option( $args['parent']['id'], $args['section'], $args['std'], $args['global'] );\n $value = isset($value[$args['id']]) ? $value[$args['id']] : $args['std'];\n $args['disable'] = (isset( $args['parent']['disable'])) ? $args['parent']['disable'] : false;\n }else {\n $value = $this->get_option( $args['id'], $args['section'], $args['std'], $args['global'] );\n }\n\n $disable = (isset( $args['disable'] ) && $args['disable'] === true) ? 'disabled' : '';\n $size = isset( $args['size'] ) && !is_null( $args['size'] ) ? $args['size'] : 'regular';\n $html = sprintf( '<select class=\"%1$s\" name=\"%2$s\" id=\"%2$s\" %3$s>', $size, $name_id, $disable );\n\n foreach ( $args['options'] as $key => $label ) {\n $html .= sprintf( '<option value=\"%s\" %s>%s</option>', $key, selected( $value, $key, false ), $label );\n }\n\n $html .= sprintf( '</select>' );\n $html .= $this->get_field_description( $args );\n\n echo $html;\n }", "function barnelli_wp_select( $field ) {\n\tglobal $thepostid, $post, $vision;\n\n\t$thepostid \t\t\t\t= empty( $thepostid ) ? $post->ID : $thepostid;\n\t$field['class'] \t\t= isset( $field['class'] ) ? $field['class'] : 'select short';\n\t$field['wrapper_class'] = isset( $field['wrapper_class'] ) ? $field['wrapper_class'] : '';\n\t$field['value'] \t\t= isset( $field['value'] ) ? $field['value'] : get_post_meta( $thepostid, $field['id'], true );\n\n\techo '<p class=\"form-field ' . esc_attr( $field['id'] ) . '_field ' . esc_attr( $field['wrapper_class'] ) . '\"><label for=\"' . esc_attr( $field['id'] ) . '\">' . wp_kses_post( $field['label'] ) . '</label><select id=\"' . esc_attr( $field['id'] ) . '\" name=\"' . esc_attr( $field['id'] ) . '\" class=\"' . esc_attr( $field['class'] ) . '\">';\n\n\tforeach ( $field['options'] as $key => $value ) {\n\n\t\techo '<option value=\"' . esc_attr( $key ) . '\" ' . selected( esc_attr( $field['value'] ), esc_attr( $key ), false ) . '>' . esc_html( $value ) . '</option>';\n\n\t}\n\n\techo '</select> ';\n\n\tif ( ! empty( $field['description'] ) ) {\n\n\t\tif ( isset( $field['desc_tip'] ) ) {\n\t\t\techo '<img class=\"help_tip\" data-tip=\"' . esc_attr( $field['description'] ) . '\" src=\"' . $vision->plugin_url() . '/assets/images/help.png\" height=\"16\" width=\"16\" />';\n\t\t} else {\n\t\t\techo '<span class=\"description\">' . wp_kses_post( $field['description'] ) . '</span>';\n\t\t}\n\n\t}\n\techo '</p>';\n}", "public function setup_selected() {\n\t}", "function yaz_set_option($id, $name, $value)\n{\n}", "public function Do_select_Example1(){\n\n\t}", "public function select ( \\r8\\Form\\Select $field )\n {\n $this->addField( \"select\", $field );\n }", "public function smtp_secure_select( $args ) {\n $field_id = $args['label_for'];\n $options = $args['options'];\n $value = get_option( $field_id, $args['default'] );\n \n printf( \"<select name='%s' id='%s'>\", $field_id, $field_id );\n\n foreach ( $options as $option ) {\n $selected = '';\n\n if ( $value == $option ) {\n $selected = 'selected';\n }\n\n printf( \"<option value=%s %s>%s</option>\", $option, $selected, $option );\n }\n \n printf( \"</select>\" );\n }", "function selected($field, $value = null) {\n if ( is_string($field) ) {\n if ( $this->setting($field) == $value ) {\n echo 'selected=\"selected\"';\n }\n } else if ( (bool) $field ) {\n echo 'selected=\"selected\"';\n }\n }", "function select( \n\t $name, $title = null, $value = null, \n\t $required = false, \n\t $attributes = null,\n\t $options = array(),\n\t $datatype = Form::DATA_STRING\n\t){\n return $this->input(\n\t $name, \n\t Form::TYPE_SELECT,\n\t $title, \n\t $value, \n\t $required, \n\t $attributes,\n\t $options,\n\t $datatype\n );\n\t}", "public function set( $option, $value );", "function testOptionsFunction(){\n\t\t#mdx:OptionsFunction\n\t\t$choice = new SimpleChoice(\"category\");\n\t\t$choice->options(function(){\n\t\t\t// pretend this was fetched from the db\n\t\t\t$rows = [\n\t\t\t\t['id'=>1,'name'=>'Action'],\n\t\t\t\t['id'=>2,'name'=>'Drama'],\n\t\t\t\t['id'=>3,'name'=>'Sci-fi']\n\t\t\t];\n\n\t\t\treturn $rows;\n\n\t\t})->context(['category'=>3]); // selects category 3\n\t\t#/mdx echo $choice\n\t\t$this->assertContains(\"<b>3 - Sci-fi\",\"$choice\");\n\n\t}", "function osa_field_widget_options_select_form_alter(&$element, &$form_state, $context) {\r\n\r\n // This code, while it works to populate the selection boxes when built, fails on validation\r\n // So we have hard coded the values into the form for now.\r\n /* populate the drop down with the class types\r\n if ($element['#field_name'] == 'field_class_type') {\r\n $element['#options'] = array('_none' => '- Select a value -') + osa_options_class_types();\r\n }\r\n */\r\n \r\n // populate the drop down with the list of events\r\n // only include events of type 'Group Class (Master)'\r\n if ($element['#field_name'] == 'field_event_master') {\r\n civicrm_initialize();\r\n $results = civicrm_api('event', 'get', array('event_type_id' => OSA_EVENT_GROUP_CLASS_MASTER, 'is_active' => TRUE, 'rowCount' => PHP_INT_MAX, 'version' => 3));\r\n $options = array();\r\n foreach ($results['values'] as $class) {\r\n $options[$class['id']] = $class['event_title'];\r\n }\r\n asort($options);\r\n $element['#options'] = array('_none' => '- Select a value -') + $options;\r\n }\r\n}", "function mc_option_selected( $field, $value, $type = 'checkbox' ) {\n\tswitch ( $type ) {\n\t\tcase 'radio':\n\t\tcase 'checkbox':\n\t\t\t$result = ' checked=\"checked\"';\n\t\t\tbreak;\n\t\tcase 'option':\n\t\t\t$result = ' selected=\"selected\"';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$result = '';\n\t\t\tbreak;\n\t}\n\tif ( $field == $value ) {\n\t\t$output = $result;\n\t} else {\n\t\t$output = '';\n\t}\n\n\treturn $output;\n}", "public static function renderSelect();", "function get_meta_select( $args = array(), $value = false ) { \r\r\n extract($args);\r\r\n ?>\r\r\n\t<tr>\r\r\n\t\t<th style=\"width:10%;\"><label for=\"<?php\t \t echo $args['name']; ?>\"><?php\t \t echo $args['title']; ?></label></th>\r\r\n\t\t<td>\r\r\n\t\t\t<select name=\"<?php\t \t echo $args['name']; ?>\" id=\"<?php\t \t echo $args['name']; ?>\">\r\r\n\t\t\t\t<option value=\"\"></option>\r\r\n\t\t\t\t<?php\t \t foreach ( $args['options'] as $option => $val ) : ?>\r\r\n\t\t\t\t\t<option <?php\t \t if ( htmlentities( $value, ENT_QUOTES ) == $val ) echo ' selected=\"selected\"'; ?> value=\"<?php\t \t echo $val; ?>\"><?php\t \t if ( __( 'Template:', 'hybrid') == $args['title'] ) echo $option; else echo $val; ?></option>\r\r\n\t\t\t\t<?php\t \t endforeach; ?>\r\r\n\t\t\t</select>\r\r\n\t\t\t<br /><small><?php\t \t echo $args['description']; ?></small>\r\r\n\t\t</td>\r\r\n\t</tr>\r\r\n\t<?php\t \t\r\r\n}", "public function setOption($option, $value);", "private function selectCustomField(): string\n {\n $value = $this->getValue($this->index);\n foreach($this->options as &$option) {\n if($option['key'] == $value) {\n $option['selected'] = true;\n break;\n }\n }\n\n return Template::build($this->getTemplatePath('select.html'), [\n 'id' => uniqid(\"{$this->id}-\", true),\n 'name' => $this->id,\n 'label' => $this->label,\n 'options' => $this->options,\n 'index' => isset($this->index) ? $this->index : false\n ]);\n }", "function add_to_context( $context ) {\n\t\t$context['options'] = get_fields('options');\n\t\treturn $context;\n\t}", "function meta_box_select( $args = array(), $value = false ) {\n\t\t\t$name = preg_replace( \"/[^A-Za-z_-]/\", '-', $args['name'] ); ?>\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $name; ?>\"><?php echo $args['title']; ?></label>\n\t\t\t\t<?php if ( !empty( $args['sep'] ) ) echo '<br />'; ?>\n\t\t\t\t<select name=\"<?php echo $name; ?>\" id=\"<?php echo $name; ?>\" style=\"width:60px\">\n\t\t\t\t\t<?php // echo '<option value=\"\"></option>'; ?>\n\t\t\t\t\t<?php $i = 0; foreach ( $args['options'] as $option => $val ) { $i++; ?>\n\t\t\t\t\t\t<option value=\"<?php echo esc_attr( $val ); ?>\" <?php selected( esc_attr( $value ), esc_attr( $val ) ); //if ( $i == 1 ) echo 'selected=\"selected\"'; ?>><?php echo ( !empty( $args['use_key_and_value'] ) ? $option : $val ); ?></option>\n\t\t\t\t\t<?php } ?>\n\t\t\t\t</select>\n\t\t\t\t<?php if ( !empty( $args['description'] ) ) echo '<br /><span class=\"howto\">' . $args['description'] . '</span>'; ?>\n\t\t\t</p>\n\t\t\t<?php\n\t\t}" ]
[ "0.67317617", "0.67007697", "0.61267126", "0.6101564", "0.6092063", "0.6082261", "0.59615076", "0.5959076", "0.59364", "0.5885151", "0.58820623", "0.58743864", "0.58718723", "0.5857547", "0.58489746", "0.5836531", "0.5825224", "0.58173037", "0.58064955", "0.57943064", "0.5789808", "0.57831657", "0.5774297", "0.5736056", "0.56976455", "0.56864786", "0.5682357", "0.5657142", "0.56420416", "0.56407815" ]
0.71186876
0
/ Setting a caption The "caption" is the default text which appears on the select field when no option has been selected yet. This is usally a message indicating that the user should choose something: mdx:Caption Outputs: mdx:Caption o httidy
function testCaption(){ #mdx:Caption $select = new HtSelect('id_category'); $select->options([1=>'Category1',2=>'Category2',3=>'Category3']); $select->caption('CHOOSE A CATEGORY:'); #/mdx echo $select $this->expectOutputRegex("/select.*?CHOOSE A CATEGORY.*?/s"); echo $select; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function testCaptionValue(){\n\t\t#mdx:CaptionValue\n\t\t$select = new HtSelect('id_category');\n\t\t$select->options([1=>'Category1',2=>'Category2',3=>'Category3']);\n\t\t$select->caption('CHOOSE A CATEGORY:', 'none'); # change value to 'none'\n\t\t#/mdx echo $select\n\t\t$this->expectOutputRegex(\"/select.*?option.*?none.*?CHOOSE A CATEGORY.*?/s\");\n\t\techo $select;\n\t}", "public function setCaption($caption) {\n\t\t$this->caption = $caption;\n\t}", "function set_caption($caption)\n\t{\n\t\t$this->caption = $caption;\n\t}", "public function setCaption(?string $caption): void\n\t{\n\t\t$this->caption = $caption;\n\t}", "function getModifyCaption() \r\n \t{\r\n \t\treturn '';\r\n \t}", "public function getCaption() {}", "public function renderCaption() {\n if (!empty($this->caption)) {\n return self::html()->tag('<caption{:options}>{:content}</caption>', array('content' => $this->caption, 'options' => $this->captionOptions), $this->captionOptions);\n } else {\n return false;\n }\n }", "function setCaption($cap) {\n\t\t$this->lobSub->lobCaption = $cap;\n\t}", "public function caption($caption)\n {\n return $this->setProperty('caption', $caption);\n }", "private function _set_photo_caption($value){\n if(!empty($value)){\n $this->_photo_caption = $value;\n }else{\n throw new Exception(\"photo_caption must be a nonempty string\");\n }\n }", "function getCaption() {return $this->readCaption();}", "function XoopsFormTextDateSelect($caption, $name, $size = 15, $value= 0)\n\t{\n\t\t$this->XoopsFormText($caption, $name, $size, 25, $value);\n\t}", "public function getCaption(): string\n {\n return $this->attrs['caption'] ?? '';\n }", "public function getCaption()\n {\n return $this->caption;\n }", "function set_caption($alt, $title, $iptc_caption, $filename)\n {\n $values = array($this->_params->get('caption_type_iptc') => $iptc_caption,\n $this->_params->get('caption_type_filename') => $filename,\n $this->_params->get('caption_type_title') => $title,\n $this->_params->get('caption_type_alt') => $alt);\n\n ksort($values);\n $caption = '';\n foreach ($values as $key => $val) {\n if ($key and $val) {\n $caption = $val;\n break;\n }\n }\n\n\n return $caption;\n }", "function getAddCaption() \r\n \t{\r\n \t\treturn '';\r\n \t}", "public function getCaption() {\n\t\treturn $this->caption;\n\t}", "public function get_caption($key = 0)\n {\n }", "function OptionBox($label, $value, $defaultvalue, $text)\n{\n $result = '';\n\tfor ($i=0; $i<count($label); $i++)\n\t{\n\t\t$result .= '<option label=\"'.$label[$i];\n\t\t$result .= '\" value=\"'.$value[$i].'\" ';\n\t\tif (isset($defaultvalue))\n\t\t{\n\t \tif ($value[$i]==$defaultvalue)\n\t \t\t{\n\t \t\t\t$result .= 'selected=\"selected\" ';\n\t \t\t}\n\t\t}\n\t \t$result .= '>'.$text[$i].'</option>';\n\t}\n\treturn $result;\n}", "public function addCaption($text)\n {\n $this->captionCount++;\n $this->captionStarted = $this->timer->elapsedAsSubripTime();\n $this->captionText = $text;\n }", "public function getCaption()\n {\n return $this->_caption;\n }", "public function renderCaption()\n {\n if (!empty($this->caption)) {\n return Html::tag('caption', $this->caption, $this->captionOptions);\n }\n\n return false;\n }", "public function get_caption() {\n\t\treturn __( 'Automatic Translation', 'wpml-translation-management' );\n\t}", "function meta_box_select( $args = array(), $value = false ) {\n\t\t\t$name = preg_replace( \"/[^A-Za-z_-]/\", '-', $args['name'] ); ?>\n\t\t\t<p>\n\t\t\t\t<label for=\"<?php echo $name; ?>\"><?php echo $args['title']; ?></label>\n\t\t\t\t<?php if ( !empty( $args['sep'] ) ) echo '<br />'; ?>\n\t\t\t\t<select name=\"<?php echo $name; ?>\" id=\"<?php echo $name; ?>\" style=\"width:60px\">\n\t\t\t\t\t<?php // echo '<option value=\"\"></option>'; ?>\n\t\t\t\t\t<?php $i = 0; foreach ( $args['options'] as $option => $val ) { $i++; ?>\n\t\t\t\t\t\t<option value=\"<?php echo esc_attr( $val ); ?>\" <?php selected( esc_attr( $value ), esc_attr( $val ) ); //if ( $i == 1 ) echo 'selected=\"selected\"'; ?>><?php echo ( !empty( $args['use_key_and_value'] ) ? $option : $val ); ?></option>\n\t\t\t\t\t<?php } ?>\n\t\t\t\t</select>\n\t\t\t\t<?php if ( !empty( $args['description'] ) ) echo '<br /><span class=\"howto\">' . $args['description'] . '</span>'; ?>\n\t\t\t</p>\n\t\t\t<?php\n\t\t}", "function captionError($captionBox)\n{\n\t// Check if anything has been entered into the caption box\n\tif(!isset($_REQUEST[$captionBox]))\n\t\techo \"<p style=\\\"color:red;\\\">Please enter a caption.</p>\\n\";\n\telse\n\t{\n\t\t// Trim any whitespace\n\t\t$caption = trim($_REQUEST[$captionBox]);\n\t\t\n\t\t// Check if the entered caption is empty or more than 20 characters\n\t\tif( (strlen($caption) == 0) || (strlen($caption) > 20) )\n\t\t\techo \"<p style=\\\"color:red;\\\">Please enter a caption that is less than 20 characters long.</p>\\n\";\n\t}\n}", "public function getCaption()\n\t{\n\t\tif ($this->caption instanceof Html && $this->caption->title) {\n\t\t\treturn $this->caption->title($this->getDataGrid()\n\t\t\t\t->translate($this->caption->title));\n\t\t} else {\n\t\t\treturn $this->getDataGrid()\n\t\t\t\t->translate($this->caption);\n\t\t}\n\t}", "function image_add_caption($html, $id, $caption, $title, $align, $url, $size, $alt = '')\n {\n }", "function TableCaption() {\n\t\tglobal $ReportLanguage;\n\t\treturn $ReportLanguage->TablePhrase($this->TableVar, \"TblCaption\");\n\t}", "function TableCaption() {\n\t\tglobal $ReportLanguage;\n\t\treturn $ReportLanguage->TablePhrase($this->TableVar, \"TblCaption\");\n\t}", "public function render_content()\n {\n ?>\n <label>\n\t\t\t<select <?php $this->link(); ?>>\n\t\t\t\t<?php\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', 'none', selected($this->value(), 'none', false), 'none');\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', 'capitalize', selected($this->value(), 'capitalize', false), 'capitalize');\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', 'uppercase', selected($this->value(), 'uppercase', false), 'uppercase');\n\t\t\t\tprintf('<option value=\"%s\" %s>%s</option>', 'lowercase', selected($this->value(), 'lowercase', false), 'lowercase');\n\t\t\t\t?>\n </select>\n\t\t\t<p class=\"description\"><?php echo esc_html( $this->label ); ?></p>\n </label>\n <?php\n }" ]
[ "0.72729474", "0.69511145", "0.6939236", "0.6899094", "0.6625466", "0.651141", "0.64263403", "0.64084697", "0.62733597", "0.6265194", "0.6231165", "0.6140197", "0.6131023", "0.6128065", "0.6066711", "0.6044273", "0.60297805", "0.60256106", "0.6001828", "0.5976827", "0.59663606", "0.59535694", "0.59445995", "0.59387314", "0.5902391", "0.5876506", "0.58437693", "0.57934904", "0.57934904", "0.5736946" ]
0.7215593
1
/ Notice that by default the value "0" is used for the caption option. This means that when the form gets sent, if no option has been selected, then the "0" value will be sent as the category id, which in most cases would mean "no category". However, you can change that value if you want by using a second paramenter to the `caption` method: mdx:CaptionValue Outputs: mdx:CaptionValue o httidy
function testCaptionValue(){ #mdx:CaptionValue $select = new HtSelect('id_category'); $select->options([1=>'Category1',2=>'Category2',3=>'Category3']); $select->caption('CHOOSE A CATEGORY:', 'none'); # change value to 'none' #/mdx echo $select $this->expectOutputRegex("/select.*?option.*?none.*?CHOOSE A CATEGORY.*?/s"); echo $select; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function testCaption(){\n\t\t#mdx:Caption\n\t\t$select = new HtSelect('id_category');\n\t\t$select->options([1=>'Category1',2=>'Category2',3=>'Category3']);\n\t\t$select->caption('CHOOSE A CATEGORY:');\n\t\t#/mdx echo $select\n\t\t$this->expectOutputRegex(\"/select.*?CHOOSE A CATEGORY.*?/s\");\n\t\techo $select;\n\t}", "public function defaultName() { return \"Enter the category name...\"; }", "private function setCategoryDefaultValues()\n {\n if($this->formMode === 'add')\n {\n $this->data['category_title'] = '';\n }\n else if(empty($_POST['category_submit']))\n {\n // Retrieve data from database if NOT POST request\n $data = $this->post_categories_model->getByID($this->data['category_id']);\n $this->data['category_title'] = $data['Post_Category_Title'];\n }\n }", "function gtags_group_category_form() {\n\tglobal $bp, $show_group_add_form_cats;\t\n\tif ($show_group_add_form_cats) return; // prevents showing form twice\n\t$show_group_add_form_cats = true;\n\n\t// the group category\t\n\t$group_cats = get_option('gtags_category'); \n\tif (empty($group_cats)) return;\n\t\n\t$selected = groups_get_groupmeta( $bp->groups->current_group->id, 'gtags_group_cat' ); \n\t?><label for=\"group-cat\"><?php _e( 'Group Category', 'gtags' ) ?></label>\n\t<select name=\"group-cat\" id=\"group-cat\" />\n\t\t<option value=\"\"><?php _e('--- SELECT ONE ---', 'gtags') ?></option>\n\t<?php foreach ( $group_cats as $tag => $desc ): ?>\n\t\t<?php if ( !$desc ) $desc = $tag; ?>\n\t\t<option value=\"<?php echo $tag; ?>\" <?php if ( $tag == $selected ) echo 'selected=\"selected\"' ?>><?php echo $desc; ?></option>\n\t<?php endforeach; ?>\n\t</select>\n\t<i><?php _e('(the primary group activity)', 'gtags'); ?></i><br><?php \t\n}", "public function categoryForm(){\n $table = \"categories\";\n $cresults = $this->getAllrecords($table);\n foreach($cresults as $category){\n echo('<option value=\"'.$category[\"cat_id\"].'\">'.$category[\"cat_name\"].'</option>');\n }\n\n\n }", "function display_addcategory_form($category_name='', $id='')\r\n{\r\n\tglobal $dropbox_cnf;\r\n\r\n\t$title=get_lang('AddNewCategory');\r\n\r\n\tif (isset($id) AND $id<>'')\r\n\t{\r\n\t\t// retrieve the category we are editing\r\n\t\t$sql=\"SELECT * FROM \".$dropbox_cnf['tbl_category'].\" WHERE cat_id='\".Database::escape_string($id).\"'\";\r\n\t\t$result=api_sql_query($sql);\r\n\t\t$row=mysql_fetch_array($result);\r\n\r\n\t\tif ($category_name=='') // after an edit with an error we do not want to return to the original name but the name we already modified. (happens when createinrecievedfiles AND createinsentfiles are not checked)\r\n\t\t{\r\n\t\t\t$category_name=$row['cat_name'];\r\n\t\t}\r\n\t\tif ($row['received']=='1')\r\n\t\t{\r\n\t\t\t$target='received';\r\n\t\t}\r\n\t\tif ($row['sent']=='1')\r\n\t\t{\r\n\t\t\t$target='sent';\r\n\t\t}\r\n\t\t$title=get_lang('EditCategory');\r\n\r\n\t}\r\n\r\n\tif ($_GET['action']=='addreceivedcategory')\r\n\t{\r\n\t\t$target='received';\r\n\t}\r\n\tif ($_GET['action']=='addsentcategory')\r\n\t{\r\n\t\t$target='sent';\r\n\t}\r\n\r\n\r\n\techo \"<form name=\\\"add_new_category\\\" method=\\\"post\\\" action=\\\"\".api_get_self().\"?view=\".$_GET['view'].\"\\\">\\n\";\r\n\techo '<strong>'.$title.'</strong>';\r\n\tif (isset($id) AND $id<>'')\r\n\t{\r\n\t\techo '<input name=\"edit_id\" type=\"hidden\" value=\"'.$id.'\">';\r\n\t}\r\n\techo '<input name=\"target\" type=\"hidden\" value=\"'.$target.'\">';\r\n\techo \"<table border=\\\"0\\\">\\n\";\r\n\techo \"\\t<tr>\\n\";\r\n\techo \"\\t<td>\\n\";\r\n\techo get_lang('CategoryName').': ';\r\n\techo \"\\t</td>\\n\";\r\n\techo \"\\t<td>\\n\";\r\n\techo \"<input type=\\\"text\\\" name=\\\"category_name\\\" value=\\\"\".$category_name.\"\\\" />\";\r\n\techo \"\\t</td>\\n\";\r\n\techo \"\\t</tr>\\n\";\r\n\techo \"\\t<tr>\\n\";\r\n\techo \"\\t<td valign=\\\"top\\\">\\n\";\r\n\techo \"\\t</td>\\n\";\r\n\techo \"\\t<td>\\n\";\r\n\techo \"<input type=\\\"submit\\\" name=\\\"StoreCategory\\\" value=\\\"\".get_lang('Ok').\"\\\">\";\r\n\techo \"\\t</td>\\n\";\r\n\techo \"\\t</tr>\\n\";\r\n\techo \"</table>\\n\";\r\n\techo \"</form>\";\r\n}", "public function prodCatCaption($catid){\t\t\n\t\t\t\t$cat \t\t\t\t= \t\"\";\n\t\t\t\t$arrayValues2 \t\t=\tarray('caption');\n\t\t\t\t$retArray2 \t\t\t=\tself::retrieveEntry(\"itemcategory\", $arrayValues2, \"\", \"id='$catid' AND status='published'\");\n\t\t\t\tforeach ($retArray2 as $retIndex => $retValue){\n\t\t\t\t\t$$retIndex \t\t=\t$retValue;\n\t\t\t\t\t$mainArr \t\t=\texplode('|', $$retIndex);\n\t\t\t\t\t$cat\t\t \t=\t$mainArr[0];\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\t\t\t\t\n\t\t\t\treturn $cat;\n\t}", "public function getName()\n {\n return 'category_form';\n }", "function getModifyCaption() \r\n \t{\r\n \t\treturn '';\r\n \t}", "public static function category_box() {\n\t\t\t\n\t\t\tglobal $post;\n\t\t\tglobal $wpdb;\n\t\n\t\t\t$cat_list = $wpdb->get_results( \"SELECT re_int, re_title FROM \".$wpdb->prefix.self::$table_name);?>\n\t\t\t\n\t\t\t<label for=\"siteurl\">Select the appropriate Menu Category for this current dish.<br /></label>\n\t\t\t<p>\n\t\t\t\n\t\t\t\t<?php\n\t\t\t\t\tif(!empty($cat_list)){\n\t\t\t\t\t\techo \"<select style='width:200px' name='cat_id'>\";\n\t\t\t\t\t\tforeach($cat_list as $list => $val){\n\t\t\t\t\t\t\t$sel = \"\";\n\t\t\t\t\t\t\tif(isset($_GET['menucat']) && ($_GET['menucat'] == $val->re_int )) { \n\t\t\t\t\t\t\t\t$sel = ' selected=\"selected\"'; \n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$menucat = get_post_meta($post->ID, \"meta_menucat\", true);\n\t\t\t\t\t\t\t\tif($menucat == $val->re_int ) { $sel = ' selected=\"selected\"';} \n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\techo \"<option value='\".$val->re_int.\"' \".$sel.\">\".$val->re_title.\"</option>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo \"</select>\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo \"<a href='edit.php?post_type=menucategory-post&page=menu_listings'>Add Categories First.</a>\";\n\t\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t\n\t\t\t</p>\n\t\t\n\t\t\t<?php\n\t\t}", "public function getCaption() {}", "public function getFormCategory()\n\t{\n\t\treturn strtolower($this->_removeNonAlphaCharacters($this->category));\n\t}", "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 sos_chapter_change_cat_object() {\n global $wp_taxonomies;\n $labels = &$wp_taxonomies['product_cat']->labels;\n $labels->name = 'Topic';\n $labels->singular_name = 'Topic';\n $labels->add_new = 'Add Topic';\n $labels->add_new_item = 'Add Topic';\n $labels->edit_item = 'Edit Topic';\n $labels->new_item = 'Topic';\n $labels->view_item = 'View Topic';\n $labels->search_items = 'Search Topics';\n $labels->not_found = 'No Topics found';\n $labels->not_found_in_trash = 'No Topics found in Trash';\n $labels->all_items = 'All Topics';\n $labels->menu_name = 'Topic';\n $labels->name_admin_bar = 'Topic';\n}", "public function category() {\n\t\treturn static::get_thrive_advanced_label();\n\t}", "public function actionUpdateImageCaption() \r\n {\r\n extract($_POST);\r\n $res=0;\r\n \r\n\r\n $fileMaster= FileMaster::model()->findByPk($id);\r\n $fileMaster->Title = $caption;\r\n if($fileMaster->save()) $res=1;\r\n else print_r( $fileMaster->getErrors() );\r\n print CJSON::encode($res);\r\n }", "public function get_caption($key = 0)\n {\n }", "private function categoriesFormInputs()\n {\n // Get the field name of the field with the category icon\n // #47631, dwildt, 1-\n //$arrLabels[ 'catIcon' ] = $this->confMap['configuration.']['categories.']['fields.']['categoryIcon'];\n // #47631, #i0007, dwildt, 10+\n switch ( true )\n {\n case( $this->pObj->typoscriptVersion <= 4005004 ):\n $arrLabels[ 'catIcon' ] = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'fields.' ][ 'categoryIcon' ];\n break;\n case( $this->pObj->typoscriptVersion <= 4005007 ):\n default:\n $arrLabels[ 'catIcon' ] = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'fields.' ][ 'marker.' ][ 'categoryIcon' ];\n break;\n }\n // #47631, #i0007, dwildt, 10+\n // Default space in HTML code\n $tab = ' ';\n\n // FOREACH category label\n//$this->pObj->dev_var_dump( $this->arrCategories );\n // #i0118, dwildt, 1-/+\n //foreach ( $this->arrCategories[ 'labels' ] as $labelKey => $labelValue )\n foreach ( ( array ) $this->arrCategories[ 'labels' ] as $labelKey => $labelValue )\n {\n // Get the draft for an input field\n $cObj_name = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'form_input' ];\n $cObj_conf = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'form_input.' ];\n $input = $this->pObj->cObj->cObjGetSingle( $cObj_name, $cObj_conf );\n // replace the category marker\n $input = str_replace( '###CAT###', $labelValue, $input );\n // 4.1.17, 120927, dwildt\n // replace the category marker\n //$labelValueWoSpc = str_replace( ' ', null, $labelValue );\n $labelValueWoSpc = $this->zz_properFormLabel( $labelValue );\n $input = str_replace( '###CAT_WO_SPC###', $labelValueWoSpc, $input );\n // 4.1.17, 120927, dwildt\n // #54548, 131221, dwildt, 6+\n $class = $this->arrCategories[ 'cssClass' ][ $labelKey ];\n if ( !empty( $class ) )\n {\n $class = ' class=\"' . $class . '\"';\n }\n $input = str_replace( '###CLASS###', $class, $input );\n\n // IF draft for an input field contains ###IMG###, render an image\n $pos = strpos( $input, '###IMG###' );\n if ( !( $pos === false ) )\n {\n // SWITCH : Render the image\n switch ( true )\n {\n // #i0062\n case( $labelKey == $this->arrWoCategories[ 'iconKey' ] ):\n $name = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'colours.' ][ 'legend.' ][ $labelKey ];\n $conf = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'colours.' ][ 'legend.' ][ $labelKey . '.' ];\n $img = $this->pObj->cObj->cObjGetSingle( $name, $conf );\n break;\n case( is_array( $this->arrCategories[ 'icons' ] ) ):\n // 4.1.7, dwildt, +\n $this->cObjDataAddArray( array( $arrLabels[ 'catIcon' ] => $this->arrCategories[ 'icons' ][ $labelKey ] ) );\n $img = $this->renderMapMarkerVariablesSystemItem( 'categoryIconLegend' );\n $this->cObjDataRemoveArray( array( $arrLabels[ 'catIcon' ] => $this->arrCategories[ 'icons' ][ $labelKey ] ) );\n // 4.1.7, dwildt, +\n break;\n default:\n // Render the image\n $name = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'colours.' ][ 'legend.' ][ $labelKey ];\n $conf = $this->confMap[ 'configuration.' ][ 'categories.' ][ 'colours.' ][ 'legend.' ][ $labelKey . '.' ];\n $img = $this->pObj->cObj->cObjGetSingle( $name, $conf );\n break;\n }\n // SWITCH : Render the image\n\n $input = str_replace( '###IMG###', $img, $input );\n }\n // IF draft for an input field contains ###IMG###, render an image\n\n $arrInputs[] = $tab . $input;\n }\n // FOREACH category label\n // Move array of input fields to a string\n // #i0118, dwildt, 1-/+\n //$inputs = implode( PHP_EOL, $arrInputs );\n $inputs = implode( PHP_EOL, ( array ) $arrInputs );\n $inputs = trim( $inputs );\n\n // RETURN input fields\n return $inputs;\n }", "function getName() { return 'TestPostAddCategory'; }", "function _arc_meta_category_meta($event, $step, $data, $rs)\n{\n // category types).\n if ($rs['type']!='article') {\n return $data;\n }\n\n // Get the existing meta data for this category.\n $meta = _arc_meta('category', $rs['name'], true);\n\n $form = hInput('arc_meta_id', $meta['id']);\n $form .= '<div class=\"txp-form-field edit-category-arc_meta_title\">';\n $form .= '<div class=\"txp-form-field-label\">' . tag(gtxt('arc_meta_title'), 'label', ' for=\"arc_meta_title\"') . '</div>';\n $form .= '<div class=\"txp-form-field-value\">' . fInput('text', 'arc_meta_title', $meta['title'], '', '', '', '32', '', 'arc_meta_title') . '</div>';\n $form .= '</div>';\n $form .= '<div class=\"txp-form-field edit-category-arc_meta_image\">';\n $form .= '<div class=\"txp-form-field-label\">' . tag(gtxt('arc_meta_image'), 'label', ' for=\"arc_meta_image\"') . '</div>';\n $form .= '<div class=\"txp-form-field-value\">' . fInput('number', 'arc_meta_image', $meta['image'], '', '', '', '32', '', 'arc_meta_image') . '</div>';\n $form .= '</div>';\n $form .= '<div class=\"txp-form-field edit-category-arc_meta_robots\">';\n $form .= '<div class=\"txp-form-field-label\">' . tag(gtxt('arc_meta_robots'), 'label', ' for=\"arc_meta_description\"') . '</div>';\n $form .= '<div class=\"txp-form-field-value\">' . selectInput('arc_meta_robots', _arc_meta_robots(), $meta['robots'], 'arc_meta_robots') . '</div>';\n $form .= '</div>';\n\n return $data . $form;\n}", "function product_category_edit(){\n\t\tglobal $tpl, $config, $meta, $_r, $_l, $_u, $fs;\n\t\t\n\t\t$data = $_r['data'];\n\t\t$data['id'] = $_r['id'];\n\t\t\n\t\tif($data['save'] || $data['apply']){\n\t\t\tif(!$data['title']) $error['title'] = true;\n\t\t\tif(count($error)==0){\n\t\t\t\t$set = array();\n\t\t\t\t$set[] = \"title = '\".add_slash($data['title']).\"'\";\n\t\t\t\t$set[] = \"language_id = '1'\";\n\t\t\t\t$set[] = \"category_id = '0'\";\n\t\t\t\t\n\t\t\t\t$set = implode(', ', $set);\n\t\t\t\tif($data['id']){\n\t\t\t\t\tmysql_q(\"UPDATE product_category SET $set WHERE id = '\".add_slash($data['id']).\"'\");\n\t\t\t\t} else {\n\t\t\t\t\t$data['id'] = mysql_q(\"INSERT INTO product_category SET $set\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($data['save']){\n\t\t\t\t\tredirect(\"product_category.htm\", \"\");\n\t\t\t\t} else{\n\t\t\t\t\tredirect(\"product_category-edit-\".$data['id'].\".htm\", \"\");\n\t\t\t\t}\n\t\t\t}\n\t\t} else if($data['cancel']) {\n\t\t\tredirect(\"product_category.htm\", \"\");\n\t\t}\n\n\t\t$fields = \"\n\t\t[hidden name='id']\n\t\t[input name='title' label='Category Title' error='Please Enter Category Title']\n\t\t[sac class='']\n\t\t\";\n\t\t\n\t\tif(!$data['save'] && $data['id']){\n\t\t\t$data = mysql_q(\"SELECT * FROM product_category WHERE id='\".add_slash($data['id']).\"'\", \"single\");\n\t\t}\n\n\t\t$tpl->assign(\"data\", $data);\n\t\t\n\t\t$form = new form();\n\t\t$form->add($fields);\n\t\t$tpl->assign(\"form1\", $form->build());\n\t\t\n\t\t$main['content'] = $tpl->fetch(\"admin_product_category_edit.tpl\");\n\t\tdisplay($main);\n\t}", "function CategoryForm() {\r\n\r\n\t\t$member = Member::currentUser();\r\n\r\n\t\t// Need to sort out how going to handle multiple instances of category\r\n\t\t// front end grid field : https://github.com/webbuilders-group/silverstripe-frontendgridfield\r\n\t\t// grid field extension : https://github.com/silverstripe-australia/silverstripe-gridfieldextensions\r\n\t\t$category = Category::get()->first();\r\n\t\t$fields = $category->FormFields();\r\n\r\n $actions = FieldList::create(\r\n FormAction::create(\"doCategoryForm\")->setTitle(\"Submit\")->addExtraClass('productive'),\r\n FormAction::create(\"cancel\")->setTitle(\"Cancel\")\r\n );\r\n\r\n $form = Form::create($this, 'CategoryForm', $fields, $actions);\r\n\r\n return $form;\r\n\r\n\t}", "function extra_category_fields( $tag ) { //check for existing featured ID\n $t_id = $tag->term_id;\n $cat_meta = get_option( \"category_$t_id\");\n\t?>\n\t<tr class=\"form-field\">\n\t\t<th scope=\"row\" valign=\"top\"><label for=\"cat_Image_url\"><?php _e('Category Url'); ?></label></th>\n\t\t<td><input type=\"text\" name=\"Cat_meta[cat_url]\" id=\"Cat_meta[img]\" size=\"3\" style=\"width:60%;\" value=\"<?php echo $cat_meta['cat_url'] ? $cat_meta['cat_url'] : ''; ?>\"><br />\n\t <span class=\"description\"><?php _e('Url for category'); ?></span>\n\t\t</td>\n\t</tr>\n\t<?php\n}", "public function category(){\n\t\t$_error = \"Select Category\";\n\t\treturn $_error;\n\t}", "function form($instance)\n {\n $instance = wp_parse_args((array)$instance, $defaults); ?>\n <!-- Category -->\n <p>\n <label for=\"<?php echo $this->get_field_id('categories'); ?>\">Select Category:</label>\n <select id=\"<?php echo $this->get_field_id('categories'); ?>\"\n name=\"<?php echo $this->get_field_name('categories'); ?>\" style=\"width:100%;\">\n <?php $categories = get_categories('hide_empty=0&depth=1&type=post'); ?>\n <?php foreach ($categories as $category) { ?>\n <option value='<?php echo $category->term_id; ?>' <?php if ($category->term_id == $instance['categories']) echo 'selected=\"selected\"'; ?>><?php echo $category->cat_name; ?></option>\n <?php } ?>\n </select>\n </p>\n <?php\n }", "function kulam_acf_prepare_acf_form_post_category_field( $field ) {\n\n\t/**\n\t * Variables\n\t */\n\t$field_label = get_field( 'acf-form_form_category_title' );\n\n\tif ( $field_label ) {\n\n\t\t$field[ 'label' ] = $field_label;\n\n\t}\n\n\t// return\n\treturn $field;\n\n}", "function build_category_html($selected)\n\t{\n\t\tglobal $template, $db;\n\n\t $html = '<select name=\"category_id\" class=\"forminput\">';\n\t\n\t $sql = \"SELECT * FROM \" . GARAGE_CATEGORIES_TABLE . \" ORDER BY title ASC\";\n\t\n\t \tif ( !($result = $db->sql_query($sql)) )\n\t \t{\n\t \tmessage_die(GENERAL_ERROR, 'Could not category of mods for vehicle', '', __LINE__, __FILE__, $sql);\n\t \t}\n\t\n\t while ( $row = $db->sql_fetchrow($result) ) \n\t\t{\n\t\t\t$select = ( $selected == $row['id'] ) ? ' selected=\"selected\"' : '';\n\t\t\t$html .= '<option value=\"' . $row['id'] . '\"' . $select . '>' . $row['title'] . '</option>';\n\t }\n\t\n\t $html .= '</select>';\n\t\n\t\t$template->assign_vars(array(\n\t\t\t'CATEGORY_LIST' => $html)\n\t\t);\n\t\n\t\treturn ;\n\t}", "function getAddCaption() \r\n \t{\r\n \t\treturn '';\r\n \t}", "function the_category_ID($display = \\true)\n {\n }", "function form($instance)\n {\n $defaults = array('category' => '');\n $instance = wp_parse_args(( array )$instance, $defaults);\n $category = $instance['category'];\n ?>\n <p>\n <label for=\"recent_posts_title\"><?php _e('Chọn các category được hiển thị'); ?></label>\n </p>\n\n <p>\n <label for=\"products_category\"><?php _e('Chuyên mục'); ?>:</label>\n <?php\n wp_dropdown_categories(array(\n 'orderby' => 'title',\n 'hide_empty' => false,\n 'name' => $this->get_field_name('category'),\n 'id' => 'products_category',\n 'class' => 'widefat',\n 'selected' => $category\n ));\n ?>\n </p>\n <?php\n\n }" ]
[ "0.6484493", "0.6234255", "0.6195198", "0.6007746", "0.5943674", "0.5917132", "0.5907298", "0.5901107", "0.5729295", "0.5701957", "0.56089604", "0.5607314", "0.55738", "0.55517393", "0.55383116", "0.5505386", "0.55046487", "0.5491411", "0.5473566", "0.5465717", "0.5463196", "0.54539376", "0.54368985", "0.54110974", "0.5396795", "0.53665286", "0.53662574", "0.53449225", "0.5318533", "0.53165424" ]
0.67867893
0
Schreibt eine Dateiliste des Fileadmins, ohne Deploymentdateien
public function readFilesInFileadmin() { $fileArr = $newArr = array(); // direktes auslesen des Ordners, da evtl. nicht alle Dateien in Tabellen indexiert sind $path = GeneralUtility::getIndpEnv('TYPO3_DOCUMENT_ROOT') . GeneralUtility::getIndpEnv('TYPO3_SITE_PATH') . 'fileadmin/'; $fileList = GeneralUtility::getAllFilesAndFoldersInPath($fileArr, $path); $pathCount = strlen($path); // deployment-Ordner exkludieren foreach ($fileList as $filekey => $filevalue) { if (strstr($filevalue, '/fileadmin/deployment') == FALSE) { $newArr[$filekey] = substr($filevalue, $pathCount); } } return $newArr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function writeLists() {\n\n\t\t// get lists file name\n\t\t$adminops_file = $this->settings['adminops_file'];\n\n\t\t// compile lists file contents\n\t\t$lists = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\" ?>\" . CRLF\n\t\t . \"<lists>\" . CRLF\n\t\t . \"\\t<titles>\" . CRLF;\n\t\tforeach ($this->titles as $title => $value) {\n\t\t\t$lists .= \"\\t\\t<\" . strtolower($title) . \">\" .\n\t\t\t $value[0]\n\t\t\t . \"</\" . strtolower($title) . \">\" . CRLF;\n\t\t}\n\t\t$lists .= \"\\t</titles>\" . CRLF\n\t\t . CRLF\n\t\t . \"\\t<admins>\" . CRLF;\n\t\t$empty = true;\n\t\tif (isset($this->admin_list['TMLOGIN'])) {\n\t\t\tfor ($i = 0; $i < count($this->admin_list['TMLOGIN']); $i++) {\n\t\t\t\tif ($this->admin_list['TMLOGIN'][$i] != '') {\n\t\t\t\t\t$lists .= \"\\t\\t<tmlogin>\" . $this->admin_list['TMLOGIN'][$i] . \"</tmlogin>\"\n\t\t\t\t\t . \" <ipaddress>\" . $this->admin_list['IPADDRESS'][$i] . \"</ipaddress>\" . CRLF;\n\t\t\t\t\t$empty = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ($empty) {\n\t\t\t$lists .= \"<!-- format:\" . CRLF\n\t\t\t . \"\\t\\t<tmlogin>YOUR_ADMIN_LOGIN</tmlogin> <ipaddress></ipaddress>\" . CRLF\n\t\t\t . \"-->\" . CRLF;\n\t\t}\n\t\t$lists .= \"\\t</admins>\" . CRLF\n\t\t . CRLF\n\t\t . \"\\t<operators>\" . CRLF;\n\t\t$empty = true;\n\t\tif (isset($this->operator_list['TMLOGIN'])) {\n\t\t\tfor ($i = 0; $i < count($this->operator_list['TMLOGIN']); $i++) {\n\t\t\t\tif ($this->operator_list['TMLOGIN'][$i] != '') {\n\t\t\t\t\t$lists .= \"\\t\\t<tmlogin>\" . $this->operator_list['TMLOGIN'][$i] . \"</tmlogin>\"\n\t\t\t\t\t . \" <ipaddress>\" . $this->operator_list['IPADDRESS'][$i] . \"</ipaddress>\" . CRLF;\n\t\t\t\t\t$empty = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ($empty) {\n\t\t\t$lists .= \"<!-- format:\" . CRLF\n\t\t\t . \"\\t\\t<tmlogin>YOUR_OPERATOR_LOGIN</tmlogin> <ipaddress></ipaddress>\" . CRLF\n\t\t\t . \"-->\" . CRLF;\n\t\t}\n\t\t$lists .= \"\\t</operators>\" . CRLF\n\t\t . CRLF\n\t\t . \"\\t<admin_abilities>\" . CRLF;\n\t\tforeach ($this->adm_abilities as $ability => $value) {\n\t\t\t$lists .= \"\\t\\t<\" . strtolower($ability) . \">\" .\n\t\t\t ($value[0] ? \"true\" : \"false\")\n\t\t\t . \"</\" . strtolower($ability) . \">\" . CRLF;\n\t\t}\n\t\t$lists .= \"\\t</admin_abilities>\" . CRLF\n\t\t . CRLF\n\t\t . \"\\t<operator_abilities>\" . CRLF;\n\t\tforeach ($this->op_abilities as $ability => $value) {\n\t\t\t$lists .= \"\\t\\t<\" . strtolower($ability) . \">\" .\n\t\t\t ($value[0] ? \"true\" : \"false\")\n\t\t\t . \"</\" . strtolower($ability) . \">\" . CRLF;\n\t\t}\n\t\t$lists .= \"\\t</operator_abilities>\" . CRLF\n\t\t . \"</lists>\" . CRLF;\n\n\t\t// write out the lists file\n\t\tif (!@file_put_contents($adminops_file, $lists)) {\n\t\t\ttrigger_error('Could not write adminops file ' . $adminops_file . ' !', E_USER_WARNING);\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public function mainAction() {\n return array(\n 'admins' => $this->get('snowcap_admin')->getAdmins(),\n );\n }", "function ft_hook_dirlist() {}", "public function collectEzLegacyFiles()\r\n {\r\n $folder = array($this->app_root.'/../ezpublish_legacy/settings/', $this->app_root.'/../ezpublish_legacy/settings/override');\r\n $files_found = $this->findFiles($folder, array(\"ini\", \"php\"));\r\n\r\n if($files_found)\r\n $this->file_list = array_merge($this->file_list, $files_found);\r\n $this->filterZipfileList();\r\n\r\n }", "public function export_addFilesFromSysFilesRecords() {}", "function logCheckOnWorkDate()\n\t{\n\t\t// Soll durchgefuehrt werden?\n\t\tif (!$this->m_enable || !$this->m_eraseFilesEnable)\n\t\t{\t\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\t// Suche nach Dateien in Verzeichnis\n\t\t$dir = sprintf(\"%s%s\", $this->m_base, $this->m_sub);\n\t\tif (($resource = opendir($dir)) != false)\n\t\t{\t\n\t\t\twhile(($file = readdir($resource)) != false)\n\t\t\t{\n\t\t\t\tif ($file == \".\" || $file == \"..\") continue;\n\t\t\t\t\n\t\t\t\t// Passt Dateiname zu Format der Logdateinamen\n\t\t\t\tif (eregi($this->m_fileNameTemplateMatch, $file))\n\t\t\t\t{\n\t\t\t\t\t// In Liste aufnehmen\n\t\t\t\t\t$fileList[$fileCount++] = $file;\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($resource);\n\t\n\t\t\t// Wurden Dateien gefunden.\n\t\t\tif ($fileCount)\n\t\t\t{\t\n\t\t\t\t$fileCount = 0;\n\t\t\t\t// Array der gefundenen Dateien sortieren.\n\t\t\t\trsort($fileList);\n\t\t\t\t\n\t\t\t\tfor (; count($fileList);)\n\t\t\t\t{\t\n\t\t\t\t\t// Ist Datei von selbigem Datum?\n\t\t\t\t\tif (strncmp($tmp, $fileList[0], 10) == false)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Datei mit gleichem Datums-Zeichenfolgenbeginn\n\t\t\t\t\t\t// Kann sein, da fuer verschiedene Kanaele gelogt werden kann.\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// Datums-Zeichenfolge des Dateinamen aufnehmen.\n\t\t\t\t\t\t$tmp = $fileList[0];\n\t\t\t\t\t\t$fileCount++; // Zu erhaltende Datei\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Datumsbereich der zu erhaltenden Dateien ueberschritten?\n\t\t\t\t\tif ($fileCount > $this->m_eraseFilesCount)\n\t\t\t\t\t{\n\t\t\t\t\t\t$file = $this->m_base . $this->m_sub . $fileList[0];\n\t\t\t\t\t\tif (unlink($file) == false)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Konnte nicht geloescht werden!\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//echo \"Erase file: \" . $fileList[0] . \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\t\n\t\t\t\t\t\t//echo \"Hold file: \" . $fileList[0] . \"\\n\";\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Datei aus Array entfernen\n\t\t\t\t\tarray_shift($fileList);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn 1;\n\t}", "public static function getAdminsList()\n {\n $data_to_load = [];\n if(DatabaseManager::fetchInto(\"main\", $data_to_load, \"SELECT * FROM `admin_users`\") === false)\n Status::message(Status::ERROR, \"Couldn't retrieve `admin_users` from DB\");\n \n Status::message(Status::SUCCESS, $data_to_load);\n }", "function arquivos() {\n\t\t$this->validate();\n\t\t$this->setupTemplate(true);\n\t\t$templateMgr =& TemplateManager::getManager();\n\n\t\t//carregar lista de arquivos:\n\t\t$templateMgr->assign('files', $this->listar());\n\t\t$templateMgr->display('files/files.tpl');\n\t}", "public function collectLogFiles()\r\n {\r\n $folder = array($this->app_root.'/logs');\r\n $files_found = $this->findFiles($folder, array(\"log\"));\r\n\r\n if($files_found)\r\n $this->file_list = array_merge($this->file_list, $files_found);\r\n }", "function ajaxlistfiles(){\n\n\t\t//Glob all files in uploaddir\n\t\t$files = array();\n\t\tforeach(glob($this->uploaddir.'*') as $file){\n\n\t\t\t//Strip path\n\t\t\t$filename = str_replace($this->uploaddir,'',$file);\n\n\t\t\t$files[$filename]['filename']=$filename;\n\t\t\t$files[$filename]['filesize']=filesize($file) / 1024 / 1024; //Mb\n\t\t\t$files[$filename]['modified']=filemtime($file); //Mb\n\n\t\t\t//Check torrent\n\t\t\tif( file_exists( $this->torrentdir.$filename.'.torrent' )){\n\n\t\t\t\t//Add torrent file\n\t\t\t\t$files[$filename]['torrent']=$filename.'.torrent';\n\n\t\t\t\t//Check database table phptracker_peers for torrent peers:\n\t\t\t\tif($torrent = $this->Torrent->findByName($filename)){\n\t\t\t\t\tif($peers = $this->Peer->findAllByInfoHash($torrent['Torrent']['info_hash'])){\n\t\t\t\t\t\t$files[$filename]['peers']=$peers;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->set('files',$files);\n\n\t\t$this->layout = 'ajax';\n\t}", "function managementAdminAll(){\n $Admins = new \\Project\\Models\\ManagementAdminManager();\n $allAdmin = $Admins->allManagementAdmin();\n\n require 'app/views/back/managementAdmin.php';\n }", "function getAdminLinks()\n {\n }", "function get_super_admins()\n {\n }", "function _generateFilesList() {\n return array();\n }", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/jestr.php',\n 'sources_custom/forum/cns.php',\n 'lang_custom/EN/jestr.ini',\n 'themes/default/templates_custom/EMOTICON_IMG_CODE_THEMED.tpl',\n 'forum/pages/modules_custom/topicview.php',\n 'sources_custom/hooks/systems/config/jestr_avatar_switch_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_emoticon_magnet_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_leet_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_name_changes.php',\n 'sources_custom/hooks/systems/config/jestr_name_changes_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_piglatin_shown_for.php',\n 'sources_custom/hooks/systems/config/jestr_string_changes.php',\n 'sources_custom/hooks/systems/config/jestr_string_changes_shown_for.php',\n );\n }", "function list_files () {\n\t\t$root = $this->get_root();\n\t\t\n\t\treturn $this->_list_files($root);\n\t}", "public function admin_logs_manage() {\n $app = $this->app;\n if ($this->isUserAdmin()) {\n $srv = $this->srv;\n $logs = $srv->retrieve_all_logs();\n $app->render('Logbook/admin_manage_logs.html.twig', ['globals' => $this->getGlobals(), 'logs' => $logs]);\n } else {\n $app->flash('error', 'Ongeldige bewerking.');\n $app->redirect($app->urlFor('main_page'));\n }\n }", "public function addAdminMenuEntries(): void {\n foreach ($this->adminPages as $page) {\n (new $page($this->container));\n }\n }", "public function page_default_administration()\n\t{\n\t\tFsb::$tpl->set_file('adm_index.html');\n\n\t\t// Les 5 derniers logs administratifs\n\t\t$logs = Log::read(Log::ADMIN, 5);\n\t\tforeach ($logs['rows'] AS $log)\n\t\t{\n\t\t\tFsb::$tpl->set_blocks('log', array(\n\t\t\t\t'STR' =>\t$log['errstr'],\n\t\t\t\t'INFO' =>\tsprintf(Fsb::$session->lang('adm_list_log_info'), htmlspecialchars($log['u_nickname']), Fsb::$session->print_date($log['log_time'])),\n\t\t\t));\n\t\t}\n\n\t\t// On affiche tous les comptes ?\n\t\t$show_all = (Http::request('show_all')) ? true : false;\n\n\t\t// Liste des comptes en attente de validation\n\t\t$sql = 'SELECT u_id, u_nickname, u_joined, u_register_ip\n\t\t\t\tFROM ' . SQL_PREFIX . 'users\n\t\t\t\tWHERE u_activated = 0\n\t\t\t\t\tAND u_confirm_hash = \\'.\\'\n\t\t\t\t\tAND u_id <> ' . VISITOR_ID . '\n\t\t\t\tORDER BY u_joined DESC\n\t\t\t\t' . (($show_all) ? '' : 'LIMIT 5');\n\t\t$result = Fsb::$db->query($sql);\n\t\twhile ($row = Fsb::$db->row($result))\n\t\t{\n\t\t\tFsb::$tpl->set_blocks('wait', array(\n\t\t\t\t'NICKNAME' =>\t\thtmlspecialchars($row['u_nickname']),\n\t\t\t\t'JOINED_IP' =>\t\tsprintf(Fsb::$session->lang('adm_joined_ip'), Fsb::$session->print_date($row['u_joined']), $row['u_register_ip']),\n\n\t\t\t\t'U_EDIT' =>\t\t\tsid(ROOT . 'index.' . PHPEXT . '?p=modo&amp;module=user&amp;id=' . $row['u_id']),\n\t\t\t\t'U_VALIDATE' =>\t\tsid('index.' . PHPEXT . '?mode=validate&amp;id=' . $row['u_id']),\n\t\t\t));\n\t\t}\n\t\tFsb::$db->free($result);\n\n\t\t// Liste des membres en ligne\n\t\t$sql = 'SELECT s.s_id, s.s_ip, s.s_page, s.s_user_agent, u.u_nickname, u.u_color, u.u_activate_hidden, b.bot_id, b.bot_name\n\t\t\tFROM ' . SQL_PREFIX . 'sessions s\n\t\t\tLEFT JOIN ' . SQL_PREFIX . 'users u\n\t\t\t\tON u.u_id = s.s_id\n\t\t\tLEFT JOIN ' . SQL_PREFIX . 'bots b\n\t\t\t\tON s.s_bot = b.bot_id\n\t\t\tWHERE s.s_time > ' . intval(CURRENT_TIME - 300) . '\n\t\t\tORDER BY u.u_auth DESC, u.u_nickname, s.s_id';\n\t\t$result = Fsb::$db->query($sql);\n\t\t$id_array = array();\n\t\t$ip_array = array();\n\t\t$f_idx = $t_idx = $p_idx = array();\n\t\t$logged = array('users' => array(), 'visitors' => array());\n\t\twhile ($row = Fsb::$db->row($result))\n\t\t{\n\t\t\tif (!is_null($row['bot_id']) || $row['s_id'] == VISITOR_ID)\n\t\t\t{\n\t\t\t\tif (in_array($row['s_ip'], $ip_array))\n\t\t\t\t{\n\t\t\t\t\tcontinue ;\n\t\t\t\t}\n\t\t\t\t$ip_array[] = $row['s_ip'];\n\t\t\t\t$type = 'visitors';\n\n\t\t\t\t// Les bots ont leur propre couleur\n\t\t\t\tif (!is_null($row['bot_id']))\n\t\t\t\t{\n\t\t\t\t\t$row['u_color'] = 'class=\"bot\"';\n\t\t\t\t\t$row['u_nickname'] = $row['bot_name'];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (in_array($row['s_id'], $id_array))\n\t\t\t\t{\n\t\t\t\t\tcontinue ;\n\t\t\t\t}\n\t\t\t\t$id_array[] = $row['s_id'];\n\t\t\t\t$type = 'users';\n\t\t\t}\n\n\t\t\t// Position du membre sur le forum\n\t\t\t$id = null;\n\t\t\t$method = 'forums';\n\t\t\tif (strpos($row['s_page'], 'admin/') !== false)\n\t\t\t{\n\t\t\t\t$location = Fsb::$session->lang('adm_location_adm');\n\t\t\t\t$url = 'admin/index.' . PHPEXT;\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$page = basename($row['s_page']);\n\t\t\t\t$url = '';\n\t\t\t\t$location = '';\n\t\t\t\tif (preg_match('#^index\\.' . PHPEXT . '\\?p=([a-z0-9_]+)(&.*?)*$#', $page, $match) || preg_match('#^(forum|topic|sujet)-([0-9]+)-([0-9]+)\\.html$#i', $page, $match))\n\t\t\t\t{\n\t\t\t\t\t$url = $match[0];\n\t\t\t\t\tswitch ($match[1])\n\t\t\t\t\t{\n\t\t\t\t\t\tcase 'forum' :\n\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_forum');\n\t\t\t\t\t\t\tif (count($match) == 4)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$id = $match[2];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tpreg_match('#f_id=([0-9]+)#', $page, $match);\n\t\t\t\t\t\t\t\t$id = (isset($match[1])) ? $match[1] : null;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ($id) $f_idx[] = $id;\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'topic' :\n\t\t\t\t\t\tcase 'sujet' :\n\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_topic');\n\t\t\t\t\t\t\tif (count($match) == 4)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$method = 'topics';\n\t\t\t\t\t\t\t\t$id = $match[2];\n\t\t\t\t\t\t\t\t$t_idx[] = $id;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (preg_match('#t_id=([0-9]+)#', $page, $match))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$method = 'topics';\n\t\t\t\t\t\t\t\t$id = (isset($match[1])) ? $match[1] : null;\n\t\t\t\t\t\t\t\tif ($id) $t_idx[] = $id;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$method = 'posts';\n\t\t\t\t\t\t\t\tpreg_match('#p_id=([0-9]+)#', $page, $match);\n\t\t\t\t\t\t\t\t$id = (isset($match[1])) ? $match[1] : null;\n\t\t\t\t\t\t\t\tif ($id) $p_idx[] = $id;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase 'post' :\n\t\t\t\t\t\t\tpreg_match('#mode=([a-z_]+)#', $page, $mode);\n\t\t\t\t\t\t\tpreg_match('#id=([0-9]+)#', $page, $match);\n\t\t\t\t\t\t\t$id = (isset($match[1])) ? $match[1] : null;\n\t\t\t\t\t\t\tswitch ($mode[1])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcase 'topic' :\n\t\t\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_post_new');\n\t\t\t\t\t\t\t\t\tif ($id) $f_idx[] = $id;\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase 'reply' :\n\t\t\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_post_reply');\n\t\t\t\t\t\t\t\t\tif ($id) $t_idx[] = $id;\n\t\t\t\t\t\t\t\t\t$method = 'topics';\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase 'edit' :\n\t\t\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_post_edit');\n\t\t\t\t\t\t\t\t\tif ($id) $p_idx[] = $id;\n\t\t\t\t\t\t\t\t\t$method = 'posts';\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase 'mp' :\n\t\t\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_mp_write');\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase 'calendar_add' :\n\t\t\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_calendar_event');\n\t\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\t\tcase 'calendar_edit' :\n\t\t\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_calendar_event_edit');\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tdefault :\n\t\t\t\t\t\t\tif (Fsb::$session->lang('adm_location_' . $match[1]))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$location = Fsb::$session->lang('adm_location_' . $match[1]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (!$location)\n\t\t\t\t{\n\t\t\t\t\t$location = Fsb::$session->lang('adm_location_index');\n\t\t\t\t\t$url = 'index.' . PHPEXT;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$logged[$type][] = array(\n\t\t\t\t'nickname' =>\t\tHtml::nickname($row['u_nickname'], $row['s_id'], $row['u_color']),\n\t\t\t\t'agent' =>\t\t\t$row['s_user_agent'],\n\t\t\t\t'ip' =>\t\t\t\t$row['s_ip'],\n\t\t\t\t'location' =>\t\t$location,\n\t\t\t\t'url' =>\t\t\tsid(ROOT . $url),\n\t\t\t\t'method' =>\t\t\t$method,\n\t\t\t\t'id' =>\t\t\t\t$id,\n\t\t\t);\n\n\n\t\t}\n\t\tFsb::$db->free($result);\n\n\t\t// On recupere une liste des forums pour connaitre la position du membre sur le forum\n\t\t$forums = array();\n\t\tif ($f_idx)\n\t\t{\n\t\t\t$sql = 'SELECT f.f_id, f.f_name, cat.f_id AS cat_id, cat.f_name AS cat_name\n\t\t\t\t\tFROM ' . SQL_PREFIX . 'forums f\n\t\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'forums cat\n\t\t\t\t\t\tON f.f_cat_id = cat.f_id\n\t\t\t\t\tWHERE f.f_id IN (' . implode(', ', $f_idx) . ')';\n\t\t\t$result = Fsb::$db->query($sql, 'forums_');\n\t\t\t$forums = Fsb::$db->rows($result, 'assoc', 'f_id');\n\t\t}\n\n\t\t// On recupere une liste des sujets pour connaitre la position du membre sur le forum\n\t\t$topics = array();\n\t\tif ($t_idx)\n\t\t{\n\t\t\t$sql = 'SELECT f.f_id, f.f_name, cat.f_id AS cat_id, cat.f_name AS cat_name, t.t_id, t.t_title\n\t\t\t\t\tFROM ' . SQL_PREFIX . 'topics t\n\t\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'forums f\n\t\t\t\t\t\tON f.f_id = t.f_id\n\t\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'forums cat\n\t\t\t\t\t\tON f.f_cat_id = cat.f_id\n\t\t\t\t\tWHERE t.t_id IN (' . implode(', ', $t_idx) . ')';\n\t\t\t$result = Fsb::$db->query($sql, 'forums_');\n\t\t\t$topics = Fsb::$db->rows($result, 'assoc', 't_id');\n\t\t}\n\n\t\t// On recupere une liste des messages pour connaitre la position du membre sur le forum\n\t\t$posts = array();\n\t\tif ($p_idx)\n\t\t{\n\t\t\t$sql = 'SELECT f.f_id, f.f_name, cat.f_id AS cat_id, cat.f_name AS cat_name, p.p_id, t.t_id, t.t_title\n\t\t\t\t\tFROM ' . SQL_PREFIX . 'posts p\n\t\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'topics t\n\t\t\t\t\t\tON p.t_id = t.t_id\n\t\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'forums f\n\t\t\t\t\t\tON f.f_id = p.f_id\n\t\t\t\t\tLEFT JOIN ' . SQL_PREFIX . 'forums cat\n\t\t\t\t\t\tON f.f_cat_id = cat.f_id\n\t\t\t\t\tWHERE p.p_id IN (' . implode(', ', $p_idx) . ')';\n\t\t\t$result = Fsb::$db->query($sql, 'forums_');\n\t\t\t$posts = Fsb::$db->rows($result, 'assoc', 'p_id');\n\t\t}\n\n\t\t// On affiche les membres en ligne\n\t\tforeach ($logged AS $type => $list)\n\t\t{\n\t\t\tif ($list)\n\t\t\t{\n\t\t\t\tFsb::$tpl->set_blocks('logged', array(\n\t\t\t\t\t'TITLE' =>\t\tFsb::$session->lang('adm_list_logged_' . $type),\n\t\t\t\t));\n\n\t\t\t\tforeach ($list AS $u)\n\t\t\t\t{\n\t\t\t\t\t// On definit si on cherche la liste des forums dans $forums ou $topics\n\t\t\t\t\t$m = $u['method'];\n\t\t\t\t\t$data_exists = ($u['id'] && isset(${$m}[$u['id']])) ? true : false;\n\t\t\t\t\t$topic_exists = ($data_exists && isset(${$m}[$u['id']]['t_title'])) ? true : false;\n\n\t\t\t\t\tFsb::$tpl->set_blocks('logged.u', array(\n\t\t\t\t\t\t'NICKNAME' =>\t\t$u['nickname'],\n\t\t\t\t\t\t'AGENT' =>\t\t\t$u['agent'],\n\t\t\t\t\t\t'IP' =>\t\t\t\t$u['ip'],\n\t\t\t\t\t\t'LOCATION' =>\t\t$u['location'],\n\t\t\t\t\t\t'URL' =>\t\t\t$u['url'],\n\t\t\t\t\t\t'CAT_NAME' =>\t\t($data_exists) ? ${$m}[$u['id']]['cat_name'] : null,\n\t\t\t\t\t\t'FORUM_NAME' =>\t\t($data_exists) ? ${$m}[$u['id']]['f_name'] : null,\n\t\t\t\t\t\t'TOPIC_NAME' =>\t\t($topic_exists) ? Parser::title(${$m}[$u['id']]['t_title']) : '',\n\t\t\t\t\t\t'U_CAT' =>\t\t\t($data_exists) ? sid(ROOT . 'index.' . PHPEXT . '?p=index&amp;cat=' . ${$m}[$u['id']]['cat_id']) : null,\n\t\t\t\t\t\t'U_FORUM' =>\t\t($data_exists) ? sid(ROOT . 'index.' . PHPEXT . '?p=forum&amp;f_id=' . ${$m}[$u['id']]['f_id']) : null,\n\t\t\t\t\t\t'U_TOPIC' =>\t\t($topic_exists) ? sid(ROOT . 'index.' . PHPEXT . '?p=topic&amp;t_id=' . ${$m}[$u['id']]['t_id']) : null,\n\t\t\t\t\t\t'U_IP' =>\t\t\tsid(ROOT . 'index.' . PHPEXT . '?p=modo&amp;module=ip&amp;ip=' . $u['ip']),\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// On verifie si le SDK n'a pas ete desactive\n\t\tif(intval(Fsb::$cfg->get('disable_sdk')))\n\t\t{\n\t\t\tFsb::$tpl->set_switch('sdk_disabled');\n\t\t}\n\n\t\tFsb::$tpl->set_vars(array(\n\t\t\t'FSB_SUPPORT' =>\t\t'http://www.fire-soft-board.com',\n\t\t\t'FSB_LANG_SUPPORT' =>\tFsb::$session->lang('fsb_lang_support'),\n\t\t\t'NEW_VERSION' =>\t\t(!is_last_version(Fsb::$cfg->get('fsb_version'), Fsb::$cfg->get('fsb_last_version'))) ? sprintf(Fsb::$session->lang('adm_fsb_new_version'), Fsb::$cfg->get('fsb_version'), Fsb::$cfg->get('fsb_last_version')) : null,\n\t\t\t'SHOW_ALL' =>\t\t\t$show_all,\n\t\t\t'ROOT_SUPPORT' => \t\tsprintf(Fsb::$session->lang('adm_root_support_active_explain'), 'index.' . PHPEXT . '?p=mods_manager'),\n\n\t\t\t'U_SHOW_ALL' =>\t\t\tsid('index.' . PHPEXT . '?show_all=true'),\n\t\t\t'U_CHECK_VERSION' =>\tsid('index.' . PHPEXT . '?mode=version'),\n\t\t));\n\t}", "public function get_file_list()\n {\n return array(\n 'sources_custom/hooks/systems/addon_registry/idolisr.php',\n 'sources_custom/hooks/modules/members/idolisr.php',\n 'sources_custom/miniblocks/main_stars.php',\n 'sources_custom/miniblocks/side_recent_points.php',\n 'themes/default/templates_custom/POINTS_GIVE.tpl',\n 'themes/default/templates_custom/BLOCK_MAIN_STARS.tpl',\n 'themes/default/templates_custom/BLOCK_SIDE_RECENT_POINTS.tpl',\n );\n }", "function ciniki_lapt_fileList($ciniki) {\n //\n // Find all the required and optional arguments\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args = $rc['args'];\n\n //\n // Check access to tnid as owner, or sys admin.\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'lapt', 'private', 'checkAccess');\n $rc = ciniki_lapt_checkAccess($ciniki, $args['tnid'], 'ciniki.lapt.fileList');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n //\n // Get the list of files\n //\n $strsql = \"SELECT ciniki_lapt_files.id, \"\n . \"ciniki_lapt_files.document_id, \"\n . \"ciniki_lapt_files.name, \"\n . \"ciniki_lapt_files.permalink, \"\n . \"ciniki_lapt_files.flags, \"\n . \"ciniki_lapt_files.org_filename, \"\n . \"ciniki_lapt_files.extension \"\n . \"FROM ciniki_lapt_files \"\n . \"WHERE ciniki_lapt_files.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryArrayTree');\n $rc = ciniki_core_dbHashQueryArrayTree($ciniki, $strsql, 'ciniki.lapt', array(\n array('container'=>'files', 'fname'=>'id', \n 'fields'=>array('id', 'document_id', 'name', 'permalink', 'flags', 'org_filename', 'extension')),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['files']) ) {\n $files = $rc['files'];\n $file_ids = array();\n foreach($files as $iid => $file) {\n $file_ids[] = $file['id'];\n }\n } else {\n $files = array();\n $file_ids = array();\n }\n\n return array('stat'=>'ok', 'files'=>$files, 'nplist'=>$file_ids);\n}", "public function listActions() {\n return [\n new Action('Export', 'fa-download', URL::route('admin-'.$this->name().'-export'))\n ];\n }", "public function indexAction()\n {\n \n $this->authService = new AuthenticationService();\n if( ! $this->authService->hasIdentity() ){\n $this->redirectAdminIndex();\n }\n $layout = $this->layout();\n $layout->setTemplate('admin/dashboard/layout');\n $themefileManager = $this->getServiceLocator()->get('themefileServices');\n $themeManager = $this->getServiceLocator()->get('templateMapService');\n $publicfilestructureManager = $this->getServiceLocator()->get('publicfilestructureManager');\n \n // This will create theme file structure\n //$themefileManager->setThemeFileStructure();\n \n //$themeManager->processTemplateMapping();\n $publicfilestructureManager->readModules();\n $publicfilestructureManager->movePublicToThemes();\n return array('output' => $themefileManager->output);\n }", "function procMenuAdminAllActList()\n\t{\n\t\t$oModuleModel = getModel('module');\n\t\t$installed_module_list = $oModuleModel->getModulesXmlInfo();\n\t\tif(is_array($installed_module_list))\n\t\t{\n\t\t\t$currentLang = Context::getLangType();\n\t\t\t$menuList = array();\n\t\t\tforeach($installed_module_list AS $key=>$value)\n\t\t\t{\n\t\t\t\t$info = $oModuleModel->getModuleActionXml($value->module);\n\t\t\t\tif($info->menu) $menuList[$value->module] = $info->menu;\n\t\t\t\tunset($info->menu);\n\t\t\t}\n\t\t}\n\t\t$this->add('menuList', $menuList);\n\t}", "function index_superusuarios() {\n\t\t$conditions = array('Administrativo.perfil' => '0'); \n\t\t$order = array('Administrativo.nombre' => 'ASC');\n\t\t$administrativos=$this->Administrativo->find('all', array ('conditions' => $conditions, 'order' => $order));\t\t\n\t\t$perfil=$this->Perfil->find('all');\n\t\tforeach ($perfil as $p){\n\t\t\t$perfiles[$p['Perfil']['id']]=$p['Perfil']['perfil'];\n\t\t}\n\t\t$perfiles[0]='SuperAdministrador';\n\t\t$this->set('perfiles', $perfiles);\n\t\t$this->set('administrativos', $administrativos);\n\t}", "function showAdmins() {\n // permissions...\n if(!Current_User::isDeity()) {\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Error.php');\n $error = 'Uh Uh Uh! You didn\\'t say the magic word!';\n Sysinventory_Error::error($error);\n return;\n }\n\n // set up some stuff for the page template\n $tpl = array();\n $tpl['PAGE_TITLE'] = 'Edit Administrators';\n $tpl['HOME_LINK'] = PHPWS_Text::moduleLink('Back to menu','sysinventory');\n\n // create the list of admins\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Admin.php');\n $adminList = Sysinventory_Admin::generateAdminList();\n // get the list of departments\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Department.php');\n $depts = Sysinventory_Department::getDepartmentsByUsername();\n\n // build the array for the department drop-down box\n $deptIdSelect = array();\n foreach($depts as $dept) {\n $deptIdSelect[$dept['id']] = $dept['description'];\n }\n\n // make the form for adding a new admin\n $form = new PHPWS_Form('add_admin');\n $form->addSelect('department_id',$deptIdSelect);\n $form->setLabel('department_id','Department');\n $form->addText('username');\n $form->setLabel('username','Username');\n $form->addSubmit('submit','Create Admin');\n $form->setAction('index.php?module=sysinventory&action=edit_admins');\n $form->addHidden('newadmin','add');\n\n $tpl['PAGER'] = $adminList;\n\n $form->mergeTemplate($tpl);\n\n $template = PHPWS_Template::process($form->getTemplate(),'sysinventory','edit_admin.tpl');\n\n Layout::addStyle('sysinventory','style.css');\n Layout::add($template);\n\n }", "public function collectInfoFiles()\r\n {\r\n $files_found = $this->findFiles($this->destination_dir, array('md', '1st', 'txt'));\r\n\r\n if($files_found)\r\n $this->file_list = array_merge($this->file_list, $files_found);\r\n }", "public static function get_admins();", "public function run()\n {\n $list = \n \t[\n \t\t[\n\t 'name' => 'admin-users',\n\t 'display_name' => 'Administrar Usuarios',\n\t 'description' => 'Puede crear, listar, ver, editar y eliminar usuarios'\n \t],\n \t[\n\t 'name' => 'admin-enterprise',\n\t 'display_name' => 'Administrar Empresa',\n\t 'description' => 'Puede ver y editar la información de la empresa'\n \t],\n \t[\n\t 'name' => 'admin-stores',\n\t 'display_name' => 'Administrar Almacenes',\n\t 'description' => 'Puede crear, listar, ver, editar y eliminar Almacenes'\n \t],\n \t[\n\t 'name' => 'admin-providers',\n\t 'display_name' => 'Administrar Proveedores',\n\t 'description' => 'Puede crear, listar, ver, editar y eliminar Almacenes'\n \t],\n \t[\n\t 'name' => 'admin-clients',\n\t 'display_name' => 'Administrar Clientes',\n\t 'description' => 'Puede manipular el modulo de clientes'\n \t],\n \t[\n\t 'name' => 'admin-products',\n\t 'display_name' => 'Administrar Productos',\n\t 'description' => 'Puede manipular el modulo de productos'\n \t],\n \t[\n\t 'name' => 'admin-inventory',\n\t 'display_name' => 'Administrar Inventario',\n\t 'description' => 'Puede manipular el modulo de inventario'\n \t],\n \t[\n\t 'name' => 'admin-sales',\n\t 'display_name' => 'Administrar Ventas',\n\t 'description' => 'Puede manipular el modulo de ventas'\n \t],\n \t[\n\t 'name' => 'admin-deliveries',\n\t 'display_name' => 'Administrar Despachos',\n\t 'description' => 'Puede manipular el modulo de despachos'\n \t],\n \t[\n\t 'name' => 'admin-credits',\n\t 'display_name' => 'Administrar Creditos',\n\t 'description' => 'Puede manipular el modulo de creditos'\n \t],\n \t[\n\t 'name' => 'admin-roles',\n\t 'display_name' => 'Administrar Permisologia',\n\t 'description' => 'Puede manipular el modulo de permisologia'\n \t],\n \t[\n\t 'name' => 'administrator',\n\t 'display_name' => 'Administrador',\n\t 'description' => 'Puede administrar todo el sistema'\n \t],\n \t];\n\n \tforeach ($list as $key => $value) {\n \t\tDB::table('permissions')->insert($value);\t\n \t}\n }", "public static function jqueryFileTree_get_list() {\r\n\t\tcheck_admin_referer('plugin-name-action_wpidenonce'); \r\n\t\tif ( !is_super_admin() )\r\n\t\t\twp_die('<p>'.__('You do not have sufficient permissions to edit templates for this site. SORRY').'</p>');\r\n\t\t\r\n\t\t//setup wp_filesystem api\r\n\t\tglobal $wp_filesystem;\r\n $url = wp_nonce_url('admin.php?page=wpide','plugin-name-action_wpidenonce');\r\n $form_fields = null; // for now, but at some point the login info should be passed in here\r\n if (false === ($creds = request_filesystem_credentials($url, FS_METHOD, false, false, $form_fields) ) ) {\r\n // no credentials yet, just produced a form for the user to fill in\r\n return true; // stop the normal page form from displaying\r\n }\r\n \r\n\t\tif ( ! WP_Filesystem($creds) ) \r\n\t\t return false;\r\n \r\n\t\t$_POST['dir'] = urldecode($_POST['dir']);\r\n $root = apply_filters( 'wpide_filesystem_root', WP_CONTENT_DIR ); \r\n\t\t\r\n\t\tif( $wp_filesystem->exists($root . $_POST['dir']) ) {\r\n\t\t\t//$files = scandir($root . $_POST['dir']);\r\n\t\t\t//print_r($files);\r\n\t\t\t$files = $wp_filesystem->dirlist($root . $_POST['dir']);\r\n\t\t\t//print_r($files);\r\n \r\n\t\t\techo \"<ul class=\\\"jqueryFileTree\\\" style=\\\"display: none;\\\">\";\r\n\t\t\tif( count($files) > 0 ) { \r\n\t\t\t\t\r\n\t\t\t\t// All dirs\r\n\t\t\t\tasort($files); // Sort Files and folders by php case-sensitive Alpha\r\n\t\t\t\tforeach( $files as $file => $file_info ) {\r\n\t\t\t\t\tif( $file != '.' && $file != '..' && $file_info['type']=='d' ) {\r\n\t\t\t\t\t\techo \"<li class=\\\"directory collapsed\\\"><a href=\\\"#\\\" rel=\\\"\" . htmlentities($_POST['dir'] . $file) . \"/\\\">\" . htmlentities($file) . \"</a></li>\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// All files\r\n\t\t\t\tforeach( $files as $file => $file_info ) {\r\n\t\t\t\t\tif( $file != '.' && $file != '..' && $file_info['type']!='d') {\r\n\t\t\t\t\t\t$ext = preg_replace('/^.*\\./', '', $file);\r\n\t\t\t\t\t\techo \"<li class=\\\"file ext_$ext\\\"><a href=\\\"#\\\" rel=\\\"\" . htmlentities($_POST['dir'] . $file) . \"\\\">\" . htmlentities($file) . \"</a></li>\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//output toolbar for creating new file, folder etc\r\n\t\t\techo \"<li class=\\\"create_new\\\"><a class='new_directory' title='Create a new directory here.' href=\\\"#\\\" rel=\\\"{type: 'directory', path: '\" . htmlentities($_POST['dir']) . \"'}\\\"></a> <a class='new_file' title='Create a new file here.' href=\\\"#\\\" rel=\\\"{type: 'file', path: '\" . htmlentities($_POST['dir']) . \"'}\\\"></a><br style='clear:both;' /></li>\";\r\n\t\t\techo \"</ul>\";\t\r\n\t\t}\r\n\t\r\n\t\tdie(); // this is required to return a proper result\r\n\t}" ]
[ "0.6159149", "0.60997367", "0.604208", "0.578313", "0.57729435", "0.57020223", "0.56754524", "0.5642211", "0.5625906", "0.56167734", "0.55953205", "0.5579391", "0.5572567", "0.5568225", "0.5556994", "0.5549812", "0.55435014", "0.5527608", "0.5522776", "0.55180866", "0.54975766", "0.5479753", "0.5478031", "0.5475803", "0.5470296", "0.54687387", "0.5454926", "0.54493695", "0.5441213", "0.5434868" ]
0.6809908
0
Adds additional entries to the `dependencies` option.
public function addDependencies(array $dependencies) { $this->add('dependencies', $dependencies); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_dependencies(self ...$plugins): static;", "public function configureDependencies(DependencyBuilder $dependencies)\n {\n }", "public function addDevDependencies(array $dependencies)\n {\n $this->add('devDependencies', $dependencies);\n }", "public function add($field, array $dependencies)\n {\n if (! file_exists($this->file)) {\n throw new RuntimeException(\"Could not add dependencies, `package.json` file do not exists.\");\n }\n\n $packages = json_decode(file_get_contents($this->file), true);\n\n $packages[$field] = $dependencies + $packages[$field];\n\n ksort($packages[$field]);\n\n file_put_contents($this->file, json_encode($packages, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT).PHP_EOL);\n }", "public function setDependencies($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Helmgate\\Dependency::class);\n $this->dependencies = $arr;\n\n return $this;\n }", "private function setup_dependencies($deps) {\n\t\tif (isset($deps['info'])) {\n\t\t\t$this->info = $deps['info'];\n\t\t}\n\t}", "public function mergeDependencies()\n {\n $this->dependencies = array_merge($this->dependencies, $this->commonDependencies);\n }", "function get_dependencies();", "public function deps( string ...$deps ): self {\n\t\t$this->deps = $deps;\n\t\treturn $this;\n\t}", "public function addDependency($dependency)\n {\n $this->dependencies[$dependency] = array(\"dependencyGuid\" => $dependency);\n }", "public function get_dependencies()\n {\n return array(\n 'requires' => array(\n 'Conversr',\n ),\n 'recommends' => array(),\n 'conflicts_with' => array()\n );\n }", "public function get_dependencies()\n {\n return array(\n 'requires' => array(\n 'chat',\n 'mysql',\n ),\n 'recommends' => array(\n ),\n 'conflicts_with' => array()\n );\n }", "public function get_dependencies()\n {\n return array(\n 'requires' => array(\n 'iotds',\n ),\n 'recommends' => array(),\n 'conflicts_with' => array()\n );\n }", "function setDepends($depends) {\n if ($depends !== ($oldDepends = $this->depends)) {\n $this->depends = $depends;\n }\n }", "public static function dependencies($package = NULL) {\n\n // install dependancies and check if installed before\n // \n \n if(!is_null($package)) {\n echo \"hello dependency\";\n }\n }", "public function set_dependencies( $deps ) {\n\t\t$this->items[ $this->id ]['deps'] = $deps;\n\t\treturn $this;\n\t}", "public function add($handle, $src, $deps = array(), $ver = \\false, $args = \\null)\n {\n }", "public function get_dependencies()\n {\n return array(\n 'requires' => array(\n 'wiki',\n ),\n 'recommends' => array(),\n 'conflicts_with' => array()\n );\n }", "function add_options_packages() {\n $this->configure_propack();\n }", "public function dependencies() {\n\t\tif ($customPath = $this->params['custom']) {\n\t\t\t$this->_paths = [$customPath];\n\t\t} elseif (!empty($this->params['plugin'])) {\n\t\t\t$this->_paths = [CakePlugin::path($this->params['plugin'])];\n\t\t} else {\n\t\t\t$this->_paths = [APP];\n\t\t}\n\n\t\t$this->_findFiles('php');\n\t\tforeach ($this->_files as $file) {\n\t\t\t$this->out(sprintf('Updating %s...', $file), 1, Shell::VERBOSE);\n\n\t\t\t$this->_correctFile($file);\n\n\t\t\t$this->out(sprintf('Done updating %s', $file), 1, Shell::VERBOSE);\n\t\t}\n\t}", "public function get_dependencies()\n\t{\n\t\treturn array();\n\t}", "protected function setDependencies($package, array $dependencies)\n\t{\n\t\t$db = JFactory::getDbo();\n\n\t\t$query = $db->getQuery(true)\n\t\t\t->delete('#__akeeba_common')\n\t\t\t->where($db->qn('key') . ' = ' . $db->q($package));\n\n\t\ttry\n\t\t{\n\t\t\t$db->setQuery($query)->execute();\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t// Do nothing if the old key wasn't found\n\t\t}\n\n\t\t$object = (object) array(\n\t\t\t'key' => $package,\n\t\t\t'value' => json_encode($dependencies),\n\t\t);\n\n\t\ttry\n\t\t{\n\t\t\t$db->insertObject('#__akeeba_common', $object, 'key');\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t// Do nothing if the old key wasn't found\n\t\t}\n\t}", "public function get_dependencies()\n {\n return array(\n 'requires' => array(\n 'JavaScript enabled',\n 'points',\n ),\n 'recommends' => array(),\n 'conflicts_with' => array()\n );\n }", "public function addCacheableDependencies(array $dependencies) {\n foreach ($dependencies as $dependency) {\n $this->addCacheableDependency($dependency);\n }\n }", "public function configureDependencies(DependencyBuilder $dependencies): void\n {\n $dependencies\n ->addClassDependency(OverblogGraphQLBundle::class, 'overblog/graphql-bundle');\n }", "public function configureDependencies(DependencyBuilder $dependencies): void\n {\n $dependencies\n ->addClassDependency(OverblogGraphQLBundle::class, 'overblog/graphql-bundle');\n }", "public function getDependencies() {}", "public function get_dependencies()\n {\n return array(\n 'requires' => array(),\n 'recommends' => array(),\n 'conflicts_with' => array()\n );\n }", "public function get_dependencies()\n {\n return array(\n 'requires' => array(),\n 'recommends' => array(),\n 'conflicts_with' => array()\n );\n }", "public function get_dependencies()\n {\n return array(\n 'requires' => array(),\n 'recommends' => array(),\n 'conflicts_with' => array()\n );\n }" ]
[ "0.6254967", "0.6019367", "0.6013622", "0.59439564", "0.5775454", "0.57066584", "0.56225526", "0.556659", "0.5558864", "0.54927766", "0.5428987", "0.5427373", "0.54099107", "0.5399456", "0.53858376", "0.5379771", "0.5350694", "0.5330845", "0.53156006", "0.5287463", "0.52391917", "0.52294046", "0.52221936", "0.5204361", "0.5189957", "0.5189957", "0.51875913", "0.5180907", "0.5180907", "0.5180907" ]
0.6559166
0
Adds additional entries to the `devDependencies` option.
public function addDevDependencies(array $dependencies) { $this->add('devDependencies', $dependencies); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function addRequirePackages()\n {\n $devPackages = [\n \"orangehill/iseed:*\",\n \"barryvdh/laravel-debugbar:*\",\n \"barryvdh/laravel-ide-helper:*\",\n \"laravel/dusk:*\",\n \"mediactive-digital/laravel:*\",\n \"mediactive-digital/migrations-generator:*\"\n ];\n $this->doCommand(\"composer require \" . implode(' ', $devPackages) . \" --dev\");\n\n if ($this->hasOption('theme')) {\n $this->doCommand('composer require ' . $this->option('theme').'');\n }\n }", "protected function composerRequireDev() :string\n {\n $require = [\n \"engage-php/luminary:0.*\",\n \"squizlabs/php_codesniffer:3.*\",\n \"fzaninotto/faker:~1.4\",\n \"phpunit/phpunit:~6.0\",\n \"mockery/mockery:~0.9\"\n ];\n\n return \" --require-dev=\" . implode(\" --require-dev=\", $require);\n }", "public function addDependency(string $name, bool $dev = false) : void\n {\n if (!$this->hasDependency($name)) {\n $dev = $dev ? ' -D' : '';\n if ($this->yarn) {\n exec(\"yarn add$dev $name\");\n } else {\n exec(\"npm install$dev $name\");\n }\n }\n }", "public function getDevDependencies()\n {\n return isset($this->composerJson['require-dev']) ? array_keys($this->composerJson['require-dev']) : [];\n }", "function add_options_packages() {\n $this->configure_propack();\n }", "protected static function updatePackages($dev = true)\n {\n if (! file_exists(base_path('package.json'))) {\n return;\n }\n \n $packages = json_decode(file_get_contents(base_path('package.json')), true);\n \n $dependencies = static::updatePackageArray(\n $packages\n );\n\n $packages['dependencies'] = $dependencies['dependencies'];\n $packages['devDependencies'] = $dependencies['devDependencies'];\n\n ksort($packages['dependencies']);\n ksort($packages['devDependencies']);\n\n file_put_contents(\n base_path('package.json'),\n json_encode($packages, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT).PHP_EOL\n );\n }", "public function addDependencies(array $dependencies)\n {\n $this->add('dependencies', $dependencies);\n }", "public function add_dependencies(self ...$plugins): static;", "function dev_missing_dependencies() { ?>\n\t<div class=\"error\">\n <p><?php printf( __( 'Awesome Support dependencies are missing. The plugin can’t be loaded properly. Please run %s before anything else. If you don’t know what this is you should <a href=\"%s\" class=\"thickbox\">install the production version</a> of this plugin instead.', 'awesome-support' ), '<a href=\"https://getcomposer.org/doc/00-intro.md#using-composer\" target=\"_blank\"><code>composer install</code></a>', esc_url( add_query_arg( array( 'tab' => 'plugin-information', 'plugin' => 'awesome-support', 'TB_iframe' => 'true', 'width' => '772', 'height' => '935' ), admin_url( 'plugin-install.php' ) ) ) ); ?></p>\n </div>\n<?php }", "public static function dependencies($package = NULL) {\n\n // install dependancies and check if installed before\n // \n \n if(!is_null($package)) {\n echo \"hello dependency\";\n }\n }", "protected static function updateComposerPackages(bool $dev = true): void\n {\n if (! file_exists(base_path('composer.json'))) {\n return;\n }\n\n $configurationKey = $dev ? 'require-dev' : 'require';\n\n $composer = json_decode(file_get_contents(base_path('composer.json')), true);\n\n $composer[$configurationKey] = static::updateComposerPackageArray(\n array_key_exists($configurationKey, $composer) ? $composer[$configurationKey] : [],\n $configurationKey\n );\n\n ksort($composer[$configurationKey]);\n\n file_put_contents(\n base_path('composer.json'),\n json_encode($composer, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT).PHP_EOL\n );\n }", "public function add($field, array $dependencies)\n {\n if (! file_exists($this->file)) {\n throw new RuntimeException(\"Could not add dependencies, `package.json` file do not exists.\");\n }\n\n $packages = json_decode(file_get_contents($this->file), true);\n\n $packages[$field] = $dependencies + $packages[$field];\n\n ksort($packages[$field]);\n\n file_put_contents($this->file, json_encode($packages, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT).PHP_EOL);\n }", "private function setup_dependencies($deps) {\n\t\tif (isset($deps['info'])) {\n\t\t\t$this->info = $deps['info'];\n\t\t}\n\t}", "public static function add_options(){\n\n \t\t$settings = array(\n \t\t\t'foundation' => 0\n \t\t);\n\n \t\tadd_option( 'zip_downloads', $settings ); \n\t}", "public function getComposerRequires(): array;", "function add_extra_debug_information($extra_debug)\n {\n $extra_debug['layouts'] = $this->frameworks_options_manager->get_options();\n return $extra_debug;\n }", "public function get_dependencies()\n {\n return array(\n 'requires' => array(\n 'chat',\n 'mysql',\n ),\n 'recommends' => array(\n ),\n 'conflicts_with' => array()\n );\n }", "public function getComposerDependencies(): array;", "public function get_dependencies()\n {\n return array(\n 'requires' => array(\n 'iotds',\n ),\n 'recommends' => array(),\n 'conflicts_with' => array()\n );\n }", "public function onPostUpdateInstall(Event $event)\n {\n $extra = $event->getComposer()->getPackage()->getExtra();\n\n $installDev = $event->isDevMode();\n $isWin = $this->isWinOs();\n $packagesList = array();\n $prefix = \"extra-require\";\n foreach (array(\"\", \"-dev\") as $dev) {\n foreach (array(\"\", \"-win\", \"-unix\") as $os) {\n $option = $prefix . $dev . $os;\n if (!isset($extra[$option])\n || ($dev && !$installDev)\n || ($os == \"-win\" && !$isWin)\n ) {\n continue;\n }\n\n $packagesList = array_merge($packagesList, $extra[$option]);\n }\n }\n\n $this->removeUnusedPackages($packagesList, $installDev);\n if (!empty($packagesList)) {\n $this->installPackages($packagesList, $installDev);\n }\n }", "function setDepends($depends) {\n if ($depends !== ($oldDepends = $this->depends)) {\n $this->depends = $depends;\n }\n }", "public function configureDependencies(DependencyBuilder $dependencies)\n {\n }", "protected static function updateComposerPackageArray(array $composer, string $dev): array\n {\n if ($dev == 'require-dev') {\n return array_merge([\n 'barryvdh/laravel-debugbar' => '^3.2',\n 'barryvdh/laravel-ide-helper' => '^2.6',\n 'friendsofphp/php-cs-fixer' => '^2.16',\n 'nunomaduro/larastan' => '^0.5.2',\n ], $composer);\n } else {\n return array_merge([\n 'livewire/livewire' => '^1.0',\n ], $composer);\n }\n }", "public function get_dependencies()\n {\n return array(\n 'requires' => array(\n 'JavaScript enabled',\n 'points',\n ),\n 'recommends' => array(),\n 'conflicts_with' => array()\n );\n }", "public function mergeDependencies()\n {\n $this->dependencies = array_merge($this->dependencies, $this->commonDependencies);\n }", "public function dependencies() {\n\t\tif ($customPath = $this->params['custom']) {\n\t\t\t$this->_paths = [$customPath];\n\t\t} elseif (!empty($this->params['plugin'])) {\n\t\t\t$this->_paths = [CakePlugin::path($this->params['plugin'])];\n\t\t} else {\n\t\t\t$this->_paths = [APP];\n\t\t}\n\n\t\t$this->_findFiles('php');\n\t\tforeach ($this->_files as $file) {\n\t\t\t$this->out(sprintf('Updating %s...', $file), 1, Shell::VERBOSE);\n\n\t\t\t$this->_correctFile($file);\n\n\t\t\t$this->out(sprintf('Done updating %s', $file), 1, Shell::VERBOSE);\n\t\t}\n\t}", "function add_option($option, $value = '', $deprecated = '', $autoload = 'yes')\n {\n }", "public function __addRequire($v)\n{\n\tif(!in_array($v,$this->__extrafiles)) $this->__extrafiles[] = $v;\n}", "public function getDependencyConfig(): array\n {\n return [\n 'invokables' => ['DoctrineModule\\Authentication\\Storage\\Session' => LaminasSessionStorage::class],\n 'factories' => ['doctrine.cli' => Service\\CliFactory::class],\n 'abstract_factories' => ['DoctrineModule' => ServiceFactory\\AbstractDoctrineServiceFactory::class],\n ];\n }", "public function get_dependencies()\n {\n return array(\n 'requires' => array(\n 'Conversr',\n ),\n 'recommends' => array(),\n 'conflicts_with' => array()\n );\n }" ]
[ "0.5920187", "0.58762705", "0.55962074", "0.5414203", "0.5285141", "0.525705", "0.5253719", "0.52028227", "0.5188637", "0.5140187", "0.51334393", "0.5119874", "0.51079035", "0.5081996", "0.50043845", "0.49999052", "0.49728587", "0.49551252", "0.49512973", "0.49407893", "0.4929995", "0.49037644", "0.48915982", "0.48487172", "0.4834943", "0.48157722", "0.47839215", "0.47466692", "0.47334775", "0.47226864" ]
0.6786218
0
Filter the query on the scene_id column Example usage: $query>filterBySceneId(1234); // WHERE scene_id = 1234 $query>filterBySceneId(array(12, 34)); // WHERE scene_id IN (12, 34) $query>filterBySceneId(array('min' => 12)); // WHERE scene_id > 12
public function filterBySceneId($sceneId = null, $comparison = null) { if (is_array($sceneId)) { $useMinMax = false; if (isset($sceneId['min'])) { $this->addUsingAlias(SceneTableMap::COL_SCENE_ID, $sceneId['min'], Criteria::GREATER_EQUAL); $useMinMax = true; } if (isset($sceneId['max'])) { $this->addUsingAlias(SceneTableMap::COL_SCENE_ID, $sceneId['max'], Criteria::LESS_EQUAL); $useMinMax = true; } if ($useMinMax) { return $this; } if (null === $comparison) { $comparison = Criteria::IN; } } return $this->addUsingAlias(SceneTableMap::COL_SCENE_ID, $sceneId, $comparison); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(SceneTableMap::COL_SCENE_ID, $key, Criteria::EQUAL);\n }", "public function filterId(int $id): self;", "public function filterByPrimaryKeys($keys)\n {\n\n return $this->addUsingAlias(SceneTableMap::COL_SCENE_ID, $keys, Criteria::IN);\n }", "public function itemsFilterIds($params){\n\t\tif(empty($params['orderby'])){\n\t\t\t$params['orderby']=$this->leftKeyName;\n\t\t\t}\n\t\treturn parent::itemsFilterIds($params);\n\t\t}", "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(MateriaTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "public function filter()\n\t{\n\t\treturn implode( ' AND ', array_map( function( $col ) { return \"$col=?\"; }, array_keys( $this->_id ) ) );\n\t}", "public function filterUser(int|UniqueId $id): self;", "public function whereId($id);", "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(SocioTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(Routes2011Peer::ID, $key, Criteria::EQUAL);\n\t}", "private function filterLevels()\n {\n if(empty($this->levels)) {\n return;\n }\n\n $this->query->andWhere(['IN', 'level', $this->levels]);\n }", "public function filterUser(int $id): self;", "public function filterIds(int ...$ids): self;", "public function getFilter($id)\n {\n return parent::getFilter(strtolower($id));\n }", "function PreciosFilter( $Filter )\n {\n $Field = PreciosField( $Filter );\n \n $where = \"\";\n if( !empty($Filter->precMin) ) $where = 'AND '.$Field.'>='.$Filter->precMin.' ';\n if( !empty($Filter->precMax) && $Filter->precMax<150) $where .= 'AND '.$Field.'<='.$Filter->precMax.' ';\n\n if( !empty($where) ) $where .= 'AND '.$Field.'>0 ';\n return $where; \n }", "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(MesaPeer::ID_MESA, $key, Criteria::EQUAL);\n\t}", "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(ClientStateTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "public function series_filter_params(string $id)\n {\n return $this->request(\"series/{$id}/filter/params\");\n }", "public function filtering();", "function automap_filter_by_ids(&$obj, $params = null) {\n if(isset($params['filter_by_ids']) && $params['filter_by_ids'] != '') {\n $allowed_ids = array_flip(explode(',', $params['filter_by_ids']));\n automap_filter_tree($allowed_ids, $obj);\n }\n}", "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(RemAanvraagTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "public function filter()\n\t{\n\t\tif (isset($_GET['cty']) AND (int) $_GET['cty'])\n\t\t{\n\t\t\t$db = new Database();\n\n\t\t\t$county_id = (int) $_GET['cty'];\n\t\t\t$sql = \"SELECT AsText(geometry) as geometry\n\t\t\t\t\tFROM \".Kohana::config('database.default.table_prefix').\"county \n\t\t\t\t\tWHERE id = ?\";\n\t\t\t$query = $db->query($sql, $county_id);\n\t\t\t$geometry = FALSE;\n\t\t\tforeach ( $query as $item )\n\t\t\t{\n\t\t\t\t$geometry = $item->geometry;\n\t\t\t}\n\n\t\t\tif ($geometry)\n\t\t\t{\n\t\t\t\t$filter = \" MBRContains(GeomFromText('\".$geometry.\"'), GeomFromText(CONCAT_WS(' ','Point(',l.longitude, l.latitude,')')))\";\n\n\t\t\t\t// Finally add to filters params\n\t\t\t\tarray_push(Event::$data, $filter);\n\t\t\t}\n\t\t}\n\n\t\tif (isset($_GET['cst']) AND (int) $_GET['cst'])\n\t\t{\n\t\t\t$db = new Database();\n\n\t\t\t$constituency_id = (int) $_GET['cst'];\n\t\t\t$sql = \"SELECT AsText(geometry) as geometry\n\t\t\t\t\tFROM \".Kohana::config('database.default.table_prefix').\"constituency \n\t\t\t\t\tWHERE id = ?\";\n\t\t\t$query = $db->query($sql, $constituency_id);\n\t\t\t$geometry = FALSE;\n\t\t\tforeach ( $query as $item )\n\t\t\t{\n\t\t\t\t$geometry = $item->geometry;\n\t\t\t}\n\n\t\t\tif ($geometry)\n\t\t\t{\n\t\t\t\t$filter = \" MBRContains(GeomFromText('\".$geometry.\"'), GeomFromText(CONCAT_WS(' ','Point(',l.longitude, l.latitude,')')))\";\n\n\t\t\t\t// Finally add to filters params\n\t\t\t\tarray_push(Event::$data, $filter);\n\t\t\t}\n\t\t}\n\t}", "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(ClientPrestationsPeer::CL_PREST_ID, $key, Criteria::EQUAL);\n }", "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(AlumnoTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(CalendarPeer::ID, $key, Criteria::EQUAL);\n\t}", "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(TrabajosTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(EmployeeTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(EmployeeTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(FacturesPrestationsPeer::FACT_PREST_ID, $key, Criteria::EQUAL);\n }", "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(LyricTableMap::COL_ID, $key, Criteria::EQUAL);\n }" ]
[ "0.62507355", "0.52833366", "0.5076601", "0.5074339", "0.50417024", "0.49674606", "0.48690894", "0.48471305", "0.482481", "0.4824601", "0.48025548", "0.47710732", "0.47683024", "0.47671998", "0.47402745", "0.47310618", "0.47300684", "0.47291607", "0.47286707", "0.47137916", "0.46792105", "0.46780264", "0.46762764", "0.4672865", "0.46708354", "0.4669641", "0.46635517", "0.46635517", "0.46615046", "0.46149772" ]
0.62240636
1